@abtnode/webapp 1.16.52-beta-20250912-112002-e3499e9c → 1.16.52-beta-20250917-070942-7ee57044
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{AdapterDayjs-DBb6evn-.js → AdapterDayjs-DarkZR9j.js} +1 -1
- package/dist/assets/{Add-Nm-0HQuZ.js → Add-BsCasUcs.js} +1 -1
- package/dist/assets/ArrowDropDown-BbXAaeVr.js +1 -0
- package/dist/assets/{Autocomplete-Bxg_V7oZ.js → Autocomplete-DjYVg0xw.js} +1 -1
- package/dist/assets/{Breadcrumbs-BstonFkA.js → Breadcrumbs-vVVRZsjN.js} +1 -1
- package/dist/assets/{ButtonGroup-BdiA1ieO.js → ButtonGroup-CF6fFlve.js} +1 -1
- package/dist/assets/{CSSTransition-BNoCWHCT.js → CSSTransition-DSxV7K4V.js} +1 -1
- package/dist/assets/{CallMerge-3ONMFKaC.js → CallMerge-odntUl5s.js} +1 -1
- package/dist/assets/{CardContent-Bf9xFcVF.js → CardContent-Bx23N-y1.js} +1 -1
- package/dist/assets/{ChevronLeft-BcYwe1Np.js → ChevronLeft-DneAQDKO.js} +1 -1
- package/dist/assets/{ChevronRight-D-piYz4L.js → ChevronRight-C_XYjhxd.js} +1 -1
- package/dist/assets/{Clear-Byq43mbH.js → Clear-dbJWv3QG.js} +1 -1
- package/dist/assets/{DeleteOutline--HOjaz49.js → DeleteOutline-BQGJu1ed.js} +1 -1
- package/dist/assets/{Done-DUEpKVRM.js → Done-BjzLVAB9.js} +1 -1
- package/dist/assets/{Edit-BvYCDhH_.js → Edit-CbphF2M-.js} +1 -1
- package/dist/assets/{ErrorOutline-BC1DA45P.js → ErrorOutline-BL3sEekq.js} +1 -1
- package/dist/assets/{FilterList-C4BaYlJk.js → FilterList-DgzeYNjK.js} +1 -1
- package/dist/assets/{Google-BTtWuSai.js → Google-BklBOHcq.js} +1 -1
- package/dist/assets/{HelpOutline-CxFR9PYg.js → HelpOutline-B9rq5AT4.js} +1 -1
- package/dist/assets/{Launch-DdOm8awH.js → Launch-D-Zf7oaA.js} +1 -1
- package/dist/assets/{Link-BXILtS1X.js → Link-Lf9shwST.js} +1 -1
- package/dist/assets/{ListItemButton-B252NuSM.js → ListItemButton-CBCcz25V.js} +1 -1
- package/dist/assets/{ListSubheader-CjR9d2qi.js → ListSubheader-BYRJFOMa.js} +1 -1
- package/dist/assets/{LoadingButton-CCFZxRBF.js → LoadingButton-B2KbS3tl.js} +1 -1
- package/dist/assets/{MoreVert-DpOqnc7J.js → MoreVert-B0v12xlt.js} +1 -1
- package/dist/assets/{OpenInNew-YONC4zqV.js → OpenInNew-DpFE4qHg.js} +1 -1
- package/dist/assets/{Refresh-B_CqSdgJ.js → Refresh-DYNB8V6v.js} +1 -1
- package/dist/assets/{Search-ChuYh2xV.js → Search-TKSWz34N.js} +1 -1
- package/dist/assets/{Stepper-Cz4zGS1X.js → Stepper-C1wqVhiQ.js} +1 -1
- package/dist/assets/{Switch-Crle-Atf.js → Switch-p1fa_uPC.js} +1 -1
- package/dist/assets/{TableSearch-DLAP28ea.js → TableSearch-DH2QxdMb.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-CNBxuavk.js → ToggleButtonGroup-BtechD_B.js} +1 -1
- package/dist/assets/{Verified-BoP0hME9.js → Verified-zfe6nsBp.js} +1 -1
- package/dist/assets/{VerifiedUser-DRi8NOWE.js → VerifiedUser-2_jqMje1.js} +1 -1
- package/dist/assets/{ViewList-skvvV5Bw.js → ViewList-5h6twi3p.js} +1 -1
- package/dist/assets/{_createAggregator-DUVOYxGS.js → _createAggregator-BRC6hvO7.js} +1 -1
- package/dist/assets/{actions-CKEgNOLf.js → actions-D8IVwECn.js} +1 -1
- package/dist/assets/{actions-BuX32_FY.js → actions-DwZg2R6k.js} +1 -1
- package/dist/assets/{agreement-BZ_yiLzn.js → agreement-BPDJWeCJ.js} +1 -1
- package/dist/assets/api-TFCv4qOf.js +1 -0
- package/dist/assets/{appearance-_yT5hZvM.js → appearance-BiVRoiwT.js} +1 -1
- package/dist/assets/{audit-logs-KO9TwNQH.js → audit-logs-BQFBhT5n.js} +1 -1
- package/dist/assets/{base-chart-DyplmUQs.js → base-chart-Zi8pdr17.js} +1 -1
- package/dist/assets/{blocklet-BepSnsS4.js → blocklet-C03sDJ1i.js} +1 -1
- package/dist/assets/{chain-DVuB4tA_.js → chain-CKxf9AdU.js} +1 -1
- package/dist/assets/{click-to-copy-Dlvnt0pX.js → click-to-copy-OQVm3W8D.js} +1 -1
- package/dist/assets/client-1fyhaZ1u.js +1 -0
- package/dist/assets/cloneDeep-DiUBoCJs.js +1 -0
- package/dist/assets/{collapse-GWSPzyG0.js → collapse-CmEfNn01.js} +1 -1
- package/dist/assets/{config-navigation-BgpPfoeH.js → config-navigation-BUpRpuRp.js} +3 -3
- package/dist/assets/{connect-to-BkIz4VkQ.js → connect-to-Ccnb4QWA.js} +1 -1
- package/dist/assets/{cssMode-BqE7jz26.js → cssMode-BDx-0Yhk.js} +1 -1
- package/dist/assets/{delete-confirm-DKFeNts9.js → delete-confirm-B4ZWgco3.js} +1 -1
- package/dist/assets/{depsEqual-CHzTtbxB.js → depsEqual-DUSDIMu_.js} +1 -1
- package/dist/assets/{detail-CGtu6Fih.js → detail-DD7Yilol.js} +3 -3
- package/dist/assets/{domains-BsDpjUcO.js → domains-tnLuDLA-.js} +1 -1
- package/dist/assets/{download-D3Q64sHV.js → download-DHO_qxiG.js} +1 -1
- package/dist/assets/{edit.svg-CP6Zg7Yn.js → edit.svg-CaGUvrvT.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-DzLuQ31t.js +1 -0
- package/dist/assets/engine-BTmStHRK.js +1 -0
- package/dist/assets/{freemarker2-BKjZrsKk.js → freemarker2-CvE_6GlU.js} +1 -1
- package/dist/assets/{get-safe-url-CeZ-qdMI.js → get-safe-url-DL1Ksc1t.js} +1 -1
- package/dist/assets/getValidReactChildren-DV_bKjsu.js +1 -0
- package/dist/assets/{graphqlMode-CjoWUMen.js → graphqlMode-DgW4p_1y.js} +2 -2
- package/dist/assets/{handlebars-D4VqTBV0.js → handlebars-B0Tsx3G2.js} +1 -1
- package/dist/assets/{html-B8-39ONg.js → html-DPsrcobJ.js} +1 -1
- package/dist/assets/{html-title-C3ppIMLo.js → html-title-CLvLOLbR.js} +1 -1
- package/dist/assets/{htmlMode-D_hkL8Y2.js → htmlMode-C2oN13HO.js} +1 -1
- package/dist/assets/{iframe-DM7J9bTw.js → iframe-CujpH5O-.js} +1 -1
- package/dist/assets/{index-Y8s37NGw.js → index-BDnrYBbd.js} +3 -3
- package/dist/assets/{index-Df57ynzL.js → index-BFj_BZkU.js} +1 -1
- package/dist/assets/{index-DPmW2bpf.js → index-BGsVf6ce.js} +1 -1
- package/dist/assets/{index-CMVWYlSS.js → index-BPByI5gc.js} +1 -1
- package/dist/assets/{index-5gNwXWqN.js → index-BbhrM_fS.js} +2 -2
- package/dist/assets/{index-CsOqGkqk.js → index-Bc-kttJk.js} +1 -1
- package/dist/assets/{index-BAAuc8Ew.js → index-BpHIZRoQ.js} +1 -1
- package/dist/assets/{index-Cm_b8Flm.js → index-BwFgT4f9.js} +1 -1
- package/dist/assets/{index-DVdNmG_a.js → index-BwW-ib72.js} +1 -1
- package/dist/assets/index-BzS7dp1G.js +1 -0
- package/dist/assets/{index-CMiO509B.js → index-C0GpgF9K.js} +1 -1
- package/dist/assets/{index-DqaIgRms.js → index-CGv5PXND.js} +1 -1
- package/dist/assets/{index-B523Fc-A.js → index-CIs0ueGA.js} +1 -1
- package/dist/assets/{index-CZ5i5rS1.js → index-CMwvr3Aw.js} +1 -1
- package/dist/assets/index-CT2y-lAr.js +113 -0
- package/dist/assets/{index-BMi9AMJp.js → index-CW58JS3K.js} +3 -3
- package/dist/assets/{index-BP72zVCn.js → index-CvrjkLlP.js} +1 -1
- package/dist/assets/{index-pMmJD7z1.js → index-CzpTfDdp.js} +1 -1
- package/dist/assets/{index-W5g_UdBK.js → index-D1rBdThL.js} +1 -1
- package/dist/assets/{index-CDkQEmRV.js → index-DCnEvnl6.js} +1 -1
- package/dist/assets/{index-CJibx1Df.js → index-DEhIkivP.js} +1 -1
- package/dist/assets/{index-CMdMKHT-.js → index-DFduzc0K.js} +1 -1
- package/dist/assets/{index-BIGIUdm6.js → index-DIyvBU1o.js} +1 -1
- package/dist/assets/{index-BKIOscQx.js → index-DL6_plGD.js} +3 -3
- package/dist/assets/{index-DBNKdMXE.js → index-DOu4zwZ4.js} +1 -1
- package/dist/assets/{index-BWUXmF_b.js → index-DPBo5dxQ.js} +1 -1
- package/dist/assets/{index-N_dMIDHu.js → index-DPXRDGCk.js} +3 -3
- package/dist/assets/{index-CkhY2Lmw.js → index-DVDt5rkZ.js} +1 -1
- package/dist/assets/{index-BHgqx3Bf.js → index-Dk3siGj5.js} +1 -1
- package/dist/assets/{index-Ckq9RC5w.js → index-DoLLHsgg.js} +1 -1
- package/dist/assets/{index-CbxASA_d.js → index-Dor9E-YG.js} +1 -1
- package/dist/assets/{index-DCzzBd8S.js → index-DzXOEuwn.js} +1 -1
- package/dist/assets/{index-D6Bc5817.js → index-IE_xZtXx.js} +1 -1
- package/dist/assets/{index-BW_rM4QF.js → index-KQW85_sG.js} +1 -1
- package/dist/assets/{index-BLgY_oUv.js → index-MlQbgg84.js} +1 -1
- package/dist/assets/{index-BrBU-Wb1.js → index-NuBAdQKe.js} +1 -1
- package/dist/assets/{index-D_7bRoL6.js → index-PGkZ-p10.js} +9 -9
- package/dist/assets/{index-DmygiZZZ.js → index-TIc9HsMr.js} +1 -1
- package/dist/assets/{index-DChw5H1T.js → index-Xwhm3Zp4.js} +1 -1
- package/dist/assets/{index-Bze2XJej.js → index-gyjan-8E.js} +1 -1
- package/dist/assets/{index-C_D_tHqD.js → index-hv--3OFd.js} +1 -1
- package/dist/assets/{index-IQ4l9n87.js → index-i6PKUbUv.js} +1 -1
- package/dist/assets/{index-BfhNDOKb.js → index-tJqcQJw8.js} +3 -3
- package/dist/assets/{index-DOtgCqEJ.js → index-uvPvZoSt.js} +1 -1
- package/dist/assets/{index-xRdNYj3Y.js → index-xP3FaEcA.js} +1 -1
- package/dist/assets/{index.esm-Dw_hd_87.js → index.esm-DEWYqPkv.js} +1 -1
- package/dist/assets/{install-from-url-Bpdo5qyj.js → install-from-url-R3-z-Na6.js} +1 -1
- package/dist/assets/{invitation-B6dzYchJ.js → invitation-DnVLx9Vx.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-Dn6RdM0h.js → is-path-prefix-equal-D8k2SijE.js} +1 -1
- package/dist/assets/{item-D5ZMqtgb.js → item-MmXt9J3K.js} +1 -1
- package/dist/assets/{javascript-C8s58XIY.js → javascript-BlyEC1iq.js} +1 -1
- package/dist/assets/{jsonMode-C-4795UU.js → jsonMode-CCzgkgmt.js} +1 -1
- package/dist/assets/{liquid-D2J66XKV.js → liquid-BAEm0H2r.js} +1 -1
- package/dist/assets/{list-header-CFZOSvq3.js → list-header-Crj7BNKL.js} +1 -1
- package/dist/assets/{log-yl39q8DG.js → log-DhVLnKso.js} +1 -1
- package/dist/assets/{lottie-react.esm-CnRZInLM.js → lottie-react.esm-DvvAHvj1.js} +1 -1
- package/dist/assets/{mdx-MSPpP7ua.js → mdx-BamtHgoS.js} +1 -1
- package/dist/assets/{memory-CFbb1yLg.js → memory-CFo0vaiY.js} +1 -1
- package/dist/assets/{metric-C6uV3sSt.js → metric-K7UZeWUX.js} +1 -1
- package/dist/assets/omit-Dd3E6q9F.js +1 -0
- package/dist/assets/{overview-D9CJCKo4.js → overview-HLtH-yCi.js} +1 -1
- package/dist/assets/{permission-CuYYFZUe.js → permission-BdpMR93f.js} +1 -1
- package/dist/assets/{preference-BhbUFlGi.js → preference-Lv54_1NQ.js} +3 -3
- package/dist/assets/{python-Bi74UQqJ.js → python-amBHGt1r.js} +1 -1
- package/dist/assets/{raf-schd.esm-D8Vex_N6.js → raf-schd.esm-CLovL9Is.js} +1 -1
- package/dist/assets/{razor-BNEB2ebt.js → razor-BkTz5FTM.js} +1 -1
- package/dist/assets/{rotate-session-key-BigP7BdT.js → rotate-session-key-BQCEdH4H.js} +1 -1
- package/dist/assets/{runtime-DA9Ph33k.js → runtime-BGo7IAbs.js} +1 -1
- package/dist/assets/schema-wSADEA-R.js +1 -0
- package/dist/assets/sdk-Cav0C3IX.js +1 -0
- package/dist/assets/{service-DJ9FK5Z8.js → service-Bz07Hd--.js} +1 -1
- package/dist/assets/{shorten-label-I7a7Yc81.js → shorten-label-L8CW1JMg.js} +1 -1
- package/dist/assets/{simple-select-D8O8cMQI.js → simple-select-CEHYECyj.js} +1 -1
- package/dist/assets/{spaces-3NySh_Ui.js → spaces-zGV6wwqp.js} +1 -1
- package/dist/assets/{status-H7hmMAu_.js → status-BQ8pfSo7.js} +1 -1
- package/dist/assets/{status-DGaB5Gxo.js → status-vgu2kfq8.js} +1 -1
- package/dist/assets/{switch-control-DyLDeFlC.js → switch-control-CLcUFpZi.js} +1 -1
- package/dist/assets/{table-icons-CNuBC9wj.js → table-icons-PFo7EdLg.js} +1 -1
- package/dist/assets/{team-BWxrfrQj.js → team-DV-g0zdM.js} +1 -1
- package/dist/assets/{toLower-BfB-naRV.js → toLower-DPcdQ2gg.js} +1 -1
- package/dist/assets/toUpper-DFzZf5e9.js +1 -0
- package/dist/assets/{traffic-DT04Pgrf.js → traffic-CsK46tzJ.js} +1 -1
- package/dist/assets/{tsMode-wBsww3Iu.js → tsMode-CuWtRqWJ.js} +1 -1
- package/dist/assets/{typescript-DAIALUV4.js → typescript-DJDXMz0W.js} +1 -1
- package/dist/assets/{url-evaluation-CcNC2lNq.js → url-evaluation-DWvC8Wb1.js} +1 -1
- package/dist/assets/{url-join-C5AKaybv.js → url-join-DekEkeTk.js} +1 -1
- package/dist/assets/{use-mobile-BRBCmVs9.js → use-mobile-CnqtSdkW.js} +1 -1
- package/dist/assets/{use-mobile-CcfXCkk-.js → use-mobile-TlnW5eR4.js} +1 -1
- package/dist/assets/{useAsync--QPFKBLV.js → useAsync-VFQB7kMj.js} +1 -1
- package/dist/assets/{useAsyncRetry-Bi3SSYuy.js → useAsyncRetry-F-WE12rr.js} +1 -1
- package/dist/assets/{useLocalStorage-BjelqNo4.js → useLocalStorage-DnHseBMC.js} +1 -1
- package/dist/assets/{useThemeProps-CDjgUo9Q.js → useThemeProps-C2xCEKGa.js} +1 -1
- package/dist/assets/{util-D_DYnrMU.js → util-C1MSkSwp.js} +1 -1
- package/dist/assets/{wait-container-DziRccnR.js → wait-container-C6RHwOqU.js} +1 -1
- package/dist/assets/{without-wallet-hJBDzVPX.js → without-wallet-CavlEQVy.js} +1 -1
- package/dist/assets/{wrap-locale-D2-3jOqy.js → wrap-locale-DSFFbKk8.js} +1 -1
- package/dist/assets/{xml-Dc8XYvWA.js → xml-eGuTgAY9.js} +1 -1
- package/dist/assets/{yaml-BszAyour.js → yaml-1CNB3lwQ.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-BNqJf_bc.js +0 -1
- package/dist/assets/api-CbSTXzd2.js +0 -1
- package/dist/assets/client-CCDZmJKo.js +0 -1
- package/dist/assets/cloneDeep-DibIRTK6.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-BEoMbinK.js +0 -1
- package/dist/assets/engine-pg2hdUxK.js +0 -1
- package/dist/assets/getValidReactChildren-BTX2zlcG.js +0 -1
- package/dist/assets/index-BhzOVGum.js +0 -113
- package/dist/assets/index-biZUNG--.js +0 -1
- package/dist/assets/omit-D2kGKV7Z.js +0 -1
- package/dist/assets/schema-DTT2Joc8.js +0 -1
- package/dist/assets/sdk-DclzsH0U.js +0 -1
- package/dist/assets/toUpper-Cs1mef-p.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bW as bt,bX as pt,r as u,bY as ft,b_ as W,j as p,b8 as N,cb as At,b$ as ht,bT as Ft,bU as St,d5 as ho,d6 as Ot,d7 as Dt,d8 as Xt,d9 as So,da as vo,bZ as lt,f as mo,db as dt,ca as D,dc as xo,dd as yo,u as go,by as Co,de as wo,df as Bo}from"./index-BfhNDOKb.js";function To(o){return pt("MuiTab",o)}const x=bt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),Io=o=>{const{classes:t,textColor:l,fullWidth:s,wrapped:n,icon:a,label:i,selected:b,disabled:f}=o,v={root:["root",a&&i&&"labelIcon",`textColor${At(l)}`,s&&"fullWidth",n&&"wrapped",b&&"selected",f&&"disabled"],icon:["iconWrapper","icon"]};return ht(v,To,t)},Mo=N(Ft,{name:"MuiTab",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.root,l.label&&l.icon&&t.labelIcon,t[`textColor${At(l.textColor)}`],l.fullWidth&&t.fullWidth,l.wrapped&&t.wrapped,{[`& .${x.iconWrapper}`]:t.iconWrapper},{[`& .${x.icon}`]:t.icon}]}})(St(({theme:o})=>({...o.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="top",style:{[`& > .${x.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="bottom",style:{[`& > .${x.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="start",style:{[`& > .${x.icon}`]:{marginRight:o.spacing(1)}}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="end",style:{[`& > .${x.icon}`]:{marginLeft:o.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${x.selected}`]:{opacity:1},[`&.${x.disabled}`]:{opacity:(o.vars||o).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(o.vars||o).palette.text.secondary,[`&.${x.selected}`]:{color:(o.vars||o).palette.primary.main},[`&.${x.disabled}`]:{color:(o.vars||o).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(o.vars||o).palette.text.secondary,[`&.${x.selected}`]:{color:(o.vars||o).palette.secondary.main},[`&.${x.disabled}`]:{color:(o.vars||o).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:o.typography.pxToRem(12)}}]}))),vt=u.forwardRef(function(t,l){const s=ft({props:t,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:i=!1,fullWidth:b,icon:f,iconPosition:v="top",indicator:C,label:m,onChange:S,onClick:w,onFocus:j,selected:B,selectionFollowsFocus:y,textColor:Z="inherit",value:M,wrapped:rt=!1,...E}=s,A={...s,disabled:a,disableFocusRipple:i,selected:B,icon:!!f,iconPosition:v,label:!!m,fullWidth:b,textColor:Z,wrapped:rt},K=Io(A),U=f&&m&&u.isValidElement(f)?u.cloneElement(f,{className:W(K.icon,f.props.className)}):f,_=P=>{!B&&S&&S(P,M),w&&w(P)},F=P=>{y&&!B&&S&&S(P,M),j&&j(P)};return p.jsxs(Mo,{focusRipple:!i,className:W(K.root,n),ref:l,role:"tab","aria-selected":B,disabled:a,onClick:_,onFocus:F,ownerState:A,tabIndex:B?0:-1,...E,children:[v==="top"||v==="start"?p.jsxs(u.Fragment,{children:[U,m]}):p.jsxs(u.Fragment,{children:[m,U]}),C]})});function Eo(o){return(1+Math.sin(Math.PI*o-Math.PI/2))/2}function Po(o,t,l,s={},n=()=>{}){const{ease:a=Eo,duration:i=300}=s;let b=null;const f=t[o];let v=!1;const C=()=>{v=!0},m=S=>{if(v){n(new Error("Animation cancelled"));return}b===null&&(b=S);const w=Math.min(1,(S-b)/i);if(t[o]=a(w)*(l-f)+f,w>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(m)};return f===l?(n(new Error("Element already at target position")),C):(requestAnimationFrame(m),C)}const Ro={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function ko(o){const{onChange:t,...l}=o,s=u.useRef(),n=u.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return ho(()=>{const i=Ot(()=>{const f=s.current;a(),f!==s.current&&t(s.current)}),b=Dt(n.current);return b.addEventListener("resize",i),()=>{i.clear(),b.removeEventListener("resize",i)}},[t]),u.useEffect(()=>{a(),t(s.current)},[t]),p.jsx("div",{style:Ro,...l,ref:n})}function zo(o){return pt("MuiTabScrollButton",o)}const Wo=bt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),jo=o=>{const{classes:t,orientation:l,disabled:s}=o;return ht({root:["root",l,s&&"disabled"]},zo,t)},Ho=N(Ft,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.root,l.orientation&&t[l.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${Wo.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),$o=u.forwardRef(function(t,l){const s=ft({props:t,name:"MuiTabScrollButton"}),{className:n,slots:a={},slotProps:i={},direction:b,orientation:f,disabled:v,...C}=s,m=Xt(),S={isRtl:m,...s},w=jo(S),j=a.StartScrollButtonIcon??So,B=a.EndScrollButtonIcon??vo,y=lt({elementType:j,externalSlotProps:i.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:S}),Z=lt({elementType:B,externalSlotProps:i.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:S});return p.jsx(Ho,{component:"div",className:W(w.root,n),ref:l,role:null,ownerState:S,tabIndex:null,...C,style:{...C.style,...f==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${m?-90:90}deg)`}},children:b==="left"?p.jsx(j,{...y}):p.jsx(B,{...Z})})});function Lo(o){return pt("MuiTabs",o)}const ut=bt("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Ht=(o,t)=>o===t?o.firstChild:t&&t.nextElementSibling?t.nextElementSibling:o.firstChild,$t=(o,t)=>o===t?o.lastChild:t&&t.previousElementSibling?t.previousElementSibling:o.lastChild,et=(o,t,l)=>{let s=!1,n=l(o,t);for(;n;){if(n===o.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(o,n);else{n.focus();return}}},No=o=>{const{vertical:t,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:i,scrollButtonsHideMobile:b,classes:f}=o;return ht({root:["root",t&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",i&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",b&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Lo,f)},Ao=N("div",{name:"MuiTabs",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[{[`& .${ut.scrollButtons}`]:t.scrollButtons},{[`& .${ut.scrollButtons}`]:l.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,l.vertical&&t.vertical]}})(St(({theme:o})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${ut.scrollButtons}`]:{[o.breakpoints.down("sm")]:{display:"none"}}}}]}))),Fo=N("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.scroller,l.fixed&&t.fixed,l.hideScrollbar&&t.hideScrollbar,l.scrollableX&&t.scrollableX,l.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:o})=>o.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:o})=>o.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:o})=>o.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:o})=>o.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),Oo=N("div",{name:"MuiTabs",slot:"List",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.list,t.flexContainer,l.vertical&&t.flexContainerVertical,l.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:o})=>o.vertical,style:{flexDirection:"column"}},{props:({ownerState:o})=>o.centered,style:{justifyContent:"center"}}]}),Do=N("span",{name:"MuiTabs",slot:"Indicator"})(St(({theme:o})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:o.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(o.vars||o).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(o.vars||o).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),Xo=N(ko)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Lt={},mt=u.forwardRef(function(t,l){const s=ft({props:t,name:"MuiTabs"}),n=mo(),a=Xt(),{"aria-label":i,"aria-labelledby":b,action:f,centered:v=!1,children:C,className:m,component:S="div",allowScrollButtonsMobile:w=!1,indicatorColor:j="primary",onChange:B,orientation:y="horizontal",ScrollButtonComponent:Z,scrollButtons:M="auto",selectionFollowsFocus:rt,slots:E={},slotProps:A={},TabIndicatorProps:K={},TabScrollButtonProps:U={},textColor:_="primary",value:F,variant:P="standard",visibleScrollbar:nt=!1,...Kt}=s,T=P==="scrollable",g=y==="vertical",Y=g?"scrollTop":"scrollLeft",J=g?"top":"left",Q=g?"bottom":"right",st=g?"clientHeight":"clientWidth",V=g?"height":"width",R={...s,component:S,allowScrollButtonsMobile:w,indicatorColor:j,orientation:y,vertical:g,scrollButtons:M,textColor:_,variant:P,visibleScrollbar:nt,fixed:!T,hideScrollbar:T&&!nt,scrollableX:T&&!g,scrollableY:T&&g,centered:v&&!T,scrollButtonsHideMobile:!w},z=No(R),Ut=lt({elementType:E.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:R}),Yt=lt({elementType:E.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:R}),[xt,Vt]=u.useState(!1),[H,yt]=u.useState(Lt),[gt,qt]=u.useState(!1),[Ct,Gt]=u.useState(!1),[wt,Zt]=u.useState(!1),[Bt,_t]=u.useState({overflow:"hidden",scrollbarWidth:0}),Tt=new Map,k=u.useRef(null),$=u.useRef(null),O={slots:E,slotProps:{indicator:K,scrollButton:U,...A}},It=()=>{const e=k.current;let r;if(e){const c=e.getBoundingClientRect();r={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:c.top,bottom:c.bottom,left:c.left,right:c.right}}let d;if(e&&F!==!1){const c=$.current.children;if(c.length>0){const h=c[Tt.get(F)];d=h?h.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:d}},q=dt(()=>{const{tabsMeta:e,tabMeta:r}=It();let d=0,c;g?(c="top",r&&e&&(d=r.top-e.top+e.scrollTop)):(c=a?"right":"left",r&&e&&(d=(a?-1:1)*(r[c]-e[c]+e.scrollLeft)));const h={[c]:d,[V]:r?r[V]:0};if(typeof H[c]!="number"||typeof H[V]!="number")yt(h);else{const I=Math.abs(H[c]-h[c]),L=Math.abs(H[V]-h[V]);(I>=1||L>=1)&&yt(h)}}),at=(e,{animation:r=!0}={})=>{r?Po(Y,k.current,e,{duration:n.transitions.duration.standard}):k.current[Y]=e},Mt=e=>{let r=k.current[Y];g?r+=e:r+=e*(a?-1:1),at(r)},Et=()=>{const e=k.current[st];let r=0;const d=Array.from($.current.children);for(let c=0;c<d.length;c+=1){const h=d[c];if(r+h[st]>e){c===0&&(r=e);break}r+=h[st]}return r},Jt=()=>{Mt(-1*Et())},Qt=()=>{Mt(Et())},[to,{onChange:Pt,...oo}]=D("scrollbar",{className:W(z.scrollableX,z.hideScrollbar),elementType:Xo,shouldForwardComponentProp:!0,externalForwardedProps:O,ownerState:R}),eo=u.useCallback(e=>{Pt?.(e),_t({overflow:null,scrollbarWidth:e})},[Pt]),[Rt,kt]=D("scrollButtons",{className:W(z.scrollButtons,U.className),elementType:$o,externalForwardedProps:O,ownerState:R,additionalProps:{orientation:y,slots:{StartScrollButtonIcon:E.startScrollButtonIcon||E.StartScrollButtonIcon,EndScrollButtonIcon:E.endScrollButtonIcon||E.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:Ut,endScrollButtonIcon:Yt}}}),lo=()=>{const e={};e.scrollbarSizeListener=T?p.jsx(to,{...oo,onChange:eo}):null;const d=T&&(M==="auto"&&(gt||Ct)||M===!0);return e.scrollButtonStart=d?p.jsx(Rt,{direction:a?"right":"left",onClick:Jt,disabled:!gt,...kt}):null,e.scrollButtonEnd=d?p.jsx(Rt,{direction:a?"left":"right",onClick:Qt,disabled:!Ct,...kt}):null,e},zt=dt(e=>{const{tabsMeta:r,tabMeta:d}=It();if(!(!d||!r)){if(d[J]<r[J]){const c=r[Y]+(d[J]-r[J]);at(c,{animation:e})}else if(d[Q]>r[Q]){const c=r[Y]+(d[Q]-r[Q]);at(c,{animation:e})}}}),tt=dt(()=>{T&&M!==!1&&Zt(!wt)});u.useEffect(()=>{const e=Ot(()=>{k.current&&q()});let r;const d=I=>{I.forEach(L=>{L.removedNodes.forEach(G=>{r?.unobserve(G)}),L.addedNodes.forEach(G=>{r?.observe(G)})}),e(),tt()},c=Dt(k.current);c.addEventListener("resize",e);let h;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(e),Array.from($.current.children).forEach(I=>{r.observe(I)})),typeof MutationObserver<"u"&&(h=new MutationObserver(d),h.observe($.current,{childList:!0})),()=>{e.clear(),c.removeEventListener("resize",e),h?.disconnect(),r?.disconnect()}},[q,tt]),u.useEffect(()=>{const e=Array.from($.current.children),r=e.length;if(typeof IntersectionObserver<"u"&&r>0&&T&&M!==!1){const d=e[0],c=e[r-1],h={root:k.current,threshold:.99},I=ct=>{qt(!ct[0].isIntersecting)},L=new IntersectionObserver(I,h);L.observe(d);const G=ct=>{Gt(!ct[0].isIntersecting)},jt=new IntersectionObserver(G,h);return jt.observe(c),()=>{L.disconnect(),jt.disconnect()}}},[T,M,wt,C?.length]),u.useEffect(()=>{Vt(!0)},[]),u.useEffect(()=>{q()}),u.useEffect(()=>{zt(Lt!==H)},[zt,H]),u.useImperativeHandle(f,()=>({updateIndicator:q,updateScrollButtons:tt}),[q,tt]);const[ro,no]=D("indicator",{className:W(z.indicator,K.className),elementType:Do,externalForwardedProps:O,ownerState:R,additionalProps:{style:H}}),Wt=p.jsx(ro,{...no});let ot=0;const so=u.Children.map(C,e=>{if(!u.isValidElement(e))return null;const r=e.props.value===void 0?ot:e.props.value;Tt.set(r,ot);const d=r===F;return ot+=1,u.cloneElement(e,{fullWidth:P==="fullWidth",indicator:d&&!xt&&Wt,selected:d,selectionFollowsFocus:rt,onChange:B,textColor:_,value:r,...ot===1&&F===!1&&!e.props.tabIndex?{tabIndex:0}:{}})}),ao=e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;const r=$.current,d=xo(r).activeElement;if(d.getAttribute("role")!=="tab")return;let h=y==="horizontal"?"ArrowLeft":"ArrowUp",I=y==="horizontal"?"ArrowRight":"ArrowDown";switch(y==="horizontal"&&a&&(h="ArrowRight",I="ArrowLeft"),e.key){case h:e.preventDefault(),et(r,d,$t);break;case I:e.preventDefault(),et(r,d,Ht);break;case"Home":e.preventDefault(),et(r,null,Ht);break;case"End":e.preventDefault(),et(r,null,$t);break}},it=lo(),[io,co]=D("root",{ref:l,className:W(z.root,m),elementType:Ao,externalForwardedProps:{...O,...Kt,component:S},ownerState:R}),[uo,bo]=D("scroller",{ref:k,className:z.scroller,elementType:Fo,externalForwardedProps:O,ownerState:R,additionalProps:{style:{overflow:Bt.overflow,[g?`margin${a?"Left":"Right"}`:"marginBottom"]:nt?void 0:-Bt.scrollbarWidth}}}),[po,fo]=D("list",{ref:$,className:W(z.list,z.flexContainer),elementType:Oo,externalForwardedProps:O,ownerState:R,getSlotProps:e=>({...e,onKeyDown:r=>{ao(r),e.onKeyDown?.(r)}})});return p.jsxs(io,{...co,children:[it.scrollButtonStart,it.scrollbarSizeListener,p.jsxs(uo,{...bo,children:[p.jsx(po,{"aria-label":i,"aria-labelledby":b,"aria-orientation":y==="vertical"?"vertical":null,role:"tablist",...fo,children:so}),xt&&Wt]}),it.scrollButtonEnd]})}),Nt="index",X={tabs:`${Nt}-tabs`,tab:`${Nt}-tab`},Ko=yo(mt)(({theme:o})=>({[`& .${X.tabs}`]:{},[`& .${X.tab}`]:{fontSize:"0.875rem",[o.breakpoints.up("md")]:{fontSize:"1rem"}}}));function Uo({tabs:o,current:t,onChange:l,iconPosition:s=void 0,enableTabClick:n=!1,...a}){return p.jsx(mt,{scrollButtons:"auto",value:t,onChange:(i,b)=>!n&&l(b),...a,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:"grey.100",padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:"text.secondary",fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"action.selected",borderColor:"grey.100",color:"grey.A700"}},".MuiTabs-indicator":{display:"none"},...a.sx},children:o.map(i=>p.jsx(vt,{className:X.tab,value:i.value,label:i.label,icon:i.icon,iconPosition:s,onClick:()=>n&&l(i.value)},i.value))})}function Yo({tabs:o,current:t,onChange:l,iconPosition:s=void 0,enableTabClick:n=!1,...a}){return p.jsx(mt,{scrollButtons:"auto",value:t,onChange:(i,b)=>!n&&l(b),...a,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":a.orientation!=="vertical"?{"&::after":{content:'""',display:"block",position:"sticky",left:0,zIndex:-1,width:"100%",height:"1px",backgroundColor:"grey.300"}}:{},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:"text.secondary",fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:"primary.main"}},".MuiTabs-indicator":{height:"1px",backgroundColor:"primary.main"},...a.sx},children:o.map(i=>p.jsx(vt,{className:X.tab,value:i.value,label:i.label,icon:i.icon,iconPosition:s,onClick:()=>n&&l(i.value)},i.value))})}function qo({tabs:o,current:t,onChange:l,variant:s=void 0,iconPosition:n=void 0,enableTabClick:a=!1,...i}){return s==="card"?p.jsx(Uo,{...i,tabs:o,current:t,enableTabClick:a,onChange:l,iconPosition:n}):s==="line"?p.jsx(Yo,{...i,tabs:o,current:t,enableTabClick:a,onChange:l,iconPosition:n}):p.jsx(Ko,{scrollButtons:"auto",variant:"scrollable",value:t,onChange:(b,f)=>!a&&l(f),indicatorColor:"primary",...i,className:[X.tabs,i.className||""].join(" "),children:o.map(b=>p.jsx(vt,{className:X.tab,value:b.value,label:b.label,icon:b.icon,iconPosition:n,onClick:()=>a&&l(b.value)},b.value))})}function Go(o,t=""){const{info:l}=go(),s=Co(()=>{const n=o?.breadcrumbsLabel||o?.label||"";return wo(n,t,l)},[o,t,l]);return s?p.jsx(Bo,{children:p.jsx("title",{children:s})}):null}export{qo as T,vt as a,mt as b,ut as t,Go as u};
|
|
1
|
+
import{bW as bt,bX as pt,r as u,bY as ft,b_ as W,j as p,b8 as N,cb as At,b$ as ht,bT as Ft,bU as St,d5 as ho,d6 as Ot,d7 as Dt,d8 as Xt,d9 as So,da as vo,bZ as lt,f as mo,db as dt,ca as D,dc as xo,dd as yo,u as go,by as Co,de as wo,df as Bo}from"./index-tJqcQJw8.js";function To(o){return pt("MuiTab",o)}const x=bt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),Io=o=>{const{classes:t,textColor:l,fullWidth:s,wrapped:n,icon:a,label:i,selected:b,disabled:f}=o,v={root:["root",a&&i&&"labelIcon",`textColor${At(l)}`,s&&"fullWidth",n&&"wrapped",b&&"selected",f&&"disabled"],icon:["iconWrapper","icon"]};return ht(v,To,t)},Mo=N(Ft,{name:"MuiTab",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.root,l.label&&l.icon&&t.labelIcon,t[`textColor${At(l.textColor)}`],l.fullWidth&&t.fullWidth,l.wrapped&&t.wrapped,{[`& .${x.iconWrapper}`]:t.iconWrapper},{[`& .${x.icon}`]:t.icon}]}})(St(({theme:o})=>({...o.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="top",style:{[`& > .${x.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="bottom",style:{[`& > .${x.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="start",style:{[`& > .${x.icon}`]:{marginRight:o.spacing(1)}}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="end",style:{[`& > .${x.icon}`]:{marginLeft:o.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${x.selected}`]:{opacity:1},[`&.${x.disabled}`]:{opacity:(o.vars||o).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(o.vars||o).palette.text.secondary,[`&.${x.selected}`]:{color:(o.vars||o).palette.primary.main},[`&.${x.disabled}`]:{color:(o.vars||o).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(o.vars||o).palette.text.secondary,[`&.${x.selected}`]:{color:(o.vars||o).palette.secondary.main},[`&.${x.disabled}`]:{color:(o.vars||o).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:o.typography.pxToRem(12)}}]}))),vt=u.forwardRef(function(t,l){const s=ft({props:t,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:i=!1,fullWidth:b,icon:f,iconPosition:v="top",indicator:C,label:m,onChange:S,onClick:w,onFocus:j,selected:B,selectionFollowsFocus:y,textColor:Z="inherit",value:M,wrapped:rt=!1,...E}=s,A={...s,disabled:a,disableFocusRipple:i,selected:B,icon:!!f,iconPosition:v,label:!!m,fullWidth:b,textColor:Z,wrapped:rt},K=Io(A),U=f&&m&&u.isValidElement(f)?u.cloneElement(f,{className:W(K.icon,f.props.className)}):f,_=P=>{!B&&S&&S(P,M),w&&w(P)},F=P=>{y&&!B&&S&&S(P,M),j&&j(P)};return p.jsxs(Mo,{focusRipple:!i,className:W(K.root,n),ref:l,role:"tab","aria-selected":B,disabled:a,onClick:_,onFocus:F,ownerState:A,tabIndex:B?0:-1,...E,children:[v==="top"||v==="start"?p.jsxs(u.Fragment,{children:[U,m]}):p.jsxs(u.Fragment,{children:[m,U]}),C]})});function Eo(o){return(1+Math.sin(Math.PI*o-Math.PI/2))/2}function Po(o,t,l,s={},n=()=>{}){const{ease:a=Eo,duration:i=300}=s;let b=null;const f=t[o];let v=!1;const C=()=>{v=!0},m=S=>{if(v){n(new Error("Animation cancelled"));return}b===null&&(b=S);const w=Math.min(1,(S-b)/i);if(t[o]=a(w)*(l-f)+f,w>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(m)};return f===l?(n(new Error("Element already at target position")),C):(requestAnimationFrame(m),C)}const Ro={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function ko(o){const{onChange:t,...l}=o,s=u.useRef(),n=u.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return ho(()=>{const i=Ot(()=>{const f=s.current;a(),f!==s.current&&t(s.current)}),b=Dt(n.current);return b.addEventListener("resize",i),()=>{i.clear(),b.removeEventListener("resize",i)}},[t]),u.useEffect(()=>{a(),t(s.current)},[t]),p.jsx("div",{style:Ro,...l,ref:n})}function zo(o){return pt("MuiTabScrollButton",o)}const Wo=bt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),jo=o=>{const{classes:t,orientation:l,disabled:s}=o;return ht({root:["root",l,s&&"disabled"]},zo,t)},Ho=N(Ft,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.root,l.orientation&&t[l.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${Wo.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),$o=u.forwardRef(function(t,l){const s=ft({props:t,name:"MuiTabScrollButton"}),{className:n,slots:a={},slotProps:i={},direction:b,orientation:f,disabled:v,...C}=s,m=Xt(),S={isRtl:m,...s},w=jo(S),j=a.StartScrollButtonIcon??So,B=a.EndScrollButtonIcon??vo,y=lt({elementType:j,externalSlotProps:i.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:S}),Z=lt({elementType:B,externalSlotProps:i.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:S});return p.jsx(Ho,{component:"div",className:W(w.root,n),ref:l,role:null,ownerState:S,tabIndex:null,...C,style:{...C.style,...f==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${m?-90:90}deg)`}},children:b==="left"?p.jsx(j,{...y}):p.jsx(B,{...Z})})});function Lo(o){return pt("MuiTabs",o)}const ut=bt("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Ht=(o,t)=>o===t?o.firstChild:t&&t.nextElementSibling?t.nextElementSibling:o.firstChild,$t=(o,t)=>o===t?o.lastChild:t&&t.previousElementSibling?t.previousElementSibling:o.lastChild,et=(o,t,l)=>{let s=!1,n=l(o,t);for(;n;){if(n===o.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(o,n);else{n.focus();return}}},No=o=>{const{vertical:t,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:i,scrollButtonsHideMobile:b,classes:f}=o;return ht({root:["root",t&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",i&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",b&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Lo,f)},Ao=N("div",{name:"MuiTabs",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[{[`& .${ut.scrollButtons}`]:t.scrollButtons},{[`& .${ut.scrollButtons}`]:l.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,l.vertical&&t.vertical]}})(St(({theme:o})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${ut.scrollButtons}`]:{[o.breakpoints.down("sm")]:{display:"none"}}}}]}))),Fo=N("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.scroller,l.fixed&&t.fixed,l.hideScrollbar&&t.hideScrollbar,l.scrollableX&&t.scrollableX,l.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:o})=>o.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:o})=>o.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:o})=>o.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:o})=>o.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),Oo=N("div",{name:"MuiTabs",slot:"List",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.list,t.flexContainer,l.vertical&&t.flexContainerVertical,l.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:o})=>o.vertical,style:{flexDirection:"column"}},{props:({ownerState:o})=>o.centered,style:{justifyContent:"center"}}]}),Do=N("span",{name:"MuiTabs",slot:"Indicator"})(St(({theme:o})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:o.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(o.vars||o).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(o.vars||o).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),Xo=N(ko)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Lt={},mt=u.forwardRef(function(t,l){const s=ft({props:t,name:"MuiTabs"}),n=mo(),a=Xt(),{"aria-label":i,"aria-labelledby":b,action:f,centered:v=!1,children:C,className:m,component:S="div",allowScrollButtonsMobile:w=!1,indicatorColor:j="primary",onChange:B,orientation:y="horizontal",ScrollButtonComponent:Z,scrollButtons:M="auto",selectionFollowsFocus:rt,slots:E={},slotProps:A={},TabIndicatorProps:K={},TabScrollButtonProps:U={},textColor:_="primary",value:F,variant:P="standard",visibleScrollbar:nt=!1,...Kt}=s,T=P==="scrollable",g=y==="vertical",Y=g?"scrollTop":"scrollLeft",J=g?"top":"left",Q=g?"bottom":"right",st=g?"clientHeight":"clientWidth",V=g?"height":"width",R={...s,component:S,allowScrollButtonsMobile:w,indicatorColor:j,orientation:y,vertical:g,scrollButtons:M,textColor:_,variant:P,visibleScrollbar:nt,fixed:!T,hideScrollbar:T&&!nt,scrollableX:T&&!g,scrollableY:T&&g,centered:v&&!T,scrollButtonsHideMobile:!w},z=No(R),Ut=lt({elementType:E.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:R}),Yt=lt({elementType:E.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:R}),[xt,Vt]=u.useState(!1),[H,yt]=u.useState(Lt),[gt,qt]=u.useState(!1),[Ct,Gt]=u.useState(!1),[wt,Zt]=u.useState(!1),[Bt,_t]=u.useState({overflow:"hidden",scrollbarWidth:0}),Tt=new Map,k=u.useRef(null),$=u.useRef(null),O={slots:E,slotProps:{indicator:K,scrollButton:U,...A}},It=()=>{const e=k.current;let r;if(e){const c=e.getBoundingClientRect();r={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:c.top,bottom:c.bottom,left:c.left,right:c.right}}let d;if(e&&F!==!1){const c=$.current.children;if(c.length>0){const h=c[Tt.get(F)];d=h?h.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:d}},q=dt(()=>{const{tabsMeta:e,tabMeta:r}=It();let d=0,c;g?(c="top",r&&e&&(d=r.top-e.top+e.scrollTop)):(c=a?"right":"left",r&&e&&(d=(a?-1:1)*(r[c]-e[c]+e.scrollLeft)));const h={[c]:d,[V]:r?r[V]:0};if(typeof H[c]!="number"||typeof H[V]!="number")yt(h);else{const I=Math.abs(H[c]-h[c]),L=Math.abs(H[V]-h[V]);(I>=1||L>=1)&&yt(h)}}),at=(e,{animation:r=!0}={})=>{r?Po(Y,k.current,e,{duration:n.transitions.duration.standard}):k.current[Y]=e},Mt=e=>{let r=k.current[Y];g?r+=e:r+=e*(a?-1:1),at(r)},Et=()=>{const e=k.current[st];let r=0;const d=Array.from($.current.children);for(let c=0;c<d.length;c+=1){const h=d[c];if(r+h[st]>e){c===0&&(r=e);break}r+=h[st]}return r},Jt=()=>{Mt(-1*Et())},Qt=()=>{Mt(Et())},[to,{onChange:Pt,...oo}]=D("scrollbar",{className:W(z.scrollableX,z.hideScrollbar),elementType:Xo,shouldForwardComponentProp:!0,externalForwardedProps:O,ownerState:R}),eo=u.useCallback(e=>{Pt?.(e),_t({overflow:null,scrollbarWidth:e})},[Pt]),[Rt,kt]=D("scrollButtons",{className:W(z.scrollButtons,U.className),elementType:$o,externalForwardedProps:O,ownerState:R,additionalProps:{orientation:y,slots:{StartScrollButtonIcon:E.startScrollButtonIcon||E.StartScrollButtonIcon,EndScrollButtonIcon:E.endScrollButtonIcon||E.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:Ut,endScrollButtonIcon:Yt}}}),lo=()=>{const e={};e.scrollbarSizeListener=T?p.jsx(to,{...oo,onChange:eo}):null;const d=T&&(M==="auto"&&(gt||Ct)||M===!0);return e.scrollButtonStart=d?p.jsx(Rt,{direction:a?"right":"left",onClick:Jt,disabled:!gt,...kt}):null,e.scrollButtonEnd=d?p.jsx(Rt,{direction:a?"left":"right",onClick:Qt,disabled:!Ct,...kt}):null,e},zt=dt(e=>{const{tabsMeta:r,tabMeta:d}=It();if(!(!d||!r)){if(d[J]<r[J]){const c=r[Y]+(d[J]-r[J]);at(c,{animation:e})}else if(d[Q]>r[Q]){const c=r[Y]+(d[Q]-r[Q]);at(c,{animation:e})}}}),tt=dt(()=>{T&&M!==!1&&Zt(!wt)});u.useEffect(()=>{const e=Ot(()=>{k.current&&q()});let r;const d=I=>{I.forEach(L=>{L.removedNodes.forEach(G=>{r?.unobserve(G)}),L.addedNodes.forEach(G=>{r?.observe(G)})}),e(),tt()},c=Dt(k.current);c.addEventListener("resize",e);let h;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(e),Array.from($.current.children).forEach(I=>{r.observe(I)})),typeof MutationObserver<"u"&&(h=new MutationObserver(d),h.observe($.current,{childList:!0})),()=>{e.clear(),c.removeEventListener("resize",e),h?.disconnect(),r?.disconnect()}},[q,tt]),u.useEffect(()=>{const e=Array.from($.current.children),r=e.length;if(typeof IntersectionObserver<"u"&&r>0&&T&&M!==!1){const d=e[0],c=e[r-1],h={root:k.current,threshold:.99},I=ct=>{qt(!ct[0].isIntersecting)},L=new IntersectionObserver(I,h);L.observe(d);const G=ct=>{Gt(!ct[0].isIntersecting)},jt=new IntersectionObserver(G,h);return jt.observe(c),()=>{L.disconnect(),jt.disconnect()}}},[T,M,wt,C?.length]),u.useEffect(()=>{Vt(!0)},[]),u.useEffect(()=>{q()}),u.useEffect(()=>{zt(Lt!==H)},[zt,H]),u.useImperativeHandle(f,()=>({updateIndicator:q,updateScrollButtons:tt}),[q,tt]);const[ro,no]=D("indicator",{className:W(z.indicator,K.className),elementType:Do,externalForwardedProps:O,ownerState:R,additionalProps:{style:H}}),Wt=p.jsx(ro,{...no});let ot=0;const so=u.Children.map(C,e=>{if(!u.isValidElement(e))return null;const r=e.props.value===void 0?ot:e.props.value;Tt.set(r,ot);const d=r===F;return ot+=1,u.cloneElement(e,{fullWidth:P==="fullWidth",indicator:d&&!xt&&Wt,selected:d,selectionFollowsFocus:rt,onChange:B,textColor:_,value:r,...ot===1&&F===!1&&!e.props.tabIndex?{tabIndex:0}:{}})}),ao=e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;const r=$.current,d=xo(r).activeElement;if(d.getAttribute("role")!=="tab")return;let h=y==="horizontal"?"ArrowLeft":"ArrowUp",I=y==="horizontal"?"ArrowRight":"ArrowDown";switch(y==="horizontal"&&a&&(h="ArrowRight",I="ArrowLeft"),e.key){case h:e.preventDefault(),et(r,d,$t);break;case I:e.preventDefault(),et(r,d,Ht);break;case"Home":e.preventDefault(),et(r,null,Ht);break;case"End":e.preventDefault(),et(r,null,$t);break}},it=lo(),[io,co]=D("root",{ref:l,className:W(z.root,m),elementType:Ao,externalForwardedProps:{...O,...Kt,component:S},ownerState:R}),[uo,bo]=D("scroller",{ref:k,className:z.scroller,elementType:Fo,externalForwardedProps:O,ownerState:R,additionalProps:{style:{overflow:Bt.overflow,[g?`margin${a?"Left":"Right"}`:"marginBottom"]:nt?void 0:-Bt.scrollbarWidth}}}),[po,fo]=D("list",{ref:$,className:W(z.list,z.flexContainer),elementType:Oo,externalForwardedProps:O,ownerState:R,getSlotProps:e=>({...e,onKeyDown:r=>{ao(r),e.onKeyDown?.(r)}})});return p.jsxs(io,{...co,children:[it.scrollButtonStart,it.scrollbarSizeListener,p.jsxs(uo,{...bo,children:[p.jsx(po,{"aria-label":i,"aria-labelledby":b,"aria-orientation":y==="vertical"?"vertical":null,role:"tablist",...fo,children:so}),xt&&Wt]}),it.scrollButtonEnd]})}),Nt="index",X={tabs:`${Nt}-tabs`,tab:`${Nt}-tab`},Ko=yo(mt)(({theme:o})=>({[`& .${X.tabs}`]:{},[`& .${X.tab}`]:{fontSize:"0.875rem",[o.breakpoints.up("md")]:{fontSize:"1rem"}}}));function Uo({tabs:o,current:t,onChange:l,iconPosition:s=void 0,enableTabClick:n=!1,...a}){return p.jsx(mt,{scrollButtons:"auto",value:t,onChange:(i,b)=>!n&&l(b),...a,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:"grey.100",padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:"text.secondary",fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"action.selected",borderColor:"grey.100",color:"grey.A700"}},".MuiTabs-indicator":{display:"none"},...a.sx},children:o.map(i=>p.jsx(vt,{className:X.tab,value:i.value,label:i.label,icon:i.icon,iconPosition:s,onClick:()=>n&&l(i.value)},i.value))})}function Yo({tabs:o,current:t,onChange:l,iconPosition:s=void 0,enableTabClick:n=!1,...a}){return p.jsx(mt,{scrollButtons:"auto",value:t,onChange:(i,b)=>!n&&l(b),...a,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":a.orientation!=="vertical"?{"&::after":{content:'""',display:"block",position:"sticky",left:0,zIndex:-1,width:"100%",height:"1px",backgroundColor:"grey.300"}}:{},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:"text.secondary",fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:"primary.main"}},".MuiTabs-indicator":{height:"1px",backgroundColor:"primary.main"},...a.sx},children:o.map(i=>p.jsx(vt,{className:X.tab,value:i.value,label:i.label,icon:i.icon,iconPosition:s,onClick:()=>n&&l(i.value)},i.value))})}function qo({tabs:o,current:t,onChange:l,variant:s=void 0,iconPosition:n=void 0,enableTabClick:a=!1,...i}){return s==="card"?p.jsx(Uo,{...i,tabs:o,current:t,enableTabClick:a,onChange:l,iconPosition:n}):s==="line"?p.jsx(Yo,{...i,tabs:o,current:t,enableTabClick:a,onChange:l,iconPosition:n}):p.jsx(Ko,{scrollButtons:"auto",variant:"scrollable",value:t,onChange:(b,f)=>!a&&l(f),indicatorColor:"primary",...i,className:[X.tabs,i.className||""].join(" "),children:o.map(b=>p.jsx(vt,{className:X.tab,value:b.value,label:b.label,icon:b.icon,iconPosition:n,onClick:()=>a&&l(b.value)},b.value))})}function Go(o,t=""){const{info:l}=go(),s=Co(()=>{const n=o?.breadcrumbsLabel||o?.label||"";return wo(n,t,l)},[o,t,l]);return s?p.jsx(Bo,{children:p.jsx("title",{children:s})}):null}export{qo as T,vt as a,mt as b,ut as t,Go as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as lt}from"./index-
|
|
1
|
+
import{m as lt}from"./index-PGkZ-p10.js";import"./index-tJqcQJw8.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
|
|
4
4
|
* Released under the MIT license
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{gZ as E,be as L}from"./index-
|
|
1
|
+
import{gZ as E,be as L}from"./index-tJqcQJw8.js";const U=({url:r,allowFullScreen:o,position:a,display:u,height:i,width:y,overflow:c,styles:f,onLoad:p,onMouseOver:b,onMouseOut:w,scrolling:d,id:m,frameBorder:t,ariaHidden:O,sandbox:s,allow:j,className:g,title:h,ariaLabel:k,ariaLabelledby:P,name:v,target:A,loading:F,importance:I,referrerpolicy:M,allowpaymentrequest:S,src:q,key:x})=>{const n=E({src:q||r,target:A||null,style:{position:a||null,display:u||"initial",overflow:c||null},scrolling:d||null,allowpaymentrequest:S||null,importance:I||null,sandbox:s&&[...s].join(" ")||null,loading:F||null,styles:f||null,name:v||null,className:g||null,allowFullScreen:"allowFullScreen",referrerpolicy:M||null,title:h||null,allow:j||null,id:m||null,"aria-labelledby":P||null,"aria-hidden":O||null,"aria-label":k||null,width:y||null,height:i||null,onLoad:p||null,onMouseOver:b||null,onMouseOut:w||null,key:x||"iframe"});let l=Object.create(null);for(let e of Object.keys(n))n[e]!=null&&(l[e]=n[e]);for(let e of Object.keys(l.style))l.style[e]==null&&delete l.style[e];if(l.styles)for(let e of Object.keys(l.styles))l.styles.hasOwnProperty(e)&&(l.style[e]=l.styles[e]),Object.keys(l.styles).pop()==e&&delete l.styles;if(o)if("allow"in l){const e=l.allow.replace("fullscreen","");l.allow=`fullscreen ${e.trim()}`.trim()}else l.allow="fullscreen";return t>=0&&(l.style.hasOwnProperty("border")||(l.style.border=t)),L.createElement("iframe",Object.assign({},l))};export{U as I};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{r as d,cs as z,c0 as U,ct as F,cu as X,aG as H,j as t,s as _,o as j,F as V,aP as B,g as G,cv as O,w as D,N as p,cw as J,W as Q,v as L,b7 as q,T as I,cx as M,L as K,cy as Y,bE as Z,cz as ee,cA as te,u as se,x as ae,bw as oe,ar as ne,af as re}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BGsVf6ce.js","./index-tJqcQJw8.js","./index-DGkT7afN.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as d,cs as z,c0 as U,ct as F,cu as X,aG as H,j as t,s as _,o as j,F as V,aP as B,g as G,cv as O,w as D,N as p,cw as J,W as Q,v as L,b7 as q,T as I,cx as M,L as K,cy as Y,bE as Z,cz as ee,cA as te,u as se,x as ae,bw as oe,ar as ne,af as re}from"./index-tJqcQJw8.js";import{V as ie}from"./ViewList-5h6twi3p.js";import{D as ce}from"./Done-BjzLVAB9.js";import{N as le}from"./index-DFduzc0K.js";import{w as pe}from"./wrap-locale-DSFFbKk8.js";import{g as de}from"./get-safe-url-DL1Ksc1t.js";import{S as ue,a as me,b as he}from"./Stepper-C1wqVhiQ.js";import"./emotion-cache.browser.esm-DzLuQ31t.js";var P=function(e){if(!e)return 0;var r=X(e).valueOf()-Date.now();return r<0?0:r},fe=function(e){return{days:Math.floor(e/864e5),hours:Math.floor(e/36e5)%24,minutes:Math.floor(e/6e4)%60,seconds:Math.floor(e/1e3)%60,milliseconds:Math.floor(e)%1e3}},xe=function(e){e===void 0&&(e={});var r=e||{},l=r.leftTime,i=r.targetDate,u=r.interval,b=u===void 0?1e3:u,x=r.onEnd,g=d.useMemo(function(){return z(l)&&l>0?Date.now()+l:void 0},[l]),a="leftTime"in e?g:i,h=U(d.useState(function(){return P(a)}),2),f=h[0],m=h[1],o=F(x);d.useEffect(function(){if(!a){m(0);return}m(P(a));var v=setInterval(function(){var n,c=P(a);m(c),c===0&&(clearInterval(v),(n=o.current)===null||n===void 0||n.call(o))},b);return function(){return clearInterval(v)}},[a,b]);var w=d.useMemo(function(){return fe(f)},[f]);return[f,w]};const ge=H(t.jsx("path",{d:"M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"}));function E({list:e=[],width:r=300,height:l=400,cardSpace:i=40,onSelect:u=()=>{},defaultIndex:b=0}){const[x,g]=d.useState(0),[a,h]=d.useState(0),f=d.useRef(null),m=n=>{if(n<0||n>e.length-1)return;g(n);const c=f.current.clientWidth;h(n*(r+i)-(c-r)/2+i*.5),u(n)};d.useEffect(()=>{m(b);const n=c=>c.preventDefault();f.current.addEventListener("touchmove",n,{passive:!1})},[]);let o;const w=n=>{o=n.touches[0].clientX},v=n=>{const c=n.changedTouches[0],k=o-c.clientX;Math.abs(k)>60&&(k>0?m(x+1):m(x-1))};return t.jsx(ve,{ref:f,onTouchStart:w,onTouchEnd:v,children:t.jsx("div",{className:"card-container",style:{transform:`translate(${-a}px, 0)`},children:e.map((n,c)=>t.jsx("div",{className:`card-item ${c===x?"selected":""}`,style:{width:r,height:l,margin:i/2},onClick:()=>m(c),children:n.display?t.jsx("div",{className:"card-content",children:t.jsx(le,{data:n.display,style:{width:"100%",height:"100%"}})}):t.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:n.src}})},n.id))})})}const ve=_.div`
|
|
3
3
|
overflow: hidden;
|
|
4
4
|
mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
|
|
5
5
|
overflow: hidden;
|
|
@@ -33,7 +33,7 @@ import{r as d,cs as z,c0 as U,ct as F,cu as X,aG as H,j as t,s as _,o as j,F as
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
`;E.propTypes={list:j.array,width:j.number,height:j.number,cardSpace:j.number,onSelect:j.func,defaultIndex:j.number};function be({icon:e,active:r,completed:l}){const i={1:t.jsx(ie,{className:"step-icon"}),2:t.jsx(ge,{className:"step-icon"}),3:t.jsx(ce,{className:"step-icon"})},u=["step-icon-w"];return r&&u.push("step-icon-w--active"),l&&u.push("step-icon-w--completed"),t.jsx("div",{className:u.join(" "),children:i[String(e)]})}function we({SessionContext:e,webWalletUrl:r,createPassportSvg:l,passportColor:i,onLogin:u,teamDid:b}){const{api:x}=d.useContext(e),g=V(s=>s.breakpoints.down("sm")),a=B({user:null,passport:null,success:!1,activeStep:0}),h=d.useRef({sessionToken:"",refreshToken:""}),{setPassportId:f,clearPassportId:m}=Y(),{t:o,locale:w}=d.useContext(G),{wallet:v}=O(),[n,c]=d.useState(0),{searchParams:k}=new URL(window.location.href),S=()=>{a.activeStep++},$=s=>{a.user=s.user},W=()=>{S()},A=(s,y)=>{s?.passportId&&f(s.passportId),s?.sessionToken&&(h.current.sessionToken=y(s.sessionToken)),s?.refreshToken&&(h.current.refreshToken=y(s.refreshToken)),a.success=!0,S()},T=async()=>{if(v&&M()){Z(()=>import("./index-
|
|
36
|
+
`;E.propTypes={list:j.array,width:j.number,height:j.number,cardSpace:j.number,onSelect:j.func,defaultIndex:j.number};function be({icon:e,active:r,completed:l}){const i={1:t.jsx(ie,{className:"step-icon"}),2:t.jsx(ge,{className:"step-icon"}),3:t.jsx(ce,{className:"step-icon"})},u=["step-icon-w"];return r&&u.push("step-icon-w--active"),l&&u.push("step-icon-w--completed"),t.jsx("div",{className:u.join(" "),children:i[String(e)]})}function we({SessionContext:e,webWalletUrl:r,createPassportSvg:l,passportColor:i,onLogin:u,teamDid:b}){const{api:x}=d.useContext(e),g=V(s=>s.breakpoints.down("sm")),a=B({user:null,passport:null,success:!1,activeStep:0}),h=d.useRef({sessionToken:"",refreshToken:""}),{setPassportId:f,clearPassportId:m}=Y(),{t:o,locale:w}=d.useContext(G),{wallet:v}=O(),[n,c]=d.useState(0),{searchParams:k}=new URL(window.location.href),S=()=>{a.activeStep++},$=s=>{a.user=s.user},W=()=>{S()},A=(s,y)=>{s?.passportId&&f(s.passportId),s?.sessionToken&&(h.current.sessionToken=y(s.sessionToken)),s?.refreshToken&&(h.current.refreshToken=y(s.refreshToken)),a.success=!0,S()},T=async()=>{if(v&&M()){Z(()=>import("./index-BGsVf6ce.js").then(y=>y.i),__vite__mapDeps([0,1,2]),import.meta.url).then(y=>{y.call("arcClosePage")});return}ee(u)&&u({sessionToken:h.current.sessionToken,refreshToken:h.current.refreshToken});const s=k.get("redirect");if(s){window.location.replace(de(s));return}m(),window.location.replace("/")},R=s=>{a.passport=s.target.value},[C]=xe({leftTime:n,onEnd:()=>{T()}}),N=[{label:o("lostPassport.recoverPassport"),content:()=>{if(!a.user){const s=k.get("scope")||"passport";return t.jsx(D,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-list",forceConnected:!1,autoConnect:!1,checkFn:x.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:$,locale:w,messages:{title:o("lostPassport.recoverDialog.title"),scan:o("lostPassport.recoverDialog.scan"),confirm:o("lostPassport.recoverDialog.confirm"),success:o("lostPassport.recoverDialog.success")},extraParams:{scope:s}})}return t.jsxs(p,{className:"select-passport",children:[t.jsxs(p,{className:"user-info",sx:{my:1,display:"flex",alignItems:"center"},children:[t.jsx(J,{src:a.user.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),t.jsxs(p,{children:[t.jsx(p,{className:"name",children:a.user.fullName}),t.jsx(p,{className:"did",sx:{mt:1},children:t.jsx(Q,{responsive:!g,compact:g,did:a.user.did})})]})]}),t.jsx(p,{children:t.jsx(E,{width:g?180:230,height:g?240:306,cardSpace:24,list:a.user.passportTypes.map(s=>({src:l({scope:s.scope,role:s.role,title:s.scope==="kyc"?s.name:s.title,issuer:s.issuer.name,issuerDid:s.issuer.id,ownerDid:a.user.did,ownerName:a.user.fullName,ownerAvatarUrl:a.user.avatar,preferredColor:i||"auto",extra:s.scope==="kyc"?{key:"Email",value:s.name}:void 0}),name:s.title,id:s.id,display:s.display})),onSelect:s=>R({target:{value:a.user.passportTypes[s].id}}),defaultIndex:0})}),t.jsx(p,{sx:{textAlign:"center"},children:t.jsx(L,{variant:"contained",color:"primary",onClick:()=>W(),disabled:!a.passport,children:o("common.next")})})]})}},{label:o("lostPassport.receivePassport"),content:()=>{const s={receiverDid:a.user.did,passportId:a.passport,teamDid:b||window?.blocklet?.did};return t.jsx(D,{popup:!0,open:!0,hideCloseButton:!0,className:"connect",action:"lost-passport-issue",checkFn:x.get,checkTimeout:10*60*1e3,webWalletUrl:r,onSuccess:A,forceConnected:!1,locale:w,messages:{title:`${o("lostPassport.receiveDialog.title")}`,scan:o("lostPassport.receiveDialog.scan"),confirm:o("lostPassport.receiveDialog.confirm"),success:o("lostPassport.receiveDialog.success")},extraParams:s})}},{label:o("common.complete"),content:()=>(n===0&&c(3e3),t.jsxs(p,{sx:{textAlign:"center"},children:[t.jsx(p,{sx:{mb:3,color:"success.main"},children:t.jsx(q,{style:{fontSize:60}})}),t.jsx(I,{component:"p",variant:"body1",className:"subheader",children:o("issuePassport.dialog.success")}),t.jsx(I,{component:"p",variant:"body2",color:"gray",children:v&&M()?o("issuePassport.dialog.autoClose",{seconds:Math.round(C/1e3)}):o("issuePassport.dialog.autoJump",{seconds:Math.round(C/1e3)})}),t.jsx(L,{style:{marginTop:40},variant:"contained",color:"primary",onClick:T,children:o("issuePassport.dialog.loginWithPassport")})]}))}];return t.jsx(ye,{children:t.jsxs(p,{className:"stepper",children:[t.jsx(ue,{className:"stepper-progress",alternativeLabel:!0,activeStep:a.activeStep,children:N.map(({label:s})=>t.jsx(me,{children:t.jsx(he,{slots:{stepIcon:be},children:s})},s))}),t.jsx(p,{className:"stepper-content",children:N[a.activeStep].content()}),!a.success&&t.jsx(p,{sx:{textAlign:"center",fontSize:12},children:t.jsx(K,{href:"/",sx:{color:"#4598FA",textDecoration:"none"},children:o("lostPassport.return")})})]})})}const ye=_(te)`
|
|
37
37
|
padding-top: 46px;
|
|
38
38
|
padding-bottom: 46px;
|
|
39
39
|
height: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ey as k}from"./index-
|
|
1
|
+
import{ey as k}from"./index-tJqcQJw8.js";var m,C;function S(){if(C)return m;C=1;function v(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function A(o,e){for(var r="",i=0,f=-1,t=0,n,l=0;l<=o.length;++l){if(l<o.length)n=o.charCodeAt(l);else{if(n===47)break;n=47}if(n===47){if(!(f===l-1||t===1))if(f!==l-1&&t===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var s=r.lastIndexOf("/");if(s!==r.length-1){s===-1?(r="",i=0):(r=r.slice(0,s),i=r.length-1-r.lastIndexOf("/")),f=l,t=0;continue}}else if(r.length===2||r.length===1){r="",i=0,f=l,t=0;continue}}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+o.slice(f+1,l):r=o.slice(f+1,l),i=l-f-1;f=l,t=0}else n===46&&t!==-1?++t:t=-1}return r}function b(o,e){var r=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+i:r+o+i:i}var g={resolve:function(){for(var e="",r=!1,i,f=arguments.length-1;f>=-1&&!r;f--){var t;f>=0?t=arguments[f]:(i===void 0&&(i=k.cwd()),t=i),v(t),t.length!==0&&(e=t+"/"+e,r=t.charCodeAt(0)===47)}return e=A(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(v(e),e.length===0)return".";var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=A(e,!r),e.length===0&&!r&&(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return v(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 i=arguments[r];v(i),i.length>0&&(e===void 0?e=i:e+="/"+i)}return e===void 0?".":g.normalize(e)},relative:function(e,r){if(v(e),v(r),e===r||(e=g.resolve(e),r=g.resolve(r),e===r))return"";for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var f=e.length,t=f-i,n=1;n<r.length&&r.charCodeAt(n)===47;++n);for(var l=r.length,s=l-n,c=t<s?t:s,u=-1,a=0;a<=c;++a){if(a===c){if(s>c){if(r.charCodeAt(n+a)===47)return r.slice(n+a+1);if(a===0)return r.slice(n+a)}else t>c&&(e.charCodeAt(i+a)===47?u=a:a===0&&(u=0));break}var h=e.charCodeAt(i+a),y=r.charCodeAt(n+a);if(h!==y)break;h===47&&(u=a)}var d="";for(a=i+u+1;a<=f;++a)(a===f||e.charCodeAt(a)===47)&&(d.length===0?d+="..":d+="/..");return d.length>0?d+r.slice(n+u):(n+=u,r.charCodeAt(n)===47&&++n,r.slice(n))},_makeLong:function(e){return e},dirname:function(e){if(v(e),e.length===0)return".";for(var r=e.charCodeAt(0),i=r===47,f=-1,t=!0,n=e.length-1;n>=1;--n)if(r=e.charCodeAt(n),r===47){if(!t){f=n;break}}else t=!1;return f===-1?i?"/":".":i&&f===1?"//":e.slice(0,f)},basename:function(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');v(e);var i=0,f=-1,t=!0,n;if(r!==void 0&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var l=r.length-1,s=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(c===47){if(!t){i=n+1;break}}else s===-1&&(t=!1,s=n+1),l>=0&&(c===r.charCodeAt(l)?--l===-1&&(f=n):(l=-1,f=s))}return i===f?f=s:f===-1&&(f=e.length),e.slice(i,f)}else{for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===47){if(!t){i=n+1;break}}else f===-1&&(t=!1,f=n+1);return f===-1?"":e.slice(i,f)}},extname:function(e){v(e);for(var r=-1,i=0,f=-1,t=!0,n=0,l=e.length-1;l>=0;--l){var s=e.charCodeAt(l);if(s===47){if(!t){i=l+1;break}continue}f===-1&&(t=!1,f=l+1),s===46?r===-1?r=l:n!==1&&(n=1):r!==-1&&(n=-1)}return r===-1||f===-1||n===0||n===1&&r===f-1&&r===i+1?"":e.slice(r,f)},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 b("/",e)},parse:function(e){v(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;var i=e.charCodeAt(0),f=i===47,t;f?(r.root="/",t=1):t=0;for(var n=-1,l=0,s=-1,c=!0,u=e.length-1,a=0;u>=t;--u){if(i=e.charCodeAt(u),i===47){if(!c){l=u+1;break}continue}s===-1&&(c=!1,s=u+1),i===46?n===-1?n=u:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||s===-1||a===0||a===1&&n===s-1&&n===l+1?s!==-1&&(l===0&&f?r.base=r.name=e.slice(1,s):r.base=r.name=e.slice(l,s)):(l===0&&f?(r.name=e.slice(1,n),r.base=e.slice(1,s)):(r.name=e.slice(l,n),r.base=e.slice(l,s)),r.ext=e.slice(n,s)),l>0?r.dir=e.slice(0,l-1):f&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};return g.posix=g,m=g,m}export{S as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bd as x}from"./index-
|
|
1
|
+
import{bd as x}from"./index-tJqcQJw8.js";function D(a,i){for(var r=0;r<i.length;r++){const e=i[r];if(typeof e!="string"&&!Array.isArray(e)){for(const s in e)if(s!=="default"&&!(s in a)){const t=Object.getOwnPropertyDescriptor(e,s);t&&Object.defineProperty(a,s,t.get?t:{enumerable:!0,get:()=>e[s]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var l,w;function J(){if(w)return l;w=1;var a={default:l,call:function(i,r,e){var s="";typeof r=="function"&&(e=r,r={});var t={data:r===void 0?null:r};if(typeof e=="function"){var d="dscb"+window.dscb++;window[d]=e,t._dscbstub=d}return t=JSON.stringify(t),window._dsbridge?s=_dsbridge.call(i,t):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(s=prompt("_dsbridge="+i,t)),JSON.parse(s||"{}").data},register:function(i,r,e){var s=e?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){a.call("_dsb.dsinit")},0)),typeof r=="object"?s._obs[i]=r:s[i]=r},registerAsyn:function(i,r){this.register(i,r,!0)},hasNativeMethod:function(i,r){return this.call("_dsb.hasNativeMethod",{name:i,type:r||"all"})},disableJavascriptDialogBlock:function(i){this.call("_dsb.disableJavascriptDialogBlock",{disable:i!==!1})}};return function(){if(!window._dsf){var i={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:a,close:function(){a.call("_dsb.closePage")},_handleMessageFromNative:function(e){var s=JSON.parse(e.data),t={id:e.callbackId,complete:!0},d=this._dsf[e.method],o=this._dsaf[e.method],v=function(_,p){t.data=_.apply(p,s),a.call("_dsb.returnValue",t)},g=function(_,p){s.push(function(O,j){t.data=O,t.complete=j!==!1,a.call("_dsb.returnValue",t)}),_.apply(p,s)};if(d)v(d,this._dsf);else if(o)g(o,this._dsaf);else{var u=e.method.split(".");if(u.length<2)return;var b=u.pop(),h=u.join("."),c=this._dsf._obs,f=c[h]||{},n=f[b];if(n&&typeof n=="function"){v(n,f);return}if(c=this._dsaf._obs,f=c[h]||{},n=f[b],n&&typeof n=="function"){g(n,f);return}}}};for(var r in i)window[r]=i[r];a.register("_hasJavascriptMethod",function(e,s){var t=e.split(".");if(t.length<2)return!!(_dsf[t]||_dsaf[t]);var e=t.pop(),d=t.join("."),o=_dsf._obs[d]||_dsaf._obs[d];return o&&!!o[e]})}}(),l=a,l}var y=J();const N=x(y),k=D({__proto__:null,default:N},[y]);export{k as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as i,j as t,N as o,dd as c,o as n}from"./index-
|
|
1
|
+
import{r as i,j as t,N as o,dd as c,o as n}from"./index-tJqcQJw8.js";const h=e=>i.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.36096 2.3999C7.04725 2.3999 6.76249 2.58326 6.63267 2.86886L0.872671 15.5409C0.825415 15.6448 0.800964 15.7577 0.800964 15.8719V15.9999V27.3919C0.800964 27.8337 1.15914 28.1919 1.60096 28.1919H30.401C30.8428 28.1919 31.201 27.8337 31.201 27.3919V15.8719C31.201 15.7577 31.1765 15.6448 31.1293 15.5409L25.3693 2.86886C25.2394 2.58326 24.9547 2.3999 24.641 2.3999H7.36096ZM2.40096 16.7999V26.5919H29.601V16.7932C29.5669 16.7976 29.5321 16.7999 29.4968 16.7999H22.3993L20.3328 19.8997C20.1845 20.1222 19.9347 20.2559 19.6672 20.2559H11.6032C11.3357 20.2559 11.0859 20.1222 10.9375 19.8997L8.87104 16.7999H2.40096ZM29.2167 15.1999H21.9712C21.7037 15.1999 21.4539 15.3336 21.3056 15.5561L19.239 18.6559H12.0313L9.96483 15.5561C9.81645 15.3336 9.56667 15.1999 9.29919 15.1999H2.78519L7.8761 3.9999H24.1258L29.2167 15.1999Z",fill:"currentColor"})),a=c(o)`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
align-items: center;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{r as t,g as n,j as r,bE as i,d1 as a}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-PGkZ-p10.js","./index-tJqcQJw8.js","./index-DGkT7afN.css","./decode-DPztD6kB.js","./index-CX3PrUL2.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as t,g as n,j as r,bE as i,d1 as a}from"./index-tJqcQJw8.js";const s=t.lazy(()=>i(()=>import("./index-PGkZ-p10.js").then(o=>o.i),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),d=`{
|
|
3
3
|
getNodeInfo {
|
|
4
4
|
code
|
|
5
5
|
info {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u,j as s,C as d,A as x,ay as v,cq as C,cr as f,af as j,E as I,N as P,bw as E}from"./index-
|
|
1
|
+
import{u,j as s,C as d,A as x,ay as v,cq as C,cr as f,af as j,E as I,N as P,bw as E}from"./index-tJqcQJw8.js";import{I as S}from"./invitation-DnVLx9Vx.js";import{g as N}from"./get-safe-url-DL1Ksc1t.js";import"./index-Dk3siGj5.js";import"./index-DFduzc0K.js";import"./emotion-cache.browser.esm-DzLuQ31t.js";import"./sdk-Cav0C3IX.js";import"./wrap-locale-DSFFbKk8.js";function R(n){const{searchParams:a}=new URL(window.location.href),g=x(),{api:i,session:r}=v(),{info:l}=u(),c=a.get("redirect"),p=a.get("id"),o=C(async()=>{if(!p)return null;const{data:t}=await i.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return t}),m=f(()=>{if(o.error)throw o.error;return o?.data}),h=f(async(t,w=e=>e)=>{t&&(t.sessionToken&&j(w(t.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const e=decodeURIComponent(c);e.startsWith(I.WELLKNOWN_SERVICE_PATH_PREFIX)?g(e,{replace:!0}):window.location.href=N(e)}else window.location.href=window.env.pathPrefix||"/"},50)});return o.loading?s.jsx(d,{}):s.jsx(P,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:s.jsx(S,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:t=>E(t,l),checkFn:i.get,onLoginSuccess:h,passportColor:"default",onLogin:r.login})})}function b(){return u().loading?s.jsx(d,{}):s.jsx(R,{})}export{b as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cE as $m,bd as jL,g_ as oT,ba as Xm,bb as Zm,cR as qm,be as JL,r as QL}from"./index-
|
|
1
|
+
import{cE as $m,bd as jL,g_ as oT,ba as Xm,bb as Zm,cR as qm,be as JL,r as QL}from"./index-tJqcQJw8.js";/*! *****************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation.
|
|
3
3
|
|
|
4
4
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as P,m as E,A as C,j as e,Z as W,C as j,cB as I,N as T,w as k,H as u,E as N,u as S,x as U,ar as v,af as R}from"./index-
|
|
1
|
+
import{r as P,m as E,A as C,j as e,Z as W,C as j,cB as I,N as T,w as k,H as u,E as N,u as S,x as U,ar as v,af as R}from"./index-tJqcQJw8.js";import{w as b}from"./wrap-locale-DSFFbKk8.js";import{g as L}from"./get-safe-url-DL1Ksc1t.js";function B({SessionContext:n,webWalletUrl:a,onSuccess:r}){const{api:o,session:t}=P.useContext(n),{t:s,locale:g}=E(),h=C(),{searchParams:l}=new URL(window.location.href),p=l.get("redirect"),f=async(c,w)=>{r(c,w),await t.refresh(),u.success(s("exchangePassport.success")),setTimeout(()=>{if(p){const i=decodeURIComponent(p);i.startsWith(N.WELLKNOWN_SERVICE_PATH_PREFIX)?h(i,{replace:!0}):window.location.href=L(i)}else window.location.href=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},m=c=>{u.error(c.message)},d={},x=l.get("componentId");return x&&(d.componentId=x),t.loading?e.jsx(W,{children:e.jsx(j,{})}):e.jsx(I,{did:window?.blocklet?.appPid||window?.env?.appPid,children:e.jsx(T,{sx:{maxWidth:"100%",height:"100%"},children:e.jsx(k,{popup:!0,open:!0,className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:f,onError:m,locale:g,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:d,extraContent:null,hideCloseButton:!0})})})}const _=b(B);function K(){const{info:n}=S(),a=U(n),r=(o,t)=>{o.sessionToken&&R(t(o.sessionToken))};return e.jsx(_,{SessionContext:v,webWalletUrl:a,onSuccess:r})}export{K as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c0 as c,r as _,cr as f,h0 as S,cR as r}from"./index-tJqcQJw8.js";var d=function(n){var a=c(_.useState(n),2),u=a[0],o=a[1],i=f(function(t){o(function(e){var s=S(t)?t(e):t;return s?r(r({},e),s):e})});return[u,i]};export{d as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as f,g as Ce,j as e,C as H,L as ve,s as O,o as E,u as ce,m as Q,n as we,q as Se,$ as Be,D as Ee,T as F,t as G,v as q,w as Te,x as Le,y as Ae,z as Ie,A as me,H as M,B as De,d as Fe,f as Pe,E as Re,F as Ne,I as _e,J as N,K as ee,M as te,N as B,O as Ue,P as _,Q as se,R as Me,S as oe,U as le,V as Oe,X as ne,Y as We,Z as $e}from"./index-
|
|
1
|
+
import{r as f,g as Ce,j as e,C as H,L as ve,s as O,o as E,u as ce,m as Q,n as we,q as Se,$ as Be,D as Ee,T as F,t as G,v as q,w as Te,x as Le,y as Ae,z as Ie,A as me,H as M,B as De,d as Fe,f as Pe,E as Re,F as Ne,I as _e,J as N,K as ee,M as te,N as B,O as Ue,P as _,Q as se,R as Me,S as oe,U as le,V as Oe,X as ne,Y as We,Z as $e}from"./index-tJqcQJw8.js";import{u as ze}from"./useLocalStorage-DnHseBMC.js";import{g as qe,H as Ve}from"./index-DzXOEuwn.js";import{y as He}from"./index-BPByI5gc.js";import{B as I}from"./status-vgu2kfq8.js";import{D as Qe,u as Ke,B as re}from"./actions-D8IVwECn.js";import{u as de,W as Xe}from"./url-evaluation-DWvC8Wb1.js";import{I as Je,B as Ye}from"./install-from-url-R3-z-Na6.js";import{L as Ze}from"./Launch-D-Zf7oaA.js";import{A as Ge}from"./Add-BsCasUcs.js";import{v as D}from"./index-KQW85_sG.js";import{s as ae}from"./schema-wSADEA-R.js";import{P as et}from"./permission-BdpMR93f.js";import"./FilterList-DgzeYNjK.js";import"./CSSTransition-DSxV7K4V.js";import"./emotion-cache.browser.esm-DzLuQ31t.js";import"./index-hv--3OFd.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-DUSDIMu_.js";import"./TableSearch-DH2QxdMb.js";import"./Search-TKSWz34N.js";import"./Clear-dbJWv3QG.js";import"./MoreVert-B0v12xlt.js";import"./get-safe-url-DL1Ksc1t.js";import"./ButtonGroup-CF6fFlve.js";import"./getValidReactChildren-DV_bKjsu.js";import"./without-wallet-CavlEQVy.js";import"./index-BFj_BZkU.js";import"./cloneDeep-DiUBoCJs.js";import"./index-gyjan-8E.js";import"./Autocomplete-DjYVg0xw.js";import"./ListSubheader-BYRJFOMa.js";import"./ListItemButton-CBCcz25V.js";import"./Stepper-C1wqVhiQ.js";function V({blocklet:j,skipAccessibilityCheck:d=!1,...c}){const{t:r}=f.useContext(Ce),{urls:C,loading:n,recommendedUrl:h}=de(j);if(n&&!d)return e.jsx(H,{size:12,...c});const g=d?C[0]:h;return g?e.jsx(st,{...c,children:e.jsx(tt,{children:e.jsxs(ve,{href:g,target:"_blank",className:"blocklet-interface",underline:"hover",children:[r("common.visit"),e.jsx(Ze,{fontSize:"12",sx:{marginLeft:.5}})]})})}):r("blocklet.router.noAccessibleUrl")}const tt=O.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
margin: 4px 0;
|
|
4
4
|
`,st=O.div`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,u as U,j as e,T as k,be as Q,N as i,s as D,b2 as X,o as l,g as $,i as M,d2 as Y,bk as ee,d as te,Z as re,C as ne,m as se,J as v,a as h,E as L,b,d3 as oe,M as ie,bt as ae,aE as le,d4 as me,G as C,H as R,k as ce,l as ue,A as de,bm as pe}from"./index-
|
|
1
|
+
import{r as a,u as U,j as e,T as k,be as Q,N as i,s as D,b2 as X,o as l,g as $,i as M,d2 as Y,bk as ee,d as te,Z as re,C as ne,m as se,J as v,a as h,E as L,b,d3 as oe,M as ie,bt as ae,aE as le,d4 as me,G as C,H as R,k as ce,l as ue,A as de,bm as pe}from"./index-tJqcQJw8.js";import{u as fe,T as xe}from"./html-title-CLvLOLbR.js";import{T as ge}from"./traffic-CsK46tzJ.js";import{H as he}from"./index-DzXOEuwn.js";import{x as V}from"./index-DRYJ0xIl.js";import{C as ye,M as T}from"./memory-CFo0vaiY.js";import{C as ve}from"./CardContent-Bx23N-y1.js";import{u as Ce}from"./useLocalStorage-DnHseBMC.js";import{T as je,a as Ie}from"./ToggleButtonGroup-BtechD_B.js";import"./iframe-CujpH5O-.js";import"./ChevronLeft-DneAQDKO.js";import"./ChevronRight-C_XYjhxd.js";import"./index-DBii9-f-.js";import"./typeof-QjJsDpFa.js";import"./base-chart-Zi8pdr17.js";import"./index-BwFgT4f9.js";import"./AdapterDayjs-DarkZR9j.js";import"./useThemeProps-C2xCEKGa.js";import"./CSSTransition-DSxV7K4V.js";import"./visuallyHidden-Dan1xhjv.js";import"./FilterList-DgzeYNjK.js";import"./emotion-cache.browser.esm-DzLuQ31t.js";import"./index-hv--3OFd.js";import"./redux-DfszZyTl.js";import"./depsEqual-DUSDIMu_.js";import"./index-BPByI5gc.js";import"./TableSearch-DH2QxdMb.js";import"./Search-TKSWz34N.js";import"./Clear-dbJWv3QG.js";import"./MoreVert-B0v12xlt.js";import"./getValidReactChildren-DV_bKjsu.js";const be=o=>a.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...o},a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.08295 3.2C2.08295 2.58144 2.58439 2.08 3.20295 2.08H28.8029C29.4215 2.08 29.9229 2.58144 29.9229 3.2V13.44C29.9229 14.0586 29.4215 14.56 28.8029 14.56H3.20295C2.58439 14.56 2.08295 14.0586 2.08295 13.44V3.2ZM4.32295 4.32V12.32H27.6829V4.32H4.32295ZM2.08295 18.56C2.08295 17.9414 2.58439 17.44 3.20295 17.44H28.8029C29.4215 17.44 29.9229 17.9414 29.9229 18.56V28.8C29.9229 29.4186 29.4215 29.92 28.8029 29.92H3.20295C2.58439 29.92 2.08295 29.4186 2.08295 28.8V18.56ZM4.32295 19.68V27.68H27.6829V19.68H4.32295Z",fill:"currentColor"}),a.createElement("path",{d:"M8.96297 7.04001H7.68297C7.51323 7.04001 7.35044 7.10744 7.23042 7.22746C7.1104 7.34748 7.04297 7.51027 7.04297 7.68001V8.96001C7.04297 9.12975 7.1104 9.29253 7.23042 9.41256C7.35044 9.53258 7.51323 9.60001 7.68297 9.60001H8.96297C9.13271 9.60001 9.29549 9.53258 9.41552 9.41256C9.53554 9.29253 9.60297 9.12975 9.60297 8.96001V7.68001C9.60297 7.51027 9.53554 7.34748 9.41552 7.22746C9.29549 7.10744 9.13271 7.04001 8.96297 7.04001ZM8.96297 22.4H7.68297C7.51323 22.4 7.35044 22.4674 7.23042 22.5875C7.1104 22.7075 7.04297 22.8703 7.04297 23.04V24.32C7.04297 24.4897 7.1104 24.6525 7.23042 24.7726C7.35044 24.8926 7.51323 24.96 7.68297 24.96H8.96297C9.13271 24.96 9.29549 24.8926 9.41552 24.7726C9.53554 24.6525 9.60297 24.4897 9.60297 24.32V23.04C9.60297 22.8703 9.53554 22.7075 9.41552 22.5875C9.29549 22.4674 9.13271 22.4 8.96297 22.4ZM14.083 7.04001H12.803C12.6332 7.04001 12.4704 7.10744 12.3504 7.22746C12.2304 7.34748 12.163 7.51027 12.163 7.68001V8.96001C12.163 9.12975 12.2304 9.29253 12.3504 9.41256C12.4704 9.53258 12.6332 9.60001 12.803 9.60001H14.083C14.2527 9.60001 14.4155 9.53258 14.5355 9.41256C14.6555 9.29253 14.723 9.12975 14.723 8.96001V7.68001C14.723 7.51027 14.6555 7.34748 14.5355 7.22746C14.4155 7.10744 14.2527 7.04001 14.083 7.04001ZM14.083 22.4H12.803C12.6332 22.4 12.4704 22.4674 12.3504 22.5875C12.2304 22.7075 12.163 22.8703 12.163 23.04V24.32C12.163 24.4897 12.2304 24.6525 12.3504 24.7726C12.4704 24.8926 12.6332 24.96 12.803 24.96H14.083C14.2527 24.96 14.4155 24.8926 14.5355 24.7726C14.6555 24.6525 14.723 24.4897 14.723 24.32V23.04C14.723 22.8703 14.6555 22.7075 14.5355 22.5875C14.4155 22.4674 14.2527 22.4 14.083 22.4Z",fill:"currentColor"}));function Me(){const{api:o,info:s}=U();return e.jsx(ge,{client:o,did:s.did})}function P({style:o={},title:s=null,value:m=null,graph:c=null,description:p=null,empty:f=null}){return e.jsx(ke,{children:e.jsxs(ve,{style:{...o},children:[e.jsx(k,{sx:{color:"text.secondary",fontSize:14},children:s}),f&&Q.isValidElement(f)?e.jsx(i,{style:{height:150},sx:{color:"text.secondary",display:"flex",justifyContent:"center",alignItems:"center"},children:f}):e.jsxs(e.Fragment,{children:[e.jsx(k,{variant:"h5",component:"div",sx:{mt:1},children:m}),c,!!p&&e.jsx(i,{sx:{display:"flex",color:"text.secondary",fontSize:12,marginTop:3},children:p})]})]})})}P.propTypes={style:l.object,title:l.node,value:l.node,graph:l.node,description:l.any,empty:l.node};const ke=D(X)`
|
|
2
2
|
.card-content {
|
|
3
3
|
height: 150px;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aG as le,j as e,hw as ce,bd as ue,bn as Y,m as Z,fO as ee,f8 as te,aP as re,cr as u,H as E,hx as M,N as R,t as x,hy as V,aU as H,Q as p,az as de,v as N,s as ie,aV as ne,z as me,y as fe,E as he,r as U,g as xe,by as pe}from"./index-BfhNDOKb.js";import{T as ve}from"./html-title-C3ppIMLo.js";import{u as se,C as m}from"./index.esm-Dw_hd_87.js";import{S as h,A as je,a as be,b as ge,c as ye}from"./collapse-GWSPzyG0.js";import{u as ae}from"./blocklet-BepSnsS4.js";import{S as $}from"./Switch-Crle-Atf.js";const Re=le(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"}));var K={exports:{}},O={exports:{}},z={exports:{}},J;function Te(){return J||(J=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=t;function t(d){return d==null}c.exports=s.default,c.exports.default=s.default}(z,z.exports)),z.exports}var Q;function ke(){return Q||(Q=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=S;var t=b(ce()),d=b(Te());function b(n){return n&&n.__esModule?n:{default:n}}var f=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,P=/^[-+]?[0-9]+$/;function S(n,i){(0,t.default)(n),i=i||{};var _=i.allow_leading_zeroes===!1?f:P,q=!i.hasOwnProperty("min")||(0,d.default)(i.min)||n>=i.min,l=!i.hasOwnProperty("max")||(0,d.default)(i.max)||n<=i.max,a=!i.hasOwnProperty("lt")||(0,d.default)(i.lt)||n<i.lt,C=!i.hasOwnProperty("gt")||(0,d.default)(i.gt)||n>i.gt;return _.test(n)&&q&&l&&a&&C}c.exports=s.default,c.exports.default=s.default}(O,O.exports)),O.exports}var G;function we(){return G||(G=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=b;var t=d(ke());function d(f){return f&&f.__esModule?f:{default:f}}function b(f){return(0,t.default)(f,{allow_leading_zeroes:!1,min:0,max:65535})}c.exports=s.default,c.exports.default=s.default}(K,K.exports)),K.exports}var Ee=we();const Se=ue(Ee),B={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function Ce(){const{api:c}=Y(),{blocklet:s}=ae(),{t}=Z(),{confirmApi:d,confirmHolder:b}=ee(),f=s?.meta?.did,P=Object.assign({...B},s?.settings?.notification?.email||{}),{handleSubmit:S,control:n,formState:i,watch:_,reset:q}=se({defaultValues:te(P,Object.keys(B))}),l=re({testReceiver:"",testReceiverError:""}),a=_("enabled"),C=u(async(r,g,w=!0)=>{try{const{blocklet:y}=await c.configNotification({input:{did:f,notification:JSON.stringify({email:r})}}),oe=Object.assign({...B},y?.settings?.notification?.email||{});q(oe),w&&E.success(t("oauth.saveSuccess"))}catch(y){if(w)E.error(y.message||t("oauth.saveFailed"));else throw y}}),W=u(async(r,g,w)=>{try{i.isDirty&&await C(r,g,!1),await c.sendEmail({input:{did:f,receiver:w,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification",attachments:[{type:"link",data:{url:"https://community.arcblock.io",title:"Community",image:"https://community.arcblock.io/.well-known/service/blocklet/logo-rect-dark",utm:{campaign:"test-campaign"}}}],utm:{content:"test-email-button"}})}}),E.success(t("notification.email.testSuccess"))}catch(y){E.error(y.message||t("notification.email.testfailed"))}}),A=u((r,g)=>{l.testReceiver=localStorage.getItem("test-receiver")||"",l.testReceiverError="",d.open({title:t("notification.email.testSendEmail"),content:()=>e.jsx(R,{sx:{width:"300px"},children:e.jsx(x,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.email.inputTestReceiver"),value:l.testReceiver,onChange:w=>{l.testReceiver=w.target.value},error:!!l.testReceiverError,helperText:l.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(w){const y=l.testReceiver?.trim();if(!y){l.testReceiverError=t("notification.email.receiverRequired");return}if(!M(y)){l.testReceiverError=t("notification.email.receiverInvalid");return}l.testReceiverError="",await W(r,g,y),w()}})}),F=u(r=>{const g=r?.trim();return g?M(g)?!0:t("notification.email.fromInvalid"):t("notification.email.fromRequired")}),L=u(r=>{const g=r?.trim();return g?V(g,{require_host:!1,protocols:[]})?!0:t("notification.email.hostInvalid"):t("notification.email.hostRequired")}),o=u(r=>r?Se(r)?!0:t("notification.email.portInvalid"):t("notification.email.portRequired")),T=u(r=>r?.trim()?!0:t("notification.email.userRequired")),v=u(r=>r?.trim()?!0:t("notification.email.passwordRequired")),k=u(r=>r?.trim()&&!V(r,{protocols:["http","https"],require_protocol:!0})?t("notification.email.linkInvalid"):!0),I=u(r=>r?.trim()&&!M(r)?t("notification.email.emailInvalid"):!0),j=u(()=>!0);return e.jsxs(R,{children:[e.jsxs(Pe,{component:"form",onSubmit:S(C),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(h,{title:t("notification.email.enable"),my:2.5,children:e.jsx(m,{name:"enabled",control:n,render:({field:r})=>e.jsx(H,{control:e.jsx($,{checked:r.value,...r})})})}),e.jsx(h,{title:t("notification.email.from"),children:e.jsx(m,{name:"from",control:n,rules:{validate:a?F:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,label:t("notification.email.from"),error:!!i.errors[r.name],helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.host"),children:e.jsx(m,{name:"host",control:n,rules:{validate:a?L:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,error:!!i.errors[r.name],label:t("notification.email.host"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.port"),children:e.jsx(m,{name:"port",control:n,rules:{validate:a?o:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,type:"number",error:!!i.errors[r.name],label:t("notification.email.port"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.user"),children:e.jsx(m,{name:"user",control:n,rules:{validate:a?T:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,error:!!i.errors[r.name],label:t("notification.email.user"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.password"),children:e.jsx(m,{name:"password",control:n,rules:{validate:a?v:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,type:"password",error:!!i.errors[r.name],label:t("notification.email.password"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.secure"),children:e.jsx(m,{name:"secure",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(H,{control:e.jsx($,{checked:r.value,...r,disabled:!a})})})})}),e.jsxs(je,{children:[e.jsxs(be,{expandIcon:e.jsx(ge,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[t("notification.email.signature"),e.jsx(de,{title:t("notification.email.signatureTooltip"),children:e.jsx(Re,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(ye,{children:[e.jsx(h,{title:t("notification.email.companyName"),children:e.jsx(m,{name:"companyName",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyName"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.companyLink"),children:e.jsx(m,{name:"companyLink",control:n,rules:{validate:a?k:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyLink"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.companyAddress"),children:e.jsx(m,{name:"companyAddress",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyAddress"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.supportEmail"),children:e.jsx(m,{name:"supportEmail",control:n,rules:{validate:a?I:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",type:"email",error:!!i.errors[r.name],label:t("notification.email.supportEmail"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})})]})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(N,{variant:"outlined",color:"warning",onClick:S(A),disabled:!a,children:t("oauth.runTest")}),e.jsx(N,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),b]})}const Pe=ie(ne)``,D={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function _e(){const{api:c}=Y(),{blocklet:s}=ae(),{t}=Z(),{confirmApi:d,confirmHolder:b}=ee(),f=s?.meta?.did,P=Object.assign({...D},s?.settings?.notification?.pushKit||{}),{handleSubmit:S,control:n,formState:i,watch:_,reset:q}=se({defaultValues:te(P,Object.keys(D))}),l=re({testReceiver:"",testReceiverError:""}),a=_("enabled"),C=u(async(o,T,v=!0)=>{try{const{blocklet:k}=await c.configNotification({input:{did:f,notification:JSON.stringify({pushKit:o})}}),I=Object.assign({...D},k?.settings?.notification?.pushKit||{});q(I),v&&E.success(t("oauth.saveSuccess"))}catch(k){if(v)E.error(k.message||t("oauth.saveFailed"));else throw k}}),W=u(async(o,T)=>{try{i.isDirty&&await C(o,T,!1);const v=(s?.configs||[]).find(j=>j.key==="BLOCKLET_APP_URL")?.value,k=me(fe(v,he.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),{v:s?.meta?.version,t:new Date(s?.updatedAt||0).getTime()}),I={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:s?.appDid,fullName:s?.meta?.title,avatar:k}}}};await c.sendPush({input:{did:f,receiver:l.testReceiver,notification:JSON.stringify(I)}}),E.success(t("notification.pushKit.testSuccess"))}catch(v){E.error(v.message||t("notification.pushKit.testfailed"))}}),A=u((o,T)=>{l.testReceiverError="",d.open({title:t("notification.pushKit.testSend"),content:()=>e.jsx(R,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(x,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.pushKit.inputTestReceiver"),value:l.testReceiver,onChange:v=>{l.testReceiver=v.target.value},error:!!l.testReceiverError,helperText:l.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(v){if(!l.testReceiver?.trim()){l.testReceiverError=t("notification.pushKit.receiverRequired");return}l.testReceiverError="",await W(o,T),v()}})}),F=u(o=>{const T=o?.trim();return T?V(T)?!0:t("notification.pushKit.endpointInvalid"):t("notification.pushKit.endpointRequired")}),L=u(()=>!0);return e.jsxs(R,{children:[e.jsxs(qe,{component:"form",onSubmit:S(C),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(h,{title:t("notification.pushKit.enable"),my:2.5,children:e.jsx(m,{name:"enabled",control:n,render:({field:o})=>e.jsx(H,{control:e.jsx($,{checked:o.value,...o})})})}),e.jsx(h,{title:t("notification.pushKit.endpoint"),children:e.jsx(m,{name:"endpoint",control:n,rules:{validate:a?F:L},render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",required:!0,label:t("notification.pushKit.endpoint"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})})}),e.jsxs(h,{title:t("notification.pushKit.customOptions"),children:[e.jsx(m,{name:"did",control:n,render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",label:t("notification.pushKit.did"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})}),e.jsx(m,{name:"pushPath",control:n,render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",label:t("notification.pushKit.pushPath"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(N,{variant:"outlined",color:"warning",onClick:S(A),disabled:!a,children:t("oauth.runTest")}),e.jsx(N,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),b]})}const qe=ie(ne)``,X=[{label:e.jsx(R,{sx:{textAlign:"center",width:"100%"},children:"Email"}),value:"email"},{label:e.jsx(R,{sx:{textAlign:"center",width:"100%"},children:"Push Kit"}),value:"pushKit"}];function Ae(){const[c,s]=U.useState(X[0].value),{locale:t}=U.useContext(xe),d=pe(()=>({email:e.jsx(Ce,{}),pushKit:e.jsx(_e,{})}),[t]),b=U.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(R,{children:[e.jsx(ve,{tabs:X,current:c,onChange:s}),e.jsx(R,{style:b,children:d[c]})]})}export{Ae as B};
|
|
1
|
+
import{aG as le,j as e,hw as ce,bd as ue,bn as Y,m as Z,fO as ee,f8 as te,aP as re,cr as u,H as E,hx as M,N as R,t as x,hy as V,aU as H,Q as p,az as de,v as N,s as ie,aV as ne,z as me,y as fe,E as he,r as U,g as xe,by as pe}from"./index-tJqcQJw8.js";import{T as ve}from"./html-title-CLvLOLbR.js";import{u as se,C as m}from"./index.esm-DEWYqPkv.js";import{S as h,A as je,a as be,b as ge,c as ye}from"./collapse-CmEfNn01.js";import{u as ae}from"./blocklet-C03sDJ1i.js";import{S as $}from"./Switch-p1fa_uPC.js";const Re=le(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"}));var K={exports:{}},O={exports:{}},z={exports:{}},J;function Te(){return J||(J=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=t;function t(d){return d==null}c.exports=s.default,c.exports.default=s.default}(z,z.exports)),z.exports}var Q;function ke(){return Q||(Q=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=S;var t=b(ce()),d=b(Te());function b(n){return n&&n.__esModule?n:{default:n}}var f=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,P=/^[-+]?[0-9]+$/;function S(n,i){(0,t.default)(n),i=i||{};var _=i.allow_leading_zeroes===!1?f:P,q=!i.hasOwnProperty("min")||(0,d.default)(i.min)||n>=i.min,l=!i.hasOwnProperty("max")||(0,d.default)(i.max)||n<=i.max,a=!i.hasOwnProperty("lt")||(0,d.default)(i.lt)||n<i.lt,C=!i.hasOwnProperty("gt")||(0,d.default)(i.gt)||n>i.gt;return _.test(n)&&q&&l&&a&&C}c.exports=s.default,c.exports.default=s.default}(O,O.exports)),O.exports}var G;function we(){return G||(G=1,function(c,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=b;var t=d(ke());function d(f){return f&&f.__esModule?f:{default:f}}function b(f){return(0,t.default)(f,{allow_leading_zeroes:!1,min:0,max:65535})}c.exports=s.default,c.exports.default=s.default}(K,K.exports)),K.exports}var Ee=we();const Se=ue(Ee),B={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:"",companyName:"",companyLink:"",companyAddress:"",supportEmail:""};function Ce(){const{api:c}=Y(),{blocklet:s}=ae(),{t}=Z(),{confirmApi:d,confirmHolder:b}=ee(),f=s?.meta?.did,P=Object.assign({...B},s?.settings?.notification?.email||{}),{handleSubmit:S,control:n,formState:i,watch:_,reset:q}=se({defaultValues:te(P,Object.keys(B))}),l=re({testReceiver:"",testReceiverError:""}),a=_("enabled"),C=u(async(r,g,w=!0)=>{try{const{blocklet:y}=await c.configNotification({input:{did:f,notification:JSON.stringify({email:r})}}),oe=Object.assign({...B},y?.settings?.notification?.email||{});q(oe),w&&E.success(t("oauth.saveSuccess"))}catch(y){if(w)E.error(y.message||t("oauth.saveFailed"));else throw y}}),W=u(async(r,g,w)=>{try{i.isDirty&&await C(r,g,!1),await c.sendEmail({input:{did:f,receiver:w,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification",attachments:[{type:"link",data:{url:"https://community.arcblock.io",title:"Community",image:"https://community.arcblock.io/.well-known/service/blocklet/logo-rect-dark",utm:{campaign:"test-campaign"}}}],utm:{content:"test-email-button"}})}}),E.success(t("notification.email.testSuccess"))}catch(y){E.error(y.message||t("notification.email.testfailed"))}}),A=u((r,g)=>{l.testReceiver=localStorage.getItem("test-receiver")||"",l.testReceiverError="",d.open({title:t("notification.email.testSendEmail"),content:()=>e.jsx(R,{sx:{width:"300px"},children:e.jsx(x,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.email.inputTestReceiver"),value:l.testReceiver,onChange:w=>{l.testReceiver=w.target.value},error:!!l.testReceiverError,helperText:l.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(w){const y=l.testReceiver?.trim();if(!y){l.testReceiverError=t("notification.email.receiverRequired");return}if(!M(y)){l.testReceiverError=t("notification.email.receiverInvalid");return}l.testReceiverError="",await W(r,g,y),w()}})}),F=u(r=>{const g=r?.trim();return g?M(g)?!0:t("notification.email.fromInvalid"):t("notification.email.fromRequired")}),L=u(r=>{const g=r?.trim();return g?V(g,{require_host:!1,protocols:[]})?!0:t("notification.email.hostInvalid"):t("notification.email.hostRequired")}),o=u(r=>r?Se(r)?!0:t("notification.email.portInvalid"):t("notification.email.portRequired")),T=u(r=>r?.trim()?!0:t("notification.email.userRequired")),v=u(r=>r?.trim()?!0:t("notification.email.passwordRequired")),k=u(r=>r?.trim()&&!V(r,{protocols:["http","https"],require_protocol:!0})?t("notification.email.linkInvalid"):!0),I=u(r=>r?.trim()&&!M(r)?t("notification.email.emailInvalid"):!0),j=u(()=>!0);return e.jsxs(R,{children:[e.jsxs(Pe,{component:"form",onSubmit:S(C),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(h,{title:t("notification.email.enable"),my:2.5,children:e.jsx(m,{name:"enabled",control:n,render:({field:r})=>e.jsx(H,{control:e.jsx($,{checked:r.value,...r})})})}),e.jsx(h,{title:t("notification.email.from"),children:e.jsx(m,{name:"from",control:n,rules:{validate:a?F:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,label:t("notification.email.from"),error:!!i.errors[r.name],helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.host"),children:e.jsx(m,{name:"host",control:n,rules:{validate:a?L:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,error:!!i.errors[r.name],label:t("notification.email.host"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.port"),children:e.jsx(m,{name:"port",control:n,rules:{validate:a?o:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,type:"number",error:!!i.errors[r.name],label:t("notification.email.port"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.user"),children:e.jsx(m,{name:"user",control:n,rules:{validate:a?T:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,error:!!i.errors[r.name],label:t("notification.email.user"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.password"),children:e.jsx(m,{name:"password",control:n,rules:{validate:a?v:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",required:!0,type:"password",error:!!i.errors[r.name],label:t("notification.email.password"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.secure"),children:e.jsx(m,{name:"secure",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(H,{control:e.jsx($,{checked:r.value,...r,disabled:!a})})})})}),e.jsxs(je,{children:[e.jsxs(be,{expandIcon:e.jsx(ge,{fontSize:"small"}),"aria-controls":"panel1-content",id:"panel1-header",children:[t("notification.email.signature"),e.jsx(de,{title:t("notification.email.signatureTooltip"),children:e.jsx(Re,{fontSize:"small",sx:{ml:1,cursor:"help"}})})]}),e.jsxs(ye,{children:[e.jsx(h,{title:t("notification.email.companyName"),children:e.jsx(m,{name:"companyName",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyName"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.companyLink"),children:e.jsx(m,{name:"companyLink",control:n,rules:{validate:a?k:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyLink"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.companyAddress"),children:e.jsx(m,{name:"companyAddress",control:n,rules:{validate:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",error:!!i.errors[r.name],label:t("notification.email.companyAddress"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})}),e.jsx(h,{title:t("notification.email.supportEmail"),children:e.jsx(m,{name:"supportEmail",control:n,rules:{validate:a?I:j},render:({field:r})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...r,size:"small",type:"email",error:!!i.errors[r.name],label:t("notification.email.supportEmail"),helperText:i.errors[r.name]?.message||" ",disabled:!a})})})})]})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(N,{variant:"outlined",color:"warning",onClick:S(A),disabled:!a,children:t("oauth.runTest")}),e.jsx(N,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),b]})}const Pe=ie(ne)``,D={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function _e(){const{api:c}=Y(),{blocklet:s}=ae(),{t}=Z(),{confirmApi:d,confirmHolder:b}=ee(),f=s?.meta?.did,P=Object.assign({...D},s?.settings?.notification?.pushKit||{}),{handleSubmit:S,control:n,formState:i,watch:_,reset:q}=se({defaultValues:te(P,Object.keys(D))}),l=re({testReceiver:"",testReceiverError:""}),a=_("enabled"),C=u(async(o,T,v=!0)=>{try{const{blocklet:k}=await c.configNotification({input:{did:f,notification:JSON.stringify({pushKit:o})}}),I=Object.assign({...D},k?.settings?.notification?.pushKit||{});q(I),v&&E.success(t("oauth.saveSuccess"))}catch(k){if(v)E.error(k.message||t("oauth.saveFailed"));else throw k}}),W=u(async(o,T)=>{try{i.isDirty&&await C(o,T,!1);const v=(s?.configs||[]).find(j=>j.key==="BLOCKLET_APP_URL")?.value,k=me(fe(v,he.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo"),{v:s?.meta?.version,t:new Date(s?.updatedAt||0).getTime()}),I={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:s?.appDid,fullName:s?.meta?.title,avatar:k}}}};await c.sendPush({input:{did:f,receiver:l.testReceiver,notification:JSON.stringify(I)}}),E.success(t("notification.pushKit.testSuccess"))}catch(v){E.error(v.message||t("notification.pushKit.testfailed"))}}),A=u((o,T)=>{l.testReceiverError="",d.open({title:t("notification.pushKit.testSend"),content:()=>e.jsx(R,{sx:{width:"450px",maxWidth:"100%"},children:e.jsx(x,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.pushKit.inputTestReceiver"),value:l.testReceiver,onChange:v=>{l.testReceiver=v.target.value},error:!!l.testReceiverError,helperText:l.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(v){if(!l.testReceiver?.trim()){l.testReceiverError=t("notification.pushKit.receiverRequired");return}l.testReceiverError="",await W(o,T),v()}})}),F=u(o=>{const T=o?.trim();return T?V(T)?!0:t("notification.pushKit.endpointInvalid"):t("notification.pushKit.endpointRequired")}),L=u(()=>!0);return e.jsxs(R,{children:[e.jsxs(qe,{component:"form",onSubmit:S(C),disabled:!0,sx:{".section-left":{width:"160px"}},children:[e.jsx(h,{title:t("notification.pushKit.enable"),my:2.5,children:e.jsx(m,{name:"enabled",control:n,render:({field:o})=>e.jsx(H,{control:e.jsx($,{checked:o.value,...o})})})}),e.jsx(h,{title:t("notification.pushKit.endpoint"),children:e.jsx(m,{name:"endpoint",control:n,rules:{validate:a?F:L},render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",required:!0,label:t("notification.pushKit.endpoint"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})})}),e.jsxs(h,{title:t("notification.pushKit.customOptions"),children:[e.jsx(m,{name:"did",control:n,render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",label:t("notification.pushKit.did"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})}),e.jsx(m,{name:"pushPath",control:n,render:({field:o})=>e.jsx(p,{fullWidth:!0,children:e.jsx(x,{...o,size:"small",label:t("notification.pushKit.pushPath"),error:!!i.errors[o.name],helperText:i.errors[o.name]?.message||" ",disabled:!a})})})]}),e.jsxs(R,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[e.jsx(N,{variant:"outlined",color:"warning",onClick:S(A),disabled:!a,children:t("oauth.runTest")}),e.jsx(N,{type:"submit",variant:"contained",disabled:!i.isDirty,children:t("oauth.save")})]})]}),b]})}const qe=ie(ne)``,X=[{label:e.jsx(R,{sx:{textAlign:"center",width:"100%"},children:"Email"}),value:"email"},{label:e.jsx(R,{sx:{textAlign:"center",width:"100%"},children:"Push Kit"}),value:"pushKit"}];function Ae(){const[c,s]=U.useState(X[0].value),{locale:t}=U.useContext(xe),d=pe(()=>({email:e.jsx(Ce,{}),pushKit:e.jsx(_e,{})}),[t]),b=U.useMemo(()=>({padding:"10px 0"}),[]);return e.jsxs(R,{children:[e.jsx(ve,{tabs:X,current:c,onChange:s}),e.jsx(R,{style:b,children:d[c]})]})}export{Ae as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aG as de,j as e,hg as Ps,hh as Ts,bL as Es,r as L,s as ve,N as A,f4 as wt,t as U,eN as ht,a4 as ne,C as Ee,bi as zt,dK as Is,o as T,hi as Ds,b2 as Bt,cw as Ls,cP as qs,dn as Ms,T as K,dF as at,bn as re,bz as ft,g as ue,hj as zs,bA as mt,b as W,bg as X,dH as Q,H as Z,aV as ie,m as ae,n as Ht,q as Bs,w as Nt,ad as Hs,J as Ft,ga as Ns,hk as Fs,au as Zs,aU as G,V as Te,$ as ke,D as Vs,X as Us,v as se,Y as it,hl as Ws,hm as Js,ez as Ks,eB as Gs,I as je,E as J,hn as Ys,cX as kt,W as Xs,fl as Zt,az as ee,aR as St,ho as Qs,f8 as Re,cr as I,by as ge,aE as te,Q as Y,aP as ye,hp as qe,a2 as er,hq as Je,c2 as Ce,eC as tr,hr as sr,dG as ce,f as $e,y as Vt,bv as ot,O as rr,cD as Ut,g9 as nr,fO as Ze,hs as ar,b9 as ir,L as or,cq as ze,aK as He,ht as lr,U as cr,ag as Ct,a3 as Wt,bj as Ne,hu as Jt,b6 as dr,gz as we,f9 as Kt,cV as Gt,B as ur,b5 as Rt,fa as hr,ff as fr,G as Ke,M as mr,bt as pr}from"./index-BfhNDOKb.js";import{F as gr,a as yr,s as vr,L as _e,S as xr,B as br}from"./preference-BhbUFlGi.js";import{N as $t}from"./ChevronRight-D-piYz4L.js";import{T as Fe}from"./html-title-C3ppIMLo.js";import{w as Ie,P as jr}from"./permission-CuYYFZUe.js";import{u as pt}from"./index-biZUNG--.js";import{D as _r}from"./Done-DUEpKVRM.js";import{R as wr,S as M}from"./collapse-GWSPzyG0.js";import{A as kr,a as At}from"./Autocomplete-Bxg_V7oZ.js";import{C as Sr,R as Cr,S as Rr,P as $r}from"./rotate-session-key-BigP7BdT.js";import{u as oe}from"./blocklet-BepSnsS4.js";import{C as Ar}from"./click-to-copy-Dlvnt0pX.js";import{u as Ve}from"./team-BWxrfrQj.js";import{v as Yt}from"./index-Bze2XJej.js";import{g as Or}from"./chain-DVuB4tA_.js";import{V as Pr,d as Tr}from"./status-H7hmMAu_.js";import{S as pe}from"./Switch-Crle-Atf.js";import{B as Er}from"./index-B523Fc-A.js";import{y as Ir}from"./index-CMVWYlSS.js";import{I as Dr,J as Lr,K as qr,L as Mr}from"./index-C_D_tHqD.js";import{u as xe,C as B,b as Ot}from"./index.esm-Dw_hd_87.js";import{S as Be,u as zr}from"./switch-control-DyLDeFlC.js";import{D as Pt,R as Xt,a as Qt}from"./url-evaluation-CcNC2lNq.js";import{A as Tt}from"./Add-Nm-0HQuZ.js";import{H as Ue}from"./index-DCzzBd8S.js";import{l as Br}from"./index-IQ4l9n87.js";import{u as es}from"./use-mobile-CcfXCkk-.js";import{S as Ge}from"./simple-select-D8O8cMQI.js";import{G as Hr}from"./actions-CKEgNOLf.js";import{C as Nr}from"./CardContent-Bf9xFcVF.js";import"./omit-D2kGKV7Z.js";import"./index-Df57ynzL.js";import"./edit.svg-CP6Zg7Yn.js";import"./ArrowDropDown-BNqJf_bc.js";import"./ButtonGroup-BdiA1ieO.js";import"./getValidReactChildren-BTX2zlcG.js";import"./index-BAAuc8Ew.js";import"./iframe-DM7J9bTw.js";import"./ListSubheader-CjR9d2qi.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-BC1DA45P.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-C4BaYlJk.js";import"./CSSTransition-BNoCWHCT.js";import"./emotion-cache.browser.esm-BEoMbinK.js";import"./depsEqual-CHzTtbxB.js";import"./TableSearch-DLAP28ea.js";import"./Search-ChuYh2xV.js";import"./Clear-Byq43mbH.js";import"./MoreVert-DpOqnc7J.js";import"./useLocalStorage-BjelqNo4.js";import"./get-safe-url-CeZ-qdMI.js";const ts=de([e.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),e.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")]),Fr=de([e.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),e.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),Zr=de(e.jsx("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"})),Vr=de(e.jsx("path",{d:"M24 9v2h-6V9zM8 4C5.79 4 4 5.79 4 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"})),Ur=de(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),Wr=de(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),lt=de(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),Jr=de([e.jsx("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),e.jsx("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")]),Kr=de(e.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"})),Gr=de(e.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"})),ss=de(e.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23z"})),Yr=de(e.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"})),Xr=de(e.jsx("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}));var Qr=Array.prototype,Et=Qr.splice;function en(x,R,$,C){var _=Ts,j=-1,p=R.length,a=x;for(x===R&&(R=Ps(R));++j<p;)for(var m=0,f=R[j],h=f;(m=_(a,h,m))>-1;)a!==x&&Et.call(a,m,1),Et.call(x,m,1);return x}function tn(x,R){return x&&x.length&&R&&R.length?en(x,R):x}var sn=Es(tn);const rn={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'};function rs({label:x="",disabled:R=!1,required:$=!1,initialValue:C="",onChange:_=()=>{},style:j={},onSubmit:p=()=>{},triggers:a=[],options:m=[],formatterBeforeSubmit:f=n=>n.join(","),helperText:h="",placeholder:t="",renderImage:l=()=>null,renderLabel:o=()=>"",filterKeys:r=["name"],noEmpty:s=!1,...c}){const[n,i]=L.useState(!1),[u,g]=L.useState(!1),[y,k]=L.useState(""),w=L.useRef(null),[d,v]=L.useState(C),[b,S]=L.useState(d),O=L.useMemo(()=>{if(!m)return{};const q={};return m.forEach(z=>{q[z.code]=z}),q},[m]),P=()=>{if(!m)return[];if(!y)return m.map(z=>z.code);const q=new RegExp(y.toLowerCase());return m.filter(z=>{for(let N=0;N<r.length;N++){const V=r[N];if(q.test(z[V]?.toLowerCase()))return!0}return!1}).map(z=>z.code)},D=async()=>{g(!0);try{await p(typeof f=="function"?f(b):b)===!1?S(d):s&&!b.length?(S(C),v(C)):(S(b),v(b))}catch{S(d)}finally{g(!1),i(!1)}},E=(q,z)=>{if(!Array.isArray(z)){S([]),_([]);return}const N=z.filter(V=>O[V]);if(!N.length){S([]),_([]);return}S(N),_(N)},H=q=>{q.stopPropagation(),i(!0),setTimeout(()=>{if(w.current){const z=w.current.querySelector("input");z&&z.focus()}},500)},F=n?e.jsx(kr,{ref:w,options:m,value:b,onChange:E,inputValue:y,onInputChange:(q,z)=>{k(z)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:P,getOptionLabel:q=>O[q]?.name,renderInput:q=>e.jsx(U,{...q,label:"",placeholder:t}),renderOption:(q,z)=>{const N=b.indexOf(z)!==-1;return L.createElement(nn,{component:"li",...q,key:z},l(O[z]||{}),e.jsx(A,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:N?"700":"normal"},children:o(z,O[z])||O[z]?.name}),e.jsx(A,{component:wt,sx:{opacity:.5,width:18,height:18},style:{visibility:N?"visible":"hidden"}}))},...c,slots:{popper:an}}):e.jsx(A,{className:"form-item-input slot",onClick:H,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(q=>m.some(z=>z.code===q)).map(q=>e.jsx(ht,{label:m.find(z=>z.code===q).name,style:{marginRight:8},size:"small"},q))});return e.jsx(gr,{className:"form",style:j,children:e.jsxs(A,{className:"form-item",children:[e.jsxs(A,{className:"form-item-label",children:[x,$&&e.jsx(wr,{})]}),e.jsxs(A,{className:"form-item-body",children:[e.jsx(A,{className:"form-item-input",children:F}),n?e.jsx(A,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(ne,{"data-cy":"schema-form-item-confirm",onClick:D,disabled:R||u,size:"large",children:u?e.jsx(Ee,{size:24}):e.jsx(_r,{})}),e.jsx(ne,{"data-cy":"schema-form-item-cancel",onClick:()=>{S(d),i(!1)},disabled:R||u,size:"large",children:e.jsx(wt,{})})]})}):null]}),n&&h&&e.jsx(zt,{children:h})]})})}rs.propTypes={style:T.object,onSubmit:T.func,onChange:T.func,label:T.string,initialValue:T.string,required:T.bool,disabled:T.bool,triggers:T.array,options:T.array,helperText:T.string,formatterBeforeSubmit:T.func,placeholder:T.string,renderImage:T.func,filterKeys:T.arrayOf(T.string),noEmpty:T.bool,renderLabel:T.func};const nn=ve.div`
|
|
1
|
+
import{aG as de,j as e,hg as Ps,hh as Ts,bL as Es,r as L,s as ve,N as A,f4 as wt,t as U,eN as ht,a4 as ne,C as Ee,bi as zt,dK as Is,o as T,hi as Ds,b2 as Bt,cw as Ls,cP as qs,dn as Ms,T as K,dF as at,bn as re,bz as ft,g as ue,hj as zs,bA as mt,b as W,bg as X,dH as Q,H as Z,aV as ie,m as ae,n as Ht,q as Bs,w as Nt,ad as Hs,J as Ft,ga as Ns,hk as Fs,au as Zs,aU as G,V as Te,$ as ke,D as Vs,X as Us,v as se,Y as it,hl as Ws,hm as Js,ez as Ks,eB as Gs,I as je,E as J,hn as Ys,cX as kt,W as Xs,fl as Zt,az as ee,aR as St,ho as Qs,f8 as Re,cr as I,by as ge,aE as te,Q as Y,aP as ye,hp as qe,a2 as er,hq as Je,c2 as Ce,eC as tr,hr as sr,dG as ce,f as $e,y as Vt,bv as ot,O as rr,cD as Ut,g9 as nr,fO as Ze,hs as ar,b9 as ir,L as or,cq as ze,aK as He,ht as lr,U as cr,ag as Ct,a3 as Wt,bj as Ne,hu as Jt,b6 as dr,gz as we,f9 as Kt,cV as Gt,B as ur,b5 as Rt,fa as hr,ff as fr,G as Ke,M as mr,bt as pr}from"./index-tJqcQJw8.js";import{F as gr,a as yr,s as vr,L as _e,S as xr,B as br}from"./preference-Lv54_1NQ.js";import{N as $t}from"./ChevronRight-C_XYjhxd.js";import{T as Fe}from"./html-title-CLvLOLbR.js";import{w as Ie,P as jr}from"./permission-BdpMR93f.js";import{u as pt}from"./index-BzS7dp1G.js";import{D as _r}from"./Done-BjzLVAB9.js";import{R as wr,S as M}from"./collapse-CmEfNn01.js";import{A as kr,a as At}from"./Autocomplete-DjYVg0xw.js";import{C as Sr,R as Cr,S as Rr,P as $r}from"./rotate-session-key-BQCEdH4H.js";import{u as oe}from"./blocklet-C03sDJ1i.js";import{C as Ar}from"./click-to-copy-OQVm3W8D.js";import{u as Ve}from"./team-DV-g0zdM.js";import{v as Yt}from"./index-gyjan-8E.js";import{g as Or}from"./chain-CKxf9AdU.js";import{V as Pr,d as Tr}from"./status-BQ8pfSo7.js";import{S as pe}from"./Switch-p1fa_uPC.js";import{B as Er}from"./index-CIs0ueGA.js";import{y as Ir}from"./index-BPByI5gc.js";import{I as Dr,J as Lr,K as qr,L as Mr}from"./index-hv--3OFd.js";import{u as xe,C as B,b as Ot}from"./index.esm-DEWYqPkv.js";import{S as Be,u as zr}from"./switch-control-CLcUFpZi.js";import{D as Pt,R as Xt,a as Qt}from"./url-evaluation-DWvC8Wb1.js";import{A as Tt}from"./Add-BsCasUcs.js";import{H as Ue}from"./index-DzXOEuwn.js";import{l as Br}from"./index-i6PKUbUv.js";import{u as es}from"./use-mobile-TlnW5eR4.js";import{S as Ge}from"./simple-select-CEHYECyj.js";import{G as Hr}from"./actions-D8IVwECn.js";import{C as Nr}from"./CardContent-Bx23N-y1.js";import"./omit-Dd3E6q9F.js";import"./index-BFj_BZkU.js";import"./edit.svg-CaGUvrvT.js";import"./ArrowDropDown-BbXAaeVr.js";import"./ButtonGroup-CF6fFlve.js";import"./getValidReactChildren-DV_bKjsu.js";import"./index-BpHIZRoQ.js";import"./iframe-CujpH5O-.js";import"./ListSubheader-BYRJFOMa.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-BL3sEekq.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-DgzeYNjK.js";import"./CSSTransition-DSxV7K4V.js";import"./emotion-cache.browser.esm-DzLuQ31t.js";import"./depsEqual-DUSDIMu_.js";import"./TableSearch-DH2QxdMb.js";import"./Search-TKSWz34N.js";import"./Clear-dbJWv3QG.js";import"./MoreVert-B0v12xlt.js";import"./useLocalStorage-DnHseBMC.js";import"./get-safe-url-DL1Ksc1t.js";const ts=de([e.jsx("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),e.jsx("circle",{cx:"16",cy:"12",r:"1.5"},"1")]),Fr=de([e.jsx("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"},"0"),e.jsx("path",{d:"M14 17H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"},"1")]),Zr=de(e.jsx("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"})),Vr=de(e.jsx("path",{d:"M24 9v2h-6V9zM8 4C5.79 4 4 5.79 4 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4m4.51-8.95C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95m4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17"})),Ur=de(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),Wr=de(e.jsx("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"})),lt=de(e.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1z"})),Jr=de([e.jsx("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),e.jsx("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")]),Kr=de(e.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8z"})),Gr=de(e.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"})),ss=de(e.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2m4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23z"})),Yr=de(e.jsx("path",{d:"M3 18c0 .55.45 1 1 1h5v-2H4c-.55 0-1 .45-1 1M3 6c0 .55.45 1 1 1h9V5H4c-.55 0-1 .45-1 1m10 14v-1h7c.55 0 1-.45 1-1s-.45-1-1-1h-7v-1c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1s1-.45 1-1M7 10v1H4c-.55 0-1 .45-1 1s.45 1 1 1h3v1c0 .55.45 1 1 1s1-.45 1-1v-4c0-.55-.45-1-1-1s-1 .45-1 1m14 2c0-.55-.45-1-1-1h-9v2h9c.55 0 1-.45 1-1m-5-3c.55 0 1-.45 1-1V7h3c.55 0 1-.45 1-1s-.45-1-1-1h-3V4c0-.55-.45-1-1-1s-1 .45-1 1v4c0 .55.45 1 1 1"})),Xr=de(e.jsx("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}));var Qr=Array.prototype,Et=Qr.splice;function en(x,R,$,C){var _=Ts,j=-1,p=R.length,a=x;for(x===R&&(R=Ps(R));++j<p;)for(var m=0,f=R[j],h=f;(m=_(a,h,m))>-1;)a!==x&&Et.call(a,m,1),Et.call(x,m,1);return x}function tn(x,R){return x&&x.length&&R&&R.length?en(x,R):x}var sn=Es(tn);const rn={width:24,height:24,body:'<path fill="currentColor" d="M4.975 15q-.425 0-.7-.288T4 14q0-.425.288-.713T5 13h14.025q.425 0 .7.288T20 14q0 .425-.288.713T19 15H4.975Zm0 4q-.425 0-.7-.288T4 18q0-.425.288-.713T5 17h14.025q.425 0 .7.288T20 18q0 .425-.288.713T19 19H4.975Zm0-8q-.425 0-.7-.288T4 10q0-.425.288-.713T5 9h14.025q.425 0 .7.288T20 10q0 .425-.288.713T19 11H4.975Zm0-4q-.425 0-.7-.288T4 6q0-.425.288-.713T5 5h14.025q.425 0 .7.288T20 6q0 .425-.288.713T19 7H4.975Z"/>'};function rs({label:x="",disabled:R=!1,required:$=!1,initialValue:C="",onChange:_=()=>{},style:j={},onSubmit:p=()=>{},triggers:a=[],options:m=[],formatterBeforeSubmit:f=n=>n.join(","),helperText:h="",placeholder:t="",renderImage:l=()=>null,renderLabel:o=()=>"",filterKeys:r=["name"],noEmpty:s=!1,...c}){const[n,i]=L.useState(!1),[u,g]=L.useState(!1),[y,k]=L.useState(""),w=L.useRef(null),[d,v]=L.useState(C),[b,S]=L.useState(d),O=L.useMemo(()=>{if(!m)return{};const q={};return m.forEach(z=>{q[z.code]=z}),q},[m]),P=()=>{if(!m)return[];if(!y)return m.map(z=>z.code);const q=new RegExp(y.toLowerCase());return m.filter(z=>{for(let N=0;N<r.length;N++){const V=r[N];if(q.test(z[V]?.toLowerCase()))return!0}return!1}).map(z=>z.code)},D=async()=>{g(!0);try{await p(typeof f=="function"?f(b):b)===!1?S(d):s&&!b.length?(S(C),v(C)):(S(b),v(b))}catch{S(d)}finally{g(!1),i(!1)}},E=(q,z)=>{if(!Array.isArray(z)){S([]),_([]);return}const N=z.filter(V=>O[V]);if(!N.length){S([]),_([]);return}S(N),_(N)},H=q=>{q.stopPropagation(),i(!0),setTimeout(()=>{if(w.current){const z=w.current.querySelector("input");z&&z.focus()}},500)},F=n?e.jsx(kr,{ref:w,options:m,value:b,onChange:E,inputValue:y,onInputChange:(q,z)=>{k(z)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:P,getOptionLabel:q=>O[q]?.name,renderInput:q=>e.jsx(U,{...q,label:"",placeholder:t}),renderOption:(q,z)=>{const N=b.indexOf(z)!==-1;return L.createElement(nn,{component:"li",...q,key:z},l(O[z]||{}),e.jsx(A,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:N?"700":"normal"},children:o(z,O[z])||O[z]?.name}),e.jsx(A,{component:wt,sx:{opacity:.5,width:18,height:18},style:{visibility:N?"visible":"hidden"}}))},...c,slots:{popper:an}}):e.jsx(A,{className:"form-item-input slot",onClick:H,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(q=>m.some(z=>z.code===q)).map(q=>e.jsx(ht,{label:m.find(z=>z.code===q).name,style:{marginRight:8},size:"small"},q))});return e.jsx(gr,{className:"form",style:j,children:e.jsxs(A,{className:"form-item",children:[e.jsxs(A,{className:"form-item-label",children:[x,$&&e.jsx(wr,{})]}),e.jsxs(A,{className:"form-item-body",children:[e.jsx(A,{className:"form-item-input",children:F}),n?e.jsx(A,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(ne,{"data-cy":"schema-form-item-confirm",onClick:D,disabled:R||u,size:"large",children:u?e.jsx(Ee,{size:24}):e.jsx(_r,{})}),e.jsx(ne,{"data-cy":"schema-form-item-cancel",onClick:()=>{S(d),i(!1)},disabled:R||u,size:"large",children:e.jsx(wt,{})})]})}):null]}),n&&h&&e.jsx(zt,{children:h})]})})}rs.propTypes={style:T.object,onSubmit:T.func,onChange:T.func,label:T.string,initialValue:T.string,required:T.bool,disabled:T.bool,triggers:T.array,options:T.array,helperText:T.string,formatterBeforeSubmit:T.func,placeholder:T.string,renderImage:T.func,filterKeys:T.arrayOf(T.string),noEmpty:T.bool,renderLabel:T.func};const nn=ve.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|