@abtnode/webapp 1.16.21 → 1.16.22-beta-079a9053
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 +38 -10
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/js/1059.1bd7ff1d.chunk.js +1 -0
- package/build/static/js/{1366.c907fe53.chunk.js → 1366.b3bb08fc.chunk.js} +2 -2
- package/build/static/js/1575.7ea40dd9.chunk.js +1 -0
- package/build/static/js/2019.a5e56c99.chunk.js +1 -0
- package/build/static/js/233.31d921c9.chunk.js +1 -0
- package/build/static/js/{2334.7bcaaba9.chunk.js → 2334.6c96ef7e.chunk.js} +1 -1
- package/build/static/js/2661.6a4f6166.chunk.js +1 -0
- package/build/static/js/2978.4e3df936.chunk.js +1 -0
- package/build/static/js/31.39d475aa.chunk.js +1 -0
- package/build/static/js/3803.8416938f.chunk.js +1 -0
- package/build/static/js/3930.b0a49a1d.chunk.js +1 -0
- package/build/static/js/4317.91732893.chunk.js +1 -0
- package/build/static/js/4423.721030a4.chunk.js +1 -0
- package/build/static/js/4465.f37140e1.chunk.js +1 -0
- package/build/static/js/4654.24f11775.chunk.js +1 -0
- package/build/static/js/4657.1be0470f.chunk.js +1 -0
- package/build/static/js/5163.cca32038.chunk.js +1 -0
- package/build/static/js/5748.30622679.chunk.js +1 -0
- package/build/static/js/5904.02123820.chunk.js +1 -0
- package/build/static/js/6780.aa9fb3ec.chunk.js +1 -0
- package/build/static/js/6906.7adbbd43.chunk.js +1 -0
- package/build/static/js/6944.1c06d792.chunk.js +1 -0
- package/build/static/js/6950.9da8ac88.chunk.js +1 -0
- package/build/static/js/7082.bc59e4c9.chunk.js +1 -0
- package/build/static/js/754.95d43c7d.chunk.js +1 -0
- package/build/static/js/7641.a0822ba8.chunk.js +1 -0
- package/build/static/js/7875.a04872ec.chunk.js +2 -0
- package/build/static/js/7913.2a92d95b.chunk.js +1 -0
- package/build/static/js/8170.d2a11a34.chunk.js +1 -0
- package/build/static/js/8590.0bf73838.chunk.js +1 -0
- package/build/static/js/8809.82c05cab.chunk.js +1 -0
- package/build/static/js/9248.6cfcd5b2.chunk.js +1 -0
- package/build/static/js/9249.96584fcc.chunk.js +1 -0
- package/build/static/js/9586.a5910d1c.chunk.js +1 -0
- package/build/static/js/9651.0cb999aa.chunk.js +1 -0
- package/build/static/js/main.f7eb1485.js +2 -0
- package/package.json +1 -1
- package/build/static/js/6780.dfa6fda3.chunk.js +0 -1
- package/build/static/js/6950.fc163899.chunk.js +0 -1
- package/build/static/js/7875.c99786d4.chunk.js +0 -2
- package/build/static/js/7913.b1fac176.chunk.js +0 -1
- package/build/static/js/9249.f273bde9.chunk.js +0 -1
- package/build/static/js/main.48eae4aa.js +0 -2
- /package/build/static/js/{1366.c907fe53.chunk.js.LICENSE.txt → 1366.b3bb08fc.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7875.c99786d4.chunk.js.LICENSE.txt → 7875.a04872ec.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.48eae4aa.js.LICENSE.txt → main.f7eb1485.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6780],{79777:(e,t,n)=>{n.d(t,{C:()=>i,P:()=>o,R:()=>a});var r=Object.defineProperty,s=(e,t)=>r(e,"name",{value:t,configurable:!0});class i{constructor(e){var t=this;this.getStartOfToken=()=>this._start,this.getCurrentPosition=()=>this._pos,this.eol=()=>this._sourceText.length===this._pos,this.sol=()=>0===this._pos,this.peek=()=>this._sourceText.charAt(this._pos)?this._sourceText.charAt(this._pos):null,this.next=()=>{const e=this._sourceText.charAt(this._pos);return this._pos++,e},this.eat=e=>{if(this._testNextCharacter(e))return this._start=this._pos,this._pos++,this._sourceText.charAt(this._pos-1)},this.eatWhile=e=>{let t=this._testNextCharacter(e),n=!1;for(t&&(n=t,this._start=this._pos);t;)this._pos++,t=this._testNextCharacter(e),n=!0;return n},this.eatSpace=()=>this.eatWhile(/[\s\u00a0]/),this.skipToEnd=()=>{this._pos=this._sourceText.length},this.skipTo=e=>{this._pos=e},this.match=function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=null,s=null;if("string"===typeof e){s=new RegExp(e,arguments.length>2&&void 0!==arguments[2]&&arguments[2]?"i":"g").test(t._sourceText.substr(t._pos,e.length)),r=e}else e instanceof RegExp&&(s=t._sourceText.slice(t._pos).match(e),r=null===s||void 0===s?void 0:s[0]);return!(null==s||!("string"===typeof e||s instanceof Array&&t._sourceText.startsWith(s[0],t._pos)))&&(n&&(t._start=t._pos,r&&r.length&&(t._pos+=r.length)),s)},this.backUp=e=>{this._pos-=e},this.column=()=>this._pos,this.indentation=()=>{const e=this._sourceText.match(/\s*/);let t=0;if(e&&0!==e.length){const n=e[0];let r=0;for(;n.length>r;)9===n.charCodeAt(r)?t+=2:t++,r++}return t},this.current=()=>this._sourceText.slice(this._start,this._pos),this._start=0,this._pos=0,this._sourceText=e}_testNextCharacter(e){const t=this._sourceText.charAt(this._pos);let n=!1;return n="string"===typeof e?t===e:e instanceof RegExp?e.test(t):e(t),n}}s(i,"CharacterStream");class a{constructor(e,t){this.containsPosition=e=>this.start.line===e.line?this.start.character<=e.character:this.end.line===e.line?this.end.character>=e.character:this.start.line<=e.line&&this.end.line>=e.line,this.start=e,this.end=t}setStart(e,t){this.start=new o(e,t)}setEnd(e,t){this.end=new o(e,t)}}s(a,"Range");class o{constructor(e,t){this.lessThanOrEqualTo=e=>this.line<e.line||this.line===e.line&&this.character<=e.character,this.line=e,this.character=t}setLine(e){this.line=e}setCharacter(e){this.character=e}}s(o,"Position")},66780:(e,t,n)=>{n.r(t);var r=n(48262),s=n(1367),i=n(54495),a=n(63669),o=n(15617),l=n(77916),c=n(86066),u=n(52546),h=n(84646),p=n(23453),d=n(92793),f=n(65915),v=n(83703),g=n(14141),m=n(5826),_=n(77382),y=n(27499),S=n(72996),k=n(60844),x=n(56327),b=n(92460),C=n(72243),T=n(43113),w=(n(40125),n(79777)),R=n(13693),A=(n(5057),n(53627),Object.defineProperty),P=(e,t)=>A(e,"name",{value:t,configurable:!0});const L=[s.t,i.q,a.P,o.L,l.y,c.o,u.I,h.J,p.k,d.g,f.L,v.P];function E(e,t,n,r,s){const i=g.i.filter((e=>e!==m.J&&e!==_.i&&(!r||e!==y.a)));n&&Array.prototype.push.apply(i,n),s&&Array.prototype.push.apply(i,L);return(0,S.Gu)(e,t,i).filter((e=>{if(-1!==e.message.indexOf("Unknown directive")&&e.nodes){const t=e.nodes[0];if(t&&t.kind===k.h.DIRECTIVE){const e=t.name.value;if("arguments"===e||"argumentDefinitions"===e)return!1}}return!0}))}P(E,"validateWithCustomRules");const O={["Error"]:1,["Warning"]:2,["Information"]:3,["Hint"]:4},Q=P(((e,t)=>{if(!e)throw new Error(t)}),"invariant");function W(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0;var i,a;let o=null;s&&(e+="string"===typeof s?"\n\n"+s:"\n\n"+s.reduce(((e,t)=>e+=(0,x.S)(t)+"\n\n"),""));try{o=(0,b.Qc)(e)}catch(l){if(l instanceof C.__){const t=D(null!==(a=null===(i=l.locations)||void 0===i?void 0:i[0])&&void 0!==a?a:{line:0,column:0},e);return[{severity:O.Error,message:l.message,source:"GraphQL: Syntax",range:t}]}throw l}return G(o,t,n,r)}function G(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t)return[];const n=I(E(t,e,arguments.length>2?arguments[2]:void 0,arguments.length>3?arguments[3]:void 0),(e=>j(e,O.Error,"Validation"))),r=I((0,S.Gu)(t,e,[T.r]),(e=>j(e,O.Warning,"Deprecation")));return n.concat(r)}function I(e,t){return Array.prototype.concat.apply([],e.map(t))}function j(e,t,n){if(!e.nodes)return[];const r=[];return e.nodes.forEach((s=>{const i="Variable"!==s.kind&&"name"in s&&void 0!==s.name?s.name:"variable"in s&&void 0!==s.variable?s.variable:s;if(i){Q(e.locations,"GraphQL validation error requires locations.");const s=e.locations[0],a=N(i),o=s.column+(a.end-a.start);r.push({source:"GraphQL: ".concat(n),message:e.message,severity:t,range:new w.R(new w.P(s.line-1,s.column-1),new w.P(s.line-1,o))})}})),r}function D(e,t){const n=(0,R.o)(),r=n.startState(),s=t.split("\n");Q(s.length>=e.line,"Query text must have more lines than where the error happened");let i=null;for(let c=0;c<e.line;c++)for(i=new w.C(s[c]);!i.eol();){if("invalidchar"===n.token(i,r))break}Q(i,"Expected Parser stream to be available.");const a=e.line-1,o=i.getStartOfToken(),l=i.getCurrentPosition();return new w.R(new w.P(a,o),new w.P(a,l))}function N(e){const t=e.loc;return Q(t,"Expected ASTNode to have a location."),t}P(W,"getDiagnostics"),P(G,"validateQuery"),P(I,"mapCat"),P(j,"annotations"),P(D,"getRange"),P(N,"getLocation");const q=["error","warning","information","hint"],U={"GraphQL: Validation":"validation","GraphQL: Deprecation":"deprecation","GraphQL: Syntax":"syntax"};r.C.registerHelper("lint","graphql",((e,t)=>W(e,t.schema,t.validationRules,void 0,t.externalFragments).map((e=>({message:e.message,severity:e.severity?q[e.severity-1]:q[0],type:e.source?U[e.source]:void 0,from:r.C.Pos(e.range.start.line,e.range.start.character),to:r.C.Pos(e.range.end.line,e.range.end.character)})))))},13693:(e,t,n)=>{n.d(t,{o:()=>o});var r=n(40125),s=n(60844),i=Object.defineProperty,a=(e,t)=>i(e,"name",{value:t,configurable:!0});function o(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{eatWhitespace:e=>e.eatWhile(r.i),lexRules:r.L,parseRules:r.P,editorConfig:{}};return{startState(){const t={level:0,step:0,name:null,kind:null,type:null,rule:null,needsSeparator:!1,prevState:null};return h(e.parseRules,t,s.h.DOCUMENT),t},token:(t,n)=>l(t,n,e)}}function l(e,t,n){var r;if(t.inBlockstring)return e.match(/.*"""/)?(t.inBlockstring=!1,"string"):(e.skipToEnd(),"string");const{lexRules:s,parseRules:i,eatWhitespace:a,editorConfig:o}=n;if(t.rule&&0===t.rule.length?p(t):t.needsAdvance&&(t.needsAdvance=!1,d(t,!0)),e.sol()){const n=(null===o||void 0===o?void 0:o.tabSize)||2;t.indentLevel=Math.floor(e.indentation()/n)}if(a(e))return"ws";const l=g(s,e);if(!l){return e.match(/\S+/)||e.match(/\s/),h(u,t,"Invalid"),"invalidchar"}if("Comment"===l.kind)return h(u,t,"Comment"),"comment";const f=c({},t);if("Punctuation"===l.kind)if(/^[{([]/.test(l.value))void 0!==t.indentLevel&&(t.levels=(t.levels||[]).concat(t.indentLevel+1));else if(/^[})\]]/.test(l.value)){const e=t.levels=(t.levels||[]).slice(0,-1);t.indentLevel&&e.length>0&&e[e.length-1]<t.indentLevel&&(t.indentLevel=e[e.length-1])}for(;t.rule;){let n="function"===typeof t.rule?0===t.step?t.rule(l,e):null:t.rule[t.step];if(t.needsSeparator&&(n=null===n||void 0===n?void 0:n.separator),n){if(n.ofRule&&(n=n.ofRule),"string"===typeof n){h(i,t,n);continue}if(null===(r=n.match)||void 0===r?void 0:r.call(n,l))return n.update&&n.update(t,l),"Punctuation"===l.kind?d(t,!0):t.needsAdvance=!0,n.style}v(t)}return c(t,f),h(u,t,"Invalid"),"invalidchar"}function c(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r++)e[n[r]]=t[n[r]];return e}a(o,"onlineParser"),a(l,"getToken"),a(c,"assign");const u={Invalid:[],Comment:[]};function h(e,t,n){if(!e[n])throw new TypeError("Unknown rule: "+n);t.prevState=Object.assign({},t),t.kind=n,t.name=null,t.type=null,t.rule=e[n],t.step=0,t.needsSeparator=!1}function p(e){e.prevState&&(e.kind=e.prevState.kind,e.name=e.prevState.name,e.type=e.prevState.type,e.rule=e.prevState.rule,e.step=e.prevState.step,e.needsSeparator=e.prevState.needsSeparator,e.prevState=e.prevState.prevState)}function d(e,t){var n;if(f(e)&&e.rule){const n=e.rule[e.step];if(n.separator){const t=n.separator;if(e.needsSeparator=!e.needsSeparator,!e.needsSeparator&&t.ofRule)return}if(t)return}for(e.needsSeparator=!1,e.step++;e.rule&&!(Array.isArray(e.rule)&&e.step<e.rule.length);)p(e),e.rule&&(f(e)?(null===(n=e.rule)||void 0===n?void 0:n[e.step].separator)&&(e.needsSeparator=!e.needsSeparator):(e.needsSeparator=!1,e.step++))}function f(e){const t=Array.isArray(e.rule)&&"string"!==typeof e.rule[e.step]&&e.rule[e.step];return t&&t.isList}function v(e){for(;e.rule&&(!Array.isArray(e.rule)||!e.rule[e.step].ofRule);)p(e);e.rule&&d(e,!1)}function g(e,t){const n=Object.keys(e);for(let r=0;r<n.length;r++){const s=t.match(e[n[r]]);if(s&&s instanceof Array)return{kind:n[r],value:s[0]}}}a(h,"pushRule"),a(p,"popRule"),a(d,"advanceRule"),a(f,"isList"),a(v,"unsuccessful"),a(g,"lex")}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6950],{16950:(e,n,i)=>{i.r(n),i.d(n,{default:()=>fe});var t=i(71171),r=i(5057),o=i(33518),s=i(85493),a=i(10458),c=i.n(a),l=i(6352),p=i.n(l),d=i(43681),u=i.n(d),v=i(26796),f=i(55898),m=i.n(f),x=i(79366),g=i(44846),h=i(35474),_=i(68420),w=i(13128),j=i(57471),y=i(96266);const Z=(0,j.Z)((0,y.jsx)("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"}),"Inbox");var b;function k(e){let{invitation:n,createPassportSvg:i,passportColor:t}=e;const[o,s]=(0,r.useState)(!1),{t:a}=(0,r.useContext)(_.RD),c=(0,r.useMemo)((()=>(n.role.title||n.role.name).toUpperCase()),[n.role.title,n.role.name]),l=(0,r.useMemo)((()=>i({title:c,issuer:n.info.name,issuerDid:n.info.appDid,ownerName:"Your Name",ownerDid:n.info.appDid,preferredColor:n.info.passportColor||t})),[n,c]),p=(0,r.useCallback)((()=>{s(!0)}),[]),d=(0,r.useCallback)((()=>{s(!1)}),[]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(S,{children:(0,y.jsx)("div",{className:"invite-passport__card",onClick:p,children:(0,y.jsx)("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:l}})})}),(0,y.jsx)(w.ZP,{open:o,title:a("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:d,children:n.role.permissions&&n.role.permissions.length>0?(0,y.jsx)("ul",{style:{listStyle:"circle",padding:"0 20px"},children:n.role.permissions.map((e=>(0,y.jsx)("li",{style:{listStyle:"circle"},children:e.description},e.name)))}):(0,y.jsxs)("div",{style:{color:"#999",textAlign:"center"},children:[(0,y.jsx)(Z,{style:{width:"30px",height:"30px"}}),(0,y.jsx)("div",{children:a("invite.emptyPermission")})]})})]})}k.propTypes={invitation:m().object.isRequired,createPassportSvg:m().func.isRequired,passportColor:m().string},k.defaultProps={passportColor:"auto"};const S=o.Z.div(b||(b=(0,t.Z)(["\n display: flex;\n max-width: 350px;\n margin: 30px auto;\n .invite-passport__card {\n margin: 0 auto;\n width: 228px;\n height: 258px;\n flex-shrink: 0;\n .invite-passport__cover {\n cursor: pointer;\n width: 100%;\n height: 100%;\n }\n }\n .invite-passport__content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .invite-passport__title {\n font-weight: 700;\n font-size: 16px;\n }\n .invite-passport__description {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n height: 3em;\n color: #999;\n font-size: 14px;\n }\n .invite-passport__view-permission {\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n line-height: 18px;\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),C=k;var P,z=i(92459),N=i(74958),R=i(14491),T=i(70284),L=i(73545);function F(e){let{invitation:n,onLogin:i,onReceive:t,inService:o}=e;const{t:s,locale:a}=(0,_.PE)(),{connectApi:c}=(0,L.T)(),{getPassportId:l}=(0,T.Z)();let d;var u,v;"undefined"!==typeof window&&(d=null===(u=window)||void 0===u||null===(v=u.blocklet)||void 0===v?void 0:v.componentId);const f={passportId:l(),inviteId:n.inviteId,baseUrl:window.location.origin,componentId:d},m=(0,r.useCallback)((()=>{c.close()}),[c]),x=(0,r.useCallback)((function(){c.close(),i(...arguments)}),[i,c]),g=(0,r.useCallback)((()=>{"function"!==typeof t?o?c.openPopup({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:a,extraParams:{provider:"wallet",...f},baseUrl:window.location.origin,prefix:p()(window.location.origin,N.Bu,N.nC),messages:{title:s("receive.dialog.title"),scan:s("receive.dialog.scan"),confirm:s("receive.dialog.confirm"),success:s("receive.dialog.success")},onSuccess:x,onClose:m},{locale:a}):c.open({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:a,extraParams:f,messages:{title:s("receive.dialog.title"),scan:s("receive.dialog.scan"),confirm:s("receive.dialog.confirm"),success:s("receive.dialog.success")},onSuccess:x,onClose:m}):t()}),[c.openPopup]);return(0,y.jsxs)(I,{children:[(0,y.jsx)(z.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:g,children:s("invite.receive")}),(0,y.jsxs)("div",{className:"invite-receive__until",children:[s("invite.validUntil"),(0,R.o0)(n.expireDate,a)]})]})}F.propTypes={invitation:m().object.isRequired,onLogin:m().func,onReceive:m().func,inService:m().bool},F.defaultProps={onLogin:()=>{},onReceive:null,inService:!1};const I=o.Z.div(P||(P=(0,t.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),E=F;var D;function U(e){let{onLogin:n}=e;const{t:i}=(0,_.PE)();return(0,y.jsx)(M,{children:(0,y.jsx)(z.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:()=>n(),children:i("common.connect")})})}U.propTypes={onLogin:m().func},U.defaultProps={onLogin:()=>{}};const M=o.Z.div(D||(D=(0,t.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),q=U;var W,H=i(72333);function O(e){let{invitation:n}=e;const{t:i}=(0,_.PE)(),t=(0,r.useMemo)((()=>(n.role.title||n.role.name).toUpperCase()),[n.role.title,n.role.name]),o=(0,r.useMemo)((()=>i("invite.message",{name:"{{name}}",role:t,dapp:"{{dapp}}"})),[i,t]),s=(0,R.E8)(n.info.chainHost,n.inviter.did,"account"),a=(0,R.Zp)(o,{name:()=>s?(0,y.jsx)("a",{target:"_blank",href:s,className:"invite-user__link",rel:"noreferrer",children:n.inviter.fullName},"name"):n.inviter.fullName,dapp:()=>(0,y.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")});return(0,y.jsxs)(A,{children:[(0,y.jsx)(H.Z,{did:n.inviter.did,src:encodeURI(n.inviter.avatar),size:80,shape:"circle",variant:"circle"}),(0,y.jsx)("div",{className:"invite-user__message",children:a})]})}O.propTypes={invitation:m().object.isRequired};const A=o.Z.div(W||(W=(0,t.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),B=O;var V,Y=i(39948),J=i(76005);function K(e){let{invitation:n,type:i}=e;const{t:t}=(0,_.PE)(),o=(0,r.useMemo)((()=>t("invite.success",{dapp:"{{dapp}}"})),[t]),s=(0,R.E8)(n.info.chainHost,n.inviter.did,"account"),a="receiver"===i?n.receiver:n.inviter,c=(0,R.Zp)(o,{name:()=>s?(0,y.jsx)("a",{target:"_blank",href:s,className:"invite-user__link",rel:"noreferrer",children:a.fullName},"name"):a.fullName,dapp:()=>(0,y.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")});return(0,y.jsxs)(G,{children:[(0,y.jsx)(Y.Z,{pt:1,color:"success.main",children:(0,y.jsx)(J.Z,{style:{fontSize:80}})}),(0,y.jsx)("div",{className:"invite-user__message",children:c})]})}K.propTypes={invitation:m().object.isRequired,type:m().oneOf("inviter","receiver")},K.defaultProps={type:"inviter"};const G=o.Z.div(V||(V=(0,t.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),Q=K;var X;function $(e){let{invitation:n,...i}=e;return(0,y.jsxs)(ee,{...i,children:[(0,y.jsx)(H.Z,{did:n.info.did,src:n.info.logo,style:{flexShrink:0}}),(0,y.jsxs)("div",{className:"invite-app__content",children:[(0,y.jsx)("div",{className:"invite-app__title",children:n.info.name}),(0,y.jsx)("div",{className:"invite-app__description",children:n.info.description})]})]})}$.propTypes={invitation:m().object.isRequired};const ee=o.Z.div(X||(X=(0,t.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n overflow: hidden;\n .invite-app__content {\n flex: 1;\n margin: 0 12px;\n font-weight: 700;\n overflow: hidden;\n }\n .invite-app__title {\n line-height: 1;\n margin-bottom: 2px;\n overflow: hidden;\n }\n .invite-app__description {\n font-size: 12px;\n white-space: nowrap;\n text-overflow: ellipsis;\n height: 1.3em;\n color: #999;\n overflow: hidden;\n }\n"]))),ne=$;var ie,te=i(5766);function re(e){let{getDataFn:n,passportColor:i,createPassportSvg:t,onLoginSuccess:r,checkFn:o,onReceive:s,inService:a}=e;const c=(0,x.Z)(n);if(c.loading)return(0,y.jsx)(g.Z,{});var l,p;if(c.error)return(0,y.jsx)(h.Z,{status:"404",title:null===(l=c.error)||void 0===l||null===(p=l.response)||void 0===p?void 0:p.data,description:""});const d="success"===c.data.status,u=d?Q:B,v=d?q:E;return(0,y.jsxs)(oe,{className:"page-invite__wrapper",children:[(0,y.jsx)(ne,{invitation:c.data}),(0,y.jsxs)("div",{className:"page-invite__card",children:[(0,y.jsx)(u,{invitation:c.data}),(0,y.jsx)(C,{invitation:c.data,createPassportSvg:t,passportColor:i}),(0,y.jsx)(v,{invitation:c.data,onLogin:r,checkFn:o,onReceive:s,inService:a})]})]})}re.propTypes={getDataFn:m().func.isRequired,checkFn:m().func.isRequired,createPassportSvg:m().func.isRequired,onLoginSuccess:m().func,onReceive:m().func,passportColor:m().string,inService:m().bool},re.defaultProps={onLoginSuccess:()=>{},passportColor:"auto",onReceive:null,inService:!1};const oe=o.Z.div(ie||(ie=(0,t.Z)(["\n max-width: 460px;\n max-height: 650px;\n min-height: 450px;\n width: 90%;\n height: 80%;\n display: flex;\n flex-direction: column;\n .page-invite__card {\n background-color: #fff;\n border-radius: 4px;\n flex: 1;\n padding: 20px 30px;\n margin-top: 10px;\n }\n .page-invite__app {\n margin-top: 20px;\n }\n"]))),se=(0,te.Z)(re);var ae,ce=i(43316),le=i(25339),pe=i(75793),de=i(74094);function ue(e){const{api:n,session:i}=(0,le.Tt)(),{info:t}=(0,pe.h6)(),o=(0,s.useLocation)(),a=(0,s.useNavigate)(),{t:l,locale:d}=(0,_.PE)(),{encryptKey:f,decrypt:m}=(0,ce.R)(),[x,h]=(0,r.useState)(!1),w=(0,r.useMemo)((()=>new URLSearchParams(o.search).get("inviteId")),[o]),j=(0,v.default)((async()=>{if(!w)return null;let e;const{data:i}=await n.get("/api/invitation",{params:{inviteId:w}}),r=!!u()(t,"ownerNft.did")&&"owner"===i.role.name;if(r){const i=new URL(window.location.href);i.pathname=p()((0,de.Y5)(),"/api/did/invite/token"),i.searchParams.set("_ek_",f),i.searchParams.set("inviteId",w);const{data:t}=await n.get(i.href);e=t}return{invitation:i,nextWorkflow:e,needReceiveNFT:r}})),Z=(0,r.useCallback)((()=>{h(!0)}),[]),b=(0,r.useCallback)((()=>{if(j.error)throw j.error;return j.value.invitation}),[j]),k=(0,r.useCallback)((async e=>{e&&(0,de.ZB)(m(e.sessionToken));const n=new URLSearchParams(o.search);n.delete("inviteId");const t=n.toString();await i.refresh(),a("/".concat(t?"?".concat(t):t),{replace:!0})}),[o,a,i]);if(j.loading)return(0,y.jsx)(g.Z,{});return(0,y.jsxs)(ve,{className:"page-invite",children:[u()(j,"value.needReceiveNFT")&&(0,y.jsx)(ce.Z,{action:"login",popup:!0,className:"connect",open:x,locale:d,baseUrl:t.launcher.url,checkFn:c().create({baseURL:t.launcher.url}).get,onSuccess:()=>{const e=new URL(window.location.href);e.pathname=p()((0,de.Y5)(),"/api/did/invite/status"),e.searchParams.set("_t_",j.value.nextWorkflow.token),e.searchParams.set("locale",d);const t=setInterval((async()=>{const{data:r}=await n.get(e.href);"succeed"===r.status&&(clearInterval(t),i.updateConnectedInfo(r),k(r))}),2e3)},onClose:()=>{h(!1)},checkTimeout:3e5,webWalletUrl:(0,de.yP)(t),extraParams:{nw:u()(j,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:t.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),(0,y.jsx)(se,{...e,getDataFn:b,createPassportSvg:e=>(0,de.Ju)(e,t),checkFn:n.get,onLoginSuccess:k,passportColor:"default",onReceive:u()(j,"value.needReceiveNFT")?Z:null})]})}const ve=o.Z.div(ae||(ae=(0,t.Z)(["\n width: 100vw;\n height: 100%;\n min-height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #f6f8fa;\n overflow: auto;\n padding: 20px;\n"])));function fe(){return(0,pe.h6)().loading?(0,y.jsx)(g.Z,{}):(0,y.jsx)(ue,{})}},5766:(e,n,i)=>{i.d(n,{Z:()=>Z});var t=i(68420),r=i(77668),o=i.n(r),s=i(2586),a=i(56944),c=i(4465),l=i(43803),p=i(23930),d=i(82019),u=i(8590),v=i(61575),f=i(90233),m=i(48170),x=i(69586),g=i(81059),h=i(55748),_=i(56906),w=i(64423);const j={ar:o()(c.Z),de:o()(l.Z),en:o()(s.Z),es:o()(p.Z),fr:o()(d.Z),hi:o()(u.Z),id:o()(v.Z),ja:o()(f.Z),ko:o()(m.Z),pt:o()(x.Z),ru:o()(g.Z),th:o()(h.Z),vi:o()(_.Z),"zh-TW":o()(w.Z),zh:o()(a.Z)};var y=i(96266);function Z(e){return function(n){return(0,y.jsx)(t.Iw,{translations:j,children:(0,y.jsx)(e,{...n})})}}},92459:(e,n,i)=>{i.d(n,{Z:()=>c});var t=i(55898),r=i.n(t),o=i(28726),s=i(81089),a=i(96266);function c(e){let{children:n,...i}=e;return(0,a.jsxs)(o.Z,{color:"did",variant:"contained",...i,children:[(0,a.jsx)("span",{style:{fontWeight:400},children:n||"Continue With"}),(0,a.jsx)(s.Z,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}c.propTypes={children:r().any},c.defaultProps={children:""}},35474:(e,n,i)=>{i.d(n,{Z:()=>N});var t={};i.r(t),i.d(t,{ComingSoon:()=>b,Error:()=>y,Forbidden:()=>w,Info:()=>k,InternalServerError:()=>j,Maintenance:()=>Z,PageNotFound:()=>_});var r,o=i(55898),s=i.n(o),a=i(71171),c=i(39948),l=i(47685),p=i(96266);function d(e){let{icon:n,title:i,description:t,extra:r,...o}=e;return(0,p.jsxs)(u,{...o,children:[n,"string"===typeof i?(0,p.jsx)(c.Z,{mt:3,fontSize:22,fontWeight:400,color:"#47494E",textAlign:"center",children:i}):i,"string"===typeof t?(0,p.jsx)(c.Z,{mt:1,fontSize:14,color:"#7F828B",textAlign:"center",children:t}):t,(0,p.jsx)(c.Z,{mt:3,children:r})]})}d.propTypes={icon:s().element,title:s().oneOfType([s().string,s().element]),description:s().oneOfType([s().string,s().element]),actions:s().any,extra:s().element},d.defaultProps={icon:void 0,title:"",description:"",actions:null,extra:void 0};const u=(0,l.zo)("div")(r||(r=(0,a.Z)(["\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n padding: 16px;\n\n background-color: #f7f8fb;\n"]))),v=d;var f=i(36134),m=i(11532);const x={en:{404:{title:"404 - Page Not Found",description:"Sorry about that, the page you are looking for does not exist or has been moved."},403:{title:"403 \u2013 Forbidden",description:"Sorry, you are not authorized to access this page."},500:{title:"500 - Internal Server Error",description:"An internal server error has occurred. Please try again later."},error:{title:"Application Error",description:"Something went wrong. Please try again later."},maintenance:{title:"Offline for maintenance",description:"This app is undergoing maintenance right now. Please check back later."},comingSoon:{title:"Coming Soon",description:"Our website is under construction. We'll be here soon with our new website."}},zh:{404:{title:"404 - \u9875\u9762\u672a\u627e\u5230",description:"\u5f88\u62b1\u6b49\uff0c\u60a8\u6b63\u5728\u5bfb\u627e\u7684\u9875\u9762\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u79fb\u52a8\u3002"},403:{title:"403 \u2013 \u7981\u6b62\u8bbf\u95ee",description:"\u5f88\u62b1\u6b49\uff0c\u60a8\u6ca1\u6709\u6743\u9650\u8bbf\u95ee\u6b64\u9875\u9762\u3002"},500:{title:"500 - \u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef",description:"\u53d1\u751f\u4e86\u4e00\u4e2a\u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef\u3002\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"},error:{title:"Application Error",description:"\u51fa\u9519\u4e86, \u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"},maintenance:{title:"\u7ef4\u62a4\u4e2d",description:"\u5e94\u7528\u7a0b\u5e8f\u6b63\u5728\u8fdb\u884c\u7ef4\u62a4\u3002\u8bf7\u7a0d\u540e\u518d\u67e5\u770b\u3002"},comingSoon:{title:"\u5373\u5c06\u4e0a\u7ebf",description:"\u6211\u4eec\u7684\u7f51\u7ad9\u6b63\u5728\u5efa\u8bbe\u4e2d\u3002\u6211\u4eec\u5f88\u5feb\u5c31\u4f1a\u5728\u8fd9\u91cc\u63a8\u51fa\u6211\u4eec\u7684\u65b0\u7f51\u7ad9\u3002"}}};var g=i(68420);const h=e=>{e=["zh","en"].includes(e)?e:"";const{locale:n}=(0,g.PE)()||{locale:"en"},i=e||n;return x[i]?i:"en"};function _(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][404].title,description:x[n][404].description,...i})}function w(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][403].title,description:x[n][403].description,...i})}function j(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][500].title,description:x[n][500].description,...i})}function y(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n].error.title,description:x[n].error.description,...i})}function Z(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),title:x[n].maintenance.title,description:x[n].maintenance.description,...i})}function b(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),title:x[n].comingSoon.title,description:x[n].comingSoon.description,...i})}function k(e){return(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),...e})}function S(e){const n=(0,l.Fg)();return(0,p.jsx)(m.Z,{style:{color:n.palette.error.main,fontSize:72},...e})}function C(e){const n=(0,l.Fg)();return(0,p.jsx)(f.Z,{style:{color:n.palette.info.main,fontSize:72},...e})}_.status="404",w.status="403",j.status="500",y.status="error",Z.status="maintenance",b.status="comingSoon",k.status="info";const P=Object.keys(t).reduce(((e,n)=>({...e,[t[n].status||n]:t[n]})),{});function z(e){let{status:n,...i}=e;if(n){if(P[n]){const e=P[n];return(0,p.jsx)(e,{...i})}throw new Error("Please provide a valid status for Result.status. Valid values are: ".concat(Object.keys(P).join(", ")))}return(0,p.jsx)(v,{...i})}z.propTypes={status:s().oneOfType([s().string,s().number]),...v.propTypes},z.defaultProps={status:""};const N=z},11532:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm4.3 14.3c-.39.39-1.02.39-1.41 0L12 13.41 9.11 16.3c-.39.39-1.02.39-1.41 0a.9959.9959 0 0 1 0-1.41L10.59 12 7.7 9.11a.9959.9959 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L12 10.59l2.89-2.89c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41L13.41 12l2.89 2.89c.38.38.38 1.02 0 1.41z"}),"CancelRounded");n.Z=s},76005:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");n.Z=s},36134:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");n.Z=s}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 7875.c99786d4.chunk.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[7875],{77875:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>mi});var o=t(5057),i=t(68420),r=t(71171),a=t(33518),l=t(55898),s=t.n(l),c=t(37541),d=t(39948),p=t(7278),u=t(6838),m=t(87971),h=t(99194),f=t(67680),x=t(44919),g=t(10697),y=t(48037),v=t(34966),b=t(94552),j=t(55402),k=t(75239),C=t(48086),Z=t(88092),R=t(32207),w=t(35258),E=t(27773),S=t(26174),P=t(16147),T=t(55498),U=t(35432),I=t(44846),N=t(64886),D=t(28726),A=t(25710),B=t(38242),L=t(57156),O=t.n(L),F=t(86229),z=t(87363),M=t(17450),G=t(22228),q=t(6352),V=t.n(q),W=t(2078),H=t.n(W),K=t(19778),J=t(38898),Y=t(96266);function Q(e){var n;let{sourceInfo:t,blocklet:r}=e;const{t:a}=(0,o.useContext)(i.RD);return(0,Y.jsxs)(d.Z,{display:"flex",alignItems:"center",children:[(0,Y.jsx)(K.Z,{type:"success",children:H()(t.source)},"source"),"registry"===t.source&&(0,Y.jsx)(J.Z,{href:V()(t.deployedFrom,"blocklets",(null===r||void 0===r||null===(n=r.meta)||void 0===n?void 0:n.bundleDid)||""),target:"_blank",className:"page-link",underline:"hover",style:{display:"flex",alignItems:"center",marginLeft:8},children:a("blocklet.overview.viewInStore")})]})}Q.propTypes={sourceInfo:s().shape({source:s().string,deployedFrom:s().string}),blocklet:s().object},Q.defaultProps={sourceInfo:{},blocklet:{}};var _=t(81010),X=t(40736),$=t(77277),ee=t(70461),ne=t(58238),te=t(14491),oe=t(63406);function ie(e){let{blocklet:n,checkUpgrade:t,hasPermission:r,...a}=e;const{api:l}=(0,ne.h6)(),{t:s}=(0,o.useContext)(i.RD),[c,d]=(0,o.useState)(!1),[p,u]=(0,o.useState)(""),[m,h]=(0,o.useState)(null),[x,g]=(0,o.useState)(null);(0,o.useEffect)((()=>{h(null),t&&(n.mode,$.BLOCKLET_MODES.DEVELOPMENT)}),[n,t]);const y={title:"".concat(s("common.upgrade")," ").concat(s("common.blocklet")," ").concat((0,B.getDisplayName)(n)),description:s("blocklet.action.upgradeDescription"),confirm:s("blocklet.action.confirmUpgrade"),cancel:s("common.cancel"),onConfirm:async()=>{d(!0);try{const e={did:n.meta.did,version:m.version,storeUrl:m.registryUrl||""};await(0,te._v)(2e3),await l.upgradeBlocklet({input:e})}catch(e){F.Z.error("Blocklet upgrade failed: ".concat((0,te.Z)(e)))}finally{d(!1),g(null)}},onCancel:()=>{d(!1),g(null)}};return r&&m&&!(0,B.isInProgress)(n.status)?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(G.Z,{...a,children:n.meta.version}),(0,Y.jsx)(k.Z,{title:s("common.updateAvailable",{version:m.version}),children:(0,Y.jsx)(f.Z,{size:"small",style:{marginLeft:8},disabled:c,onClick:()=>g(y),children:c?(0,Y.jsx)(I.Z,{size:16}):(0,Y.jsx)(X.Z,{style:{fontSize:16,color:"red"}})})}),!!p&&(0,Y.jsx)(F.Z,{variant:"error",message:p,onClose:()=>u("")}),x&&(0,Y.jsx)(ee.Z,{title:x.title,description:x.description,confirm:x.confirm,cancel:x.cancel,params:x.params,onConfirm:x.onConfirm,onCancel:x.onCancel})]}):(0,Y.jsx)(G.Z,{...a,children:n.meta.version})}ie.propTypes={blocklet:s().object.isRequired,checkUpgrade:s().bool,hasPermission:s().bool},ie.defaultProps={checkUpgrade:!1,hasPermission:!1};const re=(0,oe.V)(ie,"mutate_blocklets"),ae=(0,oe.V)(ie,"",te.Wf);function le(e){const{inService:n}=(0,ne.h6)();return n?(0,Y.jsx)(ae,{...e}):(0,Y.jsx)(re,{...e})}var se=t(44784),ce=t(85531);function de(e){let{children:n,...t}=e;const{t:o}=(0,i.PE)(),{updateAutoCheckUpdate:r,autoCheckUpdate:a}=(0,ce.XN)(),l=Boolean(null===a||void 0===a?void 0:a.enabled);return(0,Y.jsxs)(d.Z,{display:"flex",flexDirection:"row",alignItems:"center",children:[n,(0,Y.jsx)(k.Z,{title:o("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:(0,Y.jsx)("div",{children:(0,Y.jsx)(se.Z,{checked:l,onChange:async()=>{try{const e=!(null!==a&&void 0!==a&&a.enabled);await r({enabled:e}),F.Z.success(o(e?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(e){F.Z.error(e.message)}},name:"enableWelcomePage",style:{...t.style,zoom:.8}})})})]})}de.propTypes={children:s().any},de.defaultProps={children:null};const pe=de;var ue,me,he=t(80378),fe=t(32349),xe=t(76667),ge=t(13128),ye=t(94464),ve=t(28358),be=t(47020),je=t(93938),ke=t(50185),Ce=t(35918),Ze=t(74782),Re=t(55419);const we=(e,n)=>{let{description:t}=e;return(Object.values($.CHAIN_PROP_MAP).includes(e.key)||(0,B.isEnvShareable)(e))&&(t=t?"".concat(t," (").concat(n("blocklet.config.sharedToAllComponents"),")"):n("blocklet.config.sharedToAllComponents")),t&&(0,Y.jsx)("div",{style:{marginLeft:12},children:t})},Ee=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return!(null!==t&&void 0!==t&&t.length||e.custom||["CHAIN_ID","CHAIN_HOST"].includes(e.key)||n.meta.environments.find((n=>n.name===e.key))||!n.children.every((n=>!n.meta.environments.find((n=>n.name===e.key)))))||e.custom};function Se(e){let{blocklet:n,ancestors:t}=e;const r=(0,ne.h6)(),{inService:a}=r,{t:l}=(0,o.useContext)(i.RD),s=[...t.map((e=>e.meta.did)),n.meta.did],c=()=>F.Z.success(l("blocklet.config.changedTip")),d=e=>Ee(e,n,t);if((0,te.wS)(n.status))return null;if("unknown"===n.status&&(0,te.wS)(n.status))return null;const p=(n.configs||[]).filter((e=>!$.BLOCKLET_CONFIGURABLE_KEY[e.key])),u=(0,B.getSharedConfigObj)(t[0],n),m=(0,B.getComponentMissingConfigs)(n,t[0]),h=p.map((e=>({...e,value:Object.values($.CHAIN_PROP_MAP).includes(e.key)&&Object.keys(u).includes(e.key)?u[e.key]:u[e.key]||e.value}))),f=h.some((e=>e.key&&e.key.startsWith("BWA_"))),x={onRowAdd:async e=>{if(e.key.trim()&&e.value.trim())if(e.key.startsWith("BLOCKLET_")||e.key.startsWith("COMPONENT_"))F.Z.error(l("blocklet.config.environment.invalidKey"));else{e.custom=!0;try{const n=await r.api.configBlocklet({input:{did:s,configs:[e]}});c(n.blocklet)}catch(n){F.Z.error((0,te.Z)(n))}}else F.Z.error(l("blocklet.config.environment.keyValueRequired"))},onRowUpdate:async(e,o)=>{if(e.required&&(!e.key.trim()||!e.value.trim()))return void F.Z.error(l("blocklet.config.environment.keyValueRequired"));if(e.key.startsWith("BLOCKLET_")&&!$.BLOCKLET_CONFIGURABLE_KEY[e.key])return void F.Z.error(l("blocklet.config.environment.invalidKey"));if(e.key===$.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const n=(0,te.I)(e);if(n)return void F.Z.error(n)}const i=[e];if(e.key!==o.key){if(!Ee(e,n,t))return void F.Z.error("Only key of custom env can be changed");i.push({key:o.key,custom:!0})}try{const e=await r.api.configBlocklet({input:{did:s,configs:i}});c(e.blocklet)}catch(a){F.Z.error((0,te.Z)(a))}},onRowDelete:async e=>{if(e.required)F.Z.error(l("blocklet.config.environment.deleteForbidden"));else if(Ee(e,n,t))try{const n=await r.api.configBlocklet({input:{did:s,configs:[{key:e.key,custom:!0}]}});c(n.blocklet)}catch(o){F.Z.error((0,te.Z)(o))}else F.Z.error("Only key of custom env can be changed")},isDeletable:d};return(0,Y.jsxs)(Pe,{children:[!!m.length&&(0,Y.jsx)(je.Z,{severity:"error",style:{marginTop:24},children:l("blocklet.config.missingRequired")}),f&&(0,Y.jsx)(je.Z,{severity:"info",children:l("blocklet.config.environment.tip")}),(0,Y.jsx)(oe.Z,{permission:a?"":"mutate_blocklets",role:a?te.Wf:[],children:e=>(0,Y.jsx)(Ze.Z,{className:"config-table",children:(0,Y.jsx)(ve.ZP,{title:(0,Y.jsx)("h4",{children:l("common.environment")}),columns:[{title:l("common.key"),field:"key",initialEditValue:"Key",width:"30%",render:e=>(0,Y.jsx)(ke.Z,{value:e.value,style:{color:e.required&&!e.value?"#ff4436":"#222222",fontWeight:e.required?"bold":"normal"},children:e.key}),editComponent:e=>{const{value:n,rowData:t,onChange:o}=e;return(0,Y.jsx)(Te,{children:(0,Y.jsx)(be.Z,{fullWidth:!0,size:"small",disabled:!1===d(t),value:n,onChange:e=>o(e.target.value),variant:"outlined",label:"Key",placeholder:l("blocklet.config.environment.key"),margin:"dense",autoFocus:!0})})}},{title:l("common.value"),field:"value",initialEditValue:"Value",width:"calc((100% - (96px + 30%)) / 1)",render:e=>e.value?e.secure?"******":(0,Y.jsx)(ke.Z,{unstyled:!0,value:e.value,style:{wordBreak:"break-all"},children:e.value}):null,editComponent:e=>{const{value:n,rowData:t,onChange:o}=e;return(0,Y.jsxs)(Te,{children:[(0,Y.jsx)(be.Z,{fullWidth:!0,size:"small",value:"__encrypted__"===n?"":n,onChange:e=>o(e.target.value),variant:"outlined",label:l("common.value"),placeholder:l("blocklet.config.environment.value"),margin:"dense",autoFocus:!0}),we(t,l)]})}}],icons:{...Re.Z,...Ce.Z},options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1},localization:{header:{actions:l("common.actions")},body:{emptyDataSourceMessage:l("common.noData")}},data:h,editable:e?x:{}})})})]})}Se.propTypes={blocklet:s().object.isRequired,ancestors:s().array},Se.defaultProps={ancestors:[]};const Pe=a.Z.div(ue||(ue=(0,r.Z)(["\n .config-table {\n margin-bottom: 24px;\n position: relative;\n .hide-control {\n position: absolute;\n top: 10px;\n left: 200px;\n @media (max-width: ","px) {\n left: 160px;\n }\n }\n\n .MuiToolbar-root {\n display: flex;\n }\n\n .MuiTableRow-head {\n display: none;\n }\n\n &.hide-header {\n .MuiToolbar-root {\n display: none;\n }\n }\n }\n\n .accordion {\n margin-bottom: 16px;\n &:last-of-type {\n margin-bottom: 0;\n }\n padding: 8px 0 8px 0px;\n &.MuiAccordion-root {\n background: transparent;\n box-shadow: none;\n border: 1px solid #ddd;\n border-radius: 4px;\n &::before,\n &::after {\n height: 0;\n }\n .MuiAccordionSummary-root {\n padding-left: 0;\n }\n .accordion-title {\n font-weight: bold;\n padding-left: 16px;\n }\n }\n }\n"])),(e=>e.theme.breakpoints.values.sm)),Te=a.Z.div(me||(me=(0,r.Z)(["\n height: 60px;\n"])));var Ue,Ie=t(45239),Ne=t.n(Ie),De=t(28641);function Ae(e){let{blocklet:n,ancestors:t,hasPermission:r,...a}=e;const{t:l}=(0,i.PE)(),{api:s}=(0,ne.h6)(),c=!t.length,p=c?n.meta.did:t.map((e=>e.meta.did))[0],[u,m]=(0,o.useState)(""),[h,f]=(0,o.useState)(""),x=u||!r;if(!p)return null;if("unknown"===n.status&&(0,te.wS)(n.status))return null;return(0,Y.jsx)(Fe,{component:"div",...a,children:(0,Y.jsx)(d.Z,{mt:3,children:(0,Y.jsx)(De.Z,{label:l("blocklet.component.mountPoint"),style:{marginTop:-24},disabled:u||x,loading:u,required:!0,initialValue:n.mountPoint,onSubmit:async e=>{m(!0);try{const t={rootDid:p,mountPoint:Ne()(e)};return c||(t.did=n.meta.did),await s.updateComponentMountPoint({input:t}),m(!1),!0}catch(t){throw m(!1),t.message=(0,te.Z)(t),F.Z.error(t.message),t}},onChange:e=>{f(l("common.slugifyHint",{value:(0,te.LN)(e)}))},helperText:h,formatterBeforeSubmit:e=>Ne()(e)})})})}const Be=(0,oe.V)(Ae,"mutate_blocklets"),Le=(0,oe.V)(Ae,"",te.Wf);function Oe(e){const{inService:n}=(0,ne.h6)();return n?(0,Y.jsx)(Le,{...e}):(0,Y.jsx)(Be,{...e})}Ae.propTypes={blocklet:s().object.isRequired,ancestors:s().array,hasPermission:s().bool},Ae.defaultProps={ancestors:[],hasPermission:!1};const Fe=a.Z.div(Ue||(Ue=(0,r.Z)([""])));var ze;function Me(e){let{blocklet:n,ancestors:t,children:r}=e;const[a,l]=(0,o.useState)(""),{t:s}=(0,i.PE)(),c=!!t.length,[p,u]=(0,o.useState)("settings"),m=c?(0,B.getDisplayName)(n,!0):s("blocklet.component.container");if((0,te.wS)(n.status))return null;if("unknown"===n.status&&(0,te.wS)(n.status))return null;const h=e=>{e.stopPropagation(),l(!0)},x={settings:{label:s("blocklet.component.setting"),value:"settings",component:(0,Y.jsx)(Oe,{blocklet:n,ancestors:t})},environments:{label:s("common.environment"),value:"environments",component:(0,Y.jsx)(Se,{blocklet:n,ancestors:t})}},g=Object.values(x).map((e=>{let{label:n,value:t}=e;return{label:n,value:t}})),y=x[p]||x.settings;return["function"===typeof r?r({open:h}):(0,Y.jsx)(f.Z,{onClick:h,"data-cy":"action-config-component",children:(0,Y.jsx)(xe.default,{})}),a&&(0,Y.jsx)(Ge,{open:!0,fullWidth:!0,maxWidth:"md",title:m,onClose:()=>{l(!1)},PaperProps:{style:{minHeight:"auto"}},children:c?(0,Y.jsxs)(d.Z,{mt:1,children:[(0,Y.jsx)(ye.Z,{tabs:g,current:p,onChange:e=>{u(e)},scrollButtons:"auto"}),y.component]}):(0,Y.jsx)(Se,{blocklet:n,ancestors:t})})]}Me.propTypes={blocklet:s().object.isRequired,ancestors:s().array,children:s().any},Me.defaultProps={ancestors:[],children:null};const Ge=(0,a.Z)(ge.ZP)(ze||(ze=(0,r.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"])));var qe,Ve=t(11750),We=t(65140),He=t(87916);function Ke(e){let{component:n,remove:t,disabled:r,tip:a,showConfirm:l,hideBtn:s,onCancel:c}=e;const{t:d}=(0,o.useContext)(i.RD),[p,u]=(0,o.useState)(!1),[m,h]=(0,o.useState)(null),f=async e=>{u(!0),await t(e.component,e.removeType),u(!1),h(null)},x=r||p,g=()=>{h({title:"".concat(d("common.delete")," ").concat(n.meta.title||n.meta.name),description:(e,n)=>(0,Y.jsxs)(Ve.Z,{component:"div",children:[(0,Y.jsx)(Ve.Z,{gutterBottom:!0,children:d("blocklet.action.removeComponentDescription")}),(0,Y.jsxs)(He.Z,{name:"removeType",value:e.removeType,onChange:t=>n({...e,removeType:t.target.value}),children:[(0,Y.jsx)(S.Z,{value:"keepData",control:(0,Y.jsx)(We.Z,{}),label:d("blocklet.action.removeComponentKeepData")}),(0,Y.jsx)(S.Z,{value:"complete",control:(0,Y.jsx)(We.Z,{}),label:d("blocklet.action.removeComponentComplete")})]})]}),confirm:d("common.confirm"),cancel:d("common.cancel"),params:{component:n,removeType:"keepData"},onConfirm:f,onCancel:()=>{h(null),c()}})};(0,o.useEffect)((()=>{l?g():(u(!1),h(null))}),[l]);const y=(0,Y.jsx)(Je,{size:"small",disabled:x,onClick:()=>g,"data-cy":"delete-component-btn",children:(0,Y.jsx)(E.default,{disabled:x})}),v=(0,Y.jsx)(k.Z,{title:a||d("common.delete"),children:(0,Y.jsx)("span",{children:y})});return(0,Y.jsxs)(Y.Fragment,{children:[!s&&v,m&&(0,Y.jsx)(ee.Z,{title:m.title,description:m.description,confirm:m.confirm,cancel:m.cancel,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}Ke.propTypes={component:s().object.isRequired,remove:s().func,onCancel:s().func,disabled:s().bool,showConfirm:s().bool,hideBtn:s().bool,tip:s().string},Ke.defaultProps={remove:async()=>{},disabled:!1,showConfirm:!1,hideBtn:!1,onCancel:()=>{},tip:""};const Je=(0,a.Z)(f.Z)(qe||(qe=(0,r.Z)(["\n &.Mui-disabled {\n opacity: 0.5;\n }\n"])));var Ye,Qe=t(22754),_e=t(98451);function Xe(e){let{component:n,onStart:t,onStop:r,disabled:a,tip:l}=e;const{t:s}=(0,o.useContext)(i.RD),[c,d]=(0,o.useState)(!1),[p,u]=(0,o.useState)(),m=a||c,h=["starting","running","stopping"].includes(n.status),f=h?_e.Z:Qe.Z,x=(0,Y.jsx)($e,{disabled:m,onClick:()=>{var e;h?u({title:"".concat(s("common.stop")," ").concat(null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.title),description:s("blocklet.action.stopComponentDescription"),confirm:s("blocklet.action.confirmStop"),cancel:s("common.cancel"),onConfirm:()=>(u(null),(async()=>{d(!0);try{await r(n)}catch(e){F.Z.error(e.message)}d(!1)})()),onCancel:()=>u(null)}):(async()=>{d(!0);try{await t(n)}catch(e){F.Z.error(e.message)}d(!1)})()},"data-cy":"".concat(h?"stop":"start","-component-btn"),children:(0,Y.jsx)(f,{disabled:m})});return[(0,Y.jsx)(k.Z,{title:l||s("common.".concat(h?"stop":"start")),children:(0,Y.jsx)("span",{children:x})},"btn"),p&&(0,Y.jsx)(ee.Z,{title:p.title,description:p.description,confirm:p.confirm,cancel:p.cancel,params:p.params,onConfirm:p.onConfirm,onCancel:p.onCancel},"connect")]}Xe.propTypes={component:s().object.isRequired,onStart:s().func,onStop:s().func,disabled:s().bool,tip:s().string},Xe.defaultProps={onStart:async()=>{},onStop:async()=>{},disabled:!1,tip:""};const $e=(0,a.Z)(f.Z)(Ye||(Ye=(0,r.Z)(["\n &.Mui-disabled {\n opacity: 0.5;\n }\n"])));var en=t(74286),nn=t(74490),tn=t(33271),on=t(72904),rn=t(5952),an=t(85493),ln=t(30278),sn=t.n(ln),cn=t(79077),dn=t.n(cn),pn=t(75506),un=t.n(pn),mn=t(3785),hn=t.n(mn),fn=t(2660),xn=t(42876),gn=t(63902),yn=t(51703),vn=t(88574),bn=t(35266),jn=t(55309),kn=t(29054),Cn=t(24558),Zn=t(13727),Rn=t(56184),wn=t(11819),En=t(67486);const Sn={description:s().string,editing:s().bool,onChange:s().func,required:s().bool,value:s().any,componentProps:s().object,render:s().func,renderFormItem:s().func};function Pn(e){let{editing:n,value:t,onChange:i}=e;const[r,a]=(0,o.useState)(!1),l=(0,o.useRef)(),s=(0,o.useRef)(t);(0,o.useEffect)((()=>{let e=null;return n&&(e=setTimeout((()=>{a(!0)}),50)),()=>{clearTimeout(e)}}),[n]);const c=(0,Y.jsx)(d.Z,{className:"form-item-input slot",px:1,children:(0,Y.jsxs)(d.Z,{display:"flex",alignItems:"center",children:[t,"auto"!==t&&(0,Y.jsx)("div",{style:{marginLeft:4,backgroundColor:t,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),p=(0,Y.jsxs)(d.Z,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:()=>{a(!1),i(s.current)},children:[(0,Y.jsx)(d.Z,{display:"flex",alignItems:"center",onClick:()=>a(!0),children:(0,Y.jsx)("div",{ref:l,style:{flexShrink:0,marginLeft:"8px",backgroundColor:t,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:"auto"===t?"default":"pointer"}})}),(0,Y.jsx)(wn.ZP,{open:r,anchorEl:l.current,onClose:()=>a(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:(0,Y.jsx)(En.AI,{color:t,onChange:e=>{return n=e.hex,s.current=n,void i(n);var n}})})]});return n?p:c}function Tn(e){let{editing:n,description:t,value:i,onChange:r,componentProps:a,...l}=e;const{placeholder:s}=a,c=(0,o.useRef)(i),p=e=>{"Enter"===e.key&&r(c.current,"confirm")};return n?(0,Y.jsx)(be.Z,{style:{flex:1},fullWidth:!0,value:i,onChange:e=>{var n;e.persist(),n=e.target.value,c.current=n,r(n)},autoFocus:!0,size:"small",variant:"outlined",placeholder:t||s,onKeyDown:p,...l}):(0,Y.jsx)(d.Z,{px:1,className:"form-item-input slot",children:i})}Pn.propTypes=Sn,Tn.propTypes=Sn,Tn.defaultProps={componentProps:{}};var Un=t(49777),In=t.n(Un),Nn=t(76818);function Dn(e){let{editing:n,value:t,onChange:o,componentProps:i,...r}=e;const{blocklet:a}=i,l="auto"===t?(0,Nn.getPassportColorFromDid)(a.appDid):t;return(0,Y.jsxs)(d.Z,{display:"flex",alignItems:"center",children:[(0,Y.jsx)("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:In()({title:"Owner",issuer:(0,B.getDisplayName)(a),issuerDid:a.appDid,ownerName:"Your Name",ownerDid:a.appDid,preferredColor:t||"auto"})}}),(0,Y.jsx)(Pn,{...r,editing:n,value:n?l:t,onChange:o,componentProps:i})]})}Dn.propTypes={...Sn,componentProps:s().shape({blocklet:s().object.isRequired}).isRequired},Dn.defaultProps={};var An,Bn=t(35406),Ln=t(11875),On=t(59375);const Fn={input:Tn,color:Pn,passport:Dn,uploader:e=>(0,Y.jsx)(On.Z,{...e.componentProps})};function zn(e){let{schema:n,loading:t,value:i,defaultValue:r,onChange:a,style:l,disabled:s}=e;const c="[object Object]"===Object.prototype.toString.call(i),[p,u]=(0,o.useState)(null),[m,h]=(0,o.useState)(c?i:r),x=(0,o.useRef)();function g(e,n,t){const{key:o,secure:i}=e,r=m[o]!==n,l={...m,[o]:n};r&&h(l),a({[o]:n},{allValues:l,action:t,currentItem:e}),"confirm"===t&&i&&h({...m,[o]:"__encrypted__"}),["confirm","cancel"].includes(t)?y(null):y(e)}function y(e){if(e)return x.current=m[e.key],void u(e);x.current=null,u(null)}return(0,Y.jsx)(Mn,{className:"form",style:l,children:null===n||void 0===n?void 0:n.map((e=>{const{key:n,description:o,required:r,solo:a=!1,hidden:l=!1,componentProps:u={}}=e;if(l)return null;const h=!(!p||n!==p.key),y=function(e,n){let{editing:t=!1}=n;const{key:o}=e,r=c?i[o]:m[o];return"__encrypted__"===r?t?"":"******":r}(e,{editing:h}),v=function(e,n){let{editing:t=!1}=n;const{componentType:o="input",render:i,renderFormItem:r}=e;return t&&r?r:!t&&i?i:Fn[null===o||void 0===o?void 0:o.toLowerCase()]}(e,{editing:h}),b={inputProps:{"data-cy":"schema-form-item-component"},key:n,description:o,editing:h,value:y,onChange:function(n){return g(e,n,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"change")},componentProps:u};return(0,Y.jsxs)(d.Z,{className:"form-item",children:[!a&&(0,Y.jsxs)(d.Z,{className:"form-item-label",style:{color:r&&!y?"#ff0000":"#333"},children:[o,r&&(0,Y.jsx)(Bn.Z,{})]}),(0,Y.jsxs)(d.Z,{className:"form-item-body",children:[(0,Y.jsx)(d.Z,{className:"form-item-input",sx:{textAlign:a?"center":"left"},children:(0,Y.jsx)(v,{...b})}),!a&&(0,Y.jsx)(d.Z,{className:"form-item-action",children:h?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(f.Z,{"data-cy":"schema-form-item-confirm",onClick:()=>{g(e,y,"confirm")},disabled:s||t,size:"large",children:t?(0,Y.jsx)(I.Z,{size:24}):(0,Y.jsx)(Rn.Z,{})}),(0,Y.jsx)(f.Z,{"data-cy":"schema-form-item-cancel",onClick:()=>{g(e,x.current,"cancel")},disabled:s||t,size:"large",children:(0,Y.jsx)(Zn.default,{})})]}):(0,Y.jsx)(f.Z,{"data-cy":"schema-form-item-edit",onClick:()=>{g(e,m[n],"edit")},disabled:s||p,size:"large",children:(0,Y.jsx)(Cn.Z,{})})})]})]},n)}))})}zn.propTypes={schema:s().array.isRequired,loading:s().bool,onChange:s().func.isRequired,value:s().object,defaultValue:s().object,style:s().object,disabled:s().bool},zn.defaultProps={loading:!1,value:void 0,defaultValue:{},style:{},disabled:!1};const Mn=(0,a.Z)(Ln.Z)(An||(An=(0,r.Z)([""])));var Gn=t(43316),qn=t(28018),Vn=t.n(qn),Wn=t(60344),Hn=t(73170);function Kn(e){let{meta:n,onCancel:t,mode:r,handlePaySuccess:a}=e;const{t:l,locale:s}=(0,i.PE)(),{info:c}=(0,ne.h6)(),d=(0,te.yP)(c),[p,u]=(0,o.useState)(null),m=new URL(null===n||void 0===n?void 0:n.registryUrl).origin,h=(0,B.getDisplayName)({meta:n});if((0,o.useEffect)((()=>{if("purchase"===r){const t=new URL(m);t.pathname="/api/did/verify-purchase-blocklet/token",t.searchParams.set("serverDid",c.did),t.searchParams.set("blockletDid",null===n||void 0===n?void 0:n.did);try{Wn.hi.get(t.href).then((e=>{let{data:n}=e;const t="".concat(n.url);u(t)}))}catch(e){console.error("get next workflow url error: ",e)}}return()=>{u(null)}}),[r]),"purchase"===r&&!p)return"";const f={verify:{action:"verify-purchase-blocklet",checkFn:Wn.od.create({baseURL:m}).get,extraParams:{serverDid:c.did,blockletDid:null===n||void 0===n?void 0:n.did},messages:{title:l("store.purchase.verify.auth.title",{name:h}),scan:l("store.purchase.verify.auth.scan"),confirm:l("store.purchase.verify.auth.confirm"),success:l("store.purchase.verify.auth.success")}},purchase:{action:"acquire-asset",checkFn:Wn.od.create({baseURL:V()(m,"/store")}).get,extraParams:{factory:n.nftFactory,nw:p},messages:{title:l("store.purchase.auth.title",{name:h}),scan:l("store.purchase.auth.scan"),confirm:l("store.purchase.auth.confirm"),success:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("p",{children:l("store.purchase.auth.success")}),(0,Y.jsx)("p",{children:l("blocklet.component.purchaseComponentSecondCheckTip")})]})}}};return(0,Y.jsx)(Gn.Z,{open:!0,locale:s,popup:!1,saveConnect:!1,className:"connect",baseUrl:m,onSuccess:async(e,n)=>{const o=e=>{let{downloadTokenList:n}=e;a({downloadTokenList:n})},i=e=>{F.Z.error(e),t(e)};if("purchase"===r&&p){const{statusUrl:e}=(0,te.Pi)(p);await(s=e,Vn()((()=>Wn.hi.get(s).then((async e=>{let{data:n}=e;const t=null===n||void 0===n?void 0:n.downloadTokenList;return"succeed"===n.status?t&&t.length?(await o({downloadTokenList:t}),!0):(await i(l("blocklet.component.missDownloadTokenTip")),!0):"error"===n.status&&(console.error("vc error: ",n),await i(null===n||void 0===n?void 0:n.error),!0)}))),{interval:1e3}))}else await o({downloadTokenList:e.downloadTokenList&&n(e.downloadTokenList)});var s},cancelWhenScanned:t,onClose:t,checkTimeout:3e5,webWalletUrl:d,disableClose:!0,showDownload:!1,...f[r]})}Kn.propTypes={...Hn.$7,handlePaySuccess:s().func,mode:s().oneOf(["verify","purchase"]).isRequired},Kn.defaultProps={handlePaySuccess:()=>{}};const Jn=(0,o.forwardRef)(((e,n)=>{let{mode:t,...i}=e;const[r,a]=(0,o.useState)("both"!==t?t:"verify"),[l,s]=(0,o.useState)("both"!==t?2:1),c=e=>{e!==r&&a(e)},d=()=>{r&&2!==l&&s(2)};return(0,o.useImperativeHandle)(n,(()=>({onNext:d,getCurrentStep:()=>l}))),1===l?(0,Y.jsx)("div",{style:{maxWidth:520},children:(0,Y.jsx)(Hn.AP,{action:r,onNext:null,onSelect:c})}):(0,Y.jsx)(Kn,{...i,mode:r})}));Jn.propTypes={mode:s().oneOf(["both","verify","purchase"]).isRequired,ref:s().any},Jn.defaultProps={ref:{}};const Yn=Jn;var Qn,_n=t(51233),Xn=t(31440),$n=t(61813),et=t(49390),nt=t(67654),tt=t(22714),ot=t(45170);function it(e){let{onChange:n,loading:t,children:r,extra:a,stores:l,storageKey:s}=e;const{t:c}=(0,i.PE)(),{info:d,inService:p}=(0,ne.h6)(),{blocklet:u}=(0,kn.y0)(),[m,h]=(0,o.useState)(!1),f=(0,o.useRef)(null),[x,g]=(0,o.useState)(),[y,v]=(0,nt.Z)(s||"tmp"),[b,j]=s?[y,v]:[x,g],{storeList:k,teamDid:C}=(0,te.dX)({fromBlocklet:p,blocklet:u,nodeInfo:d}),Z=sn()([...l.map((e=>({...e,protected:!0}))),...k],"url"),R=b&&Z.find((e=>b===e.url))||Z[0],w=d.mode===U.NODE_MODES.SERVERLESS;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(rt,{children:[(0,Y.jsx)(D.Z,{ref:f,color:"secondary","data-cy":"add-component-select-store",endIcon:(0,Y.jsx)(et.Z,{color:"secondary"}),onClick:()=>{h(!0)},style:{padding:"0 2px"},children:(0,Y.jsx)(Ve.Z,{color:"secondary",children:R.name})}),(0,Y.jsx)(Ve.Z,{color:"secondary",children:a})]}),(0,Y.jsxs)(be.Z,{id:"mui-registry-select",select:!0,autoComplete:"off",variant:"outlined",name:"did",helperText:c("blocklet.component.selectRegistryTip"),"data-cy":"component-registry-select",fullWidth:!0,value:R,autoFocus:!0,onChange:e=>{const t=e.target.value;j(t.url),n(t)},SelectProps:{open:m,MenuProps:{anchorEl:f.current},renderValue:e=>null===e||void 0===e?void 0:e.name,onClose:()=>{h(!1)}},style:{display:"none"},margin:"normal",children:[null===Z||void 0===Z?void 0:Z.map((e=>(0,Y.jsx)(nn.Z,{value:e,"data-cy":e.url,children:(0,Y.jsx)(ot.Z,{teamDid:C,store:e,onDelete:()=>{var n;b===e.url&&j(null===(n=Z[0])||void 0===n?void 0:n.url)}})},e.url))),!w&&(0,Y.jsx)(tt.Z,{disabled:t,storeList:Z,teamDid:C,onAdd:e=>{j(e)}})]}),r({currentRegistry:R})]})}it.propTypes={onChange:s().func,loading:s().bool,children:s().any.isRequired,extra:s().node,storageKey:s().string,stores:s().arrayOf(s().shape({name:s().string.isRequired,url:s().string.isRequired}))},it.defaultProps={onChange:()=>{},loading:!1,extra:"",stores:[],storageKey:""};const rt=a.Z.div(Qn||(Qn=(0,r.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 16px;\n\n span {\n font-size: 16px;\n color: ",";\n // font-weight: bold;\n }\n"])),(e=>e.theme.palette.common.black));var at,lt=t(71569),st=t(52439),ct=t(77121),dt=t(44727);const pt=(e,n)=>V()(n,"/blocklets/".concat(e.did)),ut=e=>{let{blocklet:n,attribute:t,value:o}=e;return n._formatted?n._formatted[t]:o},mt=e=>e.inStore&&!1===(0,B.isFreeBlocklet)(e);function ht(e){let{blocklet:n,blocklets:t,handleButtonClick:r,endpoint:a}=e;const{t:l}=(0,i.PE)(),s=V()(a,(0,te.lk)(n.did,n.logo||"")),[c,d]=(0,o.useState)(!1),p=mt(n)?l("common.purchase"):l("blocklet.component.choose");return(0,Y.jsx)(J.Z,{href:pt(n,a),style:{color:"initial",textDecoration:"none"},onClick:e=>!!e.currentTarget.contains(e.target)||(e.preventDefault(),!1),target:"_blank",children:(0,Y.jsx)(xt,{title:ut({blocklet:n,attribute:"title",value:n.title||n.name}),did:n.did,description:ut({blocklet:n,attribute:"description",value:n.description}),cover:n.logo?s:"",version:n.version,button:(0,Y.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,Y.jsx)(dt.Kk,{children:(0,Y.jsx)(D.Z,{onClick:async e=>{e.preventDefault(),e.stopPropagation();try{d(!0),await r({meta:n,registryUrl:a,blocklets:t})}catch(o){F.Z.error(o.message)}finally{d(!1)}},size:"small",disabled:c,variant:"outlined",color:"primary","data-cy":"install-blocklet",children:c?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(I.Z,{size:16,style:{marginRight:3}}),p]}):p},n.did)})})})})}function ft(e){let{handleButtonClick:n,handleSearchSelect:t,storeUrl:r,handleBlockletRender:a,extraFilter:l,serverVersion:s,resourceType:c,resourceDid:d,...p}=e;const{locale:u}=(0,i.PE)(),[m,h]=(0,o.useState)(!1),[f,x]=(0,o.useState)({}),g=r;return(0,o.useEffect)((()=>{x({resourceType:c,resourceDid:d})}),[g,c,d]),(0,o.useEffect)((()=>{h(!0),x({resourceType:c,resourceDid:d})}),[]),(0,Y.jsx)(st.ErrorBoundary,{FallbackComponent:lt.H,resetKeys:[g],children:(0,Y.jsx)("div",{...p,children:m&&(0,Y.jsx)(ct.Z,{blockletRender:e=>{const t={...e,handleButtonClick:n,endpoint:g};return a({...e,defaultRender:(0,Y.jsx)(ht,{...t})})},baseSearch:!0,endpoint:g,locale:u,onFilterChange:e=>{x(e)},onSearchSelect:t,filters:f,extraFilter:l,serverVersion:s,fetchCategoryDelay:500})})})}ht.propTypes={blocklet:s().object.isRequired,blocklets:s().array,handleButtonClick:s().func,endpoint:s().string},ht.defaultProps={handleButtonClick:null,endpoint:"",blocklets:[]},ft.propTypes={storeUrl:s().string.isRequired,handleButtonClick:s().func,handleSearchSelect:s().func,handleBlockletRender:s().func,extraFilter:s().func,serverVersion:s().string,resourceType:s().string,resourceDid:s().string},ft.defaultProps={handleButtonClick:null,handleSearchSelect:null,handleBlockletRender:null,extraFilter:void 0,serverVersion:"",resourceType:"",resourceDid:""};const xt=(0,a.Z)(dt.ZP)(at||(at=(0,r.Z)(["\n .ms-highlight {\n color: ",";\n }\n"])),(e=>e.theme.palette.primary.main));var gt=t(35966);function yt(e){let{...n}=e;return(0,Y.jsx)(D.Z,{className:"bottom-button",variant:"contained",color:"primary",...n})}var vt,bt,jt=t(96366);function kt(){let{key:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{key:"sm"};const n=(0,jt.Z)();return(0,on.Z)(n.breakpoints.down(e))}function Ct(e){let{blocklet:n,onStartNow:t,children:o,disabled:r}=e;const{t:a}=(0,i.PE)(),l=kt();return!n||(0,te.bg)(n.meta)?(0,Y.jsx)(Zt,{children:o}):(0,Y.jsxs)(Rt,{isMobile:l,children:[(0,Y.jsx)(yt,{className:"start-now",variant:"contained",color:"primary",disabled:r,onClick:()=>t(),children:a("setup.startNow")}),(0,Y.jsx)(d.Z,{display:"flex",alignItems:"center",children:o})]})}Ct.propTypes={blocklet:s().object,onStartNow:s().func,children:s().any,disabled:s().bool},Ct.defaultProps={blocklet:null,onStartNow:()=>{},children:null,disabled:!1};const Zt=(0,a.Z)(d.Z)(vt||(vt=(0,r.Z)(["\n width: 100%;\n margin-top: auto;\n padding-top: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n .bottom-button {\n min-width: 200px;\n }\n "," {\n .bottom-button {\n width: 100%;\n }\n }\n"])),(e=>e.theme.breakpoints.down("md"))),Rt=(0,a.Z)(d.Z)(bt||(bt=(0,r.Z)(["\n padding-top: 24px;\n margin-top: auto;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n .start-now {\n min-width: 140px;\n }\n .bottom-button {\n min-width: 120px;\n }\n "," {\n width: 100%;\n }\n\n "," {\n .start-now {\n min-width: inherit;\n }\n .bottom-button {\n min-width: 100px;\n }\n }\n\n "," {\n justify-content: space-between;\n gap: '32px',\n }}\n"])),(e=>e.theme.breakpoints.down("lg")),(e=>e.theme.breakpoints.down("md")),(e=>e.isMobile));var wt=t(8790),Et=function(e){return(0,Y.jsxs)("svg",{...e,children:[(0,Y.jsxs)("g",{filter:"url(#a)",children:[(0,Y.jsx)("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97z",fill:"#DDD"}),(0,Y.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.192 6.222l-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97z",fill:"#000",fillOpacity:".08"}),(0,Y.jsx)("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:(0,Y.jsx)("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97z",fill:"#D9D9D9"})}),(0,Y.jsxs)("g",{mask:"url(#b)",children:[(0,Y.jsx)("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),(0,Y.jsx)("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),(0,Y.jsx)("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568zm11.546-10.102V169h-1.756v-11.636h1.756zM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29z",fill:"#fff"}),(0,Y.jsx)("path",{d:"M117.604 47.263L121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847z",fill:"url(#e)"}),(0,Y.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047z",fill:"url(#f)"}),(0,Y.jsxs)("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[(0,Y.jsx)("path",{d:"M50.928 216.089l1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911zm2.439.564h-1.13v1.193h1.13v-1.193zm-1.13 2.983h1.13v1.193h-1.13v-1.193z",fillOpacity:".8"}),(0,Y.jsx)("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762zM36.355 214h-1.011v7.783h1.01V214zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75zM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894zm6.946 1.803h1.13v1.193h-1.13v-1.193zm1.13 2.983h-1.13v1.193h1.13v-1.193zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751z"})]}),(0,Y.jsx)("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),(0,Y.jsx)("path",{d:"M192.064 213.333l.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46z",fill:"#fff"}),(0,Y.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26z",fill:"#fff"})]})]}),(0,Y.jsxs)("defs",{children:[(0,Y.jsxs)("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,Y.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,Y.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,Y.jsx)("feOffset",{dy:"2"}),(0,Y.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,Y.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,Y.jsx)("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),(0,Y.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),(0,Y.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),(0,Y.jsx)("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:(0,Y.jsx)("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),(0,Y.jsxs)("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[(0,Y.jsx)("stop",{stopColor:"#101010"}),(0,Y.jsx)("stop",{offset:"1",stopColor:"#272727"})]}),(0,Y.jsxs)("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,Y.jsx)("stop",{stopColor:"#fff",stopOpacity:".4"}),(0,Y.jsx)("stop",{offset:"1",stopColor:"#fff"})]}),(0,Y.jsxs)("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[(0,Y.jsx)("stop",{stopColor:"#fff"}),(0,Y.jsx)("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),(0,Y.jsxs)("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[(0,Y.jsx)("stop",{stopColor:"#016BED"}),(0,Y.jsx)("stop",{offset:".699",stopColor:"#4498FB"}),(0,Y.jsx)("stop",{offset:"1",stopColor:"#9DFFE8"})]}),(0,Y.jsx)("clipPath",{id:"g",children:(0,Y.jsx)("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),(0,Y.jsx)("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,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"})]})]})};function St(){const{t:e}=(0,i.PE)();return(0,Y.jsx)(d.Z,{children:(0,Y.jsxs)(d.Z,{minHeight:"40vh",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[(0,Y.jsx)(Et,{style:{width:200,height:250}}),(0,Y.jsx)(Ve.Z,{marginTop:"24px",marginBottom:"24px",children:e("storage.spaces.connect.providerForStorage")})]})})}Et.defaultProps={width:"228",height:"258",viewBox:"0 0 228 258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},St.propTypes={};const Pt=St;var Tt=t(19654),Ut=t(39565),It=t(84584),Nt=t(47595),Dt=t(60939),At=t(72443),Bt=t.n(At);function Lt(e){let{spaceGateway:n,onDeleteSpace:t}=e;const{t:r}=(0,i.PE)(),[a,l]=(0,o.useState)(!1),[s,c]=(0,o.useState)(!1),d=(e,n)=>{null===e||void 0===e||e.stopPropagation(),l(n)};return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(f.Z,{size:"small",onClick:e=>d(e,!0),children:(0,Y.jsx)(Nt.default,{})}),(0,Y.jsx)(Dt.Z,{title:r("common.delConfirmDescription",{data:"".concat(null===n||void 0===n?void 0:n.name)}),open:a,confirmButton:{text:r("common.confirm"),props:{variant:"contained",color:"error",loading:s}},cancelButton:{text:r("common.cancel"),props:{variant:"contained",color:"primary"}},onConfirm:async e=>{try{null===e||void 0===e||e.stopPropagation(),c(!0),await t(n),l(!1)}catch(o){console.error(o),F.Z.error("".concat(r("storage.spaces.gateway.delete.failed"),": ").concat(Bt()(o)))}finally{c(!1)}},onCancel:e=>d(e,!1)})]})}Lt.propTypes={onDeleteSpace:s().func,spaceGateway:s().shape({name:s().string.isRequired,url:s().string.isRequired,protected:s().bool}).isRequired},Lt.defaultProps={onDeleteSpace:()=>{}};const Ot=Lt;var Ft,zt=function(e){return(0,Y.jsx)("svg",{...e,children:(0,Y.jsx)("circle",{cx:"4",cy:"4",r:"4",fill:"#25C99B"})})};function Mt(e){let{spaceGateway:n,connected:t,onDisconnect:o,...r}=e;const a=kt(),{t:l}=(0,i.PE)();return(0,Y.jsxs)(Gt,{style:{position:"relative"},children:[(0,Y.jsxs)(d.Z,{sx:{backgroundColor:t?"#F0FDFF":"inherit","&:hover":{backgroundColor:t?"#F0FDFF":"#FBFBFB"},borderRadius:"8px"},display:"flex",padding:"12px 20px",...r,children:[(0,Y.jsx)(d.Z,{display:"flex",children:(0,Y.jsx)(Ut.Z,{alt:n.did,src:(0,It.Jf)(n.endpoint)})}),(0,Y.jsxs)(d.Z,{className:"spaces-info",display:"flex",flexGrow:1,flexDirection:"column",sx:{marginLeft:"20px",padding:"0px 0px"},children:[(0,Y.jsxs)(d.Z,{className:"spaces-info",display:"flex",maxWidth:"360px",alignItems:"center",children:[(0,Y.jsx)(Ve.Z,{color:t?"primary":"inherit",fontSize:"1rem",fontWeight:"bold",children:n.name}),(0,Y.jsx)(Tt.Z,{label:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(zt,{style:{marginRight:"4px"}}),l("storage.spaces.connected.tag")]}),variant:"outlined",size:"small",style:{marginLeft:a?null:"20px",fontWeight:"bold"}})]}),(0,Y.jsx)(d.Z,{className:"spaces-address",display:"flex",color:"#9397A1",marginTop:"8px",children:(0,Y.jsx)(Ve.Z,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},color:"#9397A1",children:n.did&&(0,Y.jsx)(M.Z,{copyable:!1,size:14,compact:!0,responsive:!1,did:n.did})})})]}),(0,Y.jsx)(d.Z,{className:"spaces-backup",display:"flex",alignItems:"center",children:(0,Y.jsx)(d.Z,{className:"backup-strategy",display:"flex",alignItems:"center",width:"100%",children:(0,Y.jsx)(Ot,{spaceGateway:n,onDeleteSpace:async()=>{try{await o(),F.Z.success(l("storage.spaces.gateway.delete.succeeded",{name:n.name}))}catch(e){console.error(e),F.Z.error((0,te.Z)(e))}}})})})]}),(0,Y.jsx)(d.Z,{className:"selected-container selected",children:(0,Y.jsx)(xn.default,{className:"selected-icon"})})]})}zt.defaultProps={width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Mt.propTypes={spaceGateway:s().shape({did:s().string.isRequired,name:s().string.isRequired,url:s().string.isRequired,endpoint:s().string.isRequired,protected:s().bool}).isRequired,connected:l.bool,onDisconnect:l.func},Mt.defaultProps={connected:!1,onDisconnect:()=>{}};const Gt=(0,a.Z)(d.Z)(Ft||(Ft=(0,r.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"]))),qt=Mt;var Vt=t(65873),Wt=t(41899);const Ht=(0,o.createContext)({}),{Provider:Kt,Consumer:Jt}=Ht;function Yt(e){let{children:n}=e;const[t,i]=(0,o.useState)(!1),[r,a]=(0,o.useState)(null),{blocklet:l,actions:{refreshBlocklet:s}}=(0,kn.y0)(),{storageEndpoint:c}=function(){const[e,n]=(0,o.useState)(null),{blocklet:t}=(0,kn.y0)();return(0,o.useEffect)((()=>{n((0,It.EJ)(t))}),[t]),{storageEndpoint:e}}(),{api:d}=(0,ne.h6)();(0,Wt.Z)((async()=>{try{if(i(!0),(0,Vt.isEmpty)(c))return void a(null);const e=await(0,It.UV)(c);a(e)}catch(e){console.error(e),F.Z.error(e.message)}finally{i(!1)}}),[c]);const p=async e=>{await d.configBlocklet({input:{did:[l.meta.did],configs:[{key:$.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:e}]}}),s()};(0,o.useEffect)((()=>{!async function(){if(!r)return;const e=await(0,It.nU)(r.endpoint,r.name),n=(0,Vt.merge)(r,{name:e});a(n)}()}),[]);const u=Boolean(c&&r);return(0,Y.jsx)(Kt,{value:{loading:t,spaceGateway:r,deleteSpaceGateway:()=>{a(null),s()},updateSpaceGateway:async e=>{a(e),await p(e.endpoint),s()},storageEndpoint:c,settingStorageEndpoint:p,hasStorageEndpoint:u},children:n})}function Qt(){return(0,o.useContext)(Ht)}Yt.propTypes={children:l.node.isRequired},Yt.defaultProps={};const _t=function(){const{t:e}=(0,i.PE)(),{spaceGateway:n,settingStorageEndpoint:t}=Qt();return(0,Y.jsxs)(d.Z,{display:"flex",flexDirection:"column",children:[(0,Y.jsx)(d.Z,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:"12px",children:(0,Y.jsx)(Ve.Z,{fontSize:"1.2rem",fontWeight:"bold",children:e("storage.spaces.connected.title")})}),(0,Y.jsx)(d.Z,{children:(0,Y.jsx)(qt,{style:{marginTop:"12px"},spaceGateway:n,connected:!0,onDisconnect:()=>t(null)},n.endpoint)})]})};var Xt=t(55372),$t=t(17682),eo=t(56277);function no(e){let{onConnect:n,...t}=e;const{blocklet:r}=(0,kn.y0)(),{info:a}=(0,ne.h6)(),{t:l,locale:s}=(0,i.PE)(),[c,p]=(0,o.useState)(""),[u,m]=(0,o.useState)(!1),[h,f]=(0,o.useState)(!1),[x,g]=(0,o.useState)(""),y=(0,eo.Z)({blocklet:r}),v=(0,te.yP)(a),{storageEndpoint:b}=Qt(),[j,k]=(0,o.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,prefix:V()(U.PROD_DID_SPACES.CORE_URL,"space/api/did"),baseUrl:new URL(U.PROD_DID_SPACES.CORE_URL).origin,checkFn:Wn.od.create({baseURL:V()(U.PROD_DID_SPACES.CORE_URL,"space")}).get,messages:{title:l("storage.spaces.provideNFT.title",{appName:y.appName},s),scan:l("storage.spaces.provideNFT.scan",{appName:y.appName},s),confirm:"",success:(0,Y.jsx)(Ve.Z,{gutterBottom:!0,children:l("storage.spaces.provideNFT.success")})},onClose:()=>{k((e=>({...e,open:!1})))}}),[C,Z]=(0,o.useState)({open:!1,action:"one-click-authorization",checkTimeout:3e5,messages:{title:l("storage.spaces.authorize.title",{appName:y.appName},s),scan:l("storage.spaces.authorize.scan",{appName:y.appName},s),confirm:"",success:(0,Y.jsx)(Ve.Z,{gutterBottom:!0,children:l("storage.spaces.authorize.success")})},onClose:()=>{Z((e=>({...e,open:!1})))}}),R=(e,n)=>{setTimeout((async()=>{Z((e=>({...e,open:!1}))),p(null),k((e=>({...e,open:!1})));const t=n(e.endpoint),o=e.space?n(e.space):{};await w({endpoint:t,did:(0,It.LQ)(t),name:"DID Space",...o})}),0)},w=async e=>{let{did:t,name:o,endpoint:i}=e;const r=await(0,It.Z3)(i);if(!await(0,It.w2)(r))return void F.Z.error(l("storage.spaces.gateway.add.invalidUrl"));const a={name:o,did:t,url:r,endpoint:i};await n(a),F.Z.success(l("storage.spaces.connectedWithName",{name:a.name}))},E=async()=>{try{m(!0);const e=await(0,It.Z3)(c),n=(0,It.ag)(e),t=new URL(e).searchParams.get("spaceDid");if(!await(0,It.w2)(n))throw new Error(l("storage.spaces.gateway.add.invalidUrl"));Z((e=>({...e,open:!0,prefix:V()(n,"space/api/did"),baseUrl:new URL(n).origin,checkFn:Wn.od.create({baseURL:V()(n,"space")}).get,extraParams:{appDid:y.appDid,appName:y.appName,appDescription:y.appDescription,scopes:y.scopes,appUrl:y.appUrl,referrer:y.referrer,nodeDid:a.did,spaceDid:t}}))),f(!1)}catch(e){const n="".concat(l("storage.spaces.gateway.add.failed",s),": ").concat((0,te.Z)(e));g(n)}finally{m(!1)}};return(0,Y.jsxs)(d.Z,{children:[(0,Y.jsx)($t.Z,{color:"primary",style:{textTransform:"none !important",fontSize:"1rem"},size:"small",onClick:()=>{k((e=>({...e,open:!0,extraParams:{appDid:y.appDid,appName:y.appName,appDescription:y.appDescription,scopes:y.scopes,appUrl:y.appUrl,referrer:y.referrer,nodeDid:a.did}})))},variant:"outlined",menu:[(0,Y.jsx)($t.Z.Item,{sx:{textTransform:"none"},onClick:()=>f(!0),size:"small",...t,children:l(b?"storage.spaces.connect.useSpaceGatewayReconnect":"storage.spaces.connect.useSpaceGateway")},"1")],children:(0,Y.jsx)(Ve.Z,{sx:{fontWeight:"bold",textTransform:"none"},children:l(b?"storage.spaces.connect.useWalletReconnect":"storage.spaces.connect.useWallet")})}),(0,Y.jsx)(Gn.Z,{forceConnected:!1,saveConnect:!1,prefix:j.prefix,open:j.open,popup:!0,action:j.action,webWalletUrl:v,baseUrl:j.baseUrl,checkFn:j.checkFn,onSuccess:R,onClose:j.onClose,checkTimeout:j.checkTimeout,extraParams:j.extraParams,messages:j.messages,locale:s}),(0,Y.jsx)(Gn.Z,{forceConnected:!1,saveConnect:!1,prefix:C.prefix,open:C.open,popup:!0,action:C.action,baseUrl:C.baseUrl,checkFn:C.checkFn,onSuccess:R,onClose:C.onClose,checkTimeout:C.checkTimeout,extraParams:C.extraParams,messages:C.messages,locale:s}),(0,Y.jsxs)(ge.ZP,{title:l("storage.spaces.gateway.add.title"),fullWidth:!0,maxWidth:"md",open:h,onClose:()=>f(!1),PaperProps:{style:{minHeight:"auto"}},actions:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(D.Z,{onClick:e=>{e.stopPropagation(),f(!1)},color:"inherit",children:l("common.cancel")}),(0,Y.jsxs)(D.Z,{onClick:E,color:"primary",disabled:u||!c,variant:"contained",autoFocus:!0,children:[u&&(0,Y.jsx)(I.Z,{size:16}),l("common.confirm")]})]}),children:[(0,Y.jsx)("div",{style:{paddingTop:12,overflowY:"hidden"},children:(0,Y.jsx)(Xt.Z,{component:"div",children:(0,Y.jsx)(Ve.Z,{component:"div",children:(0,Y.jsx)(be.Z,{label:l("storage.spaces.gateway.add.label"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:c,onChange:e=>{g(null),p(e.target.value)},disabled:u,onKeyPress:async e=>{"Enter"===e.key&&await E()},autoFocus:!0})})})}),Boolean(x)&&(0,Y.jsx)(vn.Z,{type:"error",style:{width:"100%"},children:x})]})]})}no.propTypes={onConnect:l.func},no.defaultProps={onConnect:()=>{}};const to=no;var oo;function io(e){var n;let{blockletMeta:t,onEndpointUpdate:i}=e;const r=kt(),{blocklet:a}=(0,kn.y0)(),{updateSpaceGateway:l,loading:s,hasStorageEndpoint:c}=Qt();return(0,o.useEffect)((()=>{null===i||void 0===i||i()}),[a]),s?(0,Y.jsx)(gt.Z,{relative:"parent",children:(0,Y.jsx)(I.Z,{})}):(0,Y.jsxs)(ro,{children:[(0,Y.jsx)(d.Z,{width:r?"360px":"720px",children:c?(0,Y.jsx)(_t,{}):(0,Y.jsx)(Pt,{})}),"required"===(null===t||void 0===t||null===(n=t.capabilities)||void 0===n?void 0:n.didSpace)&&(0,Y.jsx)(Ct,{mt:8,children:(0,Y.jsx)(to,{onConnect:l})})]})}io.propTypes={blockletMeta:s().any.isRequired,onEndpointUpdate:l.func},io.defaultProps={onEndpointUpdate:()=>{}};const ro=(0,a.Z)(wt.Z)(oo||(oo=(0,r.Z)(["\n height: 100%;\n overflow-y: auto;\n"]))),ao=io;var lo,so,co,po,uo,mo,ho;const fo=e=>e.inStore&&!1===(0,B.isFreeBlocklet)(e),xo=e=>{var n;return null===e||void 0===e||null===(n=e.capabilities)||void 0===n?void 0:n.didSpace},go=e=>{var n,t;return(null===e||void 0===e||null===(n=e.configs)||void 0===n||null===(t=n.find((e=>e.key===$.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)))||void 0===t?void 0:t.value)||null},yo=e=>(e.environments||[]).some((e=>e.required)),vo=(e,n)=>null===e||void 0===e?void 0:e.some((e=>e.required&&!n[e.key])),bo=e=>{let{params:n,blocklet:t,t:o}=e;const i=n.title||n.name;if(!i)return o("common.next");return o(((null===t||void 0===t?void 0:t.children)||[]).find((e=>e.meta.bundleDid===n.bundleDid))?"blocklet.component.upgradeNext":"blocklet.component.addNext",{name:i})},jo=(0,o.forwardRef)(((e,n)=>{let{meta:t,isMobile:r,onStepChange:a}=e;const{steps:l,activeStep:s,setActiveStepByKey:c,setActiveStepByIndex:d}=(0,yn.s)(),{t:p,locale:u}=(0,i.PE)(),m=l[s];return(0,o.useEffect)((()=>{a(s)}),[a,s]),(0,o.useImperativeHandle)(n,(()=>({setActiveStepByKey:c,setActiveStepByIndex:d}))),(0,Y.jsx)(So,{component:"div",className:r?"mobileStyle":"",sx:{height:"calc(100% - 56px)"},children:(0,Y.jsx)(gn.Z,{locale:u,blockletMeta:{title:" ",...t},pcWidth:"100%",pcHeight:"100%",logoUrl:t&&t.logo&&t.registryUrl?(0,te.aZ)({did:t.did,baseUrl:t.registryUrl,logoPath:t.logo}):null,stepTip:p("blocklet.component.add"),children:(0,Y.jsx)(wo,{children:null!==m&&void 0!==m&&m.body&&"function"===typeof m.body?m.body():m.body})})})}));jo.propTypes={meta:s().any,onStepChange:s().func.isRequired,isMobile:s().bool.isRequired},jo.defaultProps={meta:null};const ko=function(e){setTimeout((()=>{window.parent.postMessage({event:"component.installed",componentDid:e},"*")}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3)};function Co(e){var n,t,r,a,l,s,c;let{onClose:p,mode:u,stores:m,resourceType:h,resourceDid:f,storageKey:x,inDialog:g}=e;const{t:y,locale:v}=(0,i.PE)(),[b,j]=(0,o.useState)(!1),[k,C]=(0,o.useState)(null),[Z,R]=(0,o.useState)(""),[w,E]=(0,o.useState)(""),{api:S,ws:{useSubscription:P},inService:T,info:N}=(0,ne.h6)(),{blocklet:A,actions:{refreshBlocklet:L}}=(0,kn.y0)(),[O,z]=(0,o.useState)(null),[M,G]=(0,o.useState)(!1),q={bundleDid:"",componentDid:"",componentName:"",pathPrefix:"",name:"",title:"",configsList:[],configsValue:{},hasMissRequiredConfigs:!1,hasEnvironmentsStep:!1,hasRequiredEnvironments:!1,requirePurchase:!1,didSpaceCapability:null,installResultProps:{},purchaseResultProps:{},showFromUrlDialog:!1},[V,W]=(0,o.useState)(q),[H,K]=(0,o.useState)(0),J=(0,o.useRef)({}),Q=(0,o.useRef)({}),_=(0,o.useRef)({}),X=(0,on.Z)((e=>e.breakpoints.down("md"))),ee=(0,an.useParams)(),{meta:oe}=J.current,{setActiveStepByIndex:ie}=Q.current||{},re=N.mode===U.NODE_MODES.SERVERLESS,ae=e=>W((n=>({...n,...e})));(0,o.useEffect)((()=>{if(V.pathPrefix){const{errMsg:e}=he({...V,pathPrefix:V.pathPrefix,locale:v});R(e)}}),[V.pathPrefix]),(0,o.useEffect)((()=>{0===H&&W(q)}),[H]);const le=()=>{var e;const n=null!==(e=go(A))&&void 0!==e?e:"";ae({didSpaceEndpoint:n})},se=()=>{var e;return null!==J&&void 0!==J&&null!==(e=J.current)&&void 0!==e&&e.meta?(0,B.getDisplayName)(J.current):""},ce=e=>{const n=t=>{ae({installResultProps:{variant:"error",title:se(),subTitle:e,footer:(0,Y.jsx)(D.Z,{className:"bottom-button",disabled:t,"data-cy":"retry-install-component",onClick:async()=>{n(!0),await me(J.current.installInput)},children:(0,Y.jsxs)(d.Z,{display:"flex",alignItems:"center",children:[t&&(0,Y.jsx)(I.Z,{size:16,style:{marginRight:8}}),y("common.retry")]})})}})};n()},de=e=>n=>{var t,o;((null===n||void 0===n||null===(t=n.meta)||void 0===t?void 0:t.did)||(null===n||void 0===n?void 0:n.meta))===(null===A||void 0===A||null===(o=A.meta)||void 0===o?void 0:o.did)&&e(n)};P($.BlockletEvents.statusChange,de((e=>{if(e.status===$.BlockletStatus.upgrading)ae({installResultProps:{variant:"success",title:se(),subTitle:y("blocklet.component.installSuccessTip")}}),ko(ee.componentDid);const n=go(A);ae((e=>({...e,didSpaceEndpoint:n})))})),[null===A||void 0===A||null===(n=A.meta)||void 0===n?void 0:n.did]),P($.BlockletEvents.downloadFailed,de((()=>{ce(y("blocklet.component.installComponentError"))})),[null===A||void 0===A||null===(t=A.meta)||void 0===t?void 0:t.did]),P($.BlockletEvents.installFailed,de((()=>{ce(y("blocklet.component.installComponentError"))})),[null===A||void 0===A||null===(r=A.meta)||void 0===r?void 0:r.did]);const pe=()=>{j(!1),W({}),J.current={},p()},ue=e=>((null===A||void 0===A?void 0:A.children)||[]).some((n=>n.meta.did===e)),me=async e=>{var n,t;const{pathPrefix:o,bundleDid:i,title:r,componentName:a="",componentDid:l=""}=V,{configs:s=[],registryUrl:c,inStore:d,inputUrl:p}=(null===(n=J.current)||void 0===n?void 0:n.meta)||{},u=null===(t=J.current)||void 0===t?void 0:t.downloadTokenList,m=d?(0,te.Rn)(c,i):p;j(!0);const h={rootDid:A.meta.did,url:m,mountPoint:Ne()(o),title:r,name:a,did:l,...V.hasEnvironmentsStep&&s.length>0?{configs:s.map((e=>({...e,value:V.configsValue[e.key]||""})))}:{},...u?{downloadTokenList:u}:{},...e};try{if(await S.installComponent({input:h}),c){const{teamDid:e,storeList:n}=(0,te.dX)({fromBlocklet:T,nodeInfo:N,blocklet:A}),{isNew:t,decoded:o}=(0,te.bQ)(c,n);t&&await S.addBlockletStore({input:{teamDid:e,url:o}})}ae({installResultProps:{}}),L({showError:!1,attachRuntimeInfo:!1})}catch(f){const e=(0,te.Z)(f);F.Z.error(e),console.error("installComponent error: ",f),ce(e)}finally{j(!1),J.current.installInput=h}},he=e=>({errMsg:(0,_n.Rw)({params:{...e,did:e.bundleDid},blocklets:[A],blocklet:A,locale:v})}),fe=async e=>{const{errMsg:n}=he({...V,locale:v});R(n),H===ye.length-2&&await me(e),ie((e=>e+1))},xe=()=>{ie((e=>e-1))},ge=e=>{var n,t;let{chooseParams:o=J.current,componentDid:i,isInit:r=!1}=e;const{meta:a,registryUrl:l,inStore:s,inputUrl:c}=o,{did:d,title:p,name:u}=a,m=((null===(n=A.settings)||void 0===n?void 0:n.children)||[]).filter((e=>"deleted"===e.status&&e.meta.bundleDid===d)),h=i||"",f=null===(t=a.environments)||void 0===t?void 0:t.map((e=>{const{name:n,validation:t,...o}=e;return{...o,key:n,...{validation:hn()(t)?"":t}}}));J.current={...o,meta:{...a,configs:f,registryUrl:l,inStore:s,inputUrl:c}};let x={};if(r){const e=[A],n=f||[],t=[],o=sn()(dn()([...n,...t]),"key").filter((e=>!!e.key)).sort(((e,n)=>e.required&&!n.required?-1:n.required&&!e.required?1:0)),i=(0,B.getSharedConfigObj)(e[0],{configs:o}),r={},a=o.map((e=>{const{default:n,key:t,...o}=e;return r[t]=i[t]||n,{...o,key:t,hidden:!!$.BLOCKLET_CONFIGURABLE_KEY[t]}}));x={...x,configsList:a,configsValue:r,hasMissRequiredConfigs:vo(a,r)}}const g=A.children.some((e=>"/"===e.mountPoint)),y=m.find((e=>e.meta.bundleDid===d)),v=A.children.find((e=>e.meta.bundleDid===d));if(x.title=p||"",y)x={...x,pathPrefix:y.mountPoint||"",componentName:y.meta.name,hasEnvironmentsStep:!1};else if(v)x={...x,pathPrefix:v.mountPoint||"",componentName:v.meta.name,hasEnvironmentsStep:!1};else{var b,j;x={...x,pathPrefix:g?"/".concat(Ne()(p)||Ne()(u)):"/",componentName:"",hasEnvironmentsStep:(null===(b=J.current.meta)||void 0===b||null===(j=b.environments)||void 0===j?void 0:j.length)>0}}const k=fo(J.current.meta),C=xo(J.current.meta),Z=go(A);ae({bundleDid:d,componentDid:h,...x,hasRequiredEnvironments:yo(J.current.meta),requirePurchase:k,didSpaceCapability:C,didSpaceEndpoint:Z}),r&&k&&(()=>{const{pathPrefix:e,bundleDid:n,title:t,componentName:o="",componentDid:i=""}=V,{meta:r={}}=J.current||{},{registryUrl:a,inStore:l,inputUrl:s}=r,c=l?(0,te.Rn)(a,n):s;z({meta:r,installOpts:{type:"component",rootDid:A.meta.did,mountPoint:e,url:c,title:t,name:o,did:i}})})()},ye=[{key:"selectComponent",name:y("blocklet.component.selectComponent"),body:(0,Y.jsxs)(Ro,{component:"div",children:[V.showFromUrlDialog&&(0,Y.jsx)($n.Z,{mode:"component",onCancel:()=>{ae({showFromUrlDialog:!1})},onSuccess:e=>{let{meta:n,inputUrl:t,inStore:o,registryUrl:i}=e;ge({chooseParams:{meta:n,inputUrl:t,inStore:o,registryUrl:i},isInit:!0}),ae({showFromUrlDialog:!1}),fe()},handleText:{title:y("blocklet.component.addComponentTip.fromUrl"),confirm:y("blocklet.component.choose")}}),(0,Y.jsx)(it,{stores:m,extra:re?null:(0,Y.jsxs)(D.Z,{variant:"text",color:"primary","data-cy":"add-component-from-url",onClick:()=>{ae({showFromUrlDialog:!0})},style:{padding:"0 2px"},children:[(0,Y.jsx)(tn.Z,{style:{fontSize:20,marginRight:4}})," ",y("blocklet.component.addComponentTip.fromUrl")," "]}),loading:b,onChange:()=>{W({}),J.current={}},storageKey:x,children:e=>{let{currentRegistry:n}=e;return(0,Y.jsx)(ft,{serverVersion:null===N||void 0===N?void 0:N.version,style:X?{height:"calc(100vh - 56px - 80px - 32px - 40px )"}:{height:"calc(100% - 40px)"},storeUrl:n.url,resourceType:h,resourceDid:f,handleButtonClick:e=>{ge({chooseParams:{...e,inStore:!0},isInit:!0})},handleBlockletRender:e=>{let{blocklet:n,defaultRender:t}=e;const o=(null===V||void 0===V?void 0:V.bundleDid)&&(null===V||void 0===V?void 0:V.bundleDid)===(null===n||void 0===n?void 0:n.did);return(0,Y.jsxs)(To,{children:[o&&(0,Y.jsx)("div",{className:"check-container",children:(0,Y.jsx)(xn.default,{className:"check-icon"})}),(0,Y.jsx)("div",{className:o?"choose-blocklet":"",style:{marginLeft:16},children:t})]})}})}})]}),cancel:"embed"===u?void 0:y("common.cancel"),confirm:bo({params:V,blocklet:A,t:y}),onCancel:pe,onConfirm:()=>{fe()}},{key:"agreement",name:y("launchBlocklet.introduction"),body:(0,Y.jsxs)(Ro,{component:"div",className:"agreement-wrapper",children:[(0,Y.jsx)(fn.Z,{title:y("launchBlocklet.introduction"),subTitle:y("blocklet.component.addComponentTip.introduction")}),(0,Y.jsx)(Xn.Z,{meta:oe,onClickNext:fe,handleDescEle:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)("p",{children:(0,Y.jsx)("div",{dangerouslySetInnerHTML:{__html:y("blocklet.component.addComponentTip.".concat(V.requirePurchase?"isPurchase":"isFree"),{name:se()})}})}),(0,Y.jsx)("p",{children:y("blocklet.component.addComponentTip.belowInformation")})]})})]}),cancel:y("common.pre"),confirm:y("launchBlocklet.next"),onCancel:xe,onConfirm:()=>{G(!1),fe()}},oe&&V.requirePurchase&&{key:"purchase",name:(0,Y.jsxs)(Y.Fragment,{children:[y("common.verifyNFT"),(0,Y.jsx)(Bn.Z,{})]}),body:(0,Y.jsxs)(Ro,{component:"div",className:"flex-align-center",style:{flexDirection:"column"},children:[!(2===(null===(a=_.current)||void 0===a||null===(l=a.getCurrentStep)||void 0===l?void 0:l.call(a))||M)&&(0,Y.jsx)(Po,{title:y("common.verifyNFT"),subTitle:y("blocklet.component.addComponentTip.verifyNFT")}),un()(V.purchaseResultProps)?O&&(0,Y.jsx)(Yn,{ref:_,meta:O.meta,mode:V.componentDid?"verify":"both",onCancel:e=>{G(!1),ae({purchaseResultProps:{variant:"error",title:se(),subTitle:e,style:{paddingTop:120},footer:(0,Y.jsx)(D.Z,{className:"bottom-button","data-cy":"retry-purchase-component",onClick:()=>{ae({purchaseResultProps:{}})},children:y("common.retry")})}})},installOpts:O.installOpts,handlePaySuccess:e=>{let{downloadTokenList:n}=e;J.current.downloadTokenList=n,G(!1),fe()}}):(0,Y.jsx)("div",{className:"flex-align-center flex-justify-center",children:(0,Y.jsx)(jn.Z,{...V.purchaseResultProps})})]}),disabled:2===(null===(s=_.current)||void 0===s||null===(c=s.getCurrentStep)||void 0===c?void 0:c.call(s))||M,cancel:y("common.pre"),confirm:y("common.next"),onConfirm:()=>{"function"===typeof _.current.onNext&&(_.current.onNext(),G(!0))},onCancel:()=>{xe()}},(0,B.hasStartEngine)(oe)&&!ue(oe.did)&&{key:"config",name:y("common.config"),error:Z,body:(0,Y.jsxs)(Ro,{component:"div",children:[(0,Y.jsx)(Po,{title:y("common.config"),subTitle:y("blocklet.component.addComponentTip.config")}),(0,Y.jsx)(be.Z,{label:y("blocklet.component.mountPoint"),autoComplete:"off",variant:"outlined",name:"pathPrefix",inputProps:{"data-cy":"mount-point-input"},fullWidth:!0,helperText:w||y("blocklet.component.mountPointTip"),style:{marginBottom:32},margin:"normal",value:V.pathPrefix,onChange:e=>{const n=e.target.value;ae({pathPrefix:n}),E(y("common.slugifyHint",{value:(0,te.LN)(n)}))}}),!!Z&&(0,Y.jsx)(vn.Z,{type:"error",style:{width:"100%",marginTop:8},children:Z})]}),cancel:y("common.pre"),confirm:y("common.next"),onCancel:xe,onConfirm:()=>{fe()}},oe&&!ue(oe.did)&&(null===V||void 0===V?void 0:V.hasEnvironmentsStep)&&{key:"environment",name:(0,Y.jsxs)(Y.Fragment,{children:[y("common.environment")," ",V.hasRequiredEnvironments&&(0,Y.jsx)(Bn.Z,{})]}),disabled:!!k||(null===V||void 0===V?void 0:V.hasMissRequiredConfigs),body:()=>(0,Y.jsxs)(Ro,{component:"div",children:[(0,Y.jsx)(Po,{title:y("common.environment"),subTitle:y("blocklet.component.addComponentTip.environment")}),(0,Y.jsx)(zn,{style:{marginTop:-12,width:"100%"},schema:V.configsList,defaultValue:V.configsValue,onChange:(e,n)=>{let{action:t,currentItem:o,allValues:i}=n;"confirm"===t&&ae({hasMissRequiredConfigs:vo(V.configsList,i),configsValue:i}),"edit"===t?C(o):["cancel","confirm"].includes(t)&&C(null)}})]}),cancel:y("common.pre"),confirm:y("common.next"),onCancel:xe,onConfirm:fe},oe&&!ue(oe.did)&&(null===V||void 0===V?void 0:V.didSpaceCapability)&&{key:"didSpace",name:(0,Y.jsxs)(Y.Fragment,{children:[y("blocklet.component.didSpaceConfig")," ","required"===V.didSpaceCapability&&(0,Y.jsx)(Bn.Z,{})]}),disabled:"required"===V.didSpaceCapability&&!V.didSpaceEndpoint,body:()=>(0,Y.jsx)(Yt,{children:(0,Y.jsxs)(Ro,{component:"div",children:[(0,Y.jsx)(Po,{title:y("blocklet.component.didSpaceConfig"),subTitle:y("blocklet.component.didSpaceConfigTip")}),(0,Y.jsx)(d.Z,{sx:{mt:"36px","& > div":{maxWidth:"unset !important","& .MuiAutocomplete-root":{maxWidth:"unset !important"}}},children:(0,Y.jsx)(ao,{blockletMeta:J.current.meta,onNext:()=>{fe()},onEndpointUpdate:le})})]})}),cancel:y("common.pre"),confirm:y("common.next"),onCancel:xe,onConfirm:fe},{key:"install",name:ue(null===oe||void 0===oe?void 0:oe.did)?y("common.upgrade"):y("common.install"),disabled:!1,loading:!1,body:(0,Y.jsx)(Ro,{component:"div",className:"flex-justify-center flex-align-center",style:{flexDirection:"column"},children:un()(V.installResultProps)?(0,Y.jsx)(bn.Z,{message:(0,Y.jsx)(Uo,{children:y("blocklet.component.installingCanCloseWindowTip")}),increaseSpeed:.3,messageLoop:!1}):(0,Y.jsx)("div",{style:{marginTop:120},children:(0,Y.jsx)(jn.Z,{...V.installResultProps})})}),confirm:y("common.complete"),onConfirm:()=>{ko(ee.componentDid),pe(),setTimeout((()=>{const e=document.getElementsByClassName("dashboard-main")[0];e&&(e.scrollTop=e.scrollHeight)}),200)}}].filter((e=>e)),ve=ye[H]||{};return A?(0,Y.jsxs)(Zo,{sx:X?{width:"100%",height:window.innerHeight}:{width:"100%",height:g?"72vh":"100vh"},children:[(0,Y.jsx)(yn.W,{steps:ye,mode:"memory",children:(0,Y.jsx)(jo,{ref:Q,meta:oe,isMobile:X,onStepChange:e=>{K(e)}})}),(0,Y.jsxs)(d.Z,{className:"action-bar",children:[ve.cancel&&(0,Y.jsx)(D.Z,{onClick:e=>{e.stopPropagation(),ve.onCancel()},disabled:H===ye.length-2&&b,color:"inherit",children:ve.cancel||y("common.cancel")}),ve.confirm&&(0,Y.jsx)(D.Z,{onClick:e=>{e.stopPropagation(),ve.onConfirm()},color:"primary","data-cy":"submit-confirm-next",disabled:b||("boolean"===typeof ve.disabled?ve.disabled:!(!b&&!ve.error&&V.bundleDid)||H>1&&!V.pathPrefix),variant:"contained",autoFocus:!0,title:ve.confirm,style:{marginLeft:8,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"140px",maxWidth:"280px",textAlign:"center"},children:(0,Y.jsxs)(d.Z,{display:"flex",alignItems:"center",children:[("boolean"===typeof ve.loading?ve.loading:b)&&(0,Y.jsx)(I.Z,{style:{marginRight:8},size:16}),ve.confirm]})})]})]}):null}Co.propTypes={onClose:s().func,mode:s().oneOf(["normal","embed"]),inDialog:s().bool,stores:s().arrayOf(s().string),resourceType:s().string,resourceDid:s().string,storageKey:s().string},Co.defaultProps={onClose:()=>{},mode:"normal",stores:[],resourceType:"",resourceDid:"",storageKey:"",inDialog:!0};const Zo=(0,a.Z)(d.Z)(lo||(lo=(0,r.Z)(["\n .action-bar {\n display: flex;\n justify-content: flex-end;\n position: sticky;\n bottom: 0;\n padding-top: 16px;\n z-index: 100;\n width: 100%;\n background: #fff;\n border-top: 1px solid #eee;\n }\n"]))),Ro=(0,a.Z)(Ve.Z)(so||(so=(0,r.Z)(["\n width: 100%;\n height: 100%;\n"]))),wo=a.Z.div(co||(co=(0,r.Z)(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n\n .bottom-button {\n min-width: 200px;\n }\n\n // blocklet-select-side\n aside {\n width: 140px;\n }\n"]))),Eo=e=>e.isMobile?"\n height: calc(100vh - 56px - 64px - 48px);\n ":"",So=(0,a.Z)(d.Z)(po||(po=(0,r.Z)(["\n ","\n\n & .flex-justify-center {\n display: flex;\n justify-content: center;\n }\n\n & .flex-align-center {\n display: flex;\n height: 100%;\n align-items: center;\n ","\n }\n\n & .agreement-wrapper {\n ","\n max-height: 60vh;\n .eula-trigger {\n padding-right: 0;\n }\n .next-button {\n display: none;\n }\n }\n\n & .connect {\n background: white;\n }\n"])),(e=>{let{className:n}=e;return"mobileStyle"===n?"\n & > div{\n height: 100%;\n }\n .root-header {\n .app-name-content {\n display: none;\n }\n }\n\n\n\n // content-panel\n .root-header + div{\n padding-top: 0;\n position: relative;\n & > div {\n padding-top: 0;\n }\n }\n\n header + div {\n padding-top: 0;\n }\n\n header {\n .header-title {\n margin-left: 0;\n }\n\n .header-title-name {\n max-width: 100% !important;\n }\n }\n ":"\n position: relative;\n .root-header {\n z-index: auto !important;\n position: fixed !important;\n }\n & > div {\n height: 100%;\n width: 100%;\n max-width: 100%;\n & > div {\n max-height: unset !important;\n max-width: 100%;\n & > div {\n // left-panel\n &:first-child {\n padding: 0;\n width: 25%;\n min-width: 240px;\n & > div:first-child {\n display: none;\n }\n // step\n & > div:last-child {\n // margin-top: 32px;\n margin-top: 0;\n }\n }\n // right-panel\n &:last-child {\n padding-top: 0;\n padding-right: 0px;\n overflow-y: auto;\n .app-content {\n padding: 0 0 24px 0;\n }\n .button-container {\n padding-right: 0;\n }\n }\n }\n }\n }\n\n "}),(e=>Eo(e)),(e=>Eo(e))),Po=(0,a.Z)(fn.Z)(uo||(uo=(0,r.Z)(["\n margin-bottom: 24px;\n"]))),To=a.Z.div(mo||(mo=(0,r.Z)(["\n position: relative;\n\n .choose-blocklet {\n background-color: rgb(236, 251, 253);\n border-color: rgb(236, 251, 253);\n border-radius: 8px;\n }\n\n .check-container {\n position: absolute;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: flex-end;\n align-items: flex-end;\n width: 30px;\n height: 30px;\n border-radius: 0 0 8px 0;\n color: ",";\n overflow: hidden;\n transition: all ease 0.3s;\n &:after {\n position: absolute;\n z-index: 0;\n display: block;\n width: 0;\n height: 0;\n border-top: transparent solid 15px;\n border-left: transparent solid 15px;\n border-bottom: "," solid 15px;\n border-right: "," solid 15px;\n transition: all ease 0.1s;\n content: '';\n }\n\n .check-icon {\n position: relative;\n z-index: 2;\n margin: 0 1px 1px 0;\n font-size: 16px;\n transition: all ease 0.2s;\n }\n }\n"])),(e=>e.theme.palette.common.white),(e=>e.theme.palette.primary.main),(e=>e.theme.palette.primary.main)),Uo=a.Z.div(ho||(ho=(0,r.Z)(["\n color: ",";\n .msg-before {\n display: inline-block;\n color: #aaa;\n font-size: 14px;\n margin-right: 6px;\n }\n"])),(e=>e.theme.palette.primary.main));var Io;function No(e){let{blocklet:n,children:t}=e;const{t:r}=(0,i.PE)(),[a,l]=(0,o.useState)(!1),s=(0,on.Z)((e=>e.breakpoints.down("md"))),{inService:c}=(0,ne.h6)(),d=()=>{l(!1)},p=e=>{e.stopPropagation(),l(!0)};return(0,Y.jsxs)(Y.Fragment,{children:["function"===typeof t?t({open:p}):(0,Y.jsxs)(nn.Z,{onClick:p,className:"component-action","data-cy":"action-add-component",children:[(0,Y.jsx)(tn.Z,{style:{fontSize:18,marginRight:5}}),r("blocklet.component.add")]}),a&&(0,Y.jsx)(Do,{title:r("blocklet.component.addWithName",{name:(0,B.getDisplayName)(n)}),maxWidth:!1,fullWidth:!1,PaperProps:{style:s?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(e,n)=>{"backdropClick"!==n&&d()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:(0,Y.jsx)(Co,{onClose:d,storageKey:c?rn.K_:rn.WC})})]})}No.propTypes={children:s().any,blocklet:s().object.isRequired},No.defaultProps={children:null};const Do=(0,a.Z)(ge.ZP)(Io||(Io=(0,r.Z)(["\n .MuiDialogContent-root {\n }\n"]))),Ao=e=>e.children.filter((e=>e.meta.interfaces.find((e=>e.type===$.BLOCKLET_INTERFACE_TYPE_WEB))));function Bo(e){let{params:n,setParams:t,setError:r,serviceTypes:a}=e;const{t:l}=(0,i.PE)(),{blocklet:s}=(0,kn.y0)(),c=s.meta.did,d=Ao(s),[p,u]=(0,o.useState)([]),m={301:l("common.redirectPermanently"),302:l("common.redirectTemporary"),307:l("common.redirectTemporary"),308:l("common.redirectPermanently")};return(0,o.useEffect)((()=>{if(n.type===U.ROUTING_RULE_TYPES.COMPONENT&&n.componentId){const e=d.find((e=>e.meta.did===n.componentId)),o=(0,B.findWebInterface)(e.meta),i=(Array.isArray(null===o||void 0===o?void 0:o.pageGroups)?o.pageGroups:[]).map((e=>({value:e,label:"".concat(e," pages")})));i.length&&i.unshift({value:"",label:"All pages"}),u(i),n.pageGroup&&!1===i.find((e=>e.value===n.pageGroup))&&t({...n,pageGroups:""})}}),[n.componentId,n.type]),(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(be.Z,{select:!0,label:l("router.domain.add.type"),autoComplete:"off",variant:"outlined",name:"type","data-cy":"domain-add-type",fullWidth:!0,value:n.type,onChange:e=>{r(""),t({...n,type:e.target.value,did:e.target.value===U.ROUTING_RULE_TYPES.BLOCKLET?c:"",__disableConfirm:!1})},style:{marginBottom:32},SelectProps:{},children:a.map((e=>{let{name:n,value:t}=e;return(0,Y.jsx)(nn.Z,{value:t,children:n},t)}))}),n.type===U.ROUTING_RULE_TYPES.REDIRECT&&[(0,Y.jsx)(be.Z,{select:!0,label:l("router.domain.add.redirect"),autoComplete:"off",variant:"outlined",name:"type",fullWidth:!0,value:n.redirectCode,onChange:e=>t({...n,redirectCode:e.target.value}),style:{marginBottom:32},SelectProps:{},children:Object.keys(m).map((e=>(0,Y.jsx)(nn.Z,{value:e,children:"".concat(m[e]," - ").concat(e)},e)))},"redirectCode"),(0,Y.jsx)(be.Z,{label:l("common.redirectUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"redirect-url-input",fullWidth:!0,value:n.url,helperText:l("router.urlHelperText"),style:{marginBottom:32},onChange:e=>{t({...n,url:e.target.value,__disableConfirm:!e.target.value.trim()}),e.target.value.trim()?r(""):r(l("router.validation.redirectUrlRequired"))}},"redirectUrl")],n.type===U.ROUTING_RULE_TYPES.COMPONENT&&[(0,Y.jsx)(be.Z,{select:!0,label:l("router.domain.add.component"),autoComplete:"off",variant:"outlined","data-cy":"select-component-input",name:"componentId",fullWidth:!0,value:n.componentId,onChange:e=>{t({...n,componentId:e.target.value})},style:{marginBottom:32},SelectProps:{},children:d.map((e=>(0,Y.jsx)(nn.Z,{value:e.meta.did,selected:e.meta.did===n.componentId,children:(0,B.getDisplayName)(e,!0)},e.meta.did)))},"componentId"),p.length?(0,Y.jsx)(be.Z,{select:!0,label:l("router.domain.add.pageGroup"),autoComplete:"off",variant:"outlined",name:"pageGroup","data-cy":"route-group-input",fullWidth:!0,value:n.pageGroup,helperText:l("router.domain.add.pageGroupTip"),style:{marginBottom:32},onChange:e=>{t({...n,pageGroup:e.target.value})},SelectProps:{},children:p.map((e=>(0,Y.jsx)(nn.Z,{value:e.value,selected:e.value===n.pageGroup,children:e.label},e.label)))},"pageGroup"):null].filter(Boolean),n.type===U.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(0,Y.jsx)(be.Z,{label:l("common.rewriteUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"rewrite-url-input",fullWidth:!0,value:n.url,helperText:l("router.urlHelperText"),style:{marginBottom:32},onChange:e=>{t({...n,url:e.target.value,__disableConfirm:!e.target.value.trim()}),e.target.value.trim()?r(""):r(l("router.validation.rewriteUrlRequired"))}},"url")]})}function Lo(e){let{children:n}=e;const{t:t}=(0,i.PE)(),{api:r}=(0,ne.h6)(),{blocklet:a}=(0,kn.y0)(),[l,s]=(0,o.useState)(!1),[c,d]=(0,o.useState)(null),p=a.meta.did,u=a.site.id,m={title:t("router.rule.add.title"),description:(e,n,o)=>(0,Y.jsxs)(Ve.Z,{component:"div",children:[(0,Y.jsx)(be.Z,{label:t("router.rule.add.pathPrefix"),autoComplete:"off",variant:"outlined",name:"pathPrefix","data-cy":"path-prefix-input",fullWidth:!0,autoFocus:!0,helperText:e.pathPrefixHint||t("router.rule.add.pathPrefixTip"),style:{marginBottom:32},margin:"dense",value:e.pathPrefix,onChange:i=>{let r=!1;const l=(0,_n.Rw)({params:{...e,pathPrefix:i.target.value},blocklets:[a]});o(l),e.type===U.ROUTING_RULE_TYPES.BLOCKLET&&l&&(r=!0),e.type!==U.ROUTING_RULE_TYPES.REDIRECT||e.url||(r=!0),e.type!==U.ROUTING_RULE_TYPES.GENERAL_REWRITE||e.url||(r=!0),i.target.value.trim()||(r=!0,o(t("router.validation.pathPrefixRequired"))),r||o("");const s=t("common.slugifyHint",{value:(0,te.LN)(i.target.value)});n({...e,pathPrefix:i.target.value,pathPrefixHint:s,__disableConfirm:r})}}),(0,Y.jsx)(Bo,{params:e,setParams:e=>{o(null);(0,_n.fX)(e,t)?n({...e,__disableConfirm:!0}):n({...e})},setError:o})]}),confirm:t("router.rule.add.confirm"),cancel:t("common.cancel"),params:{did:"",pathPrefix:"",type:U.ROUTING_RULE_TYPES.REDIRECT,componentId:"",pageGroup:"",redirectCode:302,__disableConfirm:!0},onConfirm:async e=>{try{const n=await(0,_n.fX)(e,t);if(n)throw n;s(!0);const o={from:{pathPrefix:Ne()(e.pathPrefix)},to:{type:e.type}};e.type===U.ROUTING_RULE_TYPES.REDIRECT&&(o.to.url=e.url.trim(),o.to.redirectCode=e.redirectCode),e.type===U.ROUTING_RULE_TYPES.COMPONENT&&(o.to.did=p,o.to.componentId=e.componentId,o.to.pageGroup=e.pageGroup),e.type===U.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(o.to.url=Ne()(e.url)),await r.addRoutingRule({input:{id:u,rule:o,teamDid:p}})}catch(n){F.Z.error(n.message)}finally{s(!1),d(null)}},onCancel:()=>{s(!1),d(null)}},h=e=>{e.stopPropagation(),d(m)};return(0,Y.jsxs)(Y.Fragment,{children:["function"===typeof n?n({loading:l,open:h}):(0,Y.jsxs)(nn.Z,{onClick:h,className:"rule-action","data-cy":"action-add-rule",children:[l?(0,Y.jsx)(I.Z,{size:16}):(0,Y.jsx)(tn.Z,{style:{fontSize:18,marginRight:5}}),t("router.rule.add.title")]}),c&&(0,Y.jsx)(ee.Z,{title:c.title,description:c.description,confirm:c.confirm,cancel:c.cancel,params:c.params,onConfirm:c.onConfirm,onCancel:c.onCancel,color:"primary"})]})}Bo.propTypes={params:s().object,serviceTypes:s().array,setParams:s().func,setError:s().func},Bo.defaultProps={params:{},serviceTypes:[{name:"Redirect",value:U.ROUTING_RULE_TYPES.REDIRECT},{name:"Default - User will see the 404 page",value:U.ROUTING_RULE_TYPES.NONE},{name:"Rewrite - Route traffic without redirect",value:U.ROUTING_RULE_TYPES.GENERAL_REWRITE},{name:"Component - Pass traffic to blocklet component",value:U.ROUTING_RULE_TYPES.COMPONENT}],setParams:()=>{},setError:()=>{}},Lo.propTypes={children:s().any},Lo.defaultProps={children:null};var Oo=t(82434),Fo=t.n(Oo),zo=t(62681),Mo=t(18067),Go=t(71363);function qo(e){let{id:n,from:t,children:r}=e;const{t:a}=(0,i.PE)(),{api:l}=(0,ne.h6)(),{blocklet:s}=(0,kn.y0)(),[c,d]=(0,o.useState)(!1),[p,u]=(0,o.useState)(null),m=s.meta.did,h=s.site.id,f=t.pathPrefix,x={keyName:f,title:a("router.rule.delete.title"),description:a("router.rule.delete.description",{name:"<b>".concat(f,"</b>")}),confirmPlaceholder:a("router.rule.delete.confirm_desc",{name:f}),confirm:a("common.delConfirm"),cancel:a("router.rule.delete.cancel"),onConfirm:async()=>{d(!0);try{await l.deleteRoutingRule({input:{id:h,ruleId:n,teamDid:m}})}catch(e){F.Z.error(e.message)}finally{u(null),d(!1)}},onCancel:()=>{d(!1),u(null)}},g=e=>{e.stopPropagation(),u(x)};return(0,Y.jsxs)(Y.Fragment,{children:["function"===typeof r?r({loading:c,open:g}):(0,Y.jsxs)(nn.Z,{onClick:g,className:"rule-action","data-cy":"action-delete-rule",children:[c?(0,Y.jsx)(I.Z,{size:16}):(0,Y.jsx)(E.default,{style:{fontSize:18,marginRight:5}}),a("router.rule.delete.title")]}),p&&(0,Y.jsx)(Go.Z,{keyName:p.keyName,title:p.title,description:p.description,confirmPlaceholder:p.confirmPlaceholder,confirm:p.confirm,cancel:p.cancel,params:p.params,onConfirm:p.onConfirm,onCancel:p.onCancel})]})}function Vo(e){let{id:n,from:t,to:r,children:a}=e;const{t:l}=(0,i.PE)(),{api:s}=(0,ne.h6)(),{blocklet:c}=(0,kn.y0)(),[d,p]=(0,o.useState)(!1),[u,m]=(0,o.useState)(null),h=c.meta.did,f=c.site.id,x=t.pathPrefix,g={title:l("router.rule.update.title"),description:(e,n,t)=>(0,Y.jsxs)(Ve.Z,{component:"div",children:[(0,Y.jsx)(be.Z,{label:l("router.rule.add.pathPrefix"),autoComplete:"off",variant:"outlined",name:"pathPrefix","data-cy":"path-prefix-input",fullWidth:!0,autoFocus:!0,helperText:e.helperText||l("router.rule.add.pathPrefixTip"),style:{marginBottom:32},margin:"dense",value:e.pathPrefix,onChange:o=>{let i=!1;e.type!==U.ROUTING_RULE_TYPES.REDIRECT||e.url||(i=!0),e.type!==U.ROUTING_RULE_TYPES.GENERAL_REWRITE||e.url||(i=!0),o.target.value.trim()||(i=!0,t(l("router.validation.pathPrefixRequired"))),i||t("");const r=l("common.slugifyHint",{value:(0,te.LN)(o.target.value)});n({...e,pathPrefix:o.target.value,helperText:r,__disableConfirm:i})}}),(0,Y.jsx)(Bo,{params:e,setParams:e=>{(0,_n.fX)(e,l)?n({...e,__disableConfirm:!0}):n({...e})},setError:t})]}),confirm:l("router.rule.update.confirm"),cancel:l("router.rule.update.cancel"),color:"primary",params:{did:r.did||"",pathPrefix:"/"===x?x:x.replace(/^\/+/,"").replace(/\/+$/,""),type:r.type||U.ROUTING_RULE_TYPES.BLOCKLET,redirectCode:r.redirectCode||302,componentId:r.componentId||"",pageGroup:r.pageGroup||"",url:r.url||"",__disableConfirm:!1},onConfirm:async e=>{try{const t=await(0,_n.fX)(e,l);if(t)throw t;p(!0);const o={id:n,from:{pathPrefix:Ne()(e.pathPrefix)},to:{type:e.type}};e.type===U.ROUTING_RULE_TYPES.REDIRECT&&(o.to.url=e.url,o.to.redirectCode=e.redirectCode),e.type===U.ROUTING_RULE_TYPES.COMPONENT&&(o.to.did=h,o.to.componentId=e.componentId,o.to.pageGroup=e.pageGroup),e.type===U.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(o.to.url=Ne()(e.url)),await s.updateRoutingRule({input:{id:f,rule:o,teamDid:h}})}catch(t){F.Z.error(t.message)}finally{p(!1),m(null)}},onCancel:()=>{p(!1),m(null)}},y=e=>{e.stopPropagation(),m(g)};return(0,Y.jsxs)(Y.Fragment,{children:["function"===typeof a?a({loading:d,open:y}):(0,Y.jsxs)(nn.Z,{onClick:y,className:"rule-action","data-cy":"action-update-rule",children:[d?(0,Y.jsx)(I.Z,{size:16}):(0,Y.jsx)(xe.default,{style:{fontSize:18,marginRight:5}}),l("router.rule.update.title")]}),u&&(0,Y.jsx)(ee.Z,{title:u.title,description:u.description,confirm:u.confirm,color:u.color,cancel:u.cancel,params:u.params,onConfirm:u.onConfirm,onCancel:u.onCancel})]})}function Wo(e){const{locale:n}=(0,i.PE)(),{blocklet:t,recommendedDomain:o}=(0,kn.y0)(),r=(0,te.Sk)(o,e.from.pathPrefix,(0,te.f0)(t,n));return(0,Y.jsxs)(d.Z,{display:"flex",alignItems:"center",children:[(0,Y.jsx)("a",{target:"_blank",href:r,rel:"noopener noreferrer",title:r,children:(0,Y.jsx)(f.Z,{size:"small",children:(0,Y.jsx)(b.Z,{})})}),(0,Y.jsx)(Vo,{...e,children:n=>{let{open:t}=n;return(0,Y.jsx)(f.Z,{size:"small",onClick:t,disabled:e.isProtected,"data-cy":"action-update-rule",children:(0,Y.jsx)(y.Z,{})})}}),(0,Y.jsx)(qo,{...e,children:n=>{let{open:t}=n;return(0,Y.jsx)(f.Z,{size:"small",onClick:t,disabled:e.isProtected,"data-cy":"action-delete-rule",children:(0,Y.jsx)(E.default,{})})}})]})}function Ho(e){let{group:n,...t}=e;return n?(0,Y.jsx)(G.Z,{type:"reverse",...t,children:n}):null}function Ko(e){let{domain:n,isHttps:t,toUrl:o}=e;const i=t?"https":"http";let r=o;return Fo()(r)||(r="".concat(i,"://").concat(n).concat(o)),(0,Y.jsx)(J.Z,{href:r,target:"_blank",style:{fontSize:14},underline:"hover",children:o},r)}function Jo(e){let{hasPermission:n}=e;const{t:t,locale:o}=(0,i.PE)(),r=(0,jt.Z)(),{blocklet:a,recommendedDomain:l}=(0,kn.y0)();return a.site.rules.filter((e=>e.to.type!==U.ROUTING_RULE_TYPES.BLOCKLET)).map((e=>{let i=null,s=null;e.to.type===U.ROUTING_RULE_TYPES.NONE?i="404":e.to.type===U.ROUTING_RULE_TYPES.REDIRECT?i=e.to.redirectCode:e.to.type===U.ROUTING_RULE_TYPES.GENERAL_REWRITE?i="R":e.to.type===U.ROUTING_RULE_TYPES.COMPONENT&&(s=a.children.find((n=>n.meta.did===e.to.componentId)),i="C");const c=e.isProtected?(0,Y.jsx)(k.Z,{title:t("blocklet.router.urlLockTooltip"),placement:"top",children:(0,Y.jsx)("span",{children:(0,Y.jsx)(f.Z,{disabled:!0,size:"small",style:{pointerEvents:"auto",paddingTop:0,paddingBottom:0,margin:"12px 0"},children:(0,Y.jsx)(Mo.Z,{style:{fill:r.palette.text.disabled}})})})}):(0,Y.jsx)(Wo,{...e});return[(0,Y.jsxs)(d.Z,{display:"flex",py:2,className:"component-item",justifyContent:"space-between",alignItems:"center",children:[(0,Y.jsxs)(d.Z,{width:{xs:300,md:400},display:"flex",alignItems:"center",children:[(0,Y.jsx)(d.Z,{width:28}),"object"===typeof i?i:(0,Y.jsx)(zo.Z,{children:i}),(0,Y.jsxs)(d.Z,{ml:2,children:[(0,Y.jsxs)(d.Z,{style:{color:"#222",fontSize:16},children:[e.to.type===U.ROUTING_RULE_TYPES.NONE&&t("common.page404"),e.to.type===U.ROUTING_RULE_TYPES.REDIRECT&&t("common.redirect"),e.to.type===U.ROUTING_RULE_TYPES.GENERAL_REWRITE&&t("common.rewrite"),e.to.type===U.ROUTING_RULE_TYPES.COMPONENT&&(0,B.getDisplayName)(s,!0)]}),(0,Y.jsxs)(d.Z,{display:"flex",alignItems:"center",children:[e.to.type===U.ROUTING_RULE_TYPES.REDIRECT&&(0,Y.jsx)(Ko,{domain:l,toUrl:e.to.url}),e.to.type===U.ROUTING_RULE_TYPES.GENERAL_REWRITE&&(0,Y.jsx)(Ko,{domain:l,toUrl:e.to.url}),e.to.type===U.ROUTING_RULE_TYPES.COMPONENT&&(0,Y.jsx)(Ho,{group:e.to.pageGroup})]})]})]}),(0,Y.jsx)(d.Z,{px:2,sx:{display:{xs:"none",md:"flex"}},alignItems:"center",flexGrow:"1",children:(0,Y.jsx)(J.Z,{href:(0,te.Sk)(l,e.from.pathPrefix,(0,te.f0)(a,o)),target:"_blank",style:{fontSize:16},underline:"hover",children:e.from.pathPrefix})},e.from.pathPrefix),(0,Y.jsx)(d.Z,{children:n&&(0,Y.jsx)("div",{style:{textAlign:"right"},children:c})},"actions")]},"rule"),(0,Y.jsx)(en.Z,{},"divider")]}))}qo.propTypes={id:s().string.isRequired,from:s().object.isRequired,children:s().any},qo.defaultProps={children:null},Vo.propTypes={id:s().string.isRequired,from:s().object.isRequired,to:s().object.isRequired,children:s().any},Vo.defaultProps={children:null},Wo.propTypes={isProtected:s().bool},Wo.defaultProps={isProtected:!1},Ho.propTypes={group:s().string.isRequired},Ko.propTypes={domain:s().string.isRequired,toUrl:s().string.isRequired,isHttps:s().bool},Ko.defaultProps={isHttps:!1},Jo.propTypes={hasPermission:s().bool},Jo.defaultProps={hasPermission:!1};const Yo=(0,oe.V)(Jo,"mutate_blocklets"),Qo=(0,oe.V)(Jo,"",te.Wf);function _o(e){const{inService:n}=(0,ne.h6)();return n?(0,Y.jsx)(Qo,{...e}):(0,Y.jsx)(Yo,{...e})}var Xo,$o,ei,ni=t(92726),ti=t(44125);const oi=(e,n)=>e?[{name:n("common.name"),value:e.displayName},{name:n("common.description"),value:e.description},{name:n("common.version"),value:(0,Y.jsx)(G.Z,{children:e.version})}]:[],ii=e=>{const{source:n,deployedFrom:t,bundleSource:o}=e;return n?{source:n,deployedFrom:t}:o?o.url?{source:"url",deployedFrom:t||Array.isArray(o.url)?o.url[0]:o.url}:o.store?{source:"registry",deployedFrom:t||Array.isArray(o.store)?o.store[0]:o.store}:{}:{source:"upload",deployedFrom:t}},ri=(e,n)=>{const t=e.split("/").slice(1);let o=n,i=0;const r=[];for(;o&&i<t.length;){const e=o.children.find((e=>e.meta.did===t[i]));o=e,i++,e&&r.push(e.meta.title)}return r.join(" / ")},ai=e=>{var n;return"pack"===(null===e||void 0===e||null===(n=e.meta)||void 0===n?void 0:n.group)};function li(e){var n,t,r,a,l;let{blocklet:s,ancestors:m,depth:h,onRemove:x,onStart:g,onStop:j,onRestart:C,onReload:Z,getComponentUrl:S,app:P}=e;const{t:U,locale:I}=(0,o.useContext)(i.RD),[D,A]=(0,o.useState)(),[L,F]=(0,o.useState)(!1),[q,V]=(0,o.useState)(!1),[W,H]=(0,o.useState)(null),{deletingBlocklets:K}=(0,z.K)();let{status:J}=s;1===h&&K.includes(s.meta.did)&&(J="deleting");const X="/".concat(s.mountPoint||"/").replace(/\/+/g,"/"),$=S(X),ne=D?ii(D):{},oe=D?[{name:U("common.name"),value:(0,B.getDisplayName)(D,!0)},{name:U("common.version"),value:(0,Y.jsx)(le,{blocklet:D,checkUpgrade:!1})},{name:U("common.status"),value:(0,Y.jsx)(_.Z,{status:J,source:D.source,progress:s.progress})},"running"===s.status?{name:U("blocklet.startedAt"),value:(0,te.B2)(s.startedAt,I)}:null,"running"!==s.status?{name:U("blocklet.stoppedAt"),value:(0,te.B2)(s.stoppedAt,I)}:null,s.installedAt?{name:U("blocklet.installedAt"),value:(0,te.B2)(s.installedAt,I)}:null,(0,B.hasStartEngine)(s.meta)?{name:U("common.mountPoint"),value:X}:null,D.meta.group?{name:U("common.group"),value:(0,Y.jsx)(G.Z,{type:"success",children:D.meta.group})}:null,{name:U("blocklet.overview.source"),value:(0,Y.jsx)(Q,{sourceInfo:ne,blocklet:s})},{name:U("blocklet.overview.deployedFrom"),value:ne.deployedFrom||"-"},{name:U("common.did"),value:(0,Y.jsx)(M.Z,{did:D.meta.did})},{name:U("common.author"),value:(0,te.rq)(D.meta.author)},{name:U("common.engine"),value:oi(D.engine,U).map((e=>{let{name:n,value:t}=e;return(0,Y.jsx)(N.Z,{style:{marginBottom:4},nameWidth:120,name:n,children:t},n)}))},null!==(n=s.dependents)&&void 0!==n&&n.length?{name:U("common.dependents"),value:(0,Y.jsx)(d.Z,{children:s.dependents.map((e=>(0,Y.jsx)(d.Z,{children:"".concat(ri(e.id,P)," ").concat(e.required?"(".concat(U("common.required"),")"):"")},e.id)))})}:null,null!==(t=s.meta.resources)&&void 0!==t&&t.length?{name:U("common.resource"),value:s.meta.resources.join(", ")}:null].filter(Boolean):[],ie=(0,B.isInProgress)(P.status),re=(0,B.isInProgress)(s.status);let ae="";if(ie||re||1===h&&K.includes(s.meta.did))ae=U("blocklet.component.tip.stopBlocklet");else if(null!==(r=s.dependents)&&void 0!==r&&r.length){const e=s.dependents.filter((e=>e.required));if(e.length){const n=e.map((e=>ri(e.id,P)));ae=U("blocklet.component.tip.requiredBy",{name:n.join(", ")})}}return[(0,Y.jsxs)(ci,{display:"flex",py:2,className:"component-item",justifyContent:"space-between",alignItems:"center",children:[(0,Y.jsxs)(d.Z,{pl:2,width:{xs:300,md:400},display:"flex",alignItems:"center",children:[(0,Y.jsx)(he.Z,{blocklet:s,ancestors:m}),(0,Y.jsxs)(d.Z,{ml:"16px",children:[(0,Y.jsxs)(d.Z,{className:"component-header",onClick:()=>A(s),children:[(0,Y.jsx)(d.Z,{className:"component-name",children:(0,B.getDisplayName)(s,!0)}),(0,Y.jsx)(d.Z,{className:"component-version",children:null===s||void 0===s||null===(a=s.meta)||void 0===a?void 0:a.version})]}),(0,Y.jsxs)(d.Z,{display:"flex",alignItems:"center",sx:{mt:"2px",ml:-.5},children:["unknown"!==J&&(0,Y.jsx)(_.Z,{style:{marginLeft:4},status:J,source:s.source,progress:s.progress}),(0,Y.jsx)(fe.Z,{style:{marginLeft:4},mode:s.mode||""}),!(null===(l=s.dependents)||void 0===l||!l.length)&&(0,Y.jsx)(k.Z,{title:["".concat(U("common.dependents"),": "),s.dependents.map((e=>(0,Y.jsx)(d.Z,{pl:1,children:"".concat(ri(e.id,P)," ").concat(e.required?"(".concat(U("common.required"),")"):"")},e.id)))],children:(0,Y.jsx)(d.Z,{display:"flex",color:"primary.main",ml:1,children:(0,Y.jsx)(T.JO,{icon:"octicon:package-dependents-16"})})})]})]})]},s),(0,B.hasStartEngine)(s.meta)&&(0,Y.jsx)(d.Z,{sx:{display:{xs:"none",md:"flex"}},alignItems:"center",flexGrow:"1",children:(0,Y.jsx)("a",{target:"_blank",href:$,rel:"noopener noreferrer",title:$,children:(0,Y.jsx)(d.Z,{maxWidth:400,sx:{color:"secondary.main",fontSize:18,px:2},overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",children:O()(X)})})},X),(0,Y.jsxs)(d.Z,{display:"flex",alignItems:"center",children:[(0,B.hasStartEngine)(s.meta)&&(0,Y.jsx)(k.Z,{title:U("common.visit"),children:(0,Y.jsx)("a",{target:"_blank",href:$,rel:"noopener noreferrer",children:(0,Y.jsx)(f.Z,{size:"small",children:(0,Y.jsx)(b.Z,{})})})}),(0,B.hasStartEngine)(s.meta)&&(0,Y.jsx)(Me,{blocklet:s,ancestors:m,children:e=>{let{open:n}=e;return(0,Y.jsx)(k.Z,{title:U("common.config"),children:(0,Y.jsx)(si,{color:"error",badgeContent:"",variant:"dot",invisible:!(0,B.getComponentMissingConfigs)(s,m[0]).length,children:(0,Y.jsx)(f.Z,{onClick:n,size:"small",children:(0,Y.jsx)(y.Z,{})})})},"config")}}),(0,Y.jsx)(Xe,{blocklet:P,component:s,onStart:g,onStop:j,disabled:!["starting","stopping"].includes(P.status)&&(0,B.isInProgress)(P.status)}),(0,Y.jsx)(ni.Z,{"data-cy":"component-actions",actions:[(0,B.hasStartEngine)(s.meta)?{icon:(0,Y.jsx)(v.Z,{}),text:U("common.detail"),onClick:()=>{A(s)}}:null,!ai(s)&&{icon:(0,Y.jsx)(R.default,{}),text:U("common.restart"),onClick:()=>{H({title:"".concat(U("common.restart")," ").concat(s.meta.title),description:U("blocklet.action.restartDescription"),confirm:U("blocklet.action.confirmRestart"),cancel:U("common.cancel"),onConfirm:async()=>{V(!0),await C(s),V(!1)},onCancel:()=>H(null)})},disabled:ie||re||"running"!==s.status},!ai(s)&&{icon:(0,Y.jsx)(w.Z,{}),text:U("common.reload"),onClick:async()=>{V(!0),await Z(s),V(!1)},disabled:q||ie||re||"running"!==s.status},{icon:(0,Y.jsx)(E.default,{}),text:U("common.delete"),onClick:()=>{F(!0)},disabled:ie||re||!!ae,tip:ae}].filter(Boolean)})]},"actions")]},"group-not-gateway-box"),(0,Y.jsx)(en.Z,{depth:2},"line"),!!D&&(0,Y.jsx)(c.Z,{open:!0,fullWidth:!0,maxWidth:"md",onClose:()=>{A(null)},children:(0,Y.jsxs)(d.Z,{paddingY:1.5,children:[(0,Y.jsx)(u.Z,{children:U("common.componentBasicInfo")}),(0,Y.jsx)(p.Z,{children:(se=oe,se.map((e=>e.name===U("common.did")||e.name===U("blocklet.appId")?(0,Y.jsx)(N.Z,{valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:()=>e.name,children:e.value},e.name):(0,Y.jsx)(N.Z,{valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.name))))})]},"dialog-wrapper")},"base-info-dialog"),(0,Y.jsx)(Ke,{blocklet:P,component:s,remove:async function(){V(!0);try{await x(...arguments)}catch{}V(!1),F(!1)},onCancel:()=>F(!1),hideBtn:!0,showConfirm:L},"delete-component"),W&&(0,Y.jsx)(ee.Z,{title:W.title,description:W.description,confirm:W.confirm,cancel:W.cancel,params:W.params,onConfirm:W.onConfirm,onCancel:W.onCancel},"confirm-setting")];var se}li.propTypes={blocklet:s().object.isRequired,ancestors:s().array,depth:s().number,onRemove:s().func,onStart:s().func,onStop:s().func,onRestart:s().func,onReload:s().func,getComponentUrl:s().func,app:s().object},li.defaultProps={ancestors:[],depth:0,onRemove:()=>{},onStart:()=>{},onStop:()=>{},onRestart:()=>{},onReload:()=>{},getComponentUrl:()=>window.location.origin,app:null};const si=(0,a.Z)(g.Z)(Xo||(Xo=(0,r.Z)(["\n .BaseBadge-badge {\n top: ","px;\n right: ","px;\n }\n"])),(e=>8*e.top||6),(e=>8*e.right||6)),ci=(0,a.Z)(d.Z)($o||($o=(0,r.Z)(["\n .component-header {\n display: flex;\n align-items: center;\n align-items: flex-end;\n cursor: pointer;\n }\n .component-name {\n color: #222;\n font-size: 16px;\n }\n .component-version {\n color: #999;\n font-size: 12px;\n margin-left: 4px;\n transform: translateY(-1px);\n }\n"])));function di(e){let{blocklet:n,onUpdate:t,getComponentUrl:r,...a}=e;const{t:l}=(0,o.useContext)(i.RD),{api:s,inService:g,info:v}=(0,ne.h6)(),{addDeletingDid:b,removeDeletingDid:R,matchDeletingDid:w}=(0,z.K)(),[E,T]=(0,o.useState)(!1),[N,L]=(0,o.useState)(null),[O,M]=(0,o.useState)(null),[G,q]=(0,o.useState)(!1),V=n&&n.structVersion!==U.APP_STRUCT_VERSION,[W,H]=(0,o.useState)(!1),K=[...n.children]||[];"gateway"!==n.meta.group&&K.unshift(n),w(K.map((e=>e.meta.did)));const J=async()=>{if(!E){T(!0);try{const{updateId:e,updateList:t}=(await s.checkComponentsForUpdates({input:{did:n.meta.did}})).preUpdateInfo||{};if(T(!1),!e)return void F.Z.info(l("blocklet.component.noUpdate"));const o=[];(0,B.forEachChildSync)(n,((e,n)=>{let{id:i,ancestors:r}=n;const a=t.find((e=>e.id===i));if(a){const n=r.slice(1).concat(e).map((e=>e.meta.title||e.meta.name)).join(" / "),t=(r[1]||e).meta.did;o.push({groupId:t,name:n,version:e.meta.version,newVersion:a.meta.version})}}));const i={};o.forEach((e=>{i[e.groupId]?e.disabled=!0:i[e.groupId]=!0})),L({params:{updateId:e},list:o,checks:i,hasChecks:!0})}catch(e){T(!1),F.Z.error((0,te.Z)(e))}}},Q=async(e,t)=>{b(e.meta.did);try{await s.deleteComponent({input:{did:e.meta.did,keepData:"keepData"===t,rootDid:n.meta.did}}),await(0,te._v)(800)}catch(o){F.Z.error((0,te.Z)(o)),R(e.meta.did)}},_=async e=>{try{await s.startBlocklet({input:{did:n.meta.did,componentDids:[e.meta.did]}}),await(0,te._v)(800)}catch(t){F.Z.error((0,te.Z)(t))}},X=async e=>{try{await s.stopBlocklet({input:{did:n.meta.did,componentDids:[e.meta.did]}}),await(0,te._v)(800)}catch(t){F.Z.error((0,te.Z)(t))}},$=async e=>{try{await s.restartBlocklet({input:{did:n.meta.did,componentDids:[e.meta.did]}}),await(0,te._v)(800)}catch(t){F.Z.error((0,te.Z)(t))}},ee=async e=>{try{await s.reloadBlocklet({input:{did:n.meta.did,componentDids:[e.meta.did]}}),await(0,te._v)(800),F.Z.success(l("blocklet.reloadSuccess"))}catch(t){F.Z.error((0,te.Z)(t))}};return(0,ti.Tb)(J),(0,Y.jsxs)(pi,{component:"div",...a,children:[(0,Y.jsxs)(d.Z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[(0,Y.jsxs)(d.Z,{className:"title",flexDirection:"row",display:"flex",alignItems:"center",style:{marginLeft:"1em"},children:[l("common.components"),!V&&(0,Y.jsx)(oe.Z,{permission:g?"":"mutate_blocklets",role:g?te.Wf:[],children:(0,Y.jsx)(pe,{children:(0,Y.jsx)(si,{top:1.2,right:.4,color:"error",badgeContent:"",variant:"dot",invisible:!W,children:(0,Y.jsxs)(D.Z,{disabled:E||(0,B.isInProgress)(n.status),color:"secondary",onClick:()=>{J()},"data-cy":"check-for-updates",children:[(0,Y.jsx)(d.Z,{mr:.5,display:"flex",children:E?(0,Y.jsx)(I.Z,{size:16}):(0,Y.jsx)(h.Z,{style:{fontSize:"1em"}})}),l("blocklet.component.checkUpdateTitle")]})})})})]}),(0,Y.jsx)(oe.Z,{permission:g?"":"mutate_blocklets",role:g?te.Wf:[],children:(0,Y.jsxs)(d.Z,{display:"flex",alignItems:"center",children:[(0,Y.jsx)(Lo,{children:e=>{let{open:t}=e;return(0,Y.jsxs)(D.Z,{disabled:E||(0,B.isInProgress)(n.status),variant:"text",color:"primary","data-cy":"add-rule",onClick:t,children:[(0,Y.jsx)(x.Z,{style:{fontSize:"1.3em",marginRight:4}}),l("router.rule.add.title")]})}}),!V&&(0,Y.jsx)(No,{blocklet:n,serverVersion:v.version,children:e=>{let{open:t}=e;return(0,Y.jsxs)(D.Z,{disabled:E||(0,B.isInProgress)(n.status),variant:"text",color:"primary","data-cy":"add-component",onClick:t,children:[(0,Y.jsx)(x.Z,{style:{fontSize:"1.3em",marginRight:4}}),l("blocklet.component.add")]})}}),!V&&(0,Y.jsx)(Me,{blocklet:n,ancestors:[],children:e=>{let{open:n}=e;return(0,Y.jsx)(k.Z,{title:"".concat(l("blocklet.component.container")).concat(l("common.config")),children:(0,Y.jsx)(f.Z,{onClick:n,size:"small",color:"primary",children:(0,Y.jsx)(y.Z,{style:{fontSize:18}})})},"config")}})]})})]}),null!==K&&void 0!==K&&K.length?(0,Y.jsxs)(d.Z,{mt:2,ml:{xs:"-12px",md:"-24px"},children:["gateway"!==n.meta.group&&(0,Y.jsx)(li,{blocklet:n,app:n,onRemove:Q,onStart:_,onStop:X,onReload:ee,onRestart:$,getComponentUrl:r},"0-".concat(n.meta.did)),n.children.map((e=>(0,Y.jsx)(li,{depth:1,blocklet:e,ancestors:[n],app:n,onRemove:Q,onStart:_,onStop:X,onReload:ee,onRestart:$,getComponentUrl:r},"1-".concat(e.meta.did))))]},"top-blocklet-".concat(n.meta.did)):(0,Y.jsx)(d.Z,{mt:8,children:(0,Y.jsx)(A.Z,{children:l("blocklet.component.noComponent")})}),!!n.site.rules.length&&(0,Y.jsx)(d.Z,{mt:0,ml:{xs:"-16px",md:"-28px"},children:(0,Y.jsx)(_o,{})}),!!N&&(0,Y.jsx)(c.Z,{open:!0,fullWidth:!0,children:(0,Y.jsxs)(d.Z,{paddingY:1.5,children:[(0,Y.jsx)(u.Z,{children:l("blocklet.component.updateTitle")}),(0,Y.jsx)(d.Z,{component:p.Z,py:4,children:N.list.map((e=>(0,Y.jsxs)(d.Z,{display:"flex",alignItems:"center",children:[(0,Y.jsx)(Z.Z,{checked:N.checks[e.groupId],onChange:n=>((e,n)=>{const{checked:t}=e.target;L((e=>{const o=Object.entries(e.checks).reduce(((e,o)=>{let[i,r]=o;return e[i]=n===i?t:r,e}),{}),i=Object.values(o).includes(!0);return{...e,checks:o,hasChecks:i}}))})(n,e.groupId),style:{marginLeft:e.disabled?16:0},defaultChecked:!0,disabled:e.disabled}),(0,Y.jsxs)(d.Z,{flexGrow:1,mt:3,children:[(0,Y.jsx)(d.Z,{item:!0,xs:8,children:e.name}),e.version&&(0,Y.jsxs)(j.ZP,{fontSize:"h6.fontSize",container:!0,spacing:2,alignItems:"center",children:[(0,Y.jsx)(j.ZP,{item:!0,xs:3,children:e.version}),(0,Y.jsx)(j.ZP,{item:!0,xs:1,children:(0,Y.jsx)(C.Z,{style:{fontSize:"0.9em"}})}),(0,Y.jsx)(j.ZP,{item:!0,xs:3,children:(0,Y.jsx)(d.Z,{color:"secondary.main",children:e.newVersion})})]})]},"".concat(e.name,"-").concat(e.newVersion))]},e.name)))}),(0,Y.jsxs)(m.Z,{style:{padding:"8px 24px 24px"},children:[(0,Y.jsx)(D.Z,{onClick:()=>{L(null)},children:l("common.cancel")}),(0,Y.jsxs)(D.Z,{onClick:e=>{e.stopPropagation(),(async()=>{if(!E)try{T(!0);const e=Object.keys(N.checks).filter((e=>N.checks[e])),t={updateId:N.params.updateId,rootDid:n.meta.did,selectedComponents:e};await s.upgradeComponents({input:t}),T(!1),L(null),H(null)}catch(e){T(!1),F.Z.error((0,te.Z)(e))}})()},color:"primary",disabled:E||!N.hasChecks,variant:"contained",autoFocus:!0,children:[E&&(0,Y.jsx)(I.Z,{size:16}),l("common.update")]})]})]})}),!!O&&(0,Y.jsx)(c.Z,{open:!0,fullWidth:!0,onClose:()=>M(!1),children:(0,Y.jsxs)(d.Z,{paddingY:1.5,children:[(0,Y.jsx)(u.Z,{children:l("common.configuration")}),(0,Y.jsx)(p.Z,{children:(0,Y.jsx)(d.Z,{py:2,children:(0,Y.jsx)(S.Z,{control:(0,Y.jsx)(P.Z,{checked:G,onChange:e=>q(!!e.target.checked)}),label:l("blocklet.component.showContainer")})})})]})})]})}di.propTypes={blocklet:s().object.isRequired,onUpdate:s().func,getComponentUrl:s().func},di.defaultProps={onUpdate:()=>{},getComponentUrl:()=>window.location.origin};const pi=a.Z.div(ei||(ei=(0,r.Z)(["\n .title {\n font-size: 1.2rem;\n font-weight: bold;\n }\n\n @keyframes showDelay {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n\n .component-item {\n animation: showDelay 0.75s ease 1;\n }\n"])));var ui=t(93677);function mi(e){const{locale:n}=(0,o.useContext)(i.RD),{blocklet:t,recommendedDomain:r}=(0,ui.y0)();return(0,Y.jsx)(di,{blocklet:t,getComponentUrl:e=>(0,te.vH)({blocklet:t,domain:{value:r},mountPoint:e,params:(0,te.f0)(t,n)}),...e})}mi.defaultProps={}},44543:(e,n,t)=>{const o=t(57156);e.exports=(e,n)=>o(e)===o(n)},92726:(e,n,t)=>{"use strict";t.d(n,{Z:()=>x});var o,i=t(71171),r=t(5057),a=t(55898),l=t.n(a),s=t(33518),c=t(67680),d=t(61533),p=t(74490),u=t(45267),m=t(46954),h=t(44067),f=t(96266);function x(e){let{actions:n,size:t,...o}=e;const[i,a]=(0,r.useState)(null),l=Boolean(i),s=e=>{try{e.stopPropagation(),e.preventDefault()}catch{}a(null)};return(0,f.jsxs)(g,{...o,children:[(0,f.jsx)(c.Z,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"actions-menu-icon",onClick:e=>{try{e.stopPropagation(),e.preventDefault()}catch{}a(e.currentTarget)},size:t,children:(0,f.jsx)(u.Z,{})}),(0,f.jsx)(d.Z,{id:"actions-menu","data-cy":"actions-menu",anchorEl:i,keepMounted:!0,open:l,onClose:s,PaperProps:{},children:n.map(((e,n)=>{if("function"===typeof e)return e({close:s});const{icon:t,text:o,onClick:i,disabled:a=!1,...l}=e;return(0,r.createElement)(p.Z,{...l,disabled:a,dense:!0,onClick:async e=>{await i(e),s()},key:n,"data-cy":"actions-menu-".concat(n)},(0,f.jsx)(m.Z,{style:{minWidth:24,marginRight:8},children:t}),(0,f.jsx)(h.Z,{primary:o}))}))})]})}x.propTypes={actions:l().array,size:l().oneOf(["small","medium","large"])},x.defaultProps={actions:[],size:"small"};const g=s.Z.div(o||(o=(0,i.Z)([""])))},31440:(e,n,t)=>{"use strict";t.d(n,{Z:()=>f});var o,i=t(71171),r=t(55898),a=t.n(r),l=t(85493),s=t(33518),c=t(68420),d=t(40265),p=t(44566),u=t(35432),m=t(96266);function h(e){let{...n}=e;return(0,m.jsxs)("div",{...n,style:{width:"100%"},children:[(0,m.jsx)("h3",{children:"End User License Agreement for Application"}),(0,m.jsxs)("p",{children:["Blocklet Server License Agreement ",u.COPYRIGHT_OWNER," version 2020-08-28"]}),(0,m.jsx)("p",{children:"BLOCKLET SERVER LICENSE AGREEMENT"}),(0,m.jsx)("p",{children:"\u6682\u65e0"})]})}function f(e){let{meta:n,onClickNext:t,handleDescEle:o}=e;const i=(0,l.useNavigate)(),{t:r,locale:a}=(0,c.PE)(),s=t||(()=>{i("/launch-blocklet/install".concat(window.location.search))});return(0,m.jsxs)(x,{children:[(0,m.jsx)("div",{className:"app-content",children:(0,m.jsx)("div",{className:"agreement",children:(0,m.jsx)("div",{className:"agreement-content",children:(0,m.jsx)(p.Z,{blockletMeta:{data:n},locale:a,handleDescEle:o})})})}),(0,m.jsx)("div",{className:"button-container","data-cy":"agree-all",children:(0,m.jsx)(d.Z,{onContinue:s,description:(0,m.jsx)(h,{}),texts:{listenName:r("launchBlocklet.license"),buttonNext:r("launchBlocklet.next")}})})]})}f.propTypes={meta:a().object.isRequired,onClickNext:a().func,handleDescEle:a().node},f.defaultProps={onClickNext:null,handleDescEle:""};const x=s.Z.div(o||(o=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n flex: 1;\n .app-content {\n padding: 2px 24px 24px;\n "," {\n padding-top: 10px;\n }\n width: 100%;\n flex: 1;\n letter-spacing: normal;\n }\n .agreement {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n border: 1px solid ",";\n border-radius: 12px;\n "," {\n margin-top: 24px;\n }\n "," {\n margin-top: 16px;\n }\n .agreement-content {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n font-size: 14px;\n overflow-y: auto;\n "," {\n padding: 0 24px;\n }\n "," {\n padding: 0 16px;\n }\n &:after {\n display: block;\n content: '';\n height: 24px;\n }\n }\n }\n .button-container {\n padding-top: 24px;\n padding-bottom: 34px;\n "," {\n padding-right: 24px;\n margin-left: auto;\n }\n "," {\n padding-top: 0;\n padding-bottom: 16px;\n }\n }\n"])),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.palette.grey[100]),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.breakpoints.down("md")))},80378:(e,n,t)=>{"use strict";t.d(n,{Z:()=>m});var o=t(55898),i=t.n(o),r=t(62681),a=t(72333),l=t(6352),s=t.n(l),c=t(35432),d=t(58238),p=t(14491);var u=t(96266);function m(e){let{blocklet:n,style:t,size:o,ancestors:i,...l}=e;const m=(0,d.h6)(),{logoUrl:h,inService:f}=function(e){var n;let{blocklet:t,ancestors:o=[]}=e;const i=(0,d.h6)(),{inService:r}=i,a="?v=".concat(null===t||void 0===t||null===(n=t.meta)||void 0===n?void 0:n.version).concat((0,p.XN)(null===t||void 0===t?void 0:t.status)?"~":"");let l=r?s()(p.zn,c.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle",a):s()(i.imgPrefix,"blocklet.png");if("registry"===t.source&&t.deployedFrom&&t.meta.logo)l=s()(t.deployedFrom,(0,p.lk)(t.meta.bundleDid,t.meta.logo),a);else{const e=window.env.apiPrefix||"/",n=o.concat(t),i=r?n.slice(1):n;l=s()(e,"/blocklet/logo-bundle".concat(i.map((e=>"/".concat(e.meta.did))).join("")),a)}return{logoUrl:l,inService:r}}({blocklet:n,ancestors:i}),{variant:x}=l,g=f?()=>{}:e=>{e.target.src="".concat(m.imgPrefix,"/blocklet.png")};let y=(0,u.jsx)("img",{src:h,onError:g,alt:n.meta.name,style:{width:o}});return n.meta.logo||(y=(0,u.jsx)(a.Z,{did:n.meta.did||"",responsive:!0})),(0,u.jsx)(r.Z,{variant:x||"square",style:Object.assign({backgroundColor:"transparent",width:o,height:o,borderRadius:10},t),...l,children:y})}m.propTypes={blocklet:i().object.isRequired,style:i().object,size:i().oneOfType([i().number,i().string]),ancestors:i().array},m.defaultProps={style:{},size:40,ancestors:[]}},74286:(e,n,t)=>{"use strict";t.d(n,{Z:()=>l});var o=t(55898),i=t.n(o),r=t(39948),a=t(96266);function l(e){let{depth:n}=e;return(0,a.jsx)(r.Z,{ml:Math.max(2*(n-1),0),sx:{borderBottom:1,borderColor:"rgba(0,0,0,0.12)"}},"group-collapse-box")}l.propTypes={depth:i().number},l.defaultProps={depth:1}},61813:(e,n,t)=>{"use strict";t.d(n,{Z:()=>w});var o=t(5057),i=t(55898),r=t.n(i),a=t(13128),l=t(44846),s=t(55372),c=t(11750),d=t(47020),p=t(20870),u=t(31089),m=t(71767),h=t(64886),f=t(43316),x=t(68420),g=t(28726),y=t(88574),v=t(38242),b=t(58238),j=t(73545),k=t(14491),C=t(4651),Z=t(17450),R=t(96266);function w(e){let{defaultUrl:n,onCancel:t,onSuccess:i,onError:r,mode:w,handleText:E}=e;const{api:S}=(0,b.h6)(),{api:P}=(0,j.T)(),[T,U]=(0,o.useState)(!1),[I,N]=(0,o.useState)(""),{t:D}=(0,x.PE)(),A={dist:{}},[B,L]=(0,o.useState)(n),[O,F]=(0,o.useState)(n?1:0),[z,M]=(0,o.useState)(A),[G,q]=(0,o.useState)(!1),[V,W]=(0,o.useState)({}),H="component"===w,K=!!H||!n,J=async()=>{M(A),N(null),U(!0);try{const e=decodeURIComponent(B.trim());try{new URL(e)}catch{throw new Error("Invalid URL")}const{meta:n,inStore:t,registryUrl:o}=await S.getBlockletMetaFromUrl({input:{url:e}});M(n),W({inStore:t,registryUrl:o,inputUrl:B.trim()})}catch(e){console.error(e);const n="Blocklet Install failed: ".concat((0,k.Z)(e));N(n),r(e)}finally{U(!1)}};(0,o.useEffect)((()=>{n&&J()}),[n]);const Y=[{name:D("common.name"),value:(0,v.getDisplayName)({meta:z},!0)},{name:D("common.version"),value:z.version},{name:D("common.did"),value:(0,R.jsx)(Z.Z,{did:z.did})},{name:D("common.author"),value:(0,k.rq)(z.author)},{name:D("blocklet.dist.downloadLink"),value:z.dist.tarball}],Q=[{label:D("blocklet.fromUrl.step0"),body:(0,R.jsx)(c.Z,{component:"div",children:(0,R.jsx)(d.Z,{label:D("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,style:{marginBottom:32},margin:"dense",helperText:D("blocklet.fromUrl.description"),value:B,onChange:e=>{N(null),L(e.target.value)},disabled:T,onKeyPress:e=>{"Enter"===e.key&&(e.preventDefault(),J(),F(1))}})}),cancel:D("common.cancel"),confirm:D("common.next"),onCancel:t,onConfirm:()=>{J(),F(1)}},{label:D("blocklet.fromUrl.step1"),body:T?(0,R.jsx)("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:(0,R.jsx)(l.Z,{})}):z.did?(0,R.jsx)("div",{style:{paddingLeft:"10%"},children:Y.map((e=>e.name===D("common.did")?(0,R.jsx)(h.Z,{valueComponent:"div",nameWidth:120,name:e.name,nameFormatter:()=>D("common.did"),children:e.value},e.name):(0,R.jsx)(h.Z,{valueComponent:"div",nameWidth:120,name:e.name,children:e.value},e.name)))}):null,cancel:D(K?"common.pre":"common.cancel"),confirm:(null===E||void 0===E?void 0:E.confirm)||D("blocklet.fromUrl.confirm"),onCancel:()=>{K?F((e=>e-1)):t()},onConfirm:()=>{(()=>{if(H)return i({meta:z,...V}),void t();U(!0),q(!0)})()}}],_=Q[O];return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(a.ZP,{title:(null===E||void 0===E?void 0:E.title)||D("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>_.onCancel(),showCloseButton:0===O,disableEscapeKeyDown:!0,open:!0,actions:(0,R.jsxs)(R.Fragment,{children:[_.cancel&&(0,R.jsx)(g.Z,{onClick:e=>{e.stopPropagation(),N(null),_.onCancel()},color:"inherit",children:_.cancel||D("common.cancel")}),(0,R.jsxs)(g.Z,{onClick:e=>{e.stopPropagation(),_.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:T||!B||I,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[T&&0===O&&(0,R.jsx)(l.Z,{size:16}),_.confirm]})]}),children:[K&&(0,R.jsx)(p.Z,{alternativeLabel:!0,activeStep:O,children:Q.map((e=>{let{label:n}=e;return(0,R.jsx)(u.Z,{children:(0,R.jsx)(m.Z,{children:n})},n)}))}),(0,R.jsx)(s.Z,{component:"div",style:{marginTop:24},children:_.body}),!!I&&(0,R.jsx)(y.Z,{type:"error",style:{width:"100%",marginTop:8},children:I})]}),z&&G&&(0,R.jsx)(f.Z,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:P.get,checkTimeout:3e5,onSuccess:()=>{U(!1),q(!1),i({meta:z,...V}),t()},extraParams:{title:z.title,wt:(0,C.iK)(z),blockletMetaUrl:decodeURIComponent(B.trim())},messages:{title:D("setup.keyPair.title"),scan:D("setup.keyPair.scan"),confirm:D("setup.keyPair.confirm"),success:D("setup.keyPair.success")},onClose:()=>{U(!1),q(!1)}})]})}w.propTypes={defaultUrl:r().string,onCancel:r().func.isRequired,onSuccess:r().func.isRequired,onError:r().func,mode:r().oneOf(["install","component"]),handleText:r().object},w.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}}},59375:(e,n,t)=>{"use strict";t.d(n,{Z:()=>b});var o,i=t(71171),r=t(5057),a=t(55898),l=t.n(a),s=t(6352),c=t.n(s),d=t(33518),p=t(92706),u=t.n(p),m=t(39948),h=t(52277),f=t.n(h),x=t(68420),g=t(96266);const y=(0,r.lazy)((()=>Promise.all([t.e(1294),t.e(4382)]).then(t.bind(t,23826)).then((e=>({default:e.Uploader}))))),v="/blocklet/logo/upload";function b(e){let{url:n,height:t,width:o,enabled:i,type:a,did:l,prefix:s,headers:d,onUploaded:p}=e;const{t:u}=(0,x.PE)(),h=(0,r.useRef)(null),b={cursor:i?"pointer":"default","&::after":{content:'"'.concat(u("common.switch"),'"')}};return(0,g.jsxs)(j,{id:"uploader-".concat(l,"-").concat(a),children:[(0,g.jsx)(y,{ref:h,popup:!0,onUploadFinish:()=>{var e;p(),null===(e=h.current)||void 0===e||e.close()},plugins:["ImageEditor"],apiPathProps:{uploader:c()(s,v,a,l),disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:["image/*",".jpg",".jpeg",".png",".gif",".svg"],maxFileSize:10485760,maxNumberOfFiles:1}},tusProps:{headers:d}}),(0,g.jsx)(m.Z,{className:f()("uploader-wrapper",i&&"enabled"),sx:b,onClick:()=>{var e;null===(e=h.current)||void 0===e||e.open()},children:(0,g.jsx)("img",{alt:"Logo",src:n,style:{height:t,width:o}})})]},"uploader-".concat(l,"-").concat(a))}b.propTypes={url:l().string.isRequired,type:l().oneOf(["square","rect","favicon"]).isRequired,did:l().string.isRequired,prefix:l().string.isRequired,headers:l().func,onUploaded:l().func,height:l().number,width:l().any,enabled:l().bool},b.defaultProps={height:80,width:"auto",enabled:!0,headers:()=>({}),onUploaded:u()};const j=d.Z.div(o||(o=(0,i.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"])))},32349:(e,n,t)=>{"use strict";t.d(n,{Z:()=>l});var o=t(55898),i=t.n(o),r=t(22228),a=t(96266);function l(e){let{mode:n,...t}=e;return"development"===n?(0,a.jsx)(r.Z,{type:"primary",...t,children:"DEV"}):null}l.propTypes={mode:i().string.isRequired}},73170:(e,n,t)=>{"use strict";t.d(n,{$7:()=>x,AP:()=>y});var o=t(92877),i=t(55898),r=t.n(i),a=t(19577),l=t(2478),s=t(44067),c=t(46954),d=t(42507),p=t(40184),u=t(28726),m=t(76223),h=t(68420),f=t(96266);const x={meta:r().object.isRequired,onCancel:r().func.isRequired},g=(0,o.Z)((()=>({dialogAuth:{padding:"0 0 24px !important","& .auth-title":{textAlign:"center !important",marginBottom:"4px !important"},"& .auth-tip--scan":{textAlign:"center !important"}},iconRoot:{minWidth:48}})));function y(e){let{action:n,onSelect:t,onNext:o}=e;const i=g(),{t:r}=(0,h.PE)(),x=[{action:"purchase",title:r("store.purchase.purchase.title"),description:r("store.purchase.purchase.description")},{action:"verify",title:r("store.purchase.verify.title"),description:r("store.purchase.verify.description")}];return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.Z,{className:i.tabPanel,children:x.map((e=>(0,f.jsxs)(l.ZP,{button:!0,selected:n===e.action,onClick:()=>t(e.action),children:[(0,f.jsx)(c.Z,{className:i.iconRoot,children:"purchase"===e.action?(0,f.jsx)(d.Z,{style:{color:"purchase"===n?m.Z.primary.main:"#AAA",fontSize:32}}):(0,f.jsx)(p.Z,{style:{color:"verify"===n?m.Z.primary.main:"#AAA",fontSize:32}})}),(0,f.jsx)(s.Z,{primary:e.title,secondary:e.description})]},e.action)))}),o&&(0,f.jsx)(u.Z,{fullWidth:!0,disabled:!n,variant:"contained",color:"primary",style:{marginTop:16},onClick:o,children:r("common.next")})]})}y.propTypes={action:r().oneOf(["both","purchase","verify"]).isRequired,onSelect:r().func.isRequired,onNext:r().func.isRequired}},51233:(e,n,t)=>{"use strict";t.d(n,{Rw:()=>d,fX:()=>c,sf:()=>p});var o=t(35432),i=t(44543),r=t.n(i),a=t(77277),l=t(32828);const s=(e,n)=>{if(e.type===o.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error("".concat(n("router.validation.redirectUrlRequired")));if(!e.redirectCode)return new Error("redirect ".concat(n("router.validation.redirectCodeRequired")))}else if(e.type===o.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(n("router.validation.didRequired"));return null},c=(e,n)=>{const t=s(e,n);return t||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(n("router.validation.pathPrefixTooLong",{length:150})):null:new Error(n("router.validation.pathPrefixCannotBeEmpty")))},d=e=>{let{params:n,blocklets:t,blocklet:o,locale:i="en"}=e;if(o){let e=(o.children||[]).find((e=>(0,l.default)(e.meta)&&r()(e.mountPoint,n.pathPrefix)));if("gateway"!==o.meta.group&&"/"===n.pathPrefix&&(e="/"),e)return{zh:"\u6302\u8f7d\u70b9 ".concat(n.pathPrefix," \u5df2\u5b58\u5728\uff0c\u8bf7\u4f7f\u7528\u5176\u4ed6\u6302\u8f7d\u70b9"),en:"The mount point ".concat(n.pathPrefix," already exist, please use another mount point")}[i]}const s=t.find((e=>e.meta.did===n.did));if(!s)return"";const c=s.meta.interfaces.find((e=>"web"===e.type));return c&&c.prefix!==a.BLOCKLET_DYNAMIC_PATH_PREFIX&&n.pathPrefix!==c.prefix?{zh:"\u8be5 blocklet \u53ea\u80fd\u6302\u8f7d\u5728 ".concat(c.prefix),en:"This blocklet can only be mounted on ".concat(c.prefix)}[i]:""},p=e=>{if(!e||"string"!==typeof e)return e;let n=e.trim();try{return n=n.toLowerCase(),n.startsWith("http://")||n.startsWith("https://")?new URL(n).hostname:n}catch(t){return console.error("format domain failed",t),n}}},50185:(e,n,t)=>{"use strict";t.d(n,{Z:()=>c});var o=t(5057),i=t(55898),r=t.n(i),a=t(12937),l=t(68420),s=t(96266);function c(e){let{children:n,...t}=e;const{t:i}=(0,o.useContext)(l.RD);return(0,s.jsx)(a.Z,{tip:i("common.copyTip"),copiedTip:i("common.copiedTip"),...t,children:n})}c.propTypes={children:r().any.isRequired}},71363:(e,n,t)=>{"use strict";t.d(n,{Z:()=>u});var o=t(55898),i=t.n(o),r=t(11750),a=t(47020),l=t(93938),s=t(68420),c=t(50185),d=t(70461),p=t(96266);function u(e){let{title:n,description:t,confirmPlaceholder:o,cancel:i,confirm:u,params:m,onCancel:h,onConfirm:f,keyName:x}=e;const{t:g}=(0,s.PE)(),y={title:()=>(0,p.jsxs)("div",{children:[n," (".concat(x,")")]}),description:(e,n)=>(0,p.jsxs)("div",{children:[(0,p.jsx)(l.Z,{severity:"warning",style:{width:"100%"},children:g("common.notice")}),(0,p.jsx)("div",{style:{marginTop:24,marginBottom:24},dangerouslySetInnerHTML:{__html:t}}),(0,p.jsxs)("div",{style:{marginBottom:24},children:[g("common.click"),"\uff1a",(0,p.jsx)(c.Z,{"data-cy":"click-copy",children:x})]}),(0,p.jsx)(r.Z,{component:"div",children:(0,p.jsx)(a.Z,{label:o,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:e.inputVal,onChange:t=>{var o;o={...e,inputVal:t.target.value,__disableConfirm:x!==t.target.value},n({...o,__disableConfirm:o.__disableConfirm})}})})]}),confirm:u,cancel:i,onConfirm:f,onCancel:h,params:{inputVal:"",__disableConfirm:!0,...m}};return(0,p.jsx)(d.Z,{title:y.title,description:y.description,confirm:y.confirm,cancel:y.cancel,params:y.params,onConfirm:y.onConfirm,onCancel:y.onCancel})}u.propTypes={title:i().any.isRequired,keyName:i().any.isRequired,description:i().any.isRequired,confirmPlaceholder:i().any.isRequired,cancel:i().string,confirm:i().string,params:i().object,onCancel:i().func,onConfirm:i().func.isRequired},u.defaultProps={onCancel:()=>{},cancel:"",confirm:"Confirm",params:{}}},28641:(e,n,t)=>{"use strict";t.d(n,{Z:()=>g});var o=t(5057),i=t(55898),r=t.n(i),a=t(39948),l=t(47020),s=t(44846),c=t(13727),d=t(56184),p=t(67680),u=t(35406),m=t(11875),h=t(95890),f=t(96266);const x=(e,n,t)=>null===e&&n&&t?"******":e?n?"******":e:"";function g(e){let{label:n,disabled:t,required:i,initialValue:r,onChange:g,placeholder:y,style:v,onSubmit:b,secure:j,triggers:k,formatterBeforeSubmit:C,...Z}=e;const[R,w]=(0,o.useState)(!1),[E,S]=(0,o.useState)(!1),[P,T]=(0,o.useState)(j&&"__encrypted__"===r?null:r),[U,I]=(0,o.useState)(P),N=async()=>{S(!0);try{if(!1===await b(U))I(P);else{let e=U;"function"===typeof C&&(e=C(U)),I(e),T(e)}}catch(e){I(P)}finally{S(!1),w(!1)}},D=R?(0,f.jsx)(l.Z,{style:{flex:1},fullWidth:!0,value:U,onChange:e=>{var n;n=e.target.value,I(n),g(n)},autoFocus:!0,size:"small",variant:"outlined",placeholder:y,onKeyDown:e=>{"Enter"===e.key&&N()},disabled:t,type:j?"password":"text",...Z}):(0,f.jsx)(a.Z,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:x(U,j,r)});return(0,f.jsx)(m.Z,{className:"form",style:v,children:(0,f.jsxs)(a.Z,{className:"form-item",children:[(0,f.jsxs)(a.Z,{className:"form-item-label",children:[n,i&&(0,f.jsx)(u.Z,{})]}),(0,f.jsxs)(a.Z,{className:"form-item-body",children:[(0,f.jsx)(a.Z,{className:"form-item-input",children:D}),(0,f.jsx)(a.Z,{className:"form-item-action",children:R?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(p.Z,{"data-cy":"schema-form-item-confirm",onClick:N,disabled:t||E,size:"large",children:E?(0,f.jsx)(s.Z,{size:24}):(0,f.jsx)(d.Z,{})}),(0,f.jsx)(p.Z,{"data-cy":"schema-form-item-cancel",onClick:()=>{I(P),w(!1)},disabled:t||E,size:"large",children:(0,f.jsx)(c.default,{})})]}):(0,f.jsx)(h.Z,{triggers:k,onEnterEdit:()=>w(!0),disabled:t})})]})]})})}g.propTypes={style:r().object,onSubmit:r().func,onChange:r().func,label:r().string,initialValue:r().string,placeholder:r().string,required:r().bool,disabled:r().bool,secure:r().bool,triggers:r().array,formatterBeforeSubmit:r().func},g.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",placeholder:"",required:!1,disabled:!1,secure:!1,triggers:[],formatterBeforeSubmit:null}},11875:(e,n,t)=>{"use strict";t.d(n,{Z:()=>l});var o,i=t(71171),r=t(33518),a=t(39948);const l=(0,r.Z)(a.Z)(o||(o=(0,i.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)=>{"use strict";t.d(n,{Z:()=>g});var o=t(5057),i=t(55898),r=t.n(i),a=t(24558),l=t(67680),s=t(56556),c=t(49127),d=t(49390),p=t(37200),u=t(25228),m=t(24202),h=t(74490),f=t(1733),x=t(96266);function g(e){let{triggers:n,onEnterEdit:t,disabled:i}=e;const r=o.useRef(null),[g,y]=o.useState(!1);return 0===n.length?(0,x.jsx)(l.Z,{"data-cy":"schema-form-item-edit",onClick:t,disabled:i,size:"large",children:(0,x.jsx)(a.Z,{})}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(c.Z,{variant:"outlined",ref:r,"aria-label":"split button",children:[(0,x.jsx)(s.Z,{"data-cy":"schema-form-item-edit",onClick:t,disabled:i,size:"large",children:(0,x.jsx)(a.Z,{})}),(0,x.jsx)(s.Z,{size:"small","aria-controls":g?"split-button-menu":void 0,"aria-expanded":g?"true":void 0,onClick:()=>{y((e=>!e))},children:(0,x.jsx)(d.Z,{})})]}),(0,x.jsx)(m.Z,{sx:{zIndex:9999},open:g,anchorEl:r.current,role:void 0,placement:"bottom-end",children:(0,x.jsx)(u.Z,{children:(0,x.jsx)(p.d,{onClickAway:e=>{r.current&&r.current.contains(e.target)||y(!1)},children:(0,x.jsx)(f.Z,{id:"split-button-menu",autoFocusItem:!0,children:n.map((e=>(0,x.jsx)(h.Z,{onClick:()=>{return n=e.handler,y(!1),void n();var n},children:e.title},e.key)))})})})})]})}g.propTypes={triggers:r().arrayOf(r().shape({key:r().string.isRequired,title:r().string.isRequired,handler:r().func.isRequired})),onEnterEdit:r().func.isRequired,disabled:r().bool.isRequired},g.defaultProps={triggers:[]}},35406:(e,n,t)=>{"use strict";t.d(n,{Z:()=>r});var o,i=t(71171);const r=t(33518).Z.span(o||(o=(0,i.Z)(["\n color: ",";\n &::before {\n content: '*';\n }\n"])),(e=>e.theme.palette.error.main))},8790:(e,n,t)=>{"use strict";t.d(n,{Z:()=>c});var o,i=t(71171),r=t(33518),a=t(55898),l=t.n(a),s=t(96266);function c(e){let{children:n,...t}=e;return(0,s.jsx)(d,{...t,children:n})}c.propTypes={children:l().any.isRequired};const d=r.Z.div(o||(o=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n\n .header {\n text-align: center;\n }\n\n .body {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-top: 30px;\n width: 100%;\n min-height: 200px;\n flex: 1;\n\n "," {\n padding: 24px;\n }\n\n "," {\n padding: 0 16px 16px;\n }\n }\n\n .footer {\n display: flex;\n justify-content: center;\n\n "," {\n padding-bottom: 34px;\n }\n\n "," {\n margin-top: auto;\n padding-bottom: 10px;\n }\n }\n"])),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.up("sm")),(e=>e.theme.breakpoints.down("md")))},22714:(e,n,t)=>{"use strict";t.d(n,{Z:()=>j});var o=t(5057),i=t(55898),r=t.n(i),a=t(92877),l=t(44846),s=t(13128),c=t(55372),d=t(11750),p=t(47020),u=t(2478),m=t(44919),h=t(68420),f=t(28726),x=t(88574),g=t(58238),y=t(14491),v=t(96266);const b=(0,a.Z)((e=>({addMenuItemRoot:{justifyContent:"center",color:e.palette.primary.main,lineHeight:"3.2"}})));function j(e){let{disabled:n,storeList:t,teamDid:i,onAdd:r}=e;const{api:a}=(0,g.h6)(),[j,k]=(0,o.useState)(!1),[C,Z]=(0,o.useState)(!0),[R,w]=(0,o.useState)(!1),[E,S]=(0,o.useState)(""),[P,T]=(0,o.useState)(""),{t:U}=(0,h.PE)(),I=b(),N=async()=>{k(!0);try{const{isNew:e,decoded:n}=(0,y.bQ)(E,t);if(!e)throw new Error(U("store.blockletRegistry.haveSameRegistry"));await a.addBlockletStore({input:{teamDid:i,url:n}}),r(n),w(!1)}catch(e){const n="".concat(U("store.blockletRegistry.addFailed")," ").concat((0,y.Z)(e));T(n)}finally{k(!1)}};return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(u.ZP,{button:!0,disabled:n,className:I.addMenuItemRoot,onClick:()=>{w(!0)},children:[(0,v.jsx)(m.Z,{font:!0}),(0,v.jsx)(d.Z,{variant:"inherit",children:U("store.blockletRegistry.addRegistry")})]}),(0,v.jsxs)(s.ZP,{title:U("store.blockletRegistry.addRegistry"),fullWidth:!0,maxWidth:"md",open:R,onClose:()=>w(!1),PaperProps:{style:{minHeight:"auto"}},actions:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(f.Z,{onClick:e=>{e.stopPropagation(),w(!1)},color:"inherit",children:U("common.cancel")}),(0,v.jsxs)(f.Z,{onClick:e=>{e.stopPropagation(),N()},color:"primary","data-cy":"install-blocklet-next-step",disabled:j||!E||C,variant:"contained",autoFocus:!0,children:[j&&(0,v.jsx)(l.Z,{size:16}),U("common.confirm")]})]}),children:[(0,v.jsx)("div",{style:{paddingTop:12,overflowY:"hidden"},children:(0,v.jsx)(c.Z,{component:"div",children:(0,v.jsx)(d.Z,{component:"div",children:(0,v.jsx)(p.Z,{label:U("store.blockletRegistry.registryUrl"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:E,onChange:e=>{T(null);let n=!1;e.target.value.trim()||(n=!0),e.target.value.trim()||T(U("store.blockletRegistry.registryUrlEmpty")),S(e.target.value),Z(n)},disabled:j,onKeyPress:e=>{"Enter"===e.key&&(e.preventDefault(),e.target.value.trim()?N():T(U("store.blockletRegistry.registryUrlEmpty")))}})})})}),!!P&&(0,v.jsx)(x.Z,{type:"error",style:{width:"100%"},children:P})]})]})}j.propTypes={teamDid:r().string.isRequired,disabled:r().bool,storeList:r().array,onAdd:r().func},j.defaultProps={disabled:!1,storeList:[],onAdd:()=>{}}},45170:(e,n,t)=>{"use strict";t.d(n,{Z:()=>j});var o=t(92877),i=t(11750),r=t(83580),a=t(94552),l=t(67680),s=t(55898),c=t.n(s),d=t(5057),p=t(96366),u=t(68420),m=t(47595),h=t(86229),f=t(58238),x=t(71363),g=t(14491),y=t(96266);function v(e){let{store:n,teamDid:t,onDelete:o}=e;const{api:i}=(0,f.h6)(),{t:r}=(0,u.PE)(),[a,s]=(0,d.useState)(!1),[c,v]=(0,d.useState)(null),b=(0,p.Z)(),j={keyName:n.url,title:r("store.blockletRegistry.deleteRegistry"),description:r("store.blockletRegistry.deleteDesc",{name:"<b>".concat(n.url,"</b>"),color:b.palette.error.main}),confirmPlaceholder:r("store.blockletRegistry.confirmDesc",{name:n.url}),confirm:r("common.delConfirm"),cancel:r("common.cancel"),onConfirm:async()=>{try{s(!0),await i.deleteBlockletStore({input:{teamDid:t,url:n.url}}),o&&"function"===typeof o&&o()}catch(e){h.Z.error("Remove Blocklet Store Error: ".concat((0,g.Z)(e)))}finally{s(!1),v(null)}},onCancel:()=>{s(!1),v(null)}};return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(l.Z,{disabled:a,onClick:e=>{e.stopPropagation(),v(j)},size:"large",children:(0,y.jsx)(m.default,{})}),c&&(0,y.jsx)(x.Z,{keyName:c.keyName,title:c.title,description:c.description,confirmPlaceholder:c.confirmPlaceholder,confirm:c.confirm,cancel:c.cancel,params:c.params,onConfirm:c.onConfirm,onCancel:c.onCancel})]})}v.propTypes={teamDid:c().string.isRequired,store:c().object.isRequired,onDelete:c().func},v.defaultProps={onDelete:()=>{}};const b=(0,o.Z)((()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},menuName:{display:"flex",flexDirection:"column",marginRight:"100px","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})));function j(e){let{teamDid:n,store:t,onDelete:o}=e;const s=b();return(0,y.jsxs)("div",{className:s.menuName,children:[(0,y.jsx)(i.Z,{component:"span",variant:"subtitle1",style:{fontWeight:"400"},children:t.name}),(0,y.jsx)(i.Z,{className:"url",component:"span",variant:"inherit",children:"".concat(t.url)}),(0,y.jsxs)(r.Z,{children:[(0,y.jsx)(l.Z,{onClick:e=>{e.stopPropagation(),window.open(t.url)},size:"large",children:(0,y.jsx)(a.Z,{})}),!t.protected&&(0,y.jsx)(v,{store:t,onDelete:o,teamDid:n})]})]})}j.propTypes={teamDid:c().string.isRequired,store:c().shape({name:c().string.isRequired,url:c().string.isRequired,protected:c().bool}).isRequired,onDelete:c().func},j.defaultProps={onDelete:()=>{}}},35918:(e,n,t)=>{"use strict";t.d(n,{Z:()=>y});var o=t(44919),i=t(42876),r=t(27773),a=t(11997),l=t(93734),s=t(76667),c=t(39293),d=t(36903),p=t(3422),u=t(92273),m=t(72906),h=t(57201),f=t(49390),x=t(33225),g=t(30770);const y={Add:o.Z,Check:i.default,Delete:r.default,Edit:s.default,Clear:a.default,DetailPanel:u.default,Filter:c.Z,FirstPage:d.default,LastPage:p.default,NextPage:u.default,PreviousPage:m.default,Search:h.default,ResetSearch:a.default,SortArrow:f.Z,Export:l.default,ThirdStateCheck:x.default,ViewColumn:g.default}},74782:(e,n,t)=>{"use strict";t.d(n,{Z:()=>r});var o,i=t(71171);const r=t(33518).Z.div(o||(o=(0,i.Z)(["\n .MuiPaper-root {\n box-shadow: none !important;\n border: none !important;\n border-radius: 0 !important;\n background: transparent;\n }\n .MuiToolbar-root {\n background: transparent;\n padding-left: 0;\n display: none;\n }\n\n &.show-pagination {\n .MuiTablePagination-toolbar {\n display: flex;\n }\n }\n\n .MuiTableHead-root th {\n min-width: 100px;\n background: transparent;\n }\n\n .MuiTable-root {\n overflow-y: hidden;\n }\n .MuiTableRow-root {\n border: none !important;\n }\n\n .MuiTableCell-root {\n padding-right: 16px;\n &:last-of-type {\n padding-right: 0;\n }\n }\n\n /* @material-table/core@next \u517c\u5bb9 mui v5, \u4f46 pagination \u6837\u5f0f\u4f3c\u4e4e\u6709\u4e9b\u95ee\u9898, \u6682\u5730\u5b9a\u5236\u4e0b\u9762\u7684\u6837\u5f0f\u4fee\u590d, \u540e\u9762\u8003\u8651\u5f03\u7528 material-table */\n .MuiTablePagination-selectLabel,\n .MuiTablePagination-displayedRows {\n display: none;\n }\n .MuiTypography-caption {\n display: inline-block;\n }\n .MuiTablePagination-selectLabel + .MuiInputBase-root {\n margin-right: 8px;\n }\n"])))},5952:(e,n,t)=>{"use strict";t.d(n,{K_:()=>o,WC:()=>i});const o="blocklet-add-component-registry",i="server-add-registry"},40736:(e,n,t)=>{"use strict";var o=t(71600);n.Z=void 0;var i=o(t(56930)),r=t(96266),a=(0,i.default)((0,r.jsx)("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward");n.Z=a},56184:(e,n,t)=>{"use strict";var o=t(71600);n.Z=void 0;var i=o(t(56930)),r=t(96266),a=(0,i.default)((0,r.jsx)("path",{d:"M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}),"Done");n.Z=a},34966:(e,n,t)=>{"use strict";var o=t(71600);n.Z=void 0;var i=o(t(56930)),r=t(96266),a=(0,i.default)((0,r.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}),"InfoOutlined");n.Z=a},33271:(e,n,t)=>{"use strict";var o=t(71600);n.Z=void 0;var i=o(t(56930)),r=t(96266),a=(0,i.default)((0,r.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"}),"Link");n.Z=a},48037:(e,n,t)=>{"use strict";var o=t(71600);n.Z=void 0;var i=o(t(56930)),r=t(96266),a=(0,i.default)((0,r.jsx)("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}),"SettingsOutlined");n.Z=a},99194:(e,n,t)=>{"use strict";var o=t(71600);n.Z=void 0;var i=o(t(56930)),r=t(96266),a=(0,i.default)((0,r.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3v7.12zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8h1.5z"}),"Update");n.Z=a},52277:(e,n)=>{var t;!function(){"use strict";var o={}.hasOwnProperty;function i(){for(var e=[],n=0;n<arguments.length;n++){var t=arguments[n];if(t){var r=typeof t;if("string"===r||"number"===r)e.push(t);else if(Array.isArray(t)){if(t.length){var a=i.apply(null,t);a&&e.push(a)}}else if("object"===r){if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]")){e.push(t.toString());continue}for(var l in t)o.call(t,l)&&t[l]&&e.push(l)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(t=function(){return i}.apply(n,[]))||(e.exports=t)}()},2078:(e,n,t)=>{var o=t(26849);e.exports=function(e){return o(e).toUpperCase()}},30278:(e,n,t)=>{var o=t(31104),i=t(43676);e.exports=function(e,n){return e&&e.length?i(e,o(n,2)):[]}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[7913],{77913:(e,n,s)=>{s.r(n),s.d(n,{default:()=>v});var o=s(5057),t=s(85493),a=s(39948),i=s(44846),c=s(35966),r=s(86229),l=s(43316),d=s(68420),u=s(8326),h=s(35432),p=s(5766),w=s(96266);const Z=(0,p.Z)((function(e){var n,s,p,Z;let{SessionContext:x,webWalletUrl:g,onSuccess:f}=e;const{api:v,session:P}=(0,o.useContext)(x),{t:m,locale:b}=(0,d.PE)(),k=(0,t.useNavigate)(),{searchParams:j}=new URL(window.location.href),C=j.get("redirect"),W={},_=j.get("componentId");return _&&(W.componentId=_),P.loading?(0,w.jsx)(c.Z,{children:(0,w.jsx)(i.Z,{})}):(0,w.jsx)(u.Z,{did:(null===(n=window)||void 0===n||null===(s=n.blocklet)||void 0===s?void 0:s.appPid)||(null===(p=window)||void 0===p||null===(Z=p.env)||void 0===Z?void 0:Z.appPid),children:(0,w.jsx)(a.Z,{sx:{width:"560px",maxWidth:"100%",height:"100%"},children:(0,w.jsx)(l.Z,{className:"connect",action:"exchange-passport",checkFn:v.get,checkTimeout:6e5,webWalletUrl:g,onSuccess:async(e,n)=>{f(e,n),await P.refresh(),r.Z.success(m("exchangePassport.success")),setTimeout((()=>{if(C){const e=decodeURIComponent(C);e.startsWith(h.WELLKNOWN_SERVICE_PATH_PREFIX)?k(e,{replace:!0}):window.location=e}else window.location=window.env.pathPrefix||window.env.apiPrefix||"/"}),3e3)},onError:e=>{r.Z.error(e.message)},locale:b,messages:{title:m("exchangePassport.dialog.title"),scan:m("exchangePassport.dialog.scan"),confirm:m("exchangePassport.dialog.confirm"),success:m("exchangePassport.dialog.success")},extraParams:W,extraContent:null})})})}));var x=s(75793),g=s(25339),f=s(74094);function v(){const{info:e}=(0,x.h6)(),n=(0,f.yP)(e);return(0,w.jsx)(Z,{SessionContext:g.B3,webWalletUrl:n,onSuccess:(e,n)=>{e.sessionToken&&(0,f.ZB)(n(e.sessionToken))}})}},5766:(e,n,s)=>{s.d(n,{Z:()=>k});var o=s(68420),t=s(77668),a=s.n(t),i=s(2586),c=s(56944),r=s(4465),l=s(43803),d=s(23930),u=s(82019),h=s(8590),p=s(61575),w=s(90233),Z=s(48170),x=s(69586),g=s(81059),f=s(55748),v=s(56906),P=s(64423);const m={ar:a()(r.Z),de:a()(l.Z),en:a()(i.Z),es:a()(d.Z),fr:a()(u.Z),hi:a()(h.Z),id:a()(p.Z),ja:a()(w.Z),ko:a()(Z.Z),pt:a()(x.Z),ru:a()(g.Z),th:a()(f.Z),vi:a()(v.Z),"zh-TW":a()(P.Z),zh:a()(c.Z)};var b=s(96266);function k(e){return function(n){return(0,b.jsx)(o.Iw,{translations:m,children:(0,b.jsx)(e,{...n})})}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[9249],{49249:(e,n,s)=>{s.r(n),s.d(n,{default:()=>k});var t,i=s(71171),a=s(5057),o=s(33518),c=s(85493),r=s(11750),l=s(76005),d=s(39948),u=s(35966),p=s(28726),h=s(43316),x=s(8326),Z=s(68420),v=s(35432),m=s(5766),g=s(70284),f=s(96266);const w=(0,o.Z)(u.Z)(t||(t=(0,i.Z)(["\n .header {\n text-align: center;\n margin-bottom: 8px;\n }\n\n .subheader {\n text-align: center;\n margin-bottom: 24px;\n }\n\n .login {\n padding: 24px;\n height: auto;\n min-height: 480px;\n display: flex;\n flex-direction: column;\n }\n\n .connect {\n background: #fafafa;\n }\n"]))),P=(0,m.Z)((function(e){var n,s,t,i;let{SessionContext:o,webWalletUrl:u}=e;const{api:m,session:P}=(0,a.useContext)(o),{t:b,locale:j}=(0,a.useContext)(Z.RD),[C,k]=(0,a.useState)(!1),W=(0,c.useNavigate)(),{setPassportId:N}=(0,g.Z)(),_={},{searchParams:E}=new URL(window.location.href),I=E.get("id");return I&&(_.id=I),(0,f.jsx)(w,{children:C?(0,f.jsx)("div",{className:"login",children:(0,f.jsx)("div",{className:"connect",children:(0,f.jsxs)(d.Z,{textAlign:"center",children:[(0,f.jsx)(d.Z,{mb:3,color:"success.main",children:(0,f.jsx)(l.Z,{style:{fontSize:60}})}),(0,f.jsx)(r.Z,{component:"p",variant:"body1",className:"subheader",children:b("issuePassport.dialog.success")}),(0,f.jsx)(d.Z,{mt:3,children:(0,f.jsx)(p.Z,{variant:"contained",color:"primary",onClick:()=>{var e;try{P.logout()}catch(n){}((null===(e=window.env)||void 0===e?void 0:e.apiPrefix)||"").startsWith(v.WELLKNOWN_SERVICE_PATH_PREFIX)?W("".concat(v.WELLKNOWN_SERVICE_PATH_PREFIX,"/login"),{replace:!0}):W("/",{replace:!0})},children:b("issuePassport.dialog.loginWithPassport")})})]})})}):(0,f.jsx)(x.Z,{did:(null===(n=window)||void 0===n||null===(s=n.blocklet)||void 0===s?void 0:s.appPid)||(null===(t=window)||void 0===t||null===(i=t.env)||void 0===i?void 0:i.appPid),children:(0,f.jsx)(d.Z,{sx:{width:"560px",maxWidth:"100%",height:"100%"},children:(0,f.jsx)(h.Z,{className:"connect",action:"issue-passport",forceConnected:!1,autoConnect:!1,checkFn:m.get,checkTimeout:6e5,webWalletUrl:u,onSuccess:e=>{null!==e&&void 0!==e&&e.passportId&&N(e.passportId),k(!0)},locale:j,messages:{title:b("issuePassport.title"),scan:b("issuePassport.description",{name:window.env.appName}),confirm:b("issuePassport.dialog.confirm"),success:b("issuePassport.dialog.success")},extraParams:_})})})})}));var b=s(75793),j=s(25339),C=s(74094);function k(){const{info:e}=(0,b.h6)(),n=(0,C.yP)(e);return(0,f.jsx)(P,{SessionContext:j.B3,webWalletUrl:n})}},5766:(e,n,s)=>{s.d(n,{Z:()=>j});var t=s(68420),i=s(77668),a=s.n(i),o=s(2586),c=s(56944),r=s(4465),l=s(43803),d=s(23930),u=s(82019),p=s(8590),h=s(61575),x=s(90233),Z=s(48170),v=s(69586),m=s(81059),g=s(55748),f=s(56906),w=s(64423);const P={ar:a()(r.Z),de:a()(l.Z),en:a()(o.Z),es:a()(d.Z),fr:a()(u.Z),hi:a()(p.Z),id:a()(h.Z),ja:a()(x.Z),ko:a()(Z.Z),pt:a()(v.Z),ru:a()(m.Z),th:a()(g.Z),vi:a()(f.Z),"zh-TW":a()(w.Z),zh:a()(c.Z)};var b=s(96266);function j(e){return function(n){return(0,b.jsx)(t.Iw,{translations:P,children:(0,b.jsx)(e,{...n})})}}},76005:(e,n,s)=>{var t=s(71600);n.Z=void 0;var i=t(s(56930)),a=s(96266),o=(0,i.default)((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");n.Z=o}}]);
|