@abtnode/webapp 1.16.26-beta-cca12425 → 1.16.26-beta-63f52a83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/build/asset-manifest.json +40 -38
  4. package/build/index.html +1 -1
  5. package/build/service-worker.js +1 -1
  6. package/build/static/js/1059.40eaf71e.chunk.js +1 -0
  7. package/build/static/js/1575.1224630c.chunk.js +1 -0
  8. package/build/static/js/1641.529fa061.chunk.js +1 -0
  9. package/build/static/js/175.b8f52054.chunk.js +1 -0
  10. package/build/static/js/{1846.7c384de2.chunk.js → 1846.6e3f3612.chunk.js} +1 -1
  11. package/build/static/js/2019.2c30b069.chunk.js +1 -0
  12. package/build/static/js/233.610f0c5d.chunk.js +1 -0
  13. package/build/static/js/243.7a6f7438.chunk.js +1 -0
  14. package/build/static/js/2537.10cf10fb.chunk.js +1 -0
  15. package/build/static/js/3803.28541be2.chunk.js +1 -0
  16. package/build/static/js/3930.bc6e9b32.chunk.js +1 -0
  17. package/build/static/js/{4296.8887004f.chunk.js → 4296.62f838a8.chunk.js} +1 -1
  18. package/build/static/js/4423.bb44f34f.chunk.js +1 -0
  19. package/build/static/js/4465.4f7d20c2.chunk.js +1 -0
  20. package/build/static/js/4527.6d3ce631.chunk.js +2 -0
  21. package/build/static/js/4545.4f5c0bd5.chunk.js +1 -0
  22. package/build/static/js/4549.3a768671.chunk.js +1 -0
  23. package/build/static/js/4906.7f0752d1.chunk.js +1 -0
  24. package/build/static/js/{5059.b4303ef8.chunk.js → 5059.92ba11ba.chunk.js} +1 -1
  25. package/build/static/js/5312.fa7da622.chunk.js +1 -0
  26. package/build/static/js/5570.744c0299.chunk.js +2 -0
  27. package/build/static/js/5748.b434b126.chunk.js +1 -0
  28. package/build/static/js/6179.fbea7365.chunk.js +1 -0
  29. package/build/static/js/6511.7e5a293c.chunk.js +1 -0
  30. package/build/static/js/6629.5fc65d11.chunk.js +2 -0
  31. package/build/static/js/6703.7c9ac00a.chunk.js +1 -0
  32. package/build/static/js/6906.9e06617c.chunk.js +1 -0
  33. package/build/static/js/6944.04eb32cb.chunk.js +1 -0
  34. package/build/static/js/7865.9cfee717.chunk.js +1 -0
  35. package/build/static/js/8170.358324c6.chunk.js +1 -0
  36. package/build/static/js/8590.6308ba32.chunk.js +1 -0
  37. package/build/static/js/9132.4a1a304f.chunk.js +1 -0
  38. package/build/static/js/9282.9940b6e0.chunk.js +2 -0
  39. package/build/static/js/9371.a03ab63e.chunk.js +1 -0
  40. package/build/static/js/9450.5a43999b.chunk.js +1 -0
  41. package/build/static/js/{9552.024c3ae2.chunk.js → 9552.becd4013.chunk.js} +1 -1
  42. package/build/static/js/9586.b0bc364f.chunk.js +1 -0
  43. package/build/static/js/9590.694b5369.chunk.js +2 -0
  44. package/build/static/js/main.bfd9a5e2.js +2 -0
  45. package/package.json +1 -1
  46. package/build/static/js/1059.577f662e.chunk.js +0 -1
  47. package/build/static/js/1575.aac11098.chunk.js +0 -1
  48. package/build/static/js/1641.28b81b2a.chunk.js +0 -1
  49. package/build/static/js/2019.a2d8670f.chunk.js +0 -1
  50. package/build/static/js/2080.1b558a42.chunk.js +0 -1
  51. package/build/static/js/233.b8ef7cd9.chunk.js +0 -1
  52. package/build/static/js/3216.04d7e546.chunk.js +0 -1
  53. package/build/static/js/3803.54aaf418.chunk.js +0 -1
  54. package/build/static/js/3930.8a91ec91.chunk.js +0 -1
  55. package/build/static/js/4235.82e1ffd8.chunk.js +0 -1
  56. package/build/static/js/4423.f9aa4282.chunk.js +0 -1
  57. package/build/static/js/4465.e11fb354.chunk.js +0 -1
  58. package/build/static/js/4549.c4d87199.chunk.js +0 -1
  59. package/build/static/js/475.f8cdcb9d.chunk.js +0 -1
  60. package/build/static/js/4906.f8af0bfa.chunk.js +0 -1
  61. package/build/static/js/5296.5812dffa.chunk.js +0 -2
  62. package/build/static/js/5312.bb165dac.chunk.js +0 -1
  63. package/build/static/js/5570.eca72753.chunk.js +0 -2
  64. package/build/static/js/5745.e717f338.chunk.js +0 -1
  65. package/build/static/js/5748.a2be56d1.chunk.js +0 -1
  66. package/build/static/js/6179.4333ab0e.chunk.js +0 -1
  67. package/build/static/js/6511.072d29a7.chunk.js +0 -1
  68. package/build/static/js/6906.22761c9e.chunk.js +0 -1
  69. package/build/static/js/6944.80d9f271.chunk.js +0 -1
  70. package/build/static/js/8170.fcb2e3fb.chunk.js +0 -1
  71. package/build/static/js/8427.591d6dee.chunk.js +0 -2
  72. package/build/static/js/8590.71bbe56c.chunk.js +0 -1
  73. package/build/static/js/8721.4095221a.chunk.js +0 -2
  74. package/build/static/js/9132.50e5bf38.chunk.js +0 -1
  75. package/build/static/js/9282.21bb92f3.chunk.js +0 -2
  76. package/build/static/js/9476.883b7a77.chunk.js +0 -1
  77. package/build/static/js/9586.19d0a41d.chunk.js +0 -1
  78. package/build/static/js/main.38a3525f.js +0 -2
  79. /package/build/static/js/{5296.5812dffa.chunk.js.LICENSE.txt → 4527.6d3ce631.chunk.js.LICENSE.txt} +0 -0
  80. /package/build/static/js/{5570.eca72753.chunk.js.LICENSE.txt → 5570.744c0299.chunk.js.LICENSE.txt} +0 -0
  81. /package/build/static/js/{8427.591d6dee.chunk.js.LICENSE.txt → 6629.5fc65d11.chunk.js.LICENSE.txt} +0 -0
  82. /package/build/static/js/{9282.21bb92f3.chunk.js.LICENSE.txt → 9282.9940b6e0.chunk.js.LICENSE.txt} +0 -0
  83. /package/build/static/js/{8721.4095221a.chunk.js.LICENSE.txt → 9590.694b5369.chunk.js.LICENSE.txt} +0 -0
  84. /package/build/static/js/{main.38a3525f.js.LICENSE.txt → main.bfd9a5e2.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[475],{44919:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add")},49390:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown")},55673:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp")},11593:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M17 20.41 18.41 19 15 15.59 13.59 17zM7.5 8H11v5.59L5.59 19 7 20.41l6-6V8h3.5L12 3.5z"}),"CallMerge")},76005:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle")},92273:(e,t,n)=>{var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(56930)),a=n(96266);t.default=(0,o.default)((0,a.jsx)("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight")},45568:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M12 3 2 21h20zm1 5.92L18.6 19H13zm-2 0V19H5.4z"}),"Details")},76667:(e,t,n)=>{var r=n(71600);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(56930)),a=n(96266);t.default=(0,o.default)((0,a.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit")},8732:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error")},31942:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Https")},34966:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined")},33271:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link")},53906:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"}),"Public")},74976:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh")},84639:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"}),"Send")},21017:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"}),"Storage")},50725:(e,t,n)=>{var r=n(71600);t.Z=void 0;var o=r(n(56930)),a=n(96266);t.Z=(0,o.default)((0,a.jsx)("path",{d:"m19 15-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9z"}),"SubdirectoryArrowRight")},39067:(e,t,n)=>{n.d(t,{Z:()=>Z});var r=n(29218),o=n(7896),a=n(5057),i=n(6285),c=n(80538),l=n(82261),s=n(62773),u=n(42908),d=n(56556),f=n(17681),p=n(44846),v=n(39621),g=n(96036);function m(e){return(0,g.ZP)("MuiLoadingButton",e)}const h=(0,n(46849).Z)("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]);var b=n(96266);const y=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],w=(0,s.ZP)(d.Z,{shouldForwardProp:e=>(e=>"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e&&"classes"!==e)(e)||"classes"===e,name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{["& .".concat(h.startIconLoadingStart)]:t.startIconLoadingStart},t.endIconLoadingEnd&&{["& .".concat(h.endIconLoadingEnd)]:t.endIconLoadingEnd}]})((e=>{let{ownerState:t,theme:n}=e;return(0,o.Z)({["& .".concat(h.startIconLoadingStart,", & .").concat(h.endIconLoadingEnd)]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0}},"center"===t.loadingPosition&&{transition:n.transitions.create(["background-color","box-shadow","border-color"],{duration:n.transitions.duration.short}),["&.".concat(h.loading)]:{color:"transparent"}},"start"===t.loadingPosition&&t.fullWidth&&{["& .".concat(h.startIconLoadingStart,", & .").concat(h.endIconLoadingEnd)]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginRight:-8}},"end"===t.loadingPosition&&t.fullWidth&&{["& .".concat(h.startIconLoadingStart,", & .").concat(h.endIconLoadingEnd)]:{transition:n.transitions.create(["opacity"],{duration:n.transitions.duration.short}),opacity:0,marginLeft:-8}})})),x=(0,s.ZP)("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t["loadingIndicator".concat((0,i.Z)(n.loadingPosition))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({position:"absolute",visibility:"visible",display:"flex"},"start"===n.loadingPosition&&("outlined"===n.variant||"contained"===n.variant)&&{left:"small"===n.size?10:14},"start"===n.loadingPosition&&"text"===n.variant&&{left:6},"center"===n.loadingPosition&&{left:"50%",transform:"translate(-50%)",color:(t.vars||t).palette.action.disabled},"end"===n.loadingPosition&&("outlined"===n.variant||"contained"===n.variant)&&{right:"small"===n.size?10:14},"end"===n.loadingPosition&&"text"===n.variant&&{right:6},"start"===n.loadingPosition&&n.fullWidth&&{position:"relative",left:-10},"end"===n.loadingPosition&&n.fullWidth&&{position:"relative",right:-10})})),Z=a.forwardRef((function(e,t){const n=a.useContext(f.Z),s=(0,v.Z)(n,e),d=(0,u.Z)({props:s,name:"MuiLoadingButton"}),{children:g,disabled:h=!1,id:Z,loading:j=!1,loadingIndicator:D,loadingPosition:z="center",variant:P="text"}=d,S=(0,r.Z)(d,y),O=(0,c.Z)(Z),C=null!=D?D:(0,b.jsx)(p.Z,{"aria-labelledby":O,color:"inherit",size:16}),k=(0,o.Z)({},d,{disabled:h,loading:j,loadingIndicator:C,loadingPosition:z,variant:P}),F=(e=>{const{loading:t,loadingPosition:n,classes:r}=e,a={root:["root",t&&"loading"],startIcon:[t&&"startIconLoading".concat((0,i.Z)(n))],endIcon:[t&&"endIconLoading".concat((0,i.Z)(n))],loadingIndicator:["loadingIndicator",t&&"loadingIndicator".concat((0,i.Z)(n))]},c=(0,l.Z)(a,m,r);return(0,o.Z)({},r,c)})(k),A=j?(0,b.jsx)(x,{className:F.loadingIndicator,ownerState:k,children:C}):null;return(0,b.jsxs)(w,(0,o.Z)({disabled:h||j,id:O,ref:t},S,{variant:P,classes:F,ownerState:k,children:["end"===k.loadingPosition?g:A,"end"===k.loadingPosition?A:g]}))}))},65140:(e,t,n)=>{n.d(t,{Z:()=>A});var r=n(29218),o=n(7896),a=n(5057),i=n(9978),c=n(82261),l=n(96295),s=n(39273),u=n(42908),d=n(57471),f=n(96266);const p=(0,d.Z)((0,f.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"RadioButtonUnchecked"),v=(0,d.Z)((0,f.jsx)("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"}),"RadioButtonChecked");var g=n(62773),m=n(32618);const h=(0,g.ZP)("span",{shouldForwardProp:m.Z})({position:"relative",display:"flex"}),b=(0,g.ZP)(p)({transform:"scale(1)"}),y=(0,g.ZP)(v)((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({left:0,position:"absolute",transform:"scale(0)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeIn,duration:t.transitions.duration.shortest})},n.checked&&{transform:"scale(1)",transition:t.transitions.create("transform",{easing:t.transitions.easing.easeOut,duration:t.transitions.duration.shortest})})}));const w=function(e){const{checked:t=!1,classes:n={},fontSize:r}=e,a=(0,o.Z)({},e,{checked:t});return(0,f.jsxs)(h,{className:n.root,ownerState:a,children:[(0,f.jsx)(b,{fontSize:r,className:n.background,ownerState:a}),(0,f.jsx)(y,{fontSize:r,className:n.dot,ownerState:a})]})};var x=n(6285),Z=n(26393),j=n(42903);var D=n(46849),z=n(96036);function P(e){return(0,z.ZP)("MuiRadio",e)}const S=(0,D.Z)("MuiRadio",["root","checked","disabled","colorPrimary","colorSecondary","sizeSmall"]),O=["checked","checkedIcon","color","icon","name","onChange","size","className"],C=(0,g.ZP)(s.Z,{shouldForwardProp:e=>(0,m.Z)(e)||"classes"===e,name:"MuiRadio",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"medium"!==n.size&&t["size".concat((0,x.Z)(n.size))],t["color".concat((0,x.Z)(n.color))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.Z)({color:(t.vars||t).palette.text.secondary},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===n.color?t.vars.palette.action.activeChannel:t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.Fq)("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{["&.".concat(S.checked)]:{color:(t.vars||t).palette[n.color].main}},{["&.".concat(S.disabled)]:{color:(t.vars||t).palette.action.disabled}})}));const k=(0,f.jsx)(w,{checked:!0}),F=(0,f.jsx)(w,{}),A=a.forwardRef((function(e,t){var n,l;const s=(0,u.Z)({props:e,name:"MuiRadio"}),{checked:d,checkedIcon:p=k,color:v="primary",icon:g=F,name:m,onChange:h,size:b="medium",className:y}=s,w=(0,r.Z)(s,O),D=(0,o.Z)({},s,{color:v,size:b}),z=(e=>{const{classes:t,color:n,size:r}=e,a={root:["root","color".concat((0,x.Z)(n)),"medium"!==r&&"size".concat((0,x.Z)(r))]};return(0,o.Z)({},t,(0,c.Z)(a,P,t))})(D),S=a.useContext(j.Z);let A=d;const I=(0,Z.Z)(h,S&&S.onChange);let L=m;var E,M;return S&&("undefined"===typeof A&&(E=S.value,A="object"===typeof(M=s.value)&&null!==M?E===M:String(E)===String(M)),"undefined"===typeof L&&(L=S.name)),(0,f.jsx)(C,(0,o.Z)({type:"radio",icon:a.cloneElement(g,{fontSize:null!=(n=F.props.fontSize)?n:b}),checkedIcon:a.cloneElement(p,{fontSize:null!=(l=k.props.fontSize)?l:b}),ownerState:D,classes:z,name:L,checked:A,onChange:I,ref:t,className:(0,i.Z)(z.root,y)},w))}))},20783:(e,t,n)=>{n.d(t,{Z:()=>b});var r=n(7896),o=n(29218),a=n(5057),i=n(9978),c=n(82261),l=n(25506),s=n(46849),u=n(96036);function d(e){return(0,u.ZP)("MuiRadioGroup",e)}(0,s.Z)("MuiRadioGroup",["root","row","error"]);var f=n(2286),p=n(58708),v=n(42903),g=n(80538),m=n(96266);const h=["actions","children","className","defaultValue","name","onChange","value"],b=a.forwardRef((function(e,t){const{actions:n,children:s,className:u,defaultValue:b,name:y,onChange:w,value:x}=e,Z=(0,o.Z)(e,h),j=a.useRef(null),D=(e=>{const{classes:t,row:n,error:r}=e,o={root:["root",n&&"row",r&&"error"]};return(0,c.Z)(o,d,t)})(e),[z,P]=(0,p.Z)({controlled:x,default:b,name:"RadioGroup"});a.useImperativeHandle(n,(()=>({focus:()=>{let e=j.current.querySelector("input:not(:disabled):checked");e||(e=j.current.querySelector("input:not(:disabled)")),e&&e.focus()}})),[]);const S=(0,f.Z)(t,j),O=(0,g.Z)(y),C=a.useMemo((()=>({name:O,onChange(e){P(e.target.value),w&&w(e,e.target.value)},value:z})),[O,w,P,z]);return(0,m.jsx)(v.Z.Provider,{value:C,children:(0,m.jsx)(l.Z,(0,r.Z)({role:"radiogroup",ref:S,className:(0,i.Z)(D.root,u)},Z,{children:s}))})}))},42903:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n(5057).createContext(void 0)},50844:(e,t,n)=>{n.d(t,{Z:()=>p});var r=n(7896),o=n(29218),a=n(5057),i=n(56129),c=n.n(i),l=n(92877);var s=n(95335),u=n(96266);const d=["defaultTheme","withTheme","name"],f=["classes"],p=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return n=>{const{defaultTheme:i,withTheme:p=!1,name:v}=t,g=(0,o.Z)(t,d);let m=v;const h=(0,l.Z)(e,(0,r.Z)({defaultTheme:i,Component:n,name:v||n.displayName,classNamePrefix:m},g)),b=a.forwardRef((function(e,t){const a=(0,o.Z)(e,f),c=h((0,r.Z)({},n.defaultProps,e));let l,d=a;return("string"===typeof v||p)&&(l=(0,s.Z)()||i,v&&(d=function(e){const{theme:t,name:n,props:o}=e;if(!t||!t.components||!t.components[n]||!t.components[n].defaultProps)return o;const a=(0,r.Z)({},o),i=t.components[n].defaultProps;let c;for(c in i)void 0===a[c]&&(a[c]=i[c]);return a}({theme:l,name:v,props:a})),p&&!d.theme&&(d.theme=l)),(0,u.jsx)(n,(0,r.Z)({ref:t,classes:c},d))}));return c()(b,n),b}}},72674:(e,t)=>{t.Z=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),a=o.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?a===t.replace(/\/.*$/,""):o===t}))}return!0}},49525:(e,t,n)=>{n.d(t,{uI:()=>ie});var r=n(5057),o=n(55898),a=n.n(o),i=n(27812),c=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function l(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=c.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!==typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"===typeof t?t:"string"===typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var s=[".DS_Store","Thumbs.db"];function u(e){return"object"===typeof e&&null!==e}function d(e){return g(e.target.files).map((function(e){return l(e)}))}function f(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return l(e)}))]}}))}))}function p(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function(){var n;return(0,i.__generator)(this,(function(r){switch(r.label){case 0:return null===e?[2,[]]:e.items?(n=g(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(m))]):[3,2];case 1:return[2,v(h(r.sent()))];case 2:return[2,v(g(e.files).map((function(e){return l(e)})))]}}))}))}function v(e){return e.filter((function(e){return-1===s.indexOf(e.name)}))}function g(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function m(e){if("function"!==typeof e.webkitGetAsEntry)return b(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?w(t):b(e)}function h(e){return e.reduce((function(e,t){return(0,i.__spread)(e,Array.isArray(t)?h(t):[t])}),[])}function b(e){var t=e.getAsFile();if(!t)return Promise.reject(e+" is not a File");var n=l(t);return Promise.resolve(n)}function y(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(t){return[2,e.isDirectory?w(e):x(e)]}))}))}function w(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function o(){var a=this;t.readEntries((function(t){return(0,i.__awaiter)(a,void 0,void 0,(function(){var a,c,l;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:if(t.length)return[3,5];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return a=i.sent(),e(a),[3,4];case 3:return c=i.sent(),n(c),[3,4];case 4:return[3,6];case 5:l=Promise.all(t.map(y)),r.push(l),o(),i.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function x(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=l(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}var Z=n(72674);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(l){c=!0,o=l}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return S(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var O="file-invalid-type",C="file-too-large",k="file-too-small",F="too-many-files",A=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:O,message:"File type must be ".concat(t)}},I=function(e){return{code:C,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},L=function(e){return{code:k,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},E={code:F,message:"Too many files"};function M(e,t){var n="application/x-moz-file"===e.type||(0,Z.Z)(e,t);return[n,n?null:A(t)]}function R(e,t,n){if(_(e.size))if(_(t)&&_(n)){if(e.size>n)return[!1,I(n)];if(e.size<t)return[!1,L(t)]}else{if(_(t)&&e.size<t)return[!1,L(t)];if(_(n)&&e.size>n)return[!1,I(n)]}return[!0,null]}function _(e){return void 0!==e&&null!==e}function T(e){return"function"===typeof e.isPropagationStopped?e.isPropagationStopped():"undefined"!==typeof e.cancelBubble&&e.cancelBubble}function H(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function V(e){e.preventDefault()}function B(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!T(e)&&t&&t.apply(void 0,[e].concat(r)),T(e)}))}}function N(){return"showOpenFilePicker"in window}function K(e){return e="string"===typeof e?e.split(","):e,[{description:"everything",accept:Array.isArray(e)?e.filter((function(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)})).reduce((function(e,t){return D(D({},e),{},z({},t,[]))}),{}):{}}]}var W=["children"],q=["open"],G=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],U=["refKey","onChange","onClick"];function $(e){return function(e){if(Array.isArray(e))return X(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Q(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(l){c=!0,o=l}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(e,t)||Q(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,t){if(e){if("string"===typeof e)return X(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X(e,t):void 0}}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){te(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ne(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var re=(0,r.forwardRef)((function(e,t){var n=e.children,o=ie(ne(e,W)),a=o.open,i=ne(o,q);return(0,r.useImperativeHandle)(t,(function(){return{open:a}}),[a]),r.createElement(r.Fragment,null,n(ee(ee({},i),{},{open:a})))}));re.displayName="Dropzone";var oe={disabled:!1,getFilesFromEvent:function(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(t){return u(e)&&u(e.dataTransfer)?[2,p(e.dataTransfer,e.type)]:function(e){return u(e)&&u(e.target)}(e)?[2,d(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"===typeof e.getFile}))?[2,f(e)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1};re.defaultProps=oe,re.propTypes={children:a().func,accept:a().oneOfType([a().string,a().arrayOf(a().string)]),multiple:a().bool,preventDropOnDocument:a().bool,noClick:a().bool,noKeyboard:a().bool,noDrag:a().bool,noDragEventsBubbling:a().bool,minSize:a().number,maxSize:a().number,maxFiles:a().number,disabled:a().bool,getFilesFromEvent:a().func,onFileDialogCancel:a().func,onFileDialogOpen:a().func,useFsAccessApi:a().bool,onDragEnter:a().func,onDragLeave:a().func,onDragOver:a().func,onDrop:a().func,onDropAccepted:a().func,onDropRejected:a().func,validator:a().func};var ae={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function ie(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=ee(ee({},oe),e),n=t.accept,o=t.disabled,a=t.getFilesFromEvent,i=t.maxSize,c=t.minSize,l=t.multiple,s=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,f=t.onDragOver,p=t.onDrop,v=t.onDropAccepted,g=t.onDropRejected,m=t.onFileDialogCancel,h=t.onFileDialogOpen,b=t.useFsAccessApi,y=t.preventDropOnDocument,w=t.noClick,x=t.noKeyboard,Z=t.noDrag,j=t.noDragEventsBubbling,D=t.validator,z=(0,r.useMemo)((function(){return"function"===typeof h?h:le}),[h]),S=(0,r.useMemo)((function(){return"function"===typeof m?m:le}),[m]),O=(0,r.useRef)(null),C=(0,r.useRef)(null),k=J((0,r.useReducer)(ce,ae),2),F=k[0],A=k[1],I=F.isFocused,L=F.isFileDialogActive,_=F.draggedFiles,W=function(){L&&setTimeout((function(){C.current&&(C.current.files.length||(A({type:"closeDialog"}),S()))}),300)};(0,r.useEffect)((function(){return b&&N()?function(){}:(window.addEventListener("focus",W,!1),function(){window.removeEventListener("focus",W,!1)})}),[C,L,S,b]);var q=(0,r.useRef)([]),Q=function(e){O.current&&O.current.contains(e.target)||(e.preventDefault(),q.current=[])};(0,r.useEffect)((function(){return y&&(document.addEventListener("dragover",V,!1),document.addEventListener("drop",Q,!1)),function(){y&&(document.removeEventListener("dragover",V),document.removeEventListener("drop",Q))}}),[O,y]);var X=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),be(e),q.current=[].concat($(q.current),[e.target]),H(e)&&Promise.resolve(a(e)).then((function(t){T(e)&&!j||(A({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e))}))}),[a,u,j]),Y=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),be(e);var t=H(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(n){}return t&&f&&f(e),!1}),[f,j]),re=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),be(e);var t=q.current.filter((function(e){return O.current&&O.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),q.current=t,t.length>0||(A({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),H(e)&&d&&d(e))}),[O,d,j]),ie=(0,r.useCallback)((function(e,t){var r=[],o=[];e.forEach((function(e){var t=J(M(e,n),2),a=t[0],l=t[1],s=J(R(e,c,i),2),u=s[0],d=s[1],f=D?D(e):null;if(a&&u&&!f)r.push(e);else{var p=[l,d];f&&(p=p.concat(f)),o.push({file:e,errors:p.filter((function(e){return e}))})}})),(!l&&r.length>1||l&&s>=1&&r.length>s)&&(r.forEach((function(e){o.push({file:e,errors:[E]})})),r.splice(0)),A({acceptedFiles:r,fileRejections:o,type:"setFiles"}),p&&p(r,o,t),o.length>0&&g&&g(o,t),r.length>0&&v&&v(r,t)}),[A,l,n,c,i,s,p,v,g,D]),se=(0,r.useCallback)((function(e){e.preventDefault(),e.persist(),be(e),q.current=[],H(e)&&Promise.resolve(a(e)).then((function(t){T(e)&&!j||ie(t,e)})),A({type:"reset"})}),[a,ie,j]),ue=(0,r.useCallback)((function(){if(b&&N()){A({type:"openDialog"}),z();var e={multiple:l,types:K(n)};window.showOpenFilePicker(e).then((function(e){return a(e)})).then((function(e){return ie(e,null)})).catch((function(e){return S(e)})).finally((function(){return A({type:"closeDialog"})}))}else C.current&&(A({type:"openDialog"}),z(),C.current.value=null,C.current.click())}),[A,z,S,b,ie,n,l]),de=(0,r.useCallback)((function(e){O.current&&O.current.isEqualNode(e.target)&&(32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),ue()))}),[O,C,ue]),fe=(0,r.useCallback)((function(){A({type:"focus"})}),[]),pe=(0,r.useCallback)((function(){A({type:"blur"})}),[]),ve=(0,r.useCallback)((function(){w||(!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return function(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}(e)||function(e){return-1!==e.indexOf("Edge/")}(e)}()?ue():setTimeout(ue,0))}),[C,w,ue]),ge=function(e){return o?null:e},me=function(e){return x?null:ge(e)},he=function(e){return Z?null:ge(e)},be=function(e){j&&e.stopPropagation()},ye=(0,r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.role,a=e.onKeyDown,i=e.onFocus,c=e.onBlur,l=e.onClick,s=e.onDragEnter,u=e.onDragOver,d=e.onDragLeave,f=e.onDrop,p=ne(e,G);return ee(ee(te({onKeyDown:me(B(a,de)),onFocus:me(B(i,fe)),onBlur:me(B(c,pe)),onClick:ge(B(l,ve)),onDragEnter:he(B(s,X)),onDragOver:he(B(u,Y)),onDragLeave:he(B(d,re)),onDrop:he(B(f,se)),role:"string"===typeof r&&""!==r?r:"button"},n,O),o||x?{}:{tabIndex:0}),p)}}),[O,de,fe,pe,ve,X,Y,re,se,x,Z,o]),we=(0,r.useCallback)((function(e){e.stopPropagation()}),[]),xe=(0,r.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,r=void 0===t?"ref":t,o=e.onChange,a=e.onClick,i=ne(e,U);return ee(ee({},te({accept:n,multiple:l,type:"file",style:{display:"none"},onChange:ge(B(o,se)),onClick:ge(B(a,we)),autoComplete:"off",tabIndex:-1},r,C)),i)}}),[C,n,l,se,o]),Ze=_.length,je=Ze>0&&function(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,a=e.multiple,i=e.maxFiles;return!(!a&&t.length>1||a&&i>=1&&t.length>i)&&t.every((function(e){var t=P(M(e,n),1)[0],a=P(R(e,r,o),1)[0];return t&&a}))}({files:_,accept:n,minSize:c,maxSize:i,multiple:l,maxFiles:s}),De=Ze>0&&!je;return ee(ee({},F),{},{isDragAccept:je,isDragReject:De,isFocused:I&&!o,getRootProps:ye,getInputProps:xe,rootRef:O,inputRef:C,open:ge(ue)})}function ce(e,t){switch(t.type){case"focus":return ee(ee({},e),{},{isFocused:!0});case"blur":return ee(ee({},e),{},{isFocused:!1});case"openDialog":return ee(ee({},ae),{},{isFileDialogActive:!0});case"closeDialog":return ee(ee({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return ee(ee({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return ee(ee({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return ee({},ae);default:return e}}function le(){}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[4906],{7199:(e,t,n)=>{n.d(t,{V:()=>s.V,Z:()=>s.Z});var s=n(63406)},44906:(e,t,n)=>{n.r(t),n.d(t,{default:()=>re});var s=n(71171),o=n(5057),a=n(6352),r=n.n(a),l=n(33518),i=n(67654),c=n(11750),d=n(39948),u=n(39434),h=n(68420),m=n(5952),p=n(75793),f=n(38898),x=n(52439),b=n(71569),g=n(44040),k=n(35432),v=n(44727),y=n(4651),j=n(74094),Z=n(85493),w=n(38242),P=n(44846),S=n(28726),R=n(88577),C=n(86229),D=n(77277),E=n(23484),U=n(34937);var F=n(7199),L=n(10458),N=n.n(L),T=n(13128),_=n(73170),B=n(96266);function M(e){let{meta:t,onCancel:n,handlePaySuccess:s,storeUrl:a}=e;const{t:l}=(0,h.PE)(),{info:i}=(0,p.h6)(),[d,u]=(0,o.useState)("both"),[m,f]=(0,o.useState)(1),x=(0,j.yP)(i),b=(0,y.FM)(t,i,a),g=()=>{s(b)},k=(0,w.getDisplayName)({meta:t});if("purchase"===d&&2===m)return(0,B.jsx)(R.Z,{open:!0,popup:!0,baseUrl:a,action:"acquire-asset",checkFn:N().create({baseURL:r()(a,"/store")}).get,onSuccess:g,onClose:n,checkTimeout:3e5,extraParams:{factory:t.nftFactory},webWalletUrl:x,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:l("store.purchase.auth.title",{name:k}),scan:l("store.purchase.auth.scan"),confirm:l("store.purchase.auth.confirm"),success:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(c.Z,{gutterBottom:!0,children:l("store.purchase.auth.success")}),(0,B.jsxs)(c.Z,{variant:"subtitle2",children:[" ",l("store.purchase.autoLaunch",{name:k})]})]})}});const v=T.ZP;return(0,B.jsx)(v,{title:l("store.purchase.title",{name:k}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:(e,t)=>{"backdropClick"!==t&&n()},children:(0,B.jsx)("div",{style:{marginBottom:16},children:(0,B.jsx)(_.AP,{action:d,onNext:()=>{d&&(f(2),"verify"===d&&(window.location.href=b))},onSelect:e=>{e!==d&&u(e)}})})})}M.defaultProps={handlePaySuccess:e=>{setTimeout((()=>{window.location.href=e}),1e3)}};const W=M;var I,A=n(25339);function K(e){let{meta:t,buttonText:n,storeUrl:s}=e;const{t:a}=(0,h.PE)(),r=(0,Z.useNavigate)(),{info:l}=(0,p.h6)(),{api:c}=(0,A.Tt)(),d=!1===(0,w.isFreeBlocklet)(t),[u,m]=(0,o.useState)(!1),{hasPurchased:f}=function(e){const t=(0,E.Z)(),n=(0,Z.useNavigate)(),[s,a]=(0,i.Z)("sid:blocklet:purchase:".concat(e)),[r,l]=(0,o.useState)(!1),[c,d]=(0,o.useState)(null),u=()=>{const{pathname:e,searchParams:t}=new URL(window.location.href),s=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";t.get("sid")&&(a(""),n(e.replace(s,"/"),{replace:!0}))},h=!(!t.get("assetDid")||!s||t.get("sid")!==s);return(0,U.mU)(D.BlockletEvents.purchaseChange,(t=>{t.did===e&&(d(t.session),["declined","confirmed","error"].includes(t.session.status)&&(l(!0),setTimeout(u,2e3)))})),(0,o.useEffect)((()=>{c&&c.id!==s&&a(c.id)}),[c]),{hasCompleted:r,hasPurchased:h,session:c,setSession:d,doRedirect:u}}(t.did),[x,b]=(0,o.useState)(!1),[g]=(0,i.Z)("instant-blocklet-install",!1),[k,L]=(0,o.useState)(!1),N=(0,o.useMemo)((()=>u?a(d?"blocklet.status.purchasing":"blocklet.status.waiting"):""),[u,a,d]),T=(0,o.useMemo)((()=>d?n.purchase:n.launch),[d,n]),_=e=>{e.preventDefault(),e.stopPropagation();try{if(m(!0),d)return void b(!0);if(g)return void L(!0);if(!d){const e=(0,y.FM)(t,l,s);return void(window.location.href=e)}}catch(n){C.Z.error((0,j.Z)(n),{autoHideDuration:5e3}),console.error("Blocklet installed failed",n)}finally{m(!1)}};return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(v.Kk,{children:(0,B.jsx)(F.Z,{permission:"mutate_blocklets",children:e=>(0,B.jsx)(S.Z,{onClick:_,size:"small",disabled:Boolean(N||!e),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:N?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(P.Z,{size:16,style:{marginRight:3}}),N]}):T},t.did)})}),(f||x)&&(0,B.jsx)(W,{method:"launch",meta:t,mode:"both",onCancel:()=>{m(!1),b(!1)},storeUrl:s}),k&&(0,B.jsx)(R.Z,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:c.get,checkTimeout:3e5,onSuccess:e=>{m(!1),L(!1),r("/blocklets/".concat(e.appDid,"/components"))},extraParams:{title:t.title,blockletMetaUrl:decodeURIComponent((0,j.Rn)(s,t.did).trim())},messages:{title:a("setup.keyPair.title"),scan:a("setup.keyPair.scan"),confirm:a("setup.keyPair.confirm"),success:a("setup.keyPair.success")},onClose:()=>{m(!1),L(!1)}})]})}K.defaultProps={};const O=(e,t,n)=>{const s=(0,y.RU)(t);return r()(n,"/blocklets/".concat(e.did,"/?server-url=").concat(s))},V=e=>{let{meta:t,attribute:n,value:s}=e;return t._formatted?t._formatted[n]:s};function z(e){let{blocklet:t,endpoint:n}=e;const{t:s}=(0,h.PE)(),o=(0,p.h6)();let a=r()(o.imgPrefix,"blocklet.png");const l=n;if(l.startsWith("http")&&t.logo)a=r()(l,(0,j.lk)(t.did,t.logo));else{let e=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");e&&(e="/".concat(e)),a=r()(e,"/blocklet/logo/".concat(t.did))}try{const e=new URL(a);e.searchParams.set("v",t.version||+new Date),a=e.href}catch{}const i=(null===o||void 0===o?void 0:o.info.mode)!==k.NODE_MODES.SERVERLESS,c={meta:t,buttonText:{purchase:s("common.purchase"),launch:s("common.launch")},storeUrl:l};return(0,B.jsx)(f.Z,{href:O(t,o.info,n),style:{color:"initial",textDecoration:"none"},onClick:e=>!!e.currentTarget.contains(e.target)||(e.preventDefault(),!1),target:"_blank",children:(0,B.jsx)(q,{title:V({meta:t,attribute:"title",value:t.title||t.name}),did:t.did,description:V({meta:t,attribute:"description",value:t.description}),cover:t.logo?a:"",version:t.version,button:i?(0,B.jsx)("div",{style:{display:"flex",alignItems:"center"},children:(0,B.jsx)(K,{...c})}):null})})}function H(e){var t;let{storeUrl:n,handleSearchSelect:s,extraFilter:a,...r}=e;const{locale:l}=(0,h.PE)(),i=(0,p.h6)(),[c,d]=(0,o.useState)({}),u=n,m=null===i||void 0===i||null===(t=i.info)||void 0===t?void 0:t.version;return(0,o.useEffect)((()=>{d({})}),[u]),(0,B.jsx)(x.ErrorBoundary,{FallbackComponent:b.H,resetKeys:[u],children:(0,B.jsx)("div",{...r,children:(0,B.jsx)(g.Z,{blockletRender:e=>{const t={...e,endpoint:u};return(0,B.jsx)(z,{...t})},baseSearch:!0,endpoint:u,locale:l,onFilterChange:e=>{d(e)},onSearchSelect:s,filters:c,extraFilter:a,serverVersion:m})})})}z.defaultProps={endpoint:""},H.defaultProps={handleSearchSelect:null,extraFilter:void 0};const q=(0,l.Z)(v.ZP)(I||(I=(0,s.Z)(["\n .ms-highlight {\n color: ",";\n }\n"])),(e=>e.theme.palette.primary.main));var $=n(92877),G=n(19577),J=n(2478),Q=n(44067),X=n(46954),Y=n(49390),ee=n(22714),te=n(80678);const ne=(0,$.Z)((()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},menuName:{display:"flex",flexDirection:"column",marginRight:"100px","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}}))),se=(0,o.forwardRef)(((e,t)=>{let{onChange:n,onDelete:s}=e;const{info:a}=(0,p.h6)(),{t:r}=(0,h.PE)(),[l,d]=(0,o.useState)(!1),[u,f]=(0,o.useState)(!1),[x,b]=(0,o.useState)(-1),g=ne(),[k,v]=(0,i.Z)(m.WC),y=Math.max(a.blockletRegistryList.findIndex((e=>e.url===k)),0);return(0,o.useImperativeHandle)(t,(()=>({setOpen:f}))),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(F.Z,{permission:"mutate_node",children:e=>(0,B.jsx)(S.Z,{disabled:!e,classes:{text:g.buttonText},color:"secondary","data-cy":"store-toggle",onClick:()=>{f(!0)},endIcon:(0,B.jsx)(Y.Z,{}),children:(0,B.jsx)(c.Z,{color:"secondary",children:a.blockletRegistryList[y].name})})}),(0,B.jsx)(T.ZP,{title:r("store.blockletRegistry.switchRegistry"),disableEscapeKeyDown:!0,disablePortal:!1,fullWidth:!0,open:u,onClose:()=>f(!1),children:(0,B.jsxs)(G.Z,{className:g.tabPanel,children:[a.blockletRegistryList.map(((e,t)=>(0,B.jsxs)(J.ZP,{button:!0,disabled:l,selected:y===t,"data-cy":"store-switch",onClick:()=>{l||(t!==y?(e=>{try{d(!0),b(e);const t=a.blockletRegistryList[e];v(t.url),n(t.url),f(!1)}catch(t){console.error(t),C.Z.error("".concat(r("store.blockletRegistry.changeFailed")," ").concat((0,j.Z)(t)))}finally{d(!1)}})(t):f(!1))},children:[x===t&&l&&(0,B.jsx)(X.Z,{className:g.iconRoot,children:(0,B.jsx)(P.Z,{size:16})}),(0,B.jsx)(Q.Z,{children:(0,B.jsx)(te.Z,{teamDid:a.did,store:e,onDelete:()=>s(e.url)})})]},e.url))),(0,B.jsx)(ee.Z,{disabled:l,onAdd:n,teamDid:a.did,blockletRegistryList:a.blockletRegistryList})]})})]})}));se.defaultProps={onChange:()=>{},onDelete:()=>{}};const oe=se;var ae;function re(){const{t:e}=(0,h.PE)(),{info:t}=(0,p.h6)(),[n]=(0,i.Z)(m.WC),{blockletRegistryList:s}=t,a=s.find((e=>n===e.url))||s[0],[l,f]=(0,o.useState)(a.url),x=t.routing.adminPath,b=r()(window.location.origin,x),g=(0,o.useRef)(null);return(0,B.jsxs)(le,{children:[(0,B.jsxs)(u.Z,{separator:"\u203a","aria-label":"breadcrumb",className:"page-breadcrumb",children:[(0,B.jsx)(c.Z,{color:"textPrimary",children:e("common.store")}),(0,B.jsx)(oe,{ref:g,onChange:e=>f(e),onDelete:e=>{var n;l===e&&f(null===(n=t.blockletRegistryList[0])||void 0===n?void 0:n.url)}})]}),(0,B.jsx)(d.Z,{className:"store-header",display:"flex",justifyContent:"space-between",p:0,m:0,children:(0,B.jsx)(c.Z,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:e("store.headerDescription")})}),(0,B.jsx)(H,{className:"blocklet-list",handleSearchSelect:e=>{let{detailUrl:t}=e;const n=new URL(t);n.searchParams.set("server-url",b);const s=document.createElement("a");s.setAttribute("target","_blank"),s.setAttribute("href",n.href),s.click()},storeUrl:l})]})}const le=l.Z.main(ae||(ae=(0,s.Z)(["\n @media (max-width: ","px) {\n .store-header {\n flex-direction: column;\n margin-bottom: 32px !important;\n }\n\n .page-header {\n margin-bottom: 16px !important;\n }\n }\n .blocklet-list {\n aside:hover {\n height: calc(100vh - 235px);\n }\n }\n"])),(e=>e.theme.breakpoints.values.sm))}}]);
@@ -1,2 +0,0 @@
1
- /*! For license information please see 5296.5812dffa.chunk.js.LICENSE.txt */
2
- (self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[5296],{10381:(e,r,t)=>{"use strict";t.d(r,{Z:()=>l});var n=t(39861),o=t(99360),i=t(22693),a=t(5057);const s=t(85493),c={parseNumbers:!1,parseBooleans:!1},u={skipNull:!1,skipEmptyString:!1},l=(e,r)=>{var t,l;const{navigateMode:p="push",parseOptions:f,stringifyOptions:y}=r||{},d=Object.assign(Object.assign({},c),f),g=Object.assign(Object.assign({},u),y),v=s.useLocation(),b=null===(t=s.useHistory)||void 0===t?void 0:t.call(s),h=null===(l=s.useNavigate)||void 0===l?void 0:l.call(s),m=(0,n.Z)(),j=(0,a.useRef)("function"===typeof e?e():e||{}),O=(0,a.useMemo)((()=>(0,i.parse)(v.search,d)),[v.search]),w=(0,a.useMemo)((()=>Object.assign(Object.assign({},j.current),O)),[O]);return[w,(0,o.Z)((e=>{const r="function"===typeof e?e(w):e;m(),b&&b[p]({hash:v.hash,search:(0,i.stringify)(Object.assign(Object.assign({},O),r),g)||"?"},v.state),h&&h({hash:v.hash,search:(0,i.stringify)(Object.assign(Object.assign({},O),r),g)||"?"},{replace:"replace"===p,state:v.state})}))]}},71246:(e,r,t)=>{"use strict";r.Z=void 0;(n=t(5057))&&n.__esModule;var n,o=t(96266);function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){s(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function s(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var c=function(e){return(0,o.jsxs)("svg",a(a({},e),{},{children:[(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.886 1.875a4.207 4.207 0 1 0 0 8.414 4.207 4.207 0 0 0 0-8.414zM4.112 4.308A2.51 2.51 0 1 1 7.66 7.857a2.51 2.51 0 0 1-3.55-3.55zm.095 6.522A4.207 4.207 0 0 0 0 15.037v2.799c0 .16.13.289.29.289h1.119c.16 0 .289-.13.289-.29v-2.798a2.51 2.51 0 0 1 2.51-2.509h3.357a2.51 2.51 0 0 1 2.51 2.51v2.798c0 .16.13.289.289.289h1.12c.159 0 .288-.13.288-.29v-2.798a4.208 4.208 0 0 0-4.207-4.207H4.207z"}),(0,o.jsx)("rect",{x:"12.5",y:"9.375",width:"7.5",height:"1.875",rx:".938"}),(0,o.jsx)("rect",{x:"15.313",y:"14.063",width:"7.5",height:"1.875",rx:".938",transform:"rotate(-90 15.313 14.063)"})]}))};c.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},c.displayName="allow-login";r.Z=c},12987:(e,r,t)=>{"use strict";r.Z=void 0;(n=t(5057))&&n.__esModule;var n,o=t(96266);function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){s(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function s(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var c=function(e){return(0,o.jsxs)("svg",a(a({},e),{},{children:[(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.886 1.875a4.207 4.207 0 1 0 0 8.414 4.207 4.207 0 0 0 0-8.414zM4.112 4.308A2.51 2.51 0 1 1 7.66 7.857a2.51 2.51 0 0 1-3.55-3.55zm.095 6.522A4.207 4.207 0 0 0 0 15.037v2.799c0 .16.13.289.29.289h1.119c.16 0 .289-.13.289-.29v-2.798a2.51 2.51 0 0 1 2.51-2.509h3.357a2.51 2.51 0 0 1 2.51 2.51v2.798c0 .16.13.289.289.289h1.12c.159 0 .288-.13.288-.29v-2.798a4.208 4.208 0 0 0-4.207-4.207H4.207z"}),(0,o.jsx)("rect",{x:"12.5",y:"9.375",width:"7.5",height:"1.875",rx:".938"})]}))};c.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},c.displayName="forbid-login";r.Z=c},68051:(e,r,t)=>{"use strict";r.Z=void 0;(n=t(5057))&&n.__esModule;var n,o=t(96266);function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){s(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function s(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var c=function(e){return(0,o.jsxs)("svg",a(a({},e),{},{children:[(0,o.jsx)("g",{clipPath:"url(#clip0)",children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.598A4.092 4.092 0 1 0 9 9.78a4.092 4.092 0 0 0 0-8.183zM7.274 3.964a2.44 2.44 0 1 1 3.452 3.451 2.44 2.44 0 0 1-3.452-3.451zm.093 6.343A4.091 4.091 0 0 0 3.275 14.4v2.722c0 .155.126.281.281.281h1.09a.281.281 0 0 0 .28-.281v-2.722a2.44 2.44 0 0 1 2.44-2.44h3.267a2.442 2.442 0 0 1 2.44 2.44v2.722c0 .155.127.281.282.281h1.088a.281.281 0 0 0 .282-.281v-2.722a4.091 4.091 0 0 0-4.092-4.091H7.367z"})}),(0,o.jsx)("defs",{children:(0,o.jsx)("clipPath",{id:"clip0",children:(0,o.jsx)("path",{transform:"translate(0 .5)",d:"M0 0h18v18H0z"})})})]}))};c.defaultProps={width:"18",height:"19",viewBox:"0 0 18 19",xmlns:"http://www.w3.org/2000/svg"},c.displayName="person";r.Z=c},5178:(e,r,t)=>{"use strict";var n=t(71600);r.Z=void 0;var o=n(t(56930)),i=t(96266);r.Z=(0,o.default)((0,i.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline")},53047:(e,r,t)=>{"use strict";var n=t(71600);r.Z=void 0;var o=n(t(56930)),i=t(96266);r.Z=(0,o.default)((0,i.jsx)("path",{d:"m17 7-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.58L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4z"}),"Logout")},80578:(e,r,t)=>{"use strict";var n=t(71600);r.Z=void 0;var o=n(t(56930)),i=t(96266);r.Z=(0,o.default)((0,i.jsx)("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8m0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4z"}),"Loop")},64185:(e,r,t)=>{"use strict";var n=t(71600);r.Z=void 0;var o=n(t(56930)),i=t(96266);r.Z=(0,o.default)((0,i.jsx)("path",{d:"M3 14h4v-4H3zm0 5h4v-4H3zM3 9h4V5H3zm5 5h13v-4H8zm0 5h13v-4H8zM8 5v4h13V5z"}),"ViewList")},52277:(e,r)=>{var t;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],r=0;r<arguments.length;r++){var t=arguments[r];if(t){var i=typeof t;if("string"===i||"number"===i)e.push(t);else if(Array.isArray(t)){if(t.length){var a=o.apply(null,t);a&&e.push(a)}}else if("object"===i){if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]")){e.push(t.toString());continue}for(var s in t)n.call(t,s)&&t[s]&&e.push(s)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(t=function(){return o}.apply(r,[]))||(e.exports=t)}()},34997:e=>{"use strict";var r="%[a-f0-9]{2}",t=new RegExp("("+r+")|([^%]+?)","gi"),n=new RegExp("("+r+")+","gi");function o(e,r){try{return[decodeURIComponent(e.join(""))]}catch(i){}if(1===e.length)return e;r=r||1;var t=e.slice(0,r),n=e.slice(r);return Array.prototype.concat.call([],o(t),o(n))}function i(e){try{return decodeURIComponent(e)}catch(i){for(var r=e.match(t)||[],n=1;n<r.length;n++)r=(e=o(r,n).join("")).match(t)||[];return e}}e.exports=function(e){if("string"!==typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(r){return function(e){for(var t={"%FE%FF":"\ufffd\ufffd","%FF%FE":"\ufffd\ufffd"},o=n.exec(e);o;){try{t[o[0]]=decodeURIComponent(o[0])}catch(r){var a=i(o[0]);a!==o[0]&&(t[o[0]]=a)}o=n.exec(e)}t["%C2"]="\ufffd";for(var s=Object.keys(t),c=0;c<s.length;c++){var u=s[c];e=e.replace(new RegExp(u,"g"),t[u])}return e}(e)}}},22693:(e,r,t)=>{"use strict";const n=t(13143),o=t(34997),i=t(72057),a=t(74472);function s(e){if("string"!==typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function c(e,r){return r.encode?r.strict?n(e):encodeURIComponent(e):e}function u(e,r){return r.decode?o(e):e}function l(e){return Array.isArray(e)?e.sort():"object"===typeof e?l(Object.keys(e)).sort(((e,r)=>Number(e)-Number(r))).map((r=>e[r])):e}function p(e){const r=e.indexOf("#");return-1!==r&&(e=e.slice(0,r)),e}function f(e){const r=(e=p(e)).indexOf("?");return-1===r?"":e.slice(r+1)}function y(e,r){return r.parseNumbers&&!Number.isNaN(Number(e))&&"string"===typeof e&&""!==e.trim()?e=Number(e):!r.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function d(e,r){s((r=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},r)).arrayFormatSeparator);const t=function(e){let r;switch(e.arrayFormat){case"index":return(e,t,n)=>{r=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),r?(void 0===n[e]&&(n[e]={}),n[e][r[1]]=t):n[e]=t};case"bracket":return(e,t,n)=>{r=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),r?void 0!==n[e]?n[e]=[].concat(n[e],t):n[e]=[t]:n[e]=t};case"comma":case"separator":return(r,t,n)=>{const o="string"===typeof t&&t.includes(e.arrayFormatSeparator),i="string"===typeof t&&!o&&u(t,e).includes(e.arrayFormatSeparator);t=i?u(t,e):t;const a=o||i?t.split(e.arrayFormatSeparator).map((r=>u(r,e))):null===t?t:u(t,e);n[r]=a};default:return(e,r,t)=>{void 0!==t[e]?t[e]=[].concat(t[e],r):t[e]=r}}}(r),n=Object.create(null);if("string"!==typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const o of e.split("&")){if(""===o)continue;let[e,a]=i(r.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator"].includes(r.arrayFormat)?a:u(a,r),t(u(e,r),a,n)}for(const o of Object.keys(n)){const e=n[o];if("object"===typeof e&&null!==e)for(const t of Object.keys(e))e[t]=y(e[t],r);else n[o]=y(e,r)}return!1===r.sort?n:(!0===r.sort?Object.keys(n).sort():Object.keys(n).sort(r.sort)).reduce(((e,r)=>{const t=n[r];return Boolean(t)&&"object"===typeof t&&!Array.isArray(t)?e[r]=l(t):e[r]=t,e}),Object.create(null))}r.extract=f,r.parse=d,r.stringify=(e,r)=>{if(!e)return"";s((r=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},r)).arrayFormatSeparator);const t=t=>{return r.skipNull&&(null===(n=e[t])||void 0===n)||r.skipEmptyString&&""===e[t];var n},n=function(e){switch(e.arrayFormat){case"index":return r=>(t,n)=>{const o=t.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?t:null===n?[...t,[c(r,e),"[",o,"]"].join("")]:[...t,[c(r,e),"[",c(o,e),"]=",c(n,e)].join("")]};case"bracket":return r=>(t,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?t:null===n?[...t,[c(r,e),"[]"].join("")]:[...t,[c(r,e),"[]=",c(n,e)].join("")];case"comma":case"separator":return r=>(t,n)=>null===n||void 0===n||0===n.length?t:0===t.length?[[c(r,e),"=",c(n,e)].join("")]:[[t,c(n,e)].join(e.arrayFormatSeparator)];default:return r=>(t,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?t:null===n?[...t,c(r,e)]:[...t,[c(r,e),"=",c(n,e)].join("")]}}(r),o={};for(const a of Object.keys(e))t(a)||(o[a]=e[a]);const i=Object.keys(o);return!1!==r.sort&&i.sort(r.sort),i.map((t=>{const o=e[t];return void 0===o?"":null===o?c(t,r):Array.isArray(o)?o.reduce(n(t),[]).join("&"):c(t,r)+"="+c(o,r)})).filter((e=>e.length>0)).join("&")},r.parseUrl=(e,r)=>{r=Object.assign({decode:!0},r);const[t,n]=i(e,"#");return Object.assign({url:t.split("?")[0]||"",query:d(f(e),r)},r&&r.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,r)}:{})},r.stringifyUrl=(e,t)=>{t=Object.assign({encode:!0,strict:!0},t);const n=p(e.url).split("?")[0]||"",o=r.extract(e.url),i=r.parse(o,{sort:!1}),a=Object.assign(i,e.query);let s=r.stringify(a,t);s&&(s="?".concat(s));let u=function(e){let r="";const t=e.indexOf("#");return-1!==t&&(r=e.slice(t)),r}(e.url);return e.fragmentIdentifier&&(u="#".concat(c(e.fragmentIdentifier,t))),"".concat(n).concat(s).concat(u)},r.pick=(e,t,n)=>{n=Object.assign({parseFragmentIdentifier:!0},n);const{url:o,query:i,fragmentIdentifier:s}=r.parseUrl(e,n);return r.stringifyUrl({url:o,query:a(i,t),fragmentIdentifier:s},n)},r.exclude=(e,t,n)=>{const o=Array.isArray(t)?e=>!t.includes(e):(e,r)=>!t(e,r);return r.pick(e,o,n)}},74472:e=>{"use strict";e.exports=function(e,r){for(var t={},n=Object.keys(e),o=Array.isArray(r),i=0;i<n.length;i++){var a=n[i],s=e[a];(o?-1!==r.indexOf(a):r(a,s,e))&&(t[a]=s)}return t}},72057:e=>{"use strict";e.exports=(e,r)=>{if("string"!==typeof e||"string"!==typeof r)throw new TypeError("Expected the arguments to be of type `string`");if(""===r)return[e];const t=e.indexOf(r);return-1===t?[e]:[e.slice(0,t),e.slice(t+r.length)]}},13143:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>"%".concat(e.charCodeAt(0).toString(16).toUpperCase())))},36299:(e,r,t)=>{"use strict";t.d(r,{Z:()=>s});class n extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const o=e=>void 0===globalThis.DOMException?new n(e):new DOMException(e),i=e=>{const r=void 0===e.reason?o("This operation was aborted."):e.reason;return r instanceof Error?r:o(r)};const a=Symbol("skip");async function s(e,r){return async function(e,r){let{concurrency:t=Number.POSITIVE_INFINITY,stopOnError:n=!0,signal:o}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((s,c)=>{if(void 0===e[Symbol.iterator]&&void 0===e[Symbol.asyncIterator])throw new TypeError("Expected `input` to be either an `Iterable` or `AsyncIterable`, got (".concat(typeof e,")"));if("function"!==typeof r)throw new TypeError("Mapper function is required");if(!Number.isSafeInteger(t)&&t!==Number.POSITIVE_INFINITY||!(t>=1))throw new TypeError("Expected `concurrency` to be an integer from 1 and up or `Infinity`, got `".concat(t,"` (").concat(typeof t,")"));const u=[],l=[],p=new Map;let f=!1,y=!1,d=!1,g=0,v=0;const b=void 0===e[Symbol.iterator]?e[Symbol.asyncIterator]():e[Symbol.iterator](),h=e=>{f=!0,y=!0,c(e)};o&&(o.aborted&&h(i(o)),o.addEventListener("abort",(()=>{h(i(o))})));const m=async()=>{if(y)return;const e=await b.next(),t=v;if(v++,e.done){if(d=!0,0===g&&!y){if(!n&&l.length>0)return void h(new AggregateError(l));if(y=!0,0===p.size)return void s(u);const e=[];for(const[r,t]of u.entries())p.get(r)!==a&&e.push(t);s(e)}}else g++,(async()=>{try{const n=await e.value;if(y)return;const o=await r(n,t);o===a&&p.set(t,o),u[t]=o,g--,await m()}catch(o){if(n)h(o);else{l.push(o),g--;try{await m()}catch(o){h(o)}}}})()};(async()=>{for(let r=0;r<t;r++){try{await m()}catch(e){h(e);break}if(d||f)break}})()}))}(e,(e=>e()),r)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[5312],{80378:(e,n,t)=>{t.d(n,{Z:()=>p});var i=t(55898),o=t.n(i),l=t(62681),a=t(72333),r=t(6352),s=t.n(r),c=t(35432),d=t(58238),u=t(46090);var m=t(96266);function p(e){let{blocklet:n,style:t,size:i,ancestors:o,...r}=e;const p=(0,d.h6)(),{logoUrl:h,inService:f}=function(e){var n;let{blocklet:t,ancestors:i=[]}=e;const o=(0,d.h6)(),{inService:l}=o,a="?v=".concat(null===t||void 0===t||null===(n=t.meta)||void 0===n?void 0:n.version).concat((0,u.XN)(null===t||void 0===t?void 0:t.status)?"~":"");let r=l?s()(u.zn,c.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle",a):s()(o.imgPrefix,"blocklet.png");if("registry"===t.source&&t.deployedFrom&&t.meta.logo)r=s()(t.deployedFrom,(0,u.lk)(t.meta.bundleDid,t.meta.logo),a);else{const e=window.env.apiPrefix||"/",n=i.concat(t),o=l?n.slice(1):n;r=s()(e,"/blocklet/logo-bundle".concat(o.map((e=>"/".concat(e.meta.did))).join("")),a)}return{logoUrl:r,inService:l}}({blocklet:n,ancestors:o}),{variant:g}=r,x=f?()=>{}:e=>{e.target.src="".concat(p.imgPrefix,"/blocklet.png")};let v=(0,m.jsx)("img",{src:h,onError:x,alt:n.meta.name,style:{width:i}});return n.meta.logo||(v=(0,m.jsx)(a.Z,{did:n.meta.did||"",responsive:!0})),(0,m.jsx)(l.Z,{variant:g||"square",style:Object.assign({backgroundColor:"transparent",width:i,height:i,borderRadius:10},t),...r,children:v})}p.propTypes={blocklet:o().object.isRequired,style:o().object,size:o().oneOfType([o().number,o().string]),ancestors:o().array},p.defaultProps={style:{},size:40,ancestors:[]}},74286:(e,n,t)=>{t.d(n,{Z:()=>r});var i=t(55898),o=t.n(i),l=t(39948),a=t(96266);function r(e){let{depth:n,className:t}=e;return(0,a.jsx)(l.Z,{ml:Math.max(2*(n-1),0),className:t,sx:{borderBottom:1,borderColor:"rgba(0,0,0,0.12)"}},"group-collapse-box")}r.propTypes={depth:o().number,className:o().string},r.defaultProps={depth:1,className:""}},44784:(e,n,t)=>{t.d(n,{Z:()=>d});var i,o=t(71171),l=t(33518),a=t(82790),r=t(96266);function s(e){let{labelProps:n,className:t,style:i,...o}=e;const l={...n,labelPlacement:(null===n||void 0===n?void 0:n.labelPlacement)||"start"};return(0,r.jsx)(c,{className:t,style:i,children:(0,r.jsx)(a.Z,{labelProps:l,...o})})}s.propTypes=a.Z.propTypes,s.defaultProps=a.Z.defaultProps;const c=l.Z.div(i||(i=(0,o.Z)(["\n max-width: 300px;\n > label {\n display: flex;\n justify-content: space-between;\n width: 100%;\n margin-left: 0;\n margin-right: 0;\n }\n "," {\n max-width: 100%;\n }\n"])),(e=>{let{theme:n}=e;return n.breakpoints.down("sm")})),d=s},59375:(e,n,t)=>{t.d(n,{Z:()=>Z});var i,o=t(71171),l=t(5057),a=t(55898),r=t.n(a),s=t(6352),c=t.n(s),d=t(33518),u=t(92706),m=t.n(u),p=t(39948),h=t(52277),f=t.n(h),g=t(68420),x=t(96266);const v=(0,l.lazy)((()=>Promise.all([t.e(6547),t.e(5760),t.e(6743),t.e(9282),t.e(1294),t.e(4804),t.e(9132)]).then(t.bind(t,84804)).then((e=>({default:e.Uploader}))))),b="/blocklet/logo/upload";function Z(e){let{url:n,height:t,width:i,enabled:o,type:a,did:r,prefix:s,headers:d,onUploaded:u}=e;const{t:m}=(0,g.PE)(),h=(0,l.useRef)(null),Z={cursor:o?"pointer":"default","&::after":{content:'"'.concat(m("common.switch"),'"')}};return(0,x.jsxs)(j,{id:"uploader-".concat(r,"-").concat(a),children:[(0,x.jsx)(v,{ref:h,popup:!0,onUploadFinish:()=>{var e;u(),null===(e=h.current)||void 0===e||e.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:c()(s,b,a,r),disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:["image/*",".jpg",".jpeg",".png",".gif",".svg"],maxFileSize:10485760,maxNumberOfFiles:1}},tusProps:{headers:d}}),(0,x.jsx)(p.Z,{className:f()("uploader-wrapper",o&&"enabled"),sx:Z,onClick:()=>{var e;null===(e=h.current)||void 0===e||e.open()},children:(0,x.jsx)("img",{alt:"Logo",src:n,style:{height:t,width:i}})})]},"uploader-".concat(r,"-").concat(a))}Z.propTypes={url:r().string.isRequired,type:r().oneOf(["square","rect","favicon"]).isRequired,did:r().string.isRequired,prefix:r().string.isRequired,headers:r().func,onUploaded:r().func,height:r().number,width:r().any,enabled:r().bool},Z.defaultProps={height:80,width:"auto",enabled:!0,headers:()=>({}),onUploaded:m()};const j=d.Z.div(i||(i=(0,o.Z)(["\n .uploader-wrapper {\n display: inline-flex;\n position: relative;\n font-size: 0px;\n &.enabled {\n cursor: pointer;\n }\n &::after {\n display: none;\n }\n &.enabled::after {\n display: block;\n opacity: 0;\n position: absolute;\n bottom: 0;\n background: rgba(0, 0, 0, 0.2);\n left: 0;\n right: 0;\n height: 2.2em;\n color: white;\n text-align: center;\n font-size: 12px;\n line-height: 2em;\n transition: opacity 0.3s ease;\n }\n &:hover::after {\n opacity: 1;\n }\n }\n"])))},48579:(e,n,t)=>{t.r(n),t.d(n,{default:()=>Rt});var i,o=t(71171),l=t(5057),a=t(33518),r=t(55898),s=t.n(r),c=t(96181),d=t(6352),u=t.n(d),m=t(35432),p=t(39948),h=t(55402),f=t(82275),g=t(96399),x=t(65688),v=t(37633),b=t(48037),Z=t(92273),j=t(76720),y=t(15849),k=t(68420),C=t(94464),S=t(38242),w=t(80378),E=t(1722),L=t(43681),P=t.n(L),R=t(50482),O=t.n(R),T=t(16147),I=t(29034),A=t(28726),N=t(80578),_=t(77277),B=t(86229),F=t(28641),D=t(44846),z=t(13727),U=t(56184),K=t(67680),W=t(19654),q=t(90067),G=t(39646),M=t(43897),V=t(47020),H=t(49020),Y=t(35406),J=t(11875),Q=t(95890),X=t(96266);function $(e){let{label:n,disabled:t,required:i,initialValue:o,onChange:a,style:r,onSubmit:s,triggers:c,options:d,formatterBeforeSubmit:u,helperText:m,placeholder:h,renderImage:f,renderLabel:g,filterKeys:x,noEmpty:v,...b}=e;const[Z,j]=(0,l.useState)(!1),[y,k]=(0,l.useState)(!1),[C,S]=l.useState(""),[w,E]=(0,l.useState)(o),[L,P]=(0,l.useState)(w),R=(0,l.useMemo)((()=>{if(!d)return{};const e={};return d.forEach((n=>{e[n.code]=n})),e}),[d]),O=Z?(0,X.jsx)(G.Z,{options:d,value:L,onChange:(e,n)=>{if(!Array.isArray(n))return P([]),void a([]);const t=n.filter((e=>R[e]));if(!t.length)return P([]),void a([]);P(t),a(t)},inputValue:C,onInputChange:(e,n)=>{S(n)},PopperComponent:ne,fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:()=>{if(!d)return[];if(!C)return d.map((e=>e.code));const e=new RegExp(C.toLowerCase());return d.filter((n=>{for(let i=0;i<x.length;i++){var t;const o=x[i];if(e.test(null===(t=n[o])||void 0===t?void 0:t.toLowerCase()))return!0}return!1})).map((e=>e.code))},getOptionLabel:e=>{var n;return null===(n=R[e])||void 0===n?void 0:n.name},renderInput:e=>(0,X.jsx)(V.Z,{...e,label:"",placeholder:h}),renderOption:(e,n)=>{var t;const i=-1!==L.indexOf(n);return(0,l.createElement)(ee,{component:"li",...e,key:n},f(R[n]||{}),(0,X.jsx)(p.Z,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:i?"700":"normal"},children:g(n,R[n])||(null===(t=R[n])||void 0===t?void 0:t.name)}),(0,X.jsx)(p.Z,{component:z.default,sx:{opacity:.5,width:18,height:18},style:{visibility:i?"visible":"hidden"}}))},...b}):(0,X.jsx)(p.Z,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:L.filter((e=>d.some((n=>n.code===e)))).map((e=>(0,X.jsx)(W.Z,{label:d.find((n=>n.code===e)).name,style:{marginRight:8},size:"small"},e)))});return(0,X.jsx)(J.Z,{className:"form",style:r,children:(0,X.jsxs)(p.Z,{className:"form-item",children:[(0,X.jsxs)(p.Z,{className:"form-item-label",children:[n,i&&(0,X.jsx)(Y.Z,{})]}),(0,X.jsxs)(p.Z,{className:"form-item-body",children:[(0,X.jsx)(p.Z,{className:"form-item-input",children:O}),(0,X.jsx)(p.Z,{className:"form-item-action",children:Z?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(K.Z,{"data-cy":"schema-form-item-confirm",onClick:async()=>{k(!0);try{!1===await s("function"===typeof u?u(L):L)?P(w):v&&!L.length?(P(o),E(o)):(P(L),E(L))}catch(e){P(w)}finally{k(!1),j(!1)}},disabled:t||y,size:"large",children:y?(0,X.jsx)(D.Z,{size:24}):(0,X.jsx)(U.Z,{})}),(0,X.jsx)(K.Z,{"data-cy":"schema-form-item-cancel",onClick:()=>{P(w),j(!1)},disabled:t||y,size:"large",children:(0,X.jsx)(z.default,{})})]}):(0,X.jsx)(Q.Z,{triggers:c,onEnterEdit:()=>j(!0),disabled:t})})]}),Z&&m&&(0,X.jsx)(q.Z,{children:m})]})})}$.propTypes={style:s().object,onSubmit:s().func,onChange:s().func,label:s().string,initialValue:s().string,required:s().bool,disabled:s().bool,triggers:s().array,options:s().array,helperText:s().string,formatterBeforeSubmit:s().func,placeholder:s().string,renderImage:s().func,filterKeys:s().arrayOf(s().string),noEmpty:s().bool,renderLabel:s().func},$.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",required:!1,disabled:!1,triggers:[],options:[],helperText:"",formatterBeforeSubmit:e=>e.join(","),placeholder:"",filterKeys:["name"],renderImage:()=>null,renderLabel:(e,n)=>"",noEmpty:!1};const ee=a.Z.div(i||(i=(0,o.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 48px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\n font-size: 1.1em;\n"]))),ne=(0,a.Z)(H.Z)((()=>({["& .".concat(M.Z.paper)]:{boxShadow:"0px 8px 12px rgba(92, 92, 92, 0.04), 0px -10px 12px rgba(92, 92, 92, 0.04)",borderRadius:"6px",width:"100%",border:"1px solid rgba(0, 0, 0, 0.12)",color:"inherit",fontSize:13,position:"absolute",left:0,top:0},["& .".concat(M.Z.listbox)]:{padding:0}})));var te,ie=t(58238),oe=t(46090),le=t(54063),ae=t(63406),re=t(78410),se=t(31853),ce=t(88577),de=t(70461),ue=t(73545),me=t(29054);function pe(e){let{initialValue:n,onChange:t,disabled:i,loading:o}=e;const{t:l}=(0,k.PE)(),{api:a}=(0,ue.T)(),{blocklet:r}=(0,me.y0)(),[s,c]=(0,se.Z)({newAppSk:"",isConnectOpen:!1}),d=()=>c({isConnectOpen:!1}),u=r.structVersion===m.APP_STRUCT_VERSION?[{key:"rotate-with-did-wallet",title:"Migrate with DID Wallet",handler:()=>{(0,oe.An)(r.status)?B.Z.error(l("blocklet.error.isRunning")):(0,S.isInProgress)(r.status)?B.Z.error(l("blocklet.error.isInProgress")):c({isConnectOpen:!0})}}]:[];return[(0,X.jsx)(F.Z,{disabled:i,loading:o,initialValue:n,onSubmit:e=>(c({newAppSk:e}),!1),triggers:u,secure:!0}),s.newAppSk&&(0,X.jsx)(de.Z,{title:l("blocklet.config.appSkTitle"),description:(0,X.jsxs)(p.Z,{children:[(0,X.jsx)(p.Z,{children:l("blocklet.config.appSkChangeTip")}),(0,X.jsx)(p.Z,{fontWeight:"bold",mt:2,children:l("blocklet.config.appDidChangeTip")}),(0,X.jsxs)(he,{children:[(0,X.jsx)("li",{children:l("blocklet.config.appDidChangeTipL1")}),(0,X.jsx)("li",{children:l("blocklet.config.appDidChangeTipL2")})]})]}),confirm:l("confirm"),cancel:l("cancel"),onConfirm:()=>(async e=>{try{await t(e)}finally{c({newAppSk:""})}})(s.newAppSk),onCancel:()=>c({newAppSk:""})}),(0,X.jsx)(ce.Z,{popup:!0,open:s.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:a.get,checkTimeout:3e5,onSuccess:d,extraParams:{appDid:r.appDid},messages:{title:l("setup.keyPair.title"),scan:l("setup.keyPair.scan"),confirm:l("setup.keyPair.confirm"),success:l("setup.keyPair.success")},onClose:d})]}pe.propTypes={initialValue:s().string,onChange:s().func,disabled:s().bool,loading:s().bool},pe.defaultProps={initialValue:"default",onChange:()=>{},disabled:!1,loading:!1};const he=(0,a.Z)("ul")(te||(te=(0,o.Z)(["\n padding-left: 16px;\n li {\n margin-top: 8px;\n list-style: disk;\n font-weight: bold;\n }\n"])));var fe,ge=t(13128),xe=t(55372),ve=t(11750),be=t(88574),Ze=t(26174),je=t(88092),ye=t(50185),ke=t(17425);function Ce(e){let{onCancel:n,onSuccess:t,onError:i}=e;const{api:o}=(0,l.useContext)(ue.B),[a,r]=(0,l.useState)(!1),{t:s,locale:c}=(0,k.PE)(),[d,u]=(0,l.useState)(""),[m,h]=(0,l.useState)(!1),[f,g]=(0,l.useState)(0),[x,v]=(0,l.useState)(""),{endpoint:b}=(0,ke.DJ)(),[Z,j]=(0,l.useState)(!1),y=e=>{u(null),r(!0);try{v(e.result),g(S.length-1)}catch(n){const e=(0,oe.Z)(n);u(e),i(n)}finally{r(!1)}},C=()=>{h(!1),g(0)},S=[{body:(0,X.jsxs)(p.Z,{children:[(0,X.jsx)(ve.Z,{children:s("team.transferApp.transferDialog.tips.progress")}),(0,X.jsx)(ve.Z,{mt:3,mb:2,children:s("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:s("common.cancel"),confirm:s("team.transferApp.transferDialog.createTransferLink"),onCancel:n,onConfirm:()=>{h(!0),g(1)}},{body:()=>(0,X.jsx)(ce.Z,{action:"transfer-app-owner",open:m,locale:c,checkFn:o.get,onClose:C,onSuccess:y,checkTimeout:3e5,extraParams:{},messages:{title:s("team.transferApp.connectDialog.title"),scan:s("team.transferApp.connectDialog.scan"),confirm:s("team.transferApp.connectDialog.confirm"),success:s("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const e=(0,oe.VP)({transferId:x.transferId,endpoint:b});return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(p.Z,{component:Se,dangerouslySetInnerHTML:{__html:s("team.transferApp.transferDialog.createSuccessTip1")}}),(0,X.jsx)(p.Z,{component:Se,mt:2,children:(0,X.jsx)(Se,{children:s("team.transferApp.transferDialog.createSuccessTip3")})}),(0,X.jsxs)(p.Z,{children:[(0,X.jsx)(p.Z,{component:Se,mt:2,children:(0,X.jsx)(Se,{children:s("team.transferApp.transferDialog.createSuccessTip2",{expireDate:(0,oe.B2)(x.expireDate,c)})})}),(0,X.jsx)(p.Z,{my:1,children:(0,X.jsx)(ye.Z,{children:e})})]}),(0,X.jsx)("div",{children:(0,X.jsx)(Ze.Z,{value:"end",control:(0,X.jsx)(je.Z,{checked:Z,onChange:e=>j(e.target.checked)}),label:s("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:s("common.confirm"),onConfirm:t}],w=S[f];return(0,X.jsxs)(ge.ZP,{title:(0,X.jsx)(Se,{className:"title",children:s("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:(0,X.jsxs)(X.Fragment,{children:[w.cancel&&(0,X.jsx)(A.Z,{onClick:w.onCancel,color:"inherit",children:w.cancel}),(0,X.jsxs)(A.Z,{onClick:w.onConfirm,color:"error",disabled:a||f===S.length-1&&!Z,variant:"contained",autoFocus:!0,children:[a&&(0,X.jsx)(D.Z,{size:16}),w.confirm]})]}),children:[(0,X.jsx)(xe.Z,{component:"div",children:"function"===typeof w.body?w.body():w.body}),!!d&&(0,X.jsx)(be.Z,{type:"error",variant:"icon",children:d})]})}Ce.propTypes={onCancel:s().func.isRequired,onSuccess:s().func.isRequired,onError:s().func},Ce.defaultProps={onError:()=>{}};const Se=a.Z.div(fe||(fe=(0,o.Z)(["\n font-size: 16px;\n font-weight: bold;\n &.title {\n font-size: 20px;\n }\n"])));var we,Ee=t(49522),Le=t(59375);const Pe=Object.keys(_.SUPPORTED_LANGUAGES).map((e=>({code:e,name:_.SUPPORTED_LANGUAGES[e].nativeName,enName:_.SUPPORTED_LANGUAGES[e].name}))),Re=["name","enName","code"];function Oe(e){var n;let{blocklet:t,onUpdate:i,hasPermission:o,...a}=e;const{api:r,inService:s,prefix:c,getSessionInHeader:d,ws:{useSubscription:u}}=(0,ie.h6)(),{t:h}=(0,l.useContext)(k.RD),[f,g]=(0,l.useState)(""),[x,v]=(0,l.useState)(""),[b,Z]=(0,l.useState)(!1),j=(0,S.getWhoCanAccess)(t),y=null===t||void 0===t||null===(n=t.settings)||void 0===n?void 0:n.publicToStore,C=x||!o,{logoUrl:w,rectLogoUrl:E,faviconUrl:L}=(0,Ee.Z)({blocklet:t}),{did:R}=t.meta,{site:D}=t,z=P()(t.meta,"capabilities.clusterMode",!1);if(u(m.EVENTS.NODE_RUNTIME_INFO,(e=>{z&&g(P()(e,"cpu.physicalCores",""))})),(0,oe.wS)(t.status))return null;const U=t.environments.find((e=>e.key===_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE)),K=!U||"yes"===U.value,W=t.environments.find((e=>e.key===_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LANGUAGES)),q=t.environments.find((e=>e.key===_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL)),G=t.environments.find((e=>e.key===_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER)),M=t.environments.find((e=>e.key===_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR)),V=[{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,description:h("blocklet.config.name"),value:t.environments.find((e=>"BLOCKLET_APP_NAME"===e.key)).value},{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,description:h("blocklet.config.description"),value:t.environments.find((e=>"BLOCKLET_APP_DESCRIPTION"===e.key)).value},{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL,description:h("blocklet.config.appUrl"),value:q?q.value:""},{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_OWNER,description:h("blocklet.config.copyrightOwner"),value:G?G.value:""},{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_COPYRIGHT_YEAR,description:h("blocklet.config.copyrightYear"),value:M?M.value:""}];if(z){const e=t.configs.find((e=>e.key===_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE)),n=e?e.value:f;V.push({key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE,description:h("blocklet.config.clusterSize"),value:n,cpuCores:f})}const H=async(e,n)=>{if(e===_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const e=(0,oe.I)({value:n,cpuCores:f});if(e)return void B.Z.error(e)}const o=[{key:e,value:n}];try{v(!0);const{blocklet:e}=await r.configBlocklet({input:{did:t.meta.did,configs:o}});i(e)}catch(l){B.Z.error(l.message)}finally{v(!1)}};return(0,X.jsxs)(Ne,{...a,children:[V.map((e=>(0,X.jsxs)(p.Z,{className:"config-form",mt:2,children:[(0,X.jsx)(p.Z,{className:"config-label",fontSize:14,mb:0,children:e.description}),(0,X.jsx)(F.Z,{style:{marginTop:0},disabled:x||C,loading:x,initialValue:e.value,onSubmit:n=>H(e.key,n)})]}))),(0,X.jsx)(p.Z,{className:"config-form",component:I.Z,my:3}),(0,X.jsx)(p.Z,{className:"config-label",fontSize:14,mb:1,sx:{flexGrow:0,width:"auto"},children:h("blocklet.config.logoSquare")}),(0,X.jsx)(Le.Z,{did:t.meta.did,height:80,width:80,type:"square",prefix:c,url:w,enabled:o,headers:d}),(0,X.jsx)(p.Z,{className:"config-label",fontSize:14,mt:4,children:h("blocklet.config.logoRect")}),(0,X.jsx)(p.Z,{mb:1.5,className:"config-desc",children:h("blocklet.config.logoRectDesc")}),(0,X.jsx)(Le.Z,{did:t.meta.did,height:80,type:"rect",prefix:c,url:E,enabled:o,headers:d}),(0,X.jsx)(p.Z,{className:"config-label",fontSize:14,mt:4,children:h("blocklet.config.logoFavicon")}),(0,X.jsx)(p.Z,{mb:1.5,className:"config-desc",children:h("blocklet.config.logoFaviconDesc")}),(0,X.jsx)(Le.Z,{did:t.meta.did,height:25,width:25,type:"favicon",prefix:c,url:L,enabled:o,headers:d}),(0,X.jsx)(p.Z,{className:"config-form",children:"all"===j&&"registry"===t.source&&(0,X.jsxs)(p.Z,{className:"config-item",children:[(0,X.jsxs)(p.Z,{className:"config-label",children:[h("blocklet.config.access.publicToStore"),(0,X.jsx)(p.Z,{className:"config-desc",children:h("blocklet.config.access.publicInstanceTip")})]}),(0,X.jsx)(T.Z,{disabled:C,checked:y,defaultChecked:!0,onChange:async e=>{if(!x){v(!0);try{const{checked:n}=e.target,{blocklet:o}=await r.configPublicToStore({input:{did:t.meta.did,publicToStore:n}});i(o)}catch(n){B.Z.error(n.message)}finally{v(!1)}}}})]})}),(0,X.jsx)(p.Z,{className:"config-form",component:I.Z,my:3}),(0,X.jsxs)(p.Z,{className:"config-form",mt:2,children:[(0,X.jsx)(p.Z,{className:"config-label",fontSize:14,mb:0,children:h("blocklet.config.languages")}),(0,X.jsx)($,{style:{marginTop:0},disabled:x||C,loading:x,options:Pe,noEmpty:!0,initialValue:W?W.value.split(","):["en","zh"],onSubmit:e=>H("BLOCKLET_APP_LANGUAGES",e),helperText:h("blocklet.config.selectLanguagesTip"),placeholder:h("blocklet.config.languagesSearch"),filterKeys:Re,renderLabel:(e,n)=>n.name===n.enName?"".concat(n.name," (").concat(e.toUpperCase(),")"):"".concat(n.name,", ").concat(n.enName," (").concat(e.toUpperCase(),")")})]}),(0,X.jsx)(p.Z,{className:"config-form",component:I.Z,my:3}),(0,X.jsx)(p.Z,{className:"config-form",mt:2,children:(0,X.jsx)(p.Z,{className:"config-label",mb:0,children:h("common.security")})}),(0,X.jsxs)(p.Z,{className:"config-form",mt:2,children:[(0,X.jsx)(p.Z,{className:"config-label",fontSize:14,mb:0,children:h("router.domainSecurity.cors.title")}),(0,X.jsx)(p.Z,{mb:1.5,className:"config-desc",children:h("router.domainSecurity.cors.description",{name:"the blocklet"})}),(0,X.jsx)(F.Z,{style:{marginTop:0},disabled:x||C,loading:x,initialValue:(D.corsAllowedOrigins||[]).join(", "),onSubmit:async e=>{const n=D.corsAllowedOrigins||[],i=e.split(",").map((e=>e.trim())).filter(Boolean);if(O()(n,i))return!1;try{v(!0);const e=i.length?i:["__none__"];await r.updateRoutingSite({input:{id:D.id,corsAllowedOrigins:e,teamDid:t.meta.did}}),v(!1)}catch(o){return B.Z.error(o.message),v(!1),!1}return!0}})]}),(0,X.jsx)(p.Z,{className:"config-form",component:I.Z,my:3}),(0,X.jsx)(p.Z,{mb:2,className:"config-label",fontSize:20,children:h("blocklet.config.dangerZone")}),(0,X.jsxs)(p.Z,{px:2,py:1,sx:{border:"1px solid red",borderRadius:2},children:[(0,X.jsx)(p.Z,{className:"config-form",mt:2,children:!s&&(0,X.jsxs)(p.Z,{className:"config-item",children:[(0,X.jsxs)(p.Z,{className:"config-label",children:[h("blocklet.config.deletable.name"),(0,X.jsx)(p.Z,{className:"config-desc",children:h(K?"blocklet.config.deletable.disable":"blocklet.config.deletable.enable")})]}),(0,X.jsx)(T.Z,{disabled:C,checked:!K,defaultChecked:!0,onChange:async e=>{if(!x){v(!0);try{const{checked:n}=e.target,{blocklet:o}=await r.configBlocklet({input:{did:t.meta.did,configs:[{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_DELETABLE,value:n?"no":"yes"}]}});i(o)}catch(n){B.Z.error(n.message)}finally{v(!1)}}}})]})}),(0,X.jsxs)(p.Z,{className:"config-form",mt:2,children:[(0,X.jsx)(p.Z,{className:"config-label",fontSize:14,mb:0,children:h("blocklet.config.sk")}),(0,X.jsx)(pe,{disabled:x||C,loading:x,initialValue:t.environments.find((e=>"BLOCKLET_APP_SK"===e.key)).value,onChange:async e=>{if(!x){v(!0);try{const{blocklet:n}=await r.configBlocklet({input:{did:t.meta.did,configs:[{key:_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SK,value:e}]}});i(n)}catch(n){B.Z.error(n.message)}finally{v(!1)}}}})]}),s&&(0,X.jsx)(ae.Z,{role:"owner",children:e=>(e||le.C)&&(0,X.jsxs)(p.Z,{className:"config-form",mt:2,children:[(0,X.jsxs)(p.Z,{className:"config-item",children:[(0,X.jsx)(p.Z,{className:"config-label",mb:0,children:h("team.transferApp.name")}),(0,X.jsxs)(A.Z,{style:{flexShrink:0},variant:"contained",edge:"end",color:"error",size:"small","data-cy":"transfer-app",onClick:()=>Z(!0),children:[(0,X.jsx)(N.Z,{style:{fontSize:"1.3em",marginRight:4}}),h("team.transferApp.name")]})]}),b&&(0,X.jsx)(Ce,{onCancel:()=>Z(!1),onSuccess:()=>Z(!1)})]})}),(0,X.jsx)(p.Z,{className:"config-form",mt:2,children:(0,X.jsxs)(p.Z,{className:"config-item",children:[(0,X.jsxs)(p.Z,{className:"config-label",children:[h("blocklet.config.clearCache.name"),(0,X.jsx)(p.Z,{className:"config-desc",children:h("blocklet.config.clearCache.purpose")})]}),(0,X.jsx)(re.Z,{teamDid:R})]})})]})]})}const Te=(0,ae.V)(Oe,"mutate_blocklets"),Ie=(0,ae.V)(Oe,"",oe.Wf);function Ae(e){const{inService:n}=(0,ie.h6)();return n?(0,X.jsx)(Ie,{...e}):(0,X.jsx)(Te,{...e})}Oe.propTypes={blocklet:s().object.isRequired,onUpdate:s().func,hasPermission:s().bool},Oe.defaultProps={onUpdate:()=>{},hasPermission:!1};const Ne=a.Z.div(we||(we=(0,o.Z)(["\n padding-top: 24px;\n .config-form {\n flex-grow: 1;\n overflow-y: auto;\n "," {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n }\n }\n\n .config-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 16px 0;\n }\n\n .config-label {\n font-weight: bold;\n }\n\n .config-desc {\n font-weight: normal;\n font-size: 12px;\n color: #666;\n }\n\n .form-item {\n margin-top: 0;\n }\n"])),(e=>e.theme.breakpoints.down("md")));var _e=t(25710),Be=t(93066),Fe=t(80576),De=t(8708),ze=t.n(De),Ue=t(12673),Ke=t(99360),We=t(80506),qe=t(766),Ge=t.n(qe),Me=t(24529),Ve=t.n(Me),He=t(16727),Ye=t.n(He),Je=t(92706),Qe=t.n(Je);const Xe=(0,l.forwardRef)(((e,n)=>{const{t:t}=(0,l.useContext)(k.RD),i=(0,Ue.Z)({show:!1,title:"",content:"",onConfirm:Qe(),onCancel:Qe(),loading:!1}),o=(0,Ke.Z)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i.show=!0,i.title=e.title,i.content=e.content,i.onConfirm=e.onConfirm||Qe(),i.onCancel=e.onCancel||Qe(),i.loading=!1})),a=(0,Ke.Z)((()=>{i.title="",i.content="",i.onConfirm=Qe(),i.onCancel=Qe()})),r=(0,Ke.Z)((()=>{i.show=!1,setTimeout((()=>{a()}),300)})),s=(0,Ke.Z)((()=>{r(),null===i||void 0===i||i.onCancel()}),[]),c=(0,Ke.Z)((async()=>{i.loading=!0;try{await(null===i||void 0===i?void 0:i.onConfirm(r))}finally{i.loading=!1}}),[]);return(0,l.useImperativeHandle)(n,(()=>({open:o,close:r})),[o,r]),(0,X.jsx)(ge.I4,{open:i.show,title:i.title,onConfirm:c,onCancel:s,confirmButton:{text:t("common.confirm"),props:{variant:"contained",color:"primary",loading:i.loading}},cancelButton:{text:t("common.cancel"),props:{variant:"outlined",color:"primary"}},children:i.content instanceof Function?i.content():i.content})}));function $e(){const e=(0,l.useRef)(null),n=(0,Ke.Z)((function(){for(var n,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];null===(n=e.current)||void 0===n||n.open(...i)})),t=(0,Ke.Z)((function(){for(var n,t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];null===(n=e.current)||void 0===n||n.close(...i)})),i={open:n,close:t};return{confirmHolder:(0,X.jsx)(Xe,{ref:e}),confirmApi:i}}const en={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:""};const nn=function(){var e,n;const{api:t}=(0,ie.h6)(),{blocklet:i}=(0,me.y0)(),{t:o}=(0,k.PE)(),{confirmApi:l,confirmHolder:a}=$e(),r=null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did,s=Object.assign({...en},(null===i||void 0===i||null===(n=i.settings)||void 0===n||null===(n=n.notification)||void 0===n?void 0:n.email)||{}),{handleSubmit:c,control:d,formState:u,watch:m,reset:h}=(0,We.cI)({defaultValues:ze()(s,Object.keys(en))}),f=(0,Ue.Z)({testReceiver:"",testReceiverError:""}),g=m("enabled"),x=(0,Ke.Z)((async function(e,n){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];try{var l;const{blocklet:n}=await t.configNotification({input:{did:r,notification:JSON.stringify({email:e})}}),a=Object.assign({...en},(null===n||void 0===n||null===(l=n.settings)||void 0===l||null===(l=l.notification)||void 0===l?void 0:l.email)||{});h(a),i&&B.Z.success(o("oauth.saveSuccess"))}catch(a){if(!i)throw a;B.Z.error(a.message||o("oauth.saveFailed"))}})),v=(0,Ke.Z)((async(e,n,i)=>{try{u.isDirty&&await x(e,n,!1),await t.sendEmail({input:{did:r,receiver:i,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification"})}}),B.Z.success(o("notification.email.testSuccess"))}catch(l){B.Z.error(l.message||o("notification.email.testfailed"))}})),b=(0,Ke.Z)(((e,n)=>{f.testReceiver="",f.testReceiverError="",l.open({title:o("notification.email.testSendEmail"),content:()=>(0,X.jsx)(p.Z,{sx:{width:"300px"},children:(0,X.jsx)(V.Z,{fullWidth:!0,name:"testReceiver",label:o("notification.email.inputTestReceiver"),value:f.testReceiver,onChange:e=>{f.testReceiver=e.target.value},error:!!f.testReceiverError,helperText:f.testReceiverError||"\u3000"})}),async onConfirm(t){var i;const l=null===(i=f.testReceiver)||void 0===i?void 0:i.trim();l?Ge()(l)?(f.testReceiverError="",await v(e,n,l),t()):f.testReceiverError=o("notification.email.receiverInvalid"):f.testReceiverError=o("notification.email.receiverRequired")}})})),Z=(0,Ke.Z)((e=>{const n=null===e||void 0===e?void 0:e.trim();return n?!!Ge()(n)||o("notification.email.fromInvalid"):o("notification.email.fromRequired")})),j=(0,Ke.Z)((e=>{const n=null===e||void 0===e?void 0:e.trim();return n?!!Ve()(n,{require_host:!1,protocols:[]})||o("notification.email.hostInvalid"):o("notification.email.hostRequired")})),y=(0,Ke.Z)((e=>e?!!Ye()(e)||o("notification.email.portInvalid"):o("notification.email.portRequired"))),C=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||o("notification.email.userRequired"))),S=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||o("notification.email.passwordRequired"))),w=(0,Ke.Z)((()=>!0));return(0,X.jsxs)(p.Z,{children:[(0,X.jsxs)("form",{onSubmit:c(x),disabled:!0,children:[(0,X.jsx)(We.Qr,{name:"enabled",control:d,render:e=>{let{field:n}=e;return(0,X.jsx)(Ze.Z,{control:(0,X.jsx)(T.Z,{checked:n.value,...n}),label:o("notification.email.enable"),sx:{marginBottom:"8px"}})}}),(0,X.jsx)(We.Qr,{name:"from",control:d,rules:{validate:g?Z:w},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,label:o("notification.email.from"),error:!!u.errors[t.name],helperText:(null===(n=u.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!g})})}}),(0,X.jsx)(We.Qr,{name:"host",control:d,rules:{validate:g?j:w},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,error:!!u.errors[t.name],label:o("notification.email.host"),helperText:(null===(n=u.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!g})})}}),(0,X.jsx)(We.Qr,{name:"port",control:d,rules:{validate:g?y:w},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,type:"number",error:!!u.errors[t.name],label:o("notification.email.port"),helperText:(null===(n=u.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!g})})}}),(0,X.jsx)(We.Qr,{name:"user",control:d,rules:{validate:g?C:w},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,error:!!u.errors[t.name],label:o("notification.email.user"),helperText:(null===(n=u.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!g})})}}),(0,X.jsx)(We.Qr,{name:"password",control:d,rules:{validate:g?S:w},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,type:"password",error:!!u.errors[t.name],label:o("notification.email.password"),helperText:(null===(n=u.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!g})})}}),(0,X.jsx)(We.Qr,{name:"secure",control:d,rules:{validate:w},render:e=>{let{field:n}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(Ze.Z,{control:(0,X.jsx)(T.Z,{checked:n.value,...n,disabled:!g}),label:o("notification.email.secure"),style:{marginBottom:16}})})}}),(0,X.jsx)(A.Z,{variant:"outlined",color:"warning",onClick:c(b),sx:{mr:2},disabled:!g,children:o("oauth.runTest")}),(0,X.jsx)(A.Z,{type:"submit",variant:"contained",disabled:!u.isDirty,children:o("oauth.save")})]}),a]})},tn=[{label:(0,X.jsx)(p.Z,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:(0,X.jsx)(p.Z,{textAlign:"center",width:"100%",children:"More"}),value:"more"}];const on=function(){const[e,n]=(0,l.useState)(tn[0].value),{t:t}=(0,l.useContext)(k.RD),i=(0,Be.Z)((()=>({email:(0,X.jsx)(nn,{}),more:(0,X.jsx)(p.Z,{children:(0,X.jsx)(_e.Z,{children:t("notification.comingSoon")})})})),[t]);return(0,X.jsxs)(p.Z,{children:[(0,X.jsx)(C.Z,{tabs:tn,current:e,onChange:n}),(0,X.jsx)(p.Z,{marginTop:"10px",children:i[e]})]})};var ln=t(96366),an=t(75239),rn=t(48342),sn=t(94552),cn=t(24558),dn=t(74286),un=t(74490),mn=t(76667),pn=t(70648),hn=t(44067),fn=t(7664),gn=t(44123),xn=t(53906);const vn=[{value:m.WHO_CAN_ACCESS.ALL,icon:xn.Z,title:{zh:"\u6240\u6709\u4eba\u53ef\u8bbf\u95ee",en:"Accessible to all"},description:{zh:"\u5411\u6240\u6709\u4eba\u5f00\u653e\uff0c\u65e0\u9700\u901a\u884c\u8bc1\u5373\u53ef\u8bbf\u95ee\u5e94\u7528",en:"Open to the world anyone can access without passport"}},{value:m.WHO_CAN_ACCESS.INVITED,icon:gn.Z,title:{zh:"\u53ea\u6709\u88ab\u9080\u8bf7\u7684\u4eba\u53ef\u4ee5\u8bbf\u95ee",en:"Only invited people can access"},description:{zh:"\u7a0d\u540e\u60a8\u53ef\u4ee5\u5728\u7ba1\u7406\u9875\u9762\u4e2d\u9080\u8bf7\u6210\u5458",en:"You can invite members later in the admin page"}},{value:m.WHO_CAN_ACCESS.OWNER,icon:fn.Z,title:{zh:"\u53ea\u6709\u5e94\u7528\u6240\u6709\u8005\u53ef\u4ee5\u8bbf\u95ee",en:"Only Owner of the blocklet can access"},description:{zh:"\u5fc5\u987b\u63d0\u4f9b\u6240\u6709\u8005\u901a\u884c\u8bc1\u624d\u80fd\u8bbf\u95ee\u5e94\u7528",en:"You must provide owner passport to access this application"}}];var bn,Zn;const jn="roles",yn=[...vn,{value:jn,icon:pn.Z,title:{zh:"\u6307\u5b9a\u901a\u884c\u8bc1\u53ef\u8bbf\u95ee",en:"Accessible to selected passports"},description:{zh:"\u53ea\u6709\u6307\u5b9a\u7684\u901a\u884c\u8bc1\u53ef\u4ee5\u8bbf\u95ee",en:"Only specified passports can access"}}],kn=(e,n)=>{if(e&&e.startsWith(m.WHO_CAN_ACCESS_PREFIX_ROLES)){const t=(0,S.getRolesFromAuthConfig)({whoCanAccess:e}),i=n.filter((e=>t.includes(e.name)));return{access:jn,roles:i}}return{access:e,roles:[]}},Cn=function(e,n){let{roles:t=[]}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=(e.configs||[]).find((e=>e.key===_.BLOCKLET_CONFIGURABLE_KEY.COMPONENT_ACCESS_WHO));if(i)return kn(i.value,t);if(n&&P()(n,"settings.whoCanAccess")&&P()(n,"settings.whoCanAccess")!==m.WHO_CAN_ACCESS.ALL)return kn(P()(n,"settings.whoCanAccess"),t);const o=(0,S.findServiceFromMeta)(e.meta,m.NODE_SERVICES.AUTH);return P()(o,"config.whoCanAccess")?kn(o.config.whoCanAccess,t):{access:m.WHO_CAN_ACCESS.ALL,roles:[]}};function Sn(e){let{blocklet:n,ancestors:t,children:i}=e;const o=(0,ln.Z)(),[a,r]=(0,l.useState)(""),{t:s,locale:c}=(0,k.PE)(),{api:d}=(0,ie.h6)(),{roles:u}=(0,ke.DJ)(),[h,f]=(0,l.useState)(""),g=t[0]||n,{access:x,roles:v}=Cn(n,g,{roles:u}),[b,Z]=(0,l.useState)(x),[j,y]=(0,l.useState)(v),C=[...t.map((e=>e.meta.did)),n.meta.did],w={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:o.palette.text.secondary},E=t.concat(n).map((e=>(0,S.getDisplayName)(e,!0))).join(" / ");if((0,oe.wS)(n.status))return null;if("unknown"===n.status&&(0,oe.wS)(n.status))return null;const L=()=>{r(!1)},P=e=>{e.stopPropagation(),r(!0)},R=h||b===jn&&!j.length;return["function"===typeof i?i({open:P}):(0,X.jsx)(K.Z,{onClick:P,"data-cy":"action-config-component",children:(0,X.jsx)(mn.default,{})}),a&&(0,X.jsxs)(wn,{open:!0,fullWidth:!0,title:E,onClose:L,PaperProps:{style:{minHeight:"auto"}},actions:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(A.Z,{onClick:L,color:"inherit","data-cy":"config-access-cancel",children:s("common.cancel")}),(0,X.jsxs)(A.Z,{onClick:async()=>{if(!h){f(!0);try{let e=b;e===jn&&(e="".concat(m.WHO_CAN_ACCESS_PREFIX_ROLES).concat(j.map((e=>e.name)).join(","))),await d.updateWhoCanAccess({input:{did:C,whoCanAccess:e}}),B.Z.success(s("blocklet.config.access.updatedTip")),L(),f(!1)}catch(e){f(!1),B.Z.error((0,oe.Z)(e))}}},color:"primary",disabled:R,variant:"contained",autoFocus:!0,"data-cy":"config-access-confirm",children:[h&&(0,X.jsx)(D.Z,{size:16}),s("common.confirm")]})]}),children:[(0,X.jsx)(p.Z,{mt:4,mb:3,children:(0,X.jsx)(V.Z,{label:s("blocklet.config.access.description"),select:!0,fullWidth:!0,value:b,onChange:e=>{const{value:n}=e.target;Z(n)},"data-cy":"config-access-select",SelectProps:{renderValue:e=>{const n=yn.find((n=>n.value===e));return n?(0,X.jsxs)(p.Z,{children:[(0,X.jsx)(n.icon,{style:w}),n.title[c]]}):null}},children:yn.map((e=>(0,X.jsxs)(En,{value:e.value,sx:{display:"block"},"data-cy":"config-access-opt-".concat(e.value),children:[(0,X.jsxs)(p.Z,{display:"flex",alignItems:"center",children:[(0,X.jsx)(e.icon,{style:w}),(0,X.jsx)(p.Z,{children:e.title[c]})]}),(0,X.jsx)(p.Z,{children:(0,X.jsx)(p.Z,{className:"tip",children:e.description[c]})})]})))})}),b===jn&&(0,X.jsx)(p.Z,{mt:4,mb:3,children:(0,X.jsx)(V.Z,{label:s("blocklet.config.access.description"),select:!0,fullWidth:!0,value:j.map((e=>e.name)),onChange:e=>{y(u.filter((n=>(e.target.value||[]).includes(n.name))))},SelectProps:{multiple:!0,renderValue:e=>(0,X.jsx)(p.Z,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:e.map((e=>{const n=u.find((n=>n.name===e));return(0,X.jsx)(W.Z,{label:n.title},n.text)}))})},children:u.map((e=>{let{name:n,title:t}=e;return(0,X.jsxs)(un.Z,{value:n,children:[(0,X.jsx)(je.Z,{checked:j.some((e=>e.name===n))}),(0,X.jsx)(hn.Z,{primary:t})]},n)}))})})]})]}Sn.propTypes={blocklet:s().object.isRequired,ancestors:s().array,children:s().any},Sn.defaultProps={ancestors:[],children:null};const wn=(0,a.Z)(ge.ZP)(bn||(bn=(0,o.Z)(["\n .MuiDialogContent-root {\n padding-top: 0;\n margin-top: -32px;\n }\n .MuiToolbar-root {\n padding-right: 12px;\n }\n .ux-dialog_right {\n padding-right: 20px;\n }\n"]))),En=(0,a.Z)(un.Z)(Zn||(Zn=(0,o.Z)(["\n .tip {\n font-size: 12px;\n color: ",";\n }\n"])),(e=>e.theme.palette.text.secondary));var Ln;function Pn(e){var n;let{blocklet:t,ancestors:i,depth:o}=e;const a=(0,ln.Z)(),{t:r,locale:s}=(0,k.PE)(),{roles:c}=(0,ke.DJ)(),[d,u]=(0,l.useState)(!0),{recommendedDomain:m}=(0,me.y0)(),h=i[0]||t,f="/".concat(i.map((e=>e.mountPoint||"/")).join("/"),"/").concat(t.mountPoint||"/").replace(/\/+/g,"/"),g=(0,oe.vH)({blocklet:h,domain:{value:m},mountPoint:f,params:(0,oe.f0)(h,s)}),x={fill:a.palette.text.secondary},v=o>0&&t.children.length>0,b=(0,X.jsx)(K.Z,{size:"small",children:d?(0,X.jsx)(j.Z,{fontSize:"inherit"}):(0,X.jsx)(Z.default,{fontSize:"inherit"})}),{access:y,roles:C}=Cn(t,h,{roles:c});let E;if("roles"!==y)E=vn.find((e=>e.value===y))||vn[2];else{const e=C.map((e=>e.title)).join("/");E={title:{zh:"\u53ea\u6709 ".concat(e," \u53ef\u4ee5\u8bbf\u95ee"),en:"Only ".concat(e," can access")}}}return[(o>0||"gateway"!==t.meta.group)&&(0,X.jsxs)(p.Z,{display:"flex",py:2,className:"component-item",justifyContent:"space-between",alignItems:"center",children:[(0,X.jsxs)(p.Z,{pl:Math.max(2*(o-1),0),width:{xs:300,md:400},display:"flex",alignItems:"center",style:{cursor:v?"pointer":"cursor"},onClick:()=>v&&u(!d),children:[v?b:(0,X.jsx)(p.Z,{width:28}),(0,X.jsx)(w.Z,{blocklet:t,ancestors:i}),(0,X.jsxs)(p.Z,{ml:"16px",children:[(0,X.jsx)(p.Z,{style:{color:"#222",fontSize:18},children:(0,S.getDisplayName)(t,!0)}),(0,X.jsx)(p.Z,{display:"flex",alignItems:"center",children:(0,X.jsx)(p.Z,{color:"text.secondary",children:E.title[s]})})]})]},t),(0,X.jsxs)(p.Z,{children:[(0,X.jsx)(an.Z,{title:r("common.visit"),children:(0,X.jsx)("a",{target:"_blank",href:g,rel:"noopener noreferrer",title:g,children:(0,X.jsx)(K.Z,{children:(0,X.jsx)(sn.Z,{})})})}),(0,X.jsx)(Sn,{blocklet:t,ancestors:i,children:e=>{let{open:n}=e;return(0,X.jsx)(an.Z,{title:r("common.edit"),children:(0,X.jsx)(K.Z,{onClick:n,"data-cy":"btn-edit-".concat(t.meta.did),children:(0,X.jsx)(cn.Z,{style:x})})})}})]},"actions")]},"group-not-gateway-box"),(0,X.jsx)(dn.Z,{depth:o},"line"),null!==(n=t.children)&&void 0!==n&&n.length?(0,X.jsx)(rn.Z,{in:d,children:t.children.map((e=>(0,X.jsx)(Pn,{blocklet:e,ancestors:[...i,t],depth:o+1},"".concat(o+1,"-").concat(e.meta.did))))},"blocklet-collapse"):null]}function Rn(){const{t:e}=(0,k.PE)(),{blocklet:n}=(0,me.y0)(),t=[...n.children]||[];return"gateway"!==n.meta.group&&t.unshift(n),(0,X.jsx)(On,{component:"div",children:t&&t.length?[(0,X.jsx)(p.Z,{mt:2,ml:{xs:"-12px",md:"-24px"},style:{maxWidth:1080},children:(0,X.jsx)(Pn,{blocklet:n},"0-".concat(n.meta.did))},"top-blocklet-".concat(n.meta.did))]:(0,X.jsx)(p.Z,{mt:8,children:(0,X.jsx)(_e.Z,{children:e("blocklet.component.noComponent")})})})}Pn.propTypes={blocklet:s().object.isRequired,ancestors:s().array,depth:s().number},Pn.defaultProps={ancestors:[],depth:0},Rn.propTypes={};const On=(0,a.Z)(p.Z)(Ln||(Ln=(0,o.Z)(["\n .title {\n font-size: 1.2rem;\n font-weight: bold;\n margin-top: ",";\n margin-bottom: ",";\n &.first {\n margin-top: 0;\n }\n }\n"])),(e=>e.theme.spacing(5)),(e=>e.theme.spacing(3)));var Tn=t(36095),In=t(20877),An=t(55498),Nn=t(21764),_n=t(25125),Bn=t(13573),Fn=t(69210),Dn=t(56556),zn=t(44784);const Un=function(){var e,n;const{api:t}=(0,ie.h6)(),{blocklet:i}=(0,me.y0)(),{t:o}=(0,k.PE)(),l=null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did,a=Object.assign({enabled:!1,domain:"",clientId:"",clientSecret:""},(null===i||void 0===i||null===(n=i.settings)||void 0===n||null===(n=n.oauth)||void 0===n?void 0:n.auth0)||{}),{handleSubmit:r,control:s,formState:c,watch:d,reset:u}=(0,We.cI)({defaultValues:ze()(a,["domain","clientId","clientSecret","enabled"])}),m=d("enabled"),h=(0,Ke.Z)((async e=>{try{var n;const{blocklet:i}=await t.configOAuth({input:{did:l,oauth:JSON.stringify({auth0:e})}}),a=Object.assign({enabled:!1,domain:"",clientId:"",clientSecret:""},(null===i||void 0===i||null===(n=i.settings)||void 0===n||null===(n=n.oauth)||void 0===n?void 0:n.auth0)||{});u(a),B.Z.success(o("oauth.saveSuccess"))}catch(i){B.Z.error(i.message||o("oauth.saveFailed"))}})),f=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||o("oauth.auth0.domainDescribe"))),g=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||o("oauth.auth0.clientIdDescribe"))),x=(0,Ke.Z)((()=>!0));return(0,X.jsx)(p.Z,{children:(0,X.jsxs)("form",{onSubmit:r(h),disabled:!0,children:[(0,X.jsx)(We.Qr,{name:"enabled",control:s,render:e=>{let{field:n}=e;return(0,X.jsx)(Ze.Z,{control:(0,X.jsx)(zn.Z,{checked:n.value,style:{marginRight:"6px"},...n}),label:o("oauth.auth0.enable"),sx:{marginBottom:2,ml:1}})}}),(0,X.jsx)(We.Qr,{name:"domain",control:s,rules:{validate:m?f:x},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,label:o("oauth.auth0.domain"),error:!!c.errors[t.name],helperText:(null===(n=c.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!m})})}}),(0,X.jsx)(We.Qr,{name:"clientId",control:s,rules:{validate:m?g:x},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,error:!!c.errors[t.name],label:o("oauth.auth0.clientId"),helperText:(null===(n=c.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!m})})}}),(0,X.jsx)(We.Qr,{name:"clientSecret",control:s,rules:{validate:x},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,type:"password",error:!!c.errors[t.name],label:o("oauth.auth0.clientSecret"),helperText:(null===(n=c.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!m})})}}),(0,X.jsx)(Dn.Z,{type:"submit",variant:"contained",onSubmit:r(h),disabled:!c.isDirty,children:o("oauth.save")})]})})};const Kn=function(){var e,n;const{api:t}=(0,ie.h6)(),{blocklet:i}=(0,me.y0)(),{t:o}=(0,k.PE)(),l=null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did,a=Object.assign({enabled:!1,clientId:"",clientSecret:""},(null===i||void 0===i||null===(n=i.settings)||void 0===n||null===(n=n.oauth)||void 0===n?void 0:n.github)||{}),{handleSubmit:r,control:s,formState:c,watch:d,reset:u}=(0,We.cI)({defaultValues:ze()(a,["clientSecret","clientId","enabled"])}),m=d("enabled"),h=(0,Ke.Z)((async e=>{try{var n;const{blocklet:i}=await t.configOAuth({input:{did:l,oauth:JSON.stringify({github:e})}}),a=Object.assign({enabled:!1,clientId:"",clientSecret:""},(null===i||void 0===i||null===(n=i.settings)||void 0===n||null===(n=n.oauth)||void 0===n?void 0:n.github)||{});u(a),B.Z.success(o("oauth.saveSuccess"))}catch(i){B.Z.error(i.message||o("oauth.saveFailed"))}})),f=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||o("oauth.github.clientIdDescribe"))),g=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||o("oauth.github.clientSecretDescribe"))),x=(0,Ke.Z)((()=>!0));return(0,X.jsx)(p.Z,{children:(0,X.jsxs)("form",{onSubmit:r(h),disabled:!0,children:[(0,X.jsx)(We.Qr,{name:"enabled",control:s,render:e=>{let{field:n}=e;return(0,X.jsx)(Ze.Z,{control:(0,X.jsx)(zn.Z,{checked:n.value,style:{marginRight:"6px"},...n}),label:o("oauth.github.enable"),sx:{marginBottom:2,ml:1}})}}),(0,X.jsx)(We.Qr,{name:"clientId",control:s,rules:{validate:m?f:x},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,error:!!c.errors[t.name],label:o("oauth.github.clientId"),helperText:(null===(n=c.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!m})})}}),(0,X.jsx)(We.Qr,{name:"clientSecret",control:s,rules:{validate:m?g:x},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,type:"password",label:o("oauth.github.clientSecret"),error:!!c.errors[t.name],helperText:(null===(n=c.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!m})})}}),(0,X.jsx)(Dn.Z,{type:"submit",variant:"contained",onSubmit:r(h),disabled:!c.isDirty,children:o("oauth.save")})]})})};const Wn=function(){var e,n;const{api:t}=(0,ie.h6)(),{blocklet:i}=(0,me.y0)(),{t:o}=(0,k.PE)(),l=null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did,a=Object.assign({enabled:!1,clientId:"",clientSecret:""},(null===i||void 0===i||null===(n=i.settings)||void 0===n||null===(n=n.oauth)||void 0===n?void 0:n.google)||{}),{handleSubmit:r,control:s,formState:c,watch:d,reset:u}=(0,We.cI)({defaultValues:ze()(a,["clientSecret","clientId","enabled"])}),m=d("enabled"),h=(0,Ke.Z)((async e=>{try{var n;const{blocklet:i}=await t.configOAuth({input:{did:l,oauth:JSON.stringify({google:e})}}),a=Object.assign({enabled:!1,clientId:"",clientSecret:""},(null===i||void 0===i||null===(n=i.settings)||void 0===n||null===(n=n.oauth)||void 0===n?void 0:n.google)||{});u(a),B.Z.success(o("oauth.saveSuccess"))}catch(i){B.Z.error(i.message||o("oauth.saveFailed"))}})),f=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||o("oauth.google.clientIdDescribe"))),g=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||o("oauth.google.clientSecretDescribe"))),x=(0,Ke.Z)((()=>!0));return(0,X.jsx)(p.Z,{children:(0,X.jsxs)("form",{onSubmit:r(h),disabled:!0,children:[(0,X.jsx)(We.Qr,{name:"enabled",control:s,render:e=>{let{field:n}=e;return(0,X.jsx)(Ze.Z,{control:(0,X.jsx)(zn.Z,{checked:n.value,style:{marginRight:"6px"},...n}),label:o("oauth.google.enable"),sx:{marginBottom:2,ml:1}})}}),(0,X.jsx)(We.Qr,{name:"clientId",control:s,rules:{validate:m?f:x},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,error:!!c.errors[t.name],label:o("oauth.google.clientId"),helperText:(null===(n=c.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!m})})}}),(0,X.jsx)(We.Qr,{name:"clientSecret",control:s,rules:{validate:m?g:x},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,type:"password",label:o("oauth.google.clientSecret"),error:!!c.errors[t.name],helperText:(null===(n=c.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!m})})}}),(0,X.jsx)(Dn.Z,{type:"submit",variant:"contained",onSubmit:r(h),disabled:!c.isDirty,children:o("oauth.save")})]})})};const qn=function(){var e,n;const{api:t}=(0,ie.h6)(),{blocklet:i}=(0,me.y0)(),{t:o}=(0,k.PE)(),l=null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did,a=Object.assign({enabled:!1,teamId:"",serviceId:"",keyId:"",authKey:""},(null===i||void 0===i||null===(n=i.settings)||void 0===n||null===(n=n.oauth)||void 0===n?void 0:n.apple)||{}),{handleSubmit:r,control:s,formState:c,watch:d,reset:u}=(0,We.cI)({defaultValues:ze()(a,["enabled","teamId","serviceId","keyId","authKey"])}),m=d("enabled"),h=(0,Ke.Z)((async e=>{try{var n;const{blocklet:i}=await t.configOAuth({input:{did:l,oauth:JSON.stringify({apple:e})}}),a=Object.assign({enabled:!1,teamId:"",serviceId:"",keyId:"",authKey:""},(null===i||void 0===i||null===(n=i.settings)||void 0===n||null===(n=n.oauth)||void 0===n?void 0:n.apple)||{});u(a),B.Z.success(o("oauth.saveSuccess"))}catch(i){B.Z.error(i.message||o("oauth.saveFailed"))}})),f=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||o("oauth.apple.teamIdDescribe"))),g=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||o("oauth.apple.serviceIdDescribe"))),x=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||o("oauth.apple.keyIdDescribe"))),v=(0,Ke.Z)((e=>!(null===e||void 0===e||!e.trim())||o("oauth.apple.authKeyDescribe"))),b=(0,Ke.Z)((()=>!0));return(0,X.jsx)(p.Z,{children:(0,X.jsxs)("form",{onSubmit:r(h),disabled:!0,children:[(0,X.jsx)(We.Qr,{name:"enabled",control:s,render:e=>{let{field:n}=e;return(0,X.jsx)(Ze.Z,{control:(0,X.jsx)(zn.Z,{checked:n.value,style:{marginRight:"6px"},...n}),label:o("oauth.apple.enable"),sx:{marginBottom:2,ml:1}})}}),(0,X.jsx)(We.Qr,{name:"teamId",control:s,rules:{validate:m?f:b},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,error:!!c.errors[t.name],label:o("oauth.apple.teamId"),helperText:(null===(n=c.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!m})})}}),(0,X.jsx)(We.Qr,{name:"serviceId",control:s,rules:{validate:m?g:b},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,error:!!c.errors[t.name],label:o("oauth.apple.serviceId"),helperText:(null===(n=c.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!m})})}}),(0,X.jsx)(We.Qr,{name:"keyId",control:s,rules:{validate:m?x:b},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,error:!!c.errors[t.name],label:o("oauth.apple.keyId"),helperText:(null===(n=c.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!m})})}}),(0,X.jsx)(We.Qr,{name:"authKey",control:s,rules:{validate:m?v:b},render:e=>{var n;let{field:t}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,children:(0,X.jsx)(V.Z,{...t,type:"password",multiline:!0,rows:4,label:o("oauth.apple.authKey"),error:!!c.errors[t.name],helperText:(null===(n=c.errors[t.name])||void 0===n?void 0:n.message)||"\u3000",disabled:!m})})}}),(0,X.jsx)(Dn.Z,{type:"submit",variant:"contained",onSubmit:r(h),disabled:!c.isDirty,children:o("oauth.save")})]})})};var Gn=t(46711),Mn=t(2266),Vn=t(76223),Hn=t(34435),Yn=t(6837);function Jn(e){let{title:n,id:t,children:i,index:o,onMove:a,defaultExpand:r,onEnd:s}=e;const[c,d]=(0,l.useState)(r),u=(0,l.useRef)(null),m=(0,l.useRef)(null),[{handlerId:h},f]=(0,Gn.L)({accept:"dragItem",collect:e=>({handlerId:e.getHandlerId()}),hover(e,n){var t,i;if(!u.current)return;const l=e.index,r=o;if(l===r)return;const s=null===(t=u.current)||void 0===t?void 0:t.getBoundingClientRect(),c=null===(i=m.current)||void 0===i?void 0:i.getBoundingClientRect(),d=(c.bottom-c.top)/2,p=n.getClientOffset().y-s.top;l<r&&p<d||l>r&&p>d||(a(l,r),e.index=r)}}),[{isDragging:g},x]=(0,Mn.c)({item:{index:o,type:"dragItem"},collect:e=>({isDragging:e.isDragging()}),end:s});x(m),f(u);const v=g?.5:1,b=(0,Ke.Z)((e=>{e.preventDefault(),e.stopPropagation(),d(!c)}));return(0,X.jsxs)(p.Z,{ref:u,sx:{borderBottom:"1px solid ".concat(Vn.E.lineBorderStrong)},children:[(0,X.jsx)(p.Z,{sx:{cursor:"pointer","&:hover":{backgroundColor:Vn.E.backgroundsBgSubtileHover},borderRadius:2},ref:m,"data-handler-id":h,children:(0,X.jsxs)(p.Z,{sx:{py:1.5,px:1,opacity:v,display:"flex",alignItems:"center",gap:.5},draggable:!1,onClick:b,children:[(0,X.jsx)(p.Z,{sx:{pointerEvents:"auto",cursor:"grab","&:active":{cursor:"grabbing"},fontSize:0,color:Vn.E.textMuted,"&:hover":{color:Vn.E.textSubtitle}},children:(0,X.jsx)(An.JO,{fontSize:20,icon:Hn.Z})}),(0,X.jsx)(ve.Z,{sx:{flex:1},children:n}),(0,X.jsx)(K.Z,{size:"small",sx:{pointerEvents:"auto",transform:c?"":"rotate(180deg)",transition:"transform 0.3s ease"},children:(0,X.jsx)(An.JO,{icon:Yn.Z,style:{transform:"scale(1.5)"}})})]})}),(0,X.jsx)(p.Z,{sx:{pl:4,py:1,display:c?"block":"none"},children:i})]})}Jn.propTypes={title:s().string.isRequired,id:s().string.isRequired,children:s().node.isRequired,index:s().number.isRequired,onMove:s().func.isRequired,onEnd:s().func.isRequired,defaultExpand:s().bool},Jn.defaultProps={defaultExpand:!0};const Qn=[{name:"github",title:"GitHub",icon:(0,X.jsx)(An.JO,{icon:_n.Z}),component:(0,X.jsx)(Kn,{})},{name:"google",title:"Google",icon:(0,X.jsx)(An.JO,{icon:Bn.Z}),component:(0,X.jsx)(Wn,{})},{name:"apple",title:"Apple",icon:(0,X.jsx)(An.JO,{icon:Nn.Z}),component:(0,X.jsx)(qn,{})},{name:"auth0",title:"Auth0",icon:(0,X.jsx)(An.JO,{icon:Fn.Z}),component:(0,X.jsx)(Un,{})}],Xn=["github","google","apple","auth0"];function $n(){var e,n;const{api:t}=(0,ie.h6)(),{blocklet:i}=(0,me.y0)(),o=null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did,l=(null===i||void 0===i||null===(n=i.settings)||void 0===n?void 0:n.oauth)||{},a=Object.keys(l).sort(((e,n)=>{var t,i,o;return void 0!==(null===(t=l[e])||void 0===t?void 0:t.order)&&void 0!==(null===(i=l[n])||void 0===i?void 0:i.order)?l[e].order-l[n].order:void 0!==(null===(o=l[e])||void 0===o?void 0:o.order)?-1:1}));for(const p of Xn)a.includes(p)||a.push(p);const r=(0,Ue.Z)(a.reduce(((e,n,t)=>Object.assign(e,{[n]:t})),{})),s=(0,Be.Z)((()=>{const e=[...Qn];return e.sort(((e,n)=>r[e.name]-r[n.name])),e}),[r.auth0,r.github,r.google]),c={};"undefined"!==typeof window&&(c.context=window);const d=(0,Ke.Z)((async e=>{const n={};Object.keys(e).forEach((t=>{n[t]={order:e[t]}})),await t.configOAuth({input:{did:o,oauth:JSON.stringify(n)}})})),u=(0,Ke.Z)(((e,n)=>{const t=s[e],i=s[n];r[t.name]=n,r[i.name]=e})),m=(0,Ke.Z)((async()=>{await d(r)}));return(0,X.jsx)(p.Z,{children:(0,X.jsx)(Tn.W,{backend:In.HTML5Backend,...c,children:s.map(((e,n)=>(0,X.jsx)(Jn,{index:n,id:e.name,title:e.title,icon:e.icon,onMove:u,onEnd:m,defaultExpand:e.enabled,children:e.component},e.name)))})})}var et=t(62362),nt=t(24103);const tt={ttl:m.SESSION_TTL};function it(e){const n=arguments.length>1&&void 0!==arguments[1]&&arguments[1]?86400*e.ttl:e.ttl/86400;return{...e,ttl:n}}function ot(){var e,n;const{api:t}=(0,ie.h6)(),{blocklet:i}=(0,me.y0)(),o=null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did,l=Object.assign({},tt,(null===i||void 0===i||null===(n=i.settings)||void 0===n?void 0:n.session)||{}),{handleSubmit:a,control:r,formState:s,reset:c}=(0,We.cI)({defaultValues:ze()(it(l),["ttl"])}),{t:d}=(0,k.PE)(),u=(0,Ke.Z)((async e=>{try{var n;const{blocklet:i}=await t.updateAppSessionConfig({input:{did:o,config:it(e,!0)}}),l=Object.assign({},tt,ze()((null===i||void 0===i||null===(n=i.settings)||void 0===n?void 0:n.session)||{},["ttl"]));c(it(l)),B.Z.success(d("common.configSuccess"))}catch(i){B.Z.error(i.message)}}));return(0,X.jsx)(p.Z,{children:(0,X.jsxs)("form",{onSubmit:a(u),disabled:!0,children:[(0,X.jsx)(We.Qr,{name:"ttl",control:r,render:e=>{let{field:n}=e;return(0,X.jsx)(Fe.Z,{fullWidth:!0,sx:{mb:2},children:(0,X.jsxs)(nt.Z,{px:3,children:[(0,X.jsx)(p.Z,{mx:-3,my:.5,children:d("blocklet.config.session.ttl",{day:n.value})}),(0,X.jsx)(et.ZP,{...n,defaultValue:7,step:1,marks:[{value:1,label:d("blocklet.config.session.day",{day:1})},{value:7,label:d("blocklet.config.session.days",{day:7})},{value:14,label:d("blocklet.config.session.days",{day:14})},{value:21,label:d("blocklet.config.session.days",{day:21})},{value:30,label:d("blocklet.config.session.days",{day:30})}],min:1,max:30,valueLabelDisplay:"auto",style:{maxWidth:"360px"}})]})})}}),(0,X.jsx)(Dn.Z,{type:"submit",variant:"contained",onSubmit:a(u),disabled:!s.isDirty,children:d("oauth.save")})]})})}var lt=t(82555),at=t(30333),rt=t(75760),st=t(97038),ct=t(64886),dt=t(42080),ut=t.n(dt),mt=t(75506),pt=t.n(mt),ht=t(47685),ft=t(13260),gt=t(82434),xt=t.n(gt);const vt=(0,l.forwardRef)(((e,n)=>{var t;const{t:i}=(0,l.useContext)(k.RD),{blocklet:o}=(0,me.y0)(),{api:a}=(0,ie.h6)(),r=(0,Ue.Z)({mode:"view",show:!1,data:{},callback:Qe()}),s=(0,ht.Fg)(),c=(null===s||void 0===s||null===(t=s.transitions)||void 0===t||null===(t=t.duration)||void 0===t?void 0:t.leavingScreen)||300,d=(0,Ke.Z)((()=>{r.mode="view",r.data={},r.callback=Qe()}),[]),m=(0,Ke.Z)((()=>{r.show=!1,setTimeout((()=>{d()}),c)}),[]),h=(0,Ke.Z)((e=>{r.mode="view",r.show=!0,r.data=e}),[]),f=(0,Ke.Z)((function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Qe();r.mode="approve",r.show=!0,r.data=e,r.callback=n}),[]);(0,l.useImperativeHandle)(n,(()=>({open:h,close:m,approve:f})),[h,m,f]);const g=(0,Be.Z)((()=>{if(!r.show)return[];r.data.migratedFrom=[r.data.appId,r.data.appPid];const e=["appName","appLogo","appId","appPid","migratedFrom","appDescription","appUrl","version","appliedAt","status","serverId","serverVersion"];return!1!==r.data.isMaster&&ut()(e,"appliedAt","status"),e.map((e=>{const n=i("federated.info.".concat(e));let t=r.data[e];if("appName"===e&&r.data.isMaster&&(t=(0,X.jsxs)(p.Z,{children:[(0,X.jsx)(lt.Z,{component:at.Z}),t]})),["appId","appPid","serverId"].includes(e)&&(t=(0,X.jsx)(ft.kL,{children:t})),["appUrl"].includes(e)&&(t=(0,X.jsx)(p.Z,{component:"a",href:t,target:"_blank",children:t})),["appLogo"].includes(e)){const e=xt()(t)?t:u()(r.data.appUrl||"",t||"");try{const n=new URL(e);n.searchParams.set("imageFilter","resize"),n.searchParams.set("w","80"),n.searchParams.set("h","80"),t=(0,X.jsx)("img",{src:n.href,width:"60",height:"60",alt:r.data.appName})}catch{t=(0,X.jsx)("img",{src:e,width:"60",height:"60",alt:r.data.appName})}}if("status"===e&&(t=t&&i("federated.status.".concat(t))),"migratedFrom"===e){t=(r.data.migratedFrom||[]).filter((e=>![r.data.appId,r.data.appPid].includes(e))).map((e=>(0,X.jsx)(ft.kL,{children:e})))}return pt()(t)&&(t="-"),{name:n,value:t}}))}),[r.data]),x="approve"===r.mode,v=(0,Ke.Z)((async()=>{await a.auditFederatedLogin({input:{memberPid:r.data.appPid,did:o.appPid,status:"rejected"}}),m(),null===r||void 0===r||r.callback(!1)})),b=(0,Ke.Z)((async()=>{await a.auditFederatedLogin({input:{memberPid:r.data.appPid,did:o.appPid,status:"approved"}}),m(),null===r||void 0===r||r.callback(!0)}));return(0,X.jsx)(ge.ZP,{open:r.show,title:i(x?"federated.approveToJoinLogin":"federated.siteDetail"),onClose:m,actions:x?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Dn.Z,{color:"error",variant:"contained",onClick:v,children:i("common.reject")}),(0,X.jsx)(Dn.Z,{variant:"contained",onClick:b,children:i("common.approve")})]}):(0,X.jsx)(Dn.Z,{variant:"outlined",onClick:m,children:i("common.close")}),children:g.map((e=>(0,X.jsx)(ct.Z,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:180,name:e.name,children:e.value},e.name)))})}));var bt=t(79842),Zt=t(85408),jt=t.n(Zt);const yt=(0,l.forwardRef)(((e,n)=>{var t;const i=(0,ht.Fg)(),o=(null===i||void 0===i||null===(t=i.transitions)||void 0===t||null===(t=t.duration)||void 0===t?void 0:t.leavingScreen)||300,{t:a}=(0,l.useContext)(k.RD),r=(0,Ue.Z)({show:!1,data:{link:""}}),s=(0,Ke.Z)((()=>{r.data.link=""}),[]),c=(0,Ke.Z)((()=>{r.show=!1,setTimeout((()=>{s()}),o)}),[]),d=(0,Ke.Z)((e=>{let{link:n}=e;r.show=!0,r.data.link=n}),[]);(0,l.useImperativeHandle)(n,(()=>({open:d,close:c})),[d,c]);const u=(0,Ke.Z)((()=>{jt()(r.data.link),c()}),[c]);return(0,X.jsxs)(ge.ZP,{open:r.show,title:a("federated.joinFederatedLogin"),onClose:c,PaperProps:{style:{minHeight:"unset"}},actions:(0,X.jsx)(A.Z,{color:"primary",autoFocus:!0,variant:"contained",onClick:u,children:a("common.copyAndClose")}),children:[(0,X.jsx)(p.Z,{mb:1,children:a("federated.inviteJoinFederatedLoginDescription")}),(0,X.jsx)(p.Z,{sx:{"& .copy-button":{display:"none !important"}},children:(0,X.jsx)(bt.Z,{language:"shell",style:{marginBottom:0},children:r.data.link})})]})}));function kt(e){var n,t,i;let{mode:o}=e;const a=(0,l.useRef)(null),r=(0,l.useRef)(null),{t:s,locale:c}=(0,l.useContext)(k.RD),{blocklet:d,actions:{refreshBlocklet:u}}=(0,me.y0)(),{confirmApi:m,confirmHolder:h}=$e(),{api:f}=(0,ie.h6)(),g=(null===(n=d.settings.federated)||void 0===n?void 0:n.sites)||[],x=(null===(t=d.settings.federated)||void 0===t?void 0:t.config)||{},v=!1!==x.isMaster,b=(0,Ke.Z)((e=>{var n;null===(n=r.current)||void 0===n||n.open(e)})),Z=(0,Ke.Z)((e=>{var n;null===(n=r.current)||void 0===n||n.approve(e,u)})),j=(0,Ke.Z)((e=>{m.open({title:s("federated.disableFederatedLogin"),content:s("federated.disableFederatedLoginDescription"),async onConfirm(n){await f.auditFederatedLogin({input:{memberPid:e.appPid,did:d.appPid,status:"revoked"}}),n()}})})),y=(0,Ke.Z)((e=>{m.open({title:s("federated.enableFederatedLogin"),content:s("federated.enableFederatedLoginDescription"),async onConfirm(n){await f.auditFederatedLogin({input:{memberPid:e.appPid,did:d.appPid,status:"approved"}}),n()}})})),C=(0,Be.Z)((()=>{const e=[{label:s("common.name"),name:"appName",options:{customBodyRenderLite:e=>{const n=g[e],t=!1!==n.isMaster;return(0,X.jsx)(p.Z,{display:"inline-block",children:(0,X.jsxs)(p.Z,{component:"a",display:"flex",alignItems:"center",href:n.appUrl,target:"_blank",onClick:e=>{e.stopPropagation()},children:[t&&(0,X.jsx)(lt.Z,{component:at.Z,style:{marginRight:"4px"}}),n.appName]})})}}},{label:s("common.did"),name:"appId",options:{customBodyRenderLite:e=>{const n=g[e];return(0,X.jsx)(st.Z,{children:n.appId})}}},{label:s("common.status"),name:"status",options:{customBodyRenderLite:e=>{const n=g[e],t=!1!==n.isMaster;return(0,X.jsx)(p.Z,{children:t?"-":s("federated.status.".concat(n.status))})}}}];return v&&e.push({label:s("common.actions"),name:"actions",options:{customBodyRenderLite:e=>{const n=g[e],t=!1!==n.isMaster;return(0,X.jsx)(p.Z,{display:"flex",gap:1,children:t?(0,X.jsxs)(X.Fragment,{children:["rejected"===n.status&&(0,X.jsx)(A.Z,{variant:"contained",color:"error",size:"small",onClick:e=>{e.stopPropagation()},children:s("federated.status.rejected")}),"revoked"===n.status&&(0,X.jsx)(A.Z,{variant:"contained",color:"secondary",size:"small",onClick:e=>{e.stopPropagation()},children:s("federated.status.revoked")})]}):(0,X.jsxs)(X.Fragment,{children:["pending"===n.status&&(0,X.jsx)(A.Z,{variant:"contained",color:"primary",size:"small",onClick:e=>{e.stopPropagation(),Z(n)},children:s("federated.status.pending")}),"approved"===n.status&&(0,X.jsx)(A.Z,{variant:"contained",color:"error",size:"small",onClick:e=>{e.stopPropagation(),j(n)},style:{whiteSpace:"nowrap"},children:s("federated.revoke")}),"revoked"===n.status&&(0,X.jsx)(A.Z,{variant:"contained",color:"warning",size:"small",onClick:e=>{e.stopPropagation(),y(n)},style:{whiteSpace:"nowrap"},children:s("federated.approve")})]})})}}}),e}),[x.appId,g,v,s]),S=(0,Be.Z)((()=>({sort:!0,download:!1,filter:!1,print:!1,expandableRowsOnClick:!0,onRowClick(e,n){let{dataIndex:t}=n;const i=g[t];b(i)}})),[]),w=(0,Ke.Z)((()=>{const e=d.environments.find((e=>e.key===_.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_URL));var n;null!==e&&void 0!==e&&e.value?null===(n=a.current)||void 0===n||n.open({link:e.value}):B.Z.error(s("federated.failedToGetFederatedLoginLink"))}),[null===(i=d.site)||void 0===i||null===(i=i.domainAliases)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.href]),E=(0,Ke.Z)((()=>{m.open({title:s("federated.quitFederatedLogin"),content:s("federated.quitFederatedLoginDescription"),async onConfirm(e){await f.quitFederatedLogin({input:{did:d.appPid}}),e()}})})),L=(0,Ke.Z)((()=>{m.open({title:s("federated.disbandFederatedLogin"),content:s("federated.disbandFederatedLoginDescription"),async onConfirm(e){await f.disbandFederatedLogin({input:{did:d.appPid}}),e()}})})),P=[];return"master"!==o?P.push((0,X.jsx)(A.Z,{size:"small",variant:"contained",color:"error",onClick:E,sx:{ml:1},children:s("federated.quitFederatedLogin")},"quitFederatedLogin")):(P.push((0,X.jsx)(A.Z,{size:"small",variant:"contained",onClick:w,sx:{ml:1},children:s("federated.inviteJoinFederatedLogin")},"inviteJoinFederatedLogin")),P.push((0,X.jsx)(A.Z,{color:"error",size:"small",variant:"contained",onClick:L,sx:{ml:1},children:s("federated.disbandFederatedLogin")},"disbandFederatedLogin"))),(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(rt.Z,{className:"main-table",locale:c,data:g,columns:C,customButtons:P,title:(0,X.jsx)(p.Z,{className:"table-toolbar-left",children:s("oauth.federated")}),options:S}),h,(0,X.jsx)(yt,{ref:a}),(0,X.jsx)(vt,{ref:r})]})}kt.propTypes={mode:s().oneOf(["member","master"])},kt.defaultProps={mode:"member"};const Ct=kt,St=(0,l.forwardRef)(((e,n)=>{var t;const{t:i}=(0,l.useContext)(k.RD),{api:o}=(0,ie.h6)(),{blocklet:a}=(0,me.y0)(),r=null===a||void 0===a?void 0:a.appPid,s=(0,ht.Fg)(),c=(null===s||void 0===s||null===(t=s.transitions)||void 0===t||null===(t=t.duration)||void 0===t?void 0:t.leavingScreen)||300,d=(0,Ue.Z)({show:!1,appUrl:"",appUrlError:"",callback:Qe()}),u=(0,Ke.Z)((()=>{d.appUrl="",d.appUrlError="",d.callback=Qe()}),[]),m=(0,Ke.Z)((()=>{d.show=!1,setTimeout((()=>{u()}),c)}),[]),h=(0,Ke.Z)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Qe();d.show=!0,d.callback=e}),[]);(0,l.useImperativeHandle)(n,(()=>({open:h,close:m})),[h,m]);const f=(0,Ke.Z)((e=>{if(!e)throw new Error(i("federated.federatedJoinAppUrlRequired"));if(!xt()(e))throw new Error(i("federated.federatedJoinAppUrlInvalid"))})),g=(0,Ke.Z)((async()=>{try{f(d.appUrl);const e=await o.joinFederatedLogin({input:{did:r,appUrl:d.appUrl}});d.show=!1,m(),null===d||void 0===d||d.callback(e)}catch(e){d.appUrlError=e.message}}),[m,r]);return(0,X.jsxs)(ge.ZP,{open:d.show,title:i("federated.joinFederatedLogin"),onClose:m,PaperProps:{style:{minHeight:"unset"}},actions:(0,X.jsx)(A.Z,{color:"primary",autoFocus:!0,variant:"contained",onClick:g,children:i("common.confirm")}),children:[(0,X.jsx)(p.Z,{mb:1,children:i("federated.joinFederatedLoginDescription")}),(0,X.jsx)(V.Z,{fullWidth:!0,variant:"outlined",margin:"dense",placeholder:i("federated.federatedJoinAppUrl"),label:i("federated.federatedJoinAppUrl"),value:d.appUrl,error:!!d.appUrlError,helperText:d.appUrlError||"eg: https://www.arcblock.io",onChange:e=>{d.appUrl=e.target.value}})]})}));function wt(){var e,n;const t=(0,l.useRef)(null),i=(0,l.useRef)(null),{t:o}=(0,l.useContext)(k.RD),{blocklet:a,actions:{refreshBlocklet:r}}=(0,me.y0)(),s=(0,Ke.Z)((()=>{var e;const n=null===(e=a.site)||void 0===e||null===(e=e.domainAliases)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.href;if(n)try{var i;const e=new URL(n);null===(i=t.current)||void 0===i||i.open({link:e.origin})}catch{B.Z.error(o("federated.failedToGetFederatedLoginLink"))}}),[null===(e=a.site)||void 0===e||null===(e=e.domainAliases)||void 0===e||null===(e=e[0])||void 0===e?void 0:e.href]),c=(0,Ke.Z)((()=>{var e;null===(e=i.current)||void 0===e||e.open((()=>{r()}))}),[r]);if((null===(n=a.settings.federated)||void 0===n?void 0:n.sites.length)>0){var d;const e=!1!==(null===(d=a.settings.federated)||void 0===d?void 0:d.config.isMaster);return(0,X.jsx)(Ct,{mode:e?"master":"member"})}return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(p.Z,{display:"flex",flexDirection:"column",gap:2,justifyContent:"center",alignItems:"center",minHeight:"200px",children:[(0,X.jsx)(A.Z,{variant:"contained",onClick:s,children:o("federated.inviteJoinFederatedLogin")}),(0,X.jsx)(I.Z,{sx:{width:"150px",color:"rgba(0, 0, 0, 0.3)"},children:"OR"}),(0,X.jsx)(A.Z,{variant:"outlined",onClick:c,children:o("federated.joinFederatedLogin")})]}),(0,X.jsx)(yt,{ref:t}),(0,X.jsx)(St,{ref:i})]})}const Et=function(){const{t:e}=(0,l.useContext)(k.RD),n=[{label:(0,X.jsx)(p.Z,{textAlign:"center",width:"100%",children:e("oauth.commonSettings")}),value:"settings"},{label:(0,X.jsx)(p.Z,{textAlign:"center",width:"100%",children:e("oauth.federated")}),value:"federated"},{label:(0,X.jsx)(p.Z,{textAlign:"center",width:"100%",children:e("oauth.oauth")}),value:"oauth"},{label:(0,X.jsx)(p.Z,{textAlign:"center",width:"100%",children:e("oauth.moreLogin")}),value:"more"}],[t,i]=(0,l.useState)(n[0].value),o=(0,Be.Z)((()=>({oauth:(0,X.jsx)($n,{}),federated:(0,X.jsx)(wt,{}),more:(0,X.jsx)(p.Z,{children:(0,X.jsx)(_e.Z,{children:e("oauth.comingSoon")})}),settings:(0,X.jsx)(p.Z,{children:(0,X.jsx)(ot,{})})})),[e]);return(0,X.jsxs)(p.Z,{children:[(0,X.jsx)(C.Z,{tabs:n,current:t,onChange:i}),(0,X.jsx)(p.Z,{marginTop:"10px",children:o[t]})]})};var Lt;const Pt=e=>{let{tabs:n,blocklet:t,ancestors:i=[],depth:o=1,t:l}=e;const a=[...i.map((e=>e.meta.did)),t.meta.did].join("/"),r=!(null!==i&&void 0!==i&&i.length);n.push({label:(0,X.jsxs)(p.Z,{pl:2*Math.max(1,o-1),display:"flex",alignItems:"center",justifyContent:"flex-start",children:[r?(0,X.jsx)(E.Z,{size:24,blocklet:t}):(0,X.jsx)(w.Z,{size:24,blocklet:t,ancestors:i}),(0,X.jsx)(p.Z,{ml:"16px",children:(0,X.jsx)(p.Z,{style:{color:"#222"},children:r?l("blocklet.component.container"):(0,S.getDisplayName)(t,!0)})})]},a),value:a}),t.children.length>0&&t.children.forEach((e=>{Pt({tabs:n,blocklet:e,ancestors:[...i,t],depth:o+1,t:l})}))};function Rt(e){let{blocklet:n,onUpdate:t,...i}=e;const{t:o}=(0,l.useContext)(k.RD),{info:a,inService:r}=(0,ie.h6)(),[s,d]=(0,l.useState)(!0),[S,w]=(0,y.useSearchParams)(),E=S.get("tab")||"general",L=[{label:(0,X.jsxs)(p.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-general",children:[(0,X.jsx)(f.Z,{sx:{fontSize:24}}),(0,X.jsx)(p.Z,{ml:"16px",children:(0,X.jsx)(p.Z,{style:{color:"#222"},children:o("common.general")})})]},"general"),value:"general"},{label:(0,X.jsxs)(p.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-access",children:[(0,X.jsx)(g.Z,{sx:{fontSize:24}}),(0,X.jsx)(p.Z,{ml:"16px",children:(0,X.jsx)(p.Z,{style:{color:"#222"},children:o("common.access")})})]},"access"),value:"access"},{label:(0,X.jsxs)(p.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-authentication",children:[(0,X.jsx)(x.Z,{sx:{fontSize:24}}),(0,X.jsx)(p.Z,{ml:"16px",children:(0,X.jsx)(p.Z,{style:{color:"#222"},children:o("common.login")})})]},"authentication"),value:"authentication"},{label:(0,X.jsxs)(p.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-notification",children:[(0,X.jsx)(v.Z,{sx:{fontSize:24}}),(0,X.jsx)(p.Z,{ml:"16px",children:(0,X.jsx)(p.Z,{style:{color:"#222"},children:o("common.notification")})})]},"notification"),value:"notification"},{label:(0,X.jsxs)(p.Z,{display:"flex",alignItems:"center","data-cy":"configuration-tab-preference",children:[(0,X.jsx)(p.Z,{ml:-2,style:{transform:"translateY(2px)"},children:s?(0,X.jsx)(j.Z,{fontSize:"inherit"}):(0,X.jsx)(Z.default,{fontSize:"inherit"})}),(0,X.jsx)(b.Z,{sx:{fontSize:24}}),(0,X.jsx)(p.Z,{ml:"16px",children:(0,X.jsx)(p.Z,{style:{color:"#222"},children:o("common.preferences")})})]},"preference"),value:"preference"}];s&&Pt({tabs:L,blocklet:n,t:o});let P=null;if("general"===E)P=(0,X.jsx)(Ae,{blocklet:n,onUpdate:t});else if("access"===E)P=(0,X.jsx)(Rn,{});else if("authentication"===E)P=(0,X.jsx)(Et,{});else if("notification"===E)P=(0,X.jsx)(on,{});else{const e=r?m.WELLKNOWN_SERVICE_PATH_PREFIX:a.routing.adminPath,n=new URLSearchParams;r||n.set("authKey","__sst"),n.set("schemaKey",u()(window.location.origin,e,"/api/preferences?id=".concat(encodeURIComponent(E)))),P=(0,X.jsx)(c.Z,{url:"".concat(u()(window.location.origin,e,"/hosted/form-collector/"),"?").concat(n.toString()),width:"100%",height:"100%",frameBorder:0,styles:{border:0}})}return(0,X.jsx)(Ot,{...i,children:(0,X.jsxs)(h.ZP,{container:!0,spacing:4,columns:24,children:[(0,X.jsx)(h.ZP,{item:!0,sm:7,md:5,children:(0,X.jsx)(C.Z,{tabs:L,current:E,orientation:"vertical",onChange:e=>{"preference"===e?d(!s):w((n=>("general"===e?n.delete("tab"):n.set("tab",e),n)))},sx:{borderRight:1,height:"100%",borderColor:"divider"}})}),(0,X.jsx)(h.ZP,{item:!0,sm:17,md:19,children:(0,X.jsx)(p.Z,{style:{minHeight:"66vh",height:"100%",position:"relative",overflow:"hidden"},children:P})})]})})}Rt.propTypes={blocklet:s().object.isRequired,onUpdate:s().func},Rt.defaultProps={onUpdate:()=>{}};const Ot=a.Z.div(Lt||(Lt=(0,o.Z)(["\n .MuiTab-root {\n text-align: left;\n align-items: flex-start;\n font-weight: normal;\n }\n .Mui-selected {\n font-weight: bold;\n }\n"])))},78410:(e,n,t)=>{t.d(n,{Z:()=>m});var i=t(5057),o=t(86229),l=t(28726),a=t(44846),r=t(68420),s=t(46090),c=t(58238),d=t(70461),u=t(96266);function m(e){let{teamDid:n,size:t="small",...m}=e;const{t:p}=(0,r.PE)(),{api:h}=(0,c.h6)(),[f,g]=(0,i.useState)(!1),[x,v]=(0,i.useState)(null),b={title:p("blocklet.config.clearCache.title"),description:p("blocklet.config.clearCache.description"),confirm:p("common.confirm"),cancel:p("common.cancel"),onConfirm:async()=>{try{var e;g(!0);const t=await h.clearCache({input:{teamDid:n}});o.Z.success(p("blocklet.config.clearCache.success",{count:(null===(e=t.removed)||void 0===e?void 0:e.length)||0}))}catch(t){o.Z.error((0,s.Z)(t))}finally{g(!1),v(null)}},onCancel:()=>{g(!1),v(null)}};return(0,u.jsxs)("div",{...m,children:[(0,u.jsxs)(l.Z,{onClick:()=>v(b),color:"error",variant:"outlined",size:t,children:[f?(0,u.jsx)(a.Z,{size:16,style:{marginRight:5}}):null,p("blocklet.config.clearCache.action")]}),x&&(0,u.jsx)(d.Z,{title:x.title,description:x.description,confirm:x.confirm,cancel:x.cancel,onConfirm:x.onConfirm,onCancel:x.onCancel})]})}},50185:(e,n,t)=>{t.d(n,{Z:()=>c});var i=t(5057),o=t(55898),l=t.n(o),a=t(12937),r=t(68420),s=t(96266);function c(e){let{children:n,...t}=e;const{t:o}=(0,i.useContext)(r.RD);return(0,s.jsx)(a.Z,{tip:o("common.copyTip"),copiedTip:o("common.copiedTip"),...t,children:n})}c.propTypes={children:l().any.isRequired}},28641:(e,n,t)=>{t.d(n,{Z:()=>x});var i=t(5057),o=t(55898),l=t.n(o),a=t(39948),r=t(47020),s=t(44846),c=t(13727),d=t(56184),u=t(67680),m=t(35406),p=t(11875),h=t(95890),f=t(96266);const g=(e,n,t)=>null===e&&n&&t?"******":e?n?"******":e:"";function x(e){let{label:n,disabled:t,required:o,initialValue:l,onChange:x,placeholder:v,style:b,onSubmit:Z,secure:j,triggers:y,formatterBeforeSubmit:k,...C}=e;const[S,w]=(0,i.useState)(!1),[E,L]=(0,i.useState)(!1),[P,R]=(0,i.useState)(j&&"__encrypted__"===l?null:l),[O,T]=(0,i.useState)(P),I=async()=>{L(!0);try{if(!1===await Z(O))T(P);else{let e=O;"function"===typeof k&&(e=k(O)),T(e),R(e)}}catch(e){T(P)}finally{L(!1),w(!1)}},A=S?(0,f.jsx)(r.Z,{style:{flex:1},fullWidth:!0,value:O,onChange:e=>{var n;n=e.target.value,T(n),x(n)},autoFocus:!0,size:"small",variant:"outlined",placeholder:v,onKeyDown:e=>{"Enter"===e.key&&I()},disabled:t,type:j?"password":"text",...C}):(0,f.jsx)(a.Z,{px:1,className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},children:g(O,j,l)});return(0,f.jsx)(p.Z,{className:"form",style:b,children:(0,f.jsxs)(a.Z,{className:"form-item",children:[(0,f.jsxs)(a.Z,{className:"form-item-label",children:[n,o&&(0,f.jsx)(m.Z,{})]}),(0,f.jsxs)(a.Z,{className:"form-item-body",children:[(0,f.jsx)(a.Z,{className:"form-item-input",children:A}),(0,f.jsx)(a.Z,{className:"form-item-action",children:S?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(u.Z,{"data-cy":"schema-form-item-confirm",onClick:I,disabled:t||E,size:"large",children:E?(0,f.jsx)(s.Z,{size:24}):(0,f.jsx)(d.Z,{})}),(0,f.jsx)(u.Z,{"data-cy":"schema-form-item-cancel",onClick:()=>{T(P),w(!1)},disabled:t||E,size:"large",children:(0,f.jsx)(c.default,{})})]}):(0,f.jsx)(h.Z,{triggers:y,onEnterEdit:()=>w(!0),disabled:t})})]})]})})}x.propTypes={style:l().object,onSubmit:l().func,onChange:l().func,label:l().string,initialValue:l().string,placeholder:l().string,required:l().bool,disabled:l().bool,secure:l().bool,triggers:l().array,formatterBeforeSubmit:l().func},x.defaultProps={style:{},onSubmit:()=>{},onChange:()=>{},label:"",initialValue:"",placeholder:"",required:!1,disabled:!1,secure:!1,triggers:[],formatterBeforeSubmit:null}},11875:(e,n,t)=>{t.d(n,{Z:()=>r});var i,o=t(71171),l=t(33518),a=t(39948);const r=(0,l.Z)(a.Z)(i||(i=(0,o.Z)(["\n width: 100%;\n flex-grow: 1;\n overflow-y: auto;\n "," {\n width: 100%;\n flex-shrink: 0;\n padding: 0 24px;\n transform: translate(0, 0);\n /* max-height: 60vh; */\n }\n\n .form-item {\n width: 100%;\n margin-bottom: 24px;\n position: relative;\n "," {\n flex-wrap: wrap;\n justify-content: space-between;\n width: 100%;\n flex-shrink: 0;\n }\n }\n\n .form-item-body {\n display: flex;\n align-items: center;\n width: 100%;\n margin-top: 4px;\n }\n\n .form-item-label {\n line-height: 1.2;\n font-size: 14px;\n color: #888;\n font-weight: bold;\n\n "," {\n text-align: left;\n width: auto;\n flex-grow: 1;\n }\n }\n\n .form-item-input {\n flex-grow: 1;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n\n &.slot {\n height: 40px;\n line-height: 40px;\n background: #f8f8f8;\n font-size: 16px;\n\n .MuiChip-root {\n margin-top: -4px;\n }\n }\n\n .MuiSelect-select {\n padding: 8px;\n }\n }\n\n .form-item-action {\n // width: 100px;\n text-align: left;\n margin-left: 12px;\n flex-shrink: 0;\n "," {\n width: auto;\n margin-left: 0px;\n }\n .MuiIconButton-root {\n padding: 8px;\n svg {\n fill: #888;\n }\n &.Mui-disabled {\n opacity: 0.4;\n }\n }\n }\n"])),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.down("md")))},95890:(e,n,t)=>{t.d(n,{Z:()=>x});var i=t(5057),o=t(55898),l=t.n(o),a=t(24558),r=t(67680),s=t(56556),c=t(80633),d=t(49390),u=t(72113),m=t(25228),p=t(49020),h=t(74490),f=t(1733),g=t(96266);function x(e){let{triggers:n,onEnterEdit:t,disabled:o}=e;const l=i.useRef(null),[x,v]=i.useState(!1);return 0===n.length?(0,g.jsx)(r.Z,{"data-cy":"schema-form-item-edit",onClick:t,disabled:o,size:"large",children:(0,g.jsx)(a.Z,{})}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(c.Z,{variant:"outlined",ref:l,"aria-label":"split button",children:[(0,g.jsx)(s.Z,{"data-cy":"schema-form-item-edit",onClick:t,disabled:o,size:"large",children:(0,g.jsx)(a.Z,{})}),(0,g.jsx)(s.Z,{size:"small","aria-controls":x?"split-button-menu":void 0,"aria-expanded":x?"true":void 0,onClick:()=>{v((e=>!e))},children:(0,g.jsx)(d.Z,{})})]}),(0,g.jsx)(p.Z,{sx:{zIndex:9999},open:x,anchorEl:l.current,role:void 0,placement:"bottom-end",children:(0,g.jsx)(m.Z,{children:(0,g.jsx)(u.d,{onClickAway:e=>{l.current&&l.current.contains(e.target)||v(!1)},children:(0,g.jsx)(f.Z,{id:"split-button-menu",autoFocusItem:!0,children:n.map((e=>(0,g.jsx)(h.Z,{onClick:()=>{return n=e.handler,v(!1),void n();var n},children:e.title},e.key)))})})})})]})}x.propTypes={triggers:l().arrayOf(l().shape({key:l().string.isRequired,title:l().string.isRequired,handler:l().func.isRequired})),onEnterEdit:l().func.isRequired,disabled:l().bool.isRequired},x.defaultProps={triggers:[]}},35406:(e,n,t)=>{t.d(n,{Z:()=>l});var i,o=t(71171);const l=t(33518).Z.span(i||(i=(0,o.Z)(["\n color: ",";\n &::before {\n content: '*';\n }\n"])),(e=>e.theme.palette.error.main))},54063:(e,n,t)=>{t.d(n,{C:()=>i});const i="true"===localStorage.getItem("enableDebug")}}]);