@abtnode/blocklet-services 1.17.8-beta-20260106-113136-b3c09e14 → 1.17.8-beta-20260108-120904-21cb5fb6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/util/blocklet-utils.js +9 -4
- package/dist/assets/{AdapterDayjs-DafRMFLg.js → AdapterDayjs-C1bdndja.js} +1 -1
- package/dist/assets/{Google-DRu937I3.js → Google-BI3aC5vK.js} +1 -1
- package/dist/assets/{access-control-cgo5Z15_.js → access-control-BL-PuDiR.js} +1 -1
- package/dist/assets/{actions-Dfiiwkit.js → actions-m1acuA78.js} +1 -1
- package/dist/assets/{add-component-core-BfzNEcS5.js → add-component-core-BzMN094F.js} +1 -1
- package/dist/assets/add-resource-BRF-rYME.js +1 -0
- package/dist/assets/{addon-qN24wAb4.js → addon-yDIBSjIk.js} +1 -1
- package/dist/assets/{advanced-1Vu6rcXU.js → advanced-DEE0XFtQ.js} +1 -1
- package/dist/assets/{aigne-D6MrXXCU.js → aigne-9evgyH7b.js} +1 -1
- package/dist/assets/api-B24x7kOD.js +1 -0
- package/dist/assets/{appearance-DOQHBg9p.js → appearance-C8B414U2.js} +1 -1
- package/dist/assets/{ar-BukCw0OI.js → ar-BHqjWgUQ.js} +2 -2
- package/dist/assets/{audit-logs-ISyoqJFp.js → audit-logs-qNutRhHx.js} +1 -1
- package/dist/assets/{authorize-B9RLEFal.js → authorize-CZSHuYdu.js} +1 -1
- package/dist/assets/{base-chart-DhxjAyBU.js → base-chart-DT--nPCU.js} +1 -1
- package/dist/assets/{base32-_D4eWUeh.js → base32-z3esjJBn.js} +1 -1
- package/dist/assets/{bind-account-CLIjYy96.js → bind-account-QxLU_sxt.js} +1 -1
- package/dist/assets/{branding-iwUveEf5.js → branding-Bk26INk9.js} +1 -1
- package/dist/assets/{branding-C81Kt22j.js → branding-_XszRU-Z.js} +1 -1
- package/dist/assets/branding-tR0gcoY_.js +1 -0
- package/dist/assets/bundle-avatar-2AQWR0ld.js +1 -0
- package/dist/assets/button-LwkniwV9.js +1 -0
- package/dist/assets/{click-to-copy-CMo42VnK.js → click-to-copy-Dk6ZAJOw.js} +1 -1
- package/dist/assets/{omit-CCIQ0Qdi.js → cloneDeep-rgNCMFod.js} +1 -1
- package/dist/assets/{collapse-B7gUzFaX.js → collapse-D72lnPa9.js} +1 -1
- package/dist/assets/{complete-CJ_buCAS.js → complete-CEvsz8uU.js} +2 -2
- package/dist/assets/{component-Dip3v1Iq.js → component-BrZ1DWiw.js} +2 -2
- package/dist/assets/{config-D5KnWqfn.js → config-6tpm84_l.js} +1 -1
- package/dist/assets/{config-D8XZj8JI.js → config-CwlqBQNt.js} +2 -2
- package/dist/assets/config-cdtQwn5t.js +53 -0
- package/dist/assets/{config-navigation-Ni0iczgA.js → config-navigation-CZ9V7otK.js} +2 -2
- package/dist/assets/{config-space-B6_f52sE.js → config-space-CZRqkXsR.js} +1 -1
- package/dist/assets/{confirm-Lb1MrAdS.js → confirm-Ch-CAgUO.js} +1 -1
- package/dist/assets/{connect-JAX_oP3o.js → connect-BNkv99fz.js} +1 -1
- package/dist/assets/connect-CadBIZOq.js +5 -0
- package/dist/assets/connect-i7rkK26L.js +1 -0
- package/dist/assets/connect-to-lX3lujSp.js +1 -0
- package/dist/assets/{content-layout-DmSBGGVm.js → content-layout-Dtfb5X6M.js} +1 -1
- package/dist/assets/{create-passport-svg-5AYzBKFb.js → create-passport-svg-DeDfPZeD.js} +1 -1
- package/dist/assets/{createClass-DXYd7BIe.js → createClass-07c4wbGU.js} +1 -1
- package/dist/assets/{dashboard-C0l2IWWH.js → dashboard-CmJOnF0g.js} +2 -2
- package/dist/assets/{de-Br0tDZam.js → de-QUGQFv2K.js} +1 -1
- package/dist/assets/{delete-confirm-tbfLqDBI.js → delete-confirm-DiU5PO2T.js} +1 -1
- package/dist/assets/{did-address-CsOJBoiY.js → did-address-Cq16cwTy.js} +1 -1
- package/dist/assets/{domain-CnhOsdmM.js → domain-DHqSA0zl.js} +1 -1
- package/dist/assets/{domain-action-card-BsdHbhEi.js → domain-action-card-BsNaII7k.js} +2 -2
- package/dist/assets/domains-BQ_Of9Oo.js +1 -0
- package/dist/assets/{email-Dt_DGuhf.js → email-DXdzQLls.js} +2 -2
- package/dist/assets/{empty-spinner-BYDonf35.js → empty-spinner-BClWI15N.js} +1 -1
- package/dist/assets/engine-D18zeIE7.js +1 -0
- package/dist/assets/{es-D_e0gGgp.js → es-C4w6cL07.js} +2 -2
- package/dist/assets/{exchange-passport-DztKvBat.js → exchange-passport-NOgYhNpm.js} +1 -1
- package/dist/assets/{form-DoC8uBcB.js → form-DhecYoSJ.js} +3 -3
- package/dist/assets/{form-text-input-XjloVwBd.js → form-text-input-BsCymY_c.js} +1 -1
- package/dist/assets/{form-wrapper-PT5ZzMQy.js → form-wrapper-pwkkz4we.js} +1 -1
- package/dist/assets/{fr-DXizOT4b.js → fr-Bq3UipEu.js} +2 -2
- package/dist/assets/{fuel-IaJHNPPW.js → fuel-DgzL5KSX.js} +1 -1
- package/dist/assets/{gen-access-key-BJlDqEhI.js → gen-access-key-BxnyhhCR.js} +1 -1
- package/dist/assets/{gen-simple-access-key-lyiUw0C-.js → gen-simple-access-key-BJI-4yOF.js} +1 -1
- package/dist/assets/get-safe-url-BVTaUfvO.js +1 -0
- package/dist/assets/{hi-D2FEb_Tx.js → hi-DGZy0DLh.js} +2 -2
- package/dist/assets/{home-Bs_5YPbK.js → home-Bibhtg_U.js} +1 -1
- package/dist/assets/{id-Dw9URVwP.js → id-DOzDilAf.js} +2 -2
- package/dist/assets/{iframe-Dqu4MSyW.js → iframe-CqiUrjUO.js} +1 -1
- package/dist/assets/{index-BDH_LtJL.js → index-0ZSFNH-D.js} +1 -1
- package/dist/assets/{index-1HKgA-fz.js → index-BB8sYq-N.js} +1 -1
- package/dist/assets/{index-BWDWEkUF.js → index-BSZ3mQac.js} +2 -2
- package/dist/assets/{index-Dfx19arA.js → index-BhpNA6ar.js} +1 -1
- package/dist/assets/{index-B4YCnemd.js → index-BnOC3Ium.js} +1 -1
- package/dist/assets/index-BszSKE9L.js +1 -0
- package/dist/assets/{index-vP1T6V7V.js → index-CHkWO9t3.js} +4 -4
- package/dist/assets/{index-BsohFwTm.js → index-CaQuyP_U.js} +1 -1
- package/dist/assets/{index-DT5AXPVB.js → index-Cdaohlhu.js} +7 -7
- package/dist/assets/{index-B10SG1vs.js → index-CdsI3g5U.js} +1 -1
- package/dist/assets/index-CsYL8tps.js +1 -0
- package/dist/assets/{index-CRAuhYSg.js → index-D-O_eFad.js} +1 -1
- package/dist/assets/{index-BNhv-9xy.js → index-D88DUiSg.js} +1 -1
- package/dist/assets/{index-TYwJnR0n.js → index-D8NN8LDz.js} +6 -6
- package/dist/assets/{index-CQgzjKgB.js → index-DI4CWTXR.js} +106 -106
- package/dist/assets/{index-BhhZ8IDZ.js → index-DUnMyyWn.js} +9 -9
- package/dist/assets/{index-BSZtxRM0.js → index-D_ckidZn.js} +2 -2
- package/dist/assets/{index-B_SjLIbT.js → index-DlifV2p1.js} +5 -5
- package/dist/assets/{index-dbYkWwF4.js → index-DzdHYw6g.js} +1 -1
- package/dist/assets/{index-Cq6z7yeF.js → index-Ge2WhAk1.js} +4 -4
- package/dist/assets/{index-Cp0b8q3A.js → index-KUC3HPt0.js} +1 -1
- package/dist/assets/index-POuATgdm.js +1 -0
- package/dist/assets/index-TBM4hzrY.js +81 -0
- package/dist/assets/{index-DhHvANH8.js → index-WjASWJcO.js} +4 -4
- package/dist/assets/{index-DctZHPFL.js → index-fC-FqmP3.js} +1 -1
- package/dist/assets/{index-BGhqVqit.js → index-gohmHhDq.js} +1 -1
- package/dist/assets/{index-CRZM3CKo.js → index-hBDzzv6I.js} +1 -1
- package/dist/assets/{index-BWL6HE0j.js → index-iX-pnOjy.js} +1 -1
- package/dist/assets/{index-B7_VUEoc.js → index-jILCQaR3.js} +1 -1
- package/dist/assets/{index-B6DWjLJS.js → index-m_xRKGyG.js} +8 -8
- package/dist/assets/{index-G6Vk78zE.js → index-mt_AKU_F.js} +2 -2
- package/dist/assets/{index-B0Q9wWG1.js → index-oucqu2vy.js} +1 -1
- package/dist/assets/{index-B4KKUWng.js → index-u9tqiWy4.js} +1 -1
- package/dist/assets/{index-BkePHcyK.js → index-uexcv8C-.js} +7 -7
- package/dist/assets/info-outline-rounded-BLwoUxyI.js +1 -0
- package/dist/assets/{invitation-CYFN9u5t.js → invitation-DSs7YT3_.js} +4 -4
- package/dist/assets/{invitations-jY13RXbI.js → invitations-DK7oD-E6.js} +1 -1
- package/dist/assets/{invite-D72FvaiG.js → invite-CdWfDz--.js} +1 -1
- package/dist/assets/{isURL-CJRImg0N.js → isURL-DMMDDAKA.js} +1 -1
- package/dist/assets/{issue-passport-BfqkJF3W.js → issue-passport-yIqheTA0.js} +1 -1
- package/dist/assets/{item-5ZWPft2s.js → item-BV3WfK17.js} +1 -1
- package/dist/assets/{ja-DBxpsmGJ.js → ja-DMq-YXDX.js} +2 -2
- package/dist/assets/{ko-CCAdSyce.js → ko-BrYbXurh.js} +2 -2
- package/dist/assets/{landing-page-DRtId3hN.js → landing-page-BDAr8Hmo.js} +1 -1
- package/dist/assets/{launch-result-message-MNpx7ysR.js → launch-result-message-C04PaKk0.js} +1 -1
- package/dist/assets/{layout-Be1KH57_.js → layout-DzZv-Jny.js} +1 -1
- package/dist/assets/{list-CQtiNSih.js → list-B6eMSw29.js} +1 -1
- package/dist/assets/{list-CHI1rCEg.js → list-BWd3aUjb.js} +2 -2
- package/dist/assets/{list-header-Cl3jykCe.js → list-header-wJF4c6BN.js} +1 -1
- package/dist/assets/localization-oLJXrcTA.js +1 -0
- package/dist/assets/{log-BfCFT05M.js → log-BskdQbRf.js} +1 -1
- package/dist/assets/logger-DhW79f4a.js +1 -0
- package/dist/assets/{login-BtsH3IvI.js → login-CfL0Uf6Y.js} +1 -1
- package/dist/assets/{login-oauth-callback-Ds4uYiRr.js → login-oauth-callback-_6XAZMOE.js} +1 -1
- package/dist/assets/{logo-uploader-lepUW_D7.js → logo-uploader-D5E5QaRF.js} +1 -1
- package/dist/assets/{lost-passport-BtN3h1ya.js → lost-passport-CUtEI06a.js} +1 -1
- package/dist/assets/omit-BeaKJrg9.js +1 -0
- package/dist/assets/{open-window-CNt8gsrN.js → open-window-Bi6zVDJd.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-7TbnqqKX.js → over-due-invoice-payment-B7FQEnNH.js} +1 -1
- package/dist/assets/{overview-Be3tncsL.js → overview-C7QghcRT.js} +1 -1
- package/dist/assets/{page-header-CHAwrgX-.js → page-header-BZv-tfgN.js} +1 -1
- package/dist/assets/passport-B_eTMTmZ.js +1 -0
- package/dist/assets/{passport-item-Bhbm8_m6.js → passport-item-D53yZ-cF.js} +1 -1
- package/dist/assets/{permission-BHvrn0M5.js → permission-DC8i_y8F.js} +1 -1
- package/dist/assets/preferences-DzDUGj-O.js +1 -0
- package/dist/assets/profile-embed-B3QUDkbU.js +1 -0
- package/dist/assets/{provider-icon-DQY2_LaP.js → provider-icon-D15U0Izg.js} +1 -1
- package/dist/assets/{pt-CrMGrBZ6.js → pt-Dl6732JN.js} +2 -2
- package/dist/assets/publish-resource-DCIlLUPS.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-D0JKrMDl.js → react-beautiful-dnd.esm-BwIgGfYj.js} +1 -1
- package/dist/assets/{react-stripe.esm-CVZErl8X.js → react-stripe.esm-5Snjx_mn.js} +1 -1
- package/dist/assets/{required-BQln5OcV.js → required-DHjZE3-Y.js} +1 -1
- package/dist/assets/{ru-up3R57Pv.js → ru-CVUeN9AX.js} +2 -2
- package/dist/assets/{runtime-npJC4gp_.js → runtime-BHekBabT.js} +1 -1
- package/dist/assets/{sanitize-C-shWbtD.js → sanitize-yX1j-ggS.js} +1 -1
- package/dist/assets/sdk-CJUhxOGJ.js +1 -0
- package/dist/assets/{section-jXB9AxBb.js → section-CenHBXqj.js} +1 -1
- package/dist/assets/{security-nSKpCl8B.js → security-BMslI5IZ.js} +3 -3
- package/dist/assets/{session-C2ZBRIpv.js → session-CZpDtsCZ.js} +1 -1
- package/dist/assets/{setup-krkSJpAg.js → setup-CCvGdFDO.js} +1 -1
- package/dist/assets/{shorten-label-C4py9TLA.js → shorten-label-DXFyDHDr.js} +1 -1
- package/dist/assets/{simple-select-i16Vwzvl.js → simple-select-DtCsUIHR.js} +1 -1
- package/dist/assets/{spaces-BdZ_Rv3s.js → spaces-D3H6AchN.js} +1 -1
- package/dist/assets/{start-y3zrboBQ.js → start-SeWUP0mo.js} +4 -4
- package/dist/assets/{starting-progress-DI-J-VlX.js → starting-progress-Y3UjFmoX.js} +1 -1
- package/dist/assets/{status-B8pB_mTB.js → status-MSXp_buG.js} +1 -1
- package/dist/assets/{step-actions-B1ufIDaK.js → step-actions-BNFJWVZI.js} +1 -1
- package/dist/assets/{studio-1jwq0HOw.js → studio-CRjDRBty.js} +1 -1
- package/dist/assets/{switch-CetbUrYR.js → switch-C49IloVU.js} +1 -1
- package/dist/assets/{switch-control-_85hc9FG.js → switch-control-npfWE_aC.js} +1 -1
- package/dist/assets/{table-tips-CMt22HEy.js → table-tips-DMrnJF8e.js} +1 -1
- package/dist/assets/{team-DDjNXwXE.js → team-YWd-FRKh.js} +8 -8
- package/dist/assets/{th-DdNj2Ao6.js → th-32eBNQes.js} +2 -2
- package/dist/assets/{traffic-mcbpWOFq.js → traffic-0IuWlrAD.js} +1 -1
- package/dist/assets/{transfer-C66c3bWd.js → transfer-DRS2VUAN.js} +1 -1
- package/dist/assets/{unsubscribe-Cvz0OKhq.js → unsubscribe-xDow2Z6m.js} +1 -1
- package/dist/assets/{use-app-logo-BuyF983S.js → use-app-logo-hIHAHSSI.js} +1 -1
- package/dist/assets/{use-mobile-BINJTzMb.js → use-mobile-Bz2ML4Gk.js} +1 -1
- package/dist/assets/{use-mobile-D5clNlrm.js → use-mobile-_vjPRYx2.js} +1 -1
- package/dist/assets/{use-server-logo-Pbr_UuiI.js → use-server-logo-Da86xnyt.js} +1 -1
- package/dist/assets/{use-window-close-B16QghYq.js → use-window-close-DUJmRIjM.js} +1 -1
- package/dist/assets/{useAsync-BVTh1KYj.js → useAsync-D0xh4Var.js} +1 -1
- package/dist/assets/{useAsync-ZGLJQow7.js → useAsync-D6IP8T2e.js} +1 -1
- package/dist/assets/{useAsyncRetry-BMmRgSGm.js → useAsyncRetry-B_bXUXWM.js} +1 -1
- package/dist/assets/{useLocalStorage-De-EuH_M.js → useLocalStorage-Brr2PSz9.js} +1 -1
- package/dist/assets/{user-center-DQSoqc_z.js → user-center-COnqQuqE.js} +6 -6
- package/dist/assets/{user-follower-TTyja_sV.js → user-follower-DVX8m-Zk.js} +1 -1
- package/dist/assets/{util-Ff3hwYmy.js → util-Dee1Ybp3.js} +1 -1
- package/dist/assets/{util-DuMKfKo8.js → util-GXkeqbBQ.js} +1 -1
- package/dist/assets/{vendor-arcblock-Cnwtqa7s.js → vendor-arcblock-BCP2x3BR.js} +1 -1
- package/dist/assets/{vendor-hooks-BQWlJm53.js → vendor-hooks-DQAdyHrE.js} +1 -1
- package/dist/assets/{vendor-mui-core-DnR6WYuU.js → vendor-mui-core-CKKG_1TN.js} +2 -2
- package/dist/assets/{vendor-mui-x-CQc01l4r.js → vendor-mui-x-DHGvg6Bj.js} +1 -1
- package/dist/assets/{vendor-utils-DCMKu06e.js → vendor-utils-CUs2ebe7.js} +17 -17
- package/dist/assets/{vendor-ux-B0gV9NvH.js → vendor-ux-DjXlxcvL.js} +115 -115
- package/dist/assets/{vi-HNh41Xxk.js → vi-DF8IinAc.js} +2 -2
- package/dist/assets/{wait-connect-CRZmfXOA.js → wait-connect-CLe9IfYi.js} +1 -1
- package/dist/assets/{wizard-B41kI39b.js → wizard-8Tk0iyxY.js} +1 -1
- package/dist/assets/wizard-components-C10frai0.js +52 -0
- package/dist/assets/wrap-locale-CxYp8fAf.js +1 -0
- package/dist/assets/{zh-BmX_fuoi.js → zh-BRjrClew.js} +1 -1
- package/dist/assets/{zh-MM5bvwO_.js → zh-ByJkLAV1.js} +2 -2
- package/dist/assets/{zh-tw-Dr5DyPwA.js → zh-tw-34G9tsUP.js} +2 -2
- package/dist/index.html +1 -1
- package/package.json +44 -44
- package/dist/assets/add-resource-CYRgZ1ps.js +0 -1
- package/dist/assets/api-DwxIBXZs.js +0 -1
- package/dist/assets/branding-myiZl37D.js +0 -1
- package/dist/assets/bundle-avatar-Cc_6nw01.js +0 -1
- package/dist/assets/button-D-lyR9BW.js +0 -1
- package/dist/assets/cloneDeep-BY8zW7hH.js +0 -1
- package/dist/assets/config-44sI5I0w.js +0 -53
- package/dist/assets/connect-0OZVqJvc.js +0 -1
- package/dist/assets/connect-B9GQZEi7.js +0 -5
- package/dist/assets/connect-to-Djgj6TLg.js +0 -1
- package/dist/assets/domains-DRP2VSvO.js +0 -1
- package/dist/assets/engine-BXGX_w-S.js +0 -1
- package/dist/assets/get-safe-url-BiNPujaX.js +0 -1
- package/dist/assets/index-B9LF8Bep.js +0 -1
- package/dist/assets/index-BmXPp3DU.js +0 -1
- package/dist/assets/index-CI_uwh_J.js +0 -81
- package/dist/assets/index-CbiyJRV7.js +0 -1
- package/dist/assets/info-outline-rounded-BIwvgXCK.js +0 -1
- package/dist/assets/localization-CKE-bHgd.js +0 -1
- package/dist/assets/logger-DU7baop2.js +0 -1
- package/dist/assets/passport-CkJ4B4CG.js +0 -1
- package/dist/assets/preferences-TFWtUYLy.js +0 -1
- package/dist/assets/profile-embed-B9f9hlSS.js +0 -1
- package/dist/assets/publish-resource-CyvkVMG_.js +0 -1
- package/dist/assets/sdk-CoWDgSLO.js +0 -1
- package/dist/assets/wizard-components-Bn72hVOe.js +0 -52
- package/dist/assets/wrap-locale-CF46rj6q.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as U}from"./vendor-react-CTtPmzVP.js";import{j as R,S as be,bi as ve,T as V,bf as _e,z as we,aZ as xe,a6 as Y,W as O,D as $e,Q as H,bO as he,cC as pe,cU as je,aQ as ke,aR as Re,M as oe,ak as F,b2 as Se,cV as Ae,s as Oe,bV as le,cW as Ee,by as Ce,am as De,aq as Ie}from"./vendor-mui-core-DnR6WYuU.js";import{V as Q,aZ as Te,F as ce,W as G}from"./vendor-ux-B0gV9NvH.js";import{bz as Me,Z as ae,bN as Le,Y as Ne,J as Pe,c as qe}from"./index-CQgzjKgB.js";import{f as J}from"./index-DBs9Ljax.js";import{y as ee}from"./vendor-utils-DCMKu06e.js";import{D as ze}from"./delete-confirm-tbfLqDBI.js";import{C as Fe}from"./confirm-Lb1MrAdS.js";import{u as Ue}from"./session-C2ZBRIpv.js";import{g as X}from"./get-safe-url-BiNPujaX.js";import{W as Be}from"./did-address-CsOJBoiY.js";import{u as We}from"./wait-connect-CRZmfXOA.js";var re,ue;function Ve(){if(ue)return re;ue=1;var D={};const{NODE_MODES:L}=Me();return re={isInServerlessMode:({mode:C,previousMode:k}={})=>C===L.SERVERLESS||k===L.SERVERLESS||D.ABT_NODE_DEBUG_AS_SERVERLESS==="true"},re}var He=Ve(),se={exports:{}},fe;function lt(){return fe||(fe=1,function(D,L){(function(P,C){D.exports=C()})(self,()=>{return P={7629:(k,x,b)=>{const l=b(375),y=b(8571),p=b(9474),f=b(1687),e=b(8652),n=b(8160),a=b(3292),r=b(6354),t=b(8901),o=b(9708),s=b(6914),i=b(2294),u=b(6133),d=b(1152),h=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 l(typeof o.describe=="function","Manifest functionality disabled"),o.describe(this)}allow(...c){return n.verifyFlat(c,"allow"),this._values(c,"_valids")}alter(c){l(c&&typeof c=="object"&&!Array.isArray(c),"Invalid targets argument"),l(!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];l(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 l(c!==void 0,"Artifact cannot be undefined"),l(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",c)}cast(c){return l(c===!1||typeof c=="string","Invalid to value"),l(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 l(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 l(c,"Missing error"),l(c instanceof Error||typeof c=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",c)}example(c,m={}){return l(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"&&(l(!m,"Cannot combine options with description"),m=c.description,c=c.method),l(typeof c=="function","Method must be a function"),l(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?(l(typeof c=="string","id must be a non-empty string"),l(/^[^\.]+$/.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 l(c&&typeof c=="string","Label name must be a non-empty string"),this.$_setFlag("label",c)}meta(c){return l(c!==void 0,"Meta cannot be undefined"),this._inner("metas",c,{single:!0})}note(...c){l(c.length,"Missing notes");for(const m of c)l(m&&typeof m=="string","Notes must be non-empty strings");return this._inner("notes",c)}only(c=!0){return l(typeof c=="boolean","Invalid mode:",c),this.$_setFlag("only",c)}optional(){return this.presence("optional")}prefs(c){l(c,"Missing preferences"),l(c.context===void 0,"Cannot override context"),l(c.externals===void 0,"Cannot override externals"),l(c.warnings===void 0,"Cannot override warnings"),l(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 l(["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 l(["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){l(c.length,"Missing tags");for(const m of c)l(m&&typeof m=="string","Tags must be non-empty strings");return this._inner("tags",c)}unit(c){return l(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 $)l(!j.then||j.then.type==="any"||j.then.type===g.type,"Cannot combine",g.type,"with",j.then&&j.then.type),l(!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){l(!this._inRuleset(),"Cannot set caching inside a ruleset"),l(!this._cache,"Cannot override schema cache"),l(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){l(n.isSchema(c),"Invalid schema object"),l(this.type==="any"||c.type==="any"||c.type===this.type,"Cannot merge type",this.type,"with another type:",c.type),l(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),l(!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 l(!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){l(!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)),l(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;l(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 A in c)m.modifiers[A](S,c[A]),l(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(){l(!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),l(!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),l(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 h.entry(c,this,m)}validateAsync(c,m){return h.entryAsync(c,this,m)}$_addRule(c){typeof c=="string"&&(c={name:c}),l(c&&typeof c=="object","Invalid options"),l(c.name&&typeof c.name=="string","Invalid rule name");for(const j in c)l(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;l(g,"Unknown rule",m.method);const $=this.clone();if(w){l(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 A=g.argsByName.get(j);if(A.ref&&n.isResolvable(S))m._resolve.push(j),$.$_mutateRegister(S);else if(A.normalize&&(S=A.normalize(S),w[j]=S),A.assert){const E=n.validateArg(S,j,A);l(!E,E,"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:{},A=j.messages?s.merge(this._definition.messages,j.messages):this._definition.messages;return new r.Report(c,m,g,S,A,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 $=!h.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 l(!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={}){l(c[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const w=this._definition.flags[c]||{};if(p(m,w.default)&&(m=void 0),p(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 h.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"),l(m!==void 0,"Missing",c,"value"),l(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 A=0;A<this.$_terms.whens.length;++A){const E=this.$_terms.whens[A];if(E.concat){w.push(E.concat),$.push(`${A}.concat`);continue}const I=E.ref?E.ref.resolve(c,m,g):c,N=E.is?[E]:E.switch,q=$.length;for(let M=0;M<N.length;++M){const{is:T,then:z,otherwise:B}=N[M],W=`${A}${E.switch?"."+M:""}`;if(T.$_match(I,m.nest(T,`${W}.is`),g)){if(z){const Z=m.localize([...m.path,`${W}.then`],m.ancestors,m.schemas),{schema:te,id:K}=z._generate(c,Z,g);w.push(te),$.push(`${W}.then${K?`(${K})`:""}`);break}}else if(B){const Z=m.localize([...m.path,`${W}.otherwise`],m.ancestors,m.schemas),{schema:te,id:K}=B._generate(c,Z,g);w.push(te),$.push(`${W}.otherwise${K?`(${K})`:""}`);break}}if(E.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 A of w)S=S.concat(A);return this.$_root._tracer&&this.$_root._tracer._combine(S,[this,...w]),this.$_temp.whens[j]=S,{schema:S,id:j}}_inner(c,m,g={}){l(!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){l($!==void 0,"Cannot call allow/valid/invalid with undefined"),l($!==n.symbols.override,"Override must be the first value");const j=m==="_invalids"?"_valids":"_invalids";g[j]&&(g[j].remove($),g[j].length||(l(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 l=b(375),y=b(8571),p=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={}){p.assertOptions(e,["max"]),l(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 l=b(375),y=b(7916),p=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=p.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"){l(a&&typeof a=="object"&&!Array.isArray(a),"Options must be of type object");const o=Object.keys(a).filter(s=>!r.includes(s));l(o.length===0,`${t} contain unknown keys: ${o}`)},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&&(l(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(o){throw o.path!==void 0?o.path=r+"."+o.path:o.path=r,t.append&&(o.message=`${o.message} (${o.path})`),o}},x.validateArg=function(a,r,{assert:t,message:o}){if(x.isSchema(t)){const s=t.validate(a);return s.error?s.error.message:void 0}if(!t(a))return r?`${r} ${o}`:o},x.verifyFlat=function(a,r){for(const t of a)l(!Array.isArray(t),"Method no longer accepts array arguments:",r)}},3292:(k,x,b)=>{const l=b(375),y=b(8160),p=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){l(n!==void 0,"Invalid undefined schema"),Array.isArray(n)&&(l(n.length,"Invalid empty array schema"),n.length===1&&(n=n[0]));const r=(t,...o)=>a.override!==!1?t.valid(e.override,...o):t.valid(...o);if(f.simple(n))return r(e,n);if(typeof n=="function")return e.custom(n);if(l(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):(l(Object.getPrototypeOf(n)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),e.object().keys(n))},x.ref=function(e,n){return p.isRef(e)?e:p.create(e,n)},x.compile=function(e,n,a={}){y.assertOptions(a,["legacy"]);const r=n&&n[y.symbols.any];if(r)return l(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};l(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&&(l(n&&typeof n=="object","Missing options"),a=n,n=p.create(".")),Array.isArray(a)&&(a={switch:a}),y.assertOptions(a,["is","not","then","otherwise","switch","break"]),y.isSchema(n))return l(a.is===void 0,'"is" can not be used with a schema condition'),l(a.not===void 0,'"not" can not be used with a schema condition'),l(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(l(p.isRef(n)||typeof n=="string","Invalid condition:",n),l(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 o=t.is!==void 0?e.$_compile(t.is):e.$_root.invalid(null,!1,0,"").required();return l(t.then!==void 0||t.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),l(t.break===void 0||t.then===void 0||t.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),a.is===void 0||p.isRef(a.is)||y.isSchema(a.is)||(o=o.required()),f.condition(e,{ref:x.ref(n),is:o,then:t.then,otherwise:t.otherwise,break:t.break})}l(Array.isArray(a.switch),'"switch" must be an array'),l(a.is===void 0,'Cannot combine "switch" with "is"'),l(a.not===void 0,'Cannot combine "switch" with "not"'),l(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 o=a.switch[t],s=t===a.switch.length-1;y.assertOptions(o,s?["is","then","otherwise"]:["is","then"]),l(o.is!==void 0,'Switch statement missing "is"'),l(o.then!==void 0,'Switch statement missing "then"');const i={is:e.$_compile(o.is),then:e.$_compile(o.then)};if(p.isRef(o.is)||y.isSchema(o.is)||(i.is=i.is.required()),s){l(a.otherwise===void 0||o.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const u=a.otherwise!==void 0?a.otherwise:o.otherwise;u!==void 0&&(l(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 l=b(5688),y=b(8160),p=b(3328);x.Report=class{constructor(f,e,n,a,r,t,o){if(this.code=f,this.flags=a,this.messages=r,this.path=t.path,this.prefs=o,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(p.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 o=Error.stackTraceLimit;Error.stackTraceLimit=0;const s=new x.ValidationError(r,t,e);return Error.stackTraceLimit=o,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 o=r.toString();n.push(o),a.push({message:o,type:"override",context:{error:r}});continue}const t=r.toString();n.push(t),a.push({message:t,path:r.path.filter(o=>typeof o!="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=l.error},8901:(k,x,b)=>{const l=b(375),y=b(8571),p=b(8160),f=b(6914),e={};x.type=function(n,a){const r=Object.getPrototypeOf(n),t=y(r),o=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),o.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];l(o.$_terms[v]===void 0,"Invalid term override for",s.type,v),o.$_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];l(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&&(l(!t[v],"Rule conflict in",s.type,v),t[v]=m),l(!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}),l(!c.argsByName.has(g.name),"Duplicated argument name",g.name),p.isSchema(g.assert)&&(g.assert=g.assert.strict().label(g.name)),c.argsByName.set(g.name,g),g)))}s.rules=d;const h=Object.assign({},i.modifiers);if(s.modifiers)for(const v in s.modifiers){l(!t[v],"Rule conflict in",s.type,v);const c=s.modifiers[v];l(typeof c=="function","Invalid modifier definition for",s.type,v);const m=function(g){return this.rule({[v]:g})};t[v]=m,h[v]=c}if(s.modifiers=h,s.overrides){t._super=r,o.$_super={};for(const v in s.overrides)l(r[v],"Cannot override missing",v),s.overrides[v][p.symbols.parent]=r[v],o.$_super[v]=r[v].bind(o);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),o},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 o;if((!a.from||a.from.includes(typeof r))&&(o=a.method(r,t),o)){if(o.errors||o.value===void 0)return o;r=o.value}if(!n.from||n.from.includes(typeof r)){const s=n.method(r,t);if(s)return s}return o}}:n||a},e.prepare=function(n,a){return n&&a?function(r,t){const o=n(r,t);if(o){if(o.errors||o.value===void 0)return o;r=o.value}return a(r,t)||o}: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 o=a(r,t);if(o){if(o.errors&&(!Array.isArray(o.errors)||o.errors.length))return o;r=o.value}return n(r,t)||o}:n||a}},5107:(k,x,b)=>{const l=b(375),y=b(8571),p=b(8652),f=b(8160),e=b(3292),n=b(6354),a=b(8901),r=b(9708),t=b(6133),o=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 h of d._types)d[h]=function(..._){return l(!_.length||["alternatives","link","object"].includes(h),"The",h,"type does not allow arguments"),u.generate(this,u.types[h],_)};for(const h of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])d[h]=function(..._){return this.any()[h](..._)};Object.assign(d,u.methods);for(const h in u.aliases){const _=u.aliases[h];d[h]=d[_]}return d.x=d.expression,s.setup&&s.setup(d),d}};u.methods={ValidationError:n.ValidationError,version:f.version,cache:p.provider,assert(d,h,..._){u.assert(d,h,!0,_)},attempt:(d,h,..._)=>u.assert(d,h,!1,_),build(d){return l(typeof r.build=="function","Manifest functionality disabled"),r.build(this,d)},checkPreferences(d){f.checkPreferences(d)},compile(d,h){return e.compile(this,d,h)},defaults(d){l(typeof d=="function","modifier must be a function");const h=Object.assign({},this);for(const _ of h._types){const v=d(h[_]());l(f.isSchema(v),"modifier must return a valid schema object"),h[_]=function(...c){return u.generate(this,v,c)}}return h},expression:(...d)=>new o(...d),extend(...d){f.verifyFlat(d,"extend"),i=i||b(3378),l(d.length,"You need to provide at least one extension"),this.assert(d,i.extensions);const h=Object.assign({},this);h._types=new Set(h._types);for(let _ of d){typeof _=="function"&&(_=_(h)),this.assert(_,i.extension);const v=u.expandExtension(_,h);for(const c of v){l(h[c.type]===void 0||h._types.has(c.type),"Cannot override name",c.type);const m=c.base||this.any(),g=a.type(m,c);h._types.add(c.type),h[c.type]=function(...w){return u.generate(this,g,w)}}}return h},isError:n.ValidationError.isError,isExpression:o.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 h of this._types)d[h]=this[h]();for(const h in u.aliases)d[h]=this[h]();return d}},u.assert=function(d,h,_,v){const c=v[0]instanceof Error||typeof v[0]=="string"?v[0]:null,m=c!==null?v[1]:v[0],g=h.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,h,_){return l(d,"Must be invoked on a Joi instance."),h.$_root=d,h._definition.args&&_.length?h._definition.args(h,..._):h},u.expandExtension=function(d,h){if(typeof d.type=="string")return[d];const _=[];for(const v of h._types)if(d.type.test(v)){const c=Object.assign({},d);c.type=v,c.base=h[v](),_.push(c)}return _},k.exports=u.root()},6914:(k,x,b)=>{const l=b(375),y=b(8571),p=b(3328);x.compile=function(f,e){if(typeof f=="string")return l(!e,"Cannot set single message string"),new p(f);if(p.isTemplate(f))return l(!e,"Cannot set single message template"),f;l(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"||p.isTemplate(a)){e[n]=a;continue}if(typeof a=="string"){e[n]=new p(a);continue}l(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"||p.isTemplate(t)?e[r][n]=t:(l(typeof t=="string","Invalid message for",n,"in",r),e[r][n]=new p(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(p.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 p(e);if(p.isTemplate(e))return e;const n=y(f);for(let a in e){const r=e[a];if(a==="root"||p.isTemplate(r)){n[a]=r;continue}if(typeof r=="string"){n[a]=new p(r);continue}l(typeof r=="object"&&!Array.isArray(r),"Invalid message for",a);const t=a;for(a in n[t]=n[t]||{},r){const o=r[a];a==="root"||p.isTemplate(o)?n[t][a]=o:(l(typeof o=="string","Invalid message for",a,"in",t),n[t][a]=new p(o))}}return n}},2294:(k,x,b)=>{const l=b(375),y=b(8160),p=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())l(!this._byKey.has(n),"Schema id conflicts with existing key:",n),this._byId.set(n,a);for(const[n,a]of e._byKey.entries())l(!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 o={id:t.id,schema:n(t.schema)};l(y.isSchema(o.schema),"adjuster function failed to return a joi schema type");for(const s of r)o={id:s.id,schema:f.fork(s.schema,o.id,o.schema)};return o.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);l(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);l(!r||r.schema===e,"Cannot add different schemas with the same id:",a),l(!this._byKey.has(a),"Schema id conflicts with existing key:",a),this._byId.set(a,{schema:e,id:a})}n&&(l(!this._byKey.has(n),"Schema already contains key:",n),l(!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);l(t,"Schema does not contain path",[...n,...e].join(".")),a=[t,...a];const o=e.slice(1);return o.length?t.schema._ids._collect(o,[...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:o})=>{if(n===(t._flags.id||o))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],o=f.scan(t.args,{source:"rules",name:t.name},n);if(o!==void 0){a=a||e.clone();const s=Object.assign({},t);s.args=o,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 o=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,...o],u);d!==void 0&&(s=s||e.slice(),s[i]=d)}return s}if(a.schema!==!1&&y.isSchema(e)||a.ref!==!1&&p.isRef(e)){const i=a.each(e,{...n,path:o,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,...o],t);u!==void 0&&(s=s||Object.assign({},e),s[i]=u)}return s}},6133:(k,x,b)=>{const l=b(375),y=b(8571),p=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={}){l(typeof a=="string","Invalid reference key:",a),f.assertOptions(r,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),l(!r.prefix||typeof r.prefix=="object","options.prefix must be of type object");const t=Object.assign({},n.defaults,r);delete t.prefix;const o=t.separator,s=n.context(a,o,r.prefix);if(t.type=s.type,a=s.key,t.type==="value")if(s.root&&(l(!o||a[0]!==o,"Cannot specify relative path with root prefix"),t.ancestor="root",a||(a=null)),o&&o===a)a=null,t.ancestor=0;else if(t.ancestor!==void 0)l(!o||!a||a[0]!==o,"Cannot combine prefix with ancestor option");else{const[i,u]=n.ancestor(a,o);u&&(a=a.slice(u))===""&&(a=null),t.ancestor=i}return t.path=o?a===null?[]:a.split(o):[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){l(typeof a=="object","Invalid reference construction"),f.assertOptions(a,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),l([!1,void 0].includes(a.separator)||typeof a.separator=="string"&&a.separator.length===1,"Invalid separator"),l(!a.adjust||typeof a.adjust=="function","options.adjust must be a function"),l(!a.map||Array.isArray(a.map),"options.map must be an array"),l(!a.map||!a.adjust,"Cannot set both map and adjust options"),Object.assign(this,n.defaults,a),l(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,o,s={}){return l(!this.in||s.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(t.context,r,s):this.type==="local"?this._resolve(o,r,s):this.ancestor?this.ancestor==="root"?this._resolve(r.ancestors[r.ancestors.length-1],r,s):(l(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 o;if(this.type==="value"&&r.mainstay.shadow&&t.shadow!==!1&&(o=r.mainstay.shadow.get(this.absolute(r))),o===void 0&&(o=p(a,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(o=this.adjust(o)),this.map){const s=this.map.get(o);s!==void 0&&(o=s)}return r.mainstay&&r.mainstay.tracer.resolve(r,this,o),o}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 o=t.global===void 0?"$":t.global;if(o!==r&&a.startsWith(o))return{key:a.slice(o.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 l=b(5107),y={};y.wrap=l.string().min(1).max(2).allow(!1),x.preferences=l.object({allowUnknown:l.boolean(),abortEarly:l.boolean(),artifacts:l.boolean(),cache:l.boolean(),context:l.object(),convert:l.boolean(),dateFormat:l.valid("date","iso","string","time","utc"),debug:l.boolean(),errors:{escapeHtml:l.boolean(),label:l.valid("path","key",!1),language:[l.string(),l.object().ref()],render:l.boolean(),stack:l.boolean(),wrap:{label:y.wrap,array:y.wrap,string:y.wrap}},externals:l.boolean(),messages:l.object(),noDefaults:l.boolean(),nonEnumerables:l.boolean(),presence:l.valid("required","optional","forbidden"),skipFunctions:l.boolean(),stripUnknown:l.object({arrays:l.boolean(),objects:l.boolean()}).or("arrays","objects").allow(!0,!1),warnings:l.boolean()}).strict(),y.nameRx=/^[a-zA-Z0-9]\w*$/,y.rule=l.object({alias:l.array().items(l.string().pattern(y.nameRx)).single(),args:l.array().items(l.string(),l.object({name:l.string().pattern(y.nameRx).required(),ref:l.boolean(),assert:l.alternatives([l.function(),l.object().schema()]).conditional("ref",{is:!0,then:l.required()}),normalize:l.function(),message:l.string().when("assert",{is:l.function(),then:l.required()})})),convert:l.boolean(),manifest:l.boolean(),method:l.function().allow(!1),multi:l.boolean(),validate:l.function()}),x.extension=l.object({type:l.alternatives([l.string(),l.object().regex()]).required(),args:l.function(),cast:l.object().pattern(y.nameRx,l.object({from:l.function().maxArity(1).required(),to:l.function().minArity(1).maxArity(2).required()})),base:l.object().schema().when("type",{is:l.object().regex(),then:l.forbidden()}),coerce:[l.function().maxArity(3),l.object({method:l.function().maxArity(3).required(),from:l.array().items(l.string()).single()})],flags:l.object().pattern(y.nameRx,l.object({setter:l.string(),default:l.any()})),manifest:{build:l.function().arity(2)},messages:[l.object(),l.string()],modifiers:l.object().pattern(y.nameRx,l.function().minArity(1).maxArity(2)),overrides:l.object().pattern(y.nameRx,l.function()),prepare:l.function().maxArity(3),rebuild:l.function().arity(1),rules:l.object().pattern(y.nameRx,y.rule),terms:l.object().pattern(y.nameRx,l.object({init:l.array().allow(null).required(),manifest:l.object().pattern(/.+/,[l.valid("schema","single"),l.object({mapped:l.object({from:l.string().required(),to:l.string().required()}).required()})])})),validate:l.function().maxArity(3)}).strict(),x.extensions=l.array().items(l.object(),l.function().arity(1)).strict(),y.desc={buffer:l.object({buffer:l.string()}),func:l.object({function:l.function().required(),options:{literal:!0}}),override:l.object({override:!0}),ref:l.object({ref:l.object({type:l.valid("value","global","local"),path:l.array().required(),separator:l.string().length(1).allow(!1),ancestor:l.number().min(0).integer().allow("root"),map:l.array().items(l.array().length(2)).min(1),adjust:l.function(),iterables:l.boolean(),in:l.boolean(),render:l.boolean()}).required()}),regex:l.object({regex:l.string().min(3)}),special:l.object({special:l.valid("deep").required()}),template:l.object({template:l.string().required(),options:l.object()}),value:l.object({value:l.alternatives([l.object(),l.array()]).required()})},y.desc.entity=l.alternatives([l.array().items(l.link("...")),l.boolean(),l.function(),l.number(),l.string(),y.desc.buffer,y.desc.func,y.desc.ref,y.desc.regex,y.desc.special,y.desc.template,y.desc.value,l.link("/")]),y.desc.values=l.array().items(null,l.boolean(),l.function(),l.number().allow(1/0,-1/0),l.string().allow(""),l.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=l.object().pattern(/.+/,[l.string(),y.desc.template,l.object().pattern(/.+/,[l.string(),y.desc.template])]),x.description=l.object({type:l.string().required(),flags:l.object({cast:l.string(),default:l.any(),description:l.string(),empty:l.link("/"),failover:y.desc.entity,id:l.string(),label:l.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:l.boolean(),unit:l.string()}).unknown(),preferences:{allowUnknown:l.boolean(),abortEarly:l.boolean(),artifacts:l.boolean(),cache:l.boolean(),convert:l.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:l.boolean(),label:["path","key"],language:[l.string(),y.desc.ref],wrap:{label:y.wrap,array:y.wrap}},externals:l.boolean(),messages:y.desc.messages,noDefaults:l.boolean(),nonEnumerables:l.boolean(),presence:["required","optional","forbidden"],skipFunctions:l.boolean(),stripUnknown:l.object({arrays:l.boolean(),objects:l.boolean()}).or("arrays","objects").allow(!0,!1),warnings:l.boolean()},allow:y.desc.values,invalid:y.desc.values,rules:l.array().min(1).items({name:l.string().required(),args:l.object().min(1),keep:l.boolean(),message:[l.string(),y.desc.messages],warn:l.boolean()}),keys:l.object().pattern(/.*/,l.link("/")),link:y.desc.ref}).pattern(/^[a-z]\w*$/,l.any())},493:(k,x,b)=>{const l=b(8571),y=b(9621),p=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=l(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 p.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 o=e[t];let s=r.get(o);s||(s=new Map,r.set(o,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 l=b(375),y=b(8571),p=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,o){if(l(typeof t=="string","Template source must be a string"),l(!t.includes("\0")&&!t.includes(""),"Template source cannot contain reserved control characters"),this.source=t,this.rendered=t,this._template=null,o){const{functions:s,...i}=o;this._settings=Object.keys(i).length?y(i):void 0,this._functions=s,this._functions&&(l(Object.keys(this._functions).every(u=>typeof u=="string"),"Functions keys must be strings"),l(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),o=r.split(t);let s=!1;const i=[],u=o.shift();u&&i.push(u);for(const d of o){const h=d[0]!=="{",_=h?"}":"}}",v=d.indexOf(_);if(v===-1||d[1]==="{"){i.push(`{${r.decode(d)}`);continue}let c=d.slice(h?0:1,v);const m=c[0]===":";m&&(c=c.slice(1));const g=this._ref(r.decode(c),{raw:h,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,o){return r.dateFormat[o.dateFormat].call(t)}describe(t={}){if(!this._settings&&t.compact)return this.source;const o={template:this.source};return this._settings&&(o.options=this._settings),this._functions&&(o.functions=this._functions),o}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 o of this._template)typeof o!="string"&&t.push(...o.refs);return t}resolve(t,o,s,i){return this._template&&this._template.length===1?this._part(this._template[0],t,o,s,i,{}):this.render(t,o,s,i)}_part(t,...o){return t.ref?t.ref.resolve(...o):t.formula.evaluate(o)}render(t,o,s,i,u={}){if(!this.isDynamic())return this.rendered;const d=[];for(const h of this._template)if(typeof h=="string")d.push(h);else{const _=this._part(h,t,o,s,i,u),v=r.stringify(_,t,o,s,i,u);if(v!==void 0){const c=h.raw||(u.errors&&u.errors.escapeHtml)===!1?v:p(v);d.push(r.wrap(c,h.wrapped&&s.errors.wrap.label))}}return d.join("")}_ref(t,{raw:o,wrapped:s}){const i=[],u=h=>{const _=a.create(h,this._settings);return i.push(_),v=>{const c=_.resolve(...v);return c!==void 0?c:null}};try{const h=this._functions?{...r.functions,...this._functions}:r.functions;var d=new f.Parser(t,{reference:u,functions:h,constants:r.constants})}catch(h){throw h.message=`Invalid template variable "${t}" fails due to: ${h.message}`,h}if(d.single){if(d.single.type==="reference"){const h=i[0];return{ref:h,raw:o,refs:i,wrapped:s||h.type==="local"&&h.key==="label"}}return r.stringify(d.single.value)}return{formula:d,raw:o,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,(o,s)=>r.opens.slice(0,s.length)).replace(/\\(\}+)/g,(o,s)=>r.closes.slice(0,s.length))},r.decode=function(t){return t.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},r.split=function(t){const o=[];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;o.push(s),s=d}else s+=u}return o.push(s),o},r.wrap=function(t,o){return o?o.length===1?`${o}${t}${o}`:`${o[0]}${t}${o[1]}`:t},r.stringify=function(t,o,s,i,u,d={}){const h=typeof t,_=i&&i.errors&&i.errors.wrap||{};let v=!1;if(a.isRef(t)&&t.render&&(v=t.in,t=t.resolve(o,s,i,u,{in:t.in,...d})),t===null)return"null";if(h==="string")return r.wrap(t,d.arrayItems&&_.string);if(h==="number"||h==="function"||h==="symbol")return t.toString();if(h!=="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,o,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,o,s)=>t?o: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[o,s,i,u,d]=this,h=d.messages;if(!h)return"";const _=n.template(o,h[0],t,s,i)||n.template(o,h[1],t,s,i);return _?_.render(o,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 l=b(375),y=b(1687),p=b(8068),f=b(8160),e=b(3292),n=b(6354),a=b(6133),r={};k.exports=p.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:a.toSibling}},args:(t,...o)=>o.length===1&&Array.isArray(o[0])?t.try(...o[0]):t.try(...o),validate(t,o){const{schema:s,error:i,state:u,prefs:d}=o;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 h=[];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(),h.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,A=`match.${_}${v.switch?"."+g:""}`;if($.$_match(c,u.nest($,`${A}.is`),d)){if(j)return j.$_validate(t,u.nest(j,`${A}.then`),d)}else if(S)return S.$_validate(t,u.nest(S,`${A}.otherwise`),d)}}return r.errors(h,o)},rules:{conditional:{method(t,o){l(!this._flags._endedSwitch,"Unreachable condition"),l(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),l(o.break===void 0,"Cannot use break option with alternatives conditional");const s=this.clone(),i=e.when(s,t,o),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(l(["any","one","all"].includes(t),"Invalid alternatives match mode",t),t!=="any")for(const o of this.$_terms.matches)l(o.schema,"Cannot combine match mode",t,"with conditional rules");return this.$_setFlag("match",t)}},try:{method(...t){l(t.length,"Missing alternative schemas"),f.verifyFlat(t,"try"),l(!this._flags._endedSwitch,"Unreachable condition");const o=this.clone();for(const s of t)o.$_terms.matches.push({schema:o.$_compile(s)});return o.$_mutateRebuild()}}},overrides:{label(t){return this.$_parent("label",t).$_modify({each:(o,s)=>s.path[0]!=="is"&&typeof o._flags.label!="string"?o.label(t):void 0,ref:!1})}},rebuild(t){t.$_modify({each:o=>{f.isSchema(o)&&o.type==="array"&&t.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(t,o){if(o.matches)for(const s of o.matches){const{schema:i,ref:u,is:d,not:h,then:_,otherwise:v}=s;t=i?t.try(i):u?t.conditional(u,{is:d,then:_,not:h,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:o,state:s}){if(!t.length)return{errors:o("alternatives.any")};if(t.length===1)return{errors:t[0].reports};const i=new Set,u=[];for(const{reports:d,schema:h}of t){if(d.length>1)return r.unmatched(t,o);const _=d[0];if(_ instanceof n.Report==0)return r.unmatched(t,o);if(_.state.path.length!==s.path.length){u.push({type:h.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:h.type,report:_})}return u.length?u.length===1?{errors:u[0].report}:r.unmatched(t,o):{errors:o("alternatives.types",{types:[...i]})}},r.unmatched=function(t,o){const s=[];for(const i of t)s.push(...i.reports);return{errors:o("alternatives.match",n.details(s,{override:!1}))}}},8068:(k,x,b)=>{const l=b(375),y=b(7629),p=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 l(typeof e=="function","Method must be a function"),l(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){l(p.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 l(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:o,is:s,not:i,then:u,otherwise:d,concat:h}=t;e=h?e.concat(h):o?e.when(o,{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:o,adjuster:s}of r)t[o]=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 l=b(375),y=b(9474),p=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:o,prefs:s}){if(!Array.isArray(r))return;const i=t.$_getRule("sort");return i?a.sort(t,r,i.args.options,o,s):void 0}},validate(r,{schema:t,error:o}){if(!Array.isArray(r)){if(t._flags.single){const s=[r];return s[e.symbols.arraySingle]=!0,{value:s}}return{errors:o("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:o,error:s},{schema:i}){const u=[r,...t.ancestors];for(let h=0;h<r.length;++h){const _=t.localize([...t.path,h],u,i);if(i.$_match(r[h],_,o))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 o=0;o<r.length;++o){const s=e.tryWithPath(()=>this.$_compile(r[o]),o,{append:!0});t.$_terms.items.push(s)}return t.$_mutateRebuild()},validate(r,{schema:t,error:o,state:s,prefs:i,errorsArray:u}){const d=t.$_terms._requireds.slice(),h=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),A=[...s.path,S];if(!t._flags.sparse&&w===void 0){if(c.push(o("array.sparse",{key:S,path:A,pos:g,value:void 0},s.localize(A))),i.abortEarly)return c;h.shift();continue}const E=[r,...s.ancestors];for(const M of t.$_terms._exclusions)if(M.$_match(w,s.localize(A,E,M),i,{presence:"ignore"})){if(c.push(o("array.excludes",{pos:g,value:w},s.localize(A))),i.abortEarly)return c;$=!0,h.shift();break}if($)continue;if(t.$_terms.ordered.length){if(h.length){const M=h.shift(),T=M.$_validate(w,s.localize(A,E,M),i);if(T.errors){if(c.push(...T.errors),i.abortEarly)return c}else if(M._flags.result==="strip")a.fastSplice(r,g),--g,--m;else{if(!t._flags.sparse&&T.value===void 0){if(c.push(o("array.sparse",{key:S,path:A,pos:g,value:void 0},s.localize(A))),i.abortEarly)return c;continue}r[g]=T.value}continue}if(!t.$_terms.items.length){if(c.push(o("array.orderedLength",{pos:g,limit:t.$_terms.ordered.length})),i.abortEarly)return c;break}}const I=[];let N=d.length;for(let M=0;M<N;++M){const T=s.localize(A,E,d[M]);T.snapshot();const z=d[M].$_validate(w,T,i);if(I[M]=z,!z.errors){if(T.commit(),r[g]=z.value,j=!0,a.fastSplice(d,M),--M,--N,!t._flags.sparse&&z.value===void 0&&(c.push(o("array.sparse",{key:S,path:A,pos:g,value:void 0},s.localize(A))),i.abortEarly))return c;break}T.restore()}if(j)continue;const q=i.stripUnknown&&!!i.stripUnknown.arrays||!1;N=_.length;for(const M of _){let T;const z=d.indexOf(M);if(z!==-1)T=I[z];else{const B=s.localize(A,E,M);if(B.snapshot(),T=M.$_validate(w,B,i),!T.errors){B.commit(),M._flags.result==="strip"?(a.fastSplice(r,g),--g,--m):t._flags.sparse||T.value!==void 0?r[g]=T.value:(c.push(o("array.sparse",{key:S,path:A,pos:g,value:void 0},s.localize(A))),$=!0),j=!0;break}B.restore()}if(N===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(o("array.includes",{pos:g,value:w},s.localize(A))),i.abortEarly)return c}}return d.length&&a.fillMissedErrors(t,c,d,r,s,i),h.length&&(a.fillOrderedErrors(t,c,h,r,s,i),c.length||a.fillDefault(h,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:o},{name:s,operator:i,args:u})=>e.compare(r.length,o,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 o=0;o<r.length;++o){const s=e.tryWithPath(()=>this.$_compile(r[o]),o,{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 l(!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}),l(!t.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:t}})},validate(r,{error:t,state:o,prefs:s,schema:i},{options:u}){const{value:d,errors:h}=a.sort(i,r,u,o,s);if(h)return h;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={}){l(!r||typeof r=="function"||typeof r=="string","comparator must be a function or a string"),e.assertOptions(t,["ignoreUndefined","separator"]);const o={name:"unique",args:{options:t,comparator:r}};if(r)if(typeof r=="string"){const s=e.default(t.separator,".");o.path=s?r.split(s):[r]}else o.comparator=r;return this.$_addRule(o)},validate(r,{state:t,error:o,schema:s},{comparator:i,options:u},{comparator:d,path:h}){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=h?p(r[m],h):r[m],w=d?_.custom:_[typeof g];if(l(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]),A={pos:m,value:r[m],dupePos:j.value[1],dupeValue:r[j.value[1]]};return h&&(A.path=i),o("array.unique",A,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 h&&($.path=i),o("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,o,s,i,u){const d=[];let h=0;for(const _ of o){const v=_._flags.label;v?d.push(v):++h}d.length?h?t.push(r.$_createError("array.includesRequiredBoth",s,{knownMisses:d,unknownMisses:h},i,u)):t.push(r.$_createError("array.includesRequiredKnowns",s,{knownMisses:d},i,u)):t.push(r.$_createError("array.includesRequiredUnknowns",s,{unknownMisses:h},i,u))},a.fillOrderedErrors=function(r,t,o,s,i,u){const d=[];for(const h of o)h._flags.presence==="required"&&d.push(h);d.length&&a.fillMissedErrors(r,t,d,s,i,u)},a.fillDefault=function(r,t,o,s){const i=[];let u=!0;for(let d=r.length-1;d>=0;--d){const h=r[d],_=[t,...o.ancestors],v=h.$_validate(void 0,o.localize(o.path,_,h),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 o=t;for(;o<r.length;)r[o++]=r[o];--r.length},a.validateSingle=function(r,t){(r.type==="array"||r._flags._arrayItems)&&(l(!t._flags.single,"Cannot specify array item with single rule enabled"),t.$_setFlag("_arrayItems",!0,{clone:!1}))},a.sort=function(r,t,o,s,i){const u=o.order==="ascending"?1:-1,d=-1*u,h=u,_=(v,c)=>{let m=a.compare(v,c,d,h);if(m!==null||(o.by&&(v=o.by.resolve(v,s,i),c=o.by.resolve(c,s,i)),m=a.compare(v,c,d,h),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:h};try{return{value:t.slice().sort(_)}}catch(v){return{errors:v}}},a.compare=function(r,t,o,s){return r===t?0:r===void 0?1:t===void 0?-1:r===null?s:t===null?o:null}},4937:(k,x,b)=>{const l=b(375),y=b(8068),p=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){p.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];l(t!==void 0,"Cannot call truthy with undefined"),a.$_terms.truthy.add(t)}return a}},falsy:{method(...n){p.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];l(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 l=b(375),y=b(8068),p=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 o=a._flags.format;return t.convert&&o&&typeof n=="string"?{value:n,errors:r("date.format",{format:o})}:{value:n,errors:r("date.base")}},rules:{compare:{method:!1,validate(n,a,{date:r},{name:t,operator:o,args:s}){const i=r==="now"?Date.now():r.getTime();return p.compare(n.getTime(),i,o)?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 l(["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 l(["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 p.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 l=b(375),y=b(7824);k.exports=y.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(p){return l(Number.isSafeInteger(p)&&p>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:p}})},validate:(p,f,{n:e})=>p.length===e?p:f.error("function.arity",{n:e})},class:{method(){return this.$_addRule("class")},validate:(p,f)=>/^\s*class\s/.test(p.toString())?p:f.error("function.class",{value:p})},minArity:{method(p){return l(Number.isSafeInteger(p)&&p>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:p}})},validate:(p,f,{n:e})=>p.length>=e?p:f.error("function.minArity",{n:e})},maxArity:{method(p){return l(Number.isSafeInteger(p)&&p>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:p}})},validate:(p,f,{n:e})=>p.length<=e?p: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 l=b(978),y=b(375),p=b(8571),f=b(3652),e=b(8068),n=b(8160),a=b(3292),r=b(6354),t=b(6133),o=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:h,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,h,_,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,...h.ancestors];for(const g of u.$_terms.keys){const w=g.key,$=i[w];c.delete(w);const j=h.localize([...h.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,h,_);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,h,_,null,{shadow:!1}))===!1)continue;const g=s.dependencies[m.rel](u,m,i,h,_);if(g){const w=u.$_createError(g.code,i,g.context,h,_);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){o.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 h=this.$_addRule({name:"assert",args:{subject:i,schema:u,message:d}});return h.$_mutateRegister(i),h.$_mutateRegister(u),h},validate(i,{error:u,prefs:d,state:h},{subject:_,schema:v,message:c}){const m=_.resolve(i,h,d),g=t.isRef(_)?_.absolute(h):[];return v.$_match(m,h.localize(g,[i,...h.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:h})=>i instanceof d?i:u.error("object.instance",{type:h,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:h,operator:_,args:v})=>n.compare(Object.keys(i).length,d,_)?i:u.error("object."+h,{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 h=i instanceof RegExp;h||(i=this.$_compile(i,{appendPath:!0})),y(u!==void 0,"Invalid rule"),n.assertOptions(d,["fallthrough","matches"]),h&&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={[h?"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 o,"Invalid rename to argument"),y(u!==i,"Cannot rename key to same name:",i),n.assertOptions(d,["alias","ignoreUndefined","override","multiple"]);const h=this.clone();h.$_terms.renames=h.$_terms.renames||[];for(const _ of h.$_terms.renames)y(_.from!==i,"Cannot rename the same key multiple times");return u instanceof o&&h.$_mutateRegister(u),h.$_terms.renames.push({from:i,to:u,options:l(s.renameDefaults,d)}),h}},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:h=null,peers:_,options:v}of u.dependencies)i=s.dependency(i,d,h,_,v);if(u.patterns)for(const{regex:d,schema:h,rule:_,fallthrough:v,matches:c}of u.patterns)i=i.pattern(d||h,_,{fallthrough:v,matches:c});if(u.renames)for(const{from:d,to:h,options:_}of u.renames)i=i.rename(d,h,_);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 p(i,{shallow:!0});const h=Object.create(Object.getPrototypeOf(i));return Object.assign(h,i),h}const d=function(...h){return i.apply(this,h)};return d.prototype=p(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,h,_){y(d===null||typeof d=="string",u,"key must be a strings"),_||(_=h.length>1&&typeof h[h.length-1]=="object"?h.pop():{}),n.assertOptions(_,["separator","isPresent"]),h=[].concat(h);const v=n.default(_.separator,"."),c=[];for(const g of h)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,h,_)),m},s.dependencies={and(i,u,d,h,_){const v=[],c=[],m=u.peers.length,g=s.isPresent(u.options);for(const w of u.peers)g(w.resolve(d,h,_,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,h,_){const v=[],c=s.isPresent(u.options);for(const w of u.peers)c(w.resolve(d,h,_,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,h,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,h,_,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:u.paths,peersWithLabels:s.keysToLabels(i,u.paths)}}},oxor(i,u,d,h,_){const v=[],c=s.isPresent(u.options);for(const g of u.peers)c(g.resolve(d,h,_,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,h,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,h,_,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,h,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,h,_,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,h,_){const v=[],c=s.isPresent(u.options);for(const g of u.peers)c(g.resolve(d,h,_,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,h,_){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 o&&(j=j.render(u,d,h,w.match)),$!==j){if(!c.options.multiple&&v[j]&&(_.push(i.$_createError("object.rename.multiple",u,{from:$,to:j,pattern:g},d,h)),h.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,h)),h.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,h,_,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 A=i.$_terms.patterns[S];if(A.regex){const N=A.regex.test(w);if(_.mainstay.tracer.debug(_,"rule",`pattern.${S}`,N?"pass":"error"),!N)continue}else if(!A.schema.$_match(w,_.nest(A.schema,`pattern.${S}`),v))continue;d.delete(w);const E=_.localize(j,g,{schema:A.rule,key:w}),I=A.rule.$_validate($,E,v);if(I.errors){if(v.abortEarly)return{value:u,errors:I.errors};h.push(...I.errors)}if(A.matches&&m[S].push(w),u[w]=I.value,!A.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),A=j.$_validate($,S,v);if(A.errors){const E=r.details(A.errors,{override:!1});E.matches=$;const I=i.$_createError("object.pattern.match",u,E,_,v);if(v.abortEarly)return{value:u,errors:I};h.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};h.push(g)}}},s.Dependency=class{constructor(i,u,d,h,_){this.rel=i,this.key=u,this.peers=d,this.paths=h,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 h=0;h<u.length;++h)d.set(u[h].key,h);for(const h of i){const _=h.key,v=d.get(_);v!==void 0?u[v]={key:_,schema:u[v].schema.concat(h.schema)}:u.push(h)}return u}}},8785:(k,x,b)=>{const l=b(375),y=b(8068),p=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:o}){l(r.$_terms.link,"Uninitialized link schema");const s=n.generate(r,a,t,o),i=r.$_terms.link[0].ref;return s.$_validate(a,t.nest(s,`link:${i.display}:${s.type}`),o)},generate:(a,r,t,o)=>n.generate(a,r,t,o),rules:{ref:{method(a){l(!this.$_terms.link,"Cannot reinitialize schema"),a=f.ref(a),l(a.type==="value"||a.type==="local","Invalid reference type:",a.type),l(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){l(this.$_terms.link,"Uninitialized link schema"),l(p.isSchema(a),"Invalid schema object"),l(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)=>(l(r.link,"Invalid link description missing link"),a.ref(r.link))}}),n.generate=function(a,r,t,o){let s=t.mainstay.links.get(a);if(s)return s._generate(r,t,o).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,o);try{s=d.length?u.$_reach(d):u}catch{n.assert(!1,"to non-existing schema",i,a,t,o)}return n.assert(s.type!=="link","which is another link",i,a,t,o),a._flags.relative||t.mainstay.links.set(a,s),s._generate(r,t,o).schema},n.perspective=function(a,r){if(a.type==="local"){for(const{schema:t,key:o}of r.schemas){if((t._flags.id||o)===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,o,s,i){a||l(!1,`"${e.label(o._flags,s,i)}" contains link reference "${t.display}" ${r}`)}},3832:(k,x,b)=>{const l=b(375),y=b(8068),p=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(!p.isNumber(e))return{value:e,errors:a("number.base")};const t={value:e};if(r.convert){const o=n.$_getRule("precision");if(o){const s=Math.pow(10,o.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:o})=>p.compare(e,a,t)?e:n.error("number."+r,{limit:o.limit,value:e}),args:[{name:"limit",ref:!0,assert:p.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},o)=>f.decimalPlaces(e)>r?n.error("number.multiple",{multiple:o.args.base,value:e}):Math.round(t*e)%Math.round(t*a)==0?e:n.error("number.multiple",{multiple:o.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 l(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 l(["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 l(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 l=b(7824);k.exports=l.extend({type:"object",cast:{map:{from:y=>y&&typeof y=="object",to:(y,p)=>new Map(Object.entries(y))}}})},7417:(k,x,b)=>{const l=b(375),y=b(5380),p=b(1745),f=b(9959),e=b(6064),n=b(9926),a=b(5752),r=b(8068),t=b(8160),o={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 h=i.$_getRule("normalize");h&&(s=s.normalize(h.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=o.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},l(typeof s.paddingRequired=="boolean","paddingRequired must be boolean"),l(typeof s.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:s}})},validate:(s,i,{options:u})=>o.base64Regex[u.paddingRequired][u.urlSafe].test(s)?s:i.error("string.base64")},case:{method(s){return l(["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,h=1;for(;u--;){const _=s.charAt(u)*h;d+=_-9*(_>9),h^=3}return d>0&&d%10==0?s:i.error("string.creditCard")}},dataUri:{method(s={}){return t.assertOptions(s,["paddingRequired"]),s={paddingRequired:!0,...s},l(typeof s.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:s}})},validate(s,i,{options:u}){const d=s.match(o.dataUriRegex);return d&&(!d[2]||d[2]!=="base64"||o.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=o.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"]),l(s.multiple===void 0||typeof s.multiple=="boolean","multiple option must be an boolean");const i=o.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:h}){const _=u.multiple?s.split(d):[s],v=[];for(const c of _)p.isValid(c,h)||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 h=[].concat(s.version);l(h.length>=1,"version must have at least 1 valid version specified");const _=new Set;for(let v=0;v<h.length;++v){const c=h[v];l(typeof c=="string","version at position "+v+" must be a string");const m=o.guidVersions[c.toLowerCase()];l(m,"version at position "+v+" must be one of "+Object.keys(o.guidVersions).join(", ")),l(!_.has(m),"version at position "+v+" must not be a duplicate"),i+=m,_.add(m)}}l(o.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 h=d.exec(s);return h?o.guidBrackets[h[1]]!==h[h.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},l(typeof s.byteAligned=="boolean","byteAligned must be boolean"),l(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"?o.hexRegex.withOptionalPrefix:u.prefix===!0?o.hexRegex.withPrefix:o.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})||o.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),h=s.version?u:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:i,version:h}},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})=>o.isoDate(s)?s:i("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(s,i)=>o.isoDurationRegex.test(s)?s:i.error("string.isoDuration")},length:{method(s,i){return o.length(this,"length",s,"=",i)},validate(s,i,{limit:u,encoding:d},{name:h,operator:_,args:v}){const c=!d&&s.length;return t.compare(c,u,_)?s:i.error("string."+h,{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 o.length(this,"max",s,"<=",i)},args:["limit","encoding"]},min:{method(s,i){return o.length(this,"min",s,">=",i)},args:["limit","encoding"]},normalize:{method(s="NFC"){return l(o.normalizationForms.includes(s),"normalization form must be one of "+o.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={}){l(s instanceof RegExp,"regex must be a RegExp"),l(!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:h})=>u.test(s)^d.invert?s:i.error(h,{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")),l(s instanceof RegExp,"pattern must be a RegExp"),l(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 l(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 l(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?o.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:h,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!h||u.allowRelative&&!c||y.isValid(c,h)?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"}}),o.addressOptions=function(s){if(!s)return o.tlds||s;if(l(s.minDomainSegments===void 0||Number.isSafeInteger(s.minDomainSegments)&&s.minDomainSegments>0,"minDomainSegments must be a positive integer"),l(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 l(o.tlds,"Built-in TLD list disabled"),Object.assign({},s,o.tlds);l(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)}})),l(s.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),l(!s.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),o.validateTlds(s.tlds.deny,"tlds.deny"),s;const u=s.tlds.allow;return u?u===!0?(l(o.tlds,"Built-in TLD list disabled"),Object.assign({},s,o.tlds)):(Array.isArray(u)&&(s=Object.assign({},s,{tlds:{allow:new Set(u)}})),l(s.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),o.validateTlds(s.tlds.allow,"tlds.allow"),s):s},o.validateTlds=function(s,i){for(const u of s)l(y.isValid(u,{minDomainSegments:1,maxDomainSegments:1}),`${i} must contain valid top level domain names`)},o.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()},o.length=function(s,i,u,d,h){return l(!h||!1,"Invalid encoding:",h),s.$_addRule({name:i,method:"length",args:{limit:u,encoding:h},operator:d})}},8826:(k,x,b)=>{const l=b(375),y=b(8068),p={};p.Map=class extends Map{slice(){return new p.Map(this)}},k.exports=y.extend({type:"symbol",terms:{map:{init:new p.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)),l(f&&f[Symbol.iterator],"Iterable must be an iterable or object");const e=this.clone(),n=[];for(const a of f){l(a&&a[Symbol.iterator],"Entry must be an iterable");const[r,t]=a;l(typeof r!="object"&&typeof r!="function"&&typeof r!="symbol","Key must not be of type object, function, or Symbol"),l(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 l=b(375),y=b(8571),p=b(738),f=b(9621),e=b(8160),n=b(6354),a=b(493),r={result:Symbol("result")};x.entry=function(t,o,s){let i=e.defaults;s&&(l(s.warnings===void 0,"Cannot override warnings preference in synchronous validation"),l(s.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),i=e.preferences(e.defaults,s));const u=r.entry(t,o,i);l(!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,o,s){let i=e.defaults;s&&(i=e.preferences(e.defaults,s));const u=r.entry(t,o,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?[_]:[],A=m.length?f(t,m):t;if(m.length){w=m[m.length-1];let E=_;for(const I of m.slice(0,-1))E=E[I],S.unshift(E);$=S[0],j=$[w]}try{const E=(N,q)=>(g||c.schema).$_createError(N,j,q,c.state,i),I=await c.method(j,{schema:c.schema,linked:g,state:c.state,prefs:s,original:A,error:E,errorsArray:r.errorsArray,warn:(N,q)=>d.warnings.push((g||c.schema).$_createError(N,j,q,c.state,i)),message:(N,q)=>(g||c.schema).$_createError("external",j,q,c.state,i,{messages:N})});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(E){throw i.errors.label&&(E.message+=` (${c.label})`),E}}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 h={value:u.value};return d.warnings.length&&(h.warning=n.details(d.warnings)),d.debug&&(h.debug=d.debug),d.artifacts&&(h.artifacts=d.artifacts),h},r.Mainstay=class{constructor(t,o,s){this.externals=[],this.warnings=[],this.tracer=t,this.debug=o,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,o,s){const{tracer:i,cleanup:u}=r.tracer(o,s),d=s.debug?[]:null,h=o._ids._schemaChain?new Map:null,_=new r.Mainstay(i,d,h),v=o._ids._schemaChain?[{schema:o}]:null,c=new a([],[],{mainstay:_,schemas:v}),m=x.validate(t,o,c,s);u&&o.$_root.untrace();const g=n.process(m.errors,t,s);return{value:m.value,error:g,mainstay:_}},r.tracer=function(t,o){return t.$_root._tracer?{tracer:t.$_root._tracer._register(t)}:o.debug?(l(t.$_root.trace,"Debug mode not supported"),{tracer:t.$_root.trace()._register(t),cleanup:!0}):{tracer:r.ignore}},x.validate=function(t,o,s,i,u={}){if(o.$_terms.whens&&(o=o._generate(t,s,i).schema),o._preferences&&(i=r.prefs(o,i)),o._cache&&i.cache){const g=o._cache.get(t);if(s.mainstay.tracer.debug(s,"validate","cached",!!g),g)return g}const d=(g,w,$)=>o.$_createError(g,t,w,$||s,i),h={original:t,prefs:i,schema:o,state:s,error:d,errorsArray:r.errorsArray,warn:(g,w,$)=>s.mainstay.warnings.push(d(g,w,$)),message:(g,w)=>o.$_createError("custom",t,w,s,i,{messages:g})};s.mainstay.tracer.entry(o,s);const _=o._definition;if(_.prepare&&t!==void 0&&i.convert){const g=_.prepare(t,h);if(g){if(s.mainstay.tracer.value(s,"prepare",t,g.value),g.errors)return r.finalize(g.value,[].concat(g.errors),h);t=g.value}}if(_.coerce&&t!==void 0&&i.convert&&(!_.coerce.from||_.coerce.from.includes(typeof t))){const g=_.coerce.method(t,h);if(g){if(s.mainstay.tracer.value(s,"coerced",t,g.value),g.errors)return r.finalize(g.value,[].concat(g.errors),h);t=g.value}}const v=o._flags.empty;v&&v.$_match(r.trim(t,o),s.nest(v),e.defaults)&&(s.mainstay.tracer.value(s,"empty",t,void 0),t=void 0);const c=u.presence||o._flags.presence||(o._flags._endedSwitch?null:i.presence);if(t===void 0){if(c==="forbidden")return r.finalize(t,null,h);if(c==="required")return r.finalize(t,[o.$_createError("any.required",t,null,s,i)],h);if(c==="optional"){if(o._flags.default!==e.symbols.deepDefault)return r.finalize(t,null,h);s.mainstay.tracer.value(s,"default",t,{}),t={}}}else if(c==="forbidden")return r.finalize(t,[o.$_createError("any.unknown",t,null,s,i)],h);const m=[];if(o._valids){const g=o._valids.get(t,s,i,o._flags.insensitive);if(g)return i.convert&&(s.mainstay.tracer.value(s,"valids",t,g.value),t=g.value),s.mainstay.tracer.filter(o,s,"valid",g),r.finalize(t,null,h);if(o._flags.only){const w=o.$_createError("any.only",t,{valids:o._valids.values({display:!0})},s,i);if(i.abortEarly)return r.finalize(t,[w],h);m.push(w)}}if(o._invalids){const g=o._invalids.get(t,s,i,o._flags.insensitive);if(g){s.mainstay.tracer.filter(o,s,"invalid",g);const w=o.$_createError("any.invalid",t,{invalids:o._invalids.values({display:!0})},s,i);if(i.abortEarly)return r.finalize(t,[w],h);m.push(w)}}if(_.validate){const g=_.validate(t,h);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,h);if(g.errors.length)return m.push(...g.errors),r.finalize(t,m,h)}}return o._rules.length?r.rules(t,m,h):r.finalize(t,m,h)},r.rules=function(t,o,s){const{schema:i,state:u,prefs:d}=s;for(const h of i._rules){const _=i._definition.rules[h.method];if(_.convert&&d.convert){u.mainstay.tracer.log(i,u,"rule",h.name,"full");continue}let v,c=h.args;if(h._resolve.length){c=Object.assign({},c);for(const g of h._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,h);const m=r.rule(v,h);if(m.errors){if(u.mainstay.tracer.log(i,u,"rule",h.name,"error"),h.warn){u.mainstay.warnings.push(...m.errors);continue}if(d.abortEarly)return r.finalize(t,m.errors,s);o.push(...m.errors)}else u.mainstay.tracer.log(i,u,"rule",h.name,"pass"),u.mainstay.tracer.value(u,"rule",t,m.value,h.name),t=m.value}return r.finalize(t,o,s)},r.rule=function(t,o){return t instanceof n.Report?(r.error(t,o),{errors:[t],value:null}):Array.isArray(t)&&t[e.symbols.errors]?(t.forEach(s=>r.error(s,o)),{errors:t,value:null}):{errors:null,value:t}},r.error=function(t,o){return o.message&&t._setTemplate(o.message),t},r.finalize=function(t,o,s){o=o||[];const{schema:i,state:u,prefs:d}=s;if(o.length){const _=r.default("failover",void 0,o,s);_!==void 0&&(u.mainstay.tracer.value(u,"failover",t,_),t=_,o=[])}if(o.length&&i._flags.error)if(typeof i._flags.error=="function"){o=i._flags.error(o),Array.isArray(o)||(o=[o]);for(const _ of o)l(_ instanceof Error||_ instanceof n.Report,"error() must return an Error object")}else o=[i._flags.error];if(t===void 0){const _=r.default("default",t,o,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 h={value:t,errors:o.length?o:null};return i._flags.result&&(h.value=i._flags.result==="strip"?void 0:s.original,u.mainstay.tracer.value(u,i._flags.result,t,h.value),u.shadow(t,i._flags.result)),i._cache&&d.cache!==!1&&!i._refs.length&&i._cache.set(s.original,h),t===void 0||h.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)),h},r.prefs=function(t,o){const s=o===e.defaults;return s&&t._preferences[e.symbols.prefs]?t._preferences[e.symbols.prefs]:(o=e.preferences(o,t._preferences),s&&(t._preferences[e.symbols.prefs]=o),o)},r.default=function(t,o,s,i){const{schema:u,state:d,prefs:h}=i,_=u._flags[t];if(h.noDefaults||_===void 0)return o;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,h))}}return typeof _!="object"?_:_[e.symbols.literal]?_.literal:e.isResolvable(_)?_.resolve(o,d,h):y(_)},r.trim=function(t,o){if(typeof t!="string")return t;const s=o.$_getRule("trim");return s&&s.args.enabled?t.trim():t},r.ignore={active:!1,debug:p,entry:p,filter:p,log:p,resolve:p,value:p},r.errorsArray=function(){const t=[];return t[e.symbols.errors]=!0,t}},2036:(k,x,b)=>{const l=b(375),y=b(9474),p=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){p.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){p.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 o=t.resolve(e,n,a,null,{in:!0});if(o===void 0)continue;const s=t.in&&typeof o=="object"?Array.isArray(o)?o:Object.keys(o):[o];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){l(!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[p.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 l=b(375),y=b(8571),p=b(1687),f=b(9621),e={};k.exports=function(n,a,r={}){if(l(n&&typeof n=="object","Invalid defaults value: must be an object"),l(!a||a===!0||typeof a=="object","Invalid source value: must be true, falsy or an object"),l(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 o=r.nullOverride!==void 0&&r.nullOverride;return p(t,a,{nullOverride:o,mergeArrays:!1})},e.applyToDefaultsWithShallow=function(n,a,r){const t=r.shallow;l(Array.isArray(t),"Invalid keys");const o=new Map,s=a===!0?null:new Set;for(let d of t){d=Array.isArray(d)?d:d.split(".");const h=f(n,d);h&&typeof h=="object"?o.set(h,s&&f(a,d)||h):s&&s.add(d)}const i=y(n,{},o);if(!s)return i;for(const d of s)e.reachCopy(i,a,d);const u=r.nullOverride!==void 0&&r.nullOverride;return p(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 o=n;for(let s=0;s<r.length-1;++s){const i=r[s];typeof o[i]!="object"&&(o[i]={}),o=o[i]}o[r[r.length-1]]=t}},375:(k,x,b)=>{const l=b(7916);k.exports=function(y,...p){if(!y)throw p.length===1&&p[0]instanceof Error?p[0]:new l(p)}},8571:(k,x,b)=>{const l=b(9621),y=b(4277),p=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 o=y.getInternalProto(e);if(o===y.buffer)return!1;if(o===y.date)return new Date(e.getTime());if(o===y.regex)return new RegExp(e);const s=f.base(e,o,n);if(s===e)return e;if(t&&t.set(e,s),o===y.set)for(const u of e)s.add(r(u,n,t));else if(o===y.map)for(const[u,d]of e)s.set(u,r(d,n,t));const i=p.keys(e,n);for(const u of i){if(u==="__proto__")continue;if(o===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 o=l(e,t);typeof o!="object"&&typeof o!="function"||r.set(o,o)}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 l=b(4277),y={mismatched:null};k.exports=function(p,f,e){return e=Object.assign({prototype:!0},e),!!y.isDeepEqual(p,f,e,[])},y.isDeepEqual=function(p,f,e,n){if(p===f)return p!==0||1/p==1/f;const a=typeof p;if(a!==typeof f||p===null||f===null)return!1;if(a==="function"){if(!e.deepFunction||p.toString()!==f.toString())return!1}else if(a!=="object")return p!=p&&f!=f;const r=y.getSharedType(p,f,!!e.prototype);switch(r){case l.buffer:return!1;case l.promise:return p===f;case l.regex:return p.toString()===f.toString();case y.mismatched:return!1}for(let t=n.length-1;t>=0;--t)if(n[t].isSame(p,f))return!0;n.push(new y.SeenEntry(p,f));try{return!!y.isDeepEqualObj(r,p,f,e,n)}finally{n.pop()}},y.getSharedType=function(p,f,e){if(e)return Object.getPrototypeOf(p)!==Object.getPrototypeOf(f)?y.mismatched:l.getInternalProto(p);const n=l.getInternalProto(p);return n!==l.getInternalProto(f)?y.mismatched:n},y.valueOf=function(p){const f=p.valueOf;if(f===void 0)return p;try{return f.call(p)}catch(e){return e}},y.hasOwnEnumerableProperty=function(p,f){return Object.prototype.propertyIsEnumerable.call(p,f)},y.isSetSimpleEqual=function(p,f){for(const e of Set.prototype.values.call(p))if(!Set.prototype.has.call(f,e))return!1;return!0},y.isDeepEqualObj=function(p,f,e,n,a){const{isDeepEqual:r,valueOf:t,hasOwnEnumerableProperty:o}=y,{keys:s,getOwnPropertySymbols:i}=Object;if(p===l.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(p===l.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(p===l.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(p===l.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 h=s(f);if(!n.part&&h.length!==s(e).length&&!n.skip)return!1;let _=0;for(const v of h)if(n.skip&&n.skip.includes(v))e[v]===void 0&&++_;else if(!o(e,v)||!r(f[v],e[v],n,a))return!1;if(!n.part&&h.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(o(f,m)){if(!o(e,m)||!r(f[m],e[m],n,a))return!1}else if(o(e,m))return!1}c.delete(m)}for(const m of c)if(o(e,m))return!1}return!0},y.SeenEntry=class{constructor(p,f){this.obj=p,this.ref=f}isSame(p,f){return this.obj===p&&this.ref===f}}},7916:(k,x,b)=>{const l=b(8761);k.exports=class extends Error{constructor(y){super(y.filter(p=>p!=="").map(p=>typeof p=="string"?p:p instanceof Error?p.message:l(p)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,x.assert)}}},5277:k=>{const x={};k.exports=function(b){if(!b)return"";let l="";for(let y=0;y<b.length;++y){const p=b.charCodeAt(y);x.isSafe(p)?l+=b[y]:l+=x.escapeHtmlChar(p)}return l},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 l=32;l<123;++l)(l>=97||l>=65&&l<=90||l>=48&&l<=57||l===32||l===46||l===44||l===45||l===58||l===95)&&b.add(l);return b}()},6064:k=>{k.exports=function(x){return x.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:k=>{k.exports=function(){}},1687:(k,x,b)=>{const l=b(375),y=b(8571),p=b(7043),f={};k.exports=f.merge=function(e,n,a){if(l(e&&typeof e=="object","Invalid target value: must be an object"),l(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)){l(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=p.keys(n,a);for(let t=0;t<r.length;++t){const o=r[t];if(o==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,o))continue;const s=n[o];if(s&&typeof s=="object"){if(e[o]===s)continue;!e[o]||typeof e[o]!="object"||Array.isArray(e[o])!==Array.isArray(s)||s instanceof Date||s instanceof RegExp?e[o]=y(s,{symbols:a.symbols}):f.merge(e[o],s,a)}else(s!=null||a.nullOverride)&&(e[o]=s)}return e}},9621:(k,x,b)=>{const l=b(375),y={};k.exports=function(p,f,e){if(f===!1||f==null)return p;typeof(e=e||{})=="string"&&(e={separator:e});const n=Array.isArray(f);l(!n||!e.separator,"Separator option is not valid for array-based chain");const a=n?f:f.split(e.separator||".");let r=p;for(let t=0;t<a.length;++t){let o=a[t];const s=e.iterables&&y.iterables(r);if(Array.isArray(r)||s==="set"){const i=Number(o);Number.isInteger(i)&&(o=i<0?r.length+i:i)}if(!r||typeof r=="function"&&e.functions===!1||!s&&r[o]===void 0){l(!e.strict||t+1===a.length,"Missing segment",o,"in reach path ",f),l(typeof r=="object"||e.functions===!0||typeof r!="function","Invalid segment",o,"in reach path ",f),r=e.default;break}r=s?s==="set"?[...r][o]:r.get(o):r[o]}return r},y.iterables=function(p){return p instanceof Set?"set":p 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(l){if(Array.isArray(l))return x.array;if(l instanceof Date)return x.date;if(l instanceof RegExp)return x.regex;if(l instanceof Error)return x.error;const y=Object.prototype.toString.call(l);return b.typeMap.get(y)||x.generic}},7043:(k,x)=>{x.keys=function(b,l={}){return l.symbols!==!1?Reflect.ownKeys(b):Object.getOwnPropertyNames(b)}},3652:(k,x,b)=>{const l=b(375),y={};x.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(p,f){const e=[].concat((f=f||{}).before||[]),n=[].concat(f.after||[]),a=f.group||"?",r=f.sort||0;l(!e.includes(a),`Item cannot come before itself: ${a}`),l(!e.includes("?"),"Item cannot come before unassociated items"),l(!n.includes(a),`Item cannot come after itself: ${a}`),l(!n.includes("?"),"Item cannot come after unassociated items"),Array.isArray(p)||(p=[p]);for(const t of p){const o={seq:this._items.length,sort:r,before:e,after:n,group:a,node:t};this._items.push(o)}if(!f.manual){const t=this._sort();l(t,"item",a!=="?"?`added into group ${a}`:"","created a dependencies error")}return this.nodes}merge(p){Array.isArray(p)||(p=[p]);for(const e of p)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 l(f,"merge created a dependencies error"),this.nodes}sort(){const p=this._sort();return l(p,"sort created a dependencies error"),this.nodes}_sort(){const p={},f=Object.create(null),e=Object.create(null);for(const o of this._items){const s=o.seq,i=o.group;e[i]=e[i]||[],e[i].push(s),p[s]=o.before;for(const u of o.after)f[u]=f[u]||[],f[u].push(s)}for(const o in p){const s=[];for(const i in p[o]){const u=p[o][i];e[u]=e[u]||[],s.push(...e[u])}p[o]=s}for(const o in f)if(e[o])for(const s of e[o])p[s].push(...f[o]);const n={};for(const o in p){const s=p[o];for(const i of s)n[i]=n[i]||[],n[i].push(o)}const a={},r=[];for(let o=0;o<this._items.length;++o){let s=o;if(n[o]){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 h=0;h<u;++h)a[n[i][h]]&&++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 o of this._items)t[o.seq]=o;this._items=[],this.nodes=[];for(const o of r){const s=t[o];this.nodes.push(s.node),this._items.push(s)}return!0}},y.mergeSort=(p,f)=>p.sort===f.sort?0:p.sort<f.sort?-1:1},5380:(k,x,b)=>{const l=b(443),y=b(2178),p={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:l.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(p.nonAsciiRx.test(f)){if(e.allowUnicode===!1)return y.code("DOMAIN_INVALID_UNICODE_CHARS");f=f.normalize("NFC")}if(p.domainControlRx.test(f))return y.code("DOMAIN_INVALID_CHARS");f=p.punycode(f),e.allowFullyQualified&&f[f.length-1]==="."&&(f=f.slice(0,-1));const n=e.minDomainSegments||p.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 o=a[t];if(!o.length)return y.code("DOMAIN_EMPTY_SEGMENT");if(o.length>63)return y.code("DOMAIN_LONG_SEGMENT");if(t<a.length-1){if(!p.domainSegmentRx.test(o))return y.code("DOMAIN_INVALID_CHARS")}else if(!p.tldSegmentRx.test(o))return y.code("DOMAIN_INVALID_TLDS_CHARS")}return null},x.isValid=function(f,e){return!x.analyze(f,e)},p.punycode=function(f){f.includes("%")&&(f=f.replace(/%/g,"%25"));try{return new p.URL(`http://${f}`).host}catch{return f}}},1745:(k,x,b)=>{const l=b(9848),y=b(5380),p=b(2178),f={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(l.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 p.code("EMPTY_STRING");const a=!f.nonAsciiRx.test(e);if(!a){if(n.allowUnicode===!1)return p.code("FORBIDDEN_UNICODE");e=e.normalize("NFC")}const r=e.split("@");if(r.length!==2)return r.length>2?p.code("MULTIPLE_AT_CHAR"):p.code("MISSING_AT_CHAR");const[t,o]=r;if(!t)return p.code("EMPTY_LOCAL");if(!n.ignoreLength){if(e.length>254)return p.code("ADDRESS_TOO_LONG");if(f.encoder.encode(t).length>64)return p.code("LOCAL_TOO_LONG")}return f.local(t,a)||y.analyze(o,n)},f.local=function(e,n){const a=e.split(".");for(const r of a){if(!r.length)return p.code("EMPTY_LOCAL_SEGMENT");if(n){if(!f.atextRx.test(r))return p.code("INVALID_LOCAL_CHARS")}else for(const t of r){if(f.atextRx.test(t))continue;const o=f.binary(t);if(!f.atomRx.test(o))return p.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 l=b(375),y=b(5752);x.regex=function(p={}){l(p.cidr===void 0||typeof p.cidr=="string","options.cidr must be a string");const f=p.cidr?p.cidr.toLowerCase():"optional";l(["required","optional","forbidden"].includes(f),"options.cidr must be one of required, optional, forbidden"),l(p.version===void 0||typeof p.version=="string"||Array.isArray(p.version),"options.version must be a string or an array of string");let e=p.version||["ipv4","ipv6","ipvfuture"];Array.isArray(e)||(e=[e]),l(e.length>=1,"options.version must have at least 1 version specified");for(let r=0;r<e.length;++r)l(typeof e[r]=="string","options.version must only contain strings"),e[r]=e[r].toLowerCase(),l(["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 l=b(375),y=b(6064),p={generate:function(){const f={},e="\\dA-Fa-f",n="["+e+"]",a="\\w-\\.~",r="!\\$&'\\(\\)\\*\\+,;=",t="%"+e,o=a+t+r+":@",s="["+o+"]",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+")",h="(?:"+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="(?:"+h+"|"+_+"|"+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+":]*",A="["+a+t+r+"]{1,255}",E="(?:\\[(?:"+f.ipv6address+"|"+f.ipvFuture+")\\]|"+f.ipv4address+"|"+A+")",I="(?:"+S+"@)?"+E+"(?::\\d*)?",N="(?:"+S+"@)?("+E+")(?::\\d*)?",q=s+"*",M=s+"+",T="(?:\\/"+q+")*",z="\\/(?:"+M+T+")?",B=M+T,W="["+a+t+r+"@]+"+T,Z="(?:\\/\\/\\/"+q+T+")";return f.hierPart="(?:(?:\\/\\/"+I+T+")|"+z+"|"+B+"|"+Z+")",f.hierPartCapture="(?:(?:\\/\\/"+N+T+")|"+z+"|"+B+")",f.relativeRef="(?:(?:\\/\\/"+I+T+")|"+z+"|"+W+"|)",f.relativeRefCapture="(?:(?:\\/\\/"+N+T+")|"+z+"|"+W+"|)",f.query="["+o+"\\/\\?]*(?=#|$)",f.queryWithSquareBrackets="["+o+"\\[\\]\\/\\?]*(?=#|$)",f.fragment="["+o+"\\/\\?]*",f}};p.rfc3986=p.generate(),x.ip={v4Cidr:p.rfc3986.ipv4Cidr,v6Cidr:p.rfc3986.ipv6Cidr,ipv4:p.rfc3986.ipv4address,ipv6:p.rfc3986.ipv6address,ipvfuture:p.rfc3986.ipvFuture},p.createRegex=function(f){const e=p.rfc3986,n="(?:\\?"+(f.allowQuerySquareBrackets?e.queryWithSquareBrackets:e.query)+")?(?:#"+e.fragment+")?",a=f.domain?e.relativeRefCapture:e.relativeRef;if(f.relativeOnly)return p.wrap(a+n);let r="";if(f.scheme){l(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);l(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];l(d instanceof RegExp||typeof d=="string","scheme at position "+u+" must be a RegExp or String"),d instanceof RegExp?i.push(d.source.toString()):(l(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)+")",o=f.allowRelative?"(?:"+t+"|"+a+")":t;return p.wrap(o+n,r)},p.wrap=function(f,e){return{raw:f=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${f}`,regex:new RegExp(`^${f}$`),scheme:e}},p.uriRegex=p.createRegex({}),x.regex=function(f={}){return f.scheme||f.allowRelative||f.relativeOnly||f.allowQuerySquareBrackets||f.domain?p.createRegex(f):p.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(l,y={}){if(!y[b.settings]&&y.constants)for(const p in y.constants){const f=y.constants[p];if(f!==null&&!["boolean","number","string"].includes(typeof f))throw new Error(`Formula constant ${p} 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(l)}_parse(l){let y=[],p="",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||p||r){if(t&&t.type==="reference"&&r===")")return t.type="function",t.value=this._subFormula(p,t.value),void(p="");if(r===")"){const o=new x.Parser(p,this.settings);y.push({type:"segment",value:o})}else if(e){if(e==="]")return y.push({type:"reference",value:p}),void(p="");y.push({type:"literal",value:p})}else if(b.operatorCharacters.includes(p))t&&t.type==="operator"&&b.operators.includes(t.value+p)?t.value+=p:y.push({type:"operator",value:p});else if(p.match(b.numberRx))y.push({type:"constant",value:parseFloat(p)});else if(this.settings.constants[p]!==void 0)y.push({type:"constant",value:this.settings.constants[p]});else{if(!p.match(b.tokenRx))throw new Error(`Formula contains invalid token: ${p}`);y.push({type:"reference",value:p})}p=""}};for(const r of l)e?r===e?(n(),e=!1):p+=r:f?r==="("?(p+=r,++f):r===")"?(--f,f?p+=r:n(r)):p+=r:r in b.literals?e=b.literals[r]:r==="("?(n(),++f):b.operatorCharacters.includes(r)?(n(),p=r,n()):r!==" "?p+=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(l,y){const p=this.settings.functions[y];if(typeof p!="function")throw new Error(`Formula contains unknown function ${y}`);let f=[];if(l){let e="",n=0,a=!1;const r=()=>{if(!e)throw new Error(`Formula contains function ${y} with invalid arguments ${l}`);f.push(e),e=""};for(let t=0;t<l.length;++t){const o=l[t];a?(e+=o,o===a&&(a=!1)):o in b.literals&&!n?(e+=o,a=b.literals[o]):o!==","||n?(e+=o,o==="("?++n:o===")"&&--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 p.call(e,...n)}}evaluate(l){const y=this._parts.slice();for(let p=y.length-2;p>=0;--p){const f=y[p];if(f&&f.type==="operator"){const e=y[p+1];y.splice(p+1,1);const n=b.evaluate(e,l);y[p]=b.single(f.value,n)}}return b.operatorsOrder.forEach(p=>{for(let f=1;f<y.length-1;)if(p.includes(y[f])){const e=y[f],n=b.evaluate(y[f-1],l),a=b.evaluate(y[f+1],l);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],l)}},x.Parser.prototype[b.symbol]=!0,b.reference=function(l){return function(y){return y&&y[l]!==void 0?y[l]:null}},b.evaluate=function(l,y){return l===null?null:typeof l=="function"?l(y):l[b.symbol]?l.evaluate(y):l},b.single=function(l,y){if(l==="!")return!y;const p=-y;return p===0?0:p},b.calculate=function(l,y,p){if(l==="??")return b.exists(y)?y:p;if(typeof y=="string"||typeof p=="string"){if(l==="+")return(y=b.exists(y)?y:"")+(b.exists(p)?p:"")}else switch(l){case"^":return Math.pow(y,p);case"*":return y*p;case"/":return y/p;case"%":return y%p;case"+":return y+p;case"-":return y-p}switch(l){case"<":return y<p;case"<=":return y<=p;case">":return y>p;case">=":return y>=p;case"==":return y===p;case"!=":return y!==p;case"&&":return y&&p;case"||":return y||p}return null},b.exists=function(l){return l!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:k=>{k.exports=JSON.parse('{"version":"17.12.2"}')}},C={},function k(x){var b=C[x];if(b!==void 0)return b.exports;var l=C[x]={exports:{}};return P[x](l,l.exports,k),l.exports}(5107);var P,C})}(se)),se.exports}function Ge({disabled:D=!1,storeList:L=[],teamDid:P,onAdd:C=()=>{},scope:k="",hiddenChildren:x=!1,open:b=!1,onClose:l=()=>{}}){const{api:y}=ae(),[p,f]=U.useState(!1),[e,n]=U.useState(!0),[a,r]=U.useState(!1),[t,o]=U.useState(""),[s,i]=U.useState(""),{t:u}=Q(),d=async()=>{f(!0);try{const{decoded:_}=Le(t,L);await y.addBlockletStore({input:{teamDid:P,url:_,scope:k}}),C(_),r(!1),l()}catch(_){const v=`${u("store.blockletRegistry.addFailed")} ${J(_)}`;i(v)}finally{f(!1)}},h=()=>{r(!1),l()};return R.jsxs(R.Fragment,{children:[!x&&R.jsxs(be,{button:!0,disabled:D,sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1},onClick:()=>{r(!0)},children:[R.jsx(ve,{font:!0}),R.jsx(V,{variant:"inherit",children:u("store.blockletRegistry.addRegistry")})]}),R.jsxs(Te,{title:u("store.blockletRegistry.addRegistry"),fullWidth:!0,maxWidth:"md",open:b||a,onClose:h,PaperProps:{style:{minHeight:"auto"}},actions:R.jsxs(R.Fragment,{children:[R.jsx(ce,{onClick:_=>{_.stopPropagation(),h()},color:"inherit",children:u("common.cancel")}),R.jsxs(ce,{onClick:_=>{_.stopPropagation(),d()},color:"primary","data-cy":"install-blocklet-next-step",disabled:p||!t||e,variant:"contained",autoFocus:!0,children:[p&&R.jsx(Y,{size:16}),u("common.confirm")]})]}),children:[R.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:R.jsx(_e,{component:"div",children:R.jsx(V,{component:"div",children:R.jsx(we,{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")),o(_.target.value),n(v)},disabled:p,onKeyPress:_=>{_.key==="Enter"&&(_.preventDefault(),_.target.value.trim()?d():i(u("store.blockletRegistry.registryUrlEmpty")))}})})})}),!!s&&R.jsx(xe,{severity:"error",style:{width:"100%"},children:s})]})]})}Ge.propTypes={teamDid:O.string.isRequired,disabled:O.bool,storeList:O.array,onAdd:O.func,scope:O.string,hiddenChildren:O.bool,open:O.bool,onClose:O.func};function ie({store:D,teamDid:L,onDelete:P=()=>{},children:C=null,projectId:k="",scope:x=""}){const{api:b}=ae(),{t:l}=Q(),y=Ne(),[p,f]=U.useState(!1),[e,n]=U.useState(null),a=$e(),r=()=>{f(!1),n(null)},t=async()=>{try{f(!0),await b.deleteBlockletStore({input:{teamDid:L,url:D.url,projectId:k,scope:x}}),await y?.actions?.refreshBlocklet(),P&&typeof P=="function"&&P()}catch(i){G.error(`Remove Blocklet Store Error: ${J(i)}`)}finally{f(!1),n(null)}},o={keyName:D.url,title:l("store.blockletRegistry.deleteRegistry"),description:l("store.blockletRegistry.deleteDesc",{name:`<b>${D.url}</b>`,color:a.palette.error.main}),confirmPlaceholder:l("store.blockletRegistry.confirmDesc",{name:D.url}),confirm:l("common.delConfirm"),cancel:l("common.cancel"),onConfirm:t,onCancel:r},s=i=>{D.protected||(i.stopPropagation(),n(o))};return R.jsxs(R.Fragment,{children:[C?R.jsx("span",{onClick:s,children:C}):R.jsx(H,{"data-cy":"store-action-delete",color:"primary",disabled:p,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:O.node,teamDid:O.string.isRequired,store:O.object.isRequired,onDelete:O.func,projectId:O.string,scope:O.string};const Ze=({store:D,userDid:L})=>{const P=window.blocklet?.tenantMode!==Pe.BLOCKLET_TENANT_MODES.MULTIPLE;return D.protected?!1:D.scope&&D.scope===L?!0:P?D.scope==="studio":!1};function ge({connectedStore:D,onDisconnect:L=()=>{},onDelete:P=()=>{},store:C,teamDid:k,projectId:x=""}){const[b,l]=U.useState(null),y=!!b,{t:p}=Q(),{session:f}=Ue(),[e,n]=U.useState(!1),a=i=>{i.stopPropagation(),window.open(X(`${ee(C.url,"search?menu=my-blocklets")}`,{allowDomains:null}))},r=i=>{l(i.currentTarget)},t=()=>{l(null)},o=()=>{n(!1),L()},s=[{label:p("common.visitStore"),action:a,icon:pe},{label:p("common.disconnect"),action:()=>{t(),n(!0)},icon:je,hidden:!D}];return R.jsxs(R.Fragment,{children:[R.jsx(H,{ref:b,color:"primary",onClick:r,size:"small",children:R.jsx(ke,{sx:{zoom:.95}})}),R.jsxs(Re,{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(F,{sx:{color:"action"},children:i.label})]},i.label)),Ze({store:C,userDid:f?.user?.did})&&R.jsx(ie,{store:C,onDelete:P,teamDid:k,projectId:x,scope:C.scope||"studio",children:R.jsxs(oe,{dense:!0,disabled:C.protected,children:[R.jsx(he,{sx:{color:C.protected?"action":"error.main",marginRight:1}}),R.jsx(F,{sx:{color:C.protected?"action":"error.main"},children:p("common.delete")})]})})]}),e&&R.jsx(Fe,{displayError:!0,title:`${p("common.disconnect")} ${C.name}`,description:p("blocklet.publish.disconnectStoreTip"),confirm:p("common.confirm"),onConfirm:o,onCancel:()=>n(!1)})]})}ge.propTypes={connectedStore:O.object.isRequired,onDisconnect:O.func,onDelete:O.func,store:O.object.isRequired,teamDid:O.string.isRequired,projectId:O.string};function ne({connectedStore:D,sx:L={},...P}){return R.jsx(Se,{sx:{width:24,height:24,...L},src:ee(D.storeUrl,qe.WELLKNOWN_SERVICE_PATH_PREFIX,`/user/avatar/${D.developerDid}?imageFilter=resize&w=120&h=120`),...P})}ne.propTypes={connectedStore:O.object.isRequired,sx:O.object};function ye({storeUrl:D,storeName:L,published:P,did:C="",version:k=""}){const{t:x}=Q(),b=()=>{window.open(X(`${ee(D,C&&k?`/blocklets/${C}/${k}`:"/search?menu=my-blocklets")}`,{allowDomains:null}))};return R.jsxs(F,{children:[R.jsx(V,{variant:"subtitle2",children:x(P?"blocklet.publish.publishToStoreSuccess":"blocklet.publish.uploadToStoreSuccess",{name:L})}),R.jsx(H,{size:"small",sx:{mt:1},onClick:b,variant:"contained",color:"success",children:x("common.visitTarget",{name:L})})]})}ye.propTypes={storeName:O.string.isRequired,storeUrl:O.string.isRequired,published:O.bool.isRequired,did:O.string,version:O.string};const de={CONNECT:"connect",SELECT:"select"},me=Oe(({className:D,...L})=>R.jsx(De,{...L,classes:{popper:D}}))(({theme:D})=>({[`& .${Ie.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 Ke({teamDid:D,projectId:L="",releaseId:P="",store:C,warningList:k=[],onDelete:x=()=>{},kind:b="store",published:l=!1,connectedStore:y=null,releaseType:p="",onPublish:f=()=>{},onOpenConnectStore:e=()=>{},onSelectConnectStore:n=()=>{},behavior:a=de.CONNECT,scope:r="",version:t=""}){const{t:o}=Q(),{api:s,info:i,inService:u}=ae(),[d,h]=U.useState(!1),_=We({messageType:"connect-store-message",onOpen:()=>h(!0),onClose:()=>h(!1)}),v=b==="publish",c=!!y,m=E=>{if(E.stopPropagation(),v){window.open(X(ee(C.url,"developer/blocklets"),{allowDomains:null}));return}window.open(X(C.url,{allowDomains:null}))},g=()=>{if(a===de.SELECT){n(C);return}_(async(E,I)=>{try{const N=await s.connectToStore({input:{did:D,storeUrl:C.url,storeId:C.id,storeName:C.name,projectId:L}});if(!N?.url){G.error("failed to connect to store");return}I(N.url),await e({did:D,projectId:L,storeId:C.id}),h(!1)}catch(N){const q=J(N);G.error(q),h(!1)}})},w=async()=>{try{await s.disconnectFromStore({input:{did:D,storeId:C.id,projectId:L,storeScope:r}}),x()}catch(E){G.error(J(E))}},$=()=>{h(!0),s.publishToStore({input:{did:D,storeId:C.id,storeName:C.name,projectId:L,releaseId:P,type:p}}).then(E=>{G.success(R.jsx(ye,{storeName:y.storeName,storeUrl:y.storeUrl,did:L,version:t,published:E.url==="published"}),{duration:1e4}),f?.(null)}).catch(E=>{G.error(J(E)),f?.(E)}).finally(()=>{h(!1)})};U.useEffect(()=>{c&&h(!1)},[c]);const j=U.useMemo(()=>!(u&&He.isInServerlessMode(i)),[u,i]),S=k.length>0,A=R.jsxs(H,{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}}),o("common.upload")]});return R.jsxs(F,{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(F,{sx:{flexShrink:1,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},children:[R.jsx(F,{sx:{display:"flex",flexDirection:"row"},children:R.jsx(V,{component:"span",sx:{fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variant:"subtitle1",children:C.name})}),R.jsx(V,{sx:{fontSize:14,opacity:.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},component:"span",variant:"inherit",children:`${C.url}`})]}),R.jsxs(F,{sx:{flex:1,display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center"},children:[y&&R.jsx(me,{placement:"top",title:R.jsxs(F,{children:[R.jsx(V,{component:"span",variant:"caption",sx:{opacity:.7},children:o("blocklet.publish.developerInfo")}),R.jsxs(F,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1,mt:1},children:[R.jsx(ne,{connectedStore:y,sx:{width:42,height:42}}),R.jsxs(F,{sx:{flex:1},children:[R.jsx(V,{component:"span",variant:"subtitle1",children:y.developerName}),R.jsx(Be,{size:14,copyable:!0,compact:!0,responsive:!1,did:y.developerDid})]})]})]}),children:R.jsx(F,{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(H,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:g,children:[d?R.jsx(Y,{sx:{marginRight:1},size:16}):R.jsx(Ee,{sx:{marginRight:1}}),o("common.connect")]}),c&&l&&R.jsxs(H,{disabled:!0,sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},children:[d?R.jsx(Y,{sx:{marginRight:1},size:16}):R.jsx(Ce,{sx:{marginRight:1}}),o("common.uploaded")]}),c&&!l&&(S?R.jsx(me,{title:R.jsxs(F,{children:[R.jsx(F,{sx:{color:"error.main",mb:.5},children:o("blocklet.publish.storeRule.warning")}),k.map((E,I)=>R.jsxs(F,{sx:{color:"error.main"},children:[I+1,". ",E]},E))]}),children:R.jsx("div",{children:A})}):A),R.jsx(ge,{projectId:L,connectedStore:y,store:C,onDelete:x,teamDid:D,onDisconnect:w})]}),!v&&R.jsxs(le,{disabled:d,variant:"outlined",sx:{height:36},size:"small",children:[R.jsx(H,{"data-cy":"store-open-url",onClick:m,children:R.jsx(pe,{sx:{zoom:.9}})}),!C.protected&&j&&R.jsx(ie,{store:C,onDelete:x,teamDid:D,scope:""})]})]})]})}Ke.propTypes={kind:O.string,teamDid:O.string.isRequired,published:O.bool,connectedStore:O.shape({storeName:O.string,storeId:O.string,storeUrl:O.string,developerDid:O.string,developerName:O.string}),warningList:O.array,projectId:O.string,releaseId:O.string,releaseType:O.string,store:O.shape({id:O.string.isRequired,name:O.string.isRequired,url:O.string.isRequired,protected:O.bool,connected:O.bool}).isRequired,scope:O.string,onDelete:O.func,onPublish:O.func,onOpenConnectStore:O.func,behavior:O.string,onSelectConnectStore:O.func,version:O.string};export{Ge as A,Ke as S,ye as U,Ze as c,lt as r,He as s};
|
|
1
|
+
import{r as U}from"./vendor-react-CTtPmzVP.js";import{j as R,S as be,bi as ve,T as V,bf as _e,z as we,aZ as xe,a6 as Y,W as O,D as $e,Q as H,bO as he,cC as pe,cU as je,aQ as ke,aR as Re,M as oe,ak as F,b2 as Se,cV as Ae,s as Oe,bV as le,cW as Ee,by as Ce,am as De,aq as Ie}from"./vendor-mui-core-CKKG_1TN.js";import{V as Q,a_ as Te,F as ce,W as G}from"./vendor-ux-DjXlxcvL.js";import{bA as Me,Z as ae,bO as Le,Y as Ne,J as Pe,c as qe}from"./index-DI4CWTXR.js";import{f as J}from"./index-DBs9Ljax.js";import{z as ee}from"./vendor-utils-CUs2ebe7.js";import{D as ze}from"./delete-confirm-DiU5PO2T.js";import{C as Fe}from"./confirm-Ch-CAgUO.js";import{u as Ue}from"./session-CZpDtsCZ.js";import{g as X}from"./get-safe-url-BVTaUfvO.js";import{W as Be}from"./did-address-Cq16cwTy.js";import{u as We}from"./wait-connect-CLe9IfYi.js";var re,ue;function Ve(){if(ue)return re;ue=1;var D={};const{NODE_MODES:L}=Me();return re={isInServerlessMode:({mode:C,previousMode:k}={})=>C===L.SERVERLESS||k===L.SERVERLESS||D.ABT_NODE_DEBUG_AS_SERVERLESS==="true"},re}var He=Ve(),se={exports:{}},fe;function lt(){return fe||(fe=1,function(D,L){(function(P,C){D.exports=C()})(self,()=>{return P={7629:(k,x,b)=>{const l=b(375),y=b(8571),p=b(9474),f=b(1687),e=b(8652),n=b(8160),a=b(3292),r=b(6354),t=b(8901),o=b(9708),s=b(6914),i=b(2294),u=b(6133),d=b(1152),h=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 l(typeof o.describe=="function","Manifest functionality disabled"),o.describe(this)}allow(...c){return n.verifyFlat(c,"allow"),this._values(c,"_valids")}alter(c){l(c&&typeof c=="object"&&!Array.isArray(c),"Invalid targets argument"),l(!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];l(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 l(c!==void 0,"Artifact cannot be undefined"),l(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",c)}cast(c){return l(c===!1||typeof c=="string","Invalid to value"),l(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 l(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 l(c,"Missing error"),l(c instanceof Error||typeof c=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",c)}example(c,m={}){return l(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"&&(l(!m,"Cannot combine options with description"),m=c.description,c=c.method),l(typeof c=="function","Method must be a function"),l(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?(l(typeof c=="string","id must be a non-empty string"),l(/^[^\.]+$/.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 l(c&&typeof c=="string","Label name must be a non-empty string"),this.$_setFlag("label",c)}meta(c){return l(c!==void 0,"Meta cannot be undefined"),this._inner("metas",c,{single:!0})}note(...c){l(c.length,"Missing notes");for(const m of c)l(m&&typeof m=="string","Notes must be non-empty strings");return this._inner("notes",c)}only(c=!0){return l(typeof c=="boolean","Invalid mode:",c),this.$_setFlag("only",c)}optional(){return this.presence("optional")}prefs(c){l(c,"Missing preferences"),l(c.context===void 0,"Cannot override context"),l(c.externals===void 0,"Cannot override externals"),l(c.warnings===void 0,"Cannot override warnings"),l(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 l(["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 l(["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){l(c.length,"Missing tags");for(const m of c)l(m&&typeof m=="string","Tags must be non-empty strings");return this._inner("tags",c)}unit(c){return l(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 $)l(!j.then||j.then.type==="any"||j.then.type===g.type,"Cannot combine",g.type,"with",j.then&&j.then.type),l(!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){l(!this._inRuleset(),"Cannot set caching inside a ruleset"),l(!this._cache,"Cannot override schema cache"),l(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){l(n.isSchema(c),"Invalid schema object"),l(this.type==="any"||c.type==="any"||c.type===this.type,"Cannot merge type",this.type,"with another type:",c.type),l(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),l(!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 l(!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){l(!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)),l(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;l(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 A in c)m.modifiers[A](S,c[A]),l(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(){l(!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),l(!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),l(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 h.entry(c,this,m)}validateAsync(c,m){return h.entryAsync(c,this,m)}$_addRule(c){typeof c=="string"&&(c={name:c}),l(c&&typeof c=="object","Invalid options"),l(c.name&&typeof c.name=="string","Invalid rule name");for(const j in c)l(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;l(g,"Unknown rule",m.method);const $=this.clone();if(w){l(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 A=g.argsByName.get(j);if(A.ref&&n.isResolvable(S))m._resolve.push(j),$.$_mutateRegister(S);else if(A.normalize&&(S=A.normalize(S),w[j]=S),A.assert){const E=n.validateArg(S,j,A);l(!E,E,"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:{},A=j.messages?s.merge(this._definition.messages,j.messages):this._definition.messages;return new r.Report(c,m,g,S,A,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 $=!h.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 l(!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={}){l(c[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const w=this._definition.flags[c]||{};if(p(m,w.default)&&(m=void 0),p(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 h.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"),l(m!==void 0,"Missing",c,"value"),l(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 A=0;A<this.$_terms.whens.length;++A){const E=this.$_terms.whens[A];if(E.concat){w.push(E.concat),$.push(`${A}.concat`);continue}const I=E.ref?E.ref.resolve(c,m,g):c,N=E.is?[E]:E.switch,q=$.length;for(let M=0;M<N.length;++M){const{is:T,then:z,otherwise:B}=N[M],W=`${A}${E.switch?"."+M:""}`;if(T.$_match(I,m.nest(T,`${W}.is`),g)){if(z){const K=m.localize([...m.path,`${W}.then`],m.ancestors,m.schemas),{schema:te,id:Z}=z._generate(c,K,g);w.push(te),$.push(`${W}.then${Z?`(${Z})`:""}`);break}}else if(B){const K=m.localize([...m.path,`${W}.otherwise`],m.ancestors,m.schemas),{schema:te,id:Z}=B._generate(c,K,g);w.push(te),$.push(`${W}.otherwise${Z?`(${Z})`:""}`);break}}if(E.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 A of w)S=S.concat(A);return this.$_root._tracer&&this.$_root._tracer._combine(S,[this,...w]),this.$_temp.whens[j]=S,{schema:S,id:j}}_inner(c,m,g={}){l(!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){l($!==void 0,"Cannot call allow/valid/invalid with undefined"),l($!==n.symbols.override,"Override must be the first value");const j=m==="_invalids"?"_valids":"_invalids";g[j]&&(g[j].remove($),g[j].length||(l(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 l=b(375),y=b(8571),p=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={}){p.assertOptions(e,["max"]),l(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 l=b(375),y=b(7916),p=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=p.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"){l(a&&typeof a=="object"&&!Array.isArray(a),"Options must be of type object");const o=Object.keys(a).filter(s=>!r.includes(s));l(o.length===0,`${t} contain unknown keys: ${o}`)},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&&(l(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(o){throw o.path!==void 0?o.path=r+"."+o.path:o.path=r,t.append&&(o.message=`${o.message} (${o.path})`),o}},x.validateArg=function(a,r,{assert:t,message:o}){if(x.isSchema(t)){const s=t.validate(a);return s.error?s.error.message:void 0}if(!t(a))return r?`${r} ${o}`:o},x.verifyFlat=function(a,r){for(const t of a)l(!Array.isArray(t),"Method no longer accepts array arguments:",r)}},3292:(k,x,b)=>{const l=b(375),y=b(8160),p=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){l(n!==void 0,"Invalid undefined schema"),Array.isArray(n)&&(l(n.length,"Invalid empty array schema"),n.length===1&&(n=n[0]));const r=(t,...o)=>a.override!==!1?t.valid(e.override,...o):t.valid(...o);if(f.simple(n))return r(e,n);if(typeof n=="function")return e.custom(n);if(l(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):(l(Object.getPrototypeOf(n)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),e.object().keys(n))},x.ref=function(e,n){return p.isRef(e)?e:p.create(e,n)},x.compile=function(e,n,a={}){y.assertOptions(a,["legacy"]);const r=n&&n[y.symbols.any];if(r)return l(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};l(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&&(l(n&&typeof n=="object","Missing options"),a=n,n=p.create(".")),Array.isArray(a)&&(a={switch:a}),y.assertOptions(a,["is","not","then","otherwise","switch","break"]),y.isSchema(n))return l(a.is===void 0,'"is" can not be used with a schema condition'),l(a.not===void 0,'"not" can not be used with a schema condition'),l(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(l(p.isRef(n)||typeof n=="string","Invalid condition:",n),l(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 o=t.is!==void 0?e.$_compile(t.is):e.$_root.invalid(null,!1,0,"").required();return l(t.then!==void 0||t.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),l(t.break===void 0||t.then===void 0||t.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),a.is===void 0||p.isRef(a.is)||y.isSchema(a.is)||(o=o.required()),f.condition(e,{ref:x.ref(n),is:o,then:t.then,otherwise:t.otherwise,break:t.break})}l(Array.isArray(a.switch),'"switch" must be an array'),l(a.is===void 0,'Cannot combine "switch" with "is"'),l(a.not===void 0,'Cannot combine "switch" with "not"'),l(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 o=a.switch[t],s=t===a.switch.length-1;y.assertOptions(o,s?["is","then","otherwise"]:["is","then"]),l(o.is!==void 0,'Switch statement missing "is"'),l(o.then!==void 0,'Switch statement missing "then"');const i={is:e.$_compile(o.is),then:e.$_compile(o.then)};if(p.isRef(o.is)||y.isSchema(o.is)||(i.is=i.is.required()),s){l(a.otherwise===void 0||o.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const u=a.otherwise!==void 0?a.otherwise:o.otherwise;u!==void 0&&(l(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 l=b(5688),y=b(8160),p=b(3328);x.Report=class{constructor(f,e,n,a,r,t,o){if(this.code=f,this.flags=a,this.messages=r,this.path=t.path,this.prefs=o,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(p.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 o=Error.stackTraceLimit;Error.stackTraceLimit=0;const s=new x.ValidationError(r,t,e);return Error.stackTraceLimit=o,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 o=r.toString();n.push(o),a.push({message:o,type:"override",context:{error:r}});continue}const t=r.toString();n.push(t),a.push({message:t,path:r.path.filter(o=>typeof o!="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=l.error},8901:(k,x,b)=>{const l=b(375),y=b(8571),p=b(8160),f=b(6914),e={};x.type=function(n,a){const r=Object.getPrototypeOf(n),t=y(r),o=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),o.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];l(o.$_terms[v]===void 0,"Invalid term override for",s.type,v),o.$_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];l(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&&(l(!t[v],"Rule conflict in",s.type,v),t[v]=m),l(!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}),l(!c.argsByName.has(g.name),"Duplicated argument name",g.name),p.isSchema(g.assert)&&(g.assert=g.assert.strict().label(g.name)),c.argsByName.set(g.name,g),g)))}s.rules=d;const h=Object.assign({},i.modifiers);if(s.modifiers)for(const v in s.modifiers){l(!t[v],"Rule conflict in",s.type,v);const c=s.modifiers[v];l(typeof c=="function","Invalid modifier definition for",s.type,v);const m=function(g){return this.rule({[v]:g})};t[v]=m,h[v]=c}if(s.modifiers=h,s.overrides){t._super=r,o.$_super={};for(const v in s.overrides)l(r[v],"Cannot override missing",v),s.overrides[v][p.symbols.parent]=r[v],o.$_super[v]=r[v].bind(o);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),o},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 o;if((!a.from||a.from.includes(typeof r))&&(o=a.method(r,t),o)){if(o.errors||o.value===void 0)return o;r=o.value}if(!n.from||n.from.includes(typeof r)){const s=n.method(r,t);if(s)return s}return o}}:n||a},e.prepare=function(n,a){return n&&a?function(r,t){const o=n(r,t);if(o){if(o.errors||o.value===void 0)return o;r=o.value}return a(r,t)||o}: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 o=a(r,t);if(o){if(o.errors&&(!Array.isArray(o.errors)||o.errors.length))return o;r=o.value}return n(r,t)||o}:n||a}},5107:(k,x,b)=>{const l=b(375),y=b(8571),p=b(8652),f=b(8160),e=b(3292),n=b(6354),a=b(8901),r=b(9708),t=b(6133),o=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 h of d._types)d[h]=function(..._){return l(!_.length||["alternatives","link","object"].includes(h),"The",h,"type does not allow arguments"),u.generate(this,u.types[h],_)};for(const h of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])d[h]=function(..._){return this.any()[h](..._)};Object.assign(d,u.methods);for(const h in u.aliases){const _=u.aliases[h];d[h]=d[_]}return d.x=d.expression,s.setup&&s.setup(d),d}};u.methods={ValidationError:n.ValidationError,version:f.version,cache:p.provider,assert(d,h,..._){u.assert(d,h,!0,_)},attempt:(d,h,..._)=>u.assert(d,h,!1,_),build(d){return l(typeof r.build=="function","Manifest functionality disabled"),r.build(this,d)},checkPreferences(d){f.checkPreferences(d)},compile(d,h){return e.compile(this,d,h)},defaults(d){l(typeof d=="function","modifier must be a function");const h=Object.assign({},this);for(const _ of h._types){const v=d(h[_]());l(f.isSchema(v),"modifier must return a valid schema object"),h[_]=function(...c){return u.generate(this,v,c)}}return h},expression:(...d)=>new o(...d),extend(...d){f.verifyFlat(d,"extend"),i=i||b(3378),l(d.length,"You need to provide at least one extension"),this.assert(d,i.extensions);const h=Object.assign({},this);h._types=new Set(h._types);for(let _ of d){typeof _=="function"&&(_=_(h)),this.assert(_,i.extension);const v=u.expandExtension(_,h);for(const c of v){l(h[c.type]===void 0||h._types.has(c.type),"Cannot override name",c.type);const m=c.base||this.any(),g=a.type(m,c);h._types.add(c.type),h[c.type]=function(...w){return u.generate(this,g,w)}}}return h},isError:n.ValidationError.isError,isExpression:o.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 h of this._types)d[h]=this[h]();for(const h in u.aliases)d[h]=this[h]();return d}},u.assert=function(d,h,_,v){const c=v[0]instanceof Error||typeof v[0]=="string"?v[0]:null,m=c!==null?v[1]:v[0],g=h.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,h,_){return l(d,"Must be invoked on a Joi instance."),h.$_root=d,h._definition.args&&_.length?h._definition.args(h,..._):h},u.expandExtension=function(d,h){if(typeof d.type=="string")return[d];const _=[];for(const v of h._types)if(d.type.test(v)){const c=Object.assign({},d);c.type=v,c.base=h[v](),_.push(c)}return _},k.exports=u.root()},6914:(k,x,b)=>{const l=b(375),y=b(8571),p=b(3328);x.compile=function(f,e){if(typeof f=="string")return l(!e,"Cannot set single message string"),new p(f);if(p.isTemplate(f))return l(!e,"Cannot set single message template"),f;l(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"||p.isTemplate(a)){e[n]=a;continue}if(typeof a=="string"){e[n]=new p(a);continue}l(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"||p.isTemplate(t)?e[r][n]=t:(l(typeof t=="string","Invalid message for",n,"in",r),e[r][n]=new p(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(p.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 p(e);if(p.isTemplate(e))return e;const n=y(f);for(let a in e){const r=e[a];if(a==="root"||p.isTemplate(r)){n[a]=r;continue}if(typeof r=="string"){n[a]=new p(r);continue}l(typeof r=="object"&&!Array.isArray(r),"Invalid message for",a);const t=a;for(a in n[t]=n[t]||{},r){const o=r[a];a==="root"||p.isTemplate(o)?n[t][a]=o:(l(typeof o=="string","Invalid message for",a,"in",t),n[t][a]=new p(o))}}return n}},2294:(k,x,b)=>{const l=b(375),y=b(8160),p=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())l(!this._byKey.has(n),"Schema id conflicts with existing key:",n),this._byId.set(n,a);for(const[n,a]of e._byKey.entries())l(!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 o={id:t.id,schema:n(t.schema)};l(y.isSchema(o.schema),"adjuster function failed to return a joi schema type");for(const s of r)o={id:s.id,schema:f.fork(s.schema,o.id,o.schema)};return o.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);l(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);l(!r||r.schema===e,"Cannot add different schemas with the same id:",a),l(!this._byKey.has(a),"Schema id conflicts with existing key:",a),this._byId.set(a,{schema:e,id:a})}n&&(l(!this._byKey.has(n),"Schema already contains key:",n),l(!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);l(t,"Schema does not contain path",[...n,...e].join(".")),a=[t,...a];const o=e.slice(1);return o.length?t.schema._ids._collect(o,[...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:o})=>{if(n===(t._flags.id||o))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],o=f.scan(t.args,{source:"rules",name:t.name},n);if(o!==void 0){a=a||e.clone();const s=Object.assign({},t);s.args=o,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 o=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,...o],u);d!==void 0&&(s=s||e.slice(),s[i]=d)}return s}if(a.schema!==!1&&y.isSchema(e)||a.ref!==!1&&p.isRef(e)){const i=a.each(e,{...n,path:o,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,...o],t);u!==void 0&&(s=s||Object.assign({},e),s[i]=u)}return s}},6133:(k,x,b)=>{const l=b(375),y=b(8571),p=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={}){l(typeof a=="string","Invalid reference key:",a),f.assertOptions(r,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),l(!r.prefix||typeof r.prefix=="object","options.prefix must be of type object");const t=Object.assign({},n.defaults,r);delete t.prefix;const o=t.separator,s=n.context(a,o,r.prefix);if(t.type=s.type,a=s.key,t.type==="value")if(s.root&&(l(!o||a[0]!==o,"Cannot specify relative path with root prefix"),t.ancestor="root",a||(a=null)),o&&o===a)a=null,t.ancestor=0;else if(t.ancestor!==void 0)l(!o||!a||a[0]!==o,"Cannot combine prefix with ancestor option");else{const[i,u]=n.ancestor(a,o);u&&(a=a.slice(u))===""&&(a=null),t.ancestor=i}return t.path=o?a===null?[]:a.split(o):[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){l(typeof a=="object","Invalid reference construction"),f.assertOptions(a,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),l([!1,void 0].includes(a.separator)||typeof a.separator=="string"&&a.separator.length===1,"Invalid separator"),l(!a.adjust||typeof a.adjust=="function","options.adjust must be a function"),l(!a.map||Array.isArray(a.map),"options.map must be an array"),l(!a.map||!a.adjust,"Cannot set both map and adjust options"),Object.assign(this,n.defaults,a),l(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,o,s={}){return l(!this.in||s.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(t.context,r,s):this.type==="local"?this._resolve(o,r,s):this.ancestor?this.ancestor==="root"?this._resolve(r.ancestors[r.ancestors.length-1],r,s):(l(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 o;if(this.type==="value"&&r.mainstay.shadow&&t.shadow!==!1&&(o=r.mainstay.shadow.get(this.absolute(r))),o===void 0&&(o=p(a,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(o=this.adjust(o)),this.map){const s=this.map.get(o);s!==void 0&&(o=s)}return r.mainstay&&r.mainstay.tracer.resolve(r,this,o),o}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 o=t.global===void 0?"$":t.global;if(o!==r&&a.startsWith(o))return{key:a.slice(o.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 l=b(5107),y={};y.wrap=l.string().min(1).max(2).allow(!1),x.preferences=l.object({allowUnknown:l.boolean(),abortEarly:l.boolean(),artifacts:l.boolean(),cache:l.boolean(),context:l.object(),convert:l.boolean(),dateFormat:l.valid("date","iso","string","time","utc"),debug:l.boolean(),errors:{escapeHtml:l.boolean(),label:l.valid("path","key",!1),language:[l.string(),l.object().ref()],render:l.boolean(),stack:l.boolean(),wrap:{label:y.wrap,array:y.wrap,string:y.wrap}},externals:l.boolean(),messages:l.object(),noDefaults:l.boolean(),nonEnumerables:l.boolean(),presence:l.valid("required","optional","forbidden"),skipFunctions:l.boolean(),stripUnknown:l.object({arrays:l.boolean(),objects:l.boolean()}).or("arrays","objects").allow(!0,!1),warnings:l.boolean()}).strict(),y.nameRx=/^[a-zA-Z0-9]\w*$/,y.rule=l.object({alias:l.array().items(l.string().pattern(y.nameRx)).single(),args:l.array().items(l.string(),l.object({name:l.string().pattern(y.nameRx).required(),ref:l.boolean(),assert:l.alternatives([l.function(),l.object().schema()]).conditional("ref",{is:!0,then:l.required()}),normalize:l.function(),message:l.string().when("assert",{is:l.function(),then:l.required()})})),convert:l.boolean(),manifest:l.boolean(),method:l.function().allow(!1),multi:l.boolean(),validate:l.function()}),x.extension=l.object({type:l.alternatives([l.string(),l.object().regex()]).required(),args:l.function(),cast:l.object().pattern(y.nameRx,l.object({from:l.function().maxArity(1).required(),to:l.function().minArity(1).maxArity(2).required()})),base:l.object().schema().when("type",{is:l.object().regex(),then:l.forbidden()}),coerce:[l.function().maxArity(3),l.object({method:l.function().maxArity(3).required(),from:l.array().items(l.string()).single()})],flags:l.object().pattern(y.nameRx,l.object({setter:l.string(),default:l.any()})),manifest:{build:l.function().arity(2)},messages:[l.object(),l.string()],modifiers:l.object().pattern(y.nameRx,l.function().minArity(1).maxArity(2)),overrides:l.object().pattern(y.nameRx,l.function()),prepare:l.function().maxArity(3),rebuild:l.function().arity(1),rules:l.object().pattern(y.nameRx,y.rule),terms:l.object().pattern(y.nameRx,l.object({init:l.array().allow(null).required(),manifest:l.object().pattern(/.+/,[l.valid("schema","single"),l.object({mapped:l.object({from:l.string().required(),to:l.string().required()}).required()})])})),validate:l.function().maxArity(3)}).strict(),x.extensions=l.array().items(l.object(),l.function().arity(1)).strict(),y.desc={buffer:l.object({buffer:l.string()}),func:l.object({function:l.function().required(),options:{literal:!0}}),override:l.object({override:!0}),ref:l.object({ref:l.object({type:l.valid("value","global","local"),path:l.array().required(),separator:l.string().length(1).allow(!1),ancestor:l.number().min(0).integer().allow("root"),map:l.array().items(l.array().length(2)).min(1),adjust:l.function(),iterables:l.boolean(),in:l.boolean(),render:l.boolean()}).required()}),regex:l.object({regex:l.string().min(3)}),special:l.object({special:l.valid("deep").required()}),template:l.object({template:l.string().required(),options:l.object()}),value:l.object({value:l.alternatives([l.object(),l.array()]).required()})},y.desc.entity=l.alternatives([l.array().items(l.link("...")),l.boolean(),l.function(),l.number(),l.string(),y.desc.buffer,y.desc.func,y.desc.ref,y.desc.regex,y.desc.special,y.desc.template,y.desc.value,l.link("/")]),y.desc.values=l.array().items(null,l.boolean(),l.function(),l.number().allow(1/0,-1/0),l.string().allow(""),l.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=l.object().pattern(/.+/,[l.string(),y.desc.template,l.object().pattern(/.+/,[l.string(),y.desc.template])]),x.description=l.object({type:l.string().required(),flags:l.object({cast:l.string(),default:l.any(),description:l.string(),empty:l.link("/"),failover:y.desc.entity,id:l.string(),label:l.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:l.boolean(),unit:l.string()}).unknown(),preferences:{allowUnknown:l.boolean(),abortEarly:l.boolean(),artifacts:l.boolean(),cache:l.boolean(),convert:l.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:l.boolean(),label:["path","key"],language:[l.string(),y.desc.ref],wrap:{label:y.wrap,array:y.wrap}},externals:l.boolean(),messages:y.desc.messages,noDefaults:l.boolean(),nonEnumerables:l.boolean(),presence:["required","optional","forbidden"],skipFunctions:l.boolean(),stripUnknown:l.object({arrays:l.boolean(),objects:l.boolean()}).or("arrays","objects").allow(!0,!1),warnings:l.boolean()},allow:y.desc.values,invalid:y.desc.values,rules:l.array().min(1).items({name:l.string().required(),args:l.object().min(1),keep:l.boolean(),message:[l.string(),y.desc.messages],warn:l.boolean()}),keys:l.object().pattern(/.*/,l.link("/")),link:y.desc.ref}).pattern(/^[a-z]\w*$/,l.any())},493:(k,x,b)=>{const l=b(8571),y=b(9621),p=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=l(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 p.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 o=e[t];let s=r.get(o);s||(s=new Map,r.set(o,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 l=b(375),y=b(8571),p=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,o){if(l(typeof t=="string","Template source must be a string"),l(!t.includes("\0")&&!t.includes(""),"Template source cannot contain reserved control characters"),this.source=t,this.rendered=t,this._template=null,o){const{functions:s,...i}=o;this._settings=Object.keys(i).length?y(i):void 0,this._functions=s,this._functions&&(l(Object.keys(this._functions).every(u=>typeof u=="string"),"Functions keys must be strings"),l(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),o=r.split(t);let s=!1;const i=[],u=o.shift();u&&i.push(u);for(const d of o){const h=d[0]!=="{",_=h?"}":"}}",v=d.indexOf(_);if(v===-1||d[1]==="{"){i.push(`{${r.decode(d)}`);continue}let c=d.slice(h?0:1,v);const m=c[0]===":";m&&(c=c.slice(1));const g=this._ref(r.decode(c),{raw:h,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,o){return r.dateFormat[o.dateFormat].call(t)}describe(t={}){if(!this._settings&&t.compact)return this.source;const o={template:this.source};return this._settings&&(o.options=this._settings),this._functions&&(o.functions=this._functions),o}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 o of this._template)typeof o!="string"&&t.push(...o.refs);return t}resolve(t,o,s,i){return this._template&&this._template.length===1?this._part(this._template[0],t,o,s,i,{}):this.render(t,o,s,i)}_part(t,...o){return t.ref?t.ref.resolve(...o):t.formula.evaluate(o)}render(t,o,s,i,u={}){if(!this.isDynamic())return this.rendered;const d=[];for(const h of this._template)if(typeof h=="string")d.push(h);else{const _=this._part(h,t,o,s,i,u),v=r.stringify(_,t,o,s,i,u);if(v!==void 0){const c=h.raw||(u.errors&&u.errors.escapeHtml)===!1?v:p(v);d.push(r.wrap(c,h.wrapped&&s.errors.wrap.label))}}return d.join("")}_ref(t,{raw:o,wrapped:s}){const i=[],u=h=>{const _=a.create(h,this._settings);return i.push(_),v=>{const c=_.resolve(...v);return c!==void 0?c:null}};try{const h=this._functions?{...r.functions,...this._functions}:r.functions;var d=new f.Parser(t,{reference:u,functions:h,constants:r.constants})}catch(h){throw h.message=`Invalid template variable "${t}" fails due to: ${h.message}`,h}if(d.single){if(d.single.type==="reference"){const h=i[0];return{ref:h,raw:o,refs:i,wrapped:s||h.type==="local"&&h.key==="label"}}return r.stringify(d.single.value)}return{formula:d,raw:o,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,(o,s)=>r.opens.slice(0,s.length)).replace(/\\(\}+)/g,(o,s)=>r.closes.slice(0,s.length))},r.decode=function(t){return t.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},r.split=function(t){const o=[];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;o.push(s),s=d}else s+=u}return o.push(s),o},r.wrap=function(t,o){return o?o.length===1?`${o}${t}${o}`:`${o[0]}${t}${o[1]}`:t},r.stringify=function(t,o,s,i,u,d={}){const h=typeof t,_=i&&i.errors&&i.errors.wrap||{};let v=!1;if(a.isRef(t)&&t.render&&(v=t.in,t=t.resolve(o,s,i,u,{in:t.in,...d})),t===null)return"null";if(h==="string")return r.wrap(t,d.arrayItems&&_.string);if(h==="number"||h==="function"||h==="symbol")return t.toString();if(h!=="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,o,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,o,s)=>t?o: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[o,s,i,u,d]=this,h=d.messages;if(!h)return"";const _=n.template(o,h[0],t,s,i)||n.template(o,h[1],t,s,i);return _?_.render(o,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 l=b(375),y=b(1687),p=b(8068),f=b(8160),e=b(3292),n=b(6354),a=b(6133),r={};k.exports=p.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:a.toSibling}},args:(t,...o)=>o.length===1&&Array.isArray(o[0])?t.try(...o[0]):t.try(...o),validate(t,o){const{schema:s,error:i,state:u,prefs:d}=o;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 h=[];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(),h.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,A=`match.${_}${v.switch?"."+g:""}`;if($.$_match(c,u.nest($,`${A}.is`),d)){if(j)return j.$_validate(t,u.nest(j,`${A}.then`),d)}else if(S)return S.$_validate(t,u.nest(S,`${A}.otherwise`),d)}}return r.errors(h,o)},rules:{conditional:{method(t,o){l(!this._flags._endedSwitch,"Unreachable condition"),l(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),l(o.break===void 0,"Cannot use break option with alternatives conditional");const s=this.clone(),i=e.when(s,t,o),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(l(["any","one","all"].includes(t),"Invalid alternatives match mode",t),t!=="any")for(const o of this.$_terms.matches)l(o.schema,"Cannot combine match mode",t,"with conditional rules");return this.$_setFlag("match",t)}},try:{method(...t){l(t.length,"Missing alternative schemas"),f.verifyFlat(t,"try"),l(!this._flags._endedSwitch,"Unreachable condition");const o=this.clone();for(const s of t)o.$_terms.matches.push({schema:o.$_compile(s)});return o.$_mutateRebuild()}}},overrides:{label(t){return this.$_parent("label",t).$_modify({each:(o,s)=>s.path[0]!=="is"&&typeof o._flags.label!="string"?o.label(t):void 0,ref:!1})}},rebuild(t){t.$_modify({each:o=>{f.isSchema(o)&&o.type==="array"&&t.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(t,o){if(o.matches)for(const s of o.matches){const{schema:i,ref:u,is:d,not:h,then:_,otherwise:v}=s;t=i?t.try(i):u?t.conditional(u,{is:d,then:_,not:h,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:o,state:s}){if(!t.length)return{errors:o("alternatives.any")};if(t.length===1)return{errors:t[0].reports};const i=new Set,u=[];for(const{reports:d,schema:h}of t){if(d.length>1)return r.unmatched(t,o);const _=d[0];if(_ instanceof n.Report==0)return r.unmatched(t,o);if(_.state.path.length!==s.path.length){u.push({type:h.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:h.type,report:_})}return u.length?u.length===1?{errors:u[0].report}:r.unmatched(t,o):{errors:o("alternatives.types",{types:[...i]})}},r.unmatched=function(t,o){const s=[];for(const i of t)s.push(...i.reports);return{errors:o("alternatives.match",n.details(s,{override:!1}))}}},8068:(k,x,b)=>{const l=b(375),y=b(7629),p=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 l(typeof e=="function","Method must be a function"),l(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){l(p.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 l(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:o,is:s,not:i,then:u,otherwise:d,concat:h}=t;e=h?e.concat(h):o?e.when(o,{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:o,adjuster:s}of r)t[o]=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 l=b(375),y=b(9474),p=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:o,prefs:s}){if(!Array.isArray(r))return;const i=t.$_getRule("sort");return i?a.sort(t,r,i.args.options,o,s):void 0}},validate(r,{schema:t,error:o}){if(!Array.isArray(r)){if(t._flags.single){const s=[r];return s[e.symbols.arraySingle]=!0,{value:s}}return{errors:o("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:o,error:s},{schema:i}){const u=[r,...t.ancestors];for(let h=0;h<r.length;++h){const _=t.localize([...t.path,h],u,i);if(i.$_match(r[h],_,o))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 o=0;o<r.length;++o){const s=e.tryWithPath(()=>this.$_compile(r[o]),o,{append:!0});t.$_terms.items.push(s)}return t.$_mutateRebuild()},validate(r,{schema:t,error:o,state:s,prefs:i,errorsArray:u}){const d=t.$_terms._requireds.slice(),h=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),A=[...s.path,S];if(!t._flags.sparse&&w===void 0){if(c.push(o("array.sparse",{key:S,path:A,pos:g,value:void 0},s.localize(A))),i.abortEarly)return c;h.shift();continue}const E=[r,...s.ancestors];for(const M of t.$_terms._exclusions)if(M.$_match(w,s.localize(A,E,M),i,{presence:"ignore"})){if(c.push(o("array.excludes",{pos:g,value:w},s.localize(A))),i.abortEarly)return c;$=!0,h.shift();break}if($)continue;if(t.$_terms.ordered.length){if(h.length){const M=h.shift(),T=M.$_validate(w,s.localize(A,E,M),i);if(T.errors){if(c.push(...T.errors),i.abortEarly)return c}else if(M._flags.result==="strip")a.fastSplice(r,g),--g,--m;else{if(!t._flags.sparse&&T.value===void 0){if(c.push(o("array.sparse",{key:S,path:A,pos:g,value:void 0},s.localize(A))),i.abortEarly)return c;continue}r[g]=T.value}continue}if(!t.$_terms.items.length){if(c.push(o("array.orderedLength",{pos:g,limit:t.$_terms.ordered.length})),i.abortEarly)return c;break}}const I=[];let N=d.length;for(let M=0;M<N;++M){const T=s.localize(A,E,d[M]);T.snapshot();const z=d[M].$_validate(w,T,i);if(I[M]=z,!z.errors){if(T.commit(),r[g]=z.value,j=!0,a.fastSplice(d,M),--M,--N,!t._flags.sparse&&z.value===void 0&&(c.push(o("array.sparse",{key:S,path:A,pos:g,value:void 0},s.localize(A))),i.abortEarly))return c;break}T.restore()}if(j)continue;const q=i.stripUnknown&&!!i.stripUnknown.arrays||!1;N=_.length;for(const M of _){let T;const z=d.indexOf(M);if(z!==-1)T=I[z];else{const B=s.localize(A,E,M);if(B.snapshot(),T=M.$_validate(w,B,i),!T.errors){B.commit(),M._flags.result==="strip"?(a.fastSplice(r,g),--g,--m):t._flags.sparse||T.value!==void 0?r[g]=T.value:(c.push(o("array.sparse",{key:S,path:A,pos:g,value:void 0},s.localize(A))),$=!0),j=!0;break}B.restore()}if(N===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(o("array.includes",{pos:g,value:w},s.localize(A))),i.abortEarly)return c}}return d.length&&a.fillMissedErrors(t,c,d,r,s,i),h.length&&(a.fillOrderedErrors(t,c,h,r,s,i),c.length||a.fillDefault(h,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:o},{name:s,operator:i,args:u})=>e.compare(r.length,o,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 o=0;o<r.length;++o){const s=e.tryWithPath(()=>this.$_compile(r[o]),o,{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 l(!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}),l(!t.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:t}})},validate(r,{error:t,state:o,prefs:s,schema:i},{options:u}){const{value:d,errors:h}=a.sort(i,r,u,o,s);if(h)return h;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={}){l(!r||typeof r=="function"||typeof r=="string","comparator must be a function or a string"),e.assertOptions(t,["ignoreUndefined","separator"]);const o={name:"unique",args:{options:t,comparator:r}};if(r)if(typeof r=="string"){const s=e.default(t.separator,".");o.path=s?r.split(s):[r]}else o.comparator=r;return this.$_addRule(o)},validate(r,{state:t,error:o,schema:s},{comparator:i,options:u},{comparator:d,path:h}){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=h?p(r[m],h):r[m],w=d?_.custom:_[typeof g];if(l(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]),A={pos:m,value:r[m],dupePos:j.value[1],dupeValue:r[j.value[1]]};return h&&(A.path=i),o("array.unique",A,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 h&&($.path=i),o("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,o,s,i,u){const d=[];let h=0;for(const _ of o){const v=_._flags.label;v?d.push(v):++h}d.length?h?t.push(r.$_createError("array.includesRequiredBoth",s,{knownMisses:d,unknownMisses:h},i,u)):t.push(r.$_createError("array.includesRequiredKnowns",s,{knownMisses:d},i,u)):t.push(r.$_createError("array.includesRequiredUnknowns",s,{unknownMisses:h},i,u))},a.fillOrderedErrors=function(r,t,o,s,i,u){const d=[];for(const h of o)h._flags.presence==="required"&&d.push(h);d.length&&a.fillMissedErrors(r,t,d,s,i,u)},a.fillDefault=function(r,t,o,s){const i=[];let u=!0;for(let d=r.length-1;d>=0;--d){const h=r[d],_=[t,...o.ancestors],v=h.$_validate(void 0,o.localize(o.path,_,h),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 o=t;for(;o<r.length;)r[o++]=r[o];--r.length},a.validateSingle=function(r,t){(r.type==="array"||r._flags._arrayItems)&&(l(!t._flags.single,"Cannot specify array item with single rule enabled"),t.$_setFlag("_arrayItems",!0,{clone:!1}))},a.sort=function(r,t,o,s,i){const u=o.order==="ascending"?1:-1,d=-1*u,h=u,_=(v,c)=>{let m=a.compare(v,c,d,h);if(m!==null||(o.by&&(v=o.by.resolve(v,s,i),c=o.by.resolve(c,s,i)),m=a.compare(v,c,d,h),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:h};try{return{value:t.slice().sort(_)}}catch(v){return{errors:v}}},a.compare=function(r,t,o,s){return r===t?0:r===void 0?1:t===void 0?-1:r===null?s:t===null?o:null}},4937:(k,x,b)=>{const l=b(375),y=b(8068),p=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){p.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];l(t!==void 0,"Cannot call truthy with undefined"),a.$_terms.truthy.add(t)}return a}},falsy:{method(...n){p.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];l(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 l=b(375),y=b(8068),p=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 o=a._flags.format;return t.convert&&o&&typeof n=="string"?{value:n,errors:r("date.format",{format:o})}:{value:n,errors:r("date.base")}},rules:{compare:{method:!1,validate(n,a,{date:r},{name:t,operator:o,args:s}){const i=r==="now"?Date.now():r.getTime();return p.compare(n.getTime(),i,o)?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 l(["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 l(["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 p.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 l=b(375),y=b(7824);k.exports=y.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(p){return l(Number.isSafeInteger(p)&&p>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:p}})},validate:(p,f,{n:e})=>p.length===e?p:f.error("function.arity",{n:e})},class:{method(){return this.$_addRule("class")},validate:(p,f)=>/^\s*class\s/.test(p.toString())?p:f.error("function.class",{value:p})},minArity:{method(p){return l(Number.isSafeInteger(p)&&p>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:p}})},validate:(p,f,{n:e})=>p.length>=e?p:f.error("function.minArity",{n:e})},maxArity:{method(p){return l(Number.isSafeInteger(p)&&p>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:p}})},validate:(p,f,{n:e})=>p.length<=e?p: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 l=b(978),y=b(375),p=b(8571),f=b(3652),e=b(8068),n=b(8160),a=b(3292),r=b(6354),t=b(6133),o=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:h,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,h,_,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,...h.ancestors];for(const g of u.$_terms.keys){const w=g.key,$=i[w];c.delete(w);const j=h.localize([...h.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,h,_);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,h,_,null,{shadow:!1}))===!1)continue;const g=s.dependencies[m.rel](u,m,i,h,_);if(g){const w=u.$_createError(g.code,i,g.context,h,_);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){o.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 h=this.$_addRule({name:"assert",args:{subject:i,schema:u,message:d}});return h.$_mutateRegister(i),h.$_mutateRegister(u),h},validate(i,{error:u,prefs:d,state:h},{subject:_,schema:v,message:c}){const m=_.resolve(i,h,d),g=t.isRef(_)?_.absolute(h):[];return v.$_match(m,h.localize(g,[i,...h.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:h})=>i instanceof d?i:u.error("object.instance",{type:h,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:h,operator:_,args:v})=>n.compare(Object.keys(i).length,d,_)?i:u.error("object."+h,{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 h=i instanceof RegExp;h||(i=this.$_compile(i,{appendPath:!0})),y(u!==void 0,"Invalid rule"),n.assertOptions(d,["fallthrough","matches"]),h&&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={[h?"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 o,"Invalid rename to argument"),y(u!==i,"Cannot rename key to same name:",i),n.assertOptions(d,["alias","ignoreUndefined","override","multiple"]);const h=this.clone();h.$_terms.renames=h.$_terms.renames||[];for(const _ of h.$_terms.renames)y(_.from!==i,"Cannot rename the same key multiple times");return u instanceof o&&h.$_mutateRegister(u),h.$_terms.renames.push({from:i,to:u,options:l(s.renameDefaults,d)}),h}},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:h=null,peers:_,options:v}of u.dependencies)i=s.dependency(i,d,h,_,v);if(u.patterns)for(const{regex:d,schema:h,rule:_,fallthrough:v,matches:c}of u.patterns)i=i.pattern(d||h,_,{fallthrough:v,matches:c});if(u.renames)for(const{from:d,to:h,options:_}of u.renames)i=i.rename(d,h,_);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 p(i,{shallow:!0});const h=Object.create(Object.getPrototypeOf(i));return Object.assign(h,i),h}const d=function(...h){return i.apply(this,h)};return d.prototype=p(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,h,_){y(d===null||typeof d=="string",u,"key must be a strings"),_||(_=h.length>1&&typeof h[h.length-1]=="object"?h.pop():{}),n.assertOptions(_,["separator","isPresent"]),h=[].concat(h);const v=n.default(_.separator,"."),c=[];for(const g of h)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,h,_)),m},s.dependencies={and(i,u,d,h,_){const v=[],c=[],m=u.peers.length,g=s.isPresent(u.options);for(const w of u.peers)g(w.resolve(d,h,_,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,h,_){const v=[],c=s.isPresent(u.options);for(const w of u.peers)c(w.resolve(d,h,_,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,h,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,h,_,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:u.paths,peersWithLabels:s.keysToLabels(i,u.paths)}}},oxor(i,u,d,h,_){const v=[],c=s.isPresent(u.options);for(const g of u.peers)c(g.resolve(d,h,_,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,h,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,h,_,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,h,_){const v=s.isPresent(u.options);for(const c of u.peers)if(v(c.resolve(d,h,_,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,h,_){const v=[],c=s.isPresent(u.options);for(const g of u.peers)c(g.resolve(d,h,_,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,h,_){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 o&&(j=j.render(u,d,h,w.match)),$!==j){if(!c.options.multiple&&v[j]&&(_.push(i.$_createError("object.rename.multiple",u,{from:$,to:j,pattern:g},d,h)),h.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,h)),h.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,h,_,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 A=i.$_terms.patterns[S];if(A.regex){const N=A.regex.test(w);if(_.mainstay.tracer.debug(_,"rule",`pattern.${S}`,N?"pass":"error"),!N)continue}else if(!A.schema.$_match(w,_.nest(A.schema,`pattern.${S}`),v))continue;d.delete(w);const E=_.localize(j,g,{schema:A.rule,key:w}),I=A.rule.$_validate($,E,v);if(I.errors){if(v.abortEarly)return{value:u,errors:I.errors};h.push(...I.errors)}if(A.matches&&m[S].push(w),u[w]=I.value,!A.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),A=j.$_validate($,S,v);if(A.errors){const E=r.details(A.errors,{override:!1});E.matches=$;const I=i.$_createError("object.pattern.match",u,E,_,v);if(v.abortEarly)return{value:u,errors:I};h.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};h.push(g)}}},s.Dependency=class{constructor(i,u,d,h,_){this.rel=i,this.key=u,this.peers=d,this.paths=h,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 h=0;h<u.length;++h)d.set(u[h].key,h);for(const h of i){const _=h.key,v=d.get(_);v!==void 0?u[v]={key:_,schema:u[v].schema.concat(h.schema)}:u.push(h)}return u}}},8785:(k,x,b)=>{const l=b(375),y=b(8068),p=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:o}){l(r.$_terms.link,"Uninitialized link schema");const s=n.generate(r,a,t,o),i=r.$_terms.link[0].ref;return s.$_validate(a,t.nest(s,`link:${i.display}:${s.type}`),o)},generate:(a,r,t,o)=>n.generate(a,r,t,o),rules:{ref:{method(a){l(!this.$_terms.link,"Cannot reinitialize schema"),a=f.ref(a),l(a.type==="value"||a.type==="local","Invalid reference type:",a.type),l(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){l(this.$_terms.link,"Uninitialized link schema"),l(p.isSchema(a),"Invalid schema object"),l(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)=>(l(r.link,"Invalid link description missing link"),a.ref(r.link))}}),n.generate=function(a,r,t,o){let s=t.mainstay.links.get(a);if(s)return s._generate(r,t,o).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,o);try{s=d.length?u.$_reach(d):u}catch{n.assert(!1,"to non-existing schema",i,a,t,o)}return n.assert(s.type!=="link","which is another link",i,a,t,o),a._flags.relative||t.mainstay.links.set(a,s),s._generate(r,t,o).schema},n.perspective=function(a,r){if(a.type==="local"){for(const{schema:t,key:o}of r.schemas){if((t._flags.id||o)===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,o,s,i){a||l(!1,`"${e.label(o._flags,s,i)}" contains link reference "${t.display}" ${r}`)}},3832:(k,x,b)=>{const l=b(375),y=b(8068),p=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(!p.isNumber(e))return{value:e,errors:a("number.base")};const t={value:e};if(r.convert){const o=n.$_getRule("precision");if(o){const s=Math.pow(10,o.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:o})=>p.compare(e,a,t)?e:n.error("number."+r,{limit:o.limit,value:e}),args:[{name:"limit",ref:!0,assert:p.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},o)=>f.decimalPlaces(e)>r?n.error("number.multiple",{multiple:o.args.base,value:e}):Math.round(t*e)%Math.round(t*a)==0?e:n.error("number.multiple",{multiple:o.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 l(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 l(["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 l(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 l=b(7824);k.exports=l.extend({type:"object",cast:{map:{from:y=>y&&typeof y=="object",to:(y,p)=>new Map(Object.entries(y))}}})},7417:(k,x,b)=>{const l=b(375),y=b(5380),p=b(1745),f=b(9959),e=b(6064),n=b(9926),a=b(5752),r=b(8068),t=b(8160),o={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 h=i.$_getRule("normalize");h&&(s=s.normalize(h.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=o.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},l(typeof s.paddingRequired=="boolean","paddingRequired must be boolean"),l(typeof s.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:s}})},validate:(s,i,{options:u})=>o.base64Regex[u.paddingRequired][u.urlSafe].test(s)?s:i.error("string.base64")},case:{method(s){return l(["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,h=1;for(;u--;){const _=s.charAt(u)*h;d+=_-9*(_>9),h^=3}return d>0&&d%10==0?s:i.error("string.creditCard")}},dataUri:{method(s={}){return t.assertOptions(s,["paddingRequired"]),s={paddingRequired:!0,...s},l(typeof s.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:s}})},validate(s,i,{options:u}){const d=s.match(o.dataUriRegex);return d&&(!d[2]||d[2]!=="base64"||o.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=o.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"]),l(s.multiple===void 0||typeof s.multiple=="boolean","multiple option must be an boolean");const i=o.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:h}){const _=u.multiple?s.split(d):[s],v=[];for(const c of _)p.isValid(c,h)||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 h=[].concat(s.version);l(h.length>=1,"version must have at least 1 valid version specified");const _=new Set;for(let v=0;v<h.length;++v){const c=h[v];l(typeof c=="string","version at position "+v+" must be a string");const m=o.guidVersions[c.toLowerCase()];l(m,"version at position "+v+" must be one of "+Object.keys(o.guidVersions).join(", ")),l(!_.has(m),"version at position "+v+" must not be a duplicate"),i+=m,_.add(m)}}l(o.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 h=d.exec(s);return h?o.guidBrackets[h[1]]!==h[h.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},l(typeof s.byteAligned=="boolean","byteAligned must be boolean"),l(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"?o.hexRegex.withOptionalPrefix:u.prefix===!0?o.hexRegex.withPrefix:o.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})||o.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),h=s.version?u:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:i,version:h}},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})=>o.isoDate(s)?s:i("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(s,i)=>o.isoDurationRegex.test(s)?s:i.error("string.isoDuration")},length:{method(s,i){return o.length(this,"length",s,"=",i)},validate(s,i,{limit:u,encoding:d},{name:h,operator:_,args:v}){const c=!d&&s.length;return t.compare(c,u,_)?s:i.error("string."+h,{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 o.length(this,"max",s,"<=",i)},args:["limit","encoding"]},min:{method(s,i){return o.length(this,"min",s,">=",i)},args:["limit","encoding"]},normalize:{method(s="NFC"){return l(o.normalizationForms.includes(s),"normalization form must be one of "+o.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={}){l(s instanceof RegExp,"regex must be a RegExp"),l(!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:h})=>u.test(s)^d.invert?s:i.error(h,{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")),l(s instanceof RegExp,"pattern must be a RegExp"),l(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 l(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 l(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?o.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:h,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!h||u.allowRelative&&!c||y.isValid(c,h)?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"}}),o.addressOptions=function(s){if(!s)return o.tlds||s;if(l(s.minDomainSegments===void 0||Number.isSafeInteger(s.minDomainSegments)&&s.minDomainSegments>0,"minDomainSegments must be a positive integer"),l(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 l(o.tlds,"Built-in TLD list disabled"),Object.assign({},s,o.tlds);l(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)}})),l(s.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),l(!s.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),o.validateTlds(s.tlds.deny,"tlds.deny"),s;const u=s.tlds.allow;return u?u===!0?(l(o.tlds,"Built-in TLD list disabled"),Object.assign({},s,o.tlds)):(Array.isArray(u)&&(s=Object.assign({},s,{tlds:{allow:new Set(u)}})),l(s.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),o.validateTlds(s.tlds.allow,"tlds.allow"),s):s},o.validateTlds=function(s,i){for(const u of s)l(y.isValid(u,{minDomainSegments:1,maxDomainSegments:1}),`${i} must contain valid top level domain names`)},o.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()},o.length=function(s,i,u,d,h){return l(!h||!1,"Invalid encoding:",h),s.$_addRule({name:i,method:"length",args:{limit:u,encoding:h},operator:d})}},8826:(k,x,b)=>{const l=b(375),y=b(8068),p={};p.Map=class extends Map{slice(){return new p.Map(this)}},k.exports=y.extend({type:"symbol",terms:{map:{init:new p.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)),l(f&&f[Symbol.iterator],"Iterable must be an iterable or object");const e=this.clone(),n=[];for(const a of f){l(a&&a[Symbol.iterator],"Entry must be an iterable");const[r,t]=a;l(typeof r!="object"&&typeof r!="function"&&typeof r!="symbol","Key must not be of type object, function, or Symbol"),l(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 l=b(375),y=b(8571),p=b(738),f=b(9621),e=b(8160),n=b(6354),a=b(493),r={result:Symbol("result")};x.entry=function(t,o,s){let i=e.defaults;s&&(l(s.warnings===void 0,"Cannot override warnings preference in synchronous validation"),l(s.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),i=e.preferences(e.defaults,s));const u=r.entry(t,o,i);l(!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,o,s){let i=e.defaults;s&&(i=e.preferences(e.defaults,s));const u=r.entry(t,o,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?[_]:[],A=m.length?f(t,m):t;if(m.length){w=m[m.length-1];let E=_;for(const I of m.slice(0,-1))E=E[I],S.unshift(E);$=S[0],j=$[w]}try{const E=(N,q)=>(g||c.schema).$_createError(N,j,q,c.state,i),I=await c.method(j,{schema:c.schema,linked:g,state:c.state,prefs:s,original:A,error:E,errorsArray:r.errorsArray,warn:(N,q)=>d.warnings.push((g||c.schema).$_createError(N,j,q,c.state,i)),message:(N,q)=>(g||c.schema).$_createError("external",j,q,c.state,i,{messages:N})});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(E){throw i.errors.label&&(E.message+=` (${c.label})`),E}}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 h={value:u.value};return d.warnings.length&&(h.warning=n.details(d.warnings)),d.debug&&(h.debug=d.debug),d.artifacts&&(h.artifacts=d.artifacts),h},r.Mainstay=class{constructor(t,o,s){this.externals=[],this.warnings=[],this.tracer=t,this.debug=o,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,o,s){const{tracer:i,cleanup:u}=r.tracer(o,s),d=s.debug?[]:null,h=o._ids._schemaChain?new Map:null,_=new r.Mainstay(i,d,h),v=o._ids._schemaChain?[{schema:o}]:null,c=new a([],[],{mainstay:_,schemas:v}),m=x.validate(t,o,c,s);u&&o.$_root.untrace();const g=n.process(m.errors,t,s);return{value:m.value,error:g,mainstay:_}},r.tracer=function(t,o){return t.$_root._tracer?{tracer:t.$_root._tracer._register(t)}:o.debug?(l(t.$_root.trace,"Debug mode not supported"),{tracer:t.$_root.trace()._register(t),cleanup:!0}):{tracer:r.ignore}},x.validate=function(t,o,s,i,u={}){if(o.$_terms.whens&&(o=o._generate(t,s,i).schema),o._preferences&&(i=r.prefs(o,i)),o._cache&&i.cache){const g=o._cache.get(t);if(s.mainstay.tracer.debug(s,"validate","cached",!!g),g)return g}const d=(g,w,$)=>o.$_createError(g,t,w,$||s,i),h={original:t,prefs:i,schema:o,state:s,error:d,errorsArray:r.errorsArray,warn:(g,w,$)=>s.mainstay.warnings.push(d(g,w,$)),message:(g,w)=>o.$_createError("custom",t,w,s,i,{messages:g})};s.mainstay.tracer.entry(o,s);const _=o._definition;if(_.prepare&&t!==void 0&&i.convert){const g=_.prepare(t,h);if(g){if(s.mainstay.tracer.value(s,"prepare",t,g.value),g.errors)return r.finalize(g.value,[].concat(g.errors),h);t=g.value}}if(_.coerce&&t!==void 0&&i.convert&&(!_.coerce.from||_.coerce.from.includes(typeof t))){const g=_.coerce.method(t,h);if(g){if(s.mainstay.tracer.value(s,"coerced",t,g.value),g.errors)return r.finalize(g.value,[].concat(g.errors),h);t=g.value}}const v=o._flags.empty;v&&v.$_match(r.trim(t,o),s.nest(v),e.defaults)&&(s.mainstay.tracer.value(s,"empty",t,void 0),t=void 0);const c=u.presence||o._flags.presence||(o._flags._endedSwitch?null:i.presence);if(t===void 0){if(c==="forbidden")return r.finalize(t,null,h);if(c==="required")return r.finalize(t,[o.$_createError("any.required",t,null,s,i)],h);if(c==="optional"){if(o._flags.default!==e.symbols.deepDefault)return r.finalize(t,null,h);s.mainstay.tracer.value(s,"default",t,{}),t={}}}else if(c==="forbidden")return r.finalize(t,[o.$_createError("any.unknown",t,null,s,i)],h);const m=[];if(o._valids){const g=o._valids.get(t,s,i,o._flags.insensitive);if(g)return i.convert&&(s.mainstay.tracer.value(s,"valids",t,g.value),t=g.value),s.mainstay.tracer.filter(o,s,"valid",g),r.finalize(t,null,h);if(o._flags.only){const w=o.$_createError("any.only",t,{valids:o._valids.values({display:!0})},s,i);if(i.abortEarly)return r.finalize(t,[w],h);m.push(w)}}if(o._invalids){const g=o._invalids.get(t,s,i,o._flags.insensitive);if(g){s.mainstay.tracer.filter(o,s,"invalid",g);const w=o.$_createError("any.invalid",t,{invalids:o._invalids.values({display:!0})},s,i);if(i.abortEarly)return r.finalize(t,[w],h);m.push(w)}}if(_.validate){const g=_.validate(t,h);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,h);if(g.errors.length)return m.push(...g.errors),r.finalize(t,m,h)}}return o._rules.length?r.rules(t,m,h):r.finalize(t,m,h)},r.rules=function(t,o,s){const{schema:i,state:u,prefs:d}=s;for(const h of i._rules){const _=i._definition.rules[h.method];if(_.convert&&d.convert){u.mainstay.tracer.log(i,u,"rule",h.name,"full");continue}let v,c=h.args;if(h._resolve.length){c=Object.assign({},c);for(const g of h._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,h);const m=r.rule(v,h);if(m.errors){if(u.mainstay.tracer.log(i,u,"rule",h.name,"error"),h.warn){u.mainstay.warnings.push(...m.errors);continue}if(d.abortEarly)return r.finalize(t,m.errors,s);o.push(...m.errors)}else u.mainstay.tracer.log(i,u,"rule",h.name,"pass"),u.mainstay.tracer.value(u,"rule",t,m.value,h.name),t=m.value}return r.finalize(t,o,s)},r.rule=function(t,o){return t instanceof n.Report?(r.error(t,o),{errors:[t],value:null}):Array.isArray(t)&&t[e.symbols.errors]?(t.forEach(s=>r.error(s,o)),{errors:t,value:null}):{errors:null,value:t}},r.error=function(t,o){return o.message&&t._setTemplate(o.message),t},r.finalize=function(t,o,s){o=o||[];const{schema:i,state:u,prefs:d}=s;if(o.length){const _=r.default("failover",void 0,o,s);_!==void 0&&(u.mainstay.tracer.value(u,"failover",t,_),t=_,o=[])}if(o.length&&i._flags.error)if(typeof i._flags.error=="function"){o=i._flags.error(o),Array.isArray(o)||(o=[o]);for(const _ of o)l(_ instanceof Error||_ instanceof n.Report,"error() must return an Error object")}else o=[i._flags.error];if(t===void 0){const _=r.default("default",t,o,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 h={value:t,errors:o.length?o:null};return i._flags.result&&(h.value=i._flags.result==="strip"?void 0:s.original,u.mainstay.tracer.value(u,i._flags.result,t,h.value),u.shadow(t,i._flags.result)),i._cache&&d.cache!==!1&&!i._refs.length&&i._cache.set(s.original,h),t===void 0||h.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)),h},r.prefs=function(t,o){const s=o===e.defaults;return s&&t._preferences[e.symbols.prefs]?t._preferences[e.symbols.prefs]:(o=e.preferences(o,t._preferences),s&&(t._preferences[e.symbols.prefs]=o),o)},r.default=function(t,o,s,i){const{schema:u,state:d,prefs:h}=i,_=u._flags[t];if(h.noDefaults||_===void 0)return o;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,h))}}return typeof _!="object"?_:_[e.symbols.literal]?_.literal:e.isResolvable(_)?_.resolve(o,d,h):y(_)},r.trim=function(t,o){if(typeof t!="string")return t;const s=o.$_getRule("trim");return s&&s.args.enabled?t.trim():t},r.ignore={active:!1,debug:p,entry:p,filter:p,log:p,resolve:p,value:p},r.errorsArray=function(){const t=[];return t[e.symbols.errors]=!0,t}},2036:(k,x,b)=>{const l=b(375),y=b(9474),p=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){p.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){p.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 o=t.resolve(e,n,a,null,{in:!0});if(o===void 0)continue;const s=t.in&&typeof o=="object"?Array.isArray(o)?o:Object.keys(o):[o];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){l(!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[p.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 l=b(375),y=b(8571),p=b(1687),f=b(9621),e={};k.exports=function(n,a,r={}){if(l(n&&typeof n=="object","Invalid defaults value: must be an object"),l(!a||a===!0||typeof a=="object","Invalid source value: must be true, falsy or an object"),l(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 o=r.nullOverride!==void 0&&r.nullOverride;return p(t,a,{nullOverride:o,mergeArrays:!1})},e.applyToDefaultsWithShallow=function(n,a,r){const t=r.shallow;l(Array.isArray(t),"Invalid keys");const o=new Map,s=a===!0?null:new Set;for(let d of t){d=Array.isArray(d)?d:d.split(".");const h=f(n,d);h&&typeof h=="object"?o.set(h,s&&f(a,d)||h):s&&s.add(d)}const i=y(n,{},o);if(!s)return i;for(const d of s)e.reachCopy(i,a,d);const u=r.nullOverride!==void 0&&r.nullOverride;return p(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 o=n;for(let s=0;s<r.length-1;++s){const i=r[s];typeof o[i]!="object"&&(o[i]={}),o=o[i]}o[r[r.length-1]]=t}},375:(k,x,b)=>{const l=b(7916);k.exports=function(y,...p){if(!y)throw p.length===1&&p[0]instanceof Error?p[0]:new l(p)}},8571:(k,x,b)=>{const l=b(9621),y=b(4277),p=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 o=y.getInternalProto(e);if(o===y.buffer)return!1;if(o===y.date)return new Date(e.getTime());if(o===y.regex)return new RegExp(e);const s=f.base(e,o,n);if(s===e)return e;if(t&&t.set(e,s),o===y.set)for(const u of e)s.add(r(u,n,t));else if(o===y.map)for(const[u,d]of e)s.set(u,r(d,n,t));const i=p.keys(e,n);for(const u of i){if(u==="__proto__")continue;if(o===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 o=l(e,t);typeof o!="object"&&typeof o!="function"||r.set(o,o)}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 l=b(4277),y={mismatched:null};k.exports=function(p,f,e){return e=Object.assign({prototype:!0},e),!!y.isDeepEqual(p,f,e,[])},y.isDeepEqual=function(p,f,e,n){if(p===f)return p!==0||1/p==1/f;const a=typeof p;if(a!==typeof f||p===null||f===null)return!1;if(a==="function"){if(!e.deepFunction||p.toString()!==f.toString())return!1}else if(a!=="object")return p!=p&&f!=f;const r=y.getSharedType(p,f,!!e.prototype);switch(r){case l.buffer:return!1;case l.promise:return p===f;case l.regex:return p.toString()===f.toString();case y.mismatched:return!1}for(let t=n.length-1;t>=0;--t)if(n[t].isSame(p,f))return!0;n.push(new y.SeenEntry(p,f));try{return!!y.isDeepEqualObj(r,p,f,e,n)}finally{n.pop()}},y.getSharedType=function(p,f,e){if(e)return Object.getPrototypeOf(p)!==Object.getPrototypeOf(f)?y.mismatched:l.getInternalProto(p);const n=l.getInternalProto(p);return n!==l.getInternalProto(f)?y.mismatched:n},y.valueOf=function(p){const f=p.valueOf;if(f===void 0)return p;try{return f.call(p)}catch(e){return e}},y.hasOwnEnumerableProperty=function(p,f){return Object.prototype.propertyIsEnumerable.call(p,f)},y.isSetSimpleEqual=function(p,f){for(const e of Set.prototype.values.call(p))if(!Set.prototype.has.call(f,e))return!1;return!0},y.isDeepEqualObj=function(p,f,e,n,a){const{isDeepEqual:r,valueOf:t,hasOwnEnumerableProperty:o}=y,{keys:s,getOwnPropertySymbols:i}=Object;if(p===l.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(p===l.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(p===l.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(p===l.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 h=s(f);if(!n.part&&h.length!==s(e).length&&!n.skip)return!1;let _=0;for(const v of h)if(n.skip&&n.skip.includes(v))e[v]===void 0&&++_;else if(!o(e,v)||!r(f[v],e[v],n,a))return!1;if(!n.part&&h.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(o(f,m)){if(!o(e,m)||!r(f[m],e[m],n,a))return!1}else if(o(e,m))return!1}c.delete(m)}for(const m of c)if(o(e,m))return!1}return!0},y.SeenEntry=class{constructor(p,f){this.obj=p,this.ref=f}isSame(p,f){return this.obj===p&&this.ref===f}}},7916:(k,x,b)=>{const l=b(8761);k.exports=class extends Error{constructor(y){super(y.filter(p=>p!=="").map(p=>typeof p=="string"?p:p instanceof Error?p.message:l(p)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,x.assert)}}},5277:k=>{const x={};k.exports=function(b){if(!b)return"";let l="";for(let y=0;y<b.length;++y){const p=b.charCodeAt(y);x.isSafe(p)?l+=b[y]:l+=x.escapeHtmlChar(p)}return l},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 l=32;l<123;++l)(l>=97||l>=65&&l<=90||l>=48&&l<=57||l===32||l===46||l===44||l===45||l===58||l===95)&&b.add(l);return b}()},6064:k=>{k.exports=function(x){return x.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:k=>{k.exports=function(){}},1687:(k,x,b)=>{const l=b(375),y=b(8571),p=b(7043),f={};k.exports=f.merge=function(e,n,a){if(l(e&&typeof e=="object","Invalid target value: must be an object"),l(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)){l(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=p.keys(n,a);for(let t=0;t<r.length;++t){const o=r[t];if(o==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,o))continue;const s=n[o];if(s&&typeof s=="object"){if(e[o]===s)continue;!e[o]||typeof e[o]!="object"||Array.isArray(e[o])!==Array.isArray(s)||s instanceof Date||s instanceof RegExp?e[o]=y(s,{symbols:a.symbols}):f.merge(e[o],s,a)}else(s!=null||a.nullOverride)&&(e[o]=s)}return e}},9621:(k,x,b)=>{const l=b(375),y={};k.exports=function(p,f,e){if(f===!1||f==null)return p;typeof(e=e||{})=="string"&&(e={separator:e});const n=Array.isArray(f);l(!n||!e.separator,"Separator option is not valid for array-based chain");const a=n?f:f.split(e.separator||".");let r=p;for(let t=0;t<a.length;++t){let o=a[t];const s=e.iterables&&y.iterables(r);if(Array.isArray(r)||s==="set"){const i=Number(o);Number.isInteger(i)&&(o=i<0?r.length+i:i)}if(!r||typeof r=="function"&&e.functions===!1||!s&&r[o]===void 0){l(!e.strict||t+1===a.length,"Missing segment",o,"in reach path ",f),l(typeof r=="object"||e.functions===!0||typeof r!="function","Invalid segment",o,"in reach path ",f),r=e.default;break}r=s?s==="set"?[...r][o]:r.get(o):r[o]}return r},y.iterables=function(p){return p instanceof Set?"set":p 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(l){if(Array.isArray(l))return x.array;if(l instanceof Date)return x.date;if(l instanceof RegExp)return x.regex;if(l instanceof Error)return x.error;const y=Object.prototype.toString.call(l);return b.typeMap.get(y)||x.generic}},7043:(k,x)=>{x.keys=function(b,l={}){return l.symbols!==!1?Reflect.ownKeys(b):Object.getOwnPropertyNames(b)}},3652:(k,x,b)=>{const l=b(375),y={};x.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(p,f){const e=[].concat((f=f||{}).before||[]),n=[].concat(f.after||[]),a=f.group||"?",r=f.sort||0;l(!e.includes(a),`Item cannot come before itself: ${a}`),l(!e.includes("?"),"Item cannot come before unassociated items"),l(!n.includes(a),`Item cannot come after itself: ${a}`),l(!n.includes("?"),"Item cannot come after unassociated items"),Array.isArray(p)||(p=[p]);for(const t of p){const o={seq:this._items.length,sort:r,before:e,after:n,group:a,node:t};this._items.push(o)}if(!f.manual){const t=this._sort();l(t,"item",a!=="?"?`added into group ${a}`:"","created a dependencies error")}return this.nodes}merge(p){Array.isArray(p)||(p=[p]);for(const e of p)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 l(f,"merge created a dependencies error"),this.nodes}sort(){const p=this._sort();return l(p,"sort created a dependencies error"),this.nodes}_sort(){const p={},f=Object.create(null),e=Object.create(null);for(const o of this._items){const s=o.seq,i=o.group;e[i]=e[i]||[],e[i].push(s),p[s]=o.before;for(const u of o.after)f[u]=f[u]||[],f[u].push(s)}for(const o in p){const s=[];for(const i in p[o]){const u=p[o][i];e[u]=e[u]||[],s.push(...e[u])}p[o]=s}for(const o in f)if(e[o])for(const s of e[o])p[s].push(...f[o]);const n={};for(const o in p){const s=p[o];for(const i of s)n[i]=n[i]||[],n[i].push(o)}const a={},r=[];for(let o=0;o<this._items.length;++o){let s=o;if(n[o]){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 h=0;h<u;++h)a[n[i][h]]&&++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 o of this._items)t[o.seq]=o;this._items=[],this.nodes=[];for(const o of r){const s=t[o];this.nodes.push(s.node),this._items.push(s)}return!0}},y.mergeSort=(p,f)=>p.sort===f.sort?0:p.sort<f.sort?-1:1},5380:(k,x,b)=>{const l=b(443),y=b(2178),p={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:l.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(p.nonAsciiRx.test(f)){if(e.allowUnicode===!1)return y.code("DOMAIN_INVALID_UNICODE_CHARS");f=f.normalize("NFC")}if(p.domainControlRx.test(f))return y.code("DOMAIN_INVALID_CHARS");f=p.punycode(f),e.allowFullyQualified&&f[f.length-1]==="."&&(f=f.slice(0,-1));const n=e.minDomainSegments||p.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 o=a[t];if(!o.length)return y.code("DOMAIN_EMPTY_SEGMENT");if(o.length>63)return y.code("DOMAIN_LONG_SEGMENT");if(t<a.length-1){if(!p.domainSegmentRx.test(o))return y.code("DOMAIN_INVALID_CHARS")}else if(!p.tldSegmentRx.test(o))return y.code("DOMAIN_INVALID_TLDS_CHARS")}return null},x.isValid=function(f,e){return!x.analyze(f,e)},p.punycode=function(f){f.includes("%")&&(f=f.replace(/%/g,"%25"));try{return new p.URL(`http://${f}`).host}catch{return f}}},1745:(k,x,b)=>{const l=b(9848),y=b(5380),p=b(2178),f={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(l.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 p.code("EMPTY_STRING");const a=!f.nonAsciiRx.test(e);if(!a){if(n.allowUnicode===!1)return p.code("FORBIDDEN_UNICODE");e=e.normalize("NFC")}const r=e.split("@");if(r.length!==2)return r.length>2?p.code("MULTIPLE_AT_CHAR"):p.code("MISSING_AT_CHAR");const[t,o]=r;if(!t)return p.code("EMPTY_LOCAL");if(!n.ignoreLength){if(e.length>254)return p.code("ADDRESS_TOO_LONG");if(f.encoder.encode(t).length>64)return p.code("LOCAL_TOO_LONG")}return f.local(t,a)||y.analyze(o,n)},f.local=function(e,n){const a=e.split(".");for(const r of a){if(!r.length)return p.code("EMPTY_LOCAL_SEGMENT");if(n){if(!f.atextRx.test(r))return p.code("INVALID_LOCAL_CHARS")}else for(const t of r){if(f.atextRx.test(t))continue;const o=f.binary(t);if(!f.atomRx.test(o))return p.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 l=b(375),y=b(5752);x.regex=function(p={}){l(p.cidr===void 0||typeof p.cidr=="string","options.cidr must be a string");const f=p.cidr?p.cidr.toLowerCase():"optional";l(["required","optional","forbidden"].includes(f),"options.cidr must be one of required, optional, forbidden"),l(p.version===void 0||typeof p.version=="string"||Array.isArray(p.version),"options.version must be a string or an array of string");let e=p.version||["ipv4","ipv6","ipvfuture"];Array.isArray(e)||(e=[e]),l(e.length>=1,"options.version must have at least 1 version specified");for(let r=0;r<e.length;++r)l(typeof e[r]=="string","options.version must only contain strings"),e[r]=e[r].toLowerCase(),l(["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 l=b(375),y=b(6064),p={generate:function(){const f={},e="\\dA-Fa-f",n="["+e+"]",a="\\w-\\.~",r="!\\$&'\\(\\)\\*\\+,;=",t="%"+e,o=a+t+r+":@",s="["+o+"]",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+")",h="(?:"+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="(?:"+h+"|"+_+"|"+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+":]*",A="["+a+t+r+"]{1,255}",E="(?:\\[(?:"+f.ipv6address+"|"+f.ipvFuture+")\\]|"+f.ipv4address+"|"+A+")",I="(?:"+S+"@)?"+E+"(?::\\d*)?",N="(?:"+S+"@)?("+E+")(?::\\d*)?",q=s+"*",M=s+"+",T="(?:\\/"+q+")*",z="\\/(?:"+M+T+")?",B=M+T,W="["+a+t+r+"@]+"+T,K="(?:\\/\\/\\/"+q+T+")";return f.hierPart="(?:(?:\\/\\/"+I+T+")|"+z+"|"+B+"|"+K+")",f.hierPartCapture="(?:(?:\\/\\/"+N+T+")|"+z+"|"+B+")",f.relativeRef="(?:(?:\\/\\/"+I+T+")|"+z+"|"+W+"|)",f.relativeRefCapture="(?:(?:\\/\\/"+N+T+")|"+z+"|"+W+"|)",f.query="["+o+"\\/\\?]*(?=#|$)",f.queryWithSquareBrackets="["+o+"\\[\\]\\/\\?]*(?=#|$)",f.fragment="["+o+"\\/\\?]*",f}};p.rfc3986=p.generate(),x.ip={v4Cidr:p.rfc3986.ipv4Cidr,v6Cidr:p.rfc3986.ipv6Cidr,ipv4:p.rfc3986.ipv4address,ipv6:p.rfc3986.ipv6address,ipvfuture:p.rfc3986.ipvFuture},p.createRegex=function(f){const e=p.rfc3986,n="(?:\\?"+(f.allowQuerySquareBrackets?e.queryWithSquareBrackets:e.query)+")?(?:#"+e.fragment+")?",a=f.domain?e.relativeRefCapture:e.relativeRef;if(f.relativeOnly)return p.wrap(a+n);let r="";if(f.scheme){l(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);l(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];l(d instanceof RegExp||typeof d=="string","scheme at position "+u+" must be a RegExp or String"),d instanceof RegExp?i.push(d.source.toString()):(l(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)+")",o=f.allowRelative?"(?:"+t+"|"+a+")":t;return p.wrap(o+n,r)},p.wrap=function(f,e){return{raw:f=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${f}`,regex:new RegExp(`^${f}$`),scheme:e}},p.uriRegex=p.createRegex({}),x.regex=function(f={}){return f.scheme||f.allowRelative||f.relativeOnly||f.allowQuerySquareBrackets||f.domain?p.createRegex(f):p.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(l,y={}){if(!y[b.settings]&&y.constants)for(const p in y.constants){const f=y.constants[p];if(f!==null&&!["boolean","number","string"].includes(typeof f))throw new Error(`Formula constant ${p} 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(l)}_parse(l){let y=[],p="",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||p||r){if(t&&t.type==="reference"&&r===")")return t.type="function",t.value=this._subFormula(p,t.value),void(p="");if(r===")"){const o=new x.Parser(p,this.settings);y.push({type:"segment",value:o})}else if(e){if(e==="]")return y.push({type:"reference",value:p}),void(p="");y.push({type:"literal",value:p})}else if(b.operatorCharacters.includes(p))t&&t.type==="operator"&&b.operators.includes(t.value+p)?t.value+=p:y.push({type:"operator",value:p});else if(p.match(b.numberRx))y.push({type:"constant",value:parseFloat(p)});else if(this.settings.constants[p]!==void 0)y.push({type:"constant",value:this.settings.constants[p]});else{if(!p.match(b.tokenRx))throw new Error(`Formula contains invalid token: ${p}`);y.push({type:"reference",value:p})}p=""}};for(const r of l)e?r===e?(n(),e=!1):p+=r:f?r==="("?(p+=r,++f):r===")"?(--f,f?p+=r:n(r)):p+=r:r in b.literals?e=b.literals[r]:r==="("?(n(),++f):b.operatorCharacters.includes(r)?(n(),p=r,n()):r!==" "?p+=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(l,y){const p=this.settings.functions[y];if(typeof p!="function")throw new Error(`Formula contains unknown function ${y}`);let f=[];if(l){let e="",n=0,a=!1;const r=()=>{if(!e)throw new Error(`Formula contains function ${y} with invalid arguments ${l}`);f.push(e),e=""};for(let t=0;t<l.length;++t){const o=l[t];a?(e+=o,o===a&&(a=!1)):o in b.literals&&!n?(e+=o,a=b.literals[o]):o!==","||n?(e+=o,o==="("?++n:o===")"&&--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 p.call(e,...n)}}evaluate(l){const y=this._parts.slice();for(let p=y.length-2;p>=0;--p){const f=y[p];if(f&&f.type==="operator"){const e=y[p+1];y.splice(p+1,1);const n=b.evaluate(e,l);y[p]=b.single(f.value,n)}}return b.operatorsOrder.forEach(p=>{for(let f=1;f<y.length-1;)if(p.includes(y[f])){const e=y[f],n=b.evaluate(y[f-1],l),a=b.evaluate(y[f+1],l);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],l)}},x.Parser.prototype[b.symbol]=!0,b.reference=function(l){return function(y){return y&&y[l]!==void 0?y[l]:null}},b.evaluate=function(l,y){return l===null?null:typeof l=="function"?l(y):l[b.symbol]?l.evaluate(y):l},b.single=function(l,y){if(l==="!")return!y;const p=-y;return p===0?0:p},b.calculate=function(l,y,p){if(l==="??")return b.exists(y)?y:p;if(typeof y=="string"||typeof p=="string"){if(l==="+")return(y=b.exists(y)?y:"")+(b.exists(p)?p:"")}else switch(l){case"^":return Math.pow(y,p);case"*":return y*p;case"/":return y/p;case"%":return y%p;case"+":return y+p;case"-":return y-p}switch(l){case"<":return y<p;case"<=":return y<=p;case">":return y>p;case">=":return y>=p;case"==":return y===p;case"!=":return y!==p;case"&&":return y&&p;case"||":return y||p}return null},b.exists=function(l){return l!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:k=>{k.exports=JSON.parse('{"version":"17.12.2"}')}},C={},function k(x){var b=C[x];if(b!==void 0)return b.exports;var l=C[x]={exports:{}};return P[x](l,l.exports,k),l.exports}(5107);var P,C})}(se)),se.exports}function Ge({disabled:D=!1,storeList:L=[],teamDid:P,onAdd:C=()=>{},scope:k="",hiddenChildren:x=!1,open:b=!1,onClose:l=()=>{}}){const{api:y}=ae(),[p,f]=U.useState(!1),[e,n]=U.useState(!0),[a,r]=U.useState(!1),[t,o]=U.useState(""),[s,i]=U.useState(""),{t:u}=Q(),d=async()=>{f(!0);try{const{decoded:_}=Le(t,L);await y.addBlockletStore({input:{teamDid:P,url:_,scope:k}}),C(_),r(!1),l()}catch(_){const v=`${u("store.blockletRegistry.addFailed")} ${J(_)}`;i(v)}finally{f(!1)}},h=()=>{r(!1),l()};return R.jsxs(R.Fragment,{children:[!x&&R.jsxs(be,{button:!0,disabled:D,sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1},onClick:()=>{r(!0)},children:[R.jsx(ve,{font:!0}),R.jsx(V,{variant:"inherit",children:u("store.blockletRegistry.addRegistry")})]}),R.jsxs(Te,{title:u("store.blockletRegistry.addRegistry"),fullWidth:!0,maxWidth:"md",open:b||a,onClose:h,PaperProps:{style:{minHeight:"auto"}},actions:R.jsxs(R.Fragment,{children:[R.jsx(ce,{onClick:_=>{_.stopPropagation(),h()},color:"inherit",children:u("common.cancel")}),R.jsxs(ce,{onClick:_=>{_.stopPropagation(),d()},color:"primary","data-cy":"install-blocklet-next-step",disabled:p||!t||e,variant:"contained",autoFocus:!0,children:[p&&R.jsx(Y,{size:16}),u("common.confirm")]})]}),children:[R.jsx("div",{style:{paddingTop:12,overflowY:"hidden"},children:R.jsx(_e,{component:"div",children:R.jsx(V,{component:"div",children:R.jsx(we,{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")),o(_.target.value),n(v)},disabled:p,onKeyPress:_=>{_.key==="Enter"&&(_.preventDefault(),_.target.value.trim()?d():i(u("store.blockletRegistry.registryUrlEmpty")))}})})})}),!!s&&R.jsx(xe,{severity:"error",style:{width:"100%"},children:s})]})]})}Ge.propTypes={teamDid:O.string.isRequired,disabled:O.bool,storeList:O.array,onAdd:O.func,scope:O.string,hiddenChildren:O.bool,open:O.bool,onClose:O.func};function ie({store:D,teamDid:L,onDelete:P=()=>{},children:C=null,projectId:k="",scope:x=""}){const{api:b}=ae(),{t:l}=Q(),y=Ne(),[p,f]=U.useState(!1),[e,n]=U.useState(null),a=$e(),r=()=>{f(!1),n(null)},t=async()=>{try{f(!0),await b.deleteBlockletStore({input:{teamDid:L,url:D.url,projectId:k,scope:x}}),await y?.actions?.refreshBlocklet(),P&&typeof P=="function"&&P()}catch(i){G.error(`Remove Blocklet Store Error: ${J(i)}`)}finally{f(!1),n(null)}},o={keyName:D.url,title:l("store.blockletRegistry.deleteRegistry"),description:l("store.blockletRegistry.deleteDesc",{name:`<b>${D.url}</b>`,color:a.palette.error.main}),confirmPlaceholder:l("store.blockletRegistry.confirmDesc",{name:D.url}),confirm:l("common.delConfirm"),cancel:l("common.cancel"),onConfirm:t,onCancel:r},s=i=>{D.protected||(i.stopPropagation(),n(o))};return R.jsxs(R.Fragment,{children:[C?R.jsx("span",{onClick:s,children:C}):R.jsx(H,{"data-cy":"store-action-delete",color:"primary",disabled:p,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:O.node,teamDid:O.string.isRequired,store:O.object.isRequired,onDelete:O.func,projectId:O.string,scope:O.string};const Ke=({store:D,userDid:L})=>{const P=window.blocklet?.tenantMode!==Pe.BLOCKLET_TENANT_MODES.MULTIPLE;return D.protected?!1:D.scope&&D.scope===L?!0:P?D.scope==="studio":!1};function ge({connectedStore:D,onDisconnect:L=()=>{},onDelete:P=()=>{},store:C,teamDid:k,projectId:x=""}){const[b,l]=U.useState(null),y=!!b,{t:p}=Q(),{session:f}=Ue(),[e,n]=U.useState(!1),a=i=>{i.stopPropagation(),window.open(X(`${ee(C.url,"search?menu=my-blocklets")}`,{allowDomains:null}))},r=i=>{l(i.currentTarget)},t=()=>{l(null)},o=()=>{n(!1),L()},s=[{label:p("common.visitStore"),action:a,icon:pe},{label:p("common.disconnect"),action:()=>{t(),n(!0)},icon:je,hidden:!D}];return R.jsxs(R.Fragment,{children:[R.jsx(H,{ref:b,color:"primary",onClick:r,size:"small",children:R.jsx(ke,{sx:{zoom:.95}})}),R.jsxs(Re,{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(F,{sx:{color:"action"},children:i.label})]},i.label)),Ke({store:C,userDid:f?.user?.did})&&R.jsx(ie,{store:C,onDelete:P,teamDid:k,projectId:x,scope:C.scope||"studio",children:R.jsxs(oe,{dense:!0,disabled:C.protected,children:[R.jsx(he,{sx:{color:C.protected?"action":"error.main",marginRight:1}}),R.jsx(F,{sx:{color:C.protected?"action":"error.main"},children:p("common.delete")})]})})]}),e&&R.jsx(Fe,{displayError:!0,title:`${p("common.disconnect")} ${C.name}`,description:p("blocklet.publish.disconnectStoreTip"),confirm:p("common.confirm"),onConfirm:o,onCancel:()=>n(!1)})]})}ge.propTypes={connectedStore:O.object.isRequired,onDisconnect:O.func,onDelete:O.func,store:O.object.isRequired,teamDid:O.string.isRequired,projectId:O.string};function ne({connectedStore:D,sx:L={},...P}){return R.jsx(Se,{sx:{width:24,height:24,...L},src:ee(D.storeUrl,qe.WELLKNOWN_SERVICE_PATH_PREFIX,`/user/avatar/${D.developerDid}?imageFilter=resize&w=120&h=120`),...P})}ne.propTypes={connectedStore:O.object.isRequired,sx:O.object};function ye({storeUrl:D,storeName:L,published:P,did:C="",version:k=""}){const{t:x}=Q(),b=()=>{window.open(X(`${ee(D,C&&k?`/blocklets/${C}/${k}`:"/search?menu=my-blocklets")}`,{allowDomains:null}))};return R.jsxs(F,{children:[R.jsx(V,{variant:"subtitle2",children:x(P?"blocklet.publish.publishToStoreSuccess":"blocklet.publish.uploadToStoreSuccess",{name:L})}),R.jsx(H,{size:"small",sx:{mt:1},onClick:b,variant:"contained",color:"success",children:x("common.visitTarget",{name:L})})]})}ye.propTypes={storeName:O.string.isRequired,storeUrl:O.string.isRequired,published:O.bool.isRequired,did:O.string,version:O.string};const de={CONNECT:"connect",SELECT:"select"},me=Oe(({className:D,...L})=>R.jsx(De,{...L,classes:{popper:D}}))(({theme:D})=>({[`& .${Ie.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 Ze({teamDid:D,projectId:L="",releaseId:P="",store:C,warningList:k=[],onDelete:x=()=>{},kind:b="store",published:l=!1,connectedStore:y=null,releaseType:p="",onPublish:f=()=>{},onOpenConnectStore:e=()=>{},onSelectConnectStore:n=()=>{},behavior:a=de.CONNECT,scope:r="",version:t=""}){const{t:o}=Q(),{api:s,info:i,inService:u}=ae(),[d,h]=U.useState(!1),_=We({messageType:"connect-store-message",onOpen:()=>h(!0),onClose:()=>h(!1)}),v=b==="publish",c=!!y,m=E=>{if(E.stopPropagation(),v){window.open(X(ee(C.url,"developer/blocklets"),{allowDomains:null}));return}window.open(X(C.url,{allowDomains:null}))},g=()=>{if(a===de.SELECT){n(C);return}_(async(E,I)=>{try{const N=await s.connectToStore({input:{did:D,storeUrl:C.url,storeId:C.id,storeName:C.name,projectId:L}});if(!N?.url){G.error("failed to connect to store");return}I(N.url),await e({did:D,projectId:L,storeId:C.id}),h(!1)}catch(N){const q=J(N);G.error(q),h(!1)}})},w=async()=>{try{await s.disconnectFromStore({input:{did:D,storeId:C.id,projectId:L,storeScope:r}}),x()}catch(E){G.error(J(E))}},$=()=>{h(!0),s.publishToStore({input:{did:D,storeId:C.id,storeName:C.name,projectId:L,releaseId:P,type:p}}).then(E=>{G.success(R.jsx(ye,{storeName:y.storeName,storeUrl:y.storeUrl,did:L,version:t,published:E.url==="published"}),{duration:1e4}),f?.(null)}).catch(E=>{G.error(J(E)),f?.(E)}).finally(()=>{h(!1)})};U.useEffect(()=>{c&&h(!1)},[c]);const j=U.useMemo(()=>!(u&&He.isInServerlessMode(i)),[u,i]),S=k.length>0,A=R.jsxs(H,{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}}),o("common.upload")]});return R.jsxs(F,{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(F,{sx:{flexShrink:1,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},children:[R.jsx(F,{sx:{display:"flex",flexDirection:"row"},children:R.jsx(V,{component:"span",sx:{fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},variant:"subtitle1",children:C.name})}),R.jsx(V,{sx:{fontSize:14,opacity:.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},component:"span",variant:"inherit",children:`${C.url}`})]}),R.jsxs(F,{sx:{flex:1,display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center"},children:[y&&R.jsx(me,{placement:"top",title:R.jsxs(F,{children:[R.jsx(V,{component:"span",variant:"caption",sx:{opacity:.7},children:o("blocklet.publish.developerInfo")}),R.jsxs(F,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:1,mt:1},children:[R.jsx(ne,{connectedStore:y,sx:{width:42,height:42}}),R.jsxs(F,{sx:{flex:1},children:[R.jsx(V,{component:"span",variant:"subtitle1",children:y.developerName}),R.jsx(Be,{size:14,copyable:!0,compact:!0,responsive:!1,did:y.developerDid})]})]})]}),children:R.jsx(F,{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(H,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:g,children:[d?R.jsx(Y,{sx:{marginRight:1},size:16}):R.jsx(Ee,{sx:{marginRight:1}}),o("common.connect")]}),c&&l&&R.jsxs(H,{disabled:!0,sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},children:[d?R.jsx(Y,{sx:{marginRight:1},size:16}):R.jsx(Ce,{sx:{marginRight:1}}),o("common.uploaded")]}),c&&!l&&(S?R.jsx(me,{title:R.jsxs(F,{children:[R.jsx(F,{sx:{color:"error.main",mb:.5},children:o("blocklet.publish.storeRule.warning")}),k.map((E,I)=>R.jsxs(F,{sx:{color:"error.main"},children:[I+1,". ",E]},E))]}),children:R.jsx("div",{children:A})}):A),R.jsx(ge,{projectId:L,connectedStore:y,store:C,onDelete:x,teamDid:D,onDisconnect:w})]}),!v&&R.jsxs(le,{disabled:d,variant:"outlined",sx:{height:36},size:"small",children:[R.jsx(H,{"data-cy":"store-open-url",onClick:m,children:R.jsx(pe,{sx:{zoom:.9}})}),!C.protected&&j&&R.jsx(ie,{store:C,onDelete:x,teamDid:D,scope:""})]})]})]})}Ze.propTypes={kind:O.string,teamDid:O.string.isRequired,published:O.bool,connectedStore:O.shape({storeName:O.string,storeId:O.string,storeUrl:O.string,developerDid:O.string,developerName:O.string}),warningList:O.array,projectId:O.string,releaseId:O.string,releaseType:O.string,store:O.shape({id:O.string.isRequired,name:O.string.isRequired,url:O.string.isRequired,protected:O.bool,connected:O.bool}).isRequired,scope:O.string,onDelete:O.func,onPublish:O.func,onOpenConnectStore:O.func,behavior:O.string,onSelectConnectStore:O.func,version:O.string};export{Ge as A,Ze as S,ye as U,Ke as c,lt as r,He as s};
|