@wirecat/zoom-cli 0.83.0 → 0.84.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 (481) hide show
  1. package/README.md +10 -10
  2. package/contracts/wirecat.json +34 -1
  3. package/dist/account-removal.d.ts +1 -1
  4. package/dist/account-removal.d.ts.map +1 -1
  5. package/dist/account-removal.js +1 -1
  6. package/dist/account-removal.js.map +1 -1
  7. package/dist/agent-skill.js +1 -1
  8. package/dist/agent-skill.js.map +1 -1
  9. package/dist/answer-entities.d.ts +1 -1
  10. package/dist/answer-entities.d.ts.map +1 -1
  11. package/dist/answer-entities.js +1 -1
  12. package/dist/answer-entities.js.map +1 -1
  13. package/dist/answer-output.d.ts +2 -2
  14. package/dist/answer-output.d.ts.map +1 -1
  15. package/dist/answer-output.js +1 -1
  16. package/dist/answer-output.js.map +1 -1
  17. package/dist/answer-policy.d.ts.map +1 -1
  18. package/dist/answer-policy.js +1 -2
  19. package/dist/answer-policy.js.map +1 -1
  20. package/dist/answers.js +1 -1
  21. package/dist/answers.js.map +1 -1
  22. package/dist/api.d.ts +2 -2
  23. package/dist/api.d.ts.map +1 -1
  24. package/dist/api.js +1 -1
  25. package/dist/api.js.map +1 -1
  26. package/dist/archive-commands.d.ts +1 -1
  27. package/dist/archive-commands.d.ts.map +1 -1
  28. package/dist/archive-commands.js +1 -2
  29. package/dist/archive-commands.js.map +1 -1
  30. package/dist/archive-import.d.ts +1 -1
  31. package/dist/archive-import.d.ts.map +1 -1
  32. package/dist/archive-import.js +1 -1
  33. package/dist/archive-import.js.map +1 -1
  34. package/dist/archive-transcripts.d.ts +1 -1
  35. package/dist/archive-transcripts.d.ts.map +1 -1
  36. package/dist/archive-transcripts.js +1 -2
  37. package/dist/archive-transcripts.js.map +1 -1
  38. package/dist/bin/main.js +3 -3
  39. package/dist/bin/main.js.map +1 -1
  40. package/dist/bin/zm.js +11 -11
  41. package/dist/bundle/answer-policy-OQQWAUHH.js +33 -0
  42. package/dist/bundle/chunk-3YDF76DP.js +922 -0
  43. package/dist/bundle/chunk-AEWYRB6F.js +8 -0
  44. package/dist/bundle/{chunk-OGTN2KVG.js → chunk-AF2Z6VOG.js} +4 -14
  45. package/dist/bundle/{chunk-26TW5RZ6.js → chunk-DAYBU7WR.js} +61 -94
  46. package/dist/bundle/{chunk-2DK5BBFF.js → chunk-JD63PEI3.js} +3 -8
  47. package/dist/bundle/{chunk-H6A4NWYJ.js → chunk-L5ZYKXAY.js} +114 -128
  48. package/dist/bundle/{chunk-R6IA5UQB.js → chunk-W4TDCCT3.js} +8 -2
  49. package/dist/bundle/{chunk-XEOZTA3H.js → chunk-W6YFWJDR.js} +2 -5
  50. package/dist/bundle/{chunk-434YFJAE.js → chunk-WSGD5Q6L.js} +3 -9
  51. package/dist/bundle/config-MP5YLHEY.js +29 -0
  52. package/dist/bundle/{folders-ROKVKSCT.js → folders-B2GKJOC2.js} +2 -7
  53. package/dist/bundle/{main-GCK3VYAA.js → main-YZPLPXB7.js} +19 -41
  54. package/dist/bundle/{output-file-RYIOIXMD.js → output-file-PKA7MJEP.js} +3 -11
  55. package/dist/bundle/{program-OYLVYA4Z.js → program-7JY6XJ6K.js} +642 -801
  56. package/dist/bundle/run-log-ML7ZCWXD.js +54 -0
  57. package/dist/bundle/store-connection-LQGKS3DN.js +21 -0
  58. package/dist/bundle/streaming-PRGWGNHY.js +12 -0
  59. package/dist/bundle/tokens-57RJVBK6.js +18 -0
  60. package/dist/bundle/zm.js +4 -161
  61. package/dist/bundle/{zoom-app-4F4YY4OI.js → zoom-app-EYJST6GF.js} +5 -13
  62. package/dist/chat-file.d.ts +1 -1
  63. package/dist/chat-file.d.ts.map +1 -1
  64. package/dist/commands.js +1 -1
  65. package/dist/commands.js.map +1 -1
  66. package/dist/config-issues.d.ts +1 -1
  67. package/dist/config-issues.d.ts.map +1 -1
  68. package/dist/config-issues.js +1 -1
  69. package/dist/config-issues.js.map +1 -1
  70. package/dist/config.d.ts +1 -2
  71. package/dist/config.d.ts.map +1 -1
  72. package/dist/config.js +1 -2
  73. package/dist/config.js.map +1 -1
  74. package/dist/contacts-commands.d.ts +1 -1
  75. package/dist/contacts-commands.d.ts.map +1 -1
  76. package/dist/contacts-commands.js +1 -1
  77. package/dist/contacts-commands.js.map +1 -1
  78. package/dist/contract-overrides.js +1 -1
  79. package/dist/contract-overrides.js.map +1 -1
  80. package/dist/errors.d.ts +1 -1
  81. package/dist/errors.d.ts.map +1 -1
  82. package/dist/execution.d.ts +1 -1
  83. package/dist/execution.d.ts.map +1 -1
  84. package/dist/execution.js +1 -1
  85. package/dist/execution.js.map +1 -1
  86. package/dist/files.d.ts +2 -2
  87. package/dist/files.d.ts.map +1 -1
  88. package/dist/files.js +1 -1
  89. package/dist/files.js.map +1 -1
  90. package/dist/first-screen.js +1 -1
  91. package/dist/first-screen.js.map +1 -1
  92. package/dist/identity.d.ts +1 -1
  93. package/dist/identity.d.ts.map +1 -1
  94. package/dist/identity.js +6 -0
  95. package/dist/identity.js.map +1 -1
  96. package/dist/ingestion-search-commands.d.ts +1 -1
  97. package/dist/ingestion-search-commands.d.ts.map +1 -1
  98. package/dist/ingestion-search-commands.js +1 -1
  99. package/dist/ingestion-search-commands.js.map +1 -1
  100. package/dist/local-transcription-commands.d.ts +1 -1
  101. package/dist/local-transcription-commands.d.ts.map +1 -1
  102. package/dist/local-transcription-commands.js +1 -2
  103. package/dist/local-transcription-commands.js.map +1 -1
  104. package/dist/local-transcription.d.ts +1 -2
  105. package/dist/local-transcription.d.ts.map +1 -1
  106. package/dist/local-transcription.js +3 -3
  107. package/dist/local-transcription.js.map +1 -1
  108. package/dist/meeting-commands.d.ts +1 -1
  109. package/dist/meeting-commands.d.ts.map +1 -1
  110. package/dist/meeting-commands.js +1 -2
  111. package/dist/meeting-commands.js.map +1 -1
  112. package/dist/meeting-communications-binding.d.ts +1 -2
  113. package/dist/meeting-communications-binding.d.ts.map +1 -1
  114. package/dist/meeting-communications-binding.js.map +1 -1
  115. package/dist/meeting-context-commands.d.ts +1 -1
  116. package/dist/meeting-context-commands.d.ts.map +1 -1
  117. package/dist/meeting-context-commands.js +1 -1
  118. package/dist/meeting-context-commands.js.map +1 -1
  119. package/dist/meeting-context.d.ts +2 -4
  120. package/dist/meeting-context.d.ts.map +1 -1
  121. package/dist/meeting-context.js +1 -1
  122. package/dist/meeting-context.js.map +1 -1
  123. package/dist/meeting-integration-commands.d.ts +1 -1
  124. package/dist/meeting-integration-commands.d.ts.map +1 -1
  125. package/dist/meeting-integration-commands.js +1 -2
  126. package/dist/meeting-integration-commands.js.map +1 -1
  127. package/dist/meeting-integration.d.ts +1 -1
  128. package/dist/meeting-integration.d.ts.map +1 -1
  129. package/dist/meeting-integration.js +1 -1
  130. package/dist/meeting-integration.js.map +1 -1
  131. package/dist/meeting-inventory.d.ts +1 -1
  132. package/dist/meeting-inventory.d.ts.map +1 -1
  133. package/dist/meeting-inventory.js +1 -1
  134. package/dist/meeting-inventory.js.map +1 -1
  135. package/dist/meeting-preparation.d.ts +1 -2
  136. package/dist/meeting-preparation.d.ts.map +1 -1
  137. package/dist/meeting-preparation.js +1 -1
  138. package/dist/meeting-preparation.js.map +1 -1
  139. package/dist/meeting-project-candidates.d.ts +1 -1
  140. package/dist/meeting-project-candidates.d.ts.map +1 -1
  141. package/dist/meeting-project-evidence-commands.d.ts +1 -1
  142. package/dist/meeting-project-evidence-commands.d.ts.map +1 -1
  143. package/dist/meeting-project-evidence-commands.js +1 -2
  144. package/dist/meeting-project-evidence-commands.js.map +1 -1
  145. package/dist/meeting-read-command-bindings.js +1 -1
  146. package/dist/meeting-read-command-bindings.js.map +1 -1
  147. package/dist/meeting-review-commands.d.ts +1 -3
  148. package/dist/meeting-review-commands.d.ts.map +1 -1
  149. package/dist/meeting-review-commands.js +1 -2
  150. package/dist/meeting-review-commands.js.map +1 -1
  151. package/dist/meeting-search-commands.d.ts +2 -3
  152. package/dist/meeting-search-commands.d.ts.map +1 -1
  153. package/dist/meeting-search-commands.js +2 -4
  154. package/dist/meeting-search-commands.js.map +1 -1
  155. package/dist/meeting-searches-commands.d.ts +1 -2
  156. package/dist/meeting-searches-commands.d.ts.map +1 -1
  157. package/dist/meeting-searches-commands.js +1 -2
  158. package/dist/meeting-searches-commands.js.map +1 -1
  159. package/dist/meeting-selection-options.d.ts +1 -1
  160. package/dist/meeting-selection-options.d.ts.map +1 -1
  161. package/dist/meeting-selection-options.js +1 -2
  162. package/dist/meeting-selection-options.js.map +1 -1
  163. package/dist/meeting-semantic-commands.d.ts +1 -2
  164. package/dist/meeting-semantic-commands.d.ts.map +1 -1
  165. package/dist/meeting-semantic-commands.js +1 -1
  166. package/dist/meeting-semantic-commands.js.map +1 -1
  167. package/dist/meeting-semantic.d.ts +2 -2
  168. package/dist/meeting-semantic.d.ts.map +1 -1
  169. package/dist/meeting-semantic.js +1 -1
  170. package/dist/meeting-semantic.js.map +1 -1
  171. package/dist/meeting-source.d.ts +1 -1
  172. package/dist/meeting-source.d.ts.map +1 -1
  173. package/dist/meeting-stats-commands.d.ts +1 -3
  174. package/dist/meeting-stats-commands.d.ts.map +1 -1
  175. package/dist/meeting-stats-commands.js +1 -2
  176. package/dist/meeting-stats-commands.js.map +1 -1
  177. package/dist/models-commands.d.ts +1 -1
  178. package/dist/models-commands.d.ts.map +1 -1
  179. package/dist/models-commands.js +1 -1
  180. package/dist/models-commands.js.map +1 -1
  181. package/dist/occurrence-schedule.d.ts +1 -1
  182. package/dist/occurrence-schedule.d.ts.map +1 -1
  183. package/dist/permissions.d.ts +1 -1
  184. package/dist/permissions.d.ts.map +1 -1
  185. package/dist/permissions.js +1 -2
  186. package/dist/permissions.js.map +1 -1
  187. package/dist/profile.js +1 -1
  188. package/dist/profile.js.map +1 -1
  189. package/dist/program-bindings.js +1 -1
  190. package/dist/program-bindings.js.map +1 -1
  191. package/dist/program.d.ts +1 -2
  192. package/dist/program.d.ts.map +1 -1
  193. package/dist/program.js +1 -1
  194. package/dist/program.js.map +1 -1
  195. package/dist/progress-commands.d.ts +1 -1
  196. package/dist/progress-commands.d.ts.map +1 -1
  197. package/dist/progress-commands.js +1 -2
  198. package/dist/progress-commands.js.map +1 -1
  199. package/dist/read-only.js +1 -1
  200. package/dist/read-only.js.map +1 -1
  201. package/dist/recording-archive.d.ts.map +1 -1
  202. package/dist/recording-archive.js +1 -2
  203. package/dist/recording-archive.js.map +1 -1
  204. package/dist/recording-manifest.js +1 -1
  205. package/dist/recording-manifest.js.map +1 -1
  206. package/dist/recording-partial-store.d.ts +2 -3
  207. package/dist/recording-partial-store.d.ts.map +1 -1
  208. package/dist/recording-partial-store.js +1 -1
  209. package/dist/recording-partial-store.js.map +1 -1
  210. package/dist/recording-promotion-store.d.ts +1 -2
  211. package/dist/recording-promotion-store.d.ts.map +1 -1
  212. package/dist/recording-promotion-store.js +1 -2
  213. package/dist/recording-promotion-store.js.map +1 -1
  214. package/dist/recording-schedule-commands.d.ts +1 -1
  215. package/dist/recording-schedule-commands.d.ts.map +1 -1
  216. package/dist/recording-schedule-commands.js +1 -1
  217. package/dist/recording-schedule-commands.js.map +1 -1
  218. package/dist/recording-schedule-store.js +1 -1
  219. package/dist/recording-schedule-store.js.map +1 -1
  220. package/dist/recording-schedule-systemd.js +1 -1
  221. package/dist/recording-schedule-systemd.js.map +1 -1
  222. package/dist/recording-schedule.d.ts +1 -1
  223. package/dist/recording-schedule.d.ts.map +1 -1
  224. package/dist/recording-schedule.js +1 -1
  225. package/dist/recording-schedule.js.map +1 -1
  226. package/dist/recording-sync-store.d.ts +1 -1
  227. package/dist/recording-sync-store.d.ts.map +1 -1
  228. package/dist/recording-sync-store.js +1 -2
  229. package/dist/recording-sync-store.js.map +1 -1
  230. package/dist/recording-sync.d.ts +1 -1
  231. package/dist/recording-sync.d.ts.map +1 -1
  232. package/dist/recording-sync.js +1 -1
  233. package/dist/recording-sync.js.map +1 -1
  234. package/dist/recording-writer-lease.d.ts +1 -1
  235. package/dist/recording-writer-lease.d.ts.map +1 -1
  236. package/dist/recording-writer-lease.js +1 -1
  237. package/dist/recording-writer-lease.js.map +1 -1
  238. package/dist/recordings.d.ts +1 -1
  239. package/dist/recordings.d.ts.map +1 -1
  240. package/dist/recordings.js.map +1 -1
  241. package/dist/remote-meetings.d.ts +19 -19
  242. package/dist/remote-meetings.d.ts.map +1 -1
  243. package/dist/remote-meetings.js +1 -1
  244. package/dist/remote-meetings.js.map +1 -1
  245. package/dist/request-events.d.ts +1 -1
  246. package/dist/request-events.d.ts.map +1 -1
  247. package/dist/request-events.js +1 -1
  248. package/dist/request-events.js.map +1 -1
  249. package/dist/run-log.d.ts +1 -1
  250. package/dist/run-log.d.ts.map +1 -1
  251. package/dist/run-log.js +1 -1
  252. package/dist/run-log.js.map +1 -1
  253. package/dist/run.d.ts +1 -1
  254. package/dist/run.d.ts.map +1 -1
  255. package/dist/run.js +1 -2
  256. package/dist/run.js.map +1 -1
  257. package/dist/series-inventory.d.ts +2 -2
  258. package/dist/series-inventory.js +1 -1
  259. package/dist/series-inventory.js.map +1 -1
  260. package/dist/setup-commands.d.ts +1 -1
  261. package/dist/setup-commands.d.ts.map +1 -1
  262. package/dist/setup-commands.js +1 -1
  263. package/dist/setup-commands.js.map +1 -1
  264. package/dist/store-commands.d.ts +1 -1
  265. package/dist/store-commands.d.ts.map +1 -1
  266. package/dist/store-commands.js +1 -2
  267. package/dist/store-commands.js.map +1 -1
  268. package/dist/store-connection.d.ts +1 -3
  269. package/dist/store-connection.d.ts.map +1 -1
  270. package/dist/store-connection.js +14 -14
  271. package/dist/store-connection.js.map +1 -1
  272. package/dist/sync-progress.d.ts +4 -4
  273. package/dist/sync-progress.d.ts.map +1 -1
  274. package/dist/sync-progress.js +1 -1
  275. package/dist/sync-progress.js.map +1 -1
  276. package/dist/tokens.d.ts +1 -1
  277. package/dist/tokens.d.ts.map +1 -1
  278. package/dist/tokens.js +1 -1
  279. package/dist/tokens.js.map +1 -1
  280. package/dist/unified-search.d.ts +1 -1
  281. package/dist/unified-search.d.ts.map +1 -1
  282. package/dist/upcoming-meetings.d.ts +2 -2
  283. package/dist/upcoming-meetings.js +1 -1
  284. package/dist/upcoming-meetings.js.map +1 -1
  285. package/dist/upgrade.d.ts.map +1 -1
  286. package/dist/upgrade.js +1 -2
  287. package/dist/upgrade.js.map +1 -1
  288. package/dist/version.d.ts +1 -1
  289. package/dist/version.js +1 -1
  290. package/dist/watch-commands.d.ts +1 -2
  291. package/dist/watch-commands.d.ts.map +1 -1
  292. package/dist/watch-commands.js +1 -2
  293. package/dist/watch-commands.js.map +1 -1
  294. package/dist/watch-service.d.ts +1 -1
  295. package/dist/watch-service.d.ts.map +1 -1
  296. package/dist/watch-service.js +1 -1
  297. package/dist/watch-service.js.map +1 -1
  298. package/dist/zoom-app.d.ts +2 -2
  299. package/dist/zoom-app.d.ts.map +1 -1
  300. package/dist/zoom-app.js +1 -1
  301. package/dist/zoom-app.js.map +1 -1
  302. package/dist/zoom-search-commands.d.ts +1 -1
  303. package/dist/zoom-search-commands.d.ts.map +1 -1
  304. package/dist/zoom-search-commands.js +1 -1
  305. package/dist/zoom-search-commands.js.map +1 -1
  306. package/dist/zoom-session.d.ts +1 -1
  307. package/dist/zoom-session.d.ts.map +1 -1
  308. package/dist/zoom-session.js +1 -1
  309. package/dist/zoom-session.js.map +1 -1
  310. package/package.json +3 -3
  311. package/scenarios/person-in-meetings.md +1 -1
  312. package/skills/zoom-cli/SKILL.md +1 -1
  313. package/skills/zoom-cli/references/people-and-projects.md +5 -5
  314. package/skills/zoom-cli/references/prepare.md +2 -2
  315. package/dist/bundle/agent-3HDWEZ5M.js +0 -47
  316. package/dist/bundle/all-profiles-RY2OMSDL.js +0 -321
  317. package/dist/bundle/answer-policy-IFVXPPGW.js +0 -131
  318. package/dist/bundle/anthropic-36VPSF7B.js +0 -91
  319. package/dist/bundle/app-server-ZVJVUGB7.js +0 -267
  320. package/dist/bundle/bun-F4M4KCNA.js +0 -169
  321. package/dist/bundle/bun-sqlite-IOPYIUA7.js +0 -76
  322. package/dist/bundle/chunk-2IBKKVVZ.js +0 -335
  323. package/dist/bundle/chunk-2S54TM4N.js +0 -230
  324. package/dist/bundle/chunk-3AQHKXVR.js +0 -161
  325. package/dist/bundle/chunk-3CW2C7ZA.js +0 -217
  326. package/dist/bundle/chunk-3KUEZK5Z.js +0 -73
  327. package/dist/bundle/chunk-3PXUQFHX.js +0 -2333
  328. package/dist/bundle/chunk-3QN5KDFZ.js +0 -3012
  329. package/dist/bundle/chunk-575JMTDR.js +0 -562
  330. package/dist/bundle/chunk-5B2LV4MS.js +0 -26
  331. package/dist/bundle/chunk-5WL5RHOO.js +0 -167
  332. package/dist/bundle/chunk-6C7ESL5N.js +0 -295
  333. package/dist/bundle/chunk-6E4KLYNP.js +0 -229
  334. package/dist/bundle/chunk-7JDXR75Q.js +0 -465
  335. package/dist/bundle/chunk-AK3H2C65.js +0 -1349
  336. package/dist/bundle/chunk-AQ5RIOUE.js +0 -633
  337. package/dist/bundle/chunk-AQLUAQXJ.js +0 -1259
  338. package/dist/bundle/chunk-ASTLGFTR.js +0 -12270
  339. package/dist/bundle/chunk-ATHBB7OU.js +0 -106
  340. package/dist/bundle/chunk-B2NM65RD.js +0 -80
  341. package/dist/bundle/chunk-B4KHDXJE.js +0 -64
  342. package/dist/bundle/chunk-BAFC7WNI.js +0 -276
  343. package/dist/bundle/chunk-BBGJQMRI.js +0 -34
  344. package/dist/bundle/chunk-BTLZYRIW.js +0 -1007
  345. package/dist/bundle/chunk-BZDS2X6Y.js +0 -5150
  346. package/dist/bundle/chunk-C7JPYWYQ.js +0 -77
  347. package/dist/bundle/chunk-CDQUW25G.js +0 -3752
  348. package/dist/bundle/chunk-CJWGJBHW.js +0 -1044
  349. package/dist/bundle/chunk-D72URWJE.js +0 -532
  350. package/dist/bundle/chunk-D7RCUODT.js +0 -185
  351. package/dist/bundle/chunk-DFDN6AUB.js +0 -21
  352. package/dist/bundle/chunk-DNCLQPOM.js +0 -7
  353. package/dist/bundle/chunk-DQJECJUE.js +0 -2257
  354. package/dist/bundle/chunk-E4JQ3MCW.js +0 -2338
  355. package/dist/bundle/chunk-E4ODYLEK.js +0 -209
  356. package/dist/bundle/chunk-EE45N67Q.js +0 -86
  357. package/dist/bundle/chunk-EEEU4MKK.js +0 -210
  358. package/dist/bundle/chunk-ESN3W2MZ.js +0 -2624
  359. package/dist/bundle/chunk-ETIZGA4P.js +0 -340
  360. package/dist/bundle/chunk-F44QK6CK.js +0 -52
  361. package/dist/bundle/chunk-FH2UFNH6.js +0 -54
  362. package/dist/bundle/chunk-FTH6WGYO.js +0 -24
  363. package/dist/bundle/chunk-FWACRG4X.js +0 -160
  364. package/dist/bundle/chunk-FXBHOCJK.js +0 -24600
  365. package/dist/bundle/chunk-G5SZL7G2.js +0 -150
  366. package/dist/bundle/chunk-G6CHEFAG.js +0 -108
  367. package/dist/bundle/chunk-GHJD7PE6.js +0 -1068
  368. package/dist/bundle/chunk-GZ7WBU5Y.js +0 -18
  369. package/dist/bundle/chunk-HKLRI2LB.js +0 -555
  370. package/dist/bundle/chunk-HMD4FZYY.js +0 -133
  371. package/dist/bundle/chunk-HO4JGD4Q.js +0 -16
  372. package/dist/bundle/chunk-HTQTIKWP.js +0 -928
  373. package/dist/bundle/chunk-HUAHLO6N.js +0 -29
  374. package/dist/bundle/chunk-IANKXHSE.js +0 -46
  375. package/dist/bundle/chunk-IQZXFWFI.js +0 -170
  376. package/dist/bundle/chunk-ISQ23VKV.js +0 -123
  377. package/dist/bundle/chunk-JEH33ZCD.js +0 -58
  378. package/dist/bundle/chunk-JUNQYWQ2.js +0 -228
  379. package/dist/bundle/chunk-JUXMVQWJ.js +0 -799
  380. package/dist/bundle/chunk-KHQDWYCG.js +0 -82
  381. package/dist/bundle/chunk-KYRYD4CR.js +0 -38
  382. package/dist/bundle/chunk-LBGT6W4R.js +0 -377
  383. package/dist/bundle/chunk-LN7HRYTH.js +0 -80
  384. package/dist/bundle/chunk-MEB7HBTM.js +0 -95
  385. package/dist/bundle/chunk-MEEFWYX3.js +0 -388
  386. package/dist/bundle/chunk-MNOAMJ6H.js +0 -94
  387. package/dist/bundle/chunk-MYHPXJDG.js +0 -142
  388. package/dist/bundle/chunk-NGI37RFW.js +0 -692
  389. package/dist/bundle/chunk-NZMWD7Y3.js +0 -68149
  390. package/dist/bundle/chunk-O6IECJRM.js +0 -54
  391. package/dist/bundle/chunk-OBWL3BUV.js +0 -800
  392. package/dist/bundle/chunk-OEEWVKJX.js +0 -53
  393. package/dist/bundle/chunk-OQYZ3W4K.js +0 -374
  394. package/dist/bundle/chunk-P3ZCTYGW.js +0 -101
  395. package/dist/bundle/chunk-PL5P7UKW.js +0 -25216
  396. package/dist/bundle/chunk-PVEBAHFU.js +0 -100
  397. package/dist/bundle/chunk-R2B6PUVI.js +0 -206
  398. package/dist/bundle/chunk-RLOH7RDN.js +0 -362
  399. package/dist/bundle/chunk-RQ4AXSCJ.js +0 -616
  400. package/dist/bundle/chunk-RYGTCRFZ.js +0 -140
  401. package/dist/bundle/chunk-S4PXWIE4.js +0 -408
  402. package/dist/bundle/chunk-SDZZYZLL.js +0 -58
  403. package/dist/bundle/chunk-SHQAYUK6.js +0 -1199
  404. package/dist/bundle/chunk-T3W4V4A6.js +0 -63
  405. package/dist/bundle/chunk-TCT5D2X2.js +0 -6848
  406. package/dist/bundle/chunk-TDWPOSPR.js +0 -198
  407. package/dist/bundle/chunk-TER3N27H.js +0 -353
  408. package/dist/bundle/chunk-TMTNP7QN.js +0 -214
  409. package/dist/bundle/chunk-TO5UEWXR.js +0 -288
  410. package/dist/bundle/chunk-TXDR6YSF.js +0 -23
  411. package/dist/bundle/chunk-TY7NDMFY.js +0 -46
  412. package/dist/bundle/chunk-UAWSINMC.js +0 -875
  413. package/dist/bundle/chunk-UBH7YF3C.js +0 -9354
  414. package/dist/bundle/chunk-UEAE3JUU.js +0 -46576
  415. package/dist/bundle/chunk-UHR363OD.js +0 -357
  416. package/dist/bundle/chunk-UM52A76S.js +0 -259
  417. package/dist/bundle/chunk-URP6BTHN.js +0 -624
  418. package/dist/bundle/chunk-UWQEAA6S.js +0 -13
  419. package/dist/bundle/chunk-VR7QZGRU.js +0 -185
  420. package/dist/bundle/chunk-VRH5PBSL.js +0 -755
  421. package/dist/bundle/chunk-VTLQTQKY.js +0 -1756
  422. package/dist/bundle/chunk-VTYNLTDW.js +0 -331
  423. package/dist/bundle/chunk-WY7XG6TE.js +0 -76
  424. package/dist/bundle/chunk-XH23ML2V.js +0 -195
  425. package/dist/bundle/chunk-XYF76A26.js +0 -27556
  426. package/dist/bundle/chunk-Y5E2WNWB.js +0 -35
  427. package/dist/bundle/chunk-ZDYJAEVB.js +0 -84
  428. package/dist/bundle/chunk-ZJ63HDBT.js +0 -71
  429. package/dist/bundle/chunk-ZT4ZPUIO.js +0 -218
  430. package/dist/bundle/chunk-ZVVMGPBJ.js +0 -50
  431. package/dist/bundle/cli-JK6PQSSN.js +0 -1270
  432. package/dist/bundle/command-contract-F3QNBKPX.js +0 -46
  433. package/dist/bundle/command-server-entry-DJLGN62J.js +0 -176
  434. package/dist/bundle/config-TYYMV3HV.js +0 -118
  435. package/dist/bundle/decode-ZZICNNFF.js +0 -31
  436. package/dist/bundle/dispatch-FKMIPCPQ.js +0 -412
  437. package/dist/bundle/dist-NQPF25XI.js +0 -322
  438. package/dist/bundle/dist-PAKDDIBT.js +0 -191
  439. package/dist/bundle/dist-XUFQCJXW.js +0 -7577
  440. package/dist/bundle/echarts-QMAA7HH5.js +0 -42501
  441. package/dist/bundle/embed-T64EUKUI.js +0 -38
  442. package/dist/bundle/embedder-ZEKISZXI.js +0 -111
  443. package/dist/bundle/failure-XTWBYI2A.js +0 -25
  444. package/dist/bundle/first-run-ZFNY4RRH.js +0 -29
  445. package/dist/bundle/first-screen-LPGCHRHZ.js +0 -47
  446. package/dist/bundle/instructions-4H7UREH2.js +0 -11
  447. package/dist/bundle/mcp-5HFPWC3W.js +0 -167
  448. package/dist/bundle/meeting-combined-7HDPOUPB.js +0 -28
  449. package/dist/bundle/meeting-model-MVUW7UPQ.js +0 -26
  450. package/dist/bundle/meeting-semantic-IF633WGX.js +0 -23
  451. package/dist/bundle/meetings-RY2AAPHV.js +0 -332
  452. package/dist/bundle/node-KM3CUABH.js +0 -2340
  453. package/dist/bundle/node-P3PUHKYH.js +0 -176
  454. package/dist/bundle/node-TLZSIHIJ.js +0 -21
  455. package/dist/bundle/node-sqlite-ASAZJNHE.js +0 -74
  456. package/dist/bundle/oauth-4U3OCK3W.js +0 -20
  457. package/dist/bundle/oauth-AJARLPSY.js +0 -46
  458. package/dist/bundle/open-SEJRY2ZI.js +0 -23
  459. package/dist/bundle/openai-FZDSC2AA.js +0 -28
  460. package/dist/bundle/process-AFIXYXWL.js +0 -91
  461. package/dist/bundle/prompt-BCRD64F4.js +0 -17
  462. package/dist/bundle/public-SVJILCNI.js +0 -206
  463. package/dist/bundle/recognize-25ITJWGX.js +0 -26
  464. package/dist/bundle/remote-5FBAJX7O.js +0 -32
  465. package/dist/bundle/rerank-2HGWWORY.js +0 -52
  466. package/dist/bundle/run-log-7HRF4Y47.js +0 -145
  467. package/dist/bundle/serve-RL35MSJD.js +0 -199
  468. package/dist/bundle/server-QUSBWACP.js +0 -229
  469. package/dist/bundle/server-SCK2SRDK.js +0 -96
  470. package/dist/bundle/services-BGRIQNDC.js +0 -609
  471. package/dist/bundle/speech-4W3ZMTFK.js +0 -89
  472. package/dist/bundle/sqlite-runtime-K3KLRZCV.js +0 -20
  473. package/dist/bundle/state-GYL4C74G.js +0 -36
  474. package/dist/bundle/store-27UQMNEO.js +0 -189
  475. package/dist/bundle/store-NLYH5SQX.js +0 -316
  476. package/dist/bundle/store-connection-CZILWRSR.js +0 -112
  477. package/dist/bundle/store-maintenance-command-Z3QLNSXJ.js +0 -84
  478. package/dist/bundle/streaming-73EKEGPF.js +0 -18
  479. package/dist/bundle/surface-CV3C4RV2.js +0 -82
  480. package/dist/bundle/tokens-PY3S22LY.js +0 -27
  481. /package/dist/bundle/{chunk-7ECP5ZQR.js → chunk-7O7XM37N.js} +0 -0
@@ -1,2257 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- QUERY_LIMITS,
5
- exhausted,
6
- searchError
7
- } from "./chunk-FWACRG4X.js";
8
- import {
9
- fold
10
- } from "./chunk-HO4JGD4Q.js";
11
- import {
12
- CATALOG_KINDS,
13
- CONTRACT_KINDS,
14
- CONTRACT_STATUSES,
15
- DEAL_KINDS,
16
- DEAL_STATUSES,
17
- INVOICE_DIRECTIONS,
18
- MONEY_DIRECTIONS,
19
- ORDER_DIRECTIONS,
20
- ORDER_PURPOSES,
21
- ORDER_STATUSES,
22
- SUBSCRIPTION_STATUSES,
23
- TRANSACTION_STATUSES,
24
- WALLET_KINDS
25
- } from "./chunk-LBGT6W4R.js";
26
- import {
27
- holdsCredential,
28
- secretNamed
29
- } from "./chunk-MNOAMJ6H.js";
30
- import {
31
- looksLikeReference,
32
- parseReference,
33
- providerLabel,
34
- providerNamed
35
- } from "./chunk-7JDXR75Q.js";
36
- import {
37
- CliError
38
- } from "./chunk-IANKXHSE.js";
39
- import {
40
- singleLine
41
- } from "./chunk-BBGJQMRI.js";
42
- import {
43
- __name
44
- } from "./chunk-ZVVMGPBJ.js";
45
-
46
- // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/record-fields.js
47
- var DECIMAL_PATTERN = "^[0-9]{1,16}(\\.[0-9]{1,6})?$";
48
- var SIGNED_DECIMAL = "^-?[0-9]{1,16}(\\.[0-9]{1,6})?$";
49
- var DAY = "^[0-9]{4}-[0-9]{2}-[0-9]{2}$";
50
- var INSTANT = "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}(:[0-9]{2}(\\.[0-9]{1,9})?)?(Z|[+-][0-9]{2}:[0-9]{2})$";
51
- var text = /* @__PURE__ */ __name((description, maxLength = 2e3) => ({
52
- type: "string",
53
- minLength: 1,
54
- maxLength,
55
- ...description ? { description } : {}
56
- }), "text");
57
- var decimal = /* @__PURE__ */ __name((description) => ({ type: "string", pattern: DECIMAL_PATTERN, description }), "decimal");
58
- var signedDecimal = /* @__PURE__ */ __name((description) => ({
59
- type: "string",
60
- pattern: SIGNED_DECIMAL,
61
- description
62
- }), "signedDecimal");
63
- var day = /* @__PURE__ */ __name((description) => ({ type: "string", pattern: DAY, description }), "day");
64
- var instant = /* @__PURE__ */ __name((description) => ({ type: "string", pattern: INSTANT, description }), "instant");
65
- var enumOf = /* @__PURE__ */ __name((values, description) => ({
66
- type: "string",
67
- enum: values,
68
- ...description ? { description } : {}
69
- }), "enumOf");
70
- var currency = { type: "string", pattern: "^[A-Za-z]{3}$", description: "ISO 4217 code" };
71
- var nullable = /* @__PURE__ */ __name((schema) => {
72
- if (schema.type === void 0)
73
- return schema;
74
- const types = typeof schema.type === "string" ? [schema.type] : [...schema.type];
75
- return {
76
- ...schema,
77
- type: types.includes("null") ? types : [...types, "null"],
78
- ...schema.enum ? { enum: [...schema.enum, null] } : {}
79
- };
80
- }, "nullable");
81
- var objectOf = /* @__PURE__ */ __name((properties, { required, description } = {}) => ({
82
- type: "object",
83
- ...description ? { description } : {},
84
- properties: Object.fromEntries(Object.entries(properties).map(([key, schema]) => [key, required?.includes(key) ? schema : nullable(schema)])),
85
- ...required?.length ? { required } : {},
86
- additionalProperties: true
87
- }), "objectOf");
88
- var arrayOf = /* @__PURE__ */ __name((item, maxItems, description) => ({
89
- type: "array",
90
- items: item,
91
- maxItems,
92
- description
93
- }), "arrayOf");
94
- var isObject = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isObject");
95
- var typeOf = /* @__PURE__ */ __name((value) => {
96
- if (Array.isArray(value))
97
- return "array";
98
- if (value === null)
99
- return "null";
100
- if (typeof value === "number")
101
- return Number.isInteger(value) ? "integer" : "number";
102
- if (typeof value === "string")
103
- return "string";
104
- if (typeof value === "boolean")
105
- return "boolean";
106
- return typeof value === "object" ? "object" : "other";
107
- }, "typeOf");
108
- var WHAT = {
109
- string: "text",
110
- integer: "a whole number",
111
- boolean: "true or false",
112
- array: "a list",
113
- object: "an object",
114
- null: "null"
115
- };
116
- var fieldError = /* @__PURE__ */ __name((schema, value, at = []) => {
117
- const name = at.length ? `fields.${at.join(".")}` : "fields";
118
- if (schema.type !== void 0) {
119
- const allowed = typeof schema.type === "string" ? [schema.type] : schema.type;
120
- if (!allowed.includes(typeOf(value)))
121
- return { at, message: `${name} is ${allowed.map((one) => WHAT[one]).join(" or ")}` };
122
- }
123
- if (schema.enum && !schema.enum.includes(value))
124
- return { at, message: `${name} is one of ${schema.enum.filter((one) => one !== null).join(", ")}` };
125
- if (typeof value === "string") {
126
- const length = [...value].length;
127
- if (schema.minLength !== void 0 && length < schema.minLength)
128
- return { at, message: `${name} takes at least ${schema.minLength} characters` };
129
- if (schema.maxLength !== void 0 && length > schema.maxLength)
130
- return { at, message: `${name} takes at most ${schema.maxLength} characters` };
131
- if (schema.pattern !== void 0 && !new RegExp(schema.pattern, "u").test(value))
132
- return { at, message: `${name} does not have the form ${schema.description ?? schema.pattern}` };
133
- }
134
- if (typeof value === "number") {
135
- if (schema.minimum !== void 0 && value < schema.minimum)
136
- return { at, message: `${name} is ${schema.minimum} or more` };
137
- if (schema.maximum !== void 0 && value > schema.maximum)
138
- return { at, message: `${name} is ${schema.maximum} or less` };
139
- }
140
- if (Array.isArray(value)) {
141
- if (schema.maxItems !== void 0 && value.length > schema.maxItems)
142
- return { at, message: `${name} holds at most ${schema.maxItems} items` };
143
- if (schema.items)
144
- for (const [index, item] of value.entries()) {
145
- const found = fieldError(schema.items, item, [...at, index]);
146
- if (found)
147
- return found;
148
- }
149
- }
150
- if (isObject(value)) {
151
- for (const key of schema.required ?? [])
152
- if (!Object.hasOwn(value, key))
153
- return { at: [...at, key], message: `${name}.${key} is required` };
154
- for (const [key, property] of Object.entries(schema.properties ?? {})) {
155
- if (!Object.hasOwn(value, key))
156
- continue;
157
- const found = fieldError(property, value[key], [...at, key]);
158
- if (found)
159
- return found;
160
- }
161
- }
162
- return void 0;
163
- }, "fieldError");
164
-
165
- // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/record-types.js
166
- var kept = /* @__PURE__ */ __name((description) => ({ description }), "kept");
167
- var PARTY = ["person", "organization"];
168
- var ORGANIZATION = ["organization"];
169
- var lineItem = objectOf({
170
- description: text("What the line is for; the product's name when left out", 2e3),
171
- quantity: decimal("A decimal, 1 when left out"),
172
- unit_price: decimal("A decimal in the parent's currency"),
173
- amount: decimal("A decimal in the parent's currency: quantity \xD7 unit price"),
174
- // Untyped: with options.lines text an invoice line's product is data, whatever v1 sent in it.
175
- product: { description: "The product record's external id in this account, read with options.lines products" },
176
- product_ref: { type: "string", pattern: "^product:[1-9][0-9]*$", description: "A product: ref of the store" }
177
- });
178
- var SMS_DIRECTIONS = ["in", "out"];
179
- var CALL_DIRECTIONS = ["in", "out", "missed"];
180
- var phoneFields = {
181
- phone: text("The other side's number as the phone shows it: read to E.164 with the store's phone_countries", 64),
182
- name: text("The other side's name as the phone shows it", 200)
183
- };
184
- var COUNTERPART = { counterpart: { targets: ["person"], linked: true } };
185
- var linesIn = /* @__PURE__ */ __name((table, parent) => ({ table, parent, references: { product: "product" }, refs: { product_ref: "product" } }), "linesIn");
186
- var dealFields = /* @__PURE__ */ __name((kind) => objectOf({
187
- title: text(`The ${kind}'s title`, 200),
188
- pipeline: text("The pipeline record's external id in this account", 512),
189
- stage: text("The stage's external id in that pipeline", 512),
190
- status: enumOf(DEAL_STATUSES, "Left out, the stage's outcome says it"),
191
- amount: decimal("A decimal in currency"),
192
- currency,
193
- close_date: day("When it is expected to close"),
194
- closed_date: day("When it was won or lost"),
195
- closed_reason: text("Why it was won or lost", 2e3),
196
- url: text("The source's page for it", 2e3)
197
- }, { required: ["title", "pipeline", "stage"] }), "dealFields");
198
- var RECORD_TYPES = {
199
- invoice: {
200
- table: "invoices",
201
- review: "proposal",
202
- update: "flag",
203
- tombstone: true,
204
- fields: objectOf({
205
- direction: enumOf(INVOICE_DIRECTIONS),
206
- number: text("The invoice's number", 80),
207
- currency,
208
- issue_date: day("The day it was issued"),
209
- due_date: day("The day it is due"),
210
- total: decimal("The printed total: refused when it is not the sum of the lines"),
211
- lines: arrayOf(lineItem, 500, "The invoice's lines")
212
- }),
213
- roles: {
214
- issuer: { targets: PARTY, v1: true, column: "issuer", pair: true },
215
- counterparty: { targets: PARTY, v1: true, column: "counterparty", pair: true },
216
- project: { targets: ["project"], v1: true, column: "project_id" },
217
- contract: { targets: ["contract"], column: "contract_id" },
218
- subscription: { targets: ["subscription"], column: "subscription_id" }
219
- },
220
- nested: { lines: linesIn("invoice_lines", "invoice_id") }
221
- },
222
- payment: {
223
- table: "payments",
224
- review: "proposal",
225
- update: "re-settle",
226
- tombstone: true,
227
- fields: objectOf({
228
- direction: enumOf(MONEY_DIRECTIONS),
229
- amount: decimal("A decimal in currency"),
230
- currency,
231
- date: day("The day it was paid"),
232
- reference: text("The payment's reference", 2e3)
233
- }),
234
- roles: {
235
- payer: { targets: PARTY, v1: true, column: "payer", pair: true },
236
- payee: { targets: PARTY, v1: true, column: "payee", pair: true },
237
- project: { targets: ["project"], v1: true, column: "project_id" },
238
- settles: { targets: ["invoice"], many: true, amount: true, v1: true },
239
- refund_of: { targets: ["payment"], column: "refund_of" },
240
- subscription: { targets: ["subscription"], column: "subscription_id" }
241
- }
242
- },
243
- person: {
244
- table: "persons",
245
- review: "identity",
246
- update: "in-place",
247
- tombstone: false,
248
- fields: objectOf({
249
- name: kept("The person's name"),
250
- email: kept("E-mail addresses, one or a list: an exact one links the record to the one person who has it"),
251
- phone: kept("Phone numbers, one or a list: an exact one, read to E.164, links like an e-mail"),
252
- position: kept("The job title, kept beside each member-of as its position: never the role")
253
- }),
254
- roles: { "member-of": { targets: ORGANIZATION, relationship: "member-of", kept: true } }
255
- },
256
- organization: {
257
- table: "organizations",
258
- review: "identity",
259
- update: "in-place",
260
- tombstone: true,
261
- fields: objectOf({
262
- name: kept("The organization's name"),
263
- identifiers: kept("Strong identifiers, a list of {scheme, value}: scheme email, domain, tax-id:<cc> or registration:<cc>. One that another organization has links the record to it; any other item is kept as data")
264
- }),
265
- roles: {
266
- "customer-of": { targets: ORGANIZATION, relationship: "customer-of", kept: true },
267
- "partner-of": { targets: ORGANIZATION, relationship: "partner-of", kept: true }
268
- }
269
- },
270
- project: {
271
- table: "projects",
272
- review: "identity",
273
- update: "in-place",
274
- tombstone: true,
275
- fields: objectOf({
276
- name: kept("The project's name"),
277
- key: kept("The project's key: an existing project with it is this one"),
278
- description: kept("What the project is")
279
- }),
280
- roles: { organization: { targets: ORGANIZATION, column: "organization_id" } }
281
- },
282
- order: {
283
- table: "orders",
284
- review: "proposal",
285
- update: "re-propose",
286
- tombstone: true,
287
- fields: objectOf({
288
- number: text("The order's number at the supplier", 80),
289
- direction: enumOf(ORDER_DIRECTIONS, "purchase when left out; in a sale the owner is the supplier"),
290
- purpose: enumOf(ORDER_PURPOSES, "business when left out"),
291
- status: enumOf(ORDER_STATUSES, "placed when left out"),
292
- supplier_name: text("The shop or supplier as the source names it", 200),
293
- order_date: day("The day it was ordered"),
294
- fulfilled_date: day("The day it was delivered"),
295
- currency,
296
- total: decimal("With lines, their sum"),
297
- source_url: text("The order's page at the shop", 2e3),
298
- lines: arrayOf(lineItem, 500, "The order's lines")
299
- }),
300
- roles: {
301
- customer: { targets: PARTY, column: "customer", pair: true },
302
- supplier: { targets: PARTY, column: "supplier", pair: true },
303
- project: { targets: ["project"], column: "project_id" },
304
- contract: { targets: ["contract"], column: "contract_id" },
305
- deal: { targets: ["deal"], column: "deal_id" },
306
- invoice: { targets: ["invoice"], column: "invoice_id" },
307
- payment: { targets: ["payment"], column: "payment_id" }
308
- },
309
- nested: { lines: linesIn("order_lines", "order_id") }
310
- },
311
- product: {
312
- table: "catalog_items",
313
- review: "direct",
314
- update: "in-place",
315
- tombstone: true,
316
- fields: objectOf({
317
- kind: enumOf(CATALOG_KINDS, "product when left out"),
318
- name: text("The product's name", 200),
319
- sku: text("The supplier's code for it", 80),
320
- unit: text("hour, pcs, month: free text", 40),
321
- unit_price: decimal("A decimal in currency"),
322
- currency,
323
- description: text("What it is", 2e3),
324
- archived_date: day("No longer sold from this day")
325
- }, { required: ["name"] }),
326
- roles: { supplier: { targets: PARTY, column: "supplier", pair: true } }
327
- },
328
- contract: {
329
- table: "contracts",
330
- review: "valued-proposal",
331
- update: "re-propose",
332
- tombstone: true,
333
- fields: objectOf({
334
- name: text("The contract's name", 200),
335
- number: text("The contract's number", 80),
336
- kind: enumOf(CONTRACT_KINDS),
337
- status: enumOf(CONTRACT_STATUSES, "active when left out"),
338
- signed_date: day("The day it was signed"),
339
- effective_date: day("The day it starts"),
340
- expiration_date: day("The day it ends; open-ended when left out"),
341
- auto_renew: { type: "boolean", description: "Whether it renews itself" },
342
- renewal: { type: "string", pattern: "^[1-9][0-9]{0,2}-(day|week|month|year)$", description: "1-year" },
343
- notice_days: { type: "integer", minimum: 0, maximum: 3650, description: "Days of notice before it ends" },
344
- terms: text("Renewal, cancellation and other terms, as text", 2e4),
345
- value: decimal("A decimal in currency: the contract is then a proposal"),
346
- currency
347
- }, { required: ["name", "kind"] }),
348
- roles: {
349
- project: { targets: ["project"], column: "project_id" },
350
- deal: { targets: ["deal"], column: "deal_id" },
351
- party: { targets: PARTY, many: true, relationship: "related-to", kept: true },
352
- document: { targets: ["document"], many: true, kept: true }
353
- }
354
- },
355
- subscription: {
356
- table: "subscriptions",
357
- review: "proposal",
358
- update: "re-propose",
359
- tombstone: true,
360
- fields: objectOf({
361
- name: text("Its name; the product's when left out", 200),
362
- direction: enumOf(INVOICE_DIRECTIONS, "receivable: the owner bills it; payable: the owner pays it"),
363
- status: enumOf(SUBSCRIPTION_STATUSES),
364
- interval: { type: "string", pattern: "^[1-9][0-9]{0,2}-(day|week|month|year)$", description: "1-month" },
365
- start_date: day("The first day"),
366
- trial_end_date: day("The trial's last day"),
367
- next_renewal_date: day("The next renewal"),
368
- cancelled_date: day("The day it was cancelled"),
369
- end_date: day("The last day"),
370
- prices: arrayOf(objectOf({
371
- amount: decimal("A decimal in currency"),
372
- currency,
373
- effective_from: day("The day the price starts; the subscription's start when left out")
374
- }, { required: ["amount", "currency"] }), 100, "Its prices, each from a day; a price is never overwritten")
375
- }, { required: ["direction", "interval", "start_date"] }),
376
- roles: {
377
- supplier: { targets: PARTY, column: "supplier", pair: true },
378
- customer: { targets: PARTY, column: "customer", pair: true },
379
- product: { targets: ["product"], column: "catalog_item_id" },
380
- contract: { targets: ["contract"], column: "contract_id" },
381
- project: { targets: ["project"], column: "project_id" }
382
- },
383
- nested: { prices: { table: "subscription_prices", parent: "subscription_id" } }
384
- },
385
- wallet: {
386
- table: "financial_accounts",
387
- review: "direct",
388
- update: "in-place",
389
- tombstone: true,
390
- fields: objectOf({
391
- name: text("The account's name", 200),
392
- kind: enumOf(WALLET_KINDS, "bank when left out"),
393
- currency,
394
- institution: text("The bank, as text", 200),
395
- number_hint: text("The last 4 characters of its number; a whole IBAN or card number is refused", 4),
396
- opening_balance: signedDecimal("Kept in the record only: the owner sets the wallet's opening balance"),
397
- opening_date: day("The day of that balance")
398
- }, { required: ["name", "currency"] }),
399
- roles: { holder: { targets: PARTY, column: "holder", pair: true } }
400
- },
401
- transaction: {
402
- table: "financial_transactions",
403
- review: "proposal",
404
- update: "re-propose",
405
- tombstone: true,
406
- fields: objectOf({
407
- direction: enumOf(MONEY_DIRECTIONS),
408
- amount: decimal("A decimal above 0 in the wallet's currency"),
409
- currency,
410
- status: enumOf(TRANSACTION_STATUSES, "booked when left out"),
411
- date: day("The day the statement shows"),
412
- booked_date: day("The day it was booked; the statement day when left out"),
413
- description: text("As the statement says it", 2e3),
414
- counterparty_name: text("As the statement names the other side", 200),
415
- reference: text("The statement's reference", 200),
416
- splits: arrayOf(objectOf({
417
- amount: decimal("A decimal above 0"),
418
- category: text("Free text, such as rent", 200),
419
- note: text("A note", 2e3)
420
- }, { required: ["amount", "category"] }), 100, "Categories of its amount; what they leave is uncategorized")
421
- }, { required: ["direction", "amount", "date"] }),
422
- roles: {
423
- wallet: { targets: ["wallet"], required: true, column: "financial_account_id" },
424
- counterparty: { targets: PARTY, column: "counterparty", pair: true },
425
- payment: { targets: ["payment"], column: "payment_id" },
426
- project: { targets: ["project"], column: "project_id" }
427
- },
428
- nested: { splits: { table: "transaction_splits", parent: "transaction_id" } }
429
- },
430
- deal: {
431
- table: "deals",
432
- review: "direct",
433
- update: "in-place",
434
- tombstone: true,
435
- fields: dealFields("deal"),
436
- references: { pipeline: "pipeline" },
437
- roles: {
438
- organization: { targets: ORGANIZATION, column: "organization_id" },
439
- person: { targets: ["person"], many: true, relationship: "related-to", kept: true },
440
- project: { targets: ["project"], column: "project_id" }
441
- }
442
- },
443
- lead: {
444
- table: "leads",
445
- review: "direct",
446
- update: "in-place",
447
- tombstone: true,
448
- fields: dealFields("lead"),
449
- references: { pipeline: "pipeline" },
450
- roles: {
451
- organization: { targets: ORGANIZATION, column: "organization_id" },
452
- person: { targets: ["person"], many: true, relationship: "related-to", kept: true },
453
- project: { targets: ["project"], column: "project_id" },
454
- deal: { targets: ["deal"], column: "deal_id" }
455
- }
456
- },
457
- message: {
458
- table: "messages",
459
- review: "direct",
460
- update: "in-place",
461
- tombstone: true,
462
- importOnly: true,
463
- sheet: false,
464
- fields: objectOf({
465
- kind: enumOf(["sms"], "sms: a text message of the phone"),
466
- direction: enumOf(SMS_DIRECTIONS, "in: the other side wrote it; out: the owner did"),
467
- ...phoneFields,
468
- thread: text("The phone's thread id; the number when left out", 512),
469
- body: { type: "string", maxLength: 2e4, description: "The text" },
470
- sent_at: instant("When it was sent"),
471
- read: { type: "boolean", description: "An incoming message the owner opened" }
472
- }, { required: ["kind", "direction", "phone", "body", "sent_at"] }),
473
- roles: COUNTERPART
474
- },
475
- event: {
476
- table: "events",
477
- review: "direct",
478
- update: "in-place",
479
- tombstone: true,
480
- importOnly: true,
481
- sheet: false,
482
- fields: objectOf({
483
- kind: enumOf(["call"], "call: a phone call"),
484
- direction: enumOf(CALL_DIRECTIONS, "in, out, or missed: a call the owner did not take"),
485
- ...phoneFields,
486
- started_at: instant("When it rang"),
487
- duration: { type: "integer", minimum: 0, maximum: 604800, description: "Seconds talked; 0 when missed" }
488
- }, { required: ["kind", "direction", "phone", "started_at"] }),
489
- roles: COUNTERPART
490
- },
491
- document: {
492
- table: "documents",
493
- review: "direct",
494
- update: "in-place",
495
- tombstone: true,
496
- importOnly: true,
497
- fieldsBytes: 1048576,
498
- fields: objectOf({
499
- title: text("What the document is called; its external id when left out", 500),
500
- text: { type: "string", maxLength: 1e6, description: "The text search reads" },
501
- created_at: instant("When the source made it"),
502
- updated_at: instant("When the source last changed it: what date: reads"),
503
- url: text("Where the original is", 4096),
504
- metadata: { type: "object", description: "Anything else the source knows about it, kept as sent" }
505
- }, { required: ["text"] }),
506
- roles: {
507
- about: { targets: ["person", "organization", "deal", "event"], many: true }
508
- }
509
- },
510
- pipeline: {
511
- table: "pipelines",
512
- review: "direct",
513
- update: "in-place",
514
- tombstone: false,
515
- fields: objectOf({
516
- kind: enumOf(DEAL_KINDS, "deal when left out"),
517
- name: text("The pipeline's name", 80),
518
- stages: arrayOf(objectOf({
519
- external_id: text("The stage's id at the source", 512),
520
- name: text("The stage's name", 80),
521
- position: { type: "integer", minimum: 0, maximum: 1e3 },
522
- outcome: enumOf(DEAL_STATUSES, "open when left out")
523
- }, { required: ["external_id", "name"] }), 30, "The stages in order")
524
- }, { required: ["name", "stages"] }),
525
- roles: {},
526
- nested: { stages: { table: "pipeline_stages", parent: "pipeline_id" } }
527
- }
528
- };
529
- var isRecordType = /* @__PURE__ */ __name((type) => Object.hasOwn(RECORD_TYPES, type), "isRecordType");
530
- var isBusinessType = /* @__PURE__ */ __name((type) => isRecordType(type) && RECORD_TYPES[type].review !== "identity" && type !== "document", "isBusinessType");
531
- var isIdentityType = /* @__PURE__ */ __name((type) => typeof type === "string" && isRecordType(type) && RECORD_TYPES[type].review === "identity", "isIdentityType");
532
- var RECORD_ENTITY_TYPES = Object.keys(RECORD_TYPES);
533
- var RECORD_TABLES = Object.fromEntries(Object.entries(RECORD_TYPES).map(([type, spec]) => [type, spec.table]));
534
- var decidedOf = /* @__PURE__ */ __name((types) => Object.fromEntries(Object.entries(types).flatMap(([type, spec]) => spec.review === "proposal" || spec.review === "valued-proposal" ? [[type, spec.table]] : [])), "decidedOf");
535
- var DECIDED_TABLES = {
536
- ...decidedOf(RECORD_TYPES),
537
- subscription_price: "subscription_prices"
538
- };
539
- var WORD_BODY = "[a-z0-9][a-z0-9_-]{0,62}";
540
- var TYPE_PATTERN = `^(${RECORD_ENTITY_TYPES.join("|")}|custom:${WORD_BODY})$`;
541
- var TYPE_RULE = `a type is one of ${RECORD_ENTITY_TYPES.join(", ")} or custom:<name>`;
542
- var rolesOf = /* @__PURE__ */ __name((type) => Object.entries(RECORD_TYPES[type].roles), "rolesOf");
543
- var roleOf = /* @__PURE__ */ __name((type, role) => {
544
- if (!isRecordType(type))
545
- return void 0;
546
- const roles = RECORD_TYPES[type].roles;
547
- return Object.hasOwn(roles, role) ? roles[role] : void 0;
548
- }, "roleOf");
549
- var nestedOf = /* @__PURE__ */ __name((type) => Object.entries(RECORD_TYPES[type].nested ?? {}), "nestedOf");
550
- var referencesOf = /* @__PURE__ */ __name((type) => Object.entries(RECORD_TYPES[type].references ?? {}), "referencesOf");
551
- var roleNames = /* @__PURE__ */ __name((types, keep) => [
552
- ...new Set(types.flatMap((type) => rolesOf(type).flatMap(([name, role]) => keep(role) ? [name] : [])))
553
- ], "roleNames");
554
- var AMOUNT_ROLES = roleNames(RECORD_ENTITY_TYPES, (role) => role.amount);
555
- var FIELD_REFERENCE_ROLES = roleNames(RECORD_ENTITY_TYPES, (role) => role.v1 && !role.many);
556
- var hasV1Roles = /* @__PURE__ */ __name((type) => rolesOf(type).some(([, role]) => role.v1), "hasV1Roles");
557
- var IDENTITY_TYPES = RECORD_ENTITY_TYPES.filter((type) => RECORD_TYPES[type].review === "identity");
558
- var article = /* @__PURE__ */ __name((word) => /^[aeiou]/.test(word) ? "an" : "a", "article");
559
-
560
- // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/phone-plans.generated.js
561
- var PHONE_PLANS = [
562
- {
563
- country: "us",
564
- code: "1",
565
- trunk: "1",
566
- lengths: [10],
567
- valid: "[2-9]\\d{9}|3\\d{6}",
568
- mobile: null
569
- },
570
- {
571
- country: "ca",
572
- code: "1",
573
- trunk: "1",
574
- lengths: [7, 10],
575
- valid: "[2-9]\\d{9}|3\\d{6}",
576
- mobile: null
577
- },
578
- {
579
- country: "gb",
580
- code: "44",
581
- trunk: "0|180020",
582
- lengths: [7, 9, 10],
583
- valid: "[1-357-9]\\d{9}|[18]\\d{8}|8\\d{6}",
584
- mobile: "7(?:457[0-57-9]|700[01]|911[028])\\d{5}|7(?:[1-3]\\d\\d|4(?:[0-46-9]\\d|5[0-689])|5(?:0[0-8]|[13-9]\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\d|8[02-9]|9[0-689])|8(?:[014-9]\\d|[23][0-8])|9(?:[024-9]\\d|1[02-9]|3[0-689]))\\d{6}"
585
- },
586
- {
587
- country: "ie",
588
- code: "353",
589
- trunk: "0",
590
- lengths: [7, 8, 9, 10],
591
- valid: "(?:1\\d|[2569])\\d{6,8}|4\\d{6,9}|7\\d{8}|8\\d{8,9}",
592
- mobile: "8(?:22|[35-9]\\d)\\d{6}"
593
- },
594
- {
595
- country: "es",
596
- code: "34",
597
- trunk: "",
598
- lengths: [9],
599
- valid: "(?:400|[5-9]\\d\\d)\\d{6}",
600
- mobile: "96906(?:09|10)\\d\\d|(?:590(?:10[0-2]|600)|97390\\d)\\d{3}|(?:6\\d|7[1-48])\\d{7}"
601
- },
602
- {
603
- country: "pt",
604
- code: "351",
605
- trunk: "",
606
- lengths: [9],
607
- valid: "1693\\d{5}|(?:[26-9]\\d|30)\\d{7}",
608
- mobile: "6(?:[06]92(?:30|9\\d)|[35]92(?:[049]\\d|3[034]))\\d{3}|(?:(?:16|6[0356])93|9(?:[1-36]\\d\\d|480))\\d{5}"
609
- },
610
- {
611
- country: "fr",
612
- code: "33",
613
- trunk: "0",
614
- lengths: [9],
615
- valid: "[1-9]\\d{8}",
616
- mobile: "(?:6(?:[0-24-8]\\d|3[0-8]|9[589])|7[3-9]\\d)\\d{6}"
617
- },
618
- {
619
- country: "be",
620
- code: "32",
621
- trunk: "0",
622
- lengths: [8, 9],
623
- valid: "4\\d{8}|[1-9]\\d{7}",
624
- mobile: "4[5-9]\\d{7}"
625
- },
626
- {
627
- country: "nl",
628
- code: "31",
629
- trunk: "0",
630
- lengths: [5, 6, 7, 8, 9, 10, 11],
631
- valid: "(?:[124-7]\\d\\d|3(?:[02-9]\\d|1[0-8]))\\d{6}|8\\d{6,9}|9\\d{6,10}|1\\d{4,5}",
632
- mobile: "(?:6[1-58]|970\\d)\\d{7}"
633
- },
634
- {
635
- country: "lu",
636
- code: "352",
637
- trunk: "",
638
- lengths: [4, 5, 6, 7, 8, 9, 10, 11],
639
- valid: "35[013-9]\\d{4,8}|6\\d{8}|35\\d{2,4}|(?:[2457-9]\\d|3[0-46-9])\\d{2,9}",
640
- mobile: "6(?:[26][18]|5[1568]|7[189]|81|9[128])\\d{6}"
641
- },
642
- {
643
- country: "de",
644
- code: "49",
645
- trunk: "0",
646
- lengths: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
647
- valid: "[2579]\\d{5,14}|49(?:[34]0|69|8\\d)\\d\\d?|49(?:37|49|60|7[089]|9\\d)\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\d{1,8}|(?:1|[368]\\d|4[0-8])\\d{3,13}|49(?:[015]\\d|2[13]|31|[46][1-8])\\d{1,9}",
648
- mobile: "1(?:6[023]|7\\d)\\d{7,8}|15(?:[0-25-9]\\d\\d|3(?:10|33))\\d{6}"
649
- },
650
- {
651
- country: "at",
652
- code: "43",
653
- trunk: "0",
654
- lengths: [4, 5, 6, 7, 8, 9, 10, 11, 12, 13],
655
- valid: "1\\d{3,12}|2\\d{6,12}|43(?:(?:0\\d|5[02-9])\\d{3,9}|2\\d{4,5}|[3467]\\d{4}|8\\d{4,6}|9\\d{4,7})|5\\d{4,12}|8\\d{7,12}|9\\d{8,12}|(?:[367]\\d|4[0-24-9])\\d{4,11}",
656
- mobile: "6(?:485|(?:5[0-3579]|6[013-9]|[7-9]\\d)\\d)\\d{3,9}"
657
- },
658
- {
659
- country: "ch",
660
- code: "41",
661
- trunk: "0",
662
- lengths: [9, 12],
663
- valid: "8\\d{11}|[2-9]\\d{8}",
664
- mobile: "(?:6[89]|7[235-9])\\d{7}"
665
- },
666
- {
667
- country: "li",
668
- code: "423",
669
- trunk: "0",
670
- lengths: [7, 9],
671
- valid: "[68]\\d{8}|(?:[2378]\\d|90)\\d{5}",
672
- mobile: "(?:6(?:(?:4[5-9]|5\\d)\\d|6(?:[024-68]\\d|1[01]|3[7-9]|7[02]))\\d|7(?:[37-9]\\d|42|56))\\d{4}"
673
- },
674
- {
675
- country: "it",
676
- code: "39",
677
- trunk: "",
678
- lengths: [6, 7, 8, 9, 10, 11, 12],
679
- valid: "0\\d{5,11}|1\\d{8,10}|3(?:[0-8]\\d{7,10}|9\\d{7,8})|(?:43|55|70)\\d{8}|8\\d{5}(?:\\d{2,4})?",
680
- mobile: "3[2-9]\\d{7,8}|(?:31|43)\\d{8}"
681
- },
682
- {
683
- country: "mt",
684
- code: "356",
685
- trunk: "",
686
- lengths: [8],
687
- valid: "3550\\d{4}|(?:[2579]\\d\\d|800)\\d{5}",
688
- mobile: "(?:7(?:210|[79]\\d\\d)|9(?:[29]\\d\\d|69[67]|8(?:1[1-3]|89|97)))\\d{4}"
689
- },
690
- {
691
- country: "si",
692
- code: "386",
693
- trunk: "0",
694
- lengths: [5, 6, 7, 8],
695
- valid: "[1-7]\\d{7}|8\\d{4,7}|90\\d{4,6}",
696
- mobile: "65(?:[178]\\d|5[56]|6[01])\\d{4}|(?:[37][01]|4[013]|51|6[489])\\d{6}"
697
- },
698
- {
699
- country: "hr",
700
- code: "385",
701
- trunk: "0",
702
- lengths: [7, 8, 9],
703
- valid: "[2-69]\\d{8}|80\\d{5,7}|[1-79]\\d{7}|6\\d{6}",
704
- mobile: "9(?:(?:0[1-9]|[12589]\\d)\\d\\d|7(?:[0679]\\d\\d|5(?:[01]\\d|44|55|77|9[5-79])))\\d{4}|98\\d{6}"
705
- },
706
- {
707
- country: "ba",
708
- code: "387",
709
- trunk: "0",
710
- lengths: [8, 9],
711
- valid: "6\\d{8}|(?:[35689]\\d|49|70)\\d{6}",
712
- mobile: "6040\\d{5}|6(?:03|[1-356]|44|7\\d)\\d{6}"
713
- },
714
- {
715
- country: "rs",
716
- code: "381",
717
- trunk: "0",
718
- lengths: [6, 7, 8, 9, 10, 11, 12],
719
- valid: "38[02-9]\\d{6,9}|6\\d{7,9}|90\\d{4,8}|38\\d{5,6}|(?:7\\d\\d|800)\\d{3,9}|(?:[12]\\d|3[0-79])\\d{5,10}",
720
- mobile: "6(?:[0-689]|7\\d)\\d{6,7}"
721
- },
722
- {
723
- country: "me",
724
- code: "382",
725
- trunk: "0",
726
- lengths: [8, 9],
727
- valid: "(?:20|[3-79]\\d)\\d{6}|80\\d{6,7}",
728
- mobile: "6(?:[07-9]\\d|3[024]|6[0-25])\\d{5}"
729
- },
730
- {
731
- country: "mk",
732
- code: "389",
733
- trunk: "0",
734
- lengths: [8],
735
- valid: "[2-578]\\d{7}",
736
- mobile: "7(?:3555|(?:474|9[019]7)7)\\d{3}|7(?:[0-25-8]\\d\\d|3(?:[1-478]\\d|6[01])|4(?:2\\d|60|7[01578])|9(?:[2-4]\\d|5[01]|7[015]))\\d{4}"
737
- },
738
- {
739
- country: "al",
740
- code: "355",
741
- trunk: "0",
742
- lengths: [6, 7, 8, 9],
743
- valid: "(?:700\\d\\d|900)\\d{3}|8\\d{5,7}|(?:[2-5]|6\\d)\\d{7}",
744
- mobile: "6(?:[78][2-9]|9\\d)\\d{6}"
745
- },
746
- {
747
- country: "gr",
748
- code: "30",
749
- trunk: "",
750
- lengths: [10, 11, 12],
751
- valid: "5005000\\d{3}|8\\d{9,11}|(?:[269]\\d|70)\\d{8}",
752
- mobile: "68[57-9]\\d{7}|(?:69|94)\\d{8}"
753
- },
754
- {
755
- country: "cy",
756
- code: "357",
757
- trunk: "",
758
- lengths: [8],
759
- valid: "(?:[279]\\d|[58]0)\\d{6}",
760
- mobile: "9(?:10|[4-79]\\d)\\d{5}"
761
- },
762
- {
763
- country: "bg",
764
- code: "359",
765
- trunk: "0",
766
- lengths: [6, 7, 8, 9, 12],
767
- valid: "00800\\d{7}|[2-7]\\d{6,7}|[89]\\d{6,8}|2\\d{5}",
768
- mobile: "(?:43[07-9]|99[69]\\d)\\d{5}|(?:8[7-9]|98)\\d{7}"
769
- },
770
- {
771
- country: "ro",
772
- code: "40",
773
- trunk: "0",
774
- lengths: [6, 9],
775
- valid: "(?:[236-8]\\d|90)\\d{7}|[23]\\d{5}",
776
- mobile: "(?:630|702)0\\d{5}|(?:6(?:00|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}"
777
- },
778
- {
779
- country: "md",
780
- code: "373",
781
- trunk: "0",
782
- lengths: [8],
783
- valid: "(?:[235-7]\\d|[89]0)\\d{6}",
784
- mobile: "562\\d{5}|(?:6\\d|7[16-9])\\d{6}"
785
- },
786
- {
787
- country: "hu",
788
- code: "36",
789
- trunk: "06",
790
- lengths: [8, 9],
791
- valid: "[235-7]\\d{8}|[1-9]\\d{7}",
792
- mobile: "(?:[257]0|3[01])\\d{7}"
793
- },
794
- {
795
- country: "sk",
796
- code: "421",
797
- trunk: "0",
798
- lengths: [6, 7, 9],
799
- valid: "[2-689]\\d{8}|[2-59]\\d{6}|[2-5]\\d{5}",
800
- mobile: "909[1-9]\\d{5}|9(?:0[1-8]|1[0-24-9]|4[03-57-9]|5\\d)\\d{6}"
801
- },
802
- {
803
- country: "cz",
804
- code: "420",
805
- trunk: "",
806
- lengths: [9, 10, 11, 12],
807
- valid: "(?:[2-578]\\d|60)\\d{7}|9\\d{8,11}",
808
- mobile: "7060\\d{5}|(?:60[1-8]|7(?:0[2-5]|19|[2379]\\d))\\d{6}"
809
- },
810
- {
811
- country: "pl",
812
- code: "48",
813
- trunk: "",
814
- lengths: [6, 7, 8, 9, 10],
815
- valid: "(?:6|8\\d\\d)\\d{7}|[1-9]\\d{6}(?:\\d{2})?|[26]\\d{5}",
816
- mobile: "21(?:1[013-5]|2\\d|3[1-9])\\d{5}|(?:45|5[0137]|6[069]|7[2389]|88)\\d{7}"
817
- },
818
- {
819
- country: "lt",
820
- code: "370",
821
- trunk: "[08]",
822
- lengths: [8],
823
- valid: "(?:[3469]\\d|52|[78]0)\\d{6}",
824
- mobile: "6\\d{7}"
825
- },
826
- {
827
- country: "lv",
828
- code: "371",
829
- trunk: "",
830
- lengths: [8],
831
- valid: "(?:[268]\\d|78|90)\\d{6}",
832
- mobile: "2333[0-8]\\d{3}|2(?:[0-24-9]\\d\\d|3(?:0[07]|[14-9]\\d|2[02-9]|3[0-24-9]))\\d{4}"
833
- },
834
- {
835
- country: "ee",
836
- code: "372",
837
- trunk: "",
838
- lengths: [7, 8, 10],
839
- valid: "8\\d{9}|[4578]\\d{7}|(?:[3-8]\\d|90)\\d{5}",
840
- mobile: "(?:5\\d{5}|8(?:1(?:0(?:0(?:00|[178]\\d)|[3-9]\\d\\d)|(?:1(?:0[2-6]|1\\d)|[2-79]\\d\\d)\\d)|2(?:0(?:0(?:00|4\\d)|[1-7]\\d\\d)|(?:(?:[124-69]\\d|3[5-9])\\d|7(?:[0-79]\\d|8[013-9])|8(?:[2-6]\\d|7[01]))\\d)|[349]\\d{4}))\\d\\d|5(?:(?:[02]\\d|5[0-478])\\d|1(?:[0-8]\\d|95)|6(?:4[0-4]|5[1-589]))\\d{3}"
841
- },
842
- {
843
- country: "fi",
844
- code: "358",
845
- trunk: "0",
846
- lengths: [5, 6, 7, 8, 9, 10, 11, 12],
847
- valid: "[1-35689]\\d{4}|7\\d{10,11}|(?:[124-7]\\d|3[0-46-9])\\d{8}|[1-9]\\d{5,8}",
848
- mobile: "4946\\d{2,6}|(?:4[0-8]|50)\\d{4,8}"
849
- },
850
- {
851
- country: "se",
852
- code: "46",
853
- trunk: "0",
854
- lengths: [6, 7, 8, 9, 10, 12],
855
- valid: "(?:[26]\\d\\d|9)\\d{9}|[1-9]\\d{8}|[1-689]\\d{7}|[1-4689]\\d{6}|2\\d{5}",
856
- mobile: "7[023689]\\d{7}"
857
- },
858
- {
859
- country: "no",
860
- code: "47",
861
- trunk: "",
862
- lengths: [5, 8],
863
- valid: "(?:0|[2-9]\\d{3})\\d{4}",
864
- mobile: "45(?:[0-24-9]\\d|3[0-57-9])\\d{4}|(?:4[016-8]|9\\d)\\d{6}"
865
- },
866
- {
867
- country: "dk",
868
- code: "45",
869
- trunk: "",
870
- lengths: [8],
871
- valid: "[2-9]\\d{7}",
872
- mobile: "(?:2[6-8]|37|6[78]|96)\\d{6}|(?:2[0-59]|3[0-689]|[457]\\d|6[0-69]|8[126-9]|9[1-47-9])[1-9]\\d{5}"
873
- },
874
- {
875
- country: "is",
876
- code: "354",
877
- trunk: "",
878
- lengths: [7, 9],
879
- valid: "(?:38\\d|[4-9])\\d{6}",
880
- mobile: "(?:38[589]\\d\\d|6(?:1[1-8]|2[0-6]|3[026-9]|4[014679]|5[0159]|6[0-69]|70|8[06-8]|9\\d)|7(?:5[057]|[6-9]\\d)|8(?:2[0-59]|[3-69]\\d|8[238]))\\d{4}"
881
- },
882
- {
883
- country: "ua",
884
- code: "380",
885
- trunk: "0",
886
- lengths: [9, 10],
887
- valid: "[89]\\d{9}|[3-9]\\d{8}",
888
- mobile: "790\\d{6}|(?:39|50|6[36-8]|7[1-357]|9[1-9])\\d{7}"
889
- },
890
- {
891
- country: "by",
892
- code: "375",
893
- trunk: "0|80?",
894
- lengths: [6, 7, 8, 9, 10, 11],
895
- valid: "(?:[12]\\d|33|44|902)\\d{7}|8(?:0[0-79]\\d{5,7}|[1-7]\\d{9})|8(?:1[0-489]|[5-79]\\d)\\d{7}|8[1-79]\\d{6,7}|8[0-79]\\d{5}|8\\d{5}",
896
- mobile: "(?:2(?:5[5-79]|9[1-9])|(?:33|44)\\d)\\d{6}"
897
- },
898
- {
899
- country: "ru",
900
- code: "7",
901
- trunk: "8",
902
- lengths: [10, 14],
903
- valid: "8\\d{13}|[347-9]\\d{9}",
904
- mobile: "9\\d{9}"
905
- },
906
- {
907
- country: "kz",
908
- code: "7",
909
- trunk: "8",
910
- lengths: [10, 14],
911
- valid: "8\\d{13}|[78]\\d{9}",
912
- mobile: "7(?:0[0-25-8]|47|6[0-4]|7[15-8]|85)\\d{7}"
913
- },
914
- {
915
- country: "ge",
916
- code: "995",
917
- trunk: "0",
918
- lengths: [9],
919
- valid: "(?:[3-57]\\d\\d|800)\\d{6}",
920
- mobile: "5(?:(?:(?:0555|1(?:[17]77|555))[5-9]|757(?:7[7-9]|8[01]))\\d|22252[0-4])\\d\\d|5(?:0(?:0(?:1[09]|70)|505)|1(?:0[01]0|1(?:07|33|51))|2(?:0[02]0|2[25]2)|3(?:0[03]0|3[35]3)|4(?:0[04]0|411)|5222|9000)[0-4]\\d{3}|(?:5(?:0(?:0(?:0\\d|1[12]|2[02]|3[0-6]|4[04]|5[05]|77|88|9[09])|(?:[14]\\d|77)\\d|22[02])|1(?:1(?:[03][01]|[124]\\d|5[02-6]|7[0-6])|4\\d\\d)|2(?:228|555)|3555|4(?:4(?:[02-9]\\d|14)|555)|5(?:[0157-9]\\d\\d|200|333|4(?:44|55))|6[89]\\d\\d|7(?:(?:[0147-9]\\d|22)\\d|5(?:00|[57]5))|8(?:0(?:[018]\\d|2[0-4])|5(?:55|8[89])|8(?:55|88))|9(?:090|[1-35-9]\\d\\d))|790\\d\\d)\\d{4}"
921
- },
922
- {
923
- country: "am",
924
- code: "374",
925
- trunk: "0",
926
- lengths: [8],
927
- valid: "(?:[1-489]\\d|55|60|77)\\d{6}",
928
- mobile: "(?:33|4[1349]|55|77|88|9[13-9])\\d{6}"
929
- },
930
- {
931
- country: "tr",
932
- code: "90",
933
- trunk: "0",
934
- lengths: [7, 10, 12, 13],
935
- valid: "4\\d{6}|8\\d{11,12}|(?:[2-58]\\d\\d|900)\\d{7}",
936
- mobile: "5(?:61(?:011|61\\d)|82[2-5]\\d\\d)\\d{4}|5(?:[03-5]\\d|1[06]|24|6[24]|7[245]|9[46])\\d{7}"
937
- }
938
- ];
939
-
940
- // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/phones.js
941
- var PHONE_COUNTRIES = PHONE_PLANS.map((plan) => plan.country);
942
- var DEFAULT_PHONE_COUNTRIES = ["ru"];
943
- var parsePhoneCountries = /* @__PURE__ */ __name((value) => {
944
- const countries = value.split(/[\s,]+/).map((one) => one.trim().toLowerCase()).filter(Boolean);
945
- const unknown = countries.filter((one) => !PHONE_COUNTRIES.includes(one));
946
- if (countries.length === 0 || unknown.length > 0)
947
- throw new CliError("validation_error", `phone_countries takes country codes, ${unknown.length > 0 ? `not ${unknown.join(", ")}` : "at least one"}: ` + PHONE_COUNTRIES.join(", "));
948
- return [...new Set(countries)];
949
- }, "parsePhoneCountries");
950
- var PLANS = new Map(PHONE_PLANS.map((plan) => [
951
- plan.country,
952
- {
953
- code: plan.code,
954
- trunk: plan.trunk ? new RegExp(`^(?:${plan.trunk})`) : null,
955
- lengths: new Set(plan.lengths),
956
- valid: new RegExp(`^(?:${plan.valid})$`),
957
- mobile: plan.mobile === null ? null : new RegExp(`^(?:${plan.mobile})$`)
958
- }
959
- ]));
960
- var nationalPhone = /* @__PURE__ */ __name((digits, countries, { anyType }) => {
961
- for (const country of countries) {
962
- const plan = PLANS.get(country);
963
- if (!plan)
964
- continue;
965
- const readings = [
966
- ...plan.trunk?.test(digits) ? [digits.replace(plan.trunk, "")] : [],
967
- digits,
968
- ...digits.startsWith(plan.code) ? [digits.slice(plan.code.length)] : []
969
- ];
970
- for (const national of readings) {
971
- if (!plan.lengths.has(national.length) || !plan.valid.test(national))
972
- continue;
973
- const mobile = plan.mobile?.test(national) ?? false;
974
- if (anyType || mobile)
975
- return { value: `+${plan.code}${national}`, national, mobile };
976
- }
977
- }
978
- return void 0;
979
- }, "nationalPhone");
980
- var typedPhone = /* @__PURE__ */ __name((typed, { phoneCountries = DEFAULT_PHONE_COUNTRIES } = {}) => {
981
- const text2 = typed.trim();
982
- if (!/^\+?[\d\s().\-–]+$/.test(text2))
983
- return void 0;
984
- const digits = text2.replace(/\(0\)/, "").replace(/\D/g, "").replace(/^00/, "");
985
- if (digits.length < 7 || digits.length > 15)
986
- return void 0;
987
- const national = nationalPhone(digits, phoneCountries, { anyType: true });
988
- const tail = national?.national ?? digits.replace(/^0+/, "");
989
- return {
990
- value: text2.startsWith("+") || /^00/.test(text2) ? `+${digits}` : national?.value ?? digits,
991
- national: tail.length >= 8 ? tail : null
992
- };
993
- }, "typedPhone");
994
- var e164Of = /* @__PURE__ */ __name((phone, region) => {
995
- if (/^\s*(\+|00)/.test(phone))
996
- return typedPhone(phone)?.value;
997
- if (typedPhone(phone) === void 0)
998
- return void 0;
999
- if (region === void 0)
1000
- return null;
1001
- const digits = phone.replace(/\(0\)/, "").replace(/\D/g, "");
1002
- return nationalPhone(digits, [region], { anyType: true })?.value;
1003
- }, "e164Of");
1004
- var isMobilePhone = /* @__PURE__ */ __name((e164) => /^\+\d+$/.test(e164) && PHONE_COUNTRIES.some((country) => nationalPhone(e164.slice(1), [country], { anyType: false })?.value === e164), "isMobilePhone");
1005
- var BARE_INTERNATIONAL_PROVIDERS = ["telegram", "max", "whatsapp"];
1006
- var storedPhone = /* @__PURE__ */ __name((raw, provider) => {
1007
- if (/^\s*(\+|00)/.test(raw))
1008
- return typedPhone(raw)?.value;
1009
- if (!BARE_INTERNATIONAL_PROVIDERS.includes(provider))
1010
- return void 0;
1011
- const found = /^([1-9]\d{6,14})$/.exec(raw.trim());
1012
- return found ? `+${found[1]}` : void 0;
1013
- }, "storedPhone");
1014
-
1015
- // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
1016
- var TAKES = {
1017
- chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
1018
- message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
1019
- };
1020
- var article2 = /* @__PURE__ */ __name((word) => /^[aeiou]/.test(word) ? "an" : "a", "article");
1021
- var wrongKind = /* @__PURE__ */ __name((text2, kind, takes) => new CliError("validation_error", `${text2} names ${article2(kind)} ${kind}; this takes ${TAKES[takes]}`, {
1022
- reason: "ref.wrong-kind"
1023
- }), "wrongKind");
1024
- var wrongProvider = /* @__PURE__ */ __name((text2, provider, kind) => {
1025
- const entry = providerNamed(provider);
1026
- const command = entry?.command;
1027
- const opens = kind === "entity" ? void 0 : entry?.opens?.[kind];
1028
- const how = command && opens ? `open it with ${command} <profile> ${opens} ${text2}` : "open it with its own CLI";
1029
- const label2 = providerLabel(provider);
1030
- return new CliError("validation_error", `${text2} is ${article2(label2.toLowerCase())} ${label2} ${kind}; ${how}`, {
1031
- reason: "ref.wrong-provider"
1032
- });
1033
- }, "wrongProvider");
1034
- var chatReferenceOf = /* @__PURE__ */ __name((text2, provider, takes = "chat") => {
1035
- const trimmed = text2.trim();
1036
- if (!looksLikeReference(trimmed))
1037
- return void 0;
1038
- const reference = parseReference(trimmed);
1039
- if (reference.type !== "chat" && reference.type !== "message")
1040
- throw wrongKind(trimmed, reference.type, takes);
1041
- if (reference.provider !== provider)
1042
- throw wrongProvider(trimmed, reference.provider, reference.type);
1043
- const found = {
1044
- text: trimmed,
1045
- provider: reference.provider,
1046
- account: reference.account,
1047
- chat: reference.chat,
1048
- ...reference.type === "message" ? { message: reference.message } : {}
1049
- };
1050
- return found;
1051
- }, "chatReferenceOf");
1052
- var contactReferenceOf = /* @__PURE__ */ __name((text2, provider) => {
1053
- const trimmed = text2.trim();
1054
- if (!trimmed.startsWith("contact:"))
1055
- return void 0;
1056
- const reference = parseReference(trimmed);
1057
- if (reference.type !== "contact")
1058
- return void 0;
1059
- if (provider !== void 0 && reference.provider !== provider)
1060
- throw wrongProvider(trimmed, reference.provider, reference.type);
1061
- return reference.id;
1062
- }, "contactReferenceOf");
1063
- var wrongAccount = /* @__PURE__ */ __name((reference, scope, profiles) => {
1064
- const here = scope.account === void 0 ? "the account of this profile is not known yet" : `${scope.profile === void 0 ? "this profile" : `profile ${scope.profile}`} is account ${scope.account}`;
1065
- const others = profiles === void 0 ? "" : `. Profiles signed in to ${reference.account}: ${profiles.length > 0 ? profiles.join(", ") : "none here"}`;
1066
- return new CliError("validation_error", `${reference.text} belongs to account ${reference.account}; ${here}${others}`, { reason: "ref.wrong-account" });
1067
- }, "wrongAccount");
1068
- var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn) => {
1069
- if (scope.account !== void 0 && scope.account === reference.account)
1070
- return;
1071
- const profiles = await profilesOn?.(reference.account).catch(() => void 0);
1072
- throw wrongAccount(reference, scope, profiles);
1073
- }, "ensureAccount");
1074
-
1075
- // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/search/lucene/automaton.js
1076
- var any = { kind: "char", ranges: [[0, 1114111]], negate: false };
1077
- var literal = /* @__PURE__ */ __name((c) => ({
1078
- kind: "char",
1079
- ranges: [[c.codePointAt(0) ?? 0, c.codePointAt(0) ?? 0]],
1080
- negate: false
1081
- }), "literal");
1082
- var compileAutomaton = /* @__PURE__ */ __name((pattern, span = { start: 0, end: pattern.length }) => {
1083
- if (pattern.length > QUERY_LIMITS.pattern * 2)
1084
- exhausted("pattern");
1085
- const chars = [...pattern];
1086
- if (chars.length > QUERY_LIMITS.pattern)
1087
- exhausted("pattern");
1088
- let at = 0, depth = 0;
1089
- const failure = /* @__PURE__ */ __name(() => searchError("query.invalid-regex", span, "use the supported Lucene regex subset"), "failure");
1090
- const character = /* @__PURE__ */ __name(() => {
1091
- if (at >= chars.length)
1092
- return failure();
1093
- return chars[at++];
1094
- }, "character");
1095
- const predefined = /* @__PURE__ */ __name(() => {
1096
- if (chars[at] !== "\\")
1097
- return void 0;
1098
- const name = chars[at + 1] ?? "";
1099
- let ranges;
1100
- if (name.toLowerCase() === "d")
1101
- ranges = [[48, 57]];
1102
- if (name.toLowerCase() === "w")
1103
- ranges = [
1104
- [48, 57],
1105
- [65, 90],
1106
- [95, 95],
1107
- [97, 122]
1108
- ];
1109
- if (name.toLowerCase() === "s")
1110
- ranges = [
1111
- [9, 10],
1112
- [13, 13],
1113
- [32, 32]
1114
- ];
1115
- if (ranges) {
1116
- at += 2;
1117
- return { kind: "char", ranges, negate: name === name.toUpperCase() };
1118
- }
1119
- if (/^[a-zA-Z]$/u.test(name))
1120
- return failure();
1121
- return void 0;
1122
- }, "predefined");
1123
- const escaped = /* @__PURE__ */ __name(() => {
1124
- if (chars[at] === "\\")
1125
- at++;
1126
- return character();
1127
- }, "escaped");
1128
- const union = /* @__PURE__ */ __name(() => {
1129
- if (++depth > QUERY_LIMITS.depth)
1130
- exhausted("pattern depth");
1131
- const children = [concat()];
1132
- while (chars[at] === "|") {
1133
- at++;
1134
- children.push(concat());
1135
- }
1136
- depth--;
1137
- return children.length === 1 ? children[0] : { kind: "union", children };
1138
- }, "union");
1139
- const concat = /* @__PURE__ */ __name(() => {
1140
- const children = [];
1141
- do {
1142
- children.push(repeat());
1143
- } while (at < chars.length && ![")", "|", "&"].includes(chars[at] ?? ""));
1144
- if (chars[at] === "&")
1145
- searchError("query.unsupported-regex", span, "automaton intersection is not supported");
1146
- return children.length === 1 ? children[0] : { kind: "concat", children };
1147
- }, "concat");
1148
- const repeat = /* @__PURE__ */ __name(() => {
1149
- let child = simple();
1150
- while (["?", "*", "+", "{"].includes(chars[at] ?? "")) {
1151
- const op = character();
1152
- let min = op === "+" ? 1 : 0, max = op === "?" ? 1 : null;
1153
- if (op === "{") {
1154
- const number = /* @__PURE__ */ __name(() => {
1155
- const start2 = at;
1156
- while (/^[0-9]$/u.test(chars[at] ?? ""))
1157
- at++;
1158
- if (at === start2)
1159
- return failure();
1160
- return Number(chars.slice(start2, at).join(""));
1161
- }, "number");
1162
- min = number();
1163
- max = min;
1164
- if (chars[at] === ",") {
1165
- at++;
1166
- max = chars[at] === "}" ? null : number();
1167
- }
1168
- if (character() !== "}" || max !== null && max < min)
1169
- return failure();
1170
- }
1171
- if (min > QUERY_LIMITS.states || max !== null && max > QUERY_LIMITS.states)
1172
- exhausted("automaton states");
1173
- child = { kind: "repeat", child, min, max };
1174
- }
1175
- return child;
1176
- }, "repeat");
1177
- const simple = /* @__PURE__ */ __name(() => {
1178
- const predefinedAtom = predefined();
1179
- if (predefinedAtom)
1180
- return predefinedAtom;
1181
- const c = character();
1182
- if (c === "~" || c === "<")
1183
- searchError("query.unsupported-regex", span, "complement, named automata and numeric intervals are not supported");
1184
- if (c === ".")
1185
- return any;
1186
- if (c === "#")
1187
- return { kind: "empty" };
1188
- if (c === "@")
1189
- return { kind: "repeat", child: any, min: 0, max: null };
1190
- if (c === '"') {
1191
- const children = [];
1192
- while (chars[at] !== '"')
1193
- children.push(literal(character()));
1194
- at++;
1195
- return { kind: "concat", children };
1196
- }
1197
- if (c === "(") {
1198
- if (chars[at] === ")") {
1199
- at++;
1200
- return { kind: "epsilon" };
1201
- }
1202
- if (chars[at] === "?")
1203
- searchError("query.unsupported-regex", span, "JavaScript groups and lookaround are not Lucene operators");
1204
- const child = union();
1205
- if (character() !== ")")
1206
- return failure();
1207
- return child;
1208
- }
1209
- if (c === "[") {
1210
- const negate = chars[at] === "^";
1211
- if (negate)
1212
- at++;
1213
- const choices = [];
1214
- do {
1215
- const pre = predefined();
1216
- if (pre) {
1217
- choices.push(pre);
1218
- continue;
1219
- }
1220
- const lo = escaped().codePointAt(0) ?? 0;
1221
- let hi = lo;
1222
- if (chars[at] === "-") {
1223
- at++;
1224
- hi = escaped().codePointAt(0) ?? 0;
1225
- }
1226
- if (hi < lo)
1227
- return failure();
1228
- choices.push({ kind: "char", ranges: [[lo, hi]], negate: false });
1229
- } while (at < chars.length && chars[at] !== "]");
1230
- if (character() !== "]")
1231
- return failure();
1232
- if (!negate)
1233
- return { kind: "union", children: choices };
1234
- const ranges = [];
1235
- for (const choice of choices) {
1236
- if (choice.kind !== "char" || choice.negate)
1237
- searchError("query.unsupported-regex", span, "negative predefined classes inside a negated class are not supported");
1238
- ranges.push(...choice.ranges);
1239
- }
1240
- return { kind: "char", ranges, negate: true };
1241
- }
1242
- if (c === "\\")
1243
- return literal(character());
1244
- return literal(c);
1245
- }, "simple");
1246
- const expression = chars.length === 0 ? { kind: "epsilon" } : union();
1247
- if (at !== chars.length)
1248
- return failure();
1249
- const states = [];
1250
- const state = /* @__PURE__ */ __name(() => {
1251
- if (states.length >= QUERY_LIMITS.states)
1252
- exhausted("automaton states");
1253
- states.push({ epsilon: [], edges: [] });
1254
- return states.length - 1;
1255
- }, "state");
1256
- const epsilon = /* @__PURE__ */ __name((from, to) => {
1257
- ;
1258
- states[from].epsilon.push(to);
1259
- }, "epsilon");
1260
- const build = /* @__PURE__ */ __name((node, from, to) => {
1261
- if (node.kind === "char") {
1262
- ;
1263
- states[from].edges.push({ to, atom: node });
1264
- return;
1265
- }
1266
- if (node.kind === "empty")
1267
- return;
1268
- if (node.kind === "epsilon") {
1269
- epsilon(from, to);
1270
- return;
1271
- }
1272
- if (node.kind === "union") {
1273
- for (const child of node.children)
1274
- build(child, from, to);
1275
- return;
1276
- }
1277
- if (node.kind === "concat") {
1278
- let current2 = from;
1279
- node.children.forEach((child, index) => {
1280
- const next = index === node.children.length - 1 ? to : state();
1281
- build(child, current2, next);
1282
- current2 = next;
1283
- });
1284
- if (node.children.length === 0)
1285
- epsilon(from, to);
1286
- return;
1287
- }
1288
- let current = from;
1289
- for (let i = 0; i < node.min; i++) {
1290
- const next = state();
1291
- build(node.child, current, next);
1292
- current = next;
1293
- }
1294
- if (node.max === null) {
1295
- epsilon(current, to);
1296
- const end2 = state();
1297
- build(node.child, current, end2);
1298
- epsilon(end2, current);
1299
- } else {
1300
- for (let i = node.min; i < node.max; i++) {
1301
- epsilon(current, to);
1302
- const next = state();
1303
- build(node.child, current, next);
1304
- current = next;
1305
- }
1306
- epsilon(current, to);
1307
- }
1308
- }, "build");
1309
- const start = state(), end = state();
1310
- build(expression, start, end);
1311
- return {
1312
- states: states.length,
1313
- test: /* @__PURE__ */ __name((text2, budget = { work: 0 }) => {
1314
- const spend = /* @__PURE__ */ __name(() => {
1315
- if (++budget.work > (budget.maxWork ?? QUERY_LIMITS.work))
1316
- exhausted("automaton work");
1317
- }, "spend");
1318
- const closure = /* @__PURE__ */ __name((initial) => {
1319
- const stack = [...initial];
1320
- while (stack.length) {
1321
- const id = stack.pop();
1322
- for (const next of states[id].epsilon) {
1323
- spend();
1324
- if (!initial.has(next)) {
1325
- initial.add(next);
1326
- stack.push(next);
1327
- }
1328
- }
1329
- }
1330
- return initial;
1331
- }, "closure");
1332
- let current = closure(/* @__PURE__ */ new Set([start]));
1333
- for (const c of text2) {
1334
- const point = c.codePointAt(0) ?? 0;
1335
- const next = /* @__PURE__ */ new Set();
1336
- for (const id of current)
1337
- for (const edge of states[id].edges) {
1338
- spend();
1339
- const inside = edge.atom.ranges.some(([lo, hi]) => point >= lo && point <= hi);
1340
- if (inside !== edge.atom.negate)
1341
- next.add(edge.to);
1342
- }
1343
- current = closure(next);
1344
- if (current.size === 0)
1345
- return false;
1346
- }
1347
- return current.has(end);
1348
- }, "test")
1349
- };
1350
- }, "compileAutomaton");
1351
- var wildcardPattern = /* @__PURE__ */ __name((value) => {
1352
- const chars = [...value];
1353
- let pattern = "";
1354
- for (let at = 0; at < chars.length; at++) {
1355
- const c = chars[at];
1356
- if (c === "\\") {
1357
- const escaped = chars[++at];
1358
- if (escaped === void 0)
1359
- searchError("query.invalid-escape", { start: 0, end: value.length });
1360
- pattern += /[|&?*+(){}[\].#@<>"~\\]/u.test(escaped) ? `\\${escaped}` : escaped;
1361
- } else
1362
- pattern += c === "*" ? ".*" : c === "?" ? "." : /[|&?*+(){}[\].#@<>"~\\]/u.test(c) ? `\\${c}` : c;
1363
- }
1364
- return pattern;
1365
- }, "wildcardPattern");
1366
- var FOLD_RANGE = 4096;
1367
- var unfoldable = /* @__PURE__ */ __name((span, what) => searchError("query.unsupported-regex", span, `${what} has no single lowercase form without accents, which is what text: words are \u2014 write it that way, or use body:/\u2026/ to match the original text`), "unfoldable");
1368
- var classChar = /* @__PURE__ */ __name((point) => {
1369
- const c = String.fromCodePoint(point);
1370
- return /[\p{L}\p{N}]/u.test(c) ? c : `\\${c}`;
1371
- }, "classChar");
1372
- var foldRegex = /* @__PURE__ */ __name((pattern, span) => {
1373
- const chars = [...pattern.normalize("NFC")];
1374
- let out = "";
1375
- let at = 0;
1376
- const literal2 = /* @__PURE__ */ __name((c) => {
1377
- if (!/[\p{L}\p{N}\p{M}]/u.test(c))
1378
- return c;
1379
- const folded = fold(c);
1380
- if (folded === "")
1381
- return unfoldable(span, `"${c}"`);
1382
- if ([...folded].length === 1 && /[\p{L}\p{N}]/u.test(folded))
1383
- return folded;
1384
- if (folded.includes('"'))
1385
- return unfoldable(span, `"${c}"`);
1386
- return `"${folded}"`;
1387
- }, "literal");
1388
- const characterClass = /* @__PURE__ */ __name(() => {
1389
- const begin = at - 1;
1390
- let negate = "";
1391
- if (chars[at] === "^") {
1392
- negate = "^";
1393
- at++;
1394
- }
1395
- const kept2 = [];
1396
- const points = /* @__PURE__ */ new Set();
1397
- do {
1398
- const start = at;
1399
- if (chars[at] === "\\" && /^[a-zA-Z]$/u.test(chars[at + 1] ?? "")) {
1400
- kept2.push(`\\${chars[at + 1]}`);
1401
- at += 2;
1402
- continue;
1403
- }
1404
- const escaped = /* @__PURE__ */ __name(() => {
1405
- if (chars[at] === "\\")
1406
- at++;
1407
- return (chars[at++] ?? "").codePointAt(0) ?? 0;
1408
- }, "escaped");
1409
- const lo = escaped();
1410
- let hi = lo;
1411
- if (chars[at] === "-") {
1412
- at++;
1413
- hi = escaped();
1414
- }
1415
- if (at > chars.length) {
1416
- out += chars.slice(begin).join("");
1417
- return;
1418
- }
1419
- const single = /* @__PURE__ */ __name((point) => [...fold(String.fromCodePoint(point))], "single");
1420
- if (hi < lo)
1421
- kept2.push(chars.slice(start, at).join(""));
1422
- else if (hi - lo >= FOLD_RANGE) {
1423
- if (single(lo).join("") !== String.fromCodePoint(lo) || single(hi).join("") !== String.fromCodePoint(hi))
1424
- unfoldable(span, `the range ${chars.slice(start, at).join("")}`);
1425
- kept2.push(chars.slice(start, at).join(""));
1426
- } else
1427
- for (let point = lo; point <= hi; point++) {
1428
- const folded = single(point);
1429
- if (folded.length === 1)
1430
- points.add(folded[0]?.codePointAt(0) ?? 0);
1431
- else if (lo === hi)
1432
- unfoldable(span, `"${String.fromCodePoint(point)}"`);
1433
- }
1434
- } while (at < chars.length && chars[at] !== "]");
1435
- const sorted = [...points].sort((a, b) => a - b);
1436
- const ranges = [];
1437
- for (let i = 0; i < sorted.length; i++) {
1438
- const first = sorted[i];
1439
- while (sorted[i + 1] === sorted[i] + 1)
1440
- i++;
1441
- const last = sorted[i];
1442
- ranges.push(last === first ? classChar(first) : `${classChar(first)}-${classChar(last)}`);
1443
- }
1444
- if (!kept2.length && !ranges.length)
1445
- unfoldable(span, "the class");
1446
- out += `[${negate}${kept2.join("")}${ranges.join("")}`;
1447
- }, "characterClass");
1448
- while (at < chars.length) {
1449
- const c = chars[at++];
1450
- if (c === "\\") {
1451
- const next = chars[at++];
1452
- if (next === void 0)
1453
- out += c;
1454
- else
1455
- out += (next.codePointAt(0) ?? 0) < 128 ? `${c}${next}` : literal2(next);
1456
- } else if (c === '"') {
1457
- const end = chars.indexOf('"', at);
1458
- if (end < 0) {
1459
- out += chars.slice(at - 1).join("");
1460
- break;
1461
- }
1462
- const folded = fold(chars.slice(at, end).join(""));
1463
- if (folded.includes('"'))
1464
- unfoldable(span, `"${chars.slice(at, end).join("")}"`);
1465
- out += `"${folded}"`;
1466
- at = end + 1;
1467
- } else if (c === "[")
1468
- characterClass();
1469
- else
1470
- out += literal2(c);
1471
- }
1472
- return out;
1473
- }, "foldRegex");
1474
-
1475
- // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/search/trigrams.js
1476
- var trigrams = /* @__PURE__ */ __name((term) => {
1477
- const padded = ` ${term} `;
1478
- const pieces = /* @__PURE__ */ new Set();
1479
- for (let at = 0; at + 3 <= padded.length; at++)
1480
- pieces.add(padded.slice(at, at + 3));
1481
- return [...pieces];
1482
- }, "trigrams");
1483
-
1484
- // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/resolve.js
1485
- var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
1486
- var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
1487
- var pickChat = /* @__PURE__ */ __name((reference, chats) => {
1488
- const wanted = foldName(reference.trim());
1489
- const matches = chats.filter((chat) => chat.title !== null && foldName(chat.title).includes(wanted));
1490
- if (matches.length === 1 && matches[0])
1491
- return matches[0];
1492
- if (matches.length === 0)
1493
- throw new CliError("not_found", `no chat matches "${reference}"`);
1494
- throw ambiguous(reference, "chats", matches.map((chat) => ({ id: chat.id, title: chat.title })), ({ title }) => singleLine(String(title)));
1495
- }, "pickChat");
1496
- var pickPerson = /* @__PURE__ */ __name((reference, people) => {
1497
- const trimmed = reference.trim();
1498
- const contact = contactReferenceOf(trimmed, people.provider);
1499
- if (contact !== void 0) {
1500
- const named = people.get(contact);
1501
- if (named)
1502
- return named;
1503
- throw new CliError("not_found", `no person ${contact} in what this account has seen`);
1504
- }
1505
- const known = people.get(trimmed);
1506
- if (known)
1507
- return known;
1508
- if (isId(trimmed))
1509
- throw new CliError("not_found", `no person ${trimmed} in what this account has seen`);
1510
- const wanted = foldName(trimmed.replace(/^@/, ""));
1511
- const everyone = people.all().toSorted((a, b) => (a.name ?? "").localeCompare(b.name ?? ""));
1512
- const exact = everyone.filter((person) => namesOf(person).includes(wanted));
1513
- const containing = everyone.filter((person) => namesOf(person).some((one) => one.includes(wanted)));
1514
- if (exact.length === 1 && exact[0])
1515
- return exact[0];
1516
- if (containing.length === 1 && containing[0])
1517
- return containing[0];
1518
- if (containing.length === 0)
1519
- throw new CliError("not_found", `nobody matches "${reference}"`);
1520
- const matches = exact.length > 0 ? [...exact, ...containing.filter((person) => !exact.includes(person))] : containing;
1521
- throw ambiguous(reference, "people", matches.map(({ id, name, username }) => ({ id, name, username })), ({ name, username }) => singleLine([name, username && `@${username}`].filter(isPresent).join(" ")));
1522
- }, "pickPerson");
1523
- var namesOf = /* @__PURE__ */ __name((person, byAddress = false) => [person.alias, person.name, person.username, byAddress ? person.id : void 0].filter(isPresent).map(foldName), "namesOf");
1524
- var chatNamesOf = /* @__PURE__ */ __name((chat) => [chat.title, chat.providerMetadata?.username].filter((one) => typeof one === "string" && one !== "").map(foldName), "chatNamesOf");
1525
- var namePattern = /* @__PURE__ */ __name((pattern) => {
1526
- const automaton = compileAutomaton(wildcardPattern(foldName(pattern.trim().replace(/^@/, ""))));
1527
- return (names) => names.some((one) => automaton.test(one));
1528
- }, "namePattern");
1529
- var peopleMatching = /* @__PURE__ */ __name((pattern, people, { byAddress = false } = {}) => {
1530
- const fits = namePattern(pattern);
1531
- return people.filter((person) => fits(namesOf(person, byAddress)));
1532
- }, "peopleMatching");
1533
- var chatsMatching = /* @__PURE__ */ __name((pattern, chats) => {
1534
- const fits = namePattern(pattern);
1535
- return chats.filter((chat) => fits(chatNamesOf(chat)));
1536
- }, "chatsMatching");
1537
- var nearest = /* @__PURE__ */ __name((pattern, items, names, most = 5) => {
1538
- const pieces = /* @__PURE__ */ __name((text2) => foldName(text2).split(/\s+/u).flatMap(trigrams), "pieces");
1539
- const wanted = new Set(pieces(pattern.replace(/\\(.)/gu, "$1").replace(/[*?@]/gu, " ").trim()));
1540
- if (wanted.size === 0)
1541
- return [];
1542
- return items.map((item) => ({
1543
- item,
1544
- score: names(item).flatMap(pieces).filter((piece) => wanted.has(piece)).length
1545
- })).filter(({ score }) => score > 1).toSorted((a, b) => b.score - a.score).slice(0, most).map(({ item }) => item);
1546
- }, "nearest");
1547
- var ambiguous = /* @__PURE__ */ __name((reference, what, candidates, label2) => {
1548
- const width = Math.max(...candidates.map(({ id }) => id.length));
1549
- const lines = candidates.map((candidate) => ` ${candidate.id.padEnd(width)} ${label2(candidate)}`).join("\n");
1550
- return new CliError("validation_error", `"${singleLine(reference)}" matches ${candidates.length} ${what} \u2014 name one by its id:
1551
- ${lines}`, { candidates });
1552
- }, "ambiguous");
1553
- var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
1554
-
1555
- // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/display-names.js
1556
- var QUOTES = [
1557
- ['"', '"'],
1558
- ["'", "'"],
1559
- ["\xAB", "\xBB"],
1560
- ["\u201C", "\u201D"],
1561
- ["\u201E", "\u201C"],
1562
- ["\u2018", "\u2019"],
1563
- ["`", "`"]
1564
- ];
1565
- var READABLE = /[\p{L}\p{N}]/u;
1566
- var PLACEHOLDERS = /* @__PURE__ */ new Set(["null", "undefined", "none", "\u0431\u0435\u0437 \u0438\u043C\u0435\u043D\u0438", "deleted account", "\u0443\u0434\u0430\u043B\u0451\u043D\u043D\u044B\u0439 \u0430\u043A\u043A\u0430\u0443\u043D\u0442"]);
1567
- var unquoted = /* @__PURE__ */ __name((text2) => {
1568
- let at = text2.replace(/\s+/gu, " ").trim();
1569
- for (; ; ) {
1570
- const pair = QUOTES.find(([open, close]) => at.length >= 2 && at.startsWith(open) && at.endsWith(close));
1571
- if (pair === void 0)
1572
- return at;
1573
- at = at.slice(pair[0].length, at.length - pair[1].length).trim();
1574
- }
1575
- }, "unquoted");
1576
- var given = /* @__PURE__ */ __name((value) => {
1577
- const text2 = typeof value === "string" ? value.trim() : "";
1578
- return text2 === "" ? void 0 : text2;
1579
- }, "given");
1580
- var displayName = /* @__PURE__ */ __name((name, fallbacks = {}) => {
1581
- const unwrapped = typeof name === "string" ? unquoted(name) : "";
1582
- const cleaned = PLACEHOLDERS.has(unwrapped.toLowerCase()) ? "" : unwrapped;
1583
- if (READABLE.test(cleaned))
1584
- return cleaned;
1585
- const borrowed = fallbacks.name === void 0 || fallbacks.name === null ? null : displayName(fallbacks.name);
1586
- if (borrowed !== null && READABLE.test(borrowed) && !borrowed.startsWith("@"))
1587
- return borrowed;
1588
- const username = given(fallbacks.username);
1589
- return (username === void 0 ? void 0 : username.startsWith("@") ? username : `@${username}`) ?? given(fallbacks.phone) ?? given(fallbacks.email) ?? (cleaned === "" ? null : cleaned);
1590
- }, "displayName");
1591
- var present = /* @__PURE__ */ __name((value) => typeof value === "string" && value !== "" ? value : null, "present");
1592
- var takeFallbacks = /* @__PURE__ */ __name((into, identity) => {
1593
- const named = displayName(identity.name);
1594
- if (into.name === null && isReadable(named) && !named?.startsWith("@"))
1595
- into.name = named;
1596
- into.username ??= present(identity.username);
1597
- into.phone ??= present(identity.phone) ?? (identity.provider === "phone" ? identity.id : null);
1598
- into.email ??= present(identity.email) ?? (identity.provider === "email" ? identity.id : null);
1599
- return into;
1600
- }, "takeFallbacks");
1601
- var noFallbacks = /* @__PURE__ */ __name(() => ({ name: null, username: null, phone: null, email: null }), "noFallbacks");
1602
- var nameKey = /* @__PURE__ */ __name((name) => {
1603
- if (typeof name !== "string")
1604
- return null;
1605
- const unwrapped = unquoted(name);
1606
- if (PLACEHOLDERS.has(unwrapped.toLowerCase()))
1607
- return null;
1608
- const words = foldName(unwrapped).split(/[^\p{L}\p{N}]+/u).filter((word) => word !== "");
1609
- return words.length === 0 ? null : words.sort().join(" ");
1610
- }, "nameKey");
1611
- var isReadable = /* @__PURE__ */ __name((shown) => shown !== null && READABLE.test(shown), "isReadable");
1612
-
1613
- // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/counters.js
1614
- var COUNTER_FIELDS = ["views", "reactions", "comments"];
1615
- var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
1616
- var counterValue = /* @__PURE__ */ __name((message, field) => {
1617
- const value = field === "reactions" ? message.reactions?.total : message.providerMetadata?.[field];
1618
- return validCounter(value) ? value : null;
1619
- }, "counterValue");
1620
- var counterObservationTime = /* @__PURE__ */ __name((observation, now) => {
1621
- const at = Date.parse(observation.observedAt);
1622
- if (!validCounter(observation.value) || !Number.isSafeInteger(at) || at < 0 || at > now || !["remote_fetch", "remote_update"].includes(observation.source))
1623
- throw new CliError("validation_error", "counter observation needs a valid value, source and nonfuture observation time");
1624
- if (observation.reactions && (!validCounter(observation.reactions.total) || observation.reactions.total !== observation.value))
1625
- throw new CliError("validation_error", "reaction observation payload and total disagree");
1626
- return at;
1627
- }, "counterObservationTime");
1628
- var observedCounters = /* @__PURE__ */ __name((message, observedAt, fields, source = "remote_fetch") => {
1629
- const observations = {};
1630
- for (const field of fields) {
1631
- const value = counterValue(message, field);
1632
- if (value !== null)
1633
- observations[field] = {
1634
- value,
1635
- observedAt,
1636
- source,
1637
- ...field === "reactions" && message.reactions ? { reactions: message.reactions } : {}
1638
- };
1639
- }
1640
- return { ...message, counterObservations: observations };
1641
- }, "observedCounters");
1642
- var counterFreshness = /* @__PURE__ */ __name((states) => {
1643
- if (!states.length || states.every((one) => one.freshness === "unknown"))
1644
- return "unknown";
1645
- if (states.some((one) => one.freshness === "unknown"))
1646
- return "partial";
1647
- return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
1648
- }, "counterFreshness");
1649
-
1650
- // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
1651
- var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
1652
- var AUTHOR_MEASURES = [
1653
- "messages",
1654
- "words",
1655
- "reactions",
1656
- "replies",
1657
- "answers",
1658
- "answer-time",
1659
- "threads",
1660
- "active-days"
1661
- ];
1662
- var CONTEXT = /* @__PURE__ */ new Set([
1663
- "replies",
1664
- "replies-from-others",
1665
- "replies-from-others-per-message",
1666
- "thread-size",
1667
- "threads",
1668
- "answers",
1669
- "answer-time"
1670
- ]);
1671
- var needsRankingContext = /* @__PURE__ */ __name((options) => options.components.some((name) => CONTEXT.has(name)), "needsRankingContext");
1672
- var presets = {
1673
- helpful: { answers: 0.5, "replies-from-others": 0.25, reactions: 0.25 },
1674
- active: { "active-days": 0.6, messages: 0.4 },
1675
- engaging: { "reactions-per-message": 0.5, "replies-from-others-per-message": 0.5 }
1676
- };
1677
- function invalid(message) {
1678
- throw new CliError("validation_error", message, { reason: "ranking.invalid" });
1679
- }
1680
- __name(invalid, "invalid");
1681
- var rankingOptions = /* @__PURE__ */ __name((target, input) => {
1682
- const measures = target === "messages" ? MESSAGE_MEASURES : AUTHOR_MEASURES;
1683
- const { measure, score, weights: given2, minMessages } = input;
1684
- const messageKind = input.messageKind ?? "all";
1685
- if (!["all", "posts", "comments"].includes(messageKind))
1686
- invalid("message_kind takes all, posts or comments");
1687
- if (target === "messages" && minMessages !== void 0)
1688
- invalid("min_messages applies to stats contacts top");
1689
- if (minMessages !== void 0 && (!Number.isSafeInteger(minMessages) || minMessages < 1))
1690
- invalid("min_messages takes a positive integer");
1691
- if (measure !== void 0 && !measures.includes(measure))
1692
- invalid(`--measure takes ${measures.join(", ")}`);
1693
- if (measure !== void 0 && (score !== void 0 || given2 !== void 0))
1694
- invalid("--measure cannot be combined with --score or --weights");
1695
- if (score !== void 0 && !["helpful", "active", "engaging"].includes(score))
1696
- invalid("--score takes helpful, active or engaging");
1697
- if (target === "messages" && score !== void 0 && score !== "engaging")
1698
- invalid("helpful and active scores apply to authors only");
1699
- const scoring = score !== void 0 || given2 !== void 0;
1700
- const preset = score;
1701
- let weights = null;
1702
- if (scoring) {
1703
- let raw = given2 !== void 0 ? given2 : target === "messages" ? { reactions: 0.5, "replies-from-others": 0.5 } : presets[preset];
1704
- if (typeof raw === "string") {
1705
- try {
1706
- raw = JSON.parse(raw);
1707
- } catch {
1708
- invalid("--weights takes a JSON object of component weights");
1709
- }
1710
- }
1711
- if (!raw || typeof raw !== "object" || Array.isArray(raw))
1712
- invalid("--weights takes a JSON object of component weights");
1713
- const allowed = target === "messages" ? [...MESSAGE_MEASURES, "replies-from-others"] : [
1714
- ...AUTHOR_MEASURES.filter((name) => name !== "answer-time"),
1715
- "replies-from-others",
1716
- "reactions-per-message",
1717
- "replies-from-others-per-message"
1718
- ];
1719
- const entries = Object.entries(raw);
1720
- for (const [name, weight] of entries) {
1721
- if (!allowed.includes(name))
1722
- invalid(`unknown ${target} score component: ${name}`);
1723
- if (typeof weight !== "number" || !Number.isFinite(weight) || weight < 0)
1724
- invalid(`weight for ${name} must be a finite nonnegative number`);
1725
- }
1726
- if (!entries.some(([, weight]) => weight > 0))
1727
- invalid("--weights needs at least one positive weight");
1728
- weights = Object.fromEntries(entries);
1729
- }
1730
- const selected = measure ?? (target === "messages" ? "reactions" : "messages");
1731
- return {
1732
- target,
1733
- messageKind,
1734
- minMessages: minMessages ?? (target === "contacts" && score === "engaging" ? 5 : 1),
1735
- measure: scoring ? "score" : selected,
1736
- order: !scoring && selected === "answer-time" ? "ascending" : "descending",
1737
- weights,
1738
- preset: scoring ? preset ?? "custom" : null,
1739
- components: weights === null ? [selected] : Object.entries(weights).filter(([, weight]) => weight > 0).map(([name]) => name)
1740
- };
1741
- }, "rankingOptions");
1742
- var rankingScore = /* @__PURE__ */ __name((raw, maxima, weights) => {
1743
- const entries = Object.entries(weights).filter(([, weight]) => weight > 0);
1744
- const scale = Math.max(...entries.map(([, weight]) => weight));
1745
- const denominator = entries.reduce((sum2, [, weight]) => sum2 + weight / scale, 0);
1746
- if (!Number.isFinite(scale) || scale <= 0 || !Number.isFinite(denominator) || denominator <= 0)
1747
- return null;
1748
- const normalized = {};
1749
- const contributions = {};
1750
- let sum = 0;
1751
- for (const [name, weight] of entries) {
1752
- const value = raw[name];
1753
- const maximum = maxima[name];
1754
- if (value == null || !Number.isFinite(value) || value < 0 || maximum === void 0 || !Number.isFinite(maximum) || maximum < value)
1755
- return null;
1756
- const part = maximum === 0 ? 0 : value / maximum;
1757
- normalized[name] = part;
1758
- contributions[name] = 100 * part * (weight / scale) / denominator;
1759
- sum += contributions[name];
1760
- }
1761
- return { score: Math.min(100, sum), normalized, contributions };
1762
- }, "rankingScore");
1763
- var RANKING_TOKENIZER_VERSION = 1;
1764
- var withoutUrls = /* @__PURE__ */ __name((text2) => text2.replace(/\S+/gu, (token) => {
1765
- for (let offset = 0; ; ) {
1766
- const marker = token.indexOf("://", offset);
1767
- if (marker < 0)
1768
- break;
1769
- let start = marker;
1770
- while (start > 0 && /[a-z0-9+.-]/iu.test(token[start - 1]))
1771
- start--;
1772
- if (/^[a-z][a-z0-9+.-]*$/iu.test(token.slice(start, marker)) && (start === 0 || !/\w/u.test(token[start - 1])))
1773
- return token.slice(0, start);
1774
- offset = marker + 3;
1775
- }
1776
- const folded = token.toLowerCase();
1777
- for (let offset = 0; ; ) {
1778
- const start = folded.indexOf("www.", offset);
1779
- if (start < 0)
1780
- break;
1781
- if (start === 0 || !/\w/u.test(token[start - 1]))
1782
- return token.slice(0, start);
1783
- offset = start + 4;
1784
- }
1785
- return token;
1786
- }), "withoutUrls");
1787
- var rankingWords = /* @__PURE__ */ __name((text2) => withoutUrls(text2).match(/[\p{L}\p{N}]+/gu)?.length ?? 0, "rankingWords");
1788
- var rankingQuestion = /* @__PURE__ */ __name((text2) => withoutUrls(text2).includes("?"), "rankingQuestion");
1789
-
1790
- // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/records.js
1791
- import { createHash } from "node:crypto";
1792
- var RECORDS_SCHEMA_VERSION = 1;
1793
- var RECORD_OPERATIONS = ["upsert", "delete"];
1794
- var LINE_OPTIONS = ["text", "products"];
1795
- var WORD = `^${WORD_BODY}$`;
1796
- var MAX_ID = 512;
1797
- var MAX_FIELDS_BYTES = 65536;
1798
- var MAX_RELATIONS = 100;
1799
- var DECIMAL = DECIMAL_PATTERN;
1800
- var REF = "^[a-z]+:[^\\s]{1,500}$";
1801
- var fieldsDef = /* @__PURE__ */ __name((type) => `fields-${type}`, "fieldsDef");
1802
- var RECORDS_ENVELOPE_SCHEMA = {
1803
- $schema: "https://json-schema.org/draft/2020-12/schema",
1804
- title: "WireCat records envelope, version 1",
1805
- description: "Records one source sends to the store. JSONL is the same model: the first line holds schema_version, source and options, each further line one record.",
1806
- type: "object",
1807
- required: ["schema_version", "source", "records"],
1808
- additionalProperties: false,
1809
- properties: {
1810
- schema_version: { const: RECORDS_SCHEMA_VERSION },
1811
- source: { $ref: "#/$defs/source" },
1812
- options: { $ref: "#/$defs/options" },
1813
- records: { type: "array", items: { $ref: "#/$defs/record" } }
1814
- },
1815
- $defs: {
1816
- source: {
1817
- type: "object",
1818
- required: ["provider", "account", "batch_id"],
1819
- additionalProperties: false,
1820
- properties: {
1821
- provider: { type: "string", pattern: WORD, description: "The system the records come from" },
1822
- account: { type: "string", minLength: 1, maxLength: MAX_ID, description: "The account in that system" },
1823
- batch_id: { type: "string", minLength: 1, maxLength: MAX_ID, description: "This import, for the receipt" }
1824
- }
1825
- },
1826
- options: {
1827
- type: "object",
1828
- additionalProperties: false,
1829
- properties: {
1830
- lines: {
1831
- enum: [...LINE_OPTIONS],
1832
- description: "products: an invoice line's product (an external id) names its product; text, the default, keeps it as data. Order lines always read it, and product_ref (a product: ref) is read on every line."
1833
- },
1834
- phone_region: {
1835
- type: "string",
1836
- pattern: "^[A-Za-z]{2}$",
1837
- description: "The country a person's phone without + is read in. Without it such a number is an identifier only when exactly one country of the store's phone_countries setting reads it as valid"
1838
- }
1839
- }
1840
- },
1841
- record: {
1842
- type: "object",
1843
- required: ["key", "type", "external_id", "operation"],
1844
- additionalProperties: false,
1845
- properties: {
1846
- key: { type: "string", minLength: 1, maxLength: MAX_ID },
1847
- type: { type: "string", pattern: TYPE_PATTERN },
1848
- external_id: { type: "string", minLength: 1, maxLength: MAX_ID },
1849
- operation: { enum: [...RECORD_OPERATIONS] },
1850
- fields: {
1851
- type: "object",
1852
- description: "What the source says, as data: never secrets, never instructions"
1853
- },
1854
- revision: { type: "integer", minimum: 0, maximum: Number.MAX_SAFE_INTEGER },
1855
- relations: { type: "array", maxItems: MAX_RELATIONS, items: { $ref: "#/$defs/relation" } }
1856
- },
1857
- allOf: RECORD_ENTITY_TYPES.map((type) => ({
1858
- if: { properties: { type: { const: type } }, required: ["type"] },
1859
- // biome-ignore lint/suspicious/noThenProperty: JSON Schema's own if/then keyword, never awaited.
1860
- then: { properties: { fields: { $ref: `#/$defs/${fieldsDef(type)}` } } }
1861
- }))
1862
- },
1863
- relation: {
1864
- type: "object",
1865
- required: ["role"],
1866
- additionalProperties: false,
1867
- oneOf: [{ required: ["type", "external_id"] }, { required: ["ref"] }],
1868
- properties: {
1869
- role: { type: "string", pattern: WORD },
1870
- type: { type: "string", pattern: TYPE_PATTERN },
1871
- external_id: { type: "string", minLength: 1, maxLength: MAX_ID },
1872
- ref: { type: "string", pattern: REF, description: "A store entity, such as organization:12" },
1873
- as: {
1874
- type: "string",
1875
- pattern: WORD,
1876
- description: "On a relationship role: the part the target plays, such as decision-maker"
1877
- },
1878
- amount: {
1879
- type: "string",
1880
- pattern: DECIMAL,
1881
- description: "A settles relation's share of the payment, a decimal in its currency"
1882
- }
1883
- }
1884
- },
1885
- ...Object.fromEntries(RECORD_ENTITY_TYPES.map((type) => [fieldsDef(type), RECORD_TYPES[type].fields]))
1886
- }
1887
- };
1888
- var wordPattern = new RegExp(WORD);
1889
- var typePattern = new RegExp(TYPE_PATTERN);
1890
- var decimalPattern = new RegExp(DECIMAL);
1891
- var refPattern = new RegExp(REF);
1892
- var escapePointer = /* @__PURE__ */ __name((segment) => String(segment).replaceAll("~", "~0").replaceAll("/", "~1"), "escapePointer");
1893
- var pointerOf = /* @__PURE__ */ __name((...segments) => segments.map((s) => `/${escapePointer(s)}`).join(""), "pointerOf");
1894
- var idText = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" && value.length <= MAX_ID && !value.includes("\0"), "idText");
1895
- var extraKeys = /* @__PURE__ */ __name((value, allowed) => Object.keys(value).filter((key) => !allowed.includes(key)), "extraKeys");
1896
- var secretIn = /* @__PURE__ */ __name((value, at) => {
1897
- if (typeof value === "string")
1898
- return holdsCredential(value) ? at : void 0;
1899
- if (Array.isArray(value)) {
1900
- for (const [index, item] of value.entries()) {
1901
- const found = secretIn(item, [...at, index]);
1902
- if (found)
1903
- return found;
1904
- }
1905
- return void 0;
1906
- }
1907
- if (!isObject(value))
1908
- return void 0;
1909
- for (const [key, item] of Object.entries(value)) {
1910
- if (secretNamed(key))
1911
- return [...at, key];
1912
- const found = secretIn(item, [...at, key]);
1913
- if (found)
1914
- return found;
1915
- }
1916
- return void 0;
1917
- }, "secretIn");
1918
- var targetTypeOf = /* @__PURE__ */ __name((relation) => relation.ref === void 0 ? String(relation.type) : relation.ref.slice(0, relation.ref.indexOf(":")), "targetTypeOf");
1919
- var relationErrors = /* @__PURE__ */ __name((relations, at) => {
1920
- if (relations === void 0)
1921
- return [];
1922
- if (!Array.isArray(relations) || relations.length > MAX_RELATIONS)
1923
- return [invalid2(at, `relations is a list of at most ${MAX_RELATIONS}`)];
1924
- return relations.flatMap((relation, index) => {
1925
- const here = [...at, index];
1926
- if (!isObject(relation))
1927
- return [invalid2(here, "a relation is an object")];
1928
- const extra = extraKeys(relation, ["role", "type", "external_id", "ref", "as", "amount"]);
1929
- if (extra.length > 0)
1930
- return [invalid2([...here, extra[0]], "a relation holds role, type, external_id, ref, as and amount")];
1931
- if (typeof relation.role !== "string" || !wordPattern.test(relation.role))
1932
- return [invalid2([...here, "role"], "a role is lowercase letters, digits, - and _")];
1933
- if (relation.ref !== void 0) {
1934
- if (relation.type !== void 0 || relation.external_id !== void 0)
1935
- return [invalid2([...here, "ref"], "a relation names its target by ref, or by type and external_id")];
1936
- if (typeof relation.ref !== "string" || !refPattern.test(relation.ref))
1937
- return [invalid2([...here, "ref"], "a ref is a store reference, such as organization:12")];
1938
- } else {
1939
- if (typeof relation.type !== "string" || !typePattern.test(relation.type))
1940
- return [invalid2([...here, "type"], TYPE_RULE)];
1941
- if (!idText(relation.external_id))
1942
- return [invalid2([...here, "external_id"], `an external id takes 1\u2013${MAX_ID} characters`)];
1943
- }
1944
- if (relation.as !== void 0 && (typeof relation.as !== "string" || !wordPattern.test(relation.as)))
1945
- return [invalid2([...here, "as"], "as is lowercase letters, digits, - and _")];
1946
- if (relation.amount !== void 0 && (typeof relation.amount !== "string" || !decimalPattern.test(relation.amount)))
1947
- return [invalid2([...here, "amount"], 'an amount is a decimal string, such as "13000.00"')];
1948
- if (relation.amount !== void 0 && !AMOUNT_ROLES.includes(relation.role))
1949
- return [invalid2([...here, "amount"], `only a ${AMOUNT_ROLES.join(" or ")} relation carries an amount`)];
1950
- return [];
1951
- });
1952
- }, "relationErrors");
1953
- var typeErrors = /* @__PURE__ */ __name((record, at) => {
1954
- if (record.operation !== "upsert" || !isRecordType(record.type))
1955
- return [];
1956
- const { type } = record;
1957
- const wrong = fieldError(RECORD_TYPES[type].fields, record.fields);
1958
- if (wrong)
1959
- return [invalid2([...at, "fields", ...wrong.at], wrong.message)];
1960
- const relations = record.relations ?? [];
1961
- for (const [index, relation] of relations.entries()) {
1962
- const here = [...at, "relations", index];
1963
- const role = roleOf(type, relation.role);
1964
- if (relation.as !== void 0 && !role?.relationship)
1965
- return [
1966
- invalid2([...here, "as"], `${article(type)} ${type}'s ${relation.role} is not a relationship: it takes no as`)
1967
- ];
1968
- if (role === void 0 || role.v1)
1969
- continue;
1970
- const target = targetTypeOf(relation);
1971
- if (!role.targets.includes(target))
1972
- return [
1973
- invalid2(here, `${article(type)} ${type}'s ${relation.role} is ${role.targets.map((one) => `${article(one)} ${one}`).join(" or ")}`)
1974
- ];
1975
- if (!role.many && relations.some((other, before) => before < index && other.role === relation.role))
1976
- return [invalid2(here, `${article(type)} ${type} has one ${relation.role}`, "record.relation-ambiguous")];
1977
- }
1978
- for (const [name, role] of rolesOf(type))
1979
- if (role.required && !relations.some((relation) => relation.role === name))
1980
- return [invalid2([...at, "relations"], `${article(type)} ${type} names its ${name} in relations`)];
1981
- return [];
1982
- }, "typeErrors");
1983
- var invalid2 = /* @__PURE__ */ __name((at, message, code = "record.invalid") => ({
1984
- pointer: pointerOf(...at),
1985
- code,
1986
- message
1987
- }), "invalid");
1988
- var recordErrors = /* @__PURE__ */ __name((record, index) => {
1989
- const at = ["records", index];
1990
- if (!isObject(record))
1991
- return [invalid2(at, "a record is an object")];
1992
- const key = typeof record.key === "string" ? record.key : void 0;
1993
- const withKey = /* @__PURE__ */ __name((errors) => errors.map((error) => key === void 0 ? error : { ...error, key }), "withKey");
1994
- const extra = extraKeys(record, ["key", "type", "external_id", "operation", "fields", "revision", "relations"]);
1995
- if (extra.length > 0)
1996
- return withKey([invalid2([...at, extra[0]], `a record has no ${extra[0]}`)]);
1997
- if (!idText(record.key))
1998
- return [invalid2([...at, "key"], `a key takes 1\u2013${MAX_ID} characters`)];
1999
- if (typeof record.type !== "string" || !typePattern.test(record.type))
2000
- return withKey([invalid2([...at, "type"], TYPE_RULE, "record.type")]);
2001
- if (!idText(record.external_id))
2002
- return withKey([invalid2([...at, "external_id"], `an external id takes 1\u2013${MAX_ID} characters`)]);
2003
- if (!RECORD_OPERATIONS.includes(record.operation))
2004
- return withKey([invalid2([...at, "operation"], "an operation is upsert or delete")]);
2005
- if (record.revision !== void 0 && (typeof record.revision !== "number" || !Number.isSafeInteger(record.revision) || record.revision < 0))
2006
- return withKey([invalid2([...at, "revision"], "a revision is a whole number, 0 or more")]);
2007
- if (record.operation === "upsert" && !isObject(record.fields))
2008
- return withKey([invalid2([...at, "fields"], "an upsert carries its fields as an object")]);
2009
- if (record.fields !== void 0 && !isObject(record.fields))
2010
- return withKey([invalid2([...at, "fields"], "fields is an object")]);
2011
- const most = isRecordType(record.type) && RECORD_TYPES[record.type].fieldsBytes || MAX_FIELDS_BYTES;
2012
- if (record.fields !== void 0 && Buffer.byteLength(JSON.stringify(record.fields)) > most)
2013
- return withKey([invalid2([...at, "fields"], `fields take at most ${most} bytes`, "record.too-large")]);
2014
- const secret = record.fields === void 0 ? void 0 : secretIn(record.fields, [...at, "fields"]);
2015
- if (secret)
2016
- return withKey([
2017
- invalid2(secret, "a secret never goes into the store: drop this field at the source", "record.secret-field")
2018
- ]);
2019
- const relations = relationErrors(record.relations, [...at, "relations"]);
2020
- return withKey(relations.length > 0 ? relations : typeErrors(record, at));
2021
- }, "recordErrors");
2022
- var envelopeErrors = /* @__PURE__ */ __name((envelope, account) => {
2023
- const header = headerErrors(envelope, account, ["records"]);
2024
- if (header.length > 0)
2025
- return header;
2026
- if (!Array.isArray(envelope.records))
2027
- return [invalid2(["records"], "records is a list", "envelope.invalid")];
2028
- return [];
2029
- }, "envelopeErrors");
2030
- var headerErrors = /* @__PURE__ */ __name((envelope, account, more = []) => {
2031
- if (!isObject(envelope))
2032
- return [invalid2([], "an envelope is an object", "envelope.invalid")];
2033
- const extra = extraKeys(envelope, ["schema_version", "source", "options", ...more]);
2034
- if (extra.length > 0)
2035
- return [invalid2([extra[0]], `an envelope has no ${extra[0]}`, "envelope.invalid")];
2036
- if (envelope.schema_version !== RECORDS_SCHEMA_VERSION)
2037
- return [
2038
- invalid2(["schema_version"], `this build reads schema_version ${RECORDS_SCHEMA_VERSION}, not ${JSON.stringify(envelope.schema_version)}`, "envelope.schema-version")
2039
- ];
2040
- const { source } = envelope;
2041
- if (!isObject(source))
2042
- return [invalid2(["source"], "source is an object", "envelope.invalid")];
2043
- const sourceExtra = extraKeys(source, ["provider", "account", "batch_id"]);
2044
- if (sourceExtra.length > 0)
2045
- return [
2046
- invalid2(["source", sourceExtra[0]], "source holds provider, account and batch_id", "envelope.invalid")
2047
- ];
2048
- if (typeof source.provider !== "string" || !wordPattern.test(source.provider))
2049
- return [invalid2(["source", "provider"], "a provider is lowercase letters, digits, - and _", "envelope.invalid")];
2050
- if (!idText(source.account))
2051
- return [invalid2(["source", "account"], `an account takes 1\u2013${MAX_ID} characters`, "envelope.invalid")];
2052
- if (!idText(source.batch_id))
2053
- return [invalid2(["source", "batch_id"], `a batch id takes 1\u2013${MAX_ID} characters`, "envelope.invalid")];
2054
- if (source.account !== account)
2055
- return [
2056
- invalid2(["source", "account"], `the envelope is for account ${JSON.stringify(source.account)}, the import for ${JSON.stringify(account)}`, "envelope.account-mismatch")
2057
- ];
2058
- const { options } = envelope;
2059
- if (options !== void 0) {
2060
- if (!isObject(options))
2061
- return [invalid2(["options"], "options is an object", "envelope.invalid")];
2062
- const unknown = extraKeys(options, ["lines", "phone_region"]);
2063
- if (unknown.length > 0)
2064
- return [invalid2(["options", unknown[0]], "options holds lines and phone_region", "envelope.invalid")];
2065
- if (options.phone_region !== void 0 && (typeof options.phone_region !== "string" || !PHONE_COUNTRIES.includes(options.phone_region.toLowerCase())))
2066
- return [
2067
- invalid2(["options", "phone_region"], `options.phone_region is one of ${PHONE_COUNTRIES.join(", ")}`, "envelope.invalid")
2068
- ];
2069
- if (options.lines !== void 0 && !LINE_OPTIONS.includes(options.lines))
2070
- return [invalid2(["options", "lines"], `options.lines is ${LINE_OPTIONS.join(" or ")}`, "envelope.invalid")];
2071
- }
2072
- return [];
2073
- }, "headerErrors");
2074
- var canonical = /* @__PURE__ */ __name((value) => {
2075
- if (Array.isArray(value))
2076
- return value.map(canonical);
2077
- if (!isObject(value))
2078
- return value;
2079
- return Object.fromEntries(Object.keys(value).sort().map((key) => [key, canonical(value[key])]));
2080
- }, "canonical");
2081
- var recordFingerprint = /* @__PURE__ */ __name((fields, relations) => createHash("sha256").update(JSON.stringify(canonical({
2082
- fields,
2083
- relations: relations.map((relation) => [
2084
- relation.role,
2085
- ...relation.ref === void 0 ? [relation.type, relation.external_id] : [`ref=${relation.ref}`],
2086
- ...relation.amount === void 0 ? [] : [relation.amount],
2087
- ...relation.as === void 0 ? [] : [`as=${relation.as}`]
2088
- ]).sort((a, b) => a.join("\0").localeCompare(b.join("\0")))
2089
- }))).digest("hex"), "recordFingerprint");
2090
- var BOM = "\uFEFF";
2091
- var withoutBom = /* @__PURE__ */ __name((text2) => text2.startsWith(BOM) ? text2.slice(1) : text2, "withoutBom");
2092
- var jsonLine = /* @__PURE__ */ __name((line) => {
2093
- try {
2094
- return JSON.parse(withoutBom(line));
2095
- } catch {
2096
- return line;
2097
- }
2098
- }, "jsonLine");
2099
- var envelopeOfJsonl = /* @__PURE__ */ __name((text2) => {
2100
- const lines = withoutBom(text2).split(/\r?\n/);
2101
- const first = lines.findIndex((line) => line.trim() !== "");
2102
- if (first < 0)
2103
- return {};
2104
- const header = jsonLine(lines[first]);
2105
- const records = [];
2106
- for (let at = first + 1; at < lines.length; at++) {
2107
- const line = lines[at];
2108
- if (line.trim() !== "")
2109
- records.push(jsonLine(line));
2110
- }
2111
- return isObject(header) ? { ...header, records } : header;
2112
- }, "envelopeOfJsonl");
2113
- var envelopeOfText = /* @__PURE__ */ __name((text2) => {
2114
- const clean = withoutBom(text2);
2115
- const first = clean.split(/\r?\n/).find((line) => line.trim() !== "");
2116
- const head = first === void 0 ? void 0 : jsonLine(first);
2117
- if (isObject(head) && !Object.hasOwn(head, "records"))
2118
- return envelopeOfJsonl(clean);
2119
- return jsonLine(clean);
2120
- }, "envelopeOfText");
2121
- var fieldReferences = /* @__PURE__ */ __name((record, options = {}) => {
2122
- if (record.operation !== "upsert" || !isRecordType(record.type))
2123
- return [];
2124
- const fields = record.fields ?? {};
2125
- const found = [];
2126
- for (const [key, type] of referencesOf(record.type))
2127
- if (typeof fields[key] === "string")
2128
- found.push({ role: `fields.${key}`, type, external_id: fields[key] });
2129
- if (record.type === "invoice" && options.lines !== "products")
2130
- return found;
2131
- for (const [list, spec] of nestedOf(record.type)) {
2132
- const items = fields[list];
2133
- if (!Array.isArray(items))
2134
- continue;
2135
- for (const item of items)
2136
- for (const [key, type] of Object.entries(spec.references ?? {}))
2137
- if (isObject(item) && typeof item[key] === "string")
2138
- found.push({ role: `fields.${list}.${key}`, type, external_id: item[key] });
2139
- }
2140
- return found;
2141
- }, "fieldReferences");
2142
-
2143
- // node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/domain/relation-role-labels.js
2144
- var label = /* @__PURE__ */ __name((en, ru, es) => ({ en, ru, es }), "label");
2145
- var ROLE_LABELS = {
2146
- organization: {
2147
- employee: label("Employee", "\u0421\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A", "Empleado"),
2148
- contractor: label("Contractor", "\u041F\u043E\u0434\u0440\u044F\u0434\u0447\u0438\u043A", "Contratista"),
2149
- founder: label("Founder", "\u041E\u0441\u043D\u043E\u0432\u0430\u0442\u0435\u043B\u044C", "Fundador"),
2150
- owner: label("Owner", "\u0412\u043B\u0430\u0434\u0435\u043B\u0435\u0446", "Propietario"),
2151
- manager: label("Manager", "\u0420\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C", "Directivo"),
2152
- adviser: label("Adviser", "\u0421\u043E\u0432\u0435\u0442\u043D\u0438\u043A", "Asesor"),
2153
- contact: label("Contact", "\u041A\u043E\u043D\u0442\u0430\u043A\u0442", "Contacto")
2154
- },
2155
- project: {
2156
- owner: label("Owner", "\u0412\u043B\u0430\u0434\u0435\u043B\u0435\u0446", "Propietario"),
2157
- manager: label("Manager", "\u0420\u0443\u043A\u043E\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C", "Directivo"),
2158
- contributor: label("Contributor", "\u0423\u0447\u0430\u0441\u0442\u043D\u0438\u043A", "Colaborador"),
2159
- "client-contact": label("Client contact", "\u041A\u043E\u043D\u0442\u0430\u043A\u0442 \u043A\u043B\u0438\u0435\u043D\u0442\u0430", "Contacto del cliente"),
2160
- approver: label("Approver", "\u0421\u043E\u0433\u043B\u0430\u0441\u0443\u044E\u0449\u0438\u0439", "Aprobador")
2161
- },
2162
- deal: {
2163
- owner: label("Responsible", "\u041E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439", "Responsable"),
2164
- contact: label("Contact", "\u041A\u043E\u043D\u0442\u0430\u043A\u0442", "Contacto"),
2165
- "decision-maker": label("Decision-maker", "\u041F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442 \u0440\u0435\u0448\u0435\u043D\u0438\u0435", "Responsable de decidir"),
2166
- influencer: label("Influencer", "\u0412\u043B\u0438\u044F\u0435\u0442 \u043D\u0430 \u0440\u0435\u0448\u0435\u043D\u0438\u0435", "Influye en la decisi\xF3n")
2167
- },
2168
- contract: {
2169
- customer: label("Customer", "\u0417\u0430\u043A\u0430\u0437\u0447\u0438\u043A", "Cliente"),
2170
- supplier: label("Supplier", "\u041F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A", "Proveedor"),
2171
- signatory: label("Signatory", "\u041F\u043E\u0434\u043F\u0438\u0441\u0430\u043D\u0442", "Firmante"),
2172
- guarantor: label("Guarantor", "\u041F\u043E\u0440\u0443\u0447\u0438\u0442\u0435\u043B\u044C", "Garante")
2173
- },
2174
- related: {
2175
- colleague: label("Colleague", "\u041A\u043E\u043B\u043B\u0435\u0433\u0430", "Colega"),
2176
- adviser: label("Adviser", "\u0421\u043E\u0432\u0435\u0442\u043D\u0438\u043A", "Asesor"),
2177
- investor: label("Investor", "\u0418\u043D\u0432\u0435\u0441\u0442\u043E\u0440", "Inversor"),
2178
- mentor: label("Mentor", "\u041D\u0430\u0441\u0442\u0430\u0432\u043D\u0438\u043A", "Mentor"),
2179
- family: label("Family", "\u0421\u0435\u043C\u044C\u044F", "Familia"),
2180
- friend: label("Friend", "\u0414\u0440\u0443\u0433", "Amigo")
2181
- }
2182
- };
2183
-
2184
- export {
2185
- isObject,
2186
- RECORD_TYPES,
2187
- isRecordType,
2188
- isBusinessType,
2189
- isIdentityType,
2190
- RECORD_ENTITY_TYPES,
2191
- RECORD_TABLES,
2192
- DECIDED_TABLES,
2193
- WORD_BODY,
2194
- rolesOf,
2195
- roleOf,
2196
- nestedOf,
2197
- AMOUNT_ROLES,
2198
- FIELD_REFERENCE_ROLES,
2199
- hasV1Roles,
2200
- IDENTITY_TYPES,
2201
- article,
2202
- PHONE_COUNTRIES,
2203
- DEFAULT_PHONE_COUNTRIES,
2204
- parsePhoneCountries,
2205
- nationalPhone,
2206
- typedPhone,
2207
- e164Of,
2208
- isMobilePhone,
2209
- BARE_INTERNATIONAL_PROVIDERS,
2210
- storedPhone,
2211
- compileAutomaton,
2212
- wildcardPattern,
2213
- foldRegex,
2214
- chatReferenceOf,
2215
- wrongAccount,
2216
- ensureAccount,
2217
- trigrams,
2218
- isId,
2219
- foldName,
2220
- pickChat,
2221
- pickPerson,
2222
- peopleMatching,
2223
- chatsMatching,
2224
- nearest,
2225
- displayName,
2226
- takeFallbacks,
2227
- noFallbacks,
2228
- nameKey,
2229
- isReadable,
2230
- COUNTER_FIELDS,
2231
- validCounter,
2232
- counterValue,
2233
- counterObservationTime,
2234
- observedCounters,
2235
- counterFreshness,
2236
- MESSAGE_MEASURES,
2237
- AUTHOR_MEASURES,
2238
- needsRankingContext,
2239
- rankingOptions,
2240
- rankingScore,
2241
- RANKING_TOKENIZER_VERSION,
2242
- rankingWords,
2243
- rankingQuestion,
2244
- RECORDS_SCHEMA_VERSION,
2245
- RECORD_OPERATIONS,
2246
- RECORDS_ENVELOPE_SCHEMA,
2247
- pointerOf,
2248
- recordErrors,
2249
- envelopeErrors,
2250
- headerErrors,
2251
- recordFingerprint,
2252
- jsonLine,
2253
- envelopeOfJsonl,
2254
- envelopeOfText,
2255
- fieldReferences,
2256
- ROLE_LABELS
2257
- };