@abtnode/webapp 1.16.25-beta-be3a37f4 → 1.16.25-beta-cfcab4af

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/build/asset-manifest.json +53 -54
  4. package/build/index.html +1 -1
  5. package/build/service-worker.js +1 -1
  6. package/build/static/css/2677.bceba133.chunk.css +1 -0
  7. package/build/static/js/{1059.6e162d98.chunk.js → 1059.ca2cbdc1.chunk.js} +1 -1
  8. package/build/static/js/{1575.aa6c5f63.chunk.js → 1575.898bc099.chunk.js} +1 -1
  9. package/build/static/js/{1685.79e259fc.chunk.js → 1685.8aa7ded2.chunk.js} +2 -2
  10. package/build/static/js/{1846.b13a01b8.chunk.js → 1846.8091d9b8.chunk.js} +1 -1
  11. package/build/static/js/{2019.2558fef7.chunk.js → 2019.17ea2088.chunk.js} +1 -1
  12. package/build/static/js/2098.6c45c749.chunk.js +1 -0
  13. package/build/static/js/2168.af9a9b9f.chunk.js +1 -0
  14. package/build/static/js/{233.87becf3a.chunk.js → 233.3215dc68.chunk.js} +1 -1
  15. package/build/static/js/2362.5f9c8ab2.chunk.js +1 -0
  16. package/build/static/js/2677.491ccc30.chunk.js +2 -0
  17. package/build/static/js/{2746.6d8ac071.chunk.js → 2746.b74c83cd.chunk.js} +1 -1
  18. package/build/static/js/{3389.52e7ac5c.chunk.js → 3389.83a58684.chunk.js} +1 -1
  19. package/build/static/js/{3803.15148b1f.chunk.js → 3803.fb647887.chunk.js} +1 -1
  20. package/build/static/js/{3930.787c608b.chunk.js → 3930.6b76ec36.chunk.js} +1 -1
  21. package/build/static/js/406.e384bf0e.chunk.js +1 -0
  22. package/build/static/js/{4423.da2620a9.chunk.js → 4423.2dd278be.chunk.js} +1 -1
  23. package/build/static/js/{4465.0cc40dce.chunk.js → 4465.05c1536b.chunk.js} +1 -1
  24. package/build/static/js/{4509.f22f0238.chunk.js → 4509.391ff49f.chunk.js} +2 -2
  25. package/build/static/js/4549.59d35b13.chunk.js +1 -0
  26. package/build/static/js/{4550.af6850d6.chunk.js → 4550.6398038b.chunk.js} +1 -1
  27. package/build/static/js/4775.bc1f9bc3.chunk.js +1 -0
  28. package/build/static/js/4852.5661d7a7.chunk.js +1 -0
  29. package/build/static/js/{4906.999b88c8.chunk.js → 4906.0bf02a4f.chunk.js} +1 -1
  30. package/build/static/js/506.7795a2df.chunk.js +1 -0
  31. package/build/static/js/{5526.6683805e.chunk.js → 5526.2e5b0dfe.chunk.js} +2 -2
  32. package/build/static/js/5672.6b3a406d.chunk.js +1 -0
  33. package/build/static/js/{5748.a89331a1.chunk.js → 5748.07d72ea2.chunk.js} +1 -1
  34. package/build/static/js/5973.219778da.chunk.js +1 -0
  35. package/build/static/js/6230.f51ec934.chunk.js +1 -0
  36. package/build/static/js/{6472.2c5056ae.chunk.js → 6472.b1c703d4.chunk.js} +2 -2
  37. package/build/static/js/6511.6b799f59.chunk.js +1 -0
  38. package/build/static/js/6743.9db2d48f.chunk.js +2 -0
  39. package/build/static/js/{6906.73c16873.chunk.js → 6906.8e78a1d1.chunk.js} +1 -1
  40. package/build/static/js/6931.f7a04871.chunk.js +1 -0
  41. package/build/static/js/{6944.50b5e54e.chunk.js → 6944.9098ce0d.chunk.js} +1 -1
  42. package/build/static/js/7020.b16a6be6.chunk.js +1 -0
  43. package/build/static/js/7022.32cbb1ae.chunk.js +1 -0
  44. package/build/static/js/7718.b9fb672b.chunk.js +1 -0
  45. package/build/static/js/7913.f687f9d2.chunk.js +1 -0
  46. package/build/static/js/{8170.7d39c62a.chunk.js → 8170.a05bcf8e.chunk.js} +1 -1
  47. package/build/static/js/8427.4eeb503c.chunk.js +2 -0
  48. package/build/static/js/8537.a2ae5cb3.chunk.js +1 -0
  49. package/build/static/js/{8590.fcb1c27a.chunk.js → 8590.871b6ecb.chunk.js} +1 -1
  50. package/build/static/js/{8986.2f7c6ea5.chunk.js → 8986.bf90d91b.chunk.js} +1 -1
  51. package/build/static/js/9085.2eba86ab.chunk.js +1 -0
  52. package/build/static/js/{9586.dab3f0ad.chunk.js → 9586.a2caaa51.chunk.js} +1 -1
  53. package/build/static/js/9590.3c9e0821.chunk.js +2 -0
  54. package/build/static/js/{9662.2281f1d0.chunk.js → 9662.604d1362.chunk.js} +1 -1
  55. package/build/static/js/9818.66fa52f8.chunk.js +2 -0
  56. package/build/static/js/main.42e55f0d.js +2 -0
  57. package/package.json +1 -1
  58. package/build/static/css/7657.cc1ab277.chunk.css +0 -1
  59. package/build/static/js/2098.6efa542b.chunk.js +0 -1
  60. package/build/static/js/2168.4aa1c106.chunk.js +0 -1
  61. package/build/static/js/2362.5f1e7e82.chunk.js +0 -1
  62. package/build/static/js/318.ecb043b8.chunk.js +0 -2
  63. package/build/static/js/406.9e49d99c.chunk.js +0 -1
  64. package/build/static/js/4296.b3d15061.chunk.js +0 -1
  65. package/build/static/js/4549.06c2fd1f.chunk.js +0 -1
  66. package/build/static/js/4775.eecb94db.chunk.js +0 -1
  67. package/build/static/js/4852.5da43bce.chunk.js +0 -1
  68. package/build/static/js/506.e1874511.chunk.js +0 -1
  69. package/build/static/js/5973.b1923a12.chunk.js +0 -1
  70. package/build/static/js/6230.16addc8e.chunk.js +0 -1
  71. package/build/static/js/6511.7c767ea5.chunk.js +0 -1
  72. package/build/static/js/6706.134ef362.chunk.js +0 -2
  73. package/build/static/js/6743.e0b3dc71.chunk.js +0 -2
  74. package/build/static/js/6931.61297d93.chunk.js +0 -1
  75. package/build/static/js/7020.b9df1e44.chunk.js +0 -1
  76. package/build/static/js/7022.242a07f7.chunk.js +0 -1
  77. package/build/static/js/7657.aed23f30.chunk.js +0 -2
  78. package/build/static/js/7718.301ab3f8.chunk.js +0 -1
  79. package/build/static/js/7913.3940464c.chunk.js +0 -1
  80. package/build/static/js/8537.dc816763.chunk.js +0 -1
  81. package/build/static/js/9085.970be618.chunk.js +0 -1
  82. package/build/static/js/9132.43a3ec2a.chunk.js +0 -1
  83. package/build/static/js/9590.3877fd54.chunk.js +0 -2
  84. package/build/static/js/main.e2907b63.js +0 -2
  85. /package/build/static/js/{1685.79e259fc.chunk.js.LICENSE.txt → 1685.8aa7ded2.chunk.js.LICENSE.txt} +0 -0
  86. /package/build/static/js/{7657.aed23f30.chunk.js.LICENSE.txt → 2677.491ccc30.chunk.js.LICENSE.txt} +0 -0
  87. /package/build/static/js/{318.ecb043b8.chunk.js.LICENSE.txt → 4509.391ff49f.chunk.js.LICENSE.txt} +0 -0
  88. /package/build/static/js/{5526.6683805e.chunk.js.LICENSE.txt → 5526.2e5b0dfe.chunk.js.LICENSE.txt} +0 -0
  89. /package/build/static/js/{6472.2c5056ae.chunk.js.LICENSE.txt → 6472.b1c703d4.chunk.js.LICENSE.txt} +0 -0
  90. /package/build/static/js/{6743.e0b3dc71.chunk.js.LICENSE.txt → 6743.9db2d48f.chunk.js.LICENSE.txt} +0 -0
  91. /package/build/static/js/{4509.f22f0238.chunk.js.LICENSE.txt → 8427.4eeb503c.chunk.js.LICENSE.txt} +0 -0
  92. /package/build/static/js/{9590.3877fd54.chunk.js.LICENSE.txt → 9590.3c9e0821.chunk.js.LICENSE.txt} +0 -0
  93. /package/build/static/js/{6706.134ef362.chunk.js.LICENSE.txt → 9818.66fa52f8.chunk.js.LICENSE.txt} +0 -0
  94. /package/build/static/js/{main.e2907b63.js.LICENSE.txt → main.42e55f0d.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6511],{86511:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ne});var a=n(71171),i=n(5057),o=n(33518),l=n(85493),s=n(15849),c=n(68420),r=n(11750),d=n(39434),u=n(39948),p=n(83407),m=n(94464),v=n(88574),h=n(28726),g=n(38242),b=n(81010),f=n(87363),y=(n(5892),n(86229)),k=n(1722),x=n(35432),w=n(22425),P=n(58238),j=n(29054),S=n(73545),B=n(14491),Z=n(4651),C=n(96266);const E=e=>{const t={};let n=null;return(0,g.forEachBlockletSync)(e,(e=>{t[e.meta.bundleDid]?n=(0,g.getDisplayName)(e,!0):e.meta.bundleDid&&(t[e.meta.bundleDid]=!0)})),n},L=(e,t,n)=>{const{hostname:a,href:i}=e;if(!t)return i;if(n){var o;const e=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(a);if(!e)return i;const n=e[0],l=(((null===(o=t.site)||void 0===o?void 0:o.domainAliases)||[]).map((e=>e.value)).filter(Boolean).find((e=>e.endsWith(x.DEFAULT_DID_DOMAIN)))||"").replace(".".concat(x.DEFAULT_DID_DOMAIN),"");return l?i.replace(a,"".concat(l,"-").concat(n,".").concat(x.DEFAULT_IP_DOMAIN_SUFFIX)):i}return i.replace(t.meta.bundleDid,t.appPid)};function _(){const{t:e}=(0,c.PE)(),{api:t}=(0,S.T)(),{blocklet:n}=(0,j.y0)(),{inService:a}=(0,P.h6)(),[o,l]=(0,i.useState)(!1),[s,r]=(0,i.useState)(5),d=n&&n.structVersion!==x.APP_STRUCT_VERSION;return[d&&(0,C.jsxs)(v.Z,{type:"warning",style:{margin:"12px 0"},children:[(0,C.jsxs)(u.Z,{display:"flex",alignItems:"center",children:[(0,C.jsx)(h.Z,{variant:"contained",size:"small",color:"primary",onClick:()=>(()=>{try{if("running"===n.status)return void y.Z.error(e("blocklet.migrate.tip.running"));const t=E(n);if(t)return void y.Z.error(e("blocklet.migrate.tip.duplicate",{name:t}));l(!0)}catch(t){y.Z.error((0,B.Z)(t))}})(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),(0,C.jsx)("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map((t=>(0,C.jsx)(u.Z,{display:"flex",alignItems:"center",children:e("blocklet.migrate.intro.".concat(t))},t)))]},"alert"),n&&(0,C.jsx)(w.Z,{popup:!0,open:o,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:3e5,onSuccess:()=>{const e=L(window.location,n,a);setTimeout((()=>{window.location.href=e}),5e3),r(5),setInterval((()=>{r((e=>e-1))}),1e3)},extraParams:{appDid:n.appDid,did:n.meta.did,wt:(0,Z.iK)(n,!0),title:(0,g.getDisplayName)(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:s>=0?e("blocklet.migrate.success",{sec:s}):"Redirecting..."},onClose:()=>l(!1)},"connect")]}_.propTypes={};var D,A=n(35966),N=n(85531),G=n(44846),U=n(78123),T=n(75793),I=n(17022),O=n(21289),K=n(74094),z=n(7199);const R=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(4549)]).then(n.bind(n,64549)))),F=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(6547),n.e(9085),n.e(5760),n.e(506),n.e(2362),n.e(4852),n.e(4509),n.e(6230)]).then(n.bind(n,64558)))),M=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(4631),n.e(6547),n.e(6743),n.e(506),n.e(4852),n.e(1294),n.e(3555),n.e(4775)]).then(n.bind(n,14775)))),V=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(442),n.e(9662),n.e(7676),n.e(8986)]).then(n.bind(n,13239)))),Y=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(5745),n.e(9725),n.e(5374),n.e(592),n.e(5979),n.e(2537)]).then(n.bind(n,75979)))),$=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(6547),n.e(9085),n.e(5760),n.e(6743),n.e(9818),n.e(9590),n.e(5672),n.e(3216)]).then(n.bind(n,75672)))),W=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(9085),n.e(4901),n.e(1685),n.e(5015)]).then(n.bind(n,85555)))),X=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(9085),n.e(2911),n.e(4901),n.e(5745),n.e(442),n.e(5526),n.e(9725),n.e(7638),n.e(1685),n.e(2677),n.e(3135),n.e(406),n.e(1846),n.e(8427)]).then(n.bind(n,48427)))),J=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(9327),n.e(8219)]).then(n.bind(n,92379)))),Q=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(6547),n.e(9085),n.e(5760),n.e(7534)]).then(n.bind(n,87534)))),q=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(4901),n.e(4232),n.e(2611)]).then(n.bind(n,42611)))),H=(0,i.lazy)((()=>Promise.all([n.e(7718),n.e(7020),n.e(8537),n.e(4631),n.e(2294),n.e(6547),n.e(9085),n.e(5760),n.e(406),n.e(1846),n.e(9552)]).then(n.bind(n,39552)))),ee=e=>{let{children:t}=e;return t};function te(){var e;const t=(0,l.useNavigate)(),{tab:n="overview"}=(0,l.useParams)(),{did:a,blocklet:o,error:w,client:P,actions:{setBlocklet:j,refreshBlocklet:S}}=(0,O.y0)(),{refresh:B}=(0,T.h6)(),{t:Z}=(0,c.PE)(),E=(0,i.useCallback)((()=>(0,C.jsx)(V,{scope:a})),[a]),L=(null===o||void 0===o||null===(e=o.environments.find((e=>"BLOCKLET_APP_URL"===e.key)))||void 0===e?void 0:e.value)||window.location.origin,D=e=>(0,K.bV)(e,L),N=e=>{t("/blocklets/".concat(a,"/").concat(e))},te=e=>{e&&j(e),S()},ne=!o||(0,K.wS)(o.status)?[]:(0,g.getAppMissingConfigs)(o);let ie=null;const oe=[{label:Z("common.overview"),value:"overview"},{breadcrumbsLabel:Z("common.components"),label:(0,C.jsx)(p.Z,{color:"error",variant:"dot",invisible:!ne.length,children:Z("common.components")}),value:"components"}];if(w)ie=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(v.Z,{type:"error",variant:"icon",children:(0,K.Z)(w)}),(0,C.jsx)(h.Z,{onClick:()=>S(),children:(0,C.jsx)("span",{style:{textDecoration:"underline"},children:Z("common.retry")})})]});else if(o){var le;const e={overview:(0,C.jsx)(R,{}),configuration:F,navigation:M,services:W,members:(0,C.jsx)($,{type:"blocklet",createPassportSvg:D}),passports:Y,components:X,"audit-logs":E,logs:J,runtime:(0,C.jsx)(Q,{}),traffic:(0,C.jsx)(q,{client:P,did:a}),storage:(0,C.jsx)(H,{})};"configuration"===n&&(0,K.wS)(o.status)&&N("overview"),(0,K.wS)(o.status)||(oe.push({label:Z("common.members"),value:"members"}),oe.push({label:Z("common.passport"),value:"passports"}),oe.push({label:Z("common.configuration"),value:"configuration"})),oe.push({label:Z("common.auditLogs"),value:"audit-logs"}),o&&null!==(le=o.children)&&void 0!==le&&le.length&&o.structVersion===x.APP_STRUCT_VERSION&&oe.push({label:Z("common.logs"),value:"logs"}),oe.push({label:Z("common.configNavigation"),value:"navigation"}),oe.push({label:Z("common.runtime"),value:"runtime"}),oe.push({label:Z("common.traffic"),value:"traffic"}),oe.push({label:Z("common.storage"),value:"storage"});(0,g.getBlockletServices)(o).length&&oe.splice(2,0,{label:Z("blocklet.services"),value:"services"});const t=e[n]||e.overview;ie=(0,C.jsxs)(f.g,{type:"components",children:[!(0,g.isExternalBlocklet)(o)&&(0,C.jsx)(m.Z,{tabs:oe,current:n,onChange:N,scrollButtons:"auto"}),(0,C.jsx)("div",{className:"page-content",children:(0,C.jsx)(i.Suspense,{fallback:(0,C.jsx)(A.Z,{relative:"parent",children:(0,C.jsx)(G.Z,{})}),children:(0,i.isValidElement)(t)?t:(0,C.jsx)(t,{blocklet:o,onUpdate:te,createPassportSvg:D})})})]})}else ie=(0,C.jsx)(A.Z,{relative:"parent",children:(0,C.jsx)(G.Z,{})});const se=oe.find((e=>e.value===n)),ce=o?I.G6:ee;return(0,C.jsx)(ce,{teamDid:a,children:(0,C.jsxs)(ae,{children:[(0,C.jsxs)(d.Z,{separator:"\u203a","aria-label":"breadcrumb",className:"page-breadcrumb",children:[(0,C.jsx)(s.Link,{color:"textSecondary",to:"/blocklets",children:Z("common.blocklets")}),(0,C.jsx)(s.NavLink,{to:"/blocklets/".concat(a,"/overview"),style:e=>e?{color:"inherit"}:{},children:Z("common.detail")}),(0,C.jsx)(r.Z,{color:"textSecondary",children:se?se.breadcrumbsLabel||se.label:""})]}),(0,C.jsxs)(r.Z,{component:"div",className:"page-header",children:[(0,C.jsxs)(r.Z,{component:"h2",variant:"h4",className:"page-title",color:"textPrimary",children:[o?(0,C.jsx)(k.Z,{blocklet:o,style:{marginRight:16}}):null,o?(0,C.jsxs)(u.Z,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[(0,C.jsx)(u.Z,{children:(0,g.getDisplayName)(o)}),"unknown"!==(null===o||void 0===o?void 0:o.status)&&(0,C.jsx)(b.Z,{size:"12px",status:o.status,source:o.source,progress:o.progress})]}):"".concat(Z("common.blocklet")," ").concat(Z("common.detail"))]}),(0,C.jsx)(z.Z,{permission:"mutate_blocklets",children:!!o&&!(0,g.isExternalBlocklet)(o)&&(0,C.jsx)(U.Z,{className:"page-actions",blocklet:o,onStart:()=>{},onComplete:e=>{let{action:n,error:a}=e;a?y.Z.error(a.message):"remove"===n?(B(),t("/blocklets")):S()},variant:"group"})})]}),(0,C.jsx)(_,{}),ie]})})}function ne(){const{did:e}=(0,l.useParams)();return e?(0,C.jsx)(O.$8,{did:e,children:(0,C.jsx)(N.wV,{children:(0,C.jsx)(te,{})})}):null}const ae=o.Z.main(D||(D=(0,a.Z)(["\n .page-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 16px;\n }\n\n .page-title {\n display: flex;\n align-items: center;\n\n .page-link {\n font-size: 15px;\n margin-top: 8px;\n margin-left: 8px;\n }\n }\n\n .page-content {\n margin-top: 16px;\n }\n\n @media (max-width: ","px) {\n .page-header {\n flex-direction: column;\n align-items: flex-start;\n .page-actions,\n .MuiButtonGroup-root {\n width: 100%;\n }\n .MuiButtonGroup-root {\n .MuiButtonBase-root {\n flex: 1;\n }\n .blocklet-action-text {\n display: none;\n }\n }\n }\n\n .page-title {\n margin-bottom: 15px;\n }\n }\n"])),(e=>e.theme.breakpoints.values.md))},85531:(e,t,n)=>{n.d(t,{wV:()=>w,XN:()=>P});var a=n(5057),i=n(55898),o=n.n(i),l=n(86229),s=n(68420),c=n(77277),r=n(29054),d=n(84584),u=n(41899),p=n(58238),m=n(65873);var v=n(14491);function h(){var e;let{setLoading:t,refresh:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{blocklet:i,actions:{refreshBlocklet:o}}=(0,r.y0)(),s=null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did,[c,h]=(0,a.useState)([]),{api:g}=(0,p.h6)();return(0,u.Z)((async()=>{try{if(!s)return void h([]);null===t||void 0===t||t(!0);const{spaceGateways:e}=await g.getBlockletSpaceGateways({input:{did:s}}),n=await async function(e){let{blockletDid:t,nodeApi:n,spaceGateways:a}=e,i=!1;const o=await Promise.all(a.map((async e=>{let{name:t}=e;const n=await(0,d.nU)(e.endpoint);return(0,m.isEmpty)(n)||n===t||(t=n,i=!0),{...e,name:t}})));return i&&await Promise.all(o.filter((e=>e.did)).map((e=>n.updateBlockletSpaceGateway({input:{did:t,where:{did:e.did},spaceGateway:{...e}}})))),o}({blockletDid:s,nodeApi:g,spaceGateways:e});h(null!==n&&void 0!==n?n:[])}catch(e){console.error(e),l.Z.error((0,v.Z)(e))}finally{null===t||void 0===t||t(!1)}}),[s,o,n]),{spaceGateways:c}}function g(){var e;let{deps:t,setLoading:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[],setLoading:()=>{}};const{blocklet:i}=(0,r.y0)(),[o,s]=(0,a.useState)([]),{api:c}=(0,p.h6)(),d=(0,m.debounce)((async()=>{try{if(n(!0),!i)return void s([]);const{backups:e}=await c.getBlockletBackups({input:{did:i.meta.did}});s(null!==e&&void 0!==e?e:[])}catch(e){console.error(e),l.Z.error((0,v.Z)(e))}finally{n(!1)}}),2e3);return(0,u.Z)((async()=>{d()}),[null===i||void 0===i||null===(e=i.meta)||void 0===e?void 0:e.did].concat(t)),{backups:o}}const b=function(e){let{appDid:t}=e;const{backups:n}=g(),[i,o]=(0,a.useState)({message:"",progress:0,completed:!1}),l=(0,p.h6)(),{ws:{useSubscription:s}}=l;return s(c.BlockletEvents.backupProgress,(e=>{t===(null===e||void 0===e?void 0:e.appDid)&&o((()=>({...e})))}),[t]),(0,a.useEffect)((()=>{var e;if(null!==n&&void 0!==n&&n.length&&(0,m.isNull)(null===(e=n[0])||void 0===e?void 0:e.status)){const[e]=n;o((()=>({message:e.message,progress:e.progress,completed:Boolean(e.progress>=100)})))}}),[n]),i};var f=n(96266);const y=(0,a.createContext)({}),{Provider:k,Consumer:x}=y;function w(e){let{children:t}=e;const{t:n}=(0,s.PE)(),{api:i}=(0,p.h6)(),{blocklet:o}=(0,r.y0)(),[m,v]=(0,a.useState)(!1),[y,x]=(0,a.useState)(!1),{spaceGateways:w}=h({refresh:y,setLoading:v}),P=b({appDid:null===o||void 0===o?void 0:o.appDid}),[j,S]=(0,a.useState)(!1),B=(0,a.useMemo)((()=>(0,d.mo)(null===o||void 0===o?void 0:o.environments)),[o,y,j]),[Z,C]=(0,a.useState)(!1),{backups:E}=g({deps:[P],setLoading:C}),[L,_]=(0,a.useState)(null===w||void 0===w?void 0:w.find((e=>e.endpoint===B))),[D,A]=(0,a.useState)(!1),N=function(){var e;let{deps:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[]};const{blocklet:n}=(0,r.y0)(),{api:i}=(0,p.h6)(),[o,l]=(0,a.useState)(null);return(0,u.Z)((async()=>{var e;if(null!==n&&void 0!==n&&null!==(e=n.meta)&&void 0!==e&&e.did){const{autoBackup:e}=await i.getAutoBackup({input:{did:n.meta.did}});l(e)}}),[null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.did].concat(t)),o}({deps:[D]}),[G,U]=(0,a.useState)(!1),T=function(){var e;let{deps:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{deps:[]};const{blocklet:n}=(0,r.y0)(),{api:i}=(0,p.h6)(),[o,l]=(0,a.useState)(null);return(0,u.Z)((async()=>{var e;if(null!==n&&void 0!==n&&null!==(e=n.meta)&&void 0!==e&&e.did){const{autoCheckUpdate:e}=await i.getAutoCheckUpdate({input:{did:n.meta.did}});l(e)}}),[null===n||void 0===n||null===(e=n.meta)||void 0===e?void 0:e.did].concat(t)),o}({deps:[G]}),I=()=>{x((e=>!e))};return(0,f.jsx)(k,{value:{spaceGateways:w,selectedSpaceGateway:L,addSpaceGateway:async(e,t)=>{w.push({...e,loading:!0}),await i.addBlockletSpaceGateway({input:{did:o.meta.did,spaceGateway:e}}),B!==t&&await i.configBlocklet({input:{did:[o.meta.did],configs:[{key:c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t}]}}),I(),_(e)},deleteSpaceGateway:async e=>{e&&(e.endpoint!==B?(await i.deleteBlockletSpaceGateway({input:{did:o.meta.did,spaceGatewayDid:null===e||void 0===e?void 0:e.did}}),I(),_(e)):l.Z.warning(n("storage.spaces.gateway.delete.failedForConnected")))},updateSpaceGateway:async e=>{var t;await i.updateBlockletSpaceGateway({input:{did:o.meta.did,where:{did:e.did},spaceGateway:e}}),B!==e.endpoint&&await i.configBlocklet({input:{did:[o.meta.did],configs:[{key:c.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:e.endpoint}]}}),l.Z.success(n("storage.spaces.connectedWithName",{name:null!==(t=null===e||void 0===e?void 0:e.name)&&void 0!==t?t:"DID Spaces"})),I()},refreshSpaceGateways:I,spaceGatewaysLoading:m,spaceGatewayIsSelected:e=>(null===e||void 0===e?void 0:e.endpoint)===B,updateAutoBackup:async e=>{await i.updateAutoBackup({input:{did:o.meta.did,autoBackup:e}}),A((e=>!e))},updateAutoCheckUpdate:async e=>{await i.updateAutoCheckUpdate({input:{did:o.meta.did,autoCheckUpdate:e}}),U((e=>!e))},autoCheckUpdate:T,backupEndpoint:B,backupProgress:P,backups:E,backupsLoading:Z,refreshBackupEndpoint:()=>{S((e=>!e))},autoBackup:N},children:t})}function P(){return(0,a.useContext)(y)}w.propTypes={children:o().any.isRequired},w.defaultProps={}},60344:(e,t,n)=>{n.d(t,{hi:()=>o,od:()=>i.a});var a=n(10458),i=n.n(a);i().defaults.timeout=1e4;const o=i().create()},84584:(e,t,n)=>{n.d(t,{EJ:()=>f,Jf:()=>b,LQ:()=>u,Nb:()=>p,UV:()=>y,Xv:()=>r,Z3:()=>k,ag:()=>v,mo:()=>m,nD:()=>d,nU:()=>g,w2:()=>h});var a=n(82434),i=n.n(a),o=n(77277),l=n(65873),s=n(2842),c=n(60344);function r(e){const t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/"),a=n.at(-4),i=n.at(-2);return(0,s.xn)(t,"space",a,"apps",i,"explorer?key=/apps/".concat(i,"/.did-objects/").concat(i,"/"))}function d(e){const t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/").at(-4);return(0,s.xn)(t,"space",n)}function u(e){return e.replace(/\/$/,"").split("/").at(-4)}async function p(e){try{if(!i()(e))return!1;const{headers:t}=await c.hi.head(e,{timeout:5e3});return"true"===t["x-listable"]&&"true"===t["x-readable"]&&"true"===t["x-writeable"]}catch(t){return console.error(t),!1}}function m(e){var t;return(null===e||void 0===e||null===(t=e.find((e=>e.key===o.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT)))||void 0===t?void 0:t.value)||""}function v(e){const t=new URL(e);return(0,s.xn)(t.origin,t.pathname)}async function h(e){try{if(!i()(e))return!1;const t=v(e),n=(0,s.xn)(t,"space/api/did/one-click-authorization/token"),{status:a,data:o}=await c.hi.get(n,{timeout:5e3});return 200===a&&(0,l.isObject)(o)}catch(t){return console.error(t),!1}}async function g(e){let{timeout:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeout:3e3};try{if(!i()(e))return"";const{headers:n}=await c.hi.head(e,{timeout:t}),a=n["x-space-name"];return a?decodeURIComponent(a):""}catch(n){return console.error(n),""}}function b(e){const t=e.replace(/\/api\/space\/.+/,""),n=e.replace(/\/$/,"").split("/").at(-4);return(0,s.xn)(t,"/api/space/nft/display?spaceDid=".concat(n))}const f=e=>{var t;return(null===e||void 0===e||null===(t=e.configs)||void 0===t||null===(t=t.find((e=>e.key===o.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT)))||void 0===t?void 0:t.value)||null};async function y(e){const t={};return t.did=u(e),t.name=await g(e),t.url=function(e){return null===e||void 0===e?void 0:e.replace(/\/api\/space\/.+/,"")}(e),t.endpoint=e,t}async function k(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeout:3e4,withSearchParams:!0};if(!(0,l.isString)(e))throw new Error("url(".concat(e,") must be a string"));const a=e.startsWith("http")?e:"https://".concat(e),i=new URL(a),{data:o}=await c.hi.get((0,s.xn)(i.origin,"/__blocklet__.js?type=json"),{timeout:n.timeout}),r=null===(t=o.componentMountPoints.findLast((e=>"z8iZnaYxnkMD5AKRjTKiCb8pQr1ut8UantAcf"===e.did)))||void 0===t?void 0:t.mountPoint;if(!r)throw new Error("MountPoint(".concat(r,") not found"));const d=(0,s.xn)(i.origin,r);return n.withSearchParams&&i.searchParams.get("spaceDid")?(0,s.xn)(d,"?spaceDid=".concat(i.searchParams.get("spaceDid"))):d}}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 6743.9db2d48f.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6743],{5873:(e,n,t)=>{t.d(n,{Z:()=>m});var o=t(96266),i=(t(49631),t(5057)),r=t(55898),s=t.n(r),l=t(47220),a=t(68420),c=t(1033),d=t(615),u=t(6504),f=t(94457),p=t(59763),h=t(25162);function g(e){var n;let{meta:t,fallbackUrl:r,invalidPathFallback:s,headerAddons:d,sessionManagerProps:g,links:m,...v}=e;(0,h.x)();const b=(0,i.useContext)(l.B3),x=null===b||void 0===b||null===(n=b.session)||void 0===n?void 0:n.user,y=null===x||void 0===x?void 0:x.role,{locale:k}=(0,a.PE)()||{},w=(0,i.useMemo)((()=>{const e=Object.assign({},window.blocklet,t);try{return(0,f.RX)(e)}catch(n){return console.error("Failed to format blocklet info",n,e),e}}),[t]),{localizedNav:j,flattened:T,matchedIndex:M}=(0,i.useMemo)((()=>{var e;let n=(0,f.KN)(null===w||void 0===w||null===(e=w.navigation)||void 0===e?void 0:e.dashboard,k)||[];n=(0,f.Kb)(n,y),n=(0,u._J)(n,(e=>({title:e.title,url:e.link,icon:e.icon?(0,o.jsx)("iconify-icon",{height:"100%",width:"100%",icon:e.icon}):null,external:!0,children:e.items})),"items");const t=(0,u.Ik)(n).filter((e=>!!e.url)),i=(0,u.RX)(t.map((e=>e.url)));return-1!==i&&(t[i].active=!0),{localizedNav:n,flattened:t,matchedIndex:i}}),[w,k,y]),C="function"===typeof m?m(j):[...j,...m];if((0,i.useLayoutEffect)((()=>{!x||null!==T&&void 0!==T&&T.length||!r||(window.location.href=r)}),[r]),(0,i.useLayoutEffect)((()=>{var e;x&&null!==T&&void 0!==T&&T.length&&-1===M&&(s?s():window.location.href=(null===(e=T[0])||void 0===e?void 0:e.url)||f.iU)}),[s,T,M]),!w.appName)return null;const{appLogo:A,appLogoRect:Z,appName:P}=w,E=(0,o.jsx)(p.Z,{formattedBlocklet:w,addons:d,sessionManagerProps:g});return(0,o.jsx)(c.Z,{title:P,fullWidth:!0,sidebarWidth:128,legacy:!1,links:C,...v,headerProps:{homeLink:f.iU,logo:(0,o.jsx)("img",{src:Z||A,alt:"logo"}),addons:E,...v.headerProps}})}g.propTypes={meta:d.u,fallbackUrl:s().string,invalidPathFallback:s().func,headerAddons:s().oneOfType([s().func,s().node]),sessionManagerProps:d.r,links:s().oneOfType([s().array,s().func])},g.defaultProps={meta:{},fallbackUrl:f.iU,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=f.iU}},links:[]};const m=g},2484:(e,n,t)=>{t.d(n,{Z:()=>Y});var o,i=t(71171),r=t(96266),s=t(5057),l=t(55898),a=t.n(l),c=t(47685),d=t(52439),u=t(68420),f=t(71569),p=t(76223),h=t(24914),g=t.n(h),m=t(9498),v=t(39948);function b(e){let{name:n,logo:t,description:o,...i}=e;if(!n&&!t&&!o)return null;const l=(0,s.isValidElement)(t)?t:(0,r.jsx)("img",{src:t,alt:n});return(0,r.jsxs)(x,{...i,children:[(0,r.jsxs)("div",{children:[t&&(0,r.jsx)("div",{className:"footer-brand-logo",children:l}),n&&(0,r.jsx)("div",{className:"footer-brand-name",children:n})]}),o&&(0,r.jsx)("div",{className:"footer-brand-desc",children:o})]})}b.propTypes={name:a().node,logo:a().node,description:a().string},b.defaultProps={name:"",logo:"",description:""};const x=(0,c.zo)("div")(o||(o=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n font-size: 14px;\n a {\n text-decoration: none;\n color: inherit;\n }\n > div:first-of-type {\n display: flex;\n align-items: center;\n }\n .footer-brand-logo {\n display: flex;\n align-items: center;\n margin-right: 16px;\n line-height: 1;\n img,\n svg {\n width: auto;\n height: 44px;\n max-height: 44px;\n }\n }\n .footer-brand-name {\n font-size: 16px;\n font-weight: bold;\n }\n .footer-brand-desc {\n margin-top: 16px;\n }\n\n "," {\n width: auto;\n }\n\n "," {\n .footer-brand-logo {\n img,\n svg {\n height: 32px;\n max-height: 32px;\n }\n }\n }\n"])),(e=>e.theme.breakpoints.down("sm")),(e=>e.theme.breakpoints.down("md")));var y,k=t(9978),w=t(76720),j=t(79787);function T(e){let{links:n,flowLayout:t,...o}=e;const[i,l]=(0,s.useState)(-1);if(null===n||void 0===n||!n.length)return null;const a=n.some((e=>{var n;return null===(n=e.items)||void 0===n?void 0:n.length})),c=e=>{let{label:n,link:t,icon:o,render:i,props:s}=e,l=n;return i?l=i({label:n,link:t,props:s}):t&&(l=(0,r.jsx)("a",{href:t,"aria-label":"Footer link for ".concat(n),...s,children:n})),(0,r.jsxs)(r.Fragment,{children:[o&&(0,r.jsx)(j.Z,{icon:o,size:20,sx:{mr:.5}}),l]})};return(0,r.jsx)(M,{...o,className:(0,k.Z)(o.className,{"footer-links--grouped":a,"footer-links--flow":t}),children:(0,r.jsxs)("div",{className:"footer-links-inner",children:[t&&n.map(((e,n)=>(0,r.jsx)("span",{className:"footer-links-item",children:c(e)},n))),!t&&n.map(((e,n)=>{const{items:t}=e,o=n===i;return(0,r.jsxs)("div",{className:(0,k.Z)("footer-links-group",{"footer-links-group--active":o}),onClick:()=>l(i===n?-1:n),children:[(0,r.jsxs)("span",{className:"footer-links-item",children:[c(e),!(null===t||void 0===t||!t.length)&&(0,r.jsx)("span",{className:"footer-links-group-expand-icon",children:(0,r.jsx)(w.Z,{style:{transform:"rotate(".concat(o?180:0,"deg)")}})})]}),!(null===t||void 0===t||!t.length)&&(0,r.jsx)("div",{className:"footer-links-sub",children:t.map(((e,n)=>(0,r.jsx)("span",{className:"footer-links-item",children:c(e)},n)))})]},n)}))]})})}T.propTypes={links:a().arrayOf(a().shape({label:a().string,link:a().string,render:a().func,props:a().object})),flowLayout:a().bool},T.defaultProps={links:[],flowLayout:!1};const M=(0,c.zo)("div")(y||(y=(0,i.Z)(["\n overflow: hidden;\n color: ",";\n .footer-links-inner {\n display: flex;\n justify-content: space-between;\n margin: 0 -8px;\n }\n .footer-links-group,\n .footer-links-sub {\n display: flex;\n flex-direction: column;\n }\n .footer-links-sub .footer-links-item {\n color: ",";\n }\n .footer-links-group-expand-icon {\n display: none;\n position: absolute;\n right: 16px;\n top: 50%;\n transform: translate(0, -50%);\n line-height: 1;\n svg {\n width: auto;\n height: 0.75em;\n }\n }\n .footer-links-item {\n display: inline-flex;\n align-items: center;\n position: relative;\n padding: 4px 8px;\n font-size: 14px;\n }\n &.footer-links--grouped {\n .footer-links-group {\n > .footer-links-item {\n font-weight: bold;\n }\n .footer-links-sub {\n margin-top: 8px;\n }\n }\n }\n a {\n display: inline-block;\n max-width: 150px;\n color: inherit;\n text-decoration: none;\n &:hover {\n text-decoration: underline;\n }\n }\n\n &.footer-links--flow {\n display: inline-flex;\n .footer-links-inner {\n justify-content: center;\n flex-wrap: wrap;\n margin: 0 -8px;\n .footer-links-item {\n padding: 0 8px;\n }\n .footer-links-item + .footer-links-item::before {\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n transform: translate(0, -50%);\n height: 1em;\n border-left: 1px solid ",";\n }\n }\n }\n\n "," {\n .footer-links-inner {\n flex-direction: column;\n margin: 0;\n }\n .footer-links-sub {\n display: none;\n }\n .footer-links-group {\n position: relative;\n padding: 12px 0;\n .footer-links-item .footer-links-group-expand-icon {\n display: inline-block;\n }\n }\n .footer-links-group + .footer-links-group {\n border-top: 1px solid ",";\n }\n .footer-links-group--active {\n .footer-links-sub {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n .footer-links-item {\n flex: 0 0 50%;\n }\n }\n }\n .footer-links-item {\n padding-left: 0;\n padding-right: 0;\n font-size: 13px;\n }\n &.footer-links--grouped {\n .footer-links-group {\n > .footer-links-item {\n font-size: 14px;\n }\n }\n }\n\n &.footer-links--flow {\n .footer-links-inner {\n flex-direction: row;\n }\n }\n }\n"])),(e=>e.theme.palette.grey[600]),(e=>e.theme.palette.grey[900]),(e=>e.theme.palette.grey[400]),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.palette.grey[200]));var C;function A(e){let{items:n,...t}=e;const o=(0,c.Fg)();return null!==n&&void 0!==n&&n.length?(0,r.jsx)(Z,{...t,children:n.map(((e,n)=>(0,r.jsx)("a",{href:e.link,target:"_blank","aria-label":"Social media icon".concat(e.title?" for ".concat(e.title):""),rel:"noreferrer",children:(0,r.jsx)(j.Z,{icon:e.icon||e.title,sx:{bgcolor:o.palette.grey[600],color:"#fff"},size:24,component:"span"})},n)))}):null}A.propTypes={items:a().arrayOf(a().shape({icon:a().string,link:a().string}))},A.defaultProps={items:null};const Z=(0,c.zo)("div")(C||(C=(0,i.Z)(["\n display: inline-flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: center;\n gap: 20px;\n a {\n color: ",";\n text-decoration: none;\n &:hover {\n color: ",";\n }\n }\n "," {\n gap: 12px;\n }\n"])),(e=>e.theme.palette.grey[400]),(e=>e.theme.palette.primary.light),(e=>e.theme.breakpoints.down("md")));var P;function E(e){let{owner:n,year:t,...o}=e;return(0,r.jsxs)(S,{...o,children:["Copyright \xa9 ",t," ",n]})}E.propTypes={owner:a().string,year:a().string},E.defaultProps={owner:"ArcBlock",year:"".concat((new Date).getFullYear())};const S=(0,c.zo)("p")(P||(P=(0,i.Z)(["\n display: flex;\n align-items: center;\n margin: 0;\n font-size: 13px;\n"])));var I,O=t(22139);function N(e){let{children:n,autoCenter:t,...o}=e;return n?(0,r.jsx)(z,{...o,className:(0,k.Z)(o.className,{"footer-row-auto-center":t}),children:n}):null}N.propTypes={children:a().any,autoCenter:a().bool},N.defaultProps={children:null,autoCenter:!1};const z=(0,c.zo)(v.Z)(I||(I=(0,i.Z)(["\n display: flex;\n justify-content: space-between;\n & + & {\n margin-top: 24px;\n }\n &.footer-row-auto-center > *:only-child {\n margin: 0 auto;\n }\n\n "," {\n align-items: stretch;\n flex-direction: column;\n gap: 16px;\n > * {\n flex: 1 0 100%;\n }\n &.footer-row-auto-center > * {\n margin: 0 auto;\n }\n }\n"])),(e=>e.theme.breakpoints.down("md")));var R;function _(e){var n;let{elements:t,data:o,...i}=e;return(0,r.jsx)(L,{...i,children:(0,r.jsxs)(O.Z,{children:[(0,r.jsxs)(v.Z,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"center",md:"space-between"},gap:2,pb:3},children:[(0,r.jsx)(v.Z,{children:t.brand}),(0,r.jsx)(v.Z,{lineHeight:1,children:t.socialMedia})]}),!(null===(n=o.navigation)||void 0===n||!n.length)&&(0,r.jsx)(v.Z,{sx:{mb:6,pt:3,borderTop:1,borderColor:"grey.200"},children:t.navigation}),(0,r.jsxs)(N,{sx:{pt:3,borderTop:1,borderColor:"grey.200"},autoCenter:!0,children:[t.copyright,t.links]})]})})}_.propTypes={elements:a().shape({brand:a().element,navigation:a().element,socialMedia:a().element,copyright:a().element,links:a().element}).isRequired,data:a().object.isRequired};const L=(0,c.zo)("div")(R||(R=(0,i.Z)(["\n padding: 32px 0 24px 0;\n .footer-brand-name,\n .footer-brand-desc {\n display: none;\n }\n && .footer-brand-logo {\n margin-right: 0;\n }\n"]))),q=_;var F;function H(e){let{elements:n,data:t,...o}=e;return(0,r.jsx)(U,{...o,children:(0,r.jsxs)(O.Z,{className:"plain-layout-container",children:[!!t.links&&(0,r.jsxs)(N,{sx:{width:1},autoCenter:!0,children:[n.copyright,n.links]}),!t.links&&(0,r.jsxs)(r.Fragment,{children:[(0,s.cloneElement)(n.brand,{name:null,description:null}),n.copyright]})]})})}H.propTypes={elements:a().shape({brand:a().element,navigation:a().element,socialMedia:a().element,copyright:a().element,links:a().element}).isRequired,data:a().object.isRequired};const U=(0,c.zo)("div")(F||(F=(0,i.Z)(["\n padding: 24px 0;\n .plain-layout-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n }\n"]))),B=[{name:"plain",support:(e,n)=>{var t,o;return!(null!==(t=n.navigation)&&void 0!==t&&t.length)&&!(null!==(o=n.socialMedia)&&void 0!==o&&o.length)},component:H},{name:"standard",support:()=>!0,component:q}],D=B.reduce(((e,n)=>({...e,[n.name]:n})),{});function J(e){var n;const{brand:t,navigation:o,socialMedia:i,copyright:s,links:l,layout:a,...c}=e,d={brand:t?(0,r.jsx)(b,{...t}):null,navigation:null!==o&&void 0!==o&&o.length?(0,r.jsx)(T,{links:o}):null,socialMedia:null!==i&&void 0!==i&&i.length?(0,r.jsx)(A,{items:i}):null,copyright:(()=>{const e=(null===s||void 0===s?void 0:s.owner)||(null===t||void 0===t?void 0:t.name);return e?(0,r.jsx)(E,{owner:e,year:(null===s||void 0===s?void 0:s.year)||void 0}):null})(),links:null!==l&&void 0!==l&&l.length?(0,r.jsx)(T,{flowLayout:!0,links:l}):null};let u=null;var f;"auto"===a?u=B.find((n=>n.support(d,e))).component:u=null===(f=D[a])||void 0===f?void 0:f.component;if(!u)throw new Error("layout ".concat(a," is not supported."));return(0,r.jsxs)(v.Z,{position:"relative",...c,children:[(0,r.jsx)(u,{elements:d,data:e}),(0,r.jsx)(v.Z,{position:"absolute",right:16,bottom:0,fontSize:12,sx:{color:"transparent","::selection":{background:"#000",color:"#fff"}},children:null===(n=window)||void 0===n||null===(n=n.blocklet)||void 0===n?void 0:n.version})]})}J.propTypes={brand:a().shape({name:a().node,description:a().string,logo:a().node}),navigation:a().arrayOf(a().shape({label:a().node,link:a().string})),socialMedia:a().arrayOf(a().shape({icon:a().node,link:a().string})),copyright:a().shape({owner:a().string,year:a().oneOfType([a().string,a().number])}),links:a().arrayOf(a().shape({label:a().node,link:a().string})),layout:a().oneOf(["auto","standard","plain"])},J.defaultProps={brand:null,navigation:null,copyright:null,socialMedia:null,links:null,layout:"auto"};const $=J;var K,Q=t(6504),W=t(94457),X=t(615);function V(e){var n,t,o,i;let{meta:l,theme:a,...c}=e;const{locale:d}=(0,u.PE)()||{},f=(0,s.useMemo)((()=>{const e=Object.assign({},window.blocklet,l);try{return(0,W.RX)(e)}catch(n){return console.error("Failed to format blocklet info",n,e),e}}),[l]);if(!f.appName)return null;const{appLogo:p,appLogoRect:h,appName:v,appDescription:b,description:x,theme:y,copyright:k}=f,w={footerNav:(0,W.KN)(null===f||void 0===f||null===(n=f.navigation)||void 0===n?void 0:n.footer,d)||[],socialMedia:(0,W.KN)(null===f||void 0===f||null===(t=f.navigation)||void 0===t?void 0:t.social,d)||[],links:(0,W.KN)(null===f||void 0===f||null===(o=f.navigation)||void 0===o?void 0:o.bottom,d)||[]},j={brand:{name:v,description:b||x,logo:h||p},navigation:(0,Q._J)(w.footerNav,(e=>({...e,label:e.title,link:e.link})),"items"),copyright:k,socialMedia:w.socialMedia,links:w.links.map((e=>({...e,label:e.title})))};return(0,r.jsx)(m.Z,{theme:a,children:(0,r.jsx)(G,{...j,...g()(c,["bordered"]),$bordered:null===c||void 0===c?void 0:c.bordered,$bgcolor:null===y||void 0===y||null===(i=y.background)||void 0===i?void 0:i.footer})})}V.propTypes={meta:X.u,theme:a().object},V.defaultProps={meta:{},theme:null};const G=(0,c.zo)($)(K||(K=(0,i.Z)(["\n ","\n color: ",";\n ","\n font-family: Inter, Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n"])),(e=>{let{$bordered:n}=e;return"border-top: 1px solid ".concat(n?p.E.strokeSep:"#eee",";")}),(e=>e.theme.palette.grey[600]),(e=>{let{$bgcolor:n}=e;return n&&"background-color: ".concat(n,";")})),Y=(0,d.withErrorBoundary)(V,{FallbackComponent:f.H})},1192:(e,n,t)=>{t.d(n,{Z:()=>A});var o,i=t(71171),r=t(96266),s=t(5057),l=t(55898),a=t.n(l),c=t(52439),d=t(71569),u=t(47685),f=t(60391),p=t(48250),h=t(68420),g=t(76223),m=t(24914),v=t.n(m),b=t(79787),x=t(9498),y=t(615),k=t(6504),w=t(94457),j=t(59763),T=t(25162);function M(e){var n,t;let{meta:o,addons:i,sessionManagerProps:l,homeLink:a,theme:c,hideNavMenu:d,...u}=e;(0,T.x)();const{locale:f}=(0,h.PE)()||{},g=(0,s.useMemo)((()=>{const e=Object.assign({},window.blocklet,o);try{return(0,w.RX)(e)}catch(n){return console.error("Failed to format blocklet info",n,e),e}}),[o]);if(!g.appName)return null;const{appLogo:m,appLogoRect:y,theme:M}=g,A=(e=>{if(null===e||void 0===e||!e.length)return{navItems:[],activeId:null};let n=1;const t=(0,k._J)(e,(e=>{var t,o;const i=e.icon?(0,r.jsx)(b.Z,{icon:e.icon}):null;if(e.items)return{id:"".concat(n++),label:e.title,icon:i,children:e.items};let s={};return(null!==(t=e.link)&&void 0!==t&&t.startsWith("http://")||null!==(o=e.link)&&void 0!==o&&o.startsWith("https://"))&&(s={target:"_blank",rel:"noreferrer"}),{id:"".concat(n++),label:(0,r.jsx)("a",{href:e.link,...s,children:e.title}),icon:i,link:e.link}}),"items"),o=(0,k.Ik)(t),i=(0,k.RX)(o.map((e=>e.link)));return{navItems:t,activeId:i>=0?o[i].id:null}})((0,w.KN)(null===g||void 0===g||null===(n=g.navigation)||void 0===n?void 0:n.header,f)),{navItems:Z,activeId:P}=A,E="function"===typeof i?e=>i(e,{navigation:A}):i,S=(0,r.jsx)(j.Z,{formattedBlocklet:g,addons:E,sessionManagerProps:l});return(0,r.jsx)(x.Z,{theme:c,children:(0,r.jsx)(C,{homeLink:a,logo:(0,r.jsx)("img",{src:y||m,alt:"logo"}),addons:S,...v()(u,["bordered"]),$bordered:null===u||void 0===u?void 0:u.bordered,$bgcolor:null===M||void 0===M||null===(t=M.background)||void 0===t?void 0:t.header,children:d||null===Z||void 0===Z||!Z.length?null:e=>{let{isMobile:n}=e;return(0,r.jsx)(p.Z,{mode:n?"inline":"horizontal",activeId:P,items:Z,className:"header-nav",bgColor:"transparent",textColor:"#777"})}})})}M.propTypes={meta:y.u,addons:a().oneOfType([a().func,a().node]),sessionManagerProps:y.r,homeLink:a().string,theme:a().object,hideNavMenu:a().bool},M.defaultProps={meta:{},addons:null,sessionManagerProps:{showRole:!0},homeLink:w.iU,theme:null,hideNavMenu:!1};const C=(0,u.zo)(f.z)(o||(o=(0,i.Z)(["\n ","\n font-family: Inter, Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,\n 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n .header-logo {\n min-width: 44px;\n }\n ","\n "," {\n .header-logo {\n min-width: 32px;\n }\n }\n .header-nav {\n .navmenu-sub .navmenu-item {\n min-width: 80px;\n }\n }\n .header-nav.navmenu--horizontal {\n .navmenu-root > .navmenu-sub,\n .navmenu-root > .navmenu-item {\n padding: 16px 4px;\n\n .navmenu-sub-container {\n padding-top: 0;\n }\n }\n .navmenu-item-icon > .MuiAvatar-root,\n .navmenu-sub-icon > .MuiAvatar-root {\n width: 20px;\n height: 20px;\n }\n }\n"])),(e=>{let{$bgcolor:n}=e;return"background-color: ".concat(n||"#fff",";")}),(e=>{let{$bordered:n}=e;return n?"border-bottom: 1px solid ".concat(g.E.strokeSep,";"):""}),(e=>e.theme.breakpoints.down("md"))),A=(0,c.withErrorBoundary)(M,{FallbackComponent:d.H})},79787:(e,n,t)=>{t.d(n,{Z:()=>a});var o=t(96266),i=(t(49631),t(55898)),r=t.n(i),s=t(62681),l=t(6504);function a(e){let{icon:n,size:t,sx:i,...r}=e;const a=[...Array.isArray(i)?i:[i]];if(t&&a.push({width:t,height:t}),r.variant||a.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),(0,l.CB)(n))return(0,o.jsx)(s.Z,{as:"span",...r,src:n,sx:a});if((0,l.Xk)(n)){const e=t?.6*t+4:0;return(0,o.jsx)(s.Z,{as:"span",...r,sx:a,children:(0,o.jsx)("iconify-icon",{icon:n,height:e||void 0})})}return n&&"string"===typeof n?(a.push({"&.MuiAvatar-root":{display:"inline-flex",...t&&{fontSize:t-2}}}),(0,o.jsx)(s.Z,{as:"span",...r,sx:a,children:Array.from(n)[0]})):null}a.propTypes={icon:r().string.isRequired,size:r().number,sx:r().oneOfType([r().array,r().func,r().object])},a.defaultProps={size:null,sx:null}},94457:(e,n,t)=>{t.d(n,{KN:()=>l,Kb:()=>u,RX:()=>c,iU:()=>s});var o,i,r=t(6504);const s=(null===(o=window)||void 0===o||null===(o=o.blocklet)||void 0===o?void 0:o.groupPrefix)||(null===(i=window)||void 0===i||null===(i=i.blocklet)||void 0===i?void 0:i.prefix)||"/",l=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";if(null===e||void 0===e||!e.length)return e;const t=(e,n)=>{if("string"===typeof e){if((0,r.CB)(e)){const t=new URL(e);return t.searchParams.set("locale",n),t.href}const t=new URL(e,window.location.origin);return t.searchParams.set("locale",n),t.pathname+t.search}return"object"===typeof e?e[n]||(null===e||void 0===e?void 0:e.en)||(null===e||void 0===e?void 0:e.zh):e};return(0,r._J)(e,(e=>{var o,i,r;return{...e,title:(i=e.title,r=n,"string"===typeof i?i:"object"===typeof i?i[r]||(null===i||void 0===i?void 0:i.en)||(null===i||void 0===i?void 0:i.zh):i),link:null!==(o=e.items)&&void 0!==o&&o.length?e.link:t(e.link,n),_rawLink:e.link}}),"items")},a=e=>{if(null===e||void 0===e||!e.length)return null;const n=(e=>(0,r._J)(e,(e=>e.role?{...e,role:Array.isArray(e.role)?e.role:[e.role]}:e),"items"))(e),t={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return n.forEach((e=>{if(e.section){if(Array.isArray(e.section))e.section.forEach((n=>{var o;null===(o=t[n])||void 0===o||o.push(e)}));else if("string"===typeof e.section){var n;null===(n=t[e.section])||void 0===n||n.push(e)}}else t.header.push(e)})),t},c=e=>{if(!e)return null;const n={...e};return n.theme=(e=>{const n={...e},t=null===e||void 0===e?void 0:e.background;return"string"===typeof t?n.background={header:t,footer:t,default:t}:t&&"object"===typeof t&&(n.background={header:t.header||t.default,footer:t.footer||t.default,default:t.default}),n})(n.theme),n.navigation=a(d(n.navigation)),n},d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,r.fA)(e,((e,n)=>{var t;return!!e.link||(null===(t=n.filteredChildren)||void 0===t?void 0:t.length)}),"items")},u=(e,n)=>(0,r.fA)(e,((e,t)=>{const o=!e.role||n&&e.role.includes(n);var i;return t.isLeaf?o:o&&(null===(i=t.filteredChildren)||void 0===i?void 0:i.length)}),"items")},59763:(e,n,t)=>{t.d(n,{Z:()=>O});var o=t(96266),i=(t(49631),t(5057)),r=t(55898),s=t.n(r),l=t(47220),a=t(51724),c=t(67680),d=t(49020),u=t(72113),f=t(7469),p=t(25228),h=t(19577),g=t(2478),m=t(79278),v=t(39948),b=t(11750),x=t(55498);const y={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},k={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};var w=t(12673),j=t(99360),T=t(28726),M=t(76223),C=t(21998),A=t(43907);function Z(e){var n;let{session:t,locale:r,size:s}=e;const l=(null===(n=window)||void 0===n?void 0:n.blocklet)||{},a=(l.navigation||[]).filter((e=>"sessionManager"===e.section&&!["/sessionManager"].includes(e.id))).filter((e=>{var n;return!!((null===e||void 0===e?void 0:e.role)||[]).includes((null===t||void 0===t||null===(n=t.user)||void 0===n?void 0:n.role)||"guest")})).map((e=>{const n=((null===l||void 0===l?void 0:l.componentMountPoints)||[]).find((n=>e.component===n.name));return{...e,component:n}})),Z=(0,i.useRef)(null),P=(0,w.Z)({open:!1}),E=(0,j.Z)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:!P.open;P.open=e}));return 0!==a.length&&null!==t&&void 0!==t&&t.user?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.Z,{size:"medium",ref:Z,onClick:()=>E(),children:(0,o.jsx)(x.JO,{icon:y,fontSize:s,style:{transform:"scale(1.08)"}})}),(0,o.jsx)(d.Z,{open:P.open,onClose:()=>E(!1),anchorEl:Z.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:e=>{let{TransitionProps:n}=e;return(0,o.jsx)(u.d,{onClickAway:e=>{e.preventDefault(),e.stopPropagation(),E(!1)},children:(0,o.jsx)(f.Z,{...n,timeout:350,children:(0,o.jsxs)(p.Z,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:M.E.lineStep,p:2,border:"0 !important",boxShadow:"0px 8px 16px 0px ".concat(M.E.gray6,", 0px 0px 0px 1px ").concat(M.E.gray6)},children:[(0,o.jsx)(h.Z,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:a.map((e=>{var n,t;return(0,o.jsx)(g.ZP,{disablePadding:!0,children:(0,o.jsxs)(m.Z,{href:e.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:M.E.surfacePrimarySubtitle}},children:[null!==e&&void 0!==e&&null!==(n=e.component)&&void 0!==n&&n.did?(0,o.jsx)(v.Z,{component:"img",src:"".concat(C.Bu,"/blocklet/logo-bundle/").concat(e.component.did),sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):(0,o.jsx)(x.JO,{fontSize:50,icon:e.icon||k,color:M.E.textSubtitle}),(0,o.jsx)(b.Z,{sx:{fontSize:"12px",color:M.E.textBase,textAlign:"center",lineHeight:"normal"},children:(null===(t=e.title)||void 0===t?void 0:t[r])||e.title})]})},e.id)}))}),(0,o.jsx)(A.Z,{session:t,children:(0,o.jsx)(T.Z,{variant:"outlined",fullWidth:!0,href:C.Rt,sx:{mt:1,borderRadius:2,color:M.E.textBase,borderColor:M.E.lineBorderStrong,"&:hover":{color:M.E.primaryBase,borderColor:M.E.primaryBase}},children:"zh"===r?"\u7ba1\u7406":"Manage"})})]})})})}})]}):null}Z.propTypes={session:s().object.isRequired,locale:s().string,size:s().number},Z.defaultProps={locale:"en",size:24};var P=t(30296),E=t(68420),S=t(615),I=t(94457);function O(e){var n,t,r;let{formattedBlocklet:s,addons:c,sessionManagerProps:d}=e;const u=(0,i.useContext)(l.B3),{locale:f}=(0,E.PE)()||{},{enableConnect:p=!0,enableLocale:h=!0}=s,g=!(null===u||void 0===u||null===(n=u.session)||void 0===n||!n.user);let m=(0,I.KN)(null===s||void 0===s||null===(t=s.navigation)||void 0===t?void 0:t.sessionManager,f)||[];m=(0,I.Kb)(m,null===u||void 0===u||null===(r=u.session)||void 0===r||null===(r=r.user)||void 0===r?void 0:r.role);const v=(()=>{if(c&&"function"!==typeof c)return Array.isArray(c)?c:[c];let e=[];if(h&&f&&e.push((0,o.jsx)(P.Z,{showText:!1},"locale-selector")),p&&u){const n=[];if(g){(m?m.slice(0,5):[]).forEach((e=>{n.push({label:e.title,icon:e.icon?(0,o.jsx)("iconify-icon",{icon:e.icon,height:24,style:{marginRight:8}}):null,component:"a",href:e.link,key:e.link})}))}e.push((0,o.jsx)(Z,{session:u.session,locale:f},"session-blocklet")),e.push((0,o.jsx)(a.Z,{session:u.session,locale:f,menu:n,showRole:!0,...d},"session-user"))}return"function"===typeof c&&(e=c(e)||[]),e})();return(0,i.createElement)(o.Fragment,null,...Array.isArray(v)?v:[v])}O.propTypes={formattedBlocklet:s().object.isRequired,addons:s().oneOfType([s().func,s().node]),sessionManagerProps:S.r},O.defaultProps={addons:null,sessionManagerProps:{showRole:!0}}},9498:(e,n,t)=>{t.d(n,{Z:()=>a});var o=t(96266),i=t(55898),r=t.n(i),s=t(47685);const l=(0,s.jG)();function a(e){let{theme:n,children:t}=e;const i=n?(0,s.jG)(n):l;return(0,o.jsx)(s.f6,{theme:i,children:t})}a.propTypes={children:r().any.isRequired,theme:r().object},a.defaultProps={theme:null}},25162:(e,n,t)=>{t.d(n,{x:()=>r});var o=t(5057),i=t(60829);const r=()=>{const e=(0,i.Z)();(0,o.useEffect)((()=>{e.wallet&&t.e(2365).then(t.t.bind(t,72365,23)).then((e=>{e.call||(e=e.default),e.call("arcHideTopBar","{}")})).catch((e=>{console.error("load dsbridge error",e)}))}),[e])}},615:(e,n,t)=>{t.d(n,{r:()=>s,u:()=>r});var o=t(55898),i=t.n(o);const r=i().shape({appLogo:i().node,appName:i().string,theme:i().shape({background:i().string}),enableConnect:i().bool,enableLocale:i().bool,navigation:i().arrayOf(i().shape({title:i().oneOfType([i().string,i().object]),link:i().oneOfType([i().string,i().object]),icon:i().string,items:i().arrayOf(i().shape({title:i().oneOfType([i().string,i().object]),link:i().oneOfType([i().string,i().object])}))}))}),s=i().shape({showText:i().bool,showRole:i().bool,switchDid:i().bool,switchProfile:i().bool,switchPassport:i().bool,disableLogout:i().bool,onLogin:i().func,onLogout:i().func,onSwitchDid:i().func,onSwitchProfile:i().func,onSwitchPassport:i().func,menu:i().array,menuRender:i().func,dark:i().bool,size:i().number})},6504:(e,n,t)=>{t.d(n,{CB:()=>s,Ik:()=>i,RX:()=>a,Xk:()=>l,_J:()=>o,fA:()=>r});const o=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children";return e.map((e=>Array.isArray(e[t])?n({...e,[t]:o(e[t],n,t)}):n(e)))},i=function(e){const n=[];return o(e,(e=>n.push(e)),arguments.length>1&&void 0!==arguments[1]?arguments[1]:"children"),n},r=function(e,n){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"children";return e.map((e=>({...e}))).filter((e=>{const o=e[t];if(Array.isArray(o)){const i=r(o,n,t);e[t]=null!==i&&void 0!==i&&i.length?i:void 0}const i={filteredChildren:e[t],isLeaf:!(null!==o&&void 0!==o&&o.length)};return n(e,i)}))},s=e=>/^https?:\/\//.test(e),l=e=>/^[\w-]+:[\w-]+$/.test(e),a=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(((e,n)=>({path:e,index:n}))).filter((e=>(e=>{if(!e||null===e||void 0===e||!e.startsWith("/"))return!1;const n=e=>e.endsWith("/")?e:"".concat(e,"/"),t=n(window.location.pathname),o=n(new URL(e,window.location.origin).pathname);return t.startsWith(o)})(e.path)));if(null===e||void 0===e||!e.length)return-1;return e.slice(1).reduce(((e,n)=>e.path.length>=n.path.length?e:n),e[0]).index}},49631:(e,n,t)=>{var o=t(56666);const i=Object.freeze({left:0,top:0,width:16,height:16}),r=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),s=Object.freeze({...i,...r}),l=Object.freeze({...s,body:"",hidden:!1}),a=Object.freeze({width:null,height:null}),c=Object.freeze({...a,...r});const d=/[\s,]+/;const u={...c,preserveAspectRatio:""};function f(e){const n={...u},t=(n,t)=>e.getAttribute(n)||t;var o;return n.width=t("width",null),n.height=t("height",null),n.rotate=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const t=e.replace(/^-?[0-9.]*/,"");function o(e){for(;e<0;)e+=4;return e%4}if(""===t){const n=parseInt(e);return isNaN(n)?0:o(n)}if(t!==e){let n=0;switch(t){case"%":n=25;break;case"deg":n=90}if(n){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i/=n,i%1===0?o(i):0)}}return n}(t("rotate","")),o=n,t("flip","").split(d).forEach((e=>{switch(e.trim()){case"horizontal":o.hFlip=!0;break;case"vertical":o.vFlip=!0}})),n.preserveAspectRatio=t("preserveAspectRatio",t("preserveaspectratio","")),n}const p=/^[a-z0-9]+(-[a-z0-9]+)*$/,h=function(e,n,t){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const i=e.split(":");if("@"===e.slice(0,1)){if(i.length<2||i.length>3)return null;o=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const e=i.pop(),t=i.pop(),r={provider:i.length>0?i[0]:o,prefix:t,name:e};return n&&!g(r)?null:r}const r=i[0],s=r.split("-");if(s.length>1){const e={provider:o,prefix:s.shift(),name:s.join("-")};return n&&!g(e)?null:e}if(t&&""===o){const e={provider:o,prefix:"",name:r};return n&&!g(e,t)?null:e}return null},g=(e,n)=>!!e&&!(""!==e.provider&&!e.provider.match(p)||!(n&&""===e.prefix||e.prefix.match(p))||!e.name.match(p));function m(e,n){const t=function(e,n){const t={};!e.hFlip!==!n.hFlip&&(t.hFlip=!0),!e.vFlip!==!n.vFlip&&(t.vFlip=!0);const o=((e.rotate||0)+(n.rotate||0))%4;return o&&(t.rotate=o),t}(e,n);for(const o in l)o in r?o in e&&!(o in t)&&(t[o]=r[o]):o in n?t[o]=n[o]:o in e&&(t[o]=e[o]);return t}function v(e,n,t){const o=e.icons,i=e.aliases||Object.create(null);let r={};function s(e){r=m(o[e]||i[e],r)}return s(n),t.forEach(s),m(e,r)}function b(e,n){const t=[];if("object"!==typeof e||"object"!==typeof e.icons)return t;e.not_found instanceof Array&&e.not_found.forEach((e=>{n(e,null),t.push(e)}));const o=function(e,n){const t=e.icons,o=e.aliases||Object.create(null),i=Object.create(null);return(n||Object.keys(t).concat(Object.keys(o))).forEach((function e(n){if(t[n])return i[n]=[];if(!(n in i)){i[n]=null;const t=o[n]&&o[n].parent,r=t&&e(t);r&&(i[n]=[t].concat(r))}return i[n]})),i}(e);for(const i in o){const r=o[i];r&&(n(i,v(e,i,r)),t.push(i))}return t}const x={provider:"",aliases:{},not_found:{},...i};function y(e,n){for(const t in n)if(t in e&&typeof e[t]!==typeof n[t])return!1;return!0}function k(e){if("object"!==typeof e||null===e)return null;const n=e;if("string"!==typeof n.prefix||!e.icons||"object"!==typeof e.icons)return null;if(!y(e,x))return null;const t=n.icons;for(const i in t){const e=t[i];if(!i.match(p)||"string"!==typeof e.body||!y(e,l))return null}const o=n.aliases||Object.create(null);for(const i in o){const e=o[i],n=e.parent;if(!i.match(p)||"string"!==typeof n||!t[n]&&!o[n]||!y(e,l))return null}return n}const w=Object.create(null);function j(e,n){const t=w[e]||(w[e]=Object.create(null));return t[n]||(t[n]=function(e,n){return{provider:e,prefix:n,icons:Object.create(null),missing:new Set}}(e,n))}function T(e,n){return k(n)?b(n,((n,t)=>{t?e.icons[n]=t:e.missing.add(n)})):[]}function M(e,n){let t=[];return("string"===typeof e?[e]:Object.keys(w)).forEach((e=>{("string"===typeof e&&"string"===typeof n?[n]:Object.keys(w[e]||{})).forEach((n=>{const o=j(e,n);t=t.concat(Object.keys(o.icons).map((t=>(""!==e?"@"+e+":":"")+n+":"+t)))}))})),t}let C=!1;function A(e){return"boolean"===typeof e&&(C=e),C}function Z(e){const n="string"===typeof e?h(e,!0,C):e;if(n){const e=j(n.provider,n.prefix),t=n.name;return e.icons[t]||(e.missing.has(t)?null:void 0)}}function P(e,n){const t=h(e,!0,C);if(!t)return!1;return function(e,n,t){try{if("string"===typeof t.body)return e.icons[n]={...t},!0}catch(o){}return!1}(j(t.provider,t.prefix),t.name,n)}function E(e,n){if("object"!==typeof e)return!1;if("string"!==typeof n&&(n=e.provider||""),C&&!n&&!e.prefix){let n=!1;return k(e)&&(e.prefix="",b(e,((e,t)=>{t&&P(e,t)&&(n=!0)}))),n}const t=e.prefix;if(!g({provider:n,prefix:t,name:"a"}))return!1;return!!T(j(n,t),e)}function S(e){return!!Z(e)}function I(e){const n=Z(e);return n?{...s,...n}:null}function O(e,n){e.forEach((e=>{const t=e.loaderCallbacks;t&&(e.loaderCallbacks=t.filter((e=>e.id!==n)))}))}let N=0;const z=Object.create(null);function R(e,n){z[e]=n}function _(e){return z[e]||z[""]}var L={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function q(e,n,t,o){const i=e.resources.length,r=e.random?Math.floor(Math.random()*i):e.index;let s;if(e.random){let n=e.resources.slice(0);for(s=[];n.length>1;){const e=Math.floor(Math.random()*n.length);s.push(n[e]),n=n.slice(0,e).concat(n.slice(e+1))}s=s.concat(n)}else s=e.resources.slice(r).concat(e.resources.slice(0,r));const l=Date.now();let a,c="pending",d=0,u=null,f=[],p=[];function h(){u&&(clearTimeout(u),u=null)}function g(){"pending"===c&&(c="aborted"),h(),f.forEach((e=>{"pending"===e.status&&(e.status="aborted")})),f=[]}function m(e,n){n&&(p=[]),"function"===typeof e&&p.push(e)}function v(){c="failed",p.forEach((e=>{e(void 0,a)}))}function b(){f.forEach((e=>{"pending"===e.status&&(e.status="aborted")})),f=[]}function x(){if("pending"!==c)return;h();const o=s.shift();if(void 0===o)return f.length?void(u=setTimeout((()=>{h(),"pending"===c&&(b(),v())}),e.timeout)):void v();const i={status:"pending",resource:o,callback:(n,t)=>{!function(n,t,o){const i="success"!==t;switch(f=f.filter((e=>e!==n)),c){case"pending":break;case"failed":if(i||!e.dataAfterTimeout)return;break;default:return}if("abort"===t)return a=o,void v();if(i)return a=o,void(f.length||(s.length?x():v()));if(h(),b(),!e.random){const t=e.resources.indexOf(n.resource);-1!==t&&t!==e.index&&(e.index=t)}c="completed",p.forEach((e=>{e(o)}))}(i,n,t)}};f.push(i),d++,u=setTimeout(x,e.rotate),t(o,n,i.callback)}return"function"===typeof o&&p.push(o),setTimeout(x),function(){return{startTime:l,payload:n,status:c,queriesSent:d,queriesPending:f.length,subscribe:m,abort:g}}}function F(e){const n={...L,...e};let t=[];function o(){t=t.filter((e=>"pending"===e().status))}return{query:function(e,i,r){const s=q(n,e,i,((e,n)=>{o(),r&&r(e,n)}));return t.push(s),s},find:function(e){return t.find((n=>e(n)))||null},setIndex:e=>{n.index=e},getIndex:()=>n.index,cleanup:o}}function H(e){let n;if("string"===typeof e.resources)n=[e.resources];else if(n=e.resources,!(n instanceof Array)||!n.length)return null;return{resources:n,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:!0===e.random,index:e.index||0,dataAfterTimeout:!1!==e.dataAfterTimeout}}const U=Object.create(null),B=["https://api.simplesvg.com","https://api.unisvg.com"],D=[];for(;B.length>0;)1===B.length||Math.random()>.5?D.push(B.shift()):D.push(B.pop());function J(e,n){const t=H(n);return null!==t&&(U[e]=t,!0)}function $(e){return U[e]}function K(){return Object.keys(U)}function Q(){}U[""]=H({resources:["https://api.iconify.design"].concat(D)});const W=Object.create(null);function X(e,n,t){let o,i;if("string"===typeof e){const n=_(e);if(!n)return t(void 0,424),Q;i=n.send;const r=function(e){if(!W[e]){const n=$(e);if(!n)return;const t={config:n,redundancy:F(n)};W[e]=t}return W[e]}(e);r&&(o=r.redundancy)}else{const n=H(e);if(n){o=F(n);const t=_(e.resources?e.resources[0]:"");t&&(i=t.send)}}return o&&i?o.query(n,i,t)().abort:(t(void 0,424),Q)}const V="iconify2",G="iconify",Y=G+"-count",ee=G+"-version",ne=36e5,te=168;function oe(e,n){try{return e.getItem(n)}catch(t){}}function ie(e,n,t){try{return e.setItem(n,t),!0}catch(o){}}function re(e,n){try{e.removeItem(n)}catch(t){}}function se(e,n){return ie(e,Y,n.toString())}function le(e){return parseInt(oe(e,Y))||0}const ae={local:!0,session:!0},ce={local:new Set,session:new Set};let de=!1;let ue="undefined"===typeof window?{}:window;function fe(e){const n=e+"Storage";try{if(ue&&ue[n]&&"number"===typeof ue[n].length)return ue[n]}catch(t){}ae[e]=!1}function pe(e,n){const t=fe(e);if(!t)return;const o=oe(t,ee);if(o!==V){if(o){const e=le(t);for(let n=0;n<e;n++)re(t,G+n.toString())}return ie(t,ee,V),void se(t,0)}const i=Math.floor(Date.now()/ne)-te,r=e=>{const o=G+e.toString(),r=oe(t,o);if("string"===typeof r){try{const t=JSON.parse(r);if("object"===typeof t&&"number"===typeof t.cached&&t.cached>i&&"string"===typeof t.provider&&"object"===typeof t.data&&"string"===typeof t.data.prefix&&n(t,e))return!0}catch(s){}re(t,o)}};let s=le(t);for(let l=s-1;l>=0;l--)r(l)||(l===s-1?(s--,se(t,s)):ce[e].add(l))}function he(){if(!de){de=!0;for(const e in ae)pe(e,(e=>{const n=e.data,t=j(e.provider,n.prefix);if(!T(t,n).length)return!1;const o=n.lastModified||-1;return t.lastModifiedCached=t.lastModifiedCached?Math.min(t.lastModifiedCached,o):o,!0}))}}function ge(e,n){function t(t){let o;if(!ae[t]||!(o=fe(t)))return;const i=ce[t];let r;if(i.size)i.delete(r=Array.from(i).shift());else if(r=le(o),!se(o,r+1))return;const s={cached:Math.floor(Date.now()/ne),provider:e.provider,data:n};return ie(o,G+r.toString(),JSON.stringify(s))}de||he(),n.lastModified&&!function(e,n){const t=e.lastModifiedCached;if(t&&t>=n)return t===n;if(e.lastModifiedCached=n,t)for(const o in ae)pe(o,(t=>{const o=t.data;return t.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===n}));return!0}(e,n.lastModified)||Object.keys(n.icons).length&&(n.not_found&&delete(n=Object.assign({},n)).not_found,t("local")||t("session"))}function me(){}function ve(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout((()=>{e.iconsLoaderFlag=!1,function(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout((()=>{e.pendingCallbacksFlag=!1;const n=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!n.length)return;let t=!1;const o=e.provider,i=e.prefix;n.forEach((n=>{const r=n.icons,s=r.pending.length;r.pending=r.pending.filter((n=>{if(n.prefix!==i)return!0;const s=n.name;if(e.icons[s])r.loaded.push({provider:o,prefix:i,name:s});else{if(!e.missing.has(s))return t=!0,!0;r.missing.push({provider:o,prefix:i,name:s})}return!1})),r.pending.length!==s&&(t||O([e],n.id),n.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),n.abort))}))})))}(e)})))}const be=(e,n)=>{const t=function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];return e.forEach((e=>{const i="string"===typeof e?h(e,n,t):e;i&&o.push(i)})),o}(e,!0,A()),o=function(e){const n={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort(((e,n)=>e.provider!==n.provider?e.provider.localeCompare(n.provider):e.prefix!==n.prefix?e.prefix.localeCompare(n.prefix):e.name.localeCompare(n.name)));let o={provider:"",prefix:"",name:""};return e.forEach((e=>{if(o.name===e.name&&o.prefix===e.prefix&&o.provider===e.provider)return;o=e;const i=e.provider,r=e.prefix,s=e.name,l=t[i]||(t[i]=Object.create(null)),a=l[r]||(l[r]=j(i,r));let c;c=s in a.icons?n.loaded:""===r||a.missing.has(s)?n.missing:n.pending;const d={provider:i,prefix:r,name:s};c.push(d)})),n}(t);if(!o.pending.length){let e=!0;return n&&setTimeout((()=>{e&&n(o.loaded,o.missing,o.pending,me)})),()=>{e=!1}}const i=Object.create(null),r=[];let s,l;return o.pending.forEach((e=>{const{provider:n,prefix:t}=e;if(t===l&&n===s)return;s=n,l=t,r.push(j(n,t));const o=i[n]||(i[n]=Object.create(null));o[t]||(o[t]=[])})),o.pending.forEach((e=>{const{provider:n,prefix:t,name:o}=e,r=j(n,t),s=r.pendingIcons||(r.pendingIcons=new Set);s.has(o)||(s.add(o),i[n][t].push(o))})),r.forEach((e=>{const{provider:n,prefix:t}=e;i[n][t].length&&function(e,n){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(n).sort():e.iconsToLoad=n,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout((()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:t}=e,o=e.iconsToLoad;let i;delete e.iconsToLoad,o&&(i=_(n))&&i.prepare(n,t,o).forEach((t=>{X(n,t,(n=>{if("object"!==typeof n)t.icons.forEach((n=>{e.missing.add(n)}));else try{const t=T(e,n);if(!t.length)return;const o=e.pendingIcons;o&&t.forEach((e=>{o.delete(e)})),ge(e,n)}catch(o){console.error(o)}ve(e)}))}))})))}(e,i[n][t])})),n?function(e,n,t){const o=N++,i=O.bind(null,t,o);if(!n.pending.length)return i;const r={id:o,icons:n,callback:e,abort:i};return t.forEach((e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(r)})),i}(n,o,r):me},xe=e=>new Promise(((n,t)=>{const o="string"===typeof e?h(e,!0):e;o?be([o||e],(i=>{if(i.length&&o){const e=Z(o);if(e)return void n({...s,...e})}t(e)})):t(e)}));function ye(e,n){const t="string"===typeof e?h(e,!0,!0):null;if(!t){const n=function(e){try{const n="string"===typeof e?JSON.parse(e):e;if("string"===typeof n.body)return{...n}}catch(n){}}(e);return{value:e,data:n}}const o=Z(t);if(void 0!==o||!t.prefix)return{value:e,name:t,data:o};const i=be([t],(()=>n(e,t,Z(t))));return{value:e,name:t,loading:i}}function ke(e){return e.hasAttribute("inline")}let we=!1;try{we=0===navigator.vendor.indexOf("Apple")}catch(cn){}const je=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Te=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Me(e,n,t){if(1===n)return e;if(t=t||100,"number"===typeof e)return Math.ceil(e*n*t)/t;if("string"!==typeof e)return e;const o=e.split(je);if(null===o||!o.length)return e;const i=[];let r=o.shift(),s=Te.test(r);for(;;){if(s){const e=parseFloat(r);isNaN(e)?i.push(r):i.push(Math.ceil(e*n*t)/t)}else i.push(r);if(r=o.shift(),void 0===r)return i.join("");s=!s}}const Ce=e=>"unset"===e||"undefined"===e||"none"===e;function Ae(e,n){const t={...s,...e},o={...c,...n},i={left:t.left,top:t.top,width:t.width,height:t.height};let r=t.body;[t,o].forEach((e=>{const n=[],t=e.hFlip,o=e.vFlip;let s,l=e.rotate;switch(t?o?l+=2:(n.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),n.push("scale(-1 1)"),i.top=i.left=0):o&&(n.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),n.push("scale(1 -1)"),i.top=i.left=0),l<0&&(l-=4*Math.floor(l/4)),l%=4,l){case 1:s=i.height/2+i.top,n.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:n.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:s=i.width/2+i.left,n.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}l%2===1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),n.length&&(r='<g transform="'+n.join(" ")+'">'+r+"</g>")}));const l=o.width,a=o.height,d=i.width,u=i.height;let f,p;null===l?(p=null===a?"1em":"auto"===a?u:a,f=Me(p,d/u)):(f="auto"===l?d:l,p=null===a?Me(f,u/d):"auto"===a?u:a);const h={},g=(e,n)=>{Ce(n)||(h[e]=n.toString())};return g("width",f),g("height",p),h.viewBox=i.left.toString()+" "+i.top.toString()+" "+d.toString()+" "+u.toString(),{attributes:h,body:r}}let Ze=(()=>{let e;try{if(e=fetch,"function"===typeof e)return e}catch(cn){}})();function Pe(e){Ze=e}function Ee(){return Ze}const Se={prepare:(e,n,t)=>{const o=[],i=function(e,n){const t=$(e);if(!t)return 0;let o;if(t.maxURL){let e=0;t.resources.forEach((n=>{const t=n;e=Math.max(e,t.length)}));const i=n+".json?icons=";o=t.maxURL-e-t.path.length-i.length}else o=0;return o}(e,n),r="icons";let s={type:r,provider:e,prefix:n,icons:[]},l=0;return t.forEach(((t,a)=>{l+=t.length+1,l>=i&&a>0&&(o.push(s),s={type:r,provider:e,prefix:n,icons:[]},l=t.length),s.icons.push(t)})),o.push(s),o},send:(e,n,t)=>{if(!Ze)return void t("abort",424);let o=function(e){if("string"===typeof e){const n=$(e);if(n)return n.path}return"/"}(n.provider);switch(n.type){case"icons":{const e=n.prefix,t=n.icons.join(",");o+=e+".json?"+new URLSearchParams({icons:t}).toString();break}case"custom":{const e=n.uri;o+="/"===e.slice(0,1)?e.slice(1):e;break}default:return void t("abort",400)}let i=503;Ze(e+o).then((e=>{const n=e.status;if(200===n)return i=501,e.json();setTimeout((()=>{t(function(e){return 404===e}(n)?"abort":"next",n)}))})).then((e=>{"object"===typeof e&&null!==e?setTimeout((()=>{t("success",e)})):setTimeout((()=>{404===e?t("abort",e):t("next",i)}))})).catch((()=>{t("next",i)}))}};function Ie(e,n){switch(e){case"local":case"session":ae[e]=n;break;case"all":for(const e in ae)ae[e]=n}}const Oe="data-style";let Ne="";function ze(e){Ne=e}function Re(e,n){let t=Array.from(e.childNodes).find((e=>e.hasAttribute&&e.hasAttribute(Oe)));t||(t=document.createElement("style"),t.setAttribute(Oe,Oe),e.appendChild(t)),t.textContent=":host{display:inline-block;vertical-align:"+(n?"-0.125em":"0")+"}span,svg{display:block}"+Ne}function _e(){let e;R("",Se),A(!0);try{e=window}catch(cn){}if(e){if(he(),void 0!==e.IconifyPreload){const n=e.IconifyPreload,t="Invalid IconifyPreload syntax.";"object"===typeof n&&null!==n&&(n instanceof Array?n:[n]).forEach((e=>{try{("object"!==typeof e||null===e||e instanceof Array||"object"!==typeof e.icons||"string"!==typeof e.prefix||!E(e))&&console.error(t)}catch(n){console.error(t)}}))}if(void 0!==e.IconifyProviders){const t=e.IconifyProviders;if("object"===typeof t&&null!==t)for(const e in t){const o="IconifyProviders["+e+"] is invalid.";try{const n=t[e];if("object"!==typeof n||!n||void 0===n.resources)continue;J(e,n)||console.error(o)}catch(n){console.error(o)}}}}return{enableCache:e=>Ie(e,!0),disableCache:e=>Ie(e,!1),iconExists:S,getIcon:I,listIcons:M,addIcon:P,addCollection:E,calculateSize:Me,buildIcon:Ae,loadIcons:be,loadIcon:xe,addAPIProvider:J,appendCustomStyle:ze,_api:{getAPIConfig:$,setAPIModule:R,sendAPIQuery:X,setFetch:Pe,getFetch:Ee,listAPIProviders:K}}}function Le(e,n){let t=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in n)t+=" "+o+'="'+n[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}const qe={"background-color":"currentColor"},Fe={"background-color":"transparent"},He={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Ue={"-webkit-mask":qe,mask:qe,background:Fe};for(const dn in Ue){const e=Ue[dn];for(const n in He)e[dn+"-"+n]=He[n]}function Be(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}let De;function Je(e){return void 0===De&&function(){try{De=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch(cn){De=null}}(),De?De.createHTML(e):e}function $e(e,n){const t=n.icon.data,o=n.customisations,i=Ae(t,o);o.preserveAspectRatio&&(i.attributes.preserveAspectRatio=o.preserveAspectRatio);const r=n.renderedMode;let l;if("svg"===r)l=function(e){const n=document.createElement("span"),t=e.attributes;let o="";t.width||(o="width: inherit;"),t.height||(o+="height: inherit;"),o&&(t.style=o);const i=Le(e.body,t);return n.innerHTML=Je(i),n.firstChild}(i);else l=function(e,n,t){const o=document.createElement("span");let i=e.body;-1!==i.indexOf("<a")&&(i+="\x3c!-- "+Date.now()+" --\x3e");const r=e.attributes,s='url("'+(c=Le(i,{...r,width:n.width+"",height:n.height+""}),"data:image/svg+xml,"+function(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(c)+'")'),l=o.style,a={"--svg":s,width:Be(r.width),height:Be(r.height),...t?qe:Fe};var c;for(const d in a)l.setProperty(d,a[d]);return o}(i,{...s,...t},"mask"===r);const a=Array.from(e.childNodes).find((e=>{const n=e.tagName&&e.tagName.toUpperCase();return"SPAN"===n||"SVG"===n}));a?"SPAN"===l.tagName&&a.tagName===l.tagName?a.setAttribute("style",l.getAttribute("style")):e.replaceChild(l,a):e.appendChild(l)}function Ke(e,n,t){return{rendered:!1,inline:n,icon:e,lastRender:t&&(t.rendered?t:t.lastRender)}}const Qe=function(){let e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"iconify-icon";try{e=window.customElements,n=window.HTMLElement}catch(cn){return}if(!e||!n)return;const i=e.get(t);if(i)return i;const r=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super(),(0,o.Z)(this,"_shadowRoot",void 0),(0,o.Z)(this,"_state",void 0),(0,o.Z)(this,"_checkQueued",!1);const e=this._shadowRoot=this.attachShadow({mode:"open"}),n=ke(this);Re(e,n),this._state=Ke({value:""},n),this._queueCheck()}static get observedAttributes(){return r.slice(0)}attributeChangedCallback(e){if("inline"===e){const e=ke(this),n=this._state;e!==n.inline&&(n.inline=e,Re(this._shadowRoot,e))}else this._queueCheck()}get icon(){const e=this.getAttribute("icon");if(e&&"{"===e.slice(0,1))try{return JSON.parse(e)}catch(cn){}return e}set icon(e){"object"===typeof e&&(e=JSON.stringify(e)),this.setAttribute("icon",e)}get inline(){return ke(this)}set inline(e){e?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const e=this._state;if(e.rendered){const n=this._shadowRoot;if("svg"===e.renderedMode)try{return void n.lastChild.setCurrentTime(0)}catch(cn){}$e(n,e)}}get status(){const e=this._state;return e.rendered?"rendered":null===e.icon.data?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout((()=>{this._check()})))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const e=this._state,n=this.getAttribute("icon");if(n!==e.icon.value)return void this._iconChanged(n);if(!e.rendered)return;const t=this.getAttribute("mode"),o=f(this);(e.attrMode!==t||function(e,n){for(const t in u)if(e[t]!==n[t])return!0;return!1}(e.customisations,o))&&this._renderIcon(e.icon,o,t)}_iconChanged(e){const n=ye(e,((e,n,t)=>{const o=this._state;if(o.rendered||this.getAttribute("icon")!==e)return;const i={value:e,name:n,data:t};i.data?this._gotIconData(i):o.icon=i}));n.data?this._gotIconData(n):this._state=Ke(n,this._state.inline,this._state)}_gotIconData(e){this._checkQueued=!1,this._renderIcon(e,f(this),this.getAttribute("mode"))}_renderIcon(e,n,t){const o=function(e,n){switch(n){case"svg":case"bg":case"mask":return n}return"style"===n||!we&&-1!==e.indexOf("<a")?-1===e.indexOf("currentColor")?"bg":"mask":"svg"}(e.data.body,t),i=this._state.inline;$e(this._shadowRoot,this._state={rendered:!0,icon:e,inline:i,customisations:n,attrMode:t,renderedMode:o})}};r.forEach((e=>{e in s.prototype||Object.defineProperty(s.prototype,e,{get:function(){return this.getAttribute(e)},set:function(n){null!==n?this.setAttribute(e,n):this.removeAttribute(e)}})}));const l=_e();for(const o in l)s[o]=s.prototype[o]=l[o];return e.define(t,s),s}()||_e(),{enableCache:We,disableCache:Xe,iconExists:Ve,getIcon:Ge,listIcons:Ye,addIcon:en,addCollection:nn,calculateSize:tn,buildIcon:on,loadIcons:rn,loadIcon:sn,addAPIProvider:ln,_api:an}=Qe}}]);