@abtnode/blocklet-services 1.16.24-beta-a02d4e5e → 1.16.24-beta-6975c2c0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.js +1 -1
- package/api/libs/image.js +0 -5
- package/api/middlewares/check-user.js +16 -0
- package/api/routes/user-session.js +16 -11
- package/api/routes/user.js +28 -13
- package/api/services/auth/index.js +2 -0
- package/api/services/auth/session.js +11 -13
- package/api/util/attach-shared-utils.js +13 -1
- package/dist/assets/{Add-vTyteaJS.js → Add-LZzKWXXy.js} +1 -1
- package/dist/assets/{Avatar--wC9mrh2.js → Avatar-Baciq3Gb.js} +1 -1
- package/dist/assets/Box-pk1M-Oil.js +1 -0
- package/dist/assets/Box-u-ODEgip.js +1 -0
- package/dist/assets/{Button-ykwLiZ2J.js → Button-ksk2xAo5.js} +1 -1
- package/dist/assets/{ButtonBase-2j16Oank.js → ButtonBase-3WX-0uPh.js} +2 -2
- package/dist/assets/{ButtonBase-gKUGc3Zq.js → ButtonBase-eCeq6que.js} +2 -2
- package/dist/assets/{CardContent-S7jGYoZi.js → CardContent-zbNE3idr.js} +1 -1
- package/dist/assets/{CheckCircle-MSun7-U0.js → CheckCircle-9GjxYqfj.js} +1 -1
- package/dist/assets/{ChevronLeft-OJEtYKJw.js → ChevronLeft-gU1yt1Nn.js} +1 -1
- package/dist/assets/{ChevronRight-Az5bXFdS.js → ChevronRight-Yg0zM5nt.js} +1 -1
- package/dist/assets/{Chip-2zwjZf99.js → Chip-6PPjABEd.js} +1 -1
- package/dist/assets/{CircularProgress-oRghdnB7.js → CircularProgress-pXmKMTH_.js} +5 -5
- package/dist/assets/{Close-UpPcWosj.js → Close-wymOh8kk.js} +1 -1
- package/dist/assets/{Collapse-9G0XJCS4.js → Collapse-W3NIbLgW.js} +1 -1
- package/dist/assets/{DeleteOutline-oDxVTiXQ.js → DeleteOutline-zFvS1LGy.js} +1 -1
- package/dist/assets/{Done-lDz0AHuP.js → Done-K8_gQlru.js} +1 -1
- package/dist/assets/{Download-DZZUg84i.js → Download-py3GqphB.js} +1 -1
- package/dist/assets/{Edit-xGXK3CYT.js → Edit-kxRFennS.js} +1 -1
- package/dist/assets/{EditIcon-vSawnu2L.js → EditIcon-Gr2bDkBf.js} +1 -1
- package/dist/assets/{ExpandMore-sVVVrdQE.js → ExpandMore-VMoMsmx1.js} +1 -1
- package/dist/assets/{ExpandMore-HZFmUR-a.js → ExpandMore-pFpXkiFR.js} +1 -1
- package/dist/assets/{FilterList-cxHEtz0G.js → FilterList-e69RUJ5n.js} +4 -4
- package/dist/assets/{FormControlLabel-rf6UEluy.js → FormControlLabel-pf-ht9cT.js} +1 -1
- package/dist/assets/{Google-VMrSS3LU.js → Google-9ciNW83T.js} +1 -1
- package/dist/assets/{Grid-hq_HvwNl.js → Grid-JBhKrAyG.js} +1 -1
- package/dist/assets/{Grid-wusqObpv.js → Grid-UReKTwF7.js} +1 -1
- package/dist/assets/{Hidden-GZpNG8Fn.js → Hidden--Wmecvjh.js} +1 -1
- package/dist/assets/{IconButton-SWdwxRXE.js → IconButton--4ebnuOv.js} +1 -1
- package/dist/assets/{IconButton-pbUOyNxq.js → IconButton-Hymrjowh.js} +3 -3
- package/dist/assets/{InfoOutlined-fmfPbKBr.js → InfoOutlined-J39GTyuO.js} +1 -1
- package/dist/assets/{InputAdornment-cytNeut4.js → InputAdornment-0_yl6sI6.js} +1 -1
- package/dist/assets/{InputAdornment-J9SNlDlG.js → InputAdornment-9NWrCzP7.js} +1 -1
- package/dist/assets/{InputLabel-5ZGbi6bW.js → InputLabel-UuNChdMG.js} +1 -1
- package/dist/assets/{Launch-wH2P5XtF.js → Launch-qQoThtkn.js} +1 -1
- package/dist/assets/{Link-hD326Lst.js → Link-7oZWP_va.js} +1 -1
- package/dist/assets/{Link-dqV63oGM.js → Link-nn9uQu2x.js} +1 -1
- package/dist/assets/{ListItem-zpF9vl3-.js → ListItem-b-zhB4qt.js} +1 -1
- package/dist/assets/{ListItemText-AE7V4fm6.js → ListItemText-6EpzrGrb.js} +1 -1
- package/dist/assets/{LockIcon-RX4ACPLP.js → LockIcon-SHr10qIF.js} +1 -1
- package/dist/assets/{Loop-J3Oc551N.js → Loop-m9AuMRVm.js} +1 -1
- package/dist/assets/{Menu-R2sJfNVQ.js → Menu--qKA-oiM.js} +1 -1
- package/dist/assets/{OpenInNew-ey9Zce1G.js → OpenInNew-qIHDFu6m.js} +1 -1
- package/dist/assets/{Pagination-_AyYmu3K.js → Pagination-GGaAT7Jg.js} +1 -1
- package/dist/assets/{Paper-xnFdFhSU.js → Paper-9-yE_Fq6.js} +1 -1
- package/dist/assets/{RevokeIcon-hUSUDMyp.js → RevokeIcon-7XrjjVSK.js} +1 -1
- package/dist/assets/{Search-iJmoubNh.js → Search-GOPXDEZu.js} +1 -1
- package/dist/assets/{Search-I_yS6r69.js → Search-I57MA0Fi.js} +1 -1
- package/dist/assets/{Select-M73NW8co.js → Select-Ln30z3qd.js} +2 -2
- package/dist/assets/{ServerLogo-DO0zCcXJ.js → ServerLogo-POzsrdUg.js} +1 -1
- package/dist/assets/{Skeleton-si3pCQpt.js → Skeleton-2DXho7pp.js} +2 -2
- package/dist/assets/{Stepper-JspwoyL9.js → Stepper-j6t0JGTF.js} +1 -1
- package/dist/assets/{TextField-LQ_MEBEr.js → TextField-N3NhCmTv.js} +1 -1
- package/dist/assets/{TextField-t2Fc5ZKP.js → TextField-_f9Ib2t7.js} +2 -2
- package/dist/assets/{Toolbar-yNKPFPYf.js → Toolbar-xnBXinKK.js} +1 -1
- package/dist/assets/{Tooltip-POCM6iwG.js → Tooltip-TWKOxaq7.js} +1 -1
- package/dist/assets/{Typography-KrY_5iS6.js → Typography-TOd_XEr_.js} +1 -1
- package/dist/assets/{access-control-QBAuY9yE.js → access-control-VMmmRIQn.js} +1 -1
- package/dist/assets/{actions-O61MEW97.js → actions-zyudYoXY.js} +1 -1
- package/dist/assets/{add-component-core-NQjGVKRe.js → add-component-core-GG7onb-_.js} +33 -33
- package/dist/assets/add-resource-IzJ7fbHT.js +1 -0
- package/dist/assets/{addon-TQ0rCH75.js → addon-2m04sAeO.js} +1 -1
- package/dist/assets/{analytics-8oJDRxnh.js → analytics-6sk6ntLy.js} +1 -1
- package/dist/assets/api-OlKdBFAs.js +1 -0
- package/dist/assets/{audit-logs-DUiSrbgt.js → audit-logs-XnK8gOWW.js} +1 -1
- package/dist/assets/{button-uIqGychf.js → button-87w_Ukx4.js} +1 -1
- package/dist/assets/{click-to-copy-Stqj3s2e.js → click-to-copy-gbegHTVT.js} +1 -1
- package/dist/assets/{complete-FTJGD-1N.js → complete-hKHPi0ol.js} +1 -1
- package/dist/assets/{component-EZRyGvJZ.js → component-CKYpWN4a.js} +1 -1
- package/dist/assets/{config-1heXK7PJ.js → config-OeQZdSSi.js} +1 -1
- package/dist/assets/{config-navigation-fn_fGXvZ.js → config-navigation-i-EE6_kv.js} +1 -1
- package/dist/assets/{config-space-un0A86az.js → config-space-289vg8HP.js} +3 -3
- package/dist/assets/{config-VPh3sxvn.js → config-wYXMJIoJ.js} +1 -1
- package/dist/assets/{confirm-NdF0-vLf.js → confirm-eEb_5W3C.js} +1 -1
- package/dist/assets/{connect-eXeZUYKc.js → connect-FedFWzi2.js} +1 -1
- package/dist/assets/{connect-bUr2fIui.js → connect-IHJhS1ef.js} +1 -1
- package/dist/assets/{connect-to-jN6NfPLE.js → connect-to-rEv_VtJG.js} +2 -2
- package/dist/assets/{content-layout-xv7efLhO.js → content-layout-hErMCLwN.js} +1 -1
- package/dist/assets/{createStack-X06a2NYY.js → createStack-CHluQGvB.js} +1 -1
- package/dist/assets/{createSvgIcon-WGsmTjmI.js → createSvgIcon-OvER3e1n.js} +1 -1
- package/dist/assets/{createSvgIcon-V91OChAf.js → createSvgIcon-SJR__BRH.js} +1 -1
- package/dist/assets/{dashboard--flHRbxA.js → dashboard-mz_3k3VV.js} +3 -3
- package/dist/assets/{did-address-MOXaSOmL.js → did-address-ZCUuM3p7.js} +1 -1
- package/dist/assets/{domain-GsJNX7Pl.js → domain-Q3LSUI-8.js} +1 -1
- package/dist/assets/{domain-list-U7SAJAPI.js → domain-list-yV996gjl.js} +2 -2
- package/dist/assets/{exchange-passport-__egRbif.js → exchange-passport-wc7qEw91.js} +1 -1
- package/dist/assets/{fallback-JR1UKYrN.js → fallback-Xv-L7Mks.js} +1 -1
- package/dist/assets/{fuel-B07m2J73.js → fuel-RGXWDQtq.js} +1 -1
- package/dist/assets/{fullpage-WwvQZMup.js → fullpage-71A-yQFH.js} +1 -1
- package/dist/assets/home-eLiYj1ha.js +1 -0
- package/dist/assets/{iframe-QRp9-qFU.js → iframe-4nyWXcTE.js} +1 -1
- package/dist/assets/{index-iPbuZCut.js → index--v_SJzgf.js} +1 -1
- package/dist/assets/{index-LpR2xL_I.js → index-067nd4Au.js} +1 -1
- package/dist/assets/{index-R9oRnky0.js → index-1CtoAYuN.js} +1 -1
- package/dist/assets/{index-AaoUHVVG.js → index-7TBJ1kJc.js} +2 -2
- package/dist/assets/{index-LTzQUJ4f.js → index-APK4pG1u.js} +1 -1
- package/dist/assets/{index-JA9h4YXr.js → index-AfOBr6AB.js} +1 -1
- package/dist/assets/index-AtawSjHz.js +57 -0
- package/dist/assets/{index-fJ0BL_e2.js → index-CAJT68WX.js} +1 -1
- package/dist/assets/index-CzCGz7a7.js +1 -0
- package/dist/assets/{index-rKkwz9HV.js → index-DVdEsdn8.js} +1 -1
- package/dist/assets/{index-dEUBD3Ek.js → index-DxfEAFvP.js} +1 -1
- package/dist/assets/{index-nec3CBP4.js → index-Kxa_ePD2.js} +1 -1
- package/dist/assets/{index-xF6Zrp48.js → index-L_N419JN.js} +1 -1
- package/dist/assets/{index-uucW8lyA.js → index-Lb1ehBCY.js} +137 -137
- package/dist/assets/{index-wM_dFbiP.js → index-M6Qe-jI_.js} +1 -1
- package/dist/assets/{index-qJop2tcw.js → index-N2Ezp28q.js} +1 -1
- package/dist/assets/{index-mxv-cWe1.js → index-Qj5J1wHh.js} +5 -5
- package/dist/assets/{index-0Pkf3xUv.js → index-Qm2-r4K_.js} +1 -1
- package/dist/assets/{index-7Vx2WCKR.js → index-SJgBi99q.js} +1 -1
- package/dist/assets/{index-OP9njHuS.js → index-Yk_Xni0x.js} +1 -1
- package/dist/assets/{index-nugxBGaB.js → index-_FFFPAUw.js} +1 -1
- package/dist/assets/{index-5q2qBS2A.js → index-aYnPjJkB.js} +1 -1
- package/dist/assets/index-fjKBcmH5.js +1 -0
- package/dist/assets/{index-xvy96ScB.js → index-h0sgaNFg.js} +3 -3
- package/dist/assets/{index-jXu4Dpk_.js → index-hVryq7Sp.js} +1 -1
- package/dist/assets/{index-MQ5sCiv0.js → index-kDsXFd69.js} +1 -1
- package/dist/assets/{index-S9D-ycna.js → index-kwL0I4Wk.js} +6 -6
- package/dist/assets/{index-rLUXQvhq.js → index-l0N5TN7m.js} +9 -9
- package/dist/assets/{index-SAJDoXAy.js → index-sq_uK9Ea.js} +3 -3
- package/dist/assets/{index-1Jk_G-9Y.js → index-utNtlSrF.js} +1 -1
- package/dist/assets/{index-IwH7C-Ko.js → index-xEfydoyO.js} +1 -1
- package/dist/assets/{index.es-z1twp67m.js → index.es-Gd_7EjLV.js} +2 -2
- package/dist/assets/{index.esm-aWTu2T01.js → index.esm-13cF7kZn.js} +1 -1
- package/dist/assets/{invitation-XLGa-pmm.js → invitation-ATSj-mdg.js} +1 -1
- package/dist/assets/{invite-cKqEzS2M.js → invite-8fJRRJDU.js} +1 -1
- package/dist/assets/{issue-passport-ILQvH9s3.js → issue-passport-ALJ4LERP.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-UoBHPEWO.js → jss-plugin-props-sort.esm-4Jo3IMMB.js} +1 -1
- package/dist/assets/{launch-result-message-9HKjtLws.js → launch-result-message-2Tk7smd-.js} +1 -1
- package/dist/assets/{layout-L6_gNEgb.js → layout-t8AuT3eZ.js} +1 -1
- package/dist/assets/{list-header-0W-lcNEo.js → list-header-wXDG5LBO.js} +1 -1
- package/dist/assets/{listItemButtonClasses-NYOJixt3.js → listItemButtonClasses-Ae_e1-No.js} +1 -1
- package/dist/assets/localization-8RqW246V.js +1 -0
- package/dist/assets/{log-pZr6zM4h.js → log-Cb2YJGrF.js} +1 -1
- package/dist/assets/{login-P2wJbw6C.js → login-q2pL4dsp.js} +1 -1
- package/dist/assets/{logo-uploader-uogalgrW.js → logo-uploader-6K4_X7Po.js} +3 -3
- package/dist/assets/{lost-passport-mo-weWhq.js → lost-passport-gSdi28un.js} +3 -3
- package/dist/assets/{lottie-skotHrQT.js → lottie-kQ2xv--6.js} +1 -1
- package/dist/assets/{notifications-PPAwwS3Q.js → notifications-ZISqOX0a.js} +1 -1
- package/dist/assets/{overview-OOHYj1Q3.js → overview-sZ5BzRTI.js} +1 -1
- package/dist/assets/{page-header-zijGZ0Cx.js → page-header-6P2EpXF4.js} +1 -1
- package/dist/assets/{permission-6mOSjcdS.js → permission-OS0PzIT6.js} +1 -1
- package/dist/assets/{preferences-N_0iYWAP.js → preferences-Z_IC4nhp.js} +1 -1
- package/dist/assets/publish-resource-wxmmgOuK.js +1 -0
- package/dist/assets/{react-1-wuzDEA.js → react-c0JPgnZb.js} +3 -3
- package/dist/assets/{selector-ckYcvYGI.js → selector--YzbGRVD.js} +3 -3
- package/dist/assets/session-b-ow1RpF.js +1 -0
- package/dist/assets/{setup-ZPQqv7iq.js → setup-SgrcP2x-.js} +3 -3
- package/dist/assets/{slicedToArray-3_3ts97I.js → slicedToArray-oSUzPFdO.js} +1 -1
- package/dist/assets/{spaces-2TPvVFS1.js → spaces-QaY2264X.js} +1 -1
- package/dist/assets/{start-0rD0U6t7.js → start-bZtRlTDD.js} +1 -1
- package/dist/assets/{step-actions-iRZymf2P.js → step-actions-HFGR5bXP.js} +1 -1
- package/dist/assets/{studio-W4Vc_AGz.js → studio-ieBsoOA2.js} +1 -1
- package/dist/assets/{styled-xYo1pInp.js → styled-T50_bxwD.js} +1 -1
- package/dist/assets/{switch-control--QORsX6_.js → switch-control-Jc2zn8vk.js} +1 -1
- package/dist/assets/{toUpper-q-l4gWRl.js → toUpper-JRDZSLI-.js} +1 -1
- package/dist/assets/{transfer-PhNYj9ZK.js → transfer-aKSH1Uy1.js} +1 -1
- package/dist/assets/{uniqBy-l9QHyf00.js → uniqBy-pTynGO58.js} +1 -1
- package/dist/assets/{unsubscribe-FUenmxnt.js → unsubscribe-C8dEs1Ba.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-V6x21iaX.js → use-blocklet-info-for-connect-did-spaces-VkRWACiT.js} +1 -1
- package/dist/assets/{useAsync-sivFle8p.js → useAsync-WK9qvtNg.js} +1 -1
- package/dist/assets/{useLocalStorage-BhVXzkpi.js → useLocalStorage-bpwznFaJ.js} +1 -1
- package/dist/assets/{useMediaQuery-vIbaAqXb.js → useMediaQuery-wdcDHB2A.js} +1 -1
- package/dist/assets/{useSetState-8jGDsuv3.js → useSetState-DuNs4WQl.js} +1 -1
- package/dist/assets/{useSlotProps-1tP3JLmt.js → useSlotProps-bCjso8dX.js} +1 -1
- package/dist/assets/useTheme-3PhpBKHL.js +1 -0
- package/dist/assets/user-center-KRbkkANH.js +1 -0
- package/dist/assets/{util-HUv70eWD.js → util-peZ-5-3t.js} +1 -1
- package/dist/assets/{wrap-locale-wqIa2Ntp.js → wrap-locale-twPH_GVN.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +23 -23
- package/dist/assets/Box-w0hFB2y0.js +0 -1
- package/dist/assets/Box-wX7WNHof.js +0 -1
- package/dist/assets/add-resource-MJ63NHNw.js +0 -1
- package/dist/assets/api-OOifZ58k.js +0 -1
- package/dist/assets/home-0llsKSBK.js +0 -1
- package/dist/assets/index-aw1T-I5M.js +0 -57
- package/dist/assets/index-eB9Ifmty.js +0 -1
- package/dist/assets/index-jWqA6yOs.js +0 -1
- package/dist/assets/localization-kcWeWxhs.js +0 -1
- package/dist/assets/publish-resource-GJWeIB7T.js +0 -1
- package/dist/assets/session-dO7Ct3kg.js +0 -1
- package/dist/assets/useTheme-E3mdEt0J.js +0 -1
- package/dist/assets/user-center-W3YE5xaW.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Be=Object.defineProperty;var ze=(t,e,n)=>e in t?Be(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var tt=(t,e,n)=>(ze(t,typeof e!="symbol"?e+"":e,n),n);import{g as Pt,a as Tt,Q as lt,
|
|
1
|
+
var Be=Object.defineProperty;var ze=(t,e,n)=>e in t?Be(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var tt=(t,e,n)=>(ze(t,typeof e!="symbol"?e+"":e,n),n);import{g as Pt,a as Tt,Q as lt,cH as ae,cM as He,_ as P,d as M,r as I,U as Lt,f as st,cN as B,aG as le,W as ue,j as h,h as z,i as jt,ch as Ve,cO as zt,P as d,$ as De,t as Ge,bu as Ue,bv as Ht,ct as Qe,co as We,cP as Ze,br as Je,Z as k,cQ as Ye,Y as Xe,cR as Ke,R as tn,cS as en,a6 as nn,cT as on,bK as de,l as fe,aD as sn,a5 as rn,a7 as cn}from"./index-Lb1ehBCY.js";import{D as an}from"./index-M6Qe-jI_.js";import{L as ln}from"./selector--YzbGRVD.js";function un(t){return Tt("MuiListItem",t)}const dn=Pt("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),F=dn;function fn(t){return Tt("MuiListItemButton",t)}const pn=Pt("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),q=pn,hn=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],gn=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},mn=t=>{const{alignItems:e,classes:n,dense:s,disabled:o,disableGutters:r,divider:i,selected:a}=t,l=jt({root:["root",s&&"dense",!r&&"gutters",i&&"divider",o&&"disabled",e==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},fn,n);return P({},n,l)},bn=lt(ae,{shouldForwardProp:t=>He(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:gn})(({theme:t,ownerState:e})=>P({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${q.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:M(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${q.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:M(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${q.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:M(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:M(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${q.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${q.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.alignItems==="flex-start"&&{alignItems:"flex-start"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.dense&&{paddingTop:4,paddingBottom:4})),yn=I.forwardRef(function(e,n){const s=Lt({props:e,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:r=!1,component:i="div",children:a,dense:c=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:f,selected:p=!1,className:m}=s,b=st(s,hn),x=I.useContext(B),w=I.useMemo(()=>({dense:c||x.dense||!1,alignItems:o,disableGutters:l}),[o,x.dense,c,l]),T=I.useRef(null);le(()=>{r&&T.current&&T.current.focus()},[r]);const v=P({},s,{alignItems:o,dense:w.dense,disableGutters:l,divider:u,selected:p}),y=mn(v),R=ue(T,n);return h.jsx(B.Provider,{value:w,children:h.jsx(bn,P({ref:R,href:b.href||b.to,component:(b.href||b.to)&&i==="div"?"button":i,focusVisibleClassName:z(y.focusVisible,f),ownerState:v,className:z(y.root,m)},b,{classes:y,children:a}))})}),xn=yn;function vn(t){return Tt("MuiListItemSecondaryAction",t)}Pt("MuiListItemSecondaryAction",["root","disableGutters"]);const In=["className"],wn=t=>{const{disableGutters:e,classes:n}=t;return jt({root:["root",e&&"disableGutters"]},vn,n)},Cn=lt("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,e)=>{const{ownerState:n}=t;return[e.root,n.disableGutters&&e.disableGutters]}})(({ownerState:t})=>P({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),pe=I.forwardRef(function(e,n){const s=Lt({props:e,name:"MuiListItemSecondaryAction"}),{className:o}=s,r=st(s,In),i=I.useContext(B),a=P({},s,{disableGutters:i.disableGutters}),c=wn(a);return h.jsx(Cn,P({className:z(c.root,o),ownerState:a,ref:n},r))});pe.muiName="ListItemSecondaryAction";const Sn=pe,An=["className"],Pn=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Tn=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters,!n.disablePadding&&e.padding,n.button&&e.button,n.hasSecondaryAction&&e.secondaryAction]},Ln=t=>{const{alignItems:e,button:n,classes:s,dense:o,disabled:r,disableGutters:i,disablePadding:a,divider:c,hasSecondaryAction:l,selected:u}=t;return jt({root:["root",o&&"dense",!i&&"gutters",!a&&"padding",c&&"divider",r&&"disabled",n&&"button",e==="flex-start"&&"alignItemsFlexStart",l&&"secondaryAction",u&&"selected"],container:["container"]},un,s)},jn=lt("div",{name:"MuiListItem",slot:"Root",overridesResolver:Tn})(({theme:t,ownerState:e})=>P({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!e.disablePadding&&P({paddingTop:8,paddingBottom:8},e.dense&&{paddingTop:4,paddingBottom:4},!e.disableGutters&&{paddingLeft:16,paddingRight:16},!!e.secondaryAction&&{paddingRight:48}),!!e.secondaryAction&&{[`& > .${q.root}`]:{paddingRight:48}},{[`&.${F.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${F.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:M(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${F.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:M(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${F.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.alignItems==="flex-start"&&{alignItems:"flex-start"},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${F.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:M(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:M(t.palette.primary.main,t.palette.action.selectedOpacity)}}},e.hasSecondaryAction&&{paddingRight:48})),kn=lt("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,e)=>e.container})({position:"relative"}),Rn=I.forwardRef(function(e,n){const s=Lt({props:e,name:"MuiListItem"}),{alignItems:o="center",autoFocus:r=!1,button:i=!1,children:a,className:c,component:l,components:u={},componentsProps:f={},ContainerComponent:p="li",ContainerProps:{className:m}={},dense:b=!1,disabled:x=!1,disableGutters:w=!1,disablePadding:T=!1,divider:v=!1,focusVisibleClassName:y,secondaryAction:R,selected:C=!1,slotProps:g={},slots:S={}}=s,L=st(s.ContainerProps,An),A=st(s,Pn),j=I.useContext(B),ft=I.useMemo(()=>({dense:b||j.dense||!1,alignItems:o,disableGutters:w}),[o,j.dense,b,w]),pt=I.useRef(null);le(()=>{r&&pt.current&&pt.current.focus()},[r]);const E=I.Children.toArray(a),Ft=E.length&&Ve(E[E.length-1],["ListItemSecondaryAction"]),X=P({},s,{alignItems:o,autoFocus:r,button:i,dense:ft.dense,disabled:x,disableGutters:w,disablePadding:T,divider:v,hasSecondaryAction:Ft,selected:C}),qt=Ln(X),Bt=ue(pt,n),K=S.root||u.Root||jn,H=g.root||f.root||{},N=P({className:z(qt.root,H.className,c),disabled:x},A);let _=l||"li";return i&&(N.component=l||"div",N.focusVisibleClassName=z(F.focusVisible,y),_=ae),Ft?(_=!N.component&&!l?"div":_,p==="li"&&(_==="li"?_="div":N.component==="li"&&(N.component="div")),h.jsx(B.Provider,{value:ft,children:h.jsxs(kn,P({as:p,className:z(qt.container,m),ref:Bt,ownerState:X},L,{children:[h.jsx(K,P({},H,!zt(K)&&{as:_,ownerState:P({},X,H.ownerState)},N,{children:E})),E.pop()]}))})):h.jsx(B.Provider,{value:ft,children:h.jsxs(K,P({},H,{as:_,ref:Bt},!zt(K)&&{ownerState:P({},X,H.ownerState)},N,{children:[E,R&&h.jsx(Sn,{children:R})]}))})}),Mn=Rn;/**
|
|
2
2
|
* (c) Iconify
|
|
3
3
|
*
|
|
4
4
|
* For the full copyright and license information, please view the license.txt
|
|
@@ -8,10 +8,10 @@ var Be=Object.defineProperty;var ze=(t,e,n)=>e in t?Be(t,e,{enumerable:!0,config
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
* @version 1.0.8
|
|
11
|
-
*/const he=Object.freeze({left:0,top:0,width:16,height:16}),rt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Z=Object.freeze({...he,...rt}),yt=Object.freeze({...Z,body:"",hidden:!1}),On=Object.freeze({width:null,height:null}),ge=Object.freeze({...On,...rt});function Nn(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function s(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(t);return isNaN(o)?0:s(o)}else if(n!==t){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let r=parseFloat(t.slice(0,t.length-n.length));return isNaN(r)?0:(r=r/o,r%1===0?s(r):0)}}return e}const _n=/[\s,]+/;function $n(t,e){e.split(_n).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}const me={...ge,preserveAspectRatio:""};function Vt(t){const e={...me},n=(s,o)=>t.getAttribute(s)||o;return e.width=n("width",null),e.height=n("height",null),e.rotate=Nn(n("rotate","")),$n(e,n("flip","")),e.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),e}function En(t,e){for(const n in me)if(t[n]!==e[n])return!0;return!1}const D=/^[a-z0-9]+(-[a-z0-9]+)*$/,J=(t,e,n,s="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:s,prefix:c,name:a};return e&&!nt(l)?null:l}const r=o[0],i=r.split("-");if(i.length>1){const a={provider:s,prefix:i.shift(),name:i.join("-")};return e&&!nt(a)?null:a}if(n&&s===""){const a={provider:s,prefix:"",name:r};return e&&!nt(a,n)?null:a}return null},nt=(t,e)=>t?!!((t.provider===""||t.provider.match(D))&&(e&&t.prefix===""||t.prefix.match(D))&&t.name.match(D)):!1;function Fn(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const s=((t.rotate||0)+(e.rotate||0))%4;return s&&(n.rotate=s),n}function Dt(t,e){const n=Fn(t,e);for(const s in yt)s in rt?s in t&&!(s in n)&&(n[s]=rt[s]):s in e?n[s]=e[s]:s in t&&(n[s]=t[s]);return n}function qn(t,e){const n=t.icons,s=t.aliases||Object.create(null),o=Object.create(null);function r(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=s[i]&&s[i].parent,c=a&&r(a);c&&(o[i]=[a].concat(c))}return o[i]}return(e||Object.keys(n).concat(Object.keys(s))).forEach(r),o}function Bn(t,e,n){const s=t.icons,o=t.aliases||Object.create(null);let r={};function i(a){r=Dt(s[a]||o[a],r)}return i(e),n.forEach(i),Dt(t,r)}function be(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(o=>{e(o,null),n.push(o)});const s=qn(t);for(const o in s){const r=s[o];r&&(e(o,Bn(t,o,r)),n.push(o))}return n}const zn={provider:"",aliases:{},not_found:{},...he};function ht(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function ye(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!ht(t,zn))return null;const n=e.icons;for(const o in n){const r=n[o];if(!o.match(D)||typeof r.body!="string"||!ht(r,yt))return null}const s=e.aliases||Object.create(null);for(const o in s){const r=s[o],i=r.parent;if(!o.match(D)||typeof i!="string"||!n[i]&&!s[i]||!ht(r,yt))return null}return e}const it=Object.create(null);function Hn(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function O(t,e){const n=it[t]||(it[t]=Object.create(null));return n[e]||(n[e]=Hn(t,e))}function kt(t,e){return ye(e)?be(e,(n,s)=>{s?t.icons[n]=s:t.missing.add(n)}):[]}function Vn(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}function Dn(t,e){let n=[];return(typeof t=="string"?[t]:Object.keys(it)).forEach(o=>{(typeof o=="string"&&typeof e=="string"?[e]:Object.keys(it[o]||{})).forEach(i=>{const a=O(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let U=!1;function xe(t){return typeof t=="boolean"&&(U=t),U}function Q(t){const e=typeof t=="string"?J(t,!0,U):t;if(e){const n=O(e.provider,e.prefix),s=e.name;return n.icons[s]||(n.missing.has(s)?null:void 0)}}function ve(t,e){const n=J(t,!0,U);if(!n)return!1;const s=O(n.provider,n.prefix);return Vn(s,n.name,e)}function Gt(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),U&&!e&&!t.prefix){let o=!1;return ye(t)&&(t.prefix="",be(t,(r,i)=>{i&&ve(r,i)&&(o=!0)})),o}const n=t.prefix;if(!nt({provider:e,prefix:n,name:"a"}))return!1;const s=O(e,n);return!!kt(s,t)}function Gn(t){return!!Q(t)}function Un(t){const e=Q(t);return e?{...Z,...e}:null}function Qn(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((o,r)=>o.provider!==r.provider?o.provider.localeCompare(r.provider):o.prefix!==r.prefix?o.prefix.localeCompare(r.prefix):o.name.localeCompare(r.name));let s={provider:"",prefix:"",name:""};return t.forEach(o=>{if(s.name===o.name&&s.prefix===o.prefix&&s.provider===o.provider)return;s=o;const r=o.provider,i=o.prefix,a=o.name,c=n[r]||(n[r]=Object.create(null)),l=c[i]||(c[i]=O(r,i));let u;a in l.icons?u=e.loaded:i===""||l.missing.has(a)?u=e.missing:u=e.pending;const f={provider:r,prefix:i,name:a};u.push(f)}),e}function Ie(t,e){t.forEach(n=>{const s=n.loaderCallbacks;s&&(n.loaderCallbacks=s.filter(o=>o.id!==e))})}function Wn(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const s=t.provider,o=t.prefix;e.forEach(r=>{const i=r.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(t.icons[l])i.loaded.push({provider:s,prefix:o,name:l});else if(t.missing.has(l))i.missing.push({provider:s,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||Ie([t],r.id),r.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),r.abort))})}))}let Zn=0;function Jn(t,e,n){const s=Zn++,o=Ie.bind(null,n,s);if(!e.pending.length)return o;const r={id:s,icons:e,callback:t,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(r)}),o}const xt=Object.create(null);function Ut(t,e){xt[t]=e}function vt(t){return xt[t]||xt[""]}function Yn(t,e=!0,n=!1){const s=[];return t.forEach(o=>{const r=typeof o=="string"?J(o,e,n):o;r&&s.push(r)}),s}var Xn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Kn(t,e,n,s){const o=t.resources.length,r=t.random?Math.floor(Math.random()*o):t.index;let i;if(t.random){let g=t.resources.slice(0);for(i=[];g.length>1;){const S=Math.floor(Math.random()*g.length);i.push(g[S]),g=g.slice(0,S).concat(g.slice(S+1))}i=i.concat(g)}else i=t.resources.slice(r).concat(t.resources.slice(0,r));const a=Date.now();let c="pending",l=0,u,f=null,p=[],m=[];typeof s=="function"&&m.push(s);function b(){f&&(clearTimeout(f),f=null)}function x(){c==="pending"&&(c="aborted"),b(),p.forEach(g=>{g.status==="pending"&&(g.status="aborted")}),p=[]}function w(g,S){S&&(m=[]),typeof g=="function"&&m.push(g)}function T(){return{startTime:a,payload:e,status:c,queriesSent:l,queriesPending:p.length,subscribe:w,abort:x}}function v(){c="failed",m.forEach(g=>{g(void 0,u)})}function y(){p.forEach(g=>{g.status==="pending"&&(g.status="aborted")}),p=[]}function R(g,S,L){const A=S!=="success";switch(p=p.filter(j=>j!==g),c){case"pending":break;case"failed":if(A||!t.dataAfterTimeout)return;break;default:return}if(S==="abort"){u=L,v();return}if(A){u=L,p.length||(i.length?C():v());return}if(b(),y(),!t.random){const j=t.resources.indexOf(g.resource);j!==-1&&j!==t.index&&(t.index=j)}c="completed",m.forEach(j=>{j(L)})}function C(){if(c!=="pending")return;b();const g=i.shift();if(g===void 0){if(p.length){f=setTimeout(()=>{b(),c==="pending"&&(y(),v())},t.timeout);return}v();return}const S={status:"pending",resource:g,callback:(L,A)=>{R(S,L,A)}};p.push(S),l++,f=setTimeout(C,t.rotate),n(g,e,S.callback)}return setTimeout(C),T}function we(t){const e={...Xn,...t};let n=[];function s(){n=n.filter(a=>a().status==="pending")}function o(a,c,l){const u=Kn(e,a,c,(f,p)=>{s(),l&&l(f,p)});return n.push(u),u}function r(a){return n.find(c=>a(c))||null}return{query:o,find:r,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:s}}function Rt(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const ut=Object.create(null),V=["https://api.simplesvg.com","https://api.unisvg.com"],ot=[];for(;V.length>0;)V.length===1||Math.random()>.5?ot.push(V.shift()):ot.push(V.pop());ut[""]=Rt({resources:["https://api.iconify.design"].concat(ot)});function Qt(t,e){const n=Rt(e);return n===null?!1:(ut[t]=n,!0)}function dt(t){return ut[t]}function to(){return Object.keys(ut)}function Wt(){}const gt=Object.create(null);function eo(t){if(!gt[t]){const e=dt(t);if(!e)return;const n=we(e),s={config:e,redundancy:n};gt[t]=s}return gt[t]}function Ce(t,e,n){let s,o;if(typeof t=="string"){const r=vt(t);if(!r)return n(void 0,424),Wt;o=r.send;const i=eo(t);i&&(s=i.redundancy)}else{const r=Rt(t);if(r){s=we(r);const i=t.resources?t.resources[0]:"",a=vt(i);a&&(o=a.send)}}return!s||!o?(n(void 0,424),Wt):s.query(e,o,n)().abort}const Zt="iconify2",W="iconify",Se=W+"-count",Jt=W+"-version",Ae=36e5,no=168;function It(t,e){try{return t.getItem(e)}catch{}}function Mt(t,e,n){try{return t.setItem(e,n),!0}catch{}}function Yt(t,e){try{t.removeItem(e)}catch{}}function wt(t,e){return Mt(t,Se,e.toString())}function Ct(t){return parseInt(It(t,Se))||0}const $={local:!0,session:!0},Pe={local:new Set,session:new Set};let Ot=!1;function oo(t){Ot=t}let et=typeof window>"u"?{}:window;function Te(t){const e=t+"Storage";try{if(et&&et[e]&&typeof et[e].length=="number")return et[e]}catch{}$[t]=!1}function Le(t,e){const n=Te(t);if(!n)return;const s=It(n,Jt);if(s!==Zt){if(s){const a=Ct(n);for(let c=0;c<a;c++)Yt(n,W+c.toString())}Mt(n,Jt,Zt),wt(n,0);return}const o=Math.floor(Date.now()/Ae)-no,r=a=>{const c=W+a.toString(),l=It(n,c);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&e(u,a))return!0}catch{}Yt(n,c)}};let i=Ct(n);for(let a=i-1;a>=0;a--)r(a)||(a===i-1?(i--,wt(n,i)):Pe[t].add(a))}function je(){if(!Ot){oo(!0);for(const t in $)Le(t,e=>{const n=e.data,s=e.provider,o=n.prefix,r=O(s,o);if(!kt(r,n).length)return!1;const i=n.lastModified||-1;return r.lastModifiedCached=r.lastModifiedCached?Math.min(r.lastModifiedCached,i):i,!0})}}function so(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const s in $)Le(s,o=>{const r=o.data;return o.provider!==t.provider||r.prefix!==t.prefix||r.lastModified===e});return!0}function ro(t,e){Ot||je();function n(s){let o;if(!$[s]||!(o=Te(s)))return;const r=Pe[s];let i;if(r.size)r.delete(i=Array.from(r).shift());else if(i=Ct(o),!wt(o,i+1))return;const a={cached:Math.floor(Date.now()/Ae),provider:t.provider,data:e};return Mt(o,W+i.toString(),JSON.stringify(a))}e.lastModified&&!so(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function Xt(){}function io(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Wn(t)}))}function co(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:s}=t,o=t.iconsToLoad;delete t.iconsToLoad;let r;if(!o||!(r=vt(n)))return;r.prepare(n,s,o).forEach(a=>{Ce(n,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{t.missing.add(l)});else try{const l=kt(t,c);if(!l.length)return;const u=t.pendingIcons;u&&l.forEach(f=>{u.delete(f)}),ro(t,c)}catch(l){console.error(l)}io(t)})})}))}const Nt=(t,e)=>{const n=Yn(t,!0,xe()),s=Qn(n);if(!s.pending.length){let c=!0;return e&&setTimeout(()=>{c&&e(s.loaded,s.missing,s.pending,Xt)}),()=>{c=!1}}const o=Object.create(null),r=[];let i,a;return s.pending.forEach(c=>{const{provider:l,prefix:u}=c;if(u===a&&l===i)return;i=l,a=u,r.push(O(l,u));const f=o[l]||(o[l]=Object.create(null));f[u]||(f[u]=[])}),s.pending.forEach(c=>{const{provider:l,prefix:u,name:f}=c,p=O(l,u),m=p.pendingIcons||(p.pendingIcons=new Set);m.has(f)||(m.add(f),o[l][u].push(f))}),r.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&co(c,o[l][u])}),e?Jn(e,s,r):Xt},ao=t=>new Promise((e,n)=>{const s=typeof t=="string"?J(t,!0):t;if(!s){n(t);return}Nt([s||t],o=>{if(o.length&&s){const r=Q(s);if(r){e({...Z,...r});return}}n(t)})});function lo(t){try{const e=typeof t=="string"?JSON.parse(t):t;if(typeof e.body=="string")return{...e}}catch{}}function uo(t,e){const n=typeof t=="string"?J(t,!0,!0):null;if(!n){const r=lo(t);return{value:t,data:r}}const s=Q(n);if(s!==void 0||!n.prefix)return{value:t,name:n,data:s};const o=Nt([n],()=>e(t,n,Q(n)));return{value:t,name:n,loading:o}}function mt(t){return t.hasAttribute("inline")}let ke=!1;try{ke=navigator.vendor.indexOf("Apple")===0}catch{}function fo(t,e){switch(e){case"svg":case"bg":case"mask":return e}return e!=="style"&&(ke||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}const po=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ho=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function St(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const s=t.split(po);if(s===null||!s.length)return t;const o=[];let r=s.shift(),i=ho.test(r);for(;;){if(i){const a=parseFloat(r);isNaN(a)?o.push(r):o.push(Math.ceil(a*e*n)/n)}else o.push(r);if(r=s.shift(),r===void 0)return o.join("");i=!i}}const go=t=>t==="unset"||t==="undefined"||t==="none";function Re(t,e){const n={...Z,...t},s={...ge,...e},o={left:n.left,top:n.top,width:n.width,height:n.height};let r=n.body;[n,s].forEach(b=>{const x=[],w=b.hFlip,T=b.vFlip;let v=b.rotate;w?T?v+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):T&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let y;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:y=o.height/2+o.top,x.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:y=o.width/2+o.left,x.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}v%2===1&&(o.left!==o.top&&(y=o.left,o.left=o.top,o.top=y),o.width!==o.height&&(y=o.width,o.width=o.height,o.height=y)),x.length&&(r='<g transform="'+x.join(" ")+'">'+r+"</g>")});const i=s.width,a=s.height,c=o.width,l=o.height;let u,f;i===null?(f=a===null?"1em":a==="auto"?l:a,u=St(f,c/l)):(u=i==="auto"?c:i,f=a===null?St(u,l/c):a==="auto"?l:a);const p={},m=(b,x)=>{go(x)||(p[b]=x.toString())};return m("width",u),m("height",f),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:r}}const mo=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let ct=mo();function bo(t){ct=t}function yo(){return ct}function xo(t,e){const n=dt(t);if(!n)return 0;let s;if(!n.maxURL)s=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const r=e+".json?icons=";s=n.maxURL-o-n.path.length-r.length}return s}function vo(t){return t===404}const Io=(t,e,n)=>{const s=[],o=xo(t,e),r="icons";let i={type:r,provider:t,prefix:e,icons:[]},a=0;return n.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(s.push(i),i={type:r,provider:t,prefix:e,icons:[]},a=c.length),i.icons.push(c)}),s.push(i),s};function wo(t){if(typeof t=="string"){const e=dt(t);if(e)return e.path}return"/"}const Co=(t,e,n)=>{if(!ct){n("abort",424);return}let s=wo(e.provider);switch(e.type){case"icons":{const r=e.prefix,a=e.icons.join(","),c=new URLSearchParams({icons:a});s+=r+".json?"+c.toString();break}case"custom":{const r=e.uri;s+=r.slice(0,1)==="/"?r.slice(1):r;break}default:n("abort",400);return}let o=503;ct(t+s).then(r=>{const i=r.status;if(i!==200){setTimeout(()=>{n(vo(i)?"abort":"next",i)});return}return o=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?n("abort",r):n("next",o)});return}setTimeout(()=>{n("success",r)})}).catch(()=>{n("next",o)})},So={prepare:Io,send:Co};function Kt(t,e){switch(t){case"local":case"session":$[t]=e;break;case"all":for(const n in $)$[n]=e;break}}const bt="data-style";let Me="";function Ao(t){Me=t}function te(t,e){let n=Array.from(t.childNodes).find(s=>s.hasAttribute&&s.hasAttribute(bt));n||(n=document.createElement("style"),n.setAttribute(bt,bt),t.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block}"+Me}function Oe(){Ut("",So),xe(!0);let t;try{t=window}catch{}if(t){if(je(),t.IconifyPreload!==void 0){const n=t.IconifyPreload,s="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!Gt(o))&&console.error(s)}catch{console.error(s)}})}if(t.IconifyProviders!==void 0){const n=t.IconifyProviders;if(typeof n=="object"&&n!==null)for(const s in n){const o="IconifyProviders["+s+"] is invalid.";try{const r=n[s];if(typeof r!="object"||!r||r.resources===void 0)continue;Qt(s,r)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>Kt(n,!0),disableCache:n=>Kt(n,!1),iconExists:Gn,getIcon:Un,listIcons:Dn,addIcon:ve,addCollection:Gt,calculateSize:St,buildIcon:Re,loadIcons:Nt,loadIcon:ao,addAPIProvider:Qt,appendCustomStyle:Ao,_api:{getAPIConfig:dt,setAPIModule:Ut,sendAPIQuery:Ce,setFetch:bo,getFetch:yo,listAPIProviders:to}}}function Ne(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in e)n+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function Po(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function To(t){return"data:image/svg+xml,"+Po(t)}function Lo(t){return'url("'+To(t)+'")'}const At={"background-color":"currentColor"},_e={"background-color":"transparent"},ee={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ne={"-webkit-mask":At,mask:At,background:_e};for(const t in ne){const e=ne[t];for(const n in ee)e[t+"-"+n]=ee[n]}function oe(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function jo(t,e,n){const s=document.createElement("span");let o=t.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const r=t.attributes,i=Ne(o,{...r,width:e.width+"",height:e.height+""}),a=Lo(i),c=s.style,l={"--svg":a,width:oe(r.width),height:oe(r.height),...n?At:_e};for(const u in l)c.setProperty(u,l[u]);return s}let G;function ko(){try{G=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{G=null}}function Ro(t){return G===void 0&&ko(),G?G.createHTML(t):t}function Mo(t){const e=document.createElement("span"),n=t.attributes;let s="";n.width||(s="width: inherit;"),n.height||(s+="height: inherit;"),s&&(n.style=s);const o=Ne(t.body,n);return e.innerHTML=Ro(o),e.firstChild}function se(t,e){const n=e.icon.data,s=e.customisations,o=Re(n,s);s.preserveAspectRatio&&(o.attributes.preserveAspectRatio=s.preserveAspectRatio);const r=e.renderedMode;let i;switch(r){case"svg":i=Mo(o);break;default:i=jo(o,{...Z,...n},r==="mask")}const a=Array.from(t.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):t.replaceChild(i,a):t.appendChild(i)}function re(t,e,n){const s=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:e,icon:t,lastRender:s}}function Oo(t="iconify-icon"){let e,n;try{e=window.customElements,n=window.HTMLElement}catch{return}if(!e||!n)return;const s=e.get(t);if(s)return s;const o=["icon","mode","inline","width","height","rotate","flip"],r=class extends n{constructor(){super();tt(this,"_shadowRoot");tt(this,"_state");tt(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=mt(this);te(c,l),this._state=re({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=mt(this),u=this._state;l!==u.inline&&(u.inline=l,te(this._shadowRoot,l))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return mt(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const l=this._shadowRoot;if(c.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}se(l,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,l=this.getAttribute("icon");if(l!==c.icon.value){this._iconChanged(l);return}if(!c.rendered)return;const u=this.getAttribute("mode"),f=Vt(this);(c.attrMode!==u||En(c.customisations,f))&&this._renderIcon(c.icon,f,u)}_iconChanged(c){const l=uo(c,(u,f,p)=>{const m=this._state;if(m.rendered||this.getAttribute("icon")!==u)return;const b={value:u,name:f,data:p};b.data?this._gotIconData(b):m.icon=b});l.data?this._gotIconData(l):this._state=re(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,Vt(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const f=fo(c.data.body,u),p=this._state.inline;se(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:f})}};o.forEach(a=>{a in r.prototype||Object.defineProperty(r.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=Oe();for(const a in i)r[a]=r.prototype[a]=i[a];return e.define(t,r),r}Oo()||Oe();const No=d.shape({appLogo:d.node,appName:d.string,theme:d.shape({background:d.string}),enableConnect:d.bool,enableLocale:d.bool,navigation:d.arrayOf(d.shape({title:d.oneOfType([d.string,d.object]),link:d.oneOfType([d.string,d.object]),icon:d.string,items:d.arrayOf(d.shape({title:d.oneOfType([d.string,d.object]),link:d.oneOfType([d.string,d.object])}))}))}),$e=d.shape({showText:d.bool,showRole:d.bool,switchDid:d.bool,switchProfile:d.bool,switchPassport:d.bool,disableLogout:d.bool,onLogin:d.func,onLogout:d.func,onSwitchDid:d.func,onSwitchProfile:d.func,onSwitchPassport:d.func,menu:d.array,menuRender:d.func,dark:d.bool,size:d.number}),Y=(t,e,n="children")=>t.map(s=>Array.isArray(s[n])?e({...s,[n]:Y(s[n],e,n)}):e(s)),_o=(t,e="children")=>{const n=[];return Y(t,s=>n.push(s),e),n},_t=(t,e,n="children")=>t.map(s=>({...s})).filter(s=>{const o=s[n];if(Array.isArray(o)){const i=_t(o,e,n);s[n]=i!=null&&i.length?i:void 0}const r={filteredChildren:s[n],isLeaf:!(o!=null&&o.length)};return e(s,r)}),$o=t=>/^https?:\/\//.test(t),Yo=t=>/^[\w-]+:[\w-]+$/.test(t),Eo=t=>{if(!t||!(t!=null&&t.startsWith("/")))return!1;const e=o=>o.endsWith("/")?o:`${o}/`,n=e(window.location.pathname),s=e(new URL(t,window.location.origin).pathname);return n.startsWith(s)},Fo=(t=[])=>{const e=t.map((s,o)=>({path:s,index:o})).filter(s=>Eo(s.path));return e!=null&&e.length?e.slice(1).reduce((s,o)=>s.path.length>=o.path.length?s:o,e[0]).index:-1};var ie,ce;const at=((ie=window==null?void 0:window.blocklet)==null?void 0:ie.groupPrefix)||((ce=window==null?void 0:window.blocklet)==null?void 0:ce.prefix)||"/",qo=t=>{const e={...t},n=t==null?void 0:t.background;return typeof n=="string"?e.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(e.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),e},Ee=(t,e="en")=>{if(!(t!=null&&t.length))return t;const n=(o,r)=>typeof o=="string"?o:typeof o=="object"?o[r]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,s=(o,r)=>{if(typeof o=="string"){if($o(o)){const a=new URL(o);return a.searchParams.set("locale",r),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",r),i.pathname+i.search}return typeof o=="object"?o[r]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return Y(t,o=>{var r;return{...o,title:n(o.title,e),link:(r=o.items)!=null&&r.length?o.link:s(o.link,e),_rawLink:o.link}},"items")},Bo=t=>Y(t,e=>e.role?{...e,role:Array.isArray(e.role)?e.role:[e.role]}:e,"items"),zo=t=>{if(!(t!=null&&t.length))return null;const e=Bo(t),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return e.forEach(s=>{var o;s.section?Array.isArray(s.section)?s.section.forEach(r=>{var i;(i=n[r])==null||i.push(s)}):typeof s.section=="string"&&((o=n[s.section])==null||o.push(s)):n.header.push(s)}),n},Ho=t=>{if(!t)return null;const e={...t};return e.theme=qo(e.theme),e.navigation=zo(Vo(e.navigation)),e},Vo=(t=[])=>_t(t,(e,n)=>{var s;return!!e.link||((s=n.filteredChildren)==null?void 0:s.length)},"items"),Fe=(t,e)=>_t(t,(n,s)=>{var r;const o=!n.role||e&&n.role.includes(e);return s.isLeaf?o:o&&((r=s.filteredChildren)==null?void 0:r.length)},"items"),Do={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"/>'},Go={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"/>'};function $t({session:t,locale:e,size:n}){const s=(window==null?void 0:window.blocklet)||{},o=(s.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=t==null?void 0:t.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((s==null?void 0:s.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),r=I.useRef(null),i=De({open:!1}),a=Ge((c=!i.open)=>{i.open=c});return o.length===0||!(t!=null&&t.user)?null:h.jsxs(h.Fragment,{children:[h.jsx(Ue,{size:"medium",ref:r,onClick:()=>a(),children:h.jsx(Ht,{icon:Do,fontSize:n,style:{transform:"scale(1.08)"}})}),h.jsx(Qe,{open:i.open,onClose:()=>a(!1),anchorEl:r.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>h.jsx(We,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:h.jsx(Ze,{...c,timeout:350,children:h.jsxs(Je,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:k.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${k.gray6}, 0px 0px 0px 1px ${k.gray6}`},children:[h.jsx(Ye,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:o.map(l=>{var u,f;return h.jsx(Mn,{disablePadding:!0,children:h.jsxs(xn,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:k.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?h.jsx(Xe,{component:"img",src:`${Ke}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):h.jsx(Ht,{fontSize:50,icon:l.icon||Go,color:k.textSubtitle}),h.jsx(tn,{sx:{fontSize:"12px",color:k.textBase,textAlign:"center",lineHeight:"normal"},children:((f=l.title)==null?void 0:f.zh)||l.title})]})},l.id)})}),h.jsx(en,{session:t,children:h.jsx(nn,{variant:"outlined",fullWidth:!0,href:on,sx:{mt:1,borderRadius:2,color:k.textBase,borderColor:k.lineBorderStrong,"&:hover":{color:k.primaryBase,borderColor:k.primaryBase}},children:e==="zh"?"管理":"Manage"})})]})})})})]})}$t.propTypes={session:d.object.isRequired,locale:d.string,size:d.number};$t.defaultProps={locale:"en",size:24};function Et({formattedBlocklet:t,addons:e,sessionManagerProps:n}){var p,m,b,x;const s=I.useContext(de),{locale:o}=fe()||{},{enableConnect:r=!0,enableLocale:i=!0}=t,a=!!((p=s==null?void 0:s.session)!=null&&p.user);let c=Ee((m=t==null?void 0:t.navigation)==null?void 0:m.sessionManager,o)||[];c=Fe(c,(x=(b=s==null?void 0:s.session)==null?void 0:b.user)==null?void 0:x.role);const u=(()=>{if(e&&typeof e!="function")return Array.isArray(e)?e:[e];let w=[];if(i&&o&&w.push(h.jsx(ln,{showText:!1},"locale-selector")),r&&s){const T=[];a&&(c?c.slice(0,5):[]).forEach(y=>{T.push({label:y.title,icon:y.icon?h.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),w.push(h.jsx($t,{session:s.session,locale:o},"session-blocklet")),w.push(h.jsx(sn,{session:s.session,locale:o,menu:T,showRole:!0,...n},"session-user"))}return typeof e=="function"&&(w=e(w)||[]),w})();return I.createElement(h.Fragment,null,...Array.isArray(u)?u:[u])}Et.propTypes={formattedBlocklet:d.object.isRequired,addons:d.oneOfType([d.func,d.node]),sessionManagerProps:$e};Et.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const Uo=()=>{const t=rn();I.useEffect(()=>{t.wallet&&cn(()=>import("./index-LTzQUJ4f.js").then(e=>e.i),__vite__mapDeps([0,1,2])).then(e=>{e.call||(e=e.default),e.call("arcHideTopBar","{}")}).catch(e=>{console.error("load dsbridge error",e)})},[t])};function qe({meta:t,fallbackUrl:e,invalidPathFallback:n,headerAddons:s,sessionManagerProps:o,links:r,...i}){var R;Uo();const a=I.useContext(de),c=(R=a==null?void 0:a.session)==null?void 0:R.user,l=c==null?void 0:c.role,{locale:u}=fe()||{},f=I.useMemo(()=>{const C=Object.assign({},window.blocklet,t);try{return Ho(C)}catch(g){return console.error("Failed to format blocklet info",g,C),C}},[t]),{localizedNav:p,flattened:m,matchedIndex:b}=I.useMemo(()=>{var L;let C=Ee((L=f==null?void 0:f.navigation)==null?void 0:L.dashboard,u)||[];C=Fe(C,l),C=Y(C,A=>({title:A.title,url:A.link,icon:A.icon?h.jsx("iconify-icon",{height:"100%",width:"100%",icon:A.icon}):null,external:!0,children:A.items}),"items");const g=_o(C).filter(A=>!!A.url),S=Fo(g.map(A=>A.url));return S!==-1&&(g[S].active=!0),{localizedNav:C,flattened:g,matchedIndex:S}},[f,u,l]),x=typeof r=="function"?r(p):[...p,...r];if(I.useLayoutEffect(()=>{c&&!(m!=null&&m.length)&&e&&(window.location.href=e)},[e]),I.useLayoutEffect(()=>{var C;c&&(m!=null&&m.length)&&b===-1&&(n?n():window.location.href=((C=m[0])==null?void 0:C.url)||at)},[n,m,b]),!f.appName)return null;const{appLogo:w,appLogoRect:T,appName:v}=f,y=h.jsx(Et,{formattedBlocklet:f,addons:s,sessionManagerProps:o});return h.jsx(an,{title:v,fullWidth:!0,sidebarWidth:128,legacy:!1,links:x,...i,headerProps:{homeLink:at,logo:h.jsx("img",{src:T||w,alt:"logo"}),addons:y,...i.headerProps}})}qe.propTypes={meta:No,fallbackUrl:d.string,invalidPathFallback:d.func,headerAddons:d.oneOfType([d.func,d.node]),sessionManagerProps:$e,links:d.oneOfType([d.array,d.func])};qe.defaultProps={meta:{},fallbackUrl:at,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=at}},links:[]};export{qe as D,Et as H,Yo as a,No as b,_o as c,Fo as d,Ho as f,Ee as g,$o as i,Y as m,at as p,$e as s,Uo as u};
|
|
11
|
+
*/const he=Object.freeze({left:0,top:0,width:16,height:16}),rt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Z=Object.freeze({...he,...rt}),yt=Object.freeze({...Z,body:"",hidden:!1}),On=Object.freeze({width:null,height:null}),ge=Object.freeze({...On,...rt});function Nn(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function s(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(t);return isNaN(o)?0:s(o)}else if(n!==t){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let r=parseFloat(t.slice(0,t.length-n.length));return isNaN(r)?0:(r=r/o,r%1===0?s(r):0)}}return e}const _n=/[\s,]+/;function $n(t,e){e.split(_n).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}const me={...ge,preserveAspectRatio:""};function Vt(t){const e={...me},n=(s,o)=>t.getAttribute(s)||o;return e.width=n("width",null),e.height=n("height",null),e.rotate=Nn(n("rotate","")),$n(e,n("flip","")),e.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),e}function En(t,e){for(const n in me)if(t[n]!==e[n])return!0;return!1}const D=/^[a-z0-9]+(-[a-z0-9]+)*$/,J=(t,e,n,s="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;s=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:s,prefix:c,name:a};return e&&!nt(l)?null:l}const r=o[0],i=r.split("-");if(i.length>1){const a={provider:s,prefix:i.shift(),name:i.join("-")};return e&&!nt(a)?null:a}if(n&&s===""){const a={provider:s,prefix:"",name:r};return e&&!nt(a,n)?null:a}return null},nt=(t,e)=>t?!!((t.provider===""||t.provider.match(D))&&(e&&t.prefix===""||t.prefix.match(D))&&t.name.match(D)):!1;function Fn(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const s=((t.rotate||0)+(e.rotate||0))%4;return s&&(n.rotate=s),n}function Dt(t,e){const n=Fn(t,e);for(const s in yt)s in rt?s in t&&!(s in n)&&(n[s]=rt[s]):s in e?n[s]=e[s]:s in t&&(n[s]=t[s]);return n}function qn(t,e){const n=t.icons,s=t.aliases||Object.create(null),o=Object.create(null);function r(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=s[i]&&s[i].parent,c=a&&r(a);c&&(o[i]=[a].concat(c))}return o[i]}return(e||Object.keys(n).concat(Object.keys(s))).forEach(r),o}function Bn(t,e,n){const s=t.icons,o=t.aliases||Object.create(null);let r={};function i(a){r=Dt(s[a]||o[a],r)}return i(e),n.forEach(i),Dt(t,r)}function be(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(o=>{e(o,null),n.push(o)});const s=qn(t);for(const o in s){const r=s[o];r&&(e(o,Bn(t,o,r)),n.push(o))}return n}const zn={provider:"",aliases:{},not_found:{},...he};function ht(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function ye(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!ht(t,zn))return null;const n=e.icons;for(const o in n){const r=n[o];if(!o.match(D)||typeof r.body!="string"||!ht(r,yt))return null}const s=e.aliases||Object.create(null);for(const o in s){const r=s[o],i=r.parent;if(!o.match(D)||typeof i!="string"||!n[i]&&!s[i]||!ht(r,yt))return null}return e}const it=Object.create(null);function Hn(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function O(t,e){const n=it[t]||(it[t]=Object.create(null));return n[e]||(n[e]=Hn(t,e))}function kt(t,e){return ye(e)?be(e,(n,s)=>{s?t.icons[n]=s:t.missing.add(n)}):[]}function Vn(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}function Dn(t,e){let n=[];return(typeof t=="string"?[t]:Object.keys(it)).forEach(o=>{(typeof o=="string"&&typeof e=="string"?[e]:Object.keys(it[o]||{})).forEach(i=>{const a=O(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let U=!1;function xe(t){return typeof t=="boolean"&&(U=t),U}function Q(t){const e=typeof t=="string"?J(t,!0,U):t;if(e){const n=O(e.provider,e.prefix),s=e.name;return n.icons[s]||(n.missing.has(s)?null:void 0)}}function ve(t,e){const n=J(t,!0,U);if(!n)return!1;const s=O(n.provider,n.prefix);return Vn(s,n.name,e)}function Gt(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),U&&!e&&!t.prefix){let o=!1;return ye(t)&&(t.prefix="",be(t,(r,i)=>{i&&ve(r,i)&&(o=!0)})),o}const n=t.prefix;if(!nt({provider:e,prefix:n,name:"a"}))return!1;const s=O(e,n);return!!kt(s,t)}function Gn(t){return!!Q(t)}function Un(t){const e=Q(t);return e?{...Z,...e}:null}function Qn(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((o,r)=>o.provider!==r.provider?o.provider.localeCompare(r.provider):o.prefix!==r.prefix?o.prefix.localeCompare(r.prefix):o.name.localeCompare(r.name));let s={provider:"",prefix:"",name:""};return t.forEach(o=>{if(s.name===o.name&&s.prefix===o.prefix&&s.provider===o.provider)return;s=o;const r=o.provider,i=o.prefix,a=o.name,c=n[r]||(n[r]=Object.create(null)),l=c[i]||(c[i]=O(r,i));let u;a in l.icons?u=e.loaded:i===""||l.missing.has(a)?u=e.missing:u=e.pending;const f={provider:r,prefix:i,name:a};u.push(f)}),e}function Ie(t,e){t.forEach(n=>{const s=n.loaderCallbacks;s&&(n.loaderCallbacks=s.filter(o=>o.id!==e))})}function Wn(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const s=t.provider,o=t.prefix;e.forEach(r=>{const i=r.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(t.icons[l])i.loaded.push({provider:s,prefix:o,name:l});else if(t.missing.has(l))i.missing.push({provider:s,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||Ie([t],r.id),r.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),r.abort))})}))}let Zn=0;function Jn(t,e,n){const s=Zn++,o=Ie.bind(null,n,s);if(!e.pending.length)return o;const r={id:s,icons:e,callback:t,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(r)}),o}const xt=Object.create(null);function Ut(t,e){xt[t]=e}function vt(t){return xt[t]||xt[""]}function Yn(t,e=!0,n=!1){const s=[];return t.forEach(o=>{const r=typeof o=="string"?J(o,e,n):o;r&&s.push(r)}),s}var Xn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Kn(t,e,n,s){const o=t.resources.length,r=t.random?Math.floor(Math.random()*o):t.index;let i;if(t.random){let g=t.resources.slice(0);for(i=[];g.length>1;){const S=Math.floor(Math.random()*g.length);i.push(g[S]),g=g.slice(0,S).concat(g.slice(S+1))}i=i.concat(g)}else i=t.resources.slice(r).concat(t.resources.slice(0,r));const a=Date.now();let c="pending",l=0,u,f=null,p=[],m=[];typeof s=="function"&&m.push(s);function b(){f&&(clearTimeout(f),f=null)}function x(){c==="pending"&&(c="aborted"),b(),p.forEach(g=>{g.status==="pending"&&(g.status="aborted")}),p=[]}function w(g,S){S&&(m=[]),typeof g=="function"&&m.push(g)}function T(){return{startTime:a,payload:e,status:c,queriesSent:l,queriesPending:p.length,subscribe:w,abort:x}}function v(){c="failed",m.forEach(g=>{g(void 0,u)})}function y(){p.forEach(g=>{g.status==="pending"&&(g.status="aborted")}),p=[]}function R(g,S,L){const A=S!=="success";switch(p=p.filter(j=>j!==g),c){case"pending":break;case"failed":if(A||!t.dataAfterTimeout)return;break;default:return}if(S==="abort"){u=L,v();return}if(A){u=L,p.length||(i.length?C():v());return}if(b(),y(),!t.random){const j=t.resources.indexOf(g.resource);j!==-1&&j!==t.index&&(t.index=j)}c="completed",m.forEach(j=>{j(L)})}function C(){if(c!=="pending")return;b();const g=i.shift();if(g===void 0){if(p.length){f=setTimeout(()=>{b(),c==="pending"&&(y(),v())},t.timeout);return}v();return}const S={status:"pending",resource:g,callback:(L,A)=>{R(S,L,A)}};p.push(S),l++,f=setTimeout(C,t.rotate),n(g,e,S.callback)}return setTimeout(C),T}function we(t){const e={...Xn,...t};let n=[];function s(){n=n.filter(a=>a().status==="pending")}function o(a,c,l){const u=Kn(e,a,c,(f,p)=>{s(),l&&l(f,p)});return n.push(u),u}function r(a){return n.find(c=>a(c))||null}return{query:o,find:r,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:s}}function Rt(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const ut=Object.create(null),V=["https://api.simplesvg.com","https://api.unisvg.com"],ot=[];for(;V.length>0;)V.length===1||Math.random()>.5?ot.push(V.shift()):ot.push(V.pop());ut[""]=Rt({resources:["https://api.iconify.design"].concat(ot)});function Qt(t,e){const n=Rt(e);return n===null?!1:(ut[t]=n,!0)}function dt(t){return ut[t]}function to(){return Object.keys(ut)}function Wt(){}const gt=Object.create(null);function eo(t){if(!gt[t]){const e=dt(t);if(!e)return;const n=we(e),s={config:e,redundancy:n};gt[t]=s}return gt[t]}function Ce(t,e,n){let s,o;if(typeof t=="string"){const r=vt(t);if(!r)return n(void 0,424),Wt;o=r.send;const i=eo(t);i&&(s=i.redundancy)}else{const r=Rt(t);if(r){s=we(r);const i=t.resources?t.resources[0]:"",a=vt(i);a&&(o=a.send)}}return!s||!o?(n(void 0,424),Wt):s.query(e,o,n)().abort}const Zt="iconify2",W="iconify",Se=W+"-count",Jt=W+"-version",Ae=36e5,no=168;function It(t,e){try{return t.getItem(e)}catch{}}function Mt(t,e,n){try{return t.setItem(e,n),!0}catch{}}function Yt(t,e){try{t.removeItem(e)}catch{}}function wt(t,e){return Mt(t,Se,e.toString())}function Ct(t){return parseInt(It(t,Se))||0}const $={local:!0,session:!0},Pe={local:new Set,session:new Set};let Ot=!1;function oo(t){Ot=t}let et=typeof window>"u"?{}:window;function Te(t){const e=t+"Storage";try{if(et&&et[e]&&typeof et[e].length=="number")return et[e]}catch{}$[t]=!1}function Le(t,e){const n=Te(t);if(!n)return;const s=It(n,Jt);if(s!==Zt){if(s){const a=Ct(n);for(let c=0;c<a;c++)Yt(n,W+c.toString())}Mt(n,Jt,Zt),wt(n,0);return}const o=Math.floor(Date.now()/Ae)-no,r=a=>{const c=W+a.toString(),l=It(n,c);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&e(u,a))return!0}catch{}Yt(n,c)}};let i=Ct(n);for(let a=i-1;a>=0;a--)r(a)||(a===i-1?(i--,wt(n,i)):Pe[t].add(a))}function je(){if(!Ot){oo(!0);for(const t in $)Le(t,e=>{const n=e.data,s=e.provider,o=n.prefix,r=O(s,o);if(!kt(r,n).length)return!1;const i=n.lastModified||-1;return r.lastModifiedCached=r.lastModifiedCached?Math.min(r.lastModifiedCached,i):i,!0})}}function so(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const s in $)Le(s,o=>{const r=o.data;return o.provider!==t.provider||r.prefix!==t.prefix||r.lastModified===e});return!0}function ro(t,e){Ot||je();function n(s){let o;if(!$[s]||!(o=Te(s)))return;const r=Pe[s];let i;if(r.size)r.delete(i=Array.from(r).shift());else if(i=Ct(o),!wt(o,i+1))return;const a={cached:Math.floor(Date.now()/Ae),provider:t.provider,data:e};return Mt(o,W+i.toString(),JSON.stringify(a))}e.lastModified&&!so(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function Xt(){}function io(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,Wn(t)}))}function co(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:s}=t,o=t.iconsToLoad;delete t.iconsToLoad;let r;if(!o||!(r=vt(n)))return;r.prepare(n,s,o).forEach(a=>{Ce(n,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{t.missing.add(l)});else try{const l=kt(t,c);if(!l.length)return;const u=t.pendingIcons;u&&l.forEach(f=>{u.delete(f)}),ro(t,c)}catch(l){console.error(l)}io(t)})})}))}const Nt=(t,e)=>{const n=Yn(t,!0,xe()),s=Qn(n);if(!s.pending.length){let c=!0;return e&&setTimeout(()=>{c&&e(s.loaded,s.missing,s.pending,Xt)}),()=>{c=!1}}const o=Object.create(null),r=[];let i,a;return s.pending.forEach(c=>{const{provider:l,prefix:u}=c;if(u===a&&l===i)return;i=l,a=u,r.push(O(l,u));const f=o[l]||(o[l]=Object.create(null));f[u]||(f[u]=[])}),s.pending.forEach(c=>{const{provider:l,prefix:u,name:f}=c,p=O(l,u),m=p.pendingIcons||(p.pendingIcons=new Set);m.has(f)||(m.add(f),o[l][u].push(f))}),r.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&co(c,o[l][u])}),e?Jn(e,s,r):Xt},ao=t=>new Promise((e,n)=>{const s=typeof t=="string"?J(t,!0):t;if(!s){n(t);return}Nt([s||t],o=>{if(o.length&&s){const r=Q(s);if(r){e({...Z,...r});return}}n(t)})});function lo(t){try{const e=typeof t=="string"?JSON.parse(t):t;if(typeof e.body=="string")return{...e}}catch{}}function uo(t,e){const n=typeof t=="string"?J(t,!0,!0):null;if(!n){const r=lo(t);return{value:t,data:r}}const s=Q(n);if(s!==void 0||!n.prefix)return{value:t,name:n,data:s};const o=Nt([n],()=>e(t,n,Q(n)));return{value:t,name:n,loading:o}}function mt(t){return t.hasAttribute("inline")}let ke=!1;try{ke=navigator.vendor.indexOf("Apple")===0}catch{}function fo(t,e){switch(e){case"svg":case"bg":case"mask":return e}return e!=="style"&&(ke||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}const po=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ho=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function St(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const s=t.split(po);if(s===null||!s.length)return t;const o=[];let r=s.shift(),i=ho.test(r);for(;;){if(i){const a=parseFloat(r);isNaN(a)?o.push(r):o.push(Math.ceil(a*e*n)/n)}else o.push(r);if(r=s.shift(),r===void 0)return o.join("");i=!i}}const go=t=>t==="unset"||t==="undefined"||t==="none";function Re(t,e){const n={...Z,...t},s={...ge,...e},o={left:n.left,top:n.top,width:n.width,height:n.height};let r=n.body;[n,s].forEach(b=>{const x=[],w=b.hFlip,T=b.vFlip;let v=b.rotate;w?T?v+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):T&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let y;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:y=o.height/2+o.top,x.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:y=o.width/2+o.left,x.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}v%2===1&&(o.left!==o.top&&(y=o.left,o.left=o.top,o.top=y),o.width!==o.height&&(y=o.width,o.width=o.height,o.height=y)),x.length&&(r='<g transform="'+x.join(" ")+'">'+r+"</g>")});const i=s.width,a=s.height,c=o.width,l=o.height;let u,f;i===null?(f=a===null?"1em":a==="auto"?l:a,u=St(f,c/l)):(u=i==="auto"?c:i,f=a===null?St(u,l/c):a==="auto"?l:a);const p={},m=(b,x)=>{go(x)||(p[b]=x.toString())};return m("width",u),m("height",f),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:r}}const mo=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let ct=mo();function bo(t){ct=t}function yo(){return ct}function xo(t,e){const n=dt(t);if(!n)return 0;let s;if(!n.maxURL)s=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const r=e+".json?icons=";s=n.maxURL-o-n.path.length-r.length}return s}function vo(t){return t===404}const Io=(t,e,n)=>{const s=[],o=xo(t,e),r="icons";let i={type:r,provider:t,prefix:e,icons:[]},a=0;return n.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(s.push(i),i={type:r,provider:t,prefix:e,icons:[]},a=c.length),i.icons.push(c)}),s.push(i),s};function wo(t){if(typeof t=="string"){const e=dt(t);if(e)return e.path}return"/"}const Co=(t,e,n)=>{if(!ct){n("abort",424);return}let s=wo(e.provider);switch(e.type){case"icons":{const r=e.prefix,a=e.icons.join(","),c=new URLSearchParams({icons:a});s+=r+".json?"+c.toString();break}case"custom":{const r=e.uri;s+=r.slice(0,1)==="/"?r.slice(1):r;break}default:n("abort",400);return}let o=503;ct(t+s).then(r=>{const i=r.status;if(i!==200){setTimeout(()=>{n(vo(i)?"abort":"next",i)});return}return o=501,r.json()}).then(r=>{if(typeof r!="object"||r===null){setTimeout(()=>{r===404?n("abort",r):n("next",o)});return}setTimeout(()=>{n("success",r)})}).catch(()=>{n("next",o)})},So={prepare:Io,send:Co};function Kt(t,e){switch(t){case"local":case"session":$[t]=e;break;case"all":for(const n in $)$[n]=e;break}}const bt="data-style";let Me="";function Ao(t){Me=t}function te(t,e){let n=Array.from(t.childNodes).find(s=>s.hasAttribute&&s.hasAttribute(bt));n||(n=document.createElement("style"),n.setAttribute(bt,bt),t.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block}"+Me}function Oe(){Ut("",So),xe(!0);let t;try{t=window}catch{}if(t){if(je(),t.IconifyPreload!==void 0){const n=t.IconifyPreload,s="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!Gt(o))&&console.error(s)}catch{console.error(s)}})}if(t.IconifyProviders!==void 0){const n=t.IconifyProviders;if(typeof n=="object"&&n!==null)for(const s in n){const o="IconifyProviders["+s+"] is invalid.";try{const r=n[s];if(typeof r!="object"||!r||r.resources===void 0)continue;Qt(s,r)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>Kt(n,!0),disableCache:n=>Kt(n,!1),iconExists:Gn,getIcon:Un,listIcons:Dn,addIcon:ve,addCollection:Gt,calculateSize:St,buildIcon:Re,loadIcons:Nt,loadIcon:ao,addAPIProvider:Qt,appendCustomStyle:Ao,_api:{getAPIConfig:dt,setAPIModule:Ut,sendAPIQuery:Ce,setFetch:bo,getFetch:yo,listAPIProviders:to}}}function Ne(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in e)n+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function Po(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function To(t){return"data:image/svg+xml,"+Po(t)}function Lo(t){return'url("'+To(t)+'")'}const At={"background-color":"currentColor"},_e={"background-color":"transparent"},ee={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},ne={"-webkit-mask":At,mask:At,background:_e};for(const t in ne){const e=ne[t];for(const n in ee)e[t+"-"+n]=ee[n]}function oe(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function jo(t,e,n){const s=document.createElement("span");let o=t.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const r=t.attributes,i=Ne(o,{...r,width:e.width+"",height:e.height+""}),a=Lo(i),c=s.style,l={"--svg":a,width:oe(r.width),height:oe(r.height),...n?At:_e};for(const u in l)c.setProperty(u,l[u]);return s}let G;function ko(){try{G=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{G=null}}function Ro(t){return G===void 0&&ko(),G?G.createHTML(t):t}function Mo(t){const e=document.createElement("span"),n=t.attributes;let s="";n.width||(s="width: inherit;"),n.height||(s+="height: inherit;"),s&&(n.style=s);const o=Ne(t.body,n);return e.innerHTML=Ro(o),e.firstChild}function se(t,e){const n=e.icon.data,s=e.customisations,o=Re(n,s);s.preserveAspectRatio&&(o.attributes.preserveAspectRatio=s.preserveAspectRatio);const r=e.renderedMode;let i;switch(r){case"svg":i=Mo(o);break;default:i=jo(o,{...Z,...n},r==="mask")}const a=Array.from(t.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):t.replaceChild(i,a):t.appendChild(i)}function re(t,e,n){const s=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:e,icon:t,lastRender:s}}function Oo(t="iconify-icon"){let e,n;try{e=window.customElements,n=window.HTMLElement}catch{return}if(!e||!n)return;const s=e.get(t);if(s)return s;const o=["icon","mode","inline","width","height","rotate","flip"],r=class extends n{constructor(){super();tt(this,"_shadowRoot");tt(this,"_state");tt(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=mt(this);te(c,l),this._state=re({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=mt(this),u=this._state;l!==u.inline&&(u.inline=l,te(this._shadowRoot,l))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return mt(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const l=this._shadowRoot;if(c.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}se(l,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,l=this.getAttribute("icon");if(l!==c.icon.value){this._iconChanged(l);return}if(!c.rendered)return;const u=this.getAttribute("mode"),f=Vt(this);(c.attrMode!==u||En(c.customisations,f))&&this._renderIcon(c.icon,f,u)}_iconChanged(c){const l=uo(c,(u,f,p)=>{const m=this._state;if(m.rendered||this.getAttribute("icon")!==u)return;const b={value:u,name:f,data:p};b.data?this._gotIconData(b):m.icon=b});l.data?this._gotIconData(l):this._state=re(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,Vt(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const f=fo(c.data.body,u),p=this._state.inline;se(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:f})}};o.forEach(a=>{a in r.prototype||Object.defineProperty(r.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=Oe();for(const a in i)r[a]=r.prototype[a]=i[a];return e.define(t,r),r}Oo()||Oe();const No=d.shape({appLogo:d.node,appName:d.string,theme:d.shape({background:d.string}),enableConnect:d.bool,enableLocale:d.bool,navigation:d.arrayOf(d.shape({title:d.oneOfType([d.string,d.object]),link:d.oneOfType([d.string,d.object]),icon:d.string,items:d.arrayOf(d.shape({title:d.oneOfType([d.string,d.object]),link:d.oneOfType([d.string,d.object])}))}))}),$e=d.shape({showText:d.bool,showRole:d.bool,switchDid:d.bool,switchProfile:d.bool,switchPassport:d.bool,disableLogout:d.bool,onLogin:d.func,onLogout:d.func,onSwitchDid:d.func,onSwitchProfile:d.func,onSwitchPassport:d.func,menu:d.array,menuRender:d.func,dark:d.bool,size:d.number}),Y=(t,e,n="children")=>t.map(s=>Array.isArray(s[n])?e({...s,[n]:Y(s[n],e,n)}):e(s)),_o=(t,e="children")=>{const n=[];return Y(t,s=>n.push(s),e),n},_t=(t,e,n="children")=>t.map(s=>({...s})).filter(s=>{const o=s[n];if(Array.isArray(o)){const i=_t(o,e,n);s[n]=i!=null&&i.length?i:void 0}const r={filteredChildren:s[n],isLeaf:!(o!=null&&o.length)};return e(s,r)}),$o=t=>/^https?:\/\//.test(t),Yo=t=>/^[\w-]+:[\w-]+$/.test(t),Eo=t=>{if(!t||!(t!=null&&t.startsWith("/")))return!1;const e=o=>o.endsWith("/")?o:`${o}/`,n=e(window.location.pathname),s=e(new URL(t,window.location.origin).pathname);return n.startsWith(s)},Fo=(t=[])=>{const e=t.map((s,o)=>({path:s,index:o})).filter(s=>Eo(s.path));return e!=null&&e.length?e.slice(1).reduce((s,o)=>s.path.length>=o.path.length?s:o,e[0]).index:-1};var ie,ce;const at=((ie=window==null?void 0:window.blocklet)==null?void 0:ie.groupPrefix)||((ce=window==null?void 0:window.blocklet)==null?void 0:ce.prefix)||"/",qo=t=>{const e={...t},n=t==null?void 0:t.background;return typeof n=="string"?e.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(e.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),e},Ee=(t,e="en")=>{if(!(t!=null&&t.length))return t;const n=(o,r)=>typeof o=="string"?o:typeof o=="object"?o[r]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,s=(o,r)=>{if(typeof o=="string"){if($o(o)){const a=new URL(o);return a.searchParams.set("locale",r),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",r),i.pathname+i.search}return typeof o=="object"?o[r]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return Y(t,o=>{var r;return{...o,title:n(o.title,e),link:(r=o.items)!=null&&r.length?o.link:s(o.link,e),_rawLink:o.link}},"items")},Bo=t=>Y(t,e=>e.role?{...e,role:Array.isArray(e.role)?e.role:[e.role]}:e,"items"),zo=t=>{if(!(t!=null&&t.length))return null;const e=Bo(t),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return e.forEach(s=>{var o;s.section?Array.isArray(s.section)?s.section.forEach(r=>{var i;(i=n[r])==null||i.push(s)}):typeof s.section=="string"&&((o=n[s.section])==null||o.push(s)):n.header.push(s)}),n},Ho=t=>{if(!t)return null;const e={...t};return e.theme=qo(e.theme),e.navigation=zo(Vo(e.navigation)),e},Vo=(t=[])=>_t(t,(e,n)=>{var s;return!!e.link||((s=n.filteredChildren)==null?void 0:s.length)},"items"),Fe=(t,e)=>_t(t,(n,s)=>{var r;const o=!n.role||e&&n.role.includes(e);return s.isLeaf?o:o&&((r=s.filteredChildren)==null?void 0:r.length)},"items"),Do={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"/>'},Go={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"/>'};function $t({session:t,locale:e,size:n}){const s=(window==null?void 0:window.blocklet)||{},o=(s.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=t==null?void 0:t.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((s==null?void 0:s.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),r=I.useRef(null),i=De({open:!1}),a=Ge((c=!i.open)=>{i.open=c});return o.length===0||!(t!=null&&t.user)?null:h.jsxs(h.Fragment,{children:[h.jsx(Ue,{size:"medium",ref:r,onClick:()=>a(),children:h.jsx(Ht,{icon:Do,fontSize:n,style:{transform:"scale(1.08)"}})}),h.jsx(Qe,{open:i.open,onClose:()=>a(!1),anchorEl:r.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>h.jsx(We,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:h.jsx(Ze,{...c,timeout:350,children:h.jsxs(Je,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:k.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${k.gray6}, 0px 0px 0px 1px ${k.gray6}`},children:[h.jsx(Ye,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:o.map(l=>{var u,f;return h.jsx(Mn,{disablePadding:!0,children:h.jsxs(xn,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:k.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?h.jsx(Xe,{component:"img",src:`${Ke}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):h.jsx(Ht,{fontSize:50,icon:l.icon||Go,color:k.textSubtitle}),h.jsx(tn,{sx:{fontSize:"12px",color:k.textBase,textAlign:"center",lineHeight:"normal"},children:((f=l.title)==null?void 0:f.zh)||l.title})]})},l.id)})}),h.jsx(en,{session:t,children:h.jsx(nn,{variant:"outlined",fullWidth:!0,href:on,sx:{mt:1,borderRadius:2,color:k.textBase,borderColor:k.lineBorderStrong,"&:hover":{color:k.primaryBase,borderColor:k.primaryBase}},children:e==="zh"?"管理":"Manage"})})]})})})})]})}$t.propTypes={session:d.object.isRequired,locale:d.string,size:d.number};$t.defaultProps={locale:"en",size:24};function Et({formattedBlocklet:t,addons:e,sessionManagerProps:n}){var p,m,b,x;const s=I.useContext(de),{locale:o}=fe()||{},{enableConnect:r=!0,enableLocale:i=!0}=t,a=!!((p=s==null?void 0:s.session)!=null&&p.user);let c=Ee((m=t==null?void 0:t.navigation)==null?void 0:m.sessionManager,o)||[];c=Fe(c,(x=(b=s==null?void 0:s.session)==null?void 0:b.user)==null?void 0:x.role);const u=(()=>{if(e&&typeof e!="function")return Array.isArray(e)?e:[e];let w=[];if(i&&o&&w.push(h.jsx(ln,{showText:!1},"locale-selector")),r&&s){const T=[];a&&(c?c.slice(0,5):[]).forEach(y=>{T.push({label:y.title,icon:y.icon?h.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),w.push(h.jsx($t,{session:s.session,locale:o},"session-blocklet")),w.push(h.jsx(sn,{session:s.session,locale:o,menu:T,showRole:!0,...n},"session-user"))}return typeof e=="function"&&(w=e(w)||[]),w})();return I.createElement(h.Fragment,null,...Array.isArray(u)?u:[u])}Et.propTypes={formattedBlocklet:d.object.isRequired,addons:d.oneOfType([d.func,d.node]),sessionManagerProps:$e};Et.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const Uo=()=>{const t=rn();I.useEffect(()=>{t.wallet&&cn(()=>import("./index-APK4pG1u.js").then(e=>e.i),__vite__mapDeps([0,1,2])).then(e=>{e.call||(e=e.default),e.call("arcHideTopBar","{}")}).catch(e=>{console.error("load dsbridge error",e)})},[t])};function qe({meta:t,fallbackUrl:e,invalidPathFallback:n,headerAddons:s,sessionManagerProps:o,links:r,...i}){var R;Uo();const a=I.useContext(de),c=(R=a==null?void 0:a.session)==null?void 0:R.user,l=c==null?void 0:c.role,{locale:u}=fe()||{},f=I.useMemo(()=>{const C=Object.assign({},window.blocklet,t);try{return Ho(C)}catch(g){return console.error("Failed to format blocklet info",g,C),C}},[t]),{localizedNav:p,flattened:m,matchedIndex:b}=I.useMemo(()=>{var L;let C=Ee((L=f==null?void 0:f.navigation)==null?void 0:L.dashboard,u)||[];C=Fe(C,l),C=Y(C,A=>({title:A.title,url:A.link,icon:A.icon?h.jsx("iconify-icon",{height:"100%",width:"100%",icon:A.icon}):null,external:!0,children:A.items}),"items");const g=_o(C).filter(A=>!!A.url),S=Fo(g.map(A=>A.url));return S!==-1&&(g[S].active=!0),{localizedNav:C,flattened:g,matchedIndex:S}},[f,u,l]),x=typeof r=="function"?r(p):[...p,...r];if(I.useLayoutEffect(()=>{c&&!(m!=null&&m.length)&&e&&(window.location.href=e)},[e]),I.useLayoutEffect(()=>{var C;c&&(m!=null&&m.length)&&b===-1&&(n?n():window.location.href=((C=m[0])==null?void 0:C.url)||at)},[n,m,b]),!f.appName)return null;const{appLogo:w,appLogoRect:T,appName:v}=f,y=h.jsx(Et,{formattedBlocklet:f,addons:s,sessionManagerProps:o});return h.jsx(an,{title:v,fullWidth:!0,sidebarWidth:128,legacy:!1,links:x,...i,headerProps:{homeLink:at,logo:h.jsx("img",{src:T||w,alt:"logo"}),addons:y,...i.headerProps}})}qe.propTypes={meta:No,fallbackUrl:d.string,invalidPathFallback:d.func,headerAddons:d.oneOfType([d.func,d.node]),sessionManagerProps:$e,links:d.oneOfType([d.array,d.func])};qe.defaultProps={meta:{},fallbackUrl:at,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=at}},links:[]};export{qe as D,Et as H,Yo as a,No as b,_o as c,Fo as d,Ho as f,Ee as g,$o as i,Y as m,at as p,$e as s,Uo as u};
|
|
12
12
|
function __vite__mapDeps(indexes) {
|
|
13
13
|
if (!__vite__mapDeps.viteFileDeps) {
|
|
14
|
-
__vite__mapDeps.viteFileDeps = ["assets/index-
|
|
14
|
+
__vite__mapDeps.viteFileDeps = ["assets/index-APK4pG1u.js","assets/index-Lb1ehBCY.js","assets/index-TCTrVMXW.css"]
|
|
15
15
|
}
|
|
16
16
|
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
17
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{bP as e,P as o,r as u,j as p,bQ as b,bR as h,by as x,R as w}from"./index-Lb1ehBCY.js";const c={error:{color:e.common.white,backgroundColor:e.error.main},warning:{color:e.common.white,backgroundColor:e.warning.main},success:{color:e.common.white,backgroundColor:e.success.main},primary:{color:e.common.white,backgroundColor:e.primary.main},reverse:{color:"#fff",backgroundColor:"#222"}};function s(n){const t=h(n,s,["style"]),{type:r,content:l,children:m,style:y,className:g,forwardedRef:d,...f}=t,{palette:a}=x(),i=Object.assign({},c[r]||c.primary,y);return a[r]&&Object.assign(i,{color:a[r].contrastText||e.common.white,backgroundColor:a[r].main}),p.jsx(j,{ref:d,component:"span",className:g,style:i,...f,children:l||m})}s.propTypes={children:o.any.isRequired,type:o.oneOf(Object.keys(c)),content:o.string,className:o.string,style:o.oneOfType([o.object,o.string])};s.defaultProps={type:"primary",content:"",className:"",style:{}};const T=u.forwardRef((n,t)=>p.jsx(s,{...n,forwardedRef:t})),C=T,j=b(w)`
|
|
2
2
|
&& {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
justify-content: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fN as
|
|
1
|
+
import{fN as J,r as P,dl as V,dk as x,dm as $,gb as S,gc as j,gd as B,ge as N,em as Q}from"./index-Lb1ehBCY.js";var U=function(i,e){return i===void 0&&(i=[]),e===void 0&&(e=[]),J(i,e)},X=function(i,e,r){var n=P.useRef(),t=P.useRef(0);U(e,n.current)||(n.current=e,t.current+=1),V(i,[t.current],r)},Y=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator==null?void 0:navigator.platform:""),D={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:Y?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},R={ctrl:function(i){return i.ctrlKey},shift:function(i){return i.shiftKey},alt:function(i){return i.altKey},meta:function(i){return i.type==="keyup"?D.meta.includes(i.keyCode):i.metaKey}};function G(i){return j(i)||B(i)}function Z(i){var e=Object.keys(R).reduce(function(r,n){return R[n](i)?r+1:r},0);return[16,17,18,91,92].includes(i.keyCode)?e:e+1}function q(i,e,r){var n,t;if(!i.key)return!1;if(B(e))return i.keyCode===e?e:!1;var l=e.split("."),a=0;try{for(var f=S(l),o=f.next();!o.done;o=f.next()){var c=o.value,s=R[c],u=D[c.toLowerCase()];(s&&s(i)||u&&u===i.keyCode)&&a++}}catch(b){n={error:b}}finally{try{o&&!o.done&&(t=f.return)&&t.call(f)}finally{if(n)throw n.error}}return r?a===l.length&&Z(i)===l.length?e:!1:a===l.length?e:!1}function p(i,e){return N(i)?i:G(i)?function(r){return q(r,i,e)}:Array.isArray(i)?function(r){return i.find(function(n){return q(r,n,e)})}:function(){return!!i}}var O=["keydown"];function _(i,e,r){var n=r||{},t=n.events,l=t===void 0?O:t,a=n.target,f=n.exactMatch,o=f===void 0?!1:f,c=n.useCapture,s=c===void 0?!1:c,u=x(e),b=x(i);X(function(){var k,m,L,v=$(a,window);if(v){var T=function(g){var C,E=p(b.current,o),h=E(g),y=G(h)?h:g.key;if(h)return(C=u.current)===null||C===void 0?void 0:C.call(u,g,y)};try{for(var K=S(l),A=K.next();!A.done;A=K.next()){var H=A.value;(L=v==null?void 0:v.addEventListener)===null||L===void 0||L.call(v,H,T,s)}}catch(g){k={error:g}}finally{try{A&&!A.done&&(m=K.return)&&m.call(K)}finally{if(k)throw k.error}}return function(){var g,C,E;try{for(var h=S(l),y=h.next();!y.done;y=h.next()){var M=y.value;(E=v==null?void 0:v.removeEventListener)===null||E===void 0||E.call(v,M,T,s)}}catch(W){g={error:W}}finally{try{y&&!y.done&&(C=h.return)&&C.call(h)}finally{if(g)throw g.error}}}}},[l],a)}function d(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}function z(i,e){for(var r="",n=0,t=-1,l=0,a,f=0;f<=i.length;++f){if(f<i.length)a=i.charCodeAt(f);else{if(a===47)break;a=47}if(a===47){if(!(t===f-1||l===1))if(t!==f-1&&l===2){if(r.length<2||n!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var o=r.lastIndexOf("/");if(o!==r.length-1){o===-1?(r="",n=0):(r=r.slice(0,o),n=r.length-1-r.lastIndexOf("/")),t=f,l=0;continue}}else if(r.length===2||r.length===1){r="",n=0,t=f,l=0;continue}}e&&(r.length>0?r+="/..":r="..",n=2)}else r.length>0?r+="/"+i.slice(t+1,f):r=i.slice(t+1,f),n=f-t-1;t=f,l=0}else a===46&&l!==-1?++l:l=-1}return r}function I(i,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+i+n:n}var w={resolve:function(){for(var e="",r=!1,n,t=arguments.length-1;t>=-1&&!r;t--){var l;t>=0?l=arguments[t]:(n===void 0&&(n=Q.cwd()),l=n),d(l),l.length!==0&&(e=l+"/"+e,r=l.charCodeAt(0)===47)}return e=z(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(d(e),e.length===0)return".";var r=e.charCodeAt(0)===47,n=e.charCodeAt(e.length-1)===47;return e=z(e,!r),e.length===0&&!r&&(e="."),e.length>0&&n&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return d(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,r=0;r<arguments.length;++r){var n=arguments[r];d(n),n.length>0&&(e===void 0?e=n:e+="/"+n)}return e===void 0?".":w.normalize(e)},relative:function(e,r){if(d(e),d(r),e===r||(e=w.resolve(e),r=w.resolve(r),e===r))return"";for(var n=1;n<e.length&&e.charCodeAt(n)===47;++n);for(var t=e.length,l=t-n,a=1;a<r.length&&r.charCodeAt(a)===47;++a);for(var f=r.length,o=f-a,c=l<o?l:o,s=-1,u=0;u<=c;++u){if(u===c){if(o>c){if(r.charCodeAt(a+u)===47)return r.slice(a+u+1);if(u===0)return r.slice(a+u)}else l>c&&(e.charCodeAt(n+u)===47?s=u:u===0&&(s=0));break}var b=e.charCodeAt(n+u),k=r.charCodeAt(a+u);if(b!==k)break;b===47&&(s=u)}var m="";for(u=n+s+1;u<=t;++u)(u===t||e.charCodeAt(u)===47)&&(m.length===0?m+="..":m+="/..");return m.length>0?m+r.slice(a+s):(a+=s,r.charCodeAt(a)===47&&++a,r.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(d(e),e.length===0)return".";for(var r=e.charCodeAt(0),n=r===47,t=-1,l=!0,a=e.length-1;a>=1;--a)if(r=e.charCodeAt(a),r===47){if(!l){t=a;break}}else l=!1;return t===-1?n?"/":".":n&&t===1?"//":e.slice(0,t)},basename:function(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');d(e);var n=0,t=-1,l=!0,a;if(r!==void 0&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var f=r.length-1,o=-1;for(a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(c===47){if(!l){n=a+1;break}}else o===-1&&(l=!1,o=a+1),f>=0&&(c===r.charCodeAt(f)?--f===-1&&(t=a):(f=-1,t=o))}return n===t?t=o:t===-1&&(t=e.length),e.slice(n,t)}else{for(a=e.length-1;a>=0;--a)if(e.charCodeAt(a)===47){if(!l){n=a+1;break}}else t===-1&&(l=!1,t=a+1);return t===-1?"":e.slice(n,t)}},extname:function(e){d(e);for(var r=-1,n=0,t=-1,l=!0,a=0,f=e.length-1;f>=0;--f){var o=e.charCodeAt(f);if(o===47){if(!l){n=f+1;break}continue}t===-1&&(l=!1,t=f+1),o===46?r===-1?r=f:a!==1&&(a=1):r!==-1&&(a=-1)}return r===-1||t===-1||a===0||a===1&&r===t-1&&r===n+1?"":e.slice(r,t)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return I("/",e)},parse:function(e){d(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;var n=e.charCodeAt(0),t=n===47,l;t?(r.root="/",l=1):l=0;for(var a=-1,f=0,o=-1,c=!0,s=e.length-1,u=0;s>=l;--s){if(n=e.charCodeAt(s),n===47){if(!c){f=s+1;break}continue}o===-1&&(c=!1,o=s+1),n===46?a===-1?a=s:u!==1&&(u=1):a!==-1&&(u=-1)}return a===-1||o===-1||u===0||u===1&&a===o-1&&a===f+1?o!==-1&&(f===0&&t?r.base=r.name=e.slice(1,o):r.base=r.name=e.slice(f,o)):(f===0&&t?(r.name=e.slice(1,a),r.base=e.slice(1,o)):(r.name=e.slice(f,a),r.base=e.slice(f,o)),r.ext=e.slice(a,o)),f>0?r.dir=e.slice(0,f-1):t&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};w.posix=w;var ee=w;export{ee as p,_ as u};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{l as q}from"./lottie-
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function re(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ae(t){var e=re(t,"string");return typeof e=="symbol"?e:String(e)}var ie=["animationData","loop","autoplay","initialSegment","onComplete","onLoopComplete","onEnterFrame","onSegmentStart","onConfigReady","onDataReady","onDataFailed","onLoadedImages","onDOMLoaded","onDestroy","lottieRef","renderer","name","assetsPath","rendererSettings"],oe=function(e,r){var n=e.animationData,u=e.loop,c=e.autoplay,o=e.initialSegment,b=e.onComplete,s=e.onLoopComplete,A=e.onEnterFrame,g=e.onSegmentStart,O=e.onConfigReady,w=e.onDataReady,h=e.onDataFailed,l=e.onLoadedImages,L=e.onDOMLoaded,S=e.onDestroy;e.lottieRef,e.renderer,e.name,e.assetsPath,e.rendererSettings;var p=x(e,ie),P=D.useState(!1),d=Z(P,2),C=d[0],I=d[1],i=D.useRef(),v=D.useRef(null),H=function(){var a;(a=i.current)===null||a===void 0||a.play()},M=function(){var a;(a=i.current)===null||a===void 0||a.stop()},F=function(){var a;(a=i.current)===null||a===void 0||a.pause()},V=function(a){var f;(f=i.current)===null||f===void 0||f.setSpeed(a)},N=function(a,f){var m;(m=i.current)===null||m===void 0||m.goToAndPlay(a,f)},B=function(a,f){var m;(m=i.current)===null||m===void 0||m.goToAndStop(a,f)}
|
|
1
|
+
import{l as q}from"./lottie-kQ2xv--6.js";import{r as D,cX as z}from"./index-Lb1ehBCY.js";function G(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,u,c,o,b=[],s=!0,A=!1;try{if(c=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=c.call(r)).done)&&(b.push(n.value),b.length!==e);s=!0);}catch(g){A=!0,u=g}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(A)throw u}}return b}}function E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),r.push.apply(r,n)}return r}function T(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?E(Object(r),!0).forEach(function(n){J(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function J(t,e,r){return e=ae(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Q(t,e){if(t==null)return{};var r={},n=Object.keys(t),u,c;for(c=0;c<n.length;c++)u=n[c],!(e.indexOf(u)>=0)&&(r[u]=t[u]);return r}function x(t,e){if(t==null)return{};var r=Q(t,e),n,u;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);for(u=0;u<c.length;u++)n=c[u],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Z(t,e){return ee(t)||G(t,e)||te(t,e)||ne()}function ee(t){if(Array.isArray(t))return t}function te(t,e){if(t){if(typeof t=="string")return j(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return j(t,e)}}function j(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function re(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ae(t){var e=re(t,"string");return typeof e=="symbol"?e:String(e)}var ie=["animationData","loop","autoplay","initialSegment","onComplete","onLoopComplete","onEnterFrame","onSegmentStart","onConfigReady","onDataReady","onDataFailed","onLoadedImages","onDOMLoaded","onDestroy","lottieRef","renderer","name","assetsPath","rendererSettings"],oe=function(e,r){var n=e.animationData,u=e.loop,c=e.autoplay,o=e.initialSegment,b=e.onComplete,s=e.onLoopComplete,A=e.onEnterFrame,g=e.onSegmentStart,O=e.onConfigReady,w=e.onDataReady,h=e.onDataFailed,l=e.onLoadedImages,L=e.onDOMLoaded,S=e.onDestroy;e.lottieRef,e.renderer,e.name,e.assetsPath,e.rendererSettings;var p=x(e,ie),P=D.useState(!1),d=Z(P,2),C=d[0],I=d[1],i=D.useRef(),v=D.useRef(null),H=function(){var a;(a=i.current)===null||a===void 0||a.play()},M=function(){var a;(a=i.current)===null||a===void 0||a.stop()},F=function(){var a;(a=i.current)===null||a===void 0||a.pause()},V=function(a){var f;(f=i.current)===null||f===void 0||f.setSpeed(a)},N=function(a,f){var m;(m=i.current)===null||m===void 0||m.goToAndPlay(a,f)},B=function(a,f){var m;(m=i.current)===null||m===void 0||m.goToAndStop(a,f)},$=function(a){var f;(f=i.current)===null||f===void 0||f.setDirection(a)},k=function(a,f){var m;(m=i.current)===null||m===void 0||m.playSegments(a,f)},W=function(a){var f;(f=i.current)===null||f===void 0||f.setSubframe(a)},K=function(a){var f;return(f=i.current)===null||f===void 0?void 0:f.getDuration(a)},U=function(){var a;(a=i.current)===null||a===void 0||a.destroy(),i.current=void 0},X=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f;if(v.current){(f=i.current)===null||f===void 0||f.destroy();var m=T(T(T({},e),a),{},{container:v.current});return i.current=q.loadAnimation(m),I(!!i.current),function(){var R;(R=i.current)===null||R===void 0||R.destroy(),i.current=void 0}}};D.useEffect(function(){var y=X();return function(){return y==null?void 0:y()}},[n,u]),D.useEffect(function(){i.current&&(i.current.autoplay=!!c)},[c]),D.useEffect(function(){if(i.current){if(!o){i.current.resetSegments(!0);return}!Array.isArray(o)||!o.length||((i.current.currentRawFrame<o[0]||i.current.currentRawFrame>o[1])&&(i.current.currentRawFrame=o[0]),i.current.setSegment(o[0],o[1]))}},[o]),D.useEffect(function(){var y=[{name:"complete",handler:b},{name:"loopComplete",handler:s},{name:"enterFrame",handler:A},{name:"segmentStart",handler:g},{name:"config_ready",handler:O},{name:"data_ready",handler:w},{name:"data_failed",handler:h},{name:"loaded_images",handler:l},{name:"DOMLoaded",handler:L},{name:"destroy",handler:S}],a=y.filter(function(m){return m.handler!=null});if(a.length){var f=a.map(function(m){var R;return(R=i.current)===null||R===void 0||R.addEventListener(m.name,m.handler),function(){var _;(_=i.current)===null||_===void 0||_.removeEventListener(m.name,m.handler)}});return function(){f.forEach(function(m){return m()})}}},[b,s,A,g,O,w,h,l,L,S]);var Y=z.createElement("div",T({style:r,ref:v},p));return{View:Y,play:H,stop:M,pause:F,setSpeed:V,goToAndStop:B,goToAndPlay:N,setDirection:$,playSegments:k,setSubframe:W,getDuration:K,destroy:U,animationContainerRef:v,animationLoaded:C,animationItem:i.current}};function ue(t){var e=t.getBoundingClientRect(),r=e.top,n=e.height,u=window.innerHeight-r,c=window.innerHeight+n;return u/c}function le(t,e,r){var n=t.getBoundingClientRect(),u=n.top,c=n.left,o=n.width,b=n.height,s=(e-c)/o,A=(r-u)/b;return{x:s,y:A}}var se=function(e){var r=e.wrapperRef,n=e.animationItem,u=e.mode,c=e.actions;D.useEffect(function(){var o=r.current;if(!(!o||!n||!c.length)){n.stop();var b=function(){var g=null,O=function(){var h=ue(o),l=c.find(function(S){var p=S.visibility;return p&&h>=p[0]&&h<=p[1]});if(l){if(l.type==="seek"&&l.visibility&&l.frames.length===2){var L=l.frames[0]+Math.ceil((h-l.visibility[0])/(l.visibility[1]-l.visibility[0])*l.frames[1]);//! goToAndStop must be relative to the start of the current segment
|
|
3
3
|
n.goToAndStop(L-n.firstFrame-1,!0)}l.type==="loop"&&(g===null||g!==l.frames||n.isPaused)&&(n.playSegments(l.frames,!0),g=l.frames),l.type==="play"&&n.isPaused&&(n.resetSegments(!0),n.play()),l.type==="stop"&&n.goToAndStop(l.frames[0]-n.firstFrame-1,!0)}};return document.addEventListener("scroll",O),function(){document.removeEventListener("scroll",O)}},s=function(){var g=function(l,L){var S=l,p=L;if(S!==-1&&p!==-1){var P=le(o,S,p);S=P.x,p=P.y}var d=c.find(function(i){var v=i.position;return v&&Array.isArray(v.x)&&Array.isArray(v.y)?S>=v.x[0]&&S<=v.x[1]&&p>=v.y[0]&&p<=v.y[1]:v&&!Number.isNaN(v.x)&&!Number.isNaN(v.y)?S===v.x&&p===v.y:!1});if(d){if(d.type==="seek"&&d.position&&Array.isArray(d.position.x)&&Array.isArray(d.position.y)&&d.frames.length===2){var C=(S-d.position.x[0])/(d.position.x[1]-d.position.x[0]),I=(p-d.position.y[0])/(d.position.y[1]-d.position.y[0]);n.playSegments(d.frames,!0),n.goToAndStop(Math.ceil((C+I)/2*(d.frames[1]-d.frames[0])),!0)}d.type==="loop"&&n.playSegments(d.frames,!0),d.type==="play"&&(n.isPaused&&n.resetSegments(!1),n.playSegments(d.frames)),d.type==="stop"&&n.goToAndStop(d.frames[0],!0)}},O=function(l){g(l.clientX,l.clientY)},w=function(){g(-1,-1)};return o.addEventListener("mousemove",O),o.addEventListener("mouseout",w),function(){o.removeEventListener("mousemove",O),o.removeEventListener("mouseout",w)}};switch(u){case"scroll":return b();case"cursor":return s()}}},[u,n])},de=function(e){var r=e.actions,n=e.mode,u=e.lottieObj,c=u.animationItem,o=u.View,b=u.animationContainerRef;return se({actions:r,animationItem:c,mode:n,wrapperRef:b}),o},fe=["style","interactivity"],ve=function(e){var r,n,u,c=e.style,o=e.interactivity,b=x(e,fe),s=oe(b,c),A=s.View,g=s.play,O=s.stop,w=s.pause,h=s.setSpeed,l=s.goToAndStop,L=s.goToAndPlay,S=s.setDirection,p=s.playSegments,P=s.setSubframe,d=s.getDuration,C=s.destroy,I=s.animationContainerRef,i=s.animationLoaded,v=s.animationItem;return D.useEffect(function(){e.lottieRef&&(e.lottieRef.current={play:g,stop:O,pause:w,setSpeed:h,goToAndPlay:L,goToAndStop:l,setDirection:S,playSegments:p,setSubframe:P,getDuration:d,destroy:C,animationContainerRef:I,animationLoaded:i,animationItem:v})},[(r=e.lottieRef)===null||r===void 0?void 0:r.current]),de({lottieObj:{View:A,play:g,stop:O,pause:w,setSpeed:h,goToAndStop:l,goToAndPlay:L,setDirection:S,playSegments:p,setSubframe:P,getDuration:d,destroy:C,animationContainerRef:I,animationLoaded:i,animationItem:v},actions:(n=o==null?void 0:o.actions)!==null&&n!==void 0?n:[],mode:(u=o==null?void 0:o.mode)!==null&&u!==void 0?u:"scroll"})};export{q as LottiePlayer,ve as default,oe as useLottie,de as useLottieInteractivity};
|