@abtnode/webapp 1.16.32 → 1.16.33-beta-20240929-110332-9d5dfdc4

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.
Files changed (176) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{Add-CB2L2sL-.js → Add-CRZR4bX5.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-Bpq0E920.js → ArrowDropDown--6MZSfCt.js} +1 -1
  5. package/dist/assets/{Autocomplete-BonIMaQ2.js → Autocomplete-CUm7n3Sa.js} +1 -1
  6. package/dist/assets/{Breadcrumbs-Z1nxSr6G.js → Breadcrumbs-D2LauGD0.js} +1 -1
  7. package/dist/assets/{ButtonGroup-DZIItDb3.js → ButtonGroup-DMXznY2w.js} +1 -1
  8. package/dist/assets/{CheckCircle-CXzldct8.js → CheckCircle-UBG0pOaM.js} +1 -1
  9. package/dist/assets/{ChevronLeft-CrJouffe.js → ChevronLeft-DLtgiEL_.js} +1 -1
  10. package/dist/assets/{ChevronRight-5tSyQt71.js → ChevronRight-pL5ZQFHq.js} +1 -1
  11. package/dist/assets/{Close-CwOxulFS.js → Close-CtCrIN1B.js} +1 -1
  12. package/dist/assets/{Delete-BE0csXPq.js → Delete-C7vVMzly.js} +1 -1
  13. package/dist/assets/{DeleteOutline-Dg-TINl8.js → DeleteOutline-BldQWNdY.js} +1 -1
  14. package/dist/assets/{Done-CcsM9Auu.js → Done-DS7y1nKF.js} +1 -1
  15. package/dist/assets/{Edit-C-Tzo0bI.js → Edit-Bks60T5m.js} +1 -1
  16. package/dist/assets/{EditIcon-_NT3YyXh.js → EditIcon-egXPl_DG.js} +1 -1
  17. package/dist/assets/{ExpandMore-CvxKGLQy.js → ExpandMore-C6vlfMJu.js} +1 -1
  18. package/dist/assets/{Google-CVUrsbvT.js → Google-BmBiG1IH.js} +1 -1
  19. package/dist/assets/{Https-BDZqiRrb.js → Https-amDFANjH.js} +1 -1
  20. package/dist/assets/{InputAdornment-Dcsh90CR.js → InputAdornment-DHnIUjFY.js} +1 -1
  21. package/dist/assets/{InputLabel-DAmmae9z.js → InputLabel-4eTKSVNg.js} +1 -1
  22. package/dist/assets/{LastPage-ji2jWjST.js → LastPage-CTEmK6FD.js} +1 -1
  23. package/dist/assets/{Launch-DeaKCTYt.js → Launch-DifVggHQ.js} +1 -1
  24. package/dist/assets/{Link-Dnnkg_NI.js → Link-LpM2MnjJ.js} +1 -1
  25. package/dist/assets/{LoadingButton-DUghcL7H.js → LoadingButton-Zh8SmmHy.js} +1 -1
  26. package/dist/assets/{LockIcon-DM8eqE59.js → LockIcon-B2PyLh8R.js} +1 -1
  27. package/dist/assets/{Loop-DoBxe_Cc.js → Loop-CWyQ_F_S.js} +1 -1
  28. package/dist/assets/{MoreHoriz-BBV733uH.js → MoreHoriz-FtqM_9u2.js} +1 -1
  29. package/dist/assets/{MoreVert-CWVrD7LH.js → MoreVert-IrJ7bQpL.js} +1 -1
  30. package/dist/assets/{Pagination-lMXgCulM.js → Pagination-DpJSq8ss.js} +1 -1
  31. package/dist/assets/{Public-sGiiQ7Yu.js → Public-B5e9sj0X.js} +1 -1
  32. package/dist/assets/{SchemaReference.es-kOOs5Qi8.js → SchemaReference.es-BuCq9OQD.js} +1 -1
  33. package/dist/assets/{Search-BWnmViUi.js → Search-B0tH7ryo.js} +1 -1
  34. package/dist/assets/{Select-CFzOstvQ.js → Select-CMlwWvWv.js} +1 -1
  35. package/dist/assets/{Skeleton-DFK43YOd.js → Skeleton-BOsi2m2Q.js} +1 -1
  36. package/dist/assets/{Slider-BcZrNLOl.js → Slider-C27uSEH-.js} +1 -1
  37. package/dist/assets/{Stepper-CsEu9x56.js → Stepper-Cu0eDjuV.js} +1 -1
  38. package/dist/assets/{TextField-BO2jWpew.js → TextField-DK3K08OA.js} +1 -1
  39. package/dist/assets/{ToggleButtonGroup-BdagVbn1.js → ToggleButtonGroup-DWbKiZ9y.js} +1 -1
  40. package/dist/assets/{ViewColumn-Cvv_-QYK.js → ViewColumn-BEWOTOi0.js} +1 -1
  41. package/dist/assets/{ViewList-C7A0gOrA.js → ViewList-CX6UZRRj.js} +1 -1
  42. package/dist/assets/{actions-DrmV5bIH.js → actions-Det87klV.js} +1 -1
  43. package/dist/assets/{actions-CCyx5aPV.js → actions-Rh1Tp50Q.js} +1 -1
  44. package/dist/assets/{agreement-BQ9_B1W5.js → agreement-1UHeoMC6.js} +1 -1
  45. package/dist/assets/api-BQN3kDhq.js +1 -0
  46. package/dist/assets/{app-avatar-BcpE_HNj.js → app-avatar-DpOI7r1W.js} +1 -1
  47. package/dist/assets/{audit-logs-qgvz7vlE.js → audit-logs-CitwuuVd.js} +1 -1
  48. package/dist/assets/blocklet-CT5shtGA.js +1 -0
  49. package/dist/assets/{brace-fold.es-CVWwiCs7.js → brace-fold.es-CvoYB4SN.js} +1 -1
  50. package/dist/assets/{bundle-avatar-qo0f4yZT.js → bundle-avatar-BxTGln1B.js} +1 -1
  51. package/dist/assets/{chart-BYPtFfqR.js → chart-DmMqdJ0f.js} +1 -1
  52. package/dist/assets/{click-to-copy-DUkGKgeB.js → click-to-copy-CEzUjP3M.js} +1 -1
  53. package/dist/assets/{closebrackets.es-ClAYobc3.js → closebrackets.es-CK-KE8iR.js} +1 -1
  54. package/dist/assets/{codemirror.es-Cgty7XCS.js → codemirror.es-D-koN6N4.js} +1 -1
  55. package/dist/assets/{comment.es-DTzzUxwn.js → comment.es-lmFm6b1p.js} +1 -1
  56. package/dist/assets/{config-navigation-BvhbGeNs.js → config-navigation-CBOGkAuW.js} +1 -1
  57. package/dist/assets/{delete-confirm-Ch0vJE1L.js → delete-confirm-CDV7DhQV.js} +1 -1
  58. package/dist/assets/{detail-BMM7IAsD.js → detail-B2PRyC9V.js} +3 -3
  59. package/dist/assets/{dialog.es-CJst29HQ.js → dialog.es-BPKWQpdb.js} +1 -1
  60. package/dist/assets/{download-Vm4qvodQ.js → download-j0SQxA4X.js} +1 -1
  61. package/dist/assets/emotion-react.browser.esm-CLzZAasz.js +1 -0
  62. package/dist/assets/{foldgutter.es-DF6cqbv8.js → foldgutter.es-C_WIU6_4.js} +1 -1
  63. package/dist/assets/getValidReactChildren-DkClejXY.js +1 -0
  64. package/dist/assets/{hint.es-DM_I1fPv.js → hint.es-BvaQl77a.js} +1 -1
  65. package/dist/assets/{hint.es2-BSaXngMf.js → hint.es2-CDqk-nz5.js} +1 -1
  66. package/dist/assets/{iframe-DuMjian8.js → iframe-DSQZykc4.js} +1 -1
  67. package/dist/assets/{index-BXQChK8V.js → index--XPg2YYm.js} +5 -5
  68. package/dist/assets/{index-BjO4y8Vw.js → index-2SLlSefq.js} +1 -1
  69. package/dist/assets/{index-CuDRdvrz.js → index-B184AGMI.js} +1 -1
  70. package/dist/assets/{index-B57DW08o.js → index-B5HP-9PI.js} +1 -1
  71. package/dist/assets/{index-CQ-XaCjH.js → index-BDPWx-wa.js} +1 -1
  72. package/dist/assets/{index-R9SUmgyb.js → index-BH1C1G_h.js} +1 -1
  73. package/dist/assets/{index-wJZLGXqZ.js → index-BJ6Jm694.js} +36 -36
  74. package/dist/assets/{index-XrLhNu6d.js → index-BMKM_jE2.js} +1 -1
  75. package/dist/assets/{index-uUNWjz1O.js → index-BdYK2RQC.js} +1 -1
  76. package/dist/assets/{index-C1pbztXg.js → index-C2aDp3No.js} +1 -1
  77. package/dist/assets/{index-DcowBSay.js → index-C8nfjsyh.js} +1 -1
  78. package/dist/assets/{index-BLvfDDKk.js → index-CAAjSffx.js} +1 -1
  79. package/dist/assets/{index-BL_g3ErN.js → index-CAIwz2b6.js} +1 -1
  80. package/dist/assets/{index-D5UydYEu.js → index-CBcCdXfP.js} +3 -3
  81. package/dist/assets/{index-CCFySrKK.js → index-CQDMFcqs.js} +1 -1
  82. package/dist/assets/{index-CTBOH5kN.js → index-CWSeWUSD.js} +1 -1
  83. package/dist/assets/{index-CJDvDp1m.js → index-CeSruu29.js} +1 -1
  84. package/dist/assets/{index-l8JmwUf-.js → index-CgkeYMpr.js} +2 -2
  85. package/dist/assets/{index-CahBrOEI.js → index-CmdVCQLH.js} +1 -1
  86. package/dist/assets/{index-BOdf0Q0k.js → index-CoJHusFe.js} +1 -1
  87. package/dist/assets/{index-CYiRPgdq.js → index-CteXbyL6.js} +1 -1
  88. package/dist/assets/{index-BWB3TfYU.js → index-DC4MyoyW.js} +1 -1
  89. package/dist/assets/{index-D4uRHA7v.js → index-DEvdGU3J.js} +1 -1
  90. package/dist/assets/{index-BtoL4DP9.js → index-DF23FdoF.js} +1 -1
  91. package/dist/assets/{index-CSRdUkJE.js → index-DG8NgAHM.js} +1 -1
  92. package/dist/assets/{index-XNXqqYJx.js → index-DHXmp5yw.js} +1 -1
  93. package/dist/assets/{index-Cs8SMpVj.js → index-DQxaH-mm.js} +1 -1
  94. package/dist/assets/{index-CNLM-RUp.js → index-DUYvLar2.js} +1 -1
  95. package/dist/assets/{index-CHoASBhl.js → index-DV4snYmf.js} +1 -1
  96. package/dist/assets/{index-JEewz8UI.js → index-DbI6AlvN.js} +1 -1
  97. package/dist/assets/{index-BCrsYkZC.js → index-Dk3V5hb2.js} +3 -3
  98. package/dist/assets/{index-DldciO5g.js → index-DnI-kmHc.js} +1 -1
  99. package/dist/assets/{index-o8-rCCV1.js → index-DoUAUOij.js} +1 -1
  100. package/dist/assets/{index-CF0ZAXuD.js → index-Dw70g88t.js} +1 -1
  101. package/dist/assets/{index-wnrVlUlT.js → index-DxRday-P.js} +1 -1
  102. package/dist/assets/{index-BDYm2nD1.js → index-GhYZgAhH.js} +1 -1
  103. package/dist/assets/{index-nwFymCUq.js → index-LJaro26P.js} +1 -1
  104. package/dist/assets/{index-CUKBe-qq.js → index-P-2-en4Y.js} +1 -1
  105. package/dist/assets/{index-GDUzrkkg.js → index-RfXHKRF6.js} +1 -1
  106. package/dist/assets/{index-CSfse0af.js → index-S1rqhUFW.js} +1 -1
  107. package/dist/assets/{index-D2nJYERe.js → index-UrVSQKLF.js} +1 -1
  108. package/dist/assets/{index-QmvibVMI.js → index-aaMEokmr.js} +1 -1
  109. package/dist/assets/{index-BTbuPH0A.js → index-ltNshsO4.js} +1 -1
  110. package/dist/assets/{index-C06EuFM6.js → index-rF89w_lk.js} +1 -1
  111. package/dist/assets/{index.es-B_K3Eyk0.js → index.es-XmKo3bhK.js} +1 -1
  112. package/dist/assets/{index.esm-CdMqW05p.js → index.esm-D4QroZOS.js} +1 -1
  113. package/dist/assets/{info-addon.es-CBhWXLgG.js → info-addon.es-DRQrvg6L.js} +1 -1
  114. package/dist/assets/{info.es-Cu6fY7Sc.js → info.es-C5Z7RfgK.js} +1 -1
  115. package/dist/assets/{install-from-url-DQ6xiXKP.js → install-from-url-BHia77sc.js} +1 -1
  116. package/dist/assets/{invitation-D8aRELU8.js → invitation-D0aG477b.js} +1 -1
  117. package/dist/assets/{is-path-prefix-equal-BtqBphDC.js → is-path-prefix-equal-CGm-cv-l.js} +1 -1
  118. package/dist/assets/{isEqual-BVsItZtD.js → isEqual-BVPWy522.js} +1 -1
  119. package/dist/assets/{item-D8Bt0OeM.js → item-BiqSAHcK.js} +1 -1
  120. package/dist/assets/{javascript.es-BprbVDo-.js → javascript.es-BkKWsAGl.js} +1 -1
  121. package/dist/assets/{jump-to-line.es-CCxPiTh0.js → jump-to-line.es-DGN3569o.js} +1 -1
  122. package/dist/assets/{jump.es-sTCdKKp3.js → jump.es-DanpHAp-.js} +1 -1
  123. package/dist/assets/{line-BuP4QAia.js → line-aMRW14F6.js} +3 -3
  124. package/dist/assets/{lint.es-Cpu-fG6q.js → lint.es-CaNTuHBv.js} +1 -1
  125. package/dist/assets/{lint.es2-CmlWPcXH.js → lint.es2-DmA5vWO4.js} +1 -1
  126. package/dist/assets/{lint.es3-BjdjiHoL.js → lint.es3-B73jPA60.js} +1 -1
  127. package/dist/assets/{list-header-wQmtoBDp.js → list-header-D4VYFwqp.js} +1 -1
  128. package/dist/assets/{log-Qnn8AFqt.js → log--VQMyqcN.js} +1 -1
  129. package/dist/assets/{lottie-yuksXKVz.js → lottie-C9Ng4YsX.js} +1 -1
  130. package/dist/assets/{matchbrackets.es-ysvkXja2.js → matchbrackets.es-D41SzE9y.js} +1 -1
  131. package/dist/assets/{memory-WCZvyMUX.js → memory-C3GYBjCW.js} +1 -1
  132. package/dist/assets/{mode.es-rjyY0xcR.js → mode.es-C_q7eumu.js} +1 -1
  133. package/dist/assets/{mode.es2-Co_WfTE8.js → mode.es2-HN1GIUFg.js} +1 -1
  134. package/dist/assets/{mode.es3-DNGhjg0j.js → mode.es3-DQ3bxO5t.js} +1 -1
  135. package/dist/assets/{onlineParser.es-BXELZVTM.js → onlineParser.es-Cw0hvv-u.js} +1 -1
  136. package/dist/assets/{overview-i3FUwE5h.js → overview-B0e5SPby.js} +1 -1
  137. package/dist/assets/react-CzW0by2s.js +57 -0
  138. package/dist/assets/{redux-BuYX34jA.js → redux-4h4AHDP6.js} +1 -1
  139. package/dist/assets/{resource-dialog-3c1UyW1s.js → resource-dialog-D_tBe0mW.js} +1 -1
  140. package/dist/assets/{runtime-xLjJNOE7.js → runtime-C6_ZQwcN.js} +1 -1
  141. package/dist/assets/schema-C0pA468N.js +28 -0
  142. package/dist/assets/sdk-CxCgr6ir.js +1 -0
  143. package/dist/assets/{search.es-BxUxy0lW.js → search.es-BZsTjuT_.js} +1 -1
  144. package/dist/assets/{searchcursor.es-By1BDlIF.js → searchcursor.es-Chmxf0xj.js} +1 -1
  145. package/dist/assets/{service-DkJEqWDb.js → service-BLiU-pVV.js} +1 -1
  146. package/dist/assets/{shorten-label-EWN6NVvw.js → shorten-label-CXmZjupc.js} +1 -1
  147. package/dist/assets/{show-hint.es-gDY_-CDQ.js → show-hint.es-CGT_Qx42.js} +1 -1
  148. package/dist/assets/{slicedToArray-XSSowPV7.js → slicedToArray-DclZJpyg.js} +1 -1
  149. package/dist/assets/{spaces-oMc0NEua.js → spaces-pipRS7s6.js} +1 -1
  150. package/dist/assets/{status-Bj8zl4kU.js → status-CJT783sb.js} +1 -1
  151. package/dist/assets/{sublime.es-escBgbqJ.js → sublime.es-iXNvIVcI.js} +1 -1
  152. package/dist/assets/{switch-control-Dew0klCb.js → switch-control-DmnLCHEO.js} +1 -1
  153. package/dist/assets/{table-icons-Su4yR3nx.js → table-icons-D5UMHWY0.js} +1 -1
  154. package/dist/assets/{team-CfoGzLW9.js → team-BVs6ckiW.js} +1 -1
  155. package/dist/assets/{toUpper-BOGzHK70.js → toUpper-DXVKB5Oh.js} +1 -1
  156. package/dist/assets/{traffic-DBV2-OB_.js → traffic-3HYGqq8f.js} +1 -1
  157. package/dist/assets/{uniqBy-CJ5LQBc-.js → uniqBy-CfsoIjm1.js} +1 -1
  158. package/dist/assets/{url-evaluation-BG_xAyS8.js → url-evaluation-Z5NNnBu4.js} +1 -1
  159. package/dist/assets/{url-join-CqFUIPYk.js → url-join-C7LHTbeC.js} +1 -1
  160. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-B64YcpxE.js → use-blocklet-info-for-connect-did-spaces-CTsZ1xjU.js} +1 -1
  161. package/dist/assets/{useLocalStorage-kAd4C-2D.js → useLocalStorage-DXF-RvPL.js} +1 -1
  162. package/dist/assets/{useThemeProps-Do78fEwu.js → useThemeProps-DhfTpvcT.js} +1 -1
  163. package/dist/assets/{util-DQnjhVzE.js → util-BXjpgrZY.js} +1 -1
  164. package/dist/assets/{wait-container-DSW-rZBp.js → wait-container-D4eUCqr6.js} +1 -1
  165. package/dist/assets/{withStyles-BEI5dkcl.js → withStyles-JJvy7uab.js} +1 -1
  166. package/dist/assets/{wrap-locale-D9Wtp7qF.js → wrap-locale-BxJB7Paj.js} +1 -1
  167. package/dist/index.html +1 -1
  168. package/dist/service-worker.js +1 -1
  169. package/package.json +1 -1
  170. package/dist/assets/api-DCnUTI6x.js +0 -1
  171. package/dist/assets/blocklet-BCKtVKyi.js +0 -1
  172. package/dist/assets/emotion-react.browser.esm-CWOQgzgx.js +0 -1
  173. package/dist/assets/getValidReactChildren-p_ANLoqZ.js +0 -1
  174. package/dist/assets/react-DSI7zniR.js +0 -57
  175. package/dist/assets/schema-Cs5ViWOn.js +0 -28
  176. package/dist/assets/sdk-fHFET9-i.js +0 -1
@@ -0,0 +1,28 @@
1
+ import{eT as Wt,cJ as Ht,eB as Kt,eF as Xt,eC as Yt,cO as ie,eU as Zt,H as Jt,b as Qt}from"./index-BJ6Jm694.js";import{l as Re}from"./index-ltNshsO4.js";import{p as er}from"./index-DxRday-P.js";var M={},tr=null,Qe=tr,et={exports:{}};(function(R,$){(function(T,N){R.exports=N()})(self,()=>{return T={7629:(A,S,v)=>{const o=v(375),g=v(8571),d=v(9474),u=v(1687),e=v(8652),i=v(8160),s=v(3292),r=v(6354),t=v(8901),l=v(9708),n=v(6914),a=v(2294),f=v(6133),m=v(1152),p=v(8863),E=v(2036),w={Base:class{constructor(c){this.type=c,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new a.Ids,this._preferences=null,this._refs=new f.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return o(typeof l.describe=="function","Manifest functionality disabled"),l.describe(this)}allow(...c){return i.verifyFlat(c,"allow"),this._values(c,"_valids")}alter(c){o(c&&typeof c=="object"&&!Array.isArray(c),"Invalid targets argument"),o(!this._inRuleset(),"Cannot set alterations inside a ruleset");const h=this.clone();h.$_terms.alterations=h.$_terms.alterations||[];for(const y in c){const O=c[y];o(typeof O=="function","Alteration adjuster for",y,"must be a function"),h.$_terms.alterations.push({target:y,adjuster:O})}return h.$_temp.ruleset=!1,h}artifact(c){return o(c!==void 0,"Artifact cannot be undefined"),o(!this._cache,"Cannot set an artifact with a rule cache"),this.$_setFlag("artifact",c)}cast(c){return o(c===!1||typeof c=="string","Invalid to value"),o(c===!1||this._definition.cast[c],"Type",this.type,"does not support casting to",c),this.$_setFlag("cast",c===!1?void 0:c)}default(c,h){return this._default("default",c,h)}description(c){return o(c&&typeof c=="string","Description must be a non-empty string"),this.$_setFlag("description",c)}empty(c){const h=this.clone();return c!==void 0&&(c=h.$_compile(c,{override:!1})),h.$_setFlag("empty",c,{clone:!1})}error(c){return o(c,"Missing error"),o(c instanceof Error||typeof c=="function","Must provide a valid Error object or a function"),this.$_setFlag("error",c)}example(c,h={}){return o(c!==void 0,"Missing example"),i.assertOptions(h,["override"]),this._inner("examples",c,{single:!0,override:h.override})}external(c,h){return typeof c=="object"&&(o(!h,"Cannot combine options with description"),h=c.description,c=c.method),o(typeof c=="function","Method must be a function"),o(h===void 0||h&&typeof h=="string","Description must be a non-empty string"),this._inner("externals",{method:c,description:h},{single:!0})}failover(c,h){return this._default("failover",c,h)}forbidden(){return this.presence("forbidden")}id(c){return c?(o(typeof c=="string","id must be a non-empty string"),o(/^[^\.]+$/.test(c),"id cannot contain period character"),this.$_setFlag("id",c)):this.$_setFlag("id",void 0)}invalid(...c){return this._values(c,"_invalids")}label(c){return o(c&&typeof c=="string","Label name must be a non-empty string"),this.$_setFlag("label",c)}meta(c){return o(c!==void 0,"Meta cannot be undefined"),this._inner("metas",c,{single:!0})}note(...c){o(c.length,"Missing notes");for(const h of c)o(h&&typeof h=="string","Notes must be non-empty strings");return this._inner("notes",c)}only(c=!0){return o(typeof c=="boolean","Invalid mode:",c),this.$_setFlag("only",c)}optional(){return this.presence("optional")}prefs(c){o(c,"Missing preferences"),o(c.context===void 0,"Cannot override context"),o(c.externals===void 0,"Cannot override externals"),o(c.warnings===void 0,"Cannot override warnings"),o(c.debug===void 0,"Cannot override debug"),i.checkPreferences(c);const h=this.clone();return h._preferences=i.preferences(h._preferences,c),h}presence(c){return o(["optional","required","forbidden"].includes(c),"Unknown presence mode",c),this.$_setFlag("presence",c)}raw(c=!0){return this.$_setFlag("result",c?"raw":void 0)}result(c){return o(["raw","strip"].includes(c),"Unknown result mode",c),this.$_setFlag("result",c)}required(){return this.presence("required")}strict(c){const h=this.clone(),y=c!==void 0&&!c;return h._preferences=i.preferences(h._preferences,{convert:y}),h}strip(c=!0){return this.$_setFlag("result",c?"strip":void 0)}tag(...c){o(c.length,"Missing tags");for(const h of c)o(h&&typeof h=="string","Tags must be non-empty strings");return this._inner("tags",c)}unit(c){return o(c&&typeof c=="string","Unit name must be a non-empty string"),this.$_setFlag("unit",c)}valid(...c){i.verifyFlat(c,"valid");const h=this.allow(...c);return h.$_setFlag("only",!!h._valids,{clone:!1}),h}when(c,h){const y=this.clone();y.$_terms.whens||(y.$_terms.whens=[]);const O=s.when(y,c,h);if(!["any","link"].includes(y.type)){const k=O.is?[O]:O.switch;for(const L of k)o(!L.then||L.then.type==="any"||L.then.type===y.type,"Cannot combine",y.type,"with",L.then&&L.then.type),o(!L.otherwise||L.otherwise.type==="any"||L.otherwise.type===y.type,"Cannot combine",y.type,"with",L.otherwise&&L.otherwise.type)}return y.$_terms.whens.push(O),y.$_mutateRebuild()}cache(c){o(!this._inRuleset(),"Cannot set caching inside a ruleset"),o(!this._cache,"Cannot override schema cache"),o(this._flags.artifact===void 0,"Cannot cache a rule with an artifact");const h=this.clone();return h._cache=c||e.provider.provision(),h.$_temp.ruleset=!1,h}clone(){const c=Object.create(Object.getPrototypeOf(this));return this._assign(c)}concat(c){o(i.isSchema(c),"Invalid schema object"),o(this.type==="any"||c.type==="any"||c.type===this.type,"Cannot merge type",this.type,"with another type:",c.type),o(!this._inRuleset(),"Cannot concatenate onto a schema with open ruleset"),o(!c._inRuleset(),"Cannot concatenate a schema with open ruleset");let h=this.clone();if(this.type==="any"&&c.type!=="any"){const y=c.clone();for(const O of Object.keys(h))O!=="type"&&(y[O]=h[O]);h=y}h._ids.concat(c._ids),h._refs.register(c,f.toSibling),h._preferences=h._preferences?i.preferences(h._preferences,c._preferences):c._preferences,h._valids=E.merge(h._valids,c._valids,c._invalids),h._invalids=E.merge(h._invalids,c._invalids,c._valids);for(const y of c._singleRules.keys())h._singleRules.has(y)&&(h._rules=h._rules.filter(O=>O.keep||O.name!==y),h._singleRules.delete(y));for(const y of c._rules)c._definition.rules[y.method].multi||h._singleRules.set(y.name,y),h._rules.push(y);if(h._flags.empty&&c._flags.empty){h._flags.empty=h._flags.empty.concat(c._flags.empty);const y=Object.assign({},c._flags);delete y.empty,u(h._flags,y)}else if(c._flags.empty){h._flags.empty=c._flags.empty;const y=Object.assign({},c._flags);delete y.empty,u(h._flags,y)}else u(h._flags,c._flags);for(const y in c.$_terms){const O=c.$_terms[y];O?h.$_terms[y]?h.$_terms[y]=h.$_terms[y].concat(O):h.$_terms[y]=O.slice():h.$_terms[y]||(h.$_terms[y]=O)}return this.$_root._tracer&&this.$_root._tracer._combine(h,[this,c]),h.$_mutateRebuild()}extend(c){return o(!c.base,"Cannot extend type with another base"),t.type(this,c)}extract(c){return c=Array.isArray(c)?c:c.split("."),this._ids.reach(c)}fork(c,h){o(!this._inRuleset(),"Cannot fork inside a ruleset");let y=this;for(let O of[].concat(c))O=Array.isArray(O)?O:O.split("."),y=y._ids.fork(O,h,y);return y.$_temp.ruleset=!1,y}rule(c){const h=this._definition;i.assertOptions(c,Object.keys(h.modifiers)),o(this.$_temp.ruleset!==!1,"Cannot apply rules to empty ruleset or the last rule added does not support rule properties");const y=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;o(y>=0&&y<this._rules.length,"Cannot apply rules to empty ruleset");const O=this.clone();for(let k=y;k<O._rules.length;++k){const L=O._rules[k],D=g(L);for(const q in c)h.modifiers[q](D,c[q]),o(D.name===L.name,"Cannot change rule name");O._rules[k]=D,O._singleRules.get(D.name)===L&&O._singleRules.set(D.name,D)}return O.$_temp.ruleset=!1,O.$_mutateRebuild()}get ruleset(){o(!this._inRuleset(),"Cannot start a new ruleset without closing the previous one");const c=this.clone();return c.$_temp.ruleset=c._rules.length,c}get $(){return this.ruleset}tailor(c){c=[].concat(c),o(!this._inRuleset(),"Cannot tailor inside a ruleset");let h=this;if(this.$_terms.alterations)for(const{target:y,adjuster:O}of this.$_terms.alterations)c.includes(y)&&(h=O(h),o(i.isSchema(h),"Alteration adjuster for",y,"failed to return a schema object"));return h=h.$_modify({each:y=>y.tailor(c),ref:!1}),h.$_temp.ruleset=!1,h.$_mutateRebuild()}tracer(){return m.location?m.location(this):this}validate(c,h){return p.entry(c,this,h)}validateAsync(c,h){return p.entryAsync(c,this,h)}$_addRule(c){typeof c=="string"&&(c={name:c}),o(c&&typeof c=="object","Invalid options"),o(c.name&&typeof c.name=="string","Invalid rule name");for(const L in c)o(L[0]!=="_","Cannot set private rule properties");const h=Object.assign({},c);h._resolve=[],h.method=h.method||h.name;const y=this._definition.rules[h.method],O=h.args;o(y,"Unknown rule",h.method);const k=this.clone();if(O){o(Object.keys(O).length===1||Object.keys(O).length===this._definition.rules[h.name].args.length,"Invalid rule definition for",this.type,h.name);for(const L in O){let D=O[L];if(y.argsByName){const q=y.argsByName.get(L);if(q.ref&&i.isResolvable(D))h._resolve.push(L),k.$_mutateRegister(D);else if(q.normalize&&(D=q.normalize(D),O[L]=D),q.assert){const z=i.validateArg(D,L,q);o(!z,z,"or reference")}}D!==void 0?O[L]=D:delete O[L]}}return y.multi||(k._ruleRemove(h.name,{clone:!1}),k._singleRules.set(h.name,h)),k.$_temp.ruleset===!1&&(k.$_temp.ruleset=null),y.priority?k._rules.unshift(h):k._rules.push(h),k}$_compile(c,h){return s.schema(this.$_root,c,h)}$_createError(c,h,y,O,k,L={}){const D=L.flags!==!1?this._flags:{},q=L.messages?n.merge(this._definition.messages,L.messages):this._definition.messages;return new r.Report(c,h,y,D,q,O,k)}$_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,h,y,O){(y=Object.assign({},y)).abortEarly=!0,y._externals=!1,h.snapshot();const k=!p.validate(c,this,h,y,O).errors;return h.restore(),k}$_modify(c){return i.assertOptions(c,["each","once","ref","schema"]),a.schema(this,c)||this}$_mutateRebuild(){return o(!this._inRuleset(),"Cannot add this rule inside a ruleset"),this._refs.reset(),this._ids.reset(),this.$_modify({each:(c,{source:h,name:y,path:O,key:k})=>{const L=this._definition[h][y]&&this._definition[h][y].register;L!==!1&&this.$_mutateRegister(c,{family:L,key:k})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(c,{family:h,key:y}={}){this._refs.register(c,h),this._ids.register(c,{key:y})}$_property(c){return this._definition.properties[c]}$_reach(c){return this._ids.reach(c)}$_rootReferences(){return this._refs.roots()}$_setFlag(c,h,y={}){o(c[0]==="_"||!this._inRuleset(),"Cannot set flag inside a ruleset");const O=this._definition.flags[c]||{};if(d(h,O.default)&&(h=void 0),d(h,this._flags[c]))return this;const k=y.clone!==!1?this.clone():this;return h!==void 0?(k._flags[c]=h,k.$_mutateRegister(h)):delete k._flags[c],c[0]!=="_"&&(k.$_temp.ruleset=!1),k}$_parent(c,...h){return this[c][i.symbols.parent].call(this,...h)}$_validate(c,h,y){return p.validate(c,this,h,y)}_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=g(this._singleRules,{shallow:!0}),c._refs=this._refs.clone(),c._flags=Object.assign({},this._flags),c._cache=null,c.$_terms={};for(const h in this.$_terms)c.$_terms[h]=this.$_terms[h]?this.$_terms[h].slice():null;c.$_super={};for(const h in this.$_super)c.$_super[h]=this._super[h].bind(c);return c}_bare(){const c=this.clone();c._reset();const h=c._definition.terms;for(const y in h){const O=h[y];c.$_terms[y]=O.init}return c.$_mutateRebuild()}_default(c,h,y={}){return i.assertOptions(y,"literal"),o(h!==void 0,"Missing",c,"value"),o(typeof h=="function"||!y.literal,"Only function value supports literal option"),typeof h=="function"&&y.literal&&(h={[i.symbols.literal]:!0,literal:h}),this.$_setFlag(c,h)}_generate(c,h,y){if(!this.$_terms.whens)return{schema:this};const O=[],k=[];for(let q=0;q<this.$_terms.whens.length;++q){const z=this.$_terms.whens[q];if(z.concat){O.push(z.concat),k.push(`${q}.concat`);continue}const U=z.ref?z.ref.resolve(c,h,y):c,X=z.is?[z]:z.switch,Q=k.length;for(let W=0;W<X.length;++W){const{is:V,then:Z,otherwise:J}=X[W],te=`${q}${z.switch?"."+W:""}`;if(V.$_match(U,h.nest(V,`${te}.is`),y)){if(Z){const ce=h.localize([...h.path,`${te}.then`],h.ancestors,h.schemas),{schema:de,id:ue}=Z._generate(c,ce,y);O.push(de),k.push(`${te}.then${ue?`(${ue})`:""}`);break}}else if(J){const ce=h.localize([...h.path,`${te}.otherwise`],h.ancestors,h.schemas),{schema:de,id:ue}=J._generate(c,ce,y);O.push(de),k.push(`${te}.otherwise${ue?`(${ue})`:""}`);break}}if(z.break&&k.length>Q)break}const L=k.join(", ");if(h.mainstay.tracer.debug(h,"rule","when",L),!L)return{schema:this};if(!h.mainstay.tracer.active&&this.$_temp.whens[L])return{schema:this.$_temp.whens[L],id:L};let D=this;this._definition.generate&&(D=this._definition.generate(this,c,h,y));for(const q of O)D=D.concat(q);return this.$_root._tracer&&this.$_root._tracer._combine(D,[this,...O]),this.$_temp.whens[L]=D,{schema:D,id:L}}_inner(c,h,y={}){o(!this._inRuleset(),`Cannot set ${c} inside a ruleset`);const O=this.clone();return O.$_terms[c]&&!y.override||(O.$_terms[c]=[]),y.single?O.$_terms[c].push(h):O.$_terms[c].push(...h),O.$_temp.ruleset=!1,O}_inRuleset(){return this.$_temp.ruleset!==null&&this.$_temp.ruleset!==!1}_ruleRemove(c,h={}){if(!this._singleRules.has(c))return this;const y=h.clone!==!1?this.clone():this;y._singleRules.delete(c);const O=[];for(let k=0;k<y._rules.length;++k){const L=y._rules[k];L.name!==c||L.keep?O.push(L):y._inRuleset()&&k<y.$_temp.ruleset&&--y.$_temp.ruleset}return y._rules=O,y}_values(c,h){i.verifyFlat(c,h.slice(1,-1));const y=this.clone(),O=c[0]===i.symbols.override;if(O&&(c=c.slice(1)),!y[h]&&c.length?y[h]=new E:O&&(y[h]=c.length?new E:null,y.$_mutateRebuild()),!y[h])return y;O&&y[h].override();for(const k of c){o(k!==void 0,"Cannot call allow/valid/invalid with undefined"),o(k!==i.symbols.override,"Override must be the first value");const L=h==="_invalids"?"_valids":"_invalids";y[L]&&(y[L].remove(k),y[L].length||(o(h==="_valids"||!y._flags.only,"Setting invalid value",k,"leaves schema rejecting all values due to previous valid rule"),y[L]=null)),y[h].add(k,y._refs)}return y}}};w.Base.prototype[i.symbols.any]={version:i.version,compile:s.compile,root:"$_root"},w.Base.prototype.isImmutable=!0,w.Base.prototype.deny=w.Base.prototype.invalid,w.Base.prototype.disallow=w.Base.prototype.invalid,w.Base.prototype.equal=w.Base.prototype.valid,w.Base.prototype.exist=w.Base.prototype.required,w.Base.prototype.not=w.Base.prototype.invalid,w.Base.prototype.options=w.Base.prototype.prefs,w.Base.prototype.preferences=w.Base.prototype.prefs,A.exports=new w.Base},8652:(A,S,v)=>{const o=v(375),g=v(8571),d=v(8160),u={max:1e3,supported:new Set(["undefined","boolean","number","string"])};S.provider={provision:e=>new u.Cache(e)},u.Cache=class{constructor(e={}){d.assertOptions(e,["max"]),o(e.max===void 0||e.max&&e.max>0&&isFinite(e.max),"Invalid max cache size"),this._max=e.max||u.max,this._map=new Map,this._list=new u.List}get length(){return this._map.size}set(e,i){if(e!==null&&!u.supported.has(typeof e))return;let s=this._map.get(e);if(s)return s.value=i,void this._list.first(s);s=this._list.unshift({key:e,value:i}),this._map.set(e,s),this._compact()}get(e){const i=this._map.get(e);if(i)return this._list.first(i),g(i.value)}_compact(){if(this._map.size>this._max){const e=this._list.pop();this._map.delete(e.key)}}},u.List=class{constructor(){this.tail=null,this.head=null}unshift(e){return e.next=null,e.prev=this.head,this.head&&(this.head.next=e),this.head=e,this.tail||(this.tail=e),e}first(e){e!==this.head&&(this._remove(e),this.unshift(e))}pop(){return this._remove(this.tail)}_remove(e){const{next:i,prev:s}=e;return i.prev=s,s&&(s.next=i),e===this.tail&&(this.tail=i),e.prev=null,e.next=null,e}}},8160:(A,S,v)=>{const o=v(375),g=v(7916),d=v(5934);let u,e;const i={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};S.version=d.version,S.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},S.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")},S.assertOptions=function(s,r,t="Options"){o(s&&typeof s=="object"&&!Array.isArray(s),"Options must be of type object");const l=Object.keys(s).filter(n=>!r.includes(n));o(l.length===0,`${t} contain unknown keys: ${l}`)},S.checkPreferences=function(s){e=e||v(3378);const r=e.preferences.validate(s);if(r.error)throw new g([r.error.details[0].message])},S.compare=function(s,r,t){switch(t){case"=":return s===r;case">":return s>r;case"<":return s<r;case">=":return s>=r;case"<=":return s<=r}},S.default=function(s,r){return s===void 0?r:s},S.isIsoDate=function(s){return i.isoDate.test(s)},S.isNumber=function(s){return typeof s=="number"&&!isNaN(s)},S.isResolvable=function(s){return!!s&&(s[S.symbols.ref]||s[S.symbols.template])},S.isSchema=function(s,r={}){const t=s&&s[S.symbols.any];return!!t&&(o(r.legacy||t.version===S.version,"Cannot mix different versions of joi schemas"),!0)},S.isValues=function(s){return s[S.symbols.values]},S.limit=function(s){return Number.isSafeInteger(s)&&s>=0},S.preferences=function(s,r){u=u||v(6914),s=s||{},r=r||{};const t=Object.assign({},s,r);return r.errors&&s.errors&&(t.errors=Object.assign({},s.errors,r.errors),t.errors.wrap=Object.assign({},s.errors.wrap,r.errors.wrap)),r.messages&&(t.messages=u.compile(r.messages,s.messages)),delete t[S.symbols.prefs],t},S.tryWithPath=function(s,r,t={}){try{return s()}catch(l){throw l.path!==void 0?l.path=r+"."+l.path:l.path=r,t.append&&(l.message=`${l.message} (${l.path})`),l}},S.validateArg=function(s,r,{assert:t,message:l}){if(S.isSchema(t)){const n=t.validate(s);return n.error?n.error.message:void 0}if(!t(s))return r?`${r} ${l}`:l},S.verifyFlat=function(s,r){for(const t of s)o(!Array.isArray(t),"Method no longer accepts array arguments:",r)}},3292:(A,S,v)=>{const o=v(375),g=v(8160),d=v(6133),u={};S.schema=function(e,i,s={}){g.assertOptions(s,["appendPath","override"]);try{return u.schema(e,i,s)}catch(r){throw s.appendPath&&r.path!==void 0&&(r.message=`${r.message} (${r.path})`),r}},u.schema=function(e,i,s){o(i!==void 0,"Invalid undefined schema"),Array.isArray(i)&&(o(i.length,"Invalid empty array schema"),i.length===1&&(i=i[0]));const r=(t,...l)=>s.override!==!1?t.valid(e.override,...l):t.valid(...l);if(u.simple(i))return r(e,i);if(typeof i=="function")return e.custom(i);if(o(typeof i=="object","Invalid schema content:",typeof i),g.isResolvable(i))return r(e,i);if(g.isSchema(i))return i;if(Array.isArray(i)){for(const t of i)if(!u.simple(t))return e.alternatives().try(...i);return r(e,...i)}return i instanceof RegExp?e.string().regex(i):i instanceof Date?r(e.date(),i):(o(Object.getPrototypeOf(i)===Object.getPrototypeOf({}),"Schema can only contain plain objects"),e.object().keys(i))},S.ref=function(e,i){return d.isRef(e)?e:d.create(e,i)},S.compile=function(e,i,s={}){g.assertOptions(s,["legacy"]);const r=i&&i[g.symbols.any];if(r)return o(s.legacy||r.version===g.version,"Cannot mix different versions of joi schemas:",r.version,g.version),i;if(typeof i!="object"||!s.legacy)return S.schema(e,i,{appendPath:!0});const t=u.walk(i);return t?t.compile(t.root,i):S.schema(e,i,{appendPath:!0})},u.walk=function(e){if(typeof e!="object")return null;if(Array.isArray(e)){for(const s of e){const r=u.walk(s);if(r)return r}return null}const i=e[g.symbols.any];if(i)return{root:e[i.root],compile:i.compile};o(Object.getPrototypeOf(e)===Object.getPrototypeOf({}),"Schema can only contain plain objects");for(const s in e){const r=u.walk(e[s]);if(r)return r}return null},u.simple=function(e){return e===null||["boolean","string","number"].includes(typeof e)},S.when=function(e,i,s){if(s===void 0&&(o(i&&typeof i=="object","Missing options"),s=i,i=d.create(".")),Array.isArray(s)&&(s={switch:s}),g.assertOptions(s,["is","not","then","otherwise","switch","break"]),g.isSchema(i))return o(s.is===void 0,'"is" can not be used with a schema condition'),o(s.not===void 0,'"not" can not be used with a schema condition'),o(s.switch===void 0,'"switch" can not be used with a schema condition'),u.condition(e,{is:i,then:s.then,otherwise:s.otherwise,break:s.break});if(o(d.isRef(i)||typeof i=="string","Invalid condition:",i),o(s.not===void 0||s.is===void 0,'Cannot combine "is" with "not"'),s.switch===void 0){let t=s;s.not!==void 0&&(t={is:s.not,then:s.otherwise,otherwise:s.then,break:s.break});let l=t.is!==void 0?e.$_compile(t.is):e.$_root.invalid(null,!1,0,"").required();return o(t.then!==void 0||t.otherwise!==void 0,'options must have at least one of "then", "otherwise", or "switch"'),o(t.break===void 0||t.then===void 0||t.otherwise===void 0,"Cannot specify then, otherwise, and break all together"),s.is===void 0||d.isRef(s.is)||g.isSchema(s.is)||(l=l.required()),u.condition(e,{ref:S.ref(i),is:l,then:t.then,otherwise:t.otherwise,break:t.break})}o(Array.isArray(s.switch),'"switch" must be an array'),o(s.is===void 0,'Cannot combine "switch" with "is"'),o(s.not===void 0,'Cannot combine "switch" with "not"'),o(s.then===void 0,'Cannot combine "switch" with "then"');const r={ref:S.ref(i),switch:[],break:s.break};for(let t=0;t<s.switch.length;++t){const l=s.switch[t],n=t===s.switch.length-1;g.assertOptions(l,n?["is","then","otherwise"]:["is","then"]),o(l.is!==void 0,'Switch statement missing "is"'),o(l.then!==void 0,'Switch statement missing "then"');const a={is:e.$_compile(l.is),then:e.$_compile(l.then)};if(d.isRef(l.is)||g.isSchema(l.is)||(a.is=a.is.required()),n){o(s.otherwise===void 0||l.otherwise===void 0,'Cannot specify "otherwise" inside and outside a "switch"');const f=s.otherwise!==void 0?s.otherwise:l.otherwise;f!==void 0&&(o(r.break===void 0,"Cannot specify both otherwise and break"),a.otherwise=e.$_compile(f))}r.switch.push(a)}return r},u.condition=function(e,i){for(const s of["then","otherwise"])i[s]===void 0?delete i[s]:i[s]=e.$_compile(i[s]);return i}},6354:(A,S,v)=>{const o=v(5688),g=v(8160),d=v(3328);S.Report=class{constructor(u,e,i,s,r,t,l){if(this.code=u,this.flags=s,this.messages=r,this.path=t.path,this.prefs=l,this.state=t,this.value=e,this.message=null,this.template=null,this.local=i||{},this.local.label=S.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty("value")||(this.local.value=this.value),this.path.length){const n=this.path[this.path.length-1];typeof n!="object"&&(this.local.key=n)}}_setTemplate(u){if(this.template=u,!this.flags.label&&this.path.length===0){const e=this._template(this.template,"root");e&&(this.local.label=e)}}toString(){if(this.message)return this.message;const u=this.code;if(!this.prefs.errors.render)return this.code;const e=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return e===void 0?`Error code "${u}" is not defined, your custom type is missing the correct messages definition`:(this.message=e.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,"").trim()),this.message)}_template(u,e){return S.template(this.value,u,e||this.code,this.state,this.prefs)}},S.path=function(u){let e="";for(const i of u)typeof i!="object"&&(typeof i=="string"?(e&&(e+="."),e+=i):e+=`[${i}]`);return e},S.template=function(u,e,i,s,r){if(!e)return;if(d.isTemplate(e))return i!=="root"?e:null;let t=r.errors.language;if(g.isResolvable(t)&&(t=t.resolve(u,s,r)),t&&e[t]){if(e[t][i]!==void 0)return e[t][i];if(e[t]["*"]!==void 0)return e[t]["*"]}return e[i]?e[i]:e["*"]},S.label=function(u,e,i,s){if(u.label)return u.label;if(!i.errors.label)return"";let r=e.path;return i.errors.label==="key"&&e.path.length>1&&(r=e.path.slice(-1)),S.path(r)||S.template(null,i.messages,"root",e,i)||s&&S.template(null,s,"root",e,i)||"value"},S.process=function(u,e,i){if(!u)return null;const{override:s,message:r,details:t}=S.details(u);if(s)return s;if(i.errors.stack)return new S.ValidationError(r,t,e);const l=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new S.ValidationError(r,t,e);return Error.stackTraceLimit=l,n},S.details=function(u,e={}){let i=[];const s=[];for(const r of u){if(r instanceof Error){if(e.override!==!1)return{override:r};const l=r.toString();i.push(l),s.push({message:l,type:"override",context:{error:r}});continue}const t=r.toString();i.push(t),s.push({message:t,path:r.path.filter(l=>typeof l!="object"),type:r.code,context:r.local})}return i.length>1&&(i=[...new Set(i)]),{message:i.join(". "),details:s}},S.ValidationError=class extends Error{constructor(u,e,i){super(u),this._original=i,this.details=e}static isError(u){return u instanceof S.ValidationError}},S.ValidationError.prototype.isJoi=!0,S.ValidationError.prototype.name="ValidationError",S.ValidationError.prototype.annotate=o.error},8901:(A,S,v)=>{const o=v(375),g=v(8571),d=v(8160),u=v(6914),e={};S.type=function(i,s){const r=Object.getPrototypeOf(i),t=g(r),l=i._assign(Object.create(t)),n=Object.assign({},s);delete n.base,t._definition=n;const a=r._definition||{};n.messages=u.merge(a.messages,n.messages),n.properties=Object.assign({},a.properties,n.properties),l.type=n.type,n.flags=Object.assign({},a.flags,n.flags);const f=Object.assign({},a.terms);if(n.terms)for(const w in n.terms){const c=n.terms[w];o(l.$_terms[w]===void 0,"Invalid term override for",n.type,w),l.$_terms[w]=c.init,f[w]=c}n.terms=f,n.args||(n.args=a.args),n.prepare=e.prepare(n.prepare,a.prepare),n.coerce&&(typeof n.coerce=="function"&&(n.coerce={method:n.coerce}),n.coerce.from&&!Array.isArray(n.coerce.from)&&(n.coerce={method:n.coerce.method,from:[].concat(n.coerce.from)})),n.coerce=e.coerce(n.coerce,a.coerce),n.validate=e.validate(n.validate,a.validate);const m=Object.assign({},a.rules);if(n.rules)for(const w in n.rules){const c=n.rules[w];o(typeof c=="object","Invalid rule definition for",n.type,w);let h=c.method;if(h===void 0&&(h=function(){return this.$_addRule(w)}),h&&(o(!t[w],"Rule conflict in",n.type,w),t[w]=h),o(!m[w],"Rule conflict in",n.type,w),m[w]=c,c.alias){const y=[].concat(c.alias);for(const O of y)t[O]=c.method}c.args&&(c.argsByName=new Map,c.args=c.args.map(y=>(typeof y=="string"&&(y={name:y}),o(!c.argsByName.has(y.name),"Duplicated argument name",y.name),d.isSchema(y.assert)&&(y.assert=y.assert.strict().label(y.name)),c.argsByName.set(y.name,y),y)))}n.rules=m;const p=Object.assign({},a.modifiers);if(n.modifiers)for(const w in n.modifiers){o(!t[w],"Rule conflict in",n.type,w);const c=n.modifiers[w];o(typeof c=="function","Invalid modifier definition for",n.type,w);const h=function(y){return this.rule({[w]:y})};t[w]=h,p[w]=c}if(n.modifiers=p,n.overrides){t._super=r,l.$_super={};for(const w in n.overrides)o(r[w],"Cannot override missing",w),n.overrides[w][d.symbols.parent]=r[w],l.$_super[w]=r[w].bind(l);Object.assign(t,n.overrides)}n.cast=Object.assign({},a.cast,n.cast);const E=Object.assign({},a.manifest,n.manifest);return E.build=e.build(n.manifest&&n.manifest.build,a.manifest&&a.manifest.build),n.manifest=E,n.rebuild=e.rebuild(n.rebuild,a.rebuild),l},e.build=function(i,s){return i&&s?function(r,t){return s(i(r,t),t)}:i||s},e.coerce=function(i,s){return i&&s?{from:i.from&&s.from?[...new Set([...i.from,...s.from])]:null,method(r,t){let l;if((!s.from||s.from.includes(typeof r))&&(l=s.method(r,t),l)){if(l.errors||l.value===void 0)return l;r=l.value}if(!i.from||i.from.includes(typeof r)){const n=i.method(r,t);if(n)return n}return l}}:i||s},e.prepare=function(i,s){return i&&s?function(r,t){const l=i(r,t);if(l){if(l.errors||l.value===void 0)return l;r=l.value}return s(r,t)||l}:i||s},e.rebuild=function(i,s){return i&&s?function(r){s(r),i(r)}:i||s},e.validate=function(i,s){return i&&s?function(r,t){const l=s(r,t);if(l){if(l.errors&&(!Array.isArray(l.errors)||l.errors.length))return l;r=l.value}return i(r,t)||l}:i||s}},5107:(A,S,v)=>{const o=v(375),g=v(8571),d=v(8652),u=v(8160),e=v(3292),i=v(6354),s=v(8901),r=v(9708),t=v(6133),l=v(3328),n=v(1152);let a;const f={types:{alternatives:v(4946),any:v(8068),array:v(546),boolean:v(4937),date:v(7500),function:v(390),link:v(8785),number:v(3832),object:v(8966),string:v(7417),symbol:v(8826)},aliases:{alt:"alternatives",bool:"boolean",func:"function"},root:function(){const m={_types:new Set(Object.keys(f.types))};for(const p of m._types)m[p]=function(...E){return o(!E.length||["alternatives","link","object"].includes(p),"The",p,"type does not allow arguments"),f.generate(this,f.types[p],E)};for(const p of["allow","custom","disallow","equal","exist","forbidden","invalid","not","only","optional","options","prefs","preferences","required","strip","valid","when"])m[p]=function(...E){return this.any()[p](...E)};Object.assign(m,f.methods);for(const p in f.aliases){const E=f.aliases[p];m[p]=m[E]}return m.x=m.expression,n.setup&&n.setup(m),m}};f.methods={ValidationError:i.ValidationError,version:u.version,cache:d.provider,assert(m,p,...E){f.assert(m,p,!0,E)},attempt:(m,p,...E)=>f.assert(m,p,!1,E),build(m){return o(typeof r.build=="function","Manifest functionality disabled"),r.build(this,m)},checkPreferences(m){u.checkPreferences(m)},compile(m,p){return e.compile(this,m,p)},defaults(m){o(typeof m=="function","modifier must be a function");const p=Object.assign({},this);for(const E of p._types){const w=m(p[E]());o(u.isSchema(w),"modifier must return a valid schema object"),p[E]=function(...c){return f.generate(this,w,c)}}return p},expression:(...m)=>new l(...m),extend(...m){u.verifyFlat(m,"extend"),a=a||v(3378),o(m.length,"You need to provide at least one extension"),this.assert(m,a.extensions);const p=Object.assign({},this);p._types=new Set(p._types);for(let E of m){typeof E=="function"&&(E=E(p)),this.assert(E,a.extension);const w=f.expandExtension(E,p);for(const c of w){o(p[c.type]===void 0||p._types.has(c.type),"Cannot override name",c.type);const h=c.base||this.any(),y=s.type(h,c);p._types.add(c.type),p[c.type]=function(...O){return f.generate(this,y,O)}}}return p},isError:i.ValidationError.isError,isExpression:l.isTemplate,isRef:t.isRef,isSchema:u.isSchema,in:(...m)=>t.in(...m),override:u.symbols.override,ref:(...m)=>t.create(...m),types(){const m={};for(const p of this._types)m[p]=this[p]();for(const p in f.aliases)m[p]=this[p]();return m}},f.assert=function(m,p,E,w){const c=w[0]instanceof Error||typeof w[0]=="string"?w[0]:null,h=c!==null?w[1]:w[0],y=p.validate(m,u.preferences({errors:{stack:!0}},h||{}));let O=y.error;if(!O)return y.value;if(c instanceof Error)throw c;const k=E&&typeof O.annotate=="function"?O.annotate():O.message;throw O instanceof i.ValidationError==0&&(O=g(O)),O.message=c?`${c} ${k}`:k,O},f.generate=function(m,p,E){return o(m,"Must be invoked on a Joi instance."),p.$_root=m,p._definition.args&&E.length?p._definition.args(p,...E):p},f.expandExtension=function(m,p){if(typeof m.type=="string")return[m];const E=[];for(const w of p._types)if(m.type.test(w)){const c=Object.assign({},m);c.type=w,c.base=p[w](),E.push(c)}return E},A.exports=f.root()},6914:(A,S,v)=>{const o=v(375),g=v(8571),d=v(3328);S.compile=function(u,e){if(typeof u=="string")return o(!e,"Cannot set single message string"),new d(u);if(d.isTemplate(u))return o(!e,"Cannot set single message template"),u;o(typeof u=="object"&&!Array.isArray(u),"Invalid message options"),e=e?g(e):{};for(let i in u){const s=u[i];if(i==="root"||d.isTemplate(s)){e[i]=s;continue}if(typeof s=="string"){e[i]=new d(s);continue}o(typeof s=="object"&&!Array.isArray(s),"Invalid message for",i);const r=i;for(i in e[r]=e[r]||{},s){const t=s[i];i==="root"||d.isTemplate(t)?e[r][i]=t:(o(typeof t=="string","Invalid message for",i,"in",r),e[r][i]=new d(t))}}return e},S.decompile=function(u){const e={};for(let i in u){const s=u[i];if(i==="root"){e.root=s;continue}if(d.isTemplate(s)){e[i]=s.describe({compact:!0});continue}const r=i;for(i in e[r]={},s){const t=s[i];i!=="root"?e[r][i]=t.describe({compact:!0}):e[r].root=t}}return e},S.merge=function(u,e){if(!u)return S.compile(e);if(!e)return u;if(typeof e=="string")return new d(e);if(d.isTemplate(e))return e;const i=g(u);for(let s in e){const r=e[s];if(s==="root"||d.isTemplate(r)){i[s]=r;continue}if(typeof r=="string"){i[s]=new d(r);continue}o(typeof r=="object"&&!Array.isArray(r),"Invalid message for",s);const t=s;for(s in i[t]=i[t]||{},r){const l=r[s];s==="root"||d.isTemplate(l)?i[t][s]=l:(o(typeof l=="string","Invalid message for",s,"in",t),i[t][s]=new d(l))}}return i}},2294:(A,S,v)=>{const o=v(375),g=v(8160),d=v(6133),u={};S.Ids=u.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){const e=new u.Ids;return e._byId=new Map(this._byId),e._byKey=new Map(this._byKey),e._schemaChain=this._schemaChain,e}concat(e){e._schemaChain&&(this._schemaChain=!0);for(const[i,s]of e._byId.entries())o(!this._byKey.has(i),"Schema id conflicts with existing key:",i),this._byId.set(i,s);for(const[i,s]of e._byKey.entries())o(!this._byId.has(i),"Schema key conflicts with existing id:",i),this._byKey.set(i,s)}fork(e,i,s){const r=this._collect(e);r.push({schema:s});const t=r.shift();let l={id:t.id,schema:i(t.schema)};o(g.isSchema(l.schema),"adjuster function failed to return a joi schema type");for(const n of r)l={id:n.id,schema:u.fork(n.schema,l.id,l.schema)};return l.schema}labels(e,i=[]){const s=e[0],r=this._get(s);if(!r)return[...i,...e].join(".");const t=e.slice(1);return i=[...i,r.schema._flags.label||s],t.length?r.schema._ids.labels(t,i):i.join(".")}reach(e,i=[]){const s=e[0],r=this._get(s);o(r,"Schema does not contain path",[...i,...e].join("."));const t=e.slice(1);return t.length?r.schema._ids.reach(t,[...i,s]):r.schema}register(e,{key:i}={}){if(!e||!g.isSchema(e))return;(e.$_property("schemaChain")||e._ids._schemaChain)&&(this._schemaChain=!0);const s=e._flags.id;if(s){const r=this._byId.get(s);o(!r||r.schema===e,"Cannot add different schemas with the same id:",s),o(!this._byKey.has(s),"Schema id conflicts with existing key:",s),this._byId.set(s,{schema:e,id:s})}i&&(o(!this._byKey.has(i),"Schema already contains key:",i),o(!this._byId.has(i),"Schema key conflicts with existing id:",i),this._byKey.set(i,{schema:e,id:i}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(e,i=[],s=[]){const r=e[0],t=this._get(r);o(t,"Schema does not contain path",[...i,...e].join(".")),s=[t,...s];const l=e.slice(1);return l.length?t.schema._ids._collect(l,[...i,r],s):s}_get(e){return this._byId.get(e)||this._byKey.get(e)}},u.fork=function(e,i,s){const r=S.schema(e,{each:(t,{key:l})=>{if(i===(t._flags.id||l))return s},ref:!1});return r?r.$_mutateRebuild():e},S.schema=function(e,i){let s;for(const r in e._flags){if(r[0]==="_")continue;const t=u.scan(e._flags[r],{source:"flags",name:r},i);t!==void 0&&(s=s||e.clone(),s._flags[r]=t)}for(let r=0;r<e._rules.length;++r){const t=e._rules[r],l=u.scan(t.args,{source:"rules",name:t.name},i);if(l!==void 0){s=s||e.clone();const n=Object.assign({},t);n.args=l,s._rules[r]=n,s._singleRules.get(t.name)===t&&s._singleRules.set(t.name,n)}}for(const r in e.$_terms){if(r[0]==="_")continue;const t=u.scan(e.$_terms[r],{source:"terms",name:r},i);t!==void 0&&(s=s||e.clone(),s.$_terms[r]=t)}return s},u.scan=function(e,i,s,r,t){const l=r||[];if(e===null||typeof e!="object")return;let n;if(Array.isArray(e)){for(let a=0;a<e.length;++a){const f=i.source==="terms"&&i.name==="keys"&&e[a].key,m=u.scan(e[a],i,s,[a,...l],f);m!==void 0&&(n=n||e.slice(),n[a]=m)}return n}if(s.schema!==!1&&g.isSchema(e)||s.ref!==!1&&d.isRef(e)){const a=s.each(e,{...i,path:l,key:t});return a===e?void 0:a}for(const a in e){if(a[0]==="_")continue;const f=u.scan(e[a],i,s,[a,...l],t);f!==void 0&&(n=n||Object.assign({},e),n[a]=f)}return n}},6133:(A,S,v)=>{const o=v(375),g=v(8571),d=v(9621),u=v(8160);let e;const i={symbol:Symbol("ref"),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:".",type:"value"}};S.create=function(s,r={}){o(typeof s=="string","Invalid reference key:",s),u.assertOptions(r,["adjust","ancestor","in","iterables","map","prefix","render","separator"]),o(!r.prefix||typeof r.prefix=="object","options.prefix must be of type object");const t=Object.assign({},i.defaults,r);delete t.prefix;const l=t.separator,n=i.context(s,l,r.prefix);if(t.type=n.type,s=n.key,t.type==="value")if(n.root&&(o(!l||s[0]!==l,"Cannot specify relative path with root prefix"),t.ancestor="root",s||(s=null)),l&&l===s)s=null,t.ancestor=0;else if(t.ancestor!==void 0)o(!l||!s||s[0]!==l,"Cannot combine prefix with ancestor option");else{const[a,f]=i.ancestor(s,l);f&&(s=s.slice(f))===""&&(s=null),t.ancestor=a}return t.path=l?s===null?[]:s.split(l):[s],new i.Ref(t)},S.in=function(s,r={}){return S.create(s,{...r,in:!0})},S.isRef=function(s){return!!s&&!!s[u.symbols.ref]},i.Ref=class{constructor(s){o(typeof s=="object","Invalid reference construction"),u.assertOptions(s,["adjust","ancestor","in","iterables","map","path","render","separator","type","depth","key","root","display"]),o([!1,void 0].includes(s.separator)||typeof s.separator=="string"&&s.separator.length===1,"Invalid separator"),o(!s.adjust||typeof s.adjust=="function","options.adjust must be a function"),o(!s.map||Array.isArray(s.map),"options.map must be an array"),o(!s.map||!s.adjust,"Cannot set both map and adjust options"),Object.assign(this,i.defaults,s),o(this.type==="value"||this.ancestor===void 0,"Non-value references cannot reference ancestors"),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(s,r,t,l,n={}){return o(!this.in||n.in,"Invalid in() reference usage"),this.type==="global"?this._resolve(t.context,r,n):this.type==="local"?this._resolve(l,r,n):this.ancestor?this.ancestor==="root"?this._resolve(r.ancestors[r.ancestors.length-1],r,n):(o(this.ancestor<=r.ancestors.length,"Invalid reference exceeds the schema root:",this.display),this._resolve(r.ancestors[this.ancestor-1],r,n)):this._resolve(s,r,n)}_resolve(s,r,t){let l;if(this.type==="value"&&r.mainstay.shadow&&t.shadow!==!1&&(l=r.mainstay.shadow.get(this.absolute(r))),l===void 0&&(l=d(s,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(l=this.adjust(l)),this.map){const n=this.map.get(l);n!==void 0&&(l=n)}return r.mainstay&&r.mainstay.tracer.resolve(r,this,l),l}toString(){return this.display}absolute(s){return[...s.path.slice(0,-this.ancestor),...this.path]}clone(){return new i.Ref(this)}describe(){const s={path:this.path};this.type!=="value"&&(s.type=this.type),this.separator!=="."&&(s.separator=this.separator),this.type==="value"&&this.ancestor!==1&&(s.ancestor=this.ancestor),this.map&&(s.map=[...this.map]);for(const r of["adjust","iterables","render"])this[r]!==null&&this[r]!==void 0&&(s[r]=this[r]);return this.in!==!1&&(s.in=!0),{ref:s}}updateDisplay(){const s=this.key!==null?this.key:"";if(this.type!=="value")return void(this.display=`ref:${this.type}:${s}`);if(!this.separator)return void(this.display=`ref:${s}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${s}`);if(this.ancestor==="root")return void(this.display=`ref:root:${s}`);if(this.ancestor===1)return void(this.display=`ref:${s||".."}`);const r=new Array(this.ancestor+1).fill(this.separator).join("");this.display=`ref:${r}${s||""}`}},i.Ref.prototype[u.symbols.ref]=!0,S.build=function(s){return(s=Object.assign({},i.defaults,s)).type==="value"&&s.ancestor===void 0&&(s.ancestor=1),new i.Ref(s)},i.context=function(s,r,t={}){if(s=s.trim(),t){const l=t.global===void 0?"$":t.global;if(l!==r&&s.startsWith(l))return{key:s.slice(l.length),type:"global"};const n=t.local===void 0?"#":t.local;if(n!==r&&s.startsWith(n))return{key:s.slice(n.length),type:"local"};const a=t.root===void 0?"/":t.root;if(a!==r&&s.startsWith(a))return{key:s.slice(a.length),type:"value",root:!0}}return{key:s,type:"value"}},i.ancestor=function(s,r){if(!r)return[1,0];if(s[0]!==r)return[1,0];if(s[1]!==r)return[0,1];let t=2;for(;s[t]===r;)++t;return[t-1,t]},S.toSibling=0,S.toParent=1,S.Manager=class{constructor(){this.refs=[]}register(s,r){if(s)if(r=r===void 0?S.toParent:r,Array.isArray(s))for(const t of s)this.register(t,r);else if(u.isSchema(s))for(const t of s._refs.refs)t.ancestor-r>=0&&this.refs.push({ancestor:t.ancestor-r,root:t.root});else S.isRef(s)&&s.type==="value"&&s.ancestor-r>=0&&this.refs.push({ancestor:s.ancestor-r,root:s.root}),e=e||v(3328),e.isTemplate(s)&&this.register(s.refs(),r)}get length(){return this.refs.length}clone(){const s=new S.Manager;return s.refs=g(this.refs),s}reset(){this.refs=[]}roots(){return this.refs.filter(s=>!s.ancestor).map(s=>s.root)}}},3378:(A,S,v)=>{const o=v(5107),g={};g.wrap=o.string().min(1).max(2).allow(!1),S.preferences=o.object({allowUnknown:o.boolean(),abortEarly:o.boolean(),artifacts:o.boolean(),cache:o.boolean(),context:o.object(),convert:o.boolean(),dateFormat:o.valid("date","iso","string","time","utc"),debug:o.boolean(),errors:{escapeHtml:o.boolean(),label:o.valid("path","key",!1),language:[o.string(),o.object().ref()],render:o.boolean(),stack:o.boolean(),wrap:{label:g.wrap,array:g.wrap,string:g.wrap}},externals:o.boolean(),messages:o.object(),noDefaults:o.boolean(),nonEnumerables:o.boolean(),presence:o.valid("required","optional","forbidden"),skipFunctions:o.boolean(),stripUnknown:o.object({arrays:o.boolean(),objects:o.boolean()}).or("arrays","objects").allow(!0,!1),warnings:o.boolean()}).strict(),g.nameRx=/^[a-zA-Z0-9]\w*$/,g.rule=o.object({alias:o.array().items(o.string().pattern(g.nameRx)).single(),args:o.array().items(o.string(),o.object({name:o.string().pattern(g.nameRx).required(),ref:o.boolean(),assert:o.alternatives([o.function(),o.object().schema()]).conditional("ref",{is:!0,then:o.required()}),normalize:o.function(),message:o.string().when("assert",{is:o.function(),then:o.required()})})),convert:o.boolean(),manifest:o.boolean(),method:o.function().allow(!1),multi:o.boolean(),validate:o.function()}),S.extension=o.object({type:o.alternatives([o.string(),o.object().regex()]).required(),args:o.function(),cast:o.object().pattern(g.nameRx,o.object({from:o.function().maxArity(1).required(),to:o.function().minArity(1).maxArity(2).required()})),base:o.object().schema().when("type",{is:o.object().regex(),then:o.forbidden()}),coerce:[o.function().maxArity(3),o.object({method:o.function().maxArity(3).required(),from:o.array().items(o.string()).single()})],flags:o.object().pattern(g.nameRx,o.object({setter:o.string(),default:o.any()})),manifest:{build:o.function().arity(2)},messages:[o.object(),o.string()],modifiers:o.object().pattern(g.nameRx,o.function().minArity(1).maxArity(2)),overrides:o.object().pattern(g.nameRx,o.function()),prepare:o.function().maxArity(3),rebuild:o.function().arity(1),rules:o.object().pattern(g.nameRx,g.rule),terms:o.object().pattern(g.nameRx,o.object({init:o.array().allow(null).required(),manifest:o.object().pattern(/.+/,[o.valid("schema","single"),o.object({mapped:o.object({from:o.string().required(),to:o.string().required()}).required()})])})),validate:o.function().maxArity(3)}).strict(),S.extensions=o.array().items(o.object(),o.function().arity(1)).strict(),g.desc={buffer:o.object({buffer:o.string()}),func:o.object({function:o.function().required(),options:{literal:!0}}),override:o.object({override:!0}),ref:o.object({ref:o.object({type:o.valid("value","global","local"),path:o.array().required(),separator:o.string().length(1).allow(!1),ancestor:o.number().min(0).integer().allow("root"),map:o.array().items(o.array().length(2)).min(1),adjust:o.function(),iterables:o.boolean(),in:o.boolean(),render:o.boolean()}).required()}),regex:o.object({regex:o.string().min(3)}),special:o.object({special:o.valid("deep").required()}),template:o.object({template:o.string().required(),options:o.object()}),value:o.object({value:o.alternatives([o.object(),o.array()]).required()})},g.desc.entity=o.alternatives([o.array().items(o.link("...")),o.boolean(),o.function(),o.number(),o.string(),g.desc.buffer,g.desc.func,g.desc.ref,g.desc.regex,g.desc.special,g.desc.template,g.desc.value,o.link("/")]),g.desc.values=o.array().items(null,o.boolean(),o.function(),o.number().allow(1/0,-1/0),o.string().allow(""),o.symbol(),g.desc.buffer,g.desc.func,g.desc.override,g.desc.ref,g.desc.regex,g.desc.template,g.desc.value),g.desc.messages=o.object().pattern(/.+/,[o.string(),g.desc.template,o.object().pattern(/.+/,[o.string(),g.desc.template])]),S.description=o.object({type:o.string().required(),flags:o.object({cast:o.string(),default:o.any(),description:o.string(),empty:o.link("/"),failover:g.desc.entity,id:o.string(),label:o.string(),only:!0,presence:["optional","required","forbidden"],result:["raw","strip"],strip:o.boolean(),unit:o.string()}).unknown(),preferences:{allowUnknown:o.boolean(),abortEarly:o.boolean(),artifacts:o.boolean(),cache:o.boolean(),convert:o.boolean(),dateFormat:["date","iso","string","time","utc"],errors:{escapeHtml:o.boolean(),label:["path","key"],language:[o.string(),g.desc.ref],wrap:{label:g.wrap,array:g.wrap}},externals:o.boolean(),messages:g.desc.messages,noDefaults:o.boolean(),nonEnumerables:o.boolean(),presence:["required","optional","forbidden"],skipFunctions:o.boolean(),stripUnknown:o.object({arrays:o.boolean(),objects:o.boolean()}).or("arrays","objects").allow(!0,!1),warnings:o.boolean()},allow:g.desc.values,invalid:g.desc.values,rules:o.array().min(1).items({name:o.string().required(),args:o.object().min(1),keep:o.boolean(),message:[o.string(),g.desc.messages],warn:o.boolean()}),keys:o.object().pattern(/.*/,o.link("/")),link:g.desc.ref}).pattern(/^[a-z]\w*$/,o.any())},493:(A,S,v)=>{const o=v(8571),g=v(9621),d=v(8160),u={value:Symbol("value")};A.exports=u.State=class{constructor(e,i,s){this.path=e,this.ancestors=i,this.mainstay=s.mainstay,this.schemas=s.schemas,this.debug=null}localize(e,i=null,s=null){const r=new u.State(e,i,this);return s&&r.schemas&&(r.schemas=[u.schemas(s),...r.schemas]),r}nest(e,i){const s=new u.State(this.path,this.ancestors,this);return s.schemas=s.schemas&&[u.schemas(e),...s.schemas],s.debug=i,s}shadow(e,i){this.mainstay.shadow=this.mainstay.shadow||new u.Shadow,this.mainstay.shadow.set(this.path,e,i)}snapshot(){this.mainstay.shadow&&(this._snapshot=o(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}commit(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.commit()}},u.schemas=function(e){return d.isSchema(e)?{schema:e}:e},u.Shadow=class{constructor(){this._values=null}set(e,i,s){if(!e.length||s==="strip"&&typeof e[e.length-1]=="number")return;this._values=this._values||new Map;let r=this._values;for(let t=0;t<e.length;++t){const l=e[t];let n=r.get(l);n||(n=new Map,r.set(l,n)),r=n}r[u.value]=i}get(e){const i=this.node(e);if(i)return i[u.value]}node(e){if(this._values)return g(this._values,e,{iterables:!0})}override(e,i){if(!this._values)return;const s=e.slice(0,-1),r=e[e.length-1],t=g(this._values,s,{iterables:!0});i?t.set(r,i):t&&t.delete(r)}}},3328:(A,S,v)=>{const o=v(375),g=v(8571),d=v(5277),u=v(1447),e=v(8160),i=v(6354),s=v(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}};A.exports=r.Template=class{constructor(t,l){if(o(typeof t=="string","Template source must be a string"),o(!t.includes("\0")&&!t.includes(""),"Template source cannot contain reserved control characters"),this.source=t,this.rendered=t,this._template=null,l){const{functions:n,...a}=l;this._settings=Object.keys(a).length?g(a):void 0,this._functions=n,this._functions&&(o(Object.keys(this._functions).every(f=>typeof f=="string"),"Functions keys must be strings"),o(Object.values(this._functions).every(f=>typeof f=="function"),"Functions values must be functions"))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes("{"))return;const t=r.encode(this.source),l=r.split(t);let n=!1;const a=[],f=l.shift();f&&a.push(f);for(const m of l){const p=m[0]!=="{",E=p?"}":"}}",w=m.indexOf(E);if(w===-1||m[1]==="{"){a.push(`{${r.decode(m)}`);continue}let c=m.slice(p?0:1,w);const h=c[0]===":";h&&(c=c.slice(1));const y=this._ref(r.decode(c),{raw:p,wrapped:h});a.push(y),typeof y!="string"&&(n=!0);const O=m.slice(w+E.length);O&&a.push(r.decode(O))}n?this._template=a:this.rendered=a.join("")}static date(t,l){return r.dateFormat[l.dateFormat].call(t)}describe(t={}){if(!this._settings&&t.compact)return this.source;const l={template:this.source};return this._settings&&(l.options=this._settings),this._functions&&(l.functions=this._functions),l}static build(t){return new r.Template(t.template,t.options||t.functions?{...t.options,functions:t.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(t){return!!t&&!!t[e.symbols.template]}refs(){if(!this._template)return;const t=[];for(const l of this._template)typeof l!="string"&&t.push(...l.refs);return t}resolve(t,l,n,a){return this._template&&this._template.length===1?this._part(this._template[0],t,l,n,a,{}):this.render(t,l,n,a)}_part(t,...l){return t.ref?t.ref.resolve(...l):t.formula.evaluate(l)}render(t,l,n,a,f={}){if(!this.isDynamic())return this.rendered;const m=[];for(const p of this._template)if(typeof p=="string")m.push(p);else{const E=this._part(p,t,l,n,a,f),w=r.stringify(E,t,l,n,a,f);if(w!==void 0){const c=p.raw||(f.errors&&f.errors.escapeHtml)===!1?w:d(w);m.push(r.wrap(c,p.wrapped&&n.errors.wrap.label))}}return m.join("")}_ref(t,{raw:l,wrapped:n}){const a=[],f=p=>{const E=s.create(p,this._settings);return a.push(E),w=>{const c=E.resolve(...w);return c!==void 0?c:null}};try{const p=this._functions?{...r.functions,...this._functions}:r.functions;var m=new u.Parser(t,{reference:f,functions:p,constants:r.constants})}catch(p){throw p.message=`Invalid template variable "${t}" fails due to: ${p.message}`,p}if(m.single){if(m.single.type==="reference"){const p=a[0];return{ref:p,raw:l,refs:a,wrapped:n||p.type==="local"&&p.key==="label"}}return r.stringify(m.single.value)}return{formula:m,raw:l,refs:a}}toString(){return this.source}},r.Template.prototype[e.symbols.template]=!0,r.Template.prototype.isImmutable=!0,r.encode=function(t){return t.replace(/\\(\{+)/g,(l,n)=>r.opens.slice(0,n.length)).replace(/\\(\}+)/g,(l,n)=>r.closes.slice(0,n.length))},r.decode=function(t){return t.replace(/\u0000/g,"{").replace(/\u0001/g,"}")},r.split=function(t){const l=[];let n="";for(let a=0;a<t.length;++a){const f=t[a];if(f==="{"){let m="";for(;a+1<t.length&&t[a+1]==="{";)m+="{",++a;l.push(n),n=m}else n+=f}return l.push(n),l},r.wrap=function(t,l){return l?l.length===1?`${l}${t}${l}`:`${l[0]}${t}${l[1]}`:t},r.stringify=function(t,l,n,a,f,m={}){const p=typeof t,E=a&&a.errors&&a.errors.wrap||{};let w=!1;if(s.isRef(t)&&t.render&&(w=t.in,t=t.resolve(l,n,a,f,{in:t.in,...m})),t===null)return"null";if(p==="string")return r.wrap(t,m.arrayItems&&E.string);if(p==="number"||p==="function"||p==="symbol")return t.toString();if(p!=="object")return JSON.stringify(t);if(t instanceof Date)return r.Template.date(t,a);if(t instanceof Map){const h=[];for(const[y,O]of t.entries())h.push(`${y.toString()} -> ${O.toString()}`);t=h}if(!Array.isArray(t))return t.toString();const c=[];for(const h of t)c.push(r.stringify(h,l,n,a,f,{arrayItems:!0,...m}));return r.wrap(c.join(", "),!w&&E.array)},r.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},r.functions={if:(t,l,n)=>t?l:n,length:t=>typeof t=="string"?t.length:t&&typeof t=="object"?Array.isArray(t)?t.length:Object.keys(t).length:null,msg(t){const[l,n,a,f,m]=this,p=m.messages;if(!p)return"";const E=i.template(l,p[0],t,n,a)||i.template(l,p[1],t,n,a);return E?E.render(l,n,a,f,m):""},number:t=>typeof t=="number"?t:typeof t=="string"?parseFloat(t):typeof t=="boolean"?t?1:0:t instanceof Date?t.getTime():null}},4946:(A,S,v)=>{const o=v(375),g=v(1687),d=v(8068),u=v(8160),e=v(3292),i=v(6354),s=v(6133),r={};A.exports=d.extend({type:"alternatives",flags:{match:{default:"any"}},terms:{matches:{init:[],register:s.toSibling}},args:(t,...l)=>l.length===1&&Array.isArray(l[0])?t.try(...l[0]):t.try(...l),validate(t,l){const{schema:n,error:a,state:f,prefs:m}=l;if(n._flags.match){const E=[],w=[];for(let h=0;h<n.$_terms.matches.length;++h){const y=n.$_terms.matches[h],O=f.nest(y.schema,`match.${h}`);O.snapshot();const k=y.schema.$_validate(t,O,m);k.errors?(w.push(k.errors),O.restore()):(E.push(k.value),O.commit())}if(E.length===0)return{errors:a("alternatives.any",{details:w.map(h=>i.details(h,{override:!1}))})};if(n._flags.match==="one")return E.length===1?{value:E[0]}:{errors:a("alternatives.one")};if(E.length!==n.$_terms.matches.length)return{errors:a("alternatives.all",{details:w.map(h=>i.details(h,{override:!1}))})};const c=h=>h.$_terms.matches.some(y=>y.schema.type==="object"||y.schema.type==="alternatives"&&c(y.schema));return c(n)?{value:E.reduce((h,y)=>g(h,y,{mergeArrays:!1}))}:{value:E[E.length-1]}}const p=[];for(let E=0;E<n.$_terms.matches.length;++E){const w=n.$_terms.matches[E];if(w.schema){const y=f.nest(w.schema,`match.${E}`);y.snapshot();const O=w.schema.$_validate(t,y,m);if(!O.errors)return y.commit(),O;y.restore(),p.push({schema:w.schema,reports:O.errors});continue}const c=w.ref?w.ref.resolve(t,f,m):t,h=w.is?[w]:w.switch;for(let y=0;y<h.length;++y){const O=h[y],{is:k,then:L,otherwise:D}=O,q=`match.${E}${w.switch?"."+y:""}`;if(k.$_match(c,f.nest(k,`${q}.is`),m)){if(L)return L.$_validate(t,f.nest(L,`${q}.then`),m)}else if(D)return D.$_validate(t,f.nest(D,`${q}.otherwise`),m)}}return r.errors(p,l)},rules:{conditional:{method(t,l){o(!this._flags._endedSwitch,"Unreachable condition"),o(!this._flags.match,"Cannot combine match mode",this._flags.match,"with conditional rule"),o(l.break===void 0,"Cannot use break option with alternatives conditional");const n=this.clone(),a=e.when(n,t,l),f=a.is?[a]:a.switch;for(const m of f)if(m.then&&m.otherwise){n.$_setFlag("_endedSwitch",!0,{clone:!1});break}return n.$_terms.matches.push(a),n.$_mutateRebuild()}},match:{method(t){if(o(["any","one","all"].includes(t),"Invalid alternatives match mode",t),t!=="any")for(const l of this.$_terms.matches)o(l.schema,"Cannot combine match mode",t,"with conditional rules");return this.$_setFlag("match",t)}},try:{method(...t){o(t.length,"Missing alternative schemas"),u.verifyFlat(t,"try"),o(!this._flags._endedSwitch,"Unreachable condition");const l=this.clone();for(const n of t)l.$_terms.matches.push({schema:l.$_compile(n)});return l.$_mutateRebuild()}}},overrides:{label(t){return this.$_parent("label",t).$_modify({each:(l,n)=>n.path[0]!=="is"&&typeof l._flags.label!="string"?l.label(t):void 0,ref:!1})}},rebuild(t){t.$_modify({each:l=>{u.isSchema(l)&&l.type==="array"&&t.$_setFlag("_arrayItems",!0,{clone:!1})}})},manifest:{build(t,l){if(l.matches)for(const n of l.matches){const{schema:a,ref:f,is:m,not:p,then:E,otherwise:w}=n;t=a?t.try(a):f?t.conditional(f,{is:m,then:E,not:p,otherwise:w,switch:n.switch}):t.conditional(m,{then:E,otherwise:w})}return t}},messages:{"alternatives.all":"{{#label}} does not match all of the required types","alternatives.any":"{{#label}} does not match any of the allowed types","alternatives.match":"{{#label}} does not match any of the allowed types","alternatives.one":"{{#label}} matches more than one allowed type","alternatives.types":"{{#label}} must be one of {{#types}}"}}),r.errors=function(t,{error:l,state:n}){if(!t.length)return{errors:l("alternatives.any")};if(t.length===1)return{errors:t[0].reports};const a=new Set,f=[];for(const{reports:m,schema:p}of t){if(m.length>1)return r.unmatched(t,l);const E=m[0];if(E instanceof i.Report==0)return r.unmatched(t,l);if(E.state.path.length!==n.path.length){f.push({type:p.type,report:E});continue}if(E.code==="any.only"){for(const h of E.local.valids)a.add(h);continue}const[w,c]=E.code.split(".");c==="base"?a.add(w):f.push({type:p.type,report:E})}return f.length?f.length===1?{errors:f[0].report}:r.unmatched(t,l):{errors:l("alternatives.types",{types:[...a]})}},r.unmatched=function(t,l){const n=[];for(const a of t)n.push(...a.reports);return{errors:l("alternatives.match",i.details(n,{override:!1}))}}},8068:(A,S,v)=>{const o=v(375),g=v(7629),d=v(8160),u=v(6914);A.exports=g.extend({type:"any",flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(e,i){return o(typeof e=="function","Method must be a function"),o(i===void 0||i&&typeof i=="string","Description must be a non-empty string"),this.$_addRule({name:"custom",args:{method:e,description:i}})},validate(e,i,{method:s}){try{return s(e,i)}catch(r){return i.error("any.custom",{error:r})}},args:["method","description"],multi:!0},messages:{method(e){return this.prefs({messages:e})}},shared:{method(e){o(d.isSchema(e)&&e._flags.id,"Schema must be a schema with an id");const i=this.clone();return i.$_terms.shared=i.$_terms.shared||[],i.$_terms.shared.push(e),i.$_mutateRegister(e),i}},warning:{method(e,i){return o(e&&typeof e=="string","Invalid warning code"),this.$_addRule({name:"warning",args:{code:e,local:i},warn:!0})},validate:(e,i,{code:s,local:r})=>i.error(s,r),args:["code","local"],multi:!0}},modifiers:{keep(e,i=!0){e.keep=i},message(e,i){e.message=u.compile(i)},warn(e,i=!0){e.warn=i}},manifest:{build(e,i){for(const s in i){const r=i[s];if(["examples","externals","metas","notes","tags"].includes(s))for(const t of r)e=e[s.slice(0,-1)](t);else if(s!=="alterations")if(s!=="whens"){if(s==="shared")for(const t of r)e=e.shared(t)}else for(const t of r){const{ref:l,is:n,not:a,then:f,otherwise:m,concat:p}=t;e=p?e.concat(p):l?e.when(l,{is:n,not:a,then:f,otherwise:m,switch:t.switch,break:t.break}):e.when(n,{then:f,otherwise:m,break:t.break})}else{const t={};for(const{target:l,adjuster:n}of r)t[l]=n;e=e.alter(t)}}return e}},messages:{"any.custom":"{{#label}} failed custom validation because {{#error.message}}","any.default":"{{#label}} threw an error when running default method","any.failover":"{{#label}} threw an error when running failover method","any.invalid":"{{#label}} contains an invalid value","any.only":'{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}',"any.ref":"{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}","any.required":"{{#label}} is required","any.unknown":"{{#label}} is not allowed"}})},546:(A,S,v)=>{const o=v(375),g=v(9474),d=v(9621),u=v(8068),e=v(8160),i=v(3292),s={};A.exports=u.extend({type:"array",flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:"schema"},ordered:{init:[],manifest:"schema"},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:"object",method(r,{schema:t,state:l,prefs:n}){if(!Array.isArray(r))return;const a=t.$_getRule("sort");return a?s.sort(t,r,a.args.options,l,n):void 0}},validate(r,{schema:t,error:l}){if(!Array.isArray(r)){if(t._flags.single){const n=[r];return n[e.symbols.arraySingle]=!0,{value:n}}return{errors:l("array.base")}}if(t.$_getRule("items")||t.$_terms.externals)return{value:r.slice()}},rules:{has:{method(r){r=this.$_compile(r,{appendPath:!0});const t=this.$_addRule({name:"has",args:{schema:r}});return t.$_mutateRegister(r),t},validate(r,{state:t,prefs:l,error:n},{schema:a}){const f=[r,...t.ancestors];for(let p=0;p<r.length;++p){const E=t.localize([...t.path,p],f,a);if(a.$_match(r[p],E,l))return r}const m=a._flags.label;return m?n("array.hasKnown",{patternLabel:m}):n("array.hasUnknown",null)},multi:!0},items:{method(...r){e.verifyFlat(r,"items");const t=this.$_addRule("items");for(let l=0;l<r.length;++l){const n=e.tryWithPath(()=>this.$_compile(r[l]),l,{append:!0});t.$_terms.items.push(n)}return t.$_mutateRebuild()},validate(r,{schema:t,error:l,state:n,prefs:a,errorsArray:f}){const m=t.$_terms._requireds.slice(),p=t.$_terms.ordered.slice(),E=[...t.$_terms._inclusions,...m],w=!r[e.symbols.arraySingle];delete r[e.symbols.arraySingle];const c=f();let h=r.length;for(let y=0;y<h;++y){const O=r[y];let k=!1,L=!1;const D=w?y:new Number(y),q=[...n.path,D];if(!t._flags.sparse&&O===void 0){if(c.push(l("array.sparse",{key:D,path:q,pos:y,value:void 0},n.localize(q))),a.abortEarly)return c;p.shift();continue}const z=[r,...n.ancestors];for(const W of t.$_terms._exclusions)if(W.$_match(O,n.localize(q,z,W),a,{presence:"ignore"})){if(c.push(l("array.excludes",{pos:y,value:O},n.localize(q))),a.abortEarly)return c;k=!0,p.shift();break}if(k)continue;if(t.$_terms.ordered.length){if(p.length){const W=p.shift(),V=W.$_validate(O,n.localize(q,z,W),a);if(V.errors){if(c.push(...V.errors),a.abortEarly)return c}else if(W._flags.result==="strip")s.fastSplice(r,y),--y,--h;else{if(!t._flags.sparse&&V.value===void 0){if(c.push(l("array.sparse",{key:D,path:q,pos:y,value:void 0},n.localize(q))),a.abortEarly)return c;continue}r[y]=V.value}continue}if(!t.$_terms.items.length){if(c.push(l("array.orderedLength",{pos:y,limit:t.$_terms.ordered.length})),a.abortEarly)return c;break}}const U=[];let X=m.length;for(let W=0;W<X;++W){const V=n.localize(q,z,m[W]);V.snapshot();const Z=m[W].$_validate(O,V,a);if(U[W]=Z,!Z.errors){if(V.commit(),r[y]=Z.value,L=!0,s.fastSplice(m,W),--W,--X,!t._flags.sparse&&Z.value===void 0&&(c.push(l("array.sparse",{key:D,path:q,pos:y,value:void 0},n.localize(q))),a.abortEarly))return c;break}V.restore()}if(L)continue;const Q=a.stripUnknown&&!!a.stripUnknown.arrays||!1;X=E.length;for(const W of E){let V;const Z=m.indexOf(W);if(Z!==-1)V=U[Z];else{const J=n.localize(q,z,W);if(J.snapshot(),V=W.$_validate(O,J,a),!V.errors){J.commit(),W._flags.result==="strip"?(s.fastSplice(r,y),--y,--h):t._flags.sparse||V.value!==void 0?r[y]=V.value:(c.push(l("array.sparse",{key:D,path:q,pos:y,value:void 0},n.localize(q))),k=!0),L=!0;break}J.restore()}if(X===1){if(Q){s.fastSplice(r,y),--y,--h,L=!0;break}if(c.push(...V.errors),a.abortEarly)return c;k=!0;break}}if(!k&&(t.$_terms._inclusions.length||t.$_terms._requireds.length)&&!L){if(Q){s.fastSplice(r,y),--y,--h;continue}if(c.push(l("array.includes",{pos:y,value:O},n.localize(q))),a.abortEarly)return c}}return m.length&&s.fillMissedErrors(t,c,m,r,n,a),p.length&&(s.fillOrderedErrors(t,c,p,r,n,a),c.length||s.fillDefault(p,r,n,a)),c.length?c:r},priority:!0,manifest:!1},length:{method(r){return this.$_addRule({name:"length",args:{limit:r},operator:"="})},validate:(r,t,{limit:l},{name:n,operator:a,args:f})=>e.compare(r.length,l,a)?r:t.error("array."+n,{limit:f.limit,value:r}),args:[{name:"limit",ref:!0,assert:e.limit,message:"must be a positive integer"}]},max:{method(r){return this.$_addRule({name:"max",method:"length",args:{limit:r},operator:"<="})}},min:{method(r){return this.$_addRule({name:"min",method:"length",args:{limit:r},operator:">="})}},ordered:{method(...r){e.verifyFlat(r,"ordered");const t=this.$_addRule("items");for(let l=0;l<r.length;++l){const n=e.tryWithPath(()=>this.$_compile(r[l]),l,{append:!0});s.validateSingle(n,t),t.$_mutateRegister(n),t.$_terms.ordered.push(n)}return t.$_mutateRebuild()}},single:{method(r){const t=r===void 0||!!r;return o(!t||!this._flags._arrayItems,"Cannot specify single rule when array has array items"),this.$_setFlag("single",t)}},sort:{method(r={}){e.assertOptions(r,["by","order"]);const t={order:r.order||"ascending"};return r.by&&(t.by=i.ref(r.by,{ancestor:0}),o(!t.by.ancestor,"Cannot sort by ancestor")),this.$_addRule({name:"sort",args:{options:t}})},validate(r,{error:t,state:l,prefs:n,schema:a},{options:f}){const{value:m,errors:p}=s.sort(a,r,f,l,n);if(p)return p;for(let E=0;E<r.length;++E)if(r[E]!==m[E])return t("array.sort",{order:f.order,by:f.by?f.by.key:"value"});return r},convert:!0},sparse:{method(r){const t=r===void 0||!!r;return this._flags.sparse===t?this:(t?this.clone():this.$_addRule("items")).$_setFlag("sparse",t,{clone:!1})}},unique:{method(r,t={}){o(!r||typeof r=="function"||typeof r=="string","comparator must be a function or a string"),e.assertOptions(t,["ignoreUndefined","separator"]);const l={name:"unique",args:{options:t,comparator:r}};if(r)if(typeof r=="string"){const n=e.default(t.separator,".");l.path=n?r.split(n):[r]}else l.comparator=r;return this.$_addRule(l)},validate(r,{state:t,error:l,schema:n},{comparator:a,options:f},{comparator:m,path:p}){const E={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},w=m||g,c=f.ignoreUndefined;for(let h=0;h<r.length;++h){const y=p?d(r[h],p):r[h],O=m?E.custom:E[typeof y];if(o(O,"Failed to find unique map container for type",typeof y),O instanceof Map){const k=O.entries();let L;for(;!(L=k.next()).done;)if(w(L.value[0],y)){const D=t.localize([...t.path,h],[r,...t.ancestors]),q={pos:h,value:r[h],dupePos:L.value[1],dupeValue:r[L.value[1]]};return p&&(q.path=a),l("array.unique",q,D)}O.set(y,h)}else{if((!c||y!==void 0)&&O[y]!==void 0){const k={pos:h,value:r[h],dupePos:O[y],dupeValue:r[O[y]]};return p&&(k.path=a),l("array.unique",k,t.localize([...t.path,h],[r,...t.ancestors]))}O[y]=h}}return r},args:["comparator","options"],multi:!0}},cast:{set:{from:Array.isArray,to:(r,t)=>new Set(r)}},rebuild(r){r.$_terms._inclusions=[],r.$_terms._exclusions=[],r.$_terms._requireds=[];for(const t of r.$_terms.items)s.validateSingle(t,r),t._flags.presence==="required"?r.$_terms._requireds.push(t):t._flags.presence==="forbidden"?r.$_terms._exclusions.push(t):r.$_terms._inclusions.push(t);for(const t of r.$_terms.ordered)s.validateSingle(t,r)},manifest:{build:(r,t)=>(t.items&&(r=r.items(...t.items)),t.ordered&&(r=r.ordered(...t.ordered)),r)},messages:{"array.base":"{{#label}} must be an array","array.excludes":"{{#label}} contains an excluded value","array.hasKnown":"{{#label}} does not contain at least one required match for type {:#patternLabel}","array.hasUnknown":"{{#label}} does not contain at least one required match","array.includes":"{{#label}} does not match any of the allowed types","array.includesRequiredBoth":"{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)","array.includesRequiredKnowns":"{{#label}} does not contain {{#knownMisses}}","array.includesRequiredUnknowns":"{{#label}} does not contain {{#unknownMisses}} required value(s)","array.length":"{{#label}} must contain {{#limit}} items","array.max":"{{#label}} must contain less than or equal to {{#limit}} items","array.min":"{{#label}} must contain at least {{#limit}} items","array.orderedLength":"{{#label}} must contain at most {{#limit}} items","array.sort":"{{#label}} must be sorted in {#order} order by {{#by}}","array.sort.mismatching":"{{#label}} cannot be sorted due to mismatching types","array.sort.unsupported":"{{#label}} cannot be sorted due to unsupported type {#type}","array.sparse":"{{#label}} must not be a sparse array item","array.unique":"{{#label}} contains a duplicate value"}}),s.fillMissedErrors=function(r,t,l,n,a,f){const m=[];let p=0;for(const E of l){const w=E._flags.label;w?m.push(w):++p}m.length?p?t.push(r.$_createError("array.includesRequiredBoth",n,{knownMisses:m,unknownMisses:p},a,f)):t.push(r.$_createError("array.includesRequiredKnowns",n,{knownMisses:m},a,f)):t.push(r.$_createError("array.includesRequiredUnknowns",n,{unknownMisses:p},a,f))},s.fillOrderedErrors=function(r,t,l,n,a,f){const m=[];for(const p of l)p._flags.presence==="required"&&m.push(p);m.length&&s.fillMissedErrors(r,t,m,n,a,f)},s.fillDefault=function(r,t,l,n){const a=[];let f=!0;for(let m=r.length-1;m>=0;--m){const p=r[m],E=[t,...l.ancestors],w=p.$_validate(void 0,l.localize(l.path,E,p),n).value;if(f){if(w===void 0)continue;f=!1}a.unshift(w)}a.length&&t.push(...a)},s.fastSplice=function(r,t){let l=t;for(;l<r.length;)r[l++]=r[l];--r.length},s.validateSingle=function(r,t){(r.type==="array"||r._flags._arrayItems)&&(o(!t._flags.single,"Cannot specify array item with single rule enabled"),t.$_setFlag("_arrayItems",!0,{clone:!1}))},s.sort=function(r,t,l,n,a){const f=l.order==="ascending"?1:-1,m=-1*f,p=f,E=(w,c)=>{let h=s.compare(w,c,m,p);if(h!==null||(l.by&&(w=l.by.resolve(w,n,a),c=l.by.resolve(c,n,a)),h=s.compare(w,c,m,p),h!==null))return h;const y=typeof w;if(y!==typeof c)throw r.$_createError("array.sort.mismatching",t,null,n,a);if(y!=="number"&&y!=="string")throw r.$_createError("array.sort.unsupported",t,{type:y},n,a);return y==="number"?(w-c)*f:w<c?m:p};try{return{value:t.slice().sort(E)}}catch(w){return{errors:w}}},s.compare=function(r,t,l,n){return r===t?0:r===void 0?1:t===void 0?-1:r===null?n:t===null?l:null}},4937:(A,S,v)=>{const o=v(375),g=v(8068),d=v(8160),u=v(2036),e={isBool:function(i){return typeof i=="boolean"}};A.exports=g.extend({type:"boolean",flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:"values"},truthy:{init:null,manifest:"values"}},coerce(i,{schema:s}){if(typeof i!="boolean"){if(typeof i=="string"){const r=s._flags.sensitive?i:i.toLowerCase();i=r==="true"||r!=="false"&&i}return typeof i!="boolean"&&(i=s.$_terms.truthy&&s.$_terms.truthy.has(i,null,null,!s._flags.sensitive)||(!s.$_terms.falsy||!s.$_terms.falsy.has(i,null,null,!s._flags.sensitive))&&i),{value:i}}},validate(i,{error:s}){if(typeof i!="boolean")return{value:i,errors:s("boolean.base")}},rules:{truthy:{method(...i){d.verifyFlat(i,"truthy");const s=this.clone();s.$_terms.truthy=s.$_terms.truthy||new u;for(let r=0;r<i.length;++r){const t=i[r];o(t!==void 0,"Cannot call truthy with undefined"),s.$_terms.truthy.add(t)}return s}},falsy:{method(...i){d.verifyFlat(i,"falsy");const s=this.clone();s.$_terms.falsy=s.$_terms.falsy||new u;for(let r=0;r<i.length;++r){const t=i[r];o(t!==void 0,"Cannot call falsy with undefined"),s.$_terms.falsy.add(t)}return s}},sensitive:{method(i=!0){return this.$_setFlag("sensitive",i)}}},cast:{number:{from:e.isBool,to:(i,s)=>i?1:0},string:{from:e.isBool,to:(i,s)=>i?"true":"false"}},manifest:{build:(i,s)=>(s.truthy&&(i=i.truthy(...s.truthy)),s.falsy&&(i=i.falsy(...s.falsy)),i)},messages:{"boolean.base":"{{#label}} must be a boolean"}})},7500:(A,S,v)=>{const o=v(375),g=v(8068),d=v(8160),u=v(3328),e={isDate:function(i){return i instanceof Date}};A.exports=g.extend({type:"date",coerce:{from:["number","string"],method:(i,{schema:s})=>({value:e.parse(i,s._flags.format)||i})},validate(i,{schema:s,error:r,prefs:t}){if(i instanceof Date&&!isNaN(i.getTime()))return;const l=s._flags.format;return t.convert&&l&&typeof i=="string"?{value:i,errors:r("date.format",{format:l})}:{value:i,errors:r("date.base")}},rules:{compare:{method:!1,validate(i,s,{date:r},{name:t,operator:l,args:n}){const a=r==="now"?Date.now():r.getTime();return d.compare(i.getTime(),a,l)?i:s.error("date."+t,{limit:n.date,value:i})},args:[{name:"date",ref:!0,normalize:i=>i==="now"?i:e.parse(i),assert:i=>i!==null,message:"must have a valid date format"}]},format:{method(i){return o(["iso","javascript","unix"].includes(i),"Unknown date format",i),this.$_setFlag("format",i)}},greater:{method(i){return this.$_addRule({name:"greater",method:"compare",args:{date:i},operator:">"})}},iso:{method(){return this.format("iso")}},less:{method(i){return this.$_addRule({name:"less",method:"compare",args:{date:i},operator:"<"})}},max:{method(i){return this.$_addRule({name:"max",method:"compare",args:{date:i},operator:"<="})}},min:{method(i){return this.$_addRule({name:"min",method:"compare",args:{date:i},operator:">="})}},timestamp:{method(i="javascript"){return o(["javascript","unix"].includes(i),'"type" must be one of "javascript, unix"'),this.format(i)}}},cast:{number:{from:e.isDate,to:(i,s)=>i.getTime()},string:{from:e.isDate,to:(i,{prefs:s})=>u.date(i,s)}},messages:{"date.base":"{{#label}} must be a valid date","date.format":'{{#label}} must be in {msg("date.format." + #format) || #format} format',"date.greater":"{{#label}} must be greater than {{:#limit}}","date.less":"{{#label}} must be less than {{:#limit}}","date.max":"{{#label}} must be less than or equal to {{:#limit}}","date.min":"{{#label}} must be greater than or equal to {{:#limit}}","date.format.iso":"ISO 8601 date","date.format.javascript":"timestamp or number of milliseconds","date.format.unix":"timestamp or number of seconds"}}),e.parse=function(i,s){if(i instanceof Date)return i;if(typeof i!="string"&&(isNaN(i)||!isFinite(i))||/^\s*$/.test(i))return null;if(s==="iso")return d.isIsoDate(i)?e.date(i.toString()):null;const r=i;if(typeof i=="string"&&/^[+-]?\d+(\.\d+)?$/.test(i)&&(i=parseFloat(i)),s){if(s==="javascript")return e.date(1*i);if(s==="unix")return e.date(1e3*i);if(typeof r=="string")return null}return e.date(i)},e.date=function(i){const s=new Date(i);return isNaN(s.getTime())?null:s}},390:(A,S,v)=>{const o=v(375),g=v(7824);A.exports=g.extend({type:"function",properties:{typeof:"function"},rules:{arity:{method(d){return o(Number.isSafeInteger(d)&&d>=0,"n must be a positive integer"),this.$_addRule({name:"arity",args:{n:d}})},validate:(d,u,{n:e})=>d.length===e?d:u.error("function.arity",{n:e})},class:{method(){return this.$_addRule("class")},validate:(d,u)=>/^\s*class\s/.test(d.toString())?d:u.error("function.class",{value:d})},minArity:{method(d){return o(Number.isSafeInteger(d)&&d>0,"n must be a strict positive integer"),this.$_addRule({name:"minArity",args:{n:d}})},validate:(d,u,{n:e})=>d.length>=e?d:u.error("function.minArity",{n:e})},maxArity:{method(d){return o(Number.isSafeInteger(d)&&d>=0,"n must be a positive integer"),this.$_addRule({name:"maxArity",args:{n:d}})},validate:(d,u,{n:e})=>d.length<=e?d:u.error("function.maxArity",{n:e})}},messages:{"function.arity":"{{#label}} must have an arity of {{#n}}","function.class":"{{#label}} must be a class","function.maxArity":"{{#label}} must have an arity lesser or equal to {{#n}}","function.minArity":"{{#label}} must have an arity greater or equal to {{#n}}"}})},7824:(A,S,v)=>{const o=v(978),g=v(375),d=v(8571),u=v(3652),e=v(8068),i=v(8160),s=v(3292),r=v(6354),t=v(6133),l=v(3328),n={renameDefaults:{alias:!1,multiple:!1,override:!1}};A.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:(a,f)=>a.keys(f),validate(a,{schema:f,error:m,state:p,prefs:E}){if(!a||typeof a!==f.$_property("typeof")||Array.isArray(a))return{value:a,errors:m("object.base",{type:f.$_property("typeof")})};if(!(f.$_terms.renames||f.$_terms.dependencies||f.$_terms.keys||f.$_terms.patterns||f.$_terms.externals))return;a=n.clone(a,E);const w=[];if(f.$_terms.renames&&!n.rename(f,a,p,E,w))return{value:a,errors:w};if(!f.$_terms.keys&&!f.$_terms.patterns&&!f.$_terms.dependencies)return{value:a,errors:w};const c=new Set(Object.keys(a));if(f.$_terms.keys){const h=[a,...p.ancestors];for(const y of f.$_terms.keys){const O=y.key,k=a[O];c.delete(O);const L=p.localize([...p.path,O],h,y),D=y.schema.$_validate(k,L,E);if(D.errors){if(E.abortEarly)return{value:a,errors:D.errors};D.value!==void 0&&(a[O]=D.value),w.push(...D.errors)}else y.schema._flags.result==="strip"||D.value===void 0&&k!==void 0?delete a[O]:D.value!==void 0&&(a[O]=D.value)}}if(c.size||f._flags._hasPatternMatch){const h=n.unknown(f,a,c,w,p,E);if(h)return h}if(f.$_terms.dependencies)for(const h of f.$_terms.dependencies){if(h.key!==null&&n.isPresent(h.options)(h.key.resolve(a,p,E,null,{shadow:!1}))===!1)continue;const y=n.dependencies[h.rel](f,h,a,p,E);if(y){const O=f.$_createError(y.code,a,y.context,p,E);if(E.abortEarly)return{value:a,errors:O};w.push(O)}}return{value:a,errors:w}},rules:{and:{method(...a){return i.verifyFlat(a,"and"),n.dependency(this,"and",null,a)}},append:{method(a){return a==null||Object.keys(a).length===0?this:this.keys(a)}},assert:{method(a,f,m){l.isTemplate(a)||(a=s.ref(a)),g(m===void 0||typeof m=="string","Message must be a string"),f=this.$_compile(f,{appendPath:!0});const p=this.$_addRule({name:"assert",args:{subject:a,schema:f,message:m}});return p.$_mutateRegister(a),p.$_mutateRegister(f),p},validate(a,{error:f,prefs:m,state:p},{subject:E,schema:w,message:c}){const h=E.resolve(a,p,m),y=t.isRef(E)?E.absolute(p):[];return w.$_match(h,p.localize(y,[a,...p.ancestors],w),m)?a:f("object.assert",{subject:E,message:c})},args:["subject","schema","message"],multi:!0},instance:{method(a,f){return g(typeof a=="function","constructor must be a function"),f=f||a.name,this.$_addRule({name:"instance",args:{constructor:a,name:f}})},validate:(a,f,{constructor:m,name:p})=>a instanceof m?a:f.error("object.instance",{type:p,value:a}),args:["constructor","name"]},keys:{method(a){g(a===void 0||typeof a=="object","Object schema must be a valid object"),g(!i.isSchema(a),"Object schema cannot be a joi schema");const f=this.clone();if(a)if(Object.keys(a).length){f.$_terms.keys=f.$_terms.keys?f.$_terms.keys.filter(m=>!a.hasOwnProperty(m.key)):new n.Keys;for(const m in a)i.tryWithPath(()=>f.$_terms.keys.push({key:m,schema:this.$_compile(a[m])}),m)}else f.$_terms.keys=new n.Keys;else f.$_terms.keys=null;return f.$_mutateRebuild()}},length:{method(a){return this.$_addRule({name:"length",args:{limit:a},operator:"="})},validate:(a,f,{limit:m},{name:p,operator:E,args:w})=>i.compare(Object.keys(a).length,m,E)?a:f.error("object."+p,{limit:w.limit,value:a}),args:[{name:"limit",ref:!0,assert:i.limit,message:"must be a positive integer"}]},max:{method(a){return this.$_addRule({name:"max",method:"length",args:{limit:a},operator:"<="})}},min:{method(a){return this.$_addRule({name:"min",method:"length",args:{limit:a},operator:">="})}},nand:{method(...a){return i.verifyFlat(a,"nand"),n.dependency(this,"nand",null,a)}},or:{method(...a){return i.verifyFlat(a,"or"),n.dependency(this,"or",null,a)}},oxor:{method(...a){return n.dependency(this,"oxor",null,a)}},pattern:{method(a,f,m={}){const p=a instanceof RegExp;p||(a=this.$_compile(a,{appendPath:!0})),g(f!==void 0,"Invalid rule"),i.assertOptions(m,["fallthrough","matches"]),p&&g(!a.flags.includes("g")&&!a.flags.includes("y"),"pattern should not use global or sticky mode"),f=this.$_compile(f,{appendPath:!0});const E=this.clone();E.$_terms.patterns=E.$_terms.patterns||[];const w={[p?"regex":"schema"]:a,rule:f};return m.matches&&(w.matches=this.$_compile(m.matches),w.matches.type!=="array"&&(w.matches=w.matches.$_root.array().items(w.matches)),E.$_mutateRegister(w.matches),E.$_setFlag("_hasPatternMatch",!0,{clone:!1})),m.fallthrough&&(w.fallthrough=!0),E.$_terms.patterns.push(w),E.$_mutateRegister(f),E}},ref:{method(){return this.$_addRule("ref")},validate:(a,f)=>t.isRef(a)?a:f.error("object.refType",{value:a})},regex:{method(){return this.$_addRule("regex")},validate:(a,f)=>a instanceof RegExp?a:f.error("object.regex",{value:a})},rename:{method(a,f,m={}){g(typeof a=="string"||a instanceof RegExp,"Rename missing the from argument"),g(typeof f=="string"||f instanceof l,"Invalid rename to argument"),g(f!==a,"Cannot rename key to same name:",a),i.assertOptions(m,["alias","ignoreUndefined","override","multiple"]);const p=this.clone();p.$_terms.renames=p.$_terms.renames||[];for(const E of p.$_terms.renames)g(E.from!==a,"Cannot rename the same key multiple times");return f instanceof l&&p.$_mutateRegister(f),p.$_terms.renames.push({from:a,to:f,options:o(n.renameDefaults,m)}),p}},schema:{method(a="any"){return this.$_addRule({name:"schema",args:{type:a}})},validate:(a,f,{type:m})=>!i.isSchema(a)||m!=="any"&&a.type!==m?f.error("object.schema",{type:m}):a},unknown:{method(a){return this.$_setFlag("unknown",a!==!1)}},with:{method(a,f,m={}){return n.dependency(this,"with",a,f,m)}},without:{method(a,f,m={}){return n.dependency(this,"without",a,f,m)}},xor:{method(...a){return i.verifyFlat(a,"xor"),n.dependency(this,"xor",null,a)}}},overrides:{default(a,f){return a===void 0&&(a=i.symbols.deepDefault),this.$_parent("default",a,f)}},rebuild(a){if(a.$_terms.keys){const f=new u.Sorter;for(const m of a.$_terms.keys)i.tryWithPath(()=>f.add(m,{after:m.schema.$_rootReferences(),group:m.key}),m.key);a.$_terms.keys=new n.Keys(...f.nodes)}},manifest:{build(a,f){if(f.keys&&(a=a.keys(f.keys)),f.dependencies)for(const{rel:m,key:p=null,peers:E,options:w}of f.dependencies)a=n.dependency(a,m,p,E,w);if(f.patterns)for(const{regex:m,schema:p,rule:E,fallthrough:w,matches:c}of f.patterns)a=a.pattern(m||p,E,{fallthrough:w,matches:c});if(f.renames)for(const{from:m,to:p,options:E}of f.renames)a=a.rename(m,p,E);return a}},messages:{"object.and":"{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}","object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":"{{#label}} must be of type {{#type}}","object.instance":"{{#label}} must be an instance of {{:#type}}","object.length":'{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}',"object.max":'{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}',"object.min":'{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}',"object.missing":"{{#label}} must contain at least one of {{#peersWithLabels}}","object.nand":"{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}","object.oxor":"{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}","object.pattern.match":"{{#label}} keys failed to match pattern requirements","object.refType":"{{#label}} must be a Joi reference","object.regex":"{{#label}} must be a RegExp object","object.rename.multiple":"{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}","object.rename.override":"{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists","object.schema":"{{#label}} must be a Joi schema of {{#type}} type","object.unknown":"{{#label}} is not allowed","object.with":"{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}","object.without":"{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}","object.xor":"{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}"}}),n.clone=function(a,f){if(typeof a=="object"){if(f.nonEnumerables)return d(a,{shallow:!0});const p=Object.create(Object.getPrototypeOf(a));return Object.assign(p,a),p}const m=function(...p){return a.apply(this,p)};return m.prototype=d(a.prototype),Object.defineProperty(m,"name",{value:a.name,writable:!1}),Object.defineProperty(m,"length",{value:a.length,writable:!1}),Object.assign(m,a),m},n.dependency=function(a,f,m,p,E){g(m===null||typeof m=="string",f,"key must be a strings"),E||(E=p.length>1&&typeof p[p.length-1]=="object"?p.pop():{}),i.assertOptions(E,["separator","isPresent"]),p=[].concat(p);const w=i.default(E.separator,"."),c=[];for(const y of p)g(typeof y=="string",f,"peers must be strings"),c.push(s.ref(y,{separator:w,ancestor:0,prefix:!1}));m!==null&&(m=s.ref(m,{separator:w,ancestor:0,prefix:!1}));const h=a.clone();return h.$_terms.dependencies=h.$_terms.dependencies||[],h.$_terms.dependencies.push(new n.Dependency(f,m,c,p,E)),h},n.dependencies={and(a,f,m,p,E){const w=[],c=[],h=f.peers.length,y=n.isPresent(f.options);for(const O of f.peers)y(O.resolve(m,p,E,null,{shadow:!1}))===!1?w.push(O.key):c.push(O.key);if(w.length!==h&&c.length!==h)return{code:"object.and",context:{present:c,presentWithLabels:n.keysToLabels(a,c),missing:w,missingWithLabels:n.keysToLabels(a,w)}}},nand(a,f,m,p,E){const w=[],c=n.isPresent(f.options);for(const O of f.peers)c(O.resolve(m,p,E,null,{shadow:!1}))&&w.push(O.key);if(w.length!==f.peers.length)return;const h=f.paths[0],y=f.paths.slice(1);return{code:"object.nand",context:{main:h,mainWithLabel:n.keysToLabels(a,h),peers:y,peersWithLabels:n.keysToLabels(a,y)}}},or(a,f,m,p,E){const w=n.isPresent(f.options);for(const c of f.peers)if(w(c.resolve(m,p,E,null,{shadow:!1})))return;return{code:"object.missing",context:{peers:f.paths,peersWithLabels:n.keysToLabels(a,f.paths)}}},oxor(a,f,m,p,E){const w=[],c=n.isPresent(f.options);for(const y of f.peers)c(y.resolve(m,p,E,null,{shadow:!1}))&&w.push(y.key);if(!w.length||w.length===1)return;const h={peers:f.paths,peersWithLabels:n.keysToLabels(a,f.paths)};return h.present=w,h.presentWithLabels=n.keysToLabels(a,w),{code:"object.oxor",context:h}},with(a,f,m,p,E){const w=n.isPresent(f.options);for(const c of f.peers)if(w(c.resolve(m,p,E,null,{shadow:!1}))===!1)return{code:"object.with",context:{main:f.key.key,mainWithLabel:n.keysToLabels(a,f.key.key),peer:c.key,peerWithLabel:n.keysToLabels(a,c.key)}}},without(a,f,m,p,E){const w=n.isPresent(f.options);for(const c of f.peers)if(w(c.resolve(m,p,E,null,{shadow:!1})))return{code:"object.without",context:{main:f.key.key,mainWithLabel:n.keysToLabels(a,f.key.key),peer:c.key,peerWithLabel:n.keysToLabels(a,c.key)}}},xor(a,f,m,p,E){const w=[],c=n.isPresent(f.options);for(const y of f.peers)c(y.resolve(m,p,E,null,{shadow:!1}))&&w.push(y.key);if(w.length===1)return;const h={peers:f.paths,peersWithLabels:n.keysToLabels(a,f.paths)};return w.length===0?{code:"object.missing",context:h}:(h.present=w,h.presentWithLabels=n.keysToLabels(a,w),{code:"object.xor",context:h})}},n.keysToLabels=function(a,f){return Array.isArray(f)?f.map(m=>a.$_mapLabels(m)):a.$_mapLabels(f)},n.isPresent=function(a){return typeof a.isPresent=="function"?a.isPresent:f=>f!==void 0},n.rename=function(a,f,m,p,E){const w={};for(const c of a.$_terms.renames){const h=[],y=typeof c.from!="string";if(y)for(const O in f){if(f[O]===void 0&&c.options.ignoreUndefined||O===c.to)continue;const k=c.from.exec(O);k&&h.push({from:O,to:c.to,match:k})}else!Object.prototype.hasOwnProperty.call(f,c.from)||f[c.from]===void 0&&c.options.ignoreUndefined||h.push(c);for(const O of h){const k=O.from;let L=O.to;if(L instanceof l&&(L=L.render(f,m,p,O.match)),k!==L){if(!c.options.multiple&&w[L]&&(E.push(a.$_createError("object.rename.multiple",f,{from:k,to:L,pattern:y},m,p)),p.abortEarly)||Object.prototype.hasOwnProperty.call(f,L)&&!c.options.override&&!w[L]&&(E.push(a.$_createError("object.rename.override",f,{from:k,to:L,pattern:y},m,p)),p.abortEarly))return!1;f[k]===void 0?delete f[L]:f[L]=f[k],w[L]=!0,c.options.alias||delete f[k]}}}return!0},n.unknown=function(a,f,m,p,E,w){if(a.$_terms.patterns){let c=!1;const h=a.$_terms.patterns.map(O=>{if(O.matches)return c=!0,[]}),y=[f,...E.ancestors];for(const O of m){const k=f[O],L=[...E.path,O];for(let D=0;D<a.$_terms.patterns.length;++D){const q=a.$_terms.patterns[D];if(q.regex){const X=q.regex.test(O);if(E.mainstay.tracer.debug(E,"rule",`pattern.${D}`,X?"pass":"error"),!X)continue}else if(!q.schema.$_match(O,E.nest(q.schema,`pattern.${D}`),w))continue;m.delete(O);const z=E.localize(L,y,{schema:q.rule,key:O}),U=q.rule.$_validate(k,z,w);if(U.errors){if(w.abortEarly)return{value:f,errors:U.errors};p.push(...U.errors)}if(q.matches&&h[D].push(O),f[O]=U.value,!q.fallthrough)break}}if(c)for(let O=0;O<h.length;++O){const k=h[O];if(!k)continue;const L=a.$_terms.patterns[O].matches,D=E.localize(E.path,y,L),q=L.$_validate(k,D,w);if(q.errors){const z=r.details(q.errors,{override:!1});z.matches=k;const U=a.$_createError("object.pattern.match",f,z,E,w);if(w.abortEarly)return{value:f,errors:U};p.push(U)}}}if(m.size&&(a.$_terms.keys||a.$_terms.patterns)){if(w.stripUnknown&&!a._flags.unknown||w.skipFunctions){const c=!(!w.stripUnknown||w.stripUnknown!==!0&&!w.stripUnknown.objects);for(const h of m)c?(delete f[h],m.delete(h)):typeof f[h]=="function"&&m.delete(h)}if(!i.default(a._flags.unknown,w.allowUnknown))for(const c of m){const h=E.localize([...E.path,c],[]),y=a.$_createError("object.unknown",f[c],{child:c},h,w,{flags:!1});if(w.abortEarly)return{value:f,errors:y};p.push(y)}}},n.Dependency=class{constructor(a,f,m,p,E){this.rel=a,this.key=f,this.peers=m,this.paths=p,this.options=E}describe(){const a={rel:this.rel,peers:this.paths};return this.key!==null&&(a.key=this.key.key),this.peers[0].separator!=="."&&(a.options={...a.options,separator:this.peers[0].separator}),this.options.isPresent&&(a.options={...a.options,isPresent:this.options.isPresent}),a}},n.Keys=class extends Array{concat(a){const f=this.slice(),m=new Map;for(let p=0;p<f.length;++p)m.set(f[p].key,p);for(const p of a){const E=p.key,w=m.get(E);w!==void 0?f[w]={key:E,schema:f[w].schema.concat(p.schema)}:f.push(p)}return f}}},8785:(A,S,v)=>{const o=v(375),g=v(8068),d=v(8160),u=v(3292),e=v(6354),i={};A.exports=g.extend({type:"link",properties:{schemaChain:!0},terms:{link:{init:null,manifest:"single",register:!1}},args:(s,r)=>s.ref(r),validate(s,{schema:r,state:t,prefs:l}){o(r.$_terms.link,"Uninitialized link schema");const n=i.generate(r,s,t,l),a=r.$_terms.link[0].ref;return n.$_validate(s,t.nest(n,`link:${a.display}:${n.type}`),l)},generate:(s,r,t,l)=>i.generate(s,r,t,l),rules:{ref:{method(s){o(!this.$_terms.link,"Cannot reinitialize schema"),s=u.ref(s),o(s.type==="value"||s.type==="local","Invalid reference type:",s.type),o(s.type==="local"||s.ancestor==="root"||s.ancestor>0,"Link cannot reference itself");const r=this.clone();return r.$_terms.link=[{ref:s}],r}},relative:{method(s=!0){return this.$_setFlag("relative",s)}}},overrides:{concat(s){o(this.$_terms.link,"Uninitialized link schema"),o(d.isSchema(s),"Invalid schema object"),o(s.type!=="link","Cannot merge type link with another link");const r=this.clone();return r.$_terms.whens||(r.$_terms.whens=[]),r.$_terms.whens.push({concat:s}),r.$_mutateRebuild()}},manifest:{build:(s,r)=>(o(r.link,"Invalid link description missing link"),s.ref(r.link))}}),i.generate=function(s,r,t,l){let n=t.mainstay.links.get(s);if(n)return n._generate(r,t,l).schema;const a=s.$_terms.link[0].ref,{perspective:f,path:m}=i.perspective(a,t);i.assert(f,"which is outside of schema boundaries",a,s,t,l);try{n=m.length?f.$_reach(m):f}catch{i.assert(!1,"to non-existing schema",a,s,t,l)}return i.assert(n.type!=="link","which is another link",a,s,t,l),s._flags.relative||t.mainstay.links.set(s,n),n._generate(r,t,l).schema},i.perspective=function(s,r){if(s.type==="local"){for(const{schema:t,key:l}of r.schemas){if((t._flags.id||l)===s.path[0])return{perspective:t,path:s.path.slice(1)};if(t.$_terms.shared){for(const n of t.$_terms.shared)if(n._flags.id===s.path[0])return{perspective:n,path:s.path.slice(1)}}}return{perspective:null,path:null}}return s.ancestor==="root"?{perspective:r.schemas[r.schemas.length-1].schema,path:s.path}:{perspective:r.schemas[s.ancestor]&&r.schemas[s.ancestor].schema,path:s.path}},i.assert=function(s,r,t,l,n,a){s||o(!1,`"${e.label(l._flags,n,a)}" contains link reference "${t.display}" ${r}`)}},3832:(A,S,v)=>{const o=v(375),g=v(8068),d=v(8160),u={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(e){const i=e.toString(),s=i.indexOf("."),r=i.indexOf("e");return(s<0?0:(r<0?i.length:r)-s-1)+(r<0?0:Math.max(0,-parseInt(i.slice(r+1))))}};A.exports=g.extend({type:"number",flags:{unsafe:{default:!1}},coerce:{from:"string",method(e,{schema:i,error:s}){if(!e.match(u.numberRx))return;e=e.trim();const r={value:parseFloat(e)};if(r.value===0&&(r.value=0),!i._flags.unsafe)if(e.match(/e/i)){if(u.extractSignificantDigits(e)!==u.extractSignificantDigits(String(r.value)))return r.errors=s("number.unsafe"),r}else{const t=r.value.toString();if(t.match(/e/i))return r;if(t!==u.normalizeDecimal(e))return r.errors=s("number.unsafe"),r}return r}},validate(e,{schema:i,error:s,prefs:r}){if(e===1/0||e===-1/0)return{value:e,errors:s("number.infinity")};if(!d.isNumber(e))return{value:e,errors:s("number.base")};const t={value:e};if(r.convert){const l=i.$_getRule("precision");if(l){const n=Math.pow(10,l.args.limit);t.value=Math.round(t.value*n)/n}}return t.value===0&&(t.value=0),!i._flags.unsafe&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER)&&(t.errors=s("number.unsafe")),t},rules:{compare:{method:!1,validate:(e,i,{limit:s},{name:r,operator:t,args:l})=>d.compare(e,s,t)?e:i.error("number."+r,{limit:l.limit,value:e}),args:[{name:"limit",ref:!0,assert:d.isNumber,message:"must be a number"}]},greater:{method(e){return this.$_addRule({name:"greater",method:"compare",args:{limit:e},operator:">"})}},integer:{method(){return this.$_addRule("integer")},validate:(e,i)=>Math.trunc(e)-e==0?e:i.error("number.integer")},less:{method(e){return this.$_addRule({name:"less",method:"compare",args:{limit:e},operator:"<"})}},max:{method(e){return this.$_addRule({name:"max",method:"compare",args:{limit:e},operator:"<="})}},min:{method(e){return this.$_addRule({name:"min",method:"compare",args:{limit:e},operator:">="})}},multiple:{method(e){const i=typeof e=="number"?u.decimalPlaces(e):null,s=Math.pow(10,i);return this.$_addRule({name:"multiple",args:{base:e,baseDecimalPlace:i,pfactor:s}})},validate:(e,i,{base:s,baseDecimalPlace:r,pfactor:t},l)=>u.decimalPlaces(e)>r?i.error("number.multiple",{multiple:l.args.base,value:e}):Math.round(t*e)%Math.round(t*s)==0?e:i.error("number.multiple",{multiple:l.args.base,value:e}),args:[{name:"base",ref:!0,assert:e=>typeof e=="number"&&isFinite(e)&&e>0,message:"must be a positive number"},"baseDecimalPlace","pfactor"],multi:!0},negative:{method(){return this.sign("negative")}},port:{method(){return this.$_addRule("port")},validate:(e,i)=>Number.isSafeInteger(e)&&e>=0&&e<=65535?e:i.error("number.port")},positive:{method(){return this.sign("positive")}},precision:{method(e){return o(Number.isSafeInteger(e),"limit must be an integer"),this.$_addRule({name:"precision",args:{limit:e}})},validate(e,i,{limit:s}){const r=e.toString().match(u.precisionRx);return Math.max((r[1]?r[1].length:0)-(r[2]?parseInt(r[2],10):0),0)<=s?e:i.error("number.precision",{limit:s,value:e})},convert:!0},sign:{method(e){return o(["negative","positive"].includes(e),"Invalid sign",e),this.$_addRule({name:"sign",args:{sign:e}})},validate:(e,i,{sign:s})=>s==="negative"&&e<0||s==="positive"&&e>0?e:i.error(`number.${s}`)},unsafe:{method(e=!0){return o(typeof e=="boolean","enabled must be a boolean"),this.$_setFlag("unsafe",e)}}},cast:{string:{from:e=>typeof e=="number",to:(e,i)=>e.toString()}},messages:{"number.base":"{{#label}} must be a number","number.greater":"{{#label}} must be greater than {{#limit}}","number.infinity":"{{#label}} cannot be infinity","number.integer":"{{#label}} must be an integer","number.less":"{{#label}} must be less than {{#limit}}","number.max":"{{#label}} must be less than or equal to {{#limit}}","number.min":"{{#label}} must be greater than or equal to {{#limit}}","number.multiple":"{{#label}} must be a multiple of {{#multiple}}","number.negative":"{{#label}} must be a negative number","number.port":"{{#label}} must be a valid port","number.positive":"{{#label}} must be a positive number","number.precision":"{{#label}} must have no more than {{#limit}} decimal places","number.unsafe":"{{#label}} must be a safe number"}}),u.extractSignificantDigits=function(e){return e.replace(u.exponentialPartRegex,"").replace(u.dotRegex,"").replace(u.trailingZerosRegex,"").replace(u.leadingSignAndZerosRegex,"")},u.normalizeDecimal=function(e){return(e=e.replace(/^\+/,"").replace(/\.0*$/,"").replace(/^(-?)\.([^\.]*)$/,"$10.$2").replace(/^(-?)0+([0-9])/,"$1$2")).includes(".")&&e.endsWith("0")&&(e=e.replace(/0+$/,"")),e==="-0"?"0":e}},8966:(A,S,v)=>{const o=v(7824);A.exports=o.extend({type:"object",cast:{map:{from:g=>g&&typeof g=="object",to:(g,d)=>new Map(Object.entries(g))}}})},7417:(A,S,v)=>{const o=v(375),g=v(5380),d=v(1745),u=v(9959),e=v(6064),i=v(9926),s=v(5752),r=v(8068),t=v(8160),l={tlds:i instanceof Set&&{tlds:{allow:i,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:{withPrefix:/^0x[0-9a-f]+$/i,withOptionalPrefix:/^(?:0x)?[0-9a-f]+$/i,withoutPrefix:/^[0-9a-f]+$/i},ipRegex:u.regex({cidr:"forbidden"}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":"}","[":"]","(":")","":""},guidVersions:{uuidv1:"1",uuidv2:"2",uuidv3:"3",uuidv4:"4",uuidv5:"5",uuidv6:"6",uuidv7:"7",uuidv8:"8"},guidSeparators:new Set([void 0,!0,!1,"-",":"]),normalizationForms:["NFC","NFD","NFKC","NFKD"]};A.exports=r.extend({type:"string",flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:"string",method(n,{schema:a,state:f,prefs:m}){const p=a.$_getRule("normalize");p&&(n=n.normalize(p.args.form));const E=a.$_getRule("case");E&&(n=E.args.direction==="upper"?n.toLocaleUpperCase():n.toLocaleLowerCase());const w=a.$_getRule("trim");if(w&&w.args.enabled&&(n=n.trim()),a.$_terms.replacements)for(const h of a.$_terms.replacements)n=n.replace(h.pattern,h.replacement);const c=a.$_getRule("hex");if(c&&c.args.options.byteAligned&&n.length%2!=0&&(n=`0${n}`),a.$_getRule("isoDate")){const h=l.isoDate(n);h&&(n=h)}if(a._flags.truncate){const h=a.$_getRule("max");if(h){let y=h.args.limit;if(t.isResolvable(y)&&(y=y.resolve(n,f,m),!t.limit(y)))return{value:n,errors:a.$_createError("any.ref",y,{ref:h.args.limit,arg:"limit",reason:"must be a positive integer"},f,m)};n=n.slice(0,y)}}return{value:n}}},validate(n,{schema:a,error:f}){if(typeof n!="string")return{value:n,errors:f("string.base")};if(n===""){const m=a.$_getRule("min");return m&&m.args.limit===0?void 0:{value:n,errors:f("string.empty")}}},rules:{alphanum:{method(){return this.$_addRule("alphanum")},validate:(n,a)=>/^[a-zA-Z0-9]+$/.test(n)?n:a.error("string.alphanum")},base64:{method(n={}){return t.assertOptions(n,["paddingRequired","urlSafe"]),n={urlSafe:!1,paddingRequired:!0,...n},o(typeof n.paddingRequired=="boolean","paddingRequired must be boolean"),o(typeof n.urlSafe=="boolean","urlSafe must be boolean"),this.$_addRule({name:"base64",args:{options:n}})},validate:(n,a,{options:f})=>l.base64Regex[f.paddingRequired][f.urlSafe].test(n)?n:a.error("string.base64")},case:{method(n){return o(["lower","upper"].includes(n),"Invalid case:",n),this.$_addRule({name:"case",args:{direction:n}})},validate:(n,a,{direction:f})=>f==="lower"&&n===n.toLocaleLowerCase()||f==="upper"&&n===n.toLocaleUpperCase()?n:a.error(`string.${f}case`),convert:!0},creditCard:{method(){return this.$_addRule("creditCard")},validate(n,a){let f=n.length,m=0,p=1;for(;f--;){const E=n.charAt(f)*p;m+=E-9*(E>9),p^=3}return m>0&&m%10==0?n:a.error("string.creditCard")}},dataUri:{method(n={}){return t.assertOptions(n,["paddingRequired"]),n={paddingRequired:!0,...n},o(typeof n.paddingRequired=="boolean","paddingRequired must be boolean"),this.$_addRule({name:"dataUri",args:{options:n}})},validate(n,a,{options:f}){const m=n.match(l.dataUriRegex);return m&&(!m[2]||m[2]!=="base64"||l.base64Regex[f.paddingRequired].false.test(m[3]))?n:a.error("string.dataUri")}},domain:{method(n){n&&t.assertOptions(n,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const a=l.addressOptions(n);return this.$_addRule({name:"domain",args:{options:n},address:a})},validate:(n,a,f,{address:m})=>g.isValid(n,m)?n:a.error("string.domain")},email:{method(n={}){t.assertOptions(n,["allowFullyQualified","allowUnicode","ignoreLength","maxDomainSegments","minDomainSegments","multiple","separator","tlds"]),o(n.multiple===void 0||typeof n.multiple=="boolean","multiple option must be an boolean");const a=l.addressOptions(n),f=new RegExp(`\\s*[${n.separator?e(n.separator):","}]\\s*`);return this.$_addRule({name:"email",args:{options:n},regex:f,address:a})},validate(n,a,{options:f},{regex:m,address:p}){const E=f.multiple?n.split(m):[n],w=[];for(const c of E)d.isValid(c,p)||w.push(c);return w.length?a.error("string.email",{value:n,invalids:w}):n}},guid:{alias:"uuid",method(n={}){t.assertOptions(n,["version","separator"]);let a="";if(n.version){const p=[].concat(n.version);o(p.length>=1,"version must have at least 1 valid version specified");const E=new Set;for(let w=0;w<p.length;++w){const c=p[w];o(typeof c=="string","version at position "+w+" must be a string");const h=l.guidVersions[c.toLowerCase()];o(h,"version at position "+w+" must be one of "+Object.keys(l.guidVersions).join(", ")),o(!E.has(h),"version at position "+w+" must not be a duplicate"),a+=h,E.add(h)}}o(l.guidSeparators.has(n.separator),'separator must be one of true, false, "-", or ":"');const f=n.separator===void 0?"[:-]?":n.separator===!0?"[:-]":n.separator===!1?"[]?":`\\${n.separator}`,m=new RegExp(`^([\\[{\\(]?)[0-9A-F]{8}(${f})[0-9A-F]{4}\\2?[${a||"0-9A-F"}][0-9A-F]{3}\\2?[${a?"89AB":"0-9A-F"}][0-9A-F]{3}\\2?[0-9A-F]{12}([\\]}\\)]?)$`,"i");return this.$_addRule({name:"guid",args:{options:n},regex:m})},validate(n,a,f,{regex:m}){const p=m.exec(n);return p?l.guidBrackets[p[1]]!==p[p.length-1]?a.error("string.guid"):n:a.error("string.guid")}},hex:{method(n={}){return t.assertOptions(n,["byteAligned","prefix"]),n={byteAligned:!1,prefix:!1,...n},o(typeof n.byteAligned=="boolean","byteAligned must be boolean"),o(typeof n.prefix=="boolean"||n.prefix==="optional",'prefix must be boolean or "optional"'),this.$_addRule({name:"hex",args:{options:n}})},validate:(n,a,{options:f})=>(f.prefix==="optional"?l.hexRegex.withOptionalPrefix:f.prefix===!0?l.hexRegex.withPrefix:l.hexRegex.withoutPrefix).test(n)?f.byteAligned&&n.length%2!=0?a.error("string.hexAlign"):n:a.error("string.hex")},hostname:{method(){return this.$_addRule("hostname")},validate:(n,a)=>g.isValid(n,{minDomainSegments:1})||l.ipRegex.test(n)?n:a.error("string.hostname")},insensitive:{method(){return this.$_setFlag("insensitive",!0)}},ip:{method(n={}){t.assertOptions(n,["cidr","version"]);const{cidr:a,versions:f,regex:m}=u.regex(n),p=n.version?f:void 0;return this.$_addRule({name:"ip",args:{options:{cidr:a,version:p}},regex:m})},validate:(n,a,{options:f},{regex:m})=>m.test(n)?n:f.version?a.error("string.ipVersion",{value:n,cidr:f.cidr,version:f.version}):a.error("string.ip",{value:n,cidr:f.cidr})},isoDate:{method(){return this.$_addRule("isoDate")},validate:(n,{error:a})=>l.isoDate(n)?n:a("string.isoDate")},isoDuration:{method(){return this.$_addRule("isoDuration")},validate:(n,a)=>l.isoDurationRegex.test(n)?n:a.error("string.isoDuration")},length:{method(n,a){return l.length(this,"length",n,"=",a)},validate(n,a,{limit:f,encoding:m},{name:p,operator:E,args:w}){const c=!m&&n.length;return t.compare(c,f,E)?n:a.error("string."+p,{limit:w.limit,value:n,encoding:m})},args:[{name:"limit",ref:!0,assert:t.limit,message:"must be a positive integer"},"encoding"]},lowercase:{method(){return this.case("lower")}},max:{method(n,a){return l.length(this,"max",n,"<=",a)},args:["limit","encoding"]},min:{method(n,a){return l.length(this,"min",n,">=",a)},args:["limit","encoding"]},normalize:{method(n="NFC"){return o(l.normalizationForms.includes(n),"normalization form must be one of "+l.normalizationForms.join(", ")),this.$_addRule({name:"normalize",args:{form:n}})},validate:(n,{error:a},{form:f})=>n===n.normalize(f)?n:a("string.normalize",{value:n,form:f}),convert:!0},pattern:{alias:"regex",method(n,a={}){o(n instanceof RegExp,"regex must be a RegExp"),o(!n.flags.includes("g")&&!n.flags.includes("y"),"regex should not use global or sticky mode"),typeof a=="string"&&(a={name:a}),t.assertOptions(a,["invert","name"]);const f=["string.pattern",a.invert?".invert":"",a.name?".name":".base"].join("");return this.$_addRule({name:"pattern",args:{regex:n,options:a},errorCode:f})},validate:(n,a,{regex:f,options:m},{errorCode:p})=>f.test(n)^m.invert?n:a.error(p,{name:m.name,regex:f,value:n}),args:["regex","options"],multi:!0},replace:{method(n,a){typeof n=="string"&&(n=new RegExp(e(n),"g")),o(n instanceof RegExp,"pattern must be a RegExp"),o(typeof a=="string","replacement must be a String");const f=this.clone();return f.$_terms.replacements||(f.$_terms.replacements=[]),f.$_terms.replacements.push({pattern:n,replacement:a}),f}},token:{method(){return this.$_addRule("token")},validate:(n,a)=>/^\w+$/.test(n)?n:a.error("string.token")},trim:{method(n=!0){return o(typeof n=="boolean","enabled must be a boolean"),this.$_addRule({name:"trim",args:{enabled:n}})},validate:(n,a,{enabled:f})=>f&&n!==n.trim()?a.error("string.trim"):n,convert:!0},truncate:{method(n=!0){return o(typeof n=="boolean","enabled must be a boolean"),this.$_setFlag("truncate",n)}},uppercase:{method(){return this.case("upper")}},uri:{method(n={}){t.assertOptions(n,["allowRelative","allowQuerySquareBrackets","domain","relativeOnly","scheme"]),n.domain&&t.assertOptions(n.domain,["allowFullyQualified","allowUnicode","maxDomainSegments","minDomainSegments","tlds"]);const{regex:a,scheme:f}=s.regex(n),m=n.domain?l.addressOptions(n.domain):null;return this.$_addRule({name:"uri",args:{options:n},regex:a,domain:m,scheme:f})},validate(n,a,{options:f},{regex:m,domain:p,scheme:E}){if(["http:/","https:/"].includes(n))return a.error("string.uri");const w=m.exec(n);if(w){const c=w[1]||w[2];return!p||f.allowRelative&&!c||g.isValid(c,p)?n:a.error("string.domain",{value:c})}return f.relativeOnly?a.error("string.uriRelativeOnly"):f.scheme?a.error("string.uriCustomScheme",{scheme:E,value:n}):a.error("string.uri")}}},manifest:{build(n,a){if(a.replacements)for(const{pattern:f,replacement:m}of a.replacements)n=n.replace(f,m);return n}},messages:{"string.alphanum":"{{#label}} must only contain alpha-numeric characters","string.base":"{{#label}} must be a string","string.base64":"{{#label}} must be a valid base64 string","string.creditCard":"{{#label}} must be a credit card","string.dataUri":"{{#label}} must be a valid dataUri string","string.domain":"{{#label}} must contain a valid domain name","string.email":"{{#label}} must be a valid email","string.empty":"{{#label}} is not allowed to be empty","string.guid":"{{#label}} must be a valid GUID","string.hex":"{{#label}} must only contain hexadecimal characters","string.hexAlign":"{{#label}} hex decoded representation must be byte aligned","string.hostname":"{{#label}} must be a valid hostname","string.ip":"{{#label}} must be a valid ip address with a {{#cidr}} CIDR","string.ipVersion":"{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR","string.isoDate":"{{#label}} must be in iso format","string.isoDuration":"{{#label}} must be a valid ISO 8601 duration","string.length":"{{#label}} length must be {{#limit}} characters long","string.lowercase":"{{#label}} must only contain lowercase characters","string.max":"{{#label}} length must be less than or equal to {{#limit}} characters long","string.min":"{{#label}} length must be at least {{#limit}} characters long","string.normalize":"{{#label}} must be unicode normalized in the {{#form}} form","string.token":"{{#label}} must only contain alpha-numeric and underscore characters","string.pattern.base":"{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}","string.pattern.name":"{{#label}} with value {:[.]} fails to match the {{#name}} pattern","string.pattern.invert.base":"{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}","string.pattern.invert.name":"{{#label}} with value {:[.]} matches the inverted {{#name}} pattern","string.trim":"{{#label}} must not have leading or trailing whitespace","string.uri":"{{#label}} must be a valid uri","string.uriCustomScheme":"{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern","string.uriRelativeOnly":"{{#label}} must be a valid relative uri","string.uppercase":"{{#label}} must only contain uppercase characters"}}),l.addressOptions=function(n){if(!n)return l.tlds||n;if(o(n.minDomainSegments===void 0||Number.isSafeInteger(n.minDomainSegments)&&n.minDomainSegments>0,"minDomainSegments must be a positive integer"),o(n.maxDomainSegments===void 0||Number.isSafeInteger(n.maxDomainSegments)&&n.maxDomainSegments>0,"maxDomainSegments must be a positive integer"),n.tlds===!1)return n;if(n.tlds===!0||n.tlds===void 0)return o(l.tlds,"Built-in TLD list disabled"),Object.assign({},n,l.tlds);o(typeof n.tlds=="object","tlds must be true, false, or an object");const a=n.tlds.deny;if(a)return Array.isArray(a)&&(n=Object.assign({},n,{tlds:{deny:new Set(a)}})),o(n.tlds.deny instanceof Set,"tlds.deny must be an array, Set, or boolean"),o(!n.tlds.allow,"Cannot specify both tlds.allow and tlds.deny lists"),l.validateTlds(n.tlds.deny,"tlds.deny"),n;const f=n.tlds.allow;return f?f===!0?(o(l.tlds,"Built-in TLD list disabled"),Object.assign({},n,l.tlds)):(Array.isArray(f)&&(n=Object.assign({},n,{tlds:{allow:new Set(f)}})),o(n.tlds.allow instanceof Set,"tlds.allow must be an array, Set, or boolean"),l.validateTlds(n.tlds.allow,"tlds.allow"),n):n},l.validateTlds=function(n,a){for(const f of n)o(g.isValid(f,{minDomainSegments:1,maxDomainSegments:1}),`${a} must contain valid top level domain names`)},l.isoDate=function(n){if(!t.isIsoDate(n))return null;/.*T.*[+-]\d\d$/.test(n)&&(n+="00");const a=new Date(n);return isNaN(a.getTime())?null:a.toISOString()},l.length=function(n,a,f,m,p){return o(!p||!1,"Invalid encoding:",p),n.$_addRule({name:a,method:"length",args:{limit:f,encoding:p},operator:m})}},8826:(A,S,v)=>{const o=v(375),g=v(8068),d={};d.Map=class extends Map{slice(){return new d.Map(this)}},A.exports=g.extend({type:"symbol",terms:{map:{init:new d.Map}},coerce:{method(u,{schema:e,error:i}){const s=e.$_terms.map.get(u);return s&&(u=s),e._flags.only&&typeof u!="symbol"?{value:u,errors:i("symbol.map",{map:e.$_terms.map})}:{value:u}}},validate(u,{error:e}){if(typeof u!="symbol")return{value:u,errors:e("symbol.base")}},rules:{map:{method(u){u&&!u[Symbol.iterator]&&typeof u=="object"&&(u=Object.entries(u)),o(u&&u[Symbol.iterator],"Iterable must be an iterable or object");const e=this.clone(),i=[];for(const s of u){o(s&&s[Symbol.iterator],"Entry must be an iterable");const[r,t]=s;o(typeof r!="object"&&typeof r!="function"&&typeof r!="symbol","Key must not be of type object, function, or Symbol"),o(typeof t=="symbol","Value must be a Symbol"),e.$_terms.map.set(r,t),i.push(t)}return e.valid(...i)}}},manifest:{build:(u,e)=>(e.map&&(u=u.map(e.map)),u)},messages:{"symbol.base":"{{#label}} must be a symbol","symbol.map":"{{#label}} must be one of {{#map}}"}})},8863:(A,S,v)=>{const o=v(375),g=v(8571),d=v(738),u=v(9621),e=v(8160),i=v(6354),s=v(493),r={result:Symbol("result")};S.entry=function(t,l,n){let a=e.defaults;n&&(o(n.warnings===void 0,"Cannot override warnings preference in synchronous validation"),o(n.artifacts===void 0,"Cannot override artifacts preference in synchronous validation"),a=e.preferences(e.defaults,n));const f=r.entry(t,l,a);o(!f.mainstay.externals.length,"Schema with external rules must use validateAsync()");const m={value:f.value};return f.error&&(m.error=f.error),f.mainstay.warnings.length&&(m.warning=i.details(f.mainstay.warnings)),f.mainstay.debug&&(m.debug=f.mainstay.debug),f.mainstay.artifacts&&(m.artifacts=f.mainstay.artifacts),m},S.entryAsync=async function(t,l,n){let a=e.defaults;n&&(a=e.preferences(e.defaults,n));const f=r.entry(t,l,a),m=f.mainstay;if(f.error)throw m.debug&&(f.error.debug=m.debug),f.error;if(m.externals.length){let E=f.value;const w=[];for(const c of m.externals){const h=c.state.path,y=c.schema.type==="link"?m.links.get(c.schema):null;let O,k,L=E;const D=h.length?[E]:[],q=h.length?u(t,h):t;if(h.length){O=h[h.length-1];let z=E;for(const U of h.slice(0,-1))z=z[U],D.unshift(z);k=D[0],L=k[O]}try{const z=(X,Q)=>(y||c.schema).$_createError(X,L,Q,c.state,a),U=await c.method(L,{schema:c.schema,linked:y,state:c.state,prefs:n,original:q,error:z,errorsArray:r.errorsArray,warn:(X,Q)=>m.warnings.push((y||c.schema).$_createError(X,L,Q,c.state,a)),message:(X,Q)=>(y||c.schema).$_createError("external",L,Q,c.state,a,{messages:X})});if(U===void 0||U===L)continue;if(U instanceof i.Report){if(m.tracer.log(c.schema,c.state,"rule","external","error"),w.push(U),a.abortEarly)break;continue}if(Array.isArray(U)&&U[e.symbols.errors]){if(m.tracer.log(c.schema,c.state,"rule","external","error"),w.push(...U),a.abortEarly)break;continue}k?(m.tracer.value(c.state,"rule",L,U,"external"),k[O]=U):(m.tracer.value(c.state,"rule",E,U,"external"),E=U)}catch(z){throw a.errors.label&&(z.message+=` (${c.label})`),z}}if(f.value=E,w.length)throw f.error=i.process(w,t,a),m.debug&&(f.error.debug=m.debug),f.error}if(!a.warnings&&!a.debug&&!a.artifacts)return f.value;const p={value:f.value};return m.warnings.length&&(p.warning=i.details(m.warnings)),m.debug&&(p.debug=m.debug),m.artifacts&&(p.artifacts=m.artifacts),p},r.Mainstay=class{constructor(t,l,n){this.externals=[],this.warnings=[],this.tracer=t,this.debug=l,this.links=n,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){const t=this._snapshots.pop();this.externals=t.externals,this.warnings=t.warnings}commit(){this._snapshots.pop()}},r.entry=function(t,l,n){const{tracer:a,cleanup:f}=r.tracer(l,n),m=n.debug?[]:null,p=l._ids._schemaChain?new Map:null,E=new r.Mainstay(a,m,p),w=l._ids._schemaChain?[{schema:l}]:null,c=new s([],[],{mainstay:E,schemas:w}),h=S.validate(t,l,c,n);f&&l.$_root.untrace();const y=i.process(h.errors,t,n);return{value:h.value,error:y,mainstay:E}},r.tracer=function(t,l){return t.$_root._tracer?{tracer:t.$_root._tracer._register(t)}:l.debug?(o(t.$_root.trace,"Debug mode not supported"),{tracer:t.$_root.trace()._register(t),cleanup:!0}):{tracer:r.ignore}},S.validate=function(t,l,n,a,f={}){if(l.$_terms.whens&&(l=l._generate(t,n,a).schema),l._preferences&&(a=r.prefs(l,a)),l._cache&&a.cache){const y=l._cache.get(t);if(n.mainstay.tracer.debug(n,"validate","cached",!!y),y)return y}const m=(y,O,k)=>l.$_createError(y,t,O,k||n,a),p={original:t,prefs:a,schema:l,state:n,error:m,errorsArray:r.errorsArray,warn:(y,O,k)=>n.mainstay.warnings.push(m(y,O,k)),message:(y,O)=>l.$_createError("custom",t,O,n,a,{messages:y})};n.mainstay.tracer.entry(l,n);const E=l._definition;if(E.prepare&&t!==void 0&&a.convert){const y=E.prepare(t,p);if(y){if(n.mainstay.tracer.value(n,"prepare",t,y.value),y.errors)return r.finalize(y.value,[].concat(y.errors),p);t=y.value}}if(E.coerce&&t!==void 0&&a.convert&&(!E.coerce.from||E.coerce.from.includes(typeof t))){const y=E.coerce.method(t,p);if(y){if(n.mainstay.tracer.value(n,"coerced",t,y.value),y.errors)return r.finalize(y.value,[].concat(y.errors),p);t=y.value}}const w=l._flags.empty;w&&w.$_match(r.trim(t,l),n.nest(w),e.defaults)&&(n.mainstay.tracer.value(n,"empty",t,void 0),t=void 0);const c=f.presence||l._flags.presence||(l._flags._endedSwitch?null:a.presence);if(t===void 0){if(c==="forbidden")return r.finalize(t,null,p);if(c==="required")return r.finalize(t,[l.$_createError("any.required",t,null,n,a)],p);if(c==="optional"){if(l._flags.default!==e.symbols.deepDefault)return r.finalize(t,null,p);n.mainstay.tracer.value(n,"default",t,{}),t={}}}else if(c==="forbidden")return r.finalize(t,[l.$_createError("any.unknown",t,null,n,a)],p);const h=[];if(l._valids){const y=l._valids.get(t,n,a,l._flags.insensitive);if(y)return a.convert&&(n.mainstay.tracer.value(n,"valids",t,y.value),t=y.value),n.mainstay.tracer.filter(l,n,"valid",y),r.finalize(t,null,p);if(l._flags.only){const O=l.$_createError("any.only",t,{valids:l._valids.values({display:!0})},n,a);if(a.abortEarly)return r.finalize(t,[O],p);h.push(O)}}if(l._invalids){const y=l._invalids.get(t,n,a,l._flags.insensitive);if(y){n.mainstay.tracer.filter(l,n,"invalid",y);const O=l.$_createError("any.invalid",t,{invalids:l._invalids.values({display:!0})},n,a);if(a.abortEarly)return r.finalize(t,[O],p);h.push(O)}}if(E.validate){const y=E.validate(t,p);if(y&&(n.mainstay.tracer.value(n,"base",t,y.value),t=y.value,y.errors)){if(!Array.isArray(y.errors))return h.push(y.errors),r.finalize(t,h,p);if(y.errors.length)return h.push(...y.errors),r.finalize(t,h,p)}}return l._rules.length?r.rules(t,h,p):r.finalize(t,h,p)},r.rules=function(t,l,n){const{schema:a,state:f,prefs:m}=n;for(const p of a._rules){const E=a._definition.rules[p.method];if(E.convert&&m.convert){f.mainstay.tracer.log(a,f,"rule",p.name,"full");continue}let w,c=p.args;if(p._resolve.length){c=Object.assign({},c);for(const y of p._resolve){const O=E.argsByName.get(y),k=c[y].resolve(t,f,m),L=O.normalize?O.normalize(k):k,D=e.validateArg(L,null,O);if(D){w=a.$_createError("any.ref",k,{arg:y,ref:c[y],reason:D},f,m);break}c[y]=L}}w=w||E.validate(t,n,c,p);const h=r.rule(w,p);if(h.errors){if(f.mainstay.tracer.log(a,f,"rule",p.name,"error"),p.warn){f.mainstay.warnings.push(...h.errors);continue}if(m.abortEarly)return r.finalize(t,h.errors,n);l.push(...h.errors)}else f.mainstay.tracer.log(a,f,"rule",p.name,"pass"),f.mainstay.tracer.value(f,"rule",t,h.value,p.name),t=h.value}return r.finalize(t,l,n)},r.rule=function(t,l){return t instanceof i.Report?(r.error(t,l),{errors:[t],value:null}):Array.isArray(t)&&t[e.symbols.errors]?(t.forEach(n=>r.error(n,l)),{errors:t,value:null}):{errors:null,value:t}},r.error=function(t,l){return l.message&&t._setTemplate(l.message),t},r.finalize=function(t,l,n){l=l||[];const{schema:a,state:f,prefs:m}=n;if(l.length){const E=r.default("failover",void 0,l,n);E!==void 0&&(f.mainstay.tracer.value(f,"failover",t,E),t=E,l=[])}if(l.length&&a._flags.error)if(typeof a._flags.error=="function"){l=a._flags.error(l),Array.isArray(l)||(l=[l]);for(const E of l)o(E instanceof Error||E instanceof i.Report,"error() must return an Error object")}else l=[a._flags.error];if(t===void 0){const E=r.default("default",t,l,n);f.mainstay.tracer.value(f,"default",t,E),t=E}if(a._flags.cast&&t!==void 0){const E=a._definition.cast[a._flags.cast];if(E.from(t)){const w=E.to(t,n);f.mainstay.tracer.value(f,"cast",t,w,a._flags.cast),t=w}}if(a.$_terms.externals&&m.externals&&m._externals!==!1)for(const{method:E}of a.$_terms.externals)f.mainstay.externals.push({method:E,schema:a,state:f,label:i.label(a._flags,f,m)});const p={value:t,errors:l.length?l:null};return a._flags.result&&(p.value=a._flags.result==="strip"?void 0:n.original,f.mainstay.tracer.value(f,a._flags.result,t,p.value),f.shadow(t,a._flags.result)),a._cache&&m.cache!==!1&&!a._refs.length&&a._cache.set(n.original,p),t===void 0||p.errors||a._flags.artifact===void 0||(f.mainstay.artifacts=f.mainstay.artifacts||new Map,f.mainstay.artifacts.has(a._flags.artifact)||f.mainstay.artifacts.set(a._flags.artifact,[]),f.mainstay.artifacts.get(a._flags.artifact).push(f.path)),p},r.prefs=function(t,l){const n=l===e.defaults;return n&&t._preferences[e.symbols.prefs]?t._preferences[e.symbols.prefs]:(l=e.preferences(l,t._preferences),n&&(t._preferences[e.symbols.prefs]=l),l)},r.default=function(t,l,n,a){const{schema:f,state:m,prefs:p}=a,E=f._flags[t];if(p.noDefaults||E===void 0)return l;if(m.mainstay.tracer.log(f,m,"rule",t,"full"),!E)return E;if(typeof E=="function"){const w=E.length?[g(m.ancestors[0]),a]:[];try{return E(...w)}catch(c){return void n.push(f.$_createError(`any.${t}`,null,{error:c},m,p))}}return typeof E!="object"?E:E[e.symbols.literal]?E.literal:e.isResolvable(E)?E.resolve(l,m,p):g(E)},r.trim=function(t,l){if(typeof t!="string")return t;const n=l.$_getRule("trim");return n&&n.args.enabled?t.trim():t},r.ignore={active:!1,debug:d,entry:d,filter:d,log:d,resolve:d,value:d},r.errorsArray=function(){const t=[];return t[e.symbols.errors]=!0,t}},2036:(A,S,v)=>{const o=v(375),g=v(9474),d=v(8160),u={};A.exports=u.Values=class{constructor(e,i){this._values=new Set(e),this._refs=new Set(i),this._lowercase=u.lowercases(e),this._override=!1}get length(){return this._values.size+this._refs.size}add(e,i){d.isResolvable(e)?this._refs.has(e)||(this._refs.add(e),i&&i.register(e)):this.has(e,null,null,!1)||(this._values.add(e),typeof e=="string"&&this._lowercase.set(e.toLowerCase(),e))}static merge(e,i,s){if(e=e||new u.Values,i){if(i._override)return i.clone();for(const r of[...i._values,...i._refs])e.add(r)}if(s)for(const r of[...s._values,...s._refs])e.remove(r);return e.length?e:null}remove(e){d.isResolvable(e)?this._refs.delete(e):(this._values.delete(e),typeof e=="string"&&this._lowercase.delete(e.toLowerCase()))}has(e,i,s,r){return!!this.get(e,i,s,r)}get(e,i,s,r){if(!this.length)return!1;if(this._values.has(e))return{value:e};if(typeof e=="string"&&e&&r){const t=this._lowercase.get(e.toLowerCase());if(t)return{value:t}}if(!this._refs.size&&typeof e!="object")return!1;if(typeof e=="object"){for(const t of this._values)if(g(t,e))return{value:t}}if(i)for(const t of this._refs){const l=t.resolve(e,i,s,null,{in:!0});if(l===void 0)continue;const n=t.in&&typeof l=="object"?Array.isArray(l)?l:Object.keys(l):[l];for(const a of n)if(typeof a==typeof e){if(r&&e&&typeof e=="string"){if(a.toLowerCase()===e.toLowerCase())return{value:a,ref:t}}else if(g(a,e))return{value:a,ref:t}}}return!1}override(){this._override=!0}values(e){if(e&&e.display){const i=[];for(const s of[...this._values,...this._refs])s!==void 0&&i.push(s);return i}return Array.from([...this._values,...this._refs])}clone(){const e=new u.Values(this._values,this._refs);return e._override=this._override,e}concat(e){o(!e._override,"Cannot concat override set of values");const i=new u.Values([...this._values,...e._values],[...this._refs,...e._refs]);return i._override=this._override,i}describe(){const e=[];this._override&&e.push({override:!0});for(const i of this._values.values())e.push(i&&typeof i=="object"?{value:i}:i);for(const i of this._refs.values())e.push(i.describe());return e}},u.Values.prototype[d.symbols.values]=!0,u.Values.prototype.slice=u.Values.prototype.clone,u.lowercases=function(e){const i=new Map;if(e)for(const s of e)typeof s=="string"&&i.set(s.toLowerCase(),s);return i}},978:(A,S,v)=>{const o=v(375),g=v(8571),d=v(1687),u=v(9621),e={};A.exports=function(i,s,r={}){if(o(i&&typeof i=="object","Invalid defaults value: must be an object"),o(!s||s===!0||typeof s=="object","Invalid source value: must be true, falsy or an object"),o(typeof r=="object","Invalid options: must be an object"),!s)return null;if(r.shallow)return e.applyToDefaultsWithShallow(i,s,r);const t=g(i);if(s===!0)return t;const l=r.nullOverride!==void 0&&r.nullOverride;return d(t,s,{nullOverride:l,mergeArrays:!1})},e.applyToDefaultsWithShallow=function(i,s,r){const t=r.shallow;o(Array.isArray(t),"Invalid keys");const l=new Map,n=s===!0?null:new Set;for(let m of t){m=Array.isArray(m)?m:m.split(".");const p=u(i,m);p&&typeof p=="object"?l.set(p,n&&u(s,m)||p):n&&n.add(m)}const a=g(i,{},l);if(!n)return a;for(const m of n)e.reachCopy(a,s,m);const f=r.nullOverride!==void 0&&r.nullOverride;return d(a,s,{nullOverride:f,mergeArrays:!1})},e.reachCopy=function(i,s,r){for(const n of r){if(!(n in s))return;const a=s[n];if(typeof a!="object"||a===null)return;s=a}const t=s;let l=i;for(let n=0;n<r.length-1;++n){const a=r[n];typeof l[a]!="object"&&(l[a]={}),l=l[a]}l[r[r.length-1]]=t}},375:(A,S,v)=>{const o=v(7916);A.exports=function(g,...d){if(!g)throw d.length===1&&d[0]instanceof Error?d[0]:new o(d)}},8571:(A,S,v)=>{const o=v(9621),g=v(4277),d=v(7043),u={needsProtoHack:new Set([g.set,g.map,g.weakSet,g.weakMap])};A.exports=u.clone=function(e,i={},s=null){if(typeof e!="object"||e===null)return e;let r=u.clone,t=s;if(i.shallow){if(i.shallow!==!0)return u.cloneWithShallow(e,i);r=f=>f}else if(t){const f=t.get(e);if(f)return f}else t=new Map;const l=g.getInternalProto(e);if(l===g.buffer)return!1;if(l===g.date)return new Date(e.getTime());if(l===g.regex)return new RegExp(e);const n=u.base(e,l,i);if(n===e)return e;if(t&&t.set(e,n),l===g.set)for(const f of e)n.add(r(f,i,t));else if(l===g.map)for(const[f,m]of e)n.set(f,r(m,i,t));const a=d.keys(e,i);for(const f of a){if(f==="__proto__")continue;if(l===g.array&&f==="length"){n.length=e.length;continue}const m=Object.getOwnPropertyDescriptor(e,f);m?m.get||m.set?Object.defineProperty(n,f,m):m.enumerable?n[f]=r(e[f],i,t):Object.defineProperty(n,f,{enumerable:!1,writable:!0,configurable:!0,value:r(e[f],i,t)}):Object.defineProperty(n,f,{enumerable:!0,writable:!0,configurable:!0,value:r(e[f],i,t)})}return n},u.cloneWithShallow=function(e,i){const s=i.shallow;(i=Object.assign({},i)).shallow=!1;const r=new Map;for(const t of s){const l=o(e,t);typeof l!="object"&&typeof l!="function"||r.set(l,l)}return u.clone(e,i,r)},u.base=function(e,i,s){if(s.prototype===!1)return u.needsProtoHack.has(i)?new i.constructor:i===g.array?[]:{};const r=Object.getPrototypeOf(e);if(r&&r.isImmutable)return e;if(i===g.array){const t=[];return r!==i&&Object.setPrototypeOf(t,r),t}if(u.needsProtoHack.has(i)){const t=new r.constructor;return r!==i&&Object.setPrototypeOf(t,r),t}return Object.create(r)}},9474:(A,S,v)=>{const o=v(4277),g={mismatched:null};A.exports=function(d,u,e){return e=Object.assign({prototype:!0},e),!!g.isDeepEqual(d,u,e,[])},g.isDeepEqual=function(d,u,e,i){if(d===u)return d!==0||1/d==1/u;const s=typeof d;if(s!==typeof u||d===null||u===null)return!1;if(s==="function"){if(!e.deepFunction||d.toString()!==u.toString())return!1}else if(s!=="object")return d!=d&&u!=u;const r=g.getSharedType(d,u,!!e.prototype);switch(r){case o.buffer:return!1;case o.promise:return d===u;case o.regex:return d.toString()===u.toString();case g.mismatched:return!1}for(let t=i.length-1;t>=0;--t)if(i[t].isSame(d,u))return!0;i.push(new g.SeenEntry(d,u));try{return!!g.isDeepEqualObj(r,d,u,e,i)}finally{i.pop()}},g.getSharedType=function(d,u,e){if(e)return Object.getPrototypeOf(d)!==Object.getPrototypeOf(u)?g.mismatched:o.getInternalProto(d);const i=o.getInternalProto(d);return i!==o.getInternalProto(u)?g.mismatched:i},g.valueOf=function(d){const u=d.valueOf;if(u===void 0)return d;try{return u.call(d)}catch(e){return e}},g.hasOwnEnumerableProperty=function(d,u){return Object.prototype.propertyIsEnumerable.call(d,u)},g.isSetSimpleEqual=function(d,u){for(const e of Set.prototype.values.call(d))if(!Set.prototype.has.call(u,e))return!1;return!0},g.isDeepEqualObj=function(d,u,e,i,s){const{isDeepEqual:r,valueOf:t,hasOwnEnumerableProperty:l}=g,{keys:n,getOwnPropertySymbols:a}=Object;if(d===o.array){if(!i.part){if(u.length!==e.length)return!1;for(let w=0;w<u.length;++w)if(!r(u[w],e[w],i,s))return!1;return!0}for(const w of u)for(const c of e)if(r(w,c,i,s))return!0}else if(d===o.set){if(u.size!==e.size)return!1;if(!g.isSetSimpleEqual(u,e)){const w=new Set(Set.prototype.values.call(e));for(const c of Set.prototype.values.call(u)){if(w.delete(c))continue;let h=!1;for(const y of w)if(r(c,y,i,s)){w.delete(y),h=!0;break}if(!h)return!1}}}else if(d===o.map){if(u.size!==e.size)return!1;for(const[w,c]of Map.prototype.entries.call(u))if(c===void 0&&!Map.prototype.has.call(e,w)||!r(c,Map.prototype.get.call(e,w),i,s))return!1}else if(d===o.error&&(u.name!==e.name||u.message!==e.message))return!1;const f=t(u),m=t(e);if((u!==f||e!==m)&&!r(f,m,i,s))return!1;const p=n(u);if(!i.part&&p.length!==n(e).length&&!i.skip)return!1;let E=0;for(const w of p)if(i.skip&&i.skip.includes(w))e[w]===void 0&&++E;else if(!l(e,w)||!r(u[w],e[w],i,s))return!1;if(!i.part&&p.length-E!==n(e).length)return!1;if(i.symbols!==!1){const w=a(u),c=new Set(a(e));for(const h of w){if(!i.skip||!i.skip.includes(h)){if(l(u,h)){if(!l(e,h)||!r(u[h],e[h],i,s))return!1}else if(l(e,h))return!1}c.delete(h)}for(const h of c)if(l(e,h))return!1}return!0},g.SeenEntry=class{constructor(d,u){this.obj=d,this.ref=u}isSame(d,u){return this.obj===d&&this.ref===u}}},7916:(A,S,v)=>{const o=v(8761);A.exports=class extends Error{constructor(g){super(g.filter(d=>d!=="").map(d=>typeof d=="string"?d:d instanceof Error?d.message:o(d)).join(" ")||"Unknown error"),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,S.assert)}}},5277:A=>{const S={};A.exports=function(v){if(!v)return"";let o="";for(let g=0;g<v.length;++g){const d=v.charCodeAt(g);S.isSafe(d)?o+=v[g]:o+=S.escapeHtmlChar(d)}return o},S.escapeHtmlChar=function(v){return S.namedHtml.get(v)||(v>=256?"&#"+v+";":`&#x${v.toString(16).padStart(2,"0")};`)},S.isSafe=function(v){return S.safeCharCodes.has(v)},S.namedHtml=new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[34,"&quot;"],[160,"&nbsp;"],[162,"&cent;"],[163,"&pound;"],[164,"&curren;"],[169,"&copy;"],[174,"&reg;"]]),S.safeCharCodes=function(){const v=new Set;for(let o=32;o<123;++o)(o>=97||o>=65&&o<=90||o>=48&&o<=57||o===32||o===46||o===44||o===45||o===58||o===95)&&v.add(o);return v}()},6064:A=>{A.exports=function(S){return S.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,"\\$&")}},738:A=>{A.exports=function(){}},1687:(A,S,v)=>{const o=v(375),g=v(8571),d=v(7043),u={};A.exports=u.merge=function(e,i,s){if(o(e&&typeof e=="object","Invalid target value: must be an object"),o(i==null||typeof i=="object","Invalid source value: must be null, undefined, or an object"),!i)return e;if(s=Object.assign({nullOverride:!0,mergeArrays:!0},s),Array.isArray(i)){o(Array.isArray(e),"Cannot merge array onto an object"),s.mergeArrays||(e.length=0);for(let t=0;t<i.length;++t)e.push(g(i[t],{symbols:s.symbols}));return e}const r=d.keys(i,s);for(let t=0;t<r.length;++t){const l=r[t];if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,l))continue;const n=i[l];if(n&&typeof n=="object"){if(e[l]===n)continue;!e[l]||typeof e[l]!="object"||Array.isArray(e[l])!==Array.isArray(n)||n instanceof Date||n instanceof RegExp?e[l]=g(n,{symbols:s.symbols}):u.merge(e[l],n,s)}else(n!=null||s.nullOverride)&&(e[l]=n)}return e}},9621:(A,S,v)=>{const o=v(375),g={};A.exports=function(d,u,e){if(u===!1||u==null)return d;typeof(e=e||{})=="string"&&(e={separator:e});const i=Array.isArray(u);o(!i||!e.separator,"Separator option is not valid for array-based chain");const s=i?u:u.split(e.separator||".");let r=d;for(let t=0;t<s.length;++t){let l=s[t];const n=e.iterables&&g.iterables(r);if(Array.isArray(r)||n==="set"){const a=Number(l);Number.isInteger(a)&&(l=a<0?r.length+a:a)}if(!r||typeof r=="function"&&e.functions===!1||!n&&r[l]===void 0){o(!e.strict||t+1===s.length,"Missing segment",l,"in reach path ",u),o(typeof r=="object"||e.functions===!0||typeof r!="function","Invalid segment",l,"in reach path ",u),r=e.default;break}r=n?n==="set"?[...r][l]:r.get(l):r[l]}return r},g.iterables=function(d){return d instanceof Set?"set":d instanceof Map?"map":void 0}},8761:A=>{A.exports=function(...S){try{return JSON.stringify(...S)}catch(v){return"[Cannot display object: "+v.message+"]"}}},4277:(A,S)=>{const v={};S=A.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},v.typeMap=new Map([["[object Error]",S.error],["[object Map]",S.map],["[object Promise]",S.promise],["[object Set]",S.set],["[object WeakMap]",S.weakMap],["[object WeakSet]",S.weakSet]]),S.getInternalProto=function(o){if(Array.isArray(o))return S.array;if(o instanceof Date)return S.date;if(o instanceof RegExp)return S.regex;if(o instanceof Error)return S.error;const g=Object.prototype.toString.call(o);return v.typeMap.get(g)||S.generic}},7043:(A,S)=>{S.keys=function(v,o={}){return o.symbols!==!1?Reflect.ownKeys(v):Object.getOwnPropertyNames(v)}},3652:(A,S,v)=>{const o=v(375),g={};S.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(d,u){const e=[].concat((u=u||{}).before||[]),i=[].concat(u.after||[]),s=u.group||"?",r=u.sort||0;o(!e.includes(s),`Item cannot come before itself: ${s}`),o(!e.includes("?"),"Item cannot come before unassociated items"),o(!i.includes(s),`Item cannot come after itself: ${s}`),o(!i.includes("?"),"Item cannot come after unassociated items"),Array.isArray(d)||(d=[d]);for(const t of d){const l={seq:this._items.length,sort:r,before:e,after:i,group:s,node:t};this._items.push(l)}if(!u.manual){const t=this._sort();o(t,"item",s!=="?"?`added into group ${s}`:"","created a dependencies error")}return this.nodes}merge(d){Array.isArray(d)||(d=[d]);for(const e of d)if(e)for(const i of e._items)this._items.push(Object.assign({},i));this._items.sort(g.mergeSort);for(let e=0;e<this._items.length;++e)this._items[e].seq=e;const u=this._sort();return o(u,"merge created a dependencies error"),this.nodes}sort(){const d=this._sort();return o(d,"sort created a dependencies error"),this.nodes}_sort(){const d={},u=Object.create(null),e=Object.create(null);for(const l of this._items){const n=l.seq,a=l.group;e[a]=e[a]||[],e[a].push(n),d[n]=l.before;for(const f of l.after)u[f]=u[f]||[],u[f].push(n)}for(const l in d){const n=[];for(const a in d[l]){const f=d[l][a];e[f]=e[f]||[],n.push(...e[f])}d[l]=n}for(const l in u)if(e[l])for(const n of e[l])d[n].push(...u[l]);const i={};for(const l in d){const n=d[l];for(const a of n)i[a]=i[a]||[],i[a].push(l)}const s={},r=[];for(let l=0;l<this._items.length;++l){let n=l;if(i[l]){n=null;for(let a=0;a<this._items.length;++a){if(s[a]===!0)continue;i[a]||(i[a]=[]);const f=i[a].length;let m=0;for(let p=0;p<f;++p)s[i[a][p]]&&++m;if(m===f){n=a;break}}}n!==null&&(s[n]=!0,r.push(n))}if(r.length!==this._items.length)return!1;const t={};for(const l of this._items)t[l.seq]=l;this._items=[],this.nodes=[];for(const l of r){const n=t[l];this.nodes.push(n.node),this._items.push(n)}return!0}},g.mergeSort=(d,u)=>d.sort===u.sort?0:d.sort<u.sort?-1:1},5380:(A,S,v)=>{const o=v(443),g=v(2178),d={minDomainSegments:2,nonAsciiRx:/[^\x00-\x7f]/,domainControlRx:/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,tldSegmentRx:/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,domainSegmentRx:/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,URL:o.URL||URL};S.analyze=function(u,e={}){if(!u)return g.code("DOMAIN_NON_EMPTY_STRING");if(typeof u!="string")throw new Error("Invalid input: domain must be a string");if(u.length>256)return g.code("DOMAIN_TOO_LONG");if(d.nonAsciiRx.test(u)){if(e.allowUnicode===!1)return g.code("DOMAIN_INVALID_UNICODE_CHARS");u=u.normalize("NFC")}if(d.domainControlRx.test(u))return g.code("DOMAIN_INVALID_CHARS");u=d.punycode(u),e.allowFullyQualified&&u[u.length-1]==="."&&(u=u.slice(0,-1));const i=e.minDomainSegments||d.minDomainSegments,s=u.split(".");if(s.length<i)return g.code("DOMAIN_SEGMENTS_COUNT");if(e.maxDomainSegments&&s.length>e.maxDomainSegments)return g.code("DOMAIN_SEGMENTS_COUNT_MAX");const r=e.tlds;if(r){const t=s[s.length-1].toLowerCase();if(r.deny&&r.deny.has(t)||r.allow&&!r.allow.has(t))return g.code("DOMAIN_FORBIDDEN_TLDS")}for(let t=0;t<s.length;++t){const l=s[t];if(!l.length)return g.code("DOMAIN_EMPTY_SEGMENT");if(l.length>63)return g.code("DOMAIN_LONG_SEGMENT");if(t<s.length-1){if(!d.domainSegmentRx.test(l))return g.code("DOMAIN_INVALID_CHARS")}else if(!d.tldSegmentRx.test(l))return g.code("DOMAIN_INVALID_TLDS_CHARS")}return null},S.isValid=function(u,e){return!S.analyze(u,e)},d.punycode=function(u){u.includes("%")&&(u=u.replace(/%/g,"%25"));try{return new d.URL(`http://${u}`).host}catch{return u}}},1745:(A,S,v)=>{const o=v(9848),g=v(5380),d=v(2178),u={nonAsciiRx:/[^\x00-\x7f]/,encoder:new(o.TextEncoder||TextEncoder)};S.analyze=function(e,i){return u.email(e,i)},S.isValid=function(e,i){return!u.email(e,i)},u.email=function(e,i={}){if(typeof e!="string")throw new Error("Invalid input: email must be a string");if(!e)return d.code("EMPTY_STRING");const s=!u.nonAsciiRx.test(e);if(!s){if(i.allowUnicode===!1)return d.code("FORBIDDEN_UNICODE");e=e.normalize("NFC")}const r=e.split("@");if(r.length!==2)return r.length>2?d.code("MULTIPLE_AT_CHAR"):d.code("MISSING_AT_CHAR");const[t,l]=r;if(!t)return d.code("EMPTY_LOCAL");if(!i.ignoreLength){if(e.length>254)return d.code("ADDRESS_TOO_LONG");if(u.encoder.encode(t).length>64)return d.code("LOCAL_TOO_LONG")}return u.local(t,s)||g.analyze(l,i)},u.local=function(e,i){const s=e.split(".");for(const r of s){if(!r.length)return d.code("EMPTY_LOCAL_SEGMENT");if(i){if(!u.atextRx.test(r))return d.code("INVALID_LOCAL_CHARS")}else for(const t of r){if(u.atextRx.test(t))continue;const l=u.binary(t);if(!u.atomRx.test(l))return d.code("INVALID_LOCAL_CHARS")}}},u.binary=function(e){return Array.from(u.encoder.encode(e)).map(i=>String.fromCharCode(i)).join("")},u.atextRx=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,u.atomRx=new RegExp(["(?:[\\xc2-\\xdf][\\x80-\\xbf])","(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})","(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})"].join("|"))},2178:(A,S)=>{S.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"},S.code=function(v){return{code:v,error:S.codes[v]}}},9959:(A,S,v)=>{const o=v(375),g=v(5752);S.regex=function(d={}){o(d.cidr===void 0||typeof d.cidr=="string","options.cidr must be a string");const u=d.cidr?d.cidr.toLowerCase():"optional";o(["required","optional","forbidden"].includes(u),"options.cidr must be one of required, optional, forbidden"),o(d.version===void 0||typeof d.version=="string"||Array.isArray(d.version),"options.version must be a string or an array of string");let e=d.version||["ipv4","ipv6","ipvfuture"];Array.isArray(e)||(e=[e]),o(e.length>=1,"options.version must have at least 1 version specified");for(let r=0;r<e.length;++r)o(typeof e[r]=="string","options.version must only contain strings"),e[r]=e[r].toLowerCase(),o(["ipv4","ipv6","ipvfuture"].includes(e[r]),"options.version contains unknown version "+e[r]+" - must be one of ipv4, ipv6, ipvfuture");e=Array.from(new Set(e));const i=`(?:${e.map(r=>{if(u==="forbidden")return g.ip[r];const t=`\\/${r==="ipv4"?g.ip.v4Cidr:g.ip.v6Cidr}`;return u==="required"?`${g.ip[r]}${t}`:`${g.ip[r]}(?:${t})?`}).join("|")})`,s=new RegExp(`^${i}$`);return{cidr:u,versions:e,regex:s,raw:i}}},5752:(A,S,v)=>{const o=v(375),g=v(6064),d={generate:function(){const u={},e="\\dA-Fa-f",i="["+e+"]",s="\\w-\\.~",r="!\\$&'\\(\\)\\*\\+,;=",t="%"+e,l=s+t+r+":@",n="["+l+"]",a="(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";u.ipv4address="(?:"+a+"\\.){3}"+a;const f=i+"{1,4}",m="(?:"+f+":"+f+"|"+u.ipv4address+")",p="(?:"+f+":){6}"+m,E="::(?:"+f+":){5}"+m,w="(?:"+f+")?::(?:"+f+":){4}"+m,c="(?:(?:"+f+":){0,1}"+f+")?::(?:"+f+":){3}"+m,h="(?:(?:"+f+":){0,2}"+f+")?::(?:"+f+":){2}"+m,y="(?:(?:"+f+":){0,3}"+f+")?::"+f+":"+m,O="(?:(?:"+f+":){0,4}"+f+")?::"+m,k="(?:(?:"+f+":){0,5}"+f+")?::"+f,L="(?:(?:"+f+":){0,6}"+f+")?::";u.ipv4Cidr="(?:\\d|[1-2]\\d|3[0-2])",u.ipv6Cidr="(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])",u.ipv6address="(?:"+p+"|"+E+"|"+w+"|"+c+"|"+h+"|"+y+"|"+O+"|"+k+"|"+L+")",u.ipvFuture="v"+i+"+\\.["+s+r+":]+",u.scheme="[a-zA-Z][a-zA-Z\\d+-\\.]*",u.schemeRegex=new RegExp(u.scheme);const D="["+s+t+r+":]*",q="["+s+t+r+"]{1,255}",z="(?:\\[(?:"+u.ipv6address+"|"+u.ipvFuture+")\\]|"+u.ipv4address+"|"+q+")",U="(?:"+D+"@)?"+z+"(?::\\d*)?",X="(?:"+D+"@)?("+z+")(?::\\d*)?",Q=n+"*",W=n+"+",V="(?:\\/"+Q+")*",Z="\\/(?:"+W+V+")?",J=W+V,te="["+s+t+r+"@]+"+V,ce="(?:\\/\\/\\/"+Q+V+")";return u.hierPart="(?:(?:\\/\\/"+U+V+")|"+Z+"|"+J+"|"+ce+")",u.hierPartCapture="(?:(?:\\/\\/"+X+V+")|"+Z+"|"+J+")",u.relativeRef="(?:(?:\\/\\/"+U+V+")|"+Z+"|"+te+"|)",u.relativeRefCapture="(?:(?:\\/\\/"+X+V+")|"+Z+"|"+te+"|)",u.query="["+l+"\\/\\?]*(?=#|$)",u.queryWithSquareBrackets="["+l+"\\[\\]\\/\\?]*(?=#|$)",u.fragment="["+l+"\\/\\?]*",u}};d.rfc3986=d.generate(),S.ip={v4Cidr:d.rfc3986.ipv4Cidr,v6Cidr:d.rfc3986.ipv6Cidr,ipv4:d.rfc3986.ipv4address,ipv6:d.rfc3986.ipv6address,ipvfuture:d.rfc3986.ipvFuture},d.createRegex=function(u){const e=d.rfc3986,i="(?:\\?"+(u.allowQuerySquareBrackets?e.queryWithSquareBrackets:e.query)+")?(?:#"+e.fragment+")?",s=u.domain?e.relativeRefCapture:e.relativeRef;if(u.relativeOnly)return d.wrap(s+i);let r="";if(u.scheme){o(u.scheme instanceof RegExp||typeof u.scheme=="string"||Array.isArray(u.scheme),"scheme must be a RegExp, String, or Array");const n=[].concat(u.scheme);o(n.length>=1,"scheme must have at least 1 scheme specified");const a=[];for(let f=0;f<n.length;++f){const m=n[f];o(m instanceof RegExp||typeof m=="string","scheme at position "+f+" must be a RegExp or String"),m instanceof RegExp?a.push(m.source.toString()):(o(e.schemeRegex.test(m),"scheme at position "+f+" must be a valid scheme"),a.push(g(m)))}r=a.join("|")}const t="(?:"+(r?"(?:"+r+")":e.scheme)+":"+(u.domain?e.hierPartCapture:e.hierPart)+")",l=u.allowRelative?"(?:"+t+"|"+s+")":t;return d.wrap(l+i,r)},d.wrap=function(u,e){return{raw:u=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${u}`,regex:new RegExp(`^${u}$`),scheme:e}},d.uriRegex=d.createRegex({}),S.regex=function(u={}){return u.scheme||u.allowRelative||u.relativeOnly||u.allowQuerySquareBrackets||u.domain?d.createRegex(u):d.uriRegex}},1447:(A,S)=>{const v={operators:["!","^","*","/","%","+","-","<","<=",">",">=","==","!=","&&","||","??"],operatorCharacters:["!","^","*","/","%","+","-","<","=",">","&","|","?"],operatorsOrder:[["^"],["*","/","%"],["+","-"],["<","<=",">",">="],["==","!="],["&&"],["||","??"]],operatorsPrefix:["!","n"],literals:{'"':'"',"`":"`","'":"'","[":"]"},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol("formula"),settings:Symbol("settings")};S.Parser=class{constructor(o,g={}){if(!g[v.settings]&&g.constants)for(const d in g.constants){const u=g.constants[d];if(u!==null&&!["boolean","number","string"].includes(typeof u))throw new Error(`Formula constant ${d} contains invalid ${typeof u} value type`)}this.settings=g[v.settings]?g:Object.assign({[v.settings]:!0,constants:{},functions:{}},g),this.single=null,this._parts=null,this._parse(o)}_parse(o){let g=[],d="",u=0,e=!1;const i=r=>{if(u)throw new Error("Formula missing closing parenthesis");const t=g.length?g[g.length-1]:null;if(e||d||r){if(t&&t.type==="reference"&&r===")")return t.type="function",t.value=this._subFormula(d,t.value),void(d="");if(r===")"){const l=new S.Parser(d,this.settings);g.push({type:"segment",value:l})}else if(e){if(e==="]")return g.push({type:"reference",value:d}),void(d="");g.push({type:"literal",value:d})}else if(v.operatorCharacters.includes(d))t&&t.type==="operator"&&v.operators.includes(t.value+d)?t.value+=d:g.push({type:"operator",value:d});else if(d.match(v.numberRx))g.push({type:"constant",value:parseFloat(d)});else if(this.settings.constants[d]!==void 0)g.push({type:"constant",value:this.settings.constants[d]});else{if(!d.match(v.tokenRx))throw new Error(`Formula contains invalid token: ${d}`);g.push({type:"reference",value:d})}d=""}};for(const r of o)e?r===e?(i(),e=!1):d+=r:u?r==="("?(d+=r,++u):r===")"?(--u,u?d+=r:i(r)):d+=r:r in v.literals?e=v.literals[r]:r==="("?(i(),++u):v.operatorCharacters.includes(r)?(i(),d=r,i()):r!==" "?d+=r:i();i(),g=g.map((r,t)=>r.type!=="operator"||r.value!=="-"||t&&g[t-1].type!=="operator"?r:{type:"operator",value:"n"});let s=!1;for(const r of g){if(r.type==="operator"){if(v.operatorsPrefix.includes(r.value))continue;if(!s)throw new Error("Formula contains an operator in invalid position");if(!v.operators.includes(r.value))throw new Error(`Formula contains an unknown operator ${r.value}`)}else if(s)throw new Error("Formula missing expected operator");s=!s}if(!s)throw new Error("Formula contains invalid trailing operator");g.length===1&&["reference","literal","constant"].includes(g[0].type)&&(this.single={type:g[0].type==="reference"?"reference":"value",value:g[0].value}),this._parts=g.map(r=>{if(r.type==="operator")return v.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):v.reference(r.value)})}_subFormula(o,g){const d=this.settings.functions[g];if(typeof d!="function")throw new Error(`Formula contains unknown function ${g}`);let u=[];if(o){let e="",i=0,s=!1;const r=()=>{if(!e)throw new Error(`Formula contains function ${g} with invalid arguments ${o}`);u.push(e),e=""};for(let t=0;t<o.length;++t){const l=o[t];s?(e+=l,l===s&&(s=!1)):l in v.literals&&!i?(e+=l,s=v.literals[l]):l!==","||i?(e+=l,l==="("?++i:l===")"&&--i):r()}r()}return u=u.map(e=>new S.Parser(e,this.settings)),function(e){const i=[];for(const s of u)i.push(s.evaluate(e));return d.call(e,...i)}}evaluate(o){const g=this._parts.slice();for(let d=g.length-2;d>=0;--d){const u=g[d];if(u&&u.type==="operator"){const e=g[d+1];g.splice(d+1,1);const i=v.evaluate(e,o);g[d]=v.single(u.value,i)}}return v.operatorsOrder.forEach(d=>{for(let u=1;u<g.length-1;)if(d.includes(g[u])){const e=g[u],i=v.evaluate(g[u-1],o),s=v.evaluate(g[u+1],o);g.splice(u,2);const r=v.calculate(e,i,s);g[u-1]=r===0?0:r}else u+=2}),v.evaluate(g[0],o)}},S.Parser.prototype[v.symbol]=!0,v.reference=function(o){return function(g){return g&&g[o]!==void 0?g[o]:null}},v.evaluate=function(o,g){return o===null?null:typeof o=="function"?o(g):o[v.symbol]?o.evaluate(g):o},v.single=function(o,g){if(o==="!")return!g;const d=-g;return d===0?0:d},v.calculate=function(o,g,d){if(o==="??")return v.exists(g)?g:d;if(typeof g=="string"||typeof d=="string"){if(o==="+")return(g=v.exists(g)?g:"")+(v.exists(d)?d:"")}else switch(o){case"^":return Math.pow(g,d);case"*":return g*d;case"/":return g/d;case"%":return g%d;case"+":return g+d;case"-":return g-d}switch(o){case"<":return g<d;case"<=":return g<=d;case">":return g>d;case">=":return g>=d;case"==":return g===d;case"!=":return g!==d;case"&&":return g&&d;case"||":return g||d}return null},v.exists=function(o){return o!=null}},9926:()=>{},5688:()=>{},9708:()=>{},1152:()=>{},443:()=>{},9848:()=>{},5934:A=>{A.exports=JSON.parse('{"version":"17.12.2"}')}},N={},function A(S){var v=N[S];if(v!==void 0)return v.exports;var o=N[S]={exports:{}};return T[S](o,o.exports,A),o.exports}(5107);var T,N})})(et);var tt=et.exports;const rr=["ᄀ-ᇹ"," -〿","ぁ-ゔ","゙-ゞ","ァ-ヾ","ㄱ-ㆎ","㆐-㆟","㈀-㈜","㈠-㉃","㉠-㊰","㋀-㍶","㍻-㏝","㏠-㏾","一-龥","가-힣","-","豈-鶴"],nr=["︰-﹄","﹉-﹒","﹔-﹫","!-~","¢-₩"];var sr={charsWide:rr,charsFullWidth:nr};const{charsWide:ir,charsFullWidth:ar}=sr,rt=new RegExp(`[${ir.join("")}${ar.join("")}]`,"g"),or=R=>R.replace(rt,"xx").length;var lr={default:or,charsRegex:rt};/*!
2
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
3
+ *
4
+ * Copyright (c) 2014-2016, Jon Schlinkert.
5
+ * Licensed under the MIT License.
6
+ */var cr=function($){if(typeof $!="string"||$==="")return!1;for(var T;T=/(\\).|([@?!+*]\(.*\))/g.exec($);){if(T[2])return!0;$=$.slice(T.index+T[0].length)}return!1};/*!
7
+ * is-glob <https://github.com/jonschlinkert/is-glob>
8
+ *
9
+ * Copyright (c) 2014-2017, Jon Schlinkert.
10
+ * Released under the MIT License.
11
+ */var ur=cr,nt={"{":"}","(":")","[":"]"},fr=function(R){if(R[0]==="!")return!0;for(var $=0,T=-2,N=-2,A=-2,S=-2,v=-2;$<R.length;){if(R[$]==="*"||R[$+1]==="?"&&/[\].+)]/.test(R[$])||N!==-1&&R[$]==="["&&R[$+1]!=="]"&&(N<$&&(N=R.indexOf("]",$)),N>$&&(v===-1||v>N||(v=R.indexOf("\\",$),v===-1||v>N)))||A!==-1&&R[$]==="{"&&R[$+1]!=="}"&&(A=R.indexOf("}",$),A>$&&(v=R.indexOf("\\",$),v===-1||v>A))||S!==-1&&R[$]==="("&&R[$+1]==="?"&&/[:!=]/.test(R[$+2])&&R[$+3]!==")"&&(S=R.indexOf(")",$),S>$&&(v=R.indexOf("\\",$),v===-1||v>S))||T!==-1&&R[$]==="("&&R[$+1]!=="|"&&(T<$&&(T=R.indexOf("|",$)),T!==-1&&R[T+1]!==")"&&(S=R.indexOf(")",T),S>T&&(v=R.indexOf("\\",T),v===-1||v>S))))return!0;if(R[$]==="\\"){var o=R[$+1];$+=2;var g=nt[o];if(g){var d=R.indexOf(g,$);d!==-1&&($=d+1)}if(R[$]==="!")return!0}else $++}return!1},mr=function(R){if(R[0]==="!")return!0;for(var $=0;$<R.length;){if(/[*?{}()[\]]/.test(R[$]))return!0;if(R[$]==="\\"){var T=R[$+1];$+=2;var N=nt[T];if(N){var A=R.indexOf(N,$);A!==-1&&($=A+1)}if(R[$]==="!")return!0}else $++}return!1},hr=function($,T){if(typeof $!="string"||$==="")return!1;if(ur($))return!0;var N=fr;return T&&T.strict===!1&&(N=mr),N($)},Ie={exports:{}};(function(R,$){var T={};$=R.exports=c;var N;typeof Wt=="object"&&T&&T.NODE_DEBUG&&/\bsemver\b/i.test(T.NODE_DEBUG)?N=function(){var _=Array.prototype.slice.call(arguments,0);_.unshift("SEMVER"),console.log.apply(console,_)}:N=function(){},$.SEMVER_SPEC_VERSION="2.0.0";var A=256,S=Number.MAX_SAFE_INTEGER||9007199254740991,v=16,o=A-6,g=$.re=[],d=$.safeRe=[],u=$.src=[],e=$.tokens={},i=0;function s(_){e[_]=i++}var r="[a-zA-Z0-9-]",t=[["\\s",1],["\\d",A],[r,o]];function l(_){for(var x=0;x<t.length;x++){var I=t[x][0],j=t[x][1];_=_.split(I+"*").join(I+"{0,"+j+"}").split(I+"+").join(I+"{1,"+j+"}")}return _}s("NUMERICIDENTIFIER"),u[e.NUMERICIDENTIFIER]="0|[1-9]\\d*",s("NUMERICIDENTIFIERLOOSE"),u[e.NUMERICIDENTIFIERLOOSE]="\\d+",s("NONNUMERICIDENTIFIER"),u[e.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+r+"*",s("MAINVERSION"),u[e.MAINVERSION]="("+u[e.NUMERICIDENTIFIER]+")\\.("+u[e.NUMERICIDENTIFIER]+")\\.("+u[e.NUMERICIDENTIFIER]+")",s("MAINVERSIONLOOSE"),u[e.MAINVERSIONLOOSE]="("+u[e.NUMERICIDENTIFIERLOOSE]+")\\.("+u[e.NUMERICIDENTIFIERLOOSE]+")\\.("+u[e.NUMERICIDENTIFIERLOOSE]+")",s("PRERELEASEIDENTIFIER"),u[e.PRERELEASEIDENTIFIER]="(?:"+u[e.NUMERICIDENTIFIER]+"|"+u[e.NONNUMERICIDENTIFIER]+")",s("PRERELEASEIDENTIFIERLOOSE"),u[e.PRERELEASEIDENTIFIERLOOSE]="(?:"+u[e.NUMERICIDENTIFIERLOOSE]+"|"+u[e.NONNUMERICIDENTIFIER]+")",s("PRERELEASE"),u[e.PRERELEASE]="(?:-("+u[e.PRERELEASEIDENTIFIER]+"(?:\\."+u[e.PRERELEASEIDENTIFIER]+")*))",s("PRERELEASELOOSE"),u[e.PRERELEASELOOSE]="(?:-?("+u[e.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+u[e.PRERELEASEIDENTIFIERLOOSE]+")*))",s("BUILDIDENTIFIER"),u[e.BUILDIDENTIFIER]=r+"+",s("BUILD"),u[e.BUILD]="(?:\\+("+u[e.BUILDIDENTIFIER]+"(?:\\."+u[e.BUILDIDENTIFIER]+")*))",s("FULL"),s("FULLPLAIN"),u[e.FULLPLAIN]="v?"+u[e.MAINVERSION]+u[e.PRERELEASE]+"?"+u[e.BUILD]+"?",u[e.FULL]="^"+u[e.FULLPLAIN]+"$",s("LOOSEPLAIN"),u[e.LOOSEPLAIN]="[v=\\s]*"+u[e.MAINVERSIONLOOSE]+u[e.PRERELEASELOOSE]+"?"+u[e.BUILD]+"?",s("LOOSE"),u[e.LOOSE]="^"+u[e.LOOSEPLAIN]+"$",s("GTLT"),u[e.GTLT]="((?:<|>)?=?)",s("XRANGEIDENTIFIERLOOSE"),u[e.XRANGEIDENTIFIERLOOSE]=u[e.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",s("XRANGEIDENTIFIER"),u[e.XRANGEIDENTIFIER]=u[e.NUMERICIDENTIFIER]+"|x|X|\\*",s("XRANGEPLAIN"),u[e.XRANGEPLAIN]="[v=\\s]*("+u[e.XRANGEIDENTIFIER]+")(?:\\.("+u[e.XRANGEIDENTIFIER]+")(?:\\.("+u[e.XRANGEIDENTIFIER]+")(?:"+u[e.PRERELEASE]+")?"+u[e.BUILD]+"?)?)?",s("XRANGEPLAINLOOSE"),u[e.XRANGEPLAINLOOSE]="[v=\\s]*("+u[e.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+u[e.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+u[e.XRANGEIDENTIFIERLOOSE]+")(?:"+u[e.PRERELEASELOOSE]+")?"+u[e.BUILD]+"?)?)?",s("XRANGE"),u[e.XRANGE]="^"+u[e.GTLT]+"\\s*"+u[e.XRANGEPLAIN]+"$",s("XRANGELOOSE"),u[e.XRANGELOOSE]="^"+u[e.GTLT]+"\\s*"+u[e.XRANGEPLAINLOOSE]+"$",s("COERCE"),u[e.COERCE]="(^|[^\\d])(\\d{1,"+v+"})(?:\\.(\\d{1,"+v+"}))?(?:\\.(\\d{1,"+v+"}))?(?:$|[^\\d])",s("COERCERTL"),g[e.COERCERTL]=new RegExp(u[e.COERCE],"g"),d[e.COERCERTL]=new RegExp(l(u[e.COERCE]),"g"),s("LONETILDE"),u[e.LONETILDE]="(?:~>?)",s("TILDETRIM"),u[e.TILDETRIM]="(\\s*)"+u[e.LONETILDE]+"\\s+",g[e.TILDETRIM]=new RegExp(u[e.TILDETRIM],"g"),d[e.TILDETRIM]=new RegExp(l(u[e.TILDETRIM]),"g");var n="$1~";s("TILDE"),u[e.TILDE]="^"+u[e.LONETILDE]+u[e.XRANGEPLAIN]+"$",s("TILDELOOSE"),u[e.TILDELOOSE]="^"+u[e.LONETILDE]+u[e.XRANGEPLAINLOOSE]+"$",s("LONECARET"),u[e.LONECARET]="(?:\\^)",s("CARETTRIM"),u[e.CARETTRIM]="(\\s*)"+u[e.LONECARET]+"\\s+",g[e.CARETTRIM]=new RegExp(u[e.CARETTRIM],"g"),d[e.CARETTRIM]=new RegExp(l(u[e.CARETTRIM]),"g");var a="$1^";s("CARET"),u[e.CARET]="^"+u[e.LONECARET]+u[e.XRANGEPLAIN]+"$",s("CARETLOOSE"),u[e.CARETLOOSE]="^"+u[e.LONECARET]+u[e.XRANGEPLAINLOOSE]+"$",s("COMPARATORLOOSE"),u[e.COMPARATORLOOSE]="^"+u[e.GTLT]+"\\s*("+u[e.LOOSEPLAIN]+")$|^$",s("COMPARATOR"),u[e.COMPARATOR]="^"+u[e.GTLT]+"\\s*("+u[e.FULLPLAIN]+")$|^$",s("COMPARATORTRIM"),u[e.COMPARATORTRIM]="(\\s*)"+u[e.GTLT]+"\\s*("+u[e.LOOSEPLAIN]+"|"+u[e.XRANGEPLAIN]+")",g[e.COMPARATORTRIM]=new RegExp(u[e.COMPARATORTRIM],"g"),d[e.COMPARATORTRIM]=new RegExp(l(u[e.COMPARATORTRIM]),"g");var f="$1$2$3";s("HYPHENRANGE"),u[e.HYPHENRANGE]="^\\s*("+u[e.XRANGEPLAIN]+")\\s+-\\s+("+u[e.XRANGEPLAIN]+")\\s*$",s("HYPHENRANGELOOSE"),u[e.HYPHENRANGELOOSE]="^\\s*("+u[e.XRANGEPLAINLOOSE]+")\\s+-\\s+("+u[e.XRANGEPLAINLOOSE]+")\\s*$",s("STAR"),u[e.STAR]="(<|>)?=?\\s*\\*";for(var m=0;m<i;m++)N(m,u[m]),g[m]||(g[m]=new RegExp(u[m]),d[m]=new RegExp(l(u[m])));$.parse=p;function p(_,x){if((!x||typeof x!="object")&&(x={loose:!!x,includePrerelease:!1}),_ instanceof c)return _;if(typeof _!="string"||_.length>A)return null;var I=x.loose?d[e.LOOSE]:d[e.FULL];if(!I.test(_))return null;try{return new c(_,x)}catch{return null}}$.valid=E;function E(_,x){var I=p(_,x);return I?I.version:null}$.clean=w;function w(_,x){var I=p(_.trim().replace(/^[=v]+/,""),x);return I?I.version:null}$.SemVer=c;function c(_,x){if((!x||typeof x!="object")&&(x={loose:!!x,includePrerelease:!1}),_ instanceof c){if(_.loose===x.loose)return _;_=_.version}else if(typeof _!="string")throw new TypeError("Invalid Version: "+_);if(_.length>A)throw new TypeError("version is longer than "+A+" characters");if(!(this instanceof c))return new c(_,x);N("SemVer",_,x),this.options=x,this.loose=!!x.loose;var I=_.trim().match(x.loose?d[e.LOOSE]:d[e.FULL]);if(!I)throw new TypeError("Invalid Version: "+_);if(this.raw=_,this.major=+I[1],this.minor=+I[2],this.patch=+I[3],this.major>S||this.major<0)throw new TypeError("Invalid major version");if(this.minor>S||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>S||this.patch<0)throw new TypeError("Invalid patch version");I[4]?this.prerelease=I[4].split(".").map(function(j){if(/^[0-9]+$/.test(j)){var C=+j;if(C>=0&&C<S)return C}return j}):this.prerelease=[],this.build=I[5]?I[5].split("."):[],this.format()}c.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},c.prototype.toString=function(){return this.version},c.prototype.compare=function(_){return N("SemVer.compare",this.version,this.options,_),_ instanceof c||(_=new c(_,this.options)),this.compareMain(_)||this.comparePre(_)},c.prototype.compareMain=function(_){return _ instanceof c||(_=new c(_,this.options)),k(this.major,_.major)||k(this.minor,_.minor)||k(this.patch,_.patch)},c.prototype.comparePre=function(_){if(_ instanceof c||(_=new c(_,this.options)),this.prerelease.length&&!_.prerelease.length)return-1;if(!this.prerelease.length&&_.prerelease.length)return 1;if(!this.prerelease.length&&!_.prerelease.length)return 0;var x=0;do{var I=this.prerelease[x],j=_.prerelease[x];if(N("prerelease compare",x,I,j),I===void 0&&j===void 0)return 0;if(j===void 0)return 1;if(I===void 0)return-1;if(I===j)continue;return k(I,j)}while(++x)},c.prototype.compareBuild=function(_){_ instanceof c||(_=new c(_,this.options));var x=0;do{var I=this.build[x],j=_.build[x];if(N("prerelease compare",x,I,j),I===void 0&&j===void 0)return 0;if(j===void 0)return 1;if(I===void 0)return-1;if(I===j)continue;return k(I,j)}while(++x)},c.prototype.inc=function(_,x){switch(_){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",x);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",x);break;case"prepatch":this.prerelease.length=0,this.inc("patch",x),this.inc("pre",x);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",x),this.inc("pre",x);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var I=this.prerelease.length;--I>=0;)typeof this.prerelease[I]=="number"&&(this.prerelease[I]++,I=-2);I===-1&&this.prerelease.push(0)}x&&(this.prerelease[0]===x?isNaN(this.prerelease[1])&&(this.prerelease=[x,0]):this.prerelease=[x,0]);break;default:throw new Error("invalid increment argument: "+_)}return this.format(),this.raw=this.version,this},$.inc=h;function h(_,x,I,j){typeof I=="string"&&(j=I,I=void 0);try{return new c(_,I).inc(x,j).version}catch{return null}}$.diff=y;function y(_,x){if(ce(_,x))return null;var I=p(_),j=p(x),C="";if(I.prerelease.length||j.prerelease.length){C="pre";var P="prerelease"}for(var F in I)if((F==="major"||F==="minor"||F==="patch")&&I[F]!==j[F])return C+F;return P}$.compareIdentifiers=k;var O=/^[0-9]+$/;function k(_,x){var I=O.test(_),j=O.test(x);return I&&j&&(_=+_,x=+x),_===x?0:I&&!j?-1:j&&!I?1:_<x?-1:1}$.rcompareIdentifiers=L;function L(_,x){return k(x,_)}$.major=D;function D(_,x){return new c(_,x).major}$.minor=q;function q(_,x){return new c(_,x).minor}$.patch=z;function z(_,x){return new c(_,x).patch}$.compare=U;function U(_,x,I){return new c(_,I).compare(new c(x,I))}$.compareLoose=X;function X(_,x){return U(_,x,!0)}$.compareBuild=Q;function Q(_,x,I){var j=new c(_,I),C=new c(x,I);return j.compare(C)||j.compareBuild(C)}$.rcompare=W;function W(_,x,I){return U(x,_,I)}$.sort=V;function V(_,x){return _.sort(function(I,j){return $.compareBuild(I,j,x)})}$.rsort=Z;function Z(_,x){return _.sort(function(I,j){return $.compareBuild(j,I,x)})}$.gt=J;function J(_,x,I){return U(_,x,I)>0}$.lt=te;function te(_,x,I){return U(_,x,I)<0}$.eq=ce;function ce(_,x,I){return U(_,x,I)===0}$.neq=de;function de(_,x,I){return U(_,x,I)!==0}$.gte=ue;function ue(_,x,I){return U(_,x,I)>=0}$.lte=Se;function Se(_,x,I){return U(_,x,I)<=0}$.cmp=we;function we(_,x,I,j){switch(x){case"===":return typeof _=="object"&&(_=_.version),typeof I=="object"&&(I=I.version),_===I;case"!==":return typeof _=="object"&&(_=_.version),typeof I=="object"&&(I=I.version),_!==I;case"":case"=":case"==":return ce(_,I,j);case"!=":return de(_,I,j);case">":return J(_,I,j);case">=":return ue(_,I,j);case"<":return te(_,I,j);case"<=":return Se(_,I,j);default:throw new TypeError("Invalid operator: "+x)}}$.Comparator=ne;function ne(_,x){if((!x||typeof x!="object")&&(x={loose:!!x,includePrerelease:!1}),_ instanceof ne){if(_.loose===!!x.loose)return _;_=_.value}if(!(this instanceof ne))return new ne(_,x);_=_.trim().split(/\s+/).join(" "),N("comparator",_,x),this.options=x,this.loose=!!x.loose,this.parse(_),this.semver===pe?this.value="":this.value=this.operator+this.semver.version,N("comp",this)}var pe={};ne.prototype.parse=function(_){var x=this.options.loose?d[e.COMPARATORLOOSE]:d[e.COMPARATOR],I=_.match(x);if(!I)throw new TypeError("Invalid comparator: "+_);this.operator=I[1]!==void 0?I[1]:"",this.operator==="="&&(this.operator=""),I[2]?this.semver=new c(I[2],this.options.loose):this.semver=pe},ne.prototype.toString=function(){return this.value},ne.prototype.test=function(_){if(N("Comparator.test",_,this.options.loose),this.semver===pe||_===pe)return!0;if(typeof _=="string")try{_=new c(_,this.options)}catch{return!1}return we(_,this.operator,this.semver,this.options)},ne.prototype.intersects=function(_,x){if(!(_ instanceof ne))throw new TypeError("a Comparator is required");(!x||typeof x!="object")&&(x={loose:!!x,includePrerelease:!1});var I;if(this.operator==="")return this.value===""?!0:(I=new H(_.value,x),Ee(this.value,I,x));if(_.operator==="")return _.value===""?!0:(I=new H(this.value,x),Ee(_.semver,I,x));var j=(this.operator===">="||this.operator===">")&&(_.operator===">="||_.operator===">"),C=(this.operator==="<="||this.operator==="<")&&(_.operator==="<="||_.operator==="<"),P=this.semver.version===_.semver.version,F=(this.operator===">="||this.operator==="<=")&&(_.operator===">="||_.operator==="<="),G=we(this.semver,"<",_.semver,x)&&(this.operator===">="||this.operator===">")&&(_.operator==="<="||_.operator==="<"),B=we(this.semver,">",_.semver,x)&&(this.operator==="<="||this.operator==="<")&&(_.operator===">="||_.operator===">");return j||C||P&&F||G||B},$.Range=H;function H(_,x){if((!x||typeof x!="object")&&(x={loose:!!x,includePrerelease:!1}),_ instanceof H)return _.loose===!!x.loose&&_.includePrerelease===!!x.includePrerelease?_:new H(_.raw,x);if(_ instanceof ne)return new H(_.value,x);if(!(this instanceof H))return new H(_,x);if(this.options=x,this.loose=!!x.loose,this.includePrerelease=!!x.includePrerelease,this.raw=_.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(I){return this.parseRange(I.trim())},this).filter(function(I){return I.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}H.prototype.format=function(){return this.range=this.set.map(function(_){return _.join(" ").trim()}).join("||").trim(),this.range},H.prototype.toString=function(){return this.range},H.prototype.parseRange=function(_){var x=this.options.loose,I=x?d[e.HYPHENRANGELOOSE]:d[e.HYPHENRANGE];_=_.replace(I,Ct),N("hyphen replace",_),_=_.replace(d[e.COMPARATORTRIM],f),N("comparator trim",_,d[e.COMPARATORTRIM]),_=_.replace(d[e.TILDETRIM],n),_=_.replace(d[e.CARETTRIM],a),_=_.split(/\s+/).join(" ");var j=x?d[e.COMPARATORLOOSE]:d[e.COMPARATOR],C=_.split(" ").map(function(P){return Ot(P,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(C=C.filter(function(P){return!!P.match(j)})),C=C.map(function(P){return new ne(P,this.options)},this),C},H.prototype.intersects=function(_,x){if(!(_ instanceof H))throw new TypeError("a Range is required");return this.set.some(function(I){return ze(I,x)&&_.set.some(function(j){return ze(j,x)&&I.every(function(C){return j.every(function(P){return C.intersects(P,x)})})})})};function ze(_,x){for(var I=!0,j=_.slice(),C=j.pop();I&&j.length;)I=j.every(function(P){return C.intersects(P,x)}),C=j.pop();return I}$.toComparators=St;function St(_,x){return new H(_,x).set.map(function(I){return I.map(function(j){return j.value}).join(" ").trim().split(" ")})}function Ot(_,x){return N("comp",_,x),_=jt(_,x),N("caret",_),_=It(_,x),N("tildes",_),_=Tt(_,x),N("xrange",_),_=Nt(_,x),N("stars",_),_}function ee(_){return!_||_.toLowerCase()==="x"||_==="*"}function It(_,x){return _.trim().split(/\s+/).map(function(I){return At(I,x)}).join(" ")}function At(_,x){var I=x.loose?d[e.TILDELOOSE]:d[e.TILDE];return _.replace(I,function(j,C,P,F,G){N("tilde",_,j,C,P,F,G);var B;return ee(C)?B="":ee(P)?B=">="+C+".0.0 <"+(+C+1)+".0.0":ee(F)?B=">="+C+"."+P+".0 <"+C+"."+(+P+1)+".0":G?(N("replaceTilde pr",G),B=">="+C+"."+P+"."+F+"-"+G+" <"+C+"."+(+P+1)+".0"):B=">="+C+"."+P+"."+F+" <"+C+"."+(+P+1)+".0",N("tilde return",B),B})}function jt(_,x){return _.trim().split(/\s+/).map(function(I){return kt(I,x)}).join(" ")}function kt(_,x){N("caret",_,x);var I=x.loose?d[e.CARETLOOSE]:d[e.CARET];return _.replace(I,function(j,C,P,F,G){N("caret",_,j,C,P,F,G);var B;return ee(C)?B="":ee(P)?B=">="+C+".0.0 <"+(+C+1)+".0.0":ee(F)?C==="0"?B=">="+C+"."+P+".0 <"+C+"."+(+P+1)+".0":B=">="+C+"."+P+".0 <"+(+C+1)+".0.0":G?(N("replaceCaret pr",G),C==="0"?P==="0"?B=">="+C+"."+P+"."+F+"-"+G+" <"+C+"."+P+"."+(+F+1):B=">="+C+"."+P+"."+F+"-"+G+" <"+C+"."+(+P+1)+".0":B=">="+C+"."+P+"."+F+"-"+G+" <"+(+C+1)+".0.0"):(N("no pr"),C==="0"?P==="0"?B=">="+C+"."+P+"."+F+" <"+C+"."+P+"."+(+F+1):B=">="+C+"."+P+"."+F+" <"+C+"."+(+P+1)+".0":B=">="+C+"."+P+"."+F+" <"+(+C+1)+".0.0"),N("caret return",B),B})}function Tt(_,x){return N("replaceXRanges",_,x),_.split(/\s+/).map(function(I){return Lt(I,x)}).join(" ")}function Lt(_,x){_=_.trim();var I=x.loose?d[e.XRANGELOOSE]:d[e.XRANGE];return _.replace(I,function(j,C,P,F,G,B){N("xRange",_,j,C,P,F,G,B);var ae=ee(P),oe=ae||ee(F),se=oe||ee(G),re=se;return C==="="&&re&&(C=""),B=x.includePrerelease?"-0":"",ae?C===">"||C==="<"?j="<0.0.0-0":j="*":C&&re?(oe&&(F=0),G=0,C===">"?(C=">=",oe?(P=+P+1,F=0,G=0):(F=+F+1,G=0)):C==="<="&&(C="<",oe?P=+P+1:F=+F+1),j=C+P+"."+F+"."+G+B):oe?j=">="+P+".0.0"+B+" <"+(+P+1)+".0.0"+B:se&&(j=">="+P+"."+F+".0"+B+" <"+P+"."+(+F+1)+".0"+B),N("xRange return",j),j})}function Nt(_,x){return N("replaceStars",_,x),_.trim().replace(d[e.STAR],"")}function Ct(_,x,I,j,C,P,F,G,B,ae,oe,se,re){return ee(I)?x="":ee(j)?x=">="+I+".0.0":ee(C)?x=">="+I+"."+j+".0":x=">="+x,ee(B)?G="":ee(ae)?G="<"+(+B+1)+".0.0":ee(oe)?G="<"+B+"."+(+ae+1)+".0":se?G="<="+B+"."+ae+"."+oe+"-"+se:G="<="+G,(x+" "+G).trim()}H.prototype.test=function(_){if(!_)return!1;if(typeof _=="string")try{_=new c(_,this.options)}catch{return!1}for(var x=0;x<this.set.length;x++)if(Dt(this.set[x],_,this.options))return!0;return!1};function Dt(_,x,I){for(var j=0;j<_.length;j++)if(!_[j].test(x))return!1;if(x.prerelease.length&&!I.includePrerelease){for(j=0;j<_.length;j++)if(N(_[j].semver),_[j].semver!==pe&&_[j].semver.prerelease.length>0){var C=_[j].semver;if(C.major===x.major&&C.minor===x.minor&&C.patch===x.patch)return!0}return!1}return!0}$.satisfies=Ee;function Ee(_,x,I){try{x=new H(x,I)}catch{return!1}return x.test(_)}$.maxSatisfying=Pt;function Pt(_,x,I){var j=null,C=null;try{var P=new H(x,I)}catch{return null}return _.forEach(function(F){P.test(F)&&(!j||C.compare(F)===-1)&&(j=F,C=new c(j,I))}),j}$.minSatisfying=Ft;function Ft(_,x,I){var j=null,C=null;try{var P=new H(x,I)}catch{return null}return _.forEach(function(F){P.test(F)&&(!j||C.compare(F)===1)&&(j=F,C=new c(j,I))}),j}$.minVersion=Mt;function Mt(_,x){_=new H(_,x);var I=new c("0.0.0");if(_.test(I)||(I=new c("0.0.0-0"),_.test(I)))return I;I=null;for(var j=0;j<_.set.length;++j){var C=_.set[j];C.forEach(function(P){var F=new c(P.semver.version);switch(P.operator){case">":F.prerelease.length===0?F.patch++:F.prerelease.push(0),F.raw=F.format();case"":case">=":(!I||J(I,F))&&(I=F);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+P.operator)}})}return I&&_.test(I)?I:null}$.validRange=qt;function qt(_,x){try{return new H(_,x).range||"*"}catch{return null}}$.ltr=Bt;function Bt(_,x,I){return Oe(_,x,"<",I)}$.gtr=Ut;function Ut(_,x,I){return Oe(_,x,">",I)}$.outside=Oe;function Oe(_,x,I,j){_=new c(_,j),x=new H(x,j);var C,P,F,G,B;switch(I){case">":C=J,P=Se,F=te,G=">",B=">=";break;case"<":C=te,P=ue,F=J,G="<",B="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ee(_,x,j))return!1;for(var ae=0;ae<x.set.length;++ae){var oe=x.set[ae],se=null,re=null;if(oe.forEach(function(fe){fe.semver===pe&&(fe=new ne(">=0.0.0")),se=se||fe,re=re||fe,C(fe.semver,se.semver,j)?se=fe:F(fe.semver,re.semver,j)&&(re=fe)}),se.operator===G||se.operator===B||(!re.operator||re.operator===G)&&P(_,re.semver))return!1;if(re.operator===B&&F(_,re.semver))return!1}return!0}$.prerelease=zt;function zt(_,x){var I=p(_,x);return I&&I.prerelease.length?I.prerelease:null}$.intersects=Gt;function Gt(_,x,I){return _=new H(_,I),x=new H(x,I),_.intersects(x)}$.coerce=Vt;function Vt(_,x){if(_ instanceof c)return _;if(typeof _=="number"&&(_=String(_)),typeof _!="string")return null;x=x||{};var I=null;if(!x.rtl)I=_.match(d[e.COERCE]);else{for(var j;(j=d[e.COERCERTL].exec(_))&&(!I||I.index+I[0].length!==_.length);)(!I||j.index+j[0].length!==I.index+I[0].length)&&(I=j),d[e.COERCERTL].lastIndex=j.index+j[1].length+j[2].length;d[e.COERCERTL].lastIndex=-1}return I===null?null:p(I[2]+"."+(I[3]||"0")+"."+(I[4]||"0"),x)}})(Ie,Ie.exports);var dr=Ie.exports;const st=tt,le=dr,Y="semver",pr={base:st.string(),type:"semverRange",validate:function(R,{error:$}){return le.validRange(R)?{value:R}:{errors:$(`${Y}.valid`)}},messages:{[`${Y}.valid`]:"{{#label}} needs to be a valid semver range"}},he={};he.compare={method:!1,validate:function(R,$,{exp:T},{name:N}){return le[N](R,T)?R:$.error(`${Y}.${N}`,{exp:T})},args:[{name:"exp",assert:le.valid,message:"needs to be a valid semver expression"}]};["gt","gte","lt","lte","eq","neq"].forEach(function(R){he[R]={method:function($){return this.$_addRule({name:R,method:"compare",args:{exp:$}})}}});he.cmp={method:function(R,$){return this.$_addRule({name:"cmp",args:{cmp:R,exp:$}})},validate:function(R,$,{cmp:T,exp:N}){return le.cmp(R,T,N)?R:$.error(`${Y}.cmp`,{cmp:T,exp:N})},args:[{name:"cmp",assert:R=>["===","!==","","=","==","!=",">",">=","<","<="].includes(R),message:"needs to be a valid comparator"},{name:"exp",assert:le.valid,message:"needs to be a valid semver expression"}]};he.compareRange={method:!1,validate:function(R,$,{rng:T},{name:N}){return le[N](R,T)?R:$.error(`${Y}.${N}`,{rng:T})},args:[{name:"rng",assert:le.validRange,message:"needs to be a valid semver range"}]};["satisfies","gtr","ltr"].forEach(function(R){he[R]={method:function($){return this.$_addRule({name:R,method:"compareRange",args:{rng:$}})}}});he.outside={method:function(R,$){return this.$_addRule({name:"outside",args:{hilo:R,rng:$}})},validate:function(R,$,{hilo:T,rng:N}){return le.outside(R,N,T)?R:$.error(`${Y}.outside`,{hilo:T,rng:N})},args:[{name:"hilo",assert:R=>[">","<"].includes(R),message:"needs to be a valid comparator"},{name:"rng",assert:le.validRange,message:"needs to be a valid semver range"}]};const gr={base:st.string(),type:"semver",validate:function(R,{error:$}){return le.valid(R)?{value:R}:{errors:$(`${Y}.valid`)}},messages:{[`${Y}.valid`]:"{{#label}} needs to be a valid semver expression",[`${Y}.gt`]:"{{#label}} needs to be greater than {{#exp}}",[`${Y}.gte`]:"{{#label}} needs to be greater than or equal to {{#exp}}",[`${Y}.lt`]:"{{#label}} needs to be less than {{#exp}}",[`${Y}.lte`]:"{{#label}} needs to be less than or equal to {{#exp}}",[`${Y}.eq`]:"{{#label}} needs to be logically equivalent to {{#exp}}",[`${Y}.neq`]:"{{#label}} needs to be logically different than {{#exp}}",[`${Y}.cmp`]:"{{#label}} needs to satisfy {{#cmp}} on {{#exp}}",[`${Y}.satisfies`]:"{{#label}} needs to satisfy {{#rng}}",[`${Y}.gtr`]:"{{#label}} needs to be greater than range {{#rng}}",[`${Y}.ltr`]:"{{#label}} needs to be less than range {{#rng}}",[`${Y}.outside`]:"{{#label}} needs to be {{#hilo}} than range {{#rng}}"},rules:he};var yr={semver:gr,semverRange:pr};/*!
12
+ * is-var-name | ISC (c) Shinnosuke Watanabe
13
+ * https://github.com/shinnn/is-var-name
14
+ */function vr(R){if(typeof R!="string"||R.trim()!==R)return!1;try{new Function(R,"var "+R)}catch{return!1}return!0}const br=Object.freeze(Object.defineProperty({__proto__:null,default:vr},Symbol.toStringTag,{value:"Module"})),_r=Ht(br),wr=Xt,Er=Yt,Ge=Re,Rr=R=>{if((0,Ge.isValid)(R))return R;const $=(0,Er.toHex)(Kt.from(typeof R=="string"?R.trim():R));return(0,Ge.fromPublicKey)($,{role:wr.types.RoleType.ROLE_ANY})};var $r=Rr,me={},it=ie&&ie.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(me,"__esModule",{value:!0});me.didExtension=me.fileExtension=void 0;const Ve=it(Qe),xr=it(er),Sr=Re,at=R=>({type:"file",base:R.string(),validate($,{error:T}){return $&&typeof $=="string"?{value:$}:{errors:T("file.empty",{file:$})}},messages:{"file.empty":'file "{{#file}}" must be non-empty string',"file.enoent":'file "{{#file}}" does not exist',"file.error.generic":'file could not be read. message: "{{#message}}"'},rules:{exists:{multi:!1,method({baseDir:$=null,canSkip:T=()=>!1}={}){return this.$_addRule({name:"exists",args:{baseDir:$,canSkip:T}})},args:[{name:"baseDir",assert:$=>Ve.default.existsSync($),message:"baseDir must exist"},{name:"canSkip",assert:$=>typeof $=="function",message:"canSkip must be a function"}],validate($,{error:T},{baseDir:N,canSkip:A}={}){if(typeof A=="function"&&A(N,$))return $;try{return Ve.default.statSync(xr.default.join(N,$)),$}catch(S){switch(S.code){case"ENOENT":return T("file.enoent",{file:$})}return T("file.error.generic",{message:S.message})}}}}});me.fileExtension=at;const ot=R=>({type:"DID",base:R.string(),validate($,{error:T}){return!$||typeof $!="string"?{errors:T("did.empty",{did:$})}:(0,Sr.isValid)($)===!1?{errors:T("did.invalid",{did:$})}:{value:$}},messages:{"did.empty":'did "{{#did}}" must be non-empty string',"did.invalid":'did "{{#did}}" is not valid'}});me.didExtension=ot;me.default={fileExtension:at,didExtension:ot};var lt={},ct={exports:{}};const Or=["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"];var ut=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),Ir=Or,Ar=["node_modules","favicon.ico"],jr=ct.exports=function(R){var $=[],T=[];if(R===null)return T.push("name cannot be null"),ve($,T);if(R===void 0)return T.push("name cannot be undefined"),ve($,T);if(typeof R!="string")return T.push("name must be a string"),ve($,T);if(R.length||T.push("name length must be greater than zero"),R.match(/^\./)&&T.push("name cannot start with a period"),R.match(/^_/)&&T.push("name cannot start with an underscore"),R.trim()!==R&&T.push("name cannot contain leading or trailing spaces"),Ar.forEach(function(v){R.toLowerCase()===v&&T.push(v+" is a blacklisted name")}),Ir.forEach(function(v){R.toLowerCase()===v&&$.push(v+" is a core module name")}),R.length>214&&$.push("name can no longer contain more than 214 characters"),R.toLowerCase()!==R&&$.push("name can no longer contain capital letters"),/[~'!()*]/.test(R.split("/").slice(-1)[0])&&$.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(R)!==R){var N=R.match(ut);if(N){var A=N[1],S=N[2];if(encodeURIComponent(A)===A&&encodeURIComponent(S)===S)return ve($,T)}T.push("name can only contain URL-friendly characters")}return ve($,T)};jr.scopedPackagePattern=ut;var ve=function(R,$){var T={validForNewPackages:$.length===0&&R.length===0,validForOldPackages:$.length===0,warnings:R,errors:$};return T.warnings.length||delete T.warnings,T.errors.length||delete T.errors,T},kr=ct.exports;(function(R){var $=ie&&ie.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(R,"__esModule",{value:!0}),R.validateName=R.validateNewDid=void 0;const T=Re,N=$(kr),A=32,S=o=>{if((0,T.toTypeInfo)(o).role!==T.types.RoleType.ROLE_BLOCKLET)throw new Error("Blocklet DID's type must be ROLE_BLOCKLET")};R.validateNewDid=S;const v=(o,{checkDid:g=!0}={})=>{if((0,T.isValid)(o))g&&(0,R.validateNewDid)(o);else{const{validForNewPackages:d,errors:u=[],warnings:e=[]}=(0,N.default)(o);if(!d)throw new Error(u[0]||e[0]);if(o.length>A)throw new Error("Blocklet name is too long")}};R.validateName=v,R.default={validateName:R.validateName,validateNewDid:R.validateNewDid}})(lt);var Tr=ie&&ie.__createBinding||(Object.create?function(R,$,T,N){N===void 0&&(N=T);var A=Object.getOwnPropertyDescriptor($,T);(!A||("get"in A?!$.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return $[T]}}),Object.defineProperty(R,N,A)}:function(R,$,T,N){N===void 0&&(N=T),R[N]=$[T]}),Lr=ie&&ie.__setModuleDefault||(Object.create?function(R,$){Object.defineProperty(R,"default",{enumerable:!0,value:$})}:function(R,$){R.default=$}),Nr=ie&&ie.__importStar||function(R){if(R&&R.__esModule)return R;var $={};if(R!=null)for(var T in R)T!=="default"&&Object.prototype.hasOwnProperty.call(R,T)&&Tr($,R,T);return Lr($,R),$},ye=ie&&ie.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(M,"__esModule",{value:!0});M.Joi=Wr=M.installBlockletDescriptionSchema=Vr=M.installBlockletTitleSchema=M.resourceBundleSchema=M.authConfigSchema=M.cacheableSchema=M.statsSchema=Gr=M.titleSchema=M.themeSchema=M.signatureSchema=M.serviceSchema=M.scriptsSchema=M.personSchema=M.navigationSchema=M.navigationItemSchema=M.updateMountPointSchema=M.mountPointSchema=M.logoSchema=M.interfaceSchema=M.environmentNameSchema=M.environmentSchema=M.engineSchema=M.endpointSchema=M.distSchema=M.descriptionSchema=M.createBlockletSchema=M.componentSchema=M.blockletNameSchema=M.blockletMetaSchema=void 0;const Cr=ye(Qe),Dr=ye(tt),Pr=ye(lr),Fr=ye(hr),We=yr,Mr=ye(_r),He=Jt,qr=Re,K=Qt,Br=ye($r),Ke=me,Ae=lt,ke=Nr(Zt),Ur=Pr.default.default,Xe="/.well-known",b=Dr.default.extend(We.semver).extend(We.semverRange).extend(Ke.fileExtension).extend(Ke.didExtension);M.Joi=b;const Ye=(R,$)=>(0,ke.checkLink)(R)?R:$.message(`Invalid navigation link: ${R}
15
+
16
+ A valid navigation link should be a relative url which start with '/' or a absolute url, such as:
17
+ - /en/home
18
+ - /zh/home
19
+ - https://www.arcblock.io
20
+ `),zr=(R,$)=>!R||(0,Mr.default)(R)?R:$.message(`Invalid navigation id: ${R}
21
+
22
+ A valid navigation id is should follow the rules of javascript variables, such as:
23
+ - foo
24
+ - fooBar
25
+ - foo123
26
+
27
+ see detail in https://www.npmjs.com/package/is-var-name
28
+ `),$e=b.string().trim().min(1).custom(R=>{if(Ur(R)>K.MAX_TITLE_LENGTH)throw new Error(`title length should not exceed ${K.MAX_TITLE_LENGTH} (see: https://www.npmjs.com/package/cjk-length)`);return R}).meta({className:"TTitle"});var Gr=M.titleSchema=$e;const xe=b.string().trim().min(3).max(160).meta({className:"TDescription"});M.descriptionSchema=xe;const ft=b.string().trim().min(3).max(20).messages({"*":"Title length must be between 3 and 20 characters"}).meta({className:"TInstallBlockletTitle"});var Vr=M.installBlockletTitleSchema=ft;const mt=b.string().trim().min(3).max(80).messages({"*":"Description length must be between 3 and 80 characters"}).meta({className:"TInstallBlockletDescription"});var Wr=M.installBlockletDescriptionSchema=mt;const ht=b.string().uri({scheme:["http","https"],allowRelative:!0}).allow("").custom((R,$)=>R.includes(He.WELLKNOWN_BLOCKLET_LOGO_PATH)?$.message(`logo url should not include ${He.WELLKNOWN_BLOCKLET_LOGO_PATH}`):R).meta({className:"TLogo"});M.logoSchema=ht;const dt=b.string().trim().min(1),Te=dt.meta({className:"TMountPoint"}).custom((R,$)=>(0,ke.isValidUrlPath)(R)?R:$.message(`mountPoint cannot contain such characters space $*+~()'"!:@\\`));M.mountPointSchema=Te;const pt=dt.meta({className:"TUpdateMountPoint"}).custom(R=>(0,ke.default)(R));M.updateMountPointSchema=pt;const ge=b.string().custom(R=>((0,Ae.validateName)(R),R)).meta({className:"TBlockletName"});M.blockletNameSchema=ge;const Hr=[],Le=b.string().trim().min(1).max(50).required().custom((R,$)=>R.startsWith("BLOCKLET")&&!Hr.includes(R)?$.message("Env name can not start with BLOCKLET_"):R.startsWith("COMPONENT")?$.message("Env name can not start with COMPONENT_"):R.startsWith("ABTNODE")?$.message("Env name can not start with ABTNODE_"):/[^\w]/.test(R)?$.message('Env name can include only numbers or letters or "_"'):R).meta({className:"TEnvironmentName",unknownType:"any"});M.environmentNameSchema=Le;const Ne=b.object({name:Le.required(),description:b.string().trim().required(),default:b.string().optional().allow("").default(""),required:b.boolean().default(!1),secure:b.boolean().default(!1),validation:b.string().optional(),shared:b.boolean().default(R=>R.secure?!1:void 0)}).custom((R,$)=>R.secure&&R.default?$.message(`Cannot declare default value for secure env ${R.name}`):R).meta({className:"TEnvironment",unknownType:"any"});M.environmentSchema=Ne;const Ce=b.object({dev:b.string().trim().min(1),e2eDev:b.string().trim().min(1),preFlight:b.string().trim().min(1),preInstall:b.string().trim().min(1),postInstall:b.string().trim().min(1),preStart:b.string().trim().min(1),postStart:b.string().trim().min(1),preStop:b.string().trim().min(1),preUninstall:b.string().trim().min(1),preConfig:b.string().trim().min(1)}).rename("pre-flight","preFlight").rename("pre-install","preInstall").rename("post-install","postInstall").rename("pre-start","preStart").rename("post-start","postStart").rename("pre-stop","preStop").rename("pre-uninstall","preUninstall").rename("pre-config","preConfig").optional().meta({className:"TScripts",unknownType:"any"});M.scriptsSchema=Ce;const De=b.object({name:b.string().required().trim(),config:b.object().optional().default({})}).unknown(!0).meta({className:"TService",unknownType:"any"});M.serviceSchema=De;const Pe=b.object({type:b.string().trim(!0).min(1).required(),path:b.string().required(),meta:b.object({vcType:b.string(),payable:b.boolean(),params:b.array().items({name:b.string().required().trim(),description:b.string().required().trim()})})}).meta({className:"TEndpoint",unknownType:"any"});M.endpointSchema=Pe;const gt=b.string().trim().custom((R,$)=>{const T=R.split("/").filter(Boolean);return T.length===0?$.message("cacheable path must be a valid pathname that is not /"):`/${T.join("/")}`}).meta({className:"TPathPrefix",unknownType:"any"});M.cacheableSchema=gt;const Fe=b.object({type:b.string().lowercase().valid(...K.BLOCKLET_INTERFACE_TYPES).required(),name:b.string().trim().required(),path:b.string().trim().default("/"),prefix:b.string().trim().min(1).default(K.BLOCKLET_DYNAMIC_PATH_PREFIX),containerPort:b.number().port().optional(),hostIP:b.string().trim().ip({version:["ipv4","ipv6"]}).optional(),protocol:b.string().lowercase().valid(...K.BLOCKLET_INTERFACE_PROTOCOLS).default("http"),port:b.alternatives().try(b.string().uppercase().default(K.BLOCKLET_DEFAULT_PORT_NAME),b.object({internal:b.string().uppercase().required(),external:b.number().port().required()})).default(K.BLOCKLET_DEFAULT_PORT_NAME),cacheable:b.array().items(gt).unique(),services:b.array().items(De).unique("name"),endpoints:b.array().items(Pe).unique("type"),pageGroups:b.array().items(b.string().min(1).max(255).trim()).unique()}).meta({className:"TInterface",unknownType:"any"});M.interfaceSchema=Fe;const Kr=b.alternatives().try(b.string().required(),b.object({url:b.string().uri({scheme:["http","https","file"]}).required(),name:ge.required(),version:b.alternatives().try(b.string().valid("latest"),b.semverRange().valid())}),b.object({store:b.string().uri({scheme:["http","https"]}).required(),name:ge.required(),version:b.alternatives().try(b.string().valid("latest"),b.semverRange().valid()).default("latest")})),je=b.object({platform:b.string().valid(...K.BLOCKLET_PLATFORMS).optional(),interpreter:b.string().valid("binary","node","blocklet").default("node"),source:Kr,args:b.array().items(b.string()).optional().default([])}).meta({className:"TEngine",unknownType:"any"});M.engineSchema=je;const be=b.object({name:b.string().min(1).required(),email:b.string().email({tlds:!1}).optional(),url:b.string().uri().optional()}).meta({className:"TPerson",unknownType:"any"});M.personSchema=be;const _e=b.object({tarball:b.alternatives().try(b.string().uri(),b.string()).required(),integrity:b.string().required(),size:b.number().optional()}).meta({className:"TDist",unknownType:"any"});M.distSchema=_e;const yt=b.object({downloads:b.number().integer().greater(-1),star:b.number().default(0),purchases:b.number().default(0)}).meta({className:"TStats",unknownType:"any"});M.statsSchema=yt;const Xr=b.alternatives().try(b.object({url:b.alternatives().try(b.string().uri(),b.array().items(b.string().uri()).min(1)).required(),version:b.alternatives().try(b.string().valid("latest"),b.semverRange().valid())}),b.object({store:b.string().uri(),name:ge.required(),version:b.alternatives().try(b.string().valid("latest"),b.semverRange().valid()).default("latest")})),vt={source:Xr.required(),required:b.boolean(),title:$e,description:xe,mountPoint:Te,name:ge},bt=(R,$)=>b.object(R).custom((T,N)=>!$&&T.source&&T.source.name&&!T.source.store?N.message(`missing 'store' in source of component ${T.name}`):T),Me=bt(vt).meta({className:"TComponent",unknownType:"any"});M.componentSchema=Me;const Yr=bt(vt,!0),_t=({checkStore:R}={})=>{const $=[Me,Yr];return b.array().items(R?$[0]:$[1]).optional().default([])},wt=b.object({type:b.string().required(),name:b.string().required(),signer:b.string().required(),pk:b.string().required(),created:b.string().isoDate().required(),sig:b.string().required(),excludes:b.array().items(b.string()).optional(),appended:b.array().items(b.string()).optional(),delegatee:b.string(),delegateePk:b.string(),delegation:b.string()}).meta({className:"TSignature",unknownType:"any"});M.signatureSchema=wt;const Ze=["en","zh","fr","ru","ar","es","de","pt","ja","hi"],Je={id:b.string().custom(zr),title:b.alternatives().try(b.string().min(1).max(K.MAX_TITLE_LENGTH),b.object().min(1).pattern(b.string().valid(...Ze),b.string().min(1).max(K.MAX_TITLE_LENGTH))).required(),link:b.alternatives().try(b.string().custom(Ye),b.object().min(1).pattern(b.string().valid(...Ze),b.string().custom(Ye))),component:b.string().min(1),section:b.array().items(b.string().min(1)).single(),role:b.array().items(b.string().min(1)).single(),icon:b.string().min(1),visible:b.boolean()},Et=b.object({...Je,items:b.array().items(b.object({...Je}).rename("child","component"))}).rename("child","component").meta({className:"TNavigationItem",unknownType:"any"});M.navigationItemSchema=Et;const qe=b.array().items(Et).unique((R,$)=>R.id&&$.id?R.id===$.id:!1).meta({className:"TNavigation",unknownType:"any"});M.navigationSchema=qe;const Be=b.object({background:b.alternatives().try(b.string().min(1),b.object({header:b.string().min(1),footer:b.string().min(1),default:b.string().min(1)}).min(1))}).meta({className:"TTheme",unknownType:"any"});M.themeSchema=Be;const Rt=b.object({whoCanAccess:b.string().valid("owner","invited","all"),profileFields:b.array().items(b.string().valid("fullName","email","avatar","phone")).unique(),ignoreUrls:b.array().items(b.string().min(1)),allowSwitchProfile:b.boolean(),blockUnauthenticated:b.boolean(),blockUnauthorized:b.boolean()}).options({stripUnknown:!0}).meta({className:"TAuthConfig",unknownType:"any"});M.authConfigSchema=Rt;const Zr=b.object({type:b.string().trim().min(1).required(),description:b.string().trim().min(1)}),Ue=b.object({did:b.DID().trim().required(),type:b.string().trim().min(1).required(),public:b.boolean()}).meta({className:"TResourceBundle",unknownType:"any"});M.resourceBundleSchema=Ue;const $t={did:b.DID().trim().required(),version:b.semver().valid().required(),name:b.string().optional(),description:xe.required(),group:b.string().valid(...K.BLOCKLET_GROUPS),main:b.string().trim(),title:$e.optional().allow(""),logo:b.string().trim().optional(),specVersion:b.semver().valid().gte("1.0.0").optional(),author:be.optional(),contributors:b.array().items(be).optional(),maintainers:b.array().items(be).optional(),community:b.string().uri().optional().allow("").default(""),documentation:b.string().uri().optional().allow("").default(""),homepage:b.string().uri().optional().allow("").default(""),license:b.string().optional().allow("").default(""),support:b.alternatives().try(b.string().uri(),b.string().email({tlds:!1})).optional(),nftFactory:b.DID().optional().allow("").default(""),payment:b.object({price:b.array().max(1).items(b.object({value:b.number().greater(0).required(),address:b.DID().required()})).default([]),share:b.array().max(4).items(b.object({name:b.string().required(),address:b.DID().required(),value:b.number().greater(0).max(1).required()})).default([]).custom(R=>{if(R.length===0)return R;const $=R.reduce((T,N)=>T+N.value,0);if($!==1)throw new Error(`Invalid blocklet payment share config: total share must be 1, got ${$}`);return R},"invalid blocklet share"),componentPrice:b.array().items(b.object({parentPriceRange:b.array().items(b.number()).custom((R,$)=>R.length!==2?$.message("length of range should be 2"):R[0]<0?$.message("the first value should not less than 0 in range"):R[1]<=R[0]?$.message("the second value should greater than the first value in range"):R),type:b.string().valid("fixed","percentage").required(),value:b.number().greater(0).required()})).single()}).default({price:[],share:[]}),keywords:b.alternatives().try(b.string().trim().min(1),b.array().items(b.string().min(1))).optional(),tags:b.alternatives().try(b.string().trim().min(1),b.array().items(b.string().min(1))).optional(),gitHash:b.string().optional().allow(""),repository:b.alternatives().try(b.string().min(1),b.object({type:b.string().valid("git","https","svn").required(),url:b.string().uri().required(),directory:b.string()})).optional(),timeout:b.object({start:b.number().min(10).max(600),script:b.number().min(1).max(1800)}).default({start:60}),requirements:b.object({abtnode:b.semverRange().valid(),server:b.semverRange().valid(),os:b.alternatives().try(b.string().valid("*",...K.BLOCKLET_PLATFORMS),b.array().items(b.string().valid(...K.BLOCKLET_PLATFORMS)).min(1)),cpu:b.alternatives().try(b.string().valid("*",...K.BLOCKLET_ARCHITECTURES),b.array().items(b.string().valid(...K.BLOCKLET_ARCHITECTURES)).min(1)),fuels:b.array().items(b.object({endpoint:b.string().trim().required(),address:b.string().trim(),value:b.string().trim().required(),reason:b.string().trim().required()})),nodejs:b.semverRange().valid()}).default({server:K.BLOCKLET_LATEST_REQUIREMENT_SERVER,os:"*",cpu:"*",nodejs:"*"}),interfaces:b.array().items(Fe).unique("name").custom((R,$)=>{if(R.filter(A=>A.type===K.BLOCKLET_INTERFACE_TYPE_WEB).length>1)return $.message(`Only one ${K.BLOCKLET_INTERFACE_TYPE_WEB} interface can be declared`);const N=R.filter(A=>A.type===K.BLOCKLET_INTERFACE_TYPE_WELLKNOWN);for(const A of N)if(!A.prefix.startsWith(Xe))return $.message(`Wellknown path prefix must start with: ${Xe}`);return R}).default([]),environments:b.array().items(Ne).default([]).optional().custom((R,$)=>{if(R&&R.length){const T=R.filter((N,A)=>R.findIndex(S=>S.name===N.name)!==A);if(T.length)return $.message(`find duplicate environment names ${T.map(N=>N.name).join(", ")}`)}return R}),scripts:Ce,capabilities:b.object({clusterMode:b.boolean(),didSpace:b.string().valid(...Object.values(K.BLOCKLET_APP_SPACE_REQUIREMENT)).optional(),navigation:b.boolean().default(!0),serverless:b.boolean().optional(),component:b.boolean(),sitemap:b.boolean().optional()}).default({}),files:b.array().items(b.string().trim()).optional(),resource:b.object({exportApi:b.string().trim(),bundles:b.array().items(Ue),types:b.array().items(Zr).max(10)}),engine:b.alternatives().try(je,b.array().items(je)).optional(),screenshots:b.array().items(b.string().min(1)).optional().default([]),logoUrl:b.string().optional().allow(""),dist:_e.optional(),stats:yt.optional(),htmlAst:b.any().optional(),path:b.string().optional(),signatures:b.array().items(wt).optional(),lastPublishedAt:b.string().isoDate().optional(),components:_t(),navigation:qe,theme:Be,copyright:b.object({owner:b.string().min(1),year:b.alternatives().try(b.string(),b.number())}),bundleName:b.string(),bundleDid:b.DID().trim(),storeId:b.string()},Jr=b.object($t).options({stripUnknown:!0,noDefaults:!1}).meta({className:"TBlockletMeta",unknownType:"any"});M.blockletMetaSchema=Jr;const xt=(R,{ensureFiles:$=!1,ensureDist:T=!1,ensureComponentStore:N=!0,ensureName:A=!1,skipValidateDidName:S=!1,...v}={})=>((!R||!Cr.default.existsSync(R))&&($=!1),b.object({...$t,owner:b.object({avatar:b.string().optional(),did:b.DID().trim().required(),fullName:b.string().trim().required(),email:b.string().email({tlds:!1}).required()}).optional(),logo:$?b.file().trim().exists({baseDir:R}).optional():b.string().trim().optional(),files:b.array().items($?b.file().exists({baseDir:R,canSkip:(o,g)=>[K.BLOCKLET_ENTRY_FILE,K.BLOCKLET_BUNDLE_FILE].includes(g)||(0,Fr.default)(g)}):b.string().trim()).optional(),dist:T?_e.required():_e.optional(),components:_t({checkStore:N}),name:A?b.string().optional():b.string().required(),docker:b.object({workdir:b.string().trim(),image:b.string().trim().optional(),dockerfile:$?b.file().trim().exists({baseDir:R}).optional():b.string().trim().optional(),shell:b.string().trim().optional(),network:b.string().valid("host","bridge","none").default("host").optional(),volumes:b.array().items(b.string().trim()).optional(),script:b.string().trim().optional(),installNodeModules:b.boolean().optional(),command:b.string().trim().optional(),runBaseScript:b.boolean().optional()}).optional()}).options({stripUnknown:!0,noDefaults:!1,...v}).rename("children","components").custom((o,g)=>{const{did:d,name:u,docker:e}=o;if(e){const{image:s,dockerfile:r,exportPorts:t,network:l}=e;if(!s&&!r)return g.message("Image or dockerfile must be set");if(s&&r)return g.message("Image and dockerfile cannot be set at the same time");if(t&&l)return g.message("ExportPorts and network cannot be set at the same time");if(!t&&!l)return g.message("ExportPorts or network must be set");if(r&&(o.files||(o.files=[]),o.files.push(r)),e.volumes)for(const n of e.volumes){if(!n.startsWith("$BLOCKLET_APP_DIR/")&&!n.startsWith("$BLOCKLET_DATA_DIR/"))return g.message("Volume must start with $BLOCKLET_APP_DIR or $BLOCKLET_DATA_DIR");if(n.indexOf("..")>-1)return g.message('Volume cannot contain ".."')}}let i;if((0,qr.isValid)(d))try{return(0,Ae.validateNewDid)(d),o}catch(s){i=s}if(u){(0,Ae.validateName)(u,{checkDid:!S});const s=(0,Br.default)(u);return s!==d?g.message(`The did of name "${u}" should be "${s}"`):o}return i?g.message(i.message):o}));M.createBlockletSchema=xt;M.default={blockletNameSchema:ge,componentSchema:Me,endpointSchema:Pe,serviceSchema:De,createBlockletSchema:xt,interfaceSchema:Fe,environmentSchema:Ne,environmentNameSchema:Le,scriptsSchema:Ce,personSchema:be,distSchema:_e,titleSchema:$e,descriptionSchema:xe,logoSchema:ht,navigationSchema:qe,themeSchema:Be,mountPointSchema:Te,updateMountPointSchema:pt,authConfigSchema:Rt,resourceBundleSchema:Ue,installBlockletTitleSchema:ft,installBlockletDescriptionSchema:mt,Joi:b};export{Wr as a,Vr as i,lt as n,M as s,Gr as t};
@@ -0,0 +1 @@
1
+ import{gd as o}from"./index-BJ6Jm694.js";const t=new o,c=t;export{c as b};
@@ -1,2 +1,2 @@
1
- import{a as L}from"./codemirror.es-Cgty7XCS.js";import{a as K}from"./searchcursor.es-By1BDlIF.js";import{a as U}from"./dialog.es-CJst29HQ.js";import"./index-BXQChK8V.js";import"./index-wJZLGXqZ.js";var k=Object.defineProperty,i=(x,w)=>k(x,"name",{value:w,configurable:!0});function V(x,w){return w.forEach(function(a){a&&typeof a!="string"&&!Array.isArray(a)&&Object.keys(a).forEach(function(d){if(d!=="default"&&!(d in x)){var O=Object.getOwnPropertyDescriptor(a,d);Object.defineProperty(x,d,O.get?O:{enumerable:!0,get:function(){return a[d]}})}})}),Object.freeze(x)}i(V,"_mergeNamespaces");var z={exports:{}};(function(x,w){(function(a){a(L.exports,K.exports,U.exports)})(function(a){a.defineOption("search",{bottom:!1});function d(e,t){return typeof e=="string"?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(n){e.lastIndex=n.pos;var o=e.exec(n.string);if(o&&o.index==n.pos)return n.pos+=o[0].length||1,"searching";o?n.pos=o.index:n.skipToEnd()}}}i(d,"searchOverlay");function O(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}i(O,"SearchState");function S(e){return e.state.search||(e.state.search=new O)}i(S,"getSearchState");function N(e){return typeof e=="string"&&e==e.toLowerCase()}i(N,"queryCaseInsensitive");function m(e,t,n){return e.getSearchCursor(t,n,{caseFold:N(t),multiline:!0})}i(m,"getSearchCursor");function $(e,t,n,o,r){e.openDialog(t,o,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){b(e)},onKeyDown:r,bottom:e.options.search.bottom})}i($,"persistentDialog");function P(e,t,n,o,r){e.openDialog?e.openDialog(t,r,{value:o,selectValueOnOpen:!0,bottom:e.options.search.bottom}):r(prompt(n,o))}i(P,"dialog");function F(e,t,n,o){e.openConfirm?e.openConfirm(t,o):confirm(n)&&o[0]()}i(F,"confirmDialog");function _(e){return e.replace(/\\([nrt\\])/g,function(t,n){return n=="n"?`
1
+ import{a as L}from"./codemirror.es-D-koN6N4.js";import{a as K}from"./searchcursor.es-Chmxf0xj.js";import{a as U}from"./dialog.es-BPKWQpdb.js";import"./index--XPg2YYm.js";import"./index-BJ6Jm694.js";var k=Object.defineProperty,i=(x,w)=>k(x,"name",{value:w,configurable:!0});function V(x,w){return w.forEach(function(a){a&&typeof a!="string"&&!Array.isArray(a)&&Object.keys(a).forEach(function(d){if(d!=="default"&&!(d in x)){var O=Object.getOwnPropertyDescriptor(a,d);Object.defineProperty(x,d,O.get?O:{enumerable:!0,get:function(){return a[d]}})}})}),Object.freeze(x)}i(V,"_mergeNamespaces");var z={exports:{}};(function(x,w){(function(a){a(L.exports,K.exports,U.exports)})(function(a){a.defineOption("search",{bottom:!1});function d(e,t){return typeof e=="string"?e=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),t?"gi":"g"):e.global||(e=new RegExp(e.source,e.ignoreCase?"gi":"g")),{token:function(n){e.lastIndex=n.pos;var o=e.exec(n.string);if(o&&o.index==n.pos)return n.pos+=o[0].length||1,"searching";o?n.pos=o.index:n.skipToEnd()}}}i(d,"searchOverlay");function O(){this.posFrom=this.posTo=this.lastQuery=this.query=null,this.overlay=null}i(O,"SearchState");function S(e){return e.state.search||(e.state.search=new O)}i(S,"getSearchState");function N(e){return typeof e=="string"&&e==e.toLowerCase()}i(N,"queryCaseInsensitive");function m(e,t,n){return e.getSearchCursor(t,n,{caseFold:N(t),multiline:!0})}i(m,"getSearchCursor");function $(e,t,n,o,r){e.openDialog(t,o,{value:n,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){b(e)},onKeyDown:r,bottom:e.options.search.bottom})}i($,"persistentDialog");function P(e,t,n,o,r){e.openDialog?e.openDialog(t,r,{value:o,selectValueOnOpen:!0,bottom:e.options.search.bottom}):r(prompt(n,o))}i(P,"dialog");function F(e,t,n,o){e.openConfirm?e.openConfirm(t,o):confirm(n)&&o[0]()}i(F,"confirmDialog");function _(e){return e.replace(/\\([nrt\\])/g,function(t,n){return n=="n"?`
2
2
  `:n=="r"?"\r":n=="t"?" ":n=="\\"?"\\":t})}i(_,"parseString");function C(e){var t=e.match(/^\/(.*)\/([a-z]*)$/);if(t)try{e=new RegExp(t[1],t[2].indexOf("i")==-1?"":"i")}catch{}else e=_(e);return(typeof e=="string"?e=="":e.test(""))&&(e=/x^/),e}i(C,"parseQuery");function R(e,t,n){t.queryText=n,t.query=C(n),e.removeOverlay(t.overlay,N(t.query)),t.overlay=d(t.query,N(t.query)),e.addOverlay(t.overlay),e.showMatchesOnScrollbar&&(t.annotate&&(t.annotate.clear(),t.annotate=null),t.annotate=e.showMatchesOnScrollbar(t.query,N(t.query)))}i(R,"startSearch");function y(e,t,n,o){var r=S(e);if(r.query)return D(e,t);var s=e.getSelection()||r.lastQuery;if(s instanceof RegExp&&s.source=="x^"&&(s=null),n&&e.openDialog){var c=null,p=i(function(f,v){a.e_stop(v),f&&(f!=r.queryText&&(R(e,r,f),r.posFrom=r.posTo=e.getCursor()),c&&(c.style.opacity=1),D(e,v.shiftKey,function(h,g){var u;g.line<3&&document.querySelector&&(u=e.display.wrapper.querySelector(".CodeMirror-dialog"))&&u.getBoundingClientRect().bottom-4>e.cursorCoords(g,"window").top&&((c=u).style.opacity=.4)}))},"searchNext");$(e,Q(e),s,p,function(f,v){var h=a.keyName(f),g=e.getOption("extraKeys"),u=g&&g[h]||a.keyMap[e.getOption("keyMap")][h];u=="findNext"||u=="findPrev"||u=="findPersistentNext"||u=="findPersistentPrev"?(a.e_stop(f),R(e,S(e),v),e.execCommand(u)):(u=="find"||u=="findPersistent")&&(a.e_stop(f),p(v,f))}),o&&s&&(R(e,r,s),D(e,t))}else P(e,Q(e),"Search for:",s,function(f){f&&!r.query&&e.operation(function(){R(e,r,f),r.posFrom=r.posTo=e.getCursor(),D(e,t)})})}i(y,"doSearch");function D(e,t,n){e.operation(function(){var o=S(e),r=m(e,o.query,t?o.posFrom:o.posTo);!r.find(t)&&(r=m(e,o.query,t?a.Pos(e.lastLine()):a.Pos(e.firstLine(),0)),!r.find(t))||(e.setSelection(r.from(),r.to()),e.scrollIntoView({from:r.from(),to:r.to()},20),o.posFrom=r.from(),o.posTo=r.to(),n&&n(r.from(),r.to()))})}i(D,"findNext");function b(e){e.operation(function(){var t=S(e);t.lastQuery=t.query,t.query&&(t.query=t.queryText=null,e.removeOverlay(t.overlay),t.annotate&&(t.annotate.clear(),t.annotate=null))})}i(b,"clearSearch");function l(e,t){var n=e?document.createElement(e):document.createDocumentFragment();for(var o in t)n[o]=t[o];for(var r=2;r<arguments.length;r++){var s=arguments[r];n.appendChild(typeof s=="string"?document.createTextNode(s):s)}return n}i(l,"el");function Q(e){return l("",null,l("span",{className:"CodeMirror-search-label"},e.phrase("Search:"))," ",l("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",l("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}i(Q,"getQueryDialog");function j(e){return l("",null," ",l("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"})," ",l("span",{style:"color: #888",className:"CodeMirror-search-hint"},e.phrase("(Use /re/ syntax for regexp search)")))}i(j,"getReplaceQueryDialog");function A(e){return l("",null,l("span",{className:"CodeMirror-search-label"},e.phrase("With:"))," ",l("input",{type:"text",style:"width: 10em",className:"CodeMirror-search-field"}))}i(A,"getReplacementQueryDialog");function I(e){return l("",null,l("span",{className:"CodeMirror-search-label"},e.phrase("Replace?"))," ",l("button",{},e.phrase("Yes"))," ",l("button",{},e.phrase("No"))," ",l("button",{},e.phrase("All"))," ",l("button",{},e.phrase("Stop")))}i(I,"getDoReplaceConfirm");function T(e,t,n){e.operation(function(){for(var o=m(e,t);o.findNext();)if(typeof t!="string"){var r=e.getRange(o.from(),o.to()).match(t);o.replace(n.replace(/\$(\d)/g,function(s,c){return r[c]}))}else o.replace(n)})}i(T,"replaceAll");function E(e,t){if(!e.getOption("readOnly")){var n=e.getSelection()||S(e).lastQuery,o=t?e.phrase("Replace all:"):e.phrase("Replace:"),r=l("",null,l("span",{className:"CodeMirror-search-label"},o),j(e));P(e,r,o,n,function(s){s&&(s=C(s),P(e,A(e),e.phrase("Replace with:"),"",function(c){if(c=_(c),t)T(e,s,c);else{b(e);var p=m(e,s,e.getCursor("from")),f=i(function(){var h=p.from(),g;!(g=p.findNext())&&(p=m(e,s),!(g=p.findNext())||h&&p.from().line==h.line&&p.from().ch==h.ch)||(e.setSelection(p.from(),p.to()),e.scrollIntoView({from:p.from(),to:p.to()}),F(e,I(e),e.phrase("Replace?"),[function(){v(g)},f,function(){T(e,s,c)}]))},"advance"),v=i(function(h){p.replace(typeof s=="string"?c:c.replace(/\$(\d)/g,function(g,u){return h[u]})),f()},"doReplace");f()}}))})}}i(E,"replace"),a.commands.find=function(e){b(e),y(e)},a.commands.findPersistent=function(e){b(e),y(e,!1,!0)},a.commands.findPersistentNext=function(e){y(e,!1,!0,!0)},a.commands.findPersistentPrev=function(e){y(e,!0,!0,!0)},a.commands.findNext=y,a.commands.findPrev=function(e){y(e,!0)},a.commands.clearSearch=b,a.commands.replace=E,a.commands.replaceAll=function(e){E(e,!0)}})})();var B=z.exports,X=Object.freeze(V({__proto__:null,[Symbol.toStringTag]:"Module",default:B},[z.exports]));export{X as s};