@abtnode/webapp 1.16.54-beta-20251029-230008-54c9843b → 1.16.54-beta-20251030-092518-0e109845
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-CvDqwQYj.js → AdapterDayjs-DenpZUIq.js} +1 -1
- package/dist/assets/{Add-Cl1L6koR.js → Add-C7LRvIC3.js} +1 -1
- package/dist/assets/ArrowDropDown-DT6bL4ID.js +1 -0
- package/dist/assets/{Autocomplete-2Jqtfnqr.js → Autocomplete-CdGK2sfo.js} +1 -1
- package/dist/assets/{Breadcrumbs-DRnGxfor.js → Breadcrumbs-CALUKrKQ.js} +1 -1
- package/dist/assets/{ButtonGroup-F2p-N-kA.js → ButtonGroup-CK4D_Ln2.js} +1 -1
- package/dist/assets/{CSSTransition-BPAzXPhF.js → CSSTransition-Dwgb1QPW.js} +1 -1
- package/dist/assets/{CallMerge-C57NCcub.js → CallMerge-8YDqybOh.js} +1 -1
- package/dist/assets/{CardContent-BSeed4hO.js → CardContent-CVZJ4z1h.js} +1 -1
- package/dist/assets/{ChevronLeft-DoZ52Xa3.js → ChevronLeft-CEo37UIa.js} +1 -1
- package/dist/assets/{ChevronRight-CZWOOVFD.js → ChevronRight-ByhLYhtZ.js} +1 -1
- package/dist/assets/{Clear-CCtXIfDH.js → Clear-Cw2o-hjt.js} +1 -1
- package/dist/assets/{DeleteOutline-Cq16mzmU.js → DeleteOutline-C2P0A6Ux.js} +1 -1
- package/dist/assets/{Done-C8f99FKB.js → Done-Bo9YVoGQ.js} +1 -1
- package/dist/assets/{Edit-BCgLQOs9.js → Edit-DAdo7ch2.js} +1 -1
- package/dist/assets/{ErrorOutline-TD_GK37W.js → ErrorOutline-VCscB3DM.js} +1 -1
- package/dist/assets/{FilterList-jhSGonfm.js → FilterList-sINld31b.js} +1 -1
- package/dist/assets/{Google-CLUKZnt8.js → Google-ItITGWAJ.js} +1 -1
- package/dist/assets/{HelpOutline-HpvWrrL1.js → HelpOutline-QBu85sCP.js} +1 -1
- package/dist/assets/{KeyboardArrowDown-TkldwEAe.js → KeyboardArrowDown-Ctt8B4kp.js} +1 -1
- package/dist/assets/{Launch-lm3LPwhK.js → Launch-nOPSX3Xw.js} +1 -1
- package/dist/assets/{Link-D3gyf5en.js → Link-CCkeWWJ4.js} +1 -1
- package/dist/assets/{ListItemButton-DD8rPeWA.js → ListItemButton-BdFzmSa7.js} +1 -1
- package/dist/assets/{ListSubheader-DnxMH0SD.js → ListSubheader-BicxfAd1.js} +1 -1
- package/dist/assets/{LoadingButton-Dh6fnFu_.js → LoadingButton-BkRqIXaM.js} +1 -1
- package/dist/assets/{MoreVert-DIpJMFJ6.js → MoreVert-CI4HEjN0.js} +1 -1
- package/dist/assets/{OpenInNew-RClfNQKz.js → OpenInNew-CNsJ4BFR.js} +1 -1
- package/dist/assets/{Refresh-D0DIL_XB.js → Refresh-D8ICG9YW.js} +1 -1
- package/dist/assets/{Search-CdVOk6Cu.js → Search-BuS9kxDD.js} +1 -1
- package/dist/assets/{Stepper-Bd5ZP-LS.js → Stepper-C9zuG0lI.js} +1 -1
- package/dist/assets/{Switch-C-6GEUBP.js → Switch-C_P2C8Xa.js} +1 -1
- package/dist/assets/{TableSearch-D9SsPlcb.js → TableSearch-D9jLZhkp.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-Cn1d9iya.js → ToggleButtonGroup-zhxAcoRO.js} +1 -1
- package/dist/assets/{UnfoldMore-BdujbrJ_.js → UnfoldMore-CuZG_lwm.js} +1 -1
- package/dist/assets/{Verified-Btsr9o4j.js → Verified-DeUAmldO.js} +1 -1
- package/dist/assets/{VerifiedUser-CFytWDhj.js → VerifiedUser-DQAD_Zf4.js} +1 -1
- package/dist/assets/{ViewList-Co5g43Xn.js → ViewList-BncCYLkI.js} +1 -1
- package/dist/assets/{_createAggregator-B96bQTlP.js → _createAggregator-CCg6154Y.js} +1 -1
- package/dist/assets/{actions-Ds0pgF8x.js → actions-CsBw5W6U.js} +1 -1
- package/dist/assets/{actions-tAoTusAw.js → actions-lsvecBT1.js} +1 -1
- package/dist/assets/{agreement-CSZLv6_w.js → agreement-BUjmPRc2.js} +1 -1
- package/dist/assets/api-VW_-gBps.js +1 -0
- package/dist/assets/{appearance-CbhXfQ8g.js → appearance-bv3rI7lk.js} +1 -1
- package/dist/assets/{audit-logs-6FUFQ8g1.js → audit-logs-kv4f2FwD.js} +1 -1
- package/dist/assets/{base-chart-CZ6QbrvZ.js → base-chart-CXk2GzK7.js} +1 -1
- package/dist/assets/{blocklet-bxF9C9oZ.js → blocklet-DwHEwBiZ.js} +1 -1
- package/dist/assets/{chain-B62Pu4bi.js → chain-C7UmgQl6.js} +1 -1
- package/dist/assets/{click-to-copy-BAuQ0Adu.js → click-to-copy-Deba7opf.js} +1 -1
- package/dist/assets/cloneDeep-DtvXQkbq.js +1 -0
- package/dist/assets/{collapse-DDGnvsY2.js → collapse-Pv0Zul5P.js} +1 -1
- package/dist/assets/{config-navigation-DzA7Klq2.js → config-navigation-COyT0pBq.js} +3 -3
- package/dist/assets/connect-to-Ds9JfRig.js +29 -0
- package/dist/assets/{cssMode-BPkF9oij.js → cssMode-vJ8GoqNb.js} +1 -1
- package/dist/assets/{delete-confirm-0jvtGqL0.js → delete-confirm-COg-Kyx9.js} +1 -1
- package/dist/assets/{depsEqual-DO4Rto-K.js → depsEqual-C_BH-hM0.js} +1 -1
- package/dist/assets/{detail-qCd64A64.js → detail-BP3meRyi.js} +3 -3
- package/dist/assets/{domains-CCVsniTm.js → domains-BgYJ9l-y.js} +1 -1
- package/dist/assets/{download-DXxQDnml.js → download-h98wBvTQ.js} +1 -1
- package/dist/assets/{edit.svg-BREG3GDk.js → edit.svg-BR_aQB1u.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-D_e1cJtm.js +1 -0
- package/dist/assets/engine-DSF2IlH7.js +1 -0
- package/dist/assets/{freemarker2-W4hS9Izw.js → freemarker2-DsLYTJ4D.js} +1 -1
- package/dist/assets/{get-safe-url-Dld6SMf7.js → get-safe-url-D-cF2nX-.js} +1 -1
- package/dist/assets/getValidReactChildren-BAFkQ3fw.js +1 -0
- package/dist/assets/{graphqlMode-DUrW9j68.js → graphqlMode-sfVuma8f.js} +2 -2
- package/dist/assets/{handlebars-BzihDUTy.js → handlebars-DRbnxjAX.js} +1 -1
- package/dist/assets/{html-CA6x0_Or.js → html-isoT3Ltk.js} +1 -1
- package/dist/assets/{html-title-BXQW55s7.js → html-title-C0ZWlysm.js} +1 -1
- package/dist/assets/{htmlMode-BO5-b4y-.js → htmlMode-BHIP1cFY.js} +1 -1
- package/dist/assets/{iframe-k7BJCqn0.js → iframe-DFPz5jZg.js} +1 -1
- package/dist/assets/{index-Bf9ao16O.js → index-1KXTwIqr.js} +1 -1
- package/dist/assets/{index-ow1UyC96.js → index-7dhA_sHk.js} +3 -3
- package/dist/assets/{index-KMR_ECpp.js → index-B7LBtGVg.js} +1 -1
- package/dist/assets/{index-CiSFzDfA.js → index-BBfrnytq.js} +1 -1
- package/dist/assets/{index-iiLHpWsR.js → index-BCbmqTUZ.js} +1 -1
- package/dist/assets/{index-DOAJ7Oxy.js → index-BX8O0ZHV.js} +1 -1
- package/dist/assets/{index-BX5xYANZ.js → index-BX8TIOlx.js} +1 -1
- package/dist/assets/{index-CoYJ3nR6.js → index-BoLX042h.js} +1 -1
- package/dist/assets/{index-BruL10j-.js → index-BvQkWF2c.js} +3 -3
- package/dist/assets/{index-GEMspHOX.js → index-C6l5hpTj.js} +1 -1
- package/dist/assets/{index-s_U8vWbr.js → index-C9BjuzFT.js} +1 -1
- package/dist/assets/{index-CFfp8l3U.js → index-CDuEhJSp.js} +2 -2
- package/dist/assets/{index-Cy9ds1P8.js → index-CDvh7GeF.js} +1 -1
- package/dist/assets/{index-DRSF6cZ-.js → index-CE07KwkJ.js} +1 -1
- package/dist/assets/{index-1ZnAgraW.js → index-CHl2w7db.js} +1 -1
- package/dist/assets/{index-Mzp2tz19.js → index-CKt7JY59.js} +1 -1
- package/dist/assets/{index-BlMO0sUL.js → index-CLLICC2z.js} +1 -1
- package/dist/assets/{index-DxpRB1Jd.js → index-CUYhzHNx.js} +1 -1
- package/dist/assets/{index-C3H7kL2K.js → index-CXWQi8L0.js} +1 -1
- package/dist/assets/{index-cnx-0xyx.js → index-Cdhabg4y.js} +1 -1
- package/dist/assets/{index-fQk4PrMn.js → index-Ce2QiSVh.js} +3 -3
- package/dist/assets/{index-Cfy94B3G.js → index-CfyiyNfx.js} +1 -1
- package/dist/assets/{index-D93gJ1wA.js → index-CiPRigy-.js} +1 -1
- package/dist/assets/{index-BnDx0xG3.js → index-CywXCFTo.js} +1 -1
- package/dist/assets/{index-CLS8FoR8.js → index-D4MQDk9z.js} +1 -1
- package/dist/assets/{index-EAV4gfih.js → index-D5TSjYwo.js} +1 -1
- package/dist/assets/{index-CHmr3tUg.js → index-D8tp1rSW.js} +1 -1
- package/dist/assets/{index-s0JHoruU.js → index-D9scRZrq.js} +1 -1
- package/dist/assets/{index-Dna_ofRt.js → index-DA08Z61I.js} +9 -9
- package/dist/assets/{index-BBN62wWN.js → index-DJypfjpv.js} +1 -1
- package/dist/assets/{index-Ckdw7oMZ.js → index-DbK31dFt.js} +14 -14
- package/dist/assets/{index-DCuFZodI.js → index-DfjJClPZ.js} +1 -1
- package/dist/assets/{index-DuQAQVp2.js → index-DkI6knq_.js} +2 -2
- package/dist/assets/{index-D-ULKfz0.js → index-DpQpV_b_.js} +1 -1
- package/dist/assets/index-DuHKLnMJ.js +1 -0
- package/dist/assets/{index-BmQviUuK.js → index-DuXssMw-.js} +1 -1
- package/dist/assets/{index-DtPy3kfi.js → index-DxTV8NxB.js} +1 -1
- package/dist/assets/{index-CviZ-6rO.js → index-HVpfUEsS.js} +1 -1
- package/dist/assets/{index-ClG_jYuP.js → index-UpEYMAvU.js} +1 -1
- package/dist/assets/{index-CWoZ_XKV.js → index-VCTk1BN0.js} +1 -1
- package/dist/assets/{index-CGldrR_u.js → index-WuP8F7wO.js} +3 -3
- package/dist/assets/{index-DP4TE51Q.js → index-aUYmGzbh.js} +1 -1
- package/dist/assets/{index-CanPVHnv.js → index-fK2TFREh.js} +1 -1
- package/dist/assets/{index-DQ6ZaNfG.js → index-mOCIkNdQ.js} +1 -1
- package/dist/assets/{index-BVxEOqlB.js → index-roMS8d9X.js} +1 -1
- package/dist/assets/{index-B1IX6kh9.js → index-uKViDkd6.js} +1 -1
- package/dist/assets/{index-xGIWfEqT.js → index-xeh44vu3.js} +1 -1
- package/dist/assets/{index.esm-DXLihDKf.js → index.esm-DfrzxWuO.js} +1 -1
- package/dist/assets/{install-from-url-_JhgTnap.js → install-from-url-D3DrZQJS.js} +1 -1
- package/dist/assets/{invitation-BqGlFCEJ.js → invitation-CH_Lzck2.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-CZLXDhH7.js → is-path-prefix-equal-CcoUfdQX.js} +1 -1
- package/dist/assets/{item-tZojcPeC.js → item-9zvzeQYB.js} +1 -1
- package/dist/assets/{javascript-BQxY15GF.js → javascript-DdnSMb4b.js} +1 -1
- package/dist/assets/{jsonMode-CuX5gZEh.js → jsonMode-Bg0Q4n_0.js} +1 -1
- package/dist/assets/{liquid-BvH8tMSz.js → liquid-CXdUQAQf.js} +1 -1
- package/dist/assets/{list-header-rn9TK4Fj.js → list-header-Cl8gLzfo.js} +1 -1
- package/dist/assets/{lock.svg-CB1DT-YU.js → lock.svg-B_LWkLVc.js} +1 -1
- package/dist/assets/{log-CXbXr3EW.js → log-ayIsHfiS.js} +1 -1
- package/dist/assets/{lottie-react.esm-CGTAwxEw.js → lottie-react.esm-CH2GSfx5.js} +1 -1
- package/dist/assets/{mdx-DVuVtc25.js → mdx-BfILcfPl.js} +1 -1
- package/dist/assets/{memory-CQnRwkBY.js → memory-BOVBleTW.js} +1 -1
- package/dist/assets/{metric-BYovSASk.js → metric-D-t8b3PS.js} +1 -1
- package/dist/assets/omit-DZ74swD3.js +1 -0
- package/dist/assets/{overview-DaY0bWpA.js → overview-C_qhYB7p.js} +1 -1
- package/dist/assets/{permission-F_dO544i.js → permission-C9Y2XRsP.js} +1 -1
- package/dist/assets/{preference-DBszJir0.js → preference-CqWbCajg.js} +3 -3
- package/dist/assets/{python-UMA2l9Rc.js → python-DEhmOuwB.js} +1 -1
- package/dist/assets/{raf-schd.esm-BSdvWK7Z.js → raf-schd.esm-mo0KJqn3.js} +1 -1
- package/dist/assets/{razor-Bc0a6B78.js → razor-BRS1KTKZ.js} +1 -1
- package/dist/assets/{rotate-session-key-gbvequlr.js → rotate-session-key-8bwJGNzn.js} +1 -1
- package/dist/assets/{runtime-DP0LdVDF.js → runtime-BFIA0peM.js} +1 -1
- package/dist/assets/schema-utl-s0UR.js +1 -0
- package/dist/assets/sdk-BXxj54Wv.js +1 -0
- package/dist/assets/{service-BM_KhVr6.js → service-Carp72X0.js} +1 -1
- package/dist/assets/{shorten-label-B-e7C3aU.js → shorten-label-SgarF_Ma.js} +1 -1
- package/dist/assets/{simple-select-BoJkvGRc.js → simple-select-DvScotEA.js} +1 -1
- package/dist/assets/{spaces-DMbA1O3o.js → spaces-DT0rG8Ke.js} +1 -1
- package/dist/assets/{status-CgTne7cz.js → status-Cq_pMyWm.js} +1 -1
- package/dist/assets/status-D8QofLif.js +7 -0
- package/dist/assets/{switch-control-CHazmSl0.js → switch-control-lkjjrTch.js} +1 -1
- package/dist/assets/{table-icons-BWkxgbcP.js → table-icons-DTHGIjyx.js} +1 -1
- package/dist/assets/{team-CLKqnPzi.js → team-CWK-YI0_.js} +1 -1
- package/dist/assets/{toLower-BZkU9mfe.js → toLower-Cg__GXKz.js} +1 -1
- package/dist/assets/toUpper-DO7qEtmV.js +1 -0
- package/dist/assets/{traffic-CM_RbI2k.js → traffic-BzgoMKvP.js} +1 -1
- package/dist/assets/{tsMode-BsbgKEx5.js → tsMode-DQfrAplw.js} +1 -1
- package/dist/assets/{typescript-TS2eYRRy.js → typescript-CIO-eep4.js} +1 -1
- package/dist/assets/{url-evaluation-7hmV9VKZ.js → url-evaluation-CqBTA_SW.js} +1 -1
- package/dist/assets/{url-join-vYjt2Zy_.js → url-join-DeVtpQ7K.js} +1 -1
- package/dist/assets/{use-mobile-ChjiNRHj.js → use-mobile-BAXyhqNj.js} +1 -1
- package/dist/assets/{use-mobile-CxBX_IvO.js → use-mobile-C3U3R5Q3.js} +1 -1
- package/dist/assets/{useAsync-D4aN1qij.js → useAsync-CQocXlD2.js} +1 -1
- package/dist/assets/{useAsyncRetry-hf49QVun.js → useAsyncRetry-XGg3A4Qt.js} +1 -1
- package/dist/assets/{useLocalStorage-CQ2ab_g0.js → useLocalStorage-BMre6evC.js} +1 -1
- package/dist/assets/{useThemeProps-CfppKN9_.js → useThemeProps-DhBxLZiP.js} +1 -1
- package/dist/assets/{util-CTE3uCHI.js → util-BGedStqW.js} +1 -1
- package/dist/assets/{wait-container-COjHUNLT.js → wait-container-DcW-2Rk6.js} +1 -1
- package/dist/assets/{without-wallet-D1Q6iLpQ.js → without-wallet-BCJJXxIm.js} +1 -1
- package/dist/assets/wrap-locale-CHnqR1BC.js +1 -0
- package/dist/assets/{xml-Co8P5a8J.js → xml-BWysbc0z.js} +1 -1
- package/dist/assets/{yaml-D90RO2Kx.js → yaml-DPrHMwAz.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-DStwrBD8.js +0 -1
- package/dist/assets/api-CAlJF3xU.js +0 -1
- package/dist/assets/cloneDeep-BFGhZQPz.js +0 -1
- package/dist/assets/connect-to-DXyXU4Iy.js +0 -29
- package/dist/assets/emotion-cache.browser.esm-FDodXJsj.js +0 -1
- package/dist/assets/engine-DYUcyDCB.js +0 -1
- package/dist/assets/getValidReactChildren-Brq84_aP.js +0 -1
- package/dist/assets/index-BOek5uQt.js +0 -1
- package/dist/assets/omit-CW9RX6Pn.js +0 -1
- package/dist/assets/schema-g3Q1Bz5z.js +0 -1
- package/dist/assets/sdk-BOjEIsJo.js +0 -1
- package/dist/assets/status-CkDyGfPR.js +0 -7
- package/dist/assets/toUpper-DOcn5uo9.js +0 -1
- package/dist/assets/wrap-locale-CnCY6wA5.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aF as de,j as e,hh as Ts,hi as Es,bM as Is,r as q,s as xe,K as $,f3 as kt,t as U,eM as ft,a3 as ae,C as Ee,bi as zt,dJ as Ds,o as T,hj as Ls,b2 as Ht,cx as qs,cQ as Ms,dm as Bs,T as Y,dE as it,bn as ne,bA as mt,p as ue,hk as zs,bB as pt,b as W,bg as G,dG as ee,H as Z,aV as ie,V as oe,n as Nt,q as Hs,w as Ft,ac as Ns,i as Zt,gd as Fs,hl as Zs,at as Vs,aU as X,R as Te,$ as ke,D as Us,U as Ws,v as re,X as at,hm as Js,hn as Ks,ey as Gs,eA as Ys,F as je,aH as J,g1 as Xs,cY as St,W as Qs,fl as Vt,ay as te,aR as Ct,ho as er,f7 as Re,cs as E,bz as ge,aD as se,O as Q,aP as ye,hp as qe,a1 as tr,hq as Je,c3 as Ce,eB as sr,hr as rr,dF as ce,f as Oe,y as Ut,bw as ot,M as nr,cE as Wt,gc as ir,gj as Ze,hs as ar,b9 as or,L as lr,cr as Be,aK as He,ht as cr,Q as dr,bp as ur,af as Rt,a2 as Jt,bj as Ne,hu as Kt,b6 as hr,gD as we,f8 as Gt,cW as Yt,B as fr,b5 as Ot,fa as mr,ff as pr,G as Ke,J as gr,bu as yr}from"./index-Ckdw7oMZ.js";import{F as xr,a as lt,s as vr,L as _e,S as br,B as jr}from"./preference-DBszJir0.js";import{N as $t}from"./ChevronRight-CZWOOVFD.js";import{T as Fe}from"./html-title-BXQW55s7.js";import{w as Ie,P as _r}from"./permission-F_dO544i.js";import{u as gt}from"./index-BOek5uQt.js";import{D as wr}from"./Done-C8f99FKB.js";import{R as kr,S as M}from"./collapse-DDGnvsY2.js";import{A as Sr,a as At}from"./Autocomplete-2Jqtfnqr.js";import{C as Cr,R as Rr,S as Or,P as $r}from"./rotate-session-key-gbvequlr.js";import{u as le}from"./blocklet-bxF9C9oZ.js";import{C as Ar}from"./click-to-copy-BAuQ0Adu.js";import{u as Ve}from"./team-CLKqnPzi.js";import{v as Xt}from"./index-DRSF6cZ-.js";import{g as Pr}from"./chain-B62Pu4bi.js";import{V as Tr,d as Er}from"./status-CgTne7cz.js";import{S as pe}from"./Switch-C-6GEUBP.js";import{B as Ir}from"./index-DQ6ZaNfG.js";import{y as Dr}from"./index-BBN62wWN.js";import{I as Lr,J as qr,K as Mr,L as Br}from"./index-DOAJ7Oxy.js";import{u as ve,C as H,b as Pt}from"./index.esm-DXLihDKf.js";import{S as ze,u as zr}from"./switch-control-CHazmSl0.js";import{D as Tt,R as Qt,a as es}from"./url-evaluation-7hmV9VKZ.js";import{A as Et}from"./Add-Cl1L6koR.js";import{H as Ue}from"./index-CanPVHnv.js";import{l as Hr}from"./index-Bf9ao16O.js";import{u as ts}from"./use-mobile-CxBX_IvO.js";import{S as Ge}from"./simple-select-BoJkvGRc.js";import{G as Nr}from"./actions-Ds0pgF8x.js";import{C as Fr}from"./CardContent-BSeed4hO.js";import"./omit-CW9RX6Pn.js";import"./index-DtPy3kfi.js";import"./edit.svg-BREG3GDk.js";import"./ArrowDropDown-DStwrBD8.js";import"./ButtonGroup-F2p-N-kA.js";import"./getValidReactChildren-Brq84_aP.js";import"./index-ClG_jYuP.js";import"./iframe-k7BJCqn0.js";import"./ListSubheader-DnxMH0SD.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-TD_GK37W.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-jhSGonfm.js";import"./CSSTransition-BPAzXPhF.js";import"./emotion-cache.browser.esm-FDodXJsj.js";import"./depsEqual-DO4Rto-K.js";import"./TableSearch-D9SsPlcb.js";import"./Search-CdVOk6Cu.js";import"./Clear-CCtXIfDH.js";import"./MoreVert-DIpJMFJ6.js";import"./useLocalStorage-CQ2ab_g0.js";import"./get-safe-url-Dld6SMf7.js";const ss=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")]),Zr=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")]),Vr=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"})),Ur=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"})),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"})),Jr=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"})),ct=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"})),Kr=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")]),Gr=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"})),Yr=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"})),rs=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"})),Xr=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"})),Qr=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 en=Array.prototype,It=en.splice;function tn(v,R,O,C){var _=Es,j=-1,p=R.length,i=v;for(v===R&&(R=Ts(R));++j<p;)for(var m=0,f=R[j],h=f;(m=_(i,h,m))>-1;)i!==v&&It.call(i,m,1),It.call(v,m,1);return v}function sn(v,R){return v&&v.length&&R&&R.length?tn(v,R):v}var rn=Is(sn);const nn={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 ns({label:v="",disabled:R=!1,required:O=!1,initialValue:C="",onChange:_=()=>{},style:j={},onSubmit:p=()=>{},triggers:i=[],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,a]=q.useState(!1),[u,g]=q.useState(!1),[y,k]=q.useState(""),w=q.useRef(null),[d,x]=q.useState(C),[b,S]=q.useState(d),A=q.useMemo(()=>{if(!m)return{};const z={};return m.forEach(I=>{z[I.code]=I}),z},[m]),P=()=>{if(!m)return[];if(!y)return m.map(I=>I.code);const z=new RegExp(y.toLowerCase());return m.filter(I=>{for(let B=0;B<r.length;B++){const F=r[B];if(z.test(I[F]?.toLowerCase()))return!0}return!1}).map(I=>I.code)},L=async()=>{g(!0);try{await p(typeof f=="function"?f(b):b)===!1?S(d):s&&!b.length?(S(C),x(C)):(S(b),x(b))}catch{S(d)}finally{g(!1),a(!1)}},D=(z,I)=>{if(!Array.isArray(I)){S([]),_([]);return}const B=I.filter(F=>A[F]);if(!B.length){S([]),_([]);return}S(B),_(B)},N=z=>{z.stopPropagation(),a(!0),setTimeout(()=>{if(w.current){const I=w.current.querySelector("input");I&&I.focus()}},500)},V=n?e.jsx(Sr,{ref:w,options:m,value:b,onChange:D,inputValue:y,onInputChange:(z,I)=>{k(I)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:P,getOptionLabel:z=>A[z]?.name,renderInput:z=>e.jsx(U,{...z,label:"",placeholder:t}),renderOption:(z,I)=>{const B=b.indexOf(I)!==-1;return q.createElement(an,{component:"li",...z,key:I},l(A[I]||{}),e.jsx($,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:B?"700":"normal"},children:o(I,A[I])||A[I]?.name}),e.jsx($,{component:kt,sx:{opacity:.5,width:18,height:18},style:{visibility:B?"visible":"hidden"}}))},...c,slots:{popper:on}}):e.jsx($,{className:"form-item-input slot",onClick:N,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(z=>m.some(I=>I.code===z)).map(z=>e.jsx(ft,{label:m.find(I=>I.code===z).name,style:{marginRight:8},size:"small"},z))});return e.jsx(xr,{className:"form",style:j,children:e.jsxs($,{className:"form-item",children:[e.jsxs($,{className:"form-item-label",children:[v,O&&e.jsx(kr,{})]}),e.jsxs($,{className:"form-item-body",children:[e.jsx($,{className:"form-item-input",children:V}),n?e.jsx($,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(ae,{"data-cy":"schema-form-item-confirm",onClick:L,disabled:R||u,size:"large",children:u?e.jsx(Ee,{size:24}):e.jsx(wr,{})}),e.jsx(ae,{"data-cy":"schema-form-item-cancel",onClick:()=>{S(d),a(!1)},disabled:R||u,size:"large",children:e.jsx(kt,{})})]})}):null]}),n&&h&&e.jsx(zt,{children:h})]})})}ns.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 an=xe.div`
|
|
1
|
+
import{aF as de,j as e,hh as Ts,hi as Es,bM as Is,r as q,s as xe,K as $,f3 as kt,t as U,eM as ft,a3 as ae,C as Ee,bi as zt,dJ as Ds,o as T,hj as Ls,b2 as Ht,cx as qs,cQ as Ms,dm as Bs,T as Y,dE as it,bn as ne,bA as mt,p as ue,hk as zs,bB as pt,b as W,bg as G,dG as ee,H as Z,aV as ie,V as oe,n as Nt,q as Hs,w as Ft,ac as Ns,i as Zt,gd as Fs,hl as Zs,at as Vs,aU as X,R as Te,$ as ke,D as Us,U as Ws,v as re,X as at,hm as Js,hn as Ks,ey as Gs,eA as Ys,F as je,aH as J,g1 as Xs,cY as St,W as Qs,fl as Vt,ay as te,aR as Ct,ho as er,f7 as Re,cs as E,bz as ge,aD as se,O as Q,aP as ye,hp as qe,a1 as tr,hq as Je,c3 as Ce,eB as sr,hr as rr,dF as ce,f as Oe,y as Ut,bw as ot,M as nr,cE as Wt,gc as ir,gj as Ze,hs as ar,b9 as or,L as lr,cr as Be,aK as He,ht as cr,Q as dr,bp as ur,af as Rt,a2 as Jt,bj as Ne,hu as Kt,b6 as hr,gD as we,f8 as Gt,cW as Yt,B as fr,b5 as Ot,fa as mr,ff as pr,G as Ke,J as gr,bu as yr}from"./index-DbK31dFt.js";import{F as xr,a as lt,s as vr,L as _e,S as br,B as jr}from"./preference-CqWbCajg.js";import{N as $t}from"./ChevronRight-ByhLYhtZ.js";import{T as Fe}from"./html-title-C0ZWlysm.js";import{w as Ie,P as _r}from"./permission-C9Y2XRsP.js";import{u as gt}from"./index-DuHKLnMJ.js";import{D as wr}from"./Done-Bo9YVoGQ.js";import{R as kr,S as M}from"./collapse-Pv0Zul5P.js";import{A as Sr,a as At}from"./Autocomplete-CdGK2sfo.js";import{C as Cr,R as Rr,S as Or,P as $r}from"./rotate-session-key-8bwJGNzn.js";import{u as le}from"./blocklet-DwHEwBiZ.js";import{C as Ar}from"./click-to-copy-Deba7opf.js";import{u as Ve}from"./team-CWK-YI0_.js";import{v as Xt}from"./index-CE07KwkJ.js";import{g as Pr}from"./chain-C7UmgQl6.js";import{V as Tr,d as Er}from"./status-Cq_pMyWm.js";import{S as pe}from"./Switch-C_P2C8Xa.js";import{B as Ir}from"./index-mOCIkNdQ.js";import{y as Dr}from"./index-DJypfjpv.js";import{I as Lr,J as qr,K as Mr,L as Br}from"./index-BX8O0ZHV.js";import{u as ve,C as H,b as Pt}from"./index.esm-DfrzxWuO.js";import{S as ze,u as zr}from"./switch-control-lkjjrTch.js";import{D as Tt,R as Qt,a as es}from"./url-evaluation-CqBTA_SW.js";import{A as Et}from"./Add-C7LRvIC3.js";import{H as Ue}from"./index-fK2TFREh.js";import{l as Hr}from"./index-1KXTwIqr.js";import{u as ts}from"./use-mobile-C3U3R5Q3.js";import{S as Ge}from"./simple-select-DvScotEA.js";import{G as Nr}from"./actions-CsBw5W6U.js";import{C as Fr}from"./CardContent-CVZJ4z1h.js";import"./omit-DZ74swD3.js";import"./index-DxTV8NxB.js";import"./edit.svg-BR_aQB1u.js";import"./ArrowDropDown-DT6bL4ID.js";import"./ButtonGroup-CK4D_Ln2.js";import"./getValidReactChildren-BAFkQ3fw.js";import"./index-UpEYMAvU.js";import"./iframe-DFPz5jZg.js";import"./ListSubheader-BicxfAd1.js";import"./visuallyHidden-Dan1xhjv.js";import"./ErrorOutline-VCscB3DM.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./FilterList-sINld31b.js";import"./CSSTransition-Dwgb1QPW.js";import"./emotion-cache.browser.esm-D_e1cJtm.js";import"./depsEqual-C_BH-hM0.js";import"./TableSearch-D9jLZhkp.js";import"./Search-BuS9kxDD.js";import"./Clear-Cw2o-hjt.js";import"./MoreVert-CI4HEjN0.js";import"./useLocalStorage-BMre6evC.js";import"./get-safe-url-D-cF2nX-.js";const ss=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")]),Zr=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")]),Vr=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"})),Ur=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"})),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"})),Jr=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"})),ct=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"})),Kr=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")]),Gr=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"})),Yr=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"})),rs=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"})),Xr=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"})),Qr=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 en=Array.prototype,It=en.splice;function tn(v,R,O,C){var _=Es,j=-1,p=R.length,i=v;for(v===R&&(R=Ts(R));++j<p;)for(var m=0,f=R[j],h=f;(m=_(i,h,m))>-1;)i!==v&&It.call(i,m,1),It.call(v,m,1);return v}function sn(v,R){return v&&v.length&&R&&R.length?tn(v,R):v}var rn=Is(sn);const nn={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 ns({label:v="",disabled:R=!1,required:O=!1,initialValue:C="",onChange:_=()=>{},style:j={},onSubmit:p=()=>{},triggers:i=[],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,a]=q.useState(!1),[u,g]=q.useState(!1),[y,k]=q.useState(""),w=q.useRef(null),[d,x]=q.useState(C),[b,S]=q.useState(d),A=q.useMemo(()=>{if(!m)return{};const z={};return m.forEach(I=>{z[I.code]=I}),z},[m]),P=()=>{if(!m)return[];if(!y)return m.map(I=>I.code);const z=new RegExp(y.toLowerCase());return m.filter(I=>{for(let B=0;B<r.length;B++){const F=r[B];if(z.test(I[F]?.toLowerCase()))return!0}return!1}).map(I=>I.code)},L=async()=>{g(!0);try{await p(typeof f=="function"?f(b):b)===!1?S(d):s&&!b.length?(S(C),x(C)):(S(b),x(b))}catch{S(d)}finally{g(!1),a(!1)}},D=(z,I)=>{if(!Array.isArray(I)){S([]),_([]);return}const B=I.filter(F=>A[F]);if(!B.length){S([]),_([]);return}S(B),_(B)},N=z=>{z.stopPropagation(),a(!0),setTimeout(()=>{if(w.current){const I=w.current.querySelector("input");I&&I.focus()}},500)},V=n?e.jsx(Sr,{ref:w,options:m,value:b,onChange:D,inputValue:y,onInputChange:(z,I)=>{k(I)},fullWidth:!0,multiple:!0,variant:"outlined",margin:"dense",filterOptions:P,getOptionLabel:z=>A[z]?.name,renderInput:z=>e.jsx(U,{...z,label:"",placeholder:t}),renderOption:(z,I)=>{const B=b.indexOf(I)!==-1;return q.createElement(an,{component:"li",...z,key:I},l(A[I]||{}),e.jsx($,{sx:{"& > img":{mr:2,flexShrink:0}},style:{flex:1,fontWeight:B?"700":"normal"},children:o(I,A[I])||A[I]?.name}),e.jsx($,{component:kt,sx:{opacity:.5,width:18,height:18},style:{visibility:B?"visible":"hidden"}}))},...c,slots:{popper:on}}):e.jsx($,{className:"form-item-input slot",onClick:N,style:{whiteSpace:"pre-wrap",cursor:"text"},sx:{px:1},children:b.filter(z=>m.some(I=>I.code===z)).map(z=>e.jsx(ft,{label:m.find(I=>I.code===z).name,style:{marginRight:8},size:"small"},z))});return e.jsx(xr,{className:"form",style:j,children:e.jsxs($,{className:"form-item",children:[e.jsxs($,{className:"form-item-label",children:[v,O&&e.jsx(kr,{})]}),e.jsxs($,{className:"form-item-body",children:[e.jsx($,{className:"form-item-input",children:V}),n?e.jsx($,{className:"form-item-action",children:e.jsxs(e.Fragment,{children:[e.jsx(ae,{"data-cy":"schema-form-item-confirm",onClick:L,disabled:R||u,size:"large",children:u?e.jsx(Ee,{size:24}):e.jsx(wr,{})}),e.jsx(ae,{"data-cy":"schema-form-item-cancel",onClick:()=>{S(d),a(!1)},disabled:R||u,size:"large",children:e.jsx(kt,{})})]})}):null]}),n&&h&&e.jsx(zt,{children:h})]})})}ns.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 an=xe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: space-between;
|
|
4
4
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bd as x}from"./index-
|
|
1
|
+
import{bd as x}from"./index-DbK31dFt.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 +1 @@
|
|
|
1
|
-
import{c1 as a,r as f,cr as V,ba as W,bb as X,cS as v,fp as u,cs as m,fq as Z,fr as $,fs as I}from"./index-
|
|
1
|
+
import{c1 as a,r as f,cr as V,ba as W,bb as X,cS as v,fp as u,cs as m,fq as Z,fr as $,fs as I}from"./index-DbK31dFt.js";var ee=function(t){return t===document||t===document.documentElement||t===document.body?Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop):t.scrollTop},O=function(t){return t.scrollHeight||Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)},re=function(t){return t.clientHeight||Math.max(document.documentElement.clientHeight,document.body.clientHeight)},oe=function(t,o){o===void 0&&(o={});var g=o.target,x=o.isNoMore,F=o.threshold,w=F===void 0?100:F,B=o.direction,P=B===void 0?"bottom":B,R=o.reloadDeps,Y=R===void 0?[]:R,k=o.manual,h=o.onBefore,_=o.onSuccess,M=o.onError,y=o.onFinally,q=a(f.useState(),2),c=q[0],E=q[1],D=a(f.useState(!1),2),b=D[0],i=D[1],S=P==="top",T=f.useRef(void 0),L=f.useRef(0),H=f.useMemo(function(){return x?x(c):!1},[c]),s=V(function(r){return W(void 0,void 0,void 0,function(){var e,n,l,d;return X(this,function(C){switch(C.label){case 0:return[4,t(r)];case 1:return e=C.sent(),E(r?v(v({},e),{list:S?u(u([],a(e.list),!1),a((l=r.list)!==null&&l!==void 0?l:[]),!1):u(u([],a((d=r.list)!==null&&d!==void 0?d:[]),!1),a(e.list),!1)}):v(v({},e),{list:u([],a((n=e.list)!==null&&n!==void 0?n:[]),!1)})),[2,e]}})})},{manual:k,onFinally:function(r,e,n){i(!1),y?.(e,n)},onBefore:function(){return h?.()},onSuccess:function(r){setTimeout(function(){if(S){var e=I(g);if(e=e===document?document.documentElement:e,e){var n=O(e);e.scrollTo(0,n-L.current)}}else z()}),_?.(r)},onError:function(r){return M?.(r)}}),N=s.loading,G=s.error,A=s.run,j=s.runAsync,J=s.cancel,p=m(function(){H||(i(!0),A(c))}),K=m(function(){return H?Promise.reject():(i(!0),j(c))}),Q=function(){return i(!1),A()},U=function(){return i(!1),j()},z=function(){var r=I(g);if(r){var e=r===document?document.documentElement:r,n=ee(e),l=O(e),d=re(e);S?(T.current!==void 0&&T.current>n&&n<=w&&p(),T.current=n,L.current=l-n):l-n<=d+w&&p()}};return Z("scroll",function(){N||b||z()},{target:g}),$(function(){A()},u([],a(Y),!1)),{data:c,loading:!b&&N,error:G,loadingMore:b,noMore:H,loadMore:p,loadMoreAsync:K,reload:m(Q),reloadAsync:m(U),mutate:E,cancel:J}};export{oe as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{be as v,r as at}from"./index-Ckdw7oMZ.js";var he=e=>e.type==="checkbox",ue=e=>e instanceof Date,$=e=>e==null;const _t=e=>typeof e=="object";var P=e=>!$(e)&&!Array.isArray(e)&&_t(e)&&!ue(e),ht=e=>P(e)&&e.target?he(e.target)?e.target.checked:e.target.value:e,Nt=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,mt=(e,r)=>e.has(Nt(r)),Bt=e=>{const r=e.constructor&&e.constructor.prototype;return P(r)&&r.hasOwnProperty("isPrototypeOf")},je=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function T(e){let r;const t=Array.isArray(e),i=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(e instanceof Set)r=new Set(e);else if(!(je&&(e instanceof Blob||i))&&(t||P(e)))if(r=t?[]:{},!t&&!Bt(e))r=e;else for(const n in e)e.hasOwnProperty(n)&&(r[n]=T(e[n]));else return e;return r}var Se=e=>/^\w*$/.test(e),U=e=>e===void 0,we=e=>Array.isArray(e)?e.filter(Boolean):[],Ke=e=>we(e.replace(/["|']|\]/g,"").split(/\.|\[/)),c=(e,r,t)=>{if(!r||!P(e))return t;const i=(Se(r)?[r]:Ke(r)).reduce((n,l)=>$(n)?n:n[l],e);return U(i)||i===e?U(e[r])?t:e[r]:i},Q=e=>typeof e=="boolean",E=(e,r,t)=>{let i=-1;const n=Se(r)?[r]:Ke(r),l=n.length,f=l-1;for(;++i<l;){const d=n[i];let b=t;if(i!==f){const x=e[d];b=P(x)||Array.isArray(x)?x:isNaN(+n[i+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;e[d]=b,e=e[d]}};const Fe={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Z={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ie={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},vt=v.createContext(null);vt.displayName="HookFormContext";const ke=()=>v.useContext(vt);var bt=(e,r,t,i=!0)=>{const n={defaultValues:r._defaultValues};for(const l in e)Object.defineProperty(n,l,{get:()=>{const f=l;return r._proxyFormState[f]!==Z.all&&(r._proxyFormState[f]=!i||Z.all),t&&(t[f]=!0),e[f]}});return n};const De=typeof window<"u"?at.useLayoutEffect:at.useEffect;function Pt(e){const r=ke(),{control:t=r.control,disabled:i,name:n,exact:l}=e||{},[f,d]=v.useState(t._formState),b=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return De(()=>t._subscribe({name:n,formState:b.current,exact:l,callback:x=>{!i&&d({...t._formState,...x})}}),[n,i,l]),v.useEffect(()=>{b.current.isValid&&t._setValid(!0)},[t]),v.useMemo(()=>bt(f,t,b.current,!1),[f,t])}var se=e=>typeof e=="string",Ft=(e,r,t,i,n)=>se(e)?(i&&r.watch.add(e),c(t,e,n)):Array.isArray(e)?e.map(l=>(i&&r.watch.add(l),c(t,l))):(i&&(r.watchAll=!0),t);function Wt(e){const r=ke(),{control:t=r.control,name:i,defaultValue:n,disabled:l,exact:f}=e||{},d=v.useRef(n),[b,x]=v.useState(t._getWatch(i,d.current));return De(()=>t._subscribe({name:i,formState:{values:!0},exact:f,callback:D=>!l&&x(Ft(i,t._names,D.values||t._formValues,!1,d.current))}),[i,t,l,f]),v.useEffect(()=>t._removeUnmounted()),b}function qt(e){const r=ke(),{name:t,disabled:i,control:n=r.control,shouldUnregister:l}=e,f=mt(n._names.array,t),d=Wt({control:n,name:t,defaultValue:c(n._formValues,t,c(n._defaultValues,t,e.defaultValue)),exact:!0}),b=Pt({control:n,name:t,exact:!0}),x=v.useRef(e),D=v.useRef(n.register(t,{...e.rules,value:d,...Q(e.disabled)?{disabled:e.disabled}:{}})),C=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!c(b.errors,t)},isDirty:{enumerable:!0,get:()=>!!c(b.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!c(b.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!c(b.validatingFields,t)},error:{enumerable:!0,get:()=>c(b.errors,t)}}),[b,t]),F=v.useCallback(L=>D.current.onChange({target:{value:ht(L),name:t},type:Fe.CHANGE}),[t]),M=v.useCallback(()=>D.current.onBlur({target:{value:c(n._formValues,t),name:t},type:Fe.BLUR}),[t,n._formValues]),z=v.useCallback(L=>{const ee=c(n._fields,t);ee&&L&&(ee._f.ref={focus:()=>L.focus&&L.focus(),select:()=>L.select&&L.select(),setCustomValidity:V=>L.setCustomValidity(V),reportValidity:()=>L.reportValidity()})},[n._fields,t]),R=v.useMemo(()=>({name:t,value:d,...Q(i)||b.disabled?{disabled:b.disabled||i}:{},onChange:F,onBlur:M,ref:z}),[t,i,b.disabled,F,M,z,d]);return v.useEffect(()=>{const L=n._options.shouldUnregister||l;n.register(t,{...x.current.rules,...Q(x.current.disabled)?{disabled:x.current.disabled}:{}});const ee=(V,G)=>{const W=c(n._fields,V);W&&W._f&&(W._f.mount=G)};if(ee(t,!0),L){const V=T(c(n._options.defaultValues,t));E(n._defaultValues,t,V),U(c(n._formValues,t))&&E(n._formValues,t,V)}return!f&&n.register(t),()=>{(f?L&&!n._state.action:L)?n.unregister(t):ee(t,!1)}},[t,n,f,l]),v.useEffect(()=>{n._setDisabledField({disabled:i,name:t})},[i,t,n]),v.useMemo(()=>({field:R,formState:b,fieldState:C}),[R,b,C])}const ar=e=>e.render(qt(e));var Ht=(e,r,t,i,n)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[i]:n||!0}}:{},K=e=>Array.isArray(e)?e:[e],nt=()=>{let e=[];return{get observers(){return e},next:n=>{for(const l of e)l.next&&l.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(l=>l!==n)}}),unsubscribe:()=>{e=[]}}},qe=e=>$(e)||!_t(e);function le(e,r,t=new WeakSet){if(qe(e)||qe(r))return e===r;if(ue(e)&&ue(r))return e.getTime()===r.getTime();const i=Object.keys(e),n=Object.keys(r);if(i.length!==n.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const l of i){const f=e[l];if(!n.includes(l))return!1;if(l!=="ref"){const d=r[l];if(ue(f)&&ue(d)||P(f)&&P(d)||Array.isArray(f)&&Array.isArray(d)?!le(f,d,t):f!==d)return!1}}return!0}var H=e=>P(e)&&!Object.keys(e).length,ze=e=>e.type==="file",te=e=>typeof e=="function",Ve=e=>{if(!je)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},Vt=e=>e.type==="select-multiple",Ge=e=>e.type==="radio",$t=e=>Ge(e)||he(e),Me=e=>Ve(e)&&e.isConnected;function jt(e,r){const t=r.slice(0,-1).length;let i=0;for(;i<t;)e=U(e)?i++:e[r[i++]];return e}function Kt(e){for(const r in e)if(e.hasOwnProperty(r)&&!U(e[r]))return!1;return!0}function B(e,r){const t=Array.isArray(r)?r:Se(r)?[r]:Ke(r),i=t.length===1?e:jt(e,t),n=t.length-1,l=t[n];return i&&delete i[l],n!==0&&(P(i)&&H(i)||Array.isArray(i)&&Kt(i))&&B(e,t.slice(0,-1)),e}var At=e=>{for(const r in e)if(te(e[r]))return!0;return!1};function Ae(e,r={}){const t=Array.isArray(e);if(P(e)||t)for(const i in e)Array.isArray(e[i])||P(e[i])&&!At(e[i])?(r[i]=Array.isArray(e[i])?[]:{},Ae(e[i],r[i])):$(e[i])||(r[i]=!0);return r}function xt(e,r,t){const i=Array.isArray(e);if(P(e)||i)for(const n in e)Array.isArray(e[n])||P(e[n])&&!At(e[n])?U(r)||qe(t[n])?t[n]=Array.isArray(e[n])?Ae(e[n],[]):{...Ae(e[n])}:xt(e[n],$(r)?{}:r[n],t[n]):t[n]=!le(e[n],r[n]);return t}var ge=(e,r)=>xt(e,r,Ae(r));const lt={value:!1,isValid:!1},ut={value:!0,isValid:!0};var St=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!U(e[0].attributes.value)?U(e[0].value)||e[0].value===""?ut:{value:e[0].value,isValid:!0}:ut:lt}return lt},wt=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:i})=>U(e)?e:r?e===""?NaN:e&&+e:t&&se(e)?new Date(e):i?i(e):e;const ot={isValid:!1,value:null};var kt=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,ot):ot;function ct(e){const r=e.ref;return ze(r)?r.files:Ge(r)?kt(e.refs).value:Vt(r)?[...r.selectedOptions].map(({value:t})=>t):he(r)?St(e.refs).value:wt(U(r.value)?e.ref.value:r.value,e)}var zt=(e,r,t,i)=>{const n={};for(const l of e){const f=c(r,l);f&&E(n,l,f._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:i}},xe=e=>e instanceof RegExp,_e=e=>U(e)?e:xe(e)?e.source:P(e)?xe(e.value)?e.value.source:e.value:e,de=e=>({isOnSubmit:!e||e===Z.onSubmit,isOnBlur:e===Z.onBlur,isOnChange:e===Z.onChange,isOnAll:e===Z.all,isOnTouch:e===Z.onTouched});const dt="AsyncFunction";var Gt=e=>!!e&&!!e.validate&&!!(te(e.validate)&&e.validate.constructor.name===dt||P(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===dt)),Yt=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),He=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const fe=(e,r,t,i)=>{for(const n of t||Object.keys(e)){const l=c(e,n);if(l){const{_f:f,...d}=l;if(f){if(f.refs&&f.refs[0]&&r(f.refs[0],n)&&!i)return!0;if(f.ref&&r(f.ref,f.name)&&!i)return!0;if(fe(d,r))break}else if(P(d)&&fe(d,r))break}}};function ft(e,r,t){const i=c(e,t);if(i||Se(t))return{error:i,name:t};const n=t.split(".");for(;n.length;){const l=n.join("."),f=c(r,l),d=c(e,l);if(f&&!Array.isArray(f)&&t!==l)return{name:t};if(d&&d.type)return{name:l,error:d};if(d&&d.root&&d.root.type)return{name:`${l}.root`,error:d.root};n.pop()}return{name:t}}var Jt=(e,r,t,i)=>{t(e);const{name:n,...l}=e;return H(l)||Object.keys(l).length>=Object.keys(r).length||Object.keys(l).find(f=>r[f]===(!i||Z.all))},Qt=(e,r,t)=>!e||!r||e===r||K(e).some(i=>i&&(t?i===r:i.startsWith(r)||r.startsWith(i))),Xt=(e,r,t,i,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(r||e):(t?i.isOnBlur:n.isOnBlur)?!e:(t?i.isOnChange:n.isOnChange)?e:!0,Zt=(e,r)=>!we(c(e,r)).length&&B(e,r),Dt=(e,r,t)=>{const i=K(c(e,t));return E(i,"root",r[t]),E(e,t,i),e},be=e=>se(e);function yt(e,r,t="validate"){if(be(e)||Array.isArray(e)&&e.every(be)||Q(e)&&!e)return{type:t,message:be(e)?e:"",ref:r}}var ce=e=>P(e)&&!xe(e)?e:{value:e,message:""},$e=async(e,r,t,i,n,l)=>{const{ref:f,refs:d,required:b,maxLength:x,minLength:D,min:C,max:F,pattern:M,validate:z,name:R,valueAsNumber:L,mount:ee}=e._f,V=c(t,R);if(!ee||r.has(R))return{};const G=d?d[0]:f,W=w=>{n&&G.reportValidity&&(G.setCustomValidity(Q(w)?"":w||""),G.reportValidity())},I={},m=Ge(f),h=he(f),A=m||h,S=(L||ze(f))&&U(f.value)&&U(V)||Ve(f)&&f.value===""||V===""||Array.isArray(V)&&!V.length,Y=Ht.bind(null,R,i,I),J=(w,p,N,q=ie.maxLength,j=ie.minLength)=>{const re=w?p:N;I[R]={type:w?q:j,message:re,ref:f,...Y(w?q:j,re)}};if(l?!Array.isArray(V)||!V.length:b&&(!A&&(S||$(V))||Q(V)&&!V||h&&!St(d).isValid||m&&!kt(d).isValid)){const{value:w,message:p}=be(b)?{value:!!b,message:b}:ce(b);if(w&&(I[R]={type:ie.required,message:p,ref:G,...Y(ie.required,p)},!i))return W(p),I}if(!S&&(!$(C)||!$(F))){let w,p;const N=ce(F),q=ce(C);if(!$(V)&&!isNaN(V)){const j=f.valueAsNumber||V&&+V;$(N.value)||(w=j>N.value),$(q.value)||(p=j<q.value)}else{const j=f.valueAsDate||new Date(V),re=me=>new Date(new Date().toDateString()+" "+me),ye=f.type=="time",oe=f.type=="week";se(N.value)&&V&&(w=ye?re(V)>re(N.value):oe?V>N.value:j>new Date(N.value)),se(q.value)&&V&&(p=ye?re(V)<re(q.value):oe?V<q.value:j<new Date(q.value))}if((w||p)&&(J(!!w,N.message,q.message,ie.max,ie.min),!i))return W(I[R].message),I}if((x||D)&&!S&&(se(V)||l&&Array.isArray(V))){const w=ce(x),p=ce(D),N=!$(w.value)&&V.length>+w.value,q=!$(p.value)&&V.length<+p.value;if((N||q)&&(J(N,w.message,p.message),!i))return W(I[R].message),I}if(M&&!S&&se(V)){const{value:w,message:p}=ce(M);if(xe(w)&&!V.match(w)&&(I[R]={type:ie.pattern,message:p,ref:f,...Y(ie.pattern,p)},!i))return W(p),I}if(z){if(te(z)){const w=await z(V,t),p=yt(w,G);if(p&&(I[R]={...p,...Y(ie.validate,p.message)},!i))return W(p.message),I}else if(P(z)){let w={};for(const p in z){if(!H(w)&&!i)break;const N=yt(await z[p](V,t),G,p);N&&(w={...N,...Y(p,N.message)},W(N.message),i&&(I[R]=w))}if(!H(w)&&(I[R]={ref:G,...w},!i))return I}}return W(!0),I};const er={mode:Z.onSubmit,reValidateMode:Z.onChange,shouldFocusError:!0};function tr(e={}){let r={...er,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:te(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1};const i={};let n=P(r.defaultValues)||P(r.values)?T(r.defaultValues||r.values)||{}:{},l=r.shouldUnregister?{}:T(n),f={action:!1,mount:!1,watch:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},b,x=0;const D={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let C={...D};const F={array:nt(),state:nt()},M=r.criteriaMode===Z.all,z=s=>a=>{clearTimeout(x),x=setTimeout(s,a)},R=async s=>{if(!r.disabled&&(D.isValid||C.isValid||s)){const a=r.resolver?H((await h()).errors):await S(i,!0);a!==t.isValid&&F.state.next({isValid:a})}},L=(s,a)=>{!r.disabled&&(D.isValidating||D.validatingFields||C.isValidating||C.validatingFields)&&((s||Array.from(d.mount)).forEach(u=>{u&&(a?E(t.validatingFields,u,a):B(t.validatingFields,u))}),F.state.next({validatingFields:t.validatingFields,isValidating:!H(t.validatingFields)}))},ee=(s,a=[],u,g,y=!0,o=!0)=>{if(g&&u&&!r.disabled){if(f.action=!0,o&&Array.isArray(c(i,s))){const _=u(c(i,s),g.argA,g.argB);y&&E(i,s,_)}if(o&&Array.isArray(c(t.errors,s))){const _=u(c(t.errors,s),g.argA,g.argB);y&&E(t.errors,s,_),Zt(t.errors,s)}if((D.touchedFields||C.touchedFields)&&o&&Array.isArray(c(t.touchedFields,s))){const _=u(c(t.touchedFields,s),g.argA,g.argB);y&&E(t.touchedFields,s,_)}(D.dirtyFields||C.dirtyFields)&&(t.dirtyFields=ge(n,l)),F.state.next({name:s,isDirty:J(s,a),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else E(l,s,a)},V=(s,a)=>{E(t.errors,s,a),F.state.next({errors:t.errors})},G=s=>{t.errors=s,F.state.next({errors:t.errors,isValid:!1})},W=(s,a,u,g)=>{const y=c(i,s);if(y){const o=c(l,s,U(u)?c(n,s):u);U(o)||g&&g.defaultChecked||a?E(l,s,a?o:ct(y._f)):N(s,o),f.mount&&R()}},I=(s,a,u,g,y)=>{let o=!1,_=!1;const k={name:s};if(!r.disabled){if(!u||g){(D.isDirty||C.isDirty)&&(_=t.isDirty,t.isDirty=k.isDirty=J(),o=_!==k.isDirty);const O=le(c(n,s),a);_=!!c(t.dirtyFields,s),O?B(t.dirtyFields,s):E(t.dirtyFields,s,!0),k.dirtyFields=t.dirtyFields,o=o||(D.dirtyFields||C.dirtyFields)&&_!==!O}if(u){const O=c(t.touchedFields,s);O||(E(t.touchedFields,s,u),k.touchedFields=t.touchedFields,o=o||(D.touchedFields||C.touchedFields)&&O!==u)}o&&y&&F.state.next(k)}return o?k:{}},m=(s,a,u,g)=>{const y=c(t.errors,s),o=(D.isValid||C.isValid)&&Q(a)&&t.isValid!==a;if(r.delayError&&u?(b=z(()=>V(s,u)),b(r.delayError)):(clearTimeout(x),b=null,u?E(t.errors,s,u):B(t.errors,s)),(u?!le(y,u):y)||!H(g)||o){const _={...g,...o&&Q(a)?{isValid:a}:{},errors:t.errors,name:s};t={...t,..._},F.state.next(_)}},h=async s=>{L(s,!0);const a=await r.resolver(l,r.context,zt(s||d.mount,i,r.criteriaMode,r.shouldUseNativeValidation));return L(s),a},A=async s=>{const{errors:a}=await h(s);if(s)for(const u of s){const g=c(a,u);g?E(t.errors,u,g):B(t.errors,u)}else t.errors=a;return a},S=async(s,a,u={valid:!0})=>{for(const g in s){const y=s[g];if(y){const{_f:o,..._}=y;if(o){const k=d.array.has(o.name),O=y._f&&Gt(y._f);O&&D.validatingFields&&L([g],!0);const X=await $e(y,d.disabled,l,M,r.shouldUseNativeValidation&&!a,k);if(O&&D.validatingFields&&L([g]),X[o.name]&&(u.valid=!1,a))break;!a&&(c(X,o.name)?k?Dt(t.errors,X,o.name):E(t.errors,o.name,X[o.name]):B(t.errors,o.name))}!H(_)&&await S(_,a,u)}}return u.valid},Y=()=>{for(const s of d.unMount){const a=c(i,s);a&&(a._f.refs?a._f.refs.every(u=>!Me(u)):!Me(a._f.ref))&&Ee(s)}d.unMount=new Set},J=(s,a)=>!r.disabled&&(s&&a&&E(l,s,a),!le(me(),n)),w=(s,a,u)=>Ft(s,d,{...f.mount?l:U(a)?n:se(s)?{[s]:a}:a},u,a),p=s=>we(c(f.mount?l:n,s,r.shouldUnregister?c(n,s,[]):[])),N=(s,a,u={})=>{const g=c(i,s);let y=a;if(g){const o=g._f;o&&(!o.disabled&&E(l,s,wt(a,o)),y=Ve(o.ref)&&$(a)?"":a,Vt(o.ref)?[...o.ref.options].forEach(_=>_.selected=y.includes(_.value)):o.refs?he(o.ref)?o.refs.forEach(_=>{(!_.defaultChecked||!_.disabled)&&(Array.isArray(y)?_.checked=!!y.find(k=>k===_.value):_.checked=y===_.value||!!y)}):o.refs.forEach(_=>_.checked=_.value===y):ze(o.ref)?o.ref.value="":(o.ref.value=y,o.ref.type||F.state.next({name:s,values:T(l)})))}(u.shouldDirty||u.shouldTouch)&&I(s,y,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&oe(s)},q=(s,a,u)=>{for(const g in a){if(!a.hasOwnProperty(g))return;const y=a[g],o=s+"."+g,_=c(i,o);(d.array.has(s)||P(y)||_&&!_._f)&&!ue(y)?q(o,y,u):N(o,y,u)}},j=(s,a,u={})=>{const g=c(i,s),y=d.array.has(s),o=T(a);E(l,s,o),y?(F.array.next({name:s,values:T(l)}),(D.isDirty||D.dirtyFields||C.isDirty||C.dirtyFields)&&u.shouldDirty&&F.state.next({name:s,dirtyFields:ge(n,l),isDirty:J(s,o)})):g&&!g._f&&!$(o)?q(s,o,u):N(s,o,u),He(s,d)&&F.state.next({...t}),F.state.next({name:f.mount?s:void 0,values:T(l)})},re=async s=>{f.mount=!0;const a=s.target;let u=a.name,g=!0;const y=c(i,u),o=O=>{g=Number.isNaN(O)||ue(O)&&isNaN(O.getTime())||le(O,c(l,u,O))},_=de(r.mode),k=de(r.reValidateMode);if(y){let O,X;const ve=a.type?ct(y._f):ht(s),ae=s.type===Fe.BLUR||s.type===Fe.FOCUS_OUT,Lt=!Yt(y._f)&&!r.resolver&&!c(t.errors,u)&&!y._f.deps||Xt(ae,c(t.touchedFields,u),t.isSubmitted,k,_),Oe=He(u,d,ae);E(l,u,ve),ae?(y._f.onBlur&&y._f.onBlur(s),b&&b(0)):y._f.onChange&&y._f.onChange(s);const Ue=I(u,ve,ae),Tt=!H(Ue)||Oe;if(!ae&&F.state.next({name:u,type:s.type,values:T(l)}),Lt)return(D.isValid||C.isValid)&&(r.mode==="onBlur"?ae&&R():ae||R()),Tt&&F.state.next({name:u,...Oe?{}:Ue});if(!ae&&Oe&&F.state.next({...t}),r.resolver){const{errors:st}=await h([u]);if(o(ve),g){const It=ft(t.errors,i,u),it=ft(st,i,It.name||u);O=it.error,u=it.name,X=H(st)}}else L([u],!0),O=(await $e(y,d.disabled,l,M,r.shouldUseNativeValidation))[u],L([u]),o(ve),g&&(O?X=!1:(D.isValid||C.isValid)&&(X=await S(i,!0)));g&&(y._f.deps&&oe(y._f.deps),m(u,X,O,Ue))}},ye=(s,a)=>{if(c(t.errors,a)&&s.focus)return s.focus(),1},oe=async(s,a={})=>{let u,g;const y=K(s);if(r.resolver){const o=await A(U(s)?s:y);u=H(o),g=s?!y.some(_=>c(o,_)):u}else s?(g=(await Promise.all(y.map(async o=>{const _=c(i,o);return await S(_&&_._f?{[o]:_}:_)}))).every(Boolean),!(!g&&!t.isValid)&&R()):g=u=await S(i);return F.state.next({...!se(s)||(D.isValid||C.isValid)&&u!==t.isValid?{}:{name:s},...r.resolver||!s?{isValid:u}:{},errors:t.errors}),a.shouldFocus&&!g&&fe(i,ye,s?y:d.mount),g},me=s=>{const a={...f.mount?l:n};return U(s)?a:se(s)?c(a,s):s.map(u=>c(a,u))},Ye=(s,a)=>({invalid:!!c((a||t).errors,s),isDirty:!!c((a||t).dirtyFields,s),error:c((a||t).errors,s),isValidating:!!c(t.validatingFields,s),isTouched:!!c((a||t).touchedFields,s)}),Et=s=>{s&&K(s).forEach(a=>B(t.errors,a)),F.state.next({errors:s?t.errors:{}})},Je=(s,a,u)=>{const g=(c(i,s,{_f:{}})._f||{}).ref,y=c(t.errors,s)||{},{ref:o,message:_,type:k,...O}=y;E(t.errors,s,{...O,...a,ref:g}),F.state.next({name:s,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&g&&g.focus&&g.focus()},pt=(s,a)=>te(s)?F.state.subscribe({next:u=>s(w(void 0,a),u)}):w(s,a,!0),Qe=s=>F.state.subscribe({next:a=>{Qt(s.name,a.name,s.exact)&&Jt(a,s.formState||D,Rt,s.reRenderRoot)&&s.callback({values:{...l},...t,...a})}}).unsubscribe,Ct=s=>(f.mount=!0,C={...C,...s.formState},Qe({...s,formState:C})),Ee=(s,a={})=>{for(const u of s?K(s):d.mount)d.mount.delete(u),d.array.delete(u),a.keepValue||(B(i,u),B(l,u)),!a.keepError&&B(t.errors,u),!a.keepDirty&&B(t.dirtyFields,u),!a.keepTouched&&B(t.touchedFields,u),!a.keepIsValidating&&B(t.validatingFields,u),!r.shouldUnregister&&!a.keepDefaultValue&&B(n,u);F.state.next({values:T(l)}),F.state.next({...t,...a.keepDirty?{isDirty:J()}:{}}),!a.keepIsValid&&R()},Xe=({disabled:s,name:a})=>{(Q(s)&&f.mount||s||d.disabled.has(a))&&(s?d.disabled.add(a):d.disabled.delete(a))},pe=(s,a={})=>{let u=c(i,s);const g=Q(a.disabled)||Q(r.disabled);return E(i,s,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:s}},name:s,mount:!0,...a}}),d.mount.add(s),u?Xe({disabled:Q(a.disabled)?a.disabled:r.disabled,name:s}):W(s,!0,a.value),{...g?{disabled:a.disabled||r.disabled}:{},...r.progressive?{required:!!a.required,min:_e(a.min),max:_e(a.max),minLength:_e(a.minLength),maxLength:_e(a.maxLength),pattern:_e(a.pattern)}:{},name:s,onChange:re,onBlur:re,ref:y=>{if(y){pe(s,a),u=c(i,s);const o=U(y.value)&&y.querySelectorAll&&y.querySelectorAll("input,select,textarea")[0]||y,_=$t(o),k=u._f.refs||[];if(_?k.find(O=>O===o):o===u._f.ref)return;E(i,s,{_f:{...u._f,..._?{refs:[...k.filter(Me),o,...Array.isArray(c(n,s))?[{}]:[]],ref:{type:o.type,name:s}}:{ref:o}}}),W(s,!1,void 0,o)}else u=c(i,s,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||a.shouldUnregister)&&!(mt(d.array,s)&&f.action)&&d.unMount.add(s)}}},Ce=()=>r.shouldFocusError&&fe(i,ye,d.mount),Ot=s=>{Q(s)&&(F.state.next({disabled:s}),fe(i,(a,u)=>{const g=c(i,u);g&&(a.disabled=g._f.disabled||s,Array.isArray(g._f.refs)&&g._f.refs.forEach(y=>{y.disabled=g._f.disabled||s}))},0,!1))},Ze=(s,a)=>async u=>{let g;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let y=T(l);if(F.state.next({isSubmitting:!0}),r.resolver){const{errors:o,values:_}=await h();t.errors=o,y=T(_)}else await S(i);if(d.disabled.size)for(const o of d.disabled)B(y,o);if(B(t.errors,"root"),H(t.errors)){F.state.next({errors:{}});try{await s(y,u)}catch(o){g=o}}else a&&await a({...t.errors},u),Ce(),setTimeout(Ce);if(F.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:H(t.errors)&&!g,submitCount:t.submitCount+1,errors:t.errors}),g)throw g},Ut=(s,a={})=>{c(i,s)&&(U(a.defaultValue)?j(s,T(c(n,s))):(j(s,a.defaultValue),E(n,s,T(a.defaultValue))),a.keepTouched||B(t.touchedFields,s),a.keepDirty||(B(t.dirtyFields,s),t.isDirty=a.defaultValue?J(s,T(c(n,s))):J()),a.keepError||(B(t.errors,s),D.isValid&&R()),F.state.next({...t}))},et=(s,a={})=>{const u=s?T(s):n,g=T(u),y=H(s),o=y?n:g;if(a.keepDefaultValues||(n=u),!a.keepValues){if(a.keepDirtyValues){const _=new Set([...d.mount,...Object.keys(ge(n,l))]);for(const k of Array.from(_))c(t.dirtyFields,k)?E(o,k,c(l,k)):j(k,c(o,k))}else{if(je&&U(s))for(const _ of d.mount){const k=c(i,_);if(k&&k._f){const O=Array.isArray(k._f.refs)?k._f.refs[0]:k._f.ref;if(Ve(O)){const X=O.closest("form");if(X){X.reset();break}}}}for(const _ of d.mount){const k=c(o,_,c(n,_));U(k)||(E(o,_,k),j(_,c(o,_)))}}l=T(o),F.array.next({values:{...o}}),F.state.next({values:{...o}})}d={mount:a.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},f.mount=!D.isValid||!!a.keepIsValid||!!a.keepDirtyValues,f.watch=!!r.shouldUnregister,F.state.next({submitCount:a.keepSubmitCount?t.submitCount:0,isDirty:y?!1:a.keepDirty?t.isDirty:!!(a.keepDefaultValues&&!le(s,n)),isSubmitted:a.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:y?{}:a.keepDirtyValues?a.keepDefaultValues&&l?ge(n,l):t.dirtyFields:a.keepDefaultValues&&s?ge(n,s):a.keepDirty?t.dirtyFields:{},touchedFields:a.keepTouched?t.touchedFields:{},errors:a.keepErrors?t.errors:{},isSubmitSuccessful:a.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},tt=(s,a)=>et(te(s)?s(l):s,a),Mt=(s,a={})=>{const u=c(i,s),g=u&&u._f;if(g){const y=g.refs?g.refs[0]:g.ref;y.focus&&(y.focus(),a.shouldSelect&&te(y.select)&&y.select())}},Rt=s=>{t={...t,...s}},rt={control:{register:pe,unregister:Ee,getFieldState:Ye,handleSubmit:Ze,setError:Je,_subscribe:Qe,_runSchema:h,_focusError:Ce,_getWatch:w,_getDirty:J,_setValid:R,_setFieldArray:ee,_setDisabledField:Xe,_setErrors:G,_getFieldArray:p,_reset:et,_resetDefaultValues:()=>te(r.defaultValues)&&r.defaultValues().then(s=>{tt(s,r.resetOptions),F.state.next({isLoading:!1})}),_removeUnmounted:Y,_disableForm:Ot,_subjects:F,_proxyFormState:D,get _fields(){return i},get _formValues(){return l},get _state(){return f},set _state(s){f=s},get _defaultValues(){return n},get _names(){return d},set _names(s){d=s},get _formState(){return t},get _options(){return r},set _options(s){r={...r,...s}}},subscribe:Ct,trigger:oe,register:pe,handleSubmit:Ze,watch:pt,setValue:j,getValues:me,reset:tt,resetField:Ut,clearErrors:Et,unregister:Ee,setError:Je,setFocus:Mt,getFieldState:Ye};return{...rt,formControl:rt}}var ne=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{const t=(Math.random()*16+e)%16|0;return(r=="x"?t:t&3|8).toString(16)})},Re=(e,r,t={})=>t.shouldFocus||U(t.shouldFocus)?t.focusName||`${e}.${U(t.focusIndex)?r:t.focusIndex}.`:"",Le=(e,r)=>[...e,...K(r)],Te=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Ie(e,r,t){return[...e.slice(0,r),...K(t),...e.slice(r)]}var Ne=(e,r,t)=>Array.isArray(e)?(U(e[t])&&(e[t]=void 0),e.splice(t,0,e.splice(r,1)[0]),e):[],Be=(e,r)=>[...K(r),...K(e)];function rr(e,r){let t=0;const i=[...e];for(const n of r)i.splice(n-t,1),t++;return we(i).length?i:[]}var Pe=(e,r)=>U(r)?[]:rr(e,K(r).sort((t,i)=>t-i)),We=(e,r,t)=>{[e[r],e[t]]=[e[t],e[r]]},gt=(e,r,t)=>(e[r]=t,e);function nr(e){const r=ke(),{control:t=r.control,name:i,keyName:n="id",shouldUnregister:l,rules:f}=e,[d,b]=v.useState(t._getFieldArray(i)),x=v.useRef(t._getFieldArray(i).map(ne)),D=v.useRef(d),C=v.useRef(i),F=v.useRef(!1);C.current=i,D.current=d,t._names.array.add(i),f&&t.register(i,f),De(()=>t._subjects.array.subscribe({next:({values:m,name:h})=>{if(h===C.current||!h){const A=c(m,C.current);Array.isArray(A)&&(b(A),x.current=A.map(ne))}}}).unsubscribe,[t]);const M=v.useCallback(m=>{F.current=!0,t._setFieldArray(i,m)},[t,i]),z=(m,h)=>{const A=K(T(m)),S=Le(t._getFieldArray(i),A);t._names.focus=Re(i,S.length-1,h),x.current=Le(x.current,A.map(ne)),M(S),b(S),t._setFieldArray(i,S,Le,{argA:Te(m)})},R=(m,h)=>{const A=K(T(m)),S=Be(t._getFieldArray(i),A);t._names.focus=Re(i,0,h),x.current=Be(x.current,A.map(ne)),M(S),b(S),t._setFieldArray(i,S,Be,{argA:Te(m)})},L=m=>{const h=Pe(t._getFieldArray(i),m);x.current=Pe(x.current,m),M(h),b(h),!Array.isArray(c(t._fields,i))&&E(t._fields,i,void 0),t._setFieldArray(i,h,Pe,{argA:m})},ee=(m,h,A)=>{const S=K(T(h)),Y=Ie(t._getFieldArray(i),m,S);t._names.focus=Re(i,m,A),x.current=Ie(x.current,m,S.map(ne)),M(Y),b(Y),t._setFieldArray(i,Y,Ie,{argA:m,argB:Te(h)})},V=(m,h)=>{const A=t._getFieldArray(i);We(A,m,h),We(x.current,m,h),M(A),b(A),t._setFieldArray(i,A,We,{argA:m,argB:h},!1)},G=(m,h)=>{const A=t._getFieldArray(i);Ne(A,m,h),Ne(x.current,m,h),M(A),b(A),t._setFieldArray(i,A,Ne,{argA:m,argB:h},!1)},W=(m,h)=>{const A=T(h),S=gt(t._getFieldArray(i),m,A);x.current=[...S].map((Y,J)=>!Y||J===m?ne():x.current[J]),M(S),b([...S]),t._setFieldArray(i,S,gt,{argA:m,argB:A},!0,!1)},I=m=>{const h=K(T(m));x.current=h.map(ne),M([...h]),b([...h]),t._setFieldArray(i,[...h],A=>A,{},!0,!1)};return v.useEffect(()=>{if(t._state.action=!1,He(i,t._names)&&t._subjects.state.next({...t._formState}),F.current&&(!de(t._options.mode).isOnSubmit||t._formState.isSubmitted)&&!de(t._options.reValidateMode).isOnSubmit)if(t._options.resolver)t._runSchema([i]).then(m=>{const h=c(m.errors,i),A=c(t._formState.errors,i);(A?!h&&A.type||h&&(A.type!==h.type||A.message!==h.message):h&&h.type)&&(h?E(t._formState.errors,i,h):B(t._formState.errors,i),t._subjects.state.next({errors:t._formState.errors}))});else{const m=c(t._fields,i);m&&m._f&&!(de(t._options.reValidateMode).isOnSubmit&&de(t._options.mode).isOnSubmit)&&$e(m,t._names.disabled,t._formValues,t._options.criteriaMode===Z.all,t._options.shouldUseNativeValidation,!0).then(h=>!H(h)&&t._subjects.state.next({errors:Dt(t._formState.errors,h,i)}))}t._subjects.state.next({name:i,values:T(t._formValues)}),t._names.focus&&fe(t._fields,(m,h)=>{if(t._names.focus&&h.startsWith(t._names.focus)&&m.focus)return m.focus(),1}),t._names.focus="",t._setValid(),F.current=!1},[d,i,t]),v.useEffect(()=>(!c(t._formValues,i)&&t._setFieldArray(i),()=>{const m=(h,A)=>{const S=c(t._fields,h);S&&S._f&&(S._f.mount=A)};t._options.shouldUnregister||l?t.unregister(i):m(i,!1)}),[i,t,n,l]),{swap:v.useCallback(V,[M,i,t]),move:v.useCallback(G,[M,i,t]),prepend:v.useCallback(R,[M,i,t]),append:v.useCallback(z,[M,i,t]),remove:v.useCallback(L,[M,i,t]),insert:v.useCallback(ee,[M,i,t]),update:v.useCallback(W,[M,i,t]),replace:v.useCallback(I,[M,i,t]),fields:v.useMemo(()=>d.map((m,h)=>({...m,[n]:x.current[h]||ne()})),[d,n])}}function lr(e={}){const r=v.useRef(void 0),t=v.useRef(void 0),[i,n]=v.useState({isDirty:!1,isValidating:!1,isLoading:te(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:te(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:i},e.defaultValues&&!te(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:f,...d}=tr(e);r.current={...d,formState:i}}const l=r.current.control;return l._options=e,De(()=>{const f=l._subscribe({formState:l._proxyFormState,callback:()=>n({...l._formState}),reRenderRoot:!0});return n(d=>({...d,isReady:!0})),l._formState.isReady=!0,f},[l]),v.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),v.useEffect(()=>{e.mode&&(l._options.mode=e.mode),e.reValidateMode&&(l._options.reValidateMode=e.reValidateMode)},[l,e.mode,e.reValidateMode]),v.useEffect(()=>{e.errors&&(l._setErrors(e.errors),l._focusError())},[l,e.errors]),v.useEffect(()=>{e.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,e.shouldUnregister]),v.useEffect(()=>{if(l._proxyFormState.isDirty){const f=l._getDirty();f!==i.isDirty&&l._subjects.state.next({isDirty:f})}},[l,i.isDirty]),v.useEffect(()=>{e.values&&!le(e.values,t.current)?(l._reset(e.values,l._options.resetOptions),t.current=e.values,n(f=>({...f}))):l._resetDefaultValues()},[l,e.values]),v.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),r.current.formState=bt(i,l),r.current}export{ar as C,Wt as a,nr as b,lr as u};
|
|
1
|
+
import{be as v,r as at}from"./index-DbK31dFt.js";var he=e=>e.type==="checkbox",ue=e=>e instanceof Date,$=e=>e==null;const _t=e=>typeof e=="object";var P=e=>!$(e)&&!Array.isArray(e)&&_t(e)&&!ue(e),ht=e=>P(e)&&e.target?he(e.target)?e.target.checked:e.target.value:e,Nt=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,mt=(e,r)=>e.has(Nt(r)),Bt=e=>{const r=e.constructor&&e.constructor.prototype;return P(r)&&r.hasOwnProperty("isPrototypeOf")},je=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function T(e){let r;const t=Array.isArray(e),i=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(e instanceof Set)r=new Set(e);else if(!(je&&(e instanceof Blob||i))&&(t||P(e)))if(r=t?[]:{},!t&&!Bt(e))r=e;else for(const n in e)e.hasOwnProperty(n)&&(r[n]=T(e[n]));else return e;return r}var Se=e=>/^\w*$/.test(e),U=e=>e===void 0,we=e=>Array.isArray(e)?e.filter(Boolean):[],Ke=e=>we(e.replace(/["|']|\]/g,"").split(/\.|\[/)),c=(e,r,t)=>{if(!r||!P(e))return t;const i=(Se(r)?[r]:Ke(r)).reduce((n,l)=>$(n)?n:n[l],e);return U(i)||i===e?U(e[r])?t:e[r]:i},Q=e=>typeof e=="boolean",E=(e,r,t)=>{let i=-1;const n=Se(r)?[r]:Ke(r),l=n.length,f=l-1;for(;++i<l;){const d=n[i];let b=t;if(i!==f){const x=e[d];b=P(x)||Array.isArray(x)?x:isNaN(+n[i+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;e[d]=b,e=e[d]}};const Fe={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Z={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ie={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},vt=v.createContext(null);vt.displayName="HookFormContext";const ke=()=>v.useContext(vt);var bt=(e,r,t,i=!0)=>{const n={defaultValues:r._defaultValues};for(const l in e)Object.defineProperty(n,l,{get:()=>{const f=l;return r._proxyFormState[f]!==Z.all&&(r._proxyFormState[f]=!i||Z.all),t&&(t[f]=!0),e[f]}});return n};const De=typeof window<"u"?at.useLayoutEffect:at.useEffect;function Pt(e){const r=ke(),{control:t=r.control,disabled:i,name:n,exact:l}=e||{},[f,d]=v.useState(t._formState),b=v.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return De(()=>t._subscribe({name:n,formState:b.current,exact:l,callback:x=>{!i&&d({...t._formState,...x})}}),[n,i,l]),v.useEffect(()=>{b.current.isValid&&t._setValid(!0)},[t]),v.useMemo(()=>bt(f,t,b.current,!1),[f,t])}var se=e=>typeof e=="string",Ft=(e,r,t,i,n)=>se(e)?(i&&r.watch.add(e),c(t,e,n)):Array.isArray(e)?e.map(l=>(i&&r.watch.add(l),c(t,l))):(i&&(r.watchAll=!0),t);function Wt(e){const r=ke(),{control:t=r.control,name:i,defaultValue:n,disabled:l,exact:f}=e||{},d=v.useRef(n),[b,x]=v.useState(t._getWatch(i,d.current));return De(()=>t._subscribe({name:i,formState:{values:!0},exact:f,callback:D=>!l&&x(Ft(i,t._names,D.values||t._formValues,!1,d.current))}),[i,t,l,f]),v.useEffect(()=>t._removeUnmounted()),b}function qt(e){const r=ke(),{name:t,disabled:i,control:n=r.control,shouldUnregister:l}=e,f=mt(n._names.array,t),d=Wt({control:n,name:t,defaultValue:c(n._formValues,t,c(n._defaultValues,t,e.defaultValue)),exact:!0}),b=Pt({control:n,name:t,exact:!0}),x=v.useRef(e),D=v.useRef(n.register(t,{...e.rules,value:d,...Q(e.disabled)?{disabled:e.disabled}:{}})),C=v.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!c(b.errors,t)},isDirty:{enumerable:!0,get:()=>!!c(b.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!c(b.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!c(b.validatingFields,t)},error:{enumerable:!0,get:()=>c(b.errors,t)}}),[b,t]),F=v.useCallback(L=>D.current.onChange({target:{value:ht(L),name:t},type:Fe.CHANGE}),[t]),M=v.useCallback(()=>D.current.onBlur({target:{value:c(n._formValues,t),name:t},type:Fe.BLUR}),[t,n._formValues]),z=v.useCallback(L=>{const ee=c(n._fields,t);ee&&L&&(ee._f.ref={focus:()=>L.focus&&L.focus(),select:()=>L.select&&L.select(),setCustomValidity:V=>L.setCustomValidity(V),reportValidity:()=>L.reportValidity()})},[n._fields,t]),R=v.useMemo(()=>({name:t,value:d,...Q(i)||b.disabled?{disabled:b.disabled||i}:{},onChange:F,onBlur:M,ref:z}),[t,i,b.disabled,F,M,z,d]);return v.useEffect(()=>{const L=n._options.shouldUnregister||l;n.register(t,{...x.current.rules,...Q(x.current.disabled)?{disabled:x.current.disabled}:{}});const ee=(V,G)=>{const W=c(n._fields,V);W&&W._f&&(W._f.mount=G)};if(ee(t,!0),L){const V=T(c(n._options.defaultValues,t));E(n._defaultValues,t,V),U(c(n._formValues,t))&&E(n._formValues,t,V)}return!f&&n.register(t),()=>{(f?L&&!n._state.action:L)?n.unregister(t):ee(t,!1)}},[t,n,f,l]),v.useEffect(()=>{n._setDisabledField({disabled:i,name:t})},[i,t,n]),v.useMemo(()=>({field:R,formState:b,fieldState:C}),[R,b,C])}const ar=e=>e.render(qt(e));var Ht=(e,r,t,i,n)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[i]:n||!0}}:{},K=e=>Array.isArray(e)?e:[e],nt=()=>{let e=[];return{get observers(){return e},next:n=>{for(const l of e)l.next&&l.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(l=>l!==n)}}),unsubscribe:()=>{e=[]}}},qe=e=>$(e)||!_t(e);function le(e,r,t=new WeakSet){if(qe(e)||qe(r))return e===r;if(ue(e)&&ue(r))return e.getTime()===r.getTime();const i=Object.keys(e),n=Object.keys(r);if(i.length!==n.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const l of i){const f=e[l];if(!n.includes(l))return!1;if(l!=="ref"){const d=r[l];if(ue(f)&&ue(d)||P(f)&&P(d)||Array.isArray(f)&&Array.isArray(d)?!le(f,d,t):f!==d)return!1}}return!0}var H=e=>P(e)&&!Object.keys(e).length,ze=e=>e.type==="file",te=e=>typeof e=="function",Ve=e=>{if(!je)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},Vt=e=>e.type==="select-multiple",Ge=e=>e.type==="radio",$t=e=>Ge(e)||he(e),Me=e=>Ve(e)&&e.isConnected;function jt(e,r){const t=r.slice(0,-1).length;let i=0;for(;i<t;)e=U(e)?i++:e[r[i++]];return e}function Kt(e){for(const r in e)if(e.hasOwnProperty(r)&&!U(e[r]))return!1;return!0}function B(e,r){const t=Array.isArray(r)?r:Se(r)?[r]:Ke(r),i=t.length===1?e:jt(e,t),n=t.length-1,l=t[n];return i&&delete i[l],n!==0&&(P(i)&&H(i)||Array.isArray(i)&&Kt(i))&&B(e,t.slice(0,-1)),e}var At=e=>{for(const r in e)if(te(e[r]))return!0;return!1};function Ae(e,r={}){const t=Array.isArray(e);if(P(e)||t)for(const i in e)Array.isArray(e[i])||P(e[i])&&!At(e[i])?(r[i]=Array.isArray(e[i])?[]:{},Ae(e[i],r[i])):$(e[i])||(r[i]=!0);return r}function xt(e,r,t){const i=Array.isArray(e);if(P(e)||i)for(const n in e)Array.isArray(e[n])||P(e[n])&&!At(e[n])?U(r)||qe(t[n])?t[n]=Array.isArray(e[n])?Ae(e[n],[]):{...Ae(e[n])}:xt(e[n],$(r)?{}:r[n],t[n]):t[n]=!le(e[n],r[n]);return t}var ge=(e,r)=>xt(e,r,Ae(r));const lt={value:!1,isValid:!1},ut={value:!0,isValid:!0};var St=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!U(e[0].attributes.value)?U(e[0].value)||e[0].value===""?ut:{value:e[0].value,isValid:!0}:ut:lt}return lt},wt=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:i})=>U(e)?e:r?e===""?NaN:e&&+e:t&&se(e)?new Date(e):i?i(e):e;const ot={isValid:!1,value:null};var kt=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,ot):ot;function ct(e){const r=e.ref;return ze(r)?r.files:Ge(r)?kt(e.refs).value:Vt(r)?[...r.selectedOptions].map(({value:t})=>t):he(r)?St(e.refs).value:wt(U(r.value)?e.ref.value:r.value,e)}var zt=(e,r,t,i)=>{const n={};for(const l of e){const f=c(r,l);f&&E(n,l,f._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:i}},xe=e=>e instanceof RegExp,_e=e=>U(e)?e:xe(e)?e.source:P(e)?xe(e.value)?e.value.source:e.value:e,de=e=>({isOnSubmit:!e||e===Z.onSubmit,isOnBlur:e===Z.onBlur,isOnChange:e===Z.onChange,isOnAll:e===Z.all,isOnTouch:e===Z.onTouched});const dt="AsyncFunction";var Gt=e=>!!e&&!!e.validate&&!!(te(e.validate)&&e.validate.constructor.name===dt||P(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===dt)),Yt=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),He=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const fe=(e,r,t,i)=>{for(const n of t||Object.keys(e)){const l=c(e,n);if(l){const{_f:f,...d}=l;if(f){if(f.refs&&f.refs[0]&&r(f.refs[0],n)&&!i)return!0;if(f.ref&&r(f.ref,f.name)&&!i)return!0;if(fe(d,r))break}else if(P(d)&&fe(d,r))break}}};function ft(e,r,t){const i=c(e,t);if(i||Se(t))return{error:i,name:t};const n=t.split(".");for(;n.length;){const l=n.join("."),f=c(r,l),d=c(e,l);if(f&&!Array.isArray(f)&&t!==l)return{name:t};if(d&&d.type)return{name:l,error:d};if(d&&d.root&&d.root.type)return{name:`${l}.root`,error:d.root};n.pop()}return{name:t}}var Jt=(e,r,t,i)=>{t(e);const{name:n,...l}=e;return H(l)||Object.keys(l).length>=Object.keys(r).length||Object.keys(l).find(f=>r[f]===(!i||Z.all))},Qt=(e,r,t)=>!e||!r||e===r||K(e).some(i=>i&&(t?i===r:i.startsWith(r)||r.startsWith(i))),Xt=(e,r,t,i,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(r||e):(t?i.isOnBlur:n.isOnBlur)?!e:(t?i.isOnChange:n.isOnChange)?e:!0,Zt=(e,r)=>!we(c(e,r)).length&&B(e,r),Dt=(e,r,t)=>{const i=K(c(e,t));return E(i,"root",r[t]),E(e,t,i),e},be=e=>se(e);function yt(e,r,t="validate"){if(be(e)||Array.isArray(e)&&e.every(be)||Q(e)&&!e)return{type:t,message:be(e)?e:"",ref:r}}var ce=e=>P(e)&&!xe(e)?e:{value:e,message:""},$e=async(e,r,t,i,n,l)=>{const{ref:f,refs:d,required:b,maxLength:x,minLength:D,min:C,max:F,pattern:M,validate:z,name:R,valueAsNumber:L,mount:ee}=e._f,V=c(t,R);if(!ee||r.has(R))return{};const G=d?d[0]:f,W=w=>{n&&G.reportValidity&&(G.setCustomValidity(Q(w)?"":w||""),G.reportValidity())},I={},m=Ge(f),h=he(f),A=m||h,S=(L||ze(f))&&U(f.value)&&U(V)||Ve(f)&&f.value===""||V===""||Array.isArray(V)&&!V.length,Y=Ht.bind(null,R,i,I),J=(w,p,N,q=ie.maxLength,j=ie.minLength)=>{const re=w?p:N;I[R]={type:w?q:j,message:re,ref:f,...Y(w?q:j,re)}};if(l?!Array.isArray(V)||!V.length:b&&(!A&&(S||$(V))||Q(V)&&!V||h&&!St(d).isValid||m&&!kt(d).isValid)){const{value:w,message:p}=be(b)?{value:!!b,message:b}:ce(b);if(w&&(I[R]={type:ie.required,message:p,ref:G,...Y(ie.required,p)},!i))return W(p),I}if(!S&&(!$(C)||!$(F))){let w,p;const N=ce(F),q=ce(C);if(!$(V)&&!isNaN(V)){const j=f.valueAsNumber||V&&+V;$(N.value)||(w=j>N.value),$(q.value)||(p=j<q.value)}else{const j=f.valueAsDate||new Date(V),re=me=>new Date(new Date().toDateString()+" "+me),ye=f.type=="time",oe=f.type=="week";se(N.value)&&V&&(w=ye?re(V)>re(N.value):oe?V>N.value:j>new Date(N.value)),se(q.value)&&V&&(p=ye?re(V)<re(q.value):oe?V<q.value:j<new Date(q.value))}if((w||p)&&(J(!!w,N.message,q.message,ie.max,ie.min),!i))return W(I[R].message),I}if((x||D)&&!S&&(se(V)||l&&Array.isArray(V))){const w=ce(x),p=ce(D),N=!$(w.value)&&V.length>+w.value,q=!$(p.value)&&V.length<+p.value;if((N||q)&&(J(N,w.message,p.message),!i))return W(I[R].message),I}if(M&&!S&&se(V)){const{value:w,message:p}=ce(M);if(xe(w)&&!V.match(w)&&(I[R]={type:ie.pattern,message:p,ref:f,...Y(ie.pattern,p)},!i))return W(p),I}if(z){if(te(z)){const w=await z(V,t),p=yt(w,G);if(p&&(I[R]={...p,...Y(ie.validate,p.message)},!i))return W(p.message),I}else if(P(z)){let w={};for(const p in z){if(!H(w)&&!i)break;const N=yt(await z[p](V,t),G,p);N&&(w={...N,...Y(p,N.message)},W(N.message),i&&(I[R]=w))}if(!H(w)&&(I[R]={ref:G,...w},!i))return I}}return W(!0),I};const er={mode:Z.onSubmit,reValidateMode:Z.onChange,shouldFocusError:!0};function tr(e={}){let r={...er,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:te(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1};const i={};let n=P(r.defaultValues)||P(r.values)?T(r.defaultValues||r.values)||{}:{},l=r.shouldUnregister?{}:T(n),f={action:!1,mount:!1,watch:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},b,x=0;const D={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let C={...D};const F={array:nt(),state:nt()},M=r.criteriaMode===Z.all,z=s=>a=>{clearTimeout(x),x=setTimeout(s,a)},R=async s=>{if(!r.disabled&&(D.isValid||C.isValid||s)){const a=r.resolver?H((await h()).errors):await S(i,!0);a!==t.isValid&&F.state.next({isValid:a})}},L=(s,a)=>{!r.disabled&&(D.isValidating||D.validatingFields||C.isValidating||C.validatingFields)&&((s||Array.from(d.mount)).forEach(u=>{u&&(a?E(t.validatingFields,u,a):B(t.validatingFields,u))}),F.state.next({validatingFields:t.validatingFields,isValidating:!H(t.validatingFields)}))},ee=(s,a=[],u,g,y=!0,o=!0)=>{if(g&&u&&!r.disabled){if(f.action=!0,o&&Array.isArray(c(i,s))){const _=u(c(i,s),g.argA,g.argB);y&&E(i,s,_)}if(o&&Array.isArray(c(t.errors,s))){const _=u(c(t.errors,s),g.argA,g.argB);y&&E(t.errors,s,_),Zt(t.errors,s)}if((D.touchedFields||C.touchedFields)&&o&&Array.isArray(c(t.touchedFields,s))){const _=u(c(t.touchedFields,s),g.argA,g.argB);y&&E(t.touchedFields,s,_)}(D.dirtyFields||C.dirtyFields)&&(t.dirtyFields=ge(n,l)),F.state.next({name:s,isDirty:J(s,a),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else E(l,s,a)},V=(s,a)=>{E(t.errors,s,a),F.state.next({errors:t.errors})},G=s=>{t.errors=s,F.state.next({errors:t.errors,isValid:!1})},W=(s,a,u,g)=>{const y=c(i,s);if(y){const o=c(l,s,U(u)?c(n,s):u);U(o)||g&&g.defaultChecked||a?E(l,s,a?o:ct(y._f)):N(s,o),f.mount&&R()}},I=(s,a,u,g,y)=>{let o=!1,_=!1;const k={name:s};if(!r.disabled){if(!u||g){(D.isDirty||C.isDirty)&&(_=t.isDirty,t.isDirty=k.isDirty=J(),o=_!==k.isDirty);const O=le(c(n,s),a);_=!!c(t.dirtyFields,s),O?B(t.dirtyFields,s):E(t.dirtyFields,s,!0),k.dirtyFields=t.dirtyFields,o=o||(D.dirtyFields||C.dirtyFields)&&_!==!O}if(u){const O=c(t.touchedFields,s);O||(E(t.touchedFields,s,u),k.touchedFields=t.touchedFields,o=o||(D.touchedFields||C.touchedFields)&&O!==u)}o&&y&&F.state.next(k)}return o?k:{}},m=(s,a,u,g)=>{const y=c(t.errors,s),o=(D.isValid||C.isValid)&&Q(a)&&t.isValid!==a;if(r.delayError&&u?(b=z(()=>V(s,u)),b(r.delayError)):(clearTimeout(x),b=null,u?E(t.errors,s,u):B(t.errors,s)),(u?!le(y,u):y)||!H(g)||o){const _={...g,...o&&Q(a)?{isValid:a}:{},errors:t.errors,name:s};t={...t,..._},F.state.next(_)}},h=async s=>{L(s,!0);const a=await r.resolver(l,r.context,zt(s||d.mount,i,r.criteriaMode,r.shouldUseNativeValidation));return L(s),a},A=async s=>{const{errors:a}=await h(s);if(s)for(const u of s){const g=c(a,u);g?E(t.errors,u,g):B(t.errors,u)}else t.errors=a;return a},S=async(s,a,u={valid:!0})=>{for(const g in s){const y=s[g];if(y){const{_f:o,..._}=y;if(o){const k=d.array.has(o.name),O=y._f&&Gt(y._f);O&&D.validatingFields&&L([g],!0);const X=await $e(y,d.disabled,l,M,r.shouldUseNativeValidation&&!a,k);if(O&&D.validatingFields&&L([g]),X[o.name]&&(u.valid=!1,a))break;!a&&(c(X,o.name)?k?Dt(t.errors,X,o.name):E(t.errors,o.name,X[o.name]):B(t.errors,o.name))}!H(_)&&await S(_,a,u)}}return u.valid},Y=()=>{for(const s of d.unMount){const a=c(i,s);a&&(a._f.refs?a._f.refs.every(u=>!Me(u)):!Me(a._f.ref))&&Ee(s)}d.unMount=new Set},J=(s,a)=>!r.disabled&&(s&&a&&E(l,s,a),!le(me(),n)),w=(s,a,u)=>Ft(s,d,{...f.mount?l:U(a)?n:se(s)?{[s]:a}:a},u,a),p=s=>we(c(f.mount?l:n,s,r.shouldUnregister?c(n,s,[]):[])),N=(s,a,u={})=>{const g=c(i,s);let y=a;if(g){const o=g._f;o&&(!o.disabled&&E(l,s,wt(a,o)),y=Ve(o.ref)&&$(a)?"":a,Vt(o.ref)?[...o.ref.options].forEach(_=>_.selected=y.includes(_.value)):o.refs?he(o.ref)?o.refs.forEach(_=>{(!_.defaultChecked||!_.disabled)&&(Array.isArray(y)?_.checked=!!y.find(k=>k===_.value):_.checked=y===_.value||!!y)}):o.refs.forEach(_=>_.checked=_.value===y):ze(o.ref)?o.ref.value="":(o.ref.value=y,o.ref.type||F.state.next({name:s,values:T(l)})))}(u.shouldDirty||u.shouldTouch)&&I(s,y,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&oe(s)},q=(s,a,u)=>{for(const g in a){if(!a.hasOwnProperty(g))return;const y=a[g],o=s+"."+g,_=c(i,o);(d.array.has(s)||P(y)||_&&!_._f)&&!ue(y)?q(o,y,u):N(o,y,u)}},j=(s,a,u={})=>{const g=c(i,s),y=d.array.has(s),o=T(a);E(l,s,o),y?(F.array.next({name:s,values:T(l)}),(D.isDirty||D.dirtyFields||C.isDirty||C.dirtyFields)&&u.shouldDirty&&F.state.next({name:s,dirtyFields:ge(n,l),isDirty:J(s,o)})):g&&!g._f&&!$(o)?q(s,o,u):N(s,o,u),He(s,d)&&F.state.next({...t}),F.state.next({name:f.mount?s:void 0,values:T(l)})},re=async s=>{f.mount=!0;const a=s.target;let u=a.name,g=!0;const y=c(i,u),o=O=>{g=Number.isNaN(O)||ue(O)&&isNaN(O.getTime())||le(O,c(l,u,O))},_=de(r.mode),k=de(r.reValidateMode);if(y){let O,X;const ve=a.type?ct(y._f):ht(s),ae=s.type===Fe.BLUR||s.type===Fe.FOCUS_OUT,Lt=!Yt(y._f)&&!r.resolver&&!c(t.errors,u)&&!y._f.deps||Xt(ae,c(t.touchedFields,u),t.isSubmitted,k,_),Oe=He(u,d,ae);E(l,u,ve),ae?(y._f.onBlur&&y._f.onBlur(s),b&&b(0)):y._f.onChange&&y._f.onChange(s);const Ue=I(u,ve,ae),Tt=!H(Ue)||Oe;if(!ae&&F.state.next({name:u,type:s.type,values:T(l)}),Lt)return(D.isValid||C.isValid)&&(r.mode==="onBlur"?ae&&R():ae||R()),Tt&&F.state.next({name:u,...Oe?{}:Ue});if(!ae&&Oe&&F.state.next({...t}),r.resolver){const{errors:st}=await h([u]);if(o(ve),g){const It=ft(t.errors,i,u),it=ft(st,i,It.name||u);O=it.error,u=it.name,X=H(st)}}else L([u],!0),O=(await $e(y,d.disabled,l,M,r.shouldUseNativeValidation))[u],L([u]),o(ve),g&&(O?X=!1:(D.isValid||C.isValid)&&(X=await S(i,!0)));g&&(y._f.deps&&oe(y._f.deps),m(u,X,O,Ue))}},ye=(s,a)=>{if(c(t.errors,a)&&s.focus)return s.focus(),1},oe=async(s,a={})=>{let u,g;const y=K(s);if(r.resolver){const o=await A(U(s)?s:y);u=H(o),g=s?!y.some(_=>c(o,_)):u}else s?(g=(await Promise.all(y.map(async o=>{const _=c(i,o);return await S(_&&_._f?{[o]:_}:_)}))).every(Boolean),!(!g&&!t.isValid)&&R()):g=u=await S(i);return F.state.next({...!se(s)||(D.isValid||C.isValid)&&u!==t.isValid?{}:{name:s},...r.resolver||!s?{isValid:u}:{},errors:t.errors}),a.shouldFocus&&!g&&fe(i,ye,s?y:d.mount),g},me=s=>{const a={...f.mount?l:n};return U(s)?a:se(s)?c(a,s):s.map(u=>c(a,u))},Ye=(s,a)=>({invalid:!!c((a||t).errors,s),isDirty:!!c((a||t).dirtyFields,s),error:c((a||t).errors,s),isValidating:!!c(t.validatingFields,s),isTouched:!!c((a||t).touchedFields,s)}),Et=s=>{s&&K(s).forEach(a=>B(t.errors,a)),F.state.next({errors:s?t.errors:{}})},Je=(s,a,u)=>{const g=(c(i,s,{_f:{}})._f||{}).ref,y=c(t.errors,s)||{},{ref:o,message:_,type:k,...O}=y;E(t.errors,s,{...O,...a,ref:g}),F.state.next({name:s,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&g&&g.focus&&g.focus()},pt=(s,a)=>te(s)?F.state.subscribe({next:u=>s(w(void 0,a),u)}):w(s,a,!0),Qe=s=>F.state.subscribe({next:a=>{Qt(s.name,a.name,s.exact)&&Jt(a,s.formState||D,Rt,s.reRenderRoot)&&s.callback({values:{...l},...t,...a})}}).unsubscribe,Ct=s=>(f.mount=!0,C={...C,...s.formState},Qe({...s,formState:C})),Ee=(s,a={})=>{for(const u of s?K(s):d.mount)d.mount.delete(u),d.array.delete(u),a.keepValue||(B(i,u),B(l,u)),!a.keepError&&B(t.errors,u),!a.keepDirty&&B(t.dirtyFields,u),!a.keepTouched&&B(t.touchedFields,u),!a.keepIsValidating&&B(t.validatingFields,u),!r.shouldUnregister&&!a.keepDefaultValue&&B(n,u);F.state.next({values:T(l)}),F.state.next({...t,...a.keepDirty?{isDirty:J()}:{}}),!a.keepIsValid&&R()},Xe=({disabled:s,name:a})=>{(Q(s)&&f.mount||s||d.disabled.has(a))&&(s?d.disabled.add(a):d.disabled.delete(a))},pe=(s,a={})=>{let u=c(i,s);const g=Q(a.disabled)||Q(r.disabled);return E(i,s,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:s}},name:s,mount:!0,...a}}),d.mount.add(s),u?Xe({disabled:Q(a.disabled)?a.disabled:r.disabled,name:s}):W(s,!0,a.value),{...g?{disabled:a.disabled||r.disabled}:{},...r.progressive?{required:!!a.required,min:_e(a.min),max:_e(a.max),minLength:_e(a.minLength),maxLength:_e(a.maxLength),pattern:_e(a.pattern)}:{},name:s,onChange:re,onBlur:re,ref:y=>{if(y){pe(s,a),u=c(i,s);const o=U(y.value)&&y.querySelectorAll&&y.querySelectorAll("input,select,textarea")[0]||y,_=$t(o),k=u._f.refs||[];if(_?k.find(O=>O===o):o===u._f.ref)return;E(i,s,{_f:{...u._f,..._?{refs:[...k.filter(Me),o,...Array.isArray(c(n,s))?[{}]:[]],ref:{type:o.type,name:s}}:{ref:o}}}),W(s,!1,void 0,o)}else u=c(i,s,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||a.shouldUnregister)&&!(mt(d.array,s)&&f.action)&&d.unMount.add(s)}}},Ce=()=>r.shouldFocusError&&fe(i,ye,d.mount),Ot=s=>{Q(s)&&(F.state.next({disabled:s}),fe(i,(a,u)=>{const g=c(i,u);g&&(a.disabled=g._f.disabled||s,Array.isArray(g._f.refs)&&g._f.refs.forEach(y=>{y.disabled=g._f.disabled||s}))},0,!1))},Ze=(s,a)=>async u=>{let g;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let y=T(l);if(F.state.next({isSubmitting:!0}),r.resolver){const{errors:o,values:_}=await h();t.errors=o,y=T(_)}else await S(i);if(d.disabled.size)for(const o of d.disabled)B(y,o);if(B(t.errors,"root"),H(t.errors)){F.state.next({errors:{}});try{await s(y,u)}catch(o){g=o}}else a&&await a({...t.errors},u),Ce(),setTimeout(Ce);if(F.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:H(t.errors)&&!g,submitCount:t.submitCount+1,errors:t.errors}),g)throw g},Ut=(s,a={})=>{c(i,s)&&(U(a.defaultValue)?j(s,T(c(n,s))):(j(s,a.defaultValue),E(n,s,T(a.defaultValue))),a.keepTouched||B(t.touchedFields,s),a.keepDirty||(B(t.dirtyFields,s),t.isDirty=a.defaultValue?J(s,T(c(n,s))):J()),a.keepError||(B(t.errors,s),D.isValid&&R()),F.state.next({...t}))},et=(s,a={})=>{const u=s?T(s):n,g=T(u),y=H(s),o=y?n:g;if(a.keepDefaultValues||(n=u),!a.keepValues){if(a.keepDirtyValues){const _=new Set([...d.mount,...Object.keys(ge(n,l))]);for(const k of Array.from(_))c(t.dirtyFields,k)?E(o,k,c(l,k)):j(k,c(o,k))}else{if(je&&U(s))for(const _ of d.mount){const k=c(i,_);if(k&&k._f){const O=Array.isArray(k._f.refs)?k._f.refs[0]:k._f.ref;if(Ve(O)){const X=O.closest("form");if(X){X.reset();break}}}}for(const _ of d.mount){const k=c(o,_,c(n,_));U(k)||(E(o,_,k),j(_,c(o,_)))}}l=T(o),F.array.next({values:{...o}}),F.state.next({values:{...o}})}d={mount:a.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},f.mount=!D.isValid||!!a.keepIsValid||!!a.keepDirtyValues,f.watch=!!r.shouldUnregister,F.state.next({submitCount:a.keepSubmitCount?t.submitCount:0,isDirty:y?!1:a.keepDirty?t.isDirty:!!(a.keepDefaultValues&&!le(s,n)),isSubmitted:a.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:y?{}:a.keepDirtyValues?a.keepDefaultValues&&l?ge(n,l):t.dirtyFields:a.keepDefaultValues&&s?ge(n,s):a.keepDirty?t.dirtyFields:{},touchedFields:a.keepTouched?t.touchedFields:{},errors:a.keepErrors?t.errors:{},isSubmitSuccessful:a.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},tt=(s,a)=>et(te(s)?s(l):s,a),Mt=(s,a={})=>{const u=c(i,s),g=u&&u._f;if(g){const y=g.refs?g.refs[0]:g.ref;y.focus&&(y.focus(),a.shouldSelect&&te(y.select)&&y.select())}},Rt=s=>{t={...t,...s}},rt={control:{register:pe,unregister:Ee,getFieldState:Ye,handleSubmit:Ze,setError:Je,_subscribe:Qe,_runSchema:h,_focusError:Ce,_getWatch:w,_getDirty:J,_setValid:R,_setFieldArray:ee,_setDisabledField:Xe,_setErrors:G,_getFieldArray:p,_reset:et,_resetDefaultValues:()=>te(r.defaultValues)&&r.defaultValues().then(s=>{tt(s,r.resetOptions),F.state.next({isLoading:!1})}),_removeUnmounted:Y,_disableForm:Ot,_subjects:F,_proxyFormState:D,get _fields(){return i},get _formValues(){return l},get _state(){return f},set _state(s){f=s},get _defaultValues(){return n},get _names(){return d},set _names(s){d=s},get _formState(){return t},get _options(){return r},set _options(s){r={...r,...s}}},subscribe:Ct,trigger:oe,register:pe,handleSubmit:Ze,watch:pt,setValue:j,getValues:me,reset:tt,resetField:Ut,clearErrors:Et,unregister:Ee,setError:Je,setFocus:Mt,getFieldState:Ye};return{...rt,formControl:rt}}var ne=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{const t=(Math.random()*16+e)%16|0;return(r=="x"?t:t&3|8).toString(16)})},Re=(e,r,t={})=>t.shouldFocus||U(t.shouldFocus)?t.focusName||`${e}.${U(t.focusIndex)?r:t.focusIndex}.`:"",Le=(e,r)=>[...e,...K(r)],Te=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Ie(e,r,t){return[...e.slice(0,r),...K(t),...e.slice(r)]}var Ne=(e,r,t)=>Array.isArray(e)?(U(e[t])&&(e[t]=void 0),e.splice(t,0,e.splice(r,1)[0]),e):[],Be=(e,r)=>[...K(r),...K(e)];function rr(e,r){let t=0;const i=[...e];for(const n of r)i.splice(n-t,1),t++;return we(i).length?i:[]}var Pe=(e,r)=>U(r)?[]:rr(e,K(r).sort((t,i)=>t-i)),We=(e,r,t)=>{[e[r],e[t]]=[e[t],e[r]]},gt=(e,r,t)=>(e[r]=t,e);function nr(e){const r=ke(),{control:t=r.control,name:i,keyName:n="id",shouldUnregister:l,rules:f}=e,[d,b]=v.useState(t._getFieldArray(i)),x=v.useRef(t._getFieldArray(i).map(ne)),D=v.useRef(d),C=v.useRef(i),F=v.useRef(!1);C.current=i,D.current=d,t._names.array.add(i),f&&t.register(i,f),De(()=>t._subjects.array.subscribe({next:({values:m,name:h})=>{if(h===C.current||!h){const A=c(m,C.current);Array.isArray(A)&&(b(A),x.current=A.map(ne))}}}).unsubscribe,[t]);const M=v.useCallback(m=>{F.current=!0,t._setFieldArray(i,m)},[t,i]),z=(m,h)=>{const A=K(T(m)),S=Le(t._getFieldArray(i),A);t._names.focus=Re(i,S.length-1,h),x.current=Le(x.current,A.map(ne)),M(S),b(S),t._setFieldArray(i,S,Le,{argA:Te(m)})},R=(m,h)=>{const A=K(T(m)),S=Be(t._getFieldArray(i),A);t._names.focus=Re(i,0,h),x.current=Be(x.current,A.map(ne)),M(S),b(S),t._setFieldArray(i,S,Be,{argA:Te(m)})},L=m=>{const h=Pe(t._getFieldArray(i),m);x.current=Pe(x.current,m),M(h),b(h),!Array.isArray(c(t._fields,i))&&E(t._fields,i,void 0),t._setFieldArray(i,h,Pe,{argA:m})},ee=(m,h,A)=>{const S=K(T(h)),Y=Ie(t._getFieldArray(i),m,S);t._names.focus=Re(i,m,A),x.current=Ie(x.current,m,S.map(ne)),M(Y),b(Y),t._setFieldArray(i,Y,Ie,{argA:m,argB:Te(h)})},V=(m,h)=>{const A=t._getFieldArray(i);We(A,m,h),We(x.current,m,h),M(A),b(A),t._setFieldArray(i,A,We,{argA:m,argB:h},!1)},G=(m,h)=>{const A=t._getFieldArray(i);Ne(A,m,h),Ne(x.current,m,h),M(A),b(A),t._setFieldArray(i,A,Ne,{argA:m,argB:h},!1)},W=(m,h)=>{const A=T(h),S=gt(t._getFieldArray(i),m,A);x.current=[...S].map((Y,J)=>!Y||J===m?ne():x.current[J]),M(S),b([...S]),t._setFieldArray(i,S,gt,{argA:m,argB:A},!0,!1)},I=m=>{const h=K(T(m));x.current=h.map(ne),M([...h]),b([...h]),t._setFieldArray(i,[...h],A=>A,{},!0,!1)};return v.useEffect(()=>{if(t._state.action=!1,He(i,t._names)&&t._subjects.state.next({...t._formState}),F.current&&(!de(t._options.mode).isOnSubmit||t._formState.isSubmitted)&&!de(t._options.reValidateMode).isOnSubmit)if(t._options.resolver)t._runSchema([i]).then(m=>{const h=c(m.errors,i),A=c(t._formState.errors,i);(A?!h&&A.type||h&&(A.type!==h.type||A.message!==h.message):h&&h.type)&&(h?E(t._formState.errors,i,h):B(t._formState.errors,i),t._subjects.state.next({errors:t._formState.errors}))});else{const m=c(t._fields,i);m&&m._f&&!(de(t._options.reValidateMode).isOnSubmit&&de(t._options.mode).isOnSubmit)&&$e(m,t._names.disabled,t._formValues,t._options.criteriaMode===Z.all,t._options.shouldUseNativeValidation,!0).then(h=>!H(h)&&t._subjects.state.next({errors:Dt(t._formState.errors,h,i)}))}t._subjects.state.next({name:i,values:T(t._formValues)}),t._names.focus&&fe(t._fields,(m,h)=>{if(t._names.focus&&h.startsWith(t._names.focus)&&m.focus)return m.focus(),1}),t._names.focus="",t._setValid(),F.current=!1},[d,i,t]),v.useEffect(()=>(!c(t._formValues,i)&&t._setFieldArray(i),()=>{const m=(h,A)=>{const S=c(t._fields,h);S&&S._f&&(S._f.mount=A)};t._options.shouldUnregister||l?t.unregister(i):m(i,!1)}),[i,t,n,l]),{swap:v.useCallback(V,[M,i,t]),move:v.useCallback(G,[M,i,t]),prepend:v.useCallback(R,[M,i,t]),append:v.useCallback(z,[M,i,t]),remove:v.useCallback(L,[M,i,t]),insert:v.useCallback(ee,[M,i,t]),update:v.useCallback(W,[M,i,t]),replace:v.useCallback(I,[M,i,t]),fields:v.useMemo(()=>d.map((m,h)=>({...m,[n]:x.current[h]||ne()})),[d,n])}}function lr(e={}){const r=v.useRef(void 0),t=v.useRef(void 0),[i,n]=v.useState({isDirty:!1,isValidating:!1,isLoading:te(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:te(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:i},e.defaultValues&&!te(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:f,...d}=tr(e);r.current={...d,formState:i}}const l=r.current.control;return l._options=e,De(()=>{const f=l._subscribe({formState:l._proxyFormState,callback:()=>n({...l._formState}),reRenderRoot:!0});return n(d=>({...d,isReady:!0})),l._formState.isReady=!0,f},[l]),v.useEffect(()=>l._disableForm(e.disabled),[l,e.disabled]),v.useEffect(()=>{e.mode&&(l._options.mode=e.mode),e.reValidateMode&&(l._options.reValidateMode=e.reValidateMode)},[l,e.mode,e.reValidateMode]),v.useEffect(()=>{e.errors&&(l._setErrors(e.errors),l._focusError())},[l,e.errors]),v.useEffect(()=>{e.shouldUnregister&&l._subjects.state.next({values:l._getWatch()})},[l,e.shouldUnregister]),v.useEffect(()=>{if(l._proxyFormState.isDirty){const f=l._getDirty();f!==i.isDirty&&l._subjects.state.next({isDirty:f})}},[l,i.isDirty]),v.useEffect(()=>{e.values&&!le(e.values,t.current)?(l._reset(e.values,l._options.resetOptions),t.current=e.values,n(f=>({...f}))):l._resetDefaultValues()},[l,e.values]),v.useEffect(()=>{l._state.mount||(l._setValid(),l._state.mount=!0),l._state.watch&&(l._state.watch=!1,l._subjects.state.next({...l._formState})),l._removeUnmounted()}),r.current.formState=bt(i,l),r.current}export{ar as C,Wt as a,nr as b,lr as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j,o as L,dB as Ot,dC as Pt,dD as Lt,K as dt,dE as Tt,r as I,be as Dt,a7 as Nt,a3 as qt,a8 as Mt,bi as Wt,bn as Bt,n as $t,V as Ft,cJ as Gt,b as Ht,by as Kt,y as et,i as Vt,W as zt,cs as Jt,H as Yt,X as rt,T as Xt,t as Qt,$ as Zt,D as kt,U as te,v as it,C as nt,w as ee,z as re}from"./index-Ckdw7oMZ.js";import{W as ie}from"./status-CkDyGfPR.js";import{r as gt,a as ne,W as se}from"./without-wallet-D1Q6iLpQ.js";import{r as oe}from"./cloneDeep-BFGhZQPz.js";import{u as vt}from"./useLocalStorage-CQ2ab_g0.js";import{v as st}from"./index-DRSF6cZ-.js";import{D as ae}from"./url-evaluation-7hmV9VKZ.js";import{A as le}from"./Autocomplete-2Jqtfnqr.js";import{L as ce}from"./ListItemButton-DD8rPeWA.js";import{S as ue,a as he,b as fe}from"./Stepper-Bd5ZP-LS.js";function pe({mode:o,...p}){return o==="development"?j.jsx(ie,{type:"primary",...p,children:"DEV"}):null}pe.propTypes={mode:L.string.isRequired};var T={},F={exports:{}},V={exports:{}},ot;function yt(){if(ot)return V.exports;ot=1;var o=V.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(u){return"file-"+m(u)}}},p={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:m};Object.keys(o).forEach(function(u){Object.keys(p).forEach(function(h){o[u][h]||(o[u][h]=p[h])}),o[u].protocols_re=RegExp("^("+o[u].protocols.map(function(h){return h.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function m(u){return u.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}return V.exports}var z,at;function me(){if(at)return z;at=1;var o=yt(),p=Object.assign||function(h,t){if(t===null||typeof t!="object")return h;const r=Object.keys(t);let i=r.length;for(;i--;)h[r[i]]=t[r[i]];return h};z=m;function m(u,h,t,r,i,n,a){var x=this;x.type=u,Object.keys(o[u]).forEach(function(w){x[w]=o[u][w]}),x.user=h,x.auth=t,x.project=r,x.committish=i,x.default=n,x.opts=a||{}}return m.prototype.hash=function(){return this.committish?"#"+this.committish:""},m.prototype._fill=function(u,h){if(u){var t=p({},h);t.path=t.path?t.path.replace(/^[/]+/g,""):"",h=p(p({},this.opts),h);var r=this;Object.keys(this).forEach(function(c){r[c]!=null&&t[c]==null&&(t[c]=r[c])});var i=t.auth,n=t.committish,a=t.fragment,x=t.path,w=t.project;Object.keys(t).forEach(function(c){var E=t[c];(c==="path"||c==="project")&&typeof E=="string"?t[c]=E.split("/").map(function(S){return encodeURIComponent(S)}).join("/"):c!=="domain"&&(t[c]=encodeURIComponent(E))}),t["auth@"]=i?i+"@":"",t["#fragment"]=a?"#"+this.hashformat(a):"",t.fragment=t.fragment?t.fragment:"",t["#path"]=x?"#"+this.hashformat(x):"",t["/path"]=t.path?"/"+t.path:"",t.projectPath=w.split("/").map(encodeURIComponent).join("/"),h.noCommittish?(t["#committish"]="",t["/tree/committish"]="",t["/committish"]="",t.committish=""):(t["#committish"]=n?"#"+n:"",t["/tree/committish"]=t.committish?"/"+t.treepath+"/"+t.committish:"",t["/committish"]=t.committish?"/"+t.committish:"",t.committish=t.committish||"master");var g=u;return Object.keys(t).forEach(function(c){g=g.replace(new RegExp("[{]"+c+"[}]","g"),t[c])}),h.noGitPlus?g.replace(/^git[+]/,""):g}},m.prototype.ssh=function(u){return this._fill(this.sshtemplate,u)},m.prototype.sshurl=function(u){return this._fill(this.sshurltemplate,u)},m.prototype.browse=function(u,h,t){return typeof u=="string"?(typeof h!="string"&&(t=h,h=null),this._fill(this.browsefiletemplate,p({fragment:h,path:u},t))):this._fill(this.browsetemplate,u)},m.prototype.docs=function(u){return this._fill(this.docstemplate,u)},m.prototype.bugs=function(u){return this._fill(this.bugstemplate,u)},m.prototype.https=function(u){return this._fill(this.httpstemplate,u)},m.prototype.git=function(u){return this._fill(this.gittemplate,u)},m.prototype.shortcut=function(u){return this._fill(this.shortcuttemplate,u)},m.prototype.path=function(u){return this._fill(this.pathtemplate,u)},m.prototype.tarball=function(u){var h=p({},u,{noCommittish:!1});return this._fill(this.tarballtemplate,h)},m.prototype.file=function(u,h){return this._fill(this.filetemplate,p({path:u},h))},m.prototype.getDefaultRepresentation=function(){return this.default},m.prototype.toString=function(u){return this.default&&typeof this[this.default]=="function"?this[this.default](u):this.sshurl(u)},z}var J,lt;function de(){return lt||(lt=1,J=function(o){o.prototype[Symbol.iterator]=function*(){for(let p=this.head;p;p=p.next)yield p.value}}),J}var Y,ct;function ge(){if(ct)return Y;ct=1,Y=o,o.Node=h,o.create=o;function o(t){var r=this;if(r instanceof o||(r=new o),r.tail=null,r.head=null,r.length=0,t&&typeof t.forEach=="function")t.forEach(function(a){r.push(a)});else if(arguments.length>0)for(var i=0,n=arguments.length;i<n;i++)r.push(arguments[i]);return r}o.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var r=t.next,i=t.prev;return r&&(r.prev=i),i&&(i.next=r),t===this.head&&(this.head=r),t===this.tail&&(this.tail=i),t.list.length--,t.next=null,t.prev=null,t.list=null,r},o.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var r=this.head;t.list=this,t.next=r,r&&(r.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}},o.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var r=this.tail;t.list=this,t.prev=r,r&&(r.next=t),this.tail=t,this.head||(this.head=t),this.length++}},o.prototype.push=function(){for(var t=0,r=arguments.length;t<r;t++)m(this,arguments[t]);return this.length},o.prototype.unshift=function(){for(var t=0,r=arguments.length;t<r;t++)u(this,arguments[t]);return this.length},o.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}},o.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}},o.prototype.forEach=function(t,r){r=r||this;for(var i=this.head,n=0;i!==null;n++)t.call(r,i.value,n,this),i=i.next},o.prototype.forEachReverse=function(t,r){r=r||this;for(var i=this.tail,n=this.length-1;i!==null;n--)t.call(r,i.value,n,this),i=i.prev},o.prototype.get=function(t){for(var r=0,i=this.head;i!==null&&r<t;r++)i=i.next;if(r===t&&i!==null)return i.value},o.prototype.getReverse=function(t){for(var r=0,i=this.tail;i!==null&&r<t;r++)i=i.prev;if(r===t&&i!==null)return i.value},o.prototype.map=function(t,r){r=r||this;for(var i=new o,n=this.head;n!==null;)i.push(t.call(r,n.value,this)),n=n.next;return i},o.prototype.mapReverse=function(t,r){r=r||this;for(var i=new o,n=this.tail;n!==null;)i.push(t.call(r,n.value,this)),n=n.prev;return i},o.prototype.reduce=function(t,r){var i,n=this.head;if(arguments.length>1)i=r;else if(this.head)n=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=0;n!==null;a++)i=t(i,n.value,a),n=n.next;return i},o.prototype.reduceReverse=function(t,r){var i,n=this.tail;if(arguments.length>1)i=r;else if(this.tail)n=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=this.length-1;n!==null;a--)i=t(i,n.value,a),n=n.prev;return i},o.prototype.toArray=function(){for(var t=new Array(this.length),r=0,i=this.head;i!==null;r++)t[r]=i.value,i=i.next;return t},o.prototype.toArrayReverse=function(){for(var t=new Array(this.length),r=0,i=this.tail;i!==null;r++)t[r]=i.value,i=i.prev;return t},o.prototype.slice=function(t,r){r=r||this.length,r<0&&(r+=this.length),t=t||0,t<0&&(t+=this.length);var i=new o;if(r<t||r<0)return i;t<0&&(t=0),r>this.length&&(r=this.length);for(var n=0,a=this.head;a!==null&&n<t;n++)a=a.next;for(;a!==null&&n<r;n++,a=a.next)i.push(a.value);return i},o.prototype.sliceReverse=function(t,r){r=r||this.length,r<0&&(r+=this.length),t=t||0,t<0&&(t+=this.length);var i=new o;if(r<t||r<0)return i;t<0&&(t=0),r>this.length&&(r=this.length);for(var n=this.length,a=this.tail;a!==null&&n>r;n--)a=a.prev;for(;a!==null&&n>t;n--,a=a.prev)i.push(a.value);return i},o.prototype.splice=function(t,r,...i){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,a=this.head;a!==null&&n<t;n++)a=a.next;for(var x=[],n=0;a&&n<r;n++)x.push(a.value),a=this.removeNode(a);a===null&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev);for(var n=0;n<i.length;n++)a=p(this,a,i[n]);return x},o.prototype.reverse=function(){for(var t=this.head,r=this.tail,i=t;i!==null;i=i.prev){var n=i.prev;i.prev=i.next,i.next=n}return this.head=r,this.tail=t,this};function p(t,r,i){var n=r===t.head?new h(i,null,r,t):new h(i,r,r.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function m(t,r){t.tail=new h(r,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function u(t,r){t.head=new h(r,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function h(t,r,i,n){if(!(this instanceof h))return new h(t,r,i,n);this.list=n,this.value=t,r?(r.next=this,this.prev=r):this.prev=null,i?(i.prev=this,this.next=i):this.next=null}try{de()(o)}catch{}return Y}var X,ut;function ve(){if(ut)return X;ut=1;const o=ge(),p=Symbol("max"),m=Symbol("length"),u=Symbol("lengthCalculator"),h=Symbol("allowStale"),t=Symbol("maxAge"),r=Symbol("dispose"),i=Symbol("noDisposeOnSet"),n=Symbol("lruList"),a=Symbol("cache"),x=Symbol("updateAgeOnGet"),w=()=>1;class g{constructor(s){if(typeof s=="number"&&(s={max:s}),s||(s={}),s.max&&(typeof s.max!="number"||s.max<0))throw new TypeError("max must be a non-negative number");this[p]=s.max||1/0;const e=s.length||w;if(this[u]=typeof e!="function"?w:e,this[h]=s.stale||!1,s.maxAge&&typeof s.maxAge!="number")throw new TypeError("maxAge must be a number");this[t]=s.maxAge||0,this[r]=s.dispose,this[i]=s.noDisposeOnSet||!1,this[x]=s.updateAgeOnGet||!1,this.reset()}set max(s){if(typeof s!="number"||s<0)throw new TypeError("max must be a non-negative number");this[p]=s||1/0,S(this)}get max(){return this[p]}set allowStale(s){this[h]=!!s}get allowStale(){return this[h]}set maxAge(s){if(typeof s!="number")throw new TypeError("maxAge must be a non-negative number");this[t]=s,S(this)}get maxAge(){return this[t]}set lengthCalculator(s){typeof s!="function"&&(s=w),s!==this[u]&&(this[u]=s,this[m]=0,this[n].forEach(e=>{e.length=this[u](e.value,e.key),this[m]+=e.length})),S(this)}get lengthCalculator(){return this[u]}get length(){return this[m]}get itemCount(){return this[n].length}rforEach(s,e){e=e||this;for(let l=this[n].tail;l!==null;){const f=l.prev;U(this,s,l,e),l=f}}forEach(s,e){e=e||this;for(let l=this[n].head;l!==null;){const f=l.next;U(this,s,l,e),l=f}}keys(){return this[n].toArray().map(s=>s.key)}values(){return this[n].toArray().map(s=>s.value)}reset(){this[r]&&this[n]&&this[n].length&&this[n].forEach(s=>this[r](s.key,s.value)),this[a]=new Map,this[n]=new o,this[m]=0}dump(){return this[n].map(s=>E(this,s)?!1:{k:s.key,v:s.value,e:s.now+(s.maxAge||0)}).toArray().filter(s=>s)}dumpLru(){return this[n]}set(s,e,l){if(l=l||this[t],l&&typeof l!="number")throw new TypeError("maxAge must be a number");const f=l?Date.now():0,y=this[u](e,s);if(this[a].has(s)){if(y>this[p])return C(this,this[a].get(s)),!1;const A=this[a].get(s).value;return this[r]&&(this[i]||this[r](s,A.value)),A.now=f,A.maxAge=l,A.value=e,this[m]+=y-A.length,A.length=y,this.get(s),S(this),!0}const b=new R(s,e,y,f,l);return b.length>this[p]?(this[r]&&this[r](s,e),!1):(this[m]+=b.length,this[n].unshift(b),this[a].set(s,this[n].head),S(this),!0)}has(s){if(!this[a].has(s))return!1;const e=this[a].get(s).value;return!E(this,e)}get(s){return c(this,s,!0)}peek(s){return c(this,s,!1)}pop(){const s=this[n].tail;return s?(C(this,s),s.value):null}del(s){C(this,this[a].get(s))}load(s){this.reset();const e=Date.now();for(let l=s.length-1;l>=0;l--){const f=s[l],y=f.e||0;if(y===0)this.set(f.k,f.v);else{const b=y-e;b>0&&this.set(f.k,f.v,b)}}}prune(){this[a].forEach((s,e)=>c(this,e,!1))}}const c=(v,s,e)=>{const l=v[a].get(s);if(l){const f=l.value;if(E(v,f)){if(C(v,l),!v[h])return}else e&&(v[x]&&(l.value.now=Date.now()),v[n].unshiftNode(l));return f.value}},E=(v,s)=>{if(!s||!s.maxAge&&!v[t])return!1;const e=Date.now()-s.now;return s.maxAge?e>s.maxAge:v[t]&&e>v[t]},S=v=>{if(v[m]>v[p])for(let s=v[n].tail;v[m]>v[p]&&s!==null;){const e=s.prev;C(v,s),s=e}},C=(v,s)=>{if(s){const e=s.value;v[r]&&v[r](e.key,e.value),v[m]-=e.length,v[a].delete(e.key),v[n].removeNode(s)}};class R{constructor(s,e,l,f,y){this.key=s,this.value=e,this.length=l,this.now=f,this.maxAge=y||0}}const U=(v,s,e,l)=>{let f=e.value;E(v,f)&&(C(v,e),v[h]||(f=void 0)),f&&s.call(l,f.value,f.key,v)};return X=g,X}var ht;function ye(){if(ht)return F.exports;ht=1;var o=Ot,p=yt(),m=F.exports=me(),u=ve(),h=new u({max:1e3}),t={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function r(g){return t[g]||g.slice(0,-1)}var i={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};F.exports.fromUrl=function(g,c){if(typeof g=="string"){var E=g+JSON.stringify(c||{});return h.has(E)||h.set(E,n(g,c)),h.get(E)}};function n(g,c){if(!(g==null||g==="")){var E=x(a(g)?"github:"+g:g),S=w(E),C=E.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),R=Object.keys(p).map(function(U){try{var v=p[U],s=null;S.auth&&i[S.protocol]&&(s=S.auth);var e=S.hash?decodeURIComponent(S.hash.substr(1)):null,l=null,f=null,y=null;if(C&&C[1]===U)l=C[2]&&decodeURIComponent(C[2]),f=decodeURIComponent(C[3].replace(/\.git$/,"")),y="shortcut";else{if(S.host&&S.host!==v.domain&&S.host.replace(/^www[.]/,"")!==v.domain||!v.protocols_re.test(S.protocol)||!S.path)return;var b=v.pathmatch,_=S.path.match(b);if(!_)return;_[1]!==null&&_[1]!==void 0&&(l=decodeURIComponent(_[1].replace(/^:/,""))),f=decodeURIComponent(_[2]),y=r(S.protocol)}return new m(U,l,s,f,e,y,c)}catch(A){if(!(A instanceof URIError))throw A}}).filter(function(U){return U});if(R.length===1)return R[0]}}function a(g){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(g)}function x(g){var c=o.parse(g);return c.protocol==="gist:"&&c.host&&!c.path?c.protocol+"/"+c.host:g}function w(g){var c=g.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!c){var E=o.parse(g);if(E.auth){const C=g.match(/[^@]+@[^:/]+/);if(C){var S=new o.URL(C[0]);E.auth=S.username||"",S.password&&(E.auth+=":"+S.password)}}return E}return{protocol:"git+ssh:",slashes:!0,auth:c[1],host:c[2],port:null,hostname:c[2],hash:c[4],search:null,query:null,pathname:"/"+c[3],path:"/"+c[3],href:"git+ssh://"+c[1]+"@"+c[2]+"/"+c[3]+(c[4]||"")}}return F.exports}var N={},P={},ft;function xe(){if(ft)return P;ft=1;var o=P&&P.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(P,"__esModule",{value:!0}),P.setService=P.findService=P.getDefaultServiceConfig=P.getServiceConfig=void 0;const p=o(oe),m=gt(),u={},h=a=>{u[a.name]={validate:a.schema.validate.bind(a.schema),defaultConfig:a.default}};P.setService=h,h({name:"auth",schema:m.authConfigSchema,default:{}});const t=a=>{if(!a)throw new Error("service name should not be empty");const x=u[a];if(!x)throw new Error(`service ${a} does not exist`);return x},r=(a,x,{validate:w}={})=>{const g=t(a),c=(0,p.default)(x||{}),{value:E,error:S}=g.validate(c);if(w&&S)throw new Error(`Invalid blocklet service config: ${S.details.map(C=>C.message).join(", ")}`);return E};P.getServiceConfig=r;const i=a=>{const{defaultConfig:x}=t(a);return x};P.getDefaultServiceConfig=i;const n=(a,x)=>{const w=[x];return(a||[]).find(g=>w.includes(g.name))};return P.findService=n,P.default={getServiceConfig:r,getDefaultServiceConfig:i,findService:n,setService:h},P}var pt;function be(){if(pt)return N;pt=1,Object.defineProperty(N,"__esModule",{value:!0}),N.fixAndValidateService=N.validateMeta=void 0;const o=gt(),p=xe(),m=h=>(!h.interfaces||!h.interfaces.length||h.interfaces.forEach(t=>{t.services&&t.services.length&&t.services.forEach(r=>{r.config=(0,p.getServiceConfig)(r.name,r.config,{validate:!0})})}),h);N.fixAndValidateService=m;const u=(h,{ensureFiles:t=!1,ensureDist:r=!1,ensureComponentStore:i=!0,ensureName:n=!1,skipValidateDidName:a=!1,schemaOptions:x={}}={})=>{const w=(0,o.createBlockletSchema)(null,{ensureFiles:t,ensureDist:r,ensureComponentStore:i,ensureName:n,skipValidateDidName:a,...x}),{value:g,error:c}=w.validate(h);if(c)throw new Error(`Invalid blocklet meta: ${c.details.map(E=>E.message).join(", ")}`);return g};return N.validateMeta=u,N.default=u,N}var mt;function je(){return mt||(mt=1,function(o){var p=T&&T.__createBinding||(Object.create?function(e,l,f,y){y===void 0&&(y=f);var b=Object.getOwnPropertyDescriptor(l,f);(!b||("get"in b?!l.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return l[f]}}),Object.defineProperty(e,y,b)}:function(e,l,f,y){y===void 0&&(y=f),e[y]=l[f]}),m=T&&T.__setModuleDefault||(Object.create?function(e,l){Object.defineProperty(e,"default",{enumerable:!0,value:l})}:function(e,l){e.default=l}),u=T&&T.__importStar||function(){var e=function(l){return e=Object.getOwnPropertyNames||function(f){var y=[];for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&(y[y.length]=b);return y},e(l)};return function(l){if(l&&l.__esModule)return l;var f={};if(l!=null)for(var y=e(l),b=0;b<y.length;b++)y[b]!=="default"&&p(f,l,y[b]);return m(f,l),f}}(),h=T&&T.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.fixService=o.fixInterfaces=o.parsePerson=o.formatPerson=o.fixName=o.fixTags=o.fixPerson=o.fixKeywords=o.fixFiles=o.fixRepository=o.fixRequired=void 0;const t=h(Pt),r=u(ye()),i=Lt(),n=be();Object.defineProperty(o,"fixService",{enumerable:!0,get:function(){return n.fixAndValidateService}});const a=ne(),x=(e,l)=>{e.description||(e.description=`Blocklet from ${l}`),e.version||(e.version=i.BLOCKLET_DEFAULT_VERSION)};o.fixRequired=x;const w=e=>{if(e.repository&&(typeof e.repository=="string"&&(e.repository={type:"git",url:e.repository}),e.repository.url)){const l=r.fromUrl(e.repository.url);l&&(e.repository.url=l.getDefaultRepresentation()==="shortcut"?l.https():l.toString())}};o.fixRepository=w;const g=e=>{Array.isArray(e.files)?e.files&&(e.files=e.files.filter(l=>!(!l||typeof l!="string"))):delete e.files};o.fixFiles=g;const c=e=>{typeof e.keywords=="string"&&(e.keywords=e.keywords.split(/,\s+/)),e.keywords&&!Array.isArray(e.keywords)?delete e.keywords:e.keywords&&(e.keywords=e.keywords.filter(l=>!(typeof l!="string"||!l)))};o.fixKeywords=c;const E=e=>{typeof e.tags=="string"&&(e.tags=e.tags.split(/,\s+/)),e.tags&&!Array.isArray(e.tags)?delete e.tags:e.tags&&(e.tags=e.tags.filter(l=>!(typeof l!="string"||!l)))};o.fixTags=E;const S=(e,l)=>(e.author&&(e.author=l(e.author)),["maintainers","contributors"].forEach(f=>{Array.isArray(e[f])&&(e[f]=e[f].map(l))}),e),C=e=>{if(!e)return"";if(typeof e=="string")return e;const l=e.name||"",f=e.url||e.web,y=f?` (${f})`:"",b=e.email||e.mail,_=b?` <${b}>`:"";return l+_+y};o.formatPerson=C;const R=e=>{if(typeof e!="string")return e;const l=e.match(/^([^(<]+)/),f=e.match(/\(([^)]+)\)/),y=e.match(/<([^>]+)>/),b={};return l&&l[0].trim()&&(b.name=l[0].trim()),y&&([,b.email]=y),f&&([,b.url]=f),b};o.parsePerson=R;const U=e=>(S(e,C),S(e,R),e);o.fixPerson=U;const v=(e,l=!0)=>{if(Array.isArray(e.interfaces)||(e.interfaces=[]),e.interfaces.length)return e.interfaces.forEach(_=>{_.type===i.BLOCKLET_INTERFACE_TYPE_WEB&&(_.protocol="http")}),e;const y=(0,t.default)(e,"capabilities.dynamicPathPrefix",!0)?i.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",b=({type:_="web",name:A,path:W="/",protocol:G="http",port:$=i.BLOCKLET_DEFAULT_PORT_NAME})=>{e.interfaces.push({type:_,name:A,path:W,prefix:y,port:$,protocol:G})};return[i.BLOCKLET_INTERFACE_PUBLIC].forEach(_=>{e[_]&&b({name:_,path:e[_]})}),Array.isArray(e.exposeServices)&&e.exposeServices.forEach(_=>{b({type:"service",name:_.protocol,protocol:_.protocol,port:{internal:`BLOCKLET_${_.protocol}_PORT`.toUpperCase(),external:_.port}})}),l&&(delete e.publicUrl,delete e.adminUrl,delete e.configUrl,delete e.docUrl,delete e.exposeServices,e.capabilities&&delete e.capabilities.dynamicPathPrefix),e};o.fixInterfaces=v;const s=e=>{const{did:l}=e;try{(0,a.validateNewDid)(l),e.name=l}catch{}return e};o.fixName=s,o.default={fixRequired:x,fixRepository:w,fixFiles:g,fixKeywords:c,fixPerson:U,fixTags:E,fixName:s,formatPerson:C,parsePerson:R,fixInterfaces:v,fixService:n.fixAndValidateService}}(T)),T}var Se=je();function xt({owner:o,locale:p}){return j.jsxs(dt,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.fullName,o.did?j.jsx(Tt,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:o.did,compact:!0,size:14,locale:p}):null]})}xt.propTypes={owner:L.object.isRequired,locale:L.string.isRequired};const Ee="install-blocklet-from-URL",bt=()=>{const[o,p]=vt(Ee,"[]",{raw:!0}),m=h=>{const t=h.trim(),r=JSON.parse(o),i=r.findIndex(n=>n===t);i!==0&&(i>0&&r.splice(i,1),r.length>=10&&r.splice(9),r.unshift(t),p(JSON.stringify(r)))},u=h=>{if(!h)return;const t=JSON.parse(o),r=h.trim(),i=t.findIndex(n=>n===r);i>-1&&(t.splice(i,1),p(JSON.stringify(t)))};return{urls:o?JSON.parse(o):[],addUrlRecord:m,removeUrlRecord:u}};function jt({value:o="",onValueChange:p=()=>{},children:m=null,helperText:u=""}){const{urls:h,removeUrlRecord:t}=bt(),r=(i,n)=>{i.preventDefault(),i.stopPropagation(),t(n)};return j.jsxs(dt,{children:[j.jsx(le,{freeSolo:!0,options:h,inputValue:o,onInputChange:(i,n)=>{p(n)},disableClearable:!0,popupIcon:null,renderInput:i=>Dt.cloneElement(m,{...i}),renderOption:(i,n)=>I.createElement(Nt,{...i,key:n,secondaryAction:j.jsx(qt,{edge:"end","aria-label":"delete",onClick:a=>r(a,n),children:j.jsx(ae,{})})},j.jsx(ce,{role:void 0,dense:!0,sx:{paddingLeft:0,paddingRight:30,"&:hover":{backgroundColor:"transparent"}},children:j.jsx(Mt,{primary:n,sx:{"& span":{display:"block",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})})),slotProps:{listbox:{sx:{maxHeight:300,overflow:"auto"}}}}),j.jsx(Wt,{style:{margin:0},children:u})]})}jt.propTypes={onValueChange:L.func,children:L.node,value:L.string,helperText:L.string};function _e({defaultUrl:o="",onCancel:p,onSuccess:m,onError:u=()=>{},mode:h="install",handleText:t={}}){const{api:r}=Bt(),{api:i,session:n}=$t(),[a,x]=I.useState(!1),[w,g]=I.useState(""),{t:c,locale:E}=Ft(),S={dist:{}},{encryptKey:C}=Gt(),[R,U]=I.useState(o),[v,s]=I.useState(o?1:0),[e,l]=I.useState(S),[f,y]=I.useState(!1),[b,_]=I.useState(""),[A]=vt("instant-blocklet-install",!1),[W,G]=I.useState({}),$=h==="component",H=$?!0:!o,{addUrlRecord:St}=bt(),B=I.useMemo(()=>(n.user?.connectedAccounts||[]).some(D=>D.provider===Ht.LOGIN_PROVIDER.WALLET),[n.user]),Q=I.useMemo(()=>{let d=R.trim();return!d.startsWith("https://")&&!d.startsWith("http://")&&!d.startsWith("file://")&&(d=`file://${d}`),d},[R]),K=async()=>{l(S),g(null),x(!0);const d=Q;try{const O=decodeURIComponent(d);try{new URL(O)}catch{throw new Error("Invalid URL")}const{meta:D,inStore:It,registryUrl:Ut}=await r.getBlockletMetaFromUrl({input:{url:O}});l(D),G({inStore:It,registryUrl:Ut,inputUrl:d}),St(d)}catch(O){console.error(O);const D=`Blocklet Install failed: ${rt(O)}`;g(D),u(O)}finally{x(!1)}},Et=()=>{if($){m({meta:e,...W}),p();return}if(A){x(!0),y(!0);return}const d=et(window?.env?.apiPrefix??"/","/launch-blocklet/install");window.location.href=re(d,{blocklet_meta_url:decodeURIComponent(Q.trim()),from:"url"})},Z=()=>{x(!1),y(!1),m({meta:e,...W}),p()},_t=()=>{x(!1),y(!1)};I.useEffect(()=>{o&&K()},[o]);const M=I.useMemo(()=>({title:e.title,wt:Kt(e),blockletMetaUrl:decodeURIComponent(R.trim())}),[e,R]),k=I.useCallback(async()=>{if(B||A){_("");return}const d=new URL(window.location.href);d.pathname=et(window?.env?.apiPrefix??"/","/api/did/launch-free-blocklet-by-session/token"),d.searchParams.set("_ek_",C),Object.keys(M).forEach(D=>{d.searchParams.set(D,M[D])});const{data:O}=await i.get(d.href);O.url?_(O.url):_("")},[B,M,i,C,A]);I.useEffect(()=>{k()},[k]);const Ct=I.useMemo(()=>B&&b?{...M,nw:b,skipMigrateAccount:!0}:M,[M,b,B]),wt=[{name:c("common.name"),value:Vt.getDisplayName({meta:e},!0)},{name:c("common.version"),value:e.version},{name:c("common.did"),value:e.did?j.jsx(zt,{did:e.did}):null},{name:c("common.author"),value:e.owner?j.jsx(xt,{owner:e.owner,locale:E}):Se.formatPerson(e.author)},{name:c("blocklet.dist.downloadLink"),value:e.dist.tarball}],Rt=()=>a?j.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:j.jsx(nt,{})}):e.did?j.jsx("div",{style:{paddingLeft:"10%"},children:wt.map(d=>d.name===c("common.did")?j.jsx(st,{valueComponent:"div",nameWidth:120,name:d.name,nameFormatter:()=>c("common.did"),children:d.value},d.name):j.jsx(st,{valueComponent:"div",nameWidth:120,name:d.name,children:d.value},d.name))}):null,At=Jt(async()=>{let d=e.title;n.user&&(d=`${n.user.fullName}'s ${e.title}`);try{Z(),await r.launchBlockletWithoutWallet({input:{title:d,blockletMetaUrl:decodeURIComponent(R.trim()),type:"store",storeUrl:W.registryUrl,onlyRequired:!0}})}catch(O){console.error("launchBlockletWithoutWallet error:",O),Yt.error(rt(O),{autoHideDuration:3e3})}}),tt=[{label:c("blocklet.fromUrl.step0"),body:j.jsx(Xt,{component:"div",children:j.jsx(jt,{style:{marginBottom:32},value:R,helperText:c("blocklet.fromUrl.description"),onValueChange:d=>{g(null),U(d)},children:j.jsx(Qt,{label:c("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,margin:"dense",value:R,onChange:d=>{g(null),U(d.target.value)},disabled:a,onKeyPress:d=>{d.key==="Enter"&&(d.preventDefault(),K(),s(1))}})})}),cancel:c("common.cancel"),confirm:c("common.next"),onCancel:p,onConfirm:()=>{K(),s(1)}},{label:c("blocklet.fromUrl.step1"),body:Rt(),cancel:c(H?"common.pre":"common.cancel"),confirm:t?.confirm||c("blocklet.fromUrl.confirm"),onCancel:()=>{H?s(d=>d-1):p()},onConfirm:()=>{Et()}}],q=tt[v];return j.jsxs(j.Fragment,{children:[j.jsxs(Zt,{title:t?.title||c("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>q.onCancel(),showCloseButton:v===0,disableEscapeKeyDown:!0,open:!0,actions:j.jsxs(j.Fragment,{children:[q.cancel&&j.jsx(it,{onClick:d=>{d.stopPropagation(),g(null),q.onCancel()},color:"inherit",children:q.cancel||c("common.cancel")}),j.jsxs(it,{onClick:d=>{d.stopPropagation(),q.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:a||!R||w,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[a&&v===0&&j.jsx(nt,{size:16}),q.confirm]})]}),children:[H&&j.jsx(ue,{alternativeLabel:!0,activeStep:v,children:tt.map(({label:d})=>j.jsx(he,{children:j.jsx(fe,{children:d})},d))}),j.jsx(kt,{component:"div",style:{marginTop:24},children:q.body}),!!w&&j.jsx(te,{severity:"error",style:{width:"100%",marginTop:8},children:w})]}),e&&f&&j.jsx(ee,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:!B&&!A?"bind-wallet":"launch-free-blocklet-by-session",checkFn:i.get,checkTimeout:5*60*1e3,onSuccess:Z,extraParams:Ct,messages:{title:c("setup.keyPair.title"),scan:c("setup.keyPair.scan"),confirm:c("setup.keyPair.confirm"),success:c("setup.keyPair.success")},onClose:_t,customItems:A?[]:[j.jsx(se,{onClick:At})]})]})}_e.propTypes={defaultUrl:L.string,onCancel:L.func.isRequired,onSuccess:L.func.isRequired,onError:L.func,mode:L.oneOf(["install","component"]),handleText:L.object};export{pe as B,_e as I,xt as a,Se as f};
|
|
1
|
+
import{j,o as L,dB as Ot,dC as Pt,dD as Lt,K as dt,dE as Tt,r as I,be as Dt,a7 as Nt,a3 as qt,a8 as Mt,bi as Wt,bn as Bt,n as $t,V as Ft,cJ as Gt,b as Ht,by as Kt,y as et,i as Vt,W as zt,cs as Jt,H as Yt,X as rt,T as Xt,t as Qt,$ as Zt,D as kt,U as te,v as it,C as nt,w as ee,z as re}from"./index-DbK31dFt.js";import{W as ie}from"./status-D8QofLif.js";import{r as gt,a as ne,W as se}from"./without-wallet-BCJJXxIm.js";import{r as oe}from"./cloneDeep-DtvXQkbq.js";import{u as vt}from"./useLocalStorage-BMre6evC.js";import{v as st}from"./index-CE07KwkJ.js";import{D as ae}from"./url-evaluation-CqBTA_SW.js";import{A as le}from"./Autocomplete-CdGK2sfo.js";import{L as ce}from"./ListItemButton-BdFzmSa7.js";import{S as ue,a as he,b as fe}from"./Stepper-C9zuG0lI.js";function pe({mode:o,...p}){return o==="development"?j.jsx(ie,{type:"primary",...p,children:"DEV"}):null}pe.propTypes={mode:L.string.isRequired};var T={},F={exports:{}},V={exports:{}},ot;function yt(){if(ot)return V.exports;ot=1;var o=V.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(u){return"file-"+m(u)}}},p={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:m};Object.keys(o).forEach(function(u){Object.keys(p).forEach(function(h){o[u][h]||(o[u][h]=p[h])}),o[u].protocols_re=RegExp("^("+o[u].protocols.map(function(h){return h.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function m(u){return u.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}return V.exports}var z,at;function me(){if(at)return z;at=1;var o=yt(),p=Object.assign||function(h,t){if(t===null||typeof t!="object")return h;const r=Object.keys(t);let i=r.length;for(;i--;)h[r[i]]=t[r[i]];return h};z=m;function m(u,h,t,r,i,n,a){var x=this;x.type=u,Object.keys(o[u]).forEach(function(w){x[w]=o[u][w]}),x.user=h,x.auth=t,x.project=r,x.committish=i,x.default=n,x.opts=a||{}}return m.prototype.hash=function(){return this.committish?"#"+this.committish:""},m.prototype._fill=function(u,h){if(u){var t=p({},h);t.path=t.path?t.path.replace(/^[/]+/g,""):"",h=p(p({},this.opts),h);var r=this;Object.keys(this).forEach(function(c){r[c]!=null&&t[c]==null&&(t[c]=r[c])});var i=t.auth,n=t.committish,a=t.fragment,x=t.path,w=t.project;Object.keys(t).forEach(function(c){var E=t[c];(c==="path"||c==="project")&&typeof E=="string"?t[c]=E.split("/").map(function(S){return encodeURIComponent(S)}).join("/"):c!=="domain"&&(t[c]=encodeURIComponent(E))}),t["auth@"]=i?i+"@":"",t["#fragment"]=a?"#"+this.hashformat(a):"",t.fragment=t.fragment?t.fragment:"",t["#path"]=x?"#"+this.hashformat(x):"",t["/path"]=t.path?"/"+t.path:"",t.projectPath=w.split("/").map(encodeURIComponent).join("/"),h.noCommittish?(t["#committish"]="",t["/tree/committish"]="",t["/committish"]="",t.committish=""):(t["#committish"]=n?"#"+n:"",t["/tree/committish"]=t.committish?"/"+t.treepath+"/"+t.committish:"",t["/committish"]=t.committish?"/"+t.committish:"",t.committish=t.committish||"master");var g=u;return Object.keys(t).forEach(function(c){g=g.replace(new RegExp("[{]"+c+"[}]","g"),t[c])}),h.noGitPlus?g.replace(/^git[+]/,""):g}},m.prototype.ssh=function(u){return this._fill(this.sshtemplate,u)},m.prototype.sshurl=function(u){return this._fill(this.sshurltemplate,u)},m.prototype.browse=function(u,h,t){return typeof u=="string"?(typeof h!="string"&&(t=h,h=null),this._fill(this.browsefiletemplate,p({fragment:h,path:u},t))):this._fill(this.browsetemplate,u)},m.prototype.docs=function(u){return this._fill(this.docstemplate,u)},m.prototype.bugs=function(u){return this._fill(this.bugstemplate,u)},m.prototype.https=function(u){return this._fill(this.httpstemplate,u)},m.prototype.git=function(u){return this._fill(this.gittemplate,u)},m.prototype.shortcut=function(u){return this._fill(this.shortcuttemplate,u)},m.prototype.path=function(u){return this._fill(this.pathtemplate,u)},m.prototype.tarball=function(u){var h=p({},u,{noCommittish:!1});return this._fill(this.tarballtemplate,h)},m.prototype.file=function(u,h){return this._fill(this.filetemplate,p({path:u},h))},m.prototype.getDefaultRepresentation=function(){return this.default},m.prototype.toString=function(u){return this.default&&typeof this[this.default]=="function"?this[this.default](u):this.sshurl(u)},z}var J,lt;function de(){return lt||(lt=1,J=function(o){o.prototype[Symbol.iterator]=function*(){for(let p=this.head;p;p=p.next)yield p.value}}),J}var Y,ct;function ge(){if(ct)return Y;ct=1,Y=o,o.Node=h,o.create=o;function o(t){var r=this;if(r instanceof o||(r=new o),r.tail=null,r.head=null,r.length=0,t&&typeof t.forEach=="function")t.forEach(function(a){r.push(a)});else if(arguments.length>0)for(var i=0,n=arguments.length;i<n;i++)r.push(arguments[i]);return r}o.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var r=t.next,i=t.prev;return r&&(r.prev=i),i&&(i.next=r),t===this.head&&(this.head=r),t===this.tail&&(this.tail=i),t.list.length--,t.next=null,t.prev=null,t.list=null,r},o.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var r=this.head;t.list=this,t.next=r,r&&(r.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}},o.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var r=this.tail;t.list=this,t.prev=r,r&&(r.next=t),this.tail=t,this.head||(this.head=t),this.length++}},o.prototype.push=function(){for(var t=0,r=arguments.length;t<r;t++)m(this,arguments[t]);return this.length},o.prototype.unshift=function(){for(var t=0,r=arguments.length;t<r;t++)u(this,arguments[t]);return this.length},o.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}},o.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}},o.prototype.forEach=function(t,r){r=r||this;for(var i=this.head,n=0;i!==null;n++)t.call(r,i.value,n,this),i=i.next},o.prototype.forEachReverse=function(t,r){r=r||this;for(var i=this.tail,n=this.length-1;i!==null;n--)t.call(r,i.value,n,this),i=i.prev},o.prototype.get=function(t){for(var r=0,i=this.head;i!==null&&r<t;r++)i=i.next;if(r===t&&i!==null)return i.value},o.prototype.getReverse=function(t){for(var r=0,i=this.tail;i!==null&&r<t;r++)i=i.prev;if(r===t&&i!==null)return i.value},o.prototype.map=function(t,r){r=r||this;for(var i=new o,n=this.head;n!==null;)i.push(t.call(r,n.value,this)),n=n.next;return i},o.prototype.mapReverse=function(t,r){r=r||this;for(var i=new o,n=this.tail;n!==null;)i.push(t.call(r,n.value,this)),n=n.prev;return i},o.prototype.reduce=function(t,r){var i,n=this.head;if(arguments.length>1)i=r;else if(this.head)n=this.head.next,i=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=0;n!==null;a++)i=t(i,n.value,a),n=n.next;return i},o.prototype.reduceReverse=function(t,r){var i,n=this.tail;if(arguments.length>1)i=r;else if(this.tail)n=this.tail.prev,i=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=this.length-1;n!==null;a--)i=t(i,n.value,a),n=n.prev;return i},o.prototype.toArray=function(){for(var t=new Array(this.length),r=0,i=this.head;i!==null;r++)t[r]=i.value,i=i.next;return t},o.prototype.toArrayReverse=function(){for(var t=new Array(this.length),r=0,i=this.tail;i!==null;r++)t[r]=i.value,i=i.prev;return t},o.prototype.slice=function(t,r){r=r||this.length,r<0&&(r+=this.length),t=t||0,t<0&&(t+=this.length);var i=new o;if(r<t||r<0)return i;t<0&&(t=0),r>this.length&&(r=this.length);for(var n=0,a=this.head;a!==null&&n<t;n++)a=a.next;for(;a!==null&&n<r;n++,a=a.next)i.push(a.value);return i},o.prototype.sliceReverse=function(t,r){r=r||this.length,r<0&&(r+=this.length),t=t||0,t<0&&(t+=this.length);var i=new o;if(r<t||r<0)return i;t<0&&(t=0),r>this.length&&(r=this.length);for(var n=this.length,a=this.tail;a!==null&&n>r;n--)a=a.prev;for(;a!==null&&n>t;n--,a=a.prev)i.push(a.value);return i},o.prototype.splice=function(t,r,...i){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,a=this.head;a!==null&&n<t;n++)a=a.next;for(var x=[],n=0;a&&n<r;n++)x.push(a.value),a=this.removeNode(a);a===null&&(a=this.tail),a!==this.head&&a!==this.tail&&(a=a.prev);for(var n=0;n<i.length;n++)a=p(this,a,i[n]);return x},o.prototype.reverse=function(){for(var t=this.head,r=this.tail,i=t;i!==null;i=i.prev){var n=i.prev;i.prev=i.next,i.next=n}return this.head=r,this.tail=t,this};function p(t,r,i){var n=r===t.head?new h(i,null,r,t):new h(i,r,r.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function m(t,r){t.tail=new h(r,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function u(t,r){t.head=new h(r,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function h(t,r,i,n){if(!(this instanceof h))return new h(t,r,i,n);this.list=n,this.value=t,r?(r.next=this,this.prev=r):this.prev=null,i?(i.prev=this,this.next=i):this.next=null}try{de()(o)}catch{}return Y}var X,ut;function ve(){if(ut)return X;ut=1;const o=ge(),p=Symbol("max"),m=Symbol("length"),u=Symbol("lengthCalculator"),h=Symbol("allowStale"),t=Symbol("maxAge"),r=Symbol("dispose"),i=Symbol("noDisposeOnSet"),n=Symbol("lruList"),a=Symbol("cache"),x=Symbol("updateAgeOnGet"),w=()=>1;class g{constructor(s){if(typeof s=="number"&&(s={max:s}),s||(s={}),s.max&&(typeof s.max!="number"||s.max<0))throw new TypeError("max must be a non-negative number");this[p]=s.max||1/0;const e=s.length||w;if(this[u]=typeof e!="function"?w:e,this[h]=s.stale||!1,s.maxAge&&typeof s.maxAge!="number")throw new TypeError("maxAge must be a number");this[t]=s.maxAge||0,this[r]=s.dispose,this[i]=s.noDisposeOnSet||!1,this[x]=s.updateAgeOnGet||!1,this.reset()}set max(s){if(typeof s!="number"||s<0)throw new TypeError("max must be a non-negative number");this[p]=s||1/0,S(this)}get max(){return this[p]}set allowStale(s){this[h]=!!s}get allowStale(){return this[h]}set maxAge(s){if(typeof s!="number")throw new TypeError("maxAge must be a non-negative number");this[t]=s,S(this)}get maxAge(){return this[t]}set lengthCalculator(s){typeof s!="function"&&(s=w),s!==this[u]&&(this[u]=s,this[m]=0,this[n].forEach(e=>{e.length=this[u](e.value,e.key),this[m]+=e.length})),S(this)}get lengthCalculator(){return this[u]}get length(){return this[m]}get itemCount(){return this[n].length}rforEach(s,e){e=e||this;for(let l=this[n].tail;l!==null;){const f=l.prev;U(this,s,l,e),l=f}}forEach(s,e){e=e||this;for(let l=this[n].head;l!==null;){const f=l.next;U(this,s,l,e),l=f}}keys(){return this[n].toArray().map(s=>s.key)}values(){return this[n].toArray().map(s=>s.value)}reset(){this[r]&&this[n]&&this[n].length&&this[n].forEach(s=>this[r](s.key,s.value)),this[a]=new Map,this[n]=new o,this[m]=0}dump(){return this[n].map(s=>E(this,s)?!1:{k:s.key,v:s.value,e:s.now+(s.maxAge||0)}).toArray().filter(s=>s)}dumpLru(){return this[n]}set(s,e,l){if(l=l||this[t],l&&typeof l!="number")throw new TypeError("maxAge must be a number");const f=l?Date.now():0,y=this[u](e,s);if(this[a].has(s)){if(y>this[p])return C(this,this[a].get(s)),!1;const A=this[a].get(s).value;return this[r]&&(this[i]||this[r](s,A.value)),A.now=f,A.maxAge=l,A.value=e,this[m]+=y-A.length,A.length=y,this.get(s),S(this),!0}const b=new R(s,e,y,f,l);return b.length>this[p]?(this[r]&&this[r](s,e),!1):(this[m]+=b.length,this[n].unshift(b),this[a].set(s,this[n].head),S(this),!0)}has(s){if(!this[a].has(s))return!1;const e=this[a].get(s).value;return!E(this,e)}get(s){return c(this,s,!0)}peek(s){return c(this,s,!1)}pop(){const s=this[n].tail;return s?(C(this,s),s.value):null}del(s){C(this,this[a].get(s))}load(s){this.reset();const e=Date.now();for(let l=s.length-1;l>=0;l--){const f=s[l],y=f.e||0;if(y===0)this.set(f.k,f.v);else{const b=y-e;b>0&&this.set(f.k,f.v,b)}}}prune(){this[a].forEach((s,e)=>c(this,e,!1))}}const c=(v,s,e)=>{const l=v[a].get(s);if(l){const f=l.value;if(E(v,f)){if(C(v,l),!v[h])return}else e&&(v[x]&&(l.value.now=Date.now()),v[n].unshiftNode(l));return f.value}},E=(v,s)=>{if(!s||!s.maxAge&&!v[t])return!1;const e=Date.now()-s.now;return s.maxAge?e>s.maxAge:v[t]&&e>v[t]},S=v=>{if(v[m]>v[p])for(let s=v[n].tail;v[m]>v[p]&&s!==null;){const e=s.prev;C(v,s),s=e}},C=(v,s)=>{if(s){const e=s.value;v[r]&&v[r](e.key,e.value),v[m]-=e.length,v[a].delete(e.key),v[n].removeNode(s)}};class R{constructor(s,e,l,f,y){this.key=s,this.value=e,this.length=l,this.now=f,this.maxAge=y||0}}const U=(v,s,e,l)=>{let f=e.value;E(v,f)&&(C(v,e),v[h]||(f=void 0)),f&&s.call(l,f.value,f.key,v)};return X=g,X}var ht;function ye(){if(ht)return F.exports;ht=1;var o=Ot,p=yt(),m=F.exports=me(),u=ve(),h=new u({max:1e3}),t={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function r(g){return t[g]||g.slice(0,-1)}var i={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};F.exports.fromUrl=function(g,c){if(typeof g=="string"){var E=g+JSON.stringify(c||{});return h.has(E)||h.set(E,n(g,c)),h.get(E)}};function n(g,c){if(!(g==null||g==="")){var E=x(a(g)?"github:"+g:g),S=w(E),C=E.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),R=Object.keys(p).map(function(U){try{var v=p[U],s=null;S.auth&&i[S.protocol]&&(s=S.auth);var e=S.hash?decodeURIComponent(S.hash.substr(1)):null,l=null,f=null,y=null;if(C&&C[1]===U)l=C[2]&&decodeURIComponent(C[2]),f=decodeURIComponent(C[3].replace(/\.git$/,"")),y="shortcut";else{if(S.host&&S.host!==v.domain&&S.host.replace(/^www[.]/,"")!==v.domain||!v.protocols_re.test(S.protocol)||!S.path)return;var b=v.pathmatch,_=S.path.match(b);if(!_)return;_[1]!==null&&_[1]!==void 0&&(l=decodeURIComponent(_[1].replace(/^:/,""))),f=decodeURIComponent(_[2]),y=r(S.protocol)}return new m(U,l,s,f,e,y,c)}catch(A){if(!(A instanceof URIError))throw A}}).filter(function(U){return U});if(R.length===1)return R[0]}}function a(g){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(g)}function x(g){var c=o.parse(g);return c.protocol==="gist:"&&c.host&&!c.path?c.protocol+"/"+c.host:g}function w(g){var c=g.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!c){var E=o.parse(g);if(E.auth){const C=g.match(/[^@]+@[^:/]+/);if(C){var S=new o.URL(C[0]);E.auth=S.username||"",S.password&&(E.auth+=":"+S.password)}}return E}return{protocol:"git+ssh:",slashes:!0,auth:c[1],host:c[2],port:null,hostname:c[2],hash:c[4],search:null,query:null,pathname:"/"+c[3],path:"/"+c[3],href:"git+ssh://"+c[1]+"@"+c[2]+"/"+c[3]+(c[4]||"")}}return F.exports}var N={},P={},ft;function xe(){if(ft)return P;ft=1;var o=P&&P.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(P,"__esModule",{value:!0}),P.setService=P.findService=P.getDefaultServiceConfig=P.getServiceConfig=void 0;const p=o(oe),m=gt(),u={},h=a=>{u[a.name]={validate:a.schema.validate.bind(a.schema),defaultConfig:a.default}};P.setService=h,h({name:"auth",schema:m.authConfigSchema,default:{}});const t=a=>{if(!a)throw new Error("service name should not be empty");const x=u[a];if(!x)throw new Error(`service ${a} does not exist`);return x},r=(a,x,{validate:w}={})=>{const g=t(a),c=(0,p.default)(x||{}),{value:E,error:S}=g.validate(c);if(w&&S)throw new Error(`Invalid blocklet service config: ${S.details.map(C=>C.message).join(", ")}`);return E};P.getServiceConfig=r;const i=a=>{const{defaultConfig:x}=t(a);return x};P.getDefaultServiceConfig=i;const n=(a,x)=>{const w=[x];return(a||[]).find(g=>w.includes(g.name))};return P.findService=n,P.default={getServiceConfig:r,getDefaultServiceConfig:i,findService:n,setService:h},P}var pt;function be(){if(pt)return N;pt=1,Object.defineProperty(N,"__esModule",{value:!0}),N.fixAndValidateService=N.validateMeta=void 0;const o=gt(),p=xe(),m=h=>(!h.interfaces||!h.interfaces.length||h.interfaces.forEach(t=>{t.services&&t.services.length&&t.services.forEach(r=>{r.config=(0,p.getServiceConfig)(r.name,r.config,{validate:!0})})}),h);N.fixAndValidateService=m;const u=(h,{ensureFiles:t=!1,ensureDist:r=!1,ensureComponentStore:i=!0,ensureName:n=!1,skipValidateDidName:a=!1,schemaOptions:x={}}={})=>{const w=(0,o.createBlockletSchema)(null,{ensureFiles:t,ensureDist:r,ensureComponentStore:i,ensureName:n,skipValidateDidName:a,...x}),{value:g,error:c}=w.validate(h);if(c)throw new Error(`Invalid blocklet meta: ${c.details.map(E=>E.message).join(", ")}`);return g};return N.validateMeta=u,N.default=u,N}var mt;function je(){return mt||(mt=1,function(o){var p=T&&T.__createBinding||(Object.create?function(e,l,f,y){y===void 0&&(y=f);var b=Object.getOwnPropertyDescriptor(l,f);(!b||("get"in b?!l.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return l[f]}}),Object.defineProperty(e,y,b)}:function(e,l,f,y){y===void 0&&(y=f),e[y]=l[f]}),m=T&&T.__setModuleDefault||(Object.create?function(e,l){Object.defineProperty(e,"default",{enumerable:!0,value:l})}:function(e,l){e.default=l}),u=T&&T.__importStar||function(){var e=function(l){return e=Object.getOwnPropertyNames||function(f){var y=[];for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&(y[y.length]=b);return y},e(l)};return function(l){if(l&&l.__esModule)return l;var f={};if(l!=null)for(var y=e(l),b=0;b<y.length;b++)y[b]!=="default"&&p(f,l,y[b]);return m(f,l),f}}(),h=T&&T.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(o,"__esModule",{value:!0}),o.fixService=o.fixInterfaces=o.parsePerson=o.formatPerson=o.fixName=o.fixTags=o.fixPerson=o.fixKeywords=o.fixFiles=o.fixRepository=o.fixRequired=void 0;const t=h(Pt),r=u(ye()),i=Lt(),n=be();Object.defineProperty(o,"fixService",{enumerable:!0,get:function(){return n.fixAndValidateService}});const a=ne(),x=(e,l)=>{e.description||(e.description=`Blocklet from ${l}`),e.version||(e.version=i.BLOCKLET_DEFAULT_VERSION)};o.fixRequired=x;const w=e=>{if(e.repository&&(typeof e.repository=="string"&&(e.repository={type:"git",url:e.repository}),e.repository.url)){const l=r.fromUrl(e.repository.url);l&&(e.repository.url=l.getDefaultRepresentation()==="shortcut"?l.https():l.toString())}};o.fixRepository=w;const g=e=>{Array.isArray(e.files)?e.files&&(e.files=e.files.filter(l=>!(!l||typeof l!="string"))):delete e.files};o.fixFiles=g;const c=e=>{typeof e.keywords=="string"&&(e.keywords=e.keywords.split(/,\s+/)),e.keywords&&!Array.isArray(e.keywords)?delete e.keywords:e.keywords&&(e.keywords=e.keywords.filter(l=>!(typeof l!="string"||!l)))};o.fixKeywords=c;const E=e=>{typeof e.tags=="string"&&(e.tags=e.tags.split(/,\s+/)),e.tags&&!Array.isArray(e.tags)?delete e.tags:e.tags&&(e.tags=e.tags.filter(l=>!(typeof l!="string"||!l)))};o.fixTags=E;const S=(e,l)=>(e.author&&(e.author=l(e.author)),["maintainers","contributors"].forEach(f=>{Array.isArray(e[f])&&(e[f]=e[f].map(l))}),e),C=e=>{if(!e)return"";if(typeof e=="string")return e;const l=e.name||"",f=e.url||e.web,y=f?` (${f})`:"",b=e.email||e.mail,_=b?` <${b}>`:"";return l+_+y};o.formatPerson=C;const R=e=>{if(typeof e!="string")return e;const l=e.match(/^([^(<]+)/),f=e.match(/\(([^)]+)\)/),y=e.match(/<([^>]+)>/),b={};return l&&l[0].trim()&&(b.name=l[0].trim()),y&&([,b.email]=y),f&&([,b.url]=f),b};o.parsePerson=R;const U=e=>(S(e,C),S(e,R),e);o.fixPerson=U;const v=(e,l=!0)=>{if(Array.isArray(e.interfaces)||(e.interfaces=[]),e.interfaces.length)return e.interfaces.forEach(_=>{_.type===i.BLOCKLET_INTERFACE_TYPE_WEB&&(_.protocol="http")}),e;const y=(0,t.default)(e,"capabilities.dynamicPathPrefix",!0)?i.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",b=({type:_="web",name:A,path:W="/",protocol:G="http",port:$=i.BLOCKLET_DEFAULT_PORT_NAME})=>{e.interfaces.push({type:_,name:A,path:W,prefix:y,port:$,protocol:G})};return[i.BLOCKLET_INTERFACE_PUBLIC].forEach(_=>{e[_]&&b({name:_,path:e[_]})}),Array.isArray(e.exposeServices)&&e.exposeServices.forEach(_=>{b({type:"service",name:_.protocol,protocol:_.protocol,port:{internal:`BLOCKLET_${_.protocol}_PORT`.toUpperCase(),external:_.port}})}),l&&(delete e.publicUrl,delete e.adminUrl,delete e.configUrl,delete e.docUrl,delete e.exposeServices,e.capabilities&&delete e.capabilities.dynamicPathPrefix),e};o.fixInterfaces=v;const s=e=>{const{did:l}=e;try{(0,a.validateNewDid)(l),e.name=l}catch{}return e};o.fixName=s,o.default={fixRequired:x,fixRepository:w,fixFiles:g,fixKeywords:c,fixPerson:U,fixTags:E,fixName:s,formatPerson:C,parsePerson:R,fixInterfaces:v,fixService:n.fixAndValidateService}}(T)),T}var Se=je();function xt({owner:o,locale:p}){return j.jsxs(dt,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.fullName,o.did?j.jsx(Tt,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:o.did,compact:!0,size:14,locale:p}):null]})}xt.propTypes={owner:L.object.isRequired,locale:L.string.isRequired};const Ee="install-blocklet-from-URL",bt=()=>{const[o,p]=vt(Ee,"[]",{raw:!0}),m=h=>{const t=h.trim(),r=JSON.parse(o),i=r.findIndex(n=>n===t);i!==0&&(i>0&&r.splice(i,1),r.length>=10&&r.splice(9),r.unshift(t),p(JSON.stringify(r)))},u=h=>{if(!h)return;const t=JSON.parse(o),r=h.trim(),i=t.findIndex(n=>n===r);i>-1&&(t.splice(i,1),p(JSON.stringify(t)))};return{urls:o?JSON.parse(o):[],addUrlRecord:m,removeUrlRecord:u}};function jt({value:o="",onValueChange:p=()=>{},children:m=null,helperText:u=""}){const{urls:h,removeUrlRecord:t}=bt(),r=(i,n)=>{i.preventDefault(),i.stopPropagation(),t(n)};return j.jsxs(dt,{children:[j.jsx(le,{freeSolo:!0,options:h,inputValue:o,onInputChange:(i,n)=>{p(n)},disableClearable:!0,popupIcon:null,renderInput:i=>Dt.cloneElement(m,{...i}),renderOption:(i,n)=>I.createElement(Nt,{...i,key:n,secondaryAction:j.jsx(qt,{edge:"end","aria-label":"delete",onClick:a=>r(a,n),children:j.jsx(ae,{})})},j.jsx(ce,{role:void 0,dense:!0,sx:{paddingLeft:0,paddingRight:30,"&:hover":{backgroundColor:"transparent"}},children:j.jsx(Mt,{primary:n,sx:{"& span":{display:"block",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})})),slotProps:{listbox:{sx:{maxHeight:300,overflow:"auto"}}}}),j.jsx(Wt,{style:{margin:0},children:u})]})}jt.propTypes={onValueChange:L.func,children:L.node,value:L.string,helperText:L.string};function _e({defaultUrl:o="",onCancel:p,onSuccess:m,onError:u=()=>{},mode:h="install",handleText:t={}}){const{api:r}=Bt(),{api:i,session:n}=$t(),[a,x]=I.useState(!1),[w,g]=I.useState(""),{t:c,locale:E}=Ft(),S={dist:{}},{encryptKey:C}=Gt(),[R,U]=I.useState(o),[v,s]=I.useState(o?1:0),[e,l]=I.useState(S),[f,y]=I.useState(!1),[b,_]=I.useState(""),[A]=vt("instant-blocklet-install",!1),[W,G]=I.useState({}),$=h==="component",H=$?!0:!o,{addUrlRecord:St}=bt(),B=I.useMemo(()=>(n.user?.connectedAccounts||[]).some(D=>D.provider===Ht.LOGIN_PROVIDER.WALLET),[n.user]),Q=I.useMemo(()=>{let d=R.trim();return!d.startsWith("https://")&&!d.startsWith("http://")&&!d.startsWith("file://")&&(d=`file://${d}`),d},[R]),K=async()=>{l(S),g(null),x(!0);const d=Q;try{const O=decodeURIComponent(d);try{new URL(O)}catch{throw new Error("Invalid URL")}const{meta:D,inStore:It,registryUrl:Ut}=await r.getBlockletMetaFromUrl({input:{url:O}});l(D),G({inStore:It,registryUrl:Ut,inputUrl:d}),St(d)}catch(O){console.error(O);const D=`Blocklet Install failed: ${rt(O)}`;g(D),u(O)}finally{x(!1)}},Et=()=>{if($){m({meta:e,...W}),p();return}if(A){x(!0),y(!0);return}const d=et(window?.env?.apiPrefix??"/","/launch-blocklet/install");window.location.href=re(d,{blocklet_meta_url:decodeURIComponent(Q.trim()),from:"url"})},Z=()=>{x(!1),y(!1),m({meta:e,...W}),p()},_t=()=>{x(!1),y(!1)};I.useEffect(()=>{o&&K()},[o]);const M=I.useMemo(()=>({title:e.title,wt:Kt(e),blockletMetaUrl:decodeURIComponent(R.trim())}),[e,R]),k=I.useCallback(async()=>{if(B||A){_("");return}const d=new URL(window.location.href);d.pathname=et(window?.env?.apiPrefix??"/","/api/did/launch-free-blocklet-by-session/token"),d.searchParams.set("_ek_",C),Object.keys(M).forEach(D=>{d.searchParams.set(D,M[D])});const{data:O}=await i.get(d.href);O.url?_(O.url):_("")},[B,M,i,C,A]);I.useEffect(()=>{k()},[k]);const Ct=I.useMemo(()=>B&&b?{...M,nw:b,skipMigrateAccount:!0}:M,[M,b,B]),wt=[{name:c("common.name"),value:Vt.getDisplayName({meta:e},!0)},{name:c("common.version"),value:e.version},{name:c("common.did"),value:e.did?j.jsx(zt,{did:e.did}):null},{name:c("common.author"),value:e.owner?j.jsx(xt,{owner:e.owner,locale:E}):Se.formatPerson(e.author)},{name:c("blocklet.dist.downloadLink"),value:e.dist.tarball}],Rt=()=>a?j.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:j.jsx(nt,{})}):e.did?j.jsx("div",{style:{paddingLeft:"10%"},children:wt.map(d=>d.name===c("common.did")?j.jsx(st,{valueComponent:"div",nameWidth:120,name:d.name,nameFormatter:()=>c("common.did"),children:d.value},d.name):j.jsx(st,{valueComponent:"div",nameWidth:120,name:d.name,children:d.value},d.name))}):null,At=Jt(async()=>{let d=e.title;n.user&&(d=`${n.user.fullName}'s ${e.title}`);try{Z(),await r.launchBlockletWithoutWallet({input:{title:d,blockletMetaUrl:decodeURIComponent(R.trim()),type:"store",storeUrl:W.registryUrl,onlyRequired:!0}})}catch(O){console.error("launchBlockletWithoutWallet error:",O),Yt.error(rt(O),{autoHideDuration:3e3})}}),tt=[{label:c("blocklet.fromUrl.step0"),body:j.jsx(Xt,{component:"div",children:j.jsx(jt,{style:{marginBottom:32},value:R,helperText:c("blocklet.fromUrl.description"),onValueChange:d=>{g(null),U(d)},children:j.jsx(Qt,{label:c("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,margin:"dense",value:R,onChange:d=>{g(null),U(d.target.value)},disabled:a,onKeyPress:d=>{d.key==="Enter"&&(d.preventDefault(),K(),s(1))}})})}),cancel:c("common.cancel"),confirm:c("common.next"),onCancel:p,onConfirm:()=>{K(),s(1)}},{label:c("blocklet.fromUrl.step1"),body:Rt(),cancel:c(H?"common.pre":"common.cancel"),confirm:t?.confirm||c("blocklet.fromUrl.confirm"),onCancel:()=>{H?s(d=>d-1):p()},onConfirm:()=>{Et()}}],q=tt[v];return j.jsxs(j.Fragment,{children:[j.jsxs(Zt,{title:t?.title||c("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>q.onCancel(),showCloseButton:v===0,disableEscapeKeyDown:!0,open:!0,actions:j.jsxs(j.Fragment,{children:[q.cancel&&j.jsx(it,{onClick:d=>{d.stopPropagation(),g(null),q.onCancel()},color:"inherit",children:q.cancel||c("common.cancel")}),j.jsxs(it,{onClick:d=>{d.stopPropagation(),q.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:a||!R||w,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[a&&v===0&&j.jsx(nt,{size:16}),q.confirm]})]}),children:[H&&j.jsx(ue,{alternativeLabel:!0,activeStep:v,children:tt.map(({label:d})=>j.jsx(he,{children:j.jsx(fe,{children:d})},d))}),j.jsx(kt,{component:"div",style:{marginTop:24},children:q.body}),!!w&&j.jsx(te,{severity:"error",style:{width:"100%",marginTop:8},children:w})]}),e&&f&&j.jsx(ee,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:!B&&!A?"bind-wallet":"launch-free-blocklet-by-session",checkFn:i.get,checkTimeout:5*60*1e3,onSuccess:Z,extraParams:Ct,messages:{title:c("setup.keyPair.title"),scan:c("setup.keyPair.scan"),confirm:c("setup.keyPair.confirm"),success:c("setup.keyPair.success")},onClose:_t,customItems:A?[]:[j.jsx(se,{onClick:At})]})]})}_e.propTypes={defaultUrl:L.string,onCancel:L.func.isRequired,onSuccess:L.func.isRequired,onError:L.func,mode:L.oneOf(["install","component"]),handleText:L.object};export{pe as B,_e as I,xt as a,Se as f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aF as $,j as i,r as u,p as H,bf as T,$ as M,s as v,o as s,v as E,K as y,cV as A,V as w,n as D,aP as q,cW as U,cz as F,cs as j,y as O,cX as V,aH as W,cY as Y,cZ as k,c_ as I,as as B,b7 as K,cr as X,C as J,b8 as Z}from"./index-
|
|
1
|
+
import{aF as $,j as i,r as u,p as H,bf as T,$ as M,s as v,o as s,v as E,K as y,cV as A,V as w,n as D,aP as q,cW as U,cz as F,cs as j,y as O,cX as V,aH as W,cY as Y,cZ as k,c_ as I,as as B,b7 as K,cr as X,C as J,b8 as Z}from"./index-DbK31dFt.js";import{p as G}from"./index-HVpfUEsS.js";import{N as Q}from"./index-DuXssMw-.js";import{b as ee}from"./sdk-BXxj54Wv.js";import{w as ie}from"./wrap-locale-CHnqR1BC.js";const se=$(i.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}));function P({invitation:e,createPassportSvg:n,passportColor:c="auto"}){const[p,r]=u.useState(!1),{t:l}=u.useContext(H),t=u.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),d=u.useMemo(()=>n({title:t,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||c,extra:e.passportExpireTime?{key:"Exp",value:T(e.passportExpireTime).format("YYYY-MM-DD HH:mm:ss")}:void 0}),[e,t]),m=u.useCallback(()=>{r(!0)},[]),o=u.useCallback(()=>{r(!1)},[]);return i.jsxs(i.Fragment,{children:[i.jsx(te,{children:i.jsxs("div",{className:"invite-passport__card",onClick:m,children:[!!e.display&&i.jsx(Q,{data:e.display,style:{width:"100%",height:"100%"}}),!e.display&&i.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:d}})]})}),i.jsx(M,{open:p,title:l("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:o,children:e.role.permissions&&e.role.permissions.length>0?i.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(x=>i.jsx("li",{style:{listStyle:"circle"},children:x.description},x.name))}):i.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[i.jsx(se,{style:{width:"30px",height:"30px"}}),i.jsx("div",{children:l("invite.emptyPermission")})]})})]})}P.propTypes={invitation:s.object.isRequired,createPassportSvg:s.func.isRequired,passportColor:s.string};const te=v.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
max-width: 350px;
|
|
4
4
|
margin: 30px auto;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fA as P,bd as s}from"./index-
|
|
1
|
+
import{fA as P,bd as s}from"./index-DbK31dFt.js";var r,e;function f(){if(e)return r;e=1;const a=P();return r=(i,t)=>a(i)===a(t),r}var u=f();const x=s(u);export{x as i};
|