diff --git a/comm.18cb7d7d190cdf75.js b/comm.3ae27e520563f23f.js similarity index 91% rename from comm.18cb7d7d190cdf75.js rename to comm.3ae27e520563f23f.js index 54f5e52a23b8..9e67e4b3e5fe 100644 --- a/comm.18cb7d7d190cdf75.js +++ b/comm.3ae27e520563f23f.js @@ -3966,6 +3966,10 @@ text-align: right; } + .ui--Param-BTreeMap-buttons { + text-align: right; + } + .ui--Param-composite { position: relative; @@ -4005,7 +4009,7 @@ > .ui--Params { margin-top: -0.25rem; } -`,h=s.memo((function({callName:e,children:t,className:n="",labelHash:h,labelSignature:p,mortality:g,onError:f,tip:b,value:x,withBorder:A,withExpander:v,withHash:w,withSignature:y}){const{t:j}=(0,u.$)(),[{hash:k,overrides:C,params:N,signature:E,signatureType:S,values:I},B]=(0,s.useState)({hash:null,params:[],signature:null,signatureType:null,values:[]});return(0,s.useEffect)((()=>{B(function(e,t,n,a){const s=a&&d.xS.includes(a)?d.fQ:void 0,i=e?.meta.args.map((({name:e,type:t})=>({name:e.toString(),type:(0,l.s)(t.toString())}))),r=e?.args.map((e=>({isValid:!0,value:e}))),o=t?e?.hash.toHex():null;let u=null,m=null;if(n&&function(e){return!!e.signature}(e)&&e.isSigned){const t=function(e){return e._raw?.signature?.multiSignature}(e);u=e.signature.toHex(),m=t instanceof c.x?t.type:null}return{hash:o,overrides:s,params:i,signature:u,signatureType:m,values:r}}(x,w,y,e))}),[e,x,w,y]),(0,a.jsx)(m,{className:`${n} ui--Call`,children:(0,a.jsxs)(r.ZP,{isDisabled:!0,onError:f,overrides:C,params:N,registry:x?.registry,values:I,withBorder:A,withExpander:v,children:[t,(0,a.jsxs)("div",{className:"ui--Call--toplevel",children:[k&&(0,a.jsx)(i.qG,{className:"hash",label:h||j("extrinsic hash"),value:k,withCopy:!0}),E&&(0,a.jsx)(i.qG,{className:"hash",label:p||j("signature {{type}}",{replace:{type:S?`(${S})`:""}}),value:E,withCopy:!0}),g&&(0,a.jsx)(i.qG,{className:"mortality",label:j("lifetime"),value:g}),b?.gtn(0)&&(0,a.jsx)(i.qG,{className:"tip",label:j("tip"),value:(0,a.jsx)(o.Z,{value:b})})]})]})})}))},15991:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(52322),s=n(2784),i=n(64348),r=n(98988);const o=s.memo((function({children:e,className:t="",isHeader:n,labelHash:o,labelSignature:l,mortality:c,onError:d,stringId:u,tip:m,value:h,withBorder:p,withHash:g,withSignature:f}){const b=(0,s.useMemo)((()=>h?.callIndex?h.registry.findMetaCall(h.callIndex):null),[h]);if(!b||!h)return null;const{meta:x,method:A,section:v}=b,w=`${v}.${A}`;return(0,a.jsx)("div",{className:`${t} ui--CallExpander`,children:(0,a.jsxs)(i.xH,{isHeader:n,isLeft:!0,summaryHead:(0,a.jsxs)(a.Fragment,{children:[u&&`#${u}: `,w]}),summaryMeta:x,children:[(0,a.jsx)(r.Z,{callName:w,labelHash:o,labelSignature:l,mortality:c,onError:d,tip:m,value:h,withBorder:p,withExpander:!0,withHash:g,withSignature:f}),e]})})}))},98202:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(52322),s=n(2784),i=n(64348),r=n(99834),o=n(89176),l=n(48653),c=n(37750);const d=s.memo((function({children:e,className:t="",eventName:n,value:d,withExpander:u}){const{t:m}=(0,c.$)(),h=d.data.names,p=d.typeDef.map(((e,t)=>({name:h?.[t]||void 0,type:e}))),g=d.data.map((e=>({isValid:!0,value:e}))),f=(0,s.useMemo)((()=>n&&l._o.includes(n)?l.fr:void 0),[n]),b=(0,s.useMemo)((()=>{if("contracts"===d.section&&"ContractExecution"===d.method&&2===d.data.length){const[e,t]=d.data;try{const n=(0,r.oX)(e.toString());if(n){const e=n.decodeEvent(t);return{...e,values:e.args.map((e=>({isValid:!0,value:e})))}}}catch(e){console.error(e)}}return null}),[d]);return(0,a.jsxs)("div",{className:`${t} ui--Event`,children:[e,(0,a.jsx)(o.ZP,{isDisabled:!0,overrides:f,params:p,registry:d.registry,values:g,withExpander:u,children:b&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.II,{isDisabled:!0,label:m("contract event"),value:b.event.identifier}),(0,a.jsx)(o.ZP,{isDisabled:!0,params:b.event.args,registry:d.registry,values:b.values})]})})]})}))},60404:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(52322),s=n(2784),i=n(64348),r=n(89176),o=n(6046),l=n(33403),c=n(1346),d=n(90778),u=n(54371),m=n(82671);const h=s.memo((function({className:e="",defaultArgs:t,defaultValue:n,isDisabled:i,isError:r,isPrivate:o,label:l,onChange:c,onEnter:d,onEscape:u,withLabel:m}){const h=(0,s.useCallback)((e=>c&&c({isValid:!!e,value:e})),[c]);return(0,a.jsx)(y,{className:e,defaultArgs:t,defaultValue:n,isDisabled:i,isError:r,isPrivate:o,label:l,onChange:h,onEnter:d,onEscape:u,withLabel:m})}));function p(e){return e.map((e=>({isValid:!0,value:e})))}function g(e,t,n){try{return n?.value?(a=n.value,(0,u.H)(a.section)&&(0,u.H)(a.method)?{initialArgs:p(n.value.args),initialValue:e.tx[n.value.section][n.value.method]}:function(e){return(0,m.K)(e.method)&&(0,u.H)(e.method.section)&&(0,u.H)(e.method.method)}(n.value)?{initialArgs:p(n.value.method.args),initialValue:e.tx[n.value.method.section][n.value.method.method]}:{initialValue:n.value}):{initialValue:t}}catch{return{initialValue:t}}var a}const f=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,withLabel:u}){const{api:m,apiDefaultTx:p}=(0,d.h)(),[{initialArgs:f,initialValue:b}]=(0,s.useState)((()=>g(m,p,t)));return(0,a.jsx)(h,{className:e,defaultArgs:f,defaultValue:b,isDisabled:n,isError:i,isPrivate:!1,label:r,onChange:o,onEnter:l,onEscape:c,withLabel:u})})),b={Call:f,OpaqueCall:s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,withLabel:u}){const{api:m,apiDefaultTxSudo:p}=(0,d.h)(),[{initialArgs:f,initialValue:b}]=(0,s.useState)((()=>g(m,p,t))),x=(0,s.useCallback)((({isValid:e,value:t})=>{let n=null;e&&t&&(n=t.method.toHex()),o&&o({isValid:e,value:n})}),[o]);return(0,a.jsx)(h,{className:e,defaultArgs:f,defaultValue:b,isDisabled:n,isError:i,isPrivate:!0,label:r,onChange:x,onEnter:l,onEscape:c,withLabel:u})})),Proposal:s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,withLabel:u}){const{api:m,apiDefaultTxSudo:p}=(0,d.h)(),[{initialArgs:f,initialValue:b}]=(0,s.useState)((()=>g(m,p,t))),x=(0,s.useCallback)((({isValid:e,value:t})=>{let n=null;e&&t&&(n=m.createType("Proposal",t)),o&&o({isValid:e,value:n})}),[m,o]);return(0,a.jsx)(h,{className:e,defaultArgs:f,defaultValue:b,isDisabled:n,isError:i,isPrivate:!0,label:r,onChange:x,onEnter:l,onEscape:c,withLabel:u})})),RuntimeCall:f};var x=n(48653);const A=(0,l.Z)({},b,x.fQ);function v({meta:e}){return e.args.map((({name:e,type:t,typeName:n})=>({name:e.toString(),type:{...(0,o.s)(t.toString()),...n.isSome?{typeName:n.unwrap().toString()}:{}}})))}function w(e,t=[]){return{extrinsic:{fn:e,params:v(e)},values:t}}const y=s.memo((function({defaultArgs:e,defaultValue:t,filter:n,isDisabled:o,isError:l,isPrivate:d,label:u,onChange:m,onEnter:h,onError:p,onEscape:g,withLabel:f}){const[{extrinsic:v,values:y},j]=(0,s.useState)((()=>w(t,e)));(0,s.useEffect)((()=>{const e=function(e,t){return t.reduce(((e,t)=>e&&!(0,c.o)(t)&&!(0,c.o)(t.value)&&t.isValid),e.length===t.length)}(v.params,y);let t;if(e)try{t=v.fn(...y.map((({value:e})=>e)))}catch(e){p&&p(e)}else p&&p(null);m(t)}),[v,m,p,y]);const k=(0,s.useMemo)((()=>x.xS.includes(`${v.fn.section}.${v.fn.method}`)?A:b),[v]),C=(0,s.useCallback)((e=>j((t=>e.section===t.extrinsic.fn.section&&e.method===t.extrinsic.fn.method?t:w(e)))),[]),N=(0,s.useCallback)((e=>j((({extrinsic:t})=>({extrinsic:t,values:e})))),[]),{fn:{method:E,section:S},params:I}=v;return(0,a.jsxs)("div",{className:"extrinsics--Extrinsic",children:[(0,a.jsx)(i.UT,{defaultValue:t,filter:n,isDisabled:o,isError:l,isPrivate:d,label:u,onChange:C,withLabel:f}),(0,a.jsx)(r.ZP,{onChange:N,onEnter:h,onEscape:g,overrides:k,params:I,values:y},`${S}.${E}:params`)]})}))},81661:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(52322),s=n(2784),i=n(54371),r=n(1346),o=n(14681),l=n(37750),c=n(15991);const d=s.memo((function({className:e="",idNumber:t,proposal:n}){const{t:s}=(0,l.$)(),d=(0,i.H)(t)||(0,r.o)(t)?t:(0,o.u)(t);return n?(0,a.jsx)("div",{className:`${e} ui--ProposedAction`,children:(0,a.jsx)(c.Z,{isHeader:!0,labelHash:s("preimage"),stringId:d,value:n,withHash:!0})}):(0,a.jsx)("div",{className:`${e} ui--ProposedAction`,children:(0,a.jsxs)("div",{children:[d?`#${d}: `:"",s("No execution details available for this proposal")]})})}))},40943:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(52322),s=n(2784),i=n(44294),r=n(48801),o=n.n(r),l=n(50005);const c=s.memo((function({className:e="",defaultValue:{value:t},isDisabled:n,isError:r,label:c,onChange:d,onEnter:u,onEscape:m,withLabel:h}){const[p,g]=(0,s.useState)(!1),[f]=(0,s.useState)((()=>new(o())((t||"0").toString()).toString(10))),b=(0,s.useCallback)((e=>{const t=!r&&!!e;d&&d({isValid:t,value:e}),g(t)}),[r,d]);return(0,a.jsx)(l.Z,{className:e,children:(0,a.jsx)(i.Z,{className:"full",defaultValue:f,isDisabled:n,isError:r||!p,label:c,onChange:b,onEnter:u,onEscape:m,withEllipsis:!0,withLabel:h})})}))},50005:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(52322);const s=n(2784).memo((function({children:e,className:t=""}){return(0,a.jsx)("div",{className:`${t} ui--row --relative`,children:e})}))},56301:(e,t,n)=>{n.d(t,{Z:()=>Xe});var a=n(52322),s=n(2784),i=n(6046),r=n(67557),o=n(1346),l=n(23601),c=n(6485),d=n(64348),u=n(69187),m=n(50005),h=n(27113),p=n(82671),g=n(89176);function f(e,t){return(0,i.s)(e.createType(t.type).toRawType()).sub}const b=s.memo((function(e){const{className:t="",defaultValue:n,isDisabled:i,isError:r,label:o,onChange:l,overrides:c,registry:u,type:b,withLabel:x}=e,[{options:A,subTypes:v}]=(0,s.useState)((()=>function(e,t){const n=f(e,t).filter((({name:e})=>!!e&&!e.startsWith("__Unused")));return{options:n.map((({name:e})=>({text:e,value:e}))),subTypes:n}}(u,b))),[w,y]=(0,s.useState)((()=>function(e,t,n,a){const s=f(e,t);return n.value instanceof h.x?[{name:n.value.type,type:s[n.value.index]}]:[{name:a[0].name,type:a[0]}]}(u,b,n,v))),[{initialEnum:j,initialParams:k},C]=(0,s.useState)((()=>function(e,t){if(e?.value){if(e.value instanceof h.x)return{initialEnum:e.value.type,initialParams:[{isValid:!0,value:e.value.inner}]};if((0,p.K)(e.value)){const[n,a]=Object.entries(e.value)[0];if(t.some((({value:e})=>e===n)))return{initialEnum:n,initialParams:[{isValid:!0,value:a}]}}}return{initialEnum:t[0]?.value,initialParams:void 0}}(n,A))),N=(0,s.useCallback)((e=>{if(i)return;const t=v.find((({name:t})=>t===e))||null;y(t?[{name:t.name,type:t}]:null),t&&C((e=>t.name===e.initialEnum?e:{initialEnum:e.initialEnum,initialParams:null}))}),[i,v]),E=(0,s.useCallback)((([{isValid:e,value:t}])=>{i||w&&l&&l({isValid:e,value:{[w[0].name||"unknown"]:t}})}),[w,i,l]);return(0,a.jsxs)(m.Z,{className:t,children:[(0,a.jsx)(d.Lt,{className:"full",defaultValue:j,isDisabled:i,isError:r,label:o,onChange:N,options:A,withEllipsis:!0,withLabel:x}),w&&(0,a.jsx)(g.ZP,{isDisabled:i,isError:r,onChange:E,overrides:c,params:w,registry:u,values:k})]})}));function x(e){if(e)try{return u.Nn.decodeAddress(e),!0}catch(e){console.error(e)}return!1}const A=s.memo((function(e){const{className:t="",defaultValue:{value:n},isDisabled:i,isError:r,label:o,onChange:l,type:c,withLabel:u}=e,[h]=(0,s.useState)((()=>n?.toString())),p=(0,s.useCallback)((e=>l&&l({isValid:x(e),value:e})),[l]);return"MultiAddress"!==c.type||i&&n&&"Id"===n.type?(0,a.jsx)(m.Z,{className:t,children:(0,a.jsx)(d.rp,{className:"full",defaultValue:h,isDisabled:i,isError:r,isInput:!0,label:o,onChange:p,placeholder:"5...",type:"allPlus",withEllipsis:!0,withLabel:u})}):(0,a.jsx)(b,{...e})}));var v=n(14681),w=n(12372);const y=s.memo((function({className:e="",defaultValue:{value:t},isDisabled:n,isError:i,label:r,onChange:l,onEnter:c,registry:u,type:h,withLabel:p}){const g=(0,s.useMemo)((()=>/^i\d*$/.test(h.type)),[h]),f=(0,s.useMemo)((()=>n?t instanceof u.createClass("AccountIndex")?t.toString():(0,v.u)(t):(0,w.G)(t||0).toString()),[n,u,t]),b=(0,s.useMemo)((()=>function(e,{type:t}){try{return e.createType(t).bitLength()}catch{return 32}}(u,h)),[u,h]),x=(0,s.useCallback)((e=>l&&l({isValid:!(0,o.o)(e),value:e})),[l]);return(0,a.jsx)(m.Z,{className:e,children:n?(0,a.jsx)(d.II,{className:"full",defaultValue:f,isDisabled:!0,label:r,withEllipsis:!0,withLabel:p}):(0,a.jsx)(d.Rn,{bitLength:b,className:"full",defaultValue:f,isError:i,isSigned:g,isZeroable:!0,label:r,onChange:x,onEnter:c,withLabel:p})})}));var j=n(40943),k=n(68774),C=n(5122);function N(e,t){if(e)try{return t?(0,k.u)(e):(0,C.Y)(e)}catch(e){console.error(e)}return!1}const E=s.memo((function(e){const{bytesLength:t,className:n="",defaultValue:{value:i},isDisabled:r,isError:o,label:l,onChange:c}=e,[u]=(0,s.useState)((()=>i?.toString())),h=(0,s.useCallback)((e=>c&&c({isValid:N(e,20===t),value:e})),[t,c]);return(0,a.jsx)(m.Z,{className:n,children:(0,a.jsx)(d.bm,{bytesLength:t,className:"full",defaultValue:u,forceIconType:20===t?"ethereum":"substrate",isDisabled:r,isError:o,label:l,noConvert:!0,onChange:h,placeholder:20===t?"0x1...":"5..."})})})),S=s.memo((function(e){return(0,a.jsx)(E,{...e,bytesLength:20})})),I=s.memo((function(e){return(0,a.jsx)(E,{...e,bytesLength:32})}));var B=n(47538),D=n(37750);const L=s.memo((function({className:e="",defaultValue:{value:t},isDisabled:n,isError:i,label:r,onChange:o,withLabel:l}){const{t:c}=(0,D.$)(),[u]=(0,s.useState)(t instanceof Boolean?t.valueOf():!!(0,B.j)(t)&&t),h=(0,s.useRef)([{text:c("No"),value:!1},{text:c("Yes"),value:!0}]),p=(0,s.useCallback)((e=>o&&o({isValid:!0,value:e})),[o]);return(0,a.jsx)(m.Z,{className:e,children:(0,a.jsx)(d.Lt,{className:"full",defaultValue:u,isDisabled:n,isError:i,label:r,onChange:p,options:h.current,withEllipsis:!0,withLabel:l})})}));var P=n(88311),V=n(48533),T=n(70676),M=n(64021),F=n(46610),z=n(56623),Z=n(55858),R=n(74076),$=n(94175);const H=()=>!0,q=(0,d.zo)(m.Z)` +`,h=s.memo((function({callName:e,children:t,className:n="",labelHash:h,labelSignature:p,mortality:g,onError:f,tip:b,value:x,withBorder:A,withExpander:v,withHash:w,withSignature:y}){const{t:j}=(0,u.$)(),[{hash:k,overrides:C,params:N,signature:E,signatureType:S,values:I},B]=(0,s.useState)({hash:null,params:[],signature:null,signatureType:null,values:[]});return(0,s.useEffect)((()=>{B(function(e,t,n,a){const s=a&&d.xS.includes(a)?d.fQ:void 0,i=e?.meta.args.map((({name:e,type:t})=>({name:e.toString(),type:(0,l.s)(t.toString())}))),r=e?.args.map((e=>({isValid:!0,value:e}))),o=t?e?.hash.toHex():null;let u=null,m=null;if(n&&function(e){return!!e.signature}(e)&&e.isSigned){const t=function(e){return e._raw?.signature?.multiSignature}(e);u=e.signature.toHex(),m=t instanceof c.x?t.type:null}return{hash:o,overrides:s,params:i,signature:u,signatureType:m,values:r}}(x,w,y,e))}),[e,x,w,y]),(0,a.jsx)(m,{className:`${n} ui--Call`,children:(0,a.jsxs)(r.ZP,{isDisabled:!0,onError:f,overrides:C,params:N,registry:x?.registry,values:I,withBorder:A,withExpander:v,children:[t,(0,a.jsxs)("div",{className:"ui--Call--toplevel",children:[k&&(0,a.jsx)(i.qG,{className:"hash",label:h||j("extrinsic hash"),value:k,withCopy:!0}),E&&(0,a.jsx)(i.qG,{className:"hash",label:p||j("signature {{type}}",{replace:{type:S?`(${S})`:""}}),value:E,withCopy:!0}),g&&(0,a.jsx)(i.qG,{className:"mortality",label:j("lifetime"),value:g}),b?.gtn(0)&&(0,a.jsx)(i.qG,{className:"tip",label:j("tip"),value:(0,a.jsx)(o.Z,{value:b})})]})]})})}))},15991:(e,t,n)=>{n.d(t,{Z:()=>o});var a=n(52322),s=n(2784),i=n(64348),r=n(98988);const o=s.memo((function({children:e,className:t="",isHeader:n,labelHash:o,labelSignature:l,mortality:c,onError:d,stringId:u,tip:m,value:h,withBorder:p,withHash:g,withSignature:f}){const b=(0,s.useMemo)((()=>h?.callIndex?h.registry.findMetaCall(h.callIndex):null),[h]);if(!b||!h)return null;const{meta:x,method:A,section:v}=b,w=`${v}.${A}`;return(0,a.jsx)("div",{className:`${t} ui--CallExpander`,children:(0,a.jsxs)(i.xH,{isHeader:n,isLeft:!0,summaryHead:(0,a.jsxs)(a.Fragment,{children:[u&&`#${u}: `,w]}),summaryMeta:x,children:[(0,a.jsx)(r.Z,{callName:w,labelHash:o,labelSignature:l,mortality:c,onError:d,tip:m,value:h,withBorder:p,withExpander:!0,withHash:g,withSignature:f}),e]})})}))},98202:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(52322),s=n(2784),i=n(64348),r=n(99834),o=n(89176),l=n(48653),c=n(37750);const d=s.memo((function({children:e,className:t="",eventName:n,value:d,withExpander:u}){const{t:m}=(0,c.$)(),h=d.data.names,p=d.typeDef.map(((e,t)=>({name:h?.[t]||void 0,type:e}))),g=d.data.map((e=>({isValid:!0,value:e}))),f=(0,s.useMemo)((()=>n&&l._o.includes(n)?l.fr:void 0),[n]),b=(0,s.useMemo)((()=>{if("contracts"===d.section&&"ContractExecution"===d.method&&2===d.data.length){const[e,t]=d.data;try{const n=(0,r.oX)(e.toString());if(n){const e=n.decodeEvent(t);return{...e,values:e.args.map((e=>({isValid:!0,value:e})))}}}catch(e){console.error(e)}}return null}),[d]);return(0,a.jsxs)("div",{className:`${t} ui--Event`,children:[e,(0,a.jsx)(o.ZP,{isDisabled:!0,overrides:f,params:p,registry:d.registry,values:g,withExpander:u,children:b&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.II,{isDisabled:!0,label:m("contract event"),value:b.event.identifier}),(0,a.jsx)(o.ZP,{isDisabled:!0,params:b.event.args,registry:d.registry,values:b.values})]})})]})}))},60404:(e,t,n)=>{n.d(t,{Z:()=>y});var a=n(52322),s=n(2784),i=n(64348),r=n(89176),o=n(6046),l=n(33403),c=n(1346),d=n(90778),u=n(54371),m=n(82671);const h=s.memo((function({className:e="",defaultArgs:t,defaultValue:n,isDisabled:i,isError:r,isPrivate:o,label:l,onChange:c,onEnter:d,onEscape:u,withLabel:m}){const h=(0,s.useCallback)((e=>c&&c({isValid:!!e,value:e})),[c]);return(0,a.jsx)(y,{className:e,defaultArgs:t,defaultValue:n,isDisabled:i,isError:r,isPrivate:o,label:l,onChange:h,onEnter:d,onEscape:u,withLabel:m})}));function p(e){return e.map((e=>({isValid:!0,value:e})))}function g(e,t,n){try{return n?.value?(a=n.value,(0,u.H)(a.section)&&(0,u.H)(a.method)?{initialArgs:p(n.value.args),initialValue:e.tx[n.value.section][n.value.method]}:function(e){return(0,m.K)(e.method)&&(0,u.H)(e.method.section)&&(0,u.H)(e.method.method)}(n.value)?{initialArgs:p(n.value.method.args),initialValue:e.tx[n.value.method.section][n.value.method.method]}:{initialValue:n.value}):{initialValue:t}}catch{return{initialValue:t}}var a}const f=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,withLabel:u}){const{api:m,apiDefaultTx:p}=(0,d.h)(),[{initialArgs:f,initialValue:b}]=(0,s.useState)((()=>g(m,p,t)));return(0,a.jsx)(h,{className:e,defaultArgs:f,defaultValue:b,isDisabled:n,isError:i,isPrivate:!1,label:r,onChange:o,onEnter:l,onEscape:c,withLabel:u})})),b={Call:f,OpaqueCall:s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,withLabel:u}){const{api:m,apiDefaultTxSudo:p}=(0,d.h)(),[{initialArgs:f,initialValue:b}]=(0,s.useState)((()=>g(m,p,t))),x=(0,s.useCallback)((({isValid:e,value:t})=>{let n=null;e&&t&&(n=t.method.toHex()),o&&o({isValid:e,value:n})}),[o]);return(0,a.jsx)(h,{className:e,defaultArgs:f,defaultValue:b,isDisabled:n,isError:i,isPrivate:!0,label:r,onChange:x,onEnter:l,onEscape:c,withLabel:u})})),Proposal:s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,withLabel:u}){const{api:m,apiDefaultTxSudo:p}=(0,d.h)(),[{initialArgs:f,initialValue:b}]=(0,s.useState)((()=>g(m,p,t))),x=(0,s.useCallback)((({isValid:e,value:t})=>{let n=null;e&&t&&(n=m.createType("Proposal",t)),o&&o({isValid:e,value:n})}),[m,o]);return(0,a.jsx)(h,{className:e,defaultArgs:f,defaultValue:b,isDisabled:n,isError:i,isPrivate:!0,label:r,onChange:x,onEnter:l,onEscape:c,withLabel:u})})),RuntimeCall:f};var x=n(48653);const A=(0,l.Z)({},b,x.fQ);function v({meta:e}){return e.args.map((({name:e,type:t,typeName:n})=>({name:e.toString(),type:{...(0,o.s)(t.toString()),...n.isSome?{typeName:n.unwrap().toString()}:{}}})))}function w(e,t=[]){return{extrinsic:{fn:e,params:v(e)},values:t}}const y=s.memo((function({defaultArgs:e,defaultValue:t,filter:n,isDisabled:o,isError:l,isPrivate:d,label:u,onChange:m,onEnter:h,onError:p,onEscape:g,withLabel:f}){const[{extrinsic:v,values:y},j]=(0,s.useState)((()=>w(t,e)));(0,s.useEffect)((()=>{const e=function(e,t){return t.reduce(((e,t)=>e&&!(0,c.o)(t)&&!(0,c.o)(t.value)&&t.isValid),e.length===t.length)}(v.params,y);let t;if(e)try{t=v.fn(...y.map((({value:e})=>e)))}catch(e){p&&p(e)}else p&&p(null);m(t)}),[v,m,p,y]);const k=(0,s.useMemo)((()=>x.xS.includes(`${v.fn.section}.${v.fn.method}`)?A:b),[v]),C=(0,s.useCallback)((e=>j((t=>e.section===t.extrinsic.fn.section&&e.method===t.extrinsic.fn.method?t:w(e)))),[]),N=(0,s.useCallback)((e=>j((({extrinsic:t})=>({extrinsic:t,values:e})))),[]),{fn:{method:E,section:S},params:I}=v;return(0,a.jsxs)("div",{className:"extrinsics--Extrinsic",children:[(0,a.jsx)(i.UT,{defaultValue:t,filter:n,isDisabled:o,isError:l,isPrivate:d,label:u,onChange:C,withLabel:f}),(0,a.jsx)(r.ZP,{onChange:N,onEnter:h,onEscape:g,overrides:k,params:I,values:y},`${S}.${E}:params`)]})}))},81661:(e,t,n)=>{n.d(t,{Z:()=>d});var a=n(52322),s=n(2784),i=n(54371),r=n(1346),o=n(14681),l=n(37750),c=n(15991);const d=s.memo((function({className:e="",idNumber:t,proposal:n}){const{t:s}=(0,l.$)(),d=(0,i.H)(t)||(0,r.o)(t)?t:(0,o.u)(t);return n?(0,a.jsx)("div",{className:`${e} ui--ProposedAction`,children:(0,a.jsx)(c.Z,{isHeader:!0,labelHash:s("preimage"),stringId:d,value:n,withHash:!0})}):(0,a.jsx)("div",{className:`${e} ui--ProposedAction`,children:(0,a.jsxs)("div",{children:[d?`#${d}: `:"",s("No execution details available for this proposal")]})})}))},40943:(e,t,n)=>{n.d(t,{Z:()=>c});var a=n(52322),s=n(2784),i=n(44294),r=n(48801),o=n.n(r),l=n(50005);const c=s.memo((function({className:e="",defaultValue:{value:t},isDisabled:n,isError:r,label:c,onChange:d,onEnter:u,onEscape:m,withLabel:h}){const[p,g]=(0,s.useState)(!1),[f]=(0,s.useState)((()=>new(o())((t||"0").toString()).toString(10))),b=(0,s.useCallback)((e=>{const t=!r&&!!e;d&&d({isValid:t,value:e}),g(t)}),[r,d]);return(0,a.jsx)(l.Z,{className:e,children:(0,a.jsx)(i.Z,{className:"full",defaultValue:f,isDisabled:n,isError:r||!p,label:c,onChange:b,onEnter:u,onEscape:m,withEllipsis:!0,withLabel:h})})}))},50005:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(52322);const s=n(2784).memo((function({children:e,className:t=""}){return(0,a.jsx)("div",{className:`${t} ui--row --relative`,children:e})}))},44605:(e,t,n)=>{n.d(t,{Z:()=>nt});var a=n(52322),s=n(2784),i=n(6046),r=n(67557),o=n(1346),l=n(23601),c=n(6485),d=n(64348),u=n(69187),m=n(50005),h=n(27113),p=n(82671),g=n(89176);function f(e,t){return(0,i.s)(e.createType(t.type).toRawType()).sub}const b=s.memo((function(e){const{className:t="",defaultValue:n,isDisabled:i,isError:r,label:o,onChange:l,overrides:c,registry:u,type:b,withLabel:x}=e,[{options:A,subTypes:v}]=(0,s.useState)((()=>function(e,t){const n=f(e,t).filter((({name:e})=>!!e&&!e.startsWith("__Unused")));return{options:n.map((({name:e})=>({text:e,value:e}))),subTypes:n}}(u,b))),[w,y]=(0,s.useState)((()=>function(e,t,n,a){const s=f(e,t);return n.value instanceof h.x?[{name:n.value.type,type:s[n.value.index]}]:[{name:a[0].name,type:a[0]}]}(u,b,n,v))),[{initialEnum:j,initialParams:k},C]=(0,s.useState)((()=>function(e,t){if(e?.value){if(e.value instanceof h.x)return{initialEnum:e.value.type,initialParams:[{isValid:!0,value:e.value.inner}]};if((0,p.K)(e.value)){const[n,a]=Object.entries(e.value)[0];if(t.some((({value:e})=>e===n)))return{initialEnum:n,initialParams:[{isValid:!0,value:a}]}}}return{initialEnum:t[0]?.value,initialParams:void 0}}(n,A))),N=(0,s.useCallback)((e=>{if(i)return;const t=v.find((({name:t})=>t===e))||null;y(t?[{name:t.name,type:t}]:null),t&&C((e=>t.name===e.initialEnum?e:{initialEnum:e.initialEnum,initialParams:null}))}),[i,v]),E=(0,s.useCallback)((([{isValid:e,value:t}])=>{i||w&&l&&l({isValid:e,value:{[w[0].name||"unknown"]:t}})}),[w,i,l]);return(0,a.jsxs)(m.Z,{className:t,children:[(0,a.jsx)(d.Lt,{className:"full",defaultValue:j,isDisabled:i,isError:r,label:o,onChange:N,options:A,withEllipsis:!0,withLabel:x}),w&&(0,a.jsx)(g.ZP,{isDisabled:i,isError:r,onChange:E,overrides:c,params:w,registry:u,values:k})]})}));function x(e){if(e)try{return u.Nn.decodeAddress(e),!0}catch(e){console.error(e)}return!1}const A=s.memo((function(e){const{className:t="",defaultValue:{value:n},isDisabled:i,isError:r,label:o,onChange:l,type:c,withLabel:u}=e,[h]=(0,s.useState)((()=>n?.toString())),p=(0,s.useCallback)((e=>l&&l({isValid:x(e),value:e})),[l]);return"MultiAddress"!==c.type||i&&n&&"Id"===n.type?(0,a.jsx)(m.Z,{className:t,children:(0,a.jsx)(d.rp,{className:"full",defaultValue:h,isDisabled:i,isError:r,isInput:!0,label:o,onChange:p,placeholder:"5...",type:"allPlus",withEllipsis:!0,withLabel:u})}):(0,a.jsx)(b,{...e})}));var v=n(14681),w=n(12372);const y=s.memo((function({className:e="",defaultValue:{value:t},isDisabled:n,isError:i,label:r,onChange:l,onEnter:c,registry:u,type:h,withLabel:p}){const g=(0,s.useMemo)((()=>/^i\d*$/.test(h.type)),[h]),f=(0,s.useMemo)((()=>n?t instanceof u.createClass("AccountIndex")?t.toString():(0,v.u)(t):(0,w.G)(t||0).toString()),[n,u,t]),b=(0,s.useMemo)((()=>function(e,{type:t}){try{return e.createType(t).bitLength()}catch{return 32}}(u,h)),[u,h]),x=(0,s.useCallback)((e=>l&&l({isValid:!(0,o.o)(e),value:e})),[l]);return(0,a.jsx)(m.Z,{className:e,children:n?(0,a.jsx)(d.II,{className:"full",defaultValue:f,isDisabled:!0,label:r,withEllipsis:!0,withLabel:p}):(0,a.jsx)(d.Rn,{bitLength:b,className:"full",defaultValue:f,isError:i,isSigned:g,isZeroable:!0,label:r,onChange:x,onEnter:c,withLabel:p})})}));var j=n(40943),k=n(68774),C=n(5122);function N(e,t){if(e)try{return t?(0,k.u)(e):(0,C.Y)(e)}catch(e){console.error(e)}return!1}const E=s.memo((function(e){const{bytesLength:t,className:n="",defaultValue:{value:i},isDisabled:r,isError:o,label:l,onChange:c}=e,[u]=(0,s.useState)((()=>i?.toString())),h=(0,s.useCallback)((e=>c&&c({isValid:N(e,20===t),value:e})),[t,c]);return(0,a.jsx)(m.Z,{className:n,children:(0,a.jsx)(d.bm,{bytesLength:t,className:"full",defaultValue:u,forceIconType:20===t?"ethereum":"substrate",isDisabled:r,isError:o,label:l,noConvert:!0,onChange:h,placeholder:20===t?"0x1...":"5..."})})})),S=s.memo((function(e){return(0,a.jsx)(E,{...e,bytesLength:20})})),I=s.memo((function(e){return(0,a.jsx)(E,{...e,bytesLength:32})}));var B=n(47538),D=n(37750);const L=s.memo((function({className:e="",defaultValue:{value:t},isDisabled:n,isError:i,label:r,onChange:o,withLabel:l}){const{t:c}=(0,D.$)(),[u]=(0,s.useState)(t instanceof Boolean?t.valueOf():!!(0,B.j)(t)&&t),h=(0,s.useRef)([{text:c("No"),value:!1},{text:c("Yes"),value:!0}]),p=(0,s.useCallback)((e=>o&&o({isValid:!0,value:e})),[o]);return(0,a.jsx)(m.Z,{className:e,children:(0,a.jsx)(d.Lt,{className:"full",defaultValue:u,isDisabled:n,isError:i,label:r,onChange:p,options:h.current,withEllipsis:!0,withLabel:l})})}));var P=n(74420),V=n(24107),T=n(30590);const M=s.memo((function({children:e,className:t="",isOuter:n,label:s,labelExtra:i,size:r="full",withLabel:o}){return(0,a.jsxs)(m.Z,{className:t,children:[(0,a.jsx)(d.jN,{className:r,isOuter:!0,label:s,labelExtra:i,withEllipsis:!0,withLabel:o,children:!n&&e}),n&&e]})}));const F=(0,n(11677).e)("useParamDefs",(function(e,t){return(0,s.useMemo)((()=>function(e,t){const n=function(e,t){try{return(0,i.s)(e.createType(t.type).toRawType())}catch{return t}}(e,t);return n.sub?(Array.isArray(n.sub)?n.sub:[n.sub]).map((e=>({length:n.length,name:e.name,type:e}))):[]}(e,t)),[e,t])}));function z([{name:e,type:t}],n){return{name:`${n}: ${e||t.type}`,type:t}}function Z(e,t,n){if(t.length===n)return t;const a=[];for(let t=0;tfunction({isValid:e,value:t}){return e&&(0,V.c)(t)&&t instanceof P.P?[...t.entries()].map((([e,t])=>({isValid:!0,value:[{isValid:!0,value:e},{isValid:!0,value:t}]}))):[]}(t))),[x,A]=(0,s.useState)((()=>f.length)),[v,w]=(0,s.useState)((()=>Z(p,[],x)));(0,s.useEffect)((()=>{p.length&&w((e=>Z(p,e,n?f.length:x)))}),[x,f,n,p]),(0,s.useEffect)((()=>{!n&&p.length&&b((e=>{if(e.length===x)return e;for(;e.length{const e=new Map;let t=!0;for(const n of f){const[a,s]=n.value;e.has(a)&&(t=!1,console.error("BTreeMap: Duplicate key ",a)),e.set(a,s),t=t&&n.isValid}r&&r({isValid:t,value:e})}),[f,r]);const y=(0,s.useCallback)((()=>A((e=>e+1))),[]),j=(0,s.useCallback)((()=>A((e=>e-1))),[]);return(0,a.jsxs)(M,{className:e,isOuter:!0,label:i,withLabel:m,children:[!n&&(0,a.jsxs)("div",{className:"ui--Param-BTreeMap-buttons",children:[(0,a.jsx)(d.zx,{icon:"plus",label:h("Add item"),onClick:y}),(0,a.jsx)(d.zx,{icon:"minus",isDisabled:0===f.length,label:h("Remove item"),onClick:j})]}),(0,a.jsx)(g.ZP,{isDisabled:n,onChange:b,overrides:l,params:v,registry:c,values:f})]})}));var $=n(88311),H=n(48533),q=n(70676),U=n(64021),Q=n(46610),O=n(56623),W=n(55858),G=n(74076),J=n(94175);const K=()=>!0,Y=(0,d.zo)(m.Z)` .ui--InputAddressSimpleIcon { background: #eee; border: 1px solid #888; @@ -4014,7 +4018,7 @@ position: absolute; top: 8px; } -`,U=s.memo((function({asHex:e,children:t,className:n="",defaultValue:{value:i},isDisabled:r,isError:o,label:l,labelExtra:c,length:u=-1,onChange:m,onEnter:h,onEscape:p,size:g="full",validate:f=H,withCopy:b,withLabel:x,withLength:A}){const{t:v}=(0,D.$)(),[w]=(0,s.useState)((()=>{if(i){const e=(0,F.Y)(i);return(0,T._)(e)?(0,z.z)(e):(0,Z.c)(e)}})),[{isAddress:y,isValid:j,lastValue:k},C]=(0,s.useState)((()=>({isAddress:!1,isValid:(0,R.vq)(w)||(0,T._)(w)}))),N=(0,s.useCallback)((t=>{let[n,a,s]=function(e){if("0x"===e)return[!0,!1,new Uint8Array([])];if(e.startsWith("0x"))try{return[!0,!1,(0,V.G)(e)]}catch{return[!1,!1,new Uint8Array([])]}try{return[!0,!0,(0,$.m)(e)]}catch{}return(0,T._)(e)?[!0,!1,(0,M.d)(e)]:["0x"===e,!1,new Uint8Array([])]}(t);n=n&&f(s)&&(-1!==u?s.length===u:0!==s.length||"0x"===t),A&&n&&(s=(0,P.N)(s)),m&&m({isValid:n,value:e?(0,Z.c)(s):s}),C({isAddress:a,isValid:n,lastValue:s})}),[e,u,m,f,A]);return(0,a.jsx)(q,{className:n,children:(0,a.jsxs)(d.II,{className:g,defaultValue:w,isAction:!!t,isDisabled:r,isError:o||!j,label:l,labelExtra:c,onChange:N,onEnter:h,onEscape:p,placeholder:v("0x prefixed hex, e.g. 0x1234 or ascii data"),type:"text",withEllipsis:!0,withLabel:x,children:[t,b&&(0,a.jsx)(d.qi,{value:w}),y&&(0,a.jsx)(d.k,{className:"ui--InputAddressSimpleIcon",size:32,value:k})]})})})),Q=s.memo((function({className:e="",isDisabled:t,isError:n=!1,label:s,labelExtra:i,onChange:r,placeholder:o,withLabel:l}){return(0,a.jsx)(m.Z,{className:e,children:(0,a.jsx)(d.ht,{isDisabled:t,isError:n,label:s,labelExtra:i,onChange:r,placeholder:o,withEllipsis:!0,withLabel:l})})})),O=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,name:o,onChange:l,onEnter:c,onEscape:u,type:m,withLabel:h}){const{t:p}=(0,D.$)(),[g,f]=(0,s.useState)(!1),[b,x]=(0,s.useState)(!1),A=(0,s.useCallback)((e=>{const t=0!==e.length;l&&l({isValid:t,value:(0,P.N)(e)}),f(t)}),[l]),v=!n&&(0,a.jsx)(d.ZD,{label:p("file upload"),onChange:x,value:b});return(0,a.jsx)("div",{className:`${e} --relative`,children:!n&&b?(0,a.jsx)(Q,{isDisabled:n,isError:i||!g,label:r,labelExtra:v,onChange:A,withLabel:h}):(0,a.jsx)(U,{defaultValue:t,isDisabled:n,isError:i,label:r,labelExtra:v,length:-1,name:o,onChange:l,onEnter:c,onEscape:u,type:m,withLabel:h,withLength:!0})})}));var W=n(98988),G=n(83488);const J=(0,d.zo)(m.Z)` +`,X=s.memo((function({asHex:e,children:t,className:n="",defaultValue:{value:i},isDisabled:r,isError:o,label:l,labelExtra:c,length:u=-1,onChange:m,onEnter:h,onEscape:p,size:g="full",validate:f=K,withCopy:b,withLabel:x,withLength:A}){const{t:v}=(0,D.$)(),[w]=(0,s.useState)((()=>{if(i){const e=(0,Q.Y)(i);return(0,q._)(e)?(0,O.z)(e):(0,W.c)(e)}})),[{isAddress:y,isValid:j,lastValue:k},C]=(0,s.useState)((()=>({isAddress:!1,isValid:(0,G.vq)(w)||(0,q._)(w)}))),N=(0,s.useCallback)((t=>{let[n,a,s]=function(e){if("0x"===e)return[!0,!1,new Uint8Array([])];if(e.startsWith("0x"))try{return[!0,!1,(0,H.G)(e)]}catch{return[!1,!1,new Uint8Array([])]}try{return[!0,!0,(0,J.m)(e)]}catch{}return(0,q._)(e)?[!0,!1,(0,U.d)(e)]:["0x"===e,!1,new Uint8Array([])]}(t);n=n&&f(s)&&(-1!==u?s.length===u:0!==s.length||"0x"===t),A&&n&&(s=(0,$.N)(s)),m&&m({isValid:n,value:e?(0,W.c)(s):s}),C({isAddress:a,isValid:n,lastValue:s})}),[e,u,m,f,A]);return(0,a.jsx)(Y,{className:n,children:(0,a.jsxs)(d.II,{className:g,defaultValue:w,isAction:!!t,isDisabled:r,isError:o||!j,label:l,labelExtra:c,onChange:N,onEnter:h,onEscape:p,placeholder:v("0x prefixed hex, e.g. 0x1234 or ascii data"),type:"text",withEllipsis:!0,withLabel:x,children:[t,b&&(0,a.jsx)(d.qi,{value:w}),y&&(0,a.jsx)(d.k,{className:"ui--InputAddressSimpleIcon",size:32,value:k})]})})})),_=s.memo((function({className:e="",isDisabled:t,isError:n=!1,label:s,labelExtra:i,onChange:r,placeholder:o,withLabel:l}){return(0,a.jsx)(m.Z,{className:e,children:(0,a.jsx)(d.ht,{isDisabled:t,isError:n,label:s,labelExtra:i,onChange:r,placeholder:o,withEllipsis:!0,withLabel:l})})})),ee=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,name:o,onChange:l,onEnter:c,onEscape:u,type:m,withLabel:h}){const{t:p}=(0,D.$)(),[g,f]=(0,s.useState)(!1),[b,x]=(0,s.useState)(!1),A=(0,s.useCallback)((e=>{const t=0!==e.length;l&&l({isValid:t,value:(0,$.N)(e)}),f(t)}),[l]),v=!n&&(0,a.jsx)(d.ZD,{label:p("file upload"),onChange:x,value:b});return(0,a.jsx)("div",{className:`${e} --relative`,children:!n&&b?(0,a.jsx)(_,{isDisabled:n,isError:i||!g,label:r,labelExtra:v,onChange:A,withLabel:h}):(0,a.jsx)(X,{defaultValue:t,isDisabled:n,isError:i,label:r,labelExtra:v,length:-1,name:o,onChange:l,onEnter:c,onEscape:u,type:m,withLabel:h,withLength:!0})})}));var te=n(98988),ne=n(83488);const ae=(0,d.zo)(m.Z)` pre { margin: 0; overflow: hidden; @@ -4024,7 +4028,7 @@ .ui--Static { margin-bottom: 0 !important; } -`,K=s.memo((function({asHex:e,children:t,childrenPre:n,className:i="",defaultValue:r,isOptional:o,label:l}){const{t:c}=(0,D.$)(),u=(0,s.useMemo)((()=>!!r?.value&&(e?r.value.toHex():(0,G.k)(r.value.toHuman?r.value.toHuman():r.value))),[e,r]);return(0,a.jsxs)(J,{className:i,children:[n,(0,a.jsx)(d.qG,{className:"full",label:l,value:(0,a.jsx)("pre",{children:u||(o?(0,a.jsx)(a.Fragment,{children:" "}):c(""))})}),t]})})),Y=s.memo((function(e){const{className:t="",defaultValue:n,isDisabled:s,isError:i,label:r,name:o,onChange:l,onEnter:c,onEscape:d,type:u}=e;return s?(0,a.jsx)(K,{...e}):(0,a.jsx)(U,{asHex:!0,className:t,defaultValue:n,isDisabled:s,isError:i,label:r,length:-1,name:o,onChange:l,onEnter:c,onEscape:d,type:u})})),X=s.memo((function(e){const{t}=(0,D.$)(),{className:n="",defaultValue:{value:s},isDisabled:i,label:r,withLabel:o}=e;if(!i)return(0,a.jsx)(Y,{...e});const l=s,{method:c,section:u}=l.registry.findMetaCall(l.callIndex),h=`${u}.${c}`;return(0,a.jsxs)(m.Z,{children:[(0,a.jsx)(d.qG,{className:`${n} full`,label:r,withLabel:o,children:h}),(0,a.jsx)(W.Z,{callName:h,labelHash:t("call hash / {{section}}.{{method}}",{replace:{method:c,section:u}}),value:l,withHash:!0})]})}));var _=n(24107),ee=n(67292),te=n(45409);const ne=s.memo((function({children:e,className:t="",isOuter:n,label:s,labelExtra:i,size:r="full",withLabel:o}){return(0,a.jsxs)(m.Z,{className:t,children:[(0,a.jsx)(d.jN,{className:r,isOuter:!0,label:s,labelExtra:i,withEllipsis:!0,withLabel:o,children:!n&&e}),n&&e]})}));const ae=(0,n(11677).e)("useParamDefs",(function(e,t){return(0,s.useMemo)((()=>function(e,t){const n=function(e,t){try{return(0,i.s)(e.createType(t.type).toRawType())}catch{return t}}(e,t);return n.sub?(Array.isArray(n.sub)?n.sub:[n.sub]).map((e=>({length:n.length,name:e.name,type:e}))):[]}(e,t)),[e,t])})),se=s.memo((function(e){const t=ae(e.registry,e.type),{className:n="",defaultValue:i,isDisabled:r,label:o,onChange:l,overrides:c,withLabel:d}=e,[u]=(0,s.useState)((()=>function({isValid:e,value:t}){return e&&(0,_.c)(t)&&t instanceof te.A?t.toArray().map((e=>({isValid:!0,value:e}))):void 0}(i))),m=(0,s.useCallback)((e=>{r||l&&l({isValid:e.reduce(((e,{isValid:t})=>e&&t),!0),value:t.reduce(((t,{name:n},a)=>(t[n||"unknown"]=e[a].value,t)),{})})}),[r,t,l]);return(0,a.jsxs)("div",{className:"ui--Params-Struct",children:[(0,a.jsx)(ne,{className:n,label:o,withLabel:d}),(0,a.jsx)(g.ZP,{isDisabled:r,onChange:m,overrides:c,params:t,registry:e.registry,values:u})]})})),ie=s.memo((function(e){const{className:t="",defaultValue:n,isDisabled:i,isError:r,label:o,onChange:l,withLabel:c}=e,[u,h]=(0,s.useState)(!1),[p]=(0,s.useState)((()=>i&&n&&(0,_.c)(n.value)?(0,ee.c)(n.value):null)),[g]=(0,s.useState)((()=>i||!n||(0,_.c)(n.value))),f=(0,s.useCallback)((e=>{const t=(0,ee.h)(e),n=!!t;l&&l({isValid:n,value:t}),h(n)}),[l]);return p?(0,a.jsx)(K,{...e,children:(0,a.jsx)(d.II,{className:"full",isDisabled:!0,label:"ipfs",type:"text",value:p,withLabel:c})}):g?(0,a.jsx)(se,{...e}):(0,a.jsx)(m.Z,{className:t,children:(0,a.jsx)(d.II,{className:"full",isDisabled:i,isError:r||!u,label:o,onChange:f,placeholder:"IPFS compatible CID",type:"text",withLabel:c})})}));var re=n(6226);const oe=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,registry:d,type:u,withLabel:m}){const[h,p]=(0,s.useState)(!1),g=(0,s.useCallback)((e=>{const t=(0,re.F)(e);o&&o({isValid:t,value:e}),p(t)}),[o]);return n?(0,a.jsx)(O,{className:e,defaultValue:t,isError:i||!h,label:r,onEnter:l,onEscape:c,registry:d,type:u,withLabel:m}):(0,a.jsx)(Q,{className:e,defaultValue:t,isError:i||!h,label:r,onChange:g,withLabel:m})})),le=s.memo((function(e){const{t}=(0,D.$)(),[{details:n,type:i},r]=(0,s.useState)({});return(0,s.useEffect)((()=>{const{value:t}=e.defaultValue||{};if(function(e){return!(!e||!e.isModule&&!e.isToken)}(t))if(t.isModule)try{const e=t.asModule,{docs:n,name:a,section:s}=e.registry.findMetaError(e);return r({details:n.join(", "),type:`${s}.${a}`})}catch(e){console.error(e)}else if(t.isToken)return r({details:t.asToken.type,type:t.type});r({details:null})}),[e.defaultValue]),e.isDisabled&&n?(0,a.jsxs)(K,{...e,children:[(0,a.jsx)(d.II,{className:"full",isDisabled:!0,label:t("type"),value:i}),n&&(0,a.jsx)(d.II,{className:"full",isDisabled:!0,label:t("details"),value:n})]}):(0,a.jsx)(Y,{...e})})),ce=s.memo((function(e){const{defaultValue:t,isDisabled:n,label:i}=e,r=(0,s.useMemo)((()=>{return t&&(e=t.value)&&e.isErr?{isValid:!0,value:t.value.asErr}:null;var e}),[t]);return n?r?(0,a.jsx)(le,{...e,childrenPre:(0,a.jsx)(d.II,{className:"full",isDisabled:!0,label:i,value:"Err"}),defaultValue:r,label:"DispatchError"}):(0,a.jsx)(K,{...e,defaultValue:{isValid:!0,value:"Ok"}}):(0,a.jsx)(Y,{...e})})),de=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:s,label:i,name:r,onChange:o,onEnter:l,onEscape:c,type:d,withLabel:u}){return(0,a.jsx)(U,{asHex:!0,className:e,defaultValue:t,isDisabled:n,isError:s,label:i,length:20,name:r,onChange:o,onEnter:l,onEscape:c,type:d,withCopy:n,withLabel:u})})),ue=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,name:o,onChange:l,onEnter:c,onEscape:u,registry:m,type:h,withLabel:p}){const{t:g}=(0,D.$)(),[f,b]=(0,s.useState)(!1),[x,A]=(0,s.useState)(null),v=(0,s.useCallback)((e=>{const t=m.hash(e);A((0,Z.c)(t)),l&&l({isValid:!0,value:t})}),[l,m]),w=(0,s.useCallback)((e=>{A(null),b(e)}),[b,A]),y=!n&&(0,a.jsx)(d.ZD,{label:g("hash a file"),onChange:w,value:f});return(0,a.jsx)("div",{className:e,children:!n&&f?(0,a.jsx)(Q,{isDisabled:n,isError:i,label:r,labelExtra:y,onChange:v,placeholder:x||void 0,withLabel:p}):(0,a.jsx)(U,{asHex:!0,defaultValue:t,isDisabled:n,isError:i,label:r,labelExtra:y,length:32,name:o,onChange:l,onEnter:c,onEscape:u,type:h,withCopy:n,withLabel:p})})})),me=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:s,label:i,name:r,onChange:o,onEnter:l,onEscape:c,type:d,withLabel:u}){return(0,a.jsx)(U,{asHex:!0,className:e,defaultValue:t,isDisabled:n,isError:s,label:i,length:64,name:r,onChange:o,onEnter:l,onEscape:c,type:d,withCopy:n,withLabel:u})}));var he=n(51330);function pe(e,t=!1){let n,a=!1;try{n=(0,V.G)(e.toString()),a=t||0!==n.length}catch{n=new Uint8Array([])}return{isValid:a,u8a:(0,P.N)(n)}}const ge=s.memo((function({className:e="",isDisabled:t,label:n,onChange:i,onEnter:r,withLabel:o}){const[,l]=(0,s.useState)(!1),[c,u]=(0,s.useState)((()=>({isValid:!1,u8a:new Uint8Array([])}))),[h,p]=(0,s.useState)((()=>({isValid:!1,u8a:new Uint8Array([])})));(0,s.useEffect)((()=>{const e=c.isValid&&h.isValid;i&&i({isValid:e,value:(0,he.e)(c.u8a,h.u8a)}),l(e)}),[c,i,h]);const g=(0,s.useCallback)((e=>u(pe(e))),[]),f=(0,s.useCallback)((e=>p(pe(e,!0))),[]);return(0,a.jsxs)(m.Z,{className:e,children:[(0,a.jsx)(d.II,{className:"medium",isDisabled:t,isError:!c.isValid,label:n,onChange:g,placeholder:"0x...",type:"text",withLabel:o}),(0,a.jsx)(d.II,{className:"medium",isDisabled:t,isError:!h.isValid,onChange:f,onEnter:r,placeholder:"0x...",type:"text",withLabel:o})]})}));var fe=n(48731);const be={info:0,type:"Bytes"},xe=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,registry:d,withLabel:u}){const{t:m}=(0,D.$)(),[h,p]=(0,s.useState)(m("click to select or drag and drop JSON key/value (hex-encoded) file")),g=(0,s.useCallback)((e=>{let t={isValid:!1,value:[]};try{t=function(e){const t=JSON.parse((0,z.z)(e)),n=Object.keys(t);let a=0!==n.length;const s=n.map((e=>{const n=t[e];(0,fe.hu)((0,R.vq)(e)&&(0,R.vq)(n),`Non-hex key/value pair found in ${e.toString()} => ${n.toString()}`);const s=pe(e),i=pe(n,!0);return a=a&&s.isValid&&i.isValid,[s.u8a,i.u8a]}));return{isValid:a,value:s}}(e),p(m("{{count}} key/value pairs encoded for submission",{replace:{count:t.value.length}}))}catch(e){console.error("Error converting json k/v",e),p(m("click to select or drag and drop JSON key/value (hex-encoded) file"))}o&&o(t)}),[o,m]);if(n){const n=t.value;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ne,{className:e,label:r,children:(0,a.jsx)("div",{})}),(0,a.jsx)("div",{className:"ui--Params",children:n.map((([e,t])=>{const n=(0,Z.c)(e.toU8a(!0));return(0,a.jsx)(O,{defaultValue:{value:t},isDisabled:!0,label:n,name:n,onEnter:l,onEscape:c,registry:d,type:be},n)}))})]})}return(0,a.jsx)(Q,{className:e,isDisabled:n,isError:i,label:r,onChange:g,placeholder:h,withLabel:u})})),Ae=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,registry:u,type:m,withLabel:h}){const p=(0,s.useCallback)((e=>o&&o(e)),[o]);return n?(0,a.jsx)(d.qG,{className:e,defaultValue:t?.value?t.value.toString():"",isError:i,label:r,withLabel:h}):(0,a.jsx)(y,{className:e,defaultValue:t,isDisabled:n,isError:i,label:r,onChange:p,onEnter:l,onEscape:c,registry:u,type:m,withLabel:h})})),ve=s.memo((function({onChange:e}){return(0,s.useEffect)((()=>{e&&e({isValid:!0,value:null})}),[e]),null})),we=s.memo((function(e){if(!e.isDisabled)return(0,a.jsx)(Y,{...e});const t=e.registry.createType("Call",e.defaultValue.value.toHex());return(0,a.jsx)(X,{...e,defaultValue:{isValid:!0,value:t}})}));var ye=n(37602),je=n(48358),ke=n(37245);const Ce={isValid:!0,value:void 0},Ne=new Uint8Array([1]),Ee=s.memo((function({className:e="",defaultValue:t,isDisabled:n,label:i,onChange:r,onEnter:o,onEscape:l,registry:c,type:{sub:u,withOptionActive:m},withLabel:h}){const{t:p}=(0,D.$)(),[g,f]=(0,s.useState)((()=>m||!!(t&&t.value instanceof ye.W&&t.value.isSome)||!1)),[b]=(0,s.useState)((()=>g||n?t&&(t.value instanceof ye.W&&t.value.isSome?{isValid:t.isValid,value:t.value.unwrap()}:Ce):Ce));(0,s.useEffect)((()=>{!g&&r&&r({isValid:!0,value:null})}),[g,r]);const x=(0,s.useCallback)((e=>r&&r(e.isValid&&(0,je.U)(e.value)&&!m&&g?{isValid:!0,value:(0,he.e)(Ne,e.value)}:e)),[g,r,m]);return(0,a.jsxs)("div",{className:`${e} --relative`,children:[(0,a.jsx)(ne,{className:"--relative",label:i,labelExtra:!n&&(0,a.jsx)(d.ZD,{label:p("include option"),onChange:f,value:g}),withLabel:h}),(0,a.jsx)(ke.Z,{children:(0,a.jsx)("div",{className:"ui--Params-Content",children:g?(0,a.jsx)(Ye,{defaultValue:b,isDisabled:n||!g,isOptional:!g&&!n,onChange:x,onEnter:o,onEscape:l,registry:c,type:u}):(0,a.jsx)(K,{defaultValue:Ce,isOptional:!0,label:"None"})})})]})})),Se=s.memo((function({className:e="",defaultValue:{value:t},isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,withLabel:u}){const[h,p]=(0,s.useState)(!1),g=(0,s.useCallback)((e=>{const t=0!==e.length;o&&o({isValid:t,value:e}),p(t)}),[o]),f=t?t.toHex?t.toHex():t:"";return(0,a.jsx)(m.Z,{className:e,children:(0,a.jsx)(d.II,{className:"full",defaultValue:f,isDisabled:n,isError:i||!h,label:r,onChange:g,onEnter:l,onEscape:c,placeholder:"Hex data",type:"text",withLabel:u})})})),Ie=s.memo((function({className:e="",defaultValue:{value:t},isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,withLabel:u}){const[h,p]=(0,s.useState)(!1),g=(0,s.useCallback)((e=>{const t=0!==e.length;o&&o({isValid:t,value:e}),p(t)}),[o]),f=(t||"").toString();return(0,a.jsx)(m.Z,{className:e,children:(0,a.jsx)(d.II,{className:"full",defaultValue:f,isDisabled:n,isError:i||!h,label:r,onChange:g,onEnter:l,onEscape:c,placeholder:"",type:"text",withLabel:u})})}));var Be=n(71285);const De=s.memo((function(e){const{className:t="",defaultValue:n,isDisabled:i,label:r,onChange:o,overrides:l,registry:c,type:d,withLabel:u}=e,m=ae(c,d),[h]=(0,s.useState)((()=>function({value:e}){return e instanceof Be.p?e.map((e=>({isValid:!0,value:e}))):e}(n))),p=(0,s.useCallback)((e=>{i||o&&o({isValid:e.reduce(((e,{isValid:t})=>e&&t),!0),value:e.map((({value:e})=>e))})}),[i,o]);return(0,a.jsxs)("div",{className:"ui--Params-Tuple",children:[(0,a.jsx)(ne,{className:t,label:r,withLabel:u}),(0,a.jsx)(g.ZP,{isDisabled:i,onChange:p,overrides:l,params:m,registry:c,values:h})]})}));var Le=n(30590);function Pe([{name:e,type:t}],n){return{name:`${n}: ${e||t.type}`,type:t}}function Ve(e,t,n){if(t.length===n||(0,o.o)(n))return t;const a=[];for(let t=0;t(0,o.o)(e)||(0,o.o)(e.isValid)?{isValid:!(0,o.o)(e),value:e}:e)):[]}const Me=s.memo((function({className:e="",defaultValue:t,isDisabled:n=!1,label:i,onChange:r,overrides:l,registry:c,type:u,withLabel:m}){const{t:h}=(0,D.$)(),p=ae(c,u),[f,b]=(0,s.useState)((()=>Te(t))),[x,A]=(0,s.useState)((()=>f.length)),[v,w]=(0,s.useState)((()=>Ve(p,[],x)));(0,s.useEffect)((()=>{p.length&&w((e=>Ve(p,e,n?(t.value||[]).length:x)))}),[x,t,n,p]),(0,s.useEffect)((()=>{!n&&p.length&&b((e=>{if(e.length===x)return e;for(;e.length{r&&r({isValid:f.reduce(((e,{isValid:t})=>e&&t),!0),value:f.map((({value:e})=>e))})}),[f,r]);const y=(0,s.useCallback)((()=>A((e=>e+1))),[]),j=(0,s.useCallback)((()=>A((e=>e-1))),[]);return(0,a.jsxs)(ne,{className:e,isOuter:!0,label:i,withLabel:m,children:[!n&&(0,a.jsxs)("div",{className:"ui--Param-Vector-buttons",children:[(0,a.jsx)(d.zx,{icon:"plus",label:h("Add item"),onClick:y}),(0,a.jsx)(d.zx,{icon:"minus",isDisabled:0===f.length,label:h("Remove item"),onClick:j})]}),(0,a.jsx)(g.ZP,{isDisabled:n,onChange:b,overrides:l,params:v,registry:c,values:f})]})}));var Fe=n(65581);const ze=s.memo((function({className:e="",defaultValue:t,isDisabled:n=!1,label:i,onChange:r,overrides:l,registry:c,type:d,withLabel:u}){const m=ae(c,d),[h]=(0,s.useState)((()=>Ve(m,[],m[0].length||1))),[p,f]=(0,s.useState)((()=>function(e){return e.value instanceof Fe.$?e.value.map((e=>({isValid:!0,value:e}))):Te(e)}(t)));return(0,s.useEffect)((()=>{!n&&m.length&&f((e=>{const t=m[0].length||1;if(e.length===t)return e;for(;e.length{r&&r({isValid:p.reduce(((e,{isValid:t})=>e&&t),!0),value:p.map((({value:e})=>e))})}),[p,r]),(0,a.jsx)(ne,{className:e,isOuter:!0,label:i,withLabel:u,children:(0,a.jsx)(g.ZP,{isDisabled:n,onChange:f,overrides:l,params:h,registry:c,values:p})})}));var Ze=n(70447),Re=n(65968);const $e={aye:!0,conviction:0},He=s.memo((function({className:e="",defaultValue:{value:t},isDisabled:n,isError:i,onChange:r,withLabel:o}){const{t:l}=(0,D.$)(),[u,h]=(0,s.useState)($e);(0,s.useEffect)((()=>{r&&r({isValid:!0,value:u})}),[r,u]);const p=(0,s.useCallback)((e=>h((({conviction:t})=>({aye:e,conviction:t})))),[]),g=(0,s.useCallback)((e=>h((({aye:t})=>({aye:t,conviction:e})))),[]),f=(0,s.useRef)([{text:l("Nay"),value:!1},{text:l("Aye"),value:!0}]),b=(0,s.useRef)([{text:l("None"),value:0},{text:l("Locked1x"),value:1},{text:l("Locked2x"),value:2},{text:l("Locked3x"),value:3},{text:l("Locked4x"),value:4},{text:l("Locked5x"),value:5},{text:l("Locked6x"),value:6}]),x=(0,c.H)(t)?!!(128&t.toNumber()):(0,Re.h)(t)?!!(128&t):t instanceof Ze.P?t.isAye:!!t,A=t instanceof Ze.P?t.conviction.index:0;return(0,a.jsxs)(m.Z,{className:e,children:[(0,a.jsx)(d.Lt,{className:"full",defaultValue:x,isDisabled:n,isError:i,label:l("aye: bool"),onChange:p,options:f.current,withLabel:o}),(0,a.jsx)(d.Lt,{className:"full",defaultValue:A,isDisabled:n,isError:i,label:l("conviction: Conviction"),onChange:g,options:b.current,withLabel:o})]})}));var qe=n(33661);const Ue=[{text:"Super majority approval",value:0},{text:"Super majority rejection",value:1},{text:"Simple majority",value:2}];Ue.reduce(((e,{text:t,value:n})=>(e[n]=t,e)),{});const Qe=s.memo((function({className:e="",defaultValue:{value:t},isDisabled:n,isError:i,label:r,onChange:o,withLabel:l}){const c=(0,s.useCallback)((e=>o&&o({isValid:!0,value:e})),[o]),u=(0,s.useMemo)((()=>(0,qe.m)(t.toNumber)?t.toNumber():(0,w.G)(t).toNumber()),[t]);return(0,a.jsx)(m.Z,{className:e,children:(0,a.jsx)(d.Lt,{className:"full",defaultValue:u,isDisabled:n,isError:i,label:r,onChange:c,options:Ue,withLabel:l})})})),Oe=["AccountId","AccountId20","AccountId32","AccountIndex","Address","Balance","BalanceOf","Vec"],We=["DispatchError","SpRuntimeDispatchError"],Ge=[{c:A,t:["AccountId","Address","LookupSource","MultiAddress"]},{c:y,t:["AccountIndex","i8","i16","i32","i64","i128","u8","u16","u32","u64","u128","u256"]},{c:j.Z,t:["Amount","Balance","BalanceOf"]},{c:L,t:["bool"]},{c:O,t:["Bytes","Vec"]},{c:X,t:["Call","Proposal","RuntimeCall"]},{c:ie,t:["PalletAllianceCid"]},{c:oe,t:["Code"]},{c:le,t:We},{c:ce,t:["DispatchResult","Result"]},{c:Se,t:["Raw","RuntimeSessionKeys","Keys"]},{c:b,t:["Enum"]},{c:ue,t:["Hash","H256"]},{c:de,t:["H160"]},{c:me,t:["H512"]},{c:ge,t:["KeyValue"]},{c:xe,t:["Vec"]},{c:Ae,t:["Moment","MomentOf"]},{c:ve,t:["Null"]},{c:we,t:["OpaqueCall"]},{c:Ee,t:["Option"]},{c:Ie,t:["String","Text"]},{c:se,t:["Struct"]},{c:De,t:["Tuple"]},{c:Me,t:["Vec","BTreeSet"]},{c:ze,t:["VecFixed"]},{c:He,t:["Vote"]},{c:Qe,t:["VoteThreshold"]},{c:Y,t:["Unknown"]}].reduce(((e,{c:t,t:n})=>(n.forEach((n=>{e[n]=t})),e)),{}),Je=[];function Ke({displayName:e,info:t,lookupName:n,sub:a,type:s}){if(e&&Oe.includes(e))return e;if(s.endsWith("RuntimeSessionKeys"))return"RuntimeSessionKeys";const i=n||s;switch(t){case l.u.Compact:return a.type;case l.u.Option:return"Option";case l.u.Enum:return"Enum";case l.u.Result:{const[,e]=a;return We.includes(e.lookupName||e.type)?"DispatchResult":i}case l.u.Struct:return"Struct";case l.u.BTreeSet:return"BTreeSet";case l.u.Tuple:return Ge[s]===A?s:"Tuple";case l.u.Vec:return"Vec"===s?"Bytes":["Vec"].includes(s)?"Vec":"Vec";case l.u.VecFixed:return"u8"===a.type?s:"VecFixed";default:return i}}const Ye=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:d,isOptional:u,name:m,onChange:h,onEnter:p,onEscape:g,overrides:f,registry:b,type:x}){const A=(0,s.useMemo)((()=>function(e,t,n={}){if(["AccountId20","AccountId32"].includes(t.type)){const n=`AccountId${e.createType("AccountId").length}`;if(t.type!==n)return"AccountId20"===t.type?S:I}const a=e=>e?n[e]||Ge[e]:null,s=Ke(t);let r=a(t.lookupName)||a(t.type)||a(s);if(!r){try{const t=e.createType(s),n=(0,i.s)(t.toRawType());if(r=a(n.lookupName||n.type)||a(Ke(n)),r)return r;if((0,c.H)(t))return y}catch(e){console.error(`params: findComponent: ${e.message}`)}Je.includes(s)||(Je.push(s),console.info(`params: findComponent: No pre-defined component for type ${s} from ${l.u[t.info]}: ${JSON.stringify(t)}`))}return r||Y}(b,x,f)),[b,x,f]),v=(0,s.useMemo)((()=>{const e=(0,r.RH)(b,b.isLookupType(x.lookupName||x.type)?(0,i.s)(b.createType(x.type).toRawType()):x).replace(/"/g,"").replace(/\\/g,"").replace(/:Null/g,"").replace(/:/g,": ").replace(/,/g,", ").replace(/^{_alias: {.*}, /,"{");return`${(0,o.o)(m)?"":`${m}: `}${e}${x.typeName&&!e.includes(x.typeName)?` (${x.typeName})`:""}`}),[m,b,x]);return A?u?(0,a.jsx)(K,{defaultValue:t,isOptional:!0,label:"None"}):(0,a.jsx)(A,{className:`${e} ui--Param`,defaultValue:t,isDisabled:n,isError:d,label:v,name:m,onChange:h,onEnter:p,onEscape:g,overrides:f,registry:b,type:x},`${m||"unknown"}:${v}`):null})),Xe=s.memo((function({defaultValue:e,index:t,isDisabled:n,isError:i,name:r,onChange:o,onEnter:l,onEscape:c,overrides:d,registry:u,type:m}){const h=(0,s.useCallback)((e=>o(t,e)),[t,o]);return(0,a.jsx)("div",{className:"ui--Param-composite",children:(0,a.jsx)(Ye,{defaultValue:e,isDisabled:n,isError:i,name:r,onChange:h,onEnter:l,onEscape:c,overrides:d,registry:u,type:m},`input:${t}`)})}))},89176:(e,t,n)=>{n.d(t,{ZP:()=>h});var a=n(52322),s=n(2784),i=n(95267),r=n(64348),o=n(11147),l=n(37245),c=n(56301),d=n(37750),u=n(68202);class m extends s.PureComponent{state={params:null};static getDerivedStateFromProps({isDisabled:e,params:t=[],registry:n=i.statics.api.registry,values:a},s){return e||(0,o.P)(s.params)===(0,o.P)(t)?null:{params:t,values:t.reduce(((e,t,s)=>(e.push(a?.[s]?a[s]:(0,u.y)(n,t)),e)),[])}}componentDidMount(){this.componentDidUpdate(null,{})}componentDidUpdate(e,t){const{isDisabled:n}=this.props,{values:a}=this.state;n||(0,o.P)(t.values)===(0,o.P)(a)||this.triggerUpdate()}render(){const{children:e,className:t="",isDisabled:n,isError:s,onEnter:d,onEscape:u,overrides:m,params:h,registry:p=i.statics.api.registry,withBorder:g=!0,withExpander:f}=this.props,{values:b=this.props.values}=this.state;return b?.length?(0,a.jsx)(l.Z,{className:t,withBorder:g,withExpander:f,children:(0,a.jsx)(r.SV,{onError:this.onRenderError,children:(0,a.jsxs)("div",{className:"ui--Params-Content",children:[b&&h?.map((({name:e,type:t},i)=>(0,a.jsx)(c.Z,{defaultValue:b[i],index:i,isDisabled:n,isError:s,name:e,onChange:this.onChangeParam,onEnter:d,onEscape:u,overrides:m,registry:p,type:t},`${e||""}:${t.type.toString()}:${i}:${n?(0,o.P)(b[i]):""}`))),e]})})}):null}onChangeParam=(e,t)=>{const{isDisabled:n}=this.props;if(n)return;const{isValid:a=!1,value:s}=t;this.setState((t=>({values:(t.values||[]).map(((t,n)=>n!==e?t:{isValid:a,value:s}))})),this.triggerUpdate)};triggerUpdate=()=>{const{isDisabled:e,onChange:t}=this.props,{values:n}=this.state;!e&&n&&t&&t(n)};onRenderError=()=>{const{onError:e}=this.props;e&&e()}}const h=(0,d.Z)(m)},30590:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(6046),s=n(23601),i=n(95292),r=n(6485);const o=[];function l(e,t){if(t.info===s.u.Vec)return[l(e,t.sub)];if(t.info===s.u.Tuple)return Array.isArray(t.sub)?t.sub.map((t=>l(e,t))):[];if(t.info===s.u.Struct)return Array.isArray(t.sub)?t.sub.reduce(((t,n)=>(t[n.name||"unknown"]=l(e,n),t)),{}):{};if(t.info===s.u.Enum)return Array.isArray(t.sub)?{[t.sub[0].name||"unknown"]:l(e,t.sub[0])}:{};const n=[s.u.Compact,s.u.Option].includes(t.info)?t.sub.type:t.type;switch(n){case"AccountIndex":case"Balance":case"BalanceOf":case"BlockNumber":case"Compact":case"Gas":case"Index":case"Nonce":case"ParaId":case"PropIndex":case"ProposalIndex":case"ReferendumIndex":case"i8":case"i16":case"i32":case"i64":case"i128":case"u8":case"u16":case"u32":case"u64":case"u128":case"VoteIndex":case"Moment":return i.nw;case"bool":return!1;case"Bytes":case"AccountId":case"AccountId20":case"AccountId32":case"AccountIdOf":case"Address":case"Call":case"CandidateReceipt":case"Digest":case"Header":case"KeyValue":case"LookupSource":case"MisbehaviorReport":case"Proposal":case"RuntimeCall":case"Signature":case"SessionKey":case"StorageKey":case"ValidatorId":return;case"String":case"Text":case"Raw":case"Keys":return"";case"Vote":return-1;case"VoteThreshold":return 0;case"BlockHash":case"CodeHash":case"Hash":case"H256":return e.createType("H256");case"H512":return e.createType("H512");case"H160":return e.createType("H160");case"Extrinsic":return e.createType("Raw");case"Null":return null;default:{let c=null;try{const t=e.createType(n),o=(0,a.s)(t.toRawType());if((0,r.H)(t))return i.nw;if([s.u.Struct].includes(o.info))return;if([s.u.Enum,s.u.Tuple].includes(o.info))return l(e,o)}catch(e){c=e.message}return o.includes(n)||(o.push(n),c&&console.error(`params: initValue: ${c}`),console.info(`params: initValue: No default value for type ${n} from ${JSON.stringify(t)}, using defaults`)),"0x"}}}},48653:(e,t,n)=>{n.d(t,{_o:()=>i,fQ:()=>r,fr:()=>o,xS:()=>s});var a=n(40943);const s=["auctions.bid","balances.forceTransfer","balances.forceUnreserve","balances.setBalance","balances.transfer","balances.transferAllowDeath","balances.transferKeepAlive","bounties.proposeBounty","bounties.proposeCurator","childBounties.addChildBounty","childBounties.proposeCurator","claims.mintClaim","convictionVoting.delegate","convictionVoting.vote","crowdloan.contribute","crowdloan.create","crowdloan.edit","democracy.delegate","democracy.propose","democracy.vote","identity.requestJudgement","identity.setFee","nominationPools.bondExtra","nominationPools.create","nominationPools.createWithPoolId","nominationPools.join","nominationPools.unbond","phragmenElection.vote","society.bid","society.vouch","staking.bond","staking.bondExtra","staking.rebond","staking.unbond","tips.tip","tips.tipNew","treasury.proposeSpend","treasury.spend","vesting.forceVestedTransfer","vesting.vestedTransfer"],i=["auctions.BidAccepted","auctions.ReserveConfiscated","auctions.Reserved","auctions.Unreserved","balances.Deposit","balances.DustLost","balances.Endowed","balances.Transfer","balances.Unreserved","balances.Withdraw","bounties.BountyClaimed","bounties.BountyRejected","claims.Claimed","convictionVoting.Voted","crowdloan.Contributed","crowdloan.Withdrew","democracy.Voted","nominationPools.Bonded","nominationPools.PaidOut","nominationPools.PoolSlashed","nominationPools.Unbonded","nominationPools.UnbondingPoolSlashed","referenda.DecisionDepositPlaced","referenda.DecisionDepositRefunded","referenda.DepositSlashed","referenda.SubmissionDepositRefunded","staking.Bonded","staking.Rewarded","staking.Unbonded","staking.Withdrawn","transactionPayment.TransactionFeePaid","treasury.Deposit"],r={"Compact":a.Z,u128:a.Z},o=r},37750:(e,t,n)=>{n.d(t,{$:()=>s,Z:()=>i});var a=n(61349);function s(){return(0,a.$G)("react-params")}function i(e){return(0,a.Zh)(["react-params"])(e)}},67292:(e,t,n)=>{n.d(t,{c:()=>r,h:()=>i});var a=n(33990),s=n(55858);function i(e){try{const{code:t,multihash:{code:n,digest:i},version:r}=a.k0.parse(e);return{codec:t,hash:{code:n,digest:(0,s.c)(i)},version:r}}catch(t){return console.error(`fromIpfsCid: ${t.message}::`,e),null}}function r(e){try{const{codec:t,hash_:{code:n,digest:s},version:i}=e,r=s.toU8a(!0),o=a.PP.encodingLength(n.toNumber()),l=a.PP.encodingLength(r.length),c=new Uint8Array(o+l+r.length);return a.PP.encodeTo(n.toNumber(),c,0),a.PP.encodeTo(r.length,c,o),c.set(r,o+l),a.k0.create(i.index,t.toNumber(),a.uR.decode(c)).toString()}catch(t){return console.error(`toIpfsCid: ${t.message}::`,e.toHuman()),null}}},83488:(e,t,n)=>{n.d(t,{Z:()=>g,k:()=>p});var a=n(52322),s=(n(2784),n(64348)),i=n(49754),r=n(37602),o=n(33661),l=n(11147),c=n(17751),d=n(1346),u=n(55858);function m({className:e="",key:t},...n){return{cName:`${e} ui--Param-text`,key:t,values:n}}function h(e){return(0,o.m)(e.toHuman)?e.toHuman():Array.isArray(e)?e.map((e=>h(e))):e.toString()}function p(e){return(0,l.P)(e,2).replace(/,\n/g,"\n").replace(/"/g,"").replace(/\\/g,"").replace(/\],\[/g,"],\n[")}function g(e,t){if((0,c.F)(t)||(0,d.o)(t)){const{cName:e,key:t,values:n}=m({},"");return(0,a.jsx)("div",{className:e,children:n},t)}const n=["Bytes","Raw","Option","Keys"].includes(e)&&(0,o.m)(t.toU8a)?(0,u.c)(t.toU8a(!0)):"Vec<(ValidatorId,Keys)>"===e?p((l=t,JSON.stringify(l.map((([e,t])=>[e.toString(),t.toHex()]))))):t instanceof i.N?t.isEmpty?"":t.toString():t instanceof r.W&&t.isNone?"":p(h(t));var l;const{cName:g,key:f,values:b}=m({},n);return(0,a.jsxs)("div",{className:g,children:[b,(0,a.jsx)(s.qi,{value:n})]},f)}},68202:(e,t,n)=>{n.d(t,{y:()=>i});var a=n(1346),s=n(30590);function i(e,t){const n=(0,s.Z)(e,t.type);return{isValid:!(0,a.o)(n),value:n}}},67609:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(52322),s=n(2784),i=n(90778),r=n(9118),o=n(58607);const l=s.memo((function({children:e,className:t="",label:n,params:s}){const{api:l}=(0,i.h)(),c=(0,r.W7)(l.derive.balances?.all,[s]);return(0,a.jsx)(o.Z,{className:t,label:n,value:c?.availableBalance,children:e})}))},36609:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(52322),s=n(2784),i=n(90778),r=n(9118),o=n(58607);const l=s.memo((function({children:e,className:t="",label:n,params:s}){const{api:l}=(0,i.h)(),c=(0,r.W7)(l.derive.balances?.all,[s]);return(0,a.jsx)(o.Z,{className:t,label:n,value:c?.freeBalance,children:e})}))},26839:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(52322),s=n(2784),i=n(90778),r=n(9118),o=n(14681);const l=s.memo((function({children:e,className:t="",label:n}){const{api:s}=(0,i.h)(),l=(0,r.W7)(s.derive.chain.bestNumberFinalized);return(0,a.jsxs)("div",{className:`${t} ${l?"":"--tmp"}`,children:[n||"",(0,a.jsx)("span",{className:"--digits",children:(0,o.u)(l||1234)}),e]})}))},95689:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(52322),s=n(2784),i=n(90778),r=n(9118),o=n(14681);const l=s.memo((function({children:e,className:t="",isFinalized:n,label:s,withPound:l}){const{api:c,isApiReady:d}=(0,i.h)(),u=(0,r.W7)(d&&(n?c.derive.chain.bestNumberFinalized:c.derive.chain.bestNumber));return(0,a.jsxs)("div",{className:`${t} ${u?"":"--tmp"}`,children:[s||"",l&&"#",(0,a.jsx)("span",{className:"--digits",children:(0,o.u)(u||1234)}),e]})}))},65874:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(52322),s=n(2784),i=n(21779),r=n(97794);const o=i.z.div` +`,se=s.memo((function({asHex:e,children:t,childrenPre:n,className:i="",defaultValue:r,isOptional:o,label:l}){const{t:c}=(0,D.$)(),u=(0,s.useMemo)((()=>!!r?.value&&(e?r.value.toHex():(0,ne.k)(r.value.toHuman?r.value.toHuman():r.value))),[e,r]);return(0,a.jsxs)(ae,{className:i,children:[n,(0,a.jsx)(d.qG,{className:"full",label:l,value:(0,a.jsx)("pre",{children:u||(o?(0,a.jsx)(a.Fragment,{children:" "}):c(""))})}),t]})})),ie=s.memo((function(e){const{className:t="",defaultValue:n,isDisabled:s,isError:i,label:r,name:o,onChange:l,onEnter:c,onEscape:d,type:u}=e;return s?(0,a.jsx)(se,{...e}):(0,a.jsx)(X,{asHex:!0,className:t,defaultValue:n,isDisabled:s,isError:i,label:r,length:-1,name:o,onChange:l,onEnter:c,onEscape:d,type:u})})),re=s.memo((function(e){const{t}=(0,D.$)(),{className:n="",defaultValue:{value:s},isDisabled:i,label:r,withLabel:o}=e;if(!i)return(0,a.jsx)(ie,{...e});const l=s,{method:c,section:u}=l.registry.findMetaCall(l.callIndex),h=`${u}.${c}`;return(0,a.jsxs)(m.Z,{children:[(0,a.jsx)(d.qG,{className:`${n} full`,label:r,withLabel:o,children:h}),(0,a.jsx)(te.Z,{callName:h,labelHash:t("call hash / {{section}}.{{method}}",{replace:{method:c,section:u}}),value:l,withHash:!0})]})}));var oe=n(67292),le=n(45409);const ce=s.memo((function(e){const t=F(e.registry,e.type),{className:n="",defaultValue:i,isDisabled:r,label:o,onChange:l,overrides:c,withLabel:d}=e,[u]=(0,s.useState)((()=>function({isValid:e,value:t}){return e&&(0,V.c)(t)&&t instanceof le.A?t.toArray().map((e=>({isValid:!0,value:e}))):void 0}(i))),m=(0,s.useCallback)((e=>{r||l&&l({isValid:e.reduce(((e,{isValid:t})=>e&&t),!0),value:t.reduce(((t,{name:n},a)=>(t[n||"unknown"]=e[a].value,t)),{})})}),[r,t,l]);return(0,a.jsxs)("div",{className:"ui--Params-Struct",children:[(0,a.jsx)(M,{className:n,label:o,withLabel:d}),(0,a.jsx)(g.ZP,{isDisabled:r,onChange:m,overrides:c,params:t,registry:e.registry,values:u})]})})),de=s.memo((function(e){const{className:t="",defaultValue:n,isDisabled:i,isError:r,label:o,onChange:l,withLabel:c}=e,[u,h]=(0,s.useState)(!1),[p]=(0,s.useState)((()=>i&&n&&(0,V.c)(n.value)?(0,oe.c)(n.value):null)),[g]=(0,s.useState)((()=>i||!n||(0,V.c)(n.value))),f=(0,s.useCallback)((e=>{const t=(0,oe.h)(e),n=!!t;l&&l({isValid:n,value:t}),h(n)}),[l]);return p?(0,a.jsx)(se,{...e,children:(0,a.jsx)(d.II,{className:"full",isDisabled:!0,label:"ipfs",type:"text",value:p,withLabel:c})}):g?(0,a.jsx)(ce,{...e}):(0,a.jsx)(m.Z,{className:t,children:(0,a.jsx)(d.II,{className:"full",isDisabled:i,isError:r||!u,label:o,onChange:f,placeholder:"IPFS compatible CID",type:"text",withLabel:c})})}));var ue=n(6226);const me=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,registry:d,type:u,withLabel:m}){const[h,p]=(0,s.useState)(!1),g=(0,s.useCallback)((e=>{const t=(0,ue.F)(e);o&&o({isValid:t,value:e}),p(t)}),[o]);return n?(0,a.jsx)(ee,{className:e,defaultValue:t,isError:i||!h,label:r,onEnter:l,onEscape:c,registry:d,type:u,withLabel:m}):(0,a.jsx)(_,{className:e,defaultValue:t,isError:i||!h,label:r,onChange:g,withLabel:m})})),he=s.memo((function(e){const{t}=(0,D.$)(),[{details:n,type:i},r]=(0,s.useState)({});return(0,s.useEffect)((()=>{const{value:t}=e.defaultValue||{};if(function(e){return!(!e||!e.isModule&&!e.isToken)}(t))if(t.isModule)try{const e=t.asModule,{docs:n,name:a,section:s}=e.registry.findMetaError(e);return r({details:n.join(", "),type:`${s}.${a}`})}catch(e){console.error(e)}else if(t.isToken)return r({details:t.asToken.type,type:t.type});r({details:null})}),[e.defaultValue]),e.isDisabled&&n?(0,a.jsxs)(se,{...e,children:[(0,a.jsx)(d.II,{className:"full",isDisabled:!0,label:t("type"),value:i}),n&&(0,a.jsx)(d.II,{className:"full",isDisabled:!0,label:t("details"),value:n})]}):(0,a.jsx)(ie,{...e})})),pe=s.memo((function(e){const{defaultValue:t,isDisabled:n,label:i}=e,r=(0,s.useMemo)((()=>{return t&&(e=t.value)&&e.isErr?{isValid:!0,value:t.value.asErr}:null;var e}),[t]);return n?r?(0,a.jsx)(he,{...e,childrenPre:(0,a.jsx)(d.II,{className:"full",isDisabled:!0,label:i,value:"Err"}),defaultValue:r,label:"DispatchError"}):(0,a.jsx)(se,{...e,defaultValue:{isValid:!0,value:"Ok"}}):(0,a.jsx)(ie,{...e})})),ge=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:s,label:i,name:r,onChange:o,onEnter:l,onEscape:c,type:d,withLabel:u}){return(0,a.jsx)(X,{asHex:!0,className:e,defaultValue:t,isDisabled:n,isError:s,label:i,length:20,name:r,onChange:o,onEnter:l,onEscape:c,type:d,withCopy:n,withLabel:u})})),fe=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,name:o,onChange:l,onEnter:c,onEscape:u,registry:m,type:h,withLabel:p}){const{t:g}=(0,D.$)(),[f,b]=(0,s.useState)(!1),[x,A]=(0,s.useState)(null),v=(0,s.useCallback)((e=>{const t=m.hash(e);A((0,W.c)(t)),l&&l({isValid:!0,value:t})}),[l,m]),w=(0,s.useCallback)((e=>{A(null),b(e)}),[b,A]),y=!n&&(0,a.jsx)(d.ZD,{label:g("hash a file"),onChange:w,value:f});return(0,a.jsx)("div",{className:e,children:!n&&f?(0,a.jsx)(_,{isDisabled:n,isError:i,label:r,labelExtra:y,onChange:v,placeholder:x||void 0,withLabel:p}):(0,a.jsx)(X,{asHex:!0,defaultValue:t,isDisabled:n,isError:i,label:r,labelExtra:y,length:32,name:o,onChange:l,onEnter:c,onEscape:u,type:h,withCopy:n,withLabel:p})})})),be=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:s,label:i,name:r,onChange:o,onEnter:l,onEscape:c,type:d,withLabel:u}){return(0,a.jsx)(X,{asHex:!0,className:e,defaultValue:t,isDisabled:n,isError:s,label:i,length:64,name:r,onChange:o,onEnter:l,onEscape:c,type:d,withCopy:n,withLabel:u})}));var xe=n(51330);function Ae(e,t=!1){let n,a=!1;try{n=(0,H.G)(e.toString()),a=t||0!==n.length}catch{n=new Uint8Array([])}return{isValid:a,u8a:(0,$.N)(n)}}const ve=s.memo((function({className:e="",isDisabled:t,label:n,onChange:i,onEnter:r,withLabel:o}){const[,l]=(0,s.useState)(!1),[c,u]=(0,s.useState)((()=>({isValid:!1,u8a:new Uint8Array([])}))),[h,p]=(0,s.useState)((()=>({isValid:!1,u8a:new Uint8Array([])})));(0,s.useEffect)((()=>{const e=c.isValid&&h.isValid;i&&i({isValid:e,value:(0,xe.e)(c.u8a,h.u8a)}),l(e)}),[c,i,h]);const g=(0,s.useCallback)((e=>u(Ae(e))),[]),f=(0,s.useCallback)((e=>p(Ae(e,!0))),[]);return(0,a.jsxs)(m.Z,{className:e,children:[(0,a.jsx)(d.II,{className:"medium",isDisabled:t,isError:!c.isValid,label:n,onChange:g,placeholder:"0x...",type:"text",withLabel:o}),(0,a.jsx)(d.II,{className:"medium",isDisabled:t,isError:!h.isValid,onChange:f,onEnter:r,placeholder:"0x...",type:"text",withLabel:o})]})}));var we=n(48731);const ye={info:0,type:"Bytes"},je=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,registry:d,withLabel:u}){const{t:m}=(0,D.$)(),[h,p]=(0,s.useState)(m("click to select or drag and drop JSON key/value (hex-encoded) file")),g=(0,s.useCallback)((e=>{let t={isValid:!1,value:[]};try{t=function(e){const t=JSON.parse((0,O.z)(e)),n=Object.keys(t);let a=0!==n.length;const s=n.map((e=>{const n=t[e];(0,we.hu)((0,G.vq)(e)&&(0,G.vq)(n),`Non-hex key/value pair found in ${e.toString()} => ${n.toString()}`);const s=Ae(e),i=Ae(n,!0);return a=a&&s.isValid&&i.isValid,[s.u8a,i.u8a]}));return{isValid:a,value:s}}(e),p(m("{{count}} key/value pairs encoded for submission",{replace:{count:t.value.length}}))}catch(e){console.error("Error converting json k/v",e),p(m("click to select or drag and drop JSON key/value (hex-encoded) file"))}o&&o(t)}),[o,m]);if(n){const n=t.value;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(M,{className:e,label:r,children:(0,a.jsx)("div",{})}),(0,a.jsx)("div",{className:"ui--Params",children:n.map((([e,t])=>{const n=(0,W.c)(e.toU8a(!0));return(0,a.jsx)(ee,{defaultValue:{value:t},isDisabled:!0,label:n,name:n,onEnter:l,onEscape:c,registry:d,type:ye},n)}))})]})}return(0,a.jsx)(_,{className:e,isDisabled:n,isError:i,label:r,onChange:g,placeholder:h,withLabel:u})})),ke=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,registry:u,type:m,withLabel:h}){const p=(0,s.useCallback)((e=>o&&o(e)),[o]);return n?(0,a.jsx)(d.qG,{className:e,defaultValue:t?.value?t.value.toString():"",isError:i,label:r,withLabel:h}):(0,a.jsx)(y,{className:e,defaultValue:t,isDisabled:n,isError:i,label:r,onChange:p,onEnter:l,onEscape:c,registry:u,type:m,withLabel:h})})),Ce=s.memo((function({onChange:e}){return(0,s.useEffect)((()=>{e&&e({isValid:!0,value:null})}),[e]),null})),Ne=s.memo((function(e){if(!e.isDisabled)return(0,a.jsx)(ie,{...e});const t=e.registry.createType("Call",e.defaultValue.value.toHex());return(0,a.jsx)(re,{...e,defaultValue:{isValid:!0,value:t}})}));var Ee=n(37602),Se=n(48358),Ie=n(37245);const Be={isValid:!0,value:void 0},De=new Uint8Array([1]),Le=s.memo((function({className:e="",defaultValue:t,isDisabled:n,label:i,onChange:r,onEnter:o,onEscape:l,registry:c,type:{sub:u,withOptionActive:m},withLabel:h}){const{t:p}=(0,D.$)(),[g,f]=(0,s.useState)((()=>m||!!(t&&t.value instanceof Ee.W&&t.value.isSome)||!1)),[b]=(0,s.useState)((()=>g||n?t&&(t.value instanceof Ee.W&&t.value.isSome?{isValid:t.isValid,value:t.value.unwrap()}:Be):Be));(0,s.useEffect)((()=>{!g&&r&&r({isValid:!0,value:null})}),[g,r]);const x=(0,s.useCallback)((e=>r&&r(e.isValid&&(0,Se.U)(e.value)&&!m&&g?{isValid:!0,value:(0,xe.e)(De,e.value)}:e)),[g,r,m]);return(0,a.jsxs)("div",{className:`${e} --relative`,children:[(0,a.jsx)(M,{className:"--relative",label:i,labelExtra:!n&&(0,a.jsx)(d.ZD,{label:p("include option"),onChange:f,value:g}),withLabel:h}),(0,a.jsx)(Ie.Z,{children:(0,a.jsx)("div",{className:"ui--Params-Content",children:g?(0,a.jsx)(tt,{defaultValue:b,isDisabled:n||!g,isOptional:!g&&!n,onChange:x,onEnter:o,onEscape:l,registry:c,type:u}):(0,a.jsx)(se,{defaultValue:Be,isOptional:!0,label:"None"})})})]})})),Pe=s.memo((function({className:e="",defaultValue:{value:t},isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,withLabel:u}){const[h,p]=(0,s.useState)(!1),g=(0,s.useCallback)((e=>{const t=0!==e.length;o&&o({isValid:t,value:e}),p(t)}),[o]),f=t?t.toHex?t.toHex():t:"";return(0,a.jsx)(m.Z,{className:e,children:(0,a.jsx)(d.II,{className:"full",defaultValue:f,isDisabled:n,isError:i||!h,label:r,onChange:g,onEnter:l,onEscape:c,placeholder:"Hex data",type:"text",withLabel:u})})})),Ve=s.memo((function({className:e="",defaultValue:{value:t},isDisabled:n,isError:i,label:r,onChange:o,onEnter:l,onEscape:c,withLabel:u}){const[h,p]=(0,s.useState)(!1),g=(0,s.useCallback)((e=>{const t=0!==e.length;o&&o({isValid:t,value:e}),p(t)}),[o]),f=(t||"").toString();return(0,a.jsx)(m.Z,{className:e,children:(0,a.jsx)(d.II,{className:"full",defaultValue:f,isDisabled:n,isError:i||!h,label:r,onChange:g,onEnter:l,onEscape:c,placeholder:"",type:"text",withLabel:u})})}));var Te=n(71285);const Me=s.memo((function(e){const{className:t="",defaultValue:n,isDisabled:i,label:r,onChange:o,overrides:l,registry:c,type:d,withLabel:u}=e,m=F(c,d),[h]=(0,s.useState)((()=>function({value:e}){return e instanceof Te.p?e.map((e=>({isValid:!0,value:e}))):e}(n))),p=(0,s.useCallback)((e=>{i||o&&o({isValid:e.reduce(((e,{isValid:t})=>e&&t),!0),value:e.map((({value:e})=>e))})}),[i,o]);return(0,a.jsxs)("div",{className:"ui--Params-Tuple",children:[(0,a.jsx)(M,{className:t,label:r,withLabel:u}),(0,a.jsx)(g.ZP,{isDisabled:i,onChange:p,overrides:l,params:m,registry:c,values:h})]})}));function Fe([{name:e,type:t}],n){return{name:`${n}: ${e||t.type}`,type:t}}function ze(e,t,n){if(t.length===n)return t;const a=[];for(let t=0;t(0,o.o)(e)||(0,o.o)(e.isValid)?{isValid:!(0,o.o)(e),value:e}:e)):[]}const Re=s.memo((function({className:e="",defaultValue:t,isDisabled:n=!1,label:i,onChange:r,overrides:l,registry:c,type:u,withLabel:m}){const{t:h}=(0,D.$)(),p=F(c,u),[f,b]=(0,s.useState)((()=>Ze(t))),[x,A]=(0,s.useState)((()=>f.length)),[v,w]=(0,s.useState)((()=>ze(p,[],x)));(0,s.useEffect)((()=>{p.length&&w((e=>ze(p,e,n?f.length:x)))}),[x,f,n,p]),(0,s.useEffect)((()=>{!n&&p.length&&b((e=>{if(e.length===x)return e;for(;e.length{r&&r({isValid:f.reduce(((e,{isValid:t})=>e&&t),!0),value:f.map((({value:e})=>e))})}),[f,r]);const y=(0,s.useCallback)((()=>A((e=>e+1))),[]),j=(0,s.useCallback)((()=>A((e=>e-1))),[]);return(0,a.jsxs)(M,{className:e,isOuter:!0,label:i,withLabel:m,children:[!n&&(0,a.jsxs)("div",{className:"ui--Param-Vector-buttons",children:[(0,a.jsx)(d.zx,{icon:"plus",label:h("Add item"),onClick:y}),(0,a.jsx)(d.zx,{icon:"minus",isDisabled:0===f.length,label:h("Remove item"),onClick:j})]}),(0,a.jsx)(g.ZP,{isDisabled:n,onChange:b,overrides:l,params:v,registry:c,values:f})]})}));var $e=n(65581);const He=s.memo((function({className:e="",defaultValue:t,isDisabled:n=!1,label:i,onChange:r,overrides:l,registry:c,type:d,withLabel:u}){const m=F(c,d),[h]=(0,s.useState)((()=>ze(m,[],m[0].length||1))),[p,f]=(0,s.useState)((()=>function(e){return e.value instanceof $e.$?e.value.map((e=>({isValid:!0,value:e}))):Ze(e)}(t)));return(0,s.useEffect)((()=>{!n&&m.length&&f((e=>{const t=m[0].length||1;if(e.length===t)return e;for(;e.length{r&&r({isValid:p.reduce(((e,{isValid:t})=>e&&t),!0),value:p.map((({value:e})=>e))})}),[p,r]),(0,a.jsx)(M,{className:e,isOuter:!0,label:i,withLabel:u,children:(0,a.jsx)(g.ZP,{isDisabled:n,onChange:f,overrides:l,params:h,registry:c,values:p})})}));var qe=n(70447),Ue=n(65968);const Qe={aye:!0,conviction:0},Oe=s.memo((function({className:e="",defaultValue:{value:t},isDisabled:n,isError:i,onChange:r,withLabel:o}){const{t:l}=(0,D.$)(),[u,h]=(0,s.useState)(Qe);(0,s.useEffect)((()=>{r&&r({isValid:!0,value:u})}),[r,u]);const p=(0,s.useCallback)((e=>h((({conviction:t})=>({aye:e,conviction:t})))),[]),g=(0,s.useCallback)((e=>h((({aye:t})=>({aye:t,conviction:e})))),[]),f=(0,s.useRef)([{text:l("Nay"),value:!1},{text:l("Aye"),value:!0}]),b=(0,s.useRef)([{text:l("None"),value:0},{text:l("Locked1x"),value:1},{text:l("Locked2x"),value:2},{text:l("Locked3x"),value:3},{text:l("Locked4x"),value:4},{text:l("Locked5x"),value:5},{text:l("Locked6x"),value:6}]),x=(0,c.H)(t)?!!(128&t.toNumber()):(0,Ue.h)(t)?!!(128&t):t instanceof qe.P?t.isAye:!!t,A=t instanceof qe.P?t.conviction.index:0;return(0,a.jsxs)(m.Z,{className:e,children:[(0,a.jsx)(d.Lt,{className:"full",defaultValue:x,isDisabled:n,isError:i,label:l("aye: bool"),onChange:p,options:f.current,withLabel:o}),(0,a.jsx)(d.Lt,{className:"full",defaultValue:A,isDisabled:n,isError:i,label:l("conviction: Conviction"),onChange:g,options:b.current,withLabel:o})]})}));var We=n(33661);const Ge=[{text:"Super majority approval",value:0},{text:"Super majority rejection",value:1},{text:"Simple majority",value:2}];Ge.reduce(((e,{text:t,value:n})=>(e[n]=t,e)),{});const Je=s.memo((function({className:e="",defaultValue:{value:t},isDisabled:n,isError:i,label:r,onChange:o,withLabel:l}){const c=(0,s.useCallback)((e=>o&&o({isValid:!0,value:e})),[o]),u=(0,s.useMemo)((()=>(0,We.m)(t.toNumber)?t.toNumber():(0,w.G)(t).toNumber()),[t]);return(0,a.jsx)(m.Z,{className:e,children:(0,a.jsx)(d.Lt,{className:"full",defaultValue:u,isDisabled:n,isError:i,label:r,onChange:c,options:Ge,withLabel:l})})})),Ke=["AccountId","AccountId20","AccountId32","AccountIndex","Address","Balance","BalanceOf","Vec"],Ye=["DispatchError","SpRuntimeDispatchError"],Xe=[{c:A,t:["AccountId","Address","LookupSource","MultiAddress"]},{c:y,t:["AccountIndex","i8","i16","i32","i64","i128","u8","u16","u32","u64","u128","u256"]},{c:j.Z,t:["Amount","Balance","BalanceOf"]},{c:L,t:["bool"]},{c:ee,t:["Bytes","Vec"]},{c:re,t:["Call","Proposal","RuntimeCall"]},{c:de,t:["PalletAllianceCid"]},{c:me,t:["Code"]},{c:he,t:Ye},{c:pe,t:["DispatchResult","Result"]},{c:Pe,t:["Raw","RuntimeSessionKeys","Keys"]},{c:b,t:["Enum"]},{c:fe,t:["Hash","H256"]},{c:ge,t:["H160"]},{c:be,t:["H512"]},{c:ve,t:["KeyValue"]},{c:je,t:["Vec"]},{c:ke,t:["Moment","MomentOf"]},{c:Ce,t:["Null"]},{c:Ne,t:["OpaqueCall"]},{c:Le,t:["Option"]},{c:Ve,t:["String","Text"]},{c:ce,t:["Struct"]},{c:Me,t:["Tuple"]},{c:R,t:["BTreeMap"]},{c:Re,t:["Vec","BTreeSet"]},{c:He,t:["VecFixed"]},{c:Oe,t:["Vote"]},{c:Je,t:["VoteThreshold"]},{c:ie,t:["Unknown"]}].reduce(((e,{c:t,t:n})=>(n.forEach((n=>{e[n]=t})),e)),{}),_e=[];function et({displayName:e,info:t,lookupName:n,sub:a,type:s}){if(e&&Ke.includes(e))return e;if(s.endsWith("RuntimeSessionKeys"))return"RuntimeSessionKeys";const i=n||s;switch(t){case l.u.Compact:return a.type;case l.u.Option:return"Option";case l.u.Enum:return"Enum";case l.u.Result:{const[,e]=a;return Ye.includes(e.lookupName||e.type)?"DispatchResult":i}case l.u.Struct:return"Struct";case l.u.BTreeSet:return"BTreeSet";case l.u.BTreeMap:return"BTreeMap";case l.u.Tuple:return Xe[s]===A?s:"Tuple";case l.u.Vec:return"Vec"===s?"Bytes":["Vec"].includes(s)?"Vec":"Vec";case l.u.VecFixed:return"u8"===a.type?s:"VecFixed";default:return i}}const tt=s.memo((function({className:e="",defaultValue:t,isDisabled:n,isError:d,isOptional:u,name:m,onChange:h,onEnter:p,onEscape:g,overrides:f,registry:b,type:x}){const A=(0,s.useMemo)((()=>function(e,t,n={}){if(["AccountId20","AccountId32"].includes(t.type)){const n=`AccountId${e.createType("AccountId").length}`;if(t.type!==n)return"AccountId20"===t.type?S:I}const a=e=>e?n[e]||Xe[e]:null,s=et(t);let r=a(t.lookupName)||a(t.type)||a(s);if(!r){try{const t=e.createType(s),n=(0,i.s)(t.toRawType());if(r=a(n.lookupName||n.type)||a(et(n)),r)return r;if((0,c.H)(t))return y}catch(e){console.error(`params: findComponent: ${e.message}`)}_e.includes(s)||(_e.push(s),console.info(`params: findComponent: No pre-defined component for type ${s} from ${l.u[t.info]}: ${JSON.stringify(t)}`))}return r||ie}(b,x,f)),[b,x,f]),v=(0,s.useMemo)((()=>{const e=(0,r.RH)(b,b.isLookupType(x.lookupName||x.type)?(0,i.s)(b.createType(x.type).toRawType()):x).replace(/"/g,"").replace(/\\/g,"").replace(/:Null/g,"").replace(/:/g,": ").replace(/,/g,", ").replace(/^{_alias: {.*}, /,"{");return`${(0,o.o)(m)?"":`${m}: `}${e}${x.typeName&&!e.includes(x.typeName)?` (${x.typeName})`:""}`}),[m,b,x]);return A?u?(0,a.jsx)(se,{defaultValue:t,isOptional:!0,label:"None"}):(0,a.jsx)(A,{className:`${e} ui--Param`,defaultValue:t,isDisabled:n,isError:d,label:v,name:m,onChange:h,onEnter:p,onEscape:g,overrides:f,registry:b,type:x},`${m||"unknown"}:${v}`):null})),nt=s.memo((function({defaultValue:e,index:t,isDisabled:n,isError:i,name:r,onChange:o,onEnter:l,onEscape:c,overrides:d,registry:u,type:m}){const h=(0,s.useCallback)((e=>o(t,e)),[t,o]);return(0,a.jsx)("div",{className:"ui--Param-composite",children:(0,a.jsx)(tt,{defaultValue:e,isDisabled:n,isError:i,name:r,onChange:h,onEnter:l,onEscape:c,overrides:d,registry:u,type:m},`input:${t}`)})}))},89176:(e,t,n)=>{n.d(t,{ZP:()=>h});var a=n(52322),s=n(2784),i=n(95267),r=n(64348),o=n(11147),l=n(37245),c=n(44605),d=n(37750),u=n(68202);class m extends s.PureComponent{state={params:null};static getDerivedStateFromProps({isDisabled:e,params:t=[],registry:n=i.statics.api.registry,values:a},s){return e||(0,o.P)(s.params)===(0,o.P)(t)?null:{params:t,values:t.reduce(((e,t,s)=>(e.push(a?.[s]?a[s]:(0,u.y)(n,t)),e)),[])}}componentDidMount(){this.componentDidUpdate(null,{})}componentDidUpdate(e,t){const{isDisabled:n}=this.props,{values:a}=this.state;n||(0,o.P)(t.values)===(0,o.P)(a)||this.triggerUpdate()}render(){const{children:e,className:t="",isDisabled:n,isError:s,onEnter:d,onEscape:u,overrides:m,params:h,registry:p=i.statics.api.registry,withBorder:g=!0,withExpander:f}=this.props,{values:b=this.props.values}=this.state;return b?.length?(0,a.jsx)(l.Z,{className:t,withBorder:g,withExpander:f,children:(0,a.jsx)(r.SV,{onError:this.onRenderError,children:(0,a.jsxs)("div",{className:"ui--Params-Content",children:[b&&h?.map((({name:e,type:t},i)=>(0,a.jsx)(c.Z,{defaultValue:b[i],index:i,isDisabled:n,isError:s,name:e,onChange:this.onChangeParam,onEnter:d,onEscape:u,overrides:m,registry:p,type:t},`${e||""}:${t.type.toString()}:${i}:${n?(0,o.P)(b[i]):""}`))),e]})})}):null}onChangeParam=(e,t)=>{const{isDisabled:n}=this.props;if(n)return;const{isValid:a=!1,value:s}=t;this.setState((t=>({values:(t.values||[]).map(((t,n)=>n!==e?t:{isValid:a,value:s}))})),this.triggerUpdate)};triggerUpdate=()=>{const{isDisabled:e,onChange:t}=this.props,{values:n}=this.state;!e&&n&&t&&t(n)};onRenderError=()=>{const{onError:e}=this.props;e&&e()}}const h=(0,d.Z)(m)},30590:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(6046),s=n(23601),i=n(95292),r=n(6485);const o=[];function l(e,t){if(t.info===s.u.Vec)return[l(e,t.sub)];if(t.info===s.u.Tuple)return Array.isArray(t.sub)?t.sub.map((t=>l(e,t))):[];if(t.info===s.u.Struct)return Array.isArray(t.sub)?t.sub.reduce(((t,n)=>(t[n.name||"unknown"]=l(e,n),t)),{}):{};if(t.info===s.u.Enum)return Array.isArray(t.sub)?{[t.sub[0].name||"unknown"]:l(e,t.sub[0])}:{};const n=[s.u.Compact,s.u.Option].includes(t.info)?t.sub.type:t.type;switch(n){case"AccountIndex":case"Balance":case"BalanceOf":case"BlockNumber":case"Compact":case"Gas":case"Index":case"Nonce":case"ParaId":case"PropIndex":case"ProposalIndex":case"ReferendumIndex":case"i8":case"i16":case"i32":case"i64":case"i128":case"u8":case"u16":case"u32":case"u64":case"u128":case"VoteIndex":case"Moment":return i.nw;case"bool":return!1;case"Bytes":case"AccountId":case"AccountId20":case"AccountId32":case"AccountIdOf":case"Address":case"Call":case"CandidateReceipt":case"Digest":case"Header":case"KeyValue":case"LookupSource":case"MisbehaviorReport":case"Proposal":case"RuntimeCall":case"Signature":case"SessionKey":case"StorageKey":case"ValidatorId":return;case"String":case"Text":case"Raw":case"Keys":return"";case"Vote":return-1;case"VoteThreshold":return 0;case"BlockHash":case"CodeHash":case"Hash":case"H256":return e.createType("H256");case"H512":return e.createType("H512");case"H160":return e.createType("H160");case"Extrinsic":return e.createType("Raw");case"Null":return null;default:{let c=null;try{const t=e.createType(n),o=(0,a.s)(t.toRawType());if((0,r.H)(t))return i.nw;if([s.u.Struct].includes(o.info))return;if([s.u.Enum,s.u.Tuple].includes(o.info))return l(e,o)}catch(e){c=e.message}return o.includes(n)||(o.push(n),c&&console.error(`params: initValue: ${c}`),console.info(`params: initValue: No default value for type ${n} from ${JSON.stringify(t)}, using defaults`)),"0x"}}}},48653:(e,t,n)=>{n.d(t,{_o:()=>i,fQ:()=>r,fr:()=>o,xS:()=>s});var a=n(40943);const s=["auctions.bid","balances.forceTransfer","balances.forceUnreserve","balances.setBalance","balances.transfer","balances.transferAllowDeath","balances.transferKeepAlive","bounties.proposeBounty","bounties.proposeCurator","childBounties.addChildBounty","childBounties.proposeCurator","claims.mintClaim","convictionVoting.delegate","convictionVoting.vote","crowdloan.contribute","crowdloan.create","crowdloan.edit","democracy.delegate","democracy.propose","democracy.vote","identity.requestJudgement","identity.setFee","nominationPools.bondExtra","nominationPools.create","nominationPools.createWithPoolId","nominationPools.join","nominationPools.unbond","phragmenElection.vote","society.bid","society.vouch","staking.bond","staking.bondExtra","staking.rebond","staking.unbond","tips.tip","tips.tipNew","treasury.proposeSpend","treasury.spend","vesting.forceVestedTransfer","vesting.vestedTransfer"],i=["auctions.BidAccepted","auctions.ReserveConfiscated","auctions.Reserved","auctions.Unreserved","balances.Deposit","balances.DustLost","balances.Endowed","balances.Transfer","balances.Unreserved","balances.Withdraw","bounties.BountyClaimed","bounties.BountyRejected","claims.Claimed","convictionVoting.Voted","crowdloan.Contributed","crowdloan.Withdrew","democracy.Voted","nominationPools.Bonded","nominationPools.PaidOut","nominationPools.PoolSlashed","nominationPools.Unbonded","nominationPools.UnbondingPoolSlashed","referenda.DecisionDepositPlaced","referenda.DecisionDepositRefunded","referenda.DepositSlashed","referenda.SubmissionDepositRefunded","staking.Bonded","staking.Rewarded","staking.Unbonded","staking.Withdrawn","transactionPayment.TransactionFeePaid","treasury.Deposit"],r={"Compact":a.Z,u128:a.Z},o=r},37750:(e,t,n)=>{n.d(t,{$:()=>s,Z:()=>i});var a=n(61349);function s(){return(0,a.$G)("react-params")}function i(e){return(0,a.Zh)(["react-params"])(e)}},67292:(e,t,n)=>{n.d(t,{c:()=>r,h:()=>i});var a=n(33990),s=n(55858);function i(e){try{const{code:t,multihash:{code:n,digest:i},version:r}=a.k0.parse(e);return{codec:t,hash:{code:n,digest:(0,s.c)(i)},version:r}}catch(t){return console.error(`fromIpfsCid: ${t.message}::`,e),null}}function r(e){try{const{codec:t,hash_:{code:n,digest:s},version:i}=e,r=s.toU8a(!0),o=a.PP.encodingLength(n.toNumber()),l=a.PP.encodingLength(r.length),c=new Uint8Array(o+l+r.length);return a.PP.encodeTo(n.toNumber(),c,0),a.PP.encodeTo(r.length,c,o),c.set(r,o+l),a.k0.create(i.index,t.toNumber(),a.uR.decode(c)).toString()}catch(t){return console.error(`toIpfsCid: ${t.message}::`,e.toHuman()),null}}},83488:(e,t,n)=>{n.d(t,{Z:()=>g,k:()=>p});var a=n(52322),s=(n(2784),n(64348)),i=n(49754),r=n(37602),o=n(33661),l=n(11147),c=n(17751),d=n(1346),u=n(55858);function m({className:e="",key:t},...n){return{cName:`${e} ui--Param-text`,key:t,values:n}}function h(e){return(0,o.m)(e.toHuman)?e.toHuman():Array.isArray(e)?e.map((e=>h(e))):e.toString()}function p(e){return(0,l.P)(e,2).replace(/,\n/g,"\n").replace(/"/g,"").replace(/\\/g,"").replace(/\],\[/g,"],\n[")}function g(e,t){if((0,c.F)(t)||(0,d.o)(t)){const{cName:e,key:t,values:n}=m({},"");return(0,a.jsx)("div",{className:e,children:n},t)}const n=["Bytes","Raw","Option","Keys"].includes(e)&&(0,o.m)(t.toU8a)?(0,u.c)(t.toU8a(!0)):"Vec<(ValidatorId,Keys)>"===e?p((l=t,JSON.stringify(l.map((([e,t])=>[e.toString(),t.toHex()]))))):t instanceof i.N?t.isEmpty?"":t.toString():t instanceof r.W&&t.isNone?"":p(h(t));var l;const{cName:g,key:f,values:b}=m({},n);return(0,a.jsxs)("div",{className:g,children:[b,(0,a.jsx)(s.qi,{value:n})]},f)}},68202:(e,t,n)=>{n.d(t,{y:()=>i});var a=n(1346),s=n(30590);function i(e,t){const n=(0,s.Z)(e,t.type);return{isValid:!(0,a.o)(n),value:n}}},67609:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(52322),s=n(2784),i=n(90778),r=n(9118),o=n(58607);const l=s.memo((function({children:e,className:t="",label:n,params:s}){const{api:l}=(0,i.h)(),c=(0,r.W7)(l.derive.balances?.all,[s]);return(0,a.jsx)(o.Z,{className:t,label:n,value:c?.availableBalance,children:e})}))},36609:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(52322),s=n(2784),i=n(90778),r=n(9118),o=n(58607);const l=s.memo((function({children:e,className:t="",label:n,params:s}){const{api:l}=(0,i.h)(),c=(0,r.W7)(l.derive.balances?.all,[s]);return(0,a.jsx)(o.Z,{className:t,label:n,value:c?.freeBalance,children:e})}))},26839:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(52322),s=n(2784),i=n(90778),r=n(9118),o=n(14681);const l=s.memo((function({children:e,className:t="",label:n}){const{api:s}=(0,i.h)(),l=(0,r.W7)(s.derive.chain.bestNumberFinalized);return(0,a.jsxs)("div",{className:`${t} ${l?"":"--tmp"}`,children:[n||"",(0,a.jsx)("span",{className:"--digits",children:(0,o.u)(l||1234)}),e]})}))},95689:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(52322),s=n(2784),i=n(90778),r=n(9118),o=n(14681);const l=s.memo((function({children:e,className:t="",isFinalized:n,label:s,withPound:l}){const{api:c,isApiReady:d}=(0,i.h)(),u=(0,r.W7)(d&&(n?c.derive.chain.bestNumberFinalized:c.derive.chain.bestNumber));return(0,a.jsxs)("div",{className:`${t} ${u?"":"--tmp"}`,children:[s||"",l&&"#",(0,a.jsx)("span",{className:"--digits",children:(0,o.u)(u||1234)}),e]})}))},65874:(e,t,n)=>{n.d(t,{Z:()=>l});var a=n(52322),s=n(2784),i=n(21779),r=n(97794);const o=i.z.div` &.isInline { display: inline-block; } diff --git a/index.html b/index.html index 6dd21bc76337..f5ad92b5fcb6 100644 --- a/index.html +++ b/index.html @@ -124,7 +124,7 @@ opacity: 0.15; } - +
diff --git a/main.4804c7c8f81f992a.js b/main.17754aa738498eed.js similarity index 99% rename from main.4804c7c8f81f992a.js rename to main.17754aa738498eed.js index 3b194ddda973..5263130a36a6 100644 --- a/main.4804c7c8f81f992a.js +++ b/main.17754aa738498eed.js @@ -308,7 +308,7 @@ } } } -`,At=g.memo((function({className:e="",isActive:n,name:t,routes:i}){return 1===i.length&&"settings"===i[0].group?(0,r.jsx)(kt,{className:n?"isActive":"",classNameText:"smallHide",isToplevel:!0,route:i[0]}):(0,r.jsxs)(jt,{className:`${e} ${n?"isActive":""}`,children:[(0,r.jsxs)("div",{className:"groupHdr "+(n?"":"highlight--color-contrast"),children:[(0,r.jsx)("span",{className:"smallHide",children:t}),(0,r.jsx)(A.JO,{className:"smallShow",icon:i[0].icon}),(0,r.jsx)(A.JO,{icon:"caret-down"})]}),(0,r.jsx)("ul",{className:"groupMenu",children:i.map((e=>(0,r.jsx)(kt,{route:e},e.name)))})]})}));var Nt=t(39082),It=t(52727);const St=`apps v${"0.138.2-13-x".replace("-x","")}`,Zt=A.zo.div` +`,At=g.memo((function({className:e="",isActive:n,name:t,routes:i}){return 1===i.length&&"settings"===i[0].group?(0,r.jsx)(kt,{className:n?"isActive":"",classNameText:"smallHide",isToplevel:!0,route:i[0]}):(0,r.jsxs)(jt,{className:`${e} ${n?"isActive":""}`,children:[(0,r.jsxs)("div",{className:"groupHdr "+(n?"":"highlight--color-contrast"),children:[(0,r.jsx)("span",{className:"smallHide",children:t}),(0,r.jsx)(A.JO,{className:"smallShow",icon:i[0].icon}),(0,r.jsx)(A.JO,{icon:"caret-down"})]}),(0,r.jsx)("ul",{className:"groupMenu",children:i.map((e=>(0,r.jsx)(kt,{route:e},e.name)))})]})}));var Nt=t(39082),It=t(52727);const St=`apps v${"0.138.2-14-x".replace("-x","")}`,Zt=A.zo.div` background: transparent; font-size: var(--font-size-tiny); line-height: 1.2; diff --git a/page.766fa1d9fa2dba5a.js b/page.26d77fad80fe0bf1.js similarity index 98% rename from page.766fa1d9fa2dba5a.js rename to page.26d77fad80fe0bf1.js index 21018b2f2643..8363e80d0614 100644 --- a/page.766fa1d9fa2dba5a.js +++ b/page.26d77fad80fe0bf1.js @@ -189,7 +189,7 @@ .ui--Output > label { text-transform: none; } -`,u=n.memo((function({queue:e=[]}){const s=e.filter((({error:e,result:s})=>!(0,c.o)(e)||!(0,c.o)(s))).reverse();return s.length?(0,a.jsx)(d,{className:"rpc--Results",children:s.map((({error:e,id:s,result:t,rpc:{method:n,section:o,type:i}})=>(0,a.jsx)(r.r_,{isError:!!e,label:`${s}: ${o}.${n}: ${i}`,value:e?e.message:(0,a.jsx)("pre",{children:(0,l.Z)("",t)})},s)))}):null}));var m=t(89176),h=t(6046),p=t(13529),x=t(17751),g=t(61349);function f(){return(0,g.$G)("app-rpc")}const b=p.Z.author.submitExtrinsic,j=n.memo((function({queueRpc:e}){const{t:s}=f(),[{isValid:t,rpc:o,values:i},l]=(0,n.useState)({isValid:!1,rpc:b,values:[]}),c=(0,n.useMemo)((()=>o.params.map((({isOptional:e,name:s,type:t})=>({name:s,type:(0,h.s)(e?`Option<${t}>`:t)})))),[o]),d=(0,n.useCallback)((e=>l((s=>{const{rpc:t=s.rpc,values:a=s.values}=e,n=t.params.reduce(((e,{isOptional:s})=>e+(s?0:1)),0);return{isValid:a.reduce(((e,s)=>e&&!0===s.isValid),n<=a.length),rpc:t,values:a}}))),[]),u=(0,n.useCallback)((e=>d({rpc:e,values:[]})),[d]),p=(0,n.useCallback)((e=>d({values:e})),[d]),g=(0,n.useCallback)((()=>e({rpc:o,values:i.filter((({value:e})=>!(0,x.F)(e))).map((({value:e})=>e))})),[e,o,i]);return(0,a.jsxs)("section",{className:"rpc--Selection",children:[(0,a.jsx)(r.iQ,{defaultValue:b,label:s("call the selected endpoint"),onChange:u}),(0,a.jsx)(m.ZP,{onChange:p,params:c},`${o.section}.${o.method}:params`),(0,a.jsx)(r.zx.Group,{children:(0,a.jsx)(r.zx,{icon:"sign-in-alt",isDisabled:!t,label:s("Submit RPC call"),onClick:g})})]})})),v=n.memo((function(){const{queueRpc:e,txqueue:s}=(0,i.L)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j,{queueRpc:e}),(0,a.jsx)(u,{queue:s})]})})),y=n.memo((function({basePath:e}){const{t:s}=f(),t=(0,n.useRef)([{isRoot:!0,name:"rpc",text:s("Submission")}]);return(0,a.jsxs)("main",{className:"rpc--App",children:[(0,a.jsx)(r.mQ,{basePath:e,items:t.current}),(0,a.jsx)(o.Z5,{children:(0,a.jsx)(o.AW,{path:e,children:(0,a.jsx)(o.AW,{element:(0,a.jsx)(v,{}),index:!0})})})]})}))},39117:(e,s,t)=>{t.d(s,{Z:()=>f});var a=t(52322),n=t(2784),o=t(73557),r=t(64348),i=t(90778),l=t(83488);const c=n.memo((function({results:e}){return e.length?(0,a.jsx)("section",{className:"runtime--Results",children:e.map((({def:{method:e,section:s,type:t},error:n,id:o,result:i})=>(0,a.jsx)(r.r_,{isError:!!n,label:`${o}: ${s}.${e}: ${t}`,value:n?n.message:(0,a.jsx)("pre",{children:(0,l.Z)("",i)})},o)))}):null}));var d=t(89176),u=t(6046),m=t(61349);function h(){return(0,m.$G)("app-runtime")}const p=n.memo((function({onSubmit:e}){const{t:s}=h(),[{isValid:t,method:o,values:i},l]=(0,n.useState)({isValid:!1,method:null,values:[]}),c=(0,n.useMemo)((()=>o?o.params.map((({name:e,type:s})=>({name:e,type:(0,u.s)(s)}))):[]),[o]),m=(0,n.useCallback)((e=>l((s=>{const{method:t=s.method,values:a=s.values}=e;return{isValid:a.reduce(((e,s)=>e&&!0===s.isValid),!!t&&t.params.length<=a.length),method:t,values:a}}))),[]),p=(0,n.useCallback)((e=>m({method:e,values:[]})),[m]),x=(0,n.useCallback)((e=>m({values:e})),[m]),g=(0,n.useCallback)((()=>{o&&e(o,i)}),[e,o,i]);return(0,a.jsxs)("section",{className:"runtime--Selection",children:[(0,a.jsx)(r.$q,{label:s("call the selected endpoint"),onChange:p}),o&&(0,a.jsx)(d.ZP,{onChange:x,params:c},`${o.section}.${o.method}:params`),(0,a.jsx)(r.zx.Group,{children:(0,a.jsx)(r.zx,{icon:"sign-in-alt",isDisabled:!t||!o,label:s("Submit Runtime call"),onClick:g})})]})}));let x=0;const g=n.memo((function(){const{api:e}=(0,i.h)(),[s,t]=(0,n.useState)([]),o=(0,n.useCallback)((e=>t((s=>[e].concat(...s)))),[]),r=(0,n.useCallback)(((s,t)=>{e.call[s.section][s.method](...t.map((({value:e})=>e))).then((e=>o({def:s,id:++x,result:e}))).catch((e=>{o({def:s,error:e,id:++x}),console.error(e)}))}),[e,o]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p,{onSubmit:r}),(0,a.jsx)(c,{results:s})]})})),f=n.memo((function({basePath:e}){const{t:s}=h(),t=(0,n.useRef)([{isRoot:!0,name:"runtime",text:s("Calls")}]);return(0,a.jsxs)("main",{className:"runtime--App",children:[(0,a.jsx)(r.mQ,{basePath:e,items:t.current}),(0,a.jsx)(o.Z5,{children:(0,a.jsx)(o.AW,{path:e,children:(0,a.jsx)(o.AW,{element:(0,a.jsx)(g,{}),index:!0})})})]})}))},14673:(e,s,t)=>{t.d(s,{Z:()=>N});var a=t(52322),n=t(2784),o=t(64348),r=t(90778),i=t(54383),l=t(9118),c=t(71679),d=t(92914),u=t(65874),m=t(14681);const h=n.memo((function({value:{at:e,image:s,imageHash:t,index:n}}){const r=(0,i.C)();return(0,a.jsxs)("tr",{children:[(0,a.jsx)(o.iA.Column.Id,{value:n}),(0,a.jsx)(d.Z,{imageHash:t,proposal:s?.proposal}),(0,a.jsx)("td",{className:"number together",children:r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Z,{value:e.sub(r)}),"#",(0,m.u)(e)]})}),(0,a.jsx)("td",{className:"button",children:!s?.proposal&&(0,a.jsx)(c.Z,{imageHash:t,isImminent:!0})}),(0,a.jsx)("td",{className:"links media--1000",children:(0,a.jsx)(o.NR,{data:n,type:"democracyReferendum"})})]})}));var p=t(61349);function x(){return(0,p.$G)("app-scheduler")}const g=n.memo((function({className:e}){const{t:s}=x(),{api:t}=(0,r.h)(),c=(0,i.C)(),d=(0,l.W7)(t.derive.democracy.dispatchQueue),u=(0,n.useMemo)((()=>c&&d?.filter((({at:e})=>e.gte(c))).sort(((e,s)=>e.at.cmp(s.at)))),[c,d]),m=(0,n.useRef)([[s("dispatch queue"),"start",2],[s("enact")],[],[void 0,"media--1000"]]);return(0,a.jsx)(o.iA,{className:e,empty:u&&s("Nothing queued for execution"),header:m.current,children:u?.map((e=>(0,a.jsx)(h,{value:e},e.index.toString())))})}));var f=t(74525),b=t(31313),j=t(15991);const v=n.memo((function({bestNumber:e,className:s="",value:{blockNumber:t,call:n,maybeId:o,maybePeriodic:r,preimageHash:i}}){const l=(0,b.CH)(i),c=r.unwrapOr(null),d=o.unwrapOr(null);return(0,a.jsxs)("tr",{className:s,children:[(0,a.jsx)("td",{className:"all",children:(0,a.jsx)(j.Z,{value:n||l?.proposal})}),d?d.isAscii?(0,a.jsx)("td",{className:"start",children:d.toUtf8()}):(0,a.jsx)(f.Z,{value:d.toHex()}):(0,a.jsx)("td",{}),(0,a.jsx)("td",{className:"number together",children:e&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Z,{value:t.sub(e)}),"#",(0,m.u)(t)]})}),(0,a.jsx)("td",{className:"number together",children:c&&(0,m.u)(c[0])}),(0,a.jsx)("td",{className:"number together",children:c&&(0,m.u)(c[1])})]})})),y={transform:(e,s)=>e.filter((([,e])=>e.some((e=>e.isSome)))).reduce(((e,[t,a])=>{const n=t.args[0];return a.filter((e=>e.isSome)).map((e=>e.unwrap())).reduce(((e,{call:t,maybeId:a,maybePeriodic:o,priority:r},i)=>{let l,c=null;if(t.inner)if(t.isValue)c=t.asValue;else if(t.isInline)try{c=s.registry.createType("Call",t.asInline.toHex())}catch(e){console.error(e)}else t.isLookup&&(l=t);else c=t;return e.push({blockNumber:n,call:c,key:`${n.toString()}-${i}`,maybeId:a,maybePeriodic:o,preimageHash:l,priority:r}),e}),e)}),[])},w=n.memo((function({className:e=""}){const{t:s}=x(),{api:t}=(0,r.h)(),c=(0,i.C)(),d=(0,l.W7)(t.query.scheduler.agenda.entries,void 0,y),u=(0,n.useMemo)((()=>c&&d?.filter((({blockNumber:e})=>e.gte(c))).sort(((e,s)=>e.blockNumber.cmp(s.blockNumber)))),[c,d]),m=(0,n.useRef)([[s("scheduled"),"start"],[s("id"),"start"],[s("remaining")],[s("period")],[s("count")]]);return(0,a.jsx)(o.iA,{className:e,empty:u&&s("No active schedules"),header:m.current,children:u?.map((e=>(0,a.jsx)(v,{bestNumber:c,value:e},e.key)))})})),N=n.memo((function({basePath:e,className:s}){const{t}=x(),{api:i}=(0,r.h)(),l=(0,n.useMemo)((()=>[{isRoot:!0,name:"overview",text:t("Overview")}]),[t]);return(0,a.jsxs)("main",{className:s,children:[(0,a.jsx)(o.mQ,{basePath:e,items:l}),i.query.democracy&&(0,a.jsx)(g,{}),i.query.scheduler&&(0,a.jsx)(w,{})]})}))},19433:(e,s,t)=>{t.d(s,{Z:()=>de});var a=t(52322),n=t(2784),o=t(73557),r=t(64348),i=t(90778),l=t(46782),c=t.n(l),d=t(94953),u=t(54926),m=t(38894),h=t(16039),p=t(61349);function x(){return(0,p.$G)("app-settings")}const g=r.zo.div` +`,u=n.memo((function({queue:e=[]}){const s=e.filter((({error:e,result:s})=>!(0,c.o)(e)||!(0,c.o)(s))).reverse();return s.length?(0,a.jsx)(d,{className:"rpc--Results",children:s.map((({error:e,id:s,result:t,rpc:{method:n,section:o,type:i}})=>(0,a.jsx)(r.r_,{isError:!!e,label:`${s}: ${o}.${n}: ${i}`,value:e?e.message:(0,a.jsx)("pre",{children:(0,l.Z)("",t)})},s)))}):null}));var m=t(89176),h=t(6046),p=t(13529),x=t(17751),g=t(61349);function f(){return(0,g.$G)("app-rpc")}const b=p.Z.author.submitExtrinsic,j=n.memo((function({queueRpc:e}){const{t:s}=f(),[{isValid:t,rpc:o,values:i},l]=(0,n.useState)({isValid:!1,rpc:b,values:[]}),c=(0,n.useMemo)((()=>o.params.map((({isOptional:e,name:s,type:t})=>({name:s,type:(0,h.s)(e?`Option<${t}>`:t)})))),[o]),d=(0,n.useCallback)((e=>l((s=>{const{rpc:t=s.rpc,values:a=s.values}=e,n=t.params.reduce(((e,{isOptional:s})=>e+(s?0:1)),0);return{isValid:a.reduce(((e,s)=>e&&!0===s.isValid),n<=a.length),rpc:t,values:a}}))),[]),u=(0,n.useCallback)((e=>d({rpc:e,values:[]})),[d]),p=(0,n.useCallback)((e=>d({values:e})),[d]),g=(0,n.useCallback)((()=>e({rpc:o,values:i.filter((({value:e},s)=>!o.params[s].isOptional||!(0,x.F)(e))).map((({value:e})=>e))})),[e,o,i]);return(0,a.jsxs)("section",{className:"rpc--Selection",children:[(0,a.jsx)(r.iQ,{defaultValue:b,label:s("call the selected endpoint"),onChange:u}),(0,a.jsx)(m.ZP,{onChange:p,params:c},`${o.section}.${o.method}:params`),(0,a.jsx)(r.zx.Group,{children:(0,a.jsx)(r.zx,{icon:"sign-in-alt",isDisabled:!t,label:s("Submit RPC call"),onClick:g})})]})})),v=n.memo((function(){const{queueRpc:e,txqueue:s}=(0,i.L)();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j,{queueRpc:e}),(0,a.jsx)(u,{queue:s})]})})),y=n.memo((function({basePath:e}){const{t:s}=f(),t=(0,n.useRef)([{isRoot:!0,name:"rpc",text:s("Submission")}]);return(0,a.jsxs)("main",{className:"rpc--App",children:[(0,a.jsx)(r.mQ,{basePath:e,items:t.current}),(0,a.jsx)(o.Z5,{children:(0,a.jsx)(o.AW,{path:e,children:(0,a.jsx)(o.AW,{element:(0,a.jsx)(v,{}),index:!0})})})]})}))},39117:(e,s,t)=>{t.d(s,{Z:()=>f});var a=t(52322),n=t(2784),o=t(73557),r=t(64348),i=t(90778),l=t(83488);const c=n.memo((function({results:e}){return e.length?(0,a.jsx)("section",{className:"runtime--Results",children:e.map((({def:{method:e,section:s,type:t},error:n,id:o,result:i})=>(0,a.jsx)(r.r_,{isError:!!n,label:`${o}: ${s}.${e}: ${t}`,value:n?n.message:(0,a.jsx)("pre",{children:(0,l.Z)("",i)})},o)))}):null}));var d=t(89176),u=t(6046),m=t(61349);function h(){return(0,m.$G)("app-runtime")}const p=n.memo((function({onSubmit:e}){const{t:s}=h(),[{isValid:t,method:o,values:i},l]=(0,n.useState)({isValid:!1,method:null,values:[]}),c=(0,n.useMemo)((()=>o?o.params.map((({name:e,type:s})=>({name:e,type:(0,u.s)(s)}))):[]),[o]),m=(0,n.useCallback)((e=>l((s=>{const{method:t=s.method,values:a=s.values}=e;return{isValid:a.reduce(((e,s)=>e&&!0===s.isValid),!!t&&t.params.length<=a.length),method:t,values:a}}))),[]),p=(0,n.useCallback)((e=>m({method:e,values:[]})),[m]),x=(0,n.useCallback)((e=>m({values:e})),[m]),g=(0,n.useCallback)((()=>{o&&e(o,i)}),[e,o,i]);return(0,a.jsxs)("section",{className:"runtime--Selection",children:[(0,a.jsx)(r.$q,{label:s("call the selected endpoint"),onChange:p}),o&&(0,a.jsx)(d.ZP,{onChange:x,params:c},`${o.section}.${o.method}:params`),(0,a.jsx)(r.zx.Group,{children:(0,a.jsx)(r.zx,{icon:"sign-in-alt",isDisabled:!t||!o,label:s("Submit Runtime call"),onClick:g})})]})}));let x=0;const g=n.memo((function(){const{api:e}=(0,i.h)(),[s,t]=(0,n.useState)([]),o=(0,n.useCallback)((e=>t((s=>[e].concat(...s)))),[]),r=(0,n.useCallback)(((s,t)=>{e.call[s.section][s.method](...t.map((({value:e})=>e))).then((e=>o({def:s,id:++x,result:e}))).catch((e=>{o({def:s,error:e,id:++x}),console.error(e)}))}),[e,o]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p,{onSubmit:r}),(0,a.jsx)(c,{results:s})]})})),f=n.memo((function({basePath:e}){const{t:s}=h(),t=(0,n.useRef)([{isRoot:!0,name:"runtime",text:s("Calls")}]);return(0,a.jsxs)("main",{className:"runtime--App",children:[(0,a.jsx)(r.mQ,{basePath:e,items:t.current}),(0,a.jsx)(o.Z5,{children:(0,a.jsx)(o.AW,{path:e,children:(0,a.jsx)(o.AW,{element:(0,a.jsx)(g,{}),index:!0})})})]})}))},14673:(e,s,t)=>{t.d(s,{Z:()=>N});var a=t(52322),n=t(2784),o=t(64348),r=t(90778),i=t(54383),l=t(9118),c=t(71679),d=t(92914),u=t(65874),m=t(14681);const h=n.memo((function({value:{at:e,image:s,imageHash:t,index:n}}){const r=(0,i.C)();return(0,a.jsxs)("tr",{children:[(0,a.jsx)(o.iA.Column.Id,{value:n}),(0,a.jsx)(d.Z,{imageHash:t,proposal:s?.proposal}),(0,a.jsx)("td",{className:"number together",children:r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Z,{value:e.sub(r)}),"#",(0,m.u)(e)]})}),(0,a.jsx)("td",{className:"button",children:!s?.proposal&&(0,a.jsx)(c.Z,{imageHash:t,isImminent:!0})}),(0,a.jsx)("td",{className:"links media--1000",children:(0,a.jsx)(o.NR,{data:n,type:"democracyReferendum"})})]})}));var p=t(61349);function x(){return(0,p.$G)("app-scheduler")}const g=n.memo((function({className:e}){const{t:s}=x(),{api:t}=(0,r.h)(),c=(0,i.C)(),d=(0,l.W7)(t.derive.democracy.dispatchQueue),u=(0,n.useMemo)((()=>c&&d?.filter((({at:e})=>e.gte(c))).sort(((e,s)=>e.at.cmp(s.at)))),[c,d]),m=(0,n.useRef)([[s("dispatch queue"),"start",2],[s("enact")],[],[void 0,"media--1000"]]);return(0,a.jsx)(o.iA,{className:e,empty:u&&s("Nothing queued for execution"),header:m.current,children:u?.map((e=>(0,a.jsx)(h,{value:e},e.index.toString())))})}));var f=t(74525),b=t(31313),j=t(15991);const v=n.memo((function({bestNumber:e,className:s="",value:{blockNumber:t,call:n,maybeId:o,maybePeriodic:r,preimageHash:i}}){const l=(0,b.CH)(i),c=r.unwrapOr(null),d=o.unwrapOr(null);return(0,a.jsxs)("tr",{className:s,children:[(0,a.jsx)("td",{className:"all",children:(0,a.jsx)(j.Z,{value:n||l?.proposal})}),d?d.isAscii?(0,a.jsx)("td",{className:"start",children:d.toUtf8()}):(0,a.jsx)(f.Z,{value:d.toHex()}):(0,a.jsx)("td",{}),(0,a.jsx)("td",{className:"number together",children:e&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Z,{value:t.sub(e)}),"#",(0,m.u)(t)]})}),(0,a.jsx)("td",{className:"number together",children:c&&(0,m.u)(c[0])}),(0,a.jsx)("td",{className:"number together",children:c&&(0,m.u)(c[1])})]})})),y={transform:(e,s)=>e.filter((([,e])=>e.some((e=>e.isSome)))).reduce(((e,[t,a])=>{const n=t.args[0];return a.filter((e=>e.isSome)).map((e=>e.unwrap())).reduce(((e,{call:t,maybeId:a,maybePeriodic:o,priority:r},i)=>{let l,c=null;if(t.inner)if(t.isValue)c=t.asValue;else if(t.isInline)try{c=s.registry.createType("Call",t.asInline.toHex())}catch(e){console.error(e)}else t.isLookup&&(l=t);else c=t;return e.push({blockNumber:n,call:c,key:`${n.toString()}-${i}`,maybeId:a,maybePeriodic:o,preimageHash:l,priority:r}),e}),e)}),[])},w=n.memo((function({className:e=""}){const{t:s}=x(),{api:t}=(0,r.h)(),c=(0,i.C)(),d=(0,l.W7)(t.query.scheduler.agenda.entries,void 0,y),u=(0,n.useMemo)((()=>c&&d?.filter((({blockNumber:e})=>e.gte(c))).sort(((e,s)=>e.blockNumber.cmp(s.blockNumber)))),[c,d]),m=(0,n.useRef)([[s("scheduled"),"start"],[s("id"),"start"],[s("remaining")],[s("period")],[s("count")]]);return(0,a.jsx)(o.iA,{className:e,empty:u&&s("No active schedules"),header:m.current,children:u?.map((e=>(0,a.jsx)(v,{bestNumber:c,value:e},e.key)))})})),N=n.memo((function({basePath:e,className:s}){const{t}=x(),{api:i}=(0,r.h)(),l=(0,n.useMemo)((()=>[{isRoot:!0,name:"overview",text:t("Overview")}]),[t]);return(0,a.jsxs)("main",{className:s,children:[(0,a.jsx)(o.mQ,{basePath:e,items:l}),i.query.democracy&&(0,a.jsx)(g,{}),i.query.scheduler&&(0,a.jsx)(w,{})]})}))},19433:(e,s,t)=>{t.d(s,{Z:()=>de});var a=t(52322),n=t(2784),o=t(73557),r=t(64348),i=t(90778),l=t(46782),c=t.n(l),d=t(94953),u=t(54926),m=t(38894),h=t(16039),p=t(61349);function x(){return(0,p.$G)("app-settings")}const g=r.zo.div` .label { font-style: italic; margin-top: 0.5rem; @@ -975,4 +975,4 @@ margin-top: 0.75rem; } } -`,_=n.memo((function({className:e="",defaultId:s,hashes:t,isMember:o,members:l,onSelectTip:c}){const{t:u}=p(),{api:m}=(0,i.h)(),[h,x]=(0,n.useState)(!1),g=(0,y.C)(),f=(0,d.W7)(t&&(m.query.tips||m.query.treasury).tips.multi,[t],R),b=(0,n.useMemo)((()=>function(e,s){if(!e||!s)return;const[[t],a]=e;return a.map(((e,s)=>[t[s],e.unwrapOr(null)])).filter((e=>s.includes(e[0])&&!!e[1])).sort(((e,s)=>e[1].closes.isNone?s[1].closes.isNone?0:-1:s[1].closes.isSome?s[1].closes.unwrap().cmp(e[1].closes.unwrap()):1))}(f,t)),[t,f]),j=(0,n.useRef)([[u("tips"),"start"],[u("finder"),"address media--1400"],[u("reason"),"start"],[void 0,"media--1100"],[],[void 0,"badge media--1700"],[],[void 0,"media--1700"]]);return(0,a.jsx)(B,{className:e,empty:b&&u("No open tips"),filter:o&&(0,a.jsx)("div",{className:"tipsFilter",children:(0,a.jsx)(r.ZD,{label:u("show only untipped/closing"),onChange:x,value:h})}),header:j.current,children:b?.map((([e,t])=>(0,a.jsx)(V,{bestNumber:g,defaultId:s,hash:e,isMember:o,members:l,onSelect:c,onlyUntipped:h,tip:t},e)))})})),Z={quickTips:{},quickTxs:[]},L=n.memo((function({className:e,hashes:s,isMember:t,members:o}){const{t:l}=p(),{allAccounts:c}=(0,I.x)(),{api:d}=(0,i.h)(),[{quickTxs:u},m]=(0,n.useState)(Z),h=(0,A.b)(u),x=(0,n.useMemo)((()=>o.find((e=>c.includes(e)))||null),[c,o]),g=(0,n.useCallback)(((e,s,t)=>m((({quickTips:a})=>(a[e]=s?t:null,{quickTips:a,quickTxs:Object.entries(a).map((([e,s])=>s&&(d.tx.tips||d.tx.treasury).tip(e,s))).filter((e=>!!e))})))),[d]);return(0,a.jsxs)("div",{className:e,children:[(0,a.jsxs)(r.zx.Group,{children:[(0,a.jsx)(P,{members:o}),(0,a.jsx)(r.cA,{accountId:x,extrinsic:h,icon:"fighter-jet",isDisabled:!t||!h,label:l("Median tip selected")})]}),(0,a.jsx)(_,{defaultId:x,hashes:s,isMember:t,members:o,onSelectTip:g})]})}));var W=t(24305),$=t(12298),z=t(11677);const H={transform:e=>e.map((({args:[e]})=>e.toHex()))},U=(0,z.e)("useTipHashes",(function(){const{api:e}=(0,i.h)(),s=(0,W.b)([e.events.tips?.NewTip,e.events.tips?.TipClosed,e.events.tips?.TipRetracted]);return(0,$.k)((e.query.tips||e.query.treasury)?.tips,[],H,s.blockHash)})),J=n.memo((function({basePath:e}){const{t:s}=p(),{api:t}=(0,i.h)(),{isMember:d,members:u}=(0,l.V)("council"),m=U(),h=(0,n.useMemo)((()=>[{isRoot:!0,name:"overview",text:s("Overview")},(0,c.m)((t.query.tips||t.query.treasury)?.tips)&&{count:m?.length,name:"tips",text:s("Tips")}].filter((e=>!!e))),[t,s,m]);return(0,a.jsxs)("main",{className:"treasury--App",children:[(0,a.jsx)(r.mQ,{basePath:e,items:h}),(0,a.jsx)(o.Z5,{children:(0,a.jsxs)(o.AW,{path:e,children:[(0,a.jsx)(o.AW,{element:(0,a.jsx)(L,{hashes:m,isMember:d,members:u}),path:"tips"}),(0,a.jsx)(o.AW,{element:(0,a.jsx)(S,{isMember:d,members:u}),index:!0})]})})]})}))},9039:(e,s,t)=>{t.d(s,{Z:()=>i});var a=t(2784),n=t(34814),o=t(90778),r=t(9118);const i=(0,t(11677).e)("useCounter",(function(){const{hasAccounts:e}=(0,n.x)(),{api:s,isApiReady:t}=(0,o.h)(),i=(0,r.W7)(t&&e&&s.derive.treasury?.proposals);return(0,a.useMemo)((()=>i?.proposals.length||0),[i])}))},27008:(e,s,t)=>{t.d(s,{Z:()=>D});var a=t(52322),n=t(2784),o=t(73557),r=t(64348),i=t(35189),l=t(9242),c=t(72570),d=t(90778),u=t(55858),m=t(14681),h=t(61162),p=t(70416),x=t(66850),g=t(94175),f=t(90107),b=t(61349);function j(){return(0,b.$G)("app-utilities")}const v=n.memo((function({className:e}){const{t:s}=j(),{chainSS58:t}=(0,d.h)(),[{inputSS58:o,publicKey:b},v]=(0,n.useState)({inputSS58:42,publicKey:null}),[y,w]=(0,n.useState)(-1),N=(0,n.useCallback)((e=>v(function(e){try{if(e&&(0,h.U)(e)){const s=(0,p.MW)(e),[,,,t]=(0,x.l)(s),a=(0,g.m)(e);return{inputSS58:t,publicKey:(0,u.c)(a)}}}catch{}return{inputSS58:42,publicKey:null}}(e))),[]),k=(0,n.useMemo)((()=>{const e=c.FA.find((({prefix:e})=>e===t));return(0,l.M)(s).map((s=>(0,i.SX)(s,["default"],"empty",-1===s.value?e?` (${e.displayName}, ${t||0})`:` (${t||0})`:` (${s.value})`)))}),[t,s]),C=(0,n.useMemo)((()=>b&&(0,f.m)(b,-1===y?t:y)),[t,y,b]);return(0,a.jsxs)("div",{className:e,children:[(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.bm,{autoFocus:!0,isError:!b,label:s("address to convert"),noConvert:!0,onChange:N})}),(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.Lt,{defaultValue:y,label:s("address prefix"),onChange:w,options:k})}),b&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.qG,{className:"medium",label:s("input ss58 prefix"),value:(0,m.u)(o)})}),C&&(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.bm,{defaultValue:C,isDisabled:!0,label:s("converted address")},C)}),(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.qG,{className:"full",label:s("hex public key"),value:b})})]})]})}));var y=t(64021),w=t(74076),N=t(48533),k=t(34323);const C=n.memo((function({className:e}){const{t:s}=j(),[{data:t,hash:o,isHexData:i},l]=(0,n.useState)({data:"",hash:(0,k.$)((0,y.d)(""),256),isHexData:!1}),c=(0,n.useCallback)((e=>{const s=(0,w.vq)(e);l({data:e,hash:(0,k.$)(s?(0,N.G)(e):(0,y.d)(e),256),isHexData:s})}),[]);return(0,a.jsxs)("div",{className:e,children:[(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.II,{autoFocus:!0,className:"full",label:s("from the following data"),onChange:c,value:t})}),(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.qG,{className:"medium",label:s("hex input data"),value:s(i?"Yes":"No")})}),(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.r_,{className:"full",isHidden:0===o.length,isMonospace:!0,label:s("the resulting hash is"),value:o,withCopy:!0})})]})}));var S=t(57139),I=t(37245),A=t(56301),P=t(68202),M=t(6046);const E=n.memo((function(){const e=(0,M.s)("XcmVersionedXcm"),[s,t]=(0,n.useState)("0x"),o=(0,n.useCallback)(((s,a)=>{const n=S.statics.api.createType(e.type,a.value);t((0,u.c)(n.toU8a()))}),[e.type]);return(0,a.jsxs)(I.Z,{children:[(0,a.jsx)(A.Z,{defaultValue:(0,P.y)(S.statics.api.registry,{type:e}),index:0,onChange:o,registry:S.statics.api.registry,type:e}),(0,a.jsx)(r.r_,{isDisabled:!0,value:s,withCopy:!0})]})})),D=n.memo((function({basePath:e,className:s}){const{t}=j(),i=(0,n.useRef)([{isRoot:!0,name:"convert",text:t("Convert address")},{name:"hash",text:t("Hash data")},{name:"xcm",text:t("Encode XCM")}]);return(0,a.jsxs)("main",{className:s,children:[(0,a.jsx)(r.mQ,{basePath:e,items:i.current}),(0,a.jsx)(o.Z5,{children:(0,a.jsxs)(o.AW,{path:e,children:[(0,a.jsx)(o.AW,{element:(0,a.jsx)(E,{}),path:"xcm"}),(0,a.jsx)(o.AW,{element:(0,a.jsx)(C,{}),path:"hash"}),(0,a.jsx)(o.AW,{element:(0,a.jsx)(v,{}),index:!0})]})})]})}))},7644:(e,s,t)=>{t.d(s,{Z:()=>w});var a=t(52322),n=t(2784),o=t(64348),r=t(61349);function i(){return(0,r.$G)("app-whitelist")}var l=t(90778),c=t(12298),d=t(39824),u=t(11677);const m={transform:e=>e.map((({args:[e]})=>e))};function h(e){const s=[],t=[];return e.forEach((({event:{data:[e],method:a}})=>{"CallWhitelisted"===a?s.push(e):t.push(e)})),{added:s,removed:t}}const p=(0,u.e)("useHashes",(function(){const{api:e}=(0,l.h)(),s=(0,c.k)(e.query.whitelist.whitelistedCall,[],m),t=(0,d.N)([e.events.whitelist.CallWhitelisted,e.events.whitelist.WhitelistedCallRemoved],h,s);return(0,n.useMemo)((()=>t?.map((e=>e.toHex()))),[t])}));var x=t(69338),g=t(74525),f=t(31313);const b=n.memo((function({className:e,value:s}){const t=(0,f.CH)(s);return(0,a.jsxs)("tr",{className:e,children:[(0,a.jsx)(g.Z,{value:s}),(0,a.jsx)(x.Z,{value:t})]})}));var j=t(14681);const v=n.memo((function({className:e,hashes:s}){const{t}=i();return(0,a.jsx)(o.Ty,{className:e,children:(0,a.jsx)(o.Jy,{label:t("hashes"),children:void 0===s?(0,a.jsx)("span",{className:"--tmp",children:"99"}):(0,j.u)(s.length)})})})),y=n.memo((function({className:e}){const{t:s}=i(),t=p(),r=(0,n.useRef)([[s("calls"),"start"],[void 0,"all"],[void 0,"media--1300"]]);return(0,a.jsxs)("div",{className:e,children:[(0,a.jsx)(v,{hashes:t}),(0,a.jsx)(o.iA,{className:e,empty:t&&s("No call hashes found"),header:r.current,children:t?.map((e=>(0,a.jsx)(b,{value:e},e)))})]})})),w=n.memo((function({basePath:e,className:s}){const{t}=i(),r=(0,n.useRef)([{isRoot:!0,name:"overview",text:t("Overview")}]);return(0,a.jsxs)("main",{className:s,children:[(0,a.jsx)(o.mQ,{basePath:e,items:r.current}),(0,a.jsx)(y,{})]})}))}}]); \ No newline at end of file +`,_=n.memo((function({className:e="",defaultId:s,hashes:t,isMember:o,members:l,onSelectTip:c}){const{t:u}=p(),{api:m}=(0,i.h)(),[h,x]=(0,n.useState)(!1),g=(0,y.C)(),f=(0,d.W7)(t&&(m.query.tips||m.query.treasury).tips.multi,[t],R),b=(0,n.useMemo)((()=>function(e,s){if(!e||!s)return;const[[t],a]=e;return a.map(((e,s)=>[t[s],e.unwrapOr(null)])).filter((e=>s.includes(e[0])&&!!e[1])).sort(((e,s)=>e[1].closes.isNone?s[1].closes.isNone?0:-1:s[1].closes.isSome?s[1].closes.unwrap().cmp(e[1].closes.unwrap()):1))}(f,t)),[t,f]),j=(0,n.useRef)([[u("tips"),"start"],[u("finder"),"address media--1400"],[u("reason"),"start"],[void 0,"media--1100"],[],[void 0,"badge media--1700"],[],[void 0,"media--1700"]]);return(0,a.jsx)(B,{className:e,empty:b&&u("No open tips"),filter:o&&(0,a.jsx)("div",{className:"tipsFilter",children:(0,a.jsx)(r.ZD,{label:u("show only untipped/closing"),onChange:x,value:h})}),header:j.current,children:b?.map((([e,t])=>(0,a.jsx)(V,{bestNumber:g,defaultId:s,hash:e,isMember:o,members:l,onSelect:c,onlyUntipped:h,tip:t},e)))})})),Z={quickTips:{},quickTxs:[]},L=n.memo((function({className:e,hashes:s,isMember:t,members:o}){const{t:l}=p(),{allAccounts:c}=(0,I.x)(),{api:d}=(0,i.h)(),[{quickTxs:u},m]=(0,n.useState)(Z),h=(0,A.b)(u),x=(0,n.useMemo)((()=>o.find((e=>c.includes(e)))||null),[c,o]),g=(0,n.useCallback)(((e,s,t)=>m((({quickTips:a})=>(a[e]=s?t:null,{quickTips:a,quickTxs:Object.entries(a).map((([e,s])=>s&&(d.tx.tips||d.tx.treasury).tip(e,s))).filter((e=>!!e))})))),[d]);return(0,a.jsxs)("div",{className:e,children:[(0,a.jsxs)(r.zx.Group,{children:[(0,a.jsx)(P,{members:o}),(0,a.jsx)(r.cA,{accountId:x,extrinsic:h,icon:"fighter-jet",isDisabled:!t||!h,label:l("Median tip selected")})]}),(0,a.jsx)(_,{defaultId:x,hashes:s,isMember:t,members:o,onSelectTip:g})]})}));var W=t(24305),$=t(12298),z=t(11677);const H={transform:e=>e.map((({args:[e]})=>e.toHex()))},U=(0,z.e)("useTipHashes",(function(){const{api:e}=(0,i.h)(),s=(0,W.b)([e.events.tips?.NewTip,e.events.tips?.TipClosed,e.events.tips?.TipRetracted]);return(0,$.k)((e.query.tips||e.query.treasury)?.tips,[],H,s.blockHash)})),J=n.memo((function({basePath:e}){const{t:s}=p(),{api:t}=(0,i.h)(),{isMember:d,members:u}=(0,l.V)("council"),m=U(),h=(0,n.useMemo)((()=>[{isRoot:!0,name:"overview",text:s("Overview")},(0,c.m)((t.query.tips||t.query.treasury)?.tips)&&{count:m?.length,name:"tips",text:s("Tips")}].filter((e=>!!e))),[t,s,m]);return(0,a.jsxs)("main",{className:"treasury--App",children:[(0,a.jsx)(r.mQ,{basePath:e,items:h}),(0,a.jsx)(o.Z5,{children:(0,a.jsxs)(o.AW,{path:e,children:[(0,a.jsx)(o.AW,{element:(0,a.jsx)(L,{hashes:m,isMember:d,members:u}),path:"tips"}),(0,a.jsx)(o.AW,{element:(0,a.jsx)(S,{isMember:d,members:u}),index:!0})]})})]})}))},9039:(e,s,t)=>{t.d(s,{Z:()=>i});var a=t(2784),n=t(34814),o=t(90778),r=t(9118);const i=(0,t(11677).e)("useCounter",(function(){const{hasAccounts:e}=(0,n.x)(),{api:s,isApiReady:t}=(0,o.h)(),i=(0,r.W7)(t&&e&&s.derive.treasury?.proposals);return(0,a.useMemo)((()=>i?.proposals.length||0),[i])}))},27008:(e,s,t)=>{t.d(s,{Z:()=>D});var a=t(52322),n=t(2784),o=t(73557),r=t(64348),i=t(35189),l=t(9242),c=t(72570),d=t(90778),u=t(55858),m=t(14681),h=t(61162),p=t(70416),x=t(66850),g=t(94175),f=t(90107),b=t(61349);function j(){return(0,b.$G)("app-utilities")}const v=n.memo((function({className:e}){const{t:s}=j(),{chainSS58:t}=(0,d.h)(),[{inputSS58:o,publicKey:b},v]=(0,n.useState)({inputSS58:42,publicKey:null}),[y,w]=(0,n.useState)(-1),N=(0,n.useCallback)((e=>v(function(e){try{if(e&&(0,h.U)(e)){const s=(0,p.MW)(e),[,,,t]=(0,x.l)(s),a=(0,g.m)(e);return{inputSS58:t,publicKey:(0,u.c)(a)}}}catch{}return{inputSS58:42,publicKey:null}}(e))),[]),k=(0,n.useMemo)((()=>{const e=c.FA.find((({prefix:e})=>e===t));return(0,l.M)(s).map((s=>(0,i.SX)(s,["default"],"empty",-1===s.value?e?` (${e.displayName}, ${t||0})`:` (${t||0})`:` (${s.value})`)))}),[t,s]),C=(0,n.useMemo)((()=>b&&(0,f.m)(b,-1===y?t:y)),[t,y,b]);return(0,a.jsxs)("div",{className:e,children:[(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.bm,{autoFocus:!0,isError:!b,label:s("address to convert"),noConvert:!0,onChange:N})}),(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.Lt,{defaultValue:y,label:s("address prefix"),onChange:w,options:k})}),b&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.qG,{className:"medium",label:s("input ss58 prefix"),value:(0,m.u)(o)})}),C&&(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.bm,{defaultValue:C,isDisabled:!0,label:s("converted address")},C)}),(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.qG,{className:"full",label:s("hex public key"),value:b})})]})]})}));var y=t(64021),w=t(74076),N=t(48533),k=t(34323);const C=n.memo((function({className:e}){const{t:s}=j(),[{data:t,hash:o,isHexData:i},l]=(0,n.useState)({data:"",hash:(0,k.$)((0,y.d)(""),256),isHexData:!1}),c=(0,n.useCallback)((e=>{const s=(0,w.vq)(e);l({data:e,hash:(0,k.$)(s?(0,N.G)(e):(0,y.d)(e),256),isHexData:s})}),[]);return(0,a.jsxs)("div",{className:e,children:[(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.II,{autoFocus:!0,className:"full",label:s("from the following data"),onChange:c,value:t})}),(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.qG,{className:"medium",label:s("hex input data"),value:s(i?"Yes":"No")})}),(0,a.jsx)("div",{className:"ui--row",children:(0,a.jsx)(r.r_,{className:"full",isHidden:0===o.length,isMonospace:!0,label:s("the resulting hash is"),value:o,withCopy:!0})})]})}));var S=t(57139),I=t(37245),A=t(44605),P=t(68202),M=t(6046);const E=n.memo((function(){const e=(0,M.s)("XcmVersionedXcm"),[s,t]=(0,n.useState)("0x"),o=(0,n.useCallback)(((s,a)=>{const n=S.statics.api.createType(e.type,a.value);t((0,u.c)(n.toU8a()))}),[e.type]);return(0,a.jsxs)(I.Z,{children:[(0,a.jsx)(A.Z,{defaultValue:(0,P.y)(S.statics.api.registry,{type:e}),index:0,onChange:o,registry:S.statics.api.registry,type:e}),(0,a.jsx)(r.r_,{isDisabled:!0,value:s,withCopy:!0})]})})),D=n.memo((function({basePath:e,className:s}){const{t}=j(),i=(0,n.useRef)([{isRoot:!0,name:"convert",text:t("Convert address")},{name:"hash",text:t("Hash data")},{name:"xcm",text:t("Encode XCM")}]);return(0,a.jsxs)("main",{className:s,children:[(0,a.jsx)(r.mQ,{basePath:e,items:i.current}),(0,a.jsx)(o.Z5,{children:(0,a.jsxs)(o.AW,{path:e,children:[(0,a.jsx)(o.AW,{element:(0,a.jsx)(E,{}),path:"xcm"}),(0,a.jsx)(o.AW,{element:(0,a.jsx)(C,{}),path:"hash"}),(0,a.jsx)(o.AW,{element:(0,a.jsx)(v,{}),index:!0})]})})]})}))},7644:(e,s,t)=>{t.d(s,{Z:()=>w});var a=t(52322),n=t(2784),o=t(64348),r=t(61349);function i(){return(0,r.$G)("app-whitelist")}var l=t(90778),c=t(12298),d=t(39824),u=t(11677);const m={transform:e=>e.map((({args:[e]})=>e))};function h(e){const s=[],t=[];return e.forEach((({event:{data:[e],method:a}})=>{"CallWhitelisted"===a?s.push(e):t.push(e)})),{added:s,removed:t}}const p=(0,u.e)("useHashes",(function(){const{api:e}=(0,l.h)(),s=(0,c.k)(e.query.whitelist.whitelistedCall,[],m),t=(0,d.N)([e.events.whitelist.CallWhitelisted,e.events.whitelist.WhitelistedCallRemoved],h,s);return(0,n.useMemo)((()=>t?.map((e=>e.toHex()))),[t])}));var x=t(69338),g=t(74525),f=t(31313);const b=n.memo((function({className:e,value:s}){const t=(0,f.CH)(s);return(0,a.jsxs)("tr",{className:e,children:[(0,a.jsx)(g.Z,{value:s}),(0,a.jsx)(x.Z,{value:t})]})}));var j=t(14681);const v=n.memo((function({className:e,hashes:s}){const{t}=i();return(0,a.jsx)(o.Ty,{className:e,children:(0,a.jsx)(o.Jy,{label:t("hashes"),children:void 0===s?(0,a.jsx)("span",{className:"--tmp",children:"99"}):(0,j.u)(s.length)})})})),y=n.memo((function({className:e}){const{t:s}=i(),t=p(),r=(0,n.useRef)([[s("calls"),"start"],[void 0,"all"],[void 0,"media--1300"]]);return(0,a.jsxs)("div",{className:e,children:[(0,a.jsx)(v,{hashes:t}),(0,a.jsx)(o.iA,{className:e,empty:t&&s("No call hashes found"),header:r.current,children:t?.map((e=>(0,a.jsx)(b,{value:e},e)))})]})})),w=n.memo((function({basePath:e,className:s}){const{t}=i(),r=(0,n.useRef)([{isRoot:!0,name:"overview",text:t("Overview")}]);return(0,a.jsxs)("main",{className:s,children:[(0,a.jsx)(o.mQ,{basePath:e,items:r.current}),(0,a.jsx)(y,{})]})}))}}]); \ No newline at end of file