@abtnode/blocklet-services 1.16.47-beta-20250717-221700-2d886a18 → 1.16.47-beta-20250721-025348-9ccb2d62
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/dist/assets/{AdapterDayjs-BZTfQON9.js → AdapterDayjs-Dc_cn1Wv.js} +1 -1
- package/dist/assets/{Community-CcMMU0U0.js → Community-ClHGTbNM.js} +1 -1
- package/dist/assets/{Google-BdWLCoXr.js → Google-BYGsR9Bd.js} +1 -1
- package/dist/assets/{Holiday-CQ56q1Zn.js → Holiday-D8fmDxt6.js} +1 -1
- package/dist/assets/{Meeting-BloE6sJb.js → Meeting-CF7NtQe5.js} +1 -1
- package/dist/assets/{OffSick-BDgahXbb.js → OffSick-CWwGwWYY.js} +1 -1
- package/dist/assets/{WorkingRemotely-Dy2yEuOf.js → WorkingRemotely-CD8ntsiV.js} +1 -1
- package/dist/assets/{access-control-Ccw74KG_.js → access-control-oCszV5zC.js} +1 -1
- package/dist/assets/{actions-C731b1S-.js → actions-CeSIZN0M.js} +1 -1
- package/dist/assets/{add-component-core-CbHoe5zJ.js → add-component-core-GYYnyhPI.js} +1 -1
- package/dist/assets/{add-resource-Cq_fc1jD.js → add-resource-vcL8WXJK.js} +1 -1
- package/dist/assets/{addon-DZMRJstX.js → addon-m7dEcFSm.js} +1 -1
- package/dist/assets/{advanced-2-zZxGm_.js → advanced-BhS7b_np.js} +1 -1
- package/dist/assets/api-BV16dSSm.js +1 -0
- package/dist/assets/{appearance-DpzMSH9F.js → appearance-BF-F41U0.js} +1 -1
- package/dist/assets/{arrow-down.svg-CAhyD6_b.js → arrow-down.svg-6steA5un.js} +1 -1
- package/dist/assets/{audit-logs-ChoY3Mh6.js → audit-logs-gbfUafHi.js} +1 -1
- package/dist/assets/{authorize-CRwwOLYT.js → authorize-Bfey1QAy.js} +1 -1
- package/dist/assets/{base-chart-ChlMjzcv.js → base-chart-u6OIGONc.js} +1 -1
- package/dist/assets/{base32-CkijRzDY.js → base32-DBDFptL1.js} +1 -1
- package/dist/assets/{branding-BFlQm__X.js → branding-Co1T-6R4.js} +1 -1
- package/dist/assets/{branding-1Tnui43I.js → branding-itFeNCQ6.js} +2 -2
- package/dist/assets/{bundle-avatar-cdYjPEnW.js → bundle-avatar-DkLBEfff.js} +1 -1
- package/dist/assets/button-Cnj6R5bV.js +1 -0
- package/dist/assets/click-to-copy-m7BzOuWH.js +1 -0
- package/dist/assets/cloneDeep-BpNWeRQ9.js +1 -0
- package/dist/assets/{collapse-DGb2BFlZ.js → collapse-DfvukfIl.js} +1 -1
- package/dist/assets/{complete-B-DZw0Xp.js → complete-B4B7REuC.js} +1 -1
- package/dist/assets/{component-B7p437A9.js → component-DMzCzNlm.js} +3 -3
- package/dist/assets/{config-CpnLJaUO.js → config-D-z5vAfP.js} +1 -1
- package/dist/assets/{config-CxEXdwoA.js → config-D3XTFUmZ.js} +1 -1
- package/dist/assets/{config-navigation-CU19NqaO.js → config-navigation-CfGhB5-E.js} +3 -3
- package/dist/assets/{config-space-B6WEaHVR.js → config-space-a6OXiuM7.js} +1 -1
- package/dist/assets/{confirm-B0IPtkVS.js → confirm-B4BzkG04.js} +1 -1
- package/dist/assets/{connect-BOc7_s4F.js → connect-B-9mXcqo.js} +1 -1
- package/dist/assets/{connect-NXiMoe1T.js → connect-JlblxSAY.js} +1 -1
- package/dist/assets/{connect-to-RFZZSI5s.js → connect-to-BL3HAXmC.js} +1 -1
- package/dist/assets/{content-layout-Ctpah7wH.js → content-layout-BaDbLmL5.js} +1 -1
- package/dist/assets/{createClass-Bj7mZfZB.js → createClass-g8bSPTyV.js} +1 -1
- package/dist/assets/{dashboard-ClQmhIHS.js → dashboard-CBpVHcLw.js} +3 -3
- package/dist/assets/{delete-confirm-DeAivjJv.js → delete-confirm-DhfRzwF1.js} +1 -1
- package/dist/assets/{did-address-D7SiJUQw.js → did-address-CdYAzzjR.js} +1 -1
- package/dist/assets/{domain-action-card-BMJauDDL.js → domain-action-card-B-0EUHm9.js} +1 -1
- package/dist/assets/{domain-Cx4UiImS.js → domain-q2p-uq0P.js} +1 -1
- package/dist/assets/domains-BvFskQMv.js +1 -0
- package/dist/assets/{dot-CAD4z94Q.js → dot-OPeVWPUi.js} +1 -1
- package/dist/assets/{edit.svg-D-deOViK.js → edit.svg-DycWG9v3.js} +1 -1
- package/dist/assets/{email-_MWdgnCs.js → email-BTKvn_fl.js} +3 -3
- package/dist/assets/{empty-spinner-DoD2SObf.js → empty-spinner-C6wgiyAQ.js} +1 -1
- package/dist/assets/engine-DHKpyPwC.js +1 -0
- package/dist/assets/{exchange-passport-B5Avk2mv.js → exchange-passport-B-9fNsX9.js} +1 -1
- package/dist/assets/{form-Cfox3G5b.js → form-BX4g8soo.js} +1 -1
- package/dist/assets/{fuel--qkuIoAW.js → fuel-DYTqXaPb.js} +1 -1
- package/dist/assets/{gen-access-key-B4DsFFIf.js → gen-access-key-DVBJadXn.js} +2 -2
- package/dist/assets/get-safe-url-Ce6hawV-.js +1 -0
- package/dist/assets/{home-DIigPTxS.js → home-BL8xoBlc.js} +1 -1
- package/dist/assets/{iframe-CQ_bWNrw.js → iframe-BTaRNGRY.js} +1 -1
- package/dist/assets/{index-8pSMU0so.js → index-5klv_mrK.js} +1 -1
- package/dist/assets/{index-pq4T68Se.js → index-B9-tuTku.js} +4 -4
- package/dist/assets/{index-B_4qd0Ji.js → index-B9GdL3BM.js} +1 -1
- package/dist/assets/{index-CSSFAW5K.js → index-BC395sak.js} +1 -1
- package/dist/assets/{index-MGxe3V9B.js → index-BPy8_fa2.js} +1 -1
- package/dist/assets/{index-Bo6LJIBD.js → index-BUJ5QfC4.js} +3 -3
- package/dist/assets/index-BVPDkm__.js +1 -0
- package/dist/assets/{index-C5pKXOxF.js → index-BaBIefeb.js} +1 -1
- package/dist/assets/{index-D1bv9ooM.js → index-Bo2cFOuR.js} +1 -1
- package/dist/assets/{index-DYbAE8u5.js → index-C-AuC2Mk.js} +1 -1
- package/dist/assets/{index-BEyKlMs9.js → index-CW67obch.js} +1 -1
- package/dist/assets/{index-BsdYXeYP.js → index-C_CqbmyE.js} +1 -1
- package/dist/assets/{index-C0HBWMaK.js → index-Cbxz8oHT.js} +1 -1
- package/dist/assets/{index-CnoeBPbk.js → index-CeczUnUx.js} +1 -1
- package/dist/assets/{index-dIkcxCDN.js → index-CgCJ2qDh.js} +5 -5
- package/dist/assets/{index-DawEtQPD.js → index-CgRDnxac.js} +1 -1
- package/dist/assets/{index-C-vjjw9E.js → index-CgdhTqWX.js} +1 -1
- package/dist/assets/{index-BGTKxy_q.js → index-D3qROm47.js} +1 -1
- package/dist/assets/{index-D27Eda5K.js → index-D6kePAD5.js} +1 -1
- package/dist/assets/{index-BpL1e-bN.js → index-D8X_0Jj0.js} +1 -1
- package/dist/assets/{index-DEPyMifK.js → index-DUnVGFh6.js} +1 -1
- package/dist/assets/{index--E0qCGk-.js → index-D_5DFMMK.js} +1 -1
- package/dist/assets/{index-DdCAwzrE.js → index-DcwzA8G_.js} +1 -1
- package/dist/assets/{index-ChVoQcrO.js → index-DjKmasIZ.js} +1 -1
- package/dist/assets/{index-CQb3b4r6.js → index-DseoFU10.js} +1 -1
- package/dist/assets/{index-b_dnNRMF.js → index-Dy8syryD.js} +1 -1
- package/dist/assets/{index-thbUUXKQ.js → index-DyH1BrER.js} +1 -1
- package/dist/assets/{index-Dl1q-Vpb.js → index-EIX4798q.js} +1 -1
- package/dist/assets/{index-BcuyH8tS.js → index-LvmCZD51.js} +3 -3
- package/dist/assets/{index-Dhyyek4_.js → index-SrN5SE_r.js} +1 -1
- package/dist/assets/{index-BEq2q2jr.js → index-cCGBx0sL.js} +1 -1
- package/dist/assets/{index-CjiaOjxw.js → index-gkhmzgqt.js} +1 -1
- package/dist/assets/{index-Bv6qc7SO.js → index-lf4wyjkd.js} +1 -1
- package/dist/assets/{index-CzB-WPWn.js → index-n78OcMXJ.js} +1 -1
- package/dist/assets/{index.esm-BONQrRCU.js → index.esm-JPZAjt0x.js} +1 -1
- package/dist/assets/{invitation-D4tu3NNd.js → invitation-CC5hPf7T.js} +1 -1
- package/dist/assets/{invite-DdCiERzE.js → invite-CreQ98MA.js} +1 -1
- package/dist/assets/{issue-passport-CmU7CVx7.js → issue-passport-CIYcm6iB.js} +1 -1
- package/dist/assets/{item-7fmoiGq1.js → item-C8OCvu8j.js} +1 -1
- package/dist/assets/{landing-page-DrswynDN.js → landing-page-DOi_4Ca6.js} +1 -1
- package/dist/assets/{launch-result-message-BlpIIvzr.js → launch-result-message-Dwnqr8Lq.js} +1 -1
- package/dist/assets/{layout-u6VjgU9W.js → layout-CIen07bA.js} +1 -1
- package/dist/assets/{list-s4SRm3p5.js → list-B8ZhwNC1.js} +1 -1
- package/dist/assets/{list-DLQOcQSS.js → list-DZy6xsmU.js} +2 -2
- package/dist/assets/{list-header-BROuC1JD.js → list-header-CGX6Hi0X.js} +1 -1
- package/dist/assets/localization-CKs8paiI.js +1 -0
- package/dist/assets/{lock.svg-xPuKHQ-O.js → lock.svg-COUP8tyO.js} +1 -1
- package/dist/assets/{log-BCe-iHkk.js → log-C9DU0cCG.js} +1 -1
- package/dist/assets/logger-BAwrOeMG.js +1 -0
- package/dist/assets/{login-CJ9QT17a.js → login-Bnu0F5eS.js} +1 -1
- package/dist/assets/{login-oauth-callback-Bn54mlE7.js → login-oauth-callback-C2SqP1bW.js} +1 -1
- package/dist/assets/{logo-uploader-Cct_Tgp9.js → logo-uploader-DgG1moIj.js} +3 -3
- package/dist/assets/{lost-passport-JFuuT2LW.js → lost-passport-DtNgA2rm.js} +3 -3
- package/dist/assets/{lottie-react.esm-Bqal_rmd.js → lottie-react.esm-M5fKy3fg.js} +1 -1
- package/dist/assets/omit-CxEI1_wm.js +1 -0
- package/dist/assets/{open-window-okQkGylu.js → open-window-RuAUils2.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-CorS-0Po.js → over-due-invoice-payment-DhK6jNNQ.js} +1 -1
- package/dist/assets/{overview-CDbOiDio.js → overview-BVSh5o7h.js} +1 -1
- package/dist/assets/{page-header-BuVm9h5d.js → page-header-BycH8S9r.js} +1 -1
- package/dist/assets/{passport-item-BejfMK1X.js → passport-item-D7sQ_FxN.js} +1 -1
- package/dist/assets/{permission-B4PsiDVD.js → permission-C79TpiNV.js} +1 -1
- package/dist/assets/preferences-DfEKF75U.js +1 -0
- package/dist/assets/profile-embed-LKUTgx9A.js +1 -0
- package/dist/assets/publish-resource-BzjWpXe-.js +1 -0
- package/dist/assets/{question-mark-circle.svg-YsMacl4Q.js → question-mark-circle.svg-B4stD6SS.js} +1 -1
- package/dist/assets/{raf-schd.esm-BZ5FB5HD.js → raf-schd.esm-CHNehTG3.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-ByowwdW2.js → react-beautiful-dnd.esm-DwkY3sYg.js} +1 -1
- package/dist/assets/{react-stripe.esm-DjDk8Ggj.js → react-stripe.esm-BGPt6Wk8.js} +1 -1
- package/dist/assets/{runtime-DaXsDIcp.js → runtime-Sobb0AXT.js} +1 -1
- package/dist/assets/{sanitize-CCb_t50W.js → sanitize-DSvGhymV.js} +1 -1
- package/dist/assets/sdk-DzqJHXyQ.js +1 -0
- package/dist/assets/{section-BkD2aamt.js → section-BqJWD2MT.js} +1 -1
- package/dist/assets/{security-BGWWSAkV.js → security-BwF3YzTL.js} +1 -1
- package/dist/assets/{server-logo-notext.svg-BqCXmsOm.js → server-logo-notext.svg-CKQB0tIp.js} +1 -1
- package/dist/assets/session-BV5HR2vD.js +1 -0
- package/dist/assets/{setup-9fDp38sd.js → setup-Bll35TpG.js} +3 -3
- package/dist/assets/{shorten-label-BG5illgA.js → shorten-label-BKNhALWt.js} +1 -1
- package/dist/assets/{simple-select-BMWDBGsb.js → simple-select-DiucBfFO.js} +1 -1
- package/dist/assets/{spaces-CISW823t.js → spaces-D2uHzDSf.js} +1 -1
- package/dist/assets/{start-BtjRI2FT.js → start-CCbI2h7_.js} +1 -1
- package/dist/assets/{starting-progress-BvCdculj.js → starting-progress-C2KBufhS.js} +1 -1
- package/dist/assets/{status-kBSo0EE3.js → status-fhCB_pM_.js} +1 -1
- package/dist/assets/{step-actions-CSysf55Z.js → step-actions-C6aMtUZh.js} +1 -1
- package/dist/assets/{studio-DRi8O4nl.js → studio-B-QwZrdc.js} +1 -1
- package/dist/assets/{switch-control-BE5x5QTG.js → switch-control-88oLMAWm.js} +1 -1
- package/dist/assets/{table-tips-BfdUOZWj.js → table-tips-ZIxKRomr.js} +1 -1
- package/dist/assets/{team-DA9xMdEQ.js → team-DplrCM_m.js} +1 -1
- package/dist/assets/{traffic-BQj5L64I.js → traffic-BU5sjdLg.js} +1 -1
- package/dist/assets/{transfer-DQ-esQ54.js → transfer-DWvn8JDa.js} +1 -1
- package/dist/assets/{unsubscribe-dC1x4NuC.js → unsubscribe-DPIGic1H.js} +1 -1
- package/dist/assets/{use-mobile-DHiqEjn5.js → use-mobile-BhzP2Rp3.js} +1 -1
- package/dist/assets/{use-mobile-DapluIyS.js → use-mobile-BtGrkCtZ.js} +1 -1
- package/dist/assets/{use-server-logo-BBlO0k2-.js → use-server-logo-BFuFRBQG.js} +1 -1
- package/dist/assets/useAsync-DGzYJlYv.js +1 -0
- package/dist/assets/{useAsync-Dk1Ydzz6.js → useAsync-DcK0UTnz.js} +1 -1
- package/dist/assets/{useLocalStorage-CVZc_3z4.js → useLocalStorage-BRPtTalQ.js} +1 -1
- package/dist/assets/{useSetState-BWrXo9eH.js → useSetState-DFuQZPPV.js} +1 -1
- package/dist/assets/{user-center-Dx-CKzHU.js → user-center-D4QgyhnU.js} +4 -4
- package/dist/assets/{user-sessions-CP2hMWvQ.js → user-sessions-C2LvHnd6.js} +1 -1
- package/dist/assets/{util-DLU48yb8.js → util-BGfTex9R.js} +1 -1
- package/dist/assets/{util-Cn9ZyU8l.js → util-DtXj9fc3.js} +1 -1
- package/dist/assets/{vendor-arcblock-BEuhHuNQ.js → vendor-arcblock-B78OG6SS.js} +1 -1
- package/dist/assets/{vendor-hooks-uwq5Zgdd.js → vendor-hooks-HB6DqcLv.js} +1 -1
- package/dist/assets/{vendor-mui-core-BwwTYUH3.js → vendor-mui-core-DWYIngcn.js} +1 -1
- package/dist/assets/{vendor-mui-x-DDx3HEvj.js → vendor-mui-x-nEbm5eNb.js} +1 -1
- package/dist/assets/vendor-react-Dvs43sk9.js +37 -0
- package/dist/assets/{vendor-utils-DQY0X1ND.js → vendor-utils-J7aLFpEq.js} +1 -1
- package/dist/assets/{vendor-ux-BglKGRhr.js → vendor-ux-Dln42oC3.js} +1 -1
- package/dist/assets/{wrap-locale-DOTYikON.js → wrap-locale-BylAyLRV.js} +1 -1
- package/dist/assets/{zh-BcwVs5BX.js → zh-C3O8IIjK.js} +1 -1
- package/dist/index.html +7 -7
- package/dist/service-worker.js +1 -1
- package/package.json +24 -24
- package/dist/assets/api-CpymM8cn.js +0 -1
- package/dist/assets/button-CWzJXH1i.js +0 -1
- package/dist/assets/click-to-copy-DPQ0tcO7.js +0 -1
- package/dist/assets/cloneDeep-BnFQZ0zY.js +0 -1
- package/dist/assets/domains-D8HTnCBf.js +0 -1
- package/dist/assets/engine-C3CQWke3.js +0 -1
- package/dist/assets/get-safe-url-Cch2GZCp.js +0 -1
- package/dist/assets/index-C4mYBCsd.js +0 -1
- package/dist/assets/localization-CJSvysj8.js +0 -1
- package/dist/assets/logger-Cf2apEtv.js +0 -1
- package/dist/assets/omit-pzenKe9G.js +0 -1
- package/dist/assets/preferences-DmEdhu1e.js +0 -1
- package/dist/assets/profile-embed-BK2tobXZ.js +0 -1
- package/dist/assets/publish-resource-M4It07oz.js +0 -1
- package/dist/assets/sdk-CzxAlOgp.js +0 -1
- package/dist/assets/session-DgH_dTEB.js +0 -1
- package/dist/assets/useAsync-CQLW7qpa.js +0 -1
- package/dist/assets/vendor-react-x2lQvn4m.js +0 -38
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as F}from"./vendor-react-x2lQvn4m.js";import{j as R,S as ve,cd as _e,T as H,bC as we,z as xe,aX as $e,a6 as Y,W as A,D as je,Q as G,bR as he,bc as pe,cs as ke,aQ as Re,aR as Se,M as oe,ak as U,b4 as Oe,ct as Ae,s as Ee,bg as le,cu as Ce,bH as De,am as Ie,aq as Te}from"./vendor-mui-core-BwwTYUH3.js";import{T as X,a as Me,n as ce,H as V}from"./vendor-ux-BglKGRhr.js";import{aZ as Le,O as ae,a_ as Ne,Z as Pe,M as qe,c as ge}from"./index-dIkcxCDN.js";import{f as J}from"./index-DBs9Ljax.js";import{C as ee}from"./vendor-utils-DQY0X1ND.js";import{D as ze}from"./delete-confirm-DeAivjJv.js";import{C as Fe}from"./confirm-B0IPtkVS.js";import{u as Ue}from"./session-DgH_dTEB.js";import{g as Q}from"./get-safe-url-Cch2GZCp.js";import{W as We}from"./did-address-D7SiJUQw.js";import{b as Be}from"./vendor-hooks-uwq5Zgdd.js";var re,ue;function Ve(){if(ue)return re;ue=1;var D={};const{NODE_MODES:M}=Le();return re={isInServerlessMode:({mode:E,previousMode:k}={})=>E===M.SERVERLESS||k===M.SERVERLESS||D.ABT_NODE_DEBUG_AS_SERVERLESS==="true"},re}var He=Ve(),se={exports:{}},fe;function ct(){return fe||(fe=1,function(D,M){(function(N,E){D.exports=E()})(self,()=>{return N={7629:(k,x,b)=>{const o=b(375),y=b(8571),h=b(9474),f=b(1687),e=b(8652),n=b(8160),a=b(3292),r=b(6354),t=b(8901),l=b(9708),s=b(6914),i=b(2294),u=b(6133),d=b(1152),p=b(8863),_=b(2036),v={Base:class{constructor(c){this.type=c,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new i.Ids,this._preferences=null,this._refs=new u.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 l.describe=="function","Manifest functionality disabled"),l.describe(this)}allow(...c){return n.verifyFlat(c,"allow"),this._values(c,"_valids")}alter(c){o(c&&typeof c=="object"&&!Array.isArray(c),"Invalid targets argument"),o(!this._inRuleset(),"Cannot set alterations inside a ruleset");const m=this.clone();m.$_terms.alterations=m.$_terms.alterations||[];for(const g in c){const w=c[g];o(typeof w=="function","Alteration adjuster for",g,"must be a function"),m.$_terms.alterations.push({target:g,adjuster:w})}return m.$_temp.ruleset=!1,m}artifact(c){return o(c!==void 0,"Artifact cannot be undefined"),o(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",c)}cast(c){return o(c===!1||typeof c=="string","Invalid to value"),o(c===!1||this._definition.cast[c],"Type",this.type,"does not support casting to",c),this.$_setFlag("cast",c===!1?void 0:c)}default(c,m){return this._default("default",c,m)}description(c){return o(c&&typeof c=="string","Description must be a non-empty string"),this.$_setFlag("description",c)}empty(c){const m=this.clone();return c!==void 0&&(c=m.$_compile(c,{override:!1})),m.$_setFlag("empty",c,{clone:!1})}error(c){return o(c,"Missing error"),o(c instanceof Error||typeof c=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",c)}example(c,m={}){return o(c!==void 0,"Missing example"),n.assertOptions(m,["override"]),this._inner("examples",c,{single:!0,override:m.override})}external(c,m){return typeof c=="object"&&(o(!m,"Cannot combine options with description"),m=c.description,c=c.method),o(typeof c=="function","Method must be a function"),o(m===void 0||m&&typeof m=="string","Description must be a non-empty string"),this._inner("externals",{method:c,description:m},{single:!0})}failover(c,m){return this._default("failover",c,m)}forbidden(){return this.presence("forbidden")}id(c){return c?(o(typeof c=="string","id must be a non-empty string"),o(/^[^\.]+$/.test(c),"id cannot contain period character"),this.$_setFlag("id",c)):this.$_setFlag("id",void 0)}invalid(...c){return this._values(c,"_invalids")}label(c){return o(c&&typeof c=="string","Label name must be a non-empty string"),this.$_setFlag("label",c)}meta(c){return o(c!==void 0,"Meta cannot be undefined"),this._inner("metas",c,{single:!0})}note(...c){o(c.length,"Missing notes");for(const m of c)o(m&&typeof m=="string","Notes must be non-empty strings");return this._inner("notes",c)}only(c=!0){return o(typeof c=="boolean","Invalid mode:",c),this.$_setFlag("only",c)}optional(){return this.presence("optional")}prefs(c){o(c,"Missing preferences"),o(c.context===void 0,"Cannot override context"),o(c.externals===void 0,"Cannot override externals"),o(c.warnings===void 0,"Cannot override warnings"),o(c.debug===void 0,"Cannot override debug"),n.checkPreferences(c);const m=this.clone();return m._preferences=n.preferences(m._preferences,c),m}presence(c){return o(["optional","required","forbidden"].includes(c),"Unknown presence mode",c),this.$_setFlag("presence",c)}raw(c=!0){return this.$_setFlag("result",c?"raw":void 0)}result(c){return o(["raw","strip"].includes(c),"Unknown result mode",c),this.$_setFlag("result",c)}required(){return this.presence("required")}strict(c){const m=this.clone(),g=c!==void 0&&!c;return m._preferences=n.preferences(m._preferences,{convert:g}),m}strip(c=!0){return this.$_setFlag("result",c?"strip":void 0)}tag(...c){o(c.length,"Missing tags");for(const m of c)o(m&&typeof m=="string","Tags must be non-empty strings");return this._inner("tags",c)}unit(c){return o(c&&typeof c=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",c)}valid(...c){n.verifyFlat(c,"valid");const m=this.allow(...c);return m.$_setFlag("only",!!m._valids,{clone:!1}),m}when(c,m){const g=this.clone();g.$_terms.whens||(g.$_terms.whens=[]);const w=a.when(g,c,m);if(!["any","link"].includes(g.type)){const $=w.is?[w]:w.switch;for(const j of $)o(!j.then||j.then.type==="any"||j.then.type===g.type,"Cannot combine",g.type,"with",j.then&&j.then.type),o(!j.otherwise||j.otherwise.type==="any"||j.otherwise.type===g.type,"Cannot combine",g.type,"with",j.otherwise&&j.otherwise.type)}return g.$_terms.whens.push(w),g.$_mutateRebuild()}cache(c){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 m=this.clone();return m._cache=c||e.provider.provision(),m.$_temp.ruleset=!1,m}clone(){const c=Object.create(Object.getPrototypeOf(this));return this._assign(c)}concat(c){o(n.isSchema(c),"Invalid schema object"),o(this.type==="any"||c.type==="any"||c.type===this.type,"Cannot merge type",this.type,"with another type:",c.type),o(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),o(!c._inRuleset(),"Cannot concatenate a schema with open ruleset");let m=this.clone();if(this.type==="any"&&c.type!=="any"){const g=c.clone();for(const w of Object.keys(m))w!=="type"&&(g[w]=m[w]);m=g}m._ids.concat(c._ids),m._refs.register(c,u.toSibling),m._preferences=m._preferences?n.preferences(m._preferences,c._preferences):c._preferences,m._valids=_.merge(m._valids,c._valids,c._invalids),m._invalids=_.merge(m._invalids,c._invalids,c._valids);for(const g of c._singleRules.keys())m._singleRules.has(g)&&(m._rules=m._rules.filter(w=>w.keep||w.name!==g),m._singleRules.delete(g));for(const g of c._rules)c._definition.rules[g.method].multi||m._singleRules.set(g.name,g),m._rules.push(g);if(m._flags.empty&&c._flags.empty){m._flags.empty=m._flags.empty.concat(c._flags.empty);const g=Object.assign({},c._flags);delete g.empty,f(m._flags,g)}else if(c._flags.empty){m._flags.empty=c._flags.empty;const g=Object.assign({},c._flags);delete g.empty,f(m._flags,g)}else f(m._flags,c._flags);for(const g in c.$_terms){const w=c.$_terms[g];w?m.$_terms[g]?m.$_terms[g]=m.$_terms[g].concat(w):m.$_terms[g]=w.slice():m.$_terms[g]||(m.$_terms[g]=w)}return this.$_root._tracer&&this.$_root._tracer._combine(m,[this,c]),m.$_mutateRebuild()}extend(c){return o(!c.base,"Cannot extend type with another base"),t.type(this,c)}extract(c){return c=Array.isArray(c)?c:c.split("."),this._ids.reach(c)}fork(c,m){o(!this._inRuleset(),"Cannot fork inside a ruleset");let g=this;for(let w of[].concat(c))w=Array.isArray(w)?w:w.split("."),g=g._ids.fork(w,m,g);return g.$_temp.ruleset=!1,g}rule(c){const m=this._definition;n.assertOptions(c,Object.keys(m.modifiers)),o(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const g=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;o(g>=0&&g<this._rules.length,"Cannot apply rules to empty ruleset");const w=this.clone();for(let $=g;$<w._rules.length;++$){const j=w._rules[$],S=y(j);for(const O in c)m.modifiers[O](S,c[O]),o(S.name===j.name,"Cannot change rule name");w._rules[$]=S,w._singleRules.get(S.name)===j&&w._singleRules.set(S.name,S)}return w.$_temp.ruleset=!1,w.$_mutateRebuild()}get ruleset(){o(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const c=this.clone();return c.$_temp.ruleset=c._rules.length,c}get $(){return this.ruleset}tailor(c){c=[].concat(c),o(!this._inRuleset(),"Cannot tailor inside a ruleset");let m=this;if(this.$_terms.alterations)for(const{target:g,adjuster:w}of this.$_terms.alterations)c.includes(g)&&(m=w(m),o(n.isSchema(m),"Alteration adjuster for",g,"failed to return a schema object"));return m=m.$_modify({each:g=>g.tailor(c),ref:!1}),m.$_temp.ruleset=!1,m.$_mutateRebuild()}tracer(){return d.location?d.location(this):this}validate(c,m){return p.entry(c,this,m)}validateAsync(c,m){return p.entryAsync(c,this,m)}$_addRule(c){typeof c=="string"&&(c={name:c}),o(c&&typeof c=="object","Invalid options"),o(c.name&&typeof c.name=="string","Invalid rule name");for(const j in c)o(j[0]!=="_","Cannot set private rule properties");const m=Object.assign({},c);m._resolve=[],m.method=m.method||m.name;const g=this._definition.rules[m.method],w=m.args;o(g,"Unknown rule",m.method);const $=this.clone();if(w){o(Object.keys(w).length===1||Object.keys(w).length===this._definition.rules[m.name].args.length,"Invalid rule definition for",this.type,m.name);for(const j in w){let S=w[j];if(g.argsByName){const O=g.argsByName.get(j);if(O.ref&&n.isResolvable(S))m._resolve.push(j),$.$_mutateRegister(S);else if(O.normalize&&(S=O.normalize(S),w[j]=S),O.assert){const C=n.validateArg(S,j,O);o(!C,C,"or reference")}}S!==void 0?w[j]=S:delete w[j]}}return g.multi||($._ruleRemove(m.name,{clone:!1}),$._singleRules.set(m.name,m)),$.$_temp.ruleset===!1&&($.$_temp.ruleset=null),g.priority?$._rules.unshift(m):$._rules.push(m),$}$_compile(c,m){return a.schema(this.$_root,c,m)}$_createError(c,m,g,w,$,j={}){const S=j.flags!==!1?this._flags:{},O=j.messages?s.merge(this._definition.messages,j.messages):this._definition.messages;return new r.Report(c,m,g,S,O,w,$)}$_getFlag(c){return this._flags[c]}$_getRule(c){return this._singleRules.get(c)}$_mapLabels(c){return c=Array.isArray(c)?c:c.split("."),this._ids.labels(c)}$_match(c,m,g,w){(g=Object.assign({},g)).abortEarly=!0,g._externals=!1,m.snapshot();const $=!p.validate(c,this,m,g,w).errors;return m.restore(),$}$_modify(c){return n.assertOptions(c,["each","once","ref","schema"]),i.schema(this,c)||this}$_mutateRebuild(){return o(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(c,{source:m,name:g,path:w,key:$})=>{const j=this._definition[m][g]&&this._definition[m][g].register;j!==!1&&this.$_mutateRegister(c,{family:j,key:$})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(c,{family:m,key:g}={}){this._refs.register(c,m),this._ids.register(c,{key:g})}$_property(c){return this._definition.properties[c]}$_reach(c){return this._ids.reach(c)}$_rootReferences(){return this._refs.roots()}$_setFlag(c,m,g={}){o(c[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const w=this._definition.flags[c]||{};if(h(m,w.default)&&(m=void 0),h(m,this._flags[c]))return this;const $=g.clone!==!1?this.clone():this;return m!==void 0?($._flags[c]=m,$.$_mutateRegister(m)):delete $._flags[c],c[0]!=="_"&&($.$_temp.ruleset=!1),$}$_parent(c,...m){return this[c][n.symbols.parent].call(this,...m)}$_validate(c,m,g){return p.validate(c,this,m,g)}_assign(c){c.type=this.type,c.$_root=this.$_root,c.$_temp=Object.assign({},this.$_temp),c.$_temp.whens={},c._ids=this._ids.clone(),c._preferences=this._preferences,c._valids=this._valids&&this._valids.clone(),c._invalids=this._invalids&&this._invalids.clone(),c._rules=this._rules.slice(),c._singleRules=y(this._singleRules,{shallow:!0}),c._refs=this._refs.clone(),c._flags=Object.assign({},this._flags),c._cache=null,c.$_terms={};for(const m in this.$_terms)c.$_terms[m]=this.$_terms[m]?this.$_terms[m].slice():null;c.$_super={};for(const m in this.$_super)c.$_super[m]=this._super[m].bind(c);return c}_bare(){const c=this.clone();c._reset();const m=c._definition.terms;for(const g in m){const w=m[g];c.$_terms[g]=w.init}return c.$_mutateRebuild()}_default(c,m,g={}){return n.assertOptions(g,"literal"),o(m!==void 0,"Missing",c,"value"),o(typeof m=="function"||!g.literal,"Only function value supports literal option"),typeof m=="function"&&g.literal&&(m={[n.symbols.literal]:!0,literal:m}),this.$_setFlag(c,m)}_generate(c,m,g){if(!this.$_terms.whens)return{schema:this};const w=[],$=[];for(let O=0;O<this.$_terms.whens.length;++O){const C=this.$_terms.whens[O];if(C.concat){w.push(C.concat),$.push(`${O}.concat`);continue}const I=C.ref?C.ref.resolve(c,m,g):c,P=C.is?[C]:C.switch,q=$.length;for(let L=0;L<P.length;++L){const{is:T,then:z,otherwise:W}=P[L],B=`${O}${C.switch?"."+L:""}`;if(T.$_match(I,m.nest(T,`${B}.is`),g)){if(z){const K=m.localize([...m.path,`${B}.then`],m.ancestors,m.schemas),{schema:te,id:Z}=z._generate(c,K,g);w.push(te),$.push(`${B}.then${Z?`(${Z})`:""}`);break}}else if(W){const K=m.localize([...m.path,`${B}.otherwise`],m.ancestors,m.schemas),{schema:te,id:Z}=W._generate(c,K,g);w.push(te),$.push(`${B}.otherwise${Z?`(${Z})`:""}`);break}}if(C.break&&$.length>q)break}const j=$.join(", ");if(m.mainstay.tracer.debug(m,"rule","when",j),!j)return{schema:this};if(!m.mainstay.tracer.active&&this.$_temp.whens[j])return{schema:this.$_temp.whens[j],id:j};let S=this;this._definition.generate&&(S=this._definition.generate(this,c,m,g));for(const O of w)S=S.concat(O);return this.$_root._tracer&&this.$_root._tracer._combine(S,[this,...w]),this.$_temp.whens[j]=S,{schema:S,id:j}}_inner(c,m,g={}){o(!this._inRuleset(),`Cannot set ${c} inside a ruleset`);const w=this.clone();return w.$_terms[c]&&!g.override||(w.$_terms[c]=[]),g.single?w.$_terms[c].push(m):w.$_terms[c].push(...m),w.$_temp.ruleset=!1,w}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(c,m={}){if(!this._singleRules.has(c))return this;const g=m.clone!==!1?this.clone():this;g._singleRules.delete(c);const w=[];for(let $=0;$<g._rules.length;++$){const j=g._rules[$];j.name!==c||j.keep?w.push(j):g._inRuleset()&&$<g.$_temp.ruleset&&--g.$_temp.ruleset}return g._rules=w,g}_values(c,m){n.verifyFlat(c,m.slice(1,-1));const g=this.clone(),w=c[0]===n.symbols.override;if(w&&(c=c.slice(1)),!g[m]&&c.length?g[m]=new _:w&&(g[m]=c.length?new _:null,g.$_mutateRebuild()),!g[m])return g;w&&g[m].override();for(const $ of c){o($!==void 0,"Cannot call allow/valid/invalid with undefined"),o($!==n.symbols.override,"Override must be the first value");const j=m==="_invalids"?"_valids":"_invalids";g[j]&&(g[j].remove($),g[j].length||(o(m==="_valids"||!g._flags.only,"Setting invalid value",$,"leaves schema rejecting all values due to previous valid rule"),g[j]=null)),g[m].add($,g._refs)}return g}}};v.Base.prototype[n.symbols.any]={version:n.version,compile:a.compile,root:"$_root"},v.Base.prototype.isImmutable=!0,v.Base.prototype.deny=v.Base.prototype.invalid,v.Base.prototype.disallow=v.Base.prototype.invalid,v.Base.prototype.equal=v.Base.prototype.valid,v.Base.prototype.exist=v.Base.prototype.required,v.Base.prototype.not=v.Base.prototype.invalid,v.Base.prototype.options=v.Base.prototype.prefs,v.Base.prototype.preferences=v.Base.prototype.prefs,k.exports=new v.Base},8652:(k,x,b)=>{const o=b(375),y=b(8571),h=b(8160),f={max:1e3,supported:new Set(["undefined","boolean","number","string"])};x.provider={provision:e=>new f.Cache(e)},f.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||f.max,this._map=new Map,this._list=new f.List}get length(){return this._map.size}set(e,n){if(e!==null&&!f.supported.has(typeof e))return;let a=this._map.get(e);if(a)return a.value=n,void this._list.first(a);a=this._list.unshift({key:e,value:n}),this._map.set(e,a),this._compact()}get(e){const n=this._map.get(e);if(n)return this._list.first(n),y(n.value)}_compact(){if(this._map.size>this._max){const e=this._list.pop();this._map.delete(e.key)}}},f.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:n,prev:a}=e;return n.prev=a,a&&(a.next=n),e===this.tail&&(this.tail=n),e.prev=null,e.next=null,e}}},8160:(k,x,b)=>{const o=b(375),y=b(7916),h=b(5934);let f,e;const n={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)?)?)?)?$/};x.version=h.version,x.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},x.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")},x.assertOptions=function(a,r,t="Options"){o(a&&typeof a=="object"&&!Array.isArray(a),"Options must be of type object");const l=Object.keys(a).filter(s=>!r.includes(s));o(l.length===0,`${t} contain unknown keys: ${l}`)},x.checkPreferences=function(a){e=e||b(3378);const r=e.preferences.validate(a);if(r.error)throw new y([r.error.details[0].message])},x.compare=function(a,r,t){switch(t){case"=":return a===r;case">":return a>r;case"<":return a<r;case">=":return a>=r;case"<=":return a<=r}},x.default=function(a,r){return a===void 0?r:a},x.isIsoDate=function(a){return n.isoDate.test(a)},x.isNumber=function(a){return typeof a=="number"&&!isNaN(a)},x.isResolvable=function(a){return!!a&&(a[x.symbols.ref]||a[x.symbols.template])},x.isSchema=function(a,r={}){const t=a&&a[x.symbols.any];return!!t&&(o(r.legacy||t.version===x.version,"Cannot mix different versions of joi schemas"),!0)},x.isValues=function(a){return a[x.symbols.values]},x.limit=function(a){return Number.isSafeInteger(a)&&a>=0},x.preferences=function(a,r){f=f||b(6914),a=a||{},r=r||{};const t=Object.assign({},a,r);return r.errors&&a.errors&&(t.errors=Object.assign({},a.errors,r.errors),t.errors.wrap=Object.assign({},a.errors.wrap,r.errors.wrap)),r.messages&&(t.messages=f.compile(r.messages,a.messages)),delete t[x.symbols.prefs],t},x.tryWithPath=function(a,r,t={}){try{return a()}catch(l){throw l.path!==void 0?l.path=r+"."+l.path:l.path=r,t.append&&(l.message=`${l.message} (${l.path})`),l}},x.validateArg=function(a,r,{assert:t,message:l}){if(x.isSchema(t)){const s=t.validate(a);return s.error?s.error.message:void 0}if(!t(a))return r?`${r} ${l}`:l},x.verifyFlat=function(a,r){for(const t of a)o(!Array.isArray(t),"Method no longer accepts array arguments:",r)}},3292:(k,x,b)=>{const o=b(375),y=b(8160),h=b(6133),f={};x.schema=function(e,n,a={}){y.assertOptions(a,["appendPath","override"]);try{return f.schema(e,n,a)}catch(r){throw a.appendPath&&r.path!==void 0&&(r.message=`${r.message} (${r.path})`),r}},f.schema=function(e,n,a){o(n!==void 0,"Invalid undefined schema"),Array.isArray(n)&&(o(n.length,"Invalid empty array schema"),n.length===1&&(n=n[0]));const r=(t,...l)=>a.override!==!1?t.valid(e.override,...l):t.valid(...l);if(f.simple(n))return r(e,n);if(typeof n=="function")return e.custom(n);if(o(typeof n=="object","Invalid schema content:",typeof n),y.isResolvable(n))return r(e,n);if(y.isSchema(n))return n;if(Array.isArray(n)){for(const t of n)if(!f.simple(t))return e.alternatives().try(...n);return r(e,...n)}return n instanceof RegExp?e.string().regex(n):n instanceof Date?r(e.date(),n):(o(Object.getPrototypeOf(n)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),e.object().keys(n))},x.ref=function(e,n){return h.isRef(e)?e:h.create(e,n)},x.compile=function(e,n,a={}){y.assertOptions(a,["legacy"]);const r=n&&n[y.symbols.any];if(r)return o(a.legacy||r.version===y.version,"Cannot mix different versions of joi schemas:",r.version,y.version),n;if(typeof n!="object"||!a.legacy)return x.schema(e,n,{appendPath:!0});const t=f.walk(n);return t?t.compile(t.root,n):x.schema(e,n,{appendPath:!0})},f.walk=function(e){if(typeof e!="object")return null;if(Array.isArray(e)){for(const a of e){const r=f.walk(a);if(r)return r}return null}const n=e[y.symbols.any];if(n)return{root:e[n.root],compile:n.compile};o(Object.getPrototypeOf(e)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const a in e){const r=f.walk(e[a]);if(r)return r}return null},f.simple=function(e){return e===null||["boolean","string","number"].includes(typeof e)},x.when=function(e,n,a){if(a===void 0&&(o(n&&typeof n=="object","Missing options"),a=n,n=h.create(".")),Array.isArray(a)&&(a={switch:a}),y.assertOptions(a,["is","not","then","otherwise","switch","break"]),y.isSchema(n))return o(a.is===void 0,'"is" can not be used with a schema condition'),o(a.not===void 0,'"not" can not be used with a schema condition'),o(a.switch===void 0,'"switch" can not be used with a schema condition'),f.condition(e,{is:n,then:a.then,otherwise:a.otherwise,break:a.break});if(o(h.isRef(n)||typeof n=="string","Invalid condition:",n),o(a.not===void 0||a.is===void 0,'Cannot combine "is" with "not"'),a.switch===void 0){let t=a;a.not!==void 0&&(t={is:a.not,then:a.otherwise,otherwise:a.then,break:a.break});let l=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"),a.is===void 0||h.isRef(a.is)||y.isSchema(a.is)||(l=l.required()),f.condition(e,{ref:x.ref(n),is:l,then:t.then,otherwise:t.otherwise,break:t.break})}o(Array.isArray(a.switch),'"switch" must be an array'),o(a.is===void 0,'Cannot combine "switch" with "is"'),o(a.not===void 0,'Cannot combine "switch" with "not"'),o(a.then===void 0,'Cannot combine "switch" with "then"');const r={ref:x.ref(n),switch:[],break:a.break};for(let t=0;t<a.switch.length;++t){const l=a.switch[t],s=t===a.switch.length-1;y.assertOptions(l,s?["is","then","otherwise"]:["is","then"]),o(l.is!==void 0,'Switch statement missing "is"'),o(l.then!==void 0,'Switch statement missing "then"');const i={is:e.$_compile(l.is),then:e.$_compile(l.then)};if(h.isRef(l.is)||y.isSchema(l.is)||(i.is=i.is.required()),s){o(a.otherwise===void 0||l.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const u=a.otherwise!==void 0?a.otherwise:l.otherwise;u!==void 0&&(o(r.break===void 0,"Cannot specify both otherwise and break"),i.otherwise=e.$_compile(u))}r.switch.push(i)}return r},f.condition=function(e,n){for(const a of["then","otherwise"])n[a]===void 0?delete n[a]:n[a]=e.$_compile(n[a]);return n}},6354:(k,x,b)=>{const o=b(5688),y=b(8160),h=b(3328);x.Report=class{constructor(f,e,n,a,r,t,l){if(this.code=f,this.flags=a,this.messages=r,this.path=t.path,this.prefs=l,this.state=t,this.value=e,this.message=null,this.template=null,this.local=n||{},this.local.label=x.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 s=this.path[this.path.length-1];typeof s!="object"&&(this.local.key=s)}}_setTemplate(f){if(this.template=f,!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 f=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 "${f}" 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(f,e){return x.template(this.value,f,e||this.code,this.state,this.prefs)}},x.path=function(f){let e="";for(const n of f)typeof n!="object"&&(typeof n=="string"?(e&&(e+="."),e+=n):e+=`[${n}]`);return e},x.template=function(f,e,n,a,r){if(!e)return;if(h.isTemplate(e))return n!=="root"?e:null;let t=r.errors.language;if(y.isResolvable(t)&&(t=t.resolve(f,a,r)),t&&e[t]){if(e[t][n]!==void 0)return e[t][n];if(e[t]["*"]!==void 0)return e[t]["*"]}return e[n]?e[n]:e["*"]},x.label=function(f,e,n,a){if(f.label)return f.label;if(!n.errors.label)return"";let r=e.path;return n.errors.label==="key"&&e.path.length>1&&(r=e.path.slice(-1)),x.path(r)||x.template(null,n.messages,"root",e,n)||a&&x.template(null,a,"root",e,n)||"value"},x.process=function(f,e,n){if(!f)return null;const{override:a,message:r,details:t}=x.details(f);if(a)return a;if(n.errors.stack)return new x.ValidationError(r,t,e);const l=Error.stackTraceLimit;Error.stackTraceLimit=0;const s=new x.ValidationError(r,t,e);return Error.stackTraceLimit=l,s},x.details=function(f,e={}){let n=[];const a=[];for(const r of f){if(r instanceof Error){if(e.override!==!1)return{override:r};const l=r.toString();n.push(l),a.push({message:l,type:"override",context:{error:r}});continue}const t=r.toString();n.push(t),a.push({message:t,path:r.path.filter(l=>typeof l!="object"),type:r.code,context:r.local})}return n.length>1&&(n=[...new Set(n)]),{message:n.join(". "),details:a}},x.ValidationError=class extends Error{constructor(f,e,n){super(f),this._original=n,this.details=e}static isError(f){return f instanceof x.ValidationError}},x.ValidationError.prototype.isJoi=!0,x.ValidationError.prototype.name="ValidationError",x.ValidationError.prototype.annotate=o.error},8901:(k,x,b)=>{const o=b(375),y=b(8571),h=b(8160),f=b(6914),e={};x.type=function(n,a){const r=Object.getPrototypeOf(n),t=y(r),l=n._assign(Object.create(t)),s=Object.assign({},a);delete s.base,t._definition=s;const i=r._definition||{};s.messages=f.merge(i.messages,s.messages),s.properties=Object.assign({},i.properties,s.properties),l.type=s.type,s.flags=Object.assign({},i.flags,s.flags);const u=Object.assign({},i.terms);if(s.terms)for(const v in s.terms){const c=s.terms[v];o(l.$_terms[v]===void 0,"Invalid term override for",s.type,v),l.$_terms[v]=c.init,u[v]=c}s.terms=u,s.args||(s.args=i.args),s.prepare=e.prepare(s.prepare,i.prepare),s.coerce&&(typeof s.coerce=="function"&&(s.coerce={method:s.coerce}),s.coerce.from&&!Array.isArray(s.coerce.from)&&(s.coerce={method:s.coerce.method,from:[].concat(s.coerce.from)})),s.coerce=e.coerce(s.coerce,i.coerce),s.validate=e.validate(s.validate,i.validate);const d=Object.assign({},i.rules);if(s.rules)for(const v in s.rules){const c=s.rules[v];o(typeof c=="object","Invalid rule definition for",s.type,v);let m=c.method;if(m===void 0&&(m=function(){return this.$_addRule(v)}),m&&(o(!t[v],"Rule conflict in",s.type,v),t[v]=m),o(!d[v],"Rule conflict in",s.type,v),d[v]=c,c.alias){const g=[].concat(c.alias);for(const w of g)t[w]=c.method}c.args&&(c.argsByName=new Map,c.args=c.args.map(g=>(typeof g=="string"&&(g={name:g}),o(!c.argsByName.has(g.name),"Duplicated argument name",g.name),h.isSchema(g.assert)&&(g.assert=g.assert.strict().label(g.name)),c.argsByName.set(g.name,g),g)))}s.rules=d;const p=Object.assign({},i.modifiers);if(s.modifiers)for(const v in s.modifiers){o(!t[v],"Rule conflict in",s.type,v);const c=s.modifiers[v];o(typeof c=="function","Invalid modifier definition for",s.type,v);const m=function(g){return this.rule({[v]:g})};t[v]=m,p[v]=c}if(s.modifiers=p,s.overrides){t._super=r,l.$_super={};for(const v in s.overrides)o(r[v],"Cannot override missing",v),s.overrides[v][h.symbols.parent]=r[v],l.$_super[v]=r[v].bind(l);Object.assign(t,s.overrides)}s.cast=Object.assign({},i.cast,s.cast);const _=Object.assign({},i.manifest,s.manifest);return _.build=e.build(s.manifest&&s.manifest.build,i.manifest&&i.manifest.build),s.manifest=_,s.rebuild=e.rebuild(s.rebuild,i.rebuild),l},e.build=function(n,a){return n&&a?function(r,t){return a(n(r,t),t)}:n||a},e.coerce=function(n,a){return n&&a?{from:n.from&&a.from?[...new Set([...n.from,...a.from])]:null,method(r,t){let l;if((!a.from||a.from.includes(typeof r))&&(l=a.method(r,t),l)){if(l.errors||l.value===void 0)return l;r=l.value}if(!n.from||n.from.includes(typeof r)){const s=n.method(r,t);if(s)return s}return l}}:n||a},e.prepare=function(n,a){return n&&a?function(r,t){const l=n(r,t);if(l){if(l.errors||l.value===void 0)return l;r=l.value}return a(r,t)||l}:n||a},e.rebuild=function(n,a){return n&&a?function(r){a(r),n(r)}:n||a},e.validate=function(n,a){return n&&a?function(r,t){const l=a(r,t);if(l){if(l.errors&&(!Array.isArray(l.errors)||l.errors.length))return l;r=l.value}return n(r,t)||l}:n||a}},5107:(k,x,b)=>{const o=b(375),y=b(8571),h=b(8652),f=b(8160),e=b(3292),n=b(6354),a=b(8901),r=b(9708),t=b(6133),l=b(3328),s=b(1152);let i;const u={types:{alternatives:b(4946),any:b(8068),array:b(546),boolean:b(4937),date:b(7500),function:b(390),link:b(8785),number:b(3832),object:b(8966),string:b(7417),symbol:b(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const d={_types:new Set(Object.keys(u.types))};for(const p of d._types)d[p]=function(..._){return o(!_.length||["alternatives","link","object"].includes(p),"The",p,"type does not allow arguments"),u.generate(this,u.types[p],_)};for(const p of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])d[p]=function(..._){return this.any()[p](..._)};Object.assign(d,u.methods);for(const p in u.aliases){const _=u.aliases[p];d[p]=d[_]}return d.x=d.expression,s.setup&&s.setup(d),d}};u.methods={ValidationError:n.ValidationError,version:f.version,cache:h.provider,assert(d,p,..._){u.assert(d,p,!0,_)},attempt:(d,p,..._)=>u.assert(d,p,!1,_),build(d){return o(typeof r.build=="function","Manifest functionality disabled"),r.build(this,d)},checkPreferences(d){f.checkPreferences(d)},compile(d,p){return e.compile(this,d,p)},defaults(d){o(typeof d=="function","modifier must be a function");const p=Object.assign({},this);for(const _ of p._types){const v=d(p[_]());o(f.isSchema(v),"modifier must return a valid schema object"),p[_]=function(...c){return u.generate(this,v,c)}}return p},expression:(...d)=>new l(...d),extend(...d){f.verifyFlat(d,"extend"),i=i||b(3378),o(d.length,"You need to provide at least one extension"),this.assert(d,i.extensions);const p=Object.assign({},this);p._types=new Set(p._types);for(let _ of d){typeof _=="function"&&(_=_(p)),this.assert(_,i.extension);const v=u.expandExtension(_,p);for(const c of v){o(p[c.type]===void 0||p._types.has(c.type),"Cannot override name",c.type);const m=c.base||this.any(),g=a.type(m,c);p._types.add(c.type),p[c.type]=function(...w){return u.generate(this,g,w)}}}return p},isError:n.ValidationError.isError,isExpression:l.isTemplate,isRef:t.isRef,isSchema:f.isSchema,in:(...d)=>t.in(...d),override:f.symbols.override,ref:(...d)=>t.create(...d),types(){const d={};for(const p of this._types)d[p]=this[p]();for(const p in u.aliases)d[p]=this[p]();return d}},u.assert=function(d,p,_,v){const c=v[0]instanceof Error||typeof v[0]=="string"?v[0]:null,m=c!==null?v[1]:v[0],g=p.validate(d,f.preferences({errors:{stack:!0}},m||{}));let w=g.error;if(!w)return g.value;if(c instanceof Error)throw c;const $=_&&typeof w.annotate=="function"?w.annotate():w.message;throw w instanceof n.ValidationError==0&&(w=y(w)),w.message=c?`${c} ${$}`:$,w},u.generate=function(d,p,_){return o(d,"Must be invoked on a Joi instance."),p.$_root=d,p._definition.args&&_.length?p._definition.args(p,..._):p},u.expandExtension=function(d,p){if(typeof d.type=="string")return[d];const _=[];for(const v of p._types)if(d.type.test(v)){const c=Object.assign({},d);c.type=v,c.base=p[v](),_.push(c)}return _},k.exports=u.root()},6914:(k,x,b)=>{const o=b(375),y=b(8571),h=b(3328);x.compile=function(f,e){if(typeof f=="string")return o(!e,"Cannot set single message string"),new h(f);if(h.isTemplate(f))return o(!e,"Cannot set single message template"),f;o(typeof f=="object"&&!Array.isArray(f),"Invalid message options"),e=e?y(e):{};for(let n in f){const a=f[n];if(n==="root"||h.isTemplate(a)){e[n]=a;continue}if(typeof a=="string"){e[n]=new h(a);continue}o(typeof a=="object"&&!Array.isArray(a),"Invalid message for",n);const r=n;for(n in e[r]=e[r]||{},a){const t=a[n];n==="root"||h.isTemplate(t)?e[r][n]=t:(o(typeof t=="string","Invalid message for",n,"in",r),e[r][n]=new h(t))}}return e},x.decompile=function(f){const e={};for(let n in f){const a=f[n];if(n==="root"){e.root=a;continue}if(h.isTemplate(a)){e[n]=a.describe({compact:!0});continue}const r=n;for(n in e[r]={},a){const t=a[n];n!=="root"?e[r][n]=t.describe({compact:!0}):e[r].root=t}}return e},x.merge=function(f,e){if(!f)return x.compile(e);if(!e)return f;if(typeof e=="string")return new h(e);if(h.isTemplate(e))return e;const n=y(f);for(let a in e){const r=e[a];if(a==="root"||h.isTemplate(r)){n[a]=r;continue}if(typeof r=="string"){n[a]=new h(r);continue}o(typeof r=="object"&&!Array.isArray(r),"Invalid message for",a);const t=a;for(a in n[t]=n[t]||{},r){const l=r[a];a==="root"||h.isTemplate(l)?n[t][a]=l:(o(typeof l=="string","Invalid message for",a,"in",t),n[t][a]=new h(l))}}return n}},2294:(k,x,b)=>{const o=b(375),y=b(8160),h=b(6133),f={};x.Ids=f.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const e=new f.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[n,a]of e._byId.entries())o(!this._byKey.has(n),"Schema id conflicts with existing key:",n),this._byId.set(n,a);for(const[n,a]of e._byKey.entries())o(!this._byId.has(n),"Schema key conflicts with existing id:",n),this._byKey.set(n,a)}fork(e,n,a){const r=this._collect(e);r.push({schema:a});const t=r.shift();let l={id:t.id,schema:n(t.schema)};o(y.isSchema(l.schema),"adjuster function failed to return a joi schema type");for(const s of r)l={id:s.id,schema:f.fork(s.schema,l.id,l.schema)};return l.schema}labels(e,n=[]){const a=e[0],r=this._get(a);if(!r)return[...n,...e].join(".");const t=e.slice(1);return n=[...n,r.schema._flags.label||a],t.length?r.schema._ids.labels(t,n):n.join(".")}reach(e,n=[]){const a=e[0],r=this._get(a);o(r,"Schema does not contain path",[...n,...e].join("."));const t=e.slice(1);return t.length?r.schema._ids.reach(t,[...n,a]):r.schema}register(e,{key:n}={}){if(!e||!y.isSchema(e))return;(e.$_property("schemaChain")||e._ids._schemaChain)&&(this._schemaChain=!0);const a=e._flags.id;if(a){const r=this._byId.get(a);o(!r||r.schema===e,"Cannot add different schemas with the same id:",a),o(!this._byKey.has(a),"Schema id conflicts with existing key:",a),this._byId.set(a,{schema:e,id:a})}n&&(o(!this._byKey.has(n),"Schema already contains key:",n),o(!this._byId.has(n),"Schema key conflicts with existing id:",n),this._byKey.set(n,{schema:e,id:n}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(e,n=[],a=[]){const r=e[0],t=this._get(r);o(t,"Schema does not contain path",[...n,...e].join(".")),a=[t,...a];const l=e.slice(1);return l.length?t.schema._ids._collect(l,[...n,r],a):a}_get(e){return this._byId.get(e)||this._byKey.get(e)}},f.fork=function(e,n,a){const r=x.schema(e,{each:(t,{key:l})=>{if(n===(t._flags.id||l))return a},ref:!1});return r?r.$_mutateRebuild():e},x.schema=function(e,n){let a;for(const r in e._flags){if(r[0]==="_")continue;const t=f.scan(e._flags[r],{source:"flags",name:r},n);t!==void 0&&(a=a||e.clone(),a._flags[r]=t)}for(let r=0;r<e._rules.length;++r){const t=e._rules[r],l=f.scan(t.args,{source:"rules",name:t.name},n);if(l!==void 0){a=a||e.clone();const s=Object.assign({},t);s.args=l,a._rules[r]=s,a._singleRules.get(t.name)===t&&a._singleRules.set(t.name,s)}}for(const r in e.$_terms){if(r[0]==="_")continue;const t=f.scan(e.$_terms[r],{source:"terms",name:r},n);t!==void 0&&(a=a||e.clone(),a.$_terms[r]=t)}return a},f.scan=function(e,n,a,r,t){const l=r||[];if(e===null||typeof e!="object")return;let s;if(Array.isArray(e)){for(let i=0;i<e.length;++i){const u=n.source==="terms"&&n.name==="keys"&&e[i].key,d=f.scan(e[i],n,a,[i,...l],u);d!==void 0&&(s=s||e.slice(),s[i]=d)}return s}if(a.schema!==!1&&y.isSchema(e)||a.ref!==!1&&h.isRef(e)){const i=a.each(e,{...n,path:l,key:t});return i===e?void 0:i}for(const i in e){if(i[0]==="_")continue;const u=f.scan(e[i],n,a,[i,...l],t);u!==void 0&&(s=s||Object.assign({},e),s[i]=u)}return s}},6133:(k,x,b)=>{const o=b(375),y=b(8571),h=b(9621),f=b(8160);let e;const n={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};x.create=function(a,r={}){o(typeof a=="string","Invalid reference key:",a),f.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({},n.defaults,r);delete t.prefix;const l=t.separator,s=n.context(a,l,r.prefix);if(t.type=s.type,a=s.key,t.type==="value")if(s.root&&(o(!l||a[0]!==l,"Cannot specify relative path with root prefix"),t.ancestor="root",a||(a=null)),l&&l===a)a=null,t.ancestor=0;else if(t.ancestor!==void 0)o(!l||!a||a[0]!==l,"Cannot combine prefix with ancestor option");else{const[i,u]=n.ancestor(a,l);u&&(a=a.slice(u))===""&&(a=null),t.ancestor=i}return t.path=l?a===null?[]:a.split(l):[a],new n.Ref(t)},x.in=function(a,r={}){return x.create(a,{...r,in:!0})},x.isRef=function(a){return!!a&&!!a[f.symbols.ref]},n.Ref=class{constructor(a){o(typeof a=="object","Invalid reference construction"),f.assertOptions(a,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),o([!1,void 0].includes(a.separator)||typeof a.separator=="string"&&a.separator.length===1,"Invalid separator"),o(!a.adjust||typeof a.adjust=="function","options.adjust must be a function"),o(!a.map||Array.isArray(a.map),"options.map must be an array"),o(!a.map||!a.adjust,"Cannot set both map and adjust options"),Object.assign(this,n.defaults,a),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(a,r,t,l,s={}){return o(!this.in||s.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(t.context,r,s):this.type==="local"?this._resolve(l,r,s):this.ancestor?this.ancestor==="root"?this._resolve(r.ancestors[r.ancestors.length-1],r,s):(o(this.ancestor<=r.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(r.ancestors[this.ancestor-1],r,s)):this._resolve(a,r,s)}_resolve(a,r,t){let l;if(this.type==="value"&&r.mainstay.shadow&&t.shadow!==!1&&(l=r.mainstay.shadow.get(this.absolute(r))),l===void 0&&(l=h(a,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(l=this.adjust(l)),this.map){const s=this.map.get(l);s!==void 0&&(l=s)}return r.mainstay&&r.mainstay.tracer.resolve(r,this,l),l}toString(){return this.display}absolute(a){return[...a.path.slice(0,-this.ancestor),...this.path]}clone(){return new n.Ref(this)}describe(){const a={path:this.path};this.type!=="value"&&(a.type=this.type),this.separator!=="."&&(a.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(a.ancestor=this.ancestor),this.map&&(a.map=[...this.map]);for(const r of["adjust","iterables","render"])this[r]!==null&&this[r]!==void 0&&(a[r]=this[r]);return this.in!==!1&&(a.in=!0),{ref:a}}updateDisplay(){const a=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${a}`);if(!this.separator)return void(this.display=`ref:${a}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${a}`);if(this.ancestor==="root")return void(this.display=`ref:root:${a}`);if(this.ancestor===1)return void(this.display=`ref:${a||".."}`);const r=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${r}${a||""}`}},n.Ref.prototype[f.symbols.ref]=!0,x.build=function(a){return(a=Object.assign({},n.defaults,a)).type==="value"&&a.ancestor===void 0&&(a.ancestor=1),new n.Ref(a)},n.context=function(a,r,t={}){if(a=a.trim(),t){const l=t.global===void 0?"$":t.global;if(l!==r&&a.startsWith(l))return{key:a.slice(l.length),type:"global"};const s=t.local===void 0?"#":t.local;if(s!==r&&a.startsWith(s))return{key:a.slice(s.length),type:"local"};const i=t.root===void 0?"/":t.root;if(i!==r&&a.startsWith(i))return{key:a.slice(i.length),type:"value",root:!0}}return{key:a,type:"value"}},n.ancestor=function(a,r){if(!r)return[1,0];if(a[0]!==r)return[1,0];if(a[1]!==r)return[0,1];let t=2;for(;a[t]===r;)++t;return[t-1,t]},x.toSibling=0,x.toParent=1,x.Manager=class{constructor(){this.refs=[]}register(a,r){if(a)if(r=r===void 0?x.toParent:r,Array.isArray(a))for(const t of a)this.register(t,r);else if(f.isSchema(a))for(const t of a._refs.refs)t.ancestor-r>=0&&this.refs.push({ancestor:t.ancestor-r,root:t.root});else x.isRef(a)&&a.type==="value"&&a.ancestor-r>=0&&this.refs.push({ancestor:a.ancestor-r,root:a.root}),e=e||b(3328),e.isTemplate(a)&&this.register(a.refs(),r)}get length(){return this.refs.length}clone(){const a=new x.Manager;return a.refs=y(this.refs),a}reset(){this.refs=[]}roots(){return this.refs.filter(a=>!a.ancestor).map(a=>a.root)}}},3378:(k,x,b)=>{const o=b(5107),y={};y.wrap=o.string().min(1).max(2).allow(!1),x.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:y.wrap,array:y.wrap,string:y.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(),y.nameRx=/^[a-zA-Z0-9]\w*$/,y.rule=o.object({alias:o.array().items(o.string().pattern(y.nameRx)).single(),args:o.array().items(o.string(),o.object({name:o.string().pattern(y.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()}),x.extension=o.object({type:o.alternatives([o.string(),o.object().regex()]).required(),args:o.function(),cast:o.object().pattern(y.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(y.nameRx,o.object({setter:o.string(),default:o.any()})),manifest:{build:o.function().arity(2)},messages:[o.object(),o.string()],modifiers:o.object().pattern(y.nameRx,o.function().minArity(1).maxArity(2)),overrides:o.object().pattern(y.nameRx,o.function()),prepare:o.function().maxArity(3),rebuild:o.function().arity(1),rules:o.object().pattern(y.nameRx,y.rule),terms:o.object().pattern(y.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(),x.extensions=o.array().items(o.object(),o.function().arity(1)).strict(),y.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()})},y.desc.entity=o.alternatives([o.array().items(o.link("...")),o.boolean(),o.function(),o.number(),o.string(),y.desc.buffer,y.desc.func,y.desc.ref,y.desc.regex,y.desc.special,y.desc.template,y.desc.value,o.link("/")]),y.desc.values=o.array().items(null,o.boolean(),o.function(),o.number().allow(1/0,-1/0),o.string().allow(""),o.symbol(),y.desc.buffer,y.desc.func,y.desc.override,y.desc.ref,y.desc.regex,y.desc.template,y.desc.value),y.desc.messages=o.object().pattern(/.+/,[o.string(),y.desc.template,o.object().pattern(/.+/,[o.string(),y.desc.template])]),x.description=o.object({type:o.string().required(),flags:o.object({cast:o.string(),default:o.any(),description:o.string(),empty:o.link("/"),failover:y.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(),y.desc.ref],wrap:{label:y.wrap,array:y.wrap}},externals:o.boolean(),messages:y.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:y.desc.values,invalid:y.desc.values,rules:o.array().min(1).items({name:o.string().required(),args:o.object().min(1),keep:o.boolean(),message:[o.string(),y.desc.messages],warn:o.boolean()}),keys:o.object().pattern(/.*/,o.link("/")),link:y.desc.ref}).pattern(/^[a-z]\w*$/,o.any())},493:(k,x,b)=>{const o=b(8571),y=b(9621),h=b(8160),f={value:Symbol("value")};k.exports=f.State=class{constructor(e,n,a){this.path=e,this.ancestors=n,this.mainstay=a.mainstay,this.schemas=a.schemas,this.debug=null}localize(e,n=null,a=null){const r=new f.State(e,n,this);return a&&r.schemas&&(r.schemas=[f.schemas(a),...r.schemas]),r}nest(e,n){const a=new f.State(this.path,this.ancestors,this);return a.schemas=a.schemas&&[f.schemas(e),...a.schemas],a.debug=n,a}shadow(e,n){this.mainstay.shadow=this.mainstay.shadow||new f.Shadow,this.mainstay.shadow.set(this.path,e,n)}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()}},f.schemas=function(e){return h.isSchema(e)?{schema:e}:e},f.Shadow=class{constructor(){this._values=null}set(e,n,a){if(!e.length||a==="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 l=e[t];let s=r.get(l);s||(s=new Map,r.set(l,s)),r=s}r[f.value]=n}get(e){const n=this.node(e);if(n)return n[f.value]}node(e){if(this._values)return y(this._values,e,{iterables:!0})}override(e,n){if(!this._values)return;const a=e.slice(0,-1),r=e[e.length-1],t=y(this._values,a,{iterables:!0});n?t.set(r,n):t&&t.delete(r)}}},3328:(k,x,b)=>{const o=b(375),y=b(8571),h=b(5277),f=b(1447),e=b(8160),n=b(6354),a=b(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,l){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,l){const{functions:s,...i}=l;this._settings=Object.keys(i).length?y(i):void 0,this._functions=s,this._functions&&(o(Object.keys(this._functions).every(u=>typeof u=="string"),"Functions keys must be strings"),o(Object.values(this._functions).every(u=>typeof u=="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),l=r.split(t);let s=!1;const i=[],u=l.shift();u&&i.push(u);for(const d of l){const p=d[0]!=="{",_=p?"}":"}}",v=d.indexOf(_);if(v===-1||d[1]==="{"){i.push(`{${r.decode(d)}`);continue}let c=d.slice(p?0:1,v);const m=c[0]===":";m&&(c=c.slice(1));const g=this._ref(r.decode(c),{raw:p,wrapped:m});i.push(g),typeof g!="string"&&(s=!0);const w=d.slice(v+_.length);w&&i.push(r.decode(w))}s?this._template=i:this.rendered=i.join("")}static date(t,l){return r.dateFormat[l.dateFormat].call(t)}describe(t={}){if(!this._settings&&t.compact)return this.source;const l={template:this.source};return this._settings&&(l.options=this._settings),this._functions&&(l.functions=this._functions),l}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 l of this._template)typeof l!="string"&&t.push(...l.refs);return t}resolve(t,l,s,i){return this._template&&this._template.length===1?this._part(this._template[0],t,l,s,i,{}):this.render(t,l,s,i)}_part(t,...l){return t.ref?t.ref.resolve(...l):t.formula.evaluate(l)}render(t,l,s,i,u={}){if(!this.isDynamic())return this.rendered;const d=[];for(const p of this._template)if(typeof p=="string")d.push(p);else{const _=this._part(p,t,l,s,i,u),v=r.stringify(_,t,l,s,i,u);if(v!==void 0){const c=p.raw||(u.errors&&u.errors.escapeHtml)===!1?v:h(v);d.push(r.wrap(c,p.wrapped&&s.errors.wrap.label))}}return d.join("")}_ref(t,{raw:l,wrapped:s}){const i=[],u=p=>{const _=a.create(p,this._settings);return i.push(_),v=>{const c=_.resolve(...v);return c!==void 0?c:null}};try{const p=this._functions?{...r.functions,...this._functions}:r.functions;var d=new f.Parser(t,{reference:u,functions:p,constants:r.constants})}catch(p){throw p.message=`Invalid template variable "${t}" fails due to: ${p.message}`,p}if(d.single){if(d.single.type==="reference"){const p=i[0];return{ref:p,raw:l,refs:i,wrapped:s||p.type==="local"&&p.key==="label"}}return r.stringify(d.single.value)}return{formula:d,raw:l,refs:i}}toString(){return this.source}},r.Template.prototype[e.symbols.template]=!0,r.Template.prototype.isImmutable=!0,r.encode=function(t){return t.replace(/\\(\{+)/g,(l,s)=>r.opens.slice(0,s.length)).replace(/\\(\}+)/g,(l,s)=>r.closes.slice(0,s.length))},r.decode=function(t){return t.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},r.split=function(t){const l=[];let s="";for(let i=0;i<t.length;++i){const u=t[i];if(u==="{"){let d="";for(;i+1<t.length&&t[i+1]==="{";)d+="{",++i;l.push(s),s=d}else s+=u}return l.push(s),l},r.wrap=function(t,l){return l?l.length===1?`${l}${t}${l}`:`${l[0]}${t}${l[1]}`:t},r.stringify=function(t,l,s,i,u,d={}){const p=typeof t,_=i&&i.errors&&i.errors.wrap||{};let v=!1;if(a.isRef(t)&&t.render&&(v=t.in,t=t.resolve(l,s,i,u,{in:t.in,...d})),t===null)return"null";if(p==="string")return r.wrap(t,d.arrayItems&&_.string);if(p==="number"||p==="function"||p==="symbol")return t.toString();if(p!=="object")return JSON.stringify(t);if(t instanceof Date)return r.Template.date(t,i);if(t instanceof Map){const m=[];for(const[g,w]of t.entries())m.push(`${g.toString()} -> ${w.toString()}`);t=m}if(!Array.isArray(t))return t.toString();const c=[];for(const m of t)c.push(r.stringify(m,l,s,i,u,{arrayItems:!0,...d}));return r.wrap(c.join(", "),!v&&_.array)},r.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},r.functions={if:(t,l,s)=>t?l:s,length:t=>typeof t=="string"?t.length:t&&typeof t=="object"?Array.isArray(t)?t.length:Object.keys(t).length:null,msg(t){const[l,s,i,u,d]=this,p=d.messages;if(!p)return"";const _=n.template(l,p[0],t,s,i)||n.template(l,p[1],t,s,i);return _?_.render(l,s,i,u,d):""},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,x,b)=>{const o=b(375),y=b(1687),h=b(8068),f=b(8160),e=b(3292),n=b(6354),a=b(6133),r={};k.exports=h.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:a.toSibling}},args:(t,...l)=>l.length===1&&Array.isArray(l[0])?t.try(...l[0]):t.try(...l),validate(t,l){const{schema:s,error:i,state:u,prefs:d}=l;if(s._flags.match){const _=[],v=[];for(let m=0;m<s.$_terms.matches.length;++m){const g=s.$_terms.matches[m],w=u.nest(g.schema,`match.${m}`);w.snapshot();const $=g.schema.$_validate(t,w,d);$.errors?(v.push($.errors),w.restore()):(_.push($.value),w.commit())}if(_.length===0)return{errors:i("alternatives.any",{details:v.map(m=>n.details(m,{override:!1}))})};if(s._flags.match==="one")return _.length===1?{value:_[0]}:{errors:i("alternatives.one")};if(_.length!==s.$_terms.matches.length)return{errors:i("alternatives.all",{details:v.map(m=>n.details(m,{override:!1}))})};const c=m=>m.$_terms.matches.some(g=>g.schema.type==="object"||g.schema.type==="alternatives"&&c(g.schema));return c(s)?{value:_.reduce((m,g)=>y(m,g,{mergeArrays:!1}))}:{value:_[_.length-1]}}const p=[];for(let _=0;_<s.$_terms.matches.length;++_){const v=s.$_terms.matches[_];if(v.schema){const g=u.nest(v.schema,`match.${_}`);g.snapshot();const w=v.schema.$_validate(t,g,d);if(!w.errors)return g.commit(),w;g.restore(),p.push({schema:v.schema,reports:w.errors});continue}const c=v.ref?v.ref.resolve(t,u,d):t,m=v.is?[v]:v.switch;for(let g=0;g<m.length;++g){const w=m[g],{is:$,then:j,otherwise:S}=w,O=`match.${_}${v.switch?"."+g:""}`;if($.$_match(c,u.nest($,`${O}.is`),d)){if(j)return j.$_validate(t,u.nest(j,`${O}.then`),d)}else if(S)return S.$_validate(t,u.nest(S,`${O}.otherwise`),d)}}return r.errors(p,l)},rules:{conditional:{method(t,l){o(!this._flags._endedSwitch,"Unreachable condition"),o(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),o(l.break===void 0,"Cannot use break option with alternatives conditional");const s=this.clone(),i=e.when(s,t,l),u=i.is?[i]:i.switch;for(const d of u)if(d.then&&d.otherwise){s.$_setFlag("_endedSwitch",!0,{clone:!1});break}return s.$_terms.matches.push(i),s.$_mutateRebuild()}},match:{method(t){if(o(["any","one","all"].includes(t),"Invalid alternatives match mode",t),t!=="any")for(const l of this.$_terms.matches)o(l.schema,"Cannot combine match mode",t,"with conditional rules");return this.$_setFlag("match",t)}},try:{method(...t){o(t.length,"Missing alternative schemas"),f.verifyFlat(t,"try"),o(!this._flags._endedSwitch,"Unreachable condition");const l=this.clone();for(const s of t)l.$_terms.matches.push({schema:l.$_compile(s)});return l.$_mutateRebuild()}}},overrides:{label(t){return this.$_parent("label",t).$_modify({each:(l,s)=>s.path[0]!=="is"&&typeof l._flags.label!="string"?l.label(t):void 0,ref:!1})}},rebuild(t){t.$_modify({each:l=>{f.isSchema(l)&&l.type==="array"&&t.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(t,l){if(l.matches)for(const s of l.matches){const{schema:i,ref:u,is:d,not:p,then:_,otherwise:v}=s;t=i?t.try(i):u?t.conditional(u,{is:d,then:_,not:p,otherwise:v,switch:s.switch}):t.conditional(d,{then:_,otherwise:v})}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:l,state:s}){if(!t.length)return{errors:l("alternatives.any")};if(t.length===1)return{errors:t[0].reports};const i=new Set,u=[];for(const{reports:d,schema:p}of t){if(d.length>1)return r.unmatched(t,l);const _=d[0];if(_ instanceof n.Report==0)return r.unmatched(t,l);if(_.state.path.length!==s.path.length){u.push({type:p.type,report:_});continue}if(_.code==="any.only"){for(const m of _.local.valids)i.add(m);continue}const[v,c]=_.code.split(".");c==="base"?i.add(v):u.push({type:p.type,report:_})}return u.length?u.length===1?{errors:u[0].report}:r.unmatched(t,l):{errors:l("alternatives.types",{types:[...i]})}},r.unmatched=function(t,l){const s=[];for(const i of t)s.push(...i.reports);return{errors:l("alternatives.match",n.details(s,{override:!1}))}}},8068:(k,x,b)=>{const o=b(375),y=b(7629),h=b(8160),f=b(6914);k.exports=y.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,n){return o(typeof e=="function","Method must be a function"),o(n===void 0||n&&typeof n=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:e,description:n}})},validate(e,n,{method:a}){try{return a(e,n)}catch(r){return n.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 n=this.clone();return n.$_terms.shared=n.$_terms.shared||[],n.$_terms.shared.push(e),n.$_mutateRegister(e),n}},warning:{method(e,n){return o(e&&typeof e=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:e,local:n},warn:!0})},validate:(e,n,{code:a,local:r})=>n.error(a,r),args:["code","local"],multi:!0}},modifiers:{keep(e,n=!0){e.keep=n},message(e,n){e.message=f.compile(n)},warn(e,n=!0){e.warn=n}},manifest:{build(e,n){for(const a in n){const r=n[a];if(["examples","externals","metas","notes","tags"].includes(a))for(const t of r)e=e[a.slice(0,-1)](t);else if(a!=="alterations")if(a!=="whens"){if(a==="shared")for(const t of r)e=e.shared(t)}else for(const t of r){const{ref:l,is:s,not:i,then:u,otherwise:d,concat:p}=t;e=p?e.concat(p):l?e.when(l,{is:s,not:i,then:u,otherwise:d,switch:t.switch,break:t.break}):e.when(s,{then:u,otherwise:d,break:t.break})}else{const t={};for(const{target:l,adjuster:s}of r)t[l]=s;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,x,b)=>{const o=b(375),y=b(9474),h=b(9621),f=b(8068),e=b(8160),n=b(3292),a={};k.exports=f.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:l,prefs:s}){if(!Array.isArray(r))return;const i=t.$_getRule("sort");return i?a.sort(t,r,i.args.options,l,s):void 0}},validate(r,{schema:t,error:l}){if(!Array.isArray(r)){if(t._flags.single){const s=[r];return s[e.symbols.arraySingle]=!0,{value:s}}return{errors:l("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:l,error:s},{schema:i}){const u=[r,...t.ancestors];for(let p=0;p<r.length;++p){const _=t.localize([...t.path,p],u,i);if(i.$_match(r[p],_,l))return r}const d=i._flags.label;return d?s("array.hasKnown",{patternLabel:d}):s("array.hasUnknown",null)},multi:!0},items:{method(...r){e.verifyFlat(r,"items");const t=this.$_addRule("items");for(let l=0;l<r.length;++l){const s=e.tryWithPath(()=>this.$_compile(r[l]),l,{append:!0});t.$_terms.items.push(s)}return t.$_mutateRebuild()},validate(r,{schema:t,error:l,state:s,prefs:i,errorsArray:u}){const d=t.$_terms._requireds.slice(),p=t.$_terms.ordered.slice(),_=[...t.$_terms._inclusions,...d],v=!r[e.symbols.arraySingle];delete r[e.symbols.arraySingle];const c=u();let m=r.length;for(let g=0;g<m;++g){const w=r[g];let $=!1,j=!1;const S=v?g:new Number(g),O=[...s.path,S];if(!t._flags.sparse&&w===void 0){if(c.push(l("array.sparse",{key:S,path:O,pos:g,value:void 0},s.localize(O))),i.abortEarly)return c;p.shift();continue}const C=[r,...s.ancestors];for(const L of t.$_terms._exclusions)if(L.$_match(w,s.localize(O,C,L),i,{presence:"ignore"})){if(c.push(l("array.excludes",{pos:g,value:w},s.localize(O))),i.abortEarly)return c;$=!0,p.shift();break}if($)continue;if(t.$_terms.ordered.length){if(p.length){const L=p.shift(),T=L.$_validate(w,s.localize(O,C,L),i);if(T.errors){if(c.push(...T.errors),i.abortEarly)return c}else if(L._flags.result==="strip")a.fastSplice(r,g),--g,--m;else{if(!t._flags.sparse&&T.value===void 0){if(c.push(l("array.sparse",{key:S,path:O,pos:g,value:void 0},s.localize(O))),i.abortEarly)return c;continue}r[g]=T.value}continue}if(!t.$_terms.items.length){if(c.push(l("array.orderedLength",{pos:g,limit:t.$_terms.ordered.length})),i.abortEarly)return c;break}}const I=[];let P=d.length;for(let L=0;L<P;++L){const T=s.localize(O,C,d[L]);T.snapshot();const z=d[L].$_validate(w,T,i);if(I[L]=z,!z.errors){if(T.commit(),r[g]=z.value,j=!0,a.fastSplice(d,L),--L,--P,!t._flags.sparse&&z.value===void 0&&(c.push(l("array.sparse",{key:S,path:O,pos:g,value:void 0},s.localize(O))),i.abortEarly))return c;break}T.restore()}if(j)continue;const q=i.stripUnknown&&!!i.stripUnknown.arrays||!1;P=_.length;for(const L of _){let T;const z=d.indexOf(L);if(z!==-1)T=I[z];else{const W=s.localize(O,C,L);if(W.snapshot(),T=L.$_validate(w,W,i),!T.errors){W.commit(),L._flags.result==="strip"?(a.fastSplice(r,g),--g,--m):t._flags.sparse||T.value!==void 0?r[g]=T.value:(c.push(l("array.sparse",{key:S,path:O,pos:g,value:void 0},s.localize(O))),$=!0),j=!0;break}W.restore()}if(P===1){if(q){a.fastSplice(r,g),--g,--m,j=!0;break}if(c.push(...T.errors),i.abortEarly)return c;$=!0;break}}if(!$&&(t.$_terms._inclusions.length||t.$_terms._requireds.length)&&!j){if(q){a.fastSplice(r,g),--g,--m;continue}if(c.push(l("array.includes",{pos:g,value:w},s.localize(O))),i.abortEarly)return c}}return d.length&&a.fillMissedErrors(t,c,d,r,s,i),p.length&&(a.fillOrderedErrors(t,c,p,r,s,i),c.length||a.fillDefault(p,r,s,i)),c.length?c:r},priority:!0,manifest:!1},length:{method(r){return this.$_addRule({name:"length",args:{limit:r},operator:"="})},validate:(r,t,{limit:l},{name:s,operator:i,args:u})=>e.compare(r.length,l,i)?r:t.error("array."+s,{limit:u.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 l=0;l<r.length;++l){const s=e.tryWithPath(()=>this.$_compile(r[l]),l,{append:!0});a.validateSingle(s,t),t.$_mutateRegister(s),t.$_terms.ordered.push(s)}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=n.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:l,prefs:s,schema:i},{options:u}){const{value:d,errors:p}=a.sort(i,r,u,l,s);if(p)return p;for(let _=0;_<r.length;++_)if(r[_]!==d[_])return t("array.sort",{order:u.order,by:u.by?u.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 l={name:"unique",args:{options:t,comparator:r}};if(r)if(typeof r=="string"){const s=e.default(t.separator,".");l.path=s?r.split(s):[r]}else l.comparator=r;return this.$_addRule(l)},validate(r,{state:t,error:l,schema:s},{comparator:i,options:u},{comparator:d,path:p}){const _={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},v=d||y,c=u.ignoreUndefined;for(let m=0;m<r.length;++m){const g=p?h(r[m],p):r[m],w=d?_.custom:_[typeof g];if(o(w,"Failed to find unique map container for type",typeof g),w instanceof Map){const $=w.entries();let j;for(;!(j=$.next()).done;)if(v(j.value[0],g)){const S=t.localize([...t.path,m],[r,...t.ancestors]),O={pos:m,value:r[m],dupePos:j.value[1],dupeValue:r[j.value[1]]};return p&&(O.path=i),l("array.unique",O,S)}w.set(g,m)}else{if((!c||g!==void 0)&&w[g]!==void 0){const $={pos:m,value:r[m],dupePos:w[g],dupeValue:r[w[g]]};return p&&($.path=i),l("array.unique",$,t.localize([...t.path,m],[r,...t.ancestors]))}w[g]=m}}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)a.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)a.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"}}),a.fillMissedErrors=function(r,t,l,s,i,u){const d=[];let p=0;for(const _ of l){const v=_._flags.label;v?d.push(v):++p}d.length?p?t.push(r.$_createError("array.includesRequiredBoth",s,{knownMisses:d,unknownMisses:p},i,u)):t.push(r.$_createError("array.includesRequiredKnowns",s,{knownMisses:d},i,u)):t.push(r.$_createError("array.includesRequiredUnknowns",s,{unknownMisses:p},i,u))},a.fillOrderedErrors=function(r,t,l,s,i,u){const d=[];for(const p of l)p._flags.presence==="required"&&d.push(p);d.length&&a.fillMissedErrors(r,t,d,s,i,u)},a.fillDefault=function(r,t,l,s){const i=[];let u=!0;for(let d=r.length-1;d>=0;--d){const p=r[d],_=[t,...l.ancestors],v=p.$_validate(void 0,l.localize(l.path,_,p),s).value;if(u){if(v===void 0)continue;u=!1}i.unshift(v)}i.length&&t.push(...i)},a.fastSplice=function(r,t){let l=t;for(;l<r.length;)r[l++]=r[l];--r.length},a.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}))},a.sort=function(r,t,l,s,i){const u=l.order==="ascending"?1:-1,d=-1*u,p=u,_=(v,c)=>{let m=a.compare(v,c,d,p);if(m!==null||(l.by&&(v=l.by.resolve(v,s,i),c=l.by.resolve(c,s,i)),m=a.compare(v,c,d,p),m!==null))return m;const g=typeof v;if(g!==typeof c)throw r.$_createError("array.sort.mismatching",t,null,s,i);if(g!=="number"&&g!=="string")throw r.$_createError("array.sort.unsupported",t,{type:g},s,i);return g==="number"?(v-c)*u:v<c?d:p};try{return{value:t.slice().sort(_)}}catch(v){return{errors:v}}},a.compare=function(r,t,l,s){return r===t?0:r===void 0?1:t===void 0?-1:r===null?s:t===null?l:null}},4937:(k,x,b)=>{const o=b(375),y=b(8068),h=b(8160),f=b(2036),e={isBool:function(n){return typeof n=="boolean"}};k.exports=y.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(n,{schema:a}){if(typeof n!="boolean"){if(typeof n=="string"){const r=a._flags.sensitive?n:n.toLowerCase();n=r==="true"||r!=="false"&&n}return typeof n!="boolean"&&(n=a.$_terms.truthy&&a.$_terms.truthy.has(n,null,null,!a._flags.sensitive)||(!a.$_terms.falsy||!a.$_terms.falsy.has(n,null,null,!a._flags.sensitive))&&n),{value:n}}},validate(n,{error:a}){if(typeof n!="boolean")return{value:n,errors:a("boolean.base")}},rules:{truthy:{method(...n){h.verifyFlat(n,"truthy");const a=this.clone();a.$_terms.truthy=a.$_terms.truthy||new f;for(let r=0;r<n.length;++r){const t=n[r];o(t!==void 0,"Cannot call truthy with undefined"),a.$_terms.truthy.add(t)}return a}},falsy:{method(...n){h.verifyFlat(n,"falsy");const a=this.clone();a.$_terms.falsy=a.$_terms.falsy||new f;for(let r=0;r<n.length;++r){const t=n[r];o(t!==void 0,"Cannot call falsy with undefined"),a.$_terms.falsy.add(t)}return a}},sensitive:{method(n=!0){return this.$_setFlag("sensitive",n)}}},cast:{number:{from:e.isBool,to:(n,a)=>n?1:0},string:{from:e.isBool,to:(n,a)=>n?"true":"false"}},manifest:{build:(n,a)=>(a.truthy&&(n=n.truthy(...a.truthy)),a.falsy&&(n=n.falsy(...a.falsy)),n)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(k,x,b)=>{const o=b(375),y=b(8068),h=b(8160),f=b(3328),e={isDate:function(n){return n instanceof Date}};k.exports=y.extend({type:"date",coerce:{from:["number","string"],method:(n,{schema:a})=>({value:e.parse(n,a._flags.format)||n})},validate(n,{schema:a,error:r,prefs:t}){if(n instanceof Date&&!isNaN(n.getTime()))return;const l=a._flags.format;return t.convert&&l&&typeof n=="string"?{value:n,errors:r("date.format",{format:l})}:{value:n,errors:r("date.base")}},rules:{compare:{method:!1,validate(n,a,{date:r},{name:t,operator:l,args:s}){const i=r==="now"?Date.now():r.getTime();return h.compare(n.getTime(),i,l)?n:a.error("date."+t,{limit:s.date,value:n})},args:[{name:"date",ref:!0,normalize:n=>n==="now"?n:e.parse(n),assert:n=>n!==null,message:"must have a valid date format"}]},format:{method(n){return o(["iso","javascript","unix"].includes(n),"Unknown date format",n),this.$_setFlag("format",n)}},greater:{method(n){return this.$_addRule({name:"greater",method:"compare",args:{date:n},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(n){return this.$_addRule({name:"less",method:"compare",args:{date:n},operator:"<"})}},max:{method(n){return this.$_addRule({name:"max",method:"compare",args:{date:n},operator:"<="})}},min:{method(n){return this.$_addRule({name:"min",method:"compare",args:{date:n},operator:">="})}},timestamp:{method(n="javascript"){return o(["javascript","unix"].includes(n),'"type" must be one of "javascript, unix"'),this.format(n)}}},cast:{number:{from:e.isDate,to:(n,a)=>n.getTime()},string:{from:e.isDate,to:(n,{prefs:a})=>f.date(n,a)}},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(n,a){if(n instanceof Date)return n;if(typeof n!="string"&&(isNaN(n)||!isFinite(n))||/^\s*$/.test(n))return null;if(a==="iso")return h.isIsoDate(n)?e.date(n.toString()):null;const r=n;if(typeof n=="string"&&/^[+-]?\d+(\.\d+)?$/.test(n)&&(n=parseFloat(n)),a){if(a==="javascript")return e.date(1*n);if(a==="unix")return e.date(1e3*n);if(typeof r=="string")return null}return e.date(n)},e.date=function(n){const a=new Date(n);return isNaN(a.getTime())?null:a}},390:(k,x,b)=>{const o=b(375),y=b(7824);k.exports=y.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,f,{n:e})=>h.length===e?h:f.error("function.arity",{n:e})},class:{method(){return this.$_addRule("class")},validate:(h,f)=>/^\s*class\s/.test(h.toString())?h:f.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,f,{n:e})=>h.length>=e?h:f.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,f,{n:e})=>h.length<=e?h:f.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,x,b)=>{const o=b(978),y=b(375),h=b(8571),f=b(3652),e=b(8068),n=b(8160),a=b(3292),r=b(6354),t=b(6133),l=b(3328),s={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:(i,u)=>i.keys(u),validate(i,{schema:u,error:d,state:p,prefs:_}){if(!i||typeof i!==u.$_property("typeof")||Array.isArray(i))return{value:i,errors:d("object.base",{type:u.$_property("typeof")})};if(!(u.$_terms.renames||u.$_terms.dependencies||u.$_terms.keys||u.$_terms.patterns||u.$_terms.externals))return;i=s.clone(i,_);const v=[];if(u.$_terms.renames&&!s.rename(u,i,p,_,v))return{value:i,errors:v};if(!u.$_terms.keys&&!u.$_terms.patterns&&!u.$_terms.dependencies)return{value:i,errors:v};const c=new Set(Object.keys(i));if(u.$_terms.keys){const m=[i,...p.ancestors];for(const g of u.$_terms.keys){const w=g.key,$=i[w];c.delete(w);const j=p.localize([...p.path,w],m,g),S=g.schema.$_validate($,j,_);if(S.errors){if(_.abortEarly)return{value:i,errors:S.errors};S.value!==void 0&&(i[w]=S.value),v.push(...S.errors)}else g.schema._flags.result==="strip"||S.value===void 0&&$!==void 0?delete i[w]:S.value!==void 0&&(i[w]=S.value)}}if(c.size||u._flags._hasPatternMatch){const m=s.unknown(u,i,c,v,p,_);if(m)return m}if(u.$_terms.dependencies)for(const m of u.$_terms.dependencies){if(m.key!==null&&s.isPresent(m.options)(m.key.resolve(i,p,_,null,{shadow:!1}))===!1)continue;const g=s.dependencies[m.rel](u,m,i,p,_);if(g){const w=u.$_createError(g.code,i,g.context,p,_);if(_.abortEarly)return{value:i,errors:w};v.push(w)}}return{value:i,errors:v}},rules:{and:{method(...i){return n.verifyFlat(i,"and"),s.dependency(this,"and",null,i)}},append:{method(i){return i==null||Object.keys(i).length===0?this:this.keys(i)}},assert:{method(i,u,d){l.isTemplate(i)||(i=a.ref(i)),y(d===void 0||typeof d=="string","Message must be a string"),u=this.$_compile(u,{appendPath:!0});const p=this.$_addRule({name:"assert",args:{subject:i,schema:u,message:d}});return p.$_mutateRegister(i),p.$_mutateRegister(u),p},validate(i,{error:u,prefs:d,state:p},{subject:_,schema:v,message:c}){const m=_.resolve(i,p,d),g=t.isRef(_)?_.absolute(p):[];return v.$_match(m,p.localize(g,[i,...p.ancestors],v),d)?i:u("object.assert",{subject:_,message:c})},args:["subject","schema","message"],multi:!0},instance:{method(i,u){return y(typeof i=="function","constructor must be a function"),u=u||i.name,this.$_addRule({name:"instance",args:{constructor:i,name:u}})},validate:(i,u,{constructor:d,name:p})=>i instanceof d?i:u.error("object.instance",{type:p,value:i}),args:["constructor","name"]},keys:{method(i){y(i===void 0||typeof i=="object","Object schema must be a valid object"),y(!n.isSchema(i),"Object schema cannot be a joi schema");const u=this.clone();if(i)if(Object.keys(i).length){u.$_terms.keys=u.$_terms.keys?u.$_terms.keys.filter(d=>!i.hasOwnProperty(d.key)):new s.Keys;for(const d in i)n.tryWithPath(()=>u.$_terms.keys.push({key:d,schema:this.$_compile(i[d])}),d)}else u.$_terms.keys=new s.Keys;else u.$_terms.keys=null;return u.$_mutateRebuild()}},length:{method(i){return this.$_addRule({name:"length",args:{limit:i},operator:"="})},validate:(i,u,{limit:d},{name:p,operator:_,args:v})=>n.compare(Object.keys(i).length,d,_)?i:u.error("object."+p,{limit:v.limit,value:i}),args:[{name:"limit",ref:!0,assert:n.limit,message:"must be a positive integer"}]},max:{method(i){return this.$_addRule({name:"max",method:"length",args:{limit:i},operator:"<="})}},min:{method(i){return this.$_addRule({name:"min",method:"length",args:{limit:i},operator:">="})}},nand:{method(...i){return n.verifyFlat(i,"nand"),s.dependency(this,"nand",null,i)}},or:{method(...i){return n.verifyFlat(i,"or"),s.dependency(this,"or",null,i)}},oxor:{method(...i){return s.dependency(this,"oxor",null,i)}},pattern:{method(i,u,d={}){const p=i instanceof RegExp;p||(i=this.$_compile(i,{appendPath:!0})),y(u!==void 0,"Invalid rule"),n.assertOptions(d,["fallthrough","matches"]),p&&y(!i.flags.includes("g")&&!i.flags.includes("y"),"pattern should not use global or sticky mode"),u=this.$_compile(u,{appendPath:!0});const _=this.clone();_.$_terms.patterns=_.$_terms.patterns||[];const v={[p?"regex":"schema"]:i,rule:u};return d.matches&&(v.matches=this.$_compile(d.matches),v.matches.type!=="array"&&(v.matches=v.matches.$_root.array().items(v.matches)),_.$_mutateRegister(v.matches),_.$_setFlag("_hasPatternMatch",!0,{clone:!1})),d.fallthrough&&(v.fallthrough=!0),_.$_terms.patterns.push(v),_.$_mutateRegister(u),_}},ref:{method(){return this.$_addRule("ref")},validate:(i,u)=>t.isRef(i)?i:u.error("object.refType",{value:i})},regex:{method(){return this.$_addRule("regex")},validate:(i,u)=>i instanceof RegExp?i:u.error("object.regex",{value:i})},rename:{method(i,u,d={}){y(typeof i=="string"||i instanceof RegExp,"Rename missing the from argument"),y(typeof u=="string"||u instanceof l,"Invalid rename to argument"),y(u!==i,"Cannot rename key to same name:",i),n.assertOptions(d,["alias","ignoreUndefined","override","multiple"]);const p=this.clone();p.$_terms.renames=p.$_terms.renames||[];for(const _ of p.$_terms.renames)y(_.from!==i,"Cannot rename the same key multiple times");return u instanceof l&&p.$_mutateRegister(u),p.$_terms.renames.push({from:i,to:u,options:o(s.renameDefaults,d)}),p}},schema:{method(i="any"){return this.$_addRule({name:"schema",args:{type:i}})},validate:(i,u,{type:d})=>!n.isSchema(i)||d!=="any"&&i.type!==d?u.error("object.schema",{type:d}):i},unknown:{method(i){return this.$_setFlag("unknown",i!==!1)}},with:{method(i,u,d={}){return s.dependency(this,"with",i,u,d)}},without:{method(i,u,d={}){return s.dependency(this,"without",i,u,d)}},xor:{method(...i){return n.verifyFlat(i,"xor"),s.dependency(this,"xor",null,i)}}},overrides:{default(i,u){return i===void 0&&(i=n.symbols.deepDefault),this.$_parent("default",i,u)}},rebuild(i){if(i.$_terms.keys){const u=new f.Sorter;for(const d of i.$_terms.keys)n.tryWithPath(()=>u.add(d,{after:d.schema.$_rootReferences(),group:d.key}),d.key);i.$_terms.keys=new s.Keys(...u.nodes)}},manifest:{build(i,u){if(u.keys&&(i=i.keys(u.keys)),u.dependencies)for(const{rel:d,key:p=null,peers:_,options:v}of u.dependencies)i=s.dependency(i,d,p,_,v);if(u.patterns)for(const{regex:d,schema:p,rule:_,fallthrough:v,matches:c}of u.patterns)i=i.pattern(d||p,_,{fallthrough:v,matches:c});if(u.renames)for(const{from:d,to:p,options:_}of u.renames)i=i.rename(d,p,_);return i}},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}}"}}),s.clone=function(i,u){if(typeof i=="object"){if(u.nonEnumerables)return h(i,{shallow:!0});const p=Object.create(Object.getPrototypeOf(i));return Object.assign(p,i),p}const d=function(...p){return i.apply(this,p)};return d.prototype=h(i.prototype),Object.defineProperty(d,"name",{value:i.name,writable:!1}),Object.defineProperty(d,"length",{value:i.length,writable:!1}),Object.assign(d,i),d},s.dependency=function(i,u,d,p,_){y(d===null||typeof d=="string",u,"key must be a strings"),_||(_=p.length>1&&typeof p[p.length-1]=="object"?p.pop():{}),n.assertOptions(_,["separator","isPresent"]),p=[].concat(p);const v=n.default(_.separator,"."),c=[];for(const g of p)y(typeof g=="string",u,"peers must be strings"),c.push(a.ref(g,{separator:v,ancestor:0,prefix:!1}));d!==null&&(d=a.ref(d,{separator:v,ancestor:0,prefix:!1}));const m=i.clone();return m.$_terms.dependencies=m.$_terms.dependencies||[],m.$_terms.dependencies.push(new s.Dependency(u,d,c,p,_)),m},s.dependencies={and(i,u,d,p,_){const v=[],c=[],m=u.peers.length,g=s.isPresent(u.options);for(const w of u.peers)g(w.resolve(d,p,_,null,{shadow:!1}))===!1?v.push(w.key):c.push(w.key);if(v.length!==m&&c.length!==m)return{code:"object.and",context:{present:c,presentWithLabels:s.keysToLabels(i,c),missing:v,missingWithLabels:s.keysToLabels(i,v)}}},nand(i,u,d,p,_){const v=[],c=s.isPresent(u.options);for(const w of u.peers)c(w.resolve(d,p,_,null,{shadow:!1}))&&v.push(w.key);if(v.length!==u.peers.length)return;const m=u.paths[0],g=u.paths.slice(1);return{code:"object.nand",context:{main:m,mainWithLabel:s.keysToLabels(i,m),peers:g,peersWithLabels:s.keysToLabels(i,g)}}},or(i,u,d,p,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,p,_,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:u.paths,peersWithLabels:s.keysToLabels(i,u.paths)}}},oxor(i,u,d,p,_){const v=[],c=s.isPresent(u.options);for(const g of u.peers)c(g.resolve(d,p,_,null,{shadow:!1}))&&v.push(g.key);if(!v.length||v.length===1)return;const m={peers:u.paths,peersWithLabels:s.keysToLabels(i,u.paths)};return m.present=v,m.presentWithLabels=s.keysToLabels(i,v),{code:"object.oxor",context:m}},with(i,u,d,p,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,p,_,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:u.key.key,mainWithLabel:s.keysToLabels(i,u.key.key),peer:c.key,peerWithLabel:s.keysToLabels(i,c.key)}}},without(i,u,d,p,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,p,_,null,{shadow:!1})))return{code:"object.without",context:{main:u.key.key,mainWithLabel:s.keysToLabels(i,u.key.key),peer:c.key,peerWithLabel:s.keysToLabels(i,c.key)}}},xor(i,u,d,p,_){const v=[],c=s.isPresent(u.options);for(const g of u.peers)c(g.resolve(d,p,_,null,{shadow:!1}))&&v.push(g.key);if(v.length===1)return;const m={peers:u.paths,peersWithLabels:s.keysToLabels(i,u.paths)};return v.length===0?{code:"object.missing",context:m}:(m.present=v,m.presentWithLabels=s.keysToLabels(i,v),{code:"object.xor",context:m})}},s.keysToLabels=function(i,u){return Array.isArray(u)?u.map(d=>i.$_mapLabels(d)):i.$_mapLabels(u)},s.isPresent=function(i){return typeof i.isPresent=="function"?i.isPresent:u=>u!==void 0},s.rename=function(i,u,d,p,_){const v={};for(const c of i.$_terms.renames){const m=[],g=typeof c.from!="string";if(g)for(const w in u){if(u[w]===void 0&&c.options.ignoreUndefined||w===c.to)continue;const $=c.from.exec(w);$&&m.push({from:w,to:c.to,match:$})}else!Object.prototype.hasOwnProperty.call(u,c.from)||u[c.from]===void 0&&c.options.ignoreUndefined||m.push(c);for(const w of m){const $=w.from;let j=w.to;if(j instanceof l&&(j=j.render(u,d,p,w.match)),$!==j){if(!c.options.multiple&&v[j]&&(_.push(i.$_createError("object.rename.multiple",u,{from:$,to:j,pattern:g},d,p)),p.abortEarly)||Object.prototype.hasOwnProperty.call(u,j)&&!c.options.override&&!v[j]&&(_.push(i.$_createError("object.rename.override",u,{from:$,to:j,pattern:g},d,p)),p.abortEarly))return!1;u[$]===void 0?delete u[j]:u[j]=u[$],v[j]=!0,c.options.alias||delete u[$]}}}return!0},s.unknown=function(i,u,d,p,_,v){if(i.$_terms.patterns){let c=!1;const m=i.$_terms.patterns.map(w=>{if(w.matches)return c=!0,[]}),g=[u,..._.ancestors];for(const w of d){const $=u[w],j=[..._.path,w];for(let S=0;S<i.$_terms.patterns.length;++S){const O=i.$_terms.patterns[S];if(O.regex){const P=O.regex.test(w);if(_.mainstay.tracer.debug(_,"rule",`pattern.${S}`,P?"pass":"error"),!P)continue}else if(!O.schema.$_match(w,_.nest(O.schema,`pattern.${S}`),v))continue;d.delete(w);const C=_.localize(j,g,{schema:O.rule,key:w}),I=O.rule.$_validate($,C,v);if(I.errors){if(v.abortEarly)return{value:u,errors:I.errors};p.push(...I.errors)}if(O.matches&&m[S].push(w),u[w]=I.value,!O.fallthrough)break}}if(c)for(let w=0;w<m.length;++w){const $=m[w];if(!$)continue;const j=i.$_terms.patterns[w].matches,S=_.localize(_.path,g,j),O=j.$_validate($,S,v);if(O.errors){const C=r.details(O.errors,{override:!1});C.matches=$;const I=i.$_createError("object.pattern.match",u,C,_,v);if(v.abortEarly)return{value:u,errors:I};p.push(I)}}}if(d.size&&(i.$_terms.keys||i.$_terms.patterns)){if(v.stripUnknown&&!i._flags.unknown||v.skipFunctions){const c=!(!v.stripUnknown||v.stripUnknown!==!0&&!v.stripUnknown.objects);for(const m of d)c?(delete u[m],d.delete(m)):typeof u[m]=="function"&&d.delete(m)}if(!n.default(i._flags.unknown,v.allowUnknown))for(const c of d){const m=_.localize([..._.path,c],[]),g=i.$_createError("object.unknown",u[c],{child:c},m,v,{flags:!1});if(v.abortEarly)return{value:u,errors:g};p.push(g)}}},s.Dependency=class{constructor(i,u,d,p,_){this.rel=i,this.key=u,this.peers=d,this.paths=p,this.options=_}describe(){const i={rel:this.rel,peers:this.paths};return this.key!==null&&(i.key=this.key.key),this.peers[0].separator!=="."&&(i.options={...i.options,separator:this.peers[0].separator}),this.options.isPresent&&(i.options={...i.options,isPresent:this.options.isPresent}),i}},s.Keys=class extends Array{concat(i){const u=this.slice(),d=new Map;for(let p=0;p<u.length;++p)d.set(u[p].key,p);for(const p of i){const _=p.key,v=d.get(_);v!==void 0?u[v]={key:_,schema:u[v].schema.concat(p.schema)}:u.push(p)}return u}}},8785:(k,x,b)=>{const o=b(375),y=b(8068),h=b(8160),f=b(3292),e=b(6354),n={};k.exports=y.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(a,r)=>a.ref(r),validate(a,{schema:r,state:t,prefs:l}){o(r.$_terms.link,"Uninitialized link schema");const s=n.generate(r,a,t,l),i=r.$_terms.link[0].ref;return s.$_validate(a,t.nest(s,`link:${i.display}:${s.type}`),l)},generate:(a,r,t,l)=>n.generate(a,r,t,l),rules:{ref:{method(a){o(!this.$_terms.link,"Cannot reinitialize schema"),a=f.ref(a),o(a.type==="value"||a.type==="local","Invalid reference type:",a.type),o(a.type==="local"||a.ancestor==="root"||a.ancestor>0,"Link cannot reference itself");const r=this.clone();return r.$_terms.link=[{ref:a}],r}},relative:{method(a=!0){return this.$_setFlag("relative",a)}}},overrides:{concat(a){o(this.$_terms.link,"Uninitialized link schema"),o(h.isSchema(a),"Invalid schema object"),o(a.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:a}),r.$_mutateRebuild()}},manifest:{build:(a,r)=>(o(r.link,"Invalid link description missing link"),a.ref(r.link))}}),n.generate=function(a,r,t,l){let s=t.mainstay.links.get(a);if(s)return s._generate(r,t,l).schema;const i=a.$_terms.link[0].ref,{perspective:u,path:d}=n.perspective(i,t);n.assert(u,"which is outside of schema boundaries",i,a,t,l);try{s=d.length?u.$_reach(d):u}catch{n.assert(!1,"to non-existing schema",i,a,t,l)}return n.assert(s.type!=="link","which is another link",i,a,t,l),a._flags.relative||t.mainstay.links.set(a,s),s._generate(r,t,l).schema},n.perspective=function(a,r){if(a.type==="local"){for(const{schema:t,key:l}of r.schemas){if((t._flags.id||l)===a.path[0])return{perspective:t,path:a.path.slice(1)};if(t.$_terms.shared){for(const s of t.$_terms.shared)if(s._flags.id===a.path[0])return{perspective:s,path:a.path.slice(1)}}}return{perspective:null,path:null}}return a.ancestor==="root"?{perspective:r.schemas[r.schemas.length-1].schema,path:a.path}:{perspective:r.schemas[a.ancestor]&&r.schemas[a.ancestor].schema,path:a.path}},n.assert=function(a,r,t,l,s,i){a||o(!1,`"${e.label(l._flags,s,i)}" contains link reference "${t.display}" ${r}`)}},3832:(k,x,b)=>{const o=b(375),y=b(8068),h=b(8160),f={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(e){const n=e.toString(),a=n.indexOf("."),r=n.indexOf("e");return(a<0?0:(r<0?n.length:r)-a-1)+(r<0?0:Math.max(0,-parseInt(n.slice(r+1))))}};k.exports=y.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(e,{schema:n,error:a}){if(!e.match(f.numberRx))return;e=e.trim();const r={value:parseFloat(e)};if(r.value===0&&(r.value=0),!n._flags.unsafe)if(e.match(/e/i)){if(f.extractSignificantDigits(e)!==f.extractSignificantDigits(String(r.value)))return r.errors=a("number.unsafe"),r}else{const t=r.value.toString();if(t.match(/e/i))return r;if(t!==f.normalizeDecimal(e))return r.errors=a("number.unsafe"),r}return r}},validate(e,{schema:n,error:a,prefs:r}){if(e===1/0||e===-1/0)return{value:e,errors:a("number.infinity")};if(!h.isNumber(e))return{value:e,errors:a("number.base")};const t={value:e};if(r.convert){const l=n.$_getRule("precision");if(l){const s=Math.pow(10,l.args.limit);t.value=Math.round(t.value*s)/s}}return t.value===0&&(t.value=0),!n._flags.unsafe&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.errors=a("number.unsafe")),t},rules:{compare:{method:!1,validate:(e,n,{limit:a},{name:r,operator:t,args:l})=>h.compare(e,a,t)?e:n.error("number."+r,{limit:l.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,n)=>Math.trunc(e)-e==0?e:n.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 n=typeof e=="number"?f.decimalPlaces(e):null,a=Math.pow(10,n);return this.$_addRule({name:"multiple",args:{base:e,baseDecimalPlace:n,pfactor:a}})},validate:(e,n,{base:a,baseDecimalPlace:r,pfactor:t},l)=>f.decimalPlaces(e)>r?n.error("number.multiple",{multiple:l.args.base,value:e}):Math.round(t*e)%Math.round(t*a)==0?e:n.error("number.multiple",{multiple:l.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,n)=>Number.isSafeInteger(e)&&e>=0&&e<=65535?e:n.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,n,{limit:a}){const r=e.toString().match(f.precisionRx);return Math.max((r[1]?r[1].length:0)-(r[2]?parseInt(r[2],10):0),0)<=a?e:n.error("number.precision",{limit:a,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,n,{sign:a})=>a==="negative"&&e<0||a==="positive"&&e>0?e:n.error(`number.${a}`)},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,n)=>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"}}),f.extractSignificantDigits=function(e){return e.replace(f.exponentialPartRegex,"").replace(f.dotRegex,"").replace(f.trailingZerosRegex,"").replace(f.leadingSignAndZerosRegex,"")},f.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,x,b)=>{const o=b(7824);k.exports=o.extend({type:"object",cast:{map:{from:y=>y&&typeof y=="object",to:(y,h)=>new Map(Object.entries(y))}}})},7417:(k,x,b)=>{const o=b(375),y=b(5380),h=b(1745),f=b(9959),e=b(6064),n=b(9926),a=b(5752),r=b(8068),t=b(8160),l={tlds:n instanceof Set&&{tlds:{allow:n,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:f.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(s,{schema:i,state:u,prefs:d}){const p=i.$_getRule("normalize");p&&(s=s.normalize(p.args.form));const _=i.$_getRule("case");_&&(s=_.args.direction==="upper"?s.toLocaleUpperCase():s.toLocaleLowerCase());const v=i.$_getRule("trim");if(v&&v.args.enabled&&(s=s.trim()),i.$_terms.replacements)for(const m of i.$_terms.replacements)s=s.replace(m.pattern,m.replacement);const c=i.$_getRule("hex");if(c&&c.args.options.byteAligned&&s.length%2!=0&&(s=`0${s}`),i.$_getRule("isoDate")){const m=l.isoDate(s);m&&(s=m)}if(i._flags.truncate){const m=i.$_getRule("max");if(m){let g=m.args.limit;if(t.isResolvable(g)&&(g=g.resolve(s,u,d),!t.limit(g)))return{value:s,errors:i.$_createError("any.ref",g,{ref:m.args.limit,arg:"limit",reason:"must be a positive integer"},u,d)};s=s.slice(0,g)}}return{value:s}}},validate(s,{schema:i,error:u}){if(typeof s!="string")return{value:s,errors:u("string.base")};if(s===""){const d=i.$_getRule("min");return d&&d.args.limit===0?void 0:{value:s,errors:u("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(s,i)=>/^[a-zA-Z0-9]+$/.test(s)?s:i.error("string.alphanum")},base64:{method(s={}){return t.assertOptions(s,["paddingRequired","urlSafe"]),s={urlSafe:!1,paddingRequired:!0,...s},o(typeof s.paddingRequired=="boolean","paddingRequired must be boolean"),o(typeof s.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:s}})},validate:(s,i,{options:u})=>l.base64Regex[u.paddingRequired][u.urlSafe].test(s)?s:i.error("string.base64")},case:{method(s){return o(["lower","upper"].includes(s),"Invalid case:",s),this.$_addRule({name:"case",args:{direction:s}})},validate:(s,i,{direction:u})=>u==="lower"&&s===s.toLocaleLowerCase()||u==="upper"&&s===s.toLocaleUpperCase()?s:i.error(`string.${u}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(s,i){let u=s.length,d=0,p=1;for(;u--;){const _=s.charAt(u)*p;d+=_-9*(_>9),p^=3}return d>0&&d%10==0?s:i.error("string.creditCard")}},dataUri:{method(s={}){return t.assertOptions(s,["paddingRequired"]),s={paddingRequired:!0,...s},o(typeof s.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:s}})},validate(s,i,{options:u}){const d=s.match(l.dataUriRegex);return d&&(!d[2]||d[2]!=="base64"||l.base64Regex[u.paddingRequired].false.test(d[3]))?s:i.error("string.dataUri")}},domain:{method(s){s&&t.assertOptions(s,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const i=l.addressOptions(s);return this.$_addRule({name:"domain",args:{options:s},address:i})},validate:(s,i,u,{address:d})=>y.isValid(s,d)?s:i.error("string.domain")},email:{method(s={}){t.assertOptions(s,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),o(s.multiple===void 0||typeof s.multiple=="boolean","multiple option must be an boolean");const i=l.addressOptions(s),u=new RegExp(`\\s*[${s.separator?e(s.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:s},regex:u,address:i})},validate(s,i,{options:u},{regex:d,address:p}){const _=u.multiple?s.split(d):[s],v=[];for(const c of _)h.isValid(c,p)||v.push(c);return v.length?i.error("string.email",{value:s,invalids:v}):s}},guid:{alias:"uuid",method(s={}){t.assertOptions(s,["version","separator"]);let i="";if(s.version){const p=[].concat(s.version);o(p.length>=1,"version must have at least 1 valid version specified");const _=new Set;for(let v=0;v<p.length;++v){const c=p[v];o(typeof c=="string","version at position "+v+" must be a string");const m=l.guidVersions[c.toLowerCase()];o(m,"version at position "+v+" must be one of "+Object.keys(l.guidVersions).join(", ")),o(!_.has(m),"version at position "+v+" must not be a duplicate"),i+=m,_.add(m)}}o(l.guidSeparators.has(s.separator),'separator must be one of true, false, "-", or ":"');const u=s.separator===void 0?"[:-]?":s.separator===!0?"[:-]":s.separator===!1?"[]?":`\\${s.separator}`,d=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${u})[0-9A-F]{4}\\2?[${i||"0-9A-F"}][0-9A-F]{3}\\2?[${i?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:s},regex:d})},validate(s,i,u,{regex:d}){const p=d.exec(s);return p?l.guidBrackets[p[1]]!==p[p.length-1]?i.error("string.guid"):s:i.error("string.guid")}},hex:{method(s={}){return t.assertOptions(s,["byteAligned","prefix"]),s={byteAligned:!1,prefix:!1,...s},o(typeof s.byteAligned=="boolean","byteAligned must be boolean"),o(typeof s.prefix=="boolean"||s.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:s}})},validate:(s,i,{options:u})=>(u.prefix==="optional"?l.hexRegex.withOptionalPrefix:u.prefix===!0?l.hexRegex.withPrefix:l.hexRegex.withoutPrefix).test(s)?u.byteAligned&&s.length%2!=0?i.error("string.hexAlign"):s:i.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(s,i)=>y.isValid(s,{minDomainSegments:1})||l.ipRegex.test(s)?s:i.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(s={}){t.assertOptions(s,["cidr","version"]);const{cidr:i,versions:u,regex:d}=f.regex(s),p=s.version?u:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:i,version:p}},regex:d})},validate:(s,i,{options:u},{regex:d})=>d.test(s)?s:u.version?i.error("string.ipVersion",{value:s,cidr:u.cidr,version:u.version}):i.error("string.ip",{value:s,cidr:u.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(s,{error:i})=>l.isoDate(s)?s:i("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(s,i)=>l.isoDurationRegex.test(s)?s:i.error("string.isoDuration")},length:{method(s,i){return l.length(this,"length",s,"=",i)},validate(s,i,{limit:u,encoding:d},{name:p,operator:_,args:v}){const c=!d&&s.length;return t.compare(c,u,_)?s:i.error("string."+p,{limit:v.limit,value:s,encoding:d})},args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(s,i){return l.length(this,"max",s,"<=",i)},args:["limit","encoding"]},min:{method(s,i){return l.length(this,"min",s,">=",i)},args:["limit","encoding"]},normalize:{method(s="NFC"){return o(l.normalizationForms.includes(s),"normalization form must be one of "+l.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:s}})},validate:(s,{error:i},{form:u})=>s===s.normalize(u)?s:i("string.normalize",{value:s,form:u}),convert:!0},pattern:{alias:"regex",method(s,i={}){o(s instanceof RegExp,"regex must be a RegExp"),o(!s.flags.includes("g")&&!s.flags.includes("y"),"regex should not use global or sticky mode"),typeof i=="string"&&(i={name:i}),t.assertOptions(i,["invert","name"]);const u=["string.pattern",i.invert?".invert":"",i.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:s,options:i},errorCode:u})},validate:(s,i,{regex:u,options:d},{errorCode:p})=>u.test(s)^d.invert?s:i.error(p,{name:d.name,regex:u,value:s}),args:["regex","options"],multi:!0},replace:{method(s,i){typeof s=="string"&&(s=new RegExp(e(s),"g")),o(s instanceof RegExp,"pattern must be a RegExp"),o(typeof i=="string","replacement must be a String");const u=this.clone();return u.$_terms.replacements||(u.$_terms.replacements=[]),u.$_terms.replacements.push({pattern:s,replacement:i}),u}},token:{method(){return this.$_addRule("token")},validate:(s,i)=>/^\w+$/.test(s)?s:i.error("string.token")},trim:{method(s=!0){return o(typeof s=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:s}})},validate:(s,i,{enabled:u})=>u&&s!==s.trim()?i.error("string.trim"):s,convert:!0},truncate:{method(s=!0){return o(typeof s=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",s)}},uppercase:{method(){return this.case("upper")}},uri:{method(s={}){t.assertOptions(s,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),s.domain&&t.assertOptions(s.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:i,scheme:u}=a.regex(s),d=s.domain?l.addressOptions(s.domain):null;return this.$_addRule({name:"uri",args:{options:s},regex:i,domain:d,scheme:u})},validate(s,i,{options:u},{regex:d,domain:p,scheme:_}){if(["http:/","https:/"].includes(s))return i.error("string.uri");const v=d.exec(s);if(v){const c=v[1]||v[2];return!p||u.allowRelative&&!c||y.isValid(c,p)?s:i.error("string.domain",{value:c})}return u.relativeOnly?i.error("string.uriRelativeOnly"):u.scheme?i.error("string.uriCustomScheme",{scheme:_,value:s}):i.error("string.uri")}}},manifest:{build(s,i){if(i.replacements)for(const{pattern:u,replacement:d}of i.replacements)s=s.replace(u,d);return s}},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"}}),l.addressOptions=function(s){if(!s)return l.tlds||s;if(o(s.minDomainSegments===void 0||Number.isSafeInteger(s.minDomainSegments)&&s.minDomainSegments>0,"minDomainSegments must be a positive integer"),o(s.maxDomainSegments===void 0||Number.isSafeInteger(s.maxDomainSegments)&&s.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),s.tlds===!1)return s;if(s.tlds===!0||s.tlds===void 0)return o(l.tlds,"Built-in TLD list disabled"),Object.assign({},s,l.tlds);o(typeof s.tlds=="object","tlds must be true, false, or an object");const i=s.tlds.deny;if(i)return Array.isArray(i)&&(s=Object.assign({},s,{tlds:{deny:new Set(i)}})),o(s.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),o(!s.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),l.validateTlds(s.tlds.deny,"tlds.deny"),s;const u=s.tlds.allow;return u?u===!0?(o(l.tlds,"Built-in TLD list disabled"),Object.assign({},s,l.tlds)):(Array.isArray(u)&&(s=Object.assign({},s,{tlds:{allow:new Set(u)}})),o(s.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),l.validateTlds(s.tlds.allow,"tlds.allow"),s):s},l.validateTlds=function(s,i){for(const u of s)o(y.isValid(u,{minDomainSegments:1,maxDomainSegments:1}),`${i} must contain valid top level domain names`)},l.isoDate=function(s){if(!t.isIsoDate(s))return null;/.*T.*[+-]\d\d$/.test(s)&&(s+="00");const i=new Date(s);return isNaN(i.getTime())?null:i.toISOString()},l.length=function(s,i,u,d,p){return o(!p||!1,"Invalid encoding:",p),s.$_addRule({name:i,method:"length",args:{limit:u,encoding:p},operator:d})}},8826:(k,x,b)=>{const o=b(375),y=b(8068),h={};h.Map=class extends Map{slice(){return new h.Map(this)}},k.exports=y.extend({type:"symbol",terms:{map:{init:new h.Map}},coerce:{method(f,{schema:e,error:n}){const a=e.$_terms.map.get(f);return a&&(f=a),e._flags.only&&typeof f!="symbol"?{value:f,errors:n("symbol.map",{map:e.$_terms.map})}:{value:f}}},validate(f,{error:e}){if(typeof f!="symbol")return{value:f,errors:e("symbol.base")}},rules:{map:{method(f){f&&!f[Symbol.iterator]&&typeof f=="object"&&(f=Object.entries(f)),o(f&&f[Symbol.iterator],"Iterable must be an iterable or object");const e=this.clone(),n=[];for(const a of f){o(a&&a[Symbol.iterator],"Entry must be an iterable");const[r,t]=a;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),n.push(t)}return e.valid(...n)}}},manifest:{build:(f,e)=>(e.map&&(f=f.map(e.map)),f)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(k,x,b)=>{const o=b(375),y=b(8571),h=b(738),f=b(9621),e=b(8160),n=b(6354),a=b(493),r={result:Symbol("result")};x.entry=function(t,l,s){let i=e.defaults;s&&(o(s.warnings===void 0,"Cannot override warnings preference in synchronous validation"),o(s.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),i=e.preferences(e.defaults,s));const u=r.entry(t,l,i);o(!u.mainstay.externals.length,"Schema with external rules must use validateAsync()");const d={value:u.value};return u.error&&(d.error=u.error),u.mainstay.warnings.length&&(d.warning=n.details(u.mainstay.warnings)),u.mainstay.debug&&(d.debug=u.mainstay.debug),u.mainstay.artifacts&&(d.artifacts=u.mainstay.artifacts),d},x.entryAsync=async function(t,l,s){let i=e.defaults;s&&(i=e.preferences(e.defaults,s));const u=r.entry(t,l,i),d=u.mainstay;if(u.error)throw d.debug&&(u.error.debug=d.debug),u.error;if(d.externals.length){let _=u.value;const v=[];for(const c of d.externals){const m=c.state.path,g=c.schema.type==="link"?d.links.get(c.schema):null;let w,$,j=_;const S=m.length?[_]:[],O=m.length?f(t,m):t;if(m.length){w=m[m.length-1];let C=_;for(const I of m.slice(0,-1))C=C[I],S.unshift(C);$=S[0],j=$[w]}try{const C=(P,q)=>(g||c.schema).$_createError(P,j,q,c.state,i),I=await c.method(j,{schema:c.schema,linked:g,state:c.state,prefs:s,original:O,error:C,errorsArray:r.errorsArray,warn:(P,q)=>d.warnings.push((g||c.schema).$_createError(P,j,q,c.state,i)),message:(P,q)=>(g||c.schema).$_createError("external",j,q,c.state,i,{messages:P})});if(I===void 0||I===j)continue;if(I instanceof n.Report){if(d.tracer.log(c.schema,c.state,"rule","external","error"),v.push(I),i.abortEarly)break;continue}if(Array.isArray(I)&&I[e.symbols.errors]){if(d.tracer.log(c.schema,c.state,"rule","external","error"),v.push(...I),i.abortEarly)break;continue}$?(d.tracer.value(c.state,"rule",j,I,"external"),$[w]=I):(d.tracer.value(c.state,"rule",_,I,"external"),_=I)}catch(C){throw i.errors.label&&(C.message+=` (${c.label})`),C}}if(u.value=_,v.length)throw u.error=n.process(v,t,i),d.debug&&(u.error.debug=d.debug),u.error}if(!i.warnings&&!i.debug&&!i.artifacts)return u.value;const p={value:u.value};return d.warnings.length&&(p.warning=n.details(d.warnings)),d.debug&&(p.debug=d.debug),d.artifacts&&(p.artifacts=d.artifacts),p},r.Mainstay=class{constructor(t,l,s){this.externals=[],this.warnings=[],this.tracer=t,this.debug=l,this.links=s,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,l,s){const{tracer:i,cleanup:u}=r.tracer(l,s),d=s.debug?[]:null,p=l._ids._schemaChain?new Map:null,_=new r.Mainstay(i,d,p),v=l._ids._schemaChain?[{schema:l}]:null,c=new a([],[],{mainstay:_,schemas:v}),m=x.validate(t,l,c,s);u&&l.$_root.untrace();const g=n.process(m.errors,t,s);return{value:m.value,error:g,mainstay:_}},r.tracer=function(t,l){return t.$_root._tracer?{tracer:t.$_root._tracer._register(t)}:l.debug?(o(t.$_root.trace,"Debug mode not supported"),{tracer:t.$_root.trace()._register(t),cleanup:!0}):{tracer:r.ignore}},x.validate=function(t,l,s,i,u={}){if(l.$_terms.whens&&(l=l._generate(t,s,i).schema),l._preferences&&(i=r.prefs(l,i)),l._cache&&i.cache){const g=l._cache.get(t);if(s.mainstay.tracer.debug(s,"validate","cached",!!g),g)return g}const d=(g,w,$)=>l.$_createError(g,t,w,$||s,i),p={original:t,prefs:i,schema:l,state:s,error:d,errorsArray:r.errorsArray,warn:(g,w,$)=>s.mainstay.warnings.push(d(g,w,$)),message:(g,w)=>l.$_createError("custom",t,w,s,i,{messages:g})};s.mainstay.tracer.entry(l,s);const _=l._definition;if(_.prepare&&t!==void 0&&i.convert){const g=_.prepare(t,p);if(g){if(s.mainstay.tracer.value(s,"prepare",t,g.value),g.errors)return r.finalize(g.value,[].concat(g.errors),p);t=g.value}}if(_.coerce&&t!==void 0&&i.convert&&(!_.coerce.from||_.coerce.from.includes(typeof t))){const g=_.coerce.method(t,p);if(g){if(s.mainstay.tracer.value(s,"coerced",t,g.value),g.errors)return r.finalize(g.value,[].concat(g.errors),p);t=g.value}}const v=l._flags.empty;v&&v.$_match(r.trim(t,l),s.nest(v),e.defaults)&&(s.mainstay.tracer.value(s,"empty",t,void 0),t=void 0);const c=u.presence||l._flags.presence||(l._flags._endedSwitch?null:i.presence);if(t===void 0){if(c==="forbidden")return r.finalize(t,null,p);if(c==="required")return r.finalize(t,[l.$_createError("any.required",t,null,s,i)],p);if(c==="optional"){if(l._flags.default!==e.symbols.deepDefault)return r.finalize(t,null,p);s.mainstay.tracer.value(s,"default",t,{}),t={}}}else if(c==="forbidden")return r.finalize(t,[l.$_createError("any.unknown",t,null,s,i)],p);const m=[];if(l._valids){const g=l._valids.get(t,s,i,l._flags.insensitive);if(g)return i.convert&&(s.mainstay.tracer.value(s,"valids",t,g.value),t=g.value),s.mainstay.tracer.filter(l,s,"valid",g),r.finalize(t,null,p);if(l._flags.only){const w=l.$_createError("any.only",t,{valids:l._valids.values({display:!0})},s,i);if(i.abortEarly)return r.finalize(t,[w],p);m.push(w)}}if(l._invalids){const g=l._invalids.get(t,s,i,l._flags.insensitive);if(g){s.mainstay.tracer.filter(l,s,"invalid",g);const w=l.$_createError("any.invalid",t,{invalids:l._invalids.values({display:!0})},s,i);if(i.abortEarly)return r.finalize(t,[w],p);m.push(w)}}if(_.validate){const g=_.validate(t,p);if(g&&(s.mainstay.tracer.value(s,"base",t,g.value),t=g.value,g.errors)){if(!Array.isArray(g.errors))return m.push(g.errors),r.finalize(t,m,p);if(g.errors.length)return m.push(...g.errors),r.finalize(t,m,p)}}return l._rules.length?r.rules(t,m,p):r.finalize(t,m,p)},r.rules=function(t,l,s){const{schema:i,state:u,prefs:d}=s;for(const p of i._rules){const _=i._definition.rules[p.method];if(_.convert&&d.convert){u.mainstay.tracer.log(i,u,"rule",p.name,"full");continue}let v,c=p.args;if(p._resolve.length){c=Object.assign({},c);for(const g of p._resolve){const w=_.argsByName.get(g),$=c[g].resolve(t,u,d),j=w.normalize?w.normalize($):$,S=e.validateArg(j,null,w);if(S){v=i.$_createError("any.ref",$,{arg:g,ref:c[g],reason:S},u,d);break}c[g]=j}}v=v||_.validate(t,s,c,p);const m=r.rule(v,p);if(m.errors){if(u.mainstay.tracer.log(i,u,"rule",p.name,"error"),p.warn){u.mainstay.warnings.push(...m.errors);continue}if(d.abortEarly)return r.finalize(t,m.errors,s);l.push(...m.errors)}else u.mainstay.tracer.log(i,u,"rule",p.name,"pass"),u.mainstay.tracer.value(u,"rule",t,m.value,p.name),t=m.value}return r.finalize(t,l,s)},r.rule=function(t,l){return t instanceof n.Report?(r.error(t,l),{errors:[t],value:null}):Array.isArray(t)&&t[e.symbols.errors]?(t.forEach(s=>r.error(s,l)),{errors:t,value:null}):{errors:null,value:t}},r.error=function(t,l){return l.message&&t._setTemplate(l.message),t},r.finalize=function(t,l,s){l=l||[];const{schema:i,state:u,prefs:d}=s;if(l.length){const _=r.default("failover",void 0,l,s);_!==void 0&&(u.mainstay.tracer.value(u,"failover",t,_),t=_,l=[])}if(l.length&&i._flags.error)if(typeof i._flags.error=="function"){l=i._flags.error(l),Array.isArray(l)||(l=[l]);for(const _ of l)o(_ instanceof Error||_ instanceof n.Report,"error() must return an Error object")}else l=[i._flags.error];if(t===void 0){const _=r.default("default",t,l,s);u.mainstay.tracer.value(u,"default",t,_),t=_}if(i._flags.cast&&t!==void 0){const _=i._definition.cast[i._flags.cast];if(_.from(t)){const v=_.to(t,s);u.mainstay.tracer.value(u,"cast",t,v,i._flags.cast),t=v}}if(i.$_terms.externals&&d.externals&&d._externals!==!1)for(const{method:_}of i.$_terms.externals)u.mainstay.externals.push({method:_,schema:i,state:u,label:n.label(i._flags,u,d)});const p={value:t,errors:l.length?l:null};return i._flags.result&&(p.value=i._flags.result==="strip"?void 0:s.original,u.mainstay.tracer.value(u,i._flags.result,t,p.value),u.shadow(t,i._flags.result)),i._cache&&d.cache!==!1&&!i._refs.length&&i._cache.set(s.original,p),t===void 0||p.errors||i._flags.artifact===void 0||(u.mainstay.artifacts=u.mainstay.artifacts||new Map,u.mainstay.artifacts.has(i._flags.artifact)||u.mainstay.artifacts.set(i._flags.artifact,[]),u.mainstay.artifacts.get(i._flags.artifact).push(u.path)),p},r.prefs=function(t,l){const s=l===e.defaults;return s&&t._preferences[e.symbols.prefs]?t._preferences[e.symbols.prefs]:(l=e.preferences(l,t._preferences),s&&(t._preferences[e.symbols.prefs]=l),l)},r.default=function(t,l,s,i){const{schema:u,state:d,prefs:p}=i,_=u._flags[t];if(p.noDefaults||_===void 0)return l;if(d.mainstay.tracer.log(u,d,"rule",t,"full"),!_)return _;if(typeof _=="function"){const v=_.length?[y(d.ancestors[0]),i]:[];try{return _(...v)}catch(c){return void s.push(u.$_createError(`any.${t}`,null,{error:c},d,p))}}return typeof _!="object"?_:_[e.symbols.literal]?_.literal:e.isResolvable(_)?_.resolve(l,d,p):y(_)},r.trim=function(t,l){if(typeof t!="string")return t;const s=l.$_getRule("trim");return s&&s.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,x,b)=>{const o=b(375),y=b(9474),h=b(8160),f={};k.exports=f.Values=class{constructor(e,n){this._values=new Set(e),this._refs=new Set(n),this._lowercase=f.lowercases(e),this._override=!1}get length(){return this._values.size+this._refs.size}add(e,n){h.isResolvable(e)?this._refs.has(e)||(this._refs.add(e),n&&n.register(e)):this.has(e,null,null,!1)||(this._values.add(e),typeof e=="string"&&this._lowercase.set(e.toLowerCase(),e))}static merge(e,n,a){if(e=e||new f.Values,n){if(n._override)return n.clone();for(const r of[...n._values,...n._refs])e.add(r)}if(a)for(const r of[...a._values,...a._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,n,a,r){return!!this.get(e,n,a,r)}get(e,n,a,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(y(t,e))return{value:t}}if(n)for(const t of this._refs){const l=t.resolve(e,n,a,null,{in:!0});if(l===void 0)continue;const s=t.in&&typeof l=="object"?Array.isArray(l)?l:Object.keys(l):[l];for(const i of s)if(typeof i==typeof e){if(r&&e&&typeof e=="string"){if(i.toLowerCase()===e.toLowerCase())return{value:i,ref:t}}else if(y(i,e))return{value:i,ref:t}}}return!1}override(){this._override=!0}values(e){if(e&&e.display){const n=[];for(const a of[...this._values,...this._refs])a!==void 0&&n.push(a);return n}return Array.from([...this._values,...this._refs])}clone(){const e=new f.Values(this._values,this._refs);return e._override=this._override,e}concat(e){o(!e._override,"Cannot concat override set of values");const n=new f.Values([...this._values,...e._values],[...this._refs,...e._refs]);return n._override=this._override,n}describe(){const e=[];this._override&&e.push({override:!0});for(const n of this._values.values())e.push(n&&typeof n=="object"?{value:n}:n);for(const n of this._refs.values())e.push(n.describe());return e}},f.Values.prototype[h.symbols.values]=!0,f.Values.prototype.slice=f.Values.prototype.clone,f.lowercases=function(e){const n=new Map;if(e)for(const a of e)typeof a=="string"&&n.set(a.toLowerCase(),a);return n}},978:(k,x,b)=>{const o=b(375),y=b(8571),h=b(1687),f=b(9621),e={};k.exports=function(n,a,r={}){if(o(n&&typeof n=="object","Invalid defaults value: must be an object"),o(!a||a===!0||typeof a=="object","Invalid source value: must be true, falsy or an object"),o(typeof r=="object","Invalid options: must be an object"),!a)return null;if(r.shallow)return e.applyToDefaultsWithShallow(n,a,r);const t=y(n);if(a===!0)return t;const l=r.nullOverride!==void 0&&r.nullOverride;return h(t,a,{nullOverride:l,mergeArrays:!1})},e.applyToDefaultsWithShallow=function(n,a,r){const t=r.shallow;o(Array.isArray(t),"Invalid keys");const l=new Map,s=a===!0?null:new Set;for(let d of t){d=Array.isArray(d)?d:d.split(".");const p=f(n,d);p&&typeof p=="object"?l.set(p,s&&f(a,d)||p):s&&s.add(d)}const i=y(n,{},l);if(!s)return i;for(const d of s)e.reachCopy(i,a,d);const u=r.nullOverride!==void 0&&r.nullOverride;return h(i,a,{nullOverride:u,mergeArrays:!1})},e.reachCopy=function(n,a,r){for(const s of r){if(!(s in a))return;const i=a[s];if(typeof i!="object"||i===null)return;a=i}const t=a;let l=n;for(let s=0;s<r.length-1;++s){const i=r[s];typeof l[i]!="object"&&(l[i]={}),l=l[i]}l[r[r.length-1]]=t}},375:(k,x,b)=>{const o=b(7916);k.exports=function(y,...h){if(!y)throw h.length===1&&h[0]instanceof Error?h[0]:new o(h)}},8571:(k,x,b)=>{const o=b(9621),y=b(4277),h=b(7043),f={needsProtoHack:new Set([y.set,y.map,y.weakSet,y.weakMap])};k.exports=f.clone=function(e,n={},a=null){if(typeof e!="object"||e===null)return e;let r=f.clone,t=a;if(n.shallow){if(n.shallow!==!0)return f.cloneWithShallow(e,n);r=u=>u}else if(t){const u=t.get(e);if(u)return u}else t=new Map;const l=y.getInternalProto(e);if(l===y.buffer)return!1;if(l===y.date)return new Date(e.getTime());if(l===y.regex)return new RegExp(e);const s=f.base(e,l,n);if(s===e)return e;if(t&&t.set(e,s),l===y.set)for(const u of e)s.add(r(u,n,t));else if(l===y.map)for(const[u,d]of e)s.set(u,r(d,n,t));const i=h.keys(e,n);for(const u of i){if(u==="__proto__")continue;if(l===y.array&&u==="length"){s.length=e.length;continue}const d=Object.getOwnPropertyDescriptor(e,u);d?d.get||d.set?Object.defineProperty(s,u,d):d.enumerable?s[u]=r(e[u],n,t):Object.defineProperty(s,u,{enumerable:!1,writable:!0,configurable:!0,value:r(e[u],n,t)}):Object.defineProperty(s,u,{enumerable:!0,writable:!0,configurable:!0,value:r(e[u],n,t)})}return s},f.cloneWithShallow=function(e,n){const a=n.shallow;(n=Object.assign({},n)).shallow=!1;const r=new Map;for(const t of a){const l=o(e,t);typeof l!="object"&&typeof l!="function"||r.set(l,l)}return f.clone(e,n,r)},f.base=function(e,n,a){if(a.prototype===!1)return f.needsProtoHack.has(n)?new n.constructor:n===y.array?[]:{};const r=Object.getPrototypeOf(e);if(r&&r.isImmutable)return e;if(n===y.array){const t=[];return r!==n&&Object.setPrototypeOf(t,r),t}if(f.needsProtoHack.has(n)){const t=new r.constructor;return r!==n&&Object.setPrototypeOf(t,r),t}return Object.create(r)}},9474:(k,x,b)=>{const o=b(4277),y={mismatched:null};k.exports=function(h,f,e){return e=Object.assign({prototype:!0},e),!!y.isDeepEqual(h,f,e,[])},y.isDeepEqual=function(h,f,e,n){if(h===f)return h!==0||1/h==1/f;const a=typeof h;if(a!==typeof f||h===null||f===null)return!1;if(a==="function"){if(!e.deepFunction||h.toString()!==f.toString())return!1}else if(a!=="object")return h!=h&&f!=f;const r=y.getSharedType(h,f,!!e.prototype);switch(r){case o.buffer:return!1;case o.promise:return h===f;case o.regex:return h.toString()===f.toString();case y.mismatched:return!1}for(let t=n.length-1;t>=0;--t)if(n[t].isSame(h,f))return!0;n.push(new y.SeenEntry(h,f));try{return!!y.isDeepEqualObj(r,h,f,e,n)}finally{n.pop()}},y.getSharedType=function(h,f,e){if(e)return Object.getPrototypeOf(h)!==Object.getPrototypeOf(f)?y.mismatched:o.getInternalProto(h);const n=o.getInternalProto(h);return n!==o.getInternalProto(f)?y.mismatched:n},y.valueOf=function(h){const f=h.valueOf;if(f===void 0)return h;try{return f.call(h)}catch(e){return e}},y.hasOwnEnumerableProperty=function(h,f){return Object.prototype.propertyIsEnumerable.call(h,f)},y.isSetSimpleEqual=function(h,f){for(const e of Set.prototype.values.call(h))if(!Set.prototype.has.call(f,e))return!1;return!0},y.isDeepEqualObj=function(h,f,e,n,a){const{isDeepEqual:r,valueOf:t,hasOwnEnumerableProperty:l}=y,{keys:s,getOwnPropertySymbols:i}=Object;if(h===o.array){if(!n.part){if(f.length!==e.length)return!1;for(let v=0;v<f.length;++v)if(!r(f[v],e[v],n,a))return!1;return!0}for(const v of f)for(const c of e)if(r(v,c,n,a))return!0}else if(h===o.set){if(f.size!==e.size)return!1;if(!y.isSetSimpleEqual(f,e)){const v=new Set(Set.prototype.values.call(e));for(const c of Set.prototype.values.call(f)){if(v.delete(c))continue;let m=!1;for(const g of v)if(r(c,g,n,a)){v.delete(g),m=!0;break}if(!m)return!1}}}else if(h===o.map){if(f.size!==e.size)return!1;for(const[v,c]of Map.prototype.entries.call(f))if(c===void 0&&!Map.prototype.has.call(e,v)||!r(c,Map.prototype.get.call(e,v),n,a))return!1}else if(h===o.error&&(f.name!==e.name||f.message!==e.message))return!1;const u=t(f),d=t(e);if((f!==u||e!==d)&&!r(u,d,n,a))return!1;const p=s(f);if(!n.part&&p.length!==s(e).length&&!n.skip)return!1;let _=0;for(const v of p)if(n.skip&&n.skip.includes(v))e[v]===void 0&&++_;else if(!l(e,v)||!r(f[v],e[v],n,a))return!1;if(!n.part&&p.length-_!==s(e).length)return!1;if(n.symbols!==!1){const v=i(f),c=new Set(i(e));for(const m of v){if(!n.skip||!n.skip.includes(m)){if(l(f,m)){if(!l(e,m)||!r(f[m],e[m],n,a))return!1}else if(l(e,m))return!1}c.delete(m)}for(const m of c)if(l(e,m))return!1}return!0},y.SeenEntry=class{constructor(h,f){this.obj=h,this.ref=f}isSame(h,f){return this.obj===h&&this.ref===f}}},7916:(k,x,b)=>{const o=b(8761);k.exports=class extends Error{constructor(y){super(y.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,x.assert)}}},5277:k=>{const x={};k.exports=function(b){if(!b)return"";let o="";for(let y=0;y<b.length;++y){const h=b.charCodeAt(y);x.isSafe(h)?o+=b[y]:o+=x.escapeHtmlChar(h)}return o},x.escapeHtmlChar=function(b){return x.namedHtml.get(b)||(b>=256?"&#"+b+";":`&#x${b.toString(16).padStart(2,"0")};`)},x.isSafe=function(b){return x.safeCharCodes.has(b)},x.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),x.safeCharCodes=function(){const b=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)&&b.add(o);return b}()},6064:k=>{k.exports=function(x){return x.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:k=>{k.exports=function(){}},1687:(k,x,b)=>{const o=b(375),y=b(8571),h=b(7043),f={};k.exports=f.merge=function(e,n,a){if(o(e&&typeof e=="object","Invalid target value: must be an object"),o(n==null||typeof n=="object","Invalid source value: must be null, undefined, or an object"),!n)return e;if(a=Object.assign({nullOverride:!0,mergeArrays:!0},a),Array.isArray(n)){o(Array.isArray(e),"Cannot merge array onto an object"),a.mergeArrays||(e.length=0);for(let t=0;t<n.length;++t)e.push(y(n[t],{symbols:a.symbols}));return e}const r=h.keys(n,a);for(let t=0;t<r.length;++t){const l=r[t];if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,l))continue;const s=n[l];if(s&&typeof s=="object"){if(e[l]===s)continue;!e[l]||typeof e[l]!="object"||Array.isArray(e[l])!==Array.isArray(s)||s instanceof Date||s instanceof RegExp?e[l]=y(s,{symbols:a.symbols}):f.merge(e[l],s,a)}else(s!=null||a.nullOverride)&&(e[l]=s)}return e}},9621:(k,x,b)=>{const o=b(375),y={};k.exports=function(h,f,e){if(f===!1||f==null)return h;typeof(e=e||{})=="string"&&(e={separator:e});const n=Array.isArray(f);o(!n||!e.separator,"Separator option is not valid for array-based chain");const a=n?f:f.split(e.separator||".");let r=h;for(let t=0;t<a.length;++t){let l=a[t];const s=e.iterables&&y.iterables(r);if(Array.isArray(r)||s==="set"){const i=Number(l);Number.isInteger(i)&&(l=i<0?r.length+i:i)}if(!r||typeof r=="function"&&e.functions===!1||!s&&r[l]===void 0){o(!e.strict||t+1===a.length,"Missing segment",l,"in reach path ",f),o(typeof r=="object"||e.functions===!0||typeof r!="function","Invalid segment",l,"in reach path ",f),r=e.default;break}r=s?s==="set"?[...r][l]:r.get(l):r[l]}return r},y.iterables=function(h){return h instanceof Set?"set":h instanceof Map?"map":void 0}},8761:k=>{k.exports=function(...x){try{return JSON.stringify(...x)}catch(b){return"[Cannot display object: "+b.message+"]"}}},4277:(k,x)=>{const b={};x=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},b.typeMap=new Map([["[object Error]",x.error],["[object Map]",x.map],["[object Promise]",x.promise],["[object Set]",x.set],["[object WeakMap]",x.weakMap],["[object WeakSet]",x.weakSet]]),x.getInternalProto=function(o){if(Array.isArray(o))return x.array;if(o instanceof Date)return x.date;if(o instanceof RegExp)return x.regex;if(o instanceof Error)return x.error;const y=Object.prototype.toString.call(o);return b.typeMap.get(y)||x.generic}},7043:(k,x)=>{x.keys=function(b,o={}){return o.symbols!==!1?Reflect.ownKeys(b):Object.getOwnPropertyNames(b)}},3652:(k,x,b)=>{const o=b(375),y={};x.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(h,f){const e=[].concat((f=f||{}).before||[]),n=[].concat(f.after||[]),a=f.group||"?",r=f.sort||0;o(!e.includes(a),`Item cannot come before itself: ${a}`),o(!e.includes("?"),"Item cannot come before unassociated items"),o(!n.includes(a),`Item cannot come after itself: ${a}`),o(!n.includes("?"),"Item cannot come after unassociated items"),Array.isArray(h)||(h=[h]);for(const t of h){const l={seq:this._items.length,sort:r,before:e,after:n,group:a,node:t};this._items.push(l)}if(!f.manual){const t=this._sort();o(t,"item",a!=="?"?`added into group ${a}`:"","created a dependencies error")}return this.nodes}merge(h){Array.isArray(h)||(h=[h]);for(const e of h)if(e)for(const n of e._items)this._items.push(Object.assign({},n));this._items.sort(y.mergeSort);for(let e=0;e<this._items.length;++e)this._items[e].seq=e;const f=this._sort();return o(f,"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={},f=Object.create(null),e=Object.create(null);for(const l of this._items){const s=l.seq,i=l.group;e[i]=e[i]||[],e[i].push(s),h[s]=l.before;for(const u of l.after)f[u]=f[u]||[],f[u].push(s)}for(const l in h){const s=[];for(const i in h[l]){const u=h[l][i];e[u]=e[u]||[],s.push(...e[u])}h[l]=s}for(const l in f)if(e[l])for(const s of e[l])h[s].push(...f[l]);const n={};for(const l in h){const s=h[l];for(const i of s)n[i]=n[i]||[],n[i].push(l)}const a={},r=[];for(let l=0;l<this._items.length;++l){let s=l;if(n[l]){s=null;for(let i=0;i<this._items.length;++i){if(a[i]===!0)continue;n[i]||(n[i]=[]);const u=n[i].length;let d=0;for(let p=0;p<u;++p)a[n[i][p]]&&++d;if(d===u){s=i;break}}}s!==null&&(a[s]=!0,r.push(s))}if(r.length!==this._items.length)return!1;const t={};for(const l of this._items)t[l.seq]=l;this._items=[],this.nodes=[];for(const l of r){const s=t[l];this.nodes.push(s.node),this._items.push(s)}return!0}},y.mergeSort=(h,f)=>h.sort===f.sort?0:h.sort<f.sort?-1:1},5380:(k,x,b)=>{const o=b(443),y=b(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};x.analyze=function(f,e={}){if(!f)return y.code("DOMAIN_NON_EMPTY_STRING");if(typeof f!="string")throw new Error("Invalid input: domain must be a string");if(f.length>256)return y.code("DOMAIN_TOO_LONG");if(h.nonAsciiRx.test(f)){if(e.allowUnicode===!1)return y.code("DOMAIN_INVALID_UNICODE_CHARS");f=f.normalize("NFC")}if(h.domainControlRx.test(f))return y.code("DOMAIN_INVALID_CHARS");f=h.punycode(f),e.allowFullyQualified&&f[f.length-1]==="."&&(f=f.slice(0,-1));const n=e.minDomainSegments||h.minDomainSegments,a=f.split(".");if(a.length<n)return y.code("DOMAIN_SEGMENTS_COUNT");if(e.maxDomainSegments&&a.length>e.maxDomainSegments)return y.code("DOMAIN_SEGMENTS_COUNT_MAX");const r=e.tlds;if(r){const t=a[a.length-1].toLowerCase();if(r.deny&&r.deny.has(t)||r.allow&&!r.allow.has(t))return y.code("DOMAIN_FORBIDDEN_TLDS")}for(let t=0;t<a.length;++t){const l=a[t];if(!l.length)return y.code("DOMAIN_EMPTY_SEGMENT");if(l.length>63)return y.code("DOMAIN_LONG_SEGMENT");if(t<a.length-1){if(!h.domainSegmentRx.test(l))return y.code("DOMAIN_INVALID_CHARS")}else if(!h.tldSegmentRx.test(l))return y.code("DOMAIN_INVALID_TLDS_CHARS")}return null},x.isValid=function(f,e){return!x.analyze(f,e)},h.punycode=function(f){f.includes("%")&&(f=f.replace(/%/g,"%25"));try{return new h.URL(`http://${f}`).host}catch{return f}}},1745:(k,x,b)=>{const o=b(9848),y=b(5380),h=b(2178),f={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(o.TextEncoder||TextEncoder)};x.analyze=function(e,n){return f.email(e,n)},x.isValid=function(e,n){return!f.email(e,n)},f.email=function(e,n={}){if(typeof e!="string")throw new Error("Invalid input: email must be a string");if(!e)return h.code("EMPTY_STRING");const a=!f.nonAsciiRx.test(e);if(!a){if(n.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,l]=r;if(!t)return h.code("EMPTY_LOCAL");if(!n.ignoreLength){if(e.length>254)return h.code("ADDRESS_TOO_LONG");if(f.encoder.encode(t).length>64)return h.code("LOCAL_TOO_LONG")}return f.local(t,a)||y.analyze(l,n)},f.local=function(e,n){const a=e.split(".");for(const r of a){if(!r.length)return h.code("EMPTY_LOCAL_SEGMENT");if(n){if(!f.atextRx.test(r))return h.code("INVALID_LOCAL_CHARS")}else for(const t of r){if(f.atextRx.test(t))continue;const l=f.binary(t);if(!f.atomRx.test(l))return h.code("INVALID_LOCAL_CHARS")}}},f.binary=function(e){return Array.from(f.encoder.encode(e)).map(n=>String.fromCharCode(n)).join("")},f.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,f.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,x)=>{x.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"},x.code=function(b){return{code:b,error:x.codes[b]}}},9959:(k,x,b)=>{const o=b(375),y=b(5752);x.regex=function(h={}){o(h.cidr===void 0||typeof h.cidr=="string","options.cidr must be a string");const f=h.cidr?h.cidr.toLowerCase():"optional";o(["required","optional","forbidden"].includes(f),"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 n=`(?:${e.map(r=>{if(f==="forbidden")return y.ip[r];const t=`\\/${r==="ipv4"?y.ip.v4Cidr:y.ip.v6Cidr}`;return f==="required"?`${y.ip[r]}${t}`:`${y.ip[r]}(?:${t})?`}).join("|")})`,a=new RegExp(`^${n}$`);return{cidr:f,versions:e,regex:a,raw:n}}},5752:(k,x,b)=>{const o=b(375),y=b(6064),h={generate:function(){const f={},e="\\dA-Fa-f",n="["+e+"]",a="\\w-\\.~",r="!\\$&'\\(\\)\\*\\+,;=",t="%"+e,l=a+t+r+":@",s="["+l+"]",i="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";f.ipv4address="(?:"+i+"\\.){3}"+i;const u=n+"{1,4}",d="(?:"+u+":"+u+"|"+f.ipv4address+")",p="(?:"+u+":){6}"+d,_="::(?:"+u+":){5}"+d,v="(?:"+u+")?::(?:"+u+":){4}"+d,c="(?:(?:"+u+":){0,1}"+u+")?::(?:"+u+":){3}"+d,m="(?:(?:"+u+":){0,2}"+u+")?::(?:"+u+":){2}"+d,g="(?:(?:"+u+":){0,3}"+u+")?::"+u+":"+d,w="(?:(?:"+u+":){0,4}"+u+")?::"+d,$="(?:(?:"+u+":){0,5}"+u+")?::"+u,j="(?:(?:"+u+":){0,6}"+u+")?::";f.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",f.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",f.ipv6address="(?:"+p+"|"+_+"|"+v+"|"+c+"|"+m+"|"+g+"|"+w+"|"+$+"|"+j+")",f.ipvFuture="v"+n+"+\\.["+a+r+":]+",f.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",f.schemeRegex=new RegExp(f.scheme);const S="["+a+t+r+":]*",O="["+a+t+r+"]{1,255}",C="(?:\\[(?:"+f.ipv6address+"|"+f.ipvFuture+")\\]|"+f.ipv4address+"|"+O+")",I="(?:"+S+"@)?"+C+"(?::\\d*)?",P="(?:"+S+"@)?("+C+")(?::\\d*)?",q=s+"*",L=s+"+",T="(?:\\/"+q+")*",z="\\/(?:"+L+T+")?",W=L+T,B="["+a+t+r+"@]+"+T,K="(?:\\/\\/\\/"+q+T+")";return f.hierPart="(?:(?:\\/\\/"+I+T+")|"+z+"|"+W+"|"+K+")",f.hierPartCapture="(?:(?:\\/\\/"+P+T+")|"+z+"|"+W+")",f.relativeRef="(?:(?:\\/\\/"+I+T+")|"+z+"|"+B+"|)",f.relativeRefCapture="(?:(?:\\/\\/"+P+T+")|"+z+"|"+B+"|)",f.query="["+l+"\\/\\?]*(?=#|$)",f.queryWithSquareBrackets="["+l+"\\[\\]\\/\\?]*(?=#|$)",f.fragment="["+l+"\\/\\?]*",f}};h.rfc3986=h.generate(),x.ip={v4Cidr:h.rfc3986.ipv4Cidr,v6Cidr:h.rfc3986.ipv6Cidr,ipv4:h.rfc3986.ipv4address,ipv6:h.rfc3986.ipv6address,ipvfuture:h.rfc3986.ipvFuture},h.createRegex=function(f){const e=h.rfc3986,n="(?:\\?"+(f.allowQuerySquareBrackets?e.queryWithSquareBrackets:e.query)+")?(?:#"+e.fragment+")?",a=f.domain?e.relativeRefCapture:e.relativeRef;if(f.relativeOnly)return h.wrap(a+n);let r="";if(f.scheme){o(f.scheme instanceof RegExp||typeof f.scheme=="string"||Array.isArray(f.scheme),"scheme must be a RegExp, String, or Array");const s=[].concat(f.scheme);o(s.length>=1,"scheme must have at least 1 scheme specified");const i=[];for(let u=0;u<s.length;++u){const d=s[u];o(d instanceof RegExp||typeof d=="string","scheme at position "+u+" must be a RegExp or String"),d instanceof RegExp?i.push(d.source.toString()):(o(e.schemeRegex.test(d),"scheme at position "+u+" must be a valid scheme"),i.push(y(d)))}r=i.join("|")}const t="(?:"+(r?"(?:"+r+")":e.scheme)+":"+(f.domain?e.hierPartCapture:e.hierPart)+")",l=f.allowRelative?"(?:"+t+"|"+a+")":t;return h.wrap(l+n,r)},h.wrap=function(f,e){return{raw:f=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${f}`,regex:new RegExp(`^${f}$`),scheme:e}},h.uriRegex=h.createRegex({}),x.regex=function(f={}){return f.scheme||f.allowRelative||f.relativeOnly||f.allowQuerySquareBrackets||f.domain?h.createRegex(f):h.uriRegex}},1447:(k,x)=>{const b={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};x.Parser=class{constructor(o,y={}){if(!y[b.settings]&&y.constants)for(const h in y.constants){const f=y.constants[h];if(f!==null&&!["boolean","number","string"].includes(typeof f))throw new Error(`Formula constant ${h} contains invalid ${typeof f} value type`)}this.settings=y[b.settings]?y:Object.assign({[b.settings]:!0,constants:{},functions:{}},y),this.single=null,this._parts=null,this._parse(o)}_parse(o){let y=[],h="",f=0,e=!1;const n=r=>{if(f)throw new Error("Formula missing closing parenthesis");const t=y.length?y[y.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 l=new x.Parser(h,this.settings);y.push({type:"segment",value:l})}else if(e){if(e==="]")return y.push({type:"reference",value:h}),void(h="");y.push({type:"literal",value:h})}else if(b.operatorCharacters.includes(h))t&&t.type==="operator"&&b.operators.includes(t.value+h)?t.value+=h:y.push({type:"operator",value:h});else if(h.match(b.numberRx))y.push({type:"constant",value:parseFloat(h)});else if(this.settings.constants[h]!==void 0)y.push({type:"constant",value:this.settings.constants[h]});else{if(!h.match(b.tokenRx))throw new Error(`Formula contains invalid token: ${h}`);y.push({type:"reference",value:h})}h=""}};for(const r of o)e?r===e?(n(),e=!1):h+=r:f?r==="("?(h+=r,++f):r===")"?(--f,f?h+=r:n(r)):h+=r:r in b.literals?e=b.literals[r]:r==="("?(n(),++f):b.operatorCharacters.includes(r)?(n(),h=r,n()):r!==" "?h+=r:n();n(),y=y.map((r,t)=>r.type!=="operator"||r.value!=="-"||t&&y[t-1].type!=="operator"?r:{type:"operator",value:"n"});let a=!1;for(const r of y){if(r.type==="operator"){if(b.operatorsPrefix.includes(r.value))continue;if(!a)throw new Error("Formula contains an operator in invalid position");if(!b.operators.includes(r.value))throw new Error(`Formula contains an unknown operator ${r.value}`)}else if(a)throw new Error("Formula missing expected operator");a=!a}if(!a)throw new Error("Formula contains invalid trailing operator");y.length===1&&["reference","literal","constant"].includes(y[0].type)&&(this.single={type:y[0].type==="reference"?"reference":"value",value:y[0].value}),this._parts=y.map(r=>{if(r.type==="operator")return b.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):b.reference(r.value)})}_subFormula(o,y){const h=this.settings.functions[y];if(typeof h!="function")throw new Error(`Formula contains unknown function ${y}`);let f=[];if(o){let e="",n=0,a=!1;const r=()=>{if(!e)throw new Error(`Formula contains function ${y} with invalid arguments ${o}`);f.push(e),e=""};for(let t=0;t<o.length;++t){const l=o[t];a?(e+=l,l===a&&(a=!1)):l in b.literals&&!n?(e+=l,a=b.literals[l]):l!==","||n?(e+=l,l==="("?++n:l===")"&&--n):r()}r()}return f=f.map(e=>new x.Parser(e,this.settings)),function(e){const n=[];for(const a of f)n.push(a.evaluate(e));return h.call(e,...n)}}evaluate(o){const y=this._parts.slice();for(let h=y.length-2;h>=0;--h){const f=y[h];if(f&&f.type==="operator"){const e=y[h+1];y.splice(h+1,1);const n=b.evaluate(e,o);y[h]=b.single(f.value,n)}}return b.operatorsOrder.forEach(h=>{for(let f=1;f<y.length-1;)if(h.includes(y[f])){const e=y[f],n=b.evaluate(y[f-1],o),a=b.evaluate(y[f+1],o);y.splice(f,2);const r=b.calculate(e,n,a);y[f-1]=r===0?0:r}else f+=2}),b.evaluate(y[0],o)}},x.Parser.prototype[b.symbol]=!0,b.reference=function(o){return function(y){return y&&y[o]!==void 0?y[o]:null}},b.evaluate=function(o,y){return o===null?null:typeof o=="function"?o(y):o[b.symbol]?o.evaluate(y):o},b.single=function(o,y){if(o==="!")return!y;const h=-y;return h===0?0:h},b.calculate=function(o,y,h){if(o==="??")return b.exists(y)?y:h;if(typeof y=="string"||typeof h=="string"){if(o==="+")return(y=b.exists(y)?y:"")+(b.exists(h)?h:"")}else switch(o){case"^":return Math.pow(y,h);case"*":return y*h;case"/":return y/h;case"%":return y%h;case"+":return y+h;case"-":return y-h}switch(o){case"<":return y<h;case"<=":return y<=h;case">":return y>h;case">=":return y>=h;case"==":return y===h;case"!=":return y!==h;case"&&":return y&&h;case"||":return y||h}return null},b.exists=function(o){return o!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:k=>{k.exports=JSON.parse('{"version":"17.12.2"}')}},E={},function k(x){var b=E[x];if(b!==void 0)return b.exports;var o=E[x]={exports:{}};return N[x](o,o.exports,k),o.exports}(5107);var N,E})}(se)),se.exports}function Ge({disabled:D=!1,storeList:M=[],teamDid:N,onAdd:E=()=>{},scope:k="",hiddenChildren:x=!1,open:b=!1,onClose:o=()=>{}}){const{api:y}=ae(),[h,f]=F.useState(!1),[e,n]=F.useState(!0),[a,r]=F.useState(!1),[t,l]=F.useState(""),[s,i]=F.useState(""),{t:u}=X(),d=async()=>{f(!0);try{const{decoded:_}=Ne(t,M);await y.addBlockletStore({input:{teamDid:N,url:_,scope:k}}),E(_),r(!1),o()}catch(_){const v=`${u("store.blockletRegistry.addFailed")} ${J(_)}`;i(v)}finally{f(!1)}},p=()=>{r(!1),o()};return R.jsxs(R.Fragment,{children:[!x&&R.jsxs(ve,{button:!0,disabled:D,sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1},onClick:()=>{r(!0)},children:[R.jsx(_e,{font:!0}),R.jsx(H,{variant:"inherit",children:u("store.blockletRegistry.addRegistry")})]}),R.jsxs(Me,{title:u("store.blockletRegistry.addRegistry"),fullWidth:!0,maxWidth:"md",open:b||a,onClose:p,PaperProps:{style:{minHeight:"auto"}},actions:R.jsxs(R.Fragment,{children:[R.jsx(ce,{onClick:_=>{_.stopPropagation(),p()},color:"inherit",children:u("common.cancel")}),R.jsxs(ce,{onClick:_=>{_.stopPropagation(),d()},color:"primary","data-cy":"install-blocklet-next-step",disabled:h||!t||e,variant:"contained",autoFocus:!0,children:[h&&R.jsx(Y,{size:16}),u("common.confirm")]})]}),children:[R.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:R.jsx(we,{component:"div",children:R.jsx(H,{component:"div",children:R.jsx(xe,{label:u("store.blockletRegistry.registryUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"add-blocklet-store-url",fullWidth:!0,value:t,onChange:_=>{i(null);let v=!1;_.target.value.trim()||(v=!0),_.target.value.trim()||i(u("store.blockletRegistry.registryUrlEmpty")),l(_.target.value),n(v)},disabled:h,onKeyPress:_=>{_.key==="Enter"&&(_.preventDefault(),_.target.value.trim()?d():i(u("store.blockletRegistry.registryUrlEmpty")))}})})})}),!!s&&R.jsx($e,{severity:"error",style:{width:"100%"},children:s})]})]})}Ge.propTypes={teamDid:A.string.isRequired,disabled:A.bool,storeList:A.array,onAdd:A.func,scope:A.string,hiddenChildren:A.bool,open:A.bool,onClose:A.func};function ie({store:D,teamDid:M,onDelete:N=()=>{},children:E=null,projectId:k="",scope:x=""}){const{api:b}=ae(),{t:o}=X(),y=Pe(),[h,f]=F.useState(!1),[e,n]=F.useState(null),a=je(),r=()=>{f(!1),n(null)},t=async()=>{try{f(!0),await b.deleteBlockletStore({input:{teamDid:M,url:D.url,projectId:k,scope:x}}),await y?.actions?.refreshBlocklet(),N&&typeof N=="function"&&N()}catch(i){V.error(`Remove Blocklet Store Error: ${J(i)}`)}finally{f(!1),n(null)}},l={keyName:D.url,title:o("store.blockletRegistry.deleteRegistry"),description:o("store.blockletRegistry.deleteDesc",{name:`<b>${D.url}</b>`,color:a.palette.error.main}),confirmPlaceholder:o("store.blockletRegistry.confirmDesc",{name:D.url}),confirm:o("common.delConfirm"),cancel:o("common.cancel"),onConfirm:t,onCancel:r},s=i=>{D.protected||(i.stopPropagation(),n(l))};return R.jsxs(R.Fragment,{children:[E?R.jsx("span",{onClick:s,children:E}):R.jsx(G,{"data-cy":"store-action-delete",color:"primary",disabled:h,onClick:s,size:"small",children:R.jsx(he,{sx:{zoom:.95}})}),e&&R.jsx(ze,{keyName:e.keyName,title:e.title,description:e.description,confirmPlaceholder:e.confirmPlaceholder,confirm:e.confirm,cancel:e.cancel,params:e.params,onConfirm:e.onConfirm,onCancel:e.onCancel})]})}ie.propTypes={children:A.node,teamDid:A.string.isRequired,store:A.object.isRequired,onDelete:A.func,projectId:A.string,scope:A.string};const Ke=({store:D,userDid:M})=>{const N=window.blocklet?.tenantMode!==qe.BLOCKLET_TENANT_MODES.MULTIPLE;return D.protected?!1:D.scope&&D.scope===M?!0:N?D.scope==="studio":!1};function ye({connectedStore:D,onDisconnect:M=()=>{},onDelete:N=()=>{},store:E,teamDid:k,projectId:x=""}){const[b,o]=F.useState(null),y=!!b,{t:h}=X(),{session:f}=Ue(),[e,n]=F.useState(!1),a=i=>{i.stopPropagation(),window.open(Q(`${ee(E.url,"search?menu=my-blocklets")}`,{allowDomains:null}))},r=i=>{o(i.currentTarget)},t=()=>{o(null)},l=()=>{n(!1),M()},s=[{label:h("common.visitStore"),action:a,icon:pe},{label:h("common.disconnect"),action:()=>{t(),n(!0)},icon:ke,hidden:!D}];return R.jsxs(R.Fragment,{children:[R.jsx(G,{ref:b,color:"primary",onClick:r,size:"small",children:R.jsx(Re,{sx:{zoom:.95}})}),R.jsxs(Se,{anchorEl:b,open:y,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[s.map(i=>i.hidden?null:R.jsxs(oe,{dense:!0,onClick:i.action,disabled:i.disabled,children:[i.icon&&R.jsx(i.icon,{color:"action",sx:{marginRight:1}}),R.jsx(U,{sx:{color:"action"},children:i.label})]},i.label)),Ke({store:E,userDid:f?.user?.did})&&R.jsx(ie,{store:E,onDelete:N,teamDid:k,projectId:x,scope:E.scope||"studio",children:R.jsxs(oe,{dense:!0,disabled:E.protected,children:[R.jsx(he,{sx:{color:E.protected?"action":"error.main",marginRight:1}}),R.jsx(U,{sx:{color:E.protected?"action":"error.main"},children:h("common.delete")})]})})]}),e&&R.jsx(Fe,{displayError:!0,title:`${h("common.disconnect")} ${E.name}`,description:h("blocklet.publish.disconnectStoreTip"),confirm:h("common.confirm"),onConfirm:l,onCancel:()=>n(!1)})]})}ye.propTypes={connectedStore:A.object.isRequired,onDisconnect:A.func,onDelete:A.func,store:A.object.isRequired,teamDid:A.string.isRequired,projectId:A.string};function Ze({messageType:D,onOpen:M,onClose:N}){const E=F.useRef(null),k=F.useRef(null),x=async o=>{setTimeout(()=>{try{N?.()}catch{}},10*1e3),E.current&&(clearInterval(k.current),E.current.close());const y=Math.random().toString(36).slice(2);E.current=window.open(`${ge.WELLKNOWN_SERVICE_PATH_PREFIX}/open-window?key=${y}`,"_blank"),M?.(E.current),k.current=setInterval(()=>{(!E.current||E.current.closed)&&(E.current=null,clearInterval(k.current),setTimeout(()=>{N?.()},1100))},200),await Promise.resolve(o(E.current,h=>{if(!E.current){localStorage.setItem(`open-window-url-${y}`,JSON.stringify({url:h,time:Date.now()}));return}E.current.location.href=Q(h,{allowDomains:null})}))},b=Be(o=>{const{type:y,error:h}=o.data;E.current&&y===D&&h&&(V.error(h),N?.())});return F.useEffect(()=>(window.addEventListener("message",b),()=>{window.removeEventListener("message",b)}),[b]),x}function ne({connectedStore:D,sx:M={},...N}){return R.jsx(Oe,{sx:{width:24,height:24,...M},src:ee(D.storeUrl,ge.WELLKNOWN_SERVICE_PATH_PREFIX,`/user/avatar/${D.developerDid}?imageFilter=resize&w=120&h=120`),...N})}ne.propTypes={connectedStore:A.object.isRequired,sx:A.object};function be({storeUrl:D,storeName:M,published:N,did:E="",version:k=""}){const{t:x}=X(),b=()=>{window.open(Q(`${ee(D,E&&k?`/blocklets/${E}/${k}`:"/search?menu=my-blocklets")}`,{allowDomains:null}))};return R.jsxs(U,{children:[R.jsx(H,{variant:"subtitle2",children:x(N?"blocklet.publish.publishToStoreSuccess":"blocklet.publish.uploadToStoreSuccess",{name:M})}),R.jsx(G,{size:"small",sx:{mt:1},onClick:b,variant:"contained",color:"success",children:x("common.visitTarget",{name:M})})]})}be.propTypes={storeName:A.string.isRequired,storeUrl:A.string.isRequired,published:A.bool.isRequired,did:A.string,version:A.string};const de={CONNECT:"connect",SELECT:"select"},me=Ee(({className:D,...M})=>R.jsx(Ie,{...M,classes:{popper:D}}))(({theme:D})=>({[`& .${Te.tooltip}`]:{backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.87)",borderRadius:8,padding:D.spacing(2),fontSize:D.typography.pxToRem(12),border:"1px solid rgba(0,0,0,0.08)",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.05)"}}));function Ye({teamDid:D,projectId:M="",releaseId:N="",store:E,warningList:k=[],onDelete:x=()=>{},kind:b="store",published:o=!1,connectedStore:y=null,releaseType:h="",onPublish:f=()=>{},onOpenConnectStore:e=()=>{},onSelectConnectStore:n=()=>{},behavior:a=de.CONNECT,scope:r="",version:t=""}){const{t:l}=X(),{api:s,info:i,inService:u}=ae(),[d,p]=F.useState(!1),_=Ze({messageType:"connect-store-message",onOpen:()=>p(!0),onClose:()=>p(!1)}),v=b==="publish",c=!!y,m=C=>{if(C.stopPropagation(),v){window.open(Q(ee(E.url,"developer/blocklets"),{allowDomains:null}));return}window.open(Q(E.url,{allowDomains:null}))},g=()=>{if(a===de.SELECT){n(E);return}_(async(C,I)=>{try{const P=await s.connectToStore({input:{did:D,storeUrl:E.url,storeId:E.id,storeName:E.name,projectId:M}});if(!P?.url){V.error("failed to connect to store");return}I(P.url),await e({did:D,projectId:M,storeId:E.id}),p(!1)}catch(P){const q=J(P);V.error(q),p(!1)}})},w=async()=>{try{await s.disconnectFromStore({input:{did:D,storeId:E.id,projectId:M,storeScope:r}}),x()}catch(C){V.error(J(C))}},$=()=>{p(!0),s.publishToStore({input:{did:D,storeId:E.id,storeName:E.name,projectId:M,releaseId:N,type:h}}).then(C=>{V.success(R.jsx(be,{storeName:y.storeName,storeUrl:y.storeUrl,did:M,version:t,published:C.url==="published"}),{duration:1e4}),f?.(null)}).catch(C=>{V.error(J(C)),f?.(C)}).finally(()=>{p(!1)})};F.useEffect(()=>{c&&p(!1)},[c]);const j=F.useMemo(()=>!(u&&He.isInServerlessMode(i)),[u,i]),S=k.length>0,O=R.jsxs(G,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130,height:"100%"},disabled:S,onClick:$,children:[d?R.jsx(Y,{sx:{marginRight:1},size:16}):R.jsx(Ae,{sx:{marginRight:1,fontSize:20}}),l("common.upload")]});return R.jsxs(U,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",overflow:"hidden",width:"100%"},children:[!v&&d&&R.jsx(Y,{sx:{marginRight:2},size:16}),R.jsxs(U,{sx:{flexShrink:1,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},children:[R.jsx(U,{sx:{display:"flex",flexDirection:"row"},children:R.jsx(H,{component:"span",sx:{fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variant:"subtitle1",children:E.name})}),R.jsx(H,{sx:{fontSize:14,opacity:.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},component:"span",variant:"inherit",children:`${E.url}`})]}),R.jsxs(U,{sx:{flex:1,display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center"},children:[y&&R.jsx(me,{placement:"top",title:R.jsxs(U,{children:[R.jsx(H,{component:"span",variant:"caption",sx:{opacity:.7},children:l("blocklet.publish.developerInfo")}),R.jsxs(U,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1,mt:1},children:[R.jsx(ne,{connectedStore:y,sx:{width:42,height:42}}),R.jsxs(U,{sx:{flex:1},children:[R.jsx(H,{component:"span",variant:"subtitle1",children:y.developerName}),R.jsx(We,{size:14,copyable:!0,compact:!0,responsive:!1,did:y.developerDid})]})]})]}),children:R.jsx(U,{children:R.jsx(ne,{connectedStore:y,sx:{marginRight:1,cursor:"help"}})})}),v&&R.jsxs(le,{disabled:d,variant:"outlined",sx:{height:38},size:"small",children:[!c&&R.jsxs(G,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:g,children:[d?R.jsx(Y,{sx:{marginRight:1},size:16}):R.jsx(Ce,{sx:{marginRight:1}}),l("common.connect")]}),c&&o&&R.jsxs(G,{disabled:!0,sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},children:[d?R.jsx(Y,{sx:{marginRight:1},size:16}):R.jsx(De,{sx:{marginRight:1}}),l("common.uploaded")]}),c&&!o&&(S?R.jsx(me,{title:R.jsxs(U,{children:[R.jsx(U,{sx:{color:"error.main",mb:.5},children:l("blocklet.publish.storeRule.warning")}),k.map((C,I)=>R.jsxs(U,{sx:{color:"error.main"},children:[I+1,". ",C]},C))]}),children:R.jsx("div",{children:O})}):O),R.jsx(ye,{projectId:M,connectedStore:y,store:E,onDelete:x,teamDid:D,onDisconnect:w})]}),!v&&R.jsxs(le,{disabled:d,variant:"outlined",sx:{height:36},size:"small",children:[R.jsx(G,{"data-cy":"store-open-url",onClick:m,children:R.jsx(pe,{sx:{zoom:.9}})}),!E.protected&&j&&R.jsx(ie,{store:E,onDelete:x,teamDid:D,scope:""})]})]})]})}Ye.propTypes={kind:A.string,teamDid:A.string.isRequired,published:A.bool,connectedStore:A.shape({storeName:A.string,storeId:A.string,storeUrl:A.string,developerDid:A.string,developerName:A.string}),warningList:A.array,projectId:A.string,releaseId:A.string,releaseType:A.string,store:A.shape({id:A.string.isRequired,name:A.string.isRequired,url:A.string.isRequired,protected:A.bool,connected:A.bool}).isRequired,scope:A.string,onDelete:A.func,onPublish:A.func,onOpenConnectStore:A.func,behavior:A.string,onSelectConnectStore:A.func,version:A.string};export{Ge as A,Ye as S,be as U,Ke as c,ct as r,He as s,Ze as u};
|
|
1
|
+
import{r as F}from"./vendor-react-Dvs43sk9.js";import{j as R,S as ve,cd as _e,T as H,bC as we,z as xe,aX as $e,a6 as Y,W as A,D as je,Q as G,bR as he,bc as pe,cs as ke,aQ as Re,aR as Se,M as oe,ak as U,b4 as Oe,ct as Ae,s as Ee,bg as le,cu as Ce,bH as De,am as Ie,aq as Te}from"./vendor-mui-core-DWYIngcn.js";import{T as X,a as Me,n as ce,H as V}from"./vendor-ux-Dln42oC3.js";import{aZ as Le,O as ae,a_ as Ne,Z as Pe,M as qe,c as ge}from"./index-CgCJ2qDh.js";import{f as J}from"./index-DBs9Ljax.js";import{C as ee}from"./vendor-utils-J7aLFpEq.js";import{D as ze}from"./delete-confirm-DhfRzwF1.js";import{C as Fe}from"./confirm-B4BzkG04.js";import{u as Ue}from"./session-BV5HR2vD.js";import{g as Q}from"./get-safe-url-Ce6hawV-.js";import{W as We}from"./did-address-CdYAzzjR.js";import{b as Be}from"./vendor-hooks-HB6DqcLv.js";var re,ue;function Ve(){if(ue)return re;ue=1;var D={};const{NODE_MODES:M}=Le();return re={isInServerlessMode:({mode:E,previousMode:k}={})=>E===M.SERVERLESS||k===M.SERVERLESS||D.ABT_NODE_DEBUG_AS_SERVERLESS==="true"},re}var He=Ve(),se={exports:{}},fe;function ct(){return fe||(fe=1,function(D,M){(function(N,E){D.exports=E()})(self,()=>{return N={7629:(k,x,b)=>{const o=b(375),y=b(8571),h=b(9474),f=b(1687),e=b(8652),n=b(8160),a=b(3292),r=b(6354),t=b(8901),l=b(9708),s=b(6914),i=b(2294),u=b(6133),d=b(1152),p=b(8863),_=b(2036),v={Base:class{constructor(c){this.type=c,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new i.Ids,this._preferences=null,this._refs=new u.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 l.describe=="function","Manifest functionality disabled"),l.describe(this)}allow(...c){return n.verifyFlat(c,"allow"),this._values(c,"_valids")}alter(c){o(c&&typeof c=="object"&&!Array.isArray(c),"Invalid targets argument"),o(!this._inRuleset(),"Cannot set alterations inside a ruleset");const m=this.clone();m.$_terms.alterations=m.$_terms.alterations||[];for(const g in c){const w=c[g];o(typeof w=="function","Alteration adjuster for",g,"must be a function"),m.$_terms.alterations.push({target:g,adjuster:w})}return m.$_temp.ruleset=!1,m}artifact(c){return o(c!==void 0,"Artifact cannot be undefined"),o(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",c)}cast(c){return o(c===!1||typeof c=="string","Invalid to value"),o(c===!1||this._definition.cast[c],"Type",this.type,"does not support casting to",c),this.$_setFlag("cast",c===!1?void 0:c)}default(c,m){return this._default("default",c,m)}description(c){return o(c&&typeof c=="string","Description must be a non-empty string"),this.$_setFlag("description",c)}empty(c){const m=this.clone();return c!==void 0&&(c=m.$_compile(c,{override:!1})),m.$_setFlag("empty",c,{clone:!1})}error(c){return o(c,"Missing error"),o(c instanceof Error||typeof c=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",c)}example(c,m={}){return o(c!==void 0,"Missing example"),n.assertOptions(m,["override"]),this._inner("examples",c,{single:!0,override:m.override})}external(c,m){return typeof c=="object"&&(o(!m,"Cannot combine options with description"),m=c.description,c=c.method),o(typeof c=="function","Method must be a function"),o(m===void 0||m&&typeof m=="string","Description must be a non-empty string"),this._inner("externals",{method:c,description:m},{single:!0})}failover(c,m){return this._default("failover",c,m)}forbidden(){return this.presence("forbidden")}id(c){return c?(o(typeof c=="string","id must be a non-empty string"),o(/^[^\.]+$/.test(c),"id cannot contain period character"),this.$_setFlag("id",c)):this.$_setFlag("id",void 0)}invalid(...c){return this._values(c,"_invalids")}label(c){return o(c&&typeof c=="string","Label name must be a non-empty string"),this.$_setFlag("label",c)}meta(c){return o(c!==void 0,"Meta cannot be undefined"),this._inner("metas",c,{single:!0})}note(...c){o(c.length,"Missing notes");for(const m of c)o(m&&typeof m=="string","Notes must be non-empty strings");return this._inner("notes",c)}only(c=!0){return o(typeof c=="boolean","Invalid mode:",c),this.$_setFlag("only",c)}optional(){return this.presence("optional")}prefs(c){o(c,"Missing preferences"),o(c.context===void 0,"Cannot override context"),o(c.externals===void 0,"Cannot override externals"),o(c.warnings===void 0,"Cannot override warnings"),o(c.debug===void 0,"Cannot override debug"),n.checkPreferences(c);const m=this.clone();return m._preferences=n.preferences(m._preferences,c),m}presence(c){return o(["optional","required","forbidden"].includes(c),"Unknown presence mode",c),this.$_setFlag("presence",c)}raw(c=!0){return this.$_setFlag("result",c?"raw":void 0)}result(c){return o(["raw","strip"].includes(c),"Unknown result mode",c),this.$_setFlag("result",c)}required(){return this.presence("required")}strict(c){const m=this.clone(),g=c!==void 0&&!c;return m._preferences=n.preferences(m._preferences,{convert:g}),m}strip(c=!0){return this.$_setFlag("result",c?"strip":void 0)}tag(...c){o(c.length,"Missing tags");for(const m of c)o(m&&typeof m=="string","Tags must be non-empty strings");return this._inner("tags",c)}unit(c){return o(c&&typeof c=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",c)}valid(...c){n.verifyFlat(c,"valid");const m=this.allow(...c);return m.$_setFlag("only",!!m._valids,{clone:!1}),m}when(c,m){const g=this.clone();g.$_terms.whens||(g.$_terms.whens=[]);const w=a.when(g,c,m);if(!["any","link"].includes(g.type)){const $=w.is?[w]:w.switch;for(const j of $)o(!j.then||j.then.type==="any"||j.then.type===g.type,"Cannot combine",g.type,"with",j.then&&j.then.type),o(!j.otherwise||j.otherwise.type==="any"||j.otherwise.type===g.type,"Cannot combine",g.type,"with",j.otherwise&&j.otherwise.type)}return g.$_terms.whens.push(w),g.$_mutateRebuild()}cache(c){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 m=this.clone();return m._cache=c||e.provider.provision(),m.$_temp.ruleset=!1,m}clone(){const c=Object.create(Object.getPrototypeOf(this));return this._assign(c)}concat(c){o(n.isSchema(c),"Invalid schema object"),o(this.type==="any"||c.type==="any"||c.type===this.type,"Cannot merge type",this.type,"with another type:",c.type),o(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),o(!c._inRuleset(),"Cannot concatenate a schema with open ruleset");let m=this.clone();if(this.type==="any"&&c.type!=="any"){const g=c.clone();for(const w of Object.keys(m))w!=="type"&&(g[w]=m[w]);m=g}m._ids.concat(c._ids),m._refs.register(c,u.toSibling),m._preferences=m._preferences?n.preferences(m._preferences,c._preferences):c._preferences,m._valids=_.merge(m._valids,c._valids,c._invalids),m._invalids=_.merge(m._invalids,c._invalids,c._valids);for(const g of c._singleRules.keys())m._singleRules.has(g)&&(m._rules=m._rules.filter(w=>w.keep||w.name!==g),m._singleRules.delete(g));for(const g of c._rules)c._definition.rules[g.method].multi||m._singleRules.set(g.name,g),m._rules.push(g);if(m._flags.empty&&c._flags.empty){m._flags.empty=m._flags.empty.concat(c._flags.empty);const g=Object.assign({},c._flags);delete g.empty,f(m._flags,g)}else if(c._flags.empty){m._flags.empty=c._flags.empty;const g=Object.assign({},c._flags);delete g.empty,f(m._flags,g)}else f(m._flags,c._flags);for(const g in c.$_terms){const w=c.$_terms[g];w?m.$_terms[g]?m.$_terms[g]=m.$_terms[g].concat(w):m.$_terms[g]=w.slice():m.$_terms[g]||(m.$_terms[g]=w)}return this.$_root._tracer&&this.$_root._tracer._combine(m,[this,c]),m.$_mutateRebuild()}extend(c){return o(!c.base,"Cannot extend type with another base"),t.type(this,c)}extract(c){return c=Array.isArray(c)?c:c.split("."),this._ids.reach(c)}fork(c,m){o(!this._inRuleset(),"Cannot fork inside a ruleset");let g=this;for(let w of[].concat(c))w=Array.isArray(w)?w:w.split("."),g=g._ids.fork(w,m,g);return g.$_temp.ruleset=!1,g}rule(c){const m=this._definition;n.assertOptions(c,Object.keys(m.modifiers)),o(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const g=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;o(g>=0&&g<this._rules.length,"Cannot apply rules to empty ruleset");const w=this.clone();for(let $=g;$<w._rules.length;++$){const j=w._rules[$],S=y(j);for(const O in c)m.modifiers[O](S,c[O]),o(S.name===j.name,"Cannot change rule name");w._rules[$]=S,w._singleRules.get(S.name)===j&&w._singleRules.set(S.name,S)}return w.$_temp.ruleset=!1,w.$_mutateRebuild()}get ruleset(){o(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const c=this.clone();return c.$_temp.ruleset=c._rules.length,c}get $(){return this.ruleset}tailor(c){c=[].concat(c),o(!this._inRuleset(),"Cannot tailor inside a ruleset");let m=this;if(this.$_terms.alterations)for(const{target:g,adjuster:w}of this.$_terms.alterations)c.includes(g)&&(m=w(m),o(n.isSchema(m),"Alteration adjuster for",g,"failed to return a schema object"));return m=m.$_modify({each:g=>g.tailor(c),ref:!1}),m.$_temp.ruleset=!1,m.$_mutateRebuild()}tracer(){return d.location?d.location(this):this}validate(c,m){return p.entry(c,this,m)}validateAsync(c,m){return p.entryAsync(c,this,m)}$_addRule(c){typeof c=="string"&&(c={name:c}),o(c&&typeof c=="object","Invalid options"),o(c.name&&typeof c.name=="string","Invalid rule name");for(const j in c)o(j[0]!=="_","Cannot set private rule properties");const m=Object.assign({},c);m._resolve=[],m.method=m.method||m.name;const g=this._definition.rules[m.method],w=m.args;o(g,"Unknown rule",m.method);const $=this.clone();if(w){o(Object.keys(w).length===1||Object.keys(w).length===this._definition.rules[m.name].args.length,"Invalid rule definition for",this.type,m.name);for(const j in w){let S=w[j];if(g.argsByName){const O=g.argsByName.get(j);if(O.ref&&n.isResolvable(S))m._resolve.push(j),$.$_mutateRegister(S);else if(O.normalize&&(S=O.normalize(S),w[j]=S),O.assert){const C=n.validateArg(S,j,O);o(!C,C,"or reference")}}S!==void 0?w[j]=S:delete w[j]}}return g.multi||($._ruleRemove(m.name,{clone:!1}),$._singleRules.set(m.name,m)),$.$_temp.ruleset===!1&&($.$_temp.ruleset=null),g.priority?$._rules.unshift(m):$._rules.push(m),$}$_compile(c,m){return a.schema(this.$_root,c,m)}$_createError(c,m,g,w,$,j={}){const S=j.flags!==!1?this._flags:{},O=j.messages?s.merge(this._definition.messages,j.messages):this._definition.messages;return new r.Report(c,m,g,S,O,w,$)}$_getFlag(c){return this._flags[c]}$_getRule(c){return this._singleRules.get(c)}$_mapLabels(c){return c=Array.isArray(c)?c:c.split("."),this._ids.labels(c)}$_match(c,m,g,w){(g=Object.assign({},g)).abortEarly=!0,g._externals=!1,m.snapshot();const $=!p.validate(c,this,m,g,w).errors;return m.restore(),$}$_modify(c){return n.assertOptions(c,["each","once","ref","schema"]),i.schema(this,c)||this}$_mutateRebuild(){return o(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(c,{source:m,name:g,path:w,key:$})=>{const j=this._definition[m][g]&&this._definition[m][g].register;j!==!1&&this.$_mutateRegister(c,{family:j,key:$})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(c,{family:m,key:g}={}){this._refs.register(c,m),this._ids.register(c,{key:g})}$_property(c){return this._definition.properties[c]}$_reach(c){return this._ids.reach(c)}$_rootReferences(){return this._refs.roots()}$_setFlag(c,m,g={}){o(c[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const w=this._definition.flags[c]||{};if(h(m,w.default)&&(m=void 0),h(m,this._flags[c]))return this;const $=g.clone!==!1?this.clone():this;return m!==void 0?($._flags[c]=m,$.$_mutateRegister(m)):delete $._flags[c],c[0]!=="_"&&($.$_temp.ruleset=!1),$}$_parent(c,...m){return this[c][n.symbols.parent].call(this,...m)}$_validate(c,m,g){return p.validate(c,this,m,g)}_assign(c){c.type=this.type,c.$_root=this.$_root,c.$_temp=Object.assign({},this.$_temp),c.$_temp.whens={},c._ids=this._ids.clone(),c._preferences=this._preferences,c._valids=this._valids&&this._valids.clone(),c._invalids=this._invalids&&this._invalids.clone(),c._rules=this._rules.slice(),c._singleRules=y(this._singleRules,{shallow:!0}),c._refs=this._refs.clone(),c._flags=Object.assign({},this._flags),c._cache=null,c.$_terms={};for(const m in this.$_terms)c.$_terms[m]=this.$_terms[m]?this.$_terms[m].slice():null;c.$_super={};for(const m in this.$_super)c.$_super[m]=this._super[m].bind(c);return c}_bare(){const c=this.clone();c._reset();const m=c._definition.terms;for(const g in m){const w=m[g];c.$_terms[g]=w.init}return c.$_mutateRebuild()}_default(c,m,g={}){return n.assertOptions(g,"literal"),o(m!==void 0,"Missing",c,"value"),o(typeof m=="function"||!g.literal,"Only function value supports literal option"),typeof m=="function"&&g.literal&&(m={[n.symbols.literal]:!0,literal:m}),this.$_setFlag(c,m)}_generate(c,m,g){if(!this.$_terms.whens)return{schema:this};const w=[],$=[];for(let O=0;O<this.$_terms.whens.length;++O){const C=this.$_terms.whens[O];if(C.concat){w.push(C.concat),$.push(`${O}.concat`);continue}const I=C.ref?C.ref.resolve(c,m,g):c,P=C.is?[C]:C.switch,q=$.length;for(let L=0;L<P.length;++L){const{is:T,then:z,otherwise:W}=P[L],B=`${O}${C.switch?"."+L:""}`;if(T.$_match(I,m.nest(T,`${B}.is`),g)){if(z){const K=m.localize([...m.path,`${B}.then`],m.ancestors,m.schemas),{schema:te,id:Z}=z._generate(c,K,g);w.push(te),$.push(`${B}.then${Z?`(${Z})`:""}`);break}}else if(W){const K=m.localize([...m.path,`${B}.otherwise`],m.ancestors,m.schemas),{schema:te,id:Z}=W._generate(c,K,g);w.push(te),$.push(`${B}.otherwise${Z?`(${Z})`:""}`);break}}if(C.break&&$.length>q)break}const j=$.join(", ");if(m.mainstay.tracer.debug(m,"rule","when",j),!j)return{schema:this};if(!m.mainstay.tracer.active&&this.$_temp.whens[j])return{schema:this.$_temp.whens[j],id:j};let S=this;this._definition.generate&&(S=this._definition.generate(this,c,m,g));for(const O of w)S=S.concat(O);return this.$_root._tracer&&this.$_root._tracer._combine(S,[this,...w]),this.$_temp.whens[j]=S,{schema:S,id:j}}_inner(c,m,g={}){o(!this._inRuleset(),`Cannot set ${c} inside a ruleset`);const w=this.clone();return w.$_terms[c]&&!g.override||(w.$_terms[c]=[]),g.single?w.$_terms[c].push(m):w.$_terms[c].push(...m),w.$_temp.ruleset=!1,w}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(c,m={}){if(!this._singleRules.has(c))return this;const g=m.clone!==!1?this.clone():this;g._singleRules.delete(c);const w=[];for(let $=0;$<g._rules.length;++$){const j=g._rules[$];j.name!==c||j.keep?w.push(j):g._inRuleset()&&$<g.$_temp.ruleset&&--g.$_temp.ruleset}return g._rules=w,g}_values(c,m){n.verifyFlat(c,m.slice(1,-1));const g=this.clone(),w=c[0]===n.symbols.override;if(w&&(c=c.slice(1)),!g[m]&&c.length?g[m]=new _:w&&(g[m]=c.length?new _:null,g.$_mutateRebuild()),!g[m])return g;w&&g[m].override();for(const $ of c){o($!==void 0,"Cannot call allow/valid/invalid with undefined"),o($!==n.symbols.override,"Override must be the first value");const j=m==="_invalids"?"_valids":"_invalids";g[j]&&(g[j].remove($),g[j].length||(o(m==="_valids"||!g._flags.only,"Setting invalid value",$,"leaves schema rejecting all values due to previous valid rule"),g[j]=null)),g[m].add($,g._refs)}return g}}};v.Base.prototype[n.symbols.any]={version:n.version,compile:a.compile,root:"$_root"},v.Base.prototype.isImmutable=!0,v.Base.prototype.deny=v.Base.prototype.invalid,v.Base.prototype.disallow=v.Base.prototype.invalid,v.Base.prototype.equal=v.Base.prototype.valid,v.Base.prototype.exist=v.Base.prototype.required,v.Base.prototype.not=v.Base.prototype.invalid,v.Base.prototype.options=v.Base.prototype.prefs,v.Base.prototype.preferences=v.Base.prototype.prefs,k.exports=new v.Base},8652:(k,x,b)=>{const o=b(375),y=b(8571),h=b(8160),f={max:1e3,supported:new Set(["undefined","boolean","number","string"])};x.provider={provision:e=>new f.Cache(e)},f.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||f.max,this._map=new Map,this._list=new f.List}get length(){return this._map.size}set(e,n){if(e!==null&&!f.supported.has(typeof e))return;let a=this._map.get(e);if(a)return a.value=n,void this._list.first(a);a=this._list.unshift({key:e,value:n}),this._map.set(e,a),this._compact()}get(e){const n=this._map.get(e);if(n)return this._list.first(n),y(n.value)}_compact(){if(this._map.size>this._max){const e=this._list.pop();this._map.delete(e.key)}}},f.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:n,prev:a}=e;return n.prev=a,a&&(a.next=n),e===this.tail&&(this.tail=n),e.prev=null,e.next=null,e}}},8160:(k,x,b)=>{const o=b(375),y=b(7916),h=b(5934);let f,e;const n={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)?)?)?)?$/};x.version=h.version,x.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},x.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")},x.assertOptions=function(a,r,t="Options"){o(a&&typeof a=="object"&&!Array.isArray(a),"Options must be of type object");const l=Object.keys(a).filter(s=>!r.includes(s));o(l.length===0,`${t} contain unknown keys: ${l}`)},x.checkPreferences=function(a){e=e||b(3378);const r=e.preferences.validate(a);if(r.error)throw new y([r.error.details[0].message])},x.compare=function(a,r,t){switch(t){case"=":return a===r;case">":return a>r;case"<":return a<r;case">=":return a>=r;case"<=":return a<=r}},x.default=function(a,r){return a===void 0?r:a},x.isIsoDate=function(a){return n.isoDate.test(a)},x.isNumber=function(a){return typeof a=="number"&&!isNaN(a)},x.isResolvable=function(a){return!!a&&(a[x.symbols.ref]||a[x.symbols.template])},x.isSchema=function(a,r={}){const t=a&&a[x.symbols.any];return!!t&&(o(r.legacy||t.version===x.version,"Cannot mix different versions of joi schemas"),!0)},x.isValues=function(a){return a[x.symbols.values]},x.limit=function(a){return Number.isSafeInteger(a)&&a>=0},x.preferences=function(a,r){f=f||b(6914),a=a||{},r=r||{};const t=Object.assign({},a,r);return r.errors&&a.errors&&(t.errors=Object.assign({},a.errors,r.errors),t.errors.wrap=Object.assign({},a.errors.wrap,r.errors.wrap)),r.messages&&(t.messages=f.compile(r.messages,a.messages)),delete t[x.symbols.prefs],t},x.tryWithPath=function(a,r,t={}){try{return a()}catch(l){throw l.path!==void 0?l.path=r+"."+l.path:l.path=r,t.append&&(l.message=`${l.message} (${l.path})`),l}},x.validateArg=function(a,r,{assert:t,message:l}){if(x.isSchema(t)){const s=t.validate(a);return s.error?s.error.message:void 0}if(!t(a))return r?`${r} ${l}`:l},x.verifyFlat=function(a,r){for(const t of a)o(!Array.isArray(t),"Method no longer accepts array arguments:",r)}},3292:(k,x,b)=>{const o=b(375),y=b(8160),h=b(6133),f={};x.schema=function(e,n,a={}){y.assertOptions(a,["appendPath","override"]);try{return f.schema(e,n,a)}catch(r){throw a.appendPath&&r.path!==void 0&&(r.message=`${r.message} (${r.path})`),r}},f.schema=function(e,n,a){o(n!==void 0,"Invalid undefined schema"),Array.isArray(n)&&(o(n.length,"Invalid empty array schema"),n.length===1&&(n=n[0]));const r=(t,...l)=>a.override!==!1?t.valid(e.override,...l):t.valid(...l);if(f.simple(n))return r(e,n);if(typeof n=="function")return e.custom(n);if(o(typeof n=="object","Invalid schema content:",typeof n),y.isResolvable(n))return r(e,n);if(y.isSchema(n))return n;if(Array.isArray(n)){for(const t of n)if(!f.simple(t))return e.alternatives().try(...n);return r(e,...n)}return n instanceof RegExp?e.string().regex(n):n instanceof Date?r(e.date(),n):(o(Object.getPrototypeOf(n)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),e.object().keys(n))},x.ref=function(e,n){return h.isRef(e)?e:h.create(e,n)},x.compile=function(e,n,a={}){y.assertOptions(a,["legacy"]);const r=n&&n[y.symbols.any];if(r)return o(a.legacy||r.version===y.version,"Cannot mix different versions of joi schemas:",r.version,y.version),n;if(typeof n!="object"||!a.legacy)return x.schema(e,n,{appendPath:!0});const t=f.walk(n);return t?t.compile(t.root,n):x.schema(e,n,{appendPath:!0})},f.walk=function(e){if(typeof e!="object")return null;if(Array.isArray(e)){for(const a of e){const r=f.walk(a);if(r)return r}return null}const n=e[y.symbols.any];if(n)return{root:e[n.root],compile:n.compile};o(Object.getPrototypeOf(e)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const a in e){const r=f.walk(e[a]);if(r)return r}return null},f.simple=function(e){return e===null||["boolean","string","number"].includes(typeof e)},x.when=function(e,n,a){if(a===void 0&&(o(n&&typeof n=="object","Missing options"),a=n,n=h.create(".")),Array.isArray(a)&&(a={switch:a}),y.assertOptions(a,["is","not","then","otherwise","switch","break"]),y.isSchema(n))return o(a.is===void 0,'"is" can not be used with a schema condition'),o(a.not===void 0,'"not" can not be used with a schema condition'),o(a.switch===void 0,'"switch" can not be used with a schema condition'),f.condition(e,{is:n,then:a.then,otherwise:a.otherwise,break:a.break});if(o(h.isRef(n)||typeof n=="string","Invalid condition:",n),o(a.not===void 0||a.is===void 0,'Cannot combine "is" with "not"'),a.switch===void 0){let t=a;a.not!==void 0&&(t={is:a.not,then:a.otherwise,otherwise:a.then,break:a.break});let l=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"),a.is===void 0||h.isRef(a.is)||y.isSchema(a.is)||(l=l.required()),f.condition(e,{ref:x.ref(n),is:l,then:t.then,otherwise:t.otherwise,break:t.break})}o(Array.isArray(a.switch),'"switch" must be an array'),o(a.is===void 0,'Cannot combine "switch" with "is"'),o(a.not===void 0,'Cannot combine "switch" with "not"'),o(a.then===void 0,'Cannot combine "switch" with "then"');const r={ref:x.ref(n),switch:[],break:a.break};for(let t=0;t<a.switch.length;++t){const l=a.switch[t],s=t===a.switch.length-1;y.assertOptions(l,s?["is","then","otherwise"]:["is","then"]),o(l.is!==void 0,'Switch statement missing "is"'),o(l.then!==void 0,'Switch statement missing "then"');const i={is:e.$_compile(l.is),then:e.$_compile(l.then)};if(h.isRef(l.is)||y.isSchema(l.is)||(i.is=i.is.required()),s){o(a.otherwise===void 0||l.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const u=a.otherwise!==void 0?a.otherwise:l.otherwise;u!==void 0&&(o(r.break===void 0,"Cannot specify both otherwise and break"),i.otherwise=e.$_compile(u))}r.switch.push(i)}return r},f.condition=function(e,n){for(const a of["then","otherwise"])n[a]===void 0?delete n[a]:n[a]=e.$_compile(n[a]);return n}},6354:(k,x,b)=>{const o=b(5688),y=b(8160),h=b(3328);x.Report=class{constructor(f,e,n,a,r,t,l){if(this.code=f,this.flags=a,this.messages=r,this.path=t.path,this.prefs=l,this.state=t,this.value=e,this.message=null,this.template=null,this.local=n||{},this.local.label=x.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 s=this.path[this.path.length-1];typeof s!="object"&&(this.local.key=s)}}_setTemplate(f){if(this.template=f,!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 f=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 "${f}" 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(f,e){return x.template(this.value,f,e||this.code,this.state,this.prefs)}},x.path=function(f){let e="";for(const n of f)typeof n!="object"&&(typeof n=="string"?(e&&(e+="."),e+=n):e+=`[${n}]`);return e},x.template=function(f,e,n,a,r){if(!e)return;if(h.isTemplate(e))return n!=="root"?e:null;let t=r.errors.language;if(y.isResolvable(t)&&(t=t.resolve(f,a,r)),t&&e[t]){if(e[t][n]!==void 0)return e[t][n];if(e[t]["*"]!==void 0)return e[t]["*"]}return e[n]?e[n]:e["*"]},x.label=function(f,e,n,a){if(f.label)return f.label;if(!n.errors.label)return"";let r=e.path;return n.errors.label==="key"&&e.path.length>1&&(r=e.path.slice(-1)),x.path(r)||x.template(null,n.messages,"root",e,n)||a&&x.template(null,a,"root",e,n)||"value"},x.process=function(f,e,n){if(!f)return null;const{override:a,message:r,details:t}=x.details(f);if(a)return a;if(n.errors.stack)return new x.ValidationError(r,t,e);const l=Error.stackTraceLimit;Error.stackTraceLimit=0;const s=new x.ValidationError(r,t,e);return Error.stackTraceLimit=l,s},x.details=function(f,e={}){let n=[];const a=[];for(const r of f){if(r instanceof Error){if(e.override!==!1)return{override:r};const l=r.toString();n.push(l),a.push({message:l,type:"override",context:{error:r}});continue}const t=r.toString();n.push(t),a.push({message:t,path:r.path.filter(l=>typeof l!="object"),type:r.code,context:r.local})}return n.length>1&&(n=[...new Set(n)]),{message:n.join(". "),details:a}},x.ValidationError=class extends Error{constructor(f,e,n){super(f),this._original=n,this.details=e}static isError(f){return f instanceof x.ValidationError}},x.ValidationError.prototype.isJoi=!0,x.ValidationError.prototype.name="ValidationError",x.ValidationError.prototype.annotate=o.error},8901:(k,x,b)=>{const o=b(375),y=b(8571),h=b(8160),f=b(6914),e={};x.type=function(n,a){const r=Object.getPrototypeOf(n),t=y(r),l=n._assign(Object.create(t)),s=Object.assign({},a);delete s.base,t._definition=s;const i=r._definition||{};s.messages=f.merge(i.messages,s.messages),s.properties=Object.assign({},i.properties,s.properties),l.type=s.type,s.flags=Object.assign({},i.flags,s.flags);const u=Object.assign({},i.terms);if(s.terms)for(const v in s.terms){const c=s.terms[v];o(l.$_terms[v]===void 0,"Invalid term override for",s.type,v),l.$_terms[v]=c.init,u[v]=c}s.terms=u,s.args||(s.args=i.args),s.prepare=e.prepare(s.prepare,i.prepare),s.coerce&&(typeof s.coerce=="function"&&(s.coerce={method:s.coerce}),s.coerce.from&&!Array.isArray(s.coerce.from)&&(s.coerce={method:s.coerce.method,from:[].concat(s.coerce.from)})),s.coerce=e.coerce(s.coerce,i.coerce),s.validate=e.validate(s.validate,i.validate);const d=Object.assign({},i.rules);if(s.rules)for(const v in s.rules){const c=s.rules[v];o(typeof c=="object","Invalid rule definition for",s.type,v);let m=c.method;if(m===void 0&&(m=function(){return this.$_addRule(v)}),m&&(o(!t[v],"Rule conflict in",s.type,v),t[v]=m),o(!d[v],"Rule conflict in",s.type,v),d[v]=c,c.alias){const g=[].concat(c.alias);for(const w of g)t[w]=c.method}c.args&&(c.argsByName=new Map,c.args=c.args.map(g=>(typeof g=="string"&&(g={name:g}),o(!c.argsByName.has(g.name),"Duplicated argument name",g.name),h.isSchema(g.assert)&&(g.assert=g.assert.strict().label(g.name)),c.argsByName.set(g.name,g),g)))}s.rules=d;const p=Object.assign({},i.modifiers);if(s.modifiers)for(const v in s.modifiers){o(!t[v],"Rule conflict in",s.type,v);const c=s.modifiers[v];o(typeof c=="function","Invalid modifier definition for",s.type,v);const m=function(g){return this.rule({[v]:g})};t[v]=m,p[v]=c}if(s.modifiers=p,s.overrides){t._super=r,l.$_super={};for(const v in s.overrides)o(r[v],"Cannot override missing",v),s.overrides[v][h.symbols.parent]=r[v],l.$_super[v]=r[v].bind(l);Object.assign(t,s.overrides)}s.cast=Object.assign({},i.cast,s.cast);const _=Object.assign({},i.manifest,s.manifest);return _.build=e.build(s.manifest&&s.manifest.build,i.manifest&&i.manifest.build),s.manifest=_,s.rebuild=e.rebuild(s.rebuild,i.rebuild),l},e.build=function(n,a){return n&&a?function(r,t){return a(n(r,t),t)}:n||a},e.coerce=function(n,a){return n&&a?{from:n.from&&a.from?[...new Set([...n.from,...a.from])]:null,method(r,t){let l;if((!a.from||a.from.includes(typeof r))&&(l=a.method(r,t),l)){if(l.errors||l.value===void 0)return l;r=l.value}if(!n.from||n.from.includes(typeof r)){const s=n.method(r,t);if(s)return s}return l}}:n||a},e.prepare=function(n,a){return n&&a?function(r,t){const l=n(r,t);if(l){if(l.errors||l.value===void 0)return l;r=l.value}return a(r,t)||l}:n||a},e.rebuild=function(n,a){return n&&a?function(r){a(r),n(r)}:n||a},e.validate=function(n,a){return n&&a?function(r,t){const l=a(r,t);if(l){if(l.errors&&(!Array.isArray(l.errors)||l.errors.length))return l;r=l.value}return n(r,t)||l}:n||a}},5107:(k,x,b)=>{const o=b(375),y=b(8571),h=b(8652),f=b(8160),e=b(3292),n=b(6354),a=b(8901),r=b(9708),t=b(6133),l=b(3328),s=b(1152);let i;const u={types:{alternatives:b(4946),any:b(8068),array:b(546),boolean:b(4937),date:b(7500),function:b(390),link:b(8785),number:b(3832),object:b(8966),string:b(7417),symbol:b(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const d={_types:new Set(Object.keys(u.types))};for(const p of d._types)d[p]=function(..._){return o(!_.length||["alternatives","link","object"].includes(p),"The",p,"type does not allow arguments"),u.generate(this,u.types[p],_)};for(const p of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])d[p]=function(..._){return this.any()[p](..._)};Object.assign(d,u.methods);for(const p in u.aliases){const _=u.aliases[p];d[p]=d[_]}return d.x=d.expression,s.setup&&s.setup(d),d}};u.methods={ValidationError:n.ValidationError,version:f.version,cache:h.provider,assert(d,p,..._){u.assert(d,p,!0,_)},attempt:(d,p,..._)=>u.assert(d,p,!1,_),build(d){return o(typeof r.build=="function","Manifest functionality disabled"),r.build(this,d)},checkPreferences(d){f.checkPreferences(d)},compile(d,p){return e.compile(this,d,p)},defaults(d){o(typeof d=="function","modifier must be a function");const p=Object.assign({},this);for(const _ of p._types){const v=d(p[_]());o(f.isSchema(v),"modifier must return a valid schema object"),p[_]=function(...c){return u.generate(this,v,c)}}return p},expression:(...d)=>new l(...d),extend(...d){f.verifyFlat(d,"extend"),i=i||b(3378),o(d.length,"You need to provide at least one extension"),this.assert(d,i.extensions);const p=Object.assign({},this);p._types=new Set(p._types);for(let _ of d){typeof _=="function"&&(_=_(p)),this.assert(_,i.extension);const v=u.expandExtension(_,p);for(const c of v){o(p[c.type]===void 0||p._types.has(c.type),"Cannot override name",c.type);const m=c.base||this.any(),g=a.type(m,c);p._types.add(c.type),p[c.type]=function(...w){return u.generate(this,g,w)}}}return p},isError:n.ValidationError.isError,isExpression:l.isTemplate,isRef:t.isRef,isSchema:f.isSchema,in:(...d)=>t.in(...d),override:f.symbols.override,ref:(...d)=>t.create(...d),types(){const d={};for(const p of this._types)d[p]=this[p]();for(const p in u.aliases)d[p]=this[p]();return d}},u.assert=function(d,p,_,v){const c=v[0]instanceof Error||typeof v[0]=="string"?v[0]:null,m=c!==null?v[1]:v[0],g=p.validate(d,f.preferences({errors:{stack:!0}},m||{}));let w=g.error;if(!w)return g.value;if(c instanceof Error)throw c;const $=_&&typeof w.annotate=="function"?w.annotate():w.message;throw w instanceof n.ValidationError==0&&(w=y(w)),w.message=c?`${c} ${$}`:$,w},u.generate=function(d,p,_){return o(d,"Must be invoked on a Joi instance."),p.$_root=d,p._definition.args&&_.length?p._definition.args(p,..._):p},u.expandExtension=function(d,p){if(typeof d.type=="string")return[d];const _=[];for(const v of p._types)if(d.type.test(v)){const c=Object.assign({},d);c.type=v,c.base=p[v](),_.push(c)}return _},k.exports=u.root()},6914:(k,x,b)=>{const o=b(375),y=b(8571),h=b(3328);x.compile=function(f,e){if(typeof f=="string")return o(!e,"Cannot set single message string"),new h(f);if(h.isTemplate(f))return o(!e,"Cannot set single message template"),f;o(typeof f=="object"&&!Array.isArray(f),"Invalid message options"),e=e?y(e):{};for(let n in f){const a=f[n];if(n==="root"||h.isTemplate(a)){e[n]=a;continue}if(typeof a=="string"){e[n]=new h(a);continue}o(typeof a=="object"&&!Array.isArray(a),"Invalid message for",n);const r=n;for(n in e[r]=e[r]||{},a){const t=a[n];n==="root"||h.isTemplate(t)?e[r][n]=t:(o(typeof t=="string","Invalid message for",n,"in",r),e[r][n]=new h(t))}}return e},x.decompile=function(f){const e={};for(let n in f){const a=f[n];if(n==="root"){e.root=a;continue}if(h.isTemplate(a)){e[n]=a.describe({compact:!0});continue}const r=n;for(n in e[r]={},a){const t=a[n];n!=="root"?e[r][n]=t.describe({compact:!0}):e[r].root=t}}return e},x.merge=function(f,e){if(!f)return x.compile(e);if(!e)return f;if(typeof e=="string")return new h(e);if(h.isTemplate(e))return e;const n=y(f);for(let a in e){const r=e[a];if(a==="root"||h.isTemplate(r)){n[a]=r;continue}if(typeof r=="string"){n[a]=new h(r);continue}o(typeof r=="object"&&!Array.isArray(r),"Invalid message for",a);const t=a;for(a in n[t]=n[t]||{},r){const l=r[a];a==="root"||h.isTemplate(l)?n[t][a]=l:(o(typeof l=="string","Invalid message for",a,"in",t),n[t][a]=new h(l))}}return n}},2294:(k,x,b)=>{const o=b(375),y=b(8160),h=b(6133),f={};x.Ids=f.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const e=new f.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[n,a]of e._byId.entries())o(!this._byKey.has(n),"Schema id conflicts with existing key:",n),this._byId.set(n,a);for(const[n,a]of e._byKey.entries())o(!this._byId.has(n),"Schema key conflicts with existing id:",n),this._byKey.set(n,a)}fork(e,n,a){const r=this._collect(e);r.push({schema:a});const t=r.shift();let l={id:t.id,schema:n(t.schema)};o(y.isSchema(l.schema),"adjuster function failed to return a joi schema type");for(const s of r)l={id:s.id,schema:f.fork(s.schema,l.id,l.schema)};return l.schema}labels(e,n=[]){const a=e[0],r=this._get(a);if(!r)return[...n,...e].join(".");const t=e.slice(1);return n=[...n,r.schema._flags.label||a],t.length?r.schema._ids.labels(t,n):n.join(".")}reach(e,n=[]){const a=e[0],r=this._get(a);o(r,"Schema does not contain path",[...n,...e].join("."));const t=e.slice(1);return t.length?r.schema._ids.reach(t,[...n,a]):r.schema}register(e,{key:n}={}){if(!e||!y.isSchema(e))return;(e.$_property("schemaChain")||e._ids._schemaChain)&&(this._schemaChain=!0);const a=e._flags.id;if(a){const r=this._byId.get(a);o(!r||r.schema===e,"Cannot add different schemas with the same id:",a),o(!this._byKey.has(a),"Schema id conflicts with existing key:",a),this._byId.set(a,{schema:e,id:a})}n&&(o(!this._byKey.has(n),"Schema already contains key:",n),o(!this._byId.has(n),"Schema key conflicts with existing id:",n),this._byKey.set(n,{schema:e,id:n}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(e,n=[],a=[]){const r=e[0],t=this._get(r);o(t,"Schema does not contain path",[...n,...e].join(".")),a=[t,...a];const l=e.slice(1);return l.length?t.schema._ids._collect(l,[...n,r],a):a}_get(e){return this._byId.get(e)||this._byKey.get(e)}},f.fork=function(e,n,a){const r=x.schema(e,{each:(t,{key:l})=>{if(n===(t._flags.id||l))return a},ref:!1});return r?r.$_mutateRebuild():e},x.schema=function(e,n){let a;for(const r in e._flags){if(r[0]==="_")continue;const t=f.scan(e._flags[r],{source:"flags",name:r},n);t!==void 0&&(a=a||e.clone(),a._flags[r]=t)}for(let r=0;r<e._rules.length;++r){const t=e._rules[r],l=f.scan(t.args,{source:"rules",name:t.name},n);if(l!==void 0){a=a||e.clone();const s=Object.assign({},t);s.args=l,a._rules[r]=s,a._singleRules.get(t.name)===t&&a._singleRules.set(t.name,s)}}for(const r in e.$_terms){if(r[0]==="_")continue;const t=f.scan(e.$_terms[r],{source:"terms",name:r},n);t!==void 0&&(a=a||e.clone(),a.$_terms[r]=t)}return a},f.scan=function(e,n,a,r,t){const l=r||[];if(e===null||typeof e!="object")return;let s;if(Array.isArray(e)){for(let i=0;i<e.length;++i){const u=n.source==="terms"&&n.name==="keys"&&e[i].key,d=f.scan(e[i],n,a,[i,...l],u);d!==void 0&&(s=s||e.slice(),s[i]=d)}return s}if(a.schema!==!1&&y.isSchema(e)||a.ref!==!1&&h.isRef(e)){const i=a.each(e,{...n,path:l,key:t});return i===e?void 0:i}for(const i in e){if(i[0]==="_")continue;const u=f.scan(e[i],n,a,[i,...l],t);u!==void 0&&(s=s||Object.assign({},e),s[i]=u)}return s}},6133:(k,x,b)=>{const o=b(375),y=b(8571),h=b(9621),f=b(8160);let e;const n={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};x.create=function(a,r={}){o(typeof a=="string","Invalid reference key:",a),f.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({},n.defaults,r);delete t.prefix;const l=t.separator,s=n.context(a,l,r.prefix);if(t.type=s.type,a=s.key,t.type==="value")if(s.root&&(o(!l||a[0]!==l,"Cannot specify relative path with root prefix"),t.ancestor="root",a||(a=null)),l&&l===a)a=null,t.ancestor=0;else if(t.ancestor!==void 0)o(!l||!a||a[0]!==l,"Cannot combine prefix with ancestor option");else{const[i,u]=n.ancestor(a,l);u&&(a=a.slice(u))===""&&(a=null),t.ancestor=i}return t.path=l?a===null?[]:a.split(l):[a],new n.Ref(t)},x.in=function(a,r={}){return x.create(a,{...r,in:!0})},x.isRef=function(a){return!!a&&!!a[f.symbols.ref]},n.Ref=class{constructor(a){o(typeof a=="object","Invalid reference construction"),f.assertOptions(a,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),o([!1,void 0].includes(a.separator)||typeof a.separator=="string"&&a.separator.length===1,"Invalid separator"),o(!a.adjust||typeof a.adjust=="function","options.adjust must be a function"),o(!a.map||Array.isArray(a.map),"options.map must be an array"),o(!a.map||!a.adjust,"Cannot set both map and adjust options"),Object.assign(this,n.defaults,a),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(a,r,t,l,s={}){return o(!this.in||s.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(t.context,r,s):this.type==="local"?this._resolve(l,r,s):this.ancestor?this.ancestor==="root"?this._resolve(r.ancestors[r.ancestors.length-1],r,s):(o(this.ancestor<=r.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(r.ancestors[this.ancestor-1],r,s)):this._resolve(a,r,s)}_resolve(a,r,t){let l;if(this.type==="value"&&r.mainstay.shadow&&t.shadow!==!1&&(l=r.mainstay.shadow.get(this.absolute(r))),l===void 0&&(l=h(a,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(l=this.adjust(l)),this.map){const s=this.map.get(l);s!==void 0&&(l=s)}return r.mainstay&&r.mainstay.tracer.resolve(r,this,l),l}toString(){return this.display}absolute(a){return[...a.path.slice(0,-this.ancestor),...this.path]}clone(){return new n.Ref(this)}describe(){const a={path:this.path};this.type!=="value"&&(a.type=this.type),this.separator!=="."&&(a.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(a.ancestor=this.ancestor),this.map&&(a.map=[...this.map]);for(const r of["adjust","iterables","render"])this[r]!==null&&this[r]!==void 0&&(a[r]=this[r]);return this.in!==!1&&(a.in=!0),{ref:a}}updateDisplay(){const a=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${a}`);if(!this.separator)return void(this.display=`ref:${a}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${a}`);if(this.ancestor==="root")return void(this.display=`ref:root:${a}`);if(this.ancestor===1)return void(this.display=`ref:${a||".."}`);const r=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${r}${a||""}`}},n.Ref.prototype[f.symbols.ref]=!0,x.build=function(a){return(a=Object.assign({},n.defaults,a)).type==="value"&&a.ancestor===void 0&&(a.ancestor=1),new n.Ref(a)},n.context=function(a,r,t={}){if(a=a.trim(),t){const l=t.global===void 0?"$":t.global;if(l!==r&&a.startsWith(l))return{key:a.slice(l.length),type:"global"};const s=t.local===void 0?"#":t.local;if(s!==r&&a.startsWith(s))return{key:a.slice(s.length),type:"local"};const i=t.root===void 0?"/":t.root;if(i!==r&&a.startsWith(i))return{key:a.slice(i.length),type:"value",root:!0}}return{key:a,type:"value"}},n.ancestor=function(a,r){if(!r)return[1,0];if(a[0]!==r)return[1,0];if(a[1]!==r)return[0,1];let t=2;for(;a[t]===r;)++t;return[t-1,t]},x.toSibling=0,x.toParent=1,x.Manager=class{constructor(){this.refs=[]}register(a,r){if(a)if(r=r===void 0?x.toParent:r,Array.isArray(a))for(const t of a)this.register(t,r);else if(f.isSchema(a))for(const t of a._refs.refs)t.ancestor-r>=0&&this.refs.push({ancestor:t.ancestor-r,root:t.root});else x.isRef(a)&&a.type==="value"&&a.ancestor-r>=0&&this.refs.push({ancestor:a.ancestor-r,root:a.root}),e=e||b(3328),e.isTemplate(a)&&this.register(a.refs(),r)}get length(){return this.refs.length}clone(){const a=new x.Manager;return a.refs=y(this.refs),a}reset(){this.refs=[]}roots(){return this.refs.filter(a=>!a.ancestor).map(a=>a.root)}}},3378:(k,x,b)=>{const o=b(5107),y={};y.wrap=o.string().min(1).max(2).allow(!1),x.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:y.wrap,array:y.wrap,string:y.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(),y.nameRx=/^[a-zA-Z0-9]\w*$/,y.rule=o.object({alias:o.array().items(o.string().pattern(y.nameRx)).single(),args:o.array().items(o.string(),o.object({name:o.string().pattern(y.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()}),x.extension=o.object({type:o.alternatives([o.string(),o.object().regex()]).required(),args:o.function(),cast:o.object().pattern(y.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(y.nameRx,o.object({setter:o.string(),default:o.any()})),manifest:{build:o.function().arity(2)},messages:[o.object(),o.string()],modifiers:o.object().pattern(y.nameRx,o.function().minArity(1).maxArity(2)),overrides:o.object().pattern(y.nameRx,o.function()),prepare:o.function().maxArity(3),rebuild:o.function().arity(1),rules:o.object().pattern(y.nameRx,y.rule),terms:o.object().pattern(y.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(),x.extensions=o.array().items(o.object(),o.function().arity(1)).strict(),y.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()})},y.desc.entity=o.alternatives([o.array().items(o.link("...")),o.boolean(),o.function(),o.number(),o.string(),y.desc.buffer,y.desc.func,y.desc.ref,y.desc.regex,y.desc.special,y.desc.template,y.desc.value,o.link("/")]),y.desc.values=o.array().items(null,o.boolean(),o.function(),o.number().allow(1/0,-1/0),o.string().allow(""),o.symbol(),y.desc.buffer,y.desc.func,y.desc.override,y.desc.ref,y.desc.regex,y.desc.template,y.desc.value),y.desc.messages=o.object().pattern(/.+/,[o.string(),y.desc.template,o.object().pattern(/.+/,[o.string(),y.desc.template])]),x.description=o.object({type:o.string().required(),flags:o.object({cast:o.string(),default:o.any(),description:o.string(),empty:o.link("/"),failover:y.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(),y.desc.ref],wrap:{label:y.wrap,array:y.wrap}},externals:o.boolean(),messages:y.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:y.desc.values,invalid:y.desc.values,rules:o.array().min(1).items({name:o.string().required(),args:o.object().min(1),keep:o.boolean(),message:[o.string(),y.desc.messages],warn:o.boolean()}),keys:o.object().pattern(/.*/,o.link("/")),link:y.desc.ref}).pattern(/^[a-z]\w*$/,o.any())},493:(k,x,b)=>{const o=b(8571),y=b(9621),h=b(8160),f={value:Symbol("value")};k.exports=f.State=class{constructor(e,n,a){this.path=e,this.ancestors=n,this.mainstay=a.mainstay,this.schemas=a.schemas,this.debug=null}localize(e,n=null,a=null){const r=new f.State(e,n,this);return a&&r.schemas&&(r.schemas=[f.schemas(a),...r.schemas]),r}nest(e,n){const a=new f.State(this.path,this.ancestors,this);return a.schemas=a.schemas&&[f.schemas(e),...a.schemas],a.debug=n,a}shadow(e,n){this.mainstay.shadow=this.mainstay.shadow||new f.Shadow,this.mainstay.shadow.set(this.path,e,n)}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()}},f.schemas=function(e){return h.isSchema(e)?{schema:e}:e},f.Shadow=class{constructor(){this._values=null}set(e,n,a){if(!e.length||a==="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 l=e[t];let s=r.get(l);s||(s=new Map,r.set(l,s)),r=s}r[f.value]=n}get(e){const n=this.node(e);if(n)return n[f.value]}node(e){if(this._values)return y(this._values,e,{iterables:!0})}override(e,n){if(!this._values)return;const a=e.slice(0,-1),r=e[e.length-1],t=y(this._values,a,{iterables:!0});n?t.set(r,n):t&&t.delete(r)}}},3328:(k,x,b)=>{const o=b(375),y=b(8571),h=b(5277),f=b(1447),e=b(8160),n=b(6354),a=b(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,l){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,l){const{functions:s,...i}=l;this._settings=Object.keys(i).length?y(i):void 0,this._functions=s,this._functions&&(o(Object.keys(this._functions).every(u=>typeof u=="string"),"Functions keys must be strings"),o(Object.values(this._functions).every(u=>typeof u=="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),l=r.split(t);let s=!1;const i=[],u=l.shift();u&&i.push(u);for(const d of l){const p=d[0]!=="{",_=p?"}":"}}",v=d.indexOf(_);if(v===-1||d[1]==="{"){i.push(`{${r.decode(d)}`);continue}let c=d.slice(p?0:1,v);const m=c[0]===":";m&&(c=c.slice(1));const g=this._ref(r.decode(c),{raw:p,wrapped:m});i.push(g),typeof g!="string"&&(s=!0);const w=d.slice(v+_.length);w&&i.push(r.decode(w))}s?this._template=i:this.rendered=i.join("")}static date(t,l){return r.dateFormat[l.dateFormat].call(t)}describe(t={}){if(!this._settings&&t.compact)return this.source;const l={template:this.source};return this._settings&&(l.options=this._settings),this._functions&&(l.functions=this._functions),l}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 l of this._template)typeof l!="string"&&t.push(...l.refs);return t}resolve(t,l,s,i){return this._template&&this._template.length===1?this._part(this._template[0],t,l,s,i,{}):this.render(t,l,s,i)}_part(t,...l){return t.ref?t.ref.resolve(...l):t.formula.evaluate(l)}render(t,l,s,i,u={}){if(!this.isDynamic())return this.rendered;const d=[];for(const p of this._template)if(typeof p=="string")d.push(p);else{const _=this._part(p,t,l,s,i,u),v=r.stringify(_,t,l,s,i,u);if(v!==void 0){const c=p.raw||(u.errors&&u.errors.escapeHtml)===!1?v:h(v);d.push(r.wrap(c,p.wrapped&&s.errors.wrap.label))}}return d.join("")}_ref(t,{raw:l,wrapped:s}){const i=[],u=p=>{const _=a.create(p,this._settings);return i.push(_),v=>{const c=_.resolve(...v);return c!==void 0?c:null}};try{const p=this._functions?{...r.functions,...this._functions}:r.functions;var d=new f.Parser(t,{reference:u,functions:p,constants:r.constants})}catch(p){throw p.message=`Invalid template variable "${t}" fails due to: ${p.message}`,p}if(d.single){if(d.single.type==="reference"){const p=i[0];return{ref:p,raw:l,refs:i,wrapped:s||p.type==="local"&&p.key==="label"}}return r.stringify(d.single.value)}return{formula:d,raw:l,refs:i}}toString(){return this.source}},r.Template.prototype[e.symbols.template]=!0,r.Template.prototype.isImmutable=!0,r.encode=function(t){return t.replace(/\\(\{+)/g,(l,s)=>r.opens.slice(0,s.length)).replace(/\\(\}+)/g,(l,s)=>r.closes.slice(0,s.length))},r.decode=function(t){return t.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},r.split=function(t){const l=[];let s="";for(let i=0;i<t.length;++i){const u=t[i];if(u==="{"){let d="";for(;i+1<t.length&&t[i+1]==="{";)d+="{",++i;l.push(s),s=d}else s+=u}return l.push(s),l},r.wrap=function(t,l){return l?l.length===1?`${l}${t}${l}`:`${l[0]}${t}${l[1]}`:t},r.stringify=function(t,l,s,i,u,d={}){const p=typeof t,_=i&&i.errors&&i.errors.wrap||{};let v=!1;if(a.isRef(t)&&t.render&&(v=t.in,t=t.resolve(l,s,i,u,{in:t.in,...d})),t===null)return"null";if(p==="string")return r.wrap(t,d.arrayItems&&_.string);if(p==="number"||p==="function"||p==="symbol")return t.toString();if(p!=="object")return JSON.stringify(t);if(t instanceof Date)return r.Template.date(t,i);if(t instanceof Map){const m=[];for(const[g,w]of t.entries())m.push(`${g.toString()} -> ${w.toString()}`);t=m}if(!Array.isArray(t))return t.toString();const c=[];for(const m of t)c.push(r.stringify(m,l,s,i,u,{arrayItems:!0,...d}));return r.wrap(c.join(", "),!v&&_.array)},r.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},r.functions={if:(t,l,s)=>t?l:s,length:t=>typeof t=="string"?t.length:t&&typeof t=="object"?Array.isArray(t)?t.length:Object.keys(t).length:null,msg(t){const[l,s,i,u,d]=this,p=d.messages;if(!p)return"";const _=n.template(l,p[0],t,s,i)||n.template(l,p[1],t,s,i);return _?_.render(l,s,i,u,d):""},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,x,b)=>{const o=b(375),y=b(1687),h=b(8068),f=b(8160),e=b(3292),n=b(6354),a=b(6133),r={};k.exports=h.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:a.toSibling}},args:(t,...l)=>l.length===1&&Array.isArray(l[0])?t.try(...l[0]):t.try(...l),validate(t,l){const{schema:s,error:i,state:u,prefs:d}=l;if(s._flags.match){const _=[],v=[];for(let m=0;m<s.$_terms.matches.length;++m){const g=s.$_terms.matches[m],w=u.nest(g.schema,`match.${m}`);w.snapshot();const $=g.schema.$_validate(t,w,d);$.errors?(v.push($.errors),w.restore()):(_.push($.value),w.commit())}if(_.length===0)return{errors:i("alternatives.any",{details:v.map(m=>n.details(m,{override:!1}))})};if(s._flags.match==="one")return _.length===1?{value:_[0]}:{errors:i("alternatives.one")};if(_.length!==s.$_terms.matches.length)return{errors:i("alternatives.all",{details:v.map(m=>n.details(m,{override:!1}))})};const c=m=>m.$_terms.matches.some(g=>g.schema.type==="object"||g.schema.type==="alternatives"&&c(g.schema));return c(s)?{value:_.reduce((m,g)=>y(m,g,{mergeArrays:!1}))}:{value:_[_.length-1]}}const p=[];for(let _=0;_<s.$_terms.matches.length;++_){const v=s.$_terms.matches[_];if(v.schema){const g=u.nest(v.schema,`match.${_}`);g.snapshot();const w=v.schema.$_validate(t,g,d);if(!w.errors)return g.commit(),w;g.restore(),p.push({schema:v.schema,reports:w.errors});continue}const c=v.ref?v.ref.resolve(t,u,d):t,m=v.is?[v]:v.switch;for(let g=0;g<m.length;++g){const w=m[g],{is:$,then:j,otherwise:S}=w,O=`match.${_}${v.switch?"."+g:""}`;if($.$_match(c,u.nest($,`${O}.is`),d)){if(j)return j.$_validate(t,u.nest(j,`${O}.then`),d)}else if(S)return S.$_validate(t,u.nest(S,`${O}.otherwise`),d)}}return r.errors(p,l)},rules:{conditional:{method(t,l){o(!this._flags._endedSwitch,"Unreachable condition"),o(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),o(l.break===void 0,"Cannot use break option with alternatives conditional");const s=this.clone(),i=e.when(s,t,l),u=i.is?[i]:i.switch;for(const d of u)if(d.then&&d.otherwise){s.$_setFlag("_endedSwitch",!0,{clone:!1});break}return s.$_terms.matches.push(i),s.$_mutateRebuild()}},match:{method(t){if(o(["any","one","all"].includes(t),"Invalid alternatives match mode",t),t!=="any")for(const l of this.$_terms.matches)o(l.schema,"Cannot combine match mode",t,"with conditional rules");return this.$_setFlag("match",t)}},try:{method(...t){o(t.length,"Missing alternative schemas"),f.verifyFlat(t,"try"),o(!this._flags._endedSwitch,"Unreachable condition");const l=this.clone();for(const s of t)l.$_terms.matches.push({schema:l.$_compile(s)});return l.$_mutateRebuild()}}},overrides:{label(t){return this.$_parent("label",t).$_modify({each:(l,s)=>s.path[0]!=="is"&&typeof l._flags.label!="string"?l.label(t):void 0,ref:!1})}},rebuild(t){t.$_modify({each:l=>{f.isSchema(l)&&l.type==="array"&&t.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(t,l){if(l.matches)for(const s of l.matches){const{schema:i,ref:u,is:d,not:p,then:_,otherwise:v}=s;t=i?t.try(i):u?t.conditional(u,{is:d,then:_,not:p,otherwise:v,switch:s.switch}):t.conditional(d,{then:_,otherwise:v})}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:l,state:s}){if(!t.length)return{errors:l("alternatives.any")};if(t.length===1)return{errors:t[0].reports};const i=new Set,u=[];for(const{reports:d,schema:p}of t){if(d.length>1)return r.unmatched(t,l);const _=d[0];if(_ instanceof n.Report==0)return r.unmatched(t,l);if(_.state.path.length!==s.path.length){u.push({type:p.type,report:_});continue}if(_.code==="any.only"){for(const m of _.local.valids)i.add(m);continue}const[v,c]=_.code.split(".");c==="base"?i.add(v):u.push({type:p.type,report:_})}return u.length?u.length===1?{errors:u[0].report}:r.unmatched(t,l):{errors:l("alternatives.types",{types:[...i]})}},r.unmatched=function(t,l){const s=[];for(const i of t)s.push(...i.reports);return{errors:l("alternatives.match",n.details(s,{override:!1}))}}},8068:(k,x,b)=>{const o=b(375),y=b(7629),h=b(8160),f=b(6914);k.exports=y.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,n){return o(typeof e=="function","Method must be a function"),o(n===void 0||n&&typeof n=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:e,description:n}})},validate(e,n,{method:a}){try{return a(e,n)}catch(r){return n.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 n=this.clone();return n.$_terms.shared=n.$_terms.shared||[],n.$_terms.shared.push(e),n.$_mutateRegister(e),n}},warning:{method(e,n){return o(e&&typeof e=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:e,local:n},warn:!0})},validate:(e,n,{code:a,local:r})=>n.error(a,r),args:["code","local"],multi:!0}},modifiers:{keep(e,n=!0){e.keep=n},message(e,n){e.message=f.compile(n)},warn(e,n=!0){e.warn=n}},manifest:{build(e,n){for(const a in n){const r=n[a];if(["examples","externals","metas","notes","tags"].includes(a))for(const t of r)e=e[a.slice(0,-1)](t);else if(a!=="alterations")if(a!=="whens"){if(a==="shared")for(const t of r)e=e.shared(t)}else for(const t of r){const{ref:l,is:s,not:i,then:u,otherwise:d,concat:p}=t;e=p?e.concat(p):l?e.when(l,{is:s,not:i,then:u,otherwise:d,switch:t.switch,break:t.break}):e.when(s,{then:u,otherwise:d,break:t.break})}else{const t={};for(const{target:l,adjuster:s}of r)t[l]=s;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,x,b)=>{const o=b(375),y=b(9474),h=b(9621),f=b(8068),e=b(8160),n=b(3292),a={};k.exports=f.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:l,prefs:s}){if(!Array.isArray(r))return;const i=t.$_getRule("sort");return i?a.sort(t,r,i.args.options,l,s):void 0}},validate(r,{schema:t,error:l}){if(!Array.isArray(r)){if(t._flags.single){const s=[r];return s[e.symbols.arraySingle]=!0,{value:s}}return{errors:l("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:l,error:s},{schema:i}){const u=[r,...t.ancestors];for(let p=0;p<r.length;++p){const _=t.localize([...t.path,p],u,i);if(i.$_match(r[p],_,l))return r}const d=i._flags.label;return d?s("array.hasKnown",{patternLabel:d}):s("array.hasUnknown",null)},multi:!0},items:{method(...r){e.verifyFlat(r,"items");const t=this.$_addRule("items");for(let l=0;l<r.length;++l){const s=e.tryWithPath(()=>this.$_compile(r[l]),l,{append:!0});t.$_terms.items.push(s)}return t.$_mutateRebuild()},validate(r,{schema:t,error:l,state:s,prefs:i,errorsArray:u}){const d=t.$_terms._requireds.slice(),p=t.$_terms.ordered.slice(),_=[...t.$_terms._inclusions,...d],v=!r[e.symbols.arraySingle];delete r[e.symbols.arraySingle];const c=u();let m=r.length;for(let g=0;g<m;++g){const w=r[g];let $=!1,j=!1;const S=v?g:new Number(g),O=[...s.path,S];if(!t._flags.sparse&&w===void 0){if(c.push(l("array.sparse",{key:S,path:O,pos:g,value:void 0},s.localize(O))),i.abortEarly)return c;p.shift();continue}const C=[r,...s.ancestors];for(const L of t.$_terms._exclusions)if(L.$_match(w,s.localize(O,C,L),i,{presence:"ignore"})){if(c.push(l("array.excludes",{pos:g,value:w},s.localize(O))),i.abortEarly)return c;$=!0,p.shift();break}if($)continue;if(t.$_terms.ordered.length){if(p.length){const L=p.shift(),T=L.$_validate(w,s.localize(O,C,L),i);if(T.errors){if(c.push(...T.errors),i.abortEarly)return c}else if(L._flags.result==="strip")a.fastSplice(r,g),--g,--m;else{if(!t._flags.sparse&&T.value===void 0){if(c.push(l("array.sparse",{key:S,path:O,pos:g,value:void 0},s.localize(O))),i.abortEarly)return c;continue}r[g]=T.value}continue}if(!t.$_terms.items.length){if(c.push(l("array.orderedLength",{pos:g,limit:t.$_terms.ordered.length})),i.abortEarly)return c;break}}const I=[];let P=d.length;for(let L=0;L<P;++L){const T=s.localize(O,C,d[L]);T.snapshot();const z=d[L].$_validate(w,T,i);if(I[L]=z,!z.errors){if(T.commit(),r[g]=z.value,j=!0,a.fastSplice(d,L),--L,--P,!t._flags.sparse&&z.value===void 0&&(c.push(l("array.sparse",{key:S,path:O,pos:g,value:void 0},s.localize(O))),i.abortEarly))return c;break}T.restore()}if(j)continue;const q=i.stripUnknown&&!!i.stripUnknown.arrays||!1;P=_.length;for(const L of _){let T;const z=d.indexOf(L);if(z!==-1)T=I[z];else{const W=s.localize(O,C,L);if(W.snapshot(),T=L.$_validate(w,W,i),!T.errors){W.commit(),L._flags.result==="strip"?(a.fastSplice(r,g),--g,--m):t._flags.sparse||T.value!==void 0?r[g]=T.value:(c.push(l("array.sparse",{key:S,path:O,pos:g,value:void 0},s.localize(O))),$=!0),j=!0;break}W.restore()}if(P===1){if(q){a.fastSplice(r,g),--g,--m,j=!0;break}if(c.push(...T.errors),i.abortEarly)return c;$=!0;break}}if(!$&&(t.$_terms._inclusions.length||t.$_terms._requireds.length)&&!j){if(q){a.fastSplice(r,g),--g,--m;continue}if(c.push(l("array.includes",{pos:g,value:w},s.localize(O))),i.abortEarly)return c}}return d.length&&a.fillMissedErrors(t,c,d,r,s,i),p.length&&(a.fillOrderedErrors(t,c,p,r,s,i),c.length||a.fillDefault(p,r,s,i)),c.length?c:r},priority:!0,manifest:!1},length:{method(r){return this.$_addRule({name:"length",args:{limit:r},operator:"="})},validate:(r,t,{limit:l},{name:s,operator:i,args:u})=>e.compare(r.length,l,i)?r:t.error("array."+s,{limit:u.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 l=0;l<r.length;++l){const s=e.tryWithPath(()=>this.$_compile(r[l]),l,{append:!0});a.validateSingle(s,t),t.$_mutateRegister(s),t.$_terms.ordered.push(s)}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=n.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:l,prefs:s,schema:i},{options:u}){const{value:d,errors:p}=a.sort(i,r,u,l,s);if(p)return p;for(let _=0;_<r.length;++_)if(r[_]!==d[_])return t("array.sort",{order:u.order,by:u.by?u.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 l={name:"unique",args:{options:t,comparator:r}};if(r)if(typeof r=="string"){const s=e.default(t.separator,".");l.path=s?r.split(s):[r]}else l.comparator=r;return this.$_addRule(l)},validate(r,{state:t,error:l,schema:s},{comparator:i,options:u},{comparator:d,path:p}){const _={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},v=d||y,c=u.ignoreUndefined;for(let m=0;m<r.length;++m){const g=p?h(r[m],p):r[m],w=d?_.custom:_[typeof g];if(o(w,"Failed to find unique map container for type",typeof g),w instanceof Map){const $=w.entries();let j;for(;!(j=$.next()).done;)if(v(j.value[0],g)){const S=t.localize([...t.path,m],[r,...t.ancestors]),O={pos:m,value:r[m],dupePos:j.value[1],dupeValue:r[j.value[1]]};return p&&(O.path=i),l("array.unique",O,S)}w.set(g,m)}else{if((!c||g!==void 0)&&w[g]!==void 0){const $={pos:m,value:r[m],dupePos:w[g],dupeValue:r[w[g]]};return p&&($.path=i),l("array.unique",$,t.localize([...t.path,m],[r,...t.ancestors]))}w[g]=m}}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)a.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)a.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"}}),a.fillMissedErrors=function(r,t,l,s,i,u){const d=[];let p=0;for(const _ of l){const v=_._flags.label;v?d.push(v):++p}d.length?p?t.push(r.$_createError("array.includesRequiredBoth",s,{knownMisses:d,unknownMisses:p},i,u)):t.push(r.$_createError("array.includesRequiredKnowns",s,{knownMisses:d},i,u)):t.push(r.$_createError("array.includesRequiredUnknowns",s,{unknownMisses:p},i,u))},a.fillOrderedErrors=function(r,t,l,s,i,u){const d=[];for(const p of l)p._flags.presence==="required"&&d.push(p);d.length&&a.fillMissedErrors(r,t,d,s,i,u)},a.fillDefault=function(r,t,l,s){const i=[];let u=!0;for(let d=r.length-1;d>=0;--d){const p=r[d],_=[t,...l.ancestors],v=p.$_validate(void 0,l.localize(l.path,_,p),s).value;if(u){if(v===void 0)continue;u=!1}i.unshift(v)}i.length&&t.push(...i)},a.fastSplice=function(r,t){let l=t;for(;l<r.length;)r[l++]=r[l];--r.length},a.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}))},a.sort=function(r,t,l,s,i){const u=l.order==="ascending"?1:-1,d=-1*u,p=u,_=(v,c)=>{let m=a.compare(v,c,d,p);if(m!==null||(l.by&&(v=l.by.resolve(v,s,i),c=l.by.resolve(c,s,i)),m=a.compare(v,c,d,p),m!==null))return m;const g=typeof v;if(g!==typeof c)throw r.$_createError("array.sort.mismatching",t,null,s,i);if(g!=="number"&&g!=="string")throw r.$_createError("array.sort.unsupported",t,{type:g},s,i);return g==="number"?(v-c)*u:v<c?d:p};try{return{value:t.slice().sort(_)}}catch(v){return{errors:v}}},a.compare=function(r,t,l,s){return r===t?0:r===void 0?1:t===void 0?-1:r===null?s:t===null?l:null}},4937:(k,x,b)=>{const o=b(375),y=b(8068),h=b(8160),f=b(2036),e={isBool:function(n){return typeof n=="boolean"}};k.exports=y.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(n,{schema:a}){if(typeof n!="boolean"){if(typeof n=="string"){const r=a._flags.sensitive?n:n.toLowerCase();n=r==="true"||r!=="false"&&n}return typeof n!="boolean"&&(n=a.$_terms.truthy&&a.$_terms.truthy.has(n,null,null,!a._flags.sensitive)||(!a.$_terms.falsy||!a.$_terms.falsy.has(n,null,null,!a._flags.sensitive))&&n),{value:n}}},validate(n,{error:a}){if(typeof n!="boolean")return{value:n,errors:a("boolean.base")}},rules:{truthy:{method(...n){h.verifyFlat(n,"truthy");const a=this.clone();a.$_terms.truthy=a.$_terms.truthy||new f;for(let r=0;r<n.length;++r){const t=n[r];o(t!==void 0,"Cannot call truthy with undefined"),a.$_terms.truthy.add(t)}return a}},falsy:{method(...n){h.verifyFlat(n,"falsy");const a=this.clone();a.$_terms.falsy=a.$_terms.falsy||new f;for(let r=0;r<n.length;++r){const t=n[r];o(t!==void 0,"Cannot call falsy with undefined"),a.$_terms.falsy.add(t)}return a}},sensitive:{method(n=!0){return this.$_setFlag("sensitive",n)}}},cast:{number:{from:e.isBool,to:(n,a)=>n?1:0},string:{from:e.isBool,to:(n,a)=>n?"true":"false"}},manifest:{build:(n,a)=>(a.truthy&&(n=n.truthy(...a.truthy)),a.falsy&&(n=n.falsy(...a.falsy)),n)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(k,x,b)=>{const o=b(375),y=b(8068),h=b(8160),f=b(3328),e={isDate:function(n){return n instanceof Date}};k.exports=y.extend({type:"date",coerce:{from:["number","string"],method:(n,{schema:a})=>({value:e.parse(n,a._flags.format)||n})},validate(n,{schema:a,error:r,prefs:t}){if(n instanceof Date&&!isNaN(n.getTime()))return;const l=a._flags.format;return t.convert&&l&&typeof n=="string"?{value:n,errors:r("date.format",{format:l})}:{value:n,errors:r("date.base")}},rules:{compare:{method:!1,validate(n,a,{date:r},{name:t,operator:l,args:s}){const i=r==="now"?Date.now():r.getTime();return h.compare(n.getTime(),i,l)?n:a.error("date."+t,{limit:s.date,value:n})},args:[{name:"date",ref:!0,normalize:n=>n==="now"?n:e.parse(n),assert:n=>n!==null,message:"must have a valid date format"}]},format:{method(n){return o(["iso","javascript","unix"].includes(n),"Unknown date format",n),this.$_setFlag("format",n)}},greater:{method(n){return this.$_addRule({name:"greater",method:"compare",args:{date:n},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(n){return this.$_addRule({name:"less",method:"compare",args:{date:n},operator:"<"})}},max:{method(n){return this.$_addRule({name:"max",method:"compare",args:{date:n},operator:"<="})}},min:{method(n){return this.$_addRule({name:"min",method:"compare",args:{date:n},operator:">="})}},timestamp:{method(n="javascript"){return o(["javascript","unix"].includes(n),'"type" must be one of "javascript, unix"'),this.format(n)}}},cast:{number:{from:e.isDate,to:(n,a)=>n.getTime()},string:{from:e.isDate,to:(n,{prefs:a})=>f.date(n,a)}},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(n,a){if(n instanceof Date)return n;if(typeof n!="string"&&(isNaN(n)||!isFinite(n))||/^\s*$/.test(n))return null;if(a==="iso")return h.isIsoDate(n)?e.date(n.toString()):null;const r=n;if(typeof n=="string"&&/^[+-]?\d+(\.\d+)?$/.test(n)&&(n=parseFloat(n)),a){if(a==="javascript")return e.date(1*n);if(a==="unix")return e.date(1e3*n);if(typeof r=="string")return null}return e.date(n)},e.date=function(n){const a=new Date(n);return isNaN(a.getTime())?null:a}},390:(k,x,b)=>{const o=b(375),y=b(7824);k.exports=y.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,f,{n:e})=>h.length===e?h:f.error("function.arity",{n:e})},class:{method(){return this.$_addRule("class")},validate:(h,f)=>/^\s*class\s/.test(h.toString())?h:f.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,f,{n:e})=>h.length>=e?h:f.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,f,{n:e})=>h.length<=e?h:f.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,x,b)=>{const o=b(978),y=b(375),h=b(8571),f=b(3652),e=b(8068),n=b(8160),a=b(3292),r=b(6354),t=b(6133),l=b(3328),s={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:(i,u)=>i.keys(u),validate(i,{schema:u,error:d,state:p,prefs:_}){if(!i||typeof i!==u.$_property("typeof")||Array.isArray(i))return{value:i,errors:d("object.base",{type:u.$_property("typeof")})};if(!(u.$_terms.renames||u.$_terms.dependencies||u.$_terms.keys||u.$_terms.patterns||u.$_terms.externals))return;i=s.clone(i,_);const v=[];if(u.$_terms.renames&&!s.rename(u,i,p,_,v))return{value:i,errors:v};if(!u.$_terms.keys&&!u.$_terms.patterns&&!u.$_terms.dependencies)return{value:i,errors:v};const c=new Set(Object.keys(i));if(u.$_terms.keys){const m=[i,...p.ancestors];for(const g of u.$_terms.keys){const w=g.key,$=i[w];c.delete(w);const j=p.localize([...p.path,w],m,g),S=g.schema.$_validate($,j,_);if(S.errors){if(_.abortEarly)return{value:i,errors:S.errors};S.value!==void 0&&(i[w]=S.value),v.push(...S.errors)}else g.schema._flags.result==="strip"||S.value===void 0&&$!==void 0?delete i[w]:S.value!==void 0&&(i[w]=S.value)}}if(c.size||u._flags._hasPatternMatch){const m=s.unknown(u,i,c,v,p,_);if(m)return m}if(u.$_terms.dependencies)for(const m of u.$_terms.dependencies){if(m.key!==null&&s.isPresent(m.options)(m.key.resolve(i,p,_,null,{shadow:!1}))===!1)continue;const g=s.dependencies[m.rel](u,m,i,p,_);if(g){const w=u.$_createError(g.code,i,g.context,p,_);if(_.abortEarly)return{value:i,errors:w};v.push(w)}}return{value:i,errors:v}},rules:{and:{method(...i){return n.verifyFlat(i,"and"),s.dependency(this,"and",null,i)}},append:{method(i){return i==null||Object.keys(i).length===0?this:this.keys(i)}},assert:{method(i,u,d){l.isTemplate(i)||(i=a.ref(i)),y(d===void 0||typeof d=="string","Message must be a string"),u=this.$_compile(u,{appendPath:!0});const p=this.$_addRule({name:"assert",args:{subject:i,schema:u,message:d}});return p.$_mutateRegister(i),p.$_mutateRegister(u),p},validate(i,{error:u,prefs:d,state:p},{subject:_,schema:v,message:c}){const m=_.resolve(i,p,d),g=t.isRef(_)?_.absolute(p):[];return v.$_match(m,p.localize(g,[i,...p.ancestors],v),d)?i:u("object.assert",{subject:_,message:c})},args:["subject","schema","message"],multi:!0},instance:{method(i,u){return y(typeof i=="function","constructor must be a function"),u=u||i.name,this.$_addRule({name:"instance",args:{constructor:i,name:u}})},validate:(i,u,{constructor:d,name:p})=>i instanceof d?i:u.error("object.instance",{type:p,value:i}),args:["constructor","name"]},keys:{method(i){y(i===void 0||typeof i=="object","Object schema must be a valid object"),y(!n.isSchema(i),"Object schema cannot be a joi schema");const u=this.clone();if(i)if(Object.keys(i).length){u.$_terms.keys=u.$_terms.keys?u.$_terms.keys.filter(d=>!i.hasOwnProperty(d.key)):new s.Keys;for(const d in i)n.tryWithPath(()=>u.$_terms.keys.push({key:d,schema:this.$_compile(i[d])}),d)}else u.$_terms.keys=new s.Keys;else u.$_terms.keys=null;return u.$_mutateRebuild()}},length:{method(i){return this.$_addRule({name:"length",args:{limit:i},operator:"="})},validate:(i,u,{limit:d},{name:p,operator:_,args:v})=>n.compare(Object.keys(i).length,d,_)?i:u.error("object."+p,{limit:v.limit,value:i}),args:[{name:"limit",ref:!0,assert:n.limit,message:"must be a positive integer"}]},max:{method(i){return this.$_addRule({name:"max",method:"length",args:{limit:i},operator:"<="})}},min:{method(i){return this.$_addRule({name:"min",method:"length",args:{limit:i},operator:">="})}},nand:{method(...i){return n.verifyFlat(i,"nand"),s.dependency(this,"nand",null,i)}},or:{method(...i){return n.verifyFlat(i,"or"),s.dependency(this,"or",null,i)}},oxor:{method(...i){return s.dependency(this,"oxor",null,i)}},pattern:{method(i,u,d={}){const p=i instanceof RegExp;p||(i=this.$_compile(i,{appendPath:!0})),y(u!==void 0,"Invalid rule"),n.assertOptions(d,["fallthrough","matches"]),p&&y(!i.flags.includes("g")&&!i.flags.includes("y"),"pattern should not use global or sticky mode"),u=this.$_compile(u,{appendPath:!0});const _=this.clone();_.$_terms.patterns=_.$_terms.patterns||[];const v={[p?"regex":"schema"]:i,rule:u};return d.matches&&(v.matches=this.$_compile(d.matches),v.matches.type!=="array"&&(v.matches=v.matches.$_root.array().items(v.matches)),_.$_mutateRegister(v.matches),_.$_setFlag("_hasPatternMatch",!0,{clone:!1})),d.fallthrough&&(v.fallthrough=!0),_.$_terms.patterns.push(v),_.$_mutateRegister(u),_}},ref:{method(){return this.$_addRule("ref")},validate:(i,u)=>t.isRef(i)?i:u.error("object.refType",{value:i})},regex:{method(){return this.$_addRule("regex")},validate:(i,u)=>i instanceof RegExp?i:u.error("object.regex",{value:i})},rename:{method(i,u,d={}){y(typeof i=="string"||i instanceof RegExp,"Rename missing the from argument"),y(typeof u=="string"||u instanceof l,"Invalid rename to argument"),y(u!==i,"Cannot rename key to same name:",i),n.assertOptions(d,["alias","ignoreUndefined","override","multiple"]);const p=this.clone();p.$_terms.renames=p.$_terms.renames||[];for(const _ of p.$_terms.renames)y(_.from!==i,"Cannot rename the same key multiple times");return u instanceof l&&p.$_mutateRegister(u),p.$_terms.renames.push({from:i,to:u,options:o(s.renameDefaults,d)}),p}},schema:{method(i="any"){return this.$_addRule({name:"schema",args:{type:i}})},validate:(i,u,{type:d})=>!n.isSchema(i)||d!=="any"&&i.type!==d?u.error("object.schema",{type:d}):i},unknown:{method(i){return this.$_setFlag("unknown",i!==!1)}},with:{method(i,u,d={}){return s.dependency(this,"with",i,u,d)}},without:{method(i,u,d={}){return s.dependency(this,"without",i,u,d)}},xor:{method(...i){return n.verifyFlat(i,"xor"),s.dependency(this,"xor",null,i)}}},overrides:{default(i,u){return i===void 0&&(i=n.symbols.deepDefault),this.$_parent("default",i,u)}},rebuild(i){if(i.$_terms.keys){const u=new f.Sorter;for(const d of i.$_terms.keys)n.tryWithPath(()=>u.add(d,{after:d.schema.$_rootReferences(),group:d.key}),d.key);i.$_terms.keys=new s.Keys(...u.nodes)}},manifest:{build(i,u){if(u.keys&&(i=i.keys(u.keys)),u.dependencies)for(const{rel:d,key:p=null,peers:_,options:v}of u.dependencies)i=s.dependency(i,d,p,_,v);if(u.patterns)for(const{regex:d,schema:p,rule:_,fallthrough:v,matches:c}of u.patterns)i=i.pattern(d||p,_,{fallthrough:v,matches:c});if(u.renames)for(const{from:d,to:p,options:_}of u.renames)i=i.rename(d,p,_);return i}},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}}"}}),s.clone=function(i,u){if(typeof i=="object"){if(u.nonEnumerables)return h(i,{shallow:!0});const p=Object.create(Object.getPrototypeOf(i));return Object.assign(p,i),p}const d=function(...p){return i.apply(this,p)};return d.prototype=h(i.prototype),Object.defineProperty(d,"name",{value:i.name,writable:!1}),Object.defineProperty(d,"length",{value:i.length,writable:!1}),Object.assign(d,i),d},s.dependency=function(i,u,d,p,_){y(d===null||typeof d=="string",u,"key must be a strings"),_||(_=p.length>1&&typeof p[p.length-1]=="object"?p.pop():{}),n.assertOptions(_,["separator","isPresent"]),p=[].concat(p);const v=n.default(_.separator,"."),c=[];for(const g of p)y(typeof g=="string",u,"peers must be strings"),c.push(a.ref(g,{separator:v,ancestor:0,prefix:!1}));d!==null&&(d=a.ref(d,{separator:v,ancestor:0,prefix:!1}));const m=i.clone();return m.$_terms.dependencies=m.$_terms.dependencies||[],m.$_terms.dependencies.push(new s.Dependency(u,d,c,p,_)),m},s.dependencies={and(i,u,d,p,_){const v=[],c=[],m=u.peers.length,g=s.isPresent(u.options);for(const w of u.peers)g(w.resolve(d,p,_,null,{shadow:!1}))===!1?v.push(w.key):c.push(w.key);if(v.length!==m&&c.length!==m)return{code:"object.and",context:{present:c,presentWithLabels:s.keysToLabels(i,c),missing:v,missingWithLabels:s.keysToLabels(i,v)}}},nand(i,u,d,p,_){const v=[],c=s.isPresent(u.options);for(const w of u.peers)c(w.resolve(d,p,_,null,{shadow:!1}))&&v.push(w.key);if(v.length!==u.peers.length)return;const m=u.paths[0],g=u.paths.slice(1);return{code:"object.nand",context:{main:m,mainWithLabel:s.keysToLabels(i,m),peers:g,peersWithLabels:s.keysToLabels(i,g)}}},or(i,u,d,p,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,p,_,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:u.paths,peersWithLabels:s.keysToLabels(i,u.paths)}}},oxor(i,u,d,p,_){const v=[],c=s.isPresent(u.options);for(const g of u.peers)c(g.resolve(d,p,_,null,{shadow:!1}))&&v.push(g.key);if(!v.length||v.length===1)return;const m={peers:u.paths,peersWithLabels:s.keysToLabels(i,u.paths)};return m.present=v,m.presentWithLabels=s.keysToLabels(i,v),{code:"object.oxor",context:m}},with(i,u,d,p,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,p,_,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:u.key.key,mainWithLabel:s.keysToLabels(i,u.key.key),peer:c.key,peerWithLabel:s.keysToLabels(i,c.key)}}},without(i,u,d,p,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,p,_,null,{shadow:!1})))return{code:"object.without",context:{main:u.key.key,mainWithLabel:s.keysToLabels(i,u.key.key),peer:c.key,peerWithLabel:s.keysToLabels(i,c.key)}}},xor(i,u,d,p,_){const v=[],c=s.isPresent(u.options);for(const g of u.peers)c(g.resolve(d,p,_,null,{shadow:!1}))&&v.push(g.key);if(v.length===1)return;const m={peers:u.paths,peersWithLabels:s.keysToLabels(i,u.paths)};return v.length===0?{code:"object.missing",context:m}:(m.present=v,m.presentWithLabels=s.keysToLabels(i,v),{code:"object.xor",context:m})}},s.keysToLabels=function(i,u){return Array.isArray(u)?u.map(d=>i.$_mapLabels(d)):i.$_mapLabels(u)},s.isPresent=function(i){return typeof i.isPresent=="function"?i.isPresent:u=>u!==void 0},s.rename=function(i,u,d,p,_){const v={};for(const c of i.$_terms.renames){const m=[],g=typeof c.from!="string";if(g)for(const w in u){if(u[w]===void 0&&c.options.ignoreUndefined||w===c.to)continue;const $=c.from.exec(w);$&&m.push({from:w,to:c.to,match:$})}else!Object.prototype.hasOwnProperty.call(u,c.from)||u[c.from]===void 0&&c.options.ignoreUndefined||m.push(c);for(const w of m){const $=w.from;let j=w.to;if(j instanceof l&&(j=j.render(u,d,p,w.match)),$!==j){if(!c.options.multiple&&v[j]&&(_.push(i.$_createError("object.rename.multiple",u,{from:$,to:j,pattern:g},d,p)),p.abortEarly)||Object.prototype.hasOwnProperty.call(u,j)&&!c.options.override&&!v[j]&&(_.push(i.$_createError("object.rename.override",u,{from:$,to:j,pattern:g},d,p)),p.abortEarly))return!1;u[$]===void 0?delete u[j]:u[j]=u[$],v[j]=!0,c.options.alias||delete u[$]}}}return!0},s.unknown=function(i,u,d,p,_,v){if(i.$_terms.patterns){let c=!1;const m=i.$_terms.patterns.map(w=>{if(w.matches)return c=!0,[]}),g=[u,..._.ancestors];for(const w of d){const $=u[w],j=[..._.path,w];for(let S=0;S<i.$_terms.patterns.length;++S){const O=i.$_terms.patterns[S];if(O.regex){const P=O.regex.test(w);if(_.mainstay.tracer.debug(_,"rule",`pattern.${S}`,P?"pass":"error"),!P)continue}else if(!O.schema.$_match(w,_.nest(O.schema,`pattern.${S}`),v))continue;d.delete(w);const C=_.localize(j,g,{schema:O.rule,key:w}),I=O.rule.$_validate($,C,v);if(I.errors){if(v.abortEarly)return{value:u,errors:I.errors};p.push(...I.errors)}if(O.matches&&m[S].push(w),u[w]=I.value,!O.fallthrough)break}}if(c)for(let w=0;w<m.length;++w){const $=m[w];if(!$)continue;const j=i.$_terms.patterns[w].matches,S=_.localize(_.path,g,j),O=j.$_validate($,S,v);if(O.errors){const C=r.details(O.errors,{override:!1});C.matches=$;const I=i.$_createError("object.pattern.match",u,C,_,v);if(v.abortEarly)return{value:u,errors:I};p.push(I)}}}if(d.size&&(i.$_terms.keys||i.$_terms.patterns)){if(v.stripUnknown&&!i._flags.unknown||v.skipFunctions){const c=!(!v.stripUnknown||v.stripUnknown!==!0&&!v.stripUnknown.objects);for(const m of d)c?(delete u[m],d.delete(m)):typeof u[m]=="function"&&d.delete(m)}if(!n.default(i._flags.unknown,v.allowUnknown))for(const c of d){const m=_.localize([..._.path,c],[]),g=i.$_createError("object.unknown",u[c],{child:c},m,v,{flags:!1});if(v.abortEarly)return{value:u,errors:g};p.push(g)}}},s.Dependency=class{constructor(i,u,d,p,_){this.rel=i,this.key=u,this.peers=d,this.paths=p,this.options=_}describe(){const i={rel:this.rel,peers:this.paths};return this.key!==null&&(i.key=this.key.key),this.peers[0].separator!=="."&&(i.options={...i.options,separator:this.peers[0].separator}),this.options.isPresent&&(i.options={...i.options,isPresent:this.options.isPresent}),i}},s.Keys=class extends Array{concat(i){const u=this.slice(),d=new Map;for(let p=0;p<u.length;++p)d.set(u[p].key,p);for(const p of i){const _=p.key,v=d.get(_);v!==void 0?u[v]={key:_,schema:u[v].schema.concat(p.schema)}:u.push(p)}return u}}},8785:(k,x,b)=>{const o=b(375),y=b(8068),h=b(8160),f=b(3292),e=b(6354),n={};k.exports=y.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(a,r)=>a.ref(r),validate(a,{schema:r,state:t,prefs:l}){o(r.$_terms.link,"Uninitialized link schema");const s=n.generate(r,a,t,l),i=r.$_terms.link[0].ref;return s.$_validate(a,t.nest(s,`link:${i.display}:${s.type}`),l)},generate:(a,r,t,l)=>n.generate(a,r,t,l),rules:{ref:{method(a){o(!this.$_terms.link,"Cannot reinitialize schema"),a=f.ref(a),o(a.type==="value"||a.type==="local","Invalid reference type:",a.type),o(a.type==="local"||a.ancestor==="root"||a.ancestor>0,"Link cannot reference itself");const r=this.clone();return r.$_terms.link=[{ref:a}],r}},relative:{method(a=!0){return this.$_setFlag("relative",a)}}},overrides:{concat(a){o(this.$_terms.link,"Uninitialized link schema"),o(h.isSchema(a),"Invalid schema object"),o(a.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:a}),r.$_mutateRebuild()}},manifest:{build:(a,r)=>(o(r.link,"Invalid link description missing link"),a.ref(r.link))}}),n.generate=function(a,r,t,l){let s=t.mainstay.links.get(a);if(s)return s._generate(r,t,l).schema;const i=a.$_terms.link[0].ref,{perspective:u,path:d}=n.perspective(i,t);n.assert(u,"which is outside of schema boundaries",i,a,t,l);try{s=d.length?u.$_reach(d):u}catch{n.assert(!1,"to non-existing schema",i,a,t,l)}return n.assert(s.type!=="link","which is another link",i,a,t,l),a._flags.relative||t.mainstay.links.set(a,s),s._generate(r,t,l).schema},n.perspective=function(a,r){if(a.type==="local"){for(const{schema:t,key:l}of r.schemas){if((t._flags.id||l)===a.path[0])return{perspective:t,path:a.path.slice(1)};if(t.$_terms.shared){for(const s of t.$_terms.shared)if(s._flags.id===a.path[0])return{perspective:s,path:a.path.slice(1)}}}return{perspective:null,path:null}}return a.ancestor==="root"?{perspective:r.schemas[r.schemas.length-1].schema,path:a.path}:{perspective:r.schemas[a.ancestor]&&r.schemas[a.ancestor].schema,path:a.path}},n.assert=function(a,r,t,l,s,i){a||o(!1,`"${e.label(l._flags,s,i)}" contains link reference "${t.display}" ${r}`)}},3832:(k,x,b)=>{const o=b(375),y=b(8068),h=b(8160),f={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(e){const n=e.toString(),a=n.indexOf("."),r=n.indexOf("e");return(a<0?0:(r<0?n.length:r)-a-1)+(r<0?0:Math.max(0,-parseInt(n.slice(r+1))))}};k.exports=y.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(e,{schema:n,error:a}){if(!e.match(f.numberRx))return;e=e.trim();const r={value:parseFloat(e)};if(r.value===0&&(r.value=0),!n._flags.unsafe)if(e.match(/e/i)){if(f.extractSignificantDigits(e)!==f.extractSignificantDigits(String(r.value)))return r.errors=a("number.unsafe"),r}else{const t=r.value.toString();if(t.match(/e/i))return r;if(t!==f.normalizeDecimal(e))return r.errors=a("number.unsafe"),r}return r}},validate(e,{schema:n,error:a,prefs:r}){if(e===1/0||e===-1/0)return{value:e,errors:a("number.infinity")};if(!h.isNumber(e))return{value:e,errors:a("number.base")};const t={value:e};if(r.convert){const l=n.$_getRule("precision");if(l){const s=Math.pow(10,l.args.limit);t.value=Math.round(t.value*s)/s}}return t.value===0&&(t.value=0),!n._flags.unsafe&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.errors=a("number.unsafe")),t},rules:{compare:{method:!1,validate:(e,n,{limit:a},{name:r,operator:t,args:l})=>h.compare(e,a,t)?e:n.error("number."+r,{limit:l.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,n)=>Math.trunc(e)-e==0?e:n.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 n=typeof e=="number"?f.decimalPlaces(e):null,a=Math.pow(10,n);return this.$_addRule({name:"multiple",args:{base:e,baseDecimalPlace:n,pfactor:a}})},validate:(e,n,{base:a,baseDecimalPlace:r,pfactor:t},l)=>f.decimalPlaces(e)>r?n.error("number.multiple",{multiple:l.args.base,value:e}):Math.round(t*e)%Math.round(t*a)==0?e:n.error("number.multiple",{multiple:l.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,n)=>Number.isSafeInteger(e)&&e>=0&&e<=65535?e:n.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,n,{limit:a}){const r=e.toString().match(f.precisionRx);return Math.max((r[1]?r[1].length:0)-(r[2]?parseInt(r[2],10):0),0)<=a?e:n.error("number.precision",{limit:a,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,n,{sign:a})=>a==="negative"&&e<0||a==="positive"&&e>0?e:n.error(`number.${a}`)},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,n)=>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"}}),f.extractSignificantDigits=function(e){return e.replace(f.exponentialPartRegex,"").replace(f.dotRegex,"").replace(f.trailingZerosRegex,"").replace(f.leadingSignAndZerosRegex,"")},f.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,x,b)=>{const o=b(7824);k.exports=o.extend({type:"object",cast:{map:{from:y=>y&&typeof y=="object",to:(y,h)=>new Map(Object.entries(y))}}})},7417:(k,x,b)=>{const o=b(375),y=b(5380),h=b(1745),f=b(9959),e=b(6064),n=b(9926),a=b(5752),r=b(8068),t=b(8160),l={tlds:n instanceof Set&&{tlds:{allow:n,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:f.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(s,{schema:i,state:u,prefs:d}){const p=i.$_getRule("normalize");p&&(s=s.normalize(p.args.form));const _=i.$_getRule("case");_&&(s=_.args.direction==="upper"?s.toLocaleUpperCase():s.toLocaleLowerCase());const v=i.$_getRule("trim");if(v&&v.args.enabled&&(s=s.trim()),i.$_terms.replacements)for(const m of i.$_terms.replacements)s=s.replace(m.pattern,m.replacement);const c=i.$_getRule("hex");if(c&&c.args.options.byteAligned&&s.length%2!=0&&(s=`0${s}`),i.$_getRule("isoDate")){const m=l.isoDate(s);m&&(s=m)}if(i._flags.truncate){const m=i.$_getRule("max");if(m){let g=m.args.limit;if(t.isResolvable(g)&&(g=g.resolve(s,u,d),!t.limit(g)))return{value:s,errors:i.$_createError("any.ref",g,{ref:m.args.limit,arg:"limit",reason:"must be a positive integer"},u,d)};s=s.slice(0,g)}}return{value:s}}},validate(s,{schema:i,error:u}){if(typeof s!="string")return{value:s,errors:u("string.base")};if(s===""){const d=i.$_getRule("min");return d&&d.args.limit===0?void 0:{value:s,errors:u("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(s,i)=>/^[a-zA-Z0-9]+$/.test(s)?s:i.error("string.alphanum")},base64:{method(s={}){return t.assertOptions(s,["paddingRequired","urlSafe"]),s={urlSafe:!1,paddingRequired:!0,...s},o(typeof s.paddingRequired=="boolean","paddingRequired must be boolean"),o(typeof s.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:s}})},validate:(s,i,{options:u})=>l.base64Regex[u.paddingRequired][u.urlSafe].test(s)?s:i.error("string.base64")},case:{method(s){return o(["lower","upper"].includes(s),"Invalid case:",s),this.$_addRule({name:"case",args:{direction:s}})},validate:(s,i,{direction:u})=>u==="lower"&&s===s.toLocaleLowerCase()||u==="upper"&&s===s.toLocaleUpperCase()?s:i.error(`string.${u}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(s,i){let u=s.length,d=0,p=1;for(;u--;){const _=s.charAt(u)*p;d+=_-9*(_>9),p^=3}return d>0&&d%10==0?s:i.error("string.creditCard")}},dataUri:{method(s={}){return t.assertOptions(s,["paddingRequired"]),s={paddingRequired:!0,...s},o(typeof s.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:s}})},validate(s,i,{options:u}){const d=s.match(l.dataUriRegex);return d&&(!d[2]||d[2]!=="base64"||l.base64Regex[u.paddingRequired].false.test(d[3]))?s:i.error("string.dataUri")}},domain:{method(s){s&&t.assertOptions(s,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const i=l.addressOptions(s);return this.$_addRule({name:"domain",args:{options:s},address:i})},validate:(s,i,u,{address:d})=>y.isValid(s,d)?s:i.error("string.domain")},email:{method(s={}){t.assertOptions(s,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),o(s.multiple===void 0||typeof s.multiple=="boolean","multiple option must be an boolean");const i=l.addressOptions(s),u=new RegExp(`\\s*[${s.separator?e(s.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:s},regex:u,address:i})},validate(s,i,{options:u},{regex:d,address:p}){const _=u.multiple?s.split(d):[s],v=[];for(const c of _)h.isValid(c,p)||v.push(c);return v.length?i.error("string.email",{value:s,invalids:v}):s}},guid:{alias:"uuid",method(s={}){t.assertOptions(s,["version","separator"]);let i="";if(s.version){const p=[].concat(s.version);o(p.length>=1,"version must have at least 1 valid version specified");const _=new Set;for(let v=0;v<p.length;++v){const c=p[v];o(typeof c=="string","version at position "+v+" must be a string");const m=l.guidVersions[c.toLowerCase()];o(m,"version at position "+v+" must be one of "+Object.keys(l.guidVersions).join(", ")),o(!_.has(m),"version at position "+v+" must not be a duplicate"),i+=m,_.add(m)}}o(l.guidSeparators.has(s.separator),'separator must be one of true, false, "-", or ":"');const u=s.separator===void 0?"[:-]?":s.separator===!0?"[:-]":s.separator===!1?"[]?":`\\${s.separator}`,d=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${u})[0-9A-F]{4}\\2?[${i||"0-9A-F"}][0-9A-F]{3}\\2?[${i?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:s},regex:d})},validate(s,i,u,{regex:d}){const p=d.exec(s);return p?l.guidBrackets[p[1]]!==p[p.length-1]?i.error("string.guid"):s:i.error("string.guid")}},hex:{method(s={}){return t.assertOptions(s,["byteAligned","prefix"]),s={byteAligned:!1,prefix:!1,...s},o(typeof s.byteAligned=="boolean","byteAligned must be boolean"),o(typeof s.prefix=="boolean"||s.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:s}})},validate:(s,i,{options:u})=>(u.prefix==="optional"?l.hexRegex.withOptionalPrefix:u.prefix===!0?l.hexRegex.withPrefix:l.hexRegex.withoutPrefix).test(s)?u.byteAligned&&s.length%2!=0?i.error("string.hexAlign"):s:i.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(s,i)=>y.isValid(s,{minDomainSegments:1})||l.ipRegex.test(s)?s:i.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(s={}){t.assertOptions(s,["cidr","version"]);const{cidr:i,versions:u,regex:d}=f.regex(s),p=s.version?u:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:i,version:p}},regex:d})},validate:(s,i,{options:u},{regex:d})=>d.test(s)?s:u.version?i.error("string.ipVersion",{value:s,cidr:u.cidr,version:u.version}):i.error("string.ip",{value:s,cidr:u.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(s,{error:i})=>l.isoDate(s)?s:i("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(s,i)=>l.isoDurationRegex.test(s)?s:i.error("string.isoDuration")},length:{method(s,i){return l.length(this,"length",s,"=",i)},validate(s,i,{limit:u,encoding:d},{name:p,operator:_,args:v}){const c=!d&&s.length;return t.compare(c,u,_)?s:i.error("string."+p,{limit:v.limit,value:s,encoding:d})},args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(s,i){return l.length(this,"max",s,"<=",i)},args:["limit","encoding"]},min:{method(s,i){return l.length(this,"min",s,">=",i)},args:["limit","encoding"]},normalize:{method(s="NFC"){return o(l.normalizationForms.includes(s),"normalization form must be one of "+l.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:s}})},validate:(s,{error:i},{form:u})=>s===s.normalize(u)?s:i("string.normalize",{value:s,form:u}),convert:!0},pattern:{alias:"regex",method(s,i={}){o(s instanceof RegExp,"regex must be a RegExp"),o(!s.flags.includes("g")&&!s.flags.includes("y"),"regex should not use global or sticky mode"),typeof i=="string"&&(i={name:i}),t.assertOptions(i,["invert","name"]);const u=["string.pattern",i.invert?".invert":"",i.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:s,options:i},errorCode:u})},validate:(s,i,{regex:u,options:d},{errorCode:p})=>u.test(s)^d.invert?s:i.error(p,{name:d.name,regex:u,value:s}),args:["regex","options"],multi:!0},replace:{method(s,i){typeof s=="string"&&(s=new RegExp(e(s),"g")),o(s instanceof RegExp,"pattern must be a RegExp"),o(typeof i=="string","replacement must be a String");const u=this.clone();return u.$_terms.replacements||(u.$_terms.replacements=[]),u.$_terms.replacements.push({pattern:s,replacement:i}),u}},token:{method(){return this.$_addRule("token")},validate:(s,i)=>/^\w+$/.test(s)?s:i.error("string.token")},trim:{method(s=!0){return o(typeof s=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:s}})},validate:(s,i,{enabled:u})=>u&&s!==s.trim()?i.error("string.trim"):s,convert:!0},truncate:{method(s=!0){return o(typeof s=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",s)}},uppercase:{method(){return this.case("upper")}},uri:{method(s={}){t.assertOptions(s,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),s.domain&&t.assertOptions(s.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:i,scheme:u}=a.regex(s),d=s.domain?l.addressOptions(s.domain):null;return this.$_addRule({name:"uri",args:{options:s},regex:i,domain:d,scheme:u})},validate(s,i,{options:u},{regex:d,domain:p,scheme:_}){if(["http:/","https:/"].includes(s))return i.error("string.uri");const v=d.exec(s);if(v){const c=v[1]||v[2];return!p||u.allowRelative&&!c||y.isValid(c,p)?s:i.error("string.domain",{value:c})}return u.relativeOnly?i.error("string.uriRelativeOnly"):u.scheme?i.error("string.uriCustomScheme",{scheme:_,value:s}):i.error("string.uri")}}},manifest:{build(s,i){if(i.replacements)for(const{pattern:u,replacement:d}of i.replacements)s=s.replace(u,d);return s}},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"}}),l.addressOptions=function(s){if(!s)return l.tlds||s;if(o(s.minDomainSegments===void 0||Number.isSafeInteger(s.minDomainSegments)&&s.minDomainSegments>0,"minDomainSegments must be a positive integer"),o(s.maxDomainSegments===void 0||Number.isSafeInteger(s.maxDomainSegments)&&s.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),s.tlds===!1)return s;if(s.tlds===!0||s.tlds===void 0)return o(l.tlds,"Built-in TLD list disabled"),Object.assign({},s,l.tlds);o(typeof s.tlds=="object","tlds must be true, false, or an object");const i=s.tlds.deny;if(i)return Array.isArray(i)&&(s=Object.assign({},s,{tlds:{deny:new Set(i)}})),o(s.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),o(!s.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),l.validateTlds(s.tlds.deny,"tlds.deny"),s;const u=s.tlds.allow;return u?u===!0?(o(l.tlds,"Built-in TLD list disabled"),Object.assign({},s,l.tlds)):(Array.isArray(u)&&(s=Object.assign({},s,{tlds:{allow:new Set(u)}})),o(s.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),l.validateTlds(s.tlds.allow,"tlds.allow"),s):s},l.validateTlds=function(s,i){for(const u of s)o(y.isValid(u,{minDomainSegments:1,maxDomainSegments:1}),`${i} must contain valid top level domain names`)},l.isoDate=function(s){if(!t.isIsoDate(s))return null;/.*T.*[+-]\d\d$/.test(s)&&(s+="00");const i=new Date(s);return isNaN(i.getTime())?null:i.toISOString()},l.length=function(s,i,u,d,p){return o(!p||!1,"Invalid encoding:",p),s.$_addRule({name:i,method:"length",args:{limit:u,encoding:p},operator:d})}},8826:(k,x,b)=>{const o=b(375),y=b(8068),h={};h.Map=class extends Map{slice(){return new h.Map(this)}},k.exports=y.extend({type:"symbol",terms:{map:{init:new h.Map}},coerce:{method(f,{schema:e,error:n}){const a=e.$_terms.map.get(f);return a&&(f=a),e._flags.only&&typeof f!="symbol"?{value:f,errors:n("symbol.map",{map:e.$_terms.map})}:{value:f}}},validate(f,{error:e}){if(typeof f!="symbol")return{value:f,errors:e("symbol.base")}},rules:{map:{method(f){f&&!f[Symbol.iterator]&&typeof f=="object"&&(f=Object.entries(f)),o(f&&f[Symbol.iterator],"Iterable must be an iterable or object");const e=this.clone(),n=[];for(const a of f){o(a&&a[Symbol.iterator],"Entry must be an iterable");const[r,t]=a;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),n.push(t)}return e.valid(...n)}}},manifest:{build:(f,e)=>(e.map&&(f=f.map(e.map)),f)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(k,x,b)=>{const o=b(375),y=b(8571),h=b(738),f=b(9621),e=b(8160),n=b(6354),a=b(493),r={result:Symbol("result")};x.entry=function(t,l,s){let i=e.defaults;s&&(o(s.warnings===void 0,"Cannot override warnings preference in synchronous validation"),o(s.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),i=e.preferences(e.defaults,s));const u=r.entry(t,l,i);o(!u.mainstay.externals.length,"Schema with external rules must use validateAsync()");const d={value:u.value};return u.error&&(d.error=u.error),u.mainstay.warnings.length&&(d.warning=n.details(u.mainstay.warnings)),u.mainstay.debug&&(d.debug=u.mainstay.debug),u.mainstay.artifacts&&(d.artifacts=u.mainstay.artifacts),d},x.entryAsync=async function(t,l,s){let i=e.defaults;s&&(i=e.preferences(e.defaults,s));const u=r.entry(t,l,i),d=u.mainstay;if(u.error)throw d.debug&&(u.error.debug=d.debug),u.error;if(d.externals.length){let _=u.value;const v=[];for(const c of d.externals){const m=c.state.path,g=c.schema.type==="link"?d.links.get(c.schema):null;let w,$,j=_;const S=m.length?[_]:[],O=m.length?f(t,m):t;if(m.length){w=m[m.length-1];let C=_;for(const I of m.slice(0,-1))C=C[I],S.unshift(C);$=S[0],j=$[w]}try{const C=(P,q)=>(g||c.schema).$_createError(P,j,q,c.state,i),I=await c.method(j,{schema:c.schema,linked:g,state:c.state,prefs:s,original:O,error:C,errorsArray:r.errorsArray,warn:(P,q)=>d.warnings.push((g||c.schema).$_createError(P,j,q,c.state,i)),message:(P,q)=>(g||c.schema).$_createError("external",j,q,c.state,i,{messages:P})});if(I===void 0||I===j)continue;if(I instanceof n.Report){if(d.tracer.log(c.schema,c.state,"rule","external","error"),v.push(I),i.abortEarly)break;continue}if(Array.isArray(I)&&I[e.symbols.errors]){if(d.tracer.log(c.schema,c.state,"rule","external","error"),v.push(...I),i.abortEarly)break;continue}$?(d.tracer.value(c.state,"rule",j,I,"external"),$[w]=I):(d.tracer.value(c.state,"rule",_,I,"external"),_=I)}catch(C){throw i.errors.label&&(C.message+=` (${c.label})`),C}}if(u.value=_,v.length)throw u.error=n.process(v,t,i),d.debug&&(u.error.debug=d.debug),u.error}if(!i.warnings&&!i.debug&&!i.artifacts)return u.value;const p={value:u.value};return d.warnings.length&&(p.warning=n.details(d.warnings)),d.debug&&(p.debug=d.debug),d.artifacts&&(p.artifacts=d.artifacts),p},r.Mainstay=class{constructor(t,l,s){this.externals=[],this.warnings=[],this.tracer=t,this.debug=l,this.links=s,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,l,s){const{tracer:i,cleanup:u}=r.tracer(l,s),d=s.debug?[]:null,p=l._ids._schemaChain?new Map:null,_=new r.Mainstay(i,d,p),v=l._ids._schemaChain?[{schema:l}]:null,c=new a([],[],{mainstay:_,schemas:v}),m=x.validate(t,l,c,s);u&&l.$_root.untrace();const g=n.process(m.errors,t,s);return{value:m.value,error:g,mainstay:_}},r.tracer=function(t,l){return t.$_root._tracer?{tracer:t.$_root._tracer._register(t)}:l.debug?(o(t.$_root.trace,"Debug mode not supported"),{tracer:t.$_root.trace()._register(t),cleanup:!0}):{tracer:r.ignore}},x.validate=function(t,l,s,i,u={}){if(l.$_terms.whens&&(l=l._generate(t,s,i).schema),l._preferences&&(i=r.prefs(l,i)),l._cache&&i.cache){const g=l._cache.get(t);if(s.mainstay.tracer.debug(s,"validate","cached",!!g),g)return g}const d=(g,w,$)=>l.$_createError(g,t,w,$||s,i),p={original:t,prefs:i,schema:l,state:s,error:d,errorsArray:r.errorsArray,warn:(g,w,$)=>s.mainstay.warnings.push(d(g,w,$)),message:(g,w)=>l.$_createError("custom",t,w,s,i,{messages:g})};s.mainstay.tracer.entry(l,s);const _=l._definition;if(_.prepare&&t!==void 0&&i.convert){const g=_.prepare(t,p);if(g){if(s.mainstay.tracer.value(s,"prepare",t,g.value),g.errors)return r.finalize(g.value,[].concat(g.errors),p);t=g.value}}if(_.coerce&&t!==void 0&&i.convert&&(!_.coerce.from||_.coerce.from.includes(typeof t))){const g=_.coerce.method(t,p);if(g){if(s.mainstay.tracer.value(s,"coerced",t,g.value),g.errors)return r.finalize(g.value,[].concat(g.errors),p);t=g.value}}const v=l._flags.empty;v&&v.$_match(r.trim(t,l),s.nest(v),e.defaults)&&(s.mainstay.tracer.value(s,"empty",t,void 0),t=void 0);const c=u.presence||l._flags.presence||(l._flags._endedSwitch?null:i.presence);if(t===void 0){if(c==="forbidden")return r.finalize(t,null,p);if(c==="required")return r.finalize(t,[l.$_createError("any.required",t,null,s,i)],p);if(c==="optional"){if(l._flags.default!==e.symbols.deepDefault)return r.finalize(t,null,p);s.mainstay.tracer.value(s,"default",t,{}),t={}}}else if(c==="forbidden")return r.finalize(t,[l.$_createError("any.unknown",t,null,s,i)],p);const m=[];if(l._valids){const g=l._valids.get(t,s,i,l._flags.insensitive);if(g)return i.convert&&(s.mainstay.tracer.value(s,"valids",t,g.value),t=g.value),s.mainstay.tracer.filter(l,s,"valid",g),r.finalize(t,null,p);if(l._flags.only){const w=l.$_createError("any.only",t,{valids:l._valids.values({display:!0})},s,i);if(i.abortEarly)return r.finalize(t,[w],p);m.push(w)}}if(l._invalids){const g=l._invalids.get(t,s,i,l._flags.insensitive);if(g){s.mainstay.tracer.filter(l,s,"invalid",g);const w=l.$_createError("any.invalid",t,{invalids:l._invalids.values({display:!0})},s,i);if(i.abortEarly)return r.finalize(t,[w],p);m.push(w)}}if(_.validate){const g=_.validate(t,p);if(g&&(s.mainstay.tracer.value(s,"base",t,g.value),t=g.value,g.errors)){if(!Array.isArray(g.errors))return m.push(g.errors),r.finalize(t,m,p);if(g.errors.length)return m.push(...g.errors),r.finalize(t,m,p)}}return l._rules.length?r.rules(t,m,p):r.finalize(t,m,p)},r.rules=function(t,l,s){const{schema:i,state:u,prefs:d}=s;for(const p of i._rules){const _=i._definition.rules[p.method];if(_.convert&&d.convert){u.mainstay.tracer.log(i,u,"rule",p.name,"full");continue}let v,c=p.args;if(p._resolve.length){c=Object.assign({},c);for(const g of p._resolve){const w=_.argsByName.get(g),$=c[g].resolve(t,u,d),j=w.normalize?w.normalize($):$,S=e.validateArg(j,null,w);if(S){v=i.$_createError("any.ref",$,{arg:g,ref:c[g],reason:S},u,d);break}c[g]=j}}v=v||_.validate(t,s,c,p);const m=r.rule(v,p);if(m.errors){if(u.mainstay.tracer.log(i,u,"rule",p.name,"error"),p.warn){u.mainstay.warnings.push(...m.errors);continue}if(d.abortEarly)return r.finalize(t,m.errors,s);l.push(...m.errors)}else u.mainstay.tracer.log(i,u,"rule",p.name,"pass"),u.mainstay.tracer.value(u,"rule",t,m.value,p.name),t=m.value}return r.finalize(t,l,s)},r.rule=function(t,l){return t instanceof n.Report?(r.error(t,l),{errors:[t],value:null}):Array.isArray(t)&&t[e.symbols.errors]?(t.forEach(s=>r.error(s,l)),{errors:t,value:null}):{errors:null,value:t}},r.error=function(t,l){return l.message&&t._setTemplate(l.message),t},r.finalize=function(t,l,s){l=l||[];const{schema:i,state:u,prefs:d}=s;if(l.length){const _=r.default("failover",void 0,l,s);_!==void 0&&(u.mainstay.tracer.value(u,"failover",t,_),t=_,l=[])}if(l.length&&i._flags.error)if(typeof i._flags.error=="function"){l=i._flags.error(l),Array.isArray(l)||(l=[l]);for(const _ of l)o(_ instanceof Error||_ instanceof n.Report,"error() must return an Error object")}else l=[i._flags.error];if(t===void 0){const _=r.default("default",t,l,s);u.mainstay.tracer.value(u,"default",t,_),t=_}if(i._flags.cast&&t!==void 0){const _=i._definition.cast[i._flags.cast];if(_.from(t)){const v=_.to(t,s);u.mainstay.tracer.value(u,"cast",t,v,i._flags.cast),t=v}}if(i.$_terms.externals&&d.externals&&d._externals!==!1)for(const{method:_}of i.$_terms.externals)u.mainstay.externals.push({method:_,schema:i,state:u,label:n.label(i._flags,u,d)});const p={value:t,errors:l.length?l:null};return i._flags.result&&(p.value=i._flags.result==="strip"?void 0:s.original,u.mainstay.tracer.value(u,i._flags.result,t,p.value),u.shadow(t,i._flags.result)),i._cache&&d.cache!==!1&&!i._refs.length&&i._cache.set(s.original,p),t===void 0||p.errors||i._flags.artifact===void 0||(u.mainstay.artifacts=u.mainstay.artifacts||new Map,u.mainstay.artifacts.has(i._flags.artifact)||u.mainstay.artifacts.set(i._flags.artifact,[]),u.mainstay.artifacts.get(i._flags.artifact).push(u.path)),p},r.prefs=function(t,l){const s=l===e.defaults;return s&&t._preferences[e.symbols.prefs]?t._preferences[e.symbols.prefs]:(l=e.preferences(l,t._preferences),s&&(t._preferences[e.symbols.prefs]=l),l)},r.default=function(t,l,s,i){const{schema:u,state:d,prefs:p}=i,_=u._flags[t];if(p.noDefaults||_===void 0)return l;if(d.mainstay.tracer.log(u,d,"rule",t,"full"),!_)return _;if(typeof _=="function"){const v=_.length?[y(d.ancestors[0]),i]:[];try{return _(...v)}catch(c){return void s.push(u.$_createError(`any.${t}`,null,{error:c},d,p))}}return typeof _!="object"?_:_[e.symbols.literal]?_.literal:e.isResolvable(_)?_.resolve(l,d,p):y(_)},r.trim=function(t,l){if(typeof t!="string")return t;const s=l.$_getRule("trim");return s&&s.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,x,b)=>{const o=b(375),y=b(9474),h=b(8160),f={};k.exports=f.Values=class{constructor(e,n){this._values=new Set(e),this._refs=new Set(n),this._lowercase=f.lowercases(e),this._override=!1}get length(){return this._values.size+this._refs.size}add(e,n){h.isResolvable(e)?this._refs.has(e)||(this._refs.add(e),n&&n.register(e)):this.has(e,null,null,!1)||(this._values.add(e),typeof e=="string"&&this._lowercase.set(e.toLowerCase(),e))}static merge(e,n,a){if(e=e||new f.Values,n){if(n._override)return n.clone();for(const r of[...n._values,...n._refs])e.add(r)}if(a)for(const r of[...a._values,...a._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,n,a,r){return!!this.get(e,n,a,r)}get(e,n,a,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(y(t,e))return{value:t}}if(n)for(const t of this._refs){const l=t.resolve(e,n,a,null,{in:!0});if(l===void 0)continue;const s=t.in&&typeof l=="object"?Array.isArray(l)?l:Object.keys(l):[l];for(const i of s)if(typeof i==typeof e){if(r&&e&&typeof e=="string"){if(i.toLowerCase()===e.toLowerCase())return{value:i,ref:t}}else if(y(i,e))return{value:i,ref:t}}}return!1}override(){this._override=!0}values(e){if(e&&e.display){const n=[];for(const a of[...this._values,...this._refs])a!==void 0&&n.push(a);return n}return Array.from([...this._values,...this._refs])}clone(){const e=new f.Values(this._values,this._refs);return e._override=this._override,e}concat(e){o(!e._override,"Cannot concat override set of values");const n=new f.Values([...this._values,...e._values],[...this._refs,...e._refs]);return n._override=this._override,n}describe(){const e=[];this._override&&e.push({override:!0});for(const n of this._values.values())e.push(n&&typeof n=="object"?{value:n}:n);for(const n of this._refs.values())e.push(n.describe());return e}},f.Values.prototype[h.symbols.values]=!0,f.Values.prototype.slice=f.Values.prototype.clone,f.lowercases=function(e){const n=new Map;if(e)for(const a of e)typeof a=="string"&&n.set(a.toLowerCase(),a);return n}},978:(k,x,b)=>{const o=b(375),y=b(8571),h=b(1687),f=b(9621),e={};k.exports=function(n,a,r={}){if(o(n&&typeof n=="object","Invalid defaults value: must be an object"),o(!a||a===!0||typeof a=="object","Invalid source value: must be true, falsy or an object"),o(typeof r=="object","Invalid options: must be an object"),!a)return null;if(r.shallow)return e.applyToDefaultsWithShallow(n,a,r);const t=y(n);if(a===!0)return t;const l=r.nullOverride!==void 0&&r.nullOverride;return h(t,a,{nullOverride:l,mergeArrays:!1})},e.applyToDefaultsWithShallow=function(n,a,r){const t=r.shallow;o(Array.isArray(t),"Invalid keys");const l=new Map,s=a===!0?null:new Set;for(let d of t){d=Array.isArray(d)?d:d.split(".");const p=f(n,d);p&&typeof p=="object"?l.set(p,s&&f(a,d)||p):s&&s.add(d)}const i=y(n,{},l);if(!s)return i;for(const d of s)e.reachCopy(i,a,d);const u=r.nullOverride!==void 0&&r.nullOverride;return h(i,a,{nullOverride:u,mergeArrays:!1})},e.reachCopy=function(n,a,r){for(const s of r){if(!(s in a))return;const i=a[s];if(typeof i!="object"||i===null)return;a=i}const t=a;let l=n;for(let s=0;s<r.length-1;++s){const i=r[s];typeof l[i]!="object"&&(l[i]={}),l=l[i]}l[r[r.length-1]]=t}},375:(k,x,b)=>{const o=b(7916);k.exports=function(y,...h){if(!y)throw h.length===1&&h[0]instanceof Error?h[0]:new o(h)}},8571:(k,x,b)=>{const o=b(9621),y=b(4277),h=b(7043),f={needsProtoHack:new Set([y.set,y.map,y.weakSet,y.weakMap])};k.exports=f.clone=function(e,n={},a=null){if(typeof e!="object"||e===null)return e;let r=f.clone,t=a;if(n.shallow){if(n.shallow!==!0)return f.cloneWithShallow(e,n);r=u=>u}else if(t){const u=t.get(e);if(u)return u}else t=new Map;const l=y.getInternalProto(e);if(l===y.buffer)return!1;if(l===y.date)return new Date(e.getTime());if(l===y.regex)return new RegExp(e);const s=f.base(e,l,n);if(s===e)return e;if(t&&t.set(e,s),l===y.set)for(const u of e)s.add(r(u,n,t));else if(l===y.map)for(const[u,d]of e)s.set(u,r(d,n,t));const i=h.keys(e,n);for(const u of i){if(u==="__proto__")continue;if(l===y.array&&u==="length"){s.length=e.length;continue}const d=Object.getOwnPropertyDescriptor(e,u);d?d.get||d.set?Object.defineProperty(s,u,d):d.enumerable?s[u]=r(e[u],n,t):Object.defineProperty(s,u,{enumerable:!1,writable:!0,configurable:!0,value:r(e[u],n,t)}):Object.defineProperty(s,u,{enumerable:!0,writable:!0,configurable:!0,value:r(e[u],n,t)})}return s},f.cloneWithShallow=function(e,n){const a=n.shallow;(n=Object.assign({},n)).shallow=!1;const r=new Map;for(const t of a){const l=o(e,t);typeof l!="object"&&typeof l!="function"||r.set(l,l)}return f.clone(e,n,r)},f.base=function(e,n,a){if(a.prototype===!1)return f.needsProtoHack.has(n)?new n.constructor:n===y.array?[]:{};const r=Object.getPrototypeOf(e);if(r&&r.isImmutable)return e;if(n===y.array){const t=[];return r!==n&&Object.setPrototypeOf(t,r),t}if(f.needsProtoHack.has(n)){const t=new r.constructor;return r!==n&&Object.setPrototypeOf(t,r),t}return Object.create(r)}},9474:(k,x,b)=>{const o=b(4277),y={mismatched:null};k.exports=function(h,f,e){return e=Object.assign({prototype:!0},e),!!y.isDeepEqual(h,f,e,[])},y.isDeepEqual=function(h,f,e,n){if(h===f)return h!==0||1/h==1/f;const a=typeof h;if(a!==typeof f||h===null||f===null)return!1;if(a==="function"){if(!e.deepFunction||h.toString()!==f.toString())return!1}else if(a!=="object")return h!=h&&f!=f;const r=y.getSharedType(h,f,!!e.prototype);switch(r){case o.buffer:return!1;case o.promise:return h===f;case o.regex:return h.toString()===f.toString();case y.mismatched:return!1}for(let t=n.length-1;t>=0;--t)if(n[t].isSame(h,f))return!0;n.push(new y.SeenEntry(h,f));try{return!!y.isDeepEqualObj(r,h,f,e,n)}finally{n.pop()}},y.getSharedType=function(h,f,e){if(e)return Object.getPrototypeOf(h)!==Object.getPrototypeOf(f)?y.mismatched:o.getInternalProto(h);const n=o.getInternalProto(h);return n!==o.getInternalProto(f)?y.mismatched:n},y.valueOf=function(h){const f=h.valueOf;if(f===void 0)return h;try{return f.call(h)}catch(e){return e}},y.hasOwnEnumerableProperty=function(h,f){return Object.prototype.propertyIsEnumerable.call(h,f)},y.isSetSimpleEqual=function(h,f){for(const e of Set.prototype.values.call(h))if(!Set.prototype.has.call(f,e))return!1;return!0},y.isDeepEqualObj=function(h,f,e,n,a){const{isDeepEqual:r,valueOf:t,hasOwnEnumerableProperty:l}=y,{keys:s,getOwnPropertySymbols:i}=Object;if(h===o.array){if(!n.part){if(f.length!==e.length)return!1;for(let v=0;v<f.length;++v)if(!r(f[v],e[v],n,a))return!1;return!0}for(const v of f)for(const c of e)if(r(v,c,n,a))return!0}else if(h===o.set){if(f.size!==e.size)return!1;if(!y.isSetSimpleEqual(f,e)){const v=new Set(Set.prototype.values.call(e));for(const c of Set.prototype.values.call(f)){if(v.delete(c))continue;let m=!1;for(const g of v)if(r(c,g,n,a)){v.delete(g),m=!0;break}if(!m)return!1}}}else if(h===o.map){if(f.size!==e.size)return!1;for(const[v,c]of Map.prototype.entries.call(f))if(c===void 0&&!Map.prototype.has.call(e,v)||!r(c,Map.prototype.get.call(e,v),n,a))return!1}else if(h===o.error&&(f.name!==e.name||f.message!==e.message))return!1;const u=t(f),d=t(e);if((f!==u||e!==d)&&!r(u,d,n,a))return!1;const p=s(f);if(!n.part&&p.length!==s(e).length&&!n.skip)return!1;let _=0;for(const v of p)if(n.skip&&n.skip.includes(v))e[v]===void 0&&++_;else if(!l(e,v)||!r(f[v],e[v],n,a))return!1;if(!n.part&&p.length-_!==s(e).length)return!1;if(n.symbols!==!1){const v=i(f),c=new Set(i(e));for(const m of v){if(!n.skip||!n.skip.includes(m)){if(l(f,m)){if(!l(e,m)||!r(f[m],e[m],n,a))return!1}else if(l(e,m))return!1}c.delete(m)}for(const m of c)if(l(e,m))return!1}return!0},y.SeenEntry=class{constructor(h,f){this.obj=h,this.ref=f}isSame(h,f){return this.obj===h&&this.ref===f}}},7916:(k,x,b)=>{const o=b(8761);k.exports=class extends Error{constructor(y){super(y.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,x.assert)}}},5277:k=>{const x={};k.exports=function(b){if(!b)return"";let o="";for(let y=0;y<b.length;++y){const h=b.charCodeAt(y);x.isSafe(h)?o+=b[y]:o+=x.escapeHtmlChar(h)}return o},x.escapeHtmlChar=function(b){return x.namedHtml.get(b)||(b>=256?"&#"+b+";":`&#x${b.toString(16).padStart(2,"0")};`)},x.isSafe=function(b){return x.safeCharCodes.has(b)},x.namedHtml=new Map([[38,"&"],[60,"<"],[62,">"],[34,"""],[160," "],[162,"¢"],[163,"£"],[164,"¤"],[169,"©"],[174,"®"]]),x.safeCharCodes=function(){const b=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)&&b.add(o);return b}()},6064:k=>{k.exports=function(x){return x.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:k=>{k.exports=function(){}},1687:(k,x,b)=>{const o=b(375),y=b(8571),h=b(7043),f={};k.exports=f.merge=function(e,n,a){if(o(e&&typeof e=="object","Invalid target value: must be an object"),o(n==null||typeof n=="object","Invalid source value: must be null, undefined, or an object"),!n)return e;if(a=Object.assign({nullOverride:!0,mergeArrays:!0},a),Array.isArray(n)){o(Array.isArray(e),"Cannot merge array onto an object"),a.mergeArrays||(e.length=0);for(let t=0;t<n.length;++t)e.push(y(n[t],{symbols:a.symbols}));return e}const r=h.keys(n,a);for(let t=0;t<r.length;++t){const l=r[t];if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,l))continue;const s=n[l];if(s&&typeof s=="object"){if(e[l]===s)continue;!e[l]||typeof e[l]!="object"||Array.isArray(e[l])!==Array.isArray(s)||s instanceof Date||s instanceof RegExp?e[l]=y(s,{symbols:a.symbols}):f.merge(e[l],s,a)}else(s!=null||a.nullOverride)&&(e[l]=s)}return e}},9621:(k,x,b)=>{const o=b(375),y={};k.exports=function(h,f,e){if(f===!1||f==null)return h;typeof(e=e||{})=="string"&&(e={separator:e});const n=Array.isArray(f);o(!n||!e.separator,"Separator option is not valid for array-based chain");const a=n?f:f.split(e.separator||".");let r=h;for(let t=0;t<a.length;++t){let l=a[t];const s=e.iterables&&y.iterables(r);if(Array.isArray(r)||s==="set"){const i=Number(l);Number.isInteger(i)&&(l=i<0?r.length+i:i)}if(!r||typeof r=="function"&&e.functions===!1||!s&&r[l]===void 0){o(!e.strict||t+1===a.length,"Missing segment",l,"in reach path ",f),o(typeof r=="object"||e.functions===!0||typeof r!="function","Invalid segment",l,"in reach path ",f),r=e.default;break}r=s?s==="set"?[...r][l]:r.get(l):r[l]}return r},y.iterables=function(h){return h instanceof Set?"set":h instanceof Map?"map":void 0}},8761:k=>{k.exports=function(...x){try{return JSON.stringify(...x)}catch(b){return"[Cannot display object: "+b.message+"]"}}},4277:(k,x)=>{const b={};x=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},b.typeMap=new Map([["[object Error]",x.error],["[object Map]",x.map],["[object Promise]",x.promise],["[object Set]",x.set],["[object WeakMap]",x.weakMap],["[object WeakSet]",x.weakSet]]),x.getInternalProto=function(o){if(Array.isArray(o))return x.array;if(o instanceof Date)return x.date;if(o instanceof RegExp)return x.regex;if(o instanceof Error)return x.error;const y=Object.prototype.toString.call(o);return b.typeMap.get(y)||x.generic}},7043:(k,x)=>{x.keys=function(b,o={}){return o.symbols!==!1?Reflect.ownKeys(b):Object.getOwnPropertyNames(b)}},3652:(k,x,b)=>{const o=b(375),y={};x.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(h,f){const e=[].concat((f=f||{}).before||[]),n=[].concat(f.after||[]),a=f.group||"?",r=f.sort||0;o(!e.includes(a),`Item cannot come before itself: ${a}`),o(!e.includes("?"),"Item cannot come before unassociated items"),o(!n.includes(a),`Item cannot come after itself: ${a}`),o(!n.includes("?"),"Item cannot come after unassociated items"),Array.isArray(h)||(h=[h]);for(const t of h){const l={seq:this._items.length,sort:r,before:e,after:n,group:a,node:t};this._items.push(l)}if(!f.manual){const t=this._sort();o(t,"item",a!=="?"?`added into group ${a}`:"","created a dependencies error")}return this.nodes}merge(h){Array.isArray(h)||(h=[h]);for(const e of h)if(e)for(const n of e._items)this._items.push(Object.assign({},n));this._items.sort(y.mergeSort);for(let e=0;e<this._items.length;++e)this._items[e].seq=e;const f=this._sort();return o(f,"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={},f=Object.create(null),e=Object.create(null);for(const l of this._items){const s=l.seq,i=l.group;e[i]=e[i]||[],e[i].push(s),h[s]=l.before;for(const u of l.after)f[u]=f[u]||[],f[u].push(s)}for(const l in h){const s=[];for(const i in h[l]){const u=h[l][i];e[u]=e[u]||[],s.push(...e[u])}h[l]=s}for(const l in f)if(e[l])for(const s of e[l])h[s].push(...f[l]);const n={};for(const l in h){const s=h[l];for(const i of s)n[i]=n[i]||[],n[i].push(l)}const a={},r=[];for(let l=0;l<this._items.length;++l){let s=l;if(n[l]){s=null;for(let i=0;i<this._items.length;++i){if(a[i]===!0)continue;n[i]||(n[i]=[]);const u=n[i].length;let d=0;for(let p=0;p<u;++p)a[n[i][p]]&&++d;if(d===u){s=i;break}}}s!==null&&(a[s]=!0,r.push(s))}if(r.length!==this._items.length)return!1;const t={};for(const l of this._items)t[l.seq]=l;this._items=[],this.nodes=[];for(const l of r){const s=t[l];this.nodes.push(s.node),this._items.push(s)}return!0}},y.mergeSort=(h,f)=>h.sort===f.sort?0:h.sort<f.sort?-1:1},5380:(k,x,b)=>{const o=b(443),y=b(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};x.analyze=function(f,e={}){if(!f)return y.code("DOMAIN_NON_EMPTY_STRING");if(typeof f!="string")throw new Error("Invalid input: domain must be a string");if(f.length>256)return y.code("DOMAIN_TOO_LONG");if(h.nonAsciiRx.test(f)){if(e.allowUnicode===!1)return y.code("DOMAIN_INVALID_UNICODE_CHARS");f=f.normalize("NFC")}if(h.domainControlRx.test(f))return y.code("DOMAIN_INVALID_CHARS");f=h.punycode(f),e.allowFullyQualified&&f[f.length-1]==="."&&(f=f.slice(0,-1));const n=e.minDomainSegments||h.minDomainSegments,a=f.split(".");if(a.length<n)return y.code("DOMAIN_SEGMENTS_COUNT");if(e.maxDomainSegments&&a.length>e.maxDomainSegments)return y.code("DOMAIN_SEGMENTS_COUNT_MAX");const r=e.tlds;if(r){const t=a[a.length-1].toLowerCase();if(r.deny&&r.deny.has(t)||r.allow&&!r.allow.has(t))return y.code("DOMAIN_FORBIDDEN_TLDS")}for(let t=0;t<a.length;++t){const l=a[t];if(!l.length)return y.code("DOMAIN_EMPTY_SEGMENT");if(l.length>63)return y.code("DOMAIN_LONG_SEGMENT");if(t<a.length-1){if(!h.domainSegmentRx.test(l))return y.code("DOMAIN_INVALID_CHARS")}else if(!h.tldSegmentRx.test(l))return y.code("DOMAIN_INVALID_TLDS_CHARS")}return null},x.isValid=function(f,e){return!x.analyze(f,e)},h.punycode=function(f){f.includes("%")&&(f=f.replace(/%/g,"%25"));try{return new h.URL(`http://${f}`).host}catch{return f}}},1745:(k,x,b)=>{const o=b(9848),y=b(5380),h=b(2178),f={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(o.TextEncoder||TextEncoder)};x.analyze=function(e,n){return f.email(e,n)},x.isValid=function(e,n){return!f.email(e,n)},f.email=function(e,n={}){if(typeof e!="string")throw new Error("Invalid input: email must be a string");if(!e)return h.code("EMPTY_STRING");const a=!f.nonAsciiRx.test(e);if(!a){if(n.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,l]=r;if(!t)return h.code("EMPTY_LOCAL");if(!n.ignoreLength){if(e.length>254)return h.code("ADDRESS_TOO_LONG");if(f.encoder.encode(t).length>64)return h.code("LOCAL_TOO_LONG")}return f.local(t,a)||y.analyze(l,n)},f.local=function(e,n){const a=e.split(".");for(const r of a){if(!r.length)return h.code("EMPTY_LOCAL_SEGMENT");if(n){if(!f.atextRx.test(r))return h.code("INVALID_LOCAL_CHARS")}else for(const t of r){if(f.atextRx.test(t))continue;const l=f.binary(t);if(!f.atomRx.test(l))return h.code("INVALID_LOCAL_CHARS")}}},f.binary=function(e){return Array.from(f.encoder.encode(e)).map(n=>String.fromCharCode(n)).join("")},f.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,f.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,x)=>{x.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"},x.code=function(b){return{code:b,error:x.codes[b]}}},9959:(k,x,b)=>{const o=b(375),y=b(5752);x.regex=function(h={}){o(h.cidr===void 0||typeof h.cidr=="string","options.cidr must be a string");const f=h.cidr?h.cidr.toLowerCase():"optional";o(["required","optional","forbidden"].includes(f),"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 n=`(?:${e.map(r=>{if(f==="forbidden")return y.ip[r];const t=`\\/${r==="ipv4"?y.ip.v4Cidr:y.ip.v6Cidr}`;return f==="required"?`${y.ip[r]}${t}`:`${y.ip[r]}(?:${t})?`}).join("|")})`,a=new RegExp(`^${n}$`);return{cidr:f,versions:e,regex:a,raw:n}}},5752:(k,x,b)=>{const o=b(375),y=b(6064),h={generate:function(){const f={},e="\\dA-Fa-f",n="["+e+"]",a="\\w-\\.~",r="!\\$&'\\(\\)\\*\\+,;=",t="%"+e,l=a+t+r+":@",s="["+l+"]",i="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";f.ipv4address="(?:"+i+"\\.){3}"+i;const u=n+"{1,4}",d="(?:"+u+":"+u+"|"+f.ipv4address+")",p="(?:"+u+":){6}"+d,_="::(?:"+u+":){5}"+d,v="(?:"+u+")?::(?:"+u+":){4}"+d,c="(?:(?:"+u+":){0,1}"+u+")?::(?:"+u+":){3}"+d,m="(?:(?:"+u+":){0,2}"+u+")?::(?:"+u+":){2}"+d,g="(?:(?:"+u+":){0,3}"+u+")?::"+u+":"+d,w="(?:(?:"+u+":){0,4}"+u+")?::"+d,$="(?:(?:"+u+":){0,5}"+u+")?::"+u,j="(?:(?:"+u+":){0,6}"+u+")?::";f.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",f.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",f.ipv6address="(?:"+p+"|"+_+"|"+v+"|"+c+"|"+m+"|"+g+"|"+w+"|"+$+"|"+j+")",f.ipvFuture="v"+n+"+\\.["+a+r+":]+",f.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",f.schemeRegex=new RegExp(f.scheme);const S="["+a+t+r+":]*",O="["+a+t+r+"]{1,255}",C="(?:\\[(?:"+f.ipv6address+"|"+f.ipvFuture+")\\]|"+f.ipv4address+"|"+O+")",I="(?:"+S+"@)?"+C+"(?::\\d*)?",P="(?:"+S+"@)?("+C+")(?::\\d*)?",q=s+"*",L=s+"+",T="(?:\\/"+q+")*",z="\\/(?:"+L+T+")?",W=L+T,B="["+a+t+r+"@]+"+T,K="(?:\\/\\/\\/"+q+T+")";return f.hierPart="(?:(?:\\/\\/"+I+T+")|"+z+"|"+W+"|"+K+")",f.hierPartCapture="(?:(?:\\/\\/"+P+T+")|"+z+"|"+W+")",f.relativeRef="(?:(?:\\/\\/"+I+T+")|"+z+"|"+B+"|)",f.relativeRefCapture="(?:(?:\\/\\/"+P+T+")|"+z+"|"+B+"|)",f.query="["+l+"\\/\\?]*(?=#|$)",f.queryWithSquareBrackets="["+l+"\\[\\]\\/\\?]*(?=#|$)",f.fragment="["+l+"\\/\\?]*",f}};h.rfc3986=h.generate(),x.ip={v4Cidr:h.rfc3986.ipv4Cidr,v6Cidr:h.rfc3986.ipv6Cidr,ipv4:h.rfc3986.ipv4address,ipv6:h.rfc3986.ipv6address,ipvfuture:h.rfc3986.ipvFuture},h.createRegex=function(f){const e=h.rfc3986,n="(?:\\?"+(f.allowQuerySquareBrackets?e.queryWithSquareBrackets:e.query)+")?(?:#"+e.fragment+")?",a=f.domain?e.relativeRefCapture:e.relativeRef;if(f.relativeOnly)return h.wrap(a+n);let r="";if(f.scheme){o(f.scheme instanceof RegExp||typeof f.scheme=="string"||Array.isArray(f.scheme),"scheme must be a RegExp, String, or Array");const s=[].concat(f.scheme);o(s.length>=1,"scheme must have at least 1 scheme specified");const i=[];for(let u=0;u<s.length;++u){const d=s[u];o(d instanceof RegExp||typeof d=="string","scheme at position "+u+" must be a RegExp or String"),d instanceof RegExp?i.push(d.source.toString()):(o(e.schemeRegex.test(d),"scheme at position "+u+" must be a valid scheme"),i.push(y(d)))}r=i.join("|")}const t="(?:"+(r?"(?:"+r+")":e.scheme)+":"+(f.domain?e.hierPartCapture:e.hierPart)+")",l=f.allowRelative?"(?:"+t+"|"+a+")":t;return h.wrap(l+n,r)},h.wrap=function(f,e){return{raw:f=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${f}`,regex:new RegExp(`^${f}$`),scheme:e}},h.uriRegex=h.createRegex({}),x.regex=function(f={}){return f.scheme||f.allowRelative||f.relativeOnly||f.allowQuerySquareBrackets||f.domain?h.createRegex(f):h.uriRegex}},1447:(k,x)=>{const b={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};x.Parser=class{constructor(o,y={}){if(!y[b.settings]&&y.constants)for(const h in y.constants){const f=y.constants[h];if(f!==null&&!["boolean","number","string"].includes(typeof f))throw new Error(`Formula constant ${h} contains invalid ${typeof f} value type`)}this.settings=y[b.settings]?y:Object.assign({[b.settings]:!0,constants:{},functions:{}},y),this.single=null,this._parts=null,this._parse(o)}_parse(o){let y=[],h="",f=0,e=!1;const n=r=>{if(f)throw new Error("Formula missing closing parenthesis");const t=y.length?y[y.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 l=new x.Parser(h,this.settings);y.push({type:"segment",value:l})}else if(e){if(e==="]")return y.push({type:"reference",value:h}),void(h="");y.push({type:"literal",value:h})}else if(b.operatorCharacters.includes(h))t&&t.type==="operator"&&b.operators.includes(t.value+h)?t.value+=h:y.push({type:"operator",value:h});else if(h.match(b.numberRx))y.push({type:"constant",value:parseFloat(h)});else if(this.settings.constants[h]!==void 0)y.push({type:"constant",value:this.settings.constants[h]});else{if(!h.match(b.tokenRx))throw new Error(`Formula contains invalid token: ${h}`);y.push({type:"reference",value:h})}h=""}};for(const r of o)e?r===e?(n(),e=!1):h+=r:f?r==="("?(h+=r,++f):r===")"?(--f,f?h+=r:n(r)):h+=r:r in b.literals?e=b.literals[r]:r==="("?(n(),++f):b.operatorCharacters.includes(r)?(n(),h=r,n()):r!==" "?h+=r:n();n(),y=y.map((r,t)=>r.type!=="operator"||r.value!=="-"||t&&y[t-1].type!=="operator"?r:{type:"operator",value:"n"});let a=!1;for(const r of y){if(r.type==="operator"){if(b.operatorsPrefix.includes(r.value))continue;if(!a)throw new Error("Formula contains an operator in invalid position");if(!b.operators.includes(r.value))throw new Error(`Formula contains an unknown operator ${r.value}`)}else if(a)throw new Error("Formula missing expected operator");a=!a}if(!a)throw new Error("Formula contains invalid trailing operator");y.length===1&&["reference","literal","constant"].includes(y[0].type)&&(this.single={type:y[0].type==="reference"?"reference":"value",value:y[0].value}),this._parts=y.map(r=>{if(r.type==="operator")return b.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):b.reference(r.value)})}_subFormula(o,y){const h=this.settings.functions[y];if(typeof h!="function")throw new Error(`Formula contains unknown function ${y}`);let f=[];if(o){let e="",n=0,a=!1;const r=()=>{if(!e)throw new Error(`Formula contains function ${y} with invalid arguments ${o}`);f.push(e),e=""};for(let t=0;t<o.length;++t){const l=o[t];a?(e+=l,l===a&&(a=!1)):l in b.literals&&!n?(e+=l,a=b.literals[l]):l!==","||n?(e+=l,l==="("?++n:l===")"&&--n):r()}r()}return f=f.map(e=>new x.Parser(e,this.settings)),function(e){const n=[];for(const a of f)n.push(a.evaluate(e));return h.call(e,...n)}}evaluate(o){const y=this._parts.slice();for(let h=y.length-2;h>=0;--h){const f=y[h];if(f&&f.type==="operator"){const e=y[h+1];y.splice(h+1,1);const n=b.evaluate(e,o);y[h]=b.single(f.value,n)}}return b.operatorsOrder.forEach(h=>{for(let f=1;f<y.length-1;)if(h.includes(y[f])){const e=y[f],n=b.evaluate(y[f-1],o),a=b.evaluate(y[f+1],o);y.splice(f,2);const r=b.calculate(e,n,a);y[f-1]=r===0?0:r}else f+=2}),b.evaluate(y[0],o)}},x.Parser.prototype[b.symbol]=!0,b.reference=function(o){return function(y){return y&&y[o]!==void 0?y[o]:null}},b.evaluate=function(o,y){return o===null?null:typeof o=="function"?o(y):o[b.symbol]?o.evaluate(y):o},b.single=function(o,y){if(o==="!")return!y;const h=-y;return h===0?0:h},b.calculate=function(o,y,h){if(o==="??")return b.exists(y)?y:h;if(typeof y=="string"||typeof h=="string"){if(o==="+")return(y=b.exists(y)?y:"")+(b.exists(h)?h:"")}else switch(o){case"^":return Math.pow(y,h);case"*":return y*h;case"/":return y/h;case"%":return y%h;case"+":return y+h;case"-":return y-h}switch(o){case"<":return y<h;case"<=":return y<=h;case">":return y>h;case">=":return y>=h;case"==":return y===h;case"!=":return y!==h;case"&&":return y&&h;case"||":return y||h}return null},b.exists=function(o){return o!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:k=>{k.exports=JSON.parse('{"version":"17.12.2"}')}},E={},function k(x){var b=E[x];if(b!==void 0)return b.exports;var o=E[x]={exports:{}};return N[x](o,o.exports,k),o.exports}(5107);var N,E})}(se)),se.exports}function Ge({disabled:D=!1,storeList:M=[],teamDid:N,onAdd:E=()=>{},scope:k="",hiddenChildren:x=!1,open:b=!1,onClose:o=()=>{}}){const{api:y}=ae(),[h,f]=F.useState(!1),[e,n]=F.useState(!0),[a,r]=F.useState(!1),[t,l]=F.useState(""),[s,i]=F.useState(""),{t:u}=X(),d=async()=>{f(!0);try{const{decoded:_}=Ne(t,M);await y.addBlockletStore({input:{teamDid:N,url:_,scope:k}}),E(_),r(!1),o()}catch(_){const v=`${u("store.blockletRegistry.addFailed")} ${J(_)}`;i(v)}finally{f(!1)}},p=()=>{r(!1),o()};return R.jsxs(R.Fragment,{children:[!x&&R.jsxs(ve,{button:!0,disabled:D,sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1},onClick:()=>{r(!0)},children:[R.jsx(_e,{font:!0}),R.jsx(H,{variant:"inherit",children:u("store.blockletRegistry.addRegistry")})]}),R.jsxs(Me,{title:u("store.blockletRegistry.addRegistry"),fullWidth:!0,maxWidth:"md",open:b||a,onClose:p,PaperProps:{style:{minHeight:"auto"}},actions:R.jsxs(R.Fragment,{children:[R.jsx(ce,{onClick:_=>{_.stopPropagation(),p()},color:"inherit",children:u("common.cancel")}),R.jsxs(ce,{onClick:_=>{_.stopPropagation(),d()},color:"primary","data-cy":"install-blocklet-next-step",disabled:h||!t||e,variant:"contained",autoFocus:!0,children:[h&&R.jsx(Y,{size:16}),u("common.confirm")]})]}),children:[R.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:R.jsx(we,{component:"div",children:R.jsx(H,{component:"div",children:R.jsx(xe,{label:u("store.blockletRegistry.registryUrl"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"add-blocklet-store-url",fullWidth:!0,value:t,onChange:_=>{i(null);let v=!1;_.target.value.trim()||(v=!0),_.target.value.trim()||i(u("store.blockletRegistry.registryUrlEmpty")),l(_.target.value),n(v)},disabled:h,onKeyPress:_=>{_.key==="Enter"&&(_.preventDefault(),_.target.value.trim()?d():i(u("store.blockletRegistry.registryUrlEmpty")))}})})})}),!!s&&R.jsx($e,{severity:"error",style:{width:"100%"},children:s})]})]})}Ge.propTypes={teamDid:A.string.isRequired,disabled:A.bool,storeList:A.array,onAdd:A.func,scope:A.string,hiddenChildren:A.bool,open:A.bool,onClose:A.func};function ie({store:D,teamDid:M,onDelete:N=()=>{},children:E=null,projectId:k="",scope:x=""}){const{api:b}=ae(),{t:o}=X(),y=Pe(),[h,f]=F.useState(!1),[e,n]=F.useState(null),a=je(),r=()=>{f(!1),n(null)},t=async()=>{try{f(!0),await b.deleteBlockletStore({input:{teamDid:M,url:D.url,projectId:k,scope:x}}),await y?.actions?.refreshBlocklet(),N&&typeof N=="function"&&N()}catch(i){V.error(`Remove Blocklet Store Error: ${J(i)}`)}finally{f(!1),n(null)}},l={keyName:D.url,title:o("store.blockletRegistry.deleteRegistry"),description:o("store.blockletRegistry.deleteDesc",{name:`<b>${D.url}</b>`,color:a.palette.error.main}),confirmPlaceholder:o("store.blockletRegistry.confirmDesc",{name:D.url}),confirm:o("common.delConfirm"),cancel:o("common.cancel"),onConfirm:t,onCancel:r},s=i=>{D.protected||(i.stopPropagation(),n(l))};return R.jsxs(R.Fragment,{children:[E?R.jsx("span",{onClick:s,children:E}):R.jsx(G,{"data-cy":"store-action-delete",color:"primary",disabled:h,onClick:s,size:"small",children:R.jsx(he,{sx:{zoom:.95}})}),e&&R.jsx(ze,{keyName:e.keyName,title:e.title,description:e.description,confirmPlaceholder:e.confirmPlaceholder,confirm:e.confirm,cancel:e.cancel,params:e.params,onConfirm:e.onConfirm,onCancel:e.onCancel})]})}ie.propTypes={children:A.node,teamDid:A.string.isRequired,store:A.object.isRequired,onDelete:A.func,projectId:A.string,scope:A.string};const Ke=({store:D,userDid:M})=>{const N=window.blocklet?.tenantMode!==qe.BLOCKLET_TENANT_MODES.MULTIPLE;return D.protected?!1:D.scope&&D.scope===M?!0:N?D.scope==="studio":!1};function ye({connectedStore:D,onDisconnect:M=()=>{},onDelete:N=()=>{},store:E,teamDid:k,projectId:x=""}){const[b,o]=F.useState(null),y=!!b,{t:h}=X(),{session:f}=Ue(),[e,n]=F.useState(!1),a=i=>{i.stopPropagation(),window.open(Q(`${ee(E.url,"search?menu=my-blocklets")}`,{allowDomains:null}))},r=i=>{o(i.currentTarget)},t=()=>{o(null)},l=()=>{n(!1),M()},s=[{label:h("common.visitStore"),action:a,icon:pe},{label:h("common.disconnect"),action:()=>{t(),n(!0)},icon:ke,hidden:!D}];return R.jsxs(R.Fragment,{children:[R.jsx(G,{ref:b,color:"primary",onClick:r,size:"small",children:R.jsx(Re,{sx:{zoom:.95}})}),R.jsxs(Se,{anchorEl:b,open:y,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[s.map(i=>i.hidden?null:R.jsxs(oe,{dense:!0,onClick:i.action,disabled:i.disabled,children:[i.icon&&R.jsx(i.icon,{color:"action",sx:{marginRight:1}}),R.jsx(U,{sx:{color:"action"},children:i.label})]},i.label)),Ke({store:E,userDid:f?.user?.did})&&R.jsx(ie,{store:E,onDelete:N,teamDid:k,projectId:x,scope:E.scope||"studio",children:R.jsxs(oe,{dense:!0,disabled:E.protected,children:[R.jsx(he,{sx:{color:E.protected?"action":"error.main",marginRight:1}}),R.jsx(U,{sx:{color:E.protected?"action":"error.main"},children:h("common.delete")})]})})]}),e&&R.jsx(Fe,{displayError:!0,title:`${h("common.disconnect")} ${E.name}`,description:h("blocklet.publish.disconnectStoreTip"),confirm:h("common.confirm"),onConfirm:l,onCancel:()=>n(!1)})]})}ye.propTypes={connectedStore:A.object.isRequired,onDisconnect:A.func,onDelete:A.func,store:A.object.isRequired,teamDid:A.string.isRequired,projectId:A.string};function Ze({messageType:D,onOpen:M,onClose:N}){const E=F.useRef(null),k=F.useRef(null),x=async o=>{setTimeout(()=>{try{N?.()}catch{}},10*1e3),E.current&&(clearInterval(k.current),E.current.close());const y=Math.random().toString(36).slice(2);E.current=window.open(`${ge.WELLKNOWN_SERVICE_PATH_PREFIX}/open-window?key=${y}`,"_blank"),M?.(E.current),k.current=setInterval(()=>{(!E.current||E.current.closed)&&(E.current=null,clearInterval(k.current),setTimeout(()=>{N?.()},1100))},200),await Promise.resolve(o(E.current,h=>{if(!E.current){localStorage.setItem(`open-window-url-${y}`,JSON.stringify({url:h,time:Date.now()}));return}E.current.location.href=Q(h,{allowDomains:null})}))},b=Be(o=>{const{type:y,error:h}=o.data;E.current&&y===D&&h&&(V.error(h),N?.())});return F.useEffect(()=>(window.addEventListener("message",b),()=>{window.removeEventListener("message",b)}),[b]),x}function ne({connectedStore:D,sx:M={},...N}){return R.jsx(Oe,{sx:{width:24,height:24,...M},src:ee(D.storeUrl,ge.WELLKNOWN_SERVICE_PATH_PREFIX,`/user/avatar/${D.developerDid}?imageFilter=resize&w=120&h=120`),...N})}ne.propTypes={connectedStore:A.object.isRequired,sx:A.object};function be({storeUrl:D,storeName:M,published:N,did:E="",version:k=""}){const{t:x}=X(),b=()=>{window.open(Q(`${ee(D,E&&k?`/blocklets/${E}/${k}`:"/search?menu=my-blocklets")}`,{allowDomains:null}))};return R.jsxs(U,{children:[R.jsx(H,{variant:"subtitle2",children:x(N?"blocklet.publish.publishToStoreSuccess":"blocklet.publish.uploadToStoreSuccess",{name:M})}),R.jsx(G,{size:"small",sx:{mt:1},onClick:b,variant:"contained",color:"success",children:x("common.visitTarget",{name:M})})]})}be.propTypes={storeName:A.string.isRequired,storeUrl:A.string.isRequired,published:A.bool.isRequired,did:A.string,version:A.string};const de={CONNECT:"connect",SELECT:"select"},me=Ee(({className:D,...M})=>R.jsx(Ie,{...M,classes:{popper:D}}))(({theme:D})=>({[`& .${Te.tooltip}`]:{backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.87)",borderRadius:8,padding:D.spacing(2),fontSize:D.typography.pxToRem(12),border:"1px solid rgba(0,0,0,0.08)",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.05)"}}));function Ye({teamDid:D,projectId:M="",releaseId:N="",store:E,warningList:k=[],onDelete:x=()=>{},kind:b="store",published:o=!1,connectedStore:y=null,releaseType:h="",onPublish:f=()=>{},onOpenConnectStore:e=()=>{},onSelectConnectStore:n=()=>{},behavior:a=de.CONNECT,scope:r="",version:t=""}){const{t:l}=X(),{api:s,info:i,inService:u}=ae(),[d,p]=F.useState(!1),_=Ze({messageType:"connect-store-message",onOpen:()=>p(!0),onClose:()=>p(!1)}),v=b==="publish",c=!!y,m=C=>{if(C.stopPropagation(),v){window.open(Q(ee(E.url,"developer/blocklets"),{allowDomains:null}));return}window.open(Q(E.url,{allowDomains:null}))},g=()=>{if(a===de.SELECT){n(E);return}_(async(C,I)=>{try{const P=await s.connectToStore({input:{did:D,storeUrl:E.url,storeId:E.id,storeName:E.name,projectId:M}});if(!P?.url){V.error("failed to connect to store");return}I(P.url),await e({did:D,projectId:M,storeId:E.id}),p(!1)}catch(P){const q=J(P);V.error(q),p(!1)}})},w=async()=>{try{await s.disconnectFromStore({input:{did:D,storeId:E.id,projectId:M,storeScope:r}}),x()}catch(C){V.error(J(C))}},$=()=>{p(!0),s.publishToStore({input:{did:D,storeId:E.id,storeName:E.name,projectId:M,releaseId:N,type:h}}).then(C=>{V.success(R.jsx(be,{storeName:y.storeName,storeUrl:y.storeUrl,did:M,version:t,published:C.url==="published"}),{duration:1e4}),f?.(null)}).catch(C=>{V.error(J(C)),f?.(C)}).finally(()=>{p(!1)})};F.useEffect(()=>{c&&p(!1)},[c]);const j=F.useMemo(()=>!(u&&He.isInServerlessMode(i)),[u,i]),S=k.length>0,O=R.jsxs(G,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130,height:"100%"},disabled:S,onClick:$,children:[d?R.jsx(Y,{sx:{marginRight:1},size:16}):R.jsx(Ae,{sx:{marginRight:1,fontSize:20}}),l("common.upload")]});return R.jsxs(U,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",overflow:"hidden",width:"100%"},children:[!v&&d&&R.jsx(Y,{sx:{marginRight:2},size:16}),R.jsxs(U,{sx:{flexShrink:1,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},children:[R.jsx(U,{sx:{display:"flex",flexDirection:"row"},children:R.jsx(H,{component:"span",sx:{fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variant:"subtitle1",children:E.name})}),R.jsx(H,{sx:{fontSize:14,opacity:.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},component:"span",variant:"inherit",children:`${E.url}`})]}),R.jsxs(U,{sx:{flex:1,display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center"},children:[y&&R.jsx(me,{placement:"top",title:R.jsxs(U,{children:[R.jsx(H,{component:"span",variant:"caption",sx:{opacity:.7},children:l("blocklet.publish.developerInfo")}),R.jsxs(U,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1,mt:1},children:[R.jsx(ne,{connectedStore:y,sx:{width:42,height:42}}),R.jsxs(U,{sx:{flex:1},children:[R.jsx(H,{component:"span",variant:"subtitle1",children:y.developerName}),R.jsx(We,{size:14,copyable:!0,compact:!0,responsive:!1,did:y.developerDid})]})]})]}),children:R.jsx(U,{children:R.jsx(ne,{connectedStore:y,sx:{marginRight:1,cursor:"help"}})})}),v&&R.jsxs(le,{disabled:d,variant:"outlined",sx:{height:38},size:"small",children:[!c&&R.jsxs(G,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:g,children:[d?R.jsx(Y,{sx:{marginRight:1},size:16}):R.jsx(Ce,{sx:{marginRight:1}}),l("common.connect")]}),c&&o&&R.jsxs(G,{disabled:!0,sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},children:[d?R.jsx(Y,{sx:{marginRight:1},size:16}):R.jsx(De,{sx:{marginRight:1}}),l("common.uploaded")]}),c&&!o&&(S?R.jsx(me,{title:R.jsxs(U,{children:[R.jsx(U,{sx:{color:"error.main",mb:.5},children:l("blocklet.publish.storeRule.warning")}),k.map((C,I)=>R.jsxs(U,{sx:{color:"error.main"},children:[I+1,". ",C]},C))]}),children:R.jsx("div",{children:O})}):O),R.jsx(ye,{projectId:M,connectedStore:y,store:E,onDelete:x,teamDid:D,onDisconnect:w})]}),!v&&R.jsxs(le,{disabled:d,variant:"outlined",sx:{height:36},size:"small",children:[R.jsx(G,{"data-cy":"store-open-url",onClick:m,children:R.jsx(pe,{sx:{zoom:.9}})}),!E.protected&&j&&R.jsx(ie,{store:E,onDelete:x,teamDid:D,scope:""})]})]})]})}Ye.propTypes={kind:A.string,teamDid:A.string.isRequired,published:A.bool,connectedStore:A.shape({storeName:A.string,storeId:A.string,storeUrl:A.string,developerDid:A.string,developerName:A.string}),warningList:A.array,projectId:A.string,releaseId:A.string,releaseType:A.string,store:A.shape({id:A.string.isRequired,name:A.string.isRequired,url:A.string.isRequired,protected:A.bool,connected:A.bool}).isRequired,scope:A.string,onDelete:A.func,onPublish:A.func,onOpenConnectStore:A.func,behavior:A.string,onSelectConnectStore:A.func,version:A.string};export{Ge as A,Ye as S,be as U,Ke as c,ct as r,He as s,Ze as u};
|