@abtnode/webapp 1.16.54-beta-20251016-050817-2fc632b8 → 1.16.54-beta-20251021-070951-25e3083c
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-NScUj50m.js → AdapterDayjs-D4QCnIuj.js} +1 -1
- package/dist/assets/{Add-D4EYSG3K.js → Add-oTaGbrkV.js} +1 -1
- package/dist/assets/ArrowDropDown-CcrV0tiH.js +1 -0
- package/dist/assets/{Autocomplete-Dy_zZ4Oc.js → Autocomplete-BUuiK3c9.js} +1 -1
- package/dist/assets/{Breadcrumbs-C8gaKT3g.js → Breadcrumbs-U8R6lbeq.js} +1 -1
- package/dist/assets/{ButtonGroup-DcZ0ug1l.js → ButtonGroup-tq0Nh3v_.js} +1 -1
- package/dist/assets/{CSSTransition-V4R7ZcvS.js → CSSTransition-BQVtCcwc.js} +1 -1
- package/dist/assets/{CallMerge-KoAXFCaW.js → CallMerge-nc7JkPt-.js} +1 -1
- package/dist/assets/{CardContent-W_hyQjAD.js → CardContent-BkZ_t1Fl.js} +1 -1
- package/dist/assets/{ChevronLeft-CKiAYw9j.js → ChevronLeft-D3gv0InM.js} +1 -1
- package/dist/assets/{ChevronRight-DZiek3NZ.js → ChevronRight-C0CpxIjv.js} +1 -1
- package/dist/assets/{Clear---RPVeR7.js → Clear-DkN0yn0u.js} +1 -1
- package/dist/assets/{DeleteOutline-GpuLmtYQ.js → DeleteOutline-BeCthgDf.js} +1 -1
- package/dist/assets/{Done-DzMcAgjX.js → Done-BATa38FZ.js} +1 -1
- package/dist/assets/{Edit-DCJEwDTg.js → Edit-CzPcXUlF.js} +1 -1
- package/dist/assets/{ErrorOutline-B9LgxSpq.js → ErrorOutline-DtWu5p92.js} +1 -1
- package/dist/assets/{FilterList-CNYUVm5S.js → FilterList-B4eWQJqn.js} +1 -1
- package/dist/assets/{Google-DR320mb8.js → Google-CSkH7ggo.js} +1 -1
- package/dist/assets/{HelpOutline-USuznZgn.js → HelpOutline-Chl_xTWf.js} +1 -1
- package/dist/assets/{KeyboardArrowDown-rbx_AuZr.js → KeyboardArrowDown-B6FXB8s1.js} +1 -1
- package/dist/assets/{Launch-DkmyUeYd.js → Launch-C5rHIILC.js} +1 -1
- package/dist/assets/{Link-CgW5geY5.js → Link-BK8YXXF_.js} +1 -1
- package/dist/assets/{ListItemButton-BhvWhm3n.js → ListItemButton-BBMhGYtT.js} +1 -1
- package/dist/assets/{ListSubheader-BlgmemtO.js → ListSubheader-DHUtCPFm.js} +1 -1
- package/dist/assets/{LoadingButton-DpbZOfZH.js → LoadingButton-9eB2P6Ae.js} +1 -1
- package/dist/assets/{MoreVert-wWXtgLji.js → MoreVert-YtAOv_qU.js} +1 -1
- package/dist/assets/{OpenInNew-B8ApQgxt.js → OpenInNew-9fXNDjB1.js} +1 -1
- package/dist/assets/{Refresh-nk8BSp_h.js → Refresh-BhIn23eh.js} +1 -1
- package/dist/assets/{Search-DV5vJN1H.js → Search-B9XObekn.js} +1 -1
- package/dist/assets/{Stepper-Dm3PYaFi.js → Stepper-DJBQoATT.js} +1 -1
- package/dist/assets/{Switch-czLKbhPZ.js → Switch-Z9woRMgA.js} +1 -1
- package/dist/assets/{TableSearch-CAf-ESr9.js → TableSearch-CaXXTSiF.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-Csc72nBu.js → ToggleButtonGroup-C69G_-ml.js} +1 -1
- package/dist/assets/{UnfoldMore-BQzQy89p.js → UnfoldMore-B6RtVFPY.js} +1 -1
- package/dist/assets/{Verified-CF2yeqGT.js → Verified-CBlk3phN.js} +1 -1
- package/dist/assets/{VerifiedUser-C1tgCpCB.js → VerifiedUser-BNVR_4vC.js} +1 -1
- package/dist/assets/{ViewList-CE_c5qLh.js → ViewList-DluRK-ZS.js} +1 -1
- package/dist/assets/{_createAggregator-Bnob81wI.js → _createAggregator-fs1BCiws.js} +1 -1
- package/dist/assets/{actions-Cpb8n0Yw.js → actions-58eoeFLs.js} +1 -1
- package/dist/assets/{actions-DtMFbSMo.js → actions-h8RyMg_C.js} +1 -1
- package/dist/assets/{agreement-D_SlINnK.js → agreement-Ci4HozUa.js} +1 -1
- package/dist/assets/api-CRk4bs4H.js +1 -0
- package/dist/assets/{appearance-buyEW0Iv.js → appearance-BD1QGImy.js} +1 -1
- package/dist/assets/{ar-Ge3t6oI2.js → ar-BQm9lQ4M.js} +1 -1
- package/dist/assets/audit-logs-8_e0A3IE.js +35 -0
- package/dist/assets/{base-chart-E6uEbiC0.js → base-chart-Clhj_sK4.js} +1 -1
- package/dist/assets/{blocklet-BSWtuwnH.js → blocklet-Dvyh8Jp4.js} +1 -1
- package/dist/assets/chain-B6To8QFu.js +6 -0
- package/dist/assets/{click-to-copy-C5l1aVBQ.js → click-to-copy-iYXC5-cD.js} +1 -1
- package/dist/assets/cloneDeep-DkPlIKHp.js +1 -0
- package/dist/assets/{collapse-D-q9UEjV.js → collapse-DulbZhAc.js} +1 -1
- package/dist/assets/{config-navigation-Ck-BfL0o.js → config-navigation-CsntHBE3.js} +31 -31
- package/dist/assets/connect-to-wJPAZmlO.js +29 -0
- package/dist/assets/{cssMode-CwQeOUoG.js → cssMode-BVlDGH_I.js} +1 -1
- package/dist/assets/{de-CbARTvf4.js → de-D0uPENSq.js} +1 -1
- package/dist/assets/{delete-confirm-CiFwBlNG.js → delete-confirm-CnyGQRfQ.js} +1 -1
- package/dist/assets/{depsEqual-BHCVOuWA.js → depsEqual-BiEXsNqn.js} +1 -1
- package/dist/assets/{detail-u9DgWb-d.js → detail-BigelZ3g.js} +3 -3
- package/dist/assets/{domains-CuwWHtSp.js → domains-CTufYYmh.js} +1 -1
- package/dist/assets/{download-B1XuXwBn.js → download-DkusPKGH.js} +1 -1
- package/dist/assets/{edit.svg-BT2rpJxW.js → edit.svg-hD876CgN.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-B6zIYIHc.js +1 -0
- package/dist/assets/engine-3MKESjP-.js +1 -0
- package/dist/assets/{es-CaCbzATO.js → es-Dh4_UfCu.js} +1 -1
- package/dist/assets/{fr-B3yjKUFH.js → fr-CzZWQkiT.js} +1 -1
- package/dist/assets/{freemarker2-B3dcQl4s.js → freemarker2-CxTMoB8Q.js} +1 -1
- package/dist/assets/{get-safe-url-DfDeYxPo.js → get-safe-url-IgmCyB0M.js} +1 -1
- package/dist/assets/getValidReactChildren-CLYm2ELr.js +1 -0
- package/dist/assets/{graphqlMode-gWZ1xdel.js → graphqlMode-8q4l0bIb.js} +2 -2
- package/dist/assets/{handlebars-DLMgXH9N.js → handlebars-0wBSr_ad.js} +1 -1
- package/dist/assets/{hi-q4mhHiIl.js → hi-Do9VCuRi.js} +1 -1
- package/dist/assets/{html-DmYIunqS.js → html-4TvmEV0M.js} +1 -1
- package/dist/assets/{html-title-B42L4vHs.js → html-title-tKNU_Rtx.js} +1 -1
- package/dist/assets/{htmlMode-CyuA6nxS.js → htmlMode-B6CaFTU5.js} +1 -1
- package/dist/assets/{id-DTf7aVH8.js → id-Dhhrveu9.js} +1 -1
- package/dist/assets/{iframe-B-84ZVfc.js → iframe-BBTvhvam.js} +1 -1
- package/dist/assets/index-8h4vHVX5.js +1 -0
- package/dist/assets/{index-BIGgo0dk.js → index-AN9pUzEg.js} +1 -1
- package/dist/assets/{index-DgKqbN5Y.js → index-B-QQBi2O.js} +1 -1
- package/dist/assets/{index-B6fuqqYD.js → index-B7f4x3N4.js} +1 -1
- package/dist/assets/{index-tXfQSlPx.js → index-BGERz_iK.js} +3 -3
- package/dist/assets/{index-Cu6PRXBT.js → index-BInXlR12.js} +12 -12
- package/dist/assets/{index-CGwvwEUr.js → index-BZcXgg1f.js} +3 -10
- package/dist/assets/{index-Ca41Albz.js → index-BjDvFi9X.js} +1 -1
- package/dist/assets/{index-E2RuVge2.js → index-BoS4dIYT.js} +8 -8
- package/dist/assets/{index-nUrxOkOM.js → index-BqByO9CC.js} +1 -1
- package/dist/assets/{index-CnMT0fo1.js → index-C0Hpfcis.js} +1 -1
- package/dist/assets/{index-D63ritT-.js → index-C7T0ILpD.js} +1 -1
- package/dist/assets/{index-CAMlpQ47.js → index-C7j9pOMM.js} +2 -2
- package/dist/assets/{index-B4IIU09Y.js → index-CA1qwmXl.js} +27 -27
- package/dist/assets/{index-m-5ZFaj3.js → index-CE6VLS0y.js} +1 -1
- package/dist/assets/{index-CT-cKo4l.js → index-CIIax0-r.js} +4 -4
- package/dist/assets/index-CJyE0PHi.js +292 -0
- package/dist/assets/{index-DXF1RiG0.js → index-COIC4mfj.js} +1 -1
- package/dist/assets/index-CQ0SkU_t.js +1 -0
- package/dist/assets/{index-BKJPtvsM.js → index-CTXI0_ys.js} +1 -1
- package/dist/assets/{index-DBd6awj_.js → index-CTkuAIiW.js} +1 -1
- package/dist/assets/{index-D-dEXSR3.js → index-CWPTsxSF.js} +3 -3
- package/dist/assets/{index-BkFC8ho3.js → index-Cd9nAu70.js} +3 -3
- package/dist/assets/{index-Bb-RBdu9.js → index-CufHUwTa.js} +1 -1
- package/dist/assets/{index-B-KmoBb-.js → index-D6IcRMv4.js} +1 -1
- package/dist/assets/{index-BcBcDLRF.js → index-D7deg2jT.js} +14 -14
- package/dist/assets/index-DA3_QcTQ.js +120 -0
- package/dist/assets/{index-CHZXKvDD.js → index-DAdo2_rS.js} +1 -1
- package/dist/assets/{index-Dd5Oo0tk.js → index-DCqG9foU.js} +1 -1
- package/dist/assets/{index-M4yiF52E.js → index-DDNKwY4t.js} +1 -1
- package/dist/assets/{index-D_ED6Nk7.js → index-DH8zBpZk.js} +1 -1
- package/dist/assets/{index-DfxHc659.js → index-DHbSUSDr.js} +2 -2
- package/dist/assets/{index-haFP5Loj.js → index-DPyAwNR3.js} +1 -1
- package/dist/assets/{index-u7lHFbWg.js → index-DUBGp7xd.js} +9 -9
- package/dist/assets/{index-BHuxYJ36.js → index-DfQRgiki.js} +1 -1
- package/dist/assets/{index-CQ3QiuQQ.js → index-DiBieq3O.js} +1 -1
- package/dist/assets/{index-CdnTrItd.js → index-DiVTtrCb.js} +1 -1
- package/dist/assets/{index-DM9vqLT9.js → index-DmcjF6Nx.js} +1 -1
- package/dist/assets/{index-km_8frCh.js → index-DpoRb2a8.js} +1 -1
- package/dist/assets/{index-DaNXTl0n.js → index-DvieCNmb.js} +1 -1
- package/dist/assets/{index-D4PsRecd.js → index-RG4mqpGz.js} +1 -1
- package/dist/assets/{index-DxZUfBpk.js → index-U9rn9WsE.js} +1 -1
- package/dist/assets/{index-F3HbHSYi.js → index-a-ikX8qX.js} +142 -145
- package/dist/assets/index-lV0fy8B1.js +375 -0
- package/dist/assets/{index-jC9YQw2A.js → index-nCWPxDgy.js} +1 -1
- package/dist/assets/{index-CbD2HRHU.js → index-s02a35t3.js} +1 -1
- package/dist/assets/{index-DuS26oUH.js → index-sfXJAiE3.js} +1 -1
- package/dist/assets/{index.esm-CG55Fmct.js → index.esm-C68-NEl-.js} +1 -1
- package/dist/assets/{install-from-url-DL-3oQMI.js → install-from-url-BdJ2Ss57.js} +1 -1
- package/dist/assets/{invitation-C464OqTr.js → invitation-Bx5fJbWJ.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-DCicTZ8d.js → is-path-prefix-equal-BOPF5jBD.js} +1 -1
- package/dist/assets/{item-DkbrJM2U.js → item-C7h8_efZ.js} +1 -1
- package/dist/assets/{ja-Csh_XwzF.js → ja-B70UYq5X.js} +1 -1
- package/dist/assets/{javascript-B0hI_Eyo.js → javascript-Bys_gMbC.js} +1 -1
- package/dist/assets/{jsonMode--kCoJBFT.js → jsonMode-TWK13NFx.js} +1 -1
- package/dist/assets/{ko-xiNTwgO9.js → ko-C7TZwmXC.js} +1 -1
- package/dist/assets/{liquid-BVzOkmM1.js → liquid-BfUcrzzt.js} +1 -1
- package/dist/assets/{list-header-CnD8v8jR.js → list-header-SRVW6COA.js} +1 -1
- package/dist/assets/{lock.svg-DWUrJ_5S.js → lock.svg-JAXJuW8m.js} +1 -1
- package/dist/assets/{log-CjBZbQrr.js → log-Dc5jAOFj.js} +1 -1
- package/dist/assets/{lottie-react.esm-CcRYYgsR.js → lottie-react.esm-Da7iACIs.js} +1 -1
- package/dist/assets/{mdx-DOswkMzX.js → mdx-CBdpRCQl.js} +1 -1
- package/dist/assets/{memory-BkrGYits.js → memory-BC8bQEU5.js} +1 -1
- package/dist/assets/{metric-CNxVptGa.js → metric-BjM4KnKv.js} +1 -1
- package/dist/assets/omit-Cn3-c14y.js +1 -0
- package/dist/assets/{overview-BWjjo7YM.js → overview-BqvbUoW5.js} +1 -1
- package/dist/assets/{permission-caYaN7o4.js → permission-RfVjqk52.js} +1 -1
- package/dist/assets/{preference-D-1nO1Na.js → preference-DjJsrPrW.js} +3 -3
- package/dist/assets/{pt-BvcG4R7B.js → pt-DObJ_ADK.js} +1 -1
- package/dist/assets/{python-BJ2CXy2e.js → python-BF0eVRwz.js} +1 -1
- package/dist/assets/{raf-schd.esm-BdLRNFZe.js → raf-schd.esm-Ptj886XJ.js} +1 -1
- package/dist/assets/{razor-DdMOGESa.js → razor-Zdl-UA57.js} +1 -1
- package/dist/assets/{rotate-session-key-D_YTGNN-.js → rotate-session-key-CLwZduLH.js} +1 -1
- package/dist/assets/{ru-DzUPRLmr.js → ru-nYDmEUmY.js} +1 -1
- package/dist/assets/{runtime-B1ybPRbq.js → runtime-B6LxwjeF.js} +1 -1
- package/dist/assets/schema-DpNd-Zov.js +1 -0
- package/dist/assets/sdk-B8yMOC2O.js +1 -0
- package/dist/assets/{service-pByff5wa.js → service-_k6Howae.js} +1 -1
- package/dist/assets/{shorten-label-DxKgpegt.js → shorten-label-lx5QxF6Y.js} +1 -1
- package/dist/assets/simple-select-CfPqRV2d.js +1 -0
- package/dist/assets/{spaces-DnqeOj51.js → spaces-DoPkdMaN.js} +1 -1
- package/dist/assets/{status-BGeIvK1l.js → status-B8DVt36w.js} +1 -1
- package/dist/assets/status-BLTYBN-T.js +1 -0
- package/dist/assets/{switch-control-B_J8lGBy.js → switch-control-BH-qYrQR.js} +1 -1
- package/dist/assets/{table-icons-CoOahY2H.js → table-icons-IGHlCudU.js} +1 -1
- package/dist/assets/{team-NpjMEHti.js → team-B-Cs8lcZ.js} +1 -1
- package/dist/assets/{th-BmW1qKpZ.js → th-DMcUw_9_.js} +1 -1
- package/dist/assets/{toLower-Dx_gZ85b.js → toLower-C4ucU5aY.js} +1 -1
- package/dist/assets/toUpper-B1IhHQhu.js +1 -0
- package/dist/assets/{traffic-BiqnglqJ.js → traffic-CaIE-uiD.js} +1 -1
- package/dist/assets/{tsMode-CNfoaBo0.js → tsMode-C1CvS7zM.js} +1 -1
- package/dist/assets/{typescript-CYiGFg4j.js → typescript-D0zSwpFT.js} +1 -1
- package/dist/assets/ua-parser-DP5omx3I.js +1 -0
- package/dist/assets/{url-evaluation-Bm9OWnaf.js → url-evaluation-BAHeyVsk.js} +1 -1
- package/dist/assets/{url-join-B07GNSp-.js → url-join-C2Slolwi.js} +1 -1
- package/dist/assets/{use-mobile-Dm-drtZi.js → use-mobile-BjFvqb5i.js} +1 -1
- package/dist/assets/{use-mobile-D5fNICVu.js → use-mobile-Bo1g1SxW.js} +1 -1
- package/dist/assets/{useAsync-2o_4QDVN.js → useAsync-C37KCo_x.js} +1 -1
- package/dist/assets/{useAsyncRetry-CSZJdZ2s.js → useAsyncRetry-BcsGJECm.js} +1 -1
- package/dist/assets/{useLocalStorage-xEKVgwM3.js → useLocalStorage-BZqfD-Zc.js} +1 -1
- package/dist/assets/{useThemeProps-BhYWaPDm.js → useThemeProps-zGNtf5gr.js} +1 -1
- package/dist/assets/{util-DhYg_WLh.js → util-Cj4tmS79.js} +1 -1
- package/dist/assets/{vi-BPU54RQW.js → vi-B73oWQBC.js} +1 -1
- package/dist/assets/{wait-container-HwFE2vqS.js → wait-container-BevRGd6W.js} +1 -1
- package/dist/assets/without-wallet-qR-m0Hnu.js +29 -0
- package/dist/assets/wrap-locale-0qkKZCSZ.js +1 -0
- package/dist/assets/{xml-C13TFHPP.js → xml-DqMj09tj.js} +1 -1
- package/dist/assets/{yaml-TMDBP8Bi.js → yaml-BcpQktZM.js} +1 -1
- package/dist/assets/{zh-WrFfMVyM.js → zh-DCABA61W.js} +1 -1
- package/dist/assets/{zh-tw-DjWFpq-W.js → zh-tw-M_0Y4wmR.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-DonW35Zx.js +0 -1
- package/dist/assets/api-OdGoHXe4.js +0 -1
- package/dist/assets/audit-logs-CLj12YBu.js +0 -35
- package/dist/assets/chain-Cxmkzj72.js +0 -6
- package/dist/assets/client-BaEuKBw8.js +0 -1
- package/dist/assets/cloneDeep-CPQcx7Qa.js +0 -1
- package/dist/assets/connect-to-sME9XFIO.js +0 -30
- package/dist/assets/emotion-cache.browser.esm-CQ2-5c4_.js +0 -1
- package/dist/assets/engine-wH21TR28.js +0 -1
- package/dist/assets/getValidReactChildren-DECNQV_G.js +0 -1
- package/dist/assets/index-CAUKXdVD.js +0 -1
- package/dist/assets/index-DpTrAVde.js +0 -1
- package/dist/assets/index-DwEuapzX.js +0 -292
- package/dist/assets/index-DwfORIGZ.js +0 -113
- package/dist/assets/index-hPXA34zh.js +0 -375
- package/dist/assets/omit-B8xv_k3Z.js +0 -1
- package/dist/assets/schema-BKs0S9Ju.js +0 -1
- package/dist/assets/sdk-WWYom8eN.js +0 -1
- package/dist/assets/simple-select-DFmJjQqW.js +0 -1
- package/dist/assets/status-iJzbVxRo.js +0 -1
- package/dist/assets/toUpper-28qo31SR.js +0 -1
- package/dist/assets/without-wallet-Dbr3bl6I.js +0 -29
- package/dist/assets/wrap-locale-BQVWlKMF.js +0 -1
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{dv as lt,ex as ut,ey as ft,ez as mt,eA as De,cF as ht,eB as dt,dD as pt,eC as gt,V as yt,j as He,eD as vt,aD as bt,eE as _t,o as wt}from"./index-F3HbHSYi.js";import{r as Et}from"./index-haFP5Loj.js";var P={},Rt=null;const $t=Object.freeze(Object.defineProperty({__proto__:null,default:Rt},Symbol.toStringTag,{value:"Module"})),ct=lt($t);var Me={exports:{}},Xe;function Ke(){return Xe||(Xe=1,function(W,C){(function(q,z){W.exports=z()})(self,()=>{return q={7629:(k,w,p)=>{const o=p(375),g=p(8571),h=p(9474),u=p(1687),e=p(8652),i=p(8160),s=p(3292),r=p(6354),t=p(8901),c=p(9708),n=p(6914),l=p(2294),m=p(6133),a=p(1152),y=p(8863),R=p(2036),_={Base:class{constructor(f){this.type=f,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new l.Ids,this._preferences=null,this._refs=new m.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return o(typeof c.describe=="function","Manifest functionality disabled"),c.describe(this)}allow(...f){return i.verifyFlat(f,"allow"),this._values(f,"_valids")}alter(f){o(f&&typeof f=="object"&&!Array.isArray(f),"Invalid targets argument"),o(!this._inRuleset(),"Cannot set alterations inside a ruleset");const d=this.clone();d.$_terms.alterations=d.$_terms.alterations||[];for(const v in f){const E=f[v];o(typeof E=="function","Alteration adjuster for",v,"must be a function"),d.$_terms.alterations.push({target:v,adjuster:E})}return d.$_temp.ruleset=!1,d}artifact(f){return o(f!==void 0,"Artifact cannot be undefined"),o(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",f)}cast(f){return o(f===!1||typeof f=="string","Invalid to value"),o(f===!1||this._definition.cast[f],"Type",this.type,"does not support casting to",f),this.$_setFlag("cast",f===!1?void 0:f)}default(f,d){return this._default("default",f,d)}description(f){return o(f&&typeof f=="string","Description must be a non-empty string"),this.$_setFlag("description",f)}empty(f){const d=this.clone();return f!==void 0&&(f=d.$_compile(f,{override:!1})),d.$_setFlag("empty",f,{clone:!1})}error(f){return o(f,"Missing error"),o(f instanceof Error||typeof f=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",f)}example(f,d={}){return o(f!==void 0,"Missing example"),i.assertOptions(d,["override"]),this._inner("examples",f,{single:!0,override:d.override})}external(f,d){return typeof f=="object"&&(o(!d,"Cannot combine options with description"),d=f.description,f=f.method),o(typeof f=="function","Method must be a function"),o(d===void 0||d&&typeof d=="string","Description must be a non-empty string"),this._inner("externals",{method:f,description:d},{single:!0})}failover(f,d){return this._default("failover",f,d)}forbidden(){return this.presence("forbidden")}id(f){return f?(o(typeof f=="string","id must be a non-empty string"),o(/^[^\.]+$/.test(f),"id cannot contain period character"),this.$_setFlag("id",f)):this.$_setFlag("id",void 0)}invalid(...f){return this._values(f,"_invalids")}label(f){return o(f&&typeof f=="string","Label name must be a non-empty string"),this.$_setFlag("label",f)}meta(f){return o(f!==void 0,"Meta cannot be undefined"),this._inner("metas",f,{single:!0})}note(...f){o(f.length,"Missing notes");for(const d of f)o(d&&typeof d=="string","Notes must be non-empty strings");return this._inner("notes",f)}only(f=!0){return o(typeof f=="boolean","Invalid mode:",f),this.$_setFlag("only",f)}optional(){return this.presence("optional")}prefs(f){o(f,"Missing preferences"),o(f.context===void 0,"Cannot override context"),o(f.externals===void 0,"Cannot override externals"),o(f.warnings===void 0,"Cannot override warnings"),o(f.debug===void 0,"Cannot override debug"),i.checkPreferences(f);const d=this.clone();return d._preferences=i.preferences(d._preferences,f),d}presence(f){return o(["optional","required","forbidden"].includes(f),"Unknown presence mode",f),this.$_setFlag("presence",f)}raw(f=!0){return this.$_setFlag("result",f?"raw":void 0)}result(f){return o(["raw","strip"].includes(f),"Unknown result mode",f),this.$_setFlag("result",f)}required(){return this.presence("required")}strict(f){const d=this.clone(),v=f!==void 0&&!f;return d._preferences=i.preferences(d._preferences,{convert:v}),d}strip(f=!0){return this.$_setFlag("result",f?"strip":void 0)}tag(...f){o(f.length,"Missing tags");for(const d of f)o(d&&typeof d=="string","Tags must be non-empty strings");return this._inner("tags",f)}unit(f){return o(f&&typeof f=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",f)}valid(...f){i.verifyFlat(f,"valid");const d=this.allow(...f);return d.$_setFlag("only",!!d._valids,{clone:!1}),d}when(f,d){const v=this.clone();v.$_terms.whens||(v.$_terms.whens=[]);const E=s.when(v,f,d);if(!["any","link"].includes(v.type)){const S=E.is?[E]:E.switch;for(const O of S)o(!O.then||O.then.type==="any"||O.then.type===v.type,"Cannot combine",v.type,"with",O.then&&O.then.type),o(!O.otherwise||O.otherwise.type==="any"||O.otherwise.type===v.type,"Cannot combine",v.type,"with",O.otherwise&&O.otherwise.type)}return v.$_terms.whens.push(E),v.$_mutateRebuild()}cache(f){o(!this._inRuleset(),"Cannot set caching inside a ruleset"),o(!this._cache,"Cannot override schema cache"),o(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const d=this.clone();return d._cache=f||e.provider.provision(),d.$_temp.ruleset=!1,d}clone(){const f=Object.create(Object.getPrototypeOf(this));return this._assign(f)}concat(f){o(i.isSchema(f),"Invalid schema object"),o(this.type==="any"||f.type==="any"||f.type===this.type,"Cannot merge type",this.type,"with another type:",f.type),o(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),o(!f._inRuleset(),"Cannot concatenate a schema with open ruleset");let d=this.clone();if(this.type==="any"&&f.type!=="any"){const v=f.clone();for(const E of Object.keys(d))E!=="type"&&(v[E]=d[E]);d=v}d._ids.concat(f._ids),d._refs.register(f,m.toSibling),d._preferences=d._preferences?i.preferences(d._preferences,f._preferences):f._preferences,d._valids=R.merge(d._valids,f._valids,f._invalids),d._invalids=R.merge(d._invalids,f._invalids,f._valids);for(const v of f._singleRules.keys())d._singleRules.has(v)&&(d._rules=d._rules.filter(E=>E.keep||E.name!==v),d._singleRules.delete(v));for(const v of f._rules)f._definition.rules[v.method].multi||d._singleRules.set(v.name,v),d._rules.push(v);if(d._flags.empty&&f._flags.empty){d._flags.empty=d._flags.empty.concat(f._flags.empty);const v=Object.assign({},f._flags);delete v.empty,u(d._flags,v)}else if(f._flags.empty){d._flags.empty=f._flags.empty;const v=Object.assign({},f._flags);delete v.empty,u(d._flags,v)}else u(d._flags,f._flags);for(const v in f.$_terms){const E=f.$_terms[v];E?d.$_terms[v]?d.$_terms[v]=d.$_terms[v].concat(E):d.$_terms[v]=E.slice():d.$_terms[v]||(d.$_terms[v]=E)}return this.$_root._tracer&&this.$_root._tracer._combine(d,[this,f]),d.$_mutateRebuild()}extend(f){return o(!f.base,"Cannot extend type with another base"),t.type(this,f)}extract(f){return f=Array.isArray(f)?f:f.split("."),this._ids.reach(f)}fork(f,d){o(!this._inRuleset(),"Cannot fork inside a ruleset");let v=this;for(let E of[].concat(f))E=Array.isArray(E)?E:E.split("."),v=v._ids.fork(E,d,v);return v.$_temp.ruleset=!1,v}rule(f){const d=this._definition;i.assertOptions(f,Object.keys(d.modifiers)),o(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const v=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;o(v>=0&&v<this._rules.length,"Cannot apply rules to empty ruleset");const E=this.clone();for(let S=v;S<E._rules.length;++S){const O=E._rules[S],A=g(O);for(const I in f)d.modifiers[I](A,f[I]),o(A.name===O.name,"Cannot change rule name");E._rules[S]=A,E._singleRules.get(A.name)===O&&E._singleRules.set(A.name,A)}return E.$_temp.ruleset=!1,E.$_mutateRebuild()}get ruleset(){o(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const f=this.clone();return f.$_temp.ruleset=f._rules.length,f}get $(){return this.ruleset}tailor(f){f=[].concat(f),o(!this._inRuleset(),"Cannot tailor inside a ruleset");let d=this;if(this.$_terms.alterations)for(const{target:v,adjuster:E}of this.$_terms.alterations)f.includes(v)&&(d=E(d),o(i.isSchema(d),"Alteration adjuster for",v,"failed to return a schema object"));return d=d.$_modify({each:v=>v.tailor(f),ref:!1}),d.$_temp.ruleset=!1,d.$_mutateRebuild()}tracer(){return a.location?a.location(this):this}validate(f,d){return y.entry(f,this,d)}validateAsync(f,d){return y.entryAsync(f,this,d)}$_addRule(f){typeof f=="string"&&(f={name:f}),o(f&&typeof f=="object","Invalid options"),o(f.name&&typeof f.name=="string","Invalid rule name");for(const O in f)o(O[0]!=="_","Cannot set private rule properties");const d=Object.assign({},f);d._resolve=[],d.method=d.method||d.name;const v=this._definition.rules[d.method],E=d.args;o(v,"Unknown rule",d.method);const S=this.clone();if(E){o(Object.keys(E).length===1||Object.keys(E).length===this._definition.rules[d.name].args.length,"Invalid rule definition for",this.type,d.name);for(const O in E){let A=E[O];if(v.argsByName){const I=v.argsByName.get(O);if(I.ref&&i.isResolvable(A))d._resolve.push(O),S.$_mutateRegister(A);else if(I.normalize&&(A=I.normalize(A),E[O]=A),I.assert){const N=i.validateArg(A,O,I);o(!N,N,"or reference")}}A!==void 0?E[O]=A:delete E[O]}}return v.multi||(S._ruleRemove(d.name,{clone:!1}),S._singleRules.set(d.name,d)),S.$_temp.ruleset===!1&&(S.$_temp.ruleset=null),v.priority?S._rules.unshift(d):S._rules.push(d),S}$_compile(f,d){return s.schema(this.$_root,f,d)}$_createError(f,d,v,E,S,O={}){const A=O.flags!==!1?this._flags:{},I=O.messages?n.merge(this._definition.messages,O.messages):this._definition.messages;return new r.Report(f,d,v,A,I,E,S)}$_getFlag(f){return this._flags[f]}$_getRule(f){return this._singleRules.get(f)}$_mapLabels(f){return f=Array.isArray(f)?f:f.split("."),this._ids.labels(f)}$_match(f,d,v,E){(v=Object.assign({},v)).abortEarly=!0,v._externals=!1,d.snapshot();const S=!y.validate(f,this,d,v,E).errors;return d.restore(),S}$_modify(f){return i.assertOptions(f,["each","once","ref","schema"]),l.schema(this,f)||this}$_mutateRebuild(){return o(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(f,{source:d,name:v,path:E,key:S})=>{const O=this._definition[d][v]&&this._definition[d][v].register;O!==!1&&this.$_mutateRegister(f,{family:O,key:S})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(f,{family:d,key:v}={}){this._refs.register(f,d),this._ids.register(f,{key:v})}$_property(f){return this._definition.properties[f]}$_reach(f){return this._ids.reach(f)}$_rootReferences(){return this._refs.roots()}$_setFlag(f,d,v={}){o(f[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const E=this._definition.flags[f]||{};if(h(d,E.default)&&(d=void 0),h(d,this._flags[f]))return this;const S=v.clone!==!1?this.clone():this;return d!==void 0?(S._flags[f]=d,S.$_mutateRegister(d)):delete S._flags[f],f[0]!=="_"&&(S.$_temp.ruleset=!1),S}$_parent(f,...d){return this[f][i.symbols.parent].call(this,...d)}$_validate(f,d,v){return y.validate(f,this,d,v)}_assign(f){f.type=this.type,f.$_root=this.$_root,f.$_temp=Object.assign({},this.$_temp),f.$_temp.whens={},f._ids=this._ids.clone(),f._preferences=this._preferences,f._valids=this._valids&&this._valids.clone(),f._invalids=this._invalids&&this._invalids.clone(),f._rules=this._rules.slice(),f._singleRules=g(this._singleRules,{shallow:!0}),f._refs=this._refs.clone(),f._flags=Object.assign({},this._flags),f._cache=null,f.$_terms={};for(const d in this.$_terms)f.$_terms[d]=this.$_terms[d]?this.$_terms[d].slice():null;f.$_super={};for(const d in this.$_super)f.$_super[d]=this._super[d].bind(f);return f}_bare(){const f=this.clone();f._reset();const d=f._definition.terms;for(const v in d){const E=d[v];f.$_terms[v]=E.init}return f.$_mutateRebuild()}_default(f,d,v={}){return i.assertOptions(v,"literal"),o(d!==void 0,"Missing",f,"value"),o(typeof d=="function"||!v.literal,"Only function value supports literal option"),typeof d=="function"&&v.literal&&(d={[i.symbols.literal]:!0,literal:d}),this.$_setFlag(f,d)}_generate(f,d,v){if(!this.$_terms.whens)return{schema:this};const E=[],S=[];for(let I=0;I<this.$_terms.whens.length;++I){const N=this.$_terms.whens[I];if(N.concat){E.push(N.concat),S.push(`${I}.concat`);continue}const F=N.ref?N.ref.resolve(f,d,v):f,K=N.is?[N]:N.switch,G=S.length;for(let V=0;V<K.length;++V){const{is:D,then:X,otherwise:J}=K[V],ee=`${I}${N.switch?"."+V:""}`;if(D.$_match(F,d.nest(D,`${ee}.is`),v)){if(X){const te=d.localize([...d.path,`${ee}.then`],d.ancestors,d.schemas),{schema:ae,id:oe}=X._generate(f,te,v);E.push(ae),S.push(`${ee}.then${oe?`(${oe})`:""}`);break}}else if(J){const te=d.localize([...d.path,`${ee}.otherwise`],d.ancestors,d.schemas),{schema:ae,id:oe}=J._generate(f,te,v);E.push(ae),S.push(`${ee}.otherwise${oe?`(${oe})`:""}`);break}}if(N.break&&S.length>G)break}const O=S.join(", ");if(d.mainstay.tracer.debug(d,"rule","when",O),!O)return{schema:this};if(!d.mainstay.tracer.active&&this.$_temp.whens[O])return{schema:this.$_temp.whens[O],id:O};let A=this;this._definition.generate&&(A=this._definition.generate(this,f,d,v));for(const I of E)A=A.concat(I);return this.$_root._tracer&&this.$_root._tracer._combine(A,[this,...E]),this.$_temp.whens[O]=A,{schema:A,id:O}}_inner(f,d,v={}){o(!this._inRuleset(),`Cannot set ${f} inside a ruleset`);const E=this.clone();return E.$_terms[f]&&!v.override||(E.$_terms[f]=[]),v.single?E.$_terms[f].push(d):E.$_terms[f].push(...d),E.$_temp.ruleset=!1,E}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(f,d={}){if(!this._singleRules.has(f))return this;const v=d.clone!==!1?this.clone():this;v._singleRules.delete(f);const E=[];for(let S=0;S<v._rules.length;++S){const O=v._rules[S];O.name!==f||O.keep?E.push(O):v._inRuleset()&&S<v.$_temp.ruleset&&--v.$_temp.ruleset}return v._rules=E,v}_values(f,d){i.verifyFlat(f,d.slice(1,-1));const v=this.clone(),E=f[0]===i.symbols.override;if(E&&(f=f.slice(1)),!v[d]&&f.length?v[d]=new R:E&&(v[d]=f.length?new R:null,v.$_mutateRebuild()),!v[d])return v;E&&v[d].override();for(const S of f){o(S!==void 0,"Cannot call allow/valid/invalid with undefined"),o(S!==i.symbols.override,"Override must be the first value");const O=d==="_invalids"?"_valids":"_invalids";v[O]&&(v[O].remove(S),v[O].length||(o(d==="_valids"||!v._flags.only,"Setting invalid value",S,"leaves schema rejecting all values due to previous valid rule"),v[O]=null)),v[d].add(S,v._refs)}return v}}};_.Base.prototype[i.symbols.any]={version:i.version,compile:s.compile,root:"$_root"},_.Base.prototype.isImmutable=!0,_.Base.prototype.deny=_.Base.prototype.invalid,_.Base.prototype.disallow=_.Base.prototype.invalid,_.Base.prototype.equal=_.Base.prototype.valid,_.Base.prototype.exist=_.Base.prototype.required,_.Base.prototype.not=_.Base.prototype.invalid,_.Base.prototype.options=_.Base.prototype.prefs,_.Base.prototype.preferences=_.Base.prototype.prefs,k.exports=new _.Base},8652:(k,w,p)=>{const o=p(375),g=p(8571),h=p(8160),u={max:1e3,supported:new Set(["undefined","boolean","number","string"])};w.provider={provision:e=>new u.Cache(e)},u.Cache=class{constructor(e={}){h.assertOptions(e,["max"]),o(e.max===void 0||e.max&&e.max>0&&isFinite(e.max),"Invalid max cache size"),this._max=e.max||u.max,this._map=new Map,this._list=new u.List}get length(){return this._map.size}set(e,i){if(e!==null&&!u.supported.has(typeof e))return;let s=this._map.get(e);if(s)return s.value=i,void this._list.first(s);s=this._list.unshift({key:e,value:i}),this._map.set(e,s),this._compact()}get(e){const i=this._map.get(e);if(i)return this._list.first(i),g(i.value)}_compact(){if(this._map.size>this._max){const e=this._list.pop();this._map.delete(e.key)}}},u.List=class{constructor(){this.tail=null,this.head=null}unshift(e){return e.next=null,e.prev=this.head,this.head&&(this.head.next=e),this.head=e,this.tail||(this.tail=e),e}first(e){e!==this.head&&(this._remove(e),this.unshift(e))}pop(){return this._remove(this.tail)}_remove(e){const{next:i,prev:s}=e;return i.prev=s,s&&(s.next=i),e===this.tail&&(this.tail=i),e.prev=null,e.next=null,e}}},8160:(k,w,p)=>{const o=p(375),g=p(7916),h=p(5934);let u,e;const i={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};w.version=h.version,w.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:"iso",errors:{escapeHtml:!1,label:"path",language:null,render:!0,stack:!1,wrap:{label:'"',array:"[]"}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:"optional",skipFunctions:!1,stripUnknown:!1,warnings:!1},w.symbols={any:Symbol.for("@hapi/joi/schema"),arraySingle:Symbol("arraySingle"),deepDefault:Symbol("deepDefault"),errors:Symbol("errors"),literal:Symbol("literal"),override:Symbol("override"),parent:Symbol("parent"),prefs:Symbol("prefs"),ref:Symbol("ref"),template:Symbol("template"),values:Symbol("values")},w.assertOptions=function(s,r,t="Options"){o(s&&typeof s=="object"&&!Array.isArray(s),"Options must be of type object");const c=Object.keys(s).filter(n=>!r.includes(n));o(c.length===0,`${t} contain unknown keys: ${c}`)},w.checkPreferences=function(s){e=e||p(3378);const r=e.preferences.validate(s);if(r.error)throw new g([r.error.details[0].message])},w.compare=function(s,r,t){switch(t){case"=":return s===r;case">":return s>r;case"<":return s<r;case">=":return s>=r;case"<=":return s<=r}},w.default=function(s,r){return s===void 0?r:s},w.isIsoDate=function(s){return i.isoDate.test(s)},w.isNumber=function(s){return typeof s=="number"&&!isNaN(s)},w.isResolvable=function(s){return!!s&&(s[w.symbols.ref]||s[w.symbols.template])},w.isSchema=function(s,r={}){const t=s&&s[w.symbols.any];return!!t&&(o(r.legacy||t.version===w.version,"Cannot mix different versions of joi schemas"),!0)},w.isValues=function(s){return s[w.symbols.values]},w.limit=function(s){return Number.isSafeInteger(s)&&s>=0},w.preferences=function(s,r){u=u||p(6914),s=s||{},r=r||{};const t=Object.assign({},s,r);return r.errors&&s.errors&&(t.errors=Object.assign({},s.errors,r.errors),t.errors.wrap=Object.assign({},s.errors.wrap,r.errors.wrap)),r.messages&&(t.messages=u.compile(r.messages,s.messages)),delete t[w.symbols.prefs],t},w.tryWithPath=function(s,r,t={}){try{return s()}catch(c){throw c.path!==void 0?c.path=r+"."+c.path:c.path=r,t.append&&(c.message=`${c.message} (${c.path})`),c}},w.validateArg=function(s,r,{assert:t,message:c}){if(w.isSchema(t)){const n=t.validate(s);return n.error?n.error.message:void 0}if(!t(s))return r?`${r} ${c}`:c},w.verifyFlat=function(s,r){for(const t of s)o(!Array.isArray(t),"Method no longer accepts array arguments:",r)}},3292:(k,w,p)=>{const o=p(375),g=p(8160),h=p(6133),u={};w.schema=function(e,i,s={}){g.assertOptions(s,["appendPath","override"]);try{return u.schema(e,i,s)}catch(r){throw s.appendPath&&r.path!==void 0&&(r.message=`${r.message} (${r.path})`),r}},u.schema=function(e,i,s){o(i!==void 0,"Invalid undefined schema"),Array.isArray(i)&&(o(i.length,"Invalid empty array schema"),i.length===1&&(i=i[0]));const r=(t,...c)=>s.override!==!1?t.valid(e.override,...c):t.valid(...c);if(u.simple(i))return r(e,i);if(typeof i=="function")return e.custom(i);if(o(typeof i=="object","Invalid schema content:",typeof i),g.isResolvable(i))return r(e,i);if(g.isSchema(i))return i;if(Array.isArray(i)){for(const t of i)if(!u.simple(t))return e.alternatives().try(...i);return r(e,...i)}return i instanceof RegExp?e.string().regex(i):i instanceof Date?r(e.date(),i):(o(Object.getPrototypeOf(i)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),e.object().keys(i))},w.ref=function(e,i){return h.isRef(e)?e:h.create(e,i)},w.compile=function(e,i,s={}){g.assertOptions(s,["legacy"]);const r=i&&i[g.symbols.any];if(r)return o(s.legacy||r.version===g.version,"Cannot mix different versions of joi schemas:",r.version,g.version),i;if(typeof i!="object"||!s.legacy)return w.schema(e,i,{appendPath:!0});const t=u.walk(i);return t?t.compile(t.root,i):w.schema(e,i,{appendPath:!0})},u.walk=function(e){if(typeof e!="object")return null;if(Array.isArray(e)){for(const s of e){const r=u.walk(s);if(r)return r}return null}const i=e[g.symbols.any];if(i)return{root:e[i.root],compile:i.compile};o(Object.getPrototypeOf(e)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const s in e){const r=u.walk(e[s]);if(r)return r}return null},u.simple=function(e){return e===null||["boolean","string","number"].includes(typeof e)},w.when=function(e,i,s){if(s===void 0&&(o(i&&typeof i=="object","Missing options"),s=i,i=h.create(".")),Array.isArray(s)&&(s={switch:s}),g.assertOptions(s,["is","not","then","otherwise","switch","break"]),g.isSchema(i))return o(s.is===void 0,'"is" can not be used with a schema condition'),o(s.not===void 0,'"not" can not be used with a schema condition'),o(s.switch===void 0,'"switch" can not be used with a schema condition'),u.condition(e,{is:i,then:s.then,otherwise:s.otherwise,break:s.break});if(o(h.isRef(i)||typeof i=="string","Invalid condition:",i),o(s.not===void 0||s.is===void 0,'Cannot combine "is" with "not"'),s.switch===void 0){let t=s;s.not!==void 0&&(t={is:s.not,then:s.otherwise,otherwise:s.then,break:s.break});let c=t.is!==void 0?e.$_compile(t.is):e.$_root.invalid(null,!1,0,"").required();return o(t.then!==void 0||t.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),o(t.break===void 0||t.then===void 0||t.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),s.is===void 0||h.isRef(s.is)||g.isSchema(s.is)||(c=c.required()),u.condition(e,{ref:w.ref(i),is:c,then:t.then,otherwise:t.otherwise,break:t.break})}o(Array.isArray(s.switch),'"switch" must be an array'),o(s.is===void 0,'Cannot combine "switch" with "is"'),o(s.not===void 0,'Cannot combine "switch" with "not"'),o(s.then===void 0,'Cannot combine "switch" with "then"');const r={ref:w.ref(i),switch:[],break:s.break};for(let t=0;t<s.switch.length;++t){const c=s.switch[t],n=t===s.switch.length-1;g.assertOptions(c,n?["is","then","otherwise"]:["is","then"]),o(c.is!==void 0,'Switch statement missing "is"'),o(c.then!==void 0,'Switch statement missing "then"');const l={is:e.$_compile(c.is),then:e.$_compile(c.then)};if(h.isRef(c.is)||g.isSchema(c.is)||(l.is=l.is.required()),n){o(s.otherwise===void 0||c.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const m=s.otherwise!==void 0?s.otherwise:c.otherwise;m!==void 0&&(o(r.break===void 0,"Cannot specify both otherwise and break"),l.otherwise=e.$_compile(m))}r.switch.push(l)}return r},u.condition=function(e,i){for(const s of["then","otherwise"])i[s]===void 0?delete i[s]:i[s]=e.$_compile(i[s]);return i}},6354:(k,w,p)=>{const o=p(5688),g=p(8160),h=p(3328);w.Report=class{constructor(u,e,i,s,r,t,c){if(this.code=u,this.flags=s,this.messages=r,this.path=t.path,this.prefs=c,this.state=t,this.value=e,this.message=null,this.template=null,this.local=i||{},this.local.label=w.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const n=this.path[this.path.length-1];typeof n!="object"&&(this.local.key=n)}}_setTemplate(u){if(this.template=u,!this.flags.label&&this.path.length===0){const e=this._template(this.template,"root");e&&(this.local.label=e)}}toString(){if(this.message)return this.message;const u=this.code;if(!this.prefs.errors.render)return this.code;const e=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return e===void 0?`Error code "${u}" is not defined, your custom type is missing the correct messages definition`:(this.message=e.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(u,e){return w.template(this.value,u,e||this.code,this.state,this.prefs)}},w.path=function(u){let e="";for(const i of u)typeof i!="object"&&(typeof i=="string"?(e&&(e+="."),e+=i):e+=`[${i}]`);return e},w.template=function(u,e,i,s,r){if(!e)return;if(h.isTemplate(e))return i!=="root"?e:null;let t=r.errors.language;if(g.isResolvable(t)&&(t=t.resolve(u,s,r)),t&&e[t]){if(e[t][i]!==void 0)return e[t][i];if(e[t]["*"]!==void 0)return e[t]["*"]}return e[i]?e[i]:e["*"]},w.label=function(u,e,i,s){if(u.label)return u.label;if(!i.errors.label)return"";let r=e.path;return i.errors.label==="key"&&e.path.length>1&&(r=e.path.slice(-1)),w.path(r)||w.template(null,i.messages,"root",e,i)||s&&w.template(null,s,"root",e,i)||"value"},w.process=function(u,e,i){if(!u)return null;const{override:s,message:r,details:t}=w.details(u);if(s)return s;if(i.errors.stack)return new w.ValidationError(r,t,e);const c=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new w.ValidationError(r,t,e);return Error.stackTraceLimit=c,n},w.details=function(u,e={}){let i=[];const s=[];for(const r of u){if(r instanceof Error){if(e.override!==!1)return{override:r};const c=r.toString();i.push(c),s.push({message:c,type:"override",context:{error:r}});continue}const t=r.toString();i.push(t),s.push({message:t,path:r.path.filter(c=>typeof c!="object"),type:r.code,context:r.local})}return i.length>1&&(i=[...new Set(i)]),{message:i.join(". "),details:s}},w.ValidationError=class extends Error{constructor(u,e,i){super(u),this._original=i,this.details=e}static isError(u){return u instanceof w.ValidationError}},w.ValidationError.prototype.isJoi=!0,w.ValidationError.prototype.name="ValidationError",w.ValidationError.prototype.annotate=o.error},8901:(k,w,p)=>{const o=p(375),g=p(8571),h=p(8160),u=p(6914),e={};w.type=function(i,s){const r=Object.getPrototypeOf(i),t=g(r),c=i._assign(Object.create(t)),n=Object.assign({},s);delete n.base,t._definition=n;const l=r._definition||{};n.messages=u.merge(l.messages,n.messages),n.properties=Object.assign({},l.properties,n.properties),c.type=n.type,n.flags=Object.assign({},l.flags,n.flags);const m=Object.assign({},l.terms);if(n.terms)for(const _ in n.terms){const f=n.terms[_];o(c.$_terms[_]===void 0,"Invalid term override for",n.type,_),c.$_terms[_]=f.init,m[_]=f}n.terms=m,n.args||(n.args=l.args),n.prepare=e.prepare(n.prepare,l.prepare),n.coerce&&(typeof n.coerce=="function"&&(n.coerce={method:n.coerce}),n.coerce.from&&!Array.isArray(n.coerce.from)&&(n.coerce={method:n.coerce.method,from:[].concat(n.coerce.from)})),n.coerce=e.coerce(n.coerce,l.coerce),n.validate=e.validate(n.validate,l.validate);const a=Object.assign({},l.rules);if(n.rules)for(const _ in n.rules){const f=n.rules[_];o(typeof f=="object","Invalid rule definition for",n.type,_);let d=f.method;if(d===void 0&&(d=function(){return this.$_addRule(_)}),d&&(o(!t[_],"Rule conflict in",n.type,_),t[_]=d),o(!a[_],"Rule conflict in",n.type,_),a[_]=f,f.alias){const v=[].concat(f.alias);for(const E of v)t[E]=f.method}f.args&&(f.argsByName=new Map,f.args=f.args.map(v=>(typeof v=="string"&&(v={name:v}),o(!f.argsByName.has(v.name),"Duplicated argument name",v.name),h.isSchema(v.assert)&&(v.assert=v.assert.strict().label(v.name)),f.argsByName.set(v.name,v),v)))}n.rules=a;const y=Object.assign({},l.modifiers);if(n.modifiers)for(const _ in n.modifiers){o(!t[_],"Rule conflict in",n.type,_);const f=n.modifiers[_];o(typeof f=="function","Invalid modifier definition for",n.type,_);const d=function(v){return this.rule({[_]:v})};t[_]=d,y[_]=f}if(n.modifiers=y,n.overrides){t._super=r,c.$_super={};for(const _ in n.overrides)o(r[_],"Cannot override missing",_),n.overrides[_][h.symbols.parent]=r[_],c.$_super[_]=r[_].bind(c);Object.assign(t,n.overrides)}n.cast=Object.assign({},l.cast,n.cast);const R=Object.assign({},l.manifest,n.manifest);return R.build=e.build(n.manifest&&n.manifest.build,l.manifest&&l.manifest.build),n.manifest=R,n.rebuild=e.rebuild(n.rebuild,l.rebuild),c},e.build=function(i,s){return i&&s?function(r,t){return s(i(r,t),t)}:i||s},e.coerce=function(i,s){return i&&s?{from:i.from&&s.from?[...new Set([...i.from,...s.from])]:null,method(r,t){let c;if((!s.from||s.from.includes(typeof r))&&(c=s.method(r,t),c)){if(c.errors||c.value===void 0)return c;r=c.value}if(!i.from||i.from.includes(typeof r)){const n=i.method(r,t);if(n)return n}return c}}:i||s},e.prepare=function(i,s){return i&&s?function(r,t){const c=i(r,t);if(c){if(c.errors||c.value===void 0)return c;r=c.value}return s(r,t)||c}:i||s},e.rebuild=function(i,s){return i&&s?function(r){s(r),i(r)}:i||s},e.validate=function(i,s){return i&&s?function(r,t){const c=s(r,t);if(c){if(c.errors&&(!Array.isArray(c.errors)||c.errors.length))return c;r=c.value}return i(r,t)||c}:i||s}},5107:(k,w,p)=>{const o=p(375),g=p(8571),h=p(8652),u=p(8160),e=p(3292),i=p(6354),s=p(8901),r=p(9708),t=p(6133),c=p(3328),n=p(1152);let l;const m={types:{alternatives:p(4946),any:p(8068),array:p(546),boolean:p(4937),date:p(7500),function:p(390),link:p(8785),number:p(3832),object:p(8966),string:p(7417),symbol:p(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const a={_types:new Set(Object.keys(m.types))};for(const y of a._types)a[y]=function(...R){return o(!R.length||["alternatives","link","object"].includes(y),"The",y,"type does not allow arguments"),m.generate(this,m.types[y],R)};for(const y of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])a[y]=function(...R){return this.any()[y](...R)};Object.assign(a,m.methods);for(const y in m.aliases){const R=m.aliases[y];a[y]=a[R]}return a.x=a.expression,n.setup&&n.setup(a),a}};m.methods={ValidationError:i.ValidationError,version:u.version,cache:h.provider,assert(a,y,...R){m.assert(a,y,!0,R)},attempt:(a,y,...R)=>m.assert(a,y,!1,R),build(a){return o(typeof r.build=="function","Manifest functionality disabled"),r.build(this,a)},checkPreferences(a){u.checkPreferences(a)},compile(a,y){return e.compile(this,a,y)},defaults(a){o(typeof a=="function","modifier must be a function");const y=Object.assign({},this);for(const R of y._types){const _=a(y[R]());o(u.isSchema(_),"modifier must return a valid schema object"),y[R]=function(...f){return m.generate(this,_,f)}}return y},expression:(...a)=>new c(...a),extend(...a){u.verifyFlat(a,"extend"),l=l||p(3378),o(a.length,"You need to provide at least one extension"),this.assert(a,l.extensions);const y=Object.assign({},this);y._types=new Set(y._types);for(let R of a){typeof R=="function"&&(R=R(y)),this.assert(R,l.extension);const _=m.expandExtension(R,y);for(const f of _){o(y[f.type]===void 0||y._types.has(f.type),"Cannot override name",f.type);const d=f.base||this.any(),v=s.type(d,f);y._types.add(f.type),y[f.type]=function(...E){return m.generate(this,v,E)}}}return y},isError:i.ValidationError.isError,isExpression:c.isTemplate,isRef:t.isRef,isSchema:u.isSchema,in:(...a)=>t.in(...a),override:u.symbols.override,ref:(...a)=>t.create(...a),types(){const a={};for(const y of this._types)a[y]=this[y]();for(const y in m.aliases)a[y]=this[y]();return a}},m.assert=function(a,y,R,_){const f=_[0]instanceof Error||typeof _[0]=="string"?_[0]:null,d=f!==null?_[1]:_[0],v=y.validate(a,u.preferences({errors:{stack:!0}},d||{}));let E=v.error;if(!E)return v.value;if(f instanceof Error)throw f;const S=R&&typeof E.annotate=="function"?E.annotate():E.message;throw E instanceof i.ValidationError==0&&(E=g(E)),E.message=f?`${f} ${S}`:S,E},m.generate=function(a,y,R){return o(a,"Must be invoked on a Joi instance."),y.$_root=a,y._definition.args&&R.length?y._definition.args(y,...R):y},m.expandExtension=function(a,y){if(typeof a.type=="string")return[a];const R=[];for(const _ of y._types)if(a.type.test(_)){const f=Object.assign({},a);f.type=_,f.base=y[_](),R.push(f)}return R},k.exports=m.root()},6914:(k,w,p)=>{const o=p(375),g=p(8571),h=p(3328);w.compile=function(u,e){if(typeof u=="string")return o(!e,"Cannot set single message string"),new h(u);if(h.isTemplate(u))return o(!e,"Cannot set single message template"),u;o(typeof u=="object"&&!Array.isArray(u),"Invalid message options"),e=e?g(e):{};for(let i in u){const s=u[i];if(i==="root"||h.isTemplate(s)){e[i]=s;continue}if(typeof s=="string"){e[i]=new h(s);continue}o(typeof s=="object"&&!Array.isArray(s),"Invalid message for",i);const r=i;for(i in e[r]=e[r]||{},s){const t=s[i];i==="root"||h.isTemplate(t)?e[r][i]=t:(o(typeof t=="string","Invalid message for",i,"in",r),e[r][i]=new h(t))}}return e},w.decompile=function(u){const e={};for(let i in u){const s=u[i];if(i==="root"){e.root=s;continue}if(h.isTemplate(s)){e[i]=s.describe({compact:!0});continue}const r=i;for(i in e[r]={},s){const t=s[i];i!=="root"?e[r][i]=t.describe({compact:!0}):e[r].root=t}}return e},w.merge=function(u,e){if(!u)return w.compile(e);if(!e)return u;if(typeof e=="string")return new h(e);if(h.isTemplate(e))return e;const i=g(u);for(let s in e){const r=e[s];if(s==="root"||h.isTemplate(r)){i[s]=r;continue}if(typeof r=="string"){i[s]=new h(r);continue}o(typeof r=="object"&&!Array.isArray(r),"Invalid message for",s);const t=s;for(s in i[t]=i[t]||{},r){const c=r[s];s==="root"||h.isTemplate(c)?i[t][s]=c:(o(typeof c=="string","Invalid message for",s,"in",t),i[t][s]=new h(c))}}return i}},2294:(k,w,p)=>{const o=p(375),g=p(8160),h=p(6133),u={};w.Ids=u.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const e=new u.Ids;return e._byId=new Map(this._byId),e._byKey=new Map(this._byKey),e._schemaChain=this._schemaChain,e}concat(e){e._schemaChain&&(this._schemaChain=!0);for(const[i,s]of e._byId.entries())o(!this._byKey.has(i),"Schema id conflicts with existing key:",i),this._byId.set(i,s);for(const[i,s]of e._byKey.entries())o(!this._byId.has(i),"Schema key conflicts with existing id:",i),this._byKey.set(i,s)}fork(e,i,s){const r=this._collect(e);r.push({schema:s});const t=r.shift();let c={id:t.id,schema:i(t.schema)};o(g.isSchema(c.schema),"adjuster function failed to return a joi schema type");for(const n of r)c={id:n.id,schema:u.fork(n.schema,c.id,c.schema)};return c.schema}labels(e,i=[]){const s=e[0],r=this._get(s);if(!r)return[...i,...e].join(".");const t=e.slice(1);return i=[...i,r.schema._flags.label||s],t.length?r.schema._ids.labels(t,i):i.join(".")}reach(e,i=[]){const s=e[0],r=this._get(s);o(r,"Schema does not contain path",[...i,...e].join("."));const t=e.slice(1);return t.length?r.schema._ids.reach(t,[...i,s]):r.schema}register(e,{key:i}={}){if(!e||!g.isSchema(e))return;(e.$_property("schemaChain")||e._ids._schemaChain)&&(this._schemaChain=!0);const s=e._flags.id;if(s){const r=this._byId.get(s);o(!r||r.schema===e,"Cannot add different schemas with the same id:",s),o(!this._byKey.has(s),"Schema id conflicts with existing key:",s),this._byId.set(s,{schema:e,id:s})}i&&(o(!this._byKey.has(i),"Schema already contains key:",i),o(!this._byId.has(i),"Schema key conflicts with existing id:",i),this._byKey.set(i,{schema:e,id:i}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(e,i=[],s=[]){const r=e[0],t=this._get(r);o(t,"Schema does not contain path",[...i,...e].join(".")),s=[t,...s];const c=e.slice(1);return c.length?t.schema._ids._collect(c,[...i,r],s):s}_get(e){return this._byId.get(e)||this._byKey.get(e)}},u.fork=function(e,i,s){const r=w.schema(e,{each:(t,{key:c})=>{if(i===(t._flags.id||c))return s},ref:!1});return r?r.$_mutateRebuild():e},w.schema=function(e,i){let s;for(const r in e._flags){if(r[0]==="_")continue;const t=u.scan(e._flags[r],{source:"flags",name:r},i);t!==void 0&&(s=s||e.clone(),s._flags[r]=t)}for(let r=0;r<e._rules.length;++r){const t=e._rules[r],c=u.scan(t.args,{source:"rules",name:t.name},i);if(c!==void 0){s=s||e.clone();const n=Object.assign({},t);n.args=c,s._rules[r]=n,s._singleRules.get(t.name)===t&&s._singleRules.set(t.name,n)}}for(const r in e.$_terms){if(r[0]==="_")continue;const t=u.scan(e.$_terms[r],{source:"terms",name:r},i);t!==void 0&&(s=s||e.clone(),s.$_terms[r]=t)}return s},u.scan=function(e,i,s,r,t){const c=r||[];if(e===null||typeof e!="object")return;let n;if(Array.isArray(e)){for(let l=0;l<e.length;++l){const m=i.source==="terms"&&i.name==="keys"&&e[l].key,a=u.scan(e[l],i,s,[l,...c],m);a!==void 0&&(n=n||e.slice(),n[l]=a)}return n}if(s.schema!==!1&&g.isSchema(e)||s.ref!==!1&&h.isRef(e)){const l=s.each(e,{...i,path:c,key:t});return l===e?void 0:l}for(const l in e){if(l[0]==="_")continue;const m=u.scan(e[l],i,s,[l,...c],t);m!==void 0&&(n=n||Object.assign({},e),n[l]=m)}return n}},6133:(k,w,p)=>{const o=p(375),g=p(8571),h=p(9621),u=p(8160);let e;const i={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};w.create=function(s,r={}){o(typeof s=="string","Invalid reference key:",s),u.assertOptions(r,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),o(!r.prefix||typeof r.prefix=="object","options.prefix must be of type object");const t=Object.assign({},i.defaults,r);delete t.prefix;const c=t.separator,n=i.context(s,c,r.prefix);if(t.type=n.type,s=n.key,t.type==="value")if(n.root&&(o(!c||s[0]!==c,"Cannot specify relative path with root prefix"),t.ancestor="root",s||(s=null)),c&&c===s)s=null,t.ancestor=0;else if(t.ancestor!==void 0)o(!c||!s||s[0]!==c,"Cannot combine prefix with ancestor option");else{const[l,m]=i.ancestor(s,c);m&&(s=s.slice(m))===""&&(s=null),t.ancestor=l}return t.path=c?s===null?[]:s.split(c):[s],new i.Ref(t)},w.in=function(s,r={}){return w.create(s,{...r,in:!0})},w.isRef=function(s){return!!s&&!!s[u.symbols.ref]},i.Ref=class{constructor(s){o(typeof s=="object","Invalid reference construction"),u.assertOptions(s,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),o([!1,void 0].includes(s.separator)||typeof s.separator=="string"&&s.separator.length===1,"Invalid separator"),o(!s.adjust||typeof s.adjust=="function","options.adjust must be a function"),o(!s.map||Array.isArray(s.map),"options.map must be an array"),o(!s.map||!s.adjust,"Cannot set both map and adjust options"),Object.assign(this,i.defaults,s),o(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(s,r,t,c,n={}){return o(!this.in||n.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(t.context,r,n):this.type==="local"?this._resolve(c,r,n):this.ancestor?this.ancestor==="root"?this._resolve(r.ancestors[r.ancestors.length-1],r,n):(o(this.ancestor<=r.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(r.ancestors[this.ancestor-1],r,n)):this._resolve(s,r,n)}_resolve(s,r,t){let c;if(this.type==="value"&&r.mainstay.shadow&&t.shadow!==!1&&(c=r.mainstay.shadow.get(this.absolute(r))),c===void 0&&(c=h(s,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(c=this.adjust(c)),this.map){const n=this.map.get(c);n!==void 0&&(c=n)}return r.mainstay&&r.mainstay.tracer.resolve(r,this,c),c}toString(){return this.display}absolute(s){return[...s.path.slice(0,-this.ancestor),...this.path]}clone(){return new i.Ref(this)}describe(){const s={path:this.path};this.type!=="value"&&(s.type=this.type),this.separator!=="."&&(s.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(s.ancestor=this.ancestor),this.map&&(s.map=[...this.map]);for(const r of["adjust","iterables","render"])this[r]!==null&&this[r]!==void 0&&(s[r]=this[r]);return this.in!==!1&&(s.in=!0),{ref:s}}updateDisplay(){const s=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${s}`);if(!this.separator)return void(this.display=`ref:${s}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${s}`);if(this.ancestor==="root")return void(this.display=`ref:root:${s}`);if(this.ancestor===1)return void(this.display=`ref:${s||".."}`);const r=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${r}${s||""}`}},i.Ref.prototype[u.symbols.ref]=!0,w.build=function(s){return(s=Object.assign({},i.defaults,s)).type==="value"&&s.ancestor===void 0&&(s.ancestor=1),new i.Ref(s)},i.context=function(s,r,t={}){if(s=s.trim(),t){const c=t.global===void 0?"$":t.global;if(c!==r&&s.startsWith(c))return{key:s.slice(c.length),type:"global"};const n=t.local===void 0?"#":t.local;if(n!==r&&s.startsWith(n))return{key:s.slice(n.length),type:"local"};const l=t.root===void 0?"/":t.root;if(l!==r&&s.startsWith(l))return{key:s.slice(l.length),type:"value",root:!0}}return{key:s,type:"value"}},i.ancestor=function(s,r){if(!r)return[1,0];if(s[0]!==r)return[1,0];if(s[1]!==r)return[0,1];let t=2;for(;s[t]===r;)++t;return[t-1,t]},w.toSibling=0,w.toParent=1,w.Manager=class{constructor(){this.refs=[]}register(s,r){if(s)if(r=r===void 0?w.toParent:r,Array.isArray(s))for(const t of s)this.register(t,r);else if(u.isSchema(s))for(const t of s._refs.refs)t.ancestor-r>=0&&this.refs.push({ancestor:t.ancestor-r,root:t.root});else w.isRef(s)&&s.type==="value"&&s.ancestor-r>=0&&this.refs.push({ancestor:s.ancestor-r,root:s.root}),e=e||p(3328),e.isTemplate(s)&&this.register(s.refs(),r)}get length(){return this.refs.length}clone(){const s=new w.Manager;return s.refs=g(this.refs),s}reset(){this.refs=[]}roots(){return this.refs.filter(s=>!s.ancestor).map(s=>s.root)}}},3378:(k,w,p)=>{const o=p(5107),g={};g.wrap=o.string().min(1).max(2).allow(!1),w.preferences=o.object({allowUnknown:o.boolean(),abortEarly:o.boolean(),artifacts:o.boolean(),cache:o.boolean(),context:o.object(),convert:o.boolean(),dateFormat:o.valid("date","iso","string","time","utc"),debug:o.boolean(),errors:{escapeHtml:o.boolean(),label:o.valid("path","key",!1),language:[o.string(),o.object().ref()],render:o.boolean(),stack:o.boolean(),wrap:{label:g.wrap,array:g.wrap,string:g.wrap}},externals:o.boolean(),messages:o.object(),noDefaults:o.boolean(),nonEnumerables:o.boolean(),presence:o.valid("required","optional","forbidden"),skipFunctions:o.boolean(),stripUnknown:o.object({arrays:o.boolean(),objects:o.boolean()}).or("arrays","objects").allow(!0,!1),warnings:o.boolean()}).strict(),g.nameRx=/^[a-zA-Z0-9]\w*$/,g.rule=o.object({alias:o.array().items(o.string().pattern(g.nameRx)).single(),args:o.array().items(o.string(),o.object({name:o.string().pattern(g.nameRx).required(),ref:o.boolean(),assert:o.alternatives([o.function(),o.object().schema()]).conditional("ref",{is:!0,then:o.required()}),normalize:o.function(),message:o.string().when("assert",{is:o.function(),then:o.required()})})),convert:o.boolean(),manifest:o.boolean(),method:o.function().allow(!1),multi:o.boolean(),validate:o.function()}),w.extension=o.object({type:o.alternatives([o.string(),o.object().regex()]).required(),args:o.function(),cast:o.object().pattern(g.nameRx,o.object({from:o.function().maxArity(1).required(),to:o.function().minArity(1).maxArity(2).required()})),base:o.object().schema().when("type",{is:o.object().regex(),then:o.forbidden()}),coerce:[o.function().maxArity(3),o.object({method:o.function().maxArity(3).required(),from:o.array().items(o.string()).single()})],flags:o.object().pattern(g.nameRx,o.object({setter:o.string(),default:o.any()})),manifest:{build:o.function().arity(2)},messages:[o.object(),o.string()],modifiers:o.object().pattern(g.nameRx,o.function().minArity(1).maxArity(2)),overrides:o.object().pattern(g.nameRx,o.function()),prepare:o.function().maxArity(3),rebuild:o.function().arity(1),rules:o.object().pattern(g.nameRx,g.rule),terms:o.object().pattern(g.nameRx,o.object({init:o.array().allow(null).required(),manifest:o.object().pattern(/.+/,[o.valid("schema","single"),o.object({mapped:o.object({from:o.string().required(),to:o.string().required()}).required()})])})),validate:o.function().maxArity(3)}).strict(),w.extensions=o.array().items(o.object(),o.function().arity(1)).strict(),g.desc={buffer:o.object({buffer:o.string()}),func:o.object({function:o.function().required(),options:{literal:!0}}),override:o.object({override:!0}),ref:o.object({ref:o.object({type:o.valid("value","global","local"),path:o.array().required(),separator:o.string().length(1).allow(!1),ancestor:o.number().min(0).integer().allow("root"),map:o.array().items(o.array().length(2)).min(1),adjust:o.function(),iterables:o.boolean(),in:o.boolean(),render:o.boolean()}).required()}),regex:o.object({regex:o.string().min(3)}),special:o.object({special:o.valid("deep").required()}),template:o.object({template:o.string().required(),options:o.object()}),value:o.object({value:o.alternatives([o.object(),o.array()]).required()})},g.desc.entity=o.alternatives([o.array().items(o.link("...")),o.boolean(),o.function(),o.number(),o.string(),g.desc.buffer,g.desc.func,g.desc.ref,g.desc.regex,g.desc.special,g.desc.template,g.desc.value,o.link("/")]),g.desc.values=o.array().items(null,o.boolean(),o.function(),o.number().allow(1/0,-1/0),o.string().allow(""),o.symbol(),g.desc.buffer,g.desc.func,g.desc.override,g.desc.ref,g.desc.regex,g.desc.template,g.desc.value),g.desc.messages=o.object().pattern(/.+/,[o.string(),g.desc.template,o.object().pattern(/.+/,[o.string(),g.desc.template])]),w.description=o.object({type:o.string().required(),flags:o.object({cast:o.string(),default:o.any(),description:o.string(),empty:o.link("/"),failover:g.desc.entity,id:o.string(),label:o.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:o.boolean(),unit:o.string()}).unknown(),preferences:{allowUnknown:o.boolean(),abortEarly:o.boolean(),artifacts:o.boolean(),cache:o.boolean(),convert:o.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:o.boolean(),label:["path","key"],language:[o.string(),g.desc.ref],wrap:{label:g.wrap,array:g.wrap}},externals:o.boolean(),messages:g.desc.messages,noDefaults:o.boolean(),nonEnumerables:o.boolean(),presence:["required","optional","forbidden"],skipFunctions:o.boolean(),stripUnknown:o.object({arrays:o.boolean(),objects:o.boolean()}).or("arrays","objects").allow(!0,!1),warnings:o.boolean()},allow:g.desc.values,invalid:g.desc.values,rules:o.array().min(1).items({name:o.string().required(),args:o.object().min(1),keep:o.boolean(),message:[o.string(),g.desc.messages],warn:o.boolean()}),keys:o.object().pattern(/.*/,o.link("/")),link:g.desc.ref}).pattern(/^[a-z]\w*$/,o.any())},493:(k,w,p)=>{const o=p(8571),g=p(9621),h=p(8160),u={value:Symbol("value")};k.exports=u.State=class{constructor(e,i,s){this.path=e,this.ancestors=i,this.mainstay=s.mainstay,this.schemas=s.schemas,this.debug=null}localize(e,i=null,s=null){const r=new u.State(e,i,this);return s&&r.schemas&&(r.schemas=[u.schemas(s),...r.schemas]),r}nest(e,i){const s=new u.State(this.path,this.ancestors,this);return s.schemas=s.schemas&&[u.schemas(e),...s.schemas],s.debug=i,s}shadow(e,i){this.mainstay.shadow=this.mainstay.shadow||new u.Shadow,this.mainstay.shadow.set(this.path,e,i)}snapshot(){this.mainstay.shadow&&(this._snapshot=o(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}commit(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.commit()}},u.schemas=function(e){return h.isSchema(e)?{schema:e}:e},u.Shadow=class{constructor(){this._values=null}set(e,i,s){if(!e.length||s==="strip"&&typeof e[e.length-1]=="number")return;this._values=this._values||new Map;let r=this._values;for(let t=0;t<e.length;++t){const c=e[t];let n=r.get(c);n||(n=new Map,r.set(c,n)),r=n}r[u.value]=i}get(e){const i=this.node(e);if(i)return i[u.value]}node(e){if(this._values)return g(this._values,e,{iterables:!0})}override(e,i){if(!this._values)return;const s=e.slice(0,-1),r=e[e.length-1],t=g(this._values,s,{iterables:!0});i?t.set(r,i):t&&t.delete(r)}}},3328:(k,w,p)=>{const o=p(375),g=p(8571),h=p(5277),u=p(1447),e=p(8160),i=p(6354),s=p(6133),r={symbol:Symbol("template"),opens:new Array(1e3).join("\0"),closes:new Array(1e3).join(""),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};k.exports=r.Template=class{constructor(t,c){if(o(typeof t=="string","Template source must be a string"),o(!t.includes("\0")&&!t.includes(""),"Template source cannot contain reserved control characters"),this.source=t,this.rendered=t,this._template=null,c){const{functions:n,...l}=c;this._settings=Object.keys(l).length?g(l):void 0,this._functions=n,this._functions&&(o(Object.keys(this._functions).every(m=>typeof m=="string"),"Functions keys must be strings"),o(Object.values(this._functions).every(m=>typeof m=="function"),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;const t=r.encode(this.source),c=r.split(t);let n=!1;const l=[],m=c.shift();m&&l.push(m);for(const a of c){const y=a[0]!=="{",R=y?"}":"}}",_=a.indexOf(R);if(_===-1||a[1]==="{"){l.push(`{${r.decode(a)}`);continue}let f=a.slice(y?0:1,_);const d=f[0]===":";d&&(f=f.slice(1));const v=this._ref(r.decode(f),{raw:y,wrapped:d});l.push(v),typeof v!="string"&&(n=!0);const E=a.slice(_+R.length);E&&l.push(r.decode(E))}n?this._template=l:this.rendered=l.join("")}static date(t,c){return r.dateFormat[c.dateFormat].call(t)}describe(t={}){if(!this._settings&&t.compact)return this.source;const c={template:this.source};return this._settings&&(c.options=this._settings),this._functions&&(c.functions=this._functions),c}static build(t){return new r.Template(t.template,t.options||t.functions?{...t.options,functions:t.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(t){return!!t&&!!t[e.symbols.template]}refs(){if(!this._template)return;const t=[];for(const c of this._template)typeof c!="string"&&t.push(...c.refs);return t}resolve(t,c,n,l){return this._template&&this._template.length===1?this._part(this._template[0],t,c,n,l,{}):this.render(t,c,n,l)}_part(t,...c){return t.ref?t.ref.resolve(...c):t.formula.evaluate(c)}render(t,c,n,l,m={}){if(!this.isDynamic())return this.rendered;const a=[];for(const y of this._template)if(typeof y=="string")a.push(y);else{const R=this._part(y,t,c,n,l,m),_=r.stringify(R,t,c,n,l,m);if(_!==void 0){const f=y.raw||(m.errors&&m.errors.escapeHtml)===!1?_:h(_);a.push(r.wrap(f,y.wrapped&&n.errors.wrap.label))}}return a.join("")}_ref(t,{raw:c,wrapped:n}){const l=[],m=y=>{const R=s.create(y,this._settings);return l.push(R),_=>{const f=R.resolve(..._);return f!==void 0?f:null}};try{const y=this._functions?{...r.functions,...this._functions}:r.functions;var a=new u.Parser(t,{reference:m,functions:y,constants:r.constants})}catch(y){throw y.message=`Invalid template variable "${t}" fails due to: ${y.message}`,y}if(a.single){if(a.single.type==="reference"){const y=l[0];return{ref:y,raw:c,refs:l,wrapped:n||y.type==="local"&&y.key==="label"}}return r.stringify(a.single.value)}return{formula:a,raw:c,refs:l}}toString(){return this.source}},r.Template.prototype[e.symbols.template]=!0,r.Template.prototype.isImmutable=!0,r.encode=function(t){return t.replace(/\\(\{+)/g,(c,n)=>r.opens.slice(0,n.length)).replace(/\\(\}+)/g,(c,n)=>r.closes.slice(0,n.length))},r.decode=function(t){return t.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},r.split=function(t){const c=[];let n="";for(let l=0;l<t.length;++l){const m=t[l];if(m==="{"){let a="";for(;l+1<t.length&&t[l+1]==="{";)a+="{",++l;c.push(n),n=a}else n+=m}return c.push(n),c},r.wrap=function(t,c){return c?c.length===1?`${c}${t}${c}`:`${c[0]}${t}${c[1]}`:t},r.stringify=function(t,c,n,l,m,a={}){const y=typeof t,R=l&&l.errors&&l.errors.wrap||{};let _=!1;if(s.isRef(t)&&t.render&&(_=t.in,t=t.resolve(c,n,l,m,{in:t.in,...a})),t===null)return"null";if(y==="string")return r.wrap(t,a.arrayItems&&R.string);if(y==="number"||y==="function"||y==="symbol")return t.toString();if(y!=="object")return JSON.stringify(t);if(t instanceof Date)return r.Template.date(t,l);if(t instanceof Map){const d=[];for(const[v,E]of t.entries())d.push(`${v.toString()} -> ${E.toString()}`);t=d}if(!Array.isArray(t))return t.toString();const f=[];for(const d of t)f.push(r.stringify(d,c,n,l,m,{arrayItems:!0,...a}));return r.wrap(f.join(", "),!_&&R.array)},r.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},r.functions={if:(t,c,n)=>t?c:n,length:t=>typeof t=="string"?t.length:t&&typeof t=="object"?Array.isArray(t)?t.length:Object.keys(t).length:null,msg(t){const[c,n,l,m,a]=this,y=a.messages;if(!y)return"";const R=i.template(c,y[0],t,n,l)||i.template(c,y[1],t,n,l);return R?R.render(c,n,l,m,a):""},number:t=>typeof t=="number"?t:typeof t=="string"?parseFloat(t):typeof t=="boolean"?t?1:0:t instanceof Date?t.getTime():null}},4946:(k,w,p)=>{const o=p(375),g=p(1687),h=p(8068),u=p(8160),e=p(3292),i=p(6354),s=p(6133),r={};k.exports=h.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:s.toSibling}},args:(t,...c)=>c.length===1&&Array.isArray(c[0])?t.try(...c[0]):t.try(...c),validate(t,c){const{schema:n,error:l,state:m,prefs:a}=c;if(n._flags.match){const R=[],_=[];for(let d=0;d<n.$_terms.matches.length;++d){const v=n.$_terms.matches[d],E=m.nest(v.schema,`match.${d}`);E.snapshot();const S=v.schema.$_validate(t,E,a);S.errors?(_.push(S.errors),E.restore()):(R.push(S.value),E.commit())}if(R.length===0)return{errors:l("alternatives.any",{details:_.map(d=>i.details(d,{override:!1}))})};if(n._flags.match==="one")return R.length===1?{value:R[0]}:{errors:l("alternatives.one")};if(R.length!==n.$_terms.matches.length)return{errors:l("alternatives.all",{details:_.map(d=>i.details(d,{override:!1}))})};const f=d=>d.$_terms.matches.some(v=>v.schema.type==="object"||v.schema.type==="alternatives"&&f(v.schema));return f(n)?{value:R.reduce((d,v)=>g(d,v,{mergeArrays:!1}))}:{value:R[R.length-1]}}const y=[];for(let R=0;R<n.$_terms.matches.length;++R){const _=n.$_terms.matches[R];if(_.schema){const v=m.nest(_.schema,`match.${R}`);v.snapshot();const E=_.schema.$_validate(t,v,a);if(!E.errors)return v.commit(),E;v.restore(),y.push({schema:_.schema,reports:E.errors});continue}const f=_.ref?_.ref.resolve(t,m,a):t,d=_.is?[_]:_.switch;for(let v=0;v<d.length;++v){const E=d[v],{is:S,then:O,otherwise:A}=E,I=`match.${R}${_.switch?"."+v:""}`;if(S.$_match(f,m.nest(S,`${I}.is`),a)){if(O)return O.$_validate(t,m.nest(O,`${I}.then`),a)}else if(A)return A.$_validate(t,m.nest(A,`${I}.otherwise`),a)}}return r.errors(y,c)},rules:{conditional:{method(t,c){o(!this._flags._endedSwitch,"Unreachable condition"),o(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),o(c.break===void 0,"Cannot use break option with alternatives conditional");const n=this.clone(),l=e.when(n,t,c),m=l.is?[l]:l.switch;for(const a of m)if(a.then&&a.otherwise){n.$_setFlag("_endedSwitch",!0,{clone:!1});break}return n.$_terms.matches.push(l),n.$_mutateRebuild()}},match:{method(t){if(o(["any","one","all"].includes(t),"Invalid alternatives match mode",t),t!=="any")for(const c of this.$_terms.matches)o(c.schema,"Cannot combine match mode",t,"with conditional rules");return this.$_setFlag("match",t)}},try:{method(...t){o(t.length,"Missing alternative schemas"),u.verifyFlat(t,"try"),o(!this._flags._endedSwitch,"Unreachable condition");const c=this.clone();for(const n of t)c.$_terms.matches.push({schema:c.$_compile(n)});return c.$_mutateRebuild()}}},overrides:{label(t){return this.$_parent("label",t).$_modify({each:(c,n)=>n.path[0]!=="is"&&typeof c._flags.label!="string"?c.label(t):void 0,ref:!1})}},rebuild(t){t.$_modify({each:c=>{u.isSchema(c)&&c.type==="array"&&t.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(t,c){if(c.matches)for(const n of c.matches){const{schema:l,ref:m,is:a,not:y,then:R,otherwise:_}=n;t=l?t.try(l):m?t.conditional(m,{is:a,then:R,not:y,otherwise:_,switch:n.switch}):t.conditional(a,{then:R,otherwise:_})}return t}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),r.errors=function(t,{error:c,state:n}){if(!t.length)return{errors:c("alternatives.any")};if(t.length===1)return{errors:t[0].reports};const l=new Set,m=[];for(const{reports:a,schema:y}of t){if(a.length>1)return r.unmatched(t,c);const R=a[0];if(R instanceof i.Report==0)return r.unmatched(t,c);if(R.state.path.length!==n.path.length){m.push({type:y.type,report:R});continue}if(R.code==="any.only"){for(const d of R.local.valids)l.add(d);continue}const[_,f]=R.code.split(".");f==="base"?l.add(_):m.push({type:y.type,report:R})}return m.length?m.length===1?{errors:m[0].report}:r.unmatched(t,c):{errors:c("alternatives.types",{types:[...l]})}},r.unmatched=function(t,c){const n=[];for(const l of t)n.push(...l.reports);return{errors:c("alternatives.match",i.details(n,{override:!1}))}}},8068:(k,w,p)=>{const o=p(375),g=p(7629),h=p(8160),u=p(6914);k.exports=g.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(e,i){return o(typeof e=="function","Method must be a function"),o(i===void 0||i&&typeof i=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:e,description:i}})},validate(e,i,{method:s}){try{return s(e,i)}catch(r){return i.error("any.custom",{error:r})}},args:["method","description"],multi:!0},messages:{method(e){return this.prefs({messages:e})}},shared:{method(e){o(h.isSchema(e)&&e._flags.id,"Schema must be a schema with an id");const i=this.clone();return i.$_terms.shared=i.$_terms.shared||[],i.$_terms.shared.push(e),i.$_mutateRegister(e),i}},warning:{method(e,i){return o(e&&typeof e=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:e,local:i},warn:!0})},validate:(e,i,{code:s,local:r})=>i.error(s,r),args:["code","local"],multi:!0}},modifiers:{keep(e,i=!0){e.keep=i},message(e,i){e.message=u.compile(i)},warn(e,i=!0){e.warn=i}},manifest:{build(e,i){for(const s in i){const r=i[s];if(["examples","externals","metas","notes","tags"].includes(s))for(const t of r)e=e[s.slice(0,-1)](t);else if(s!=="alterations")if(s!=="whens"){if(s==="shared")for(const t of r)e=e.shared(t)}else for(const t of r){const{ref:c,is:n,not:l,then:m,otherwise:a,concat:y}=t;e=y?e.concat(y):c?e.when(c,{is:n,not:l,then:m,otherwise:a,switch:t.switch,break:t.break}):e.when(n,{then:m,otherwise:a,break:t.break})}else{const t={};for(const{target:c,adjuster:n}of r)t[c]=n;e=e.alter(t)}}return e}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(k,w,p)=>{const o=p(375),g=p(9474),h=p(9621),u=p(8068),e=p(8160),i=p(3292),s={};k.exports=u.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(r,{schema:t,state:c,prefs:n}){if(!Array.isArray(r))return;const l=t.$_getRule("sort");return l?s.sort(t,r,l.args.options,c,n):void 0}},validate(r,{schema:t,error:c}){if(!Array.isArray(r)){if(t._flags.single){const n=[r];return n[e.symbols.arraySingle]=!0,{value:n}}return{errors:c("array.base")}}if(t.$_getRule("items")||t.$_terms.externals)return{value:r.slice()}},rules:{has:{method(r){r=this.$_compile(r,{appendPath:!0});const t=this.$_addRule({name:"has",args:{schema:r}});return t.$_mutateRegister(r),t},validate(r,{state:t,prefs:c,error:n},{schema:l}){const m=[r,...t.ancestors];for(let y=0;y<r.length;++y){const R=t.localize([...t.path,y],m,l);if(l.$_match(r[y],R,c))return r}const a=l._flags.label;return a?n("array.hasKnown",{patternLabel:a}):n("array.hasUnknown",null)},multi:!0},items:{method(...r){e.verifyFlat(r,"items");const t=this.$_addRule("items");for(let c=0;c<r.length;++c){const n=e.tryWithPath(()=>this.$_compile(r[c]),c,{append:!0});t.$_terms.items.push(n)}return t.$_mutateRebuild()},validate(r,{schema:t,error:c,state:n,prefs:l,errorsArray:m}){const a=t.$_terms._requireds.slice(),y=t.$_terms.ordered.slice(),R=[...t.$_terms._inclusions,...a],_=!r[e.symbols.arraySingle];delete r[e.symbols.arraySingle];const f=m();let d=r.length;for(let v=0;v<d;++v){const E=r[v];let S=!1,O=!1;const A=_?v:new Number(v),I=[...n.path,A];if(!t._flags.sparse&&E===void 0){if(f.push(c("array.sparse",{key:A,path:I,pos:v,value:void 0},n.localize(I))),l.abortEarly)return f;y.shift();continue}const N=[r,...n.ancestors];for(const V of t.$_terms._exclusions)if(V.$_match(E,n.localize(I,N,V),l,{presence:"ignore"})){if(f.push(c("array.excludes",{pos:v,value:E},n.localize(I))),l.abortEarly)return f;S=!0,y.shift();break}if(S)continue;if(t.$_terms.ordered.length){if(y.length){const V=y.shift(),D=V.$_validate(E,n.localize(I,N,V),l);if(D.errors){if(f.push(...D.errors),l.abortEarly)return f}else if(V._flags.result==="strip")s.fastSplice(r,v),--v,--d;else{if(!t._flags.sparse&&D.value===void 0){if(f.push(c("array.sparse",{key:A,path:I,pos:v,value:void 0},n.localize(I))),l.abortEarly)return f;continue}r[v]=D.value}continue}if(!t.$_terms.items.length){if(f.push(c("array.orderedLength",{pos:v,limit:t.$_terms.ordered.length})),l.abortEarly)return f;break}}const F=[];let K=a.length;for(let V=0;V<K;++V){const D=n.localize(I,N,a[V]);D.snapshot();const X=a[V].$_validate(E,D,l);if(F[V]=X,!X.errors){if(D.commit(),r[v]=X.value,O=!0,s.fastSplice(a,V),--V,--K,!t._flags.sparse&&X.value===void 0&&(f.push(c("array.sparse",{key:A,path:I,pos:v,value:void 0},n.localize(I))),l.abortEarly))return f;break}D.restore()}if(O)continue;const G=l.stripUnknown&&!!l.stripUnknown.arrays||!1;K=R.length;for(const V of R){let D;const X=a.indexOf(V);if(X!==-1)D=F[X];else{const J=n.localize(I,N,V);if(J.snapshot(),D=V.$_validate(E,J,l),!D.errors){J.commit(),V._flags.result==="strip"?(s.fastSplice(r,v),--v,--d):t._flags.sparse||D.value!==void 0?r[v]=D.value:(f.push(c("array.sparse",{key:A,path:I,pos:v,value:void 0},n.localize(I))),S=!0),O=!0;break}J.restore()}if(K===1){if(G){s.fastSplice(r,v),--v,--d,O=!0;break}if(f.push(...D.errors),l.abortEarly)return f;S=!0;break}}if(!S&&(t.$_terms._inclusions.length||t.$_terms._requireds.length)&&!O){if(G){s.fastSplice(r,v),--v,--d;continue}if(f.push(c("array.includes",{pos:v,value:E},n.localize(I))),l.abortEarly)return f}}return a.length&&s.fillMissedErrors(t,f,a,r,n,l),y.length&&(s.fillOrderedErrors(t,f,y,r,n,l),f.length||s.fillDefault(y,r,n,l)),f.length?f:r},priority:!0,manifest:!1},length:{method(r){return this.$_addRule({name:"length",args:{limit:r},operator:"="})},validate:(r,t,{limit:c},{name:n,operator:l,args:m})=>e.compare(r.length,c,l)?r:t.error("array."+n,{limit:m.limit,value:r}),args:[{name:"limit",ref:!0,assert:e.limit,message:"must be a positive integer"}]},max:{method(r){return this.$_addRule({name:"max",method:"length",args:{limit:r},operator:"<="})}},min:{method(r){return this.$_addRule({name:"min",method:"length",args:{limit:r},operator:">="})}},ordered:{method(...r){e.verifyFlat(r,"ordered");const t=this.$_addRule("items");for(let c=0;c<r.length;++c){const n=e.tryWithPath(()=>this.$_compile(r[c]),c,{append:!0});s.validateSingle(n,t),t.$_mutateRegister(n),t.$_terms.ordered.push(n)}return t.$_mutateRebuild()}},single:{method(r){const t=r===void 0||!!r;return o(!t||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",t)}},sort:{method(r={}){e.assertOptions(r,["by","order"]);const t={order:r.order||"ascending"};return r.by&&(t.by=i.ref(r.by,{ancestor:0}),o(!t.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:t}})},validate(r,{error:t,state:c,prefs:n,schema:l},{options:m}){const{value:a,errors:y}=s.sort(l,r,m,c,n);if(y)return y;for(let R=0;R<r.length;++R)if(r[R]!==a[R])return t("array.sort",{order:m.order,by:m.by?m.by.key:"value"});return r},convert:!0},sparse:{method(r){const t=r===void 0||!!r;return this._flags.sparse===t?this:(t?this.clone():this.$_addRule("items")).$_setFlag("sparse",t,{clone:!1})}},unique:{method(r,t={}){o(!r||typeof r=="function"||typeof r=="string","comparator must be a function or a string"),e.assertOptions(t,["ignoreUndefined","separator"]);const c={name:"unique",args:{options:t,comparator:r}};if(r)if(typeof r=="string"){const n=e.default(t.separator,".");c.path=n?r.split(n):[r]}else c.comparator=r;return this.$_addRule(c)},validate(r,{state:t,error:c,schema:n},{comparator:l,options:m},{comparator:a,path:y}){const R={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),object:new Map,function:new Map,custom:new Map},_=a||g,f=m.ignoreUndefined;for(let d=0;d<r.length;++d){const v=y?h(r[d],y):r[d],E=a?R.custom:R[typeof v];if(o(E,"Failed to find unique map container for type",typeof v),E instanceof Map){const S=E.entries();let O;for(;!(O=S.next()).done;)if(_(O.value[0],v)){const A=t.localize([...t.path,d],[r,...t.ancestors]),I={pos:d,value:r[d],dupePos:O.value[1],dupeValue:r[O.value[1]]};return y&&(I.path=l),c("array.unique",I,A)}E.set(v,d)}else{if((!f||v!==void 0)&&E[v]!==void 0){const S={pos:d,value:r[d],dupePos:E[v],dupeValue:r[E[v]]};return y&&(S.path=l),c("array.unique",S,t.localize([...t.path,d],[r,...t.ancestors]))}E[v]=d}}return r},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(r,t)=>new Set(r)}},rebuild(r){r.$_terms._inclusions=[],r.$_terms._exclusions=[],r.$_terms._requireds=[];for(const t of r.$_terms.items)s.validateSingle(t,r),t._flags.presence==="required"?r.$_terms._requireds.push(t):t._flags.presence==="forbidden"?r.$_terms._exclusions.push(t):r.$_terms._inclusions.push(t);for(const t of r.$_terms.ordered)s.validateSingle(t,r)},manifest:{build:(r,t)=>(t.items&&(r=r.items(...t.items)),t.ordered&&(r=r.ordered(...t.ordered)),r)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),s.fillMissedErrors=function(r,t,c,n,l,m){const a=[];let y=0;for(const R of c){const _=R._flags.label;_?a.push(_):++y}a.length?y?t.push(r.$_createError("array.includesRequiredBoth",n,{knownMisses:a,unknownMisses:y},l,m)):t.push(r.$_createError("array.includesRequiredKnowns",n,{knownMisses:a},l,m)):t.push(r.$_createError("array.includesRequiredUnknowns",n,{unknownMisses:y},l,m))},s.fillOrderedErrors=function(r,t,c,n,l,m){const a=[];for(const y of c)y._flags.presence==="required"&&a.push(y);a.length&&s.fillMissedErrors(r,t,a,n,l,m)},s.fillDefault=function(r,t,c,n){const l=[];let m=!0;for(let a=r.length-1;a>=0;--a){const y=r[a],R=[t,...c.ancestors],_=y.$_validate(void 0,c.localize(c.path,R,y),n).value;if(m){if(_===void 0)continue;m=!1}l.unshift(_)}l.length&&t.push(...l)},s.fastSplice=function(r,t){let c=t;for(;c<r.length;)r[c++]=r[c];--r.length},s.validateSingle=function(r,t){(r.type==="array"||r._flags._arrayItems)&&(o(!t._flags.single,"Cannot specify array item with single rule enabled"),t.$_setFlag("_arrayItems",!0,{clone:!1}))},s.sort=function(r,t,c,n,l){const m=c.order==="ascending"?1:-1,a=-1*m,y=m,R=(_,f)=>{let d=s.compare(_,f,a,y);if(d!==null||(c.by&&(_=c.by.resolve(_,n,l),f=c.by.resolve(f,n,l)),d=s.compare(_,f,a,y),d!==null))return d;const v=typeof _;if(v!==typeof f)throw r.$_createError("array.sort.mismatching",t,null,n,l);if(v!=="number"&&v!=="string")throw r.$_createError("array.sort.unsupported",t,{type:v},n,l);return v==="number"?(_-f)*m:_<f?a:y};try{return{value:t.slice().sort(R)}}catch(_){return{errors:_}}},s.compare=function(r,t,c,n){return r===t?0:r===void 0?1:t===void 0?-1:r===null?n:t===null?c:null}},4937:(k,w,p)=>{const o=p(375),g=p(8068),h=p(8160),u=p(2036),e={isBool:function(i){return typeof i=="boolean"}};k.exports=g.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(i,{schema:s}){if(typeof i!="boolean"){if(typeof i=="string"){const r=s._flags.sensitive?i:i.toLowerCase();i=r==="true"||r!=="false"&&i}return typeof i!="boolean"&&(i=s.$_terms.truthy&&s.$_terms.truthy.has(i,null,null,!s._flags.sensitive)||(!s.$_terms.falsy||!s.$_terms.falsy.has(i,null,null,!s._flags.sensitive))&&i),{value:i}}},validate(i,{error:s}){if(typeof i!="boolean")return{value:i,errors:s("boolean.base")}},rules:{truthy:{method(...i){h.verifyFlat(i,"truthy");const s=this.clone();s.$_terms.truthy=s.$_terms.truthy||new u;for(let r=0;r<i.length;++r){const t=i[r];o(t!==void 0,"Cannot call truthy with undefined"),s.$_terms.truthy.add(t)}return s}},falsy:{method(...i){h.verifyFlat(i,"falsy");const s=this.clone();s.$_terms.falsy=s.$_terms.falsy||new u;for(let r=0;r<i.length;++r){const t=i[r];o(t!==void 0,"Cannot call falsy with undefined"),s.$_terms.falsy.add(t)}return s}},sensitive:{method(i=!0){return this.$_setFlag("sensitive",i)}}},cast:{number:{from:e.isBool,to:(i,s)=>i?1:0},string:{from:e.isBool,to:(i,s)=>i?"true":"false"}},manifest:{build:(i,s)=>(s.truthy&&(i=i.truthy(...s.truthy)),s.falsy&&(i=i.falsy(...s.falsy)),i)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(k,w,p)=>{const o=p(375),g=p(8068),h=p(8160),u=p(3328),e={isDate:function(i){return i instanceof Date}};k.exports=g.extend({type:"date",coerce:{from:["number","string"],method:(i,{schema:s})=>({value:e.parse(i,s._flags.format)||i})},validate(i,{schema:s,error:r,prefs:t}){if(i instanceof Date&&!isNaN(i.getTime()))return;const c=s._flags.format;return t.convert&&c&&typeof i=="string"?{value:i,errors:r("date.format",{format:c})}:{value:i,errors:r("date.base")}},rules:{compare:{method:!1,validate(i,s,{date:r},{name:t,operator:c,args:n}){const l=r==="now"?Date.now():r.getTime();return h.compare(i.getTime(),l,c)?i:s.error("date."+t,{limit:n.date,value:i})},args:[{name:"date",ref:!0,normalize:i=>i==="now"?i:e.parse(i),assert:i=>i!==null,message:"must have a valid date format"}]},format:{method(i){return o(["iso","javascript","unix"].includes(i),"Unknown date format",i),this.$_setFlag("format",i)}},greater:{method(i){return this.$_addRule({name:"greater",method:"compare",args:{date:i},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(i){return this.$_addRule({name:"less",method:"compare",args:{date:i},operator:"<"})}},max:{method(i){return this.$_addRule({name:"max",method:"compare",args:{date:i},operator:"<="})}},min:{method(i){return this.$_addRule({name:"min",method:"compare",args:{date:i},operator:">="})}},timestamp:{method(i="javascript"){return o(["javascript","unix"].includes(i),'"type" must be one of "javascript, unix"'),this.format(i)}}},cast:{number:{from:e.isDate,to:(i,s)=>i.getTime()},string:{from:e.isDate,to:(i,{prefs:s})=>u.date(i,s)}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),e.parse=function(i,s){if(i instanceof Date)return i;if(typeof i!="string"&&(isNaN(i)||!isFinite(i))||/^\s*$/.test(i))return null;if(s==="iso")return h.isIsoDate(i)?e.date(i.toString()):null;const r=i;if(typeof i=="string"&&/^[+-]?\d+(\.\d+)?$/.test(i)&&(i=parseFloat(i)),s){if(s==="javascript")return e.date(1*i);if(s==="unix")return e.date(1e3*i);if(typeof r=="string")return null}return e.date(i)},e.date=function(i){const s=new Date(i);return isNaN(s.getTime())?null:s}},390:(k,w,p)=>{const o=p(375),g=p(7824);k.exports=g.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(h){return o(Number.isSafeInteger(h)&&h>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:h}})},validate:(h,u,{n:e})=>h.length===e?h:u.error("function.arity",{n:e})},class:{method(){return this.$_addRule("class")},validate:(h,u)=>/^\s*class\s/.test(h.toString())?h:u.error("function.class",{value:h})},minArity:{method(h){return o(Number.isSafeInteger(h)&&h>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:h}})},validate:(h,u,{n:e})=>h.length>=e?h:u.error("function.minArity",{n:e})},maxArity:{method(h){return o(Number.isSafeInteger(h)&&h>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:h}})},validate:(h,u,{n:e})=>h.length<=e?h:u.error("function.maxArity",{n:e})}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(k,w,p)=>{const o=p(978),g=p(375),h=p(8571),u=p(3652),e=p(8068),i=p(8160),s=p(3292),r=p(6354),t=p(6133),c=p(3328),n={renameDefaults:{alias:!1,multiple:!1,override:!1}};k.exports=e.extend({type:"_keys",properties:{typeof:"object"},flags:{unknown:{default:!1}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:"schema",to:"key"}}},patterns:{init:null},renames:{init:null}},args:(l,m)=>l.keys(m),validate(l,{schema:m,error:a,state:y,prefs:R}){if(!l||typeof l!==m.$_property("typeof")||Array.isArray(l))return{value:l,errors:a("object.base",{type:m.$_property("typeof")})};if(!(m.$_terms.renames||m.$_terms.dependencies||m.$_terms.keys||m.$_terms.patterns||m.$_terms.externals))return;l=n.clone(l,R);const _=[];if(m.$_terms.renames&&!n.rename(m,l,y,R,_))return{value:l,errors:_};if(!m.$_terms.keys&&!m.$_terms.patterns&&!m.$_terms.dependencies)return{value:l,errors:_};const f=new Set(Object.keys(l));if(m.$_terms.keys){const d=[l,...y.ancestors];for(const v of m.$_terms.keys){const E=v.key,S=l[E];f.delete(E);const O=y.localize([...y.path,E],d,v),A=v.schema.$_validate(S,O,R);if(A.errors){if(R.abortEarly)return{value:l,errors:A.errors};A.value!==void 0&&(l[E]=A.value),_.push(...A.errors)}else v.schema._flags.result==="strip"||A.value===void 0&&S!==void 0?delete l[E]:A.value!==void 0&&(l[E]=A.value)}}if(f.size||m._flags._hasPatternMatch){const d=n.unknown(m,l,f,_,y,R);if(d)return d}if(m.$_terms.dependencies)for(const d of m.$_terms.dependencies){if(d.key!==null&&n.isPresent(d.options)(d.key.resolve(l,y,R,null,{shadow:!1}))===!1)continue;const v=n.dependencies[d.rel](m,d,l,y,R);if(v){const E=m.$_createError(v.code,l,v.context,y,R);if(R.abortEarly)return{value:l,errors:E};_.push(E)}}return{value:l,errors:_}},rules:{and:{method(...l){return i.verifyFlat(l,"and"),n.dependency(this,"and",null,l)}},append:{method(l){return l==null||Object.keys(l).length===0?this:this.keys(l)}},assert:{method(l,m,a){c.isTemplate(l)||(l=s.ref(l)),g(a===void 0||typeof a=="string","Message must be a string"),m=this.$_compile(m,{appendPath:!0});const y=this.$_addRule({name:"assert",args:{subject:l,schema:m,message:a}});return y.$_mutateRegister(l),y.$_mutateRegister(m),y},validate(l,{error:m,prefs:a,state:y},{subject:R,schema:_,message:f}){const d=R.resolve(l,y,a),v=t.isRef(R)?R.absolute(y):[];return _.$_match(d,y.localize(v,[l,...y.ancestors],_),a)?l:m("object.assert",{subject:R,message:f})},args:["subject","schema","message"],multi:!0},instance:{method(l,m){return g(typeof l=="function","constructor must be a function"),m=m||l.name,this.$_addRule({name:"instance",args:{constructor:l,name:m}})},validate:(l,m,{constructor:a,name:y})=>l instanceof a?l:m.error("object.instance",{type:y,value:l}),args:["constructor","name"]},keys:{method(l){g(l===void 0||typeof l=="object","Object schema must be a valid object"),g(!i.isSchema(l),"Object schema cannot be a joi schema");const m=this.clone();if(l)if(Object.keys(l).length){m.$_terms.keys=m.$_terms.keys?m.$_terms.keys.filter(a=>!l.hasOwnProperty(a.key)):new n.Keys;for(const a in l)i.tryWithPath(()=>m.$_terms.keys.push({key:a,schema:this.$_compile(l[a])}),a)}else m.$_terms.keys=new n.Keys;else m.$_terms.keys=null;return m.$_mutateRebuild()}},length:{method(l){return this.$_addRule({name:"length",args:{limit:l},operator:"="})},validate:(l,m,{limit:a},{name:y,operator:R,args:_})=>i.compare(Object.keys(l).length,a,R)?l:m.error("object."+y,{limit:_.limit,value:l}),args:[{name:"limit",ref:!0,assert:i.limit,message:"must be a positive integer"}]},max:{method(l){return this.$_addRule({name:"max",method:"length",args:{limit:l},operator:"<="})}},min:{method(l){return this.$_addRule({name:"min",method:"length",args:{limit:l},operator:">="})}},nand:{method(...l){return i.verifyFlat(l,"nand"),n.dependency(this,"nand",null,l)}},or:{method(...l){return i.verifyFlat(l,"or"),n.dependency(this,"or",null,l)}},oxor:{method(...l){return n.dependency(this,"oxor",null,l)}},pattern:{method(l,m,a={}){const y=l instanceof RegExp;y||(l=this.$_compile(l,{appendPath:!0})),g(m!==void 0,"Invalid rule"),i.assertOptions(a,["fallthrough","matches"]),y&&g(!l.flags.includes("g")&&!l.flags.includes("y"),"pattern should not use global or sticky mode"),m=this.$_compile(m,{appendPath:!0});const R=this.clone();R.$_terms.patterns=R.$_terms.patterns||[];const _={[y?"regex":"schema"]:l,rule:m};return a.matches&&(_.matches=this.$_compile(a.matches),_.matches.type!=="array"&&(_.matches=_.matches.$_root.array().items(_.matches)),R.$_mutateRegister(_.matches),R.$_setFlag("_hasPatternMatch",!0,{clone:!1})),a.fallthrough&&(_.fallthrough=!0),R.$_terms.patterns.push(_),R.$_mutateRegister(m),R}},ref:{method(){return this.$_addRule("ref")},validate:(l,m)=>t.isRef(l)?l:m.error("object.refType",{value:l})},regex:{method(){return this.$_addRule("regex")},validate:(l,m)=>l instanceof RegExp?l:m.error("object.regex",{value:l})},rename:{method(l,m,a={}){g(typeof l=="string"||l instanceof RegExp,"Rename missing the from argument"),g(typeof m=="string"||m instanceof c,"Invalid rename to argument"),g(m!==l,"Cannot rename key to same name:",l),i.assertOptions(a,["alias","ignoreUndefined","override","multiple"]);const y=this.clone();y.$_terms.renames=y.$_terms.renames||[];for(const R of y.$_terms.renames)g(R.from!==l,"Cannot rename the same key multiple times");return m instanceof c&&y.$_mutateRegister(m),y.$_terms.renames.push({from:l,to:m,options:o(n.renameDefaults,a)}),y}},schema:{method(l="any"){return this.$_addRule({name:"schema",args:{type:l}})},validate:(l,m,{type:a})=>!i.isSchema(l)||a!=="any"&&l.type!==a?m.error("object.schema",{type:a}):l},unknown:{method(l){return this.$_setFlag("unknown",l!==!1)}},with:{method(l,m,a={}){return n.dependency(this,"with",l,m,a)}},without:{method(l,m,a={}){return n.dependency(this,"without",l,m,a)}},xor:{method(...l){return i.verifyFlat(l,"xor"),n.dependency(this,"xor",null,l)}}},overrides:{default(l,m){return l===void 0&&(l=i.symbols.deepDefault),this.$_parent("default",l,m)}},rebuild(l){if(l.$_terms.keys){const m=new u.Sorter;for(const a of l.$_terms.keys)i.tryWithPath(()=>m.add(a,{after:a.schema.$_rootReferences(),group:a.key}),a.key);l.$_terms.keys=new n.Keys(...m.nodes)}},manifest:{build(l,m){if(m.keys&&(l=l.keys(m.keys)),m.dependencies)for(const{rel:a,key:y=null,peers:R,options:_}of m.dependencies)l=n.dependency(l,a,y,R,_);if(m.patterns)for(const{regex:a,schema:y,rule:R,fallthrough:_,matches:f}of m.patterns)l=l.pattern(a||y,R,{fallthrough:_,matches:f});if(m.renames)for(const{from:a,to:y,options:R}of m.renames)l=l.rename(a,y,R);return l}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),n.clone=function(l,m){if(typeof l=="object"){if(m.nonEnumerables)return h(l,{shallow:!0});const y=Object.create(Object.getPrototypeOf(l));return Object.assign(y,l),y}const a=function(...y){return l.apply(this,y)};return a.prototype=h(l.prototype),Object.defineProperty(a,"name",{value:l.name,writable:!1}),Object.defineProperty(a,"length",{value:l.length,writable:!1}),Object.assign(a,l),a},n.dependency=function(l,m,a,y,R){g(a===null||typeof a=="string",m,"key must be a strings"),R||(R=y.length>1&&typeof y[y.length-1]=="object"?y.pop():{}),i.assertOptions(R,["separator","isPresent"]),y=[].concat(y);const _=i.default(R.separator,"."),f=[];for(const v of y)g(typeof v=="string",m,"peers must be strings"),f.push(s.ref(v,{separator:_,ancestor:0,prefix:!1}));a!==null&&(a=s.ref(a,{separator:_,ancestor:0,prefix:!1}));const d=l.clone();return d.$_terms.dependencies=d.$_terms.dependencies||[],d.$_terms.dependencies.push(new n.Dependency(m,a,f,y,R)),d},n.dependencies={and(l,m,a,y,R){const _=[],f=[],d=m.peers.length,v=n.isPresent(m.options);for(const E of m.peers)v(E.resolve(a,y,R,null,{shadow:!1}))===!1?_.push(E.key):f.push(E.key);if(_.length!==d&&f.length!==d)return{code:"object.and",context:{present:f,presentWithLabels:n.keysToLabels(l,f),missing:_,missingWithLabels:n.keysToLabels(l,_)}}},nand(l,m,a,y,R){const _=[],f=n.isPresent(m.options);for(const E of m.peers)f(E.resolve(a,y,R,null,{shadow:!1}))&&_.push(E.key);if(_.length!==m.peers.length)return;const d=m.paths[0],v=m.paths.slice(1);return{code:"object.nand",context:{main:d,mainWithLabel:n.keysToLabels(l,d),peers:v,peersWithLabels:n.keysToLabels(l,v)}}},or(l,m,a,y,R){const _=n.isPresent(m.options);for(const f of m.peers)if(_(f.resolve(a,y,R,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:m.paths,peersWithLabels:n.keysToLabels(l,m.paths)}}},oxor(l,m,a,y,R){const _=[],f=n.isPresent(m.options);for(const v of m.peers)f(v.resolve(a,y,R,null,{shadow:!1}))&&_.push(v.key);if(!_.length||_.length===1)return;const d={peers:m.paths,peersWithLabels:n.keysToLabels(l,m.paths)};return d.present=_,d.presentWithLabels=n.keysToLabels(l,_),{code:"object.oxor",context:d}},with(l,m,a,y,R){const _=n.isPresent(m.options);for(const f of m.peers)if(_(f.resolve(a,y,R,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:m.key.key,mainWithLabel:n.keysToLabels(l,m.key.key),peer:f.key,peerWithLabel:n.keysToLabels(l,f.key)}}},without(l,m,a,y,R){const _=n.isPresent(m.options);for(const f of m.peers)if(_(f.resolve(a,y,R,null,{shadow:!1})))return{code:"object.without",context:{main:m.key.key,mainWithLabel:n.keysToLabels(l,m.key.key),peer:f.key,peerWithLabel:n.keysToLabels(l,f.key)}}},xor(l,m,a,y,R){const _=[],f=n.isPresent(m.options);for(const v of m.peers)f(v.resolve(a,y,R,null,{shadow:!1}))&&_.push(v.key);if(_.length===1)return;const d={peers:m.paths,peersWithLabels:n.keysToLabels(l,m.paths)};return _.length===0?{code:"object.missing",context:d}:(d.present=_,d.presentWithLabels=n.keysToLabels(l,_),{code:"object.xor",context:d})}},n.keysToLabels=function(l,m){return Array.isArray(m)?m.map(a=>l.$_mapLabels(a)):l.$_mapLabels(m)},n.isPresent=function(l){return typeof l.isPresent=="function"?l.isPresent:m=>m!==void 0},n.rename=function(l,m,a,y,R){const _={};for(const f of l.$_terms.renames){const d=[],v=typeof f.from!="string";if(v)for(const E in m){if(m[E]===void 0&&f.options.ignoreUndefined||E===f.to)continue;const S=f.from.exec(E);S&&d.push({from:E,to:f.to,match:S})}else!Object.prototype.hasOwnProperty.call(m,f.from)||m[f.from]===void 0&&f.options.ignoreUndefined||d.push(f);for(const E of d){const S=E.from;let O=E.to;if(O instanceof c&&(O=O.render(m,a,y,E.match)),S!==O){if(!f.options.multiple&&_[O]&&(R.push(l.$_createError("object.rename.multiple",m,{from:S,to:O,pattern:v},a,y)),y.abortEarly)||Object.prototype.hasOwnProperty.call(m,O)&&!f.options.override&&!_[O]&&(R.push(l.$_createError("object.rename.override",m,{from:S,to:O,pattern:v},a,y)),y.abortEarly))return!1;m[S]===void 0?delete m[O]:m[O]=m[S],_[O]=!0,f.options.alias||delete m[S]}}}return!0},n.unknown=function(l,m,a,y,R,_){if(l.$_terms.patterns){let f=!1;const d=l.$_terms.patterns.map(E=>{if(E.matches)return f=!0,[]}),v=[m,...R.ancestors];for(const E of a){const S=m[E],O=[...R.path,E];for(let A=0;A<l.$_terms.patterns.length;++A){const I=l.$_terms.patterns[A];if(I.regex){const K=I.regex.test(E);if(R.mainstay.tracer.debug(R,"rule",`pattern.${A}`,K?"pass":"error"),!K)continue}else if(!I.schema.$_match(E,R.nest(I.schema,`pattern.${A}`),_))continue;a.delete(E);const N=R.localize(O,v,{schema:I.rule,key:E}),F=I.rule.$_validate(S,N,_);if(F.errors){if(_.abortEarly)return{value:m,errors:F.errors};y.push(...F.errors)}if(I.matches&&d[A].push(E),m[E]=F.value,!I.fallthrough)break}}if(f)for(let E=0;E<d.length;++E){const S=d[E];if(!S)continue;const O=l.$_terms.patterns[E].matches,A=R.localize(R.path,v,O),I=O.$_validate(S,A,_);if(I.errors){const N=r.details(I.errors,{override:!1});N.matches=S;const F=l.$_createError("object.pattern.match",m,N,R,_);if(_.abortEarly)return{value:m,errors:F};y.push(F)}}}if(a.size&&(l.$_terms.keys||l.$_terms.patterns)){if(_.stripUnknown&&!l._flags.unknown||_.skipFunctions){const f=!(!_.stripUnknown||_.stripUnknown!==!0&&!_.stripUnknown.objects);for(const d of a)f?(delete m[d],a.delete(d)):typeof m[d]=="function"&&a.delete(d)}if(!i.default(l._flags.unknown,_.allowUnknown))for(const f of a){const d=R.localize([...R.path,f],[]),v=l.$_createError("object.unknown",m[f],{child:f},d,_,{flags:!1});if(_.abortEarly)return{value:m,errors:v};y.push(v)}}},n.Dependency=class{constructor(l,m,a,y,R){this.rel=l,this.key=m,this.peers=a,this.paths=y,this.options=R}describe(){const l={rel:this.rel,peers:this.paths};return this.key!==null&&(l.key=this.key.key),this.peers[0].separator!=="."&&(l.options={...l.options,separator:this.peers[0].separator}),this.options.isPresent&&(l.options={...l.options,isPresent:this.options.isPresent}),l}},n.Keys=class extends Array{concat(l){const m=this.slice(),a=new Map;for(let y=0;y<m.length;++y)a.set(m[y].key,y);for(const y of l){const R=y.key,_=a.get(R);_!==void 0?m[_]={key:R,schema:m[_].schema.concat(y.schema)}:m.push(y)}return m}}},8785:(k,w,p)=>{const o=p(375),g=p(8068),h=p(8160),u=p(3292),e=p(6354),i={};k.exports=g.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(s,r)=>s.ref(r),validate(s,{schema:r,state:t,prefs:c}){o(r.$_terms.link,"Uninitialized link schema");const n=i.generate(r,s,t,c),l=r.$_terms.link[0].ref;return n.$_validate(s,t.nest(n,`link:${l.display}:${n.type}`),c)},generate:(s,r,t,c)=>i.generate(s,r,t,c),rules:{ref:{method(s){o(!this.$_terms.link,"Cannot reinitialize schema"),s=u.ref(s),o(s.type==="value"||s.type==="local","Invalid reference type:",s.type),o(s.type==="local"||s.ancestor==="root"||s.ancestor>0,"Link cannot reference itself");const r=this.clone();return r.$_terms.link=[{ref:s}],r}},relative:{method(s=!0){return this.$_setFlag("relative",s)}}},overrides:{concat(s){o(this.$_terms.link,"Uninitialized link schema"),o(h.isSchema(s),"Invalid schema object"),o(s.type!=="link","Cannot merge type link with another link");const r=this.clone();return r.$_terms.whens||(r.$_terms.whens=[]),r.$_terms.whens.push({concat:s}),r.$_mutateRebuild()}},manifest:{build:(s,r)=>(o(r.link,"Invalid link description missing link"),s.ref(r.link))}}),i.generate=function(s,r,t,c){let n=t.mainstay.links.get(s);if(n)return n._generate(r,t,c).schema;const l=s.$_terms.link[0].ref,{perspective:m,path:a}=i.perspective(l,t);i.assert(m,"which is outside of schema boundaries",l,s,t,c);try{n=a.length?m.$_reach(a):m}catch{i.assert(!1,"to non-existing schema",l,s,t,c)}return i.assert(n.type!=="link","which is another link",l,s,t,c),s._flags.relative||t.mainstay.links.set(s,n),n._generate(r,t,c).schema},i.perspective=function(s,r){if(s.type==="local"){for(const{schema:t,key:c}of r.schemas){if((t._flags.id||c)===s.path[0])return{perspective:t,path:s.path.slice(1)};if(t.$_terms.shared){for(const n of t.$_terms.shared)if(n._flags.id===s.path[0])return{perspective:n,path:s.path.slice(1)}}}return{perspective:null,path:null}}return s.ancestor==="root"?{perspective:r.schemas[r.schemas.length-1].schema,path:s.path}:{perspective:r.schemas[s.ancestor]&&r.schemas[s.ancestor].schema,path:s.path}},i.assert=function(s,r,t,c,n,l){s||o(!1,`"${e.label(c._flags,n,l)}" contains link reference "${t.display}" ${r}`)}},3832:(k,w,p)=>{const o=p(375),g=p(8068),h=p(8160),u={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(e){const i=e.toString(),s=i.indexOf("."),r=i.indexOf("e");return(s<0?0:(r<0?i.length:r)-s-1)+(r<0?0:Math.max(0,-parseInt(i.slice(r+1))))}};k.exports=g.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(e,{schema:i,error:s}){if(!e.match(u.numberRx))return;e=e.trim();const r={value:parseFloat(e)};if(r.value===0&&(r.value=0),!i._flags.unsafe)if(e.match(/e/i)){if(u.extractSignificantDigits(e)!==u.extractSignificantDigits(String(r.value)))return r.errors=s("number.unsafe"),r}else{const t=r.value.toString();if(t.match(/e/i))return r;if(t!==u.normalizeDecimal(e))return r.errors=s("number.unsafe"),r}return r}},validate(e,{schema:i,error:s,prefs:r}){if(e===1/0||e===-1/0)return{value:e,errors:s("number.infinity")};if(!h.isNumber(e))return{value:e,errors:s("number.base")};const t={value:e};if(r.convert){const c=i.$_getRule("precision");if(c){const n=Math.pow(10,c.args.limit);t.value=Math.round(t.value*n)/n}}return t.value===0&&(t.value=0),!i._flags.unsafe&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.errors=s("number.unsafe")),t},rules:{compare:{method:!1,validate:(e,i,{limit:s},{name:r,operator:t,args:c})=>h.compare(e,s,t)?e:i.error("number."+r,{limit:c.limit,value:e}),args:[{name:"limit",ref:!0,assert:h.isNumber,message:"must be a number"}]},greater:{method(e){return this.$_addRule({name:"greater",method:"compare",args:{limit:e},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate:(e,i)=>Math.trunc(e)-e==0?e:i.error("number.integer")},less:{method(e){return this.$_addRule({name:"less",method:"compare",args:{limit:e},operator:"<"})}},max:{method(e){return this.$_addRule({name:"max",method:"compare",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"compare",args:{limit:e},operator:">="})}},multiple:{method(e){const i=typeof e=="number"?u.decimalPlaces(e):null,s=Math.pow(10,i);return this.$_addRule({name:"multiple",args:{base:e,baseDecimalPlace:i,pfactor:s}})},validate:(e,i,{base:s,baseDecimalPlace:r,pfactor:t},c)=>u.decimalPlaces(e)>r?i.error("number.multiple",{multiple:c.args.base,value:e}):Math.round(t*e)%Math.round(t*s)==0?e:i.error("number.multiple",{multiple:c.args.base,value:e}),args:[{name:"base",ref:!0,assert:e=>typeof e=="number"&&isFinite(e)&&e>0,message:"must be a positive number"},"baseDecimalPlace","pfactor"],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(e,i)=>Number.isSafeInteger(e)&&e>=0&&e<=65535?e:i.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(e){return o(Number.isSafeInteger(e),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:e}})},validate(e,i,{limit:s}){const r=e.toString().match(u.precisionRx);return Math.max((r[1]?r[1].length:0)-(r[2]?parseInt(r[2],10):0),0)<=s?e:i.error("number.precision",{limit:s,value:e})},convert:!0},sign:{method(e){return o(["negative","positive"].includes(e),"Invalid sign",e),this.$_addRule({name:"sign",args:{sign:e}})},validate:(e,i,{sign:s})=>s==="negative"&&e<0||s==="positive"&&e>0?e:i.error(`number.${s}`)},unsafe:{method(e=!0){return o(typeof e=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",e)}}},cast:{string:{from:e=>typeof e=="number",to:(e,i)=>e.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),u.extractSignificantDigits=function(e){return e.replace(u.exponentialPartRegex,"").replace(u.dotRegex,"").replace(u.trailingZerosRegex,"").replace(u.leadingSignAndZerosRegex,"")},u.normalizeDecimal=function(e){return(e=e.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&e.endsWith("0")&&(e=e.replace(/0+$/,"")),e==="-0"?"0":e}},8966:(k,w,p)=>{const o=p(7824);k.exports=o.extend({type:"object",cast:{map:{from:g=>g&&typeof g=="object",to:(g,h)=>new Map(Object.entries(g))}}})},7417:(k,w,p)=>{const o=p(375),g=p(5380),h=p(1745),u=p(9959),e=p(6064),i=p(9926),s=p(5752),r=p(8068),t=p(8160),c={tlds:i instanceof Set&&{tlds:{allow:i,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:{withPrefix:/^0x[0-9a-f]+$/i,withOptionalPrefix:/^(?:0x)?[0-9a-f]+$/i,withoutPrefix:/^[0-9a-f]+$/i},ipRegex:u.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5",uuidv6:"6",uuidv7:"7",uuidv8:"8"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};k.exports=r.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(n,{schema:l,state:m,prefs:a}){const y=l.$_getRule("normalize");y&&(n=n.normalize(y.args.form));const R=l.$_getRule("case");R&&(n=R.args.direction==="upper"?n.toLocaleUpperCase():n.toLocaleLowerCase());const _=l.$_getRule("trim");if(_&&_.args.enabled&&(n=n.trim()),l.$_terms.replacements)for(const d of l.$_terms.replacements)n=n.replace(d.pattern,d.replacement);const f=l.$_getRule("hex");if(f&&f.args.options.byteAligned&&n.length%2!=0&&(n=`0${n}`),l.$_getRule("isoDate")){const d=c.isoDate(n);d&&(n=d)}if(l._flags.truncate){const d=l.$_getRule("max");if(d){let v=d.args.limit;if(t.isResolvable(v)&&(v=v.resolve(n,m,a),!t.limit(v)))return{value:n,errors:l.$_createError("any.ref",v,{ref:d.args.limit,arg:"limit",reason:"must be a positive integer"},m,a)};n=n.slice(0,v)}}return{value:n}}},validate(n,{schema:l,error:m}){if(typeof n!="string")return{value:n,errors:m("string.base")};if(n===""){const a=l.$_getRule("min");return a&&a.args.limit===0?void 0:{value:n,errors:m("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(n,l)=>/^[a-zA-Z0-9]+$/.test(n)?n:l.error("string.alphanum")},base64:{method(n={}){return t.assertOptions(n,["paddingRequired","urlSafe"]),n={urlSafe:!1,paddingRequired:!0,...n},o(typeof n.paddingRequired=="boolean","paddingRequired must be boolean"),o(typeof n.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:n}})},validate:(n,l,{options:m})=>c.base64Regex[m.paddingRequired][m.urlSafe].test(n)?n:l.error("string.base64")},case:{method(n){return o(["lower","upper"].includes(n),"Invalid case:",n),this.$_addRule({name:"case",args:{direction:n}})},validate:(n,l,{direction:m})=>m==="lower"&&n===n.toLocaleLowerCase()||m==="upper"&&n===n.toLocaleUpperCase()?n:l.error(`string.${m}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(n,l){let m=n.length,a=0,y=1;for(;m--;){const R=n.charAt(m)*y;a+=R-9*(R>9),y^=3}return a>0&&a%10==0?n:l.error("string.creditCard")}},dataUri:{method(n={}){return t.assertOptions(n,["paddingRequired"]),n={paddingRequired:!0,...n},o(typeof n.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:n}})},validate(n,l,{options:m}){const a=n.match(c.dataUriRegex);return a&&(!a[2]||a[2]!=="base64"||c.base64Regex[m.paddingRequired].false.test(a[3]))?n:l.error("string.dataUri")}},domain:{method(n){n&&t.assertOptions(n,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const l=c.addressOptions(n);return this.$_addRule({name:"domain",args:{options:n},address:l})},validate:(n,l,m,{address:a})=>g.isValid(n,a)?n:l.error("string.domain")},email:{method(n={}){t.assertOptions(n,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),o(n.multiple===void 0||typeof n.multiple=="boolean","multiple option must be an boolean");const l=c.addressOptions(n),m=new RegExp(`\\s*[${n.separator?e(n.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:n},regex:m,address:l})},validate(n,l,{options:m},{regex:a,address:y}){const R=m.multiple?n.split(a):[n],_=[];for(const f of R)h.isValid(f,y)||_.push(f);return _.length?l.error("string.email",{value:n,invalids:_}):n}},guid:{alias:"uuid",method(n={}){t.assertOptions(n,["version","separator"]);let l="";if(n.version){const y=[].concat(n.version);o(y.length>=1,"version must have at least 1 valid version specified");const R=new Set;for(let _=0;_<y.length;++_){const f=y[_];o(typeof f=="string","version at position "+_+" must be a string");const d=c.guidVersions[f.toLowerCase()];o(d,"version at position "+_+" must be one of "+Object.keys(c.guidVersions).join(", ")),o(!R.has(d),"version at position "+_+" must not be a duplicate"),l+=d,R.add(d)}}o(c.guidSeparators.has(n.separator),'separator must be one of true, false, "-", or ":"');const m=n.separator===void 0?"[:-]?":n.separator===!0?"[:-]":n.separator===!1?"[]?":`\\${n.separator}`,a=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${m})[0-9A-F]{4}\\2?[${l||"0-9A-F"}][0-9A-F]{3}\\2?[${l?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:n},regex:a})},validate(n,l,m,{regex:a}){const y=a.exec(n);return y?c.guidBrackets[y[1]]!==y[y.length-1]?l.error("string.guid"):n:l.error("string.guid")}},hex:{method(n={}){return t.assertOptions(n,["byteAligned","prefix"]),n={byteAligned:!1,prefix:!1,...n},o(typeof n.byteAligned=="boolean","byteAligned must be boolean"),o(typeof n.prefix=="boolean"||n.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:n}})},validate:(n,l,{options:m})=>(m.prefix==="optional"?c.hexRegex.withOptionalPrefix:m.prefix===!0?c.hexRegex.withPrefix:c.hexRegex.withoutPrefix).test(n)?m.byteAligned&&n.length%2!=0?l.error("string.hexAlign"):n:l.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(n,l)=>g.isValid(n,{minDomainSegments:1})||c.ipRegex.test(n)?n:l.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(n={}){t.assertOptions(n,["cidr","version"]);const{cidr:l,versions:m,regex:a}=u.regex(n),y=n.version?m:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:l,version:y}},regex:a})},validate:(n,l,{options:m},{regex:a})=>a.test(n)?n:m.version?l.error("string.ipVersion",{value:n,cidr:m.cidr,version:m.version}):l.error("string.ip",{value:n,cidr:m.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(n,{error:l})=>c.isoDate(n)?n:l("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(n,l)=>c.isoDurationRegex.test(n)?n:l.error("string.isoDuration")},length:{method(n,l){return c.length(this,"length",n,"=",l)},validate(n,l,{limit:m,encoding:a},{name:y,operator:R,args:_}){const f=!a&&n.length;return t.compare(f,m,R)?n:l.error("string."+y,{limit:_.limit,value:n,encoding:a})},args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(n,l){return c.length(this,"max",n,"<=",l)},args:["limit","encoding"]},min:{method(n,l){return c.length(this,"min",n,">=",l)},args:["limit","encoding"]},normalize:{method(n="NFC"){return o(c.normalizationForms.includes(n),"normalization form must be one of "+c.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:n}})},validate:(n,{error:l},{form:m})=>n===n.normalize(m)?n:l("string.normalize",{value:n,form:m}),convert:!0},pattern:{alias:"regex",method(n,l={}){o(n instanceof RegExp,"regex must be a RegExp"),o(!n.flags.includes("g")&&!n.flags.includes("y"),"regex should not use global or sticky mode"),typeof l=="string"&&(l={name:l}),t.assertOptions(l,["invert","name"]);const m=["string.pattern",l.invert?".invert":"",l.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:n,options:l},errorCode:m})},validate:(n,l,{regex:m,options:a},{errorCode:y})=>m.test(n)^a.invert?n:l.error(y,{name:a.name,regex:m,value:n}),args:["regex","options"],multi:!0},replace:{method(n,l){typeof n=="string"&&(n=new RegExp(e(n),"g")),o(n instanceof RegExp,"pattern must be a RegExp"),o(typeof l=="string","replacement must be a String");const m=this.clone();return m.$_terms.replacements||(m.$_terms.replacements=[]),m.$_terms.replacements.push({pattern:n,replacement:l}),m}},token:{method(){return this.$_addRule("token")},validate:(n,l)=>/^\w+$/.test(n)?n:l.error("string.token")},trim:{method(n=!0){return o(typeof n=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:n}})},validate:(n,l,{enabled:m})=>m&&n!==n.trim()?l.error("string.trim"):n,convert:!0},truncate:{method(n=!0){return o(typeof n=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",n)}},uppercase:{method(){return this.case("upper")}},uri:{method(n={}){t.assertOptions(n,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),n.domain&&t.assertOptions(n.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:l,scheme:m}=s.regex(n),a=n.domain?c.addressOptions(n.domain):null;return this.$_addRule({name:"uri",args:{options:n},regex:l,domain:a,scheme:m})},validate(n,l,{options:m},{regex:a,domain:y,scheme:R}){if(["http:/","https:/"].includes(n))return l.error("string.uri");const _=a.exec(n);if(_){const f=_[1]||_[2];return!y||m.allowRelative&&!f||g.isValid(f,y)?n:l.error("string.domain",{value:f})}return m.relativeOnly?l.error("string.uriRelativeOnly"):m.scheme?l.error("string.uriCustomScheme",{scheme:R,value:n}):l.error("string.uri")}}},manifest:{build(n,l){if(l.replacements)for(const{pattern:m,replacement:a}of l.replacements)n=n.replace(m,a);return n}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),c.addressOptions=function(n){if(!n)return c.tlds||n;if(o(n.minDomainSegments===void 0||Number.isSafeInteger(n.minDomainSegments)&&n.minDomainSegments>0,"minDomainSegments must be a positive integer"),o(n.maxDomainSegments===void 0||Number.isSafeInteger(n.maxDomainSegments)&&n.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),n.tlds===!1)return n;if(n.tlds===!0||n.tlds===void 0)return o(c.tlds,"Built-in TLD list disabled"),Object.assign({},n,c.tlds);o(typeof n.tlds=="object","tlds must be true, false, or an object");const l=n.tlds.deny;if(l)return Array.isArray(l)&&(n=Object.assign({},n,{tlds:{deny:new Set(l)}})),o(n.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),o(!n.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),c.validateTlds(n.tlds.deny,"tlds.deny"),n;const m=n.tlds.allow;return m?m===!0?(o(c.tlds,"Built-in TLD list disabled"),Object.assign({},n,c.tlds)):(Array.isArray(m)&&(n=Object.assign({},n,{tlds:{allow:new Set(m)}})),o(n.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),c.validateTlds(n.tlds.allow,"tlds.allow"),n):n},c.validateTlds=function(n,l){for(const m of n)o(g.isValid(m,{minDomainSegments:1,maxDomainSegments:1}),`${l} must contain valid top level domain names`)},c.isoDate=function(n){if(!t.isIsoDate(n))return null;/.*T.*[+-]\d\d$/.test(n)&&(n+="00");const l=new Date(n);return isNaN(l.getTime())?null:l.toISOString()},c.length=function(n,l,m,a,y){return o(!y||!1,"Invalid encoding:",y),n.$_addRule({name:l,method:"length",args:{limit:m,encoding:y},operator:a})}},8826:(k,w,p)=>{const o=p(375),g=p(8068),h={};h.Map=class extends Map{slice(){return new h.Map(this)}},k.exports=g.extend({type:"symbol",terms:{map:{init:new h.Map}},coerce:{method(u,{schema:e,error:i}){const s=e.$_terms.map.get(u);return s&&(u=s),e._flags.only&&typeof u!="symbol"?{value:u,errors:i("symbol.map",{map:e.$_terms.map})}:{value:u}}},validate(u,{error:e}){if(typeof u!="symbol")return{value:u,errors:e("symbol.base")}},rules:{map:{method(u){u&&!u[Symbol.iterator]&&typeof u=="object"&&(u=Object.entries(u)),o(u&&u[Symbol.iterator],"Iterable must be an iterable or object");const e=this.clone(),i=[];for(const s of u){o(s&&s[Symbol.iterator],"Entry must be an iterable");const[r,t]=s;o(typeof r!="object"&&typeof r!="function"&&typeof r!="symbol","Key must not be of type object, function, or Symbol"),o(typeof t=="symbol","Value must be a Symbol"),e.$_terms.map.set(r,t),i.push(t)}return e.valid(...i)}}},manifest:{build:(u,e)=>(e.map&&(u=u.map(e.map)),u)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(k,w,p)=>{const o=p(375),g=p(8571),h=p(738),u=p(9621),e=p(8160),i=p(6354),s=p(493),r={result:Symbol("result")};w.entry=function(t,c,n){let l=e.defaults;n&&(o(n.warnings===void 0,"Cannot override warnings preference in synchronous validation"),o(n.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),l=e.preferences(e.defaults,n));const m=r.entry(t,c,l);o(!m.mainstay.externals.length,"Schema with external rules must use validateAsync()");const a={value:m.value};return m.error&&(a.error=m.error),m.mainstay.warnings.length&&(a.warning=i.details(m.mainstay.warnings)),m.mainstay.debug&&(a.debug=m.mainstay.debug),m.mainstay.artifacts&&(a.artifacts=m.mainstay.artifacts),a},w.entryAsync=async function(t,c,n){let l=e.defaults;n&&(l=e.preferences(e.defaults,n));const m=r.entry(t,c,l),a=m.mainstay;if(m.error)throw a.debug&&(m.error.debug=a.debug),m.error;if(a.externals.length){let R=m.value;const _=[];for(const f of a.externals){const d=f.state.path,v=f.schema.type==="link"?a.links.get(f.schema):null;let E,S,O=R;const A=d.length?[R]:[],I=d.length?u(t,d):t;if(d.length){E=d[d.length-1];let N=R;for(const F of d.slice(0,-1))N=N[F],A.unshift(N);S=A[0],O=S[E]}try{const N=(K,G)=>(v||f.schema).$_createError(K,O,G,f.state,l),F=await f.method(O,{schema:f.schema,linked:v,state:f.state,prefs:n,original:I,error:N,errorsArray:r.errorsArray,warn:(K,G)=>a.warnings.push((v||f.schema).$_createError(K,O,G,f.state,l)),message:(K,G)=>(v||f.schema).$_createError("external",O,G,f.state,l,{messages:K})});if(F===void 0||F===O)continue;if(F instanceof i.Report){if(a.tracer.log(f.schema,f.state,"rule","external","error"),_.push(F),l.abortEarly)break;continue}if(Array.isArray(F)&&F[e.symbols.errors]){if(a.tracer.log(f.schema,f.state,"rule","external","error"),_.push(...F),l.abortEarly)break;continue}S?(a.tracer.value(f.state,"rule",O,F,"external"),S[E]=F):(a.tracer.value(f.state,"rule",R,F,"external"),R=F)}catch(N){throw l.errors.label&&(N.message+=` (${f.label})`),N}}if(m.value=R,_.length)throw m.error=i.process(_,t,l),a.debug&&(m.error.debug=a.debug),m.error}if(!l.warnings&&!l.debug&&!l.artifacts)return m.value;const y={value:m.value};return a.warnings.length&&(y.warning=i.details(a.warnings)),a.debug&&(y.debug=a.debug),a.artifacts&&(y.artifacts=a.artifacts),y},r.Mainstay=class{constructor(t,c,n){this.externals=[],this.warnings=[],this.tracer=t,this.debug=c,this.links=n,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const t=this._snapshots.pop();this.externals=t.externals,this.warnings=t.warnings}commit(){this._snapshots.pop()}},r.entry=function(t,c,n){const{tracer:l,cleanup:m}=r.tracer(c,n),a=n.debug?[]:null,y=c._ids._schemaChain?new Map:null,R=new r.Mainstay(l,a,y),_=c._ids._schemaChain?[{schema:c}]:null,f=new s([],[],{mainstay:R,schemas:_}),d=w.validate(t,c,f,n);m&&c.$_root.untrace();const v=i.process(d.errors,t,n);return{value:d.value,error:v,mainstay:R}},r.tracer=function(t,c){return t.$_root._tracer?{tracer:t.$_root._tracer._register(t)}:c.debug?(o(t.$_root.trace,"Debug mode not supported"),{tracer:t.$_root.trace()._register(t),cleanup:!0}):{tracer:r.ignore}},w.validate=function(t,c,n,l,m={}){if(c.$_terms.whens&&(c=c._generate(t,n,l).schema),c._preferences&&(l=r.prefs(c,l)),c._cache&&l.cache){const v=c._cache.get(t);if(n.mainstay.tracer.debug(n,"validate","cached",!!v),v)return v}const a=(v,E,S)=>c.$_createError(v,t,E,S||n,l),y={original:t,prefs:l,schema:c,state:n,error:a,errorsArray:r.errorsArray,warn:(v,E,S)=>n.mainstay.warnings.push(a(v,E,S)),message:(v,E)=>c.$_createError("custom",t,E,n,l,{messages:v})};n.mainstay.tracer.entry(c,n);const R=c._definition;if(R.prepare&&t!==void 0&&l.convert){const v=R.prepare(t,y);if(v){if(n.mainstay.tracer.value(n,"prepare",t,v.value),v.errors)return r.finalize(v.value,[].concat(v.errors),y);t=v.value}}if(R.coerce&&t!==void 0&&l.convert&&(!R.coerce.from||R.coerce.from.includes(typeof t))){const v=R.coerce.method(t,y);if(v){if(n.mainstay.tracer.value(n,"coerced",t,v.value),v.errors)return r.finalize(v.value,[].concat(v.errors),y);t=v.value}}const _=c._flags.empty;_&&_.$_match(r.trim(t,c),n.nest(_),e.defaults)&&(n.mainstay.tracer.value(n,"empty",t,void 0),t=void 0);const f=m.presence||c._flags.presence||(c._flags._endedSwitch?null:l.presence);if(t===void 0){if(f==="forbidden")return r.finalize(t,null,y);if(f==="required")return r.finalize(t,[c.$_createError("any.required",t,null,n,l)],y);if(f==="optional"){if(c._flags.default!==e.symbols.deepDefault)return r.finalize(t,null,y);n.mainstay.tracer.value(n,"default",t,{}),t={}}}else if(f==="forbidden")return r.finalize(t,[c.$_createError("any.unknown",t,null,n,l)],y);const d=[];if(c._valids){const v=c._valids.get(t,n,l,c._flags.insensitive);if(v)return l.convert&&(n.mainstay.tracer.value(n,"valids",t,v.value),t=v.value),n.mainstay.tracer.filter(c,n,"valid",v),r.finalize(t,null,y);if(c._flags.only){const E=c.$_createError("any.only",t,{valids:c._valids.values({display:!0})},n,l);if(l.abortEarly)return r.finalize(t,[E],y);d.push(E)}}if(c._invalids){const v=c._invalids.get(t,n,l,c._flags.insensitive);if(v){n.mainstay.tracer.filter(c,n,"invalid",v);const E=c.$_createError("any.invalid",t,{invalids:c._invalids.values({display:!0})},n,l);if(l.abortEarly)return r.finalize(t,[E],y);d.push(E)}}if(R.validate){const v=R.validate(t,y);if(v&&(n.mainstay.tracer.value(n,"base",t,v.value),t=v.value,v.errors)){if(!Array.isArray(v.errors))return d.push(v.errors),r.finalize(t,d,y);if(v.errors.length)return d.push(...v.errors),r.finalize(t,d,y)}}return c._rules.length?r.rules(t,d,y):r.finalize(t,d,y)},r.rules=function(t,c,n){const{schema:l,state:m,prefs:a}=n;for(const y of l._rules){const R=l._definition.rules[y.method];if(R.convert&&a.convert){m.mainstay.tracer.log(l,m,"rule",y.name,"full");continue}let _,f=y.args;if(y._resolve.length){f=Object.assign({},f);for(const v of y._resolve){const E=R.argsByName.get(v),S=f[v].resolve(t,m,a),O=E.normalize?E.normalize(S):S,A=e.validateArg(O,null,E);if(A){_=l.$_createError("any.ref",S,{arg:v,ref:f[v],reason:A},m,a);break}f[v]=O}}_=_||R.validate(t,n,f,y);const d=r.rule(_,y);if(d.errors){if(m.mainstay.tracer.log(l,m,"rule",y.name,"error"),y.warn){m.mainstay.warnings.push(...d.errors);continue}if(a.abortEarly)return r.finalize(t,d.errors,n);c.push(...d.errors)}else m.mainstay.tracer.log(l,m,"rule",y.name,"pass"),m.mainstay.tracer.value(m,"rule",t,d.value,y.name),t=d.value}return r.finalize(t,c,n)},r.rule=function(t,c){return t instanceof i.Report?(r.error(t,c),{errors:[t],value:null}):Array.isArray(t)&&t[e.symbols.errors]?(t.forEach(n=>r.error(n,c)),{errors:t,value:null}):{errors:null,value:t}},r.error=function(t,c){return c.message&&t._setTemplate(c.message),t},r.finalize=function(t,c,n){c=c||[];const{schema:l,state:m,prefs:a}=n;if(c.length){const R=r.default("failover",void 0,c,n);R!==void 0&&(m.mainstay.tracer.value(m,"failover",t,R),t=R,c=[])}if(c.length&&l._flags.error)if(typeof l._flags.error=="function"){c=l._flags.error(c),Array.isArray(c)||(c=[c]);for(const R of c)o(R instanceof Error||R instanceof i.Report,"error() must return an Error object")}else c=[l._flags.error];if(t===void 0){const R=r.default("default",t,c,n);m.mainstay.tracer.value(m,"default",t,R),t=R}if(l._flags.cast&&t!==void 0){const R=l._definition.cast[l._flags.cast];if(R.from(t)){const _=R.to(t,n);m.mainstay.tracer.value(m,"cast",t,_,l._flags.cast),t=_}}if(l.$_terms.externals&&a.externals&&a._externals!==!1)for(const{method:R}of l.$_terms.externals)m.mainstay.externals.push({method:R,schema:l,state:m,label:i.label(l._flags,m,a)});const y={value:t,errors:c.length?c:null};return l._flags.result&&(y.value=l._flags.result==="strip"?void 0:n.original,m.mainstay.tracer.value(m,l._flags.result,t,y.value),m.shadow(t,l._flags.result)),l._cache&&a.cache!==!1&&!l._refs.length&&l._cache.set(n.original,y),t===void 0||y.errors||l._flags.artifact===void 0||(m.mainstay.artifacts=m.mainstay.artifacts||new Map,m.mainstay.artifacts.has(l._flags.artifact)||m.mainstay.artifacts.set(l._flags.artifact,[]),m.mainstay.artifacts.get(l._flags.artifact).push(m.path)),y},r.prefs=function(t,c){const n=c===e.defaults;return n&&t._preferences[e.symbols.prefs]?t._preferences[e.symbols.prefs]:(c=e.preferences(c,t._preferences),n&&(t._preferences[e.symbols.prefs]=c),c)},r.default=function(t,c,n,l){const{schema:m,state:a,prefs:y}=l,R=m._flags[t];if(y.noDefaults||R===void 0)return c;if(a.mainstay.tracer.log(m,a,"rule",t,"full"),!R)return R;if(typeof R=="function"){const _=R.length?[g(a.ancestors[0]),l]:[];try{return R(..._)}catch(f){return void n.push(m.$_createError(`any.${t}`,null,{error:f},a,y))}}return typeof R!="object"?R:R[e.symbols.literal]?R.literal:e.isResolvable(R)?R.resolve(c,a,y):g(R)},r.trim=function(t,c){if(typeof t!="string")return t;const n=c.$_getRule("trim");return n&&n.args.enabled?t.trim():t},r.ignore={active:!1,debug:h,entry:h,filter:h,log:h,resolve:h,value:h},r.errorsArray=function(){const t=[];return t[e.symbols.errors]=!0,t}},2036:(k,w,p)=>{const o=p(375),g=p(9474),h=p(8160),u={};k.exports=u.Values=class{constructor(e,i){this._values=new Set(e),this._refs=new Set(i),this._lowercase=u.lowercases(e),this._override=!1}get length(){return this._values.size+this._refs.size}add(e,i){h.isResolvable(e)?this._refs.has(e)||(this._refs.add(e),i&&i.register(e)):this.has(e,null,null,!1)||(this._values.add(e),typeof e=="string"&&this._lowercase.set(e.toLowerCase(),e))}static merge(e,i,s){if(e=e||new u.Values,i){if(i._override)return i.clone();for(const r of[...i._values,...i._refs])e.add(r)}if(s)for(const r of[...s._values,...s._refs])e.remove(r);return e.length?e:null}remove(e){h.isResolvable(e)?this._refs.delete(e):(this._values.delete(e),typeof e=="string"&&this._lowercase.delete(e.toLowerCase()))}has(e,i,s,r){return!!this.get(e,i,s,r)}get(e,i,s,r){if(!this.length)return!1;if(this._values.has(e))return{value:e};if(typeof e=="string"&&e&&r){const t=this._lowercase.get(e.toLowerCase());if(t)return{value:t}}if(!this._refs.size&&typeof e!="object")return!1;if(typeof e=="object"){for(const t of this._values)if(g(t,e))return{value:t}}if(i)for(const t of this._refs){const c=t.resolve(e,i,s,null,{in:!0});if(c===void 0)continue;const n=t.in&&typeof c=="object"?Array.isArray(c)?c:Object.keys(c):[c];for(const l of n)if(typeof l==typeof e){if(r&&e&&typeof e=="string"){if(l.toLowerCase()===e.toLowerCase())return{value:l,ref:t}}else if(g(l,e))return{value:l,ref:t}}}return!1}override(){this._override=!0}values(e){if(e&&e.display){const i=[];for(const s of[...this._values,...this._refs])s!==void 0&&i.push(s);return i}return Array.from([...this._values,...this._refs])}clone(){const e=new u.Values(this._values,this._refs);return e._override=this._override,e}concat(e){o(!e._override,"Cannot concat override set of values");const i=new u.Values([...this._values,...e._values],[...this._refs,...e._refs]);return i._override=this._override,i}describe(){const e=[];this._override&&e.push({override:!0});for(const i of this._values.values())e.push(i&&typeof i=="object"?{value:i}:i);for(const i of this._refs.values())e.push(i.describe());return e}},u.Values.prototype[h.symbols.values]=!0,u.Values.prototype.slice=u.Values.prototype.clone,u.lowercases=function(e){const i=new Map;if(e)for(const s of e)typeof s=="string"&&i.set(s.toLowerCase(),s);return i}},978:(k,w,p)=>{const o=p(375),g=p(8571),h=p(1687),u=p(9621),e={};k.exports=function(i,s,r={}){if(o(i&&typeof i=="object","Invalid defaults value: must be an object"),o(!s||s===!0||typeof s=="object","Invalid source value: must be true, falsy or an object"),o(typeof r=="object","Invalid options: must be an object"),!s)return null;if(r.shallow)return e.applyToDefaultsWithShallow(i,s,r);const t=g(i);if(s===!0)return t;const c=r.nullOverride!==void 0&&r.nullOverride;return h(t,s,{nullOverride:c,mergeArrays:!1})},e.applyToDefaultsWithShallow=function(i,s,r){const t=r.shallow;o(Array.isArray(t),"Invalid keys");const c=new Map,n=s===!0?null:new Set;for(let a of t){a=Array.isArray(a)?a:a.split(".");const y=u(i,a);y&&typeof y=="object"?c.set(y,n&&u(s,a)||y):n&&n.add(a)}const l=g(i,{},c);if(!n)return l;for(const a of n)e.reachCopy(l,s,a);const m=r.nullOverride!==void 0&&r.nullOverride;return h(l,s,{nullOverride:m,mergeArrays:!1})},e.reachCopy=function(i,s,r){for(const n of r){if(!(n in s))return;const l=s[n];if(typeof l!="object"||l===null)return;s=l}const t=s;let c=i;for(let n=0;n<r.length-1;++n){const l=r[n];typeof c[l]!="object"&&(c[l]={}),c=c[l]}c[r[r.length-1]]=t}},375:(k,w,p)=>{const o=p(7916);k.exports=function(g,...h){if(!g)throw h.length===1&&h[0]instanceof Error?h[0]:new o(h)}},8571:(k,w,p)=>{const o=p(9621),g=p(4277),h=p(7043),u={needsProtoHack:new Set([g.set,g.map,g.weakSet,g.weakMap])};k.exports=u.clone=function(e,i={},s=null){if(typeof e!="object"||e===null)return e;let r=u.clone,t=s;if(i.shallow){if(i.shallow!==!0)return u.cloneWithShallow(e,i);r=m=>m}else if(t){const m=t.get(e);if(m)return m}else t=new Map;const c=g.getInternalProto(e);if(c===g.buffer)return!1;if(c===g.date)return new Date(e.getTime());if(c===g.regex)return new RegExp(e);const n=u.base(e,c,i);if(n===e)return e;if(t&&t.set(e,n),c===g.set)for(const m of e)n.add(r(m,i,t));else if(c===g.map)for(const[m,a]of e)n.set(m,r(a,i,t));const l=h.keys(e,i);for(const m of l){if(m==="__proto__")continue;if(c===g.array&&m==="length"){n.length=e.length;continue}const a=Object.getOwnPropertyDescriptor(e,m);a?a.get||a.set?Object.defineProperty(n,m,a):a.enumerable?n[m]=r(e[m],i,t):Object.defineProperty(n,m,{enumerable:!1,writable:!0,configurable:!0,value:r(e[m],i,t)}):Object.defineProperty(n,m,{enumerable:!0,writable:!0,configurable:!0,value:r(e[m],i,t)})}return n},u.cloneWithShallow=function(e,i){const s=i.shallow;(i=Object.assign({},i)).shallow=!1;const r=new Map;for(const t of s){const c=o(e,t);typeof c!="object"&&typeof c!="function"||r.set(c,c)}return u.clone(e,i,r)},u.base=function(e,i,s){if(s.prototype===!1)return u.needsProtoHack.has(i)?new i.constructor:i===g.array?[]:{};const r=Object.getPrototypeOf(e);if(r&&r.isImmutable)return e;if(i===g.array){const t=[];return r!==i&&Object.setPrototypeOf(t,r),t}if(u.needsProtoHack.has(i)){const t=new r.constructor;return r!==i&&Object.setPrototypeOf(t,r),t}return Object.create(r)}},9474:(k,w,p)=>{const o=p(4277),g={mismatched:null};k.exports=function(h,u,e){return e=Object.assign({prototype:!0},e),!!g.isDeepEqual(h,u,e,[])},g.isDeepEqual=function(h,u,e,i){if(h===u)return h!==0||1/h==1/u;const s=typeof h;if(s!==typeof u||h===null||u===null)return!1;if(s==="function"){if(!e.deepFunction||h.toString()!==u.toString())return!1}else if(s!=="object")return h!=h&&u!=u;const r=g.getSharedType(h,u,!!e.prototype);switch(r){case o.buffer:return!1;case o.promise:return h===u;case o.regex:return h.toString()===u.toString();case g.mismatched:return!1}for(let t=i.length-1;t>=0;--t)if(i[t].isSame(h,u))return!0;i.push(new g.SeenEntry(h,u));try{return!!g.isDeepEqualObj(r,h,u,e,i)}finally{i.pop()}},g.getSharedType=function(h,u,e){if(e)return Object.getPrototypeOf(h)!==Object.getPrototypeOf(u)?g.mismatched:o.getInternalProto(h);const i=o.getInternalProto(h);return i!==o.getInternalProto(u)?g.mismatched:i},g.valueOf=function(h){const u=h.valueOf;if(u===void 0)return h;try{return u.call(h)}catch(e){return e}},g.hasOwnEnumerableProperty=function(h,u){return Object.prototype.propertyIsEnumerable.call(h,u)},g.isSetSimpleEqual=function(h,u){for(const e of Set.prototype.values.call(h))if(!Set.prototype.has.call(u,e))return!1;return!0},g.isDeepEqualObj=function(h,u,e,i,s){const{isDeepEqual:r,valueOf:t,hasOwnEnumerableProperty:c}=g,{keys:n,getOwnPropertySymbols:l}=Object;if(h===o.array){if(!i.part){if(u.length!==e.length)return!1;for(let _=0;_<u.length;++_)if(!r(u[_],e[_],i,s))return!1;return!0}for(const _ of u)for(const f of e)if(r(_,f,i,s))return!0}else if(h===o.set){if(u.size!==e.size)return!1;if(!g.isSetSimpleEqual(u,e)){const _=new Set(Set.prototype.values.call(e));for(const f of Set.prototype.values.call(u)){if(_.delete(f))continue;let d=!1;for(const v of _)if(r(f,v,i,s)){_.delete(v),d=!0;break}if(!d)return!1}}}else if(h===o.map){if(u.size!==e.size)return!1;for(const[_,f]of Map.prototype.entries.call(u))if(f===void 0&&!Map.prototype.has.call(e,_)||!r(f,Map.prototype.get.call(e,_),i,s))return!1}else if(h===o.error&&(u.name!==e.name||u.message!==e.message))return!1;const m=t(u),a=t(e);if((u!==m||e!==a)&&!r(m,a,i,s))return!1;const y=n(u);if(!i.part&&y.length!==n(e).length&&!i.skip)return!1;let R=0;for(const _ of y)if(i.skip&&i.skip.includes(_))e[_]===void 0&&++R;else if(!c(e,_)||!r(u[_],e[_],i,s))return!1;if(!i.part&&y.length-R!==n(e).length)return!1;if(i.symbols!==!1){const _=l(u),f=new Set(l(e));for(const d of _){if(!i.skip||!i.skip.includes(d)){if(c(u,d)){if(!c(e,d)||!r(u[d],e[d],i,s))return!1}else if(c(e,d))return!1}f.delete(d)}for(const d of f)if(c(e,d))return!1}return!0},g.SeenEntry=class{constructor(h,u){this.obj=h,this.ref=u}isSame(h,u){return this.obj===h&&this.ref===u}}},7916:(k,w,p)=>{const o=p(8761);k.exports=class extends Error{constructor(g){super(g.filter(h=>h!=="").map(h=>typeof h=="string"?h:h instanceof Error?h.message:o(h)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,w.assert)}}},5277:k=>{const w={};k.exports=function(p){if(!p)return"";let o="";for(let g=0;g<p.length;++g){const h=p.charCodeAt(g);w.isSafe(h)?o+=p[g]:o+=w.escapeHtmlChar(h)}return o},w.escapeHtmlChar=function(p){return w.namedHtml.get(p)||(p>=256?"&#"+p+";":`&#x${p.toString(16).padStart(2,"0")};`)},w.isSafe=function(p){return w.safeCharCodes.has(p)},w.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),w.safeCharCodes=function(){const p=new Set;for(let o=32;o<123;++o)(o>=97||o>=65&&o<=90||o>=48&&o<=57||o===32||o===46||o===44||o===45||o===58||o===95)&&p.add(o);return p}()},6064:k=>{k.exports=function(w){return w.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:k=>{k.exports=function(){}},1687:(k,w,p)=>{const o=p(375),g=p(8571),h=p(7043),u={};k.exports=u.merge=function(e,i,s){if(o(e&&typeof e=="object","Invalid target value: must be an object"),o(i==null||typeof i=="object","Invalid source value: must be null, undefined, or an object"),!i)return e;if(s=Object.assign({nullOverride:!0,mergeArrays:!0},s),Array.isArray(i)){o(Array.isArray(e),"Cannot merge array onto an object"),s.mergeArrays||(e.length=0);for(let t=0;t<i.length;++t)e.push(g(i[t],{symbols:s.symbols}));return e}const r=h.keys(i,s);for(let t=0;t<r.length;++t){const c=r[t];if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,c))continue;const n=i[c];if(n&&typeof n=="object"){if(e[c]===n)continue;!e[c]||typeof e[c]!="object"||Array.isArray(e[c])!==Array.isArray(n)||n instanceof Date||n instanceof RegExp?e[c]=g(n,{symbols:s.symbols}):u.merge(e[c],n,s)}else(n!=null||s.nullOverride)&&(e[c]=n)}return e}},9621:(k,w,p)=>{const o=p(375),g={};k.exports=function(h,u,e){if(u===!1||u==null)return h;typeof(e=e||{})=="string"&&(e={separator:e});const i=Array.isArray(u);o(!i||!e.separator,"Separator option is not valid for array-based chain");const s=i?u:u.split(e.separator||".");let r=h;for(let t=0;t<s.length;++t){let c=s[t];const n=e.iterables&&g.iterables(r);if(Array.isArray(r)||n==="set"){const l=Number(c);Number.isInteger(l)&&(c=l<0?r.length+l:l)}if(!r||typeof r=="function"&&e.functions===!1||!n&&r[c]===void 0){o(!e.strict||t+1===s.length,"Missing segment",c,"in reach path ",u),o(typeof r=="object"||e.functions===!0||typeof r!="function","Invalid segment",c,"in reach path ",u),r=e.default;break}r=n?n==="set"?[...r][c]:r.get(c):r[c]}return r},g.iterables=function(h){return h instanceof Set?"set":h instanceof Map?"map":void 0}},8761:k=>{k.exports=function(...w){try{return JSON.stringify(...w)}catch(p){return"[Cannot display object: "+p.message+"]"}}},4277:(k,w)=>{const p={};w=k.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},p.typeMap=new Map([["[object Error]",w.error],["[object Map]",w.map],["[object Promise]",w.promise],["[object Set]",w.set],["[object WeakMap]",w.weakMap],["[object WeakSet]",w.weakSet]]),w.getInternalProto=function(o){if(Array.isArray(o))return w.array;if(o instanceof Date)return w.date;if(o instanceof RegExp)return w.regex;if(o instanceof Error)return w.error;const g=Object.prototype.toString.call(o);return p.typeMap.get(g)||w.generic}},7043:(k,w)=>{w.keys=function(p,o={}){return o.symbols!==!1?Reflect.ownKeys(p):Object.getOwnPropertyNames(p)}},3652:(k,w,p)=>{const o=p(375),g={};w.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(h,u){const e=[].concat((u=u||{}).before||[]),i=[].concat(u.after||[]),s=u.group||"?",r=u.sort||0;o(!e.includes(s),`Item cannot come before itself: ${s}`),o(!e.includes("?"),"Item cannot come before unassociated items"),o(!i.includes(s),`Item cannot come after itself: ${s}`),o(!i.includes("?"),"Item cannot come after unassociated items"),Array.isArray(h)||(h=[h]);for(const t of h){const c={seq:this._items.length,sort:r,before:e,after:i,group:s,node:t};this._items.push(c)}if(!u.manual){const t=this._sort();o(t,"item",s!=="?"?`added into group ${s}`:"","created a dependencies error")}return this.nodes}merge(h){Array.isArray(h)||(h=[h]);for(const e of h)if(e)for(const i of e._items)this._items.push(Object.assign({},i));this._items.sort(g.mergeSort);for(let e=0;e<this._items.length;++e)this._items[e].seq=e;const u=this._sort();return o(u,"merge created a dependencies error"),this.nodes}sort(){const h=this._sort();return o(h,"sort created a dependencies error"),this.nodes}_sort(){const h={},u=Object.create(null),e=Object.create(null);for(const c of this._items){const n=c.seq,l=c.group;e[l]=e[l]||[],e[l].push(n),h[n]=c.before;for(const m of c.after)u[m]=u[m]||[],u[m].push(n)}for(const c in h){const n=[];for(const l in h[c]){const m=h[c][l];e[m]=e[m]||[],n.push(...e[m])}h[c]=n}for(const c in u)if(e[c])for(const n of e[c])h[n].push(...u[c]);const i={};for(const c in h){const n=h[c];for(const l of n)i[l]=i[l]||[],i[l].push(c)}const s={},r=[];for(let c=0;c<this._items.length;++c){let n=c;if(i[c]){n=null;for(let l=0;l<this._items.length;++l){if(s[l]===!0)continue;i[l]||(i[l]=[]);const m=i[l].length;let a=0;for(let y=0;y<m;++y)s[i[l][y]]&&++a;if(a===m){n=l;break}}}n!==null&&(s[n]=!0,r.push(n))}if(r.length!==this._items.length)return!1;const t={};for(const c of this._items)t[c.seq]=c;this._items=[],this.nodes=[];for(const c of r){const n=t[c];this.nodes.push(n.node),this._items.push(n)}return!0}},g.mergeSort=(h,u)=>h.sort===u.sort?0:h.sort<u.sort?-1:1},5380:(k,w,p)=>{const o=p(443),g=p(2178),h={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:o.URL||URL};w.analyze=function(u,e={}){if(!u)return g.code("DOMAIN_NON_EMPTY_STRING");if(typeof u!="string")throw new Error("Invalid input: domain must be a string");if(u.length>256)return g.code("DOMAIN_TOO_LONG");if(h.nonAsciiRx.test(u)){if(e.allowUnicode===!1)return g.code("DOMAIN_INVALID_UNICODE_CHARS");u=u.normalize("NFC")}if(h.domainControlRx.test(u))return g.code("DOMAIN_INVALID_CHARS");u=h.punycode(u),e.allowFullyQualified&&u[u.length-1]==="."&&(u=u.slice(0,-1));const i=e.minDomainSegments||h.minDomainSegments,s=u.split(".");if(s.length<i)return g.code("DOMAIN_SEGMENTS_COUNT");if(e.maxDomainSegments&&s.length>e.maxDomainSegments)return g.code("DOMAIN_SEGMENTS_COUNT_MAX");const r=e.tlds;if(r){const t=s[s.length-1].toLowerCase();if(r.deny&&r.deny.has(t)||r.allow&&!r.allow.has(t))return g.code("DOMAIN_FORBIDDEN_TLDS")}for(let t=0;t<s.length;++t){const c=s[t];if(!c.length)return g.code("DOMAIN_EMPTY_SEGMENT");if(c.length>63)return g.code("DOMAIN_LONG_SEGMENT");if(t<s.length-1){if(!h.domainSegmentRx.test(c))return g.code("DOMAIN_INVALID_CHARS")}else if(!h.tldSegmentRx.test(c))return g.code("DOMAIN_INVALID_TLDS_CHARS")}return null},w.isValid=function(u,e){return!w.analyze(u,e)},h.punycode=function(u){u.includes("%")&&(u=u.replace(/%/g,"%25"));try{return new h.URL(`http://${u}`).host}catch{return u}}},1745:(k,w,p)=>{const o=p(9848),g=p(5380),h=p(2178),u={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(o.TextEncoder||TextEncoder)};w.analyze=function(e,i){return u.email(e,i)},w.isValid=function(e,i){return!u.email(e,i)},u.email=function(e,i={}){if(typeof e!="string")throw new Error("Invalid input: email must be a string");if(!e)return h.code("EMPTY_STRING");const s=!u.nonAsciiRx.test(e);if(!s){if(i.allowUnicode===!1)return h.code("FORBIDDEN_UNICODE");e=e.normalize("NFC")}const r=e.split("@");if(r.length!==2)return r.length>2?h.code("MULTIPLE_AT_CHAR"):h.code("MISSING_AT_CHAR");const[t,c]=r;if(!t)return h.code("EMPTY_LOCAL");if(!i.ignoreLength){if(e.length>254)return h.code("ADDRESS_TOO_LONG");if(u.encoder.encode(t).length>64)return h.code("LOCAL_TOO_LONG")}return u.local(t,s)||g.analyze(c,i)},u.local=function(e,i){const s=e.split(".");for(const r of s){if(!r.length)return h.code("EMPTY_LOCAL_SEGMENT");if(i){if(!u.atextRx.test(r))return h.code("INVALID_LOCAL_CHARS")}else for(const t of r){if(u.atextRx.test(t))continue;const c=u.binary(t);if(!u.atomRx.test(c))return h.code("INVALID_LOCAL_CHARS")}}},u.binary=function(e){return Array.from(u.encoder.encode(e)).map(i=>String.fromCharCode(i)).join("")},u.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,u.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(k,w)=>{w.codes={EMPTY_STRING:"Address must be a non-empty string",FORBIDDEN_UNICODE:"Address contains forbidden Unicode characters",MULTIPLE_AT_CHAR:"Address cannot contain more than one @ character",MISSING_AT_CHAR:"Address must contain one @ character",EMPTY_LOCAL:"Address local part cannot be empty",ADDRESS_TOO_LONG:"Address too long",LOCAL_TOO_LONG:"Address local part too long",EMPTY_LOCAL_SEGMENT:"Address local part contains empty dot-separated segment",INVALID_LOCAL_CHARS:"Address local part contains invalid character",DOMAIN_NON_EMPTY_STRING:"Domain must be a non-empty string",DOMAIN_TOO_LONG:"Domain too long",DOMAIN_INVALID_UNICODE_CHARS:"Domain contains forbidden Unicode characters",DOMAIN_INVALID_CHARS:"Domain contains invalid character",DOMAIN_INVALID_TLDS_CHARS:"Domain contains invalid tld character",DOMAIN_SEGMENTS_COUNT:"Domain lacks the minimum required number of segments",DOMAIN_SEGMENTS_COUNT_MAX:"Domain contains too many segments",DOMAIN_FORBIDDEN_TLDS:"Domain uses forbidden TLD",DOMAIN_EMPTY_SEGMENT:"Domain contains empty dot-separated segment",DOMAIN_LONG_SEGMENT:"Domain contains dot-separated segment that is too long"},w.code=function(p){return{code:p,error:w.codes[p]}}},9959:(k,w,p)=>{const o=p(375),g=p(5752);w.regex=function(h={}){o(h.cidr===void 0||typeof h.cidr=="string","options.cidr must be a string");const u=h.cidr?h.cidr.toLowerCase():"optional";o(["required","optional","forbidden"].includes(u),"options.cidr must be one of required, optional, forbidden"),o(h.version===void 0||typeof h.version=="string"||Array.isArray(h.version),"options.version must be a string or an array of string");let e=h.version||["ipv4","ipv6","ipvfuture"];Array.isArray(e)||(e=[e]),o(e.length>=1,"options.version must have at least 1 version specified");for(let r=0;r<e.length;++r)o(typeof e[r]=="string","options.version must only contain strings"),e[r]=e[r].toLowerCase(),o(["ipv4","ipv6","ipvfuture"].includes(e[r]),"options.version contains unknown version "+e[r]+" - must be one of ipv4, ipv6, ipvfuture");e=Array.from(new Set(e));const i=`(?:${e.map(r=>{if(u==="forbidden")return g.ip[r];const t=`\\/${r==="ipv4"?g.ip.v4Cidr:g.ip.v6Cidr}`;return u==="required"?`${g.ip[r]}${t}`:`${g.ip[r]}(?:${t})?`}).join("|")})`,s=new RegExp(`^${i}$`);return{cidr:u,versions:e,regex:s,raw:i}}},5752:(k,w,p)=>{const o=p(375),g=p(6064),h={generate:function(){const u={},e="\\dA-Fa-f",i="["+e+"]",s="\\w-\\.~",r="!\\$&'\\(\\)\\*\\+,;=",t="%"+e,c=s+t+r+":@",n="["+c+"]",l="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";u.ipv4address="(?:"+l+"\\.){3}"+l;const m=i+"{1,4}",a="(?:"+m+":"+m+"|"+u.ipv4address+")",y="(?:"+m+":){6}"+a,R="::(?:"+m+":){5}"+a,_="(?:"+m+")?::(?:"+m+":){4}"+a,f="(?:(?:"+m+":){0,1}"+m+")?::(?:"+m+":){3}"+a,d="(?:(?:"+m+":){0,2}"+m+")?::(?:"+m+":){2}"+a,v="(?:(?:"+m+":){0,3}"+m+")?::"+m+":"+a,E="(?:(?:"+m+":){0,4}"+m+")?::"+a,S="(?:(?:"+m+":){0,5}"+m+")?::"+m,O="(?:(?:"+m+":){0,6}"+m+")?::";u.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",u.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",u.ipv6address="(?:"+y+"|"+R+"|"+_+"|"+f+"|"+d+"|"+v+"|"+E+"|"+S+"|"+O+")",u.ipvFuture="v"+i+"+\\.["+s+r+":]+",u.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",u.schemeRegex=new RegExp(u.scheme);const A="["+s+t+r+":]*",I="["+s+t+r+"]{1,255}",N="(?:\\[(?:"+u.ipv6address+"|"+u.ipvFuture+")\\]|"+u.ipv4address+"|"+I+")",F="(?:"+A+"@)?"+N+"(?::\\d*)?",K="(?:"+A+"@)?("+N+")(?::\\d*)?",G=n+"*",V=n+"+",D="(?:\\/"+G+")*",X="\\/(?:"+V+D+")?",J=V+D,ee="["+s+t+r+"@]+"+D,te="(?:\\/\\/\\/"+G+D+")";return u.hierPart="(?:(?:\\/\\/"+F+D+")|"+X+"|"+J+"|"+te+")",u.hierPartCapture="(?:(?:\\/\\/"+K+D+")|"+X+"|"+J+")",u.relativeRef="(?:(?:\\/\\/"+F+D+")|"+X+"|"+ee+"|)",u.relativeRefCapture="(?:(?:\\/\\/"+K+D+")|"+X+"|"+ee+"|)",u.query="["+c+"\\/\\?]*(?=#|$)",u.queryWithSquareBrackets="["+c+"\\[\\]\\/\\?]*(?=#|$)",u.fragment="["+c+"\\/\\?]*",u}};h.rfc3986=h.generate(),w.ip={v4Cidr:h.rfc3986.ipv4Cidr,v6Cidr:h.rfc3986.ipv6Cidr,ipv4:h.rfc3986.ipv4address,ipv6:h.rfc3986.ipv6address,ipvfuture:h.rfc3986.ipvFuture},h.createRegex=function(u){const e=h.rfc3986,i="(?:\\?"+(u.allowQuerySquareBrackets?e.queryWithSquareBrackets:e.query)+")?(?:#"+e.fragment+")?",s=u.domain?e.relativeRefCapture:e.relativeRef;if(u.relativeOnly)return h.wrap(s+i);let r="";if(u.scheme){o(u.scheme instanceof RegExp||typeof u.scheme=="string"||Array.isArray(u.scheme),"scheme must be a RegExp, String, or Array");const n=[].concat(u.scheme);o(n.length>=1,"scheme must have at least 1 scheme specified");const l=[];for(let m=0;m<n.length;++m){const a=n[m];o(a instanceof RegExp||typeof a=="string","scheme at position "+m+" must be a RegExp or String"),a instanceof RegExp?l.push(a.source.toString()):(o(e.schemeRegex.test(a),"scheme at position "+m+" must be a valid scheme"),l.push(g(a)))}r=l.join("|")}const t="(?:"+(r?"(?:"+r+")":e.scheme)+":"+(u.domain?e.hierPartCapture:e.hierPart)+")",c=u.allowRelative?"(?:"+t+"|"+s+")":t;return h.wrap(c+i,r)},h.wrap=function(u,e){return{raw:u=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${u}`,regex:new RegExp(`^${u}$`),scheme:e}},h.uriRegex=h.createRegex({}),w.regex=function(u={}){return u.scheme||u.allowRelative||u.relativeOnly||u.allowQuerySquareBrackets||u.domain?h.createRegex(u):h.uriRegex}},1447:(k,w)=>{const p={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};w.Parser=class{constructor(o,g={}){if(!g[p.settings]&&g.constants)for(const h in g.constants){const u=g.constants[h];if(u!==null&&!["boolean","number","string"].includes(typeof u))throw new Error(`Formula constant ${h} contains invalid ${typeof u} value type`)}this.settings=g[p.settings]?g:Object.assign({[p.settings]:!0,constants:{},functions:{}},g),this.single=null,this._parts=null,this._parse(o)}_parse(o){let g=[],h="",u=0,e=!1;const i=r=>{if(u)throw new Error("Formula missing closing parenthesis");const t=g.length?g[g.length-1]:null;if(e||h||r){if(t&&t.type==="reference"&&r===")")return t.type="function",t.value=this._subFormula(h,t.value),void(h="");if(r===")"){const c=new w.Parser(h,this.settings);g.push({type:"segment",value:c})}else if(e){if(e==="]")return g.push({type:"reference",value:h}),void(h="");g.push({type:"literal",value:h})}else if(p.operatorCharacters.includes(h))t&&t.type==="operator"&&p.operators.includes(t.value+h)?t.value+=h:g.push({type:"operator",value:h});else if(h.match(p.numberRx))g.push({type:"constant",value:parseFloat(h)});else if(this.settings.constants[h]!==void 0)g.push({type:"constant",value:this.settings.constants[h]});else{if(!h.match(p.tokenRx))throw new Error(`Formula contains invalid token: ${h}`);g.push({type:"reference",value:h})}h=""}};for(const r of o)e?r===e?(i(),e=!1):h+=r:u?r==="("?(h+=r,++u):r===")"?(--u,u?h+=r:i(r)):h+=r:r in p.literals?e=p.literals[r]:r==="("?(i(),++u):p.operatorCharacters.includes(r)?(i(),h=r,i()):r!==" "?h+=r:i();i(),g=g.map((r,t)=>r.type!=="operator"||r.value!=="-"||t&&g[t-1].type!=="operator"?r:{type:"operator",value:"n"});let s=!1;for(const r of g){if(r.type==="operator"){if(p.operatorsPrefix.includes(r.value))continue;if(!s)throw new Error("Formula contains an operator in invalid position");if(!p.operators.includes(r.value))throw new Error(`Formula contains an unknown operator ${r.value}`)}else if(s)throw new Error("Formula missing expected operator");s=!s}if(!s)throw new Error("Formula contains invalid trailing operator");g.length===1&&["reference","literal","constant"].includes(g[0].type)&&(this.single={type:g[0].type==="reference"?"reference":"value",value:g[0].value}),this._parts=g.map(r=>{if(r.type==="operator")return p.operatorsPrefix.includes(r.value)?r:r.value;if(r.type!=="reference")return r.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(r.value))throw new Error(`Formula contains invalid reference ${r.value}`);return this.settings.reference?this.settings.reference(r.value):p.reference(r.value)})}_subFormula(o,g){const h=this.settings.functions[g];if(typeof h!="function")throw new Error(`Formula contains unknown function ${g}`);let u=[];if(o){let e="",i=0,s=!1;const r=()=>{if(!e)throw new Error(`Formula contains function ${g} with invalid arguments ${o}`);u.push(e),e=""};for(let t=0;t<o.length;++t){const c=o[t];s?(e+=c,c===s&&(s=!1)):c in p.literals&&!i?(e+=c,s=p.literals[c]):c!==","||i?(e+=c,c==="("?++i:c===")"&&--i):r()}r()}return u=u.map(e=>new w.Parser(e,this.settings)),function(e){const i=[];for(const s of u)i.push(s.evaluate(e));return h.call(e,...i)}}evaluate(o){const g=this._parts.slice();for(let h=g.length-2;h>=0;--h){const u=g[h];if(u&&u.type==="operator"){const e=g[h+1];g.splice(h+1,1);const i=p.evaluate(e,o);g[h]=p.single(u.value,i)}}return p.operatorsOrder.forEach(h=>{for(let u=1;u<g.length-1;)if(h.includes(g[u])){const e=g[u],i=p.evaluate(g[u-1],o),s=p.evaluate(g[u+1],o);g.splice(u,2);const r=p.calculate(e,i,s);g[u-1]=r===0?0:r}else u+=2}),p.evaluate(g[0],o)}},w.Parser.prototype[p.symbol]=!0,p.reference=function(o){return function(g){return g&&g[o]!==void 0?g[o]:null}},p.evaluate=function(o,g){return o===null?null:typeof o=="function"?o(g):o[p.symbol]?o.evaluate(g):o},p.single=function(o,g){if(o==="!")return!g;const h=-g;return h===0?0:h},p.calculate=function(o,g,h){if(o==="??")return p.exists(g)?g:h;if(typeof g=="string"||typeof h=="string"){if(o==="+")return(g=p.exists(g)?g:"")+(p.exists(h)?h:"")}else switch(o){case"^":return Math.pow(g,h);case"*":return g*h;case"/":return g/h;case"%":return g%h;case"+":return g+h;case"-":return g-h}switch(o){case"<":return g<h;case"<=":return g<=h;case">":return g>h;case">=":return g>=h;case"==":return g===h;case"!=":return g!==h;case"&&":return g&&h;case"||":return g||h}return null},p.exists=function(o){return o!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:k=>{k.exports=JSON.parse('{"version":"17.12.2"}')}},z={},function k(w){var p=z[w];if(p!==void 0)return p.exports;var o=z[w]={exports:{}};return q[w](o,o.exports,k),o.exports}(5107);var q,z})}(Me)),Me.exports}var Fe,Ze;function xt(){return Ze||(Ze=1,Fe={charsWide:["ᄀ-ᇹ"," -〿","ぁ-ゔ","゙-ゞ","ァ-ヾ","ㄱ-ㆎ","㆐-㆟","㈀-㈜","㈠-㉃","㉠-㊰","㋀-㍶","㍻-㏝","㏠-㏾","一-龥","가-힣","-","豈-鶴"],charsFullWidth:["︰-﹄","﹉-﹒","﹔-﹫","!-~","¢-₩"]}),Fe}var Be,Ye;function St(){if(Ye)return Be;Ye=1;const{charsWide:W,charsFullWidth:C}=xt(),q=new RegExp(`[${W.join("")}${C.join("")}]`,"g");return Be={default:k=>k.replace(q,"xx").length,charsRegex:q},Be}/*!
|
|
2
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
5
|
-
* Licensed under the MIT License.
|
|
6
|
-
*/var Ue,Je;function kt(){return Je||(Je=1,Ue=function(C){if(typeof C!="string"||C==="")return!1;for(var q;q=/(\\).|([@?!+*]\(.*\))/g.exec(C);){if(q[2])return!0;C=C.slice(q.index+q[0].length)}return!1}),Ue}/*!
|
|
7
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
10
|
-
* Released under the MIT License.
|
|
11
|
-
*/var ze,Qe;function Ot(){if(Qe)return ze;Qe=1;var W=kt(),C={"{":"}","(":")","[":"]"},q=function(k){if(k[0]==="!")return!0;for(var w=0,p=-2,o=-2,g=-2,h=-2,u=-2;w<k.length;){if(k[w]==="*"||k[w+1]==="?"&&/[\].+)]/.test(k[w])||o!==-1&&k[w]==="["&&k[w+1]!=="]"&&(o<w&&(o=k.indexOf("]",w)),o>w&&(u===-1||u>o||(u=k.indexOf("\\",w),u===-1||u>o)))||g!==-1&&k[w]==="{"&&k[w+1]!=="}"&&(g=k.indexOf("}",w),g>w&&(u=k.indexOf("\\",w),u===-1||u>g))||h!==-1&&k[w]==="("&&k[w+1]==="?"&&/[:!=]/.test(k[w+2])&&k[w+3]!==")"&&(h=k.indexOf(")",w),h>w&&(u=k.indexOf("\\",w),u===-1||u>h))||p!==-1&&k[w]==="("&&k[w+1]!=="|"&&(p<w&&(p=k.indexOf("|",w)),p!==-1&&k[p+1]!==")"&&(h=k.indexOf(")",p),h>p&&(u=k.indexOf("\\",p),u===-1||u>h))))return!0;if(k[w]==="\\"){var e=k[w+1];w+=2;var i=C[e];if(i){var s=k.indexOf(i,w);s!==-1&&(w=s+1)}if(k[w]==="!")return!0}else w++}return!1},z=function(k){if(k[0]==="!")return!0;for(var w=0;w<k.length;){if(/[*?{}()[\]]/.test(k[w]))return!0;if(k[w]==="\\"){var p=k[w+1];w+=2;var o=C[p];if(o){var g=k.indexOf(o,w);g!==-1&&(w=g+1)}if(k[w]==="!")return!0}else w++}return!1};return ze=function(w,p){if(typeof w!="string"||w==="")return!1;if(W(w))return!0;var o=q;return p&&p.strict===!1&&(o=z),o(w)},ze}var Ce={exports:{}},et;function At(){return et||(et=1,function(W,C){var q={};C=W.exports=f;var z;typeof ut=="object"&&q&&q.NODE_DEBUG&&/\bsemver\b/i.test(q.NODE_DEBUG)?z=function(){var b=Array.prototype.slice.call(arguments,0);b.unshift("SEMVER"),console.log.apply(console,b)}:z=function(){},C.SEMVER_SPEC_VERSION="2.0.0";var k=256,w=Number.MAX_SAFE_INTEGER||9007199254740991,p=16,o=k-6,g=C.re=[],h=C.safeRe=[],u=C.src=[],e=C.tokens={},i=0;function s(b){e[b]=i++}var r="[a-zA-Z0-9-]",t=[["\\s",1],["\\d",k],[r,o]];function c(b){for(var $=0;$<t.length;$++){var x=t[$][0],j=t[$][1];b=b.split(x+"*").join(x+"{0,"+j+"}").split(x+"+").join(x+"{1,"+j+"}")}return b}s("NUMERICIDENTIFIER"),u[e.NUMERICIDENTIFIER]="0|[1-9]\\d*",s("NUMERICIDENTIFIERLOOSE"),u[e.NUMERICIDENTIFIERLOOSE]="\\d+",s("NONNUMERICIDENTIFIER"),u[e.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+r+"*",s("MAINVERSION"),u[e.MAINVERSION]="("+u[e.NUMERICIDENTIFIER]+")\\.("+u[e.NUMERICIDENTIFIER]+")\\.("+u[e.NUMERICIDENTIFIER]+")",s("MAINVERSIONLOOSE"),u[e.MAINVERSIONLOOSE]="("+u[e.NUMERICIDENTIFIERLOOSE]+")\\.("+u[e.NUMERICIDENTIFIERLOOSE]+")\\.("+u[e.NUMERICIDENTIFIERLOOSE]+")",s("PRERELEASEIDENTIFIER"),u[e.PRERELEASEIDENTIFIER]="(?:"+u[e.NUMERICIDENTIFIER]+"|"+u[e.NONNUMERICIDENTIFIER]+")",s("PRERELEASEIDENTIFIERLOOSE"),u[e.PRERELEASEIDENTIFIERLOOSE]="(?:"+u[e.NUMERICIDENTIFIERLOOSE]+"|"+u[e.NONNUMERICIDENTIFIER]+")",s("PRERELEASE"),u[e.PRERELEASE]="(?:-("+u[e.PRERELEASEIDENTIFIER]+"(?:\\."+u[e.PRERELEASEIDENTIFIER]+")*))",s("PRERELEASELOOSE"),u[e.PRERELEASELOOSE]="(?:-?("+u[e.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+u[e.PRERELEASEIDENTIFIERLOOSE]+")*))",s("BUILDIDENTIFIER"),u[e.BUILDIDENTIFIER]=r+"+",s("BUILD"),u[e.BUILD]="(?:\\+("+u[e.BUILDIDENTIFIER]+"(?:\\."+u[e.BUILDIDENTIFIER]+")*))",s("FULL"),s("FULLPLAIN"),u[e.FULLPLAIN]="v?"+u[e.MAINVERSION]+u[e.PRERELEASE]+"?"+u[e.BUILD]+"?",u[e.FULL]="^"+u[e.FULLPLAIN]+"$",s("LOOSEPLAIN"),u[e.LOOSEPLAIN]="[v=\\s]*"+u[e.MAINVERSIONLOOSE]+u[e.PRERELEASELOOSE]+"?"+u[e.BUILD]+"?",s("LOOSE"),u[e.LOOSE]="^"+u[e.LOOSEPLAIN]+"$",s("GTLT"),u[e.GTLT]="((?:<|>)?=?)",s("XRANGEIDENTIFIERLOOSE"),u[e.XRANGEIDENTIFIERLOOSE]=u[e.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",s("XRANGEIDENTIFIER"),u[e.XRANGEIDENTIFIER]=u[e.NUMERICIDENTIFIER]+"|x|X|\\*",s("XRANGEPLAIN"),u[e.XRANGEPLAIN]="[v=\\s]*("+u[e.XRANGEIDENTIFIER]+")(?:\\.("+u[e.XRANGEIDENTIFIER]+")(?:\\.("+u[e.XRANGEIDENTIFIER]+")(?:"+u[e.PRERELEASE]+")?"+u[e.BUILD]+"?)?)?",s("XRANGEPLAINLOOSE"),u[e.XRANGEPLAINLOOSE]="[v=\\s]*("+u[e.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+u[e.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+u[e.XRANGEIDENTIFIERLOOSE]+")(?:"+u[e.PRERELEASELOOSE]+")?"+u[e.BUILD]+"?)?)?",s("XRANGE"),u[e.XRANGE]="^"+u[e.GTLT]+"\\s*"+u[e.XRANGEPLAIN]+"$",s("XRANGELOOSE"),u[e.XRANGELOOSE]="^"+u[e.GTLT]+"\\s*"+u[e.XRANGEPLAINLOOSE]+"$",s("COERCE"),u[e.COERCE]="(^|[^\\d])(\\d{1,"+p+"})(?:\\.(\\d{1,"+p+"}))?(?:\\.(\\d{1,"+p+"}))?(?:$|[^\\d])",s("COERCERTL"),g[e.COERCERTL]=new RegExp(u[e.COERCE],"g"),h[e.COERCERTL]=new RegExp(c(u[e.COERCE]),"g"),s("LONETILDE"),u[e.LONETILDE]="(?:~>?)",s("TILDETRIM"),u[e.TILDETRIM]="(\\s*)"+u[e.LONETILDE]+"\\s+",g[e.TILDETRIM]=new RegExp(u[e.TILDETRIM],"g"),h[e.TILDETRIM]=new RegExp(c(u[e.TILDETRIM]),"g");var n="$1~";s("TILDE"),u[e.TILDE]="^"+u[e.LONETILDE]+u[e.XRANGEPLAIN]+"$",s("TILDELOOSE"),u[e.TILDELOOSE]="^"+u[e.LONETILDE]+u[e.XRANGEPLAINLOOSE]+"$",s("LONECARET"),u[e.LONECARET]="(?:\\^)",s("CARETTRIM"),u[e.CARETTRIM]="(\\s*)"+u[e.LONECARET]+"\\s+",g[e.CARETTRIM]=new RegExp(u[e.CARETTRIM],"g"),h[e.CARETTRIM]=new RegExp(c(u[e.CARETTRIM]),"g");var l="$1^";s("CARET"),u[e.CARET]="^"+u[e.LONECARET]+u[e.XRANGEPLAIN]+"$",s("CARETLOOSE"),u[e.CARETLOOSE]="^"+u[e.LONECARET]+u[e.XRANGEPLAINLOOSE]+"$",s("COMPARATORLOOSE"),u[e.COMPARATORLOOSE]="^"+u[e.GTLT]+"\\s*("+u[e.LOOSEPLAIN]+")$|^$",s("COMPARATOR"),u[e.COMPARATOR]="^"+u[e.GTLT]+"\\s*("+u[e.FULLPLAIN]+")$|^$",s("COMPARATORTRIM"),u[e.COMPARATORTRIM]="(\\s*)"+u[e.GTLT]+"\\s*("+u[e.LOOSEPLAIN]+"|"+u[e.XRANGEPLAIN]+")",g[e.COMPARATORTRIM]=new RegExp(u[e.COMPARATORTRIM],"g"),h[e.COMPARATORTRIM]=new RegExp(c(u[e.COMPARATORTRIM]),"g");var m="$1$2$3";s("HYPHENRANGE"),u[e.HYPHENRANGE]="^\\s*("+u[e.XRANGEPLAIN]+")\\s+-\\s+("+u[e.XRANGEPLAIN]+")\\s*$",s("HYPHENRANGELOOSE"),u[e.HYPHENRANGELOOSE]="^\\s*("+u[e.XRANGEPLAINLOOSE]+")\\s+-\\s+("+u[e.XRANGEPLAINLOOSE]+")\\s*$",s("STAR"),u[e.STAR]="(<|>)?=?\\s*\\*";for(var a=0;a<i;a++)z(a,u[a]),g[a]||(g[a]=new RegExp(u[a]),h[a]=new RegExp(c(u[a])));C.parse=y;function y(b,$){if((!$||typeof $!="object")&&($={loose:!!$,includePrerelease:!1}),b instanceof f)return b;if(typeof b!="string"||b.length>k)return null;var x=$.loose?h[e.LOOSE]:h[e.FULL];if(!x.test(b))return null;try{return new f(b,$)}catch{return null}}C.valid=R;function R(b,$){var x=y(b,$);return x?x.version:null}C.clean=_;function _(b,$){var x=y(b.trim().replace(/^[=v]+/,""),$);return x?x.version:null}C.SemVer=f;function f(b,$){if((!$||typeof $!="object")&&($={loose:!!$,includePrerelease:!1}),b instanceof f){if(b.loose===$.loose)return b;b=b.version}else if(typeof b!="string")throw new TypeError("Invalid Version: "+b);if(b.length>k)throw new TypeError("version is longer than "+k+" characters");if(!(this instanceof f))return new f(b,$);z("SemVer",b,$),this.options=$,this.loose=!!$.loose;var x=b.trim().match($.loose?h[e.LOOSE]:h[e.FULL]);if(!x)throw new TypeError("Invalid Version: "+b);if(this.raw=b,this.major=+x[1],this.minor=+x[2],this.patch=+x[3],this.major>w||this.major<0)throw new TypeError("Invalid major version");if(this.minor>w||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>w||this.patch<0)throw new TypeError("Invalid patch version");x[4]?this.prerelease=x[4].split(".").map(function(j){if(/^[0-9]+$/.test(j)){var T=+j;if(T>=0&&T<w)return T}return j}):this.prerelease=[],this.build=x[5]?x[5].split("."):[],this.format()}f.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},f.prototype.toString=function(){return this.version},f.prototype.compare=function(b){return z("SemVer.compare",this.version,this.options,b),b instanceof f||(b=new f(b,this.options)),this.compareMain(b)||this.comparePre(b)},f.prototype.compareMain=function(b){return b instanceof f||(b=new f(b,this.options)),S(this.major,b.major)||S(this.minor,b.minor)||S(this.patch,b.patch)},f.prototype.comparePre=function(b){if(b instanceof f||(b=new f(b,this.options)),this.prerelease.length&&!b.prerelease.length)return-1;if(!this.prerelease.length&&b.prerelease.length)return 1;if(!this.prerelease.length&&!b.prerelease.length)return 0;var $=0;do{var x=this.prerelease[$],j=b.prerelease[$];if(z("prerelease compare",$,x,j),x===void 0&&j===void 0)return 0;if(j===void 0)return 1;if(x===void 0)return-1;if(x===j)continue;return S(x,j)}while(++$)},f.prototype.compareBuild=function(b){b instanceof f||(b=new f(b,this.options));var $=0;do{var x=this.build[$],j=b.build[$];if(z("prerelease compare",$,x,j),x===void 0&&j===void 0)return 0;if(j===void 0)return 1;if(x===void 0)return-1;if(x===j)continue;return S(x,j)}while(++$)},f.prototype.inc=function(b,$){switch(b){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",$);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",$);break;case"prepatch":this.prerelease.length=0,this.inc("patch",$),this.inc("pre",$);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",$),this.inc("pre",$);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var x=this.prerelease.length;--x>=0;)typeof this.prerelease[x]=="number"&&(this.prerelease[x]++,x=-2);x===-1&&this.prerelease.push(0)}$&&(this.prerelease[0]===$?isNaN(this.prerelease[1])&&(this.prerelease=[$,0]):this.prerelease=[$,0]);break;default:throw new Error("invalid increment argument: "+b)}return this.format(),this.raw=this.version,this},C.inc=d;function d(b,$,x,j){typeof x=="string"&&(j=x,x=void 0);try{return new f(b,x).inc($,j).version}catch{return null}}C.diff=v;function v(b,$){if(te(b,$))return null;var x=y(b),j=y($),T="";if(x.prerelease.length||j.prerelease.length){T="pre";var M="prerelease"}for(var U in x)if((U==="major"||U==="minor"||U==="patch")&&x[U]!==j[U])return T+U;return M}C.compareIdentifiers=S;var E=/^[0-9]+$/;function S(b,$){var x=E.test(b),j=E.test($);return x&&j&&(b=+b,$=+$),b===$?0:x&&!j?-1:j&&!x?1:b<$?-1:1}C.rcompareIdentifiers=O;function O(b,$){return S($,b)}C.major=A;function A(b,$){return new f(b,$).major}C.minor=I;function I(b,$){return new f(b,$).minor}C.patch=N;function N(b,$){return new f(b,$).patch}C.compare=F;function F(b,$,x){return new f(b,x).compare(new f($,x))}C.compareLoose=K;function K(b,$){return F(b,$,!0)}C.compareBuild=G;function G(b,$,x){var j=new f(b,x),T=new f($,x);return j.compare(T)||j.compareBuild(T)}C.rcompare=V;function V(b,$,x){return F($,b,x)}C.sort=D;function D(b,$){return b.sort(function(x,j){return C.compareBuild(x,j,$)})}C.rsort=X;function X(b,$){return b.sort(function(x,j){return C.compareBuild(j,x,$)})}C.gt=J;function J(b,$,x){return F(b,$,x)>0}C.lt=ee;function ee(b,$,x){return F(b,$,x)<0}C.eq=te;function te(b,$,x){return F(b,$,x)===0}C.neq=ae;function ae(b,$,x){return F(b,$,x)!==0}C.gte=oe;function oe(b,$,x){return F(b,$,x)>=0}C.lte=be;function be(b,$,x){return F(b,$,x)<=0}C.cmp=we;function we(b,$,x,j){switch($){case"===":return typeof b=="object"&&(b=b.version),typeof x=="object"&&(x=x.version),b===x;case"!==":return typeof b=="object"&&(b=b.version),typeof x=="object"&&(x=x.version),b!==x;case"":case"=":case"==":return te(b,x,j);case"!=":return ae(b,x,j);case">":return J(b,x,j);case">=":return oe(b,x,j);case"<":return ee(b,x,j);case"<=":return be(b,x,j);default:throw new TypeError("Invalid operator: "+$)}}C.Comparator=le;function le(b,$){if((!$||typeof $!="object")&&($={loose:!!$,includePrerelease:!1}),b instanceof le){if(b.loose===!!$.loose)return b;b=b.value}if(!(this instanceof le))return new le(b,$);b=b.trim().split(/\s+/).join(" "),z("comparator",b,$),this.options=$,this.loose=!!$.loose,this.parse(b),this.semver===ge?this.value="":this.value=this.operator+this.semver.version,z("comp",this)}var ge={};le.prototype.parse=function(b){var $=this.options.loose?h[e.COMPARATORLOOSE]:h[e.COMPARATOR],x=b.match($);if(!x)throw new TypeError("Invalid comparator: "+b);this.operator=x[1]!==void 0?x[1]:"",this.operator==="="&&(this.operator=""),x[2]?this.semver=new f(x[2],this.options.loose):this.semver=ge},le.prototype.toString=function(){return this.value},le.prototype.test=function(b){if(z("Comparator.test",b,this.options.loose),this.semver===ge||b===ge)return!0;if(typeof b=="string")try{b=new f(b,this.options)}catch{return!1}return we(b,this.operator,this.semver,this.options)},le.prototype.intersects=function(b,$){if(!(b instanceof le))throw new TypeError("a Comparator is required");(!$||typeof $!="object")&&($={loose:!!$,includePrerelease:!1});var x;if(this.operator==="")return this.value===""?!0:(x=new re(b.value,$),_e(this.value,x,$));if(b.operator==="")return b.value===""?!0:(x=new re(this.value,$),_e(b.semver,x,$));var j=(this.operator===">="||this.operator===">")&&(b.operator===">="||b.operator===">"),T=(this.operator==="<="||this.operator==="<")&&(b.operator==="<="||b.operator==="<"),M=this.semver.version===b.semver.version,U=(this.operator===">="||this.operator==="<=")&&(b.operator===">="||b.operator==="<="),Y=we(this.semver,"<",b.semver,$)&&(this.operator===">="||this.operator===">")&&(b.operator==="<="||b.operator==="<"),H=we(this.semver,">",b.semver,$)&&(this.operator==="<="||this.operator==="<")&&(b.operator===">="||b.operator===">");return j||T||M&&U||Y||H},C.Range=re;function re(b,$){if((!$||typeof $!="object")&&($={loose:!!$,includePrerelease:!1}),b instanceof re)return b.loose===!!$.loose&&b.includePrerelease===!!$.includePrerelease?b:new re(b.raw,$);if(b instanceof le)return new re(b.value,$);if(!(this instanceof re))return new re(b,$);if(this.options=$,this.loose=!!$.loose,this.includePrerelease=!!$.includePrerelease,this.raw=b.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(x){return this.parseRange(x.trim())},this).filter(function(x){return x.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}re.prototype.format=function(){return this.range=this.set.map(function(b){return b.join(" ").trim()}).join("||").trim(),this.range},re.prototype.toString=function(){return this.range},re.prototype.parseRange=function(b){var $=this.options.loose,x=$?h[e.HYPHENRANGELOOSE]:h[e.HYPHENRANGE];b=b.replace(x,xe),z("hyphen replace",b),b=b.replace(h[e.COMPARATORTRIM],m),z("comparator trim",b,h[e.COMPARATORTRIM]),b=b.replace(h[e.TILDETRIM],n),b=b.replace(h[e.CARETTRIM],l),b=b.split(/\s+/).join(" ");var j=$?h[e.COMPARATORLOOSE]:h[e.COMPARATOR],T=b.split(" ").map(function(M){return Ae(M,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(T=T.filter(function(M){return!!M.match(j)})),T=T.map(function(M){return new le(M,this.options)},this),T},re.prototype.intersects=function(b,$){if(!(b instanceof re))throw new TypeError("a Range is required");return this.set.some(function(x){return ke(x,$)&&b.set.some(function(j){return ke(j,$)&&x.every(function(T){return j.every(function(M){return T.intersects(M,$)})})})})};function ke(b,$){for(var x=!0,j=b.slice(),T=j.pop();x&&j.length;)x=j.every(function(M){return T.intersects(M,$)}),T=j.pop();return x}C.toComparators=Oe;function Oe(b,$){return new re(b,$).set.map(function(x){return x.map(function(j){return j.value}).join(" ").trim().split(" ")})}function Ae(b,$){return z("comp",b,$),b=Ee(b,$),z("caret",b),b=Ie(b,$),z("tildes",b),b=Te(b,$),z("xrange",b),b=$e(b,$),z("stars",b),b}function ie(b){return!b||b.toLowerCase()==="x"||b==="*"}function Ie(b,$){return b.trim().split(/\s+/).map(function(x){return je(x,$)}).join(" ")}function je(b,$){var x=$.loose?h[e.TILDELOOSE]:h[e.TILDE];return b.replace(x,function(j,T,M,U,Y){z("tilde",b,j,T,M,U,Y);var H;return ie(T)?H="":ie(M)?H=">="+T+".0.0 <"+(+T+1)+".0.0":ie(U)?H=">="+T+"."+M+".0 <"+T+"."+(+M+1)+".0":Y?(z("replaceTilde pr",Y),H=">="+T+"."+M+"."+U+"-"+Y+" <"+T+"."+(+M+1)+".0"):H=">="+T+"."+M+"."+U+" <"+T+"."+(+M+1)+".0",z("tilde return",H),H})}function Ee(b,$){return b.trim().split(/\s+/).map(function(x){return Re(x,$)}).join(" ")}function Re(b,$){z("caret",b,$);var x=$.loose?h[e.CARETLOOSE]:h[e.CARET];return b.replace(x,function(j,T,M,U,Y){z("caret",b,j,T,M,U,Y);var H;return ie(T)?H="":ie(M)?H=">="+T+".0.0 <"+(+T+1)+".0.0":ie(U)?T==="0"?H=">="+T+"."+M+".0 <"+T+"."+(+M+1)+".0":H=">="+T+"."+M+".0 <"+(+T+1)+".0.0":Y?(z("replaceCaret pr",Y),T==="0"?M==="0"?H=">="+T+"."+M+"."+U+"-"+Y+" <"+T+"."+M+"."+(+U+1):H=">="+T+"."+M+"."+U+"-"+Y+" <"+T+"."+(+M+1)+".0":H=">="+T+"."+M+"."+U+"-"+Y+" <"+(+T+1)+".0.0"):(z("no pr"),T==="0"?M==="0"?H=">="+T+"."+M+"."+U+" <"+T+"."+M+"."+(+U+1):H=">="+T+"."+M+"."+U+" <"+T+"."+(+M+1)+".0":H=">="+T+"."+M+"."+U+" <"+(+T+1)+".0.0"),z("caret return",H),H})}function Te(b,$){return z("replaceXRanges",b,$),b.split(/\s+/).map(function(x){return Pe(x,$)}).join(" ")}function Pe(b,$){b=b.trim();var x=$.loose?h[e.XRANGELOOSE]:h[e.XRANGE];return b.replace(x,function(j,T,M,U,Y,H){z("xRange",b,j,T,M,U,Y,H);var he=ie(M),de=he||ie(U),ue=de||ie(Y),ce=ue;return T==="="&&ce&&(T=""),H=$.includePrerelease?"-0":"",he?T===">"||T==="<"?j="<0.0.0-0":j="*":T&&ce?(de&&(U=0),Y=0,T===">"?(T=">=",de?(M=+M+1,U=0,Y=0):(U=+U+1,Y=0)):T==="<="&&(T="<",de?M=+M+1:U=+U+1),j=T+M+"."+U+"."+Y+H):de?j=">="+M+".0.0"+H+" <"+(+M+1)+".0.0"+H:ue&&(j=">="+M+"."+U+".0"+H+" <"+M+"."+(+U+1)+".0"+H),z("xRange return",j),j})}function $e(b,$){return z("replaceStars",b,$),b.trim().replace(h[e.STAR],"")}function xe(b,$,x,j,T,M,U,Y,H,he,de,ue,ce){return ie(x)?$="":ie(j)?$=">="+x+".0.0":ie(T)?$=">="+x+"."+j+".0":$=">="+$,ie(H)?Y="":ie(he)?Y="<"+(+H+1)+".0.0":ie(de)?Y="<"+H+"."+(+he+1)+".0":ue?Y="<="+H+"."+he+"."+de+"-"+ue:Y="<="+Y,($+" "+Y).trim()}re.prototype.test=function(b){if(!b)return!1;if(typeof b=="string")try{b=new f(b,this.options)}catch{return!1}for(var $=0;$<this.set.length;$++)if(Le(this.set[$],b,this.options))return!0;return!1};function Le(b,$,x){for(var j=0;j<b.length;j++)if(!b[j].test($))return!1;if($.prerelease.length&&!x.includePrerelease){for(j=0;j<b.length;j++)if(z(b[j].semver),b[j].semver!==ge&&b[j].semver.prerelease.length>0){var T=b[j].semver;if(T.major===$.major&&T.minor===$.minor&&T.patch===$.patch)return!0}return!1}return!0}C.satisfies=_e;function _e(b,$,x){try{$=new re($,x)}catch{return!1}return $.test(b)}C.maxSatisfying=Ne;function Ne(b,$,x){var j=null,T=null;try{var M=new re($,x)}catch{return null}return b.forEach(function(U){M.test(U)&&(!j||T.compare(U)===-1)&&(j=U,T=new f(j,x))}),j}C.minSatisfying=L;function L(b,$,x){var j=null,T=null;try{var M=new re($,x)}catch{return null}return b.forEach(function(U){M.test(U)&&(!j||T.compare(U)===1)&&(j=U,T=new f(j,x))}),j}C.minVersion=B;function B(b,$){b=new re(b,$);var x=new f("0.0.0");if(b.test(x)||(x=new f("0.0.0-0"),b.test(x)))return x;x=null;for(var j=0;j<b.set.length;++j){var T=b.set[j];T.forEach(function(M){var U=new f(M.semver.version);switch(M.operator){case">":U.prerelease.length===0?U.patch++:U.prerelease.push(0),U.raw=U.format();case"":case">=":(!x||J(x,U))&&(x=U);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+M.operator)}})}return x&&b.test(x)?x:null}C.validRange=Z;function Z(b,$){try{return new re(b,$).range||"*"}catch{return null}}C.ltr=Q;function Q(b,$,x){return ve(b,$,"<",x)}C.gtr=se;function se(b,$,x){return ve(b,$,">",x)}C.outside=ve;function ve(b,$,x,j){b=new f(b,j),$=new re($,j);var T,M,U,Y,H;switch(x){case">":T=J,M=be,U=ee,Y=">",H=">=";break;case"<":T=ee,M=oe,U=J,Y="<",H="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(_e(b,$,j))return!1;for(var he=0;he<$.set.length;++he){var de=$.set[he],ue=null,ce=null;if(de.forEach(function(ye){ye.semver===ge&&(ye=new le(">=0.0.0")),ue=ue||ye,ce=ce||ye,T(ye.semver,ue.semver,j)?ue=ye:U(ye.semver,ce.semver,j)&&(ce=ye)}),ue.operator===Y||ue.operator===H||(!ce.operator||ce.operator===Y)&&M(b,ce.semver))return!1;if(ce.operator===H&&U(b,ce.semver))return!1}return!0}C.prerelease=qe;function qe(b,$){var x=y(b,$);return x&&x.prerelease.length?x.prerelease:null}C.intersects=fe;function fe(b,$,x){return b=new re(b,x),$=new re($,x),b.intersects($)}C.coerce=me;function me(b,$){if(b instanceof f)return b;if(typeof b=="number"&&(b=String(b)),typeof b!="string")return null;$=$||{};var x=null;if(!$.rtl)x=b.match(h[e.COERCE]);else{for(var j;(j=h[e.COERCERTL].exec(b))&&(!x||x.index+x[0].length!==b.length);)(!x||j.index+j[0].length!==x.index+x[0].length)&&(x=j),h[e.COERCERTL].lastIndex=j.index+j[1].length+j[2].length;h[e.COERCERTL].lastIndex=-1}return x===null?null:y(x[2]+"."+(x[3]||"0")+"."+(x[4]||"0"),$)}}(Ce,Ce.exports)),Ce.exports}var Ve,tt;function It(){if(tt)return Ve;tt=1;const W=Ke(),C=At(),q="semver",z={base:W.string(),type:"semverRange",validate:function(p,{error:o}){return C.validRange(p)?{value:p}:{errors:o(`${q}.valid`)}},messages:{[`${q}.valid`]:"{{#label}} needs to be a valid semver range"}},k={};return k.compare={method:!1,validate:function(p,o,{exp:g},{name:h}){return C[h](p,g)?p:o.error(`${q}.${h}`,{exp:g})},args:[{name:"exp",assert:C.valid,message:"needs to be a valid semver expression"}]},["gt","gte","lt","lte","eq","neq"].forEach(function(p){k[p]={method:function(o){return this.$_addRule({name:p,method:"compare",args:{exp:o}})}}}),k.cmp={method:function(p,o){return this.$_addRule({name:"cmp",args:{cmp:p,exp:o}})},validate:function(p,o,{cmp:g,exp:h}){return C.cmp(p,g,h)?p:o.error(`${q}.cmp`,{cmp:g,exp:h})},args:[{name:"cmp",assert:p=>["===","!==","","=","==","!=",">",">=","<","<="].includes(p),message:"needs to be a valid comparator"},{name:"exp",assert:C.valid,message:"needs to be a valid semver expression"}]},k.compareRange={method:!1,validate:function(p,o,{rng:g},{name:h}){return C[h](p,g)?p:o.error(`${q}.${h}`,{rng:g})},args:[{name:"rng",assert:C.validRange,message:"needs to be a valid semver range"}]},["satisfies","gtr","ltr"].forEach(function(p){k[p]={method:function(o){return this.$_addRule({name:p,method:"compareRange",args:{rng:o}})}}}),k.outside={method:function(p,o){return this.$_addRule({name:"outside",args:{hilo:p,rng:o}})},validate:function(p,o,{hilo:g,rng:h}){return C.outside(p,h,g)?p:o.error(`${q}.outside`,{hilo:g,rng:h})},args:[{name:"hilo",assert:p=>[">","<"].includes(p),message:"needs to be a valid comparator"},{name:"rng",assert:C.validRange,message:"needs to be a valid semver range"}]},Ve={semver:{base:W.string(),type:"semver",validate:function(p,{error:o}){return C.valid(p)?{value:p}:{errors:o(`${q}.valid`)}},messages:{[`${q}.valid`]:"{{#label}} needs to be a valid semver expression",[`${q}.gt`]:"{{#label}} needs to be greater than {{#exp}}",[`${q}.gte`]:"{{#label}} needs to be greater than or equal to {{#exp}}",[`${q}.lt`]:"{{#label}} needs to be less than {{#exp}}",[`${q}.lte`]:"{{#label}} needs to be less than or equal to {{#exp}}",[`${q}.eq`]:"{{#label}} needs to be logically equivalent to {{#exp}}",[`${q}.neq`]:"{{#label}} needs to be logically different than {{#exp}}",[`${q}.cmp`]:"{{#label}} needs to satisfy {{#cmp}} on {{#exp}}",[`${q}.satisfies`]:"{{#label}} needs to satisfy {{#rng}}",[`${q}.gtr`]:"{{#label}} needs to be greater than range {{#rng}}",[`${q}.ltr`]:"{{#label}} needs to be less than range {{#rng}}",[`${q}.outside`]:"{{#label}} needs to be {{#hilo}} than range {{#rng}}"},rules:k},semverRange:z},Ve}/*!
|
|
12
|
-
* is-var-name | ISC (c) Shinnosuke Watanabe
|
|
13
|
-
* https://github.com/shinnn/is-var-name
|
|
14
|
-
*/function jt(W){if(typeof W!="string"||W.trim()!==W)return!1;try{new Function(W,"var "+W)}catch{return!1}return!0}const Tt=Object.freeze(Object.defineProperty({__proto__:null,default:jt},Symbol.toStringTag,{value:"Module"})),Lt=lt(Tt);var ne={},rt;function Nt(){if(rt)return ne;rt=1;const W=Ke();function C(E){return E&&typeof E=="object"&&"default"in E?E.default:E}const q=C(W),z={"-a":"--attach","-d":"--detach","-e":"--env","-h":"--hostname","-i":"--interactive","-it":"-it","-rm":"-rm","-m":"--memory","-p":"--publish","-P":"--publish-all","-l":"--label","-n":"--name","-q":"--quiet","-x":"--x-registry","-t":"--tty","-u":"--user","-v":"--volume","-w":"--workdir","-cgroupns":"--cgroupns","-cpus":"--cpus","-g":"--gpus","-ip6":"--ip6","--read-only":"--read-only","--add-host":"--add-host","--attach":"--attach","--blkio-weight":"--blkio-weight","--blkio-weight-device":"--blkio-weight-device","--cap-add":"--cap-add","--cap-drop":"--cap-drop","--cgroup-parent":"--cgroup-parent","--cidfile":"--cidfile","--cpu-period":"--cpu-period","--cpu-quota":"--cpu-quota","--cpu-rt-period":"--cpu-rt-period","--cpu-rt-runtime":"--cpu-rt-runtime","--cpu-shares":"--cpu-shares","--cpus":"--cpus","--cpuset-cpus":"--cpuset-cpus","--cpuset-mems":"--cpuset-mems","--detach":"--detach","--detach-keys":"--detach-keys","--device":"--device","--device-cgroup-rule":"--device-cgroup-rule","--device-read-bps":"--device-read-bps","--device-read-iops":"--device-read-iops","--device-write-bps":"--device-write-bps","--device-write-iops":"--device-write-iops","--disable-content-trust":"--disable-content-trust","--dns":"--dns","--dns-opt":"--dns-opt","--dns-search":"--dns-search","--domainname":"--domainname","--entrypoint":"--entrypoint","--env":"--env","--env-file":"--env-file","--expose":"--expose","--gpus":"--gpus","--group-add":"--group-add","--health-cmd":"--health-cmd","--health-interval":"--health-interval","--health-retries":"--health-retries","--health-start-period":"--health-start-period","--health-timeout":"--health-timeout","--help":"--help","--hostname":"--hostname","--init":"--init","--interactive":"--interactive","--ip":"--ip","--ip6":"--ip6","--ipc":"--ipc","--isolation":"--isolation","--kernel-memory":"--kernel-memory","--label":"--label","--label-file":"--label-file","--link":"--link","--link-local-ip":"--link-local-ip","--log-driver":"--log-driver","--log-opt":"--log-opt","--mac-address":"--mac-address","--memory":"--memory","--memory-reservation":"--memory-reservation","--memory-swap":"--memory-swap","--memory-swappiness":"--memory-swappiness","--mount":"--mount","--name":"--name","--network":"--network","--network-alias":"--network-alias","--no-healthcheck":"--no-healthcheck","--oom-kill-disable":"--oom-kill-disable","--oom-score-adj":"--oom-score-adj","--pid":"--pid","--pids-limit":"--pids-limit","--platform":"--platform","--privileged":"--privileged","--publish":"--publish","--publish-all":"--publish-all","--pull":"--pull","--restart":"--restart","--rm":"--rm","--runtime":"--runtime","--security-opt":"--security-opt","--shm-size":"--shm-size","--stop-signal":"--stop-signal","--stop-timeout":"--stop-timeout","--storage-opt":"--storage-opt","--sysctl":"--sysctl","--tmpfs":"--tmpfs","--tty":"--tty","--ulimit":"--ulimit","--user":"--user","--userns":"--userns","--uts":"--uts","--volume":"--volume","--volume-driver":"--volume-driver","--volumes-from":"--volumes-from","--workdir":"--workdir"},k={"--env":!0,"--publish":!0,"--volume":!0,"--attach":!0,"--quiet":!0,"--entrypoint":!0,"--workdir":!0,"--cidfile":!0,"--detach-keys":!0,"--disable-content-trust":!0,"--domainname":!0,"--expose":!0,"--ip":!0,"--link-local-ip":!0,"--platform":!0},w={"-rm":!0,"--name":!0,"--label":!0,"--network":!0,"--user":!0},p={"--volume":!0,"--publish":!0},o=new Set(["--publish","--volume"]),g=E=>{const[S]=E.split(":");return S?.startsWith("/")||S?.startsWith("./")||S?.startsWith("../")||S?.startsWith("~")||S?.startsWith("$BLOCKLET")};function h(E){return E.map(S=>{if(S.key!=="--volume"||S.value.startsWith("$BLOCKLET_APP_DIR/")||S.value.startsWith("$BLOCKLET_DATA_DIR/"))return S;const[O,...A]=S.value.split(":");if(!O||!g(S.value))return S;const I=O.startsWith("/")?`$BLOCKLET_DATA_DIR${O}`:`$BLOCKLET_DATA_DIR/${O}`;return{...S,value:[I,...A].join(":")}})}function u(E){let S=!0;return E.find(A=>A.key==="--publish"&&A.type==="web")?E.map(A=>{if(A.key==="--publish"){const I={...A,type:S?"docker":A.type};return S=A.type==="web",I}return A}):E.map(A=>{if(A.key==="--publish"){const I={...A,type:S?"web":"docker"};return S=!1,I}return A})}function e(E){if(!E)return{dockerArgs:[],dockerEnvs:[],dockerImage:"",dockerCommand:""};if(E=E.trim(),E.startsWith("$ docker run")&&(E=E.replace("$ docker run","docker run")),!E.startsWith("docker run"))return{dockerArgs:[],dockerEnvs:[],dockerImage:"",dockerCommand:""};const O=E.replace(/\\\n/g,"").replace(/\n/g," ").trim().match(/(?:[^\s"']+|'[^']*'|"[^"]*")+/g);if(!O)return{dockerArgs:[],dockerEnvs:[],dockerImage:"",dockerCommand:""};const A=[],I=[];let N=0,F="",K="";const G=[];for(;N<O.length;){const D=O[N];if(!D){N++;continue}if(D==="docker"||D==="run"){N++;continue}if((D==="-e"||D==="--env")&&N+1<O.length){const X=O[N+1]||"",[J,...ee]=X.split("=");if(J){const te=ee.join("=").replace(/^['"]|['"]$/g,"");I.push({key:J,value:te})}N+=2;continue}if(D.startsWith("-")&&G.length===0){const X=D.indexOf("=");let J=D,ee=null;X!==-1&&(J=D.substring(0,X),ee=D.substring(X+1).replace(/^['"]|['"]$/g,""));const te=z[J];if(!te){N+=2;continue}if(te==="--publish"){let ae="";if(ee)ae=ee,A.push({key:te,value:ae});else if(N+1<O.length&&!(O[N+1]||"").startsWith("-")){ae=(O[N+1]||"").replace(/^['"]|['"]$/g,""),A.push({key:te,value:ae}),N+=2;continue}else{A.push({key:te,value:"true"}),N++;continue}N++;continue}if(ee!==null){A.push({key:te,value:ee}),N++;continue}else if(N+1<O.length&&!(O[N+1]||"").startsWith("-")){const ae=(O[N+1]||"").replace(/^['"]|['"]$/g,"");A.push({key:te,value:ae}),N+=2;continue}else{A.push({key:te,value:"true"}),N++;continue}}G.push(D),N++}F=G[0]||"",K=G.slice(1).join(" ");const V=[];for(const D of A)D.name="",D.path="",D.prefix="",D.protocol="",D.proxyBehavior="service",D.type="docker",!(o.has(D.key)&&D.value==="true")&&V.push(D);for(const D of I)D.custom="",D.description="",D.secure=!1,D.shared=!1,D.required=!1;return{dockerArgs:u(h(V)),dockerEnvs:I,dockerImage:F,dockerCommand:K}}function i({dockerArgs:E,dockerEnvs:S,dockerImage:O,dockerCommand:A}){if(E.length===0&&S.length===0&&!O)return"";const I=["docker run \\"],N=new Set(["--publish","--volume","--expose","--device","--mount","--label","--cap-add","--cap-drop","--add-host","--dns","--network-alias","--sysctl","--ulimit","--network"]);for(const F of E){const{key:K,value:G}=F;if(N.has(K))if(G==="true")I.push(` ${K} \\`);else{const V=/[\s"']/g.test(G)?`"${G}"`:G;I.push(` ${K} ${V} \\`)}else if(!I.some(V=>V.startsWith(` ${K}`)))if(G==="true")I.push(` ${K} \\`);else{const V=/[\s"']/g.test(G)?`"${G}"`:G;I.push(` ${K} ${V} \\`)}}for(const F of S){const{key:K,value:G}=F,V=/["']/g.test(G)?G:`"${G}"`;I.push(` -e ${K}=${V} \\`)}return O&&I.push(` ${O} \\`),A&&I.push(` ${A} \\`),I[I.length-1]?.endsWith(" \\")&&(I[I.length-1]=(I[I.length-1]||"").slice(0,-2)),I.join(`
|
|
15
|
-
`)}const s={"--volume":E=>{const[S]=E.split(":");return S?g(E)&&!E.startsWith("$BLOCKLET_APP_DIR/")&&!E.startsWith("$BLOCKLET_DATA_DIR/")?"Volume must start with $BLOCKLET_APP_DIR or $BLOCKLET_DATA_DIR":E.indexOf("..")>-1?'Volume cannot contain ".."':"":"Volume must start with key:value"}},r=E=>E.replace(/^[-]+/,"").replace(/-([a-z])/g,(A,I)=>I.toUpperCase()),t=E=>`--${E.replace(/([A-Z])/g,"-$1").toLowerCase()}`,c=[" -- ","~","&","|",">","<","{","}","[","]",";","$","!","*","%","&&","||",","],n=["rm ","sudo "];function l(E){if(E==="")return;if(/(\n|\\n|\\\n|\t|\\t|\\\t)/.test(E))throw new Error("Docker CMD is invalid");const O=E.toLocaleLowerCase();if(n.some(I=>O.indexOf(I)!==-1))throw new Error("Docker CMD is invalid");if(c.some(I=>E.indexOf(I)!==-1))throw new Error("Docker CMD is invalid");if(!/^(?:(?:[a-zA-Z0-9\-_.\/:=\s]+)|(?:\@{1,2}[a-zA-Z_][a-zA-Z0-9_]*))+$/.test(E))throw new Error("Docker CMD is invalid")}const m=Array.from(new Set(Object.keys(k).map(r))),a=["publish","volume"],y=q.object({workdir:q.string().trim().optional(),image:q.string().trim().regex(/^[^\s]+$/).optional(),shell:q.string().trim().optional(),volumes:q.array().items(q.string().trim()).optional(),script:q.string().trim().optional(),installNodeModules:q.boolean().optional(),skipWrapDockerfile:q.boolean().optional(),command:q.string().allow("").default("").optional().custom((E,S)=>{try{return l(E),E}catch(O){return S.error("any.invalid",{message:O.message})}},"Docker CMD validation"),runBaseScript:q.boolean().optional(),...m.reduce((E,S)=>{const O=s[t(S)];return a.includes(S)?(E[S]=q.array().items(q.string().trim()).optional(),O?E[S]=q.array().items(q.string().trim().custom((A,I)=>{const N=O(A);return N?I.message(N):A})).optional():E[S]=q.array().items(q.string().trim()).optional(),E):(O?E[S]=q.string().trim().custom((A,I)=>{const N=O(A);return N?I.message(N):A}).optional():E[S]=q.string().trim().optional(),E)},{})}).optional(),R=E=>{const S=/^(?:[a-zA-Z0-9.-]+(?::[0-9]+)?\/)?(?:[a-z0-9]+(?:[._-][a-z0-9]+)*\/)?[a-z0-9]+(?:[._-][a-z0-9]+)*(:[a-zA-Z0-9_.-]+)?$/;return q.string().trim().regex(S).required().validate(E)},_=(E,S,O)=>{const A={};O.forEach(N=>{const F=r(N.key);a.includes(F)?A[F]=[...A[F]||[],N.value]:A[F]=N.value});const{error:I}=R(E);if(I)return{error:I,value:A};try{l(E)}catch(N){return{error:N,value:A}}return A.image=E,A.command=S||"",y.validate(A)};function f(E,S){const O=JSON.parse(JSON.stringify(S)),A=new Map;let I=1;const N=[];return O.forEach(F=>{if(F.key==="--publish"){const G=F.value.split(":");let V="127.0.0.1",D="",X="";G.length===2?[D,X]=G:G.length===3?[V,D,X]=G:G.length===1&&(X=G[0]||"");let J=A.get(D||"");if(J||(J=`$BLOCKLET_PORT_${I++}`,A.set(D||"",J)),!N.find(ee=>ee.port===D)){const ee=F.type||"docker",te=`${E.replace(/\W/g,"-")}-${N.length+1}`;N.push({type:ee,proxyBehavior:F.proxyBehavior||"",name:te,path:`/${te}`,port:D||X,containerPort:Number(X)||0,hostIP:V,prefix:ee==="docker"?`/${te}`:F.prefix||"*"})}}}),N}function d(E,S=!1){const O=[];if(!E)return O;for(const A of E){const I={name:A.key,default:A.value===`$${A.key}`?"":A.value,secure:A.secure!==void 0?A.secure:!1,shared:A.shared!==void 0?A.shared:!1,required:A.required!==void 0?A.required:!1,description:A.description||A.key};S||(I.custom=A.custom||""),O.push(I)}return O}function v(E,S){const O=JSON.parse(JSON.stringify(E));return S.split(".").map(I=>{const N=I.match(/(.+)\[(.+?)\]/);return N?[N[1],N[2]]:I}).flat().filter(Boolean).reduce((I,N)=>{if(!I||!N)return;const F=N?.match(/(.+?)=(.+)/);if(Array.isArray(I)&&F){const[,G,V]=F;return G&&V&&(I=I.find(D=>{const X=Object.keys(D).find(J=>J.toLowerCase()===G.toLowerCase());return X&&D[X]===V})),I}const K=Object.keys(I).find(G=>G.toLowerCase()===N.toLowerCase());return K?I[K]:void 0},O)}return ne.addBlockletPrefixVolume=h,ne.allowDockerArgs=k,ne.autoSetDockerArgs=w,ne.dockerArgsToCamelCase=r,ne.dockerArgsValidator=s,ne.dockerBuildCommand=i,ne.dockerCamelCaseToDash=t,ne.dockerCmdValidator=l,ne.dockerParseCommand=e,ne.dockerParseEnvironments=d,ne.dockerParsePublishPorts=f,ne.dockerSchema=y,ne.getObjByPath=v,ne.isVolumePath=g,ne.multiValueArgs=a,ne.notAllowUseCustomDockerArgs=p,ne.parseDockerArgsToSchema=_,ne.whiteDockerArgs=z,ne}var Ge,st;function Ct(){if(st)return Ge;st=1;const W=ft(),C=mt(),q=De();return Ge=k=>{if((0,q.isValid)(k))return k;const w=(0,C.toHex)(ht.from(typeof k=="string"?k.trim():k));return(0,q.fromPublicKey)(w,{role:W.types.RoleType.ROLE_ANY})},Ge}var pe={},nt;function Dt(){if(nt)return pe;nt=1;var W=pe&&pe.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(pe,"__esModule",{value:!0}),pe.didExtension=pe.fileExtension=void 0;const C=W(ct),q=W(Et()),z=De(),k=p=>({type:"file",base:p.string(),validate(o,{error:g}){return o&&typeof o=="string"?{value:o}:{errors:g("file.empty",{file:o})}},messages:{"file.empty":'file "{{#file}}" must be non-empty string',"file.enoent":'file "{{#file}}" does not exist',"file.error.generic":'file could not be read. message: "{{#message}}"'},rules:{exists:{multi:!1,method({baseDir:o=null,canSkip:g=()=>!1}={}){return this.$_addRule({name:"exists",args:{baseDir:o,canSkip:g}})},args:[{name:"baseDir",assert:o=>C.default.existsSync(o),message:"baseDir must exist"},{name:"canSkip",assert:o=>typeof o=="function",message:"canSkip must be a function"}],validate(o,{error:g},{baseDir:h,canSkip:u}={}){if(typeof u=="function"&&u(h,o))return o;try{return C.default.statSync(q.default.join(h,o)),o}catch(e){switch(e.code){case"ENOENT":return g("file.enoent",{file:o})}return g("file.error.generic",{message:e.message})}}}}});pe.fileExtension=k;const w=p=>({type:"DID",base:p.string(),validate(o,{error:g}){return!o||typeof o!="string"?{errors:g("did.empty",{did:o})}:(0,z.isValid)(o)===!1?{errors:g("did.invalid",{did:o})}:{value:o}},messages:{"did.empty":'did "{{#did}}" must be non-empty string',"did.invalid":'did "{{#did}}" is not valid'}});return pe.didExtension=w,pe.default={fileExtension:k,didExtension:w},pe}var Se={},We={exports:{}};const Pt=["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"];var at;function qt(){if(at)return We.exports;at=1;var W=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),C=Pt,q=["node_modules","favicon.ico"],z=We.exports=function(w){var p=[],o=[];if(w===null)return o.push("name cannot be null"),k(p,o);if(w===void 0)return o.push("name cannot be undefined"),k(p,o);if(typeof w!="string")return o.push("name must be a string"),k(p,o);if(w.length||o.push("name length must be greater than zero"),w.match(/^\./)&&o.push("name cannot start with a period"),w.match(/^_/)&&o.push("name cannot start with an underscore"),w.trim()!==w&&o.push("name cannot contain leading or trailing spaces"),q.forEach(function(e){w.toLowerCase()===e&&o.push(e+" is a blacklisted name")}),C.forEach(function(e){w.toLowerCase()===e&&p.push(e+" is a core module name")}),w.length>214&&p.push("name can no longer contain more than 214 characters"),w.toLowerCase()!==w&&p.push("name can no longer contain capital letters"),/[~'!()*]/.test(w.split("/").slice(-1)[0])&&p.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(w)!==w){var g=w.match(W);if(g){var h=g[1],u=g[2];if(encodeURIComponent(h)===h&&encodeURIComponent(u)===u)return k(p,o)}o.push("name can only contain URL-friendly characters")}return k(p,o)};z.scopedPackagePattern=W;var k=function(w,p){var o={validForNewPackages:p.length===0&&w.length===0,validForOldPackages:p.length===0,warnings:w,errors:p};return o.warnings.length||delete o.warnings,o.errors.length||delete o.errors,o};return We.exports}var it;function Mt(){return it||(it=1,function(W){var C=Se&&Se.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(W,"__esModule",{value:!0}),W.validateName=W.validateNewDid=void 0;const q=De(),z=C(qt()),k=32,w=o=>{if((0,q.toTypeInfo)(o).role!==q.types.RoleType.ROLE_BLOCKLET)throw new Error("Blocklet DID's type must be ROLE_BLOCKLET")};W.validateNewDid=w;const p=(o,{checkDid:g=!0}={})=>{if((0,q.isValid)(o))g&&(0,W.validateNewDid)(o);else{const{validForNewPackages:h,errors:u=[],warnings:e=[]}=(0,z.default)(o);if(!h)throw new Error(u[0]||e[0]);if(o.length>k)throw new Error("Blocklet name is too long")}};W.validateName=p,W.default={validateName:W.validateName,validateNewDid:W.validateNewDid}}(Se)),Se}var ot;function zt(){if(ot)return P;ot=1;var W=P&&P.__createBinding||(Object.create?function(L,B,Z,Q){Q===void 0&&(Q=Z);var se=Object.getOwnPropertyDescriptor(B,Z);(!se||("get"in se?!B.__esModule:se.writable||se.configurable))&&(se={enumerable:!0,get:function(){return B[Z]}}),Object.defineProperty(L,Q,se)}:function(L,B,Z,Q){Q===void 0&&(Q=Z),L[Q]=B[Z]}),C=P&&P.__setModuleDefault||(Object.create?function(L,B){Object.defineProperty(L,"default",{enumerable:!0,value:B})}:function(L,B){L.default=B}),q=P&&P.__importStar||function(){var L=function(B){return L=Object.getOwnPropertyNames||function(Z){var Q=[];for(var se in Z)Object.prototype.hasOwnProperty.call(Z,se)&&(Q[Q.length]=se);return Q},L(B)};return function(B){if(B&&B.__esModule)return B;var Z={};if(B!=null)for(var Q=L(B),se=0;se<Q.length;se++)Q[se]!=="default"&&W(Z,B,Q[se]);return C(Z,B),Z}}(),z=P&&P.__importDefault||function(L){return L&&L.__esModule?L:{default:L}};Object.defineProperty(P,"__esModule",{value:!0}),P.Joi=P.eventsSchema=P.installBlockletDescriptionSchema=P.installBlockletTitleSchema=P.resourceBundleSchema=P.authConfigSchema=P.cacheableSchema=P.statsSchema=P.titleSchema=P.themeSchema=P.signatureSchema=P.serviceSchema=P.scriptsSchema=P.personSchema=P.navigationSchema=P.navigationItemSchema=P.updateMountPointSchema=P.mountPointSchema=P.logoSchema=P.interfaceSchema=P.environmentNameSchema=P.environmentSchema=P.engineSchema=P.endpointSchema=P.distSchema=P.descriptionSchema=P.createBlockletSchema=P.componentSchema=P.blockletNameSchema=P.blockletMetaSchema=void 0;const k=z(ct),w=z(Ke()),p=z(St()),o=z(Ot()),g=It(),h=z(Lt),u=dt(),e=De(),i=Nt(),s=pt(),r=z(Ct()),t=Dt(),c=Mt(),n=q(gt()),l=p.default.default,m="/.well-known",a=w.default.extend(g.semver).extend(g.semverRange).extend(t.fileExtension).extend(t.didExtension);P.Joi=a;const y=(L,B)=>(0,n.checkLink)(L)?L:B.message(`Invalid navigation link: ${L}
|
|
16
|
-
|
|
17
|
-
A valid navigation link should be a relative url which start with '/' or a absolute url, such as:
|
|
18
|
-
- /en/home
|
|
19
|
-
- /zh/home
|
|
20
|
-
- https://www.arcblock.io
|
|
21
|
-
`),R=(L,B)=>!L||(0,h.default)(L)?L:B.message(`Invalid navigation id: ${L}
|
|
22
|
-
|
|
23
|
-
A valid navigation id is should follow the rules of javascript variables, such as:
|
|
24
|
-
- foo
|
|
25
|
-
- fooBar
|
|
26
|
-
- foo123
|
|
27
|
-
|
|
28
|
-
see detail in https://www.npmjs.com/package/is-var-name
|
|
29
|
-
`),_=a.string().trim().min(1).custom(L=>{if(l(L)>s.MAX_TITLE_LENGTH)throw new Error(`title length should not exceed ${s.MAX_TITLE_LENGTH} (see: https://www.npmjs.com/package/cjk-length)`);return L}).meta({className:"TTitle"});P.titleSchema=_;const f=a.string().trim().min(3).max(160).meta({className:"TDescription"});P.descriptionSchema=f;const d=a.string().trim().min(3).max(20).messages({"*":"Title length must be between 3 and 20 characters"}).meta({className:"TInstallBlockletTitle"});P.installBlockletTitleSchema=d;const v=a.string().trim().min(3).max(80).messages({"*":"Description length must be between 3 and 80 characters"}).meta({className:"TInstallBlockletDescription"});P.installBlockletDescriptionSchema=v;const E=a.string().uri({scheme:["http","https"],allowRelative:!0}).allow("").custom((L,B)=>L.includes(u.WELLKNOWN_BLOCKLET_LOGO_PATH)?B.message(`logo url should not include ${u.WELLKNOWN_BLOCKLET_LOGO_PATH}`):L).meta({className:"TLogo"});P.logoSchema=E;const S=a.string().trim().min(1),O=S.meta({className:"TMountPoint"}).custom((L,B)=>(0,n.isValidUrlPath)(L)?L:B.message(`mountPoint cannot contain such characters space $*+~()'"!:@\\`));P.mountPointSchema=O;const A=S.meta({className:"TUpdateMountPoint"}).custom(L=>(0,n.default)(L));P.updateMountPointSchema=A;const I=a.string().custom(L=>((0,c.validateName)(L),L)).meta({className:"TBlockletName"});P.blockletNameSchema=I;const N=[],F=a.string().trim().min(1).max(50).required().custom((L,B)=>L.startsWith("BLOCKLET")&&!N.includes(L)?B.message("Env name can not start with BLOCKLET_"):L.startsWith("COMPONENT")?B.message("Env name can not start with COMPONENT_"):L.startsWith("ABTNODE")?B.message("Env name can not start with ABTNODE_"):/[^\w]/.test(L)?B.message('Env name can include only numbers or letters or "_"'):L).meta({className:"TEnvironmentName",unknownType:"any"});P.environmentNameSchema=F;const K=a.object({name:F.required(),description:a.string().trim().required(),default:a.string().optional().allow("").default(""),required:a.boolean().default(!1),secure:a.boolean().default(!1),validation:a.string().optional(),shared:a.boolean().default(L=>L.secure?!1:void 0)}).custom((L,B)=>L.secure&&L.default?B.message(`Cannot declare default value for secure env ${L.name}`):L).meta({className:"TEnvironment",unknownType:"any"});P.environmentSchema=K;const G=a.object({dev:a.string().trim().min(1),e2eDev:a.string().trim().min(1),preFlight:a.string().trim().min(1),preInstall:a.string().trim().min(1),postInstall:a.string().trim().min(1),preStart:a.string().trim().min(1),postStart:a.string().trim().min(1),preStop:a.string().trim().min(1),preUninstall:a.string().trim().min(1),preConfig:a.string().trim().min(1)}).rename("pre-flight","preFlight").rename("pre-install","preInstall").rename("post-install","postInstall").rename("pre-start","preStart").rename("post-start","postStart").rename("pre-stop","preStop").rename("pre-uninstall","preUninstall").rename("pre-config","preConfig").optional().meta({className:"TScripts",unknownType:"any"});P.scriptsSchema=G;const V=a.object({name:a.string().required().trim(),config:a.object().optional().default({})}).unknown(!0).meta({className:"TService",unknownType:"any"});P.serviceSchema=V;const D=a.object({type:a.string().trim(!0).min(1).required(),path:a.string().required(),meta:a.object({vcType:a.string(),payable:a.boolean(),params:a.array().items({name:a.string().required().trim(),description:a.string().required().trim()})})}).meta({className:"TEndpoint",unknownType:"any"});P.endpointSchema=D;const X=a.string().trim().custom((L,B)=>{const Z=L.split("/").filter(Boolean);return Z.length===0?B.message("cacheable path must be a valid pathname that is not /"):`/${Z.join("/")}`}).meta({className:"TPathPrefix",unknownType:"any"});P.cacheableSchema=X;const J=a.object({type:a.string().lowercase().valid(...s.BLOCKLET_INTERFACE_TYPES).required(),name:a.string().trim().required(),path:a.string().trim().default("/"),prefix:a.string().trim().min(1).default(s.BLOCKLET_DYNAMIC_PATH_PREFIX),containerPort:a.number().port().optional(),hostIP:a.string().trim().ip({version:["ipv4","ipv6"]}).optional(),protocol:a.string().lowercase().valid(...s.BLOCKLET_INTERFACE_PROTOCOLS).default("http"),port:a.alternatives().try(a.string().uppercase().default(s.BLOCKLET_DEFAULT_PORT_NAME),a.object({internal:a.string().uppercase().required(),external:a.number().port().required()})).default(s.BLOCKLET_DEFAULT_PORT_NAME),cacheable:a.array().items(X).unique(),services:a.array().items(V).unique("name"),endpoints:a.array().items(D).unique("type"),pageGroups:a.array().items(a.string().min(1).max(255).trim()).unique(),proxyBehavior:a.string().valid("service","direct").default("service").optional()}).meta({className:"TInterface",unknownType:"any"});P.interfaceSchema=J;const ee=a.alternatives().try(a.string().required(),a.object({url:a.string().uri({scheme:["http","https","file"]}).required(),name:I.required(),version:a.alternatives().try(a.string().valid("latest"),a.semverRange().valid())}),a.object({store:a.string().uri({scheme:["http","https"]}).required(),name:I.required(),version:a.alternatives().try(a.string().valid("latest"),a.semverRange().valid()).default("latest")})),te=a.object({platform:a.string().valid(...s.BLOCKLET_PLATFORMS).optional(),interpreter:a.string().valid("binary","node","blocklet","bun").default("node"),source:ee,args:a.array().items(a.string()).optional().default([])}).meta({className:"TEngine",unknownType:"any"});P.engineSchema=te;const ae=a.object({name:a.string().min(1).required(),email:a.string().email({tlds:!1}).optional(),url:a.string().uri().optional()}).meta({className:"TPerson",unknownType:"any"});P.personSchema=ae;const oe=a.object({tarball:a.alternatives().try(a.string().uri(),a.string()).required(),integrity:a.string().required(),size:a.number().optional()}).meta({className:"TDist",unknownType:"any"});P.distSchema=oe;const be=a.object({downloads:a.number().integer().greater(-1),star:a.number().default(0),purchases:a.number().default(0)}).meta({className:"TStats",unknownType:"any"});P.statsSchema=be;const le={source:a.alternatives().try(a.object({url:a.alternatives().try(a.string().uri(),a.array().items(a.string().uri()).min(1)).required(),version:a.alternatives().try(a.string().valid("latest"),a.semverRange().valid())}),a.object({store:a.string().uri({scheme:["http","https"]}),name:I.required(),version:a.alternatives().try(a.string().valid("latest"),a.semverRange().valid()).default("latest")})).required(),required:a.boolean(),title:_,description:f,mountPoint:O,name:I},ge=(L,B)=>a.object(L).custom((Z,Q)=>!B&&Z.source&&Z.source.name&&!Z.source.store?Q.message(`missing 'store' in source of component ${Z.name}`):Z),re=ge(le).meta({className:"TComponent",unknownType:"any"});P.componentSchema=re;const ke=ge(le,!0),Oe=({checkStore:L}={})=>{const B=[re,ke];return a.array().items(L?B[0]:B[1]).optional().default([])},Ae=a.object({type:a.string().required(),name:a.string().required(),signer:a.string().required(),pk:a.string().required(),created:a.string().isoDate().required(),sig:a.string().required(),excludes:a.array().items(a.string()).optional(),appended:a.array().items(a.string()).optional(),delegatee:a.string(),delegateePk:a.string(),delegation:a.string()}).meta({className:"TSignature",unknownType:"any"});P.signatureSchema=Ae;const ie=["en","zh","fr","ru","ar","es","de","pt","ja","hi"],Ie={id:a.string().custom(R),title:a.alternatives().try(a.string().min(1).max(s.MAX_TITLE_LENGTH),a.object().min(1).pattern(a.string().valid(...ie),a.string().min(1).max(s.MAX_TITLE_LENGTH))).required(),description:a.alternatives().try(a.string().min(1).max(s.MAX_DESCRIPTION_LENGTH),a.object().min(1).pattern(a.string().valid(...ie),a.string().min(1).max(s.MAX_DESCRIPTION_LENGTH))),link:a.alternatives().try(a.string().custom(y),a.object().min(1).pattern(a.string().valid(...ie),a.string().custom(y))),component:a.string().min(1),section:a.array().items(a.string().min(1)).single(),role:a.array().items(a.string().min(1)).single(),icon:a.string().min(1),visible:a.boolean(),private:a.boolean()},je=a.object({...Ie,items:a.array().items(a.object({...Ie}).rename("child","component"))}).rename("child","component").meta({className:"TNavigationItem",unknownType:"any"});P.navigationItemSchema=je;const Ee=a.array().items(je).unique((L,B)=>L.id&&B.id?L.id===B.id:!1).meta({className:"TNavigation",unknownType:"any"});P.navigationSchema=Ee;const Re=a.object({background:a.alternatives().try(a.string().min(1),a.object({header:a.string().min(1),footer:a.string().min(1),default:a.string().min(1)}).min(1))}).meta({className:"TTheme",unknownType:"any"});P.themeSchema=Re;const Te=a.object({whoCanAccess:a.string().valid("owner","invited","all"),profileFields:a.array().items(a.string().valid("fullName","email","avatar","phone")).unique(),ignoreUrls:a.array().items(a.string().min(1)),allowSwitchProfile:a.boolean(),blockUnauthenticated:a.boolean(),blockUnauthorized:a.boolean()}).options({stripUnknown:!0}).meta({className:"TAuthConfig",unknownType:"any"});P.authConfigSchema=Te;const Pe=a.object({type:a.string().trim().min(1).required(),description:a.string().trim().min(1)}),$e=a.object({did:a.DID().trim().required(),type:a.string().trim().min(1).required(),public:a.boolean()}).meta({className:"TResourceBundle",unknownType:"any"});P.resourceBundleSchema=$e;const xe=a.array().items(a.object({type:a.string().trim().min(1).max(128).pattern(/^(?!blocklet\.)[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/).message('Event type must be in format of "[noun.]verb" like "post.published" or "post.comment.published", and prefix "blocklet." is reserved').required(),description:a.string().trim().min(1).max(256).required()})).unique("type").meta({className:"TEvent",unknownType:"any"});P.eventsSchema=xe;const Le={did:a.DID().trim().required(),version:a.semver().valid().required(),name:a.string().optional(),description:f.required(),group:a.string().valid(...s.BLOCKLET_GROUPS),main:a.string().trim(),title:_.optional().allow(""),logo:a.string().trim().optional(),specVersion:a.semver().valid().gte("1.0.0").optional(),author:ae.optional(),contributors:a.array().items(ae).optional(),maintainers:a.array().items(ae).optional(),community:a.string().uri().optional().allow("").default(""),documentation:a.string().uri().optional().allow("").default(""),homepage:a.string().uri().optional().allow("").default(""),license:a.string().optional().allow("").default(""),support:a.alternatives().try(a.string().uri(),a.string().email({tlds:!1})).optional(),nftFactory:a.DID().optional().allow("").default(""),payment:a.object({price:a.array().max(1).items(a.object({value:a.number().greater(0).required(),address:a.DID().required()})).default([]),share:a.array().max(4).items(a.object({name:a.string().required(),address:a.DID().required(),value:a.number().greater(0).max(1).required()})).default([]).custom(L=>{if(L.length===0)return L;const B=L.reduce((Z,Q)=>Z+Q.value,0);if(B!==1)throw new Error(`Invalid blocklet payment share config: total share must be 1, got ${B}`);return L},"invalid blocklet share"),componentPrice:a.array().items(a.object({parentPriceRange:a.array().items(a.number()).custom((L,B)=>L.length!==2?B.message("length of range should be 2"):L[0]<0?B.message("the first value should not less than 0 in range"):L[1]<=L[0]?B.message("the second value should greater than the first value in range"):L),type:a.string().valid("fixed","percentage").required(),value:a.number().greater(0).required()})).single()}).default({price:[],share:[]}),keywords:a.alternatives().try(a.string().trim().min(1),a.array().items(a.string().min(1))).optional(),tags:a.alternatives().try(a.string().trim().min(1),a.array().items(a.string().min(1))).optional(),gitHash:a.string().optional().allow(""),repository:a.alternatives().try(a.string().min(1),a.object({type:a.string().valid("git","https","svn").required(),url:a.string().uri().required(),directory:a.string()})).optional(),timeout:a.object({start:a.number().min(10).max(600),script:a.number().min(1).max(1800)}).default({start:60}),requirements:a.object({abtnode:a.semverRange().valid(),server:a.semverRange().valid(),os:a.alternatives().try(a.string().valid("*",...s.BLOCKLET_PLATFORMS),a.array().items(a.string().valid(...s.BLOCKLET_PLATFORMS)).min(1)),cpu:a.alternatives().try(a.string().valid("*",...s.BLOCKLET_ARCHITECTURES),a.array().items(a.string().valid(...s.BLOCKLET_ARCHITECTURES)).min(1)),fuels:a.array().items(a.object({endpoint:a.string().trim().required(),address:a.string().trim(),value:a.string().trim().required(),reason:a.string().trim().required()})),nodejs:a.semverRange().valid(),aigne:a.boolean().optional()}).default({server:s.BLOCKLET_LATEST_REQUIREMENT_SERVER,os:"*",cpu:"*",nodejs:"*"}),interfaces:a.array().items(J).unique("name").custom((L,B)=>{if(L.filter(se=>se.type===s.BLOCKLET_INTERFACE_TYPE_WEB).length>1)return B.message(`Only one ${s.BLOCKLET_INTERFACE_TYPE_WEB} interface can be declared`);const Q=L.filter(se=>se.type===s.BLOCKLET_INTERFACE_TYPE_WELLKNOWN);for(const se of Q)if(!se.prefix.startsWith(m))return B.message(`Wellknown path prefix must start with: ${m}`);return L}).default([]),environments:a.array().items(K).default([]).optional().custom((L,B)=>{if(L&&L.length){const Z=L.filter((Q,se)=>L.findIndex(ve=>ve.name===Q.name)!==se);if(Z.length)return B.message(`find duplicate environment names ${Z.map(Q=>Q.name).join(", ")}`)}return L}),scripts:G,capabilities:a.object({clusterMode:a.boolean(),didSpace:a.string().valid(...Object.values(s.BLOCKLET_APP_SPACE_REQUIREMENT)).optional(),navigation:a.boolean().default(!0),serverless:a.boolean().optional(),component:a.boolean(),sitemap:a.boolean().optional(),mcp:a.boolean().optional(),singleton:a.boolean().optional()}).default({}),files:a.array().items(a.string().trim()).optional(),resource:a.object({exportApi:a.string().trim(),bundles:a.array().items($e),types:a.array().items(Pe).max(10)}),engine:a.alternatives().try(te,a.array().items(te)).optional(),screenshots:a.array().items(a.string().min(1)).optional().default([]),videos:a.array().items(a.string().pattern(/^https:\/\/(www\.)?(youtube\.com|youtu\.be|vimeo\.com)\/[\w\-/?&=]+/).message("Each video URL must be a valid YouTube or Vimeo link")).max(3).optional(),logoUrl:a.string().optional().allow(""),dist:oe.optional(),stats:be.optional(),htmlAst:a.any().optional(),path:a.string().optional(),signatures:a.array().items(Ae).optional(),lastPublishedAt:a.string().isoDate().optional().allow(null),components:Oe(),navigation:Ee,theme:Re,copyright:a.object({owner:a.string().min(1),year:a.alternatives().try(a.string(),a.number())}),bundleName:a.string(),bundleDid:a.DID().trim(),storeId:a.string(),events:xe.optional()},_e=a.object(Le).options({stripUnknown:!0,noDefaults:!1}).meta({className:"TBlockletMeta",unknownType:"any"});P.blockletMetaSchema=_e;const Ne=(L,{ensureFiles:B=!1,ensureDist:Z=!1,ensureComponentStore:Q=!0,ensureName:se=!1,skipValidateDidName:ve=!1,...qe}={})=>((!L||!k.default.existsSync(L))&&(B=!1),a.object({...Le,owner:a.object({avatar:a.string().optional(),did:a.DID().trim().required(),fullName:a.string().trim().required(),email:a.string().optional().allow(null).empty("").default("")}).optional(),logo:B?a.file().trim().exists({baseDir:L}).optional():a.string().trim().optional(),files:a.array().items(B?a.file().exists({baseDir:L,canSkip:(fe,me)=>[s.BLOCKLET_ENTRY_FILE,s.BLOCKLET_BUNDLE_FILE].includes(me)||(0,o.default)(me)}):a.string().trim()).optional(),dist:Z?oe.required():oe.optional(),components:Oe({checkStore:Q}),name:se?a.string().optional():a.string().required(),egress:a.boolean().optional().default(!0),docker:i.dockerSchema}).options({stripUnknown:!0,noDefaults:!1,...qe}).rename("children","components").custom((fe,me)=>{const{did:b,name:$,docker:x}=fe;if(x){const{image:T,dockerfile:M,network:U}=x;if(!T&&!M)return me.message("Image or dockerfile must be set");if(T&&M)return me.message("Image and dockerfile cannot be set at the same time");if(U)return me.message("ExportPorts and network cannot be set at the same time");M&&(fe.files||(fe.files=[]),fe.files.push(M))}let j;if((0,e.isValid)(b))try{return(0,c.validateNewDid)(b),fe}catch(T){j=T}if($){(0,c.validateName)($,{checkDid:!ve});const T=(0,r.default)($);return T!==b?me.message(`The did of name "${$}" should be "${T}"`):fe}return j?me.message(j.message):fe}));return P.createBlockletSchema=Ne,P.default={blockletNameSchema:I,componentSchema:re,endpointSchema:D,serviceSchema:V,createBlockletSchema:Ne,interfaceSchema:J,environmentSchema:K,environmentNameSchema:F,scriptsSchema:G,personSchema:ae,distSchema:oe,titleSchema:_,descriptionSchema:f,logoSchema:E,navigationSchema:Ee,themeSchema:Re,mountPointSchema:O,updateMountPointSchema:A,authConfigSchema:Te,resourceBundleSchema:$e,installBlockletTitleSchema:d,installBlockletDescriptionSchema:v,eventsSchema:xe,Joi:a},P}function Ft({onClick:W}){const{t:C}=yt();return He.jsx(vt,{title:C("launchBlocklet.withoutWallet"),icon:He.jsx(bt,{icon:_t,fontSize:"1em"}),onClick:W})}Ft.propTypes={onClick:wt.func.isRequired};export{Ft as W,Mt as a,ct as b,zt as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r,c$ as n}from"./index-F3HbHSYi.js";import{t as o}from"./index-CAUKXdVD.js";function p(t){return function(a){return r.jsx(n,{translations:o,children:r.jsx(t,{...a})})}}export{p as w};
|