@wirecat/amo-cli 0.6.0 → 0.8.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 (282) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +2 -2
  3. package/contracts/wirecat.json +14 -0
  4. package/dist/amo/button.js +1 -1
  5. package/dist/amo/json.js +1 -1
  6. package/dist/amo/oauth.js +1 -2
  7. package/dist/amo/transport.js +1 -2
  8. package/dist/api-keys.js +1 -1
  9. package/dist/bin/amo.js +11 -11
  10. package/dist/bundle/amo.js +5 -183
  11. package/dist/bundle/{chunk-FYOPPKAN.js → chunk-3HWD4BKU.js} +4 -6
  12. package/dist/bundle/{chunk-GOCMJBEE.js → chunk-4EXURQQQ.js} +21 -19
  13. package/dist/bundle/{chunk-SWCJM3YD.js → chunk-6ZPPFFIH.js} +3 -3
  14. package/dist/bundle/chunk-AEWYRB6F.js +8 -0
  15. package/dist/bundle/{chunk-RNWUCAJJ.js → chunk-PVVSHDMQ.js} +7 -15
  16. package/dist/bundle/chunk-SV4CS5TA.js +76 -0
  17. package/dist/bundle/program-RA6QICVH.js +2352 -0
  18. package/dist/bundle/{instructions-4H7UREH2.js → source-C65ZJUTW.js} +5 -6
  19. package/dist/bundle/store-35UXUNVG.js +12 -0
  20. package/dist/bundle/writer-I7GBI3VE.js +12 -0
  21. package/dist/commands/account.js +1 -1
  22. package/dist/commands/api.js +1 -3
  23. package/dist/commands/crm-shared.js +2 -3
  24. package/dist/commands/schedule.js +1 -1
  25. package/dist/commands/session.js +1 -3
  26. package/dist/commands/write.js +1 -2
  27. package/dist/config.js +1 -2
  28. package/dist/context.js +1 -2
  29. package/dist/crm/activities.js +1 -1
  30. package/dist/crm/records.js +1 -1
  31. package/dist/crm/source.js +1 -1
  32. package/dist/crm/writer.js +1 -1
  33. package/dist/identity.js +4 -0
  34. package/dist/program.js +1 -2
  35. package/dist/setup/flow.js +1 -1
  36. package/dist/store.js +1 -1
  37. package/dist/version.js +1 -1
  38. package/dist/whoami.js +1 -1
  39. package/package.json +3 -3
  40. package/scenarios/first-sync.md +13 -11
  41. package/scenarios/keep-in-sync.md +7 -6
  42. package/scenarios/safe-agent-writes.md +10 -9
  43. package/dist/amo/account.d.ts +0 -18
  44. package/dist/amo/account.d.ts.map +0 -1
  45. package/dist/amo/account.js.map +0 -1
  46. package/dist/amo/allow-list.d.ts +0 -31
  47. package/dist/amo/allow-list.d.ts.map +0 -1
  48. package/dist/amo/allow-list.js.map +0 -1
  49. package/dist/amo/button.d.ts +0 -53
  50. package/dist/amo/button.d.ts.map +0 -1
  51. package/dist/amo/button.js.map +0 -1
  52. package/dist/amo/errors.d.ts +0 -12
  53. package/dist/amo/errors.d.ts.map +0 -1
  54. package/dist/amo/errors.js.map +0 -1
  55. package/dist/amo/json.d.ts +0 -3
  56. package/dist/amo/json.d.ts.map +0 -1
  57. package/dist/amo/json.js.map +0 -1
  58. package/dist/amo/oauth.d.ts +0 -64
  59. package/dist/amo/oauth.d.ts.map +0 -1
  60. package/dist/amo/oauth.js.map +0 -1
  61. package/dist/amo/operation.d.ts +0 -45
  62. package/dist/amo/operation.d.ts.map +0 -1
  63. package/dist/amo/operation.js.map +0 -1
  64. package/dist/amo/operations.d.ts +0 -3
  65. package/dist/amo/operations.d.ts.map +0 -1
  66. package/dist/amo/operations.js.map +0 -1
  67. package/dist/amo/routes.d.ts +0 -67
  68. package/dist/amo/routes.d.ts.map +0 -1
  69. package/dist/amo/routes.js.map +0 -1
  70. package/dist/amo/transport.d.ts +0 -62
  71. package/dist/amo/transport.d.ts.map +0 -1
  72. package/dist/amo/transport.js.map +0 -1
  73. package/dist/api-keys.d.ts +0 -47
  74. package/dist/api-keys.d.ts.map +0 -1
  75. package/dist/api-keys.js.map +0 -1
  76. package/dist/bin/amo.d.ts +0 -3
  77. package/dist/bin/amo.d.ts.map +0 -1
  78. package/dist/bin/amo.js.map +0 -1
  79. package/dist/bundle/agent-VVACEKSX.js +0 -42
  80. package/dist/bundle/all-profiles-QNUKL4NA.js +0 -320
  81. package/dist/bundle/anthropic-PQN6MNP7.js +0 -90
  82. package/dist/bundle/app-server-Q2QEA7GP.js +0 -258
  83. package/dist/bundle/areas-27FRPBF3.js +0 -71
  84. package/dist/bundle/bun-F4M4KCNA.js +0 -169
  85. package/dist/bundle/bun-sqlite-P5IDBDVR.js +0 -75
  86. package/dist/bundle/chunk-22KAQPX7.js +0 -58
  87. package/dist/bundle/chunk-2JGNMZ55.js +0 -338
  88. package/dist/bundle/chunk-2VDHC7QO.js +0 -288
  89. package/dist/bundle/chunk-34ZOMVUK.js +0 -185
  90. package/dist/bundle/chunk-3J3EDSXF.js +0 -1939
  91. package/dist/bundle/chunk-3TYER5IK.js +0 -80
  92. package/dist/bundle/chunk-5NGLCDYQ.js +0 -106
  93. package/dist/bundle/chunk-5SQTHOBI.js +0 -12313
  94. package/dist/bundle/chunk-6GE36KUE.js +0 -360
  95. package/dist/bundle/chunk-6GZKY3HV.js +0 -3752
  96. package/dist/bundle/chunk-6OV2TRGF.js +0 -362
  97. package/dist/bundle/chunk-7CPIZFOE.js +0 -460
  98. package/dist/bundle/chunk-A5K2NU3K.js +0 -37780
  99. package/dist/bundle/chunk-ADLS6FVG.js +0 -24600
  100. package/dist/bundle/chunk-AEC4H5WZ.js +0 -259
  101. package/dist/bundle/chunk-APBEDWOE.js +0 -1718
  102. package/dist/bundle/chunk-AQ5RIOUE.js +0 -633
  103. package/dist/bundle/chunk-B7L5MSRP.js +0 -136
  104. package/dist/bundle/chunk-C7JPYWYQ.js +0 -77
  105. package/dist/bundle/chunk-D72URWJE.js +0 -532
  106. package/dist/bundle/chunk-DFDN6AUB.js +0 -21
  107. package/dist/bundle/chunk-DIZEHPS6.js +0 -1347
  108. package/dist/bundle/chunk-DNCLQPOM.js +0 -7
  109. package/dist/bundle/chunk-DPV53EZC.js +0 -206
  110. package/dist/bundle/chunk-DUPCDJ3W.js +0 -357
  111. package/dist/bundle/chunk-DWT24UVR.js +0 -388
  112. package/dist/bundle/chunk-DXWJORSY.js +0 -1703
  113. package/dist/bundle/chunk-DY3PLWIH.js +0 -332
  114. package/dist/bundle/chunk-DYWHAJRK.js +0 -1259
  115. package/dist/bundle/chunk-EH6ZEJGT.js +0 -932
  116. package/dist/bundle/chunk-EXRM3ML4.js +0 -76
  117. package/dist/bundle/chunk-FFER7KJI.js +0 -407
  118. package/dist/bundle/chunk-FIP2DG7W.js +0 -64
  119. package/dist/bundle/chunk-FTH6WGYO.js +0 -24
  120. package/dist/bundle/chunk-FWRLGIF6.js +0 -5304
  121. package/dist/bundle/chunk-G3N2RHGF.js +0 -738
  122. package/dist/bundle/chunk-G46PNDWL.js +0 -58
  123. package/dist/bundle/chunk-G6NY7LFB.js +0 -230
  124. package/dist/bundle/chunk-GRGCZSES.js +0 -1007
  125. package/dist/bundle/chunk-GVSKLZRD.js +0 -30
  126. package/dist/bundle/chunk-GZ7WBU5Y.js +0 -18
  127. package/dist/bundle/chunk-HN2LCLGT.js +0 -1068
  128. package/dist/bundle/chunk-HO4JGD4Q.js +0 -16
  129. package/dist/bundle/chunk-HOF7GQWW.js +0 -142
  130. package/dist/bundle/chunk-HUAHLO6N.js +0 -29
  131. package/dist/bundle/chunk-IDCZ4LWS.js +0 -150
  132. package/dist/bundle/chunk-IN3VL7UU.js +0 -560
  133. package/dist/bundle/chunk-ISQ23VKV.js +0 -123
  134. package/dist/bundle/chunk-JVBCQHCS.js +0 -80
  135. package/dist/bundle/chunk-K5W7YEHB.js +0 -9541
  136. package/dist/bundle/chunk-KAFSS35C.js +0 -193
  137. package/dist/bundle/chunk-KLRCTMES.js +0 -100
  138. package/dist/bundle/chunk-KYRYD4CR.js +0 -38
  139. package/dist/bundle/chunk-LBZSURLL.js +0 -798
  140. package/dist/bundle/chunk-LC7ZD2RW.js +0 -92
  141. package/dist/bundle/chunk-LH6FJYMO.js +0 -334
  142. package/dist/bundle/chunk-LJKINNWC.js +0 -209
  143. package/dist/bundle/chunk-M36XP74N.js +0 -86
  144. package/dist/bundle/chunk-MNPGZCKE.js +0 -361
  145. package/dist/bundle/chunk-MRPMORLH.js +0 -353
  146. package/dist/bundle/chunk-NNREILWP.js +0 -189
  147. package/dist/bundle/chunk-NSOY4FMN.js +0 -159
  148. package/dist/bundle/chunk-OEEWVKJX.js +0 -53
  149. package/dist/bundle/chunk-OGJFDKDL.js +0 -161
  150. package/dist/bundle/chunk-PATZAYFZ.js +0 -453
  151. package/dist/bundle/chunk-PCR6GFNP.js +0 -1171
  152. package/dist/bundle/chunk-PL5P7UKW.js +0 -25216
  153. package/dist/bundle/chunk-Q4MH2O5E.js +0 -108
  154. package/dist/bundle/chunk-QFOP3KUP.js +0 -2603
  155. package/dist/bundle/chunk-QQRJEWKB.js +0 -1197
  156. package/dist/bundle/chunk-S6JG4YUH.js +0 -72
  157. package/dist/bundle/chunk-SDVUGWD7.js +0 -614
  158. package/dist/bundle/chunk-SEFE6PGL.js +0 -218
  159. package/dist/bundle/chunk-SYRDEMQE.js +0 -68141
  160. package/dist/bundle/chunk-SYYQZDHJ.js +0 -95
  161. package/dist/bundle/chunk-T3W4V4A6.js +0 -63
  162. package/dist/bundle/chunk-TCT5D2X2.js +0 -6848
  163. package/dist/bundle/chunk-TES7MB6I.js +0 -82
  164. package/dist/bundle/chunk-TXDR6YSF.js +0 -23
  165. package/dist/bundle/chunk-TY7NDMFY.js +0 -46
  166. package/dist/bundle/chunk-U6XPWCWM.js +0 -133
  167. package/dist/bundle/chunk-UFKC7TIX.js +0 -28404
  168. package/dist/bundle/chunk-UNWF3TH5.js +0 -274
  169. package/dist/bundle/chunk-W3BOR6AT.js +0 -2333
  170. package/dist/bundle/chunk-WIHN3ELW.js +0 -2793
  171. package/dist/bundle/chunk-X76RS6JO.js +0 -1043
  172. package/dist/bundle/chunk-Y5E2WNWB.js +0 -35
  173. package/dist/bundle/chunk-YF3S26TS.js +0 -4172
  174. package/dist/bundle/chunk-ZCQ4H7CA.js +0 -54
  175. package/dist/bundle/chunk-ZOZV32IR.js +0 -170
  176. package/dist/bundle/chunk-ZTKHXDEU.js +0 -52
  177. package/dist/bundle/chunk-ZVVMGPBJ.js +0 -50
  178. package/dist/bundle/cli-EAD3WZLR.js +0 -1254
  179. package/dist/bundle/command-contract-SMEJ2ICG.js +0 -40
  180. package/dist/bundle/command-server-entry-YTZP6I4T.js +0 -169
  181. package/dist/bundle/decode-57BE5OBT.js +0 -296
  182. package/dist/bundle/dispatch-56FECRCU.js +0 -411
  183. package/dist/bundle/dist-PAKDDIBT.js +0 -191
  184. package/dist/bundle/dist-T54K3FJV.js +0 -7577
  185. package/dist/bundle/echarts-QMAA7HH5.js +0 -42501
  186. package/dist/bundle/embed-NFGFYUO4.js +0 -37
  187. package/dist/bundle/embedder-SRBOJMXX.js +0 -110
  188. package/dist/bundle/failure-WDSX6H3B.js +0 -24
  189. package/dist/bundle/first-run-HWRUL2GR.js +0 -28
  190. package/dist/bundle/first-screen-ATN4D3FQ.js +0 -41
  191. package/dist/bundle/mcp-5HFPWC3W.js +0 -167
  192. package/dist/bundle/meeting-combined-BGDEHCWY.js +0 -26
  193. package/dist/bundle/meeting-model-WWGVRXPL.js +0 -24
  194. package/dist/bundle/meeting-semantic-ZQ47BL2Z.js +0 -21
  195. package/dist/bundle/node-P3PUHKYH.js +0 -176
  196. package/dist/bundle/node-P4E63KXA.js +0 -2340
  197. package/dist/bundle/node-TLZSIHIJ.js +0 -21
  198. package/dist/bundle/node-sqlite-JOTSNH3P.js +0 -73
  199. package/dist/bundle/oauth-XPSAL6VO.js +0 -19
  200. package/dist/bundle/open-PO52FVA5.js +0 -22
  201. package/dist/bundle/openai-WITYLMY5.js +0 -237
  202. package/dist/bundle/process-AFIXYXWL.js +0 -91
  203. package/dist/bundle/program-JODTZNBZ.js +0 -4920
  204. package/dist/bundle/prompt-XORLAXHY.js +0 -16
  205. package/dist/bundle/recognize-JKMZHDYS.js +0 -25
  206. package/dist/bundle/remote-3IMEJTEH.js +0 -30
  207. package/dist/bundle/rerank-3F2E6NNN.js +0 -51
  208. package/dist/bundle/serve-6BWU3NMB.js +0 -198
  209. package/dist/bundle/server-GPSB5WFG.js +0 -220
  210. package/dist/bundle/server-HMCC64ZU.js +0 -88
  211. package/dist/bundle/source-E72OS27D.js +0 -47
  212. package/dist/bundle/sqlite-runtime-YHYQDUXE.js +0 -19
  213. package/dist/bundle/state-R7W4U6T4.js +0 -35
  214. package/dist/bundle/store-HTVRL7FB.js +0 -312
  215. package/dist/bundle/store-IWW6U6QN.js +0 -34
  216. package/dist/bundle/store-TBZ3ZS6H.js +0 -186
  217. package/dist/bundle/store-maintenance-command-CJM2VLMW.js +0 -75
  218. package/dist/bundle/surface-5GBWNYBE.js +0 -74
  219. package/dist/bundle/writer-TW2Q55VJ.js +0 -49
  220. package/dist/commands/account.d.ts +0 -4
  221. package/dist/commands/account.d.ts.map +0 -1
  222. package/dist/commands/account.js.map +0 -1
  223. package/dist/commands/api.d.ts +0 -3
  224. package/dist/commands/api.d.ts.map +0 -1
  225. package/dist/commands/api.js.map +0 -1
  226. package/dist/commands/crm-shared.d.ts +0 -8
  227. package/dist/commands/crm-shared.d.ts.map +0 -1
  228. package/dist/commands/crm-shared.js.map +0 -1
  229. package/dist/commands/schedule.d.ts +0 -3
  230. package/dist/commands/schedule.d.ts.map +0 -1
  231. package/dist/commands/schedule.js.map +0 -1
  232. package/dist/commands/session.d.ts +0 -35
  233. package/dist/commands/session.d.ts.map +0 -1
  234. package/dist/commands/session.js.map +0 -1
  235. package/dist/commands/write.d.ts +0 -14
  236. package/dist/commands/write.d.ts.map +0 -1
  237. package/dist/commands/write.js.map +0 -1
  238. package/dist/config.d.ts +0 -4
  239. package/dist/config.d.ts.map +0 -1
  240. package/dist/config.js.map +0 -1
  241. package/dist/context.d.ts +0 -62
  242. package/dist/context.d.ts.map +0 -1
  243. package/dist/context.js.map +0 -1
  244. package/dist/crm/activities.d.ts +0 -32
  245. package/dist/crm/activities.d.ts.map +0 -1
  246. package/dist/crm/activities.js.map +0 -1
  247. package/dist/crm/records.d.ts +0 -20
  248. package/dist/crm/records.d.ts.map +0 -1
  249. package/dist/crm/records.js.map +0 -1
  250. package/dist/crm/source.d.ts +0 -41
  251. package/dist/crm/source.d.ts.map +0 -1
  252. package/dist/crm/source.js.map +0 -1
  253. package/dist/crm/writer.d.ts +0 -14
  254. package/dist/crm/writer.d.ts.map +0 -1
  255. package/dist/crm/writer.js.map +0 -1
  256. package/dist/identity.d.ts +0 -7
  257. package/dist/identity.d.ts.map +0 -1
  258. package/dist/identity.js.map +0 -1
  259. package/dist/index.d.ts +0 -3
  260. package/dist/index.d.ts.map +0 -1
  261. package/dist/index.js.map +0 -1
  262. package/dist/program.d.ts +0 -6
  263. package/dist/program.d.ts.map +0 -1
  264. package/dist/program.js.map +0 -1
  265. package/dist/reasons.d.ts +0 -10
  266. package/dist/reasons.d.ts.map +0 -1
  267. package/dist/reasons.js.map +0 -1
  268. package/dist/setup/flow.d.ts +0 -2
  269. package/dist/setup/flow.d.ts.map +0 -1
  270. package/dist/setup/flow.js.map +0 -1
  271. package/dist/store.d.ts +0 -15
  272. package/dist/store.d.ts.map +0 -1
  273. package/dist/store.js.map +0 -1
  274. package/dist/version.d.ts +0 -2
  275. package/dist/version.d.ts.map +0 -1
  276. package/dist/version.js.map +0 -1
  277. package/dist/wcat.d.ts +0 -3
  278. package/dist/wcat.d.ts.map +0 -1
  279. package/dist/wcat.js.map +0 -1
  280. package/dist/whoami.d.ts +0 -24
  281. package/dist/whoami.d.ts.map +0 -1
  282. package/dist/whoami.js.map +0 -1
@@ -1,2333 +0,0 @@
1
- import { createRequire as __bundleRequire } from "node:module";
2
- const require = __bundleRequire(import.meta.url);
3
- import {
4
- normalize
5
- } from "./chunk-HO4JGD4Q.js";
6
- import {
7
- CliError
8
- } from "./chunk-S6JG4YUH.js";
9
- import {
10
- __name
11
- } from "./chunk-ZVVMGPBJ.js";
12
-
13
- // 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/languages.js
14
- var LANGUAGES = [
15
- { name: "russian", code: "ru", label: "Russian", script: "cyrillic", dictionary: "dictionary-ru" },
16
- { name: "english", code: "en", label: "English", script: "latin", dictionary: "dictionary-en" },
17
- { name: "spanish", code: "es", label: "Spanish", script: "latin", dictionary: "dictionary-es" }
18
- ];
19
- var languagesOf = /* @__PURE__ */ __name((script) => LANGUAGES.filter((one) => one.script === script).map(({ name }) => name), "languagesOf");
20
-
21
- // 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/snowball/base-stemmer.js
22
- var BaseStemmer = class {
23
- static {
24
- __name(this, "BaseStemmer");
25
- }
26
- constructor() {
27
- this.current = "";
28
- this.c = 0;
29
- this.limit = 0;
30
- this.limit_backward = 0;
31
- this.bra = 0;
32
- this.ket = 0;
33
- this.af = 0;
34
- }
35
- /**
36
- * @param {string} value
37
- */
38
- setCurrent(value) {
39
- this.current = value;
40
- this.c = 0;
41
- this.limit = this.current.length;
42
- this.limit_backward = 0;
43
- this.bra = this.c;
44
- this.ket = this.limit;
45
- }
46
- /**
47
- * @return {string}
48
- */
49
- getCurrent() {
50
- return this.current;
51
- }
52
- /**
53
- * @param {BaseStemmer} other
54
- */
55
- copy_from(other) {
56
- this.current = other.current;
57
- this.c = other.c;
58
- this.limit = other.limit;
59
- this.limit_backward = other.limit_backward;
60
- this.bra = other.bra;
61
- this.ket = other.ket;
62
- }
63
- /**
64
- * @param {Array<number>} s
65
- * @param {number} min
66
- * @param {number} max
67
- * @return {boolean}
68
- */
69
- in_grouping(s, min, max) {
70
- if (this.c >= this.limit) return false;
71
- let ch = this.current.charCodeAt(this.c);
72
- if (ch > max || ch < min) return false;
73
- ch -= min;
74
- if ((s[ch >>> 3] & 1 << (ch & 7)) === 0) return false;
75
- this.c++;
76
- return true;
77
- }
78
- /**
79
- * @param {Array<number>} s
80
- * @param {number} min
81
- * @param {number} max
82
- * @return {boolean}
83
- */
84
- go_in_grouping(s, min, max) {
85
- while (this.c < this.limit) {
86
- let ch = this.current.charCodeAt(this.c);
87
- if (ch > max || ch < min)
88
- return true;
89
- ch -= min;
90
- if ((s[ch >>> 3] & 1 << (ch & 7)) === 0)
91
- return true;
92
- this.c++;
93
- }
94
- return false;
95
- }
96
- /**
97
- * @param {Array<number>} s
98
- * @param {number} min
99
- * @param {number} max
100
- * @return {boolean}
101
- */
102
- in_grouping_b(s, min, max) {
103
- if (this.c <= this.limit_backward) return false;
104
- let ch = this.current.charCodeAt(this.c - 1);
105
- if (ch > max || ch < min) return false;
106
- ch -= min;
107
- if ((s[ch >>> 3] & 1 << (ch & 7)) === 0) return false;
108
- this.c--;
109
- return true;
110
- }
111
- /**
112
- * @param {Array<number>} s
113
- * @param {number} min
114
- * @param {number} max
115
- * @return {boolean}
116
- */
117
- go_in_grouping_b(s, min, max) {
118
- while (this.c > this.limit_backward) {
119
- let ch = this.current.charCodeAt(this.c - 1);
120
- if (ch > max || ch < min) return true;
121
- ch -= min;
122
- if ((s[ch >>> 3] & 1 << (ch & 7)) === 0) return true;
123
- this.c--;
124
- }
125
- return false;
126
- }
127
- /**
128
- * @param {Array<number>} s
129
- * @param {number} min
130
- * @param {number} max
131
- * @return {boolean}
132
- */
133
- out_grouping(s, min, max) {
134
- if (this.c >= this.limit) return false;
135
- let ch = this.current.charCodeAt(this.c);
136
- if (ch > max || ch < min) {
137
- this.c++;
138
- return true;
139
- }
140
- ch -= min;
141
- if ((s[ch >>> 3] & 1 << (ch & 7)) === 0) {
142
- this.c++;
143
- return true;
144
- }
145
- return false;
146
- }
147
- /**
148
- * @param {Array<number>} s
149
- * @param {number} min
150
- * @param {number} max
151
- * @return {boolean}
152
- */
153
- go_out_grouping(s, min, max) {
154
- while (this.c < this.limit) {
155
- let ch = this.current.charCodeAt(this.c);
156
- if (ch <= max && ch >= min) {
157
- ch -= min;
158
- if ((s[ch >>> 3] & 1 << (ch & 7)) !== 0) {
159
- return true;
160
- }
161
- }
162
- this.c++;
163
- }
164
- return false;
165
- }
166
- /**
167
- * @param {Array<number>} s
168
- * @param {number} min
169
- * @param {number} max
170
- * @return {boolean}
171
- */
172
- out_grouping_b(s, min, max) {
173
- if (this.c <= this.limit_backward) return false;
174
- let ch = this.current.charCodeAt(this.c - 1);
175
- if (ch > max || ch < min) {
176
- this.c--;
177
- return true;
178
- }
179
- ch -= min;
180
- if ((s[ch >>> 3] & 1 << (ch & 7)) === 0) {
181
- this.c--;
182
- return true;
183
- }
184
- return false;
185
- }
186
- /**
187
- * @param {Array<number>} s
188
- * @param {number} min
189
- * @param {number} max
190
- * @return {boolean}
191
- */
192
- go_out_grouping_b(s, min, max) {
193
- while (this.c > this.limit_backward) {
194
- let ch = this.current.charCodeAt(this.c - 1);
195
- if (ch <= max && ch >= min) {
196
- ch -= min;
197
- if ((s[ch >>> 3] & 1 << (ch & 7)) !== 0) {
198
- return true;
199
- }
200
- }
201
- this.c--;
202
- }
203
- return false;
204
- }
205
- /**
206
- * @param {string} s
207
- * @return {boolean}
208
- */
209
- eq_s(s) {
210
- if (this.limit - this.c < s.length) return false;
211
- if (!this.current.startsWith(s, this.c)) return false;
212
- this.c += s.length;
213
- return true;
214
- }
215
- /**
216
- * @param {string} s
217
- * @return {boolean}
218
- */
219
- eq_s_b(s) {
220
- if (this.c - this.limit_backward < s.length) return false;
221
- if (!this.current.endsWith(s, this.c)) return false;
222
- this.c -= s.length;
223
- return true;
224
- }
225
- /**
226
- * @param {Array<Array<string|number>>} v
227
- * @param {?function(): boolean} call_among_func
228
- * @return {number}
229
- */
230
- find_among(v, call_among_func) {
231
- let i = 0;
232
- let j = v.length;
233
- const c = this.c;
234
- const l = this.limit;
235
- let common_i = 0;
236
- let common_j = 0;
237
- let first_key_inspected = false;
238
- while (true) {
239
- const k = i + (j - i >>> 1);
240
- let diff = 0;
241
- let common = common_i < common_j ? common_i : common_j;
242
- const w = v[k];
243
- let i2;
244
- for (i2 = common; i2 < w[0].length; i2++) {
245
- if (c + common === l) {
246
- diff = -1;
247
- break;
248
- }
249
- diff = this.current.charCodeAt(c + common) - w[0].charCodeAt(i2);
250
- if (diff !== 0) break;
251
- common++;
252
- }
253
- if (diff < 0) {
254
- j = k;
255
- common_j = common;
256
- } else {
257
- i = k;
258
- common_i = common;
259
- }
260
- if (j - i <= 1) {
261
- if (i > 0) break;
262
- if (j === i) break;
263
- if (first_key_inspected) break;
264
- first_key_inspected = true;
265
- }
266
- }
267
- while (true) {
268
- const w = v[i];
269
- if (common_i >= w[0].length) {
270
- this.c = c + w[0].length;
271
- if (w.length < 4) return w[1];
272
- this.af = w[3];
273
- if (call_among_func.call(this)) {
274
- this.c = c + w[0].length;
275
- return w[1];
276
- }
277
- }
278
- if (!w[2]) return 0;
279
- i -= w[2];
280
- }
281
- }
282
- // find_among_b is for backwards processing. Same comments apply
283
- /**
284
- * @param {Array<Array<string|number>>} v
285
- * @param {?function(): boolean} call_among_func
286
- */
287
- find_among_b(v, call_among_func) {
288
- let i = 0;
289
- let j = v.length;
290
- const c = this.c;
291
- const lb = this.limit_backward;
292
- let common_i = 0;
293
- let common_j = 0;
294
- let first_key_inspected = false;
295
- while (true) {
296
- const k = i + (j - i >> 1);
297
- let diff = 0;
298
- let common = common_i < common_j ? common_i : common_j;
299
- const w = v[k];
300
- let i2;
301
- for (i2 = w[0].length - 1 - common; i2 >= 0; i2--) {
302
- if (c - common === lb) {
303
- diff = -1;
304
- break;
305
- }
306
- diff = this.current.charCodeAt(c - 1 - common) - w[0].charCodeAt(i2);
307
- if (diff !== 0) break;
308
- common++;
309
- }
310
- if (diff < 0) {
311
- j = k;
312
- common_j = common;
313
- } else {
314
- i = k;
315
- common_i = common;
316
- }
317
- if (j - i <= 1) {
318
- if (i > 0) break;
319
- if (j === i) break;
320
- if (first_key_inspected) break;
321
- first_key_inspected = true;
322
- }
323
- }
324
- while (true) {
325
- const w = v[i];
326
- if (common_i >= w[0].length) {
327
- this.c = c - w[0].length;
328
- if (w.length < 4) return w[1];
329
- this.af = w[3];
330
- if (call_among_func.call(this)) {
331
- this.c = c - w[0].length;
332
- return w[1];
333
- }
334
- }
335
- if (!w[2]) return 0;
336
- i -= w[2];
337
- }
338
- }
339
- /* to replace chars between c_bra and c_ket in this.current by the
340
- * chars in s.
341
- */
342
- /**
343
- * @param {number} c_bra
344
- * @param {number} c_ket
345
- * @param {string} s
346
- * @return {number}
347
- */
348
- #replace_s(c_bra, c_ket, s) {
349
- const adjustment = s.length - (c_ket - c_bra);
350
- this.current = this.current.slice(0, c_bra) + s + this.current.slice(c_ket);
351
- this.limit += adjustment;
352
- if (this.c >= c_ket) this.c += adjustment;
353
- else if (this.c > c_bra) this.c = c_bra;
354
- return adjustment;
355
- }
356
- /**
357
- */
358
- #slice_check() {
359
- console.assert(this.bra >= 0);
360
- console.assert(this.bra <= this.ket);
361
- console.assert(this.ket <= this.limit);
362
- console.assert(this.limit <= this.current.length);
363
- }
364
- /**
365
- * @param {string} s
366
- */
367
- slice_from(s) {
368
- this.#slice_check();
369
- this.#replace_s(this.bra, this.ket, s);
370
- this.ket = this.bra + s.length;
371
- }
372
- /**
373
- */
374
- slice_del() {
375
- this.slice_from("");
376
- }
377
- /**
378
- * @param {number} c_bra
379
- * @param {number} c_ket
380
- * @param {string} s
381
- */
382
- insert(c_bra, c_ket, s) {
383
- const adjustment = this.#replace_s(c_bra, c_ket, s);
384
- if (c_bra <= this.bra) this.bra += adjustment;
385
- if (c_bra <= this.ket) this.ket += adjustment;
386
- }
387
- /**
388
- * @return {string}
389
- */
390
- slice_to() {
391
- this.#slice_check();
392
- return this.current.slice(this.bra, this.ket);
393
- }
394
- };
395
-
396
- // 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/snowball/english-stemmer.js
397
- var a_0 = [
398
- ["arsen", -1],
399
- ["commun", -1],
400
- ["emerg", -1],
401
- ["gener", -1],
402
- ["inter", -1],
403
- ["later", -1],
404
- ["organ", -1],
405
- ["past", -1],
406
- ["univers", -1]
407
- ];
408
- var a_1 = [
409
- ["'", 1],
410
- ["'s'", 1, 1],
411
- ["'s", 1]
412
- ];
413
- var a_2 = [
414
- ["ied", 2],
415
- ["s", 3],
416
- ["ies", 2, 1],
417
- ["sses", 1, 2],
418
- ["ss", -1, 3],
419
- ["us", -1, 4]
420
- ];
421
- var a_3 = [
422
- ["succ", 1],
423
- ["proc", 1],
424
- ["exc", 1]
425
- ];
426
- var a_4 = [
427
- ["even", 2],
428
- ["cann", 2],
429
- ["inn", 2],
430
- ["earr", 2],
431
- ["herr", 2],
432
- ["out", 2],
433
- ["y", 1]
434
- ];
435
- var a_5 = [
436
- ["", -1],
437
- ["ed", 2, 1],
438
- ["eed", 1, 1],
439
- ["ing", 3, 3],
440
- ["edly", 2, 4],
441
- ["eedly", 1, 1],
442
- ["ingly", 2, 6]
443
- ];
444
- var a_6 = [
445
- ["", 3],
446
- ["bb", 2, 1],
447
- ["dd", 2, 2],
448
- ["ff", 2, 3],
449
- ["gg", 2, 4],
450
- ["bl", 1, 5],
451
- ["mm", 2, 6],
452
- ["nn", 2, 7],
453
- ["pp", 2, 8],
454
- ["rr", 2, 9],
455
- ["at", 1, 10],
456
- ["tt", 2, 11],
457
- ["iz", 1, 12]
458
- ];
459
- var a_7 = [
460
- ["anci", 3],
461
- ["enci", 2],
462
- ["ogi", 14],
463
- ["li", 16],
464
- ["bli", 12, 1],
465
- ["abli", 4, 1],
466
- ["alli", 8, 3],
467
- ["fulli", 9, 4],
468
- ["lessli", 15, 5],
469
- ["ousli", 10, 6],
470
- ["entli", 5, 7],
471
- ["aliti", 8],
472
- ["biliti", 12],
473
- ["iviti", 11],
474
- ["tional", 1],
475
- ["ational", 7, 1],
476
- ["alism", 8],
477
- ["ation", 7],
478
- ["ization", 6, 1],
479
- ["izer", 6],
480
- ["ator", 7],
481
- ["iveness", 11],
482
- ["fulness", 9],
483
- ["ousness", 10],
484
- ["ogist", 13]
485
- ];
486
- var a_8 = [
487
- ["icate", 4],
488
- ["ative", 6],
489
- ["alize", 3],
490
- ["iciti", 4],
491
- ["ical", 4],
492
- ["tional", 1],
493
- ["ational", 2, 1],
494
- ["ful", 5],
495
- ["ness", 5]
496
- ];
497
- var a_9 = [
498
- ["ic", 1],
499
- ["ance", 1],
500
- ["ence", 1],
501
- ["able", 1],
502
- ["ible", 1],
503
- ["ate", 1],
504
- ["ive", 1],
505
- ["ize", 1],
506
- ["iti", 1],
507
- ["al", 1],
508
- ["ism", 1],
509
- ["ion", 2],
510
- ["er", 1],
511
- ["ous", 1],
512
- ["ant", 1],
513
- ["ent", 1],
514
- ["ment", 1, 1],
515
- ["ement", 1, 1]
516
- ];
517
- var a_10 = [
518
- ["e", 1],
519
- ["l", 2]
520
- ];
521
- var a_11 = [
522
- ["andes", -1],
523
- ["atlas", -1],
524
- ["bias", -1],
525
- ["cosmos", -1],
526
- ["early", 6],
527
- ["gently", 4],
528
- ["howe", -1],
529
- ["idly", 3],
530
- ["news", -1],
531
- ["only", 7],
532
- ["singly", 8],
533
- ["skies", 2],
534
- ["skis", 1],
535
- ["sky", -1],
536
- ["ugly", 5]
537
- ];
538
- var as_11 = ["ski", "sky", "idl", "gentl", "ugli", "earli", "onli", "singl"];
539
- var g_aeo = [17, 64];
540
- var g_v = [17, 65, 16, 1];
541
- var g_v_WXY = [1, 17, 65, 208, 1];
542
- var g_valid_LI = [55, 141, 2];
543
- var english_stemmer_default = class extends BaseStemmer {
544
- static {
545
- __name(this, "default");
546
- }
547
- #B_Y_found = false;
548
- #I_p2 = 0;
549
- #I_p1 = 0;
550
- /** @return {boolean} */
551
- #r_prelude() {
552
- this.#B_Y_found = false;
553
- const v_1 = this.c;
554
- lab0: {
555
- this.bra = this.c;
556
- if (!this.eq_s("'")) break lab0;
557
- this.ket = this.c;
558
- this.slice_del();
559
- }
560
- this.c = v_1;
561
- const v_2 = this.c;
562
- lab1: {
563
- this.bra = this.c;
564
- if (!this.eq_s("y")) break lab1;
565
- this.ket = this.c;
566
- this.slice_from("Y");
567
- this.#B_Y_found = true;
568
- }
569
- this.c = v_2;
570
- const v_3 = this.c;
571
- lab2: {
572
- while (true) {
573
- const v_4 = this.c;
574
- lab3: {
575
- golab4: while (true) {
576
- const v_5 = this.c;
577
- lab5: {
578
- if (!this.in_grouping(g_v, 97, 121)) break lab5;
579
- this.bra = this.c;
580
- if (!this.eq_s("y")) break lab5;
581
- this.ket = this.c;
582
- this.c = v_5;
583
- break golab4;
584
- }
585
- this.c = v_5;
586
- if (this.c >= this.limit) break lab3;
587
- this.c++;
588
- }
589
- this.slice_from("Y");
590
- this.#B_Y_found = true;
591
- continue;
592
- }
593
- this.c = v_4;
594
- break;
595
- }
596
- }
597
- this.c = v_3;
598
- return true;
599
- }
600
- /** @return {boolean} */
601
- #r_mark_regions() {
602
- this.#I_p1 = this.limit;
603
- this.#I_p2 = this.limit;
604
- const v_1 = this.c;
605
- lab0: {
606
- lab1: {
607
- const v_2 = this.c;
608
- lab2: {
609
- if (this.find_among(a_0) === 0) break lab2;
610
- break lab1;
611
- }
612
- this.c = v_2;
613
- if (!this.go_out_grouping(g_v, 97, 121)) break lab0;
614
- this.c++;
615
- if (!this.go_in_grouping(g_v, 97, 121)) break lab0;
616
- this.c++;
617
- }
618
- this.#I_p1 = this.c;
619
- if (!this.go_out_grouping(g_v, 97, 121)) break lab0;
620
- this.c++;
621
- if (!this.go_in_grouping(g_v, 97, 121)) break lab0;
622
- this.c++;
623
- this.#I_p2 = this.c;
624
- }
625
- this.c = v_1;
626
- return true;
627
- }
628
- /** @return {boolean} */
629
- #r_shortv() {
630
- lab0: {
631
- const v_1 = this.limit - this.c;
632
- lab1: {
633
- if (!this.out_grouping_b(g_v_WXY, 89, 121)) break lab1;
634
- if (!this.in_grouping_b(g_v, 97, 121)) break lab1;
635
- if (!this.out_grouping_b(g_v, 97, 121)) break lab1;
636
- break lab0;
637
- }
638
- this.c = this.limit - v_1;
639
- lab2: {
640
- if (!this.out_grouping_b(g_v, 97, 121)) break lab2;
641
- if (!this.in_grouping_b(g_v, 97, 121)) break lab2;
642
- if (this.c > this.limit_backward) break lab2;
643
- break lab0;
644
- }
645
- this.c = this.limit - v_1;
646
- if (!this.eq_s_b("past")) return false;
647
- }
648
- return true;
649
- }
650
- /** @return {boolean} */
651
- #r_R1() {
652
- return this.#I_p1 <= this.c;
653
- }
654
- /** @return {boolean} */
655
- #r_R2() {
656
- return this.#I_p2 <= this.c;
657
- }
658
- /** @return {boolean} */
659
- #r_Step_1a() {
660
- let a;
661
- const v_1 = this.limit - this.c;
662
- lab0: {
663
- this.ket = this.c;
664
- if (this.find_among_b(a_1) === 0) {
665
- this.c = this.limit - v_1;
666
- break lab0;
667
- }
668
- this.bra = this.c;
669
- this.slice_del();
670
- }
671
- this.ket = this.c;
672
- a = this.find_among_b(a_2);
673
- if (a === 0) return false;
674
- this.bra = this.c;
675
- switch (a) {
676
- case 1: {
677
- this.slice_from("ss");
678
- break;
679
- }
680
- case 2: {
681
- lab1: {
682
- const v_2 = this.limit - this.c;
683
- lab2: {
684
- if (this.c - 2 < this.limit_backward) break lab2;
685
- this.c -= 2;
686
- this.slice_from("i");
687
- break lab1;
688
- }
689
- this.c = this.limit - v_2;
690
- this.slice_from("ie");
691
- }
692
- break;
693
- }
694
- case 3: {
695
- if (this.c <= this.limit_backward) return false;
696
- this.c--;
697
- if (!this.go_out_grouping_b(g_v, 97, 121)) return false;
698
- this.c--;
699
- this.slice_del();
700
- break;
701
- }
702
- }
703
- return true;
704
- }
705
- /** @return {boolean} */
706
- #r_Step_1b() {
707
- let a;
708
- this.ket = this.c;
709
- a = this.find_among_b(a_5);
710
- this.bra = this.c;
711
- lab0: {
712
- const v_1 = this.limit - this.c;
713
- lab1: {
714
- switch (a) {
715
- case 1: {
716
- const v_2 = this.limit - this.c;
717
- lab2: {
718
- if (!this.#r_R1()) break lab2;
719
- lab3: {
720
- const v_3 = this.limit - this.c;
721
- lab4: {
722
- if (this.find_among_b(a_3) === 0) break lab4;
723
- if (this.c > this.limit_backward) break lab4;
724
- break lab3;
725
- }
726
- this.c = this.limit - v_3;
727
- this.slice_from("ee");
728
- }
729
- }
730
- this.c = this.limit - v_2;
731
- break;
732
- }
733
- case 2: {
734
- break lab1;
735
- }
736
- case 3: {
737
- a = this.find_among_b(a_4);
738
- if (a === 0) break lab1;
739
- switch (a) {
740
- case 1: {
741
- const v_4 = this.limit - this.c;
742
- if (!this.out_grouping_b(g_v, 97, 121)) break lab1;
743
- if (this.c > this.limit_backward) break lab1;
744
- this.c = this.limit - v_4;
745
- this.bra = this.c;
746
- this.slice_from("ie");
747
- break;
748
- }
749
- case 2: {
750
- if (this.c > this.limit_backward) break lab1;
751
- break;
752
- }
753
- }
754
- break;
755
- }
756
- }
757
- break lab0;
758
- }
759
- this.c = this.limit - v_1;
760
- const v_5 = this.limit - this.c;
761
- if (!this.go_out_grouping_b(g_v, 97, 121)) return false;
762
- this.c--;
763
- this.c = this.limit - v_5;
764
- this.slice_del();
765
- this.ket = this.c;
766
- this.bra = this.c;
767
- const v_6 = this.limit - this.c;
768
- a = this.find_among_b(a_6);
769
- switch (a) {
770
- case 1: {
771
- this.slice_from("e");
772
- return false;
773
- }
774
- case 2: {
775
- {
776
- const v_7 = this.limit - this.c;
777
- lab5: {
778
- if (!this.in_grouping_b(g_aeo, 97, 111)) break lab5;
779
- if (this.c > this.limit_backward) break lab5;
780
- return false;
781
- }
782
- this.c = this.limit - v_7;
783
- }
784
- break;
785
- }
786
- case 3: {
787
- if (this.c !== this.#I_p1) return false;
788
- const v_8 = this.limit - this.c;
789
- if (!this.#r_shortv()) return false;
790
- this.c = this.limit - v_8;
791
- this.slice_from("e");
792
- return false;
793
- }
794
- }
795
- this.c = this.limit - v_6;
796
- this.ket = this.c;
797
- if (this.c <= this.limit_backward) return false;
798
- this.c--;
799
- this.bra = this.c;
800
- this.slice_del();
801
- }
802
- return true;
803
- }
804
- /** @return {boolean} */
805
- #r_Step_1c() {
806
- this.ket = this.c;
807
- lab0: {
808
- lab1: {
809
- if (!this.eq_s_b("y")) break lab1;
810
- break lab0;
811
- }
812
- if (!this.eq_s_b("Y")) return false;
813
- }
814
- this.bra = this.c;
815
- if (!this.out_grouping_b(g_v, 97, 121)) return false;
816
- if (this.c <= this.limit_backward) return false;
817
- this.slice_from("i");
818
- return true;
819
- }
820
- /** @return {boolean} */
821
- #r_Step_2() {
822
- let a;
823
- this.ket = this.c;
824
- a = this.find_among_b(a_7);
825
- if (a === 0) return false;
826
- this.bra = this.c;
827
- if (!this.#r_R1()) return false;
828
- switch (a) {
829
- case 1: {
830
- this.slice_from("tion");
831
- break;
832
- }
833
- case 2: {
834
- this.slice_from("ence");
835
- break;
836
- }
837
- case 3: {
838
- this.slice_from("ance");
839
- break;
840
- }
841
- case 4: {
842
- this.slice_from("able");
843
- break;
844
- }
845
- case 5: {
846
- this.slice_from("ent");
847
- break;
848
- }
849
- case 6: {
850
- this.slice_from("ize");
851
- break;
852
- }
853
- case 7: {
854
- this.slice_from("ate");
855
- break;
856
- }
857
- case 8: {
858
- this.slice_from("al");
859
- break;
860
- }
861
- case 9: {
862
- this.slice_from("ful");
863
- break;
864
- }
865
- case 10: {
866
- this.slice_from("ous");
867
- break;
868
- }
869
- case 11: {
870
- this.slice_from("ive");
871
- break;
872
- }
873
- case 12: {
874
- this.slice_from("ble");
875
- break;
876
- }
877
- case 13: {
878
- this.slice_from("og");
879
- break;
880
- }
881
- case 14: {
882
- if (!this.eq_s_b("l")) return false;
883
- this.slice_from("og");
884
- break;
885
- }
886
- case 15: {
887
- this.slice_from("less");
888
- break;
889
- }
890
- case 16: {
891
- if (!this.in_grouping_b(g_valid_LI, 99, 116)) return false;
892
- this.slice_del();
893
- break;
894
- }
895
- }
896
- return true;
897
- }
898
- /** @return {boolean} */
899
- #r_Step_3() {
900
- let a;
901
- this.ket = this.c;
902
- a = this.find_among_b(a_8);
903
- if (a === 0) return false;
904
- this.bra = this.c;
905
- if (!this.#r_R1()) return false;
906
- switch (a) {
907
- case 1: {
908
- this.slice_from("tion");
909
- break;
910
- }
911
- case 2: {
912
- this.slice_from("ate");
913
- break;
914
- }
915
- case 3: {
916
- this.slice_from("al");
917
- break;
918
- }
919
- case 4: {
920
- this.slice_from("ic");
921
- break;
922
- }
923
- case 5: {
924
- this.slice_del();
925
- break;
926
- }
927
- case 6: {
928
- if (!this.#r_R2()) return false;
929
- this.slice_del();
930
- break;
931
- }
932
- }
933
- return true;
934
- }
935
- /** @return {boolean} */
936
- #r_Step_4() {
937
- let a;
938
- this.ket = this.c;
939
- a = this.find_among_b(a_9);
940
- if (a === 0) return false;
941
- this.bra = this.c;
942
- if (!this.#r_R2()) return false;
943
- switch (a) {
944
- case 1: {
945
- this.slice_del();
946
- break;
947
- }
948
- case 2: {
949
- lab0: {
950
- lab1: {
951
- if (!this.eq_s_b("s")) break lab1;
952
- break lab0;
953
- }
954
- if (!this.eq_s_b("t")) return false;
955
- }
956
- this.slice_del();
957
- break;
958
- }
959
- }
960
- return true;
961
- }
962
- /** @return {boolean} */
963
- #r_Step_5() {
964
- let a;
965
- this.ket = this.c;
966
- a = this.find_among_b(a_10);
967
- if (a === 0) return false;
968
- this.bra = this.c;
969
- switch (a) {
970
- case 1: {
971
- lab0: {
972
- lab1: {
973
- if (!this.#r_R2()) break lab1;
974
- break lab0;
975
- }
976
- if (!this.#r_R1()) return false;
977
- {
978
- const v_1 = this.limit - this.c;
979
- lab2: {
980
- if (!this.#r_shortv()) break lab2;
981
- return false;
982
- }
983
- this.c = this.limit - v_1;
984
- }
985
- }
986
- this.slice_del();
987
- break;
988
- }
989
- case 2: {
990
- if (!this.#r_R2()) return false;
991
- if (!this.eq_s_b("l")) return false;
992
- this.slice_del();
993
- break;
994
- }
995
- }
996
- return true;
997
- }
998
- /** @return {boolean} */
999
- #r_exception1() {
1000
- let a;
1001
- this.bra = this.c;
1002
- a = this.find_among(a_11);
1003
- if (a === 0) return false;
1004
- this.ket = this.c;
1005
- if (this.c < this.limit) return false;
1006
- if (a > 0) {
1007
- this.slice_from(as_11[a - 1]);
1008
- }
1009
- return true;
1010
- }
1011
- /** @return {boolean} */
1012
- #r_postlude() {
1013
- if (!this.#B_Y_found) return false;
1014
- while (true) {
1015
- const v_1 = this.c;
1016
- lab0: {
1017
- golab1: while (true) {
1018
- const v_2 = this.c;
1019
- lab2: {
1020
- this.bra = this.c;
1021
- if (!this.eq_s("Y")) break lab2;
1022
- this.ket = this.c;
1023
- this.c = v_2;
1024
- break golab1;
1025
- }
1026
- this.c = v_2;
1027
- if (this.c >= this.limit) break lab0;
1028
- this.c++;
1029
- }
1030
- this.slice_from("y");
1031
- continue;
1032
- }
1033
- this.c = v_1;
1034
- break;
1035
- }
1036
- return true;
1037
- }
1038
- /** @return {boolean} */
1039
- #stem() {
1040
- lab0: {
1041
- const v_1 = this.c;
1042
- lab1: {
1043
- if (!this.#r_exception1()) break lab1;
1044
- break lab0;
1045
- }
1046
- this.c = v_1;
1047
- lab2: {
1048
- lab3: {
1049
- if (this.c + 3 > this.limit) break lab3;
1050
- this.c += 3;
1051
- break lab2;
1052
- }
1053
- break lab0;
1054
- }
1055
- this.c = v_1;
1056
- this.#r_prelude();
1057
- this.#r_mark_regions();
1058
- this.limit_backward = this.c;
1059
- this.c = this.limit;
1060
- const v_2 = this.limit - this.c;
1061
- this.#r_Step_1a();
1062
- this.c = this.limit - v_2;
1063
- const v_3 = this.limit - this.c;
1064
- this.#r_Step_1b();
1065
- this.c = this.limit - v_3;
1066
- const v_4 = this.limit - this.c;
1067
- this.#r_Step_1c();
1068
- this.c = this.limit - v_4;
1069
- const v_5 = this.limit - this.c;
1070
- this.#r_Step_2();
1071
- this.c = this.limit - v_5;
1072
- const v_6 = this.limit - this.c;
1073
- this.#r_Step_3();
1074
- this.c = this.limit - v_6;
1075
- const v_7 = this.limit - this.c;
1076
- this.#r_Step_4();
1077
- this.c = this.limit - v_7;
1078
- const v_8 = this.limit - this.c;
1079
- this.#r_Step_5();
1080
- this.c = this.limit - v_8;
1081
- this.c = this.limit_backward;
1082
- const v_9 = this.c;
1083
- this.#r_postlude();
1084
- this.c = v_9;
1085
- }
1086
- return true;
1087
- }
1088
- /**@return{string}*/
1089
- stem(input) {
1090
- this.setCurrent(input);
1091
- this.#stem();
1092
- return this.getCurrent();
1093
- }
1094
- stemWord = this.stem;
1095
- };
1096
-
1097
- // 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/snowball/russian-stemmer.js
1098
- var a_02 = [
1099
- ["\u0432", 1],
1100
- ["\u0438\u0432", 2, 1],
1101
- ["\u044B\u0432", 2, 2],
1102
- ["\u0432\u0448\u0438", 1],
1103
- ["\u0438\u0432\u0448\u0438", 2, 1],
1104
- ["\u044B\u0432\u0448\u0438", 2, 2],
1105
- ["\u0432\u0448\u0438\u0441\u044C", 1],
1106
- ["\u0438\u0432\u0448\u0438\u0441\u044C", 2, 1],
1107
- ["\u044B\u0432\u0448\u0438\u0441\u044C", 2, 2]
1108
- ];
1109
- var a_12 = [
1110
- ["\u0435\u0435", 1],
1111
- ["\u0438\u0435", 1],
1112
- ["\u043E\u0435", 1],
1113
- ["\u044B\u0435", 1],
1114
- ["\u0438\u043C\u0438", 1],
1115
- ["\u044B\u043C\u0438", 1],
1116
- ["\u0435\u0439", 1],
1117
- ["\u0438\u0439", 1],
1118
- ["\u043E\u0439", 1],
1119
- ["\u044B\u0439", 1],
1120
- ["\u0435\u043C", 1],
1121
- ["\u0438\u043C", 1],
1122
- ["\u043E\u043C", 1],
1123
- ["\u044B\u043C", 1],
1124
- ["\u0435\u0433\u043E", 1],
1125
- ["\u043E\u0433\u043E", 1],
1126
- ["\u0435\u043C\u0443", 1],
1127
- ["\u043E\u043C\u0443", 1],
1128
- ["\u0438\u0445", 1],
1129
- ["\u044B\u0445", 1],
1130
- ["\u0435\u044E", 1],
1131
- ["\u043E\u044E", 1],
1132
- ["\u0443\u044E", 1],
1133
- ["\u044E\u044E", 1],
1134
- ["\u0430\u044F", 1],
1135
- ["\u044F\u044F", 1]
1136
- ];
1137
- var a_22 = [
1138
- ["\u0435\u043C", 1],
1139
- ["\u043D\u043D", 1],
1140
- ["\u0432\u0448", 1],
1141
- ["\u0438\u0432\u0448", 2, 1],
1142
- ["\u044B\u0432\u0448", 2, 2],
1143
- ["\u0449", 1],
1144
- ["\u044E\u0449", 1, 1],
1145
- ["\u0443\u044E\u0449", 2, 1]
1146
- ];
1147
- var a_32 = [
1148
- ["\u0441\u044C", 1],
1149
- ["\u0441\u044F", 1]
1150
- ];
1151
- var a_42 = [
1152
- ["\u043B\u0430", 1],
1153
- ["\u0438\u043B\u0430", 2, 1],
1154
- ["\u044B\u043B\u0430", 2, 2],
1155
- ["\u043D\u0430", 1],
1156
- ["\u0435\u043D\u0430", 2, 1],
1157
- ["\u0435\u0442\u0435", 1],
1158
- ["\u0438\u0442\u0435", 2],
1159
- ["\u0439\u0442\u0435", 1],
1160
- ["\u0435\u0439\u0442\u0435", 2, 1],
1161
- ["\u0443\u0439\u0442\u0435", 2, 2],
1162
- ["\u043B\u0438", 1],
1163
- ["\u0438\u043B\u0438", 2, 1],
1164
- ["\u044B\u043B\u0438", 2, 2],
1165
- ["\u0439", 1],
1166
- ["\u0435\u0439", 2, 1],
1167
- ["\u0443\u0439", 2, 2],
1168
- ["\u043B", 1],
1169
- ["\u0438\u043B", 2, 1],
1170
- ["\u044B\u043B", 2, 2],
1171
- ["\u0435\u043C", 1],
1172
- ["\u0438\u043C", 2],
1173
- ["\u044B\u043C", 2],
1174
- ["\u043D", 1],
1175
- ["\u0435\u043D", 2, 1],
1176
- ["\u043B\u043E", 1],
1177
- ["\u0438\u043B\u043E", 2, 1],
1178
- ["\u044B\u043B\u043E", 2, 2],
1179
- ["\u043D\u043E", 1],
1180
- ["\u0435\u043D\u043E", 2, 1],
1181
- ["\u043D\u043D\u043E", 1, 2],
1182
- ["\u0435\u0442", 1],
1183
- ["\u0443\u0435\u0442", 2, 1],
1184
- ["\u0438\u0442", 2],
1185
- ["\u044B\u0442", 2],
1186
- ["\u044E\u0442", 1],
1187
- ["\u0443\u044E\u0442", 2, 1],
1188
- ["\u044F\u0442", 2],
1189
- ["\u043D\u044B", 1],
1190
- ["\u0435\u043D\u044B", 2, 1],
1191
- ["\u0442\u044C", 1],
1192
- ["\u0438\u0442\u044C", 2, 1],
1193
- ["\u044B\u0442\u044C", 2, 2],
1194
- ["\u0435\u0448\u044C", 1],
1195
- ["\u0438\u0448\u044C", 2],
1196
- ["\u044E", 2],
1197
- ["\u0443\u044E", 2, 1]
1198
- ];
1199
- var a_52 = [
1200
- ["\u0430", 1],
1201
- ["\u0435\u0432", 1],
1202
- ["\u043E\u0432", 1],
1203
- ["\u0435", 1],
1204
- ["\u0438\u0435", 1, 1],
1205
- ["\u044C\u0435", 1, 2],
1206
- ["\u0438", 1],
1207
- ["\u0435\u0438", 1, 1],
1208
- ["\u0438\u0438", 1, 2],
1209
- ["\u0430\u043C\u0438", 1, 3],
1210
- ["\u044F\u043C\u0438", 1, 4],
1211
- ["\u0438\u044F\u043C\u0438", 1, 1],
1212
- ["\u0439", 1],
1213
- ["\u0435\u0439", 1, 1],
1214
- ["\u0438\u0435\u0439", 1, 1],
1215
- ["\u0438\u0439", 1, 3],
1216
- ["\u043E\u0439", 1, 4],
1217
- ["\u0430\u043C", 1],
1218
- ["\u0435\u043C", 1],
1219
- ["\u0438\u0435\u043C", 1, 1],
1220
- ["\u043E\u043C", 1],
1221
- ["\u044F\u043C", 1],
1222
- ["\u0438\u044F\u043C", 1, 1],
1223
- ["\u043E", 1],
1224
- ["\u0443", 1],
1225
- ["\u0430\u0445", 1],
1226
- ["\u044F\u0445", 1],
1227
- ["\u0438\u044F\u0445", 1, 1],
1228
- ["\u044B", 1],
1229
- ["\u044C", 1],
1230
- ["\u044E", 1],
1231
- ["\u0438\u044E", 1, 1],
1232
- ["\u044C\u044E", 1, 2],
1233
- ["\u044F", 1],
1234
- ["\u0438\u044F", 1, 1],
1235
- ["\u044C\u044F", 1, 2]
1236
- ];
1237
- var a_62 = [
1238
- ["\u043E\u0441\u0442", 1],
1239
- ["\u043E\u0441\u0442\u044C", 1]
1240
- ];
1241
- var a_72 = [
1242
- ["\u0435\u0439\u0448\u0435", 1],
1243
- ["\u043D", 2],
1244
- ["\u0435\u0439\u0448", 1],
1245
- ["\u044C", 3]
1246
- ];
1247
- var g_v2 = [33, 65, 8, 232];
1248
- var russian_stemmer_default = class extends BaseStemmer {
1249
- static {
1250
- __name(this, "default");
1251
- }
1252
- #I_p2 = 0;
1253
- #I_pV = 0;
1254
- /** @return {boolean} */
1255
- #r_mark_regions() {
1256
- this.#I_pV = this.limit;
1257
- this.#I_p2 = this.limit;
1258
- const v_1 = this.c;
1259
- lab0: {
1260
- if (!this.go_out_grouping(g_v2, 1072, 1103)) break lab0;
1261
- this.c++;
1262
- this.#I_pV = this.c;
1263
- if (!this.go_in_grouping(g_v2, 1072, 1103)) break lab0;
1264
- this.c++;
1265
- if (!this.go_out_grouping(g_v2, 1072, 1103)) break lab0;
1266
- this.c++;
1267
- if (!this.go_in_grouping(g_v2, 1072, 1103)) break lab0;
1268
- this.c++;
1269
- this.#I_p2 = this.c;
1270
- }
1271
- this.c = v_1;
1272
- return true;
1273
- }
1274
- /** @return {boolean} */
1275
- #r_perfective_gerund() {
1276
- let a;
1277
- this.ket = this.c;
1278
- a = this.find_among_b(a_02);
1279
- if (a === 0) return false;
1280
- this.bra = this.c;
1281
- switch (a) {
1282
- case 1: {
1283
- lab0: {
1284
- lab1: {
1285
- if (!this.eq_s_b("\u0430")) break lab1;
1286
- break lab0;
1287
- }
1288
- if (!this.eq_s_b("\u044F")) return false;
1289
- }
1290
- this.slice_del();
1291
- break;
1292
- }
1293
- case 2: {
1294
- this.slice_del();
1295
- break;
1296
- }
1297
- }
1298
- return true;
1299
- }
1300
- /** @return {boolean} */
1301
- #r_adjective() {
1302
- this.ket = this.c;
1303
- if (this.find_among_b(a_12) === 0) return false;
1304
- this.bra = this.c;
1305
- this.slice_del();
1306
- return true;
1307
- }
1308
- /** @return {boolean} */
1309
- #r_adjectival() {
1310
- let a;
1311
- if (!this.#r_adjective()) return false;
1312
- const v_1 = this.limit - this.c;
1313
- lab0: {
1314
- this.ket = this.c;
1315
- a = this.find_among_b(a_22);
1316
- if (a === 0) {
1317
- this.c = this.limit - v_1;
1318
- break lab0;
1319
- }
1320
- this.bra = this.c;
1321
- switch (a) {
1322
- case 1: {
1323
- lab1: {
1324
- lab2: {
1325
- if (!this.eq_s_b("\u0430")) break lab2;
1326
- break lab1;
1327
- }
1328
- if (!this.eq_s_b("\u044F")) {
1329
- this.c = this.limit - v_1;
1330
- break lab0;
1331
- }
1332
- }
1333
- this.slice_del();
1334
- break;
1335
- }
1336
- case 2: {
1337
- this.slice_del();
1338
- break;
1339
- }
1340
- }
1341
- }
1342
- return true;
1343
- }
1344
- /** @return {boolean} */
1345
- #r_reflexive() {
1346
- this.ket = this.c;
1347
- if (this.find_among_b(a_32) === 0) return false;
1348
- this.bra = this.c;
1349
- this.slice_del();
1350
- return true;
1351
- }
1352
- /** @return {boolean} */
1353
- #r_verb() {
1354
- let a;
1355
- this.ket = this.c;
1356
- a = this.find_among_b(a_42);
1357
- if (a === 0) return false;
1358
- this.bra = this.c;
1359
- switch (a) {
1360
- case 1: {
1361
- lab0: {
1362
- lab1: {
1363
- if (!this.eq_s_b("\u0430")) break lab1;
1364
- break lab0;
1365
- }
1366
- if (!this.eq_s_b("\u044F")) return false;
1367
- }
1368
- this.slice_del();
1369
- break;
1370
- }
1371
- case 2: {
1372
- this.slice_del();
1373
- break;
1374
- }
1375
- }
1376
- return true;
1377
- }
1378
- /** @return {boolean} */
1379
- #r_noun() {
1380
- this.ket = this.c;
1381
- if (this.find_among_b(a_52) === 0) return false;
1382
- this.bra = this.c;
1383
- this.slice_del();
1384
- return true;
1385
- }
1386
- /** @return {boolean} */
1387
- #r_derivational() {
1388
- this.ket = this.c;
1389
- if (this.find_among_b(a_62) === 0) return false;
1390
- this.bra = this.c;
1391
- if (this.#I_p2 > this.c) return false;
1392
- this.slice_del();
1393
- return true;
1394
- }
1395
- /** @return {boolean} */
1396
- #r_tidy_up() {
1397
- let a;
1398
- this.ket = this.c;
1399
- a = this.find_among_b(a_72);
1400
- if (a === 0) return false;
1401
- this.bra = this.c;
1402
- switch (a) {
1403
- case 1: {
1404
- this.slice_del();
1405
- this.ket = this.c;
1406
- if (!this.eq_s_b("\u043D")) return false;
1407
- this.bra = this.c;
1408
- if (!this.eq_s_b("\u043D")) return false;
1409
- this.slice_del();
1410
- break;
1411
- }
1412
- case 2: {
1413
- if (!this.eq_s_b("\u043D")) return false;
1414
- this.slice_del();
1415
- break;
1416
- }
1417
- case 3: {
1418
- this.slice_del();
1419
- break;
1420
- }
1421
- }
1422
- return true;
1423
- }
1424
- /** @return {boolean} */
1425
- #stem() {
1426
- const v_1 = this.c;
1427
- lab0: {
1428
- while (true) {
1429
- const v_2 = this.c;
1430
- lab1: {
1431
- golab2: while (true) {
1432
- const v_3 = this.c;
1433
- lab3: {
1434
- this.bra = this.c;
1435
- if (!this.eq_s("\u0451")) break lab3;
1436
- this.ket = this.c;
1437
- this.c = v_3;
1438
- break golab2;
1439
- }
1440
- this.c = v_3;
1441
- if (this.c >= this.limit) break lab1;
1442
- this.c++;
1443
- }
1444
- this.slice_from("\u0435");
1445
- continue;
1446
- }
1447
- this.c = v_2;
1448
- break;
1449
- }
1450
- }
1451
- this.c = v_1;
1452
- this.#r_mark_regions();
1453
- this.limit_backward = this.c;
1454
- this.c = this.limit;
1455
- if (this.c < this.#I_pV) return false;
1456
- const v_4 = this.limit_backward;
1457
- this.limit_backward = this.#I_pV;
1458
- const v_5 = this.limit - this.c;
1459
- lab4: {
1460
- lab5: {
1461
- const v_6 = this.limit - this.c;
1462
- lab6: {
1463
- if (!this.#r_perfective_gerund()) break lab6;
1464
- break lab5;
1465
- }
1466
- this.c = this.limit - v_6;
1467
- const v_7 = this.limit - this.c;
1468
- lab7: {
1469
- if (!this.#r_reflexive()) {
1470
- this.c = this.limit - v_7;
1471
- break lab7;
1472
- }
1473
- }
1474
- lab8: {
1475
- const v_8 = this.limit - this.c;
1476
- lab9: {
1477
- if (!this.#r_adjectival()) break lab9;
1478
- break lab8;
1479
- }
1480
- this.c = this.limit - v_8;
1481
- lab10: {
1482
- if (!this.#r_verb()) break lab10;
1483
- break lab8;
1484
- }
1485
- this.c = this.limit - v_8;
1486
- if (!this.#r_noun()) break lab4;
1487
- }
1488
- }
1489
- }
1490
- this.c = this.limit - v_5;
1491
- const v_9 = this.limit - this.c;
1492
- lab11: {
1493
- this.ket = this.c;
1494
- if (!this.eq_s_b("\u0438")) {
1495
- this.c = this.limit - v_9;
1496
- break lab11;
1497
- }
1498
- this.bra = this.c;
1499
- this.slice_del();
1500
- }
1501
- const v_10 = this.limit - this.c;
1502
- this.#r_derivational();
1503
- this.c = this.limit - v_10;
1504
- const v_11 = this.limit - this.c;
1505
- this.#r_tidy_up();
1506
- this.c = this.limit - v_11;
1507
- this.limit_backward = v_4;
1508
- this.c = this.limit_backward;
1509
- return true;
1510
- }
1511
- /**@return{string}*/
1512
- stem(input) {
1513
- this.setCurrent(input);
1514
- this.#stem();
1515
- return this.getCurrent();
1516
- }
1517
- stemWord = this.stem;
1518
- };
1519
-
1520
- // 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/snowball/spanish-stemmer.js
1521
- var a_03 = [
1522
- ["", 6],
1523
- ["\xE1", 1, 1],
1524
- ["\xE9", 2, 2],
1525
- ["\xED", 3, 3],
1526
- ["\xF3", 4, 4],
1527
- ["\xFA", 5, 5]
1528
- ];
1529
- var a_13 = [
1530
- ["la", -1],
1531
- ["sela", -1, 1],
1532
- ["le", -1],
1533
- ["me", -1],
1534
- ["se", -1],
1535
- ["lo", -1],
1536
- ["selo", -1, 1],
1537
- ["las", -1],
1538
- ["selas", -1, 1],
1539
- ["les", -1],
1540
- ["los", -1],
1541
- ["selos", -1, 1],
1542
- ["nos", -1]
1543
- ];
1544
- var a_23 = [
1545
- ["ando", 6],
1546
- ["iendo", 6],
1547
- ["yendo", 7],
1548
- ["\xE1ndo", 2],
1549
- ["i\xE9ndo", 1],
1550
- ["ar", 6],
1551
- ["er", 6],
1552
- ["ir", 6],
1553
- ["\xE1r", 3],
1554
- ["\xE9r", 4],
1555
- ["\xEDr", 5]
1556
- ];
1557
- var a_33 = [
1558
- ["ic", -1],
1559
- ["ad", -1],
1560
- ["os", -1],
1561
- ["iv", 1]
1562
- ];
1563
- var a_43 = [
1564
- ["able", 1],
1565
- ["ible", 1],
1566
- ["ante", 1]
1567
- ];
1568
- var a_53 = [
1569
- ["ic", 1],
1570
- ["abil", 1],
1571
- ["iv", 1]
1572
- ];
1573
- var a_63 = [
1574
- ["ica", 1],
1575
- ["ancia", 2],
1576
- ["encia", 5],
1577
- ["adora", 2],
1578
- ["osa", 1],
1579
- ["ista", 1],
1580
- ["iva", 9],
1581
- ["anza", 1],
1582
- ["log\xEDa", 3],
1583
- ["idad", 8],
1584
- ["able", 1],
1585
- ["ible", 1],
1586
- ["ante", 2],
1587
- ["mente", 7],
1588
- ["amente", 6, 1],
1589
- ["acion", 2],
1590
- ["ucion", 4],
1591
- ["aci\xF3n", 2],
1592
- ["uci\xF3n", 4],
1593
- ["ico", 1],
1594
- ["ismo", 1],
1595
- ["oso", 1],
1596
- ["amiento", 1],
1597
- ["imiento", 1],
1598
- ["ivo", 9],
1599
- ["ador", 2],
1600
- ["icas", 1],
1601
- ["ancias", 2],
1602
- ["encias", 5],
1603
- ["adoras", 2],
1604
- ["osas", 1],
1605
- ["istas", 1],
1606
- ["ivas", 9],
1607
- ["anzas", 1],
1608
- ["log\xEDas", 3],
1609
- ["idades", 8],
1610
- ["ables", 1],
1611
- ["ibles", 1],
1612
- ["aciones", 2],
1613
- ["uciones", 4],
1614
- ["adores", 2],
1615
- ["antes", 2],
1616
- ["icos", 1],
1617
- ["ismos", 1],
1618
- ["osos", 1],
1619
- ["amientos", 1],
1620
- ["imientos", 1],
1621
- ["ivos", 9]
1622
- ];
1623
- var a_73 = [
1624
- ["ya", 1],
1625
- ["ye", 1],
1626
- ["yan", 1],
1627
- ["yen", 1],
1628
- ["yeron", 1],
1629
- ["yendo", 1],
1630
- ["yo", 1],
1631
- ["yas", 1],
1632
- ["yes", 1],
1633
- ["yais", 1],
1634
- ["yamos", 1],
1635
- ["y\xF3", 1]
1636
- ];
1637
- var a_82 = [
1638
- ["aba", 2],
1639
- ["ada", 2],
1640
- ["ida", 2],
1641
- ["ara", 2],
1642
- ["iera", 2],
1643
- ["\xEDa", 2],
1644
- ["ar\xEDa", 2, 1],
1645
- ["er\xEDa", 2, 2],
1646
- ["ir\xEDa", 2, 3],
1647
- ["ad", 2],
1648
- ["ed", 2],
1649
- ["id", 2],
1650
- ["ase", 2],
1651
- ["iese", 2],
1652
- ["aste", 2],
1653
- ["iste", 2],
1654
- ["an", 2],
1655
- ["aban", 2, 1],
1656
- ["aran", 2, 2],
1657
- ["ieran", 2, 3],
1658
- ["\xEDan", 2, 4],
1659
- ["ar\xEDan", 2, 1],
1660
- ["er\xEDan", 2, 2],
1661
- ["ir\xEDan", 2, 3],
1662
- ["en", 1],
1663
- ["asen", 2, 1],
1664
- ["iesen", 2, 2],
1665
- ["aron", 2],
1666
- ["ieron", 2],
1667
- ["ar\xE1n", 2],
1668
- ["er\xE1n", 2],
1669
- ["ir\xE1n", 2],
1670
- ["ado", 2],
1671
- ["ido", 2],
1672
- ["ando", 2],
1673
- ["iendo", 2],
1674
- ["ar", 2],
1675
- ["er", 2],
1676
- ["ir", 2],
1677
- ["as", 2],
1678
- ["abas", 2, 1],
1679
- ["adas", 2, 2],
1680
- ["idas", 2, 3],
1681
- ["aras", 2, 4],
1682
- ["ieras", 2, 5],
1683
- ["\xEDas", 2, 6],
1684
- ["ar\xEDas", 2, 1],
1685
- ["er\xEDas", 2, 2],
1686
- ["ir\xEDas", 2, 3],
1687
- ["es", 1],
1688
- ["ases", 2, 1],
1689
- ["ieses", 2, 2],
1690
- ["abais", 2],
1691
- ["arais", 2],
1692
- ["ierais", 2],
1693
- ["\xEDais", 2],
1694
- ["ar\xEDais", 2, 1],
1695
- ["er\xEDais", 2, 2],
1696
- ["ir\xEDais", 2, 3],
1697
- ["aseis", 2],
1698
- ["ieseis", 2],
1699
- ["asteis", 2],
1700
- ["isteis", 2],
1701
- ["\xE1is", 2],
1702
- ["\xE9is", 1],
1703
- ["ar\xE9is", 2, 1],
1704
- ["er\xE9is", 2, 2],
1705
- ["ir\xE9is", 2, 3],
1706
- ["ados", 2],
1707
- ["idos", 2],
1708
- ["amos", 2],
1709
- ["\xE1bamos", 2, 1],
1710
- ["\xE1ramos", 2, 2],
1711
- ["i\xE9ramos", 2, 3],
1712
- ["\xEDamos", 2, 4],
1713
- ["ar\xEDamos", 2, 1],
1714
- ["er\xEDamos", 2, 2],
1715
- ["ir\xEDamos", 2, 3],
1716
- ["emos", 1],
1717
- ["aremos", 2, 1],
1718
- ["eremos", 2, 2],
1719
- ["iremos", 2, 3],
1720
- ["\xE1semos", 2, 4],
1721
- ["i\xE9semos", 2, 5],
1722
- ["imos", 2],
1723
- ["ar\xE1s", 2],
1724
- ["er\xE1s", 2],
1725
- ["ir\xE1s", 2],
1726
- ["\xEDs", 2],
1727
- ["ar\xE1", 2],
1728
- ["er\xE1", 2],
1729
- ["ir\xE1", 2],
1730
- ["ar\xE9", 2],
1731
- ["er\xE9", 2],
1732
- ["ir\xE9", 2],
1733
- ["i\xF3", 2]
1734
- ];
1735
- var a_92 = [
1736
- ["a", 1],
1737
- ["e", 2],
1738
- ["o", 1],
1739
- ["os", 1],
1740
- ["\xE1", 1],
1741
- ["\xE9", 2],
1742
- ["\xED", 1],
1743
- ["\xF3", 1]
1744
- ];
1745
- var g_v3 = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 10];
1746
- var spanish_stemmer_default = class extends BaseStemmer {
1747
- static {
1748
- __name(this, "default");
1749
- }
1750
- #I_p2 = 0;
1751
- #I_p1 = 0;
1752
- #I_pV = 0;
1753
- /** @return {boolean} */
1754
- #r_mark_regions() {
1755
- this.#I_pV = this.limit;
1756
- this.#I_p1 = this.limit;
1757
- this.#I_p2 = this.limit;
1758
- const v_1 = this.c;
1759
- lab0: {
1760
- lab1: {
1761
- const v_2 = this.c;
1762
- lab2: {
1763
- if (!this.in_grouping(g_v3, 97, 252)) break lab2;
1764
- lab3: {
1765
- const v_3 = this.c;
1766
- lab4: {
1767
- if (!this.out_grouping(g_v3, 97, 252)) break lab4;
1768
- if (!this.go_out_grouping(g_v3, 97, 252)) break lab4;
1769
- this.c++;
1770
- break lab3;
1771
- }
1772
- this.c = v_3;
1773
- if (!this.in_grouping(g_v3, 97, 252)) break lab2;
1774
- if (!this.go_in_grouping(g_v3, 97, 252)) break lab2;
1775
- this.c++;
1776
- }
1777
- break lab1;
1778
- }
1779
- this.c = v_2;
1780
- if (!this.out_grouping(g_v3, 97, 252)) break lab0;
1781
- lab5: {
1782
- const v_4 = this.c;
1783
- lab6: {
1784
- if (!this.out_grouping(g_v3, 97, 252)) break lab6;
1785
- if (!this.go_out_grouping(g_v3, 97, 252)) break lab6;
1786
- this.c++;
1787
- break lab5;
1788
- }
1789
- this.c = v_4;
1790
- if (!this.in_grouping(g_v3, 97, 252)) break lab0;
1791
- if (this.c >= this.limit) break lab0;
1792
- this.c++;
1793
- }
1794
- }
1795
- this.#I_pV = this.c;
1796
- }
1797
- this.c = v_1;
1798
- const v_5 = this.c;
1799
- lab7: {
1800
- if (!this.go_out_grouping(g_v3, 97, 252)) break lab7;
1801
- this.c++;
1802
- if (!this.go_in_grouping(g_v3, 97, 252)) break lab7;
1803
- this.c++;
1804
- this.#I_p1 = this.c;
1805
- if (!this.go_out_grouping(g_v3, 97, 252)) break lab7;
1806
- this.c++;
1807
- if (!this.go_in_grouping(g_v3, 97, 252)) break lab7;
1808
- this.c++;
1809
- this.#I_p2 = this.c;
1810
- }
1811
- this.c = v_5;
1812
- return true;
1813
- }
1814
- /** @return {boolean} */
1815
- #r_postlude() {
1816
- let a;
1817
- while (true) {
1818
- const v_1 = this.c;
1819
- lab0: {
1820
- this.bra = this.c;
1821
- a = this.find_among(a_03);
1822
- this.ket = this.c;
1823
- switch (a) {
1824
- case 1: {
1825
- this.slice_from("a");
1826
- break;
1827
- }
1828
- case 2: {
1829
- this.slice_from("e");
1830
- break;
1831
- }
1832
- case 3: {
1833
- this.slice_from("i");
1834
- break;
1835
- }
1836
- case 4: {
1837
- this.slice_from("o");
1838
- break;
1839
- }
1840
- case 5: {
1841
- this.slice_from("u");
1842
- break;
1843
- }
1844
- case 6: {
1845
- if (this.c >= this.limit) break lab0;
1846
- this.c++;
1847
- break;
1848
- }
1849
- }
1850
- continue;
1851
- }
1852
- this.c = v_1;
1853
- break;
1854
- }
1855
- return true;
1856
- }
1857
- /** @return {boolean} */
1858
- #r_RV() {
1859
- return this.#I_pV <= this.c;
1860
- }
1861
- /** @return {boolean} */
1862
- #r_R2() {
1863
- return this.#I_p2 <= this.c;
1864
- }
1865
- /** @return {boolean} */
1866
- #r_attached_pronoun() {
1867
- let a;
1868
- this.ket = this.c;
1869
- if (this.find_among_b(a_13) === 0) return false;
1870
- this.bra = this.c;
1871
- a = this.find_among_b(a_23);
1872
- if (a === 0) return false;
1873
- if (!this.#r_RV()) return false;
1874
- switch (a) {
1875
- case 1: {
1876
- this.bra = this.c;
1877
- this.slice_from("iendo");
1878
- break;
1879
- }
1880
- case 2: {
1881
- this.bra = this.c;
1882
- this.slice_from("ando");
1883
- break;
1884
- }
1885
- case 3: {
1886
- this.bra = this.c;
1887
- this.slice_from("ar");
1888
- break;
1889
- }
1890
- case 4: {
1891
- this.bra = this.c;
1892
- this.slice_from("er");
1893
- break;
1894
- }
1895
- case 5: {
1896
- this.bra = this.c;
1897
- this.slice_from("ir");
1898
- break;
1899
- }
1900
- case 6: {
1901
- this.slice_del();
1902
- break;
1903
- }
1904
- case 7: {
1905
- if (!this.eq_s_b("u")) return false;
1906
- this.slice_del();
1907
- break;
1908
- }
1909
- }
1910
- return true;
1911
- }
1912
- /** @return {boolean} */
1913
- #r_standard_suffix() {
1914
- let a;
1915
- this.ket = this.c;
1916
- a = this.find_among_b(a_63);
1917
- if (a === 0) return false;
1918
- this.bra = this.c;
1919
- switch (a) {
1920
- case 1: {
1921
- if (!this.#r_R2()) return false;
1922
- this.slice_del();
1923
- break;
1924
- }
1925
- case 2: {
1926
- if (!this.#r_R2()) return false;
1927
- this.slice_del();
1928
- const v_1 = this.limit - this.c;
1929
- lab0: {
1930
- this.ket = this.c;
1931
- if (!this.eq_s_b("ic")) {
1932
- this.c = this.limit - v_1;
1933
- break lab0;
1934
- }
1935
- this.bra = this.c;
1936
- if (!this.#r_R2()) {
1937
- this.c = this.limit - v_1;
1938
- break lab0;
1939
- }
1940
- this.slice_del();
1941
- }
1942
- break;
1943
- }
1944
- case 3: {
1945
- if (!this.#r_R2()) return false;
1946
- this.slice_from("log");
1947
- break;
1948
- }
1949
- case 4: {
1950
- if (!this.#r_R2()) return false;
1951
- this.slice_from("u");
1952
- break;
1953
- }
1954
- case 5: {
1955
- if (!this.#r_R2()) return false;
1956
- this.slice_from("ente");
1957
- break;
1958
- }
1959
- case 6: {
1960
- if (this.#I_p1 > this.c) return false;
1961
- this.slice_del();
1962
- const v_2 = this.limit - this.c;
1963
- lab1: {
1964
- this.ket = this.c;
1965
- a = this.find_among_b(a_33);
1966
- if (a === 0) {
1967
- this.c = this.limit - v_2;
1968
- break lab1;
1969
- }
1970
- this.bra = this.c;
1971
- if (!this.#r_R2()) {
1972
- this.c = this.limit - v_2;
1973
- break lab1;
1974
- }
1975
- this.slice_del();
1976
- switch (a) {
1977
- case 1: {
1978
- this.ket = this.c;
1979
- if (!this.eq_s_b("at")) {
1980
- this.c = this.limit - v_2;
1981
- break lab1;
1982
- }
1983
- this.bra = this.c;
1984
- if (!this.#r_R2()) {
1985
- this.c = this.limit - v_2;
1986
- break lab1;
1987
- }
1988
- this.slice_del();
1989
- break;
1990
- }
1991
- }
1992
- }
1993
- break;
1994
- }
1995
- case 7: {
1996
- if (!this.#r_R2()) return false;
1997
- this.slice_del();
1998
- const v_3 = this.limit - this.c;
1999
- lab2: {
2000
- this.ket = this.c;
2001
- if (this.find_among_b(a_43) === 0) {
2002
- this.c = this.limit - v_3;
2003
- break lab2;
2004
- }
2005
- this.bra = this.c;
2006
- if (!this.#r_R2()) {
2007
- this.c = this.limit - v_3;
2008
- break lab2;
2009
- }
2010
- this.slice_del();
2011
- }
2012
- break;
2013
- }
2014
- case 8: {
2015
- if (!this.#r_R2()) return false;
2016
- this.slice_del();
2017
- const v_4 = this.limit - this.c;
2018
- lab3: {
2019
- this.ket = this.c;
2020
- if (this.find_among_b(a_53) === 0) {
2021
- this.c = this.limit - v_4;
2022
- break lab3;
2023
- }
2024
- this.bra = this.c;
2025
- if (!this.#r_R2()) {
2026
- this.c = this.limit - v_4;
2027
- break lab3;
2028
- }
2029
- this.slice_del();
2030
- }
2031
- break;
2032
- }
2033
- case 9: {
2034
- if (!this.#r_R2()) return false;
2035
- this.slice_del();
2036
- const v_5 = this.limit - this.c;
2037
- lab4: {
2038
- this.ket = this.c;
2039
- if (!this.eq_s_b("at")) {
2040
- this.c = this.limit - v_5;
2041
- break lab4;
2042
- }
2043
- this.bra = this.c;
2044
- if (!this.#r_R2()) {
2045
- this.c = this.limit - v_5;
2046
- break lab4;
2047
- }
2048
- this.slice_del();
2049
- }
2050
- break;
2051
- }
2052
- }
2053
- return true;
2054
- }
2055
- /** @return {boolean} */
2056
- #r_y_verb_suffix() {
2057
- if (this.c < this.#I_pV) return false;
2058
- const v_1 = this.limit_backward;
2059
- this.limit_backward = this.#I_pV;
2060
- this.ket = this.c;
2061
- if (this.find_among_b(a_73) === 0) {
2062
- this.limit_backward = v_1;
2063
- return false;
2064
- }
2065
- this.bra = this.c;
2066
- this.limit_backward = v_1;
2067
- if (!this.eq_s_b("u")) return false;
2068
- this.slice_del();
2069
- return true;
2070
- }
2071
- /** @return {boolean} */
2072
- #r_verb_suffix() {
2073
- let a;
2074
- if (this.c < this.#I_pV) return false;
2075
- const v_1 = this.limit_backward;
2076
- this.limit_backward = this.#I_pV;
2077
- this.ket = this.c;
2078
- a = this.find_among_b(a_82);
2079
- if (a === 0) {
2080
- this.limit_backward = v_1;
2081
- return false;
2082
- }
2083
- this.bra = this.c;
2084
- this.limit_backward = v_1;
2085
- switch (a) {
2086
- case 1: {
2087
- const v_2 = this.limit - this.c;
2088
- lab0: {
2089
- if (!this.eq_s_b("u")) {
2090
- this.c = this.limit - v_2;
2091
- break lab0;
2092
- }
2093
- const v_3 = this.limit - this.c;
2094
- if (!this.eq_s_b("g")) {
2095
- this.c = this.limit - v_2;
2096
- break lab0;
2097
- }
2098
- this.c = this.limit - v_3;
2099
- }
2100
- this.bra = this.c;
2101
- this.slice_del();
2102
- break;
2103
- }
2104
- case 2: {
2105
- this.slice_del();
2106
- break;
2107
- }
2108
- }
2109
- return true;
2110
- }
2111
- /** @return {boolean} */
2112
- #r_residual_suffix() {
2113
- let a;
2114
- this.ket = this.c;
2115
- a = this.find_among_b(a_92);
2116
- if (a === 0) return false;
2117
- this.bra = this.c;
2118
- switch (a) {
2119
- case 1: {
2120
- if (!this.#r_RV()) return false;
2121
- this.slice_del();
2122
- break;
2123
- }
2124
- case 2: {
2125
- if (!this.#r_RV()) return false;
2126
- this.slice_del();
2127
- const v_1 = this.limit - this.c;
2128
- lab0: {
2129
- this.ket = this.c;
2130
- if (!this.eq_s_b("u")) {
2131
- this.c = this.limit - v_1;
2132
- break lab0;
2133
- }
2134
- this.bra = this.c;
2135
- const v_2 = this.limit - this.c;
2136
- if (!this.eq_s_b("g")) {
2137
- this.c = this.limit - v_1;
2138
- break lab0;
2139
- }
2140
- this.c = this.limit - v_2;
2141
- if (!this.#r_RV()) {
2142
- this.c = this.limit - v_1;
2143
- break lab0;
2144
- }
2145
- this.slice_del();
2146
- }
2147
- break;
2148
- }
2149
- }
2150
- return true;
2151
- }
2152
- /** @return {boolean} */
2153
- #stem() {
2154
- this.#r_mark_regions();
2155
- this.limit_backward = this.c;
2156
- this.c = this.limit;
2157
- const v_1 = this.limit - this.c;
2158
- this.#r_attached_pronoun();
2159
- this.c = this.limit - v_1;
2160
- const v_2 = this.limit - this.c;
2161
- lab0: {
2162
- lab1: {
2163
- const v_3 = this.limit - this.c;
2164
- lab2: {
2165
- if (!this.#r_standard_suffix()) break lab2;
2166
- break lab1;
2167
- }
2168
- this.c = this.limit - v_3;
2169
- lab3: {
2170
- if (!this.#r_y_verb_suffix()) break lab3;
2171
- break lab1;
2172
- }
2173
- this.c = this.limit - v_3;
2174
- if (!this.#r_verb_suffix()) break lab0;
2175
- }
2176
- }
2177
- this.c = this.limit - v_2;
2178
- const v_4 = this.limit - this.c;
2179
- this.#r_residual_suffix();
2180
- this.c = this.limit - v_4;
2181
- this.c = this.limit_backward;
2182
- const v_5 = this.c;
2183
- this.#r_postlude();
2184
- this.c = v_5;
2185
- return true;
2186
- }
2187
- /**@return{string}*/
2188
- stem(input) {
2189
- this.setCurrent(input);
2190
- this.#stem();
2191
- return this.getCurrent();
2192
- }
2193
- stemWord = this.stem;
2194
- };
2195
-
2196
- // 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/stem.js
2197
- var SNOWBALL_VERSION = "3.1.1";
2198
- var CYRILLIC_STEMMERS = [...languagesOf("cyrillic"), "none"];
2199
- var LATIN_STEMMERS = [...languagesOf("latin"), "none"];
2200
- var DEFAULT_STEMMERS = { cyrillic: "russian", latin: "english,spanish" };
2201
- var DEFAULT_STEMMERS_VERSION = 2;
2202
- var START_LETTERS = 4;
2203
- var STEM_SEPARATOR = "0stemsep0";
2204
- var STEM_CACHE_LIMIT = 2e5;
2205
- var analyzerIdentity = /* @__PURE__ */ __name((stemmers) => `snowball-${SNOWBALL_VERSION} cyrillic=${stemmers.cyrillic} latin=${stemmers.latin}`, "analyzerIdentity");
2206
- var parseStemmers = /* @__PURE__ */ __name((value) => {
2207
- const record = typeof value === "object" && value !== null ? value : {};
2208
- const pick = /* @__PURE__ */ __name((script, allowed, fallback) => {
2209
- const choice = record[script] ?? fallback;
2210
- if (allowed.includes(choice))
2211
- return choice;
2212
- throw new CliError("validation_error", `${script} words cannot be stemmed with ${JSON.stringify(choice)} \u2014 choose ${allowed.join(", ")}`, { reason: "stemmer.invalid", script, allowed: [...allowed] });
2213
- }, "pick");
2214
- return {
2215
- cyrillic: pick("cyrillic", CYRILLIC_STEMMERS, DEFAULT_STEMMERS.cyrillic),
2216
- latin: latinOf(record.latin ?? DEFAULT_STEMMERS.latin)
2217
- };
2218
- }, "parseStemmers");
2219
- var latinOf = /* @__PURE__ */ __name((value) => {
2220
- const parts = Array.isArray(value) ? value : typeof value === "string" ? value.split(",").map((part) => part.trim()) : [value];
2221
- const unknown = parts.find((part) => !LATIN_STEMMERS.includes(part));
2222
- const named = [...new Set(parts)].filter((part) => part !== "none").sort();
2223
- if (unknown !== void 0 || parts.length === 0 || named.length > 0 && parts.includes("none"))
2224
- throw new CliError("validation_error", `latin words cannot be stemmed with ${JSON.stringify(value)} \u2014 choose none, or one or more of english, spanish joined by commas`, { reason: "stemmer.invalid", script: "latin", allowed: [...LATIN_STEMMERS] });
2225
- return named.length ? named.join(",") : "none";
2226
- }, "latinOf");
2227
- var TOKEN = /[\p{L}\p{N}\p{Co}\p{M}]+/gu;
2228
- var MARKS = new RegExp("\\p{M}+", "gu");
2229
- var CYRILLIC = new RegExp("^\\p{Script=Cyrillic}+$", "u");
2230
- var LATIN = new RegExp("^\\p{Script=Latin}+$", "u");
2231
- var snowball = {
2232
- russian: /* @__PURE__ */ __name(() => new russian_stemmer_default(), "russian"),
2233
- spanish: /* @__PURE__ */ __name(() => new spanish_stemmer_default(), "spanish"),
2234
- english: /* @__PURE__ */ __name(() => new english_stemmer_default(), "english"),
2235
- none: /* @__PURE__ */ __name(() => null, "none")
2236
- };
2237
- var cutsDeep = /* @__PURE__ */ __name((stemmer, token) => {
2238
- const word = [...normalize(token.normalize("NFC").toLowerCase().replace(MARKS, ""))];
2239
- const stem = [...stemmer.stemToken(token)];
2240
- return stem.length < 4 && word.length - stem.length >= 2;
2241
- }, "cutsDeep");
2242
- var createStemmer = /* @__PURE__ */ __name((stemmers = DEFAULT_STEMMERS, { cacheLimit = STEM_CACHE_LIMIT, whole = /* @__PURE__ */ new Set() } = {}) => {
2243
- const valid = parseStemmers(stemmers);
2244
- const cyrillic = snowball[valid.cyrillic]();
2245
- const latinNames = valid.latin.split(",");
2246
- const latins = latinNames.map((name) => snowball[name]());
2247
- const cache = /* @__PURE__ */ new Map();
2248
- const compute = /* @__PURE__ */ __name((token, variant) => {
2249
- const word = token.normalize("NFC").toLowerCase().replace(MARKS, "");
2250
- const engine = CYRILLIC.test(word) ? cyrillic : LATIN.test(word) ? latins[variant] ?? null : null;
2251
- const stem = engine?.stemWord(word) || word;
2252
- return normalize(stem);
2253
- }, "compute");
2254
- const stemOf = /* @__PURE__ */ __name((token, variant) => {
2255
- const key = variant === 0 ? token : `${variant}\0${token}`;
2256
- const cached = cache.get(key);
2257
- if (cached !== void 0)
2258
- return cached;
2259
- const stem = compute(token, variant);
2260
- if (cache.size >= cacheLimit)
2261
- cache.clear();
2262
- if (cacheLimit > 0)
2263
- cache.set(key, stem);
2264
- return stem;
2265
- }, "stemOf");
2266
- const stemToken = /* @__PURE__ */ __name((token) => stemOf(token, 0), "stemToken");
2267
- const queryStemOf = /* @__PURE__ */ __name((token, variant) => {
2268
- const word = normalize(token.normalize("NFC").toLowerCase().replace(MARKS, ""));
2269
- return whole.has(word) ? word : stemOf(token, variant);
2270
- }, "queryStemOf");
2271
- const querySequences = /* @__PURE__ */ __name((text) => {
2272
- const seen = /* @__PURE__ */ new Set();
2273
- return latins.flatMap((_, variant) => {
2274
- const sequence = tokensOf(text).map((token) => queryStemOf(token, variant)).filter(Boolean);
2275
- const key = sequence.join(" ");
2276
- if (seen.has(key))
2277
- return [];
2278
- seen.add(key);
2279
- return [sequence];
2280
- });
2281
- }, "querySequences");
2282
- const tokensOf = /* @__PURE__ */ __name((text) => text.normalize("NFC").toLowerCase().match(TOKEN) ?? [], "tokensOf");
2283
- const stemSequences = /* @__PURE__ */ __name((text) => {
2284
- const tokens = tokensOf(text);
2285
- const seen = /* @__PURE__ */ new Set();
2286
- return latins.flatMap((_, variant) => {
2287
- const sequence = tokens.map((token) => stemOf(token, variant)).filter(Boolean);
2288
- const key = sequence.join(" ");
2289
- if (seen.has(key))
2290
- return [];
2291
- seen.add(key);
2292
- return [sequence];
2293
- });
2294
- }, "stemSequences");
2295
- return {
2296
- stemmers: valid,
2297
- identity: analyzerIdentity(valid),
2298
- stemToken,
2299
- stemTokens: /* @__PURE__ */ __name((text) => tokensOf(text).map(stemToken).filter(Boolean), "stemTokens"),
2300
- stemSequences,
2301
- indexText: /* @__PURE__ */ __name((text) => stemSequences(text).map((sequence) => sequence.join(" ")).filter(Boolean).join(` ${STEM_SEPARATOR} `), "indexText"),
2302
- phrases: /* @__PURE__ */ __name((text) => {
2303
- const phrases = querySequences(text).filter((sequence) => sequence.length > 0).map((sequence) => `"${sequence.join(" ").replaceAll('"', '""')}"`);
2304
- return phrases.length ? phrases.join(" OR ") : void 0;
2305
- }, "phrases"),
2306
- explain: /* @__PURE__ */ __name((text, { query = false } = {}) => tokensOf(text).flatMap((word) => {
2307
- const bare = word.replace(MARKS, "");
2308
- const script = CYRILLIC.test(bare) ? "cyrillic" : LATIN.test(bare) ? "latin" : "none";
2309
- const variants = script === "latin" ? latinNames.map((name, variant) => ({ name, variant })) : [{ name: script === "cyrillic" ? valid.cyrillic : "none", variant: 0 }];
2310
- const seen = /* @__PURE__ */ new Set();
2311
- return variants.flatMap(({ name, variant }) => {
2312
- const stem = query ? queryStemOf(word, variant) : stemOf(word, variant);
2313
- if (!stem || seen.has(stem))
2314
- return [];
2315
- seen.add(stem);
2316
- return [{ word, stem, stemmer: name }];
2317
- });
2318
- }), "explain")
2319
- };
2320
- }, "createStemmer");
2321
-
2322
- export {
2323
- LANGUAGES,
2324
- SNOWBALL_VERSION,
2325
- DEFAULT_STEMMERS,
2326
- DEFAULT_STEMMERS_VERSION,
2327
- START_LETTERS,
2328
- STEM_SEPARATOR,
2329
- analyzerIdentity,
2330
- parseStemmers,
2331
- cutsDeep,
2332
- createStemmer
2333
- };