sandforge 1.81.0 → 1.82.0

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 (208) hide show
  1. package/README.md +48 -0
  2. package/bin/sandforge-users.mjs +12 -0
  3. package/lib/{chunk-C4YGSK6W.mjs → chunk-27Z76O2O.mjs} +1 -1
  4. package/lib/{chunk-TKQQVB2D.mjs → chunk-2JZGCCPG.mjs} +1 -1
  5. package/lib/{chunk-TPHXRHOA.mjs → chunk-2UU42PTD.mjs} +1 -1
  6. package/lib/{chunk-ZWZXQTAK.mjs → chunk-32EUNQT6.mjs} +14 -14
  7. package/lib/{chunk-HYOOJVR6.mjs → chunk-3C2ZZIFN.mjs} +1 -1
  8. package/lib/{chunk-AELFEK3G.mjs → chunk-3CX7GPCR.mjs} +1 -1
  9. package/lib/{chunk-YJEXE6HZ.mjs → chunk-3HEMJTAP.mjs} +2 -2
  10. package/lib/{chunk-DQR5NDMI.mjs → chunk-3HROD5RE.mjs} +1 -1
  11. package/lib/{chunk-D7P7DTWL.mjs → chunk-3MGMNK3Q.mjs} +1 -1
  12. package/lib/{chunk-MNITSYI2.mjs → chunk-3SKLBRPL.mjs} +1 -1
  13. package/lib/{chunk-MAHZMPMZ.mjs → chunk-3XG25GTF.mjs} +1 -1
  14. package/lib/{chunk-N7J6NJQ6.mjs → chunk-42BFLWHR.mjs} +1 -1
  15. package/lib/chunk-466F37VD.mjs +7 -0
  16. package/lib/chunk-47UHTN3Q.mjs +7 -0
  17. package/lib/{chunk-DHGPDSXS.mjs → chunk-52EXDVPN.mjs} +1 -1
  18. package/lib/{chunk-5344TZBT.mjs → chunk-5K2I2DMP.mjs} +1 -1
  19. package/lib/{chunk-2OZG6GRW.mjs → chunk-6GQUZ4IP.mjs} +1 -1
  20. package/lib/{chunk-SW2NUKQL.mjs → chunk-6KP6WETK.mjs} +1 -1
  21. package/lib/{chunk-FSZTXLNW.mjs → chunk-6VSZNZHH.mjs} +1 -1
  22. package/lib/{chunk-6NADW3OI.mjs → chunk-7CVDVBEE.mjs} +1 -1
  23. package/lib/{chunk-67CC7RAE.mjs → chunk-7EYQYZJP.mjs} +1 -1
  24. package/lib/{chunk-IBURU7T7.mjs → chunk-7LKI7OAS.mjs} +1 -1
  25. package/lib/{chunk-CULAOP3U.mjs → chunk-7PY3VQP3.mjs} +1 -1
  26. package/lib/chunk-7SDZR6SR.mjs +7 -0
  27. package/lib/{chunk-V4RKM4QZ.mjs → chunk-7WSLT5VX.mjs} +1 -1
  28. package/lib/chunk-A32ISQ6M.mjs +28 -0
  29. package/lib/{chunk-K77NR3UK.mjs → chunk-A65ADTCR.mjs} +1 -1
  30. package/lib/chunk-A7JJWOLT.mjs +7 -0
  31. package/lib/{chunk-MWLFFVQV.mjs → chunk-AUS6NFLZ.mjs} +1 -1
  32. package/lib/{chunk-NWPQF5XR.mjs → chunk-BMTNTBBM.mjs} +1 -1
  33. package/lib/{chunk-FTA5LOVX.mjs → chunk-BN33LVPQ.mjs} +1 -1
  34. package/lib/chunk-BNKT3R3F.mjs +7 -0
  35. package/lib/{chunk-WM5JI4JI.mjs → chunk-C2N2TNEU.mjs} +1 -1
  36. package/lib/{chunk-5UT2ZBGF.mjs → chunk-C3LNYAVJ.mjs} +1 -1
  37. package/lib/{chunk-GYKNCYES.mjs → chunk-CBL42DUU.mjs} +1 -1
  38. package/lib/{chunk-W2AAGIZF.mjs → chunk-CCEH7L53.mjs} +1 -1
  39. package/lib/{chunk-WWTXRWNZ.mjs → chunk-CELEBWEZ.mjs} +1 -1
  40. package/lib/{chunk-D62KWDDT.mjs → chunk-CV47FDQW.mjs} +1 -1
  41. package/lib/{chunk-AJPSGVMD.mjs → chunk-CZLJZQCS.mjs} +1 -1
  42. package/lib/{chunk-YIGFYZQY.mjs → chunk-DBBPDSFN.mjs} +1 -1
  43. package/lib/{chunk-T5VAULLQ.mjs → chunk-DIL62SUN.mjs} +1 -1
  44. package/lib/chunk-DIS254AN.mjs +7 -0
  45. package/lib/{chunk-GK7VEYFM.mjs → chunk-DJCGURW7.mjs} +1 -1
  46. package/lib/{chunk-MHW6DV6T.mjs → chunk-DT3T7FRD.mjs} +1 -1
  47. package/lib/{chunk-PYUEHBA6.mjs → chunk-DWMRIWV5.mjs} +1 -1
  48. package/lib/{chunk-E2OBAWSH.mjs → chunk-EEFUE2ES.mjs} +1 -1
  49. package/lib/{chunk-MKNAZPOT.mjs → chunk-EOFO3PHS.mjs} +1 -1
  50. package/lib/{chunk-UUSLTW5V.mjs → chunk-FA4ZKDCU.mjs} +1 -1
  51. package/lib/{chunk-DHIW4IO5.mjs → chunk-FKK5YBGZ.mjs} +1 -1
  52. package/lib/{chunk-BZFIOZS3.mjs → chunk-FOIWWK7G.mjs} +1 -1
  53. package/lib/chunk-FZF23M6R.mjs +7 -0
  54. package/lib/{chunk-XIZ5LMQM.mjs → chunk-G2JR3F63.mjs} +1 -1
  55. package/lib/{chunk-2Z54GB6X.mjs → chunk-GBGHJTPC.mjs} +1 -1
  56. package/lib/{chunk-2NAIUKVL.mjs → chunk-GCGHHN4K.mjs} +1 -1
  57. package/lib/{chunk-TQM2XJ27.mjs → chunk-GGNUACTY.mjs} +1 -1
  58. package/lib/{chunk-2IB7I3IQ.mjs → chunk-GGUOIDWP.mjs} +1 -1
  59. package/lib/chunk-GHPR5UVV.mjs +7 -0
  60. package/lib/{chunk-YHIOS2PU.mjs → chunk-GJ6SZVHT.mjs} +1 -1
  61. package/lib/{chunk-WI4HYWV6.mjs → chunk-H4JUYUSL.mjs} +1 -1
  62. package/lib/{chunk-5WGA5CZB.mjs → chunk-H4OBZIX3.mjs} +1 -1
  63. package/lib/{chunk-KRNFVAGC.mjs → chunk-HFUDCNU5.mjs} +1 -1
  64. package/lib/{chunk-OIIL4NVI.mjs → chunk-HIHCYMSL.mjs} +1 -1
  65. package/lib/chunk-HKUWHVI7.mjs +9 -0
  66. package/lib/chunk-HQQVANWQ.mjs +20 -0
  67. package/lib/{chunk-V2QO6KOE.mjs → chunk-IRZJU2PG.mjs} +14 -11
  68. package/lib/{chunk-CAFUNR6D.mjs → chunk-ISSP2FZ5.mjs} +1 -1
  69. package/lib/{chunk-OEHVAJAB.mjs → chunk-IVZJSDJD.mjs} +1 -1
  70. package/lib/{chunk-E2YJVSX6.mjs → chunk-J24TIGSI.mjs} +1 -1
  71. package/lib/{chunk-YCSFP6ER.mjs → chunk-JESRFE2Z.mjs} +1 -1
  72. package/lib/{chunk-KOQV4WXC.mjs → chunk-JFNLKHY6.mjs} +2 -2
  73. package/lib/{chunk-NJ3EOEHS.mjs → chunk-JH27IKCO.mjs} +1 -1
  74. package/lib/{chunk-DXOXLUZA.mjs → chunk-JJITOWZK.mjs} +1 -1
  75. package/lib/{chunk-KNIRA333.mjs → chunk-JKT5YAQ2.mjs} +1 -1
  76. package/lib/{chunk-J6G23RUI.mjs → chunk-JLZRZL5E.mjs} +1 -1
  77. package/lib/{chunk-6FMLW7PH.mjs → chunk-JPEVIXNH.mjs} +1 -1
  78. package/lib/{chunk-6IGEASOF.mjs → chunk-JQZTMFO7.mjs} +1 -1
  79. package/lib/{chunk-55LQD3Y3.mjs → chunk-KIMQQ6JQ.mjs} +1 -1
  80. package/lib/{chunk-EH5YUA5W.mjs → chunk-KJYEQHYP.mjs} +1 -1
  81. package/lib/chunk-KKOA62S4.mjs +474 -0
  82. package/lib/{chunk-56MPPWLA.mjs → chunk-KP5G6FUC.mjs} +1 -1
  83. package/lib/{chunk-EAFLDSQ2.mjs → chunk-L4INJ5TZ.mjs} +1 -1
  84. package/lib/{chunk-MO3N5XVV.mjs → chunk-LAUOSXMN.mjs} +2 -2
  85. package/lib/{chunk-HVC5CYIB.mjs → chunk-LHU6CPGE.mjs} +1 -1
  86. package/lib/{chunk-7PK5QDQI.mjs → chunk-LXDSRP2W.mjs} +1 -1
  87. package/lib/{chunk-YOGMP72T.mjs → chunk-MKTXJCXN.mjs} +1 -1
  88. package/lib/{chunk-VSU74RQ3.mjs → chunk-MUEQRIK7.mjs} +1 -1
  89. package/lib/{chunk-UCHAZ4ZU.mjs → chunk-NLB3RGIY.mjs} +1 -1
  90. package/lib/{chunk-OVOLG3AL.mjs → chunk-NWOI25WY.mjs} +1 -1
  91. package/lib/{chunk-6SEDOIO3.mjs → chunk-O2PUGRNW.mjs} +1 -1
  92. package/lib/chunk-O4BROUGM.mjs +7 -0
  93. package/lib/{chunk-KGYXLSQ5.mjs → chunk-P55MKIZX.mjs} +1 -1
  94. package/lib/{chunk-KE2PGD6C.mjs → chunk-P63WJMXQ.mjs} +1 -1
  95. package/lib/chunk-PBE44M2Y.mjs +7 -0
  96. package/lib/{chunk-OMZJ37JI.mjs → chunk-PE435FVH.mjs} +2 -2
  97. package/lib/{chunk-GR3NGDVM.mjs → chunk-PPHVWUFY.mjs} +1 -1
  98. package/lib/{chunk-ZUA5BNAO.mjs → chunk-PR74GYVI.mjs} +1 -1
  99. package/lib/{chunk-43K2C6H2.mjs → chunk-PWVDNN2C.mjs} +1 -1
  100. package/lib/{chunk-DMBR24CK.mjs → chunk-PYRZFUVU.mjs} +1 -1
  101. package/lib/{chunk-OXKZ4Y3B.mjs → chunk-Q3DY7TO2.mjs} +1 -1
  102. package/lib/{chunk-EOSEMFPU.mjs → chunk-Q6SXNKV2.mjs} +1 -1
  103. package/lib/chunk-QAPVKPEC.mjs +7 -0
  104. package/lib/chunk-QROPNEGY.mjs +14 -0
  105. package/lib/{chunk-6CDIIFNX.mjs → chunk-RCYEBY42.mjs} +1 -1
  106. package/lib/chunk-RLWB7F26.mjs +7 -0
  107. package/lib/{chunk-X2ZVSQ54.mjs → chunk-RTWYLOCA.mjs} +1 -1
  108. package/lib/chunk-RYRMUPMY.mjs +7 -0
  109. package/lib/{chunk-ETT5GP4P.mjs → chunk-SAMWHL22.mjs} +1 -1
  110. package/lib/{chunk-LO527YLT.mjs → chunk-SFGZFB4F.mjs} +1 -1
  111. package/lib/{chunk-33ZX3A56.mjs → chunk-SNEOKYV7.mjs} +1 -1
  112. package/lib/{chunk-GTIXJCGS.mjs → chunk-STRMWSIQ.mjs} +1 -1
  113. package/lib/{chunk-OQQHNYR7.mjs → chunk-SZGGFST2.mjs} +2 -2
  114. package/lib/{chunk-OU5W7SCB.mjs → chunk-T7WREYA5.mjs} +1 -1
  115. package/lib/{chunk-FLNLG43R.mjs → chunk-TCBAE65A.mjs} +1 -1
  116. package/lib/{chunk-RKALOKAU.mjs → chunk-TMA34QMA.mjs} +1 -1
  117. package/lib/{chunk-WEZLXE34.mjs → chunk-TWV4A5RK.mjs} +1 -1
  118. package/lib/{chunk-ONMBSACW.mjs → chunk-UHFLKP26.mjs} +1 -1
  119. package/lib/chunk-UV74P4H2.mjs +7 -0
  120. package/lib/{chunk-HYBH5PFM.mjs → chunk-V3R45ZWT.mjs} +1 -1
  121. package/lib/{chunk-BNO5GIJ6.mjs → chunk-VPDEJGPS.mjs} +1 -1
  122. package/lib/{chunk-3AOKLIVE.mjs → chunk-VQJMP3DC.mjs} +1 -1
  123. package/lib/{chunk-742SSN7I.mjs → chunk-VYOYXTCU.mjs} +1 -1
  124. package/lib/{chunk-GWRKS3AL.mjs → chunk-VZT4E2OJ.mjs} +1 -1
  125. package/lib/{chunk-2OIRJEYE.mjs → chunk-VZVICK7Q.mjs} +1 -1
  126. package/lib/chunk-WEMLDUQA.mjs +7 -0
  127. package/lib/{chunk-FDGFUEK3.mjs → chunk-WOOUISSO.mjs} +1 -1
  128. package/lib/{chunk-UIUPPEFB.mjs → chunk-WSUKC2U3.mjs} +1 -1
  129. package/lib/{chunk-XC2QKQT5.mjs → chunk-WT3SCUHS.mjs} +1 -1
  130. package/lib/{chunk-UT27HXE7.mjs → chunk-XFU3HRUV.mjs} +1 -1
  131. package/lib/{chunk-5VQNKDFU.mjs → chunk-XK5W7BVE.mjs} +1 -1
  132. package/lib/{chunk-OZNLOV4U.mjs → chunk-XO5FBOQF.mjs} +1 -1
  133. package/lib/{chunk-FSDO4DJA.mjs → chunk-XSKPYGMT.mjs} +1 -1
  134. package/lib/{chunk-AITNZWLB.mjs → chunk-XU25YA46.mjs} +1 -1
  135. package/lib/{chunk-XEB6HZ34.mjs → chunk-XZISAZA6.mjs} +1 -1
  136. package/lib/chunk-Y4TDVDP2.mjs +13 -0
  137. package/lib/{chunk-4L7FBOJS.mjs → chunk-YAIIRFKJ.mjs} +1 -1
  138. package/lib/{chunk-T3PLRQ2T.mjs → chunk-YAJQS3OL.mjs} +1 -1
  139. package/lib/{chunk-Y5ZCPY36.mjs → chunk-YGJF55VJ.mjs} +1 -1
  140. package/lib/chunk-YH4DYI6D.mjs +7 -0
  141. package/lib/{chunk-R6TF26V4.mjs → chunk-YMDFF657.mjs} +1 -1
  142. package/lib/{chunk-JU2XEKEO.mjs → chunk-YT22LMF7.mjs} +1 -1
  143. package/lib/{chunk-NWVVCZUK.mjs → chunk-Z42PHCVZ.mjs} +1 -1
  144. package/lib/{chunk-O6ADMP36.mjs → chunk-ZHIZY3ZC.mjs} +1 -1
  145. package/lib/chunk-ZQO5PDX5.mjs +48 -0
  146. package/lib/{chunk-QXLZINZB.mjs → chunk-ZUBBEP75.mjs} +1 -1
  147. package/lib/{chunk-SQGP46QS.mjs → chunk-ZUOPC4W2.mjs} +1 -1
  148. package/lib/{chunk-3B5H24ZG.mjs → chunk-ZUTUYBNW.mjs} +1 -1
  149. package/lib/{chunk-K55LH4ZQ.mjs → chunk-ZXFL2MSN.mjs} +1 -1
  150. package/lib/sandforge-autopilot.mjs +1 -1
  151. package/lib/sandforge-backup.mjs +1 -1
  152. package/lib/sandforge-checkpoint.mjs +1 -1
  153. package/lib/sandforge-cleanup.mjs +1 -1
  154. package/lib/sandforge-clone.mjs +1 -1
  155. package/lib/sandforge-compare.mjs +1 -1
  156. package/lib/sandforge-dataops.mjs +1 -1
  157. package/lib/sandforge-empty.mjs +1 -1
  158. package/lib/sandforge-env.mjs +185 -139
  159. package/lib/sandforge-frozen.mjs +1 -1
  160. package/lib/sandforge-mcp.mjs +14 -14
  161. package/lib/sandforge-monitor.mjs +1 -1
  162. package/lib/sandforge-pipeline.mjs +1 -1
  163. package/lib/sandforge-seed.mjs +1 -1
  164. package/lib/sandforge-sync.mjs +1 -1
  165. package/lib/sandforge-users.mjs +157 -0
  166. package/lib/sandforge.mjs +1 -22
  167. package/lib/sf/sandforge/autopilot.mjs +20 -0
  168. package/lib/sf/sandforge/backup.mjs +20 -0
  169. package/lib/sf/sandforge/checkpoint.mjs +20 -0
  170. package/lib/sf/sandforge/cleanup.mjs +20 -0
  171. package/lib/sf/sandforge/clone.mjs +20 -0
  172. package/lib/sf/sandforge/compare.mjs +20 -0
  173. package/lib/sf/sandforge/dataops.mjs +20 -0
  174. package/lib/sf/sandforge/empty.mjs +20 -0
  175. package/lib/sf/sandforge/env.mjs +20 -0
  176. package/lib/sf/sandforge/frozen.mjs +20 -0
  177. package/lib/sf/sandforge/hardis-commands.mjs +20 -0
  178. package/lib/sf/sandforge/index.mjs +20 -0
  179. package/lib/sf/sandforge/mcp.mjs +20 -0
  180. package/lib/sf/sandforge/monitor.mjs +20 -0
  181. package/lib/sf/sandforge/pipeline.mjs +20 -0
  182. package/lib/sf/sandforge/seed.mjs +20 -0
  183. package/lib/sf/sandforge/sync.mjs +20 -0
  184. package/lib/sf/sandforge/users.mjs +20 -0
  185. package/lib/sfHelpHook.mjs +7 -0
  186. package/lib/sfPlugin.mjs +11 -0
  187. package/oclif.manifest.json +1 -0
  188. package/package.json +17 -3
  189. package/lib/chunk-2ZMGVBLW.mjs +0 -7
  190. package/lib/chunk-5C5XEVZN.mjs +0 -11
  191. package/lib/chunk-5CKWGZX4.mjs +0 -9
  192. package/lib/chunk-5ZKCLBTN.mjs +0 -474
  193. package/lib/chunk-7DALDJMO.mjs +0 -7
  194. package/lib/chunk-DPYTG6DM.mjs +0 -48
  195. package/lib/chunk-G4VXPS3A.mjs +0 -7
  196. package/lib/chunk-GF247DA7.mjs +0 -7
  197. package/lib/chunk-IKGHRYCN.mjs +0 -7
  198. package/lib/chunk-IM2XA6JI.mjs +0 -7
  199. package/lib/chunk-K5HV4YRO.mjs +0 -7
  200. package/lib/chunk-N6HHNR6J.mjs +0 -7
  201. package/lib/chunk-O7DAFE6M.mjs +0 -14
  202. package/lib/chunk-R2BJWO5N.mjs +0 -20
  203. package/lib/chunk-T26C576X.mjs +0 -9
  204. package/lib/chunk-V473C7LY.mjs +0 -7
  205. package/lib/chunk-WD47PGUS.mjs +0 -10
  206. package/lib/chunk-XC54KKKC.mjs +0 -7
  207. package/lib/chunk-XGKSSCW7.mjs +0 -7
  208. package/lib/chunk-ZWCRWF7E.mjs +0 -7
@@ -1,7 +0,0 @@
1
- import { createRequire as __sandforgeRequire } from 'node:module';
2
- import { fileURLToPath as __sandforgePath } from 'node:url';
3
- import { dirname as __sandforgeDirname } from 'node:path';
4
- const require = __sandforgeRequire(import.meta.url);
5
- const __filename = __sandforgePath(import.meta.url);
6
- const __dirname = __sandforgeDirname(__filename);
7
- import{a as xe}from"./chunk-OXKZ4Y3B.mjs";import{a as je,b as Te,c as Oe,d as Pe,f as Me}from"./chunk-M6P5ZZLE.mjs";import{Ca as Ue,Ea as U,Fa as Qe,Ha as We,Z as Le,ha as De,ja as qe,la as Ie,pa as B,wa as Ve,xa as Be}from"./chunk-KOQV4WXC.mjs";import{b as $}from"./chunk-CA5NAXSU.mjs";import{Cd as Ge,O as Fe,Q as ve,R as Ne,S as _e,T as Ae,U as Ce,V as Se,W as $e,ja as Ee}from"./chunk-DPYTG6DM.mjs";import{e as X,l as ee}from"./chunk-WZQEK4WT.mjs";var v=class extends Error{};function ut(e){let r=[],n=0;for(;n<e.length;){let t=e.slice(n),i=/^\s+/.exec(t);if(i){n+=i[0].length;continue}if(t.startsWith("/*")){let d=e.indexOf("*/",n+2);if(d<0)throw new v("an unclosed comment");n=d+2;continue}let l=t[0];if(l==="'"||l==='"'){let d=1;for(;d<t.length&&t[d]!==l;)d+=t[d]==="\\"?2:1;if(d>=t.length)throw new v("an unclosed text");r.push(t.slice(0,d+1)),n+=d+1;continue}let f=/^(?:\d+(?:\.\d+)?|[A-Za-z_$][A-Za-z0-9_$.]*)/.exec(t);if(f){r.push(f[0]),n+=f[0].length;continue}let p=/^(?:&&|\|\||==|!=|<>|<=|>=|[=<>+\-*/^&!(),])/.exec(t);if(!p)throw new v(`an unexpected character: ${t[0]}`);r.push(p[0]),n+=p[0].length}return r}var Ke=[new Set(["||"]),new Set(["&&"]),new Set(["=","==","<>","!=","<",">","<=",">="]),new Set(["+","-","&"]),new Set(["*","/"]),new Set(["^"])];function ct(e){let r=ut(e),n=0,t=()=>r[n],i=u=>{if(r[n]!==u)throw new v(`${u} expected`);n++},l=u=>{if(u>=Ke.length)return f();let o=l(u+1);for(let a=t();a!==void 0&&Ke[u].has(a);a=t())n++,o={kind:"binary",op:a,left:o,right:l(u+1)};return o},f=()=>{if(t()==="!")return n++,{kind:"not",arg:f()};if(t()==="-"||t()==="+"){let u=r[n++],o=f();return u==="-"?{kind:"negative",arg:o}:o}return p()},p=()=>{let u=r[n++];if(u===void 0)throw new v("the formula ends early");if(u==="("){let a=l(0);return i(")"),a}if(u.startsWith("'")||u.startsWith('"'))return{kind:"literal",value:`text:${u.slice(1,-1)}`};if(/^\d/.test(u))return{kind:"literal",value:`number:${Number(u)}`};if(!/^[A-Za-z_$]/.test(u))throw new v(`${u} out of place`);if(t()==="("){n++;let a=[];if(t()!==")")for(a.push(l(0));t()===",";)n++,a.push(l(0));return i(")"),{kind:"call",name:u.toUpperCase(),args:a}}let o=u.toUpperCase();return o==="TRUE"||o==="FALSE"||o==="NULL"?{kind:"literal",value:o.toLowerCase()}:{kind:"reference",name:u.toLowerCase()}},d=l(0);if(n!==r.length)throw new v(`${r[n]} out of place`);return d}function E(e){switch(e.kind){case"call":return e.name==="PRIORVALUE"&&e.args.length===1?E(e.args[0]):{...e,args:e.args.map(E)};case"binary":return{...e,left:E(e.left),right:E(e.right)};case"not":case"negative":return{...e,arg:E(e.arg)};default:return e}}function N(e){switch(e.kind){case"call":return`${e.name}(${e.args.map(N).join(",")})`;case"binary":{let r=e.op==="=="?"=":e.op==="!="?"<>":e.op,n=[N(e.left),N(e.right)];return(r==="="||r==="<>")&&n.sort(),`(${n[0]} ${r} ${n[1]})`}case"not":return`NOT(${N(e.arg)})`;case"negative":return`-(${N(e.arg)})`;case"literal":return e.value;case"reference":return e.name}}var ze=e=>e==="true"?"false":e==="false"?"true":"unknown";function P(e){return e.kind==="call"&&e.name==="AND"?e.args.flatMap(P):e.kind==="binary"&&e.op==="&&"?[...P(e.left),...P(e.right)]:[e]}function M(e){return e.kind==="call"&&e.name==="OR"?e.args.flatMap(M):e.kind==="binary"&&e.op==="||"?[...M(e.left),...M(e.right)]:[e]}function te(e){if(e.kind==="not"){let r=te(e.arg);return{condition:r.condition,holds:!r.holds}}if(e.kind==="call"&&e.name==="NOT"&&e.args.length===1){let r=te(e.args[0]);return{condition:r.condition,holds:!r.holds}}return e.kind==="binary"&&(e.op==="<>"||e.op==="!=")?{condition:N({...e,op:"="}),holds:!1}:{condition:N(e),holds:!0}}function ne(e){if(e.kind==="literal"){if(e.value==="true")return"true";if(e.value==="false")return"false"}}function R(e){let r=ne(e);if(r)return r;if(e.kind==="not")return ze(R(e.arg));if(e.kind==="call")switch(e.name){case"ISCHANGED":return"false";case"ISNEW":return"true";case"NOT":return e.args.length===1?ze(R(e.args[0])):"unknown";case"AND":return He(P(e));case"OR":return Ze(M(e));case"IF":{if(e.args.length!==3)return"unknown";let[n,t,i]=e.args,l=R(n);if(l==="true")return R(t);if(l==="false")return R(i);let f=R(t);return f===R(i)?f:"unknown"}default:return"unknown"}return e.kind==="binary"?e.op==="&&"?He(P(e)):e.op==="||"?Ze(M(e)):dt(e):"unknown"}function He(e){let r=e.map(R);if(r.includes("false"))return"false";let n=new Map;for(let t of e){let{condition:i,holds:l}=te(t),f=n.get(i);if(f!==void 0&&f!==l)return"false";n.set(i,l)}return r.every(t=>t==="true")?"true":"unknown"}function Ze(e){let r=e.map(R);return r.includes("true")?"true":r.every(n=>n==="false")?"false":"unknown"}function dt(e){let r=e.op==="="||e.op==="==",n=e.op==="<>"||e.op==="!=";if(N(e.left)===N(e.right))return n||e.op==="<"||e.op===">"?"false":"unknown";if(!r&&!n)return"unknown";let t=ne(e.left)??R(e.left),i=ne(e.right)??R(e.right);return t==="unknown"||i==="unknown"?"unknown":t===i===r?"true":"false"}function Ye(e){try{return R(E(ct(e)))==="false"}catch(r){if(r instanceof v)return!1;throw r}}var tt=25,W=20,ie=W*Le,G=4,Je=10,ft=2e3,pt=.8;function gt(e){return typeof e!="object"||e===null?null:{optional:e.optionalFilter===!0}}function Vt(e){return{name:e.name,type:String(e.type),createable:e.createable===!0,nillable:e.nillable!==!1,defaultedOnCreate:e.defaultedOnCreate===!0,referenceTo:(e.referenceTo??[]).filter(r=>typeof r=="string"),picklistValues:(e.picklistValues??[]).filter(r=>r?.active!==!1&&typeof r?.value=="string").map(r=>r?.value),lookupFilter:gt(e.filteredLookupInfo)}}function oe(e){return`SELECT Id, ValidationName, NamespacePrefix, ErrorDisplayField, ErrorMessage, EntityDefinition.QualifiedApiName FROM ValidationRule WHERE Active = true AND EntityDefinition.QualifiedApiName IN (${e.map(n=>`'${n}'`).join(", ")})`}function mt(e){return`SELECT QualifiedApiName, Label FROM FieldDefinition WHERE EntityDefinition.QualifiedApiName = '${x.test(e)?e:""}'`}function q(e){return`SELECT Metadata FROM ValidationRule WHERE Id = '${e}'`}var ht="SELECT DeveloperName, MasterLabel, NamespacePrefix, SobjectType FROM DuplicateRule WHERE IsActive = true",ae=/^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$/,x=/^[A-Za-z][A-Za-z0-9_]{0,79}$/,yt=ee({DailyApiRequests:ee({Max:X(),Remaining:X()}).loose()}).loose(),y=e=>typeof e=="string"?e:"";function le(e){if(typeof e!="object"||e===null)return;let r=e.QualifiedApiName;return typeof r=="string"&&r!==""?r:void 0}function Q(e,r){return e?`${e}__${r}`:r}function D(e){return typeof e=="string"?[e]:Array.isArray(e)?e.filter(r=>typeof r=="string"):[]}function wt(e){return{...e,nodes:e.nodes.map(r=>r.leftOutByUser===!0?{...r,included:!0}:r)}}function se(e,r){let n=y(e).trim(),t=n.slice(n.lastIndexOf(".")+1);if(x.test(t))return r?r.find(i=>i.name.toLowerCase()===t.toLowerCase())?.name:t}function nt(e){let r=Ve({filterFormula:e}).filter(t=>t.bypass).map(t=>t.name),n=Be(e).map(t=>t.value===void 0?t.reference:`${t.reference} = '${t.value}'`);return{bypasses:[...r.map(t=>`$Permission.${t}`),...n],permissions:r}}function bt(e,r={}){let n=r.maxRecordsPerObject,t=e.nodes.filter(d=>d.included),i=Ee(r)?"atMost":"exact",l=t.map(d=>d.recordCountUnknown===!0?(n===void 0?i="unknown":i==="exact"&&(i="atMost"),{...d,recordCount:n??0}):{...d,recordCount:n===void 0?d.recordCount:Math.min(d.recordCount,n)}),f=new xe().generate({...e,nodes:l}).totalApiCalls,p=l.reduce((d,u)=>d+Math.max(1,Math.ceil(u.recordCount/ft)),0);return{writes:f,reads:p,bound:i}}function j(e){let{idValue:r,...n}=e;return{id:Fe(e.kind,e.objectApiName,e.field,e.recordType,r??e.value),source:"metadata",rows:0,...n}}function ue(e){return e?{field:e}:{}}function Bt(e){return async r=>Ie(await e.request({method:"POST",url:"/tooling/composite",body:JSON.stringify(qe(`/services/data/v${e.version}`,r)),headers:{"Content-Type":"application/json"}}),r.length)}async function Rt(e,r,n){let t=e.filter(({id:i})=>ae.test(i));t.length!==0&&await B(r,[{queries:t.map(({id:i,rule:l})=>({soql:q(i),retrieve:{sobject:"ValidationRule",id:i},take:f=>{let p=f[0]?.Metadata,d=typeof p=="object"&&p!==null?p.errorConditionFormula:void 0;typeof d=="string"&&Ye(d)&&(l.onChangeOnly=!0)},refused:()=>{}})),requests:W}],G,n)}async function kt(e,r,n,t,i){let l=[...new Set(r)].filter(g=>x.test(g));if(l.length===0)return[];let f=new Map(l.map(g=>[g.toLowerCase(),g])),p=new Map(l.map((g,b)=>[g,b])),d=await e(oe(l)),u=new Map,o=async(g,b)=>{let k=se(b,void 0);if(!n)return k;let F=u.get(g);F||(F=n(g).catch(()=>[]),u.set(g,F));let C=y(b).trim().toLowerCase();if(!C)return;let _=k?.toLowerCase(),S=await F;return S.length===0?k:S.find(A=>A.name.toLowerCase()===_)?.name??S.find(A=>A.label?.trim().toLowerCase()===C)?.name},h=(await Promise.all(d.map(async g=>{let b=le(g.EntityDefinition),k=b===void 0?void 0:f.get(b.toLowerCase()),F=y(g.ValidationName);return!k||!F?[]:[{id:y(g.Id),rule:{objectApiName:k,name:Q(y(g.NamespacePrefix),F),message:y(g.ErrorMessage),...ue(await o(k,g.ErrorDisplayField))}}]}))).flat().sort((g,b)=>(p.get(g.rule.objectApiName)??0)-(p.get(b.rule.objectApiName)??0)||g.rule.name.localeCompare(b.rule.name));return t&&await Rt(h,t,i),h.map(({rule:g})=>g)}async function Ut(e,r,n,t){let i=[...new Set(r)].filter(a=>x.test(a));if(i.length===0)return{rules:[],notRead:0,requests:0};let l=new Map(i.map(a=>[a.toLowerCase(),a])),f=await e(oe(i)),p=f.requests,d=f.records.flatMap(a=>{let h=le(a.EntityDefinition),g=h===void 0?void 0:l.get(h.toLowerCase()),b=y(a.ValidationName);return!g||!b?[]:[{id:y(a.Id),objectApiName:g,name:Q(y(a.NamespacePrefix),b),read:!1,permissions:[]}]}),u=d.filter(a=>ae.test(a.id)),o=(a,h)=>{let g=typeof h=="object"&&h!==null?h.errorConditionFormula:void 0;typeof g=="string"&&(a.read=!0,a.permissions=nt(g).permissions)};return n?p+=await B(n,[{queries:u.slice(0,ie).map(a=>({soql:q(a.id),retrieve:{sobject:"ValidationRule",id:a.id},take:h=>o(a,h[0]?.Metadata),refused:()=>{}})),requests:W}],G,t):await U(u.slice(0,tt).map(a=>async()=>{try{let h=await e(q(a.id));p+=h.requests,o(a,h.records[0]?.Metadata)}catch{p++}}),G),{rules:d.filter(a=>a.permissions.length>0).map(({objectApiName:a,name:h,permissions:g})=>({objectApiName:a,name:h,permissions:g})),notRead:d.filter(a=>!a.read).length,requests:p}}function Qt(e,r,n){let t=async i=>(await e(mt(i))).flatMap(l=>typeof l.QualifiedApiName=="string"?[{name:l.QualifiedApiName,...typeof l.Label=="string"?{label:l.Label}:{}}]:[]);return i=>kt(e,i,t,r,n)}var Xe=class{deps;constructor(r){this.deps=r}async read(r,n,t,i={}){let l=new Set(i.excludedObjects??[]),f=Qe(wt(t),l),p=[];if(f.length===0)return{gaps:[],unread:p,requests:0};let d=0,u=(s,c)=>{p.push({part:s,reason:c})},o=new Map(f.map(s=>[s.toLowerCase(),s])),a=s=>s===void 0?void 0:o.get(s.toLowerCase()),h=new Map(f.map((s,c)=>[s,c])),g=f.filter(s=>x.test(s)),b=[],k=[],F,C,_=new Map,S=new Map,A=new Set,I=(s,c,m)=>async()=>{try{let w=await c();d+=w.requests,m(w.records)}catch(w){d++,u(s,$(w))}},ce=(s,c,m,w)=>async()=>{try{let{fields:J,sent:at,createable:lt}=await this.deps.describeFields(s,c);at&&d++,w.set(c,J),w===_&&lt===!1&&A.add(c)}catch(J){d++,u(m,`${c}: ${$(J)}`)}};await U([...g.length>0?[I("validationRules",()=>this.deps.toolingQuery(n,oe(g)),s=>{b=s})]:[],I("duplicateRules",()=>this.deps.query(n,ht),s=>{k=s}),async()=>{try{d++,F=await this.deps.readLimits(n)}catch(s){C=$(s)}},...f.flatMap(s=>[ce(n,s,"targetFields",_),ce(r,s,"sourceFields",S)])],G);let T=b.flatMap(s=>{let c=a(le(s.EntityDefinition)),m=y(s.ValidationName);if(!c||!m)return[];let w=y(s.Id);return[{id:ae.test(w)?w:null,name:Q(y(s.NamespacePrefix),m),objectApiName:c,...ue(se(s.ErrorDisplayField,_.get(c))),message:y(s.ErrorMessage),formula:"notRead",bypasses:[],permissions:[]}]}).sort((s,c)=>(h.get(s.objectApiName)??0)-(h.get(c.objectApiName)??0)||s.name.localeCompare(c.name)),{toolingQueries:O,toolingRetrieves:de}=this.deps,K=T.filter(s=>s.id!==null).slice(0,O?ie:tt);for(let s of T)s.id===null&&(s.formula="unreadable");let z=k.flatMap(s=>{let c=a(y(s.SobjectType)),m=Q(y(s.NamespacePrefix),y(s.DeveloperName));return!c||!y(s.DeveloperName)?[]:[{objectApiName:c,developerName:m,label:y(s.MasterLabel)||m,fullName:`${y(s.SobjectType)}.${m}`}]}),fe=new Map,pe=[];for(let s=0;s<z.length;s+=Je)pe.push(z.slice(s,s+Je).map(c=>c.fullName));let V,H,ge=(s,c)=>{let m=typeof c=="object"&&c!==null?c.errorConditionFormula:void 0;if(typeof m!="string"){s.formula="unreadable";return}s.formula="read",Object.assign(s,nt(m));let w=se(c.errorDisplayField,_.get(s.objectApiName));w&&(s.field=w)},st=async()=>{if(!O||K.length===0)return;let s=await B(c=>O(n,c),[{queries:K.map(c=>({soql:q(c.id),retrieve:{sobject:"ValidationRule",id:c.id},take:m=>ge(c,m[0]?.Metadata),refused:m=>{c.formula="unreadable",V??=m}})),requests:W}],G,de&&(c=>de(n,c)));d+=s},me=new Map,Z={},he=[...A].filter(s=>x.test(s)),it=async()=>{let[s,c]=await Promise.all([Pe((m,w)=>this.deps.toolingQuery(m,w),n,he),this.deps.createFacts?this.deps.createFacts(n).then(m=>({facts:m,requests:0})).catch(()=>({facts:{},requests:0})):Oe(this.deps,n)]);d+=s.requests+c.requests;for(let[m,w]of s.answered)me.set(m,w);Z=c.facts};await U([...he.length>0?[it]:[],...O?[st]:[],...(O?[]:K).map(s=>async()=>{try{let c=await this.deps.toolingQuery(n,q(s.id));d+=c.requests,ge(s,c.records[0]?.Metadata)}catch(c){d++,s.formula="unreadable",V??=$(c)}}),...pe.map(s=>async()=>{try{d++;for(let c of await this.deps.readDuplicateRules(n,s)){if(typeof c!="object"||c===null)continue;let m=c,w=y(m.fullName);w&&fe.set(w.toLowerCase(),m)}}catch(c){H??=$(c)}})],G),V!==void 0&&u("validationRuleFormulas",V),H!==void 0&&u("duplicateRuleActions",H);let Y=new Set,ye=!1;T.some(s=>s.permissions.length>0)&&await I("userPermissions",()=>this.deps.query(n,De),s=>{ye=!0;for(let c of s)Y.add(Ue(y(c.NamespacePrefix),y(c.DeveloperName)))})();let we=[...new Set(T.flatMap(s=>s.permissions.filter(c=>!Y.has(c.toLowerCase()))))],ot=we.length>0?await We(we,async s=>{let c=[];return await I("permissionSets",()=>this.deps.query(n,s),m=>{c=m})(),c},()=>p.some(s=>s.part==="permissionSets")):void 0,be=[...T.map(s=>Nt(s,ye?Y:void 0,ot)),...z.map(s=>_t(s,fe.get(s.fullName.toLowerCase()))),...f.flatMap(s=>{if(A.has(s))return[vt(s,je(s,Z,me.get(s.toLowerCase())),_.get(s)??[],Z)];let c=_.get(s),m=S.get(s);return c&&m?At(s,c,m,i):[]})],Re=yt.safeParse(F),ke=C===void 0&&Re.success?Re.data.DailyApiRequests:void 0;return ke||u("apiBudget",C??"the limits the org answered hold no DailyApiRequests"),be.push(Ct(t,i,f[0],ke)),{gaps:Ae(be),unread:p,requests:d}}},Ft={platform:"object_platform_only",setup:"object_setup_only",feature:"object_feature_off",parent:"object_through_parent",user:"object_not_createable"};function vt(e,r,n,t){let i=r==="parent"?Me(n,t):[];return j({kind:Ft[r],severity:Te(r)?"info":"blocking",objectApiName:e,...i.length>0?{detail:{editOn:i}}:{},decisions:["exclude_object"]})}function Nt(e,r,n){let t=r?e.permissions.filter(f=>r.has(f.toLowerCase())):[],i=t.length>0?[]:e.permissions.flatMap(f=>{let p=n?.find(d=>d.permission.toLowerCase()===f.toLowerCase());return p?[Ce(p)]:[]}),l=e.field?["leave_empty","ignore"]:["ignore"];return j({kind:"validation_rule",severity:t.length>0?"info":"warning",objectApiName:e.objectApiName,...ue(e.field),idValue:e.name,detail:{rule:e.name,message:e.message,formula:e.formula,...e.bypasses.length>0?{bypasses:e.bypasses}:{},...t.length>0?{heldBypasses:t}:{},...i.length>0?{assign:i}:{}},decisions:l,...e.field?{defaultDecision:"leave_empty"}:{}})}function _t(e,r){let n=y(r?.actionOnInsert).toLowerCase(),t=n==="block"||n==="allow"?n:"unknown",i=D(r?.operationsOnInsert).map(f=>f.toLowerCase());return j({kind:"duplicate_rule",severity:t==="allow"?"info":"warning",objectApiName:e.objectApiName,idValue:e.developerName,detail:{rule:e.label,developerName:e.developerName,action:t,...t==="allow"?{alert:i.includes("alert")}:{},...t==="allow"?{report:i.includes("report")}:{}},decisions:t==="allow"?["ignore"]:["ignore","exclude_object"],...t==="allow"?{defaultDecision:"ignore"}:{}})}function At(e,r,n,t){let i=o=>o.toLowerCase(),l=new Set((t.fieldExclusions?.[e]??[]).map(i)),f=new Map(Object.entries(t.fieldMappings?.[e]??{}).map(([o,a])=>[i(o),i(a)])),p=new Set([...f].filter(([o])=>!l.has(o)).map(([,o])=>o)),d=new Map(n.map(o=>[i(o.name),o])),u=o=>{let a=i(o);if(p.has(a))return;let h=d.get(a);return h?l.has(a)||f.has(a)?"excluded":h.createable?void 0:"notCreateableInSource":"notInSource"};return r.flatMap(o=>{let a=u(o.name);if(o.createable&&!o.nillable&&!o.defaultedOnCreate&&a)return[j({kind:"required_field_missing",severity:"blocking",objectApiName:e,field:o.name,detail:{type:o.type,reason:a,...o.referenceTo.length>0?{referenceTo:o.referenceTo}:{},...o.picklistValues.length>0?{values:o.picklistValues}:{}},decisions:["set_default","exclude_object"]})];if(o.type==="reference"&&o.lookupFilter&&!a){let h=o.nillable;return[j({kind:"lookup_filter",severity:"warning",objectApiName:e,field:o.name,detail:{referenceTo:o.referenceTo,optional:h,filterOptional:o.lookupFilter.optional},decisions:h?["leave_empty","ignore"]:["ignore","exclude_object"],...h?{defaultDecision:"leave_empty"}:{}})]}return[]})}function Ct(e,r,n,t){let i=e.nodes[0]?.objectApiName??n,l=bt(e,r),f=l.writes+l.reads,p="warning";if(t&&l.bound!=="unknown"){let d=f>t.Remaining,u=t.Max-t.Remaining+f>pt*t.Max;p=d&&l.bound==="exact"?"blocking":d||u?"warning":"info"}return j({kind:"api_budget",severity:p,objectApiName:i,detail:{calls:f,writes:l.writes,reads:l.reads,estimate:l.bound,...t?{max:t.Max,remaining:t.Remaining}:{budgetRead:!1}},decisions:["ignore"]})}var St={blocking:"BLOCKING",warning:"warning",info:"info"},$t=new Set(["picklist_value_refused","dependent_value_invalid","picklist_value_absent","currency_inactive"]),Et=new Set(["record_type_unmapped","record_type_unavailable"]);function rt(e,r,n=[e.id]){if(ve(r.ignoredGaps,e.id,n)!==void 0)return"left as it is";let t=e.objectApiName;if(r.excludedObjects?.includes(t))return`${t} left out of the run`;let i=new Set(e.decisions),{field:l,value:f}=e;if(i.has("skip_rows")&&Ne((r.skippedRows??[]).filter(o=>o.object===t),e.id,n))return"these rows held back";if($t.has(e.kind)&&l!==void 0&&f!==void 0&&(i.has("map_value")||i.has("leave_empty"))){let o=(r.picklistValueMappings??[]).filter(h=>h.object===t&&h.field===l&&h.from===f),a=_e(o,e,n);if(a?.to===null&&i.has("leave_empty"))return"the field left empty in these rows";if(a&&a.to!==null&&i.has("map_value"))return`written as "${a.to}"`}let p=Et.has(e.kind)?e.value??e.recordType:void 0;if(p!==void 0&&i.has("map_record_type")){let o=r.recordTypeMappings?.find(a=>a.object===t&&a.from===p);if(o)return o.to===null?"written with the object's default record type":`written as record type ${o.to}`}if(l===void 0)return;let d=o=>o.object===t&&o.field===l,u=i.has("set_default")?r.defaultValues?.find(d):void 0;if(u)return`default "${String(u.value)}"`;if(i.has("truncate")&&r.truncateFields?.some(d))return"cut to the field's length";if(i.has("leave_empty")&&r.fieldExclusions?.[t]?.includes(l))return"the field left out of the rows"}function Wt(e,r){let n=e.gaps.map(t=>t.id);return{...e,gaps:e.gaps.map(t=>{let i=rt(t,r,n);return i===void 0?t:{...t,answeredBy:i}})}}function et(e,r,n,t){if(t)return`the mute lifts it (${t.permission}, in ${t.permissionSet}): ${re(e,!0)}`;let i=r?rt(e,r,n):void 0;return i===void 0?`${St[e.severity]}: ${re(e)}`:`answered by the run's decision: ${i} \u2014 ${re(e)}`}var Gt={validationRules:"the validation rules",validationRuleFormulas:"the formulas of some validation rules",duplicateRules:"the duplicate rules",duplicateRuleActions:"what the duplicate rules do on insert",userPermissions:"the custom permissions of the user the run writes as",permissionSets:"the permission sets that hold a bypass of a validation rule the user the run writes as does not",targetFields:"the fields of an object in the target",sourceFields:"the fields of an object in the source",apiBudget:"the daily API requests left"},xt={notInSource:"the source has no such field",notCreateableInSource:"the source cannot give it",excluded:"the run leaves it out"},L=e=>typeof e=="number"?String(e):"?";function re(e,r=!1){let n=e.detail??{};switch(e.kind){case"required_field_missing":return`required field ${e.field??""} (${y(n.type)}): only the target requires it, and the run does not write it (${xt[y(n.reason)]??y(n.reason)}): every row is refused unless it is given a value`;case"validation_rule":{let t=e.field?` on ${e.field}`:"",i=[...D(n.bypasses).map(f=>`not when ${f}`),...D(n.heldBypasses).length>0?[`kept quiet for this run: the user it writes as holds ${D(n.heldBypasses).join(", ")}`]:[],...n.formula==="notRead"?["formula not read"]:[],...n.formula==="unreadable"?["formula unreadable"]:[],...e.field&&!r?[`a row it refuses goes again without ${e.field}`]:[]],l=y(n.message)?`: "${y(n.message)}"`:"";return`validation rule "${y(n.rule)}"${t}${l}${i.length>0?` (${i.join("; ")})`:""}`}case"duplicate_rule":{let t=`duplicate rule "${y(n.rule)}"`;if(n.action==="block")return`${t}: blocks an insert it matches: a row it matches is refused, whatever allowSave says`;if(n.action==="allow"){let i=[n.alert===!0?"an alert":"",n.report===!0?"a report":""].filter(Boolean).join(" and ");return`${t}: allows an insert it matches${i?`, with ${i}`:""}: the run saves it (allowSave=true)`}return`${t}: what it does on insert was not read: a rule that blocks refuses a row it matches`}case"lookup_filter":return`lookup filter on ${e.field??""}: not checked before the run; `+(n.optional===!0?"a lookup it refuses is left empty":"the lookup is required, and a row it refuses is refused");case"object_not_createable":return"the user the run writes as may not create its records in the target: every row is skipped, after the objects written before it, unless the object is left out";case"object_platform_only":return"no user can create its records in the target, the platform writes them itself: the run skips every row of it";case"object_setup_only":return"no user can create its records in the target, not even one with Modify All Data, and no permission set gives Create on it: setup the org keeps as records, or the platform's own; the run skips every row of it";case"object_feature_off":return"even a user with Modify All Data may not create its records in the target, though a permission set can give Create on it: a feature or licence the target has not turned on for that user keeps it closed; turn it on, or every row is skipped, after the objects written before it, unless the object is left out";case"object_through_parent":{let t=D(n.editOn);return`no permission set gives Create on it: ${t.length>0?`the user the run writes as creates its records with Edit on ${t.join(" and ")}, which they hang from, or no user can`:"the records they hang from may open it to the user the run writes as, or no user can: read as a user with Modify All Data, the target would tell"}; every row is skipped, after the objects written before it, unless the object is left out`}case"api_budget":{let t=`about ${L(n.calls)} call(s) (${L(n.writes)} write(s) of 200 rows, ${L(n.reads)} read(s))`,i=n.estimate==="atMost"?`at most ${t}, counted on whole tables`:n.estimate==="unknown"?"an unknown number of calls: an object was never counted":t,l=n.budgetRead===!1?"the daily requests left could not be read":`${L(n.remaining)} of ${L(n.max)} daily requests left`;return`API budget: the run takes ${i}; ${l}`}default:return e.kind}}function jt(e,r,n){return Se(e).map(({permission:t,permissionSet:i,others:l})=>{if(!i)return` ${t}: no permission set of ${r} holds it: an admin creates one that includes it`;let f=l.length>0?`; also held by ${l.map(d=>d.name).join(", ")}`:"",p=n?`: ${Ge(i.name,r,n)}`:"";return` ${t}: held by permission set ${i.name}, the smallest${f}${p}`})}function Kt(e,r,n={}){let t=[`target gaps: what ${r} holds against the rows, read from its metadata`],i=e.gaps.map(u=>u.id),l=e.gaps.filter(u=>u.kind==="api_budget"),f=e.gaps.filter(u=>u.kind!=="api_budget"),p=[...new Set(f.map(u=>u.objectApiName))].sort((u,o)=>u.localeCompare(o));for(let u of p){t.push(` ${u}`);for(let o of f.filter(a=>a.objectApiName===u)){let a=$e(o,n.lifted);t.push(` ${et(o,n.decisions,i,a)}`),a||t.push(...jt(o,r,n.username))}}f.length===0&&t.push(e.unread.length>0?" nothing found in what could be read":" no validation rule, duplicate rule, field only the target requires or lookup filter");for(let u of l)t.push(` ${et(u,n.decisions,i)}`);let d=f.filter(u=>u.detail?.formula==="notRead").length;d>0&&t.push(` ${d} validation rule formula(s) not read: the read takes ${n.formulasBound??ie} at most`);for(let{part:u,reason:o}of e.unread)t.push(` ${Gt[u]??u} could not be read: ${o}`);return t.push(` read in ${e.requests} request(s) to ${r}`),t}export{tt as a,W as b,ie as c,Vt as d,oe as e,mt as f,q as g,ht as h,nt as i,bt as j,Bt as k,kt as l,Ut as m,Qt as n,Xe as o,rt as p,Wt as q,Kt as r};