@leed-ai/cli 0.0.0-stage → 6.19.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 (263) hide show
  1. package/LICENSE.md +57 -0
  2. package/README.md +125 -2
  3. package/dist/LICENSE.md +57 -0
  4. package/dist/acorn-DAgDT1om.js +5087 -0
  5. package/dist/angular-l0_4PK8N.js +3598 -0
  6. package/dist/authShared-Dray38Ls.js +1161 -0
  7. package/dist/babel-CJeRQd5u.js +10038 -0
  8. package/dist/buildResults-tiq1nugP.js +21180 -0
  9. package/dist/chunk-1VJ9lAw7.js +42 -0
  10. package/dist/cliAuth-38JjD6hw.js +15 -0
  11. package/dist/env-B0bHiXJJ.js +29 -0
  12. package/dist/errors-CqKamGCu.js +481 -0
  13. package/dist/estree-E8WG8UHj.js +6930 -0
  14. package/dist/flow-6xaRIbPQ.js +52255 -0
  15. package/dist/glimmer-aJPjsfbT.js +7272 -0
  16. package/dist/graphql-mcgtPEiZ.js +1901 -0
  17. package/dist/html--eeea3Kl.js +6553 -0
  18. package/dist/leed.eleventy.mjs +6525 -0
  19. package/dist/leed.mjs +88952 -0
  20. package/dist/leed.sources.json +798 -0
  21. package/dist/leedLogger-Zkada5aO.js +78 -0
  22. package/dist/markdown-D73jNKwx.js +6836 -0
  23. package/dist/meriyah-CMp1nDDW.js +8932 -0
  24. package/dist/package.json +101 -0
  25. package/dist/postcss-h4fBr2Fn.js +6760 -0
  26. package/dist/prettier-CwFSKxfN.js +16821 -0
  27. package/dist/static/customer-site-worker/package.json +9 -0
  28. package/dist/static/customer-site-worker/src/assetsHydration.ts +55 -0
  29. package/dist/static/customer-site-worker/src/constants.ts +20 -0
  30. package/dist/static/customer-site-worker/src/cors.ts +120 -0
  31. package/dist/static/customer-site-worker/src/index.ts +242 -0
  32. package/dist/static/customer-site-worker/src/mcp-proxy.ts +98 -0
  33. package/dist/static/customer-site-worker/src/proxy.ts +92 -0
  34. package/dist/static/customer-site-worker/src/proxyHeaders.ts +47 -0
  35. package/dist/static/customer-site-worker/src/tier.ts +40 -0
  36. package/dist/static/customer-site-worker/src/types.ts +82 -0
  37. package/dist/static/customer-site-worker/test/functions-mock.worker.js +50 -0
  38. package/dist/static/customer-site-worker/tsconfig.json +19 -0
  39. package/dist/static/customer-site-worker/vitest.workers.config.ts +61 -0
  40. package/dist/static/install/husky/colors.mjs +5 -0
  41. package/dist/static/install/husky/hooks/commit-msg +1 -0
  42. package/dist/static/install/husky/hooks/pre-commit +1 -0
  43. package/dist/static/install/husky/hooks/pre-push +1 -0
  44. package/dist/static/install/husky/valid-command.mjs +29 -0
  45. package/dist/static/install/husky/valid-commit-msg.mjs +20 -0
  46. package/dist/static/install/package.json +10 -0
  47. package/dist/static/install/packages.txt +4 -0
  48. package/dist/static/install/tasks.json +111 -0
  49. package/dist/static/javascript/detectIncognito.js +195 -0
  50. package/dist/static/javascript/documentation.js +2781 -0
  51. package/dist/static/javascript/fp/fp.esm.js +2896 -0
  52. package/dist/static/javascript/fp/fp.js +3067 -0
  53. package/dist/static/javascript/live-search.js +986 -0
  54. package/dist/static/javascript/lunr-search.js +843 -0
  55. package/dist/static/javascript/timeme.js +451 -0
  56. package/dist/static/javascript/tracker/webmcp.js +67 -0
  57. package/dist/static/javascript/tracker/whisper.js +1 -0
  58. package/dist/static/javascript/utilities.js +819 -0
  59. package/dist/static/javascript/versions.json +74 -0
  60. package/dist/static/javascript/zoomable.js +488 -0
  61. package/dist/static/site/_data/eleventyComputed.js +228 -0
  62. package/dist/static/site/_data/leed-form-data.json +253 -0
  63. package/dist/static/site/_includes/leed/api/bits/array-type.hbs +24 -0
  64. package/dist/static/site/_includes/leed/api/bits/badges.hbs +9 -0
  65. package/dist/static/site/_includes/leed/api/bits/description.hbs +9 -0
  66. package/dist/static/site/_includes/leed/api/bits/examples.hbs +42 -0
  67. package/dist/static/site/_includes/leed/api/bits/scopes.hbs +28 -0
  68. package/dist/static/site/_includes/leed/api/object.hbs +110 -0
  69. package/dist/static/site/_includes/leed/api/parameters.hbs +11 -0
  70. package/dist/static/site/_includes/leed/api/property.hbs +153 -0
  71. package/dist/static/site/_includes/leed/api/request-body.hbs +51 -0
  72. package/dist/static/site/_includes/leed/api/responses.hbs +89 -0
  73. package/dist/static/site/_includes/leed/api/security-constraints.hbs +59 -0
  74. package/dist/static/site/_includes/leed/api/security.hbs +75 -0
  75. package/dist/static/site/_includes/leed/components/pagination.hbs +45 -0
  76. package/dist/static/site/_includes/leed/components/scroll-status-indicator-horizontal.hbs +22 -0
  77. package/dist/static/site/_includes/leed/docs/alpha/api.hbs +6 -0
  78. package/dist/static/site/_includes/leed/docs/alpha/base.hbs +26 -0
  79. package/dist/static/site/_includes/leed/docs/alpha/documentation.hbs +7 -0
  80. package/dist/static/site/_includes/leed/docs/api-article.hbs +75 -0
  81. package/dist/static/site/_includes/leed/docs/bravo/api.hbs +5 -0
  82. package/dist/static/site/_includes/leed/docs/bravo/base.hbs +31 -0
  83. package/dist/static/site/_includes/leed/docs/bravo/documentation.hbs +7 -0
  84. package/dist/static/site/_includes/leed/docs/charlie/api.hbs +6 -0
  85. package/dist/static/site/_includes/leed/docs/charlie/base.hbs +27 -0
  86. package/dist/static/site/_includes/leed/docs/charlie/documentation.hbs +10 -0
  87. package/dist/static/site/_includes/leed/docs/doc-article.hbs +40 -0
  88. package/dist/static/site/_includes/leed/docs/docs-footer.hbs +35 -0
  89. package/dist/static/site/_includes/leed/docs/docs-header.hbs +59 -0
  90. package/dist/static/site/_includes/leed/docs/document-search-modal.hbs +36 -0
  91. package/dist/static/site/_includes/leed/docs/document-search.hbs +23 -0
  92. package/dist/static/site/_includes/leed/docs/footer.hbs +12 -0
  93. package/dist/static/site/_includes/leed/docs/header/brand.hbs +19 -0
  94. package/dist/static/site/_includes/leed/docs/header/chrome.hbs +33 -0
  95. package/dist/static/site/_includes/leed/docs/header/compact.hbs +19 -0
  96. package/dist/static/site/_includes/leed/docs/header/cta.hbs +15 -0
  97. package/dist/static/site/_includes/leed/docs/header/nav.hbs +18 -0
  98. package/dist/static/site/_includes/leed/docs/header/top-search.hbs +15 -0
  99. package/dist/static/site/_includes/leed/docs/mini-bar.hbs +53 -0
  100. package/dist/static/site/_includes/leed/docs/pagination.hbs +19 -0
  101. package/dist/static/site/_includes/leed/docs/shell.hbs +56 -0
  102. package/dist/static/site/_includes/leed/docs/sidebar.hbs +52 -0
  103. package/dist/static/site/_includes/leed/docs/social-icons.hbs +81 -0
  104. package/dist/static/site/_includes/leed/docs/style.hbs +17 -0
  105. package/dist/static/site/_includes/leed/docs/toc.hbs +7 -0
  106. package/dist/static/site/_includes/leed/form.hbs +266 -0
  107. package/dist/static/site/_includes/leed/head.hbs +67 -0
  108. package/dist/static/site/_includes/leed/menu/builder.hbs +35 -0
  109. package/dist/static/site/_includes/leed/menu/item.hbs +67 -0
  110. package/dist/static/site/_includes/leed/menu/link.hbs +59 -0
  111. package/dist/static/site/_includes/leed/metadata/ogCard.hbs +40 -0
  112. package/dist/static/site/_includes/leed/metadata/siteMetadata.hbs +24 -0
  113. package/dist/static/site/_includes/leed/metadata/twitterCard.hbs +34 -0
  114. package/dist/static/site/_includes/leed/popup-video.hbs +21 -0
  115. package/dist/static/site/_includes/leed/stub-template.hbs +17 -0
  116. package/dist/static/site/_includes/leed/unsubscribe-form.hbs +30 -0
  117. package/dist/static/site/_layouts/leed-documentation.hbs +12 -0
  118. package/dist/static/site/leed-feed-atom.hbs +42 -0
  119. package/dist/static/site/leed-feed-json.hbs +56 -0
  120. package/dist/static/site/leed-feed-rss.hbs +39 -0
  121. package/dist/static/site/leed-headers.hbs +38 -0
  122. package/dist/static/site/leed-redirects.hbs +10 -0
  123. package/dist/static/site/leed-sitemap-pageType.hbs +28 -0
  124. package/dist/static/site/leed-sitemap.hbs +19 -0
  125. package/dist/static/site/leed-unsubscribe.hbs +44 -0
  126. package/dist/static/site/leed-unsubscribed.hbs +40 -0
  127. package/dist/static/tailwind/components/alerts.css +132 -0
  128. package/dist/static/tailwind/components/api-methods.css +39 -0
  129. package/dist/static/tailwind/components/breadcrumbs.css +31 -0
  130. package/dist/static/tailwind/components/code.css +88 -0
  131. package/dist/static/tailwind/components/collapsible.css +38 -0
  132. package/dist/static/tailwind/components/document-search.css +222 -0
  133. package/dist/static/tailwind/components/form.css +185 -0
  134. package/dist/static/tailwind/components/kbd.css +7 -0
  135. package/dist/static/tailwind/components/pagination.css +81 -0
  136. package/dist/static/tailwind/components/scroll-status-indicator.css +5 -0
  137. package/dist/static/tailwind/components/tab-groups.css +117 -0
  138. package/dist/static/tailwind/components/tables.css +0 -0
  139. package/dist/static/tailwind/components/toc.css +60 -0
  140. package/dist/static/tailwind/components.css +248 -0
  141. package/dist/static/tailwind/defaults.css +260 -0
  142. package/dist/static/tailwind/docs/api.css +701 -0
  143. package/dist/static/tailwind/docs/components/blockquote.css +5 -0
  144. package/dist/static/tailwind/docs/components/button.css +11 -0
  145. package/dist/static/tailwind/docs/components/docs-pagination.css +71 -0
  146. package/dist/static/tailwind/docs/components/mobile-bar.css +83 -0
  147. package/dist/static/tailwind/docs/components/navigation.css +279 -0
  148. package/dist/static/tailwind/docs/components/table.css +54 -0
  149. package/dist/static/tailwind/docs/components.css +6 -0
  150. package/dist/static/tailwind/docs/docs.css +427 -0
  151. package/dist/static/tailwind/docs/layouts/alpha.css +108 -0
  152. package/dist/static/tailwind/docs/layouts/bravo.css +218 -0
  153. package/dist/static/tailwind/docs/layouts/charlie.css +105 -0
  154. package/dist/static/tailwind/docs/layouts.css +3 -0
  155. package/dist/static/tailwind/docs/themes/amber.css +113 -0
  156. package/dist/static/tailwind/docs/themes/blue.css +94 -0
  157. package/dist/static/tailwind/docs/themes/cyan.css +111 -0
  158. package/dist/static/tailwind/docs/themes/emerald.css +111 -0
  159. package/dist/static/tailwind/docs/themes/fuchsia.css +111 -0
  160. package/dist/static/tailwind/docs/themes/green.css +95 -0
  161. package/dist/static/tailwind/docs/themes/indigo.css +111 -0
  162. package/dist/static/tailwind/docs/themes/lime.css +111 -0
  163. package/dist/static/tailwind/docs/themes/orange.css +111 -0
  164. package/dist/static/tailwind/docs/themes/pink.css +111 -0
  165. package/dist/static/tailwind/docs/themes/purple.css +111 -0
  166. package/dist/static/tailwind/docs/themes/red.css +111 -0
  167. package/dist/static/tailwind/docs/themes/rose.css +111 -0
  168. package/dist/static/tailwind/docs/themes/sky.css +111 -0
  169. package/dist/static/tailwind/docs/themes/teal.css +111 -0
  170. package/dist/static/tailwind/docs/themes/violet.css +111 -0
  171. package/dist/static/tailwind/docs/themes/yellow.css +111 -0
  172. package/dist/static/tailwind/docs/themes.css +84 -0
  173. package/dist/static/tailwind/font-awesome/free-7.3.1/brands.css +2455 -0
  174. package/dist/static/tailwind/font-awesome/free-7.3.1/fontawesome.css +8997 -0
  175. package/dist/static/tailwind/font-awesome/free-7.3.1/fonts.css +45 -0
  176. package/dist/static/tailwind/font-awesome/free-7.3.1/icons.json +2608 -0
  177. package/dist/static/tailwind/font-awesome/free-7.3.1.css +3 -0
  178. package/dist/static/tailwind/font-awesome/pro-7.0.0/brands.css +2215 -0
  179. package/dist/static/tailwind/font-awesome/pro-7.0.0/fontawesome.css +19281 -0
  180. package/dist/static/tailwind/font-awesome/pro-7.0.0/fonts.css +445 -0
  181. package/dist/static/tailwind/font-awesome/pro-7.0.0.css +3 -0
  182. package/dist/static/tailwind/font-awesome/pro-7.3.1/brands.css +2455 -0
  183. package/dist/static/tailwind/font-awesome/pro-7.3.1/fontawesome.css +20365 -0
  184. package/dist/static/tailwind/font-awesome/pro-7.3.1/fonts.css +589 -0
  185. package/dist/static/tailwind/font-awesome/pro-7.3.1.css +3 -0
  186. package/dist/static/tailwind/fonts/all.css +6 -0
  187. package/dist/static/tailwind/fonts/config.jsonc +31 -0
  188. package/dist/static/tailwind/fonts/geist-mono.css +142 -0
  189. package/dist/static/tailwind/fonts/geist.css +142 -0
  190. package/dist/static/tailwind/fonts/inter.css +215 -0
  191. package/dist/static/tailwind/fonts/jetbrains-mono.css +126 -0
  192. package/dist/static/tailwind/fonts/noto-sans.css +134 -0
  193. package/dist/static/tailwind/fonts/open-sans.css +89 -0
  194. package/dist/static/tailwind/highlighters.css +14 -0
  195. package/dist/static/tailwind/hljs/README.md +53 -0
  196. package/dist/static/tailwind/hljs/a11y.css +96 -0
  197. package/dist/static/tailwind/hljs/atom-fruit.css +90 -0
  198. package/dist/static/tailwind/hljs/atom-one.css +164 -0
  199. package/dist/static/tailwind/hljs/default.css +164 -0
  200. package/dist/static/tailwind/hljs/github.css +101 -0
  201. package/dist/static/tailwind/hljs/google-code.css +112 -0
  202. package/dist/static/tailwind/hljs/grayscale.css +115 -0
  203. package/dist/static/tailwind/hljs/gruvbox-hard.css +115 -0
  204. package/dist/static/tailwind/hljs/gruvbox-medium.css +115 -0
  205. package/dist/static/tailwind/hljs/gruvbox-soft.css +115 -0
  206. package/dist/static/tailwind/hljs/papercolor.css +120 -0
  207. package/dist/static/tailwind/hljs/qt-creator.css +91 -0
  208. package/dist/static/tailwind/hljs/summerfruit.css +115 -0
  209. package/dist/static/tailwind/hljs/tomorrow.css +115 -0
  210. package/dist/static/tailwind/leed.css +170 -0
  211. package/dist/static/tailwind/site-tokens.reference.css +105 -0
  212. package/dist/static/tailwind/utils/icons.css +102 -0
  213. package/dist/static/tailwind/utils/utilities.css +105 -0
  214. package/dist/static/templates/pages/PAGE.hbs +27 -0
  215. package/dist/static/templates/pages/PAGE_LAYOUT.hbs +19 -0
  216. package/dist/static/templates/pages/PAGE_TYPE_INDEX.hbs +89 -0
  217. package/dist/static/templates/pages/PAGINATED_PAGE_TYPE_ITEM.hbs +52 -0
  218. package/dist/static/templates/pages/PAGINATED_PAGE_TYPE_LIST.hbs +39 -0
  219. package/dist/static/templates/pages/PAGINATED_PAGE_TYPE_PAGINATION.hbs +11 -0
  220. package/dist/static/templates/raw-content/.ci/build.sh +58 -0
  221. package/dist/static/templates/raw-content/README.md +179 -0
  222. package/dist/static/templates/raw-content/_gitignore +50 -0
  223. package/dist/static/templates/raw-content/src/404.hbs +21 -0
  224. package/dist/static/templates/raw-content/src/_data/autolink.json +1 -0
  225. package/dist/static/templates/raw-content/src/_data/ctaList.json +1 -0
  226. package/dist/static/templates/raw-content/src/_data/leedForms.json +1 -0
  227. package/dist/static/templates/raw-content/src/_data/menu.json +1 -0
  228. package/dist/static/templates/raw-content/src/_includes/footer.hbs +18 -0
  229. package/dist/static/templates/raw-content/src/_includes/header-includes.hbs +25 -0
  230. package/dist/static/templates/raw-content/src/_includes/header.hbs +5 -0
  231. package/dist/static/templates/raw-content/src/_includes/site-template.hbs +23 -0
  232. package/dist/static/templates/raw-content/src/_includes/unsubscribe-DISABLED.hbs +17 -0
  233. package/dist/static/templates/raw-content/src/_includes/unsubscribed-DISABLED.hbs +13 -0
  234. package/dist/static/templates/raw-content/src/_layouts/empty.hbs +2 -0
  235. package/dist/static/templates/raw-content/src/index.hbs +21 -0
  236. package/dist/static/templates/raw-content/src/robots.hbs +9 -0
  237. package/dist/static/templates/raw-content/tailwind/site/base.css +44 -0
  238. package/dist/static/templates/raw-content/tailwind/site.config.css +3 -0
  239. package/dist/static/templates/sandbox/_gitignore +50 -0
  240. package/dist/static/templates/sandbox/identity.json +1 -0
  241. package/dist/static/templates/sandbox/src/404.hbs +21 -0
  242. package/dist/static/templates/sandbox/src/_data/autolink.json +1 -0
  243. package/dist/static/templates/sandbox/src/_data/ctaList.json +1 -0
  244. package/dist/static/templates/sandbox/src/_data/labelList.json +9 -0
  245. package/dist/static/templates/sandbox/src/_data/leedForms.json +20 -0
  246. package/dist/static/templates/sandbox/src/_data/menu.json +19 -0
  247. package/dist/static/templates/sandbox/src/_data/pageTypeList.json +14 -0
  248. package/dist/static/templates/sandbox/src/_data/searchIndexList.json +1 -0
  249. package/dist/static/templates/sandbox/src/_data/userList.json +11 -0
  250. package/dist/static/templates/sandbox/src/_includes/footer.hbs +18 -0
  251. package/dist/static/templates/sandbox/src/_includes/header-includes.hbs +25 -0
  252. package/dist/static/templates/sandbox/src/_includes/header.hbs +5 -0
  253. package/dist/static/templates/sandbox/src/_includes/site-template.hbs +23 -0
  254. package/dist/static/templates/sandbox/src/_layouts/empty.hbs +2 -0
  255. package/dist/static/templates/sandbox/src/index.hbs +20 -0
  256. package/dist/static/templates/sandbox/src/robots.hbs +9 -0
  257. package/dist/static/templates/sandbox/src/src.11tydata.json +39 -0
  258. package/dist/static/templates/sandbox/tailwind/site/base.css +44 -0
  259. package/dist/static/templates/sandbox/tailwind/site.config.css +3 -0
  260. package/dist/thrown-sukVkp_1.js +113 -0
  261. package/dist/typescript-D4T0V_Hn.js +23004 -0
  262. package/dist/yaml-9wR8GxF_.js +5236 -0
  263. package/package.json +157 -4
@@ -0,0 +1,1901 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: © 2024-2025 Leed, Inc.
3
+ * SPDX-License-Identifier: LicenseRef-Leed-EULA
4
+ */
5
+ import { n as __esmMin } from "./chunk-1VJ9lAw7.js";
6
+ //#region ../../node_modules/prettier/plugins/graphql.mjs
7
+ function N(e) {
8
+ return L(e), {
9
+ type: j,
10
+ contents: e
11
+ };
12
+ }
13
+ function y(e, t = {}) {
14
+ return L(e), le(t.expandedStates, !0), {
15
+ type: $,
16
+ id: t.id,
17
+ contents: e,
18
+ break: !!t.shouldBreak,
19
+ expandedStates: t.expandedStates
20
+ };
21
+ }
22
+ function I(e, t = "", n = {}) {
23
+ return L(e), t !== "" && L(t), {
24
+ type: w,
25
+ breakContents: e,
26
+ flatContents: t,
27
+ groupId: n.groupId
28
+ };
29
+ }
30
+ function E(e, t) {
31
+ L(e), le(t);
32
+ let n = [];
33
+ for (let i = 0; i < t.length; i++) i !== 0 && n.push(e), n.push(t[i]);
34
+ return n;
35
+ }
36
+ function H(e) {
37
+ return (t, n, i) => {
38
+ let r = !!(i != null && i.backwards);
39
+ if (n === !1) return !1;
40
+ let { length: s } = t, a = n;
41
+ for (; a >= 0 && a < s;) {
42
+ let u = t.charAt(a);
43
+ if (e instanceof RegExp) {
44
+ if (!e.test(u)) return a;
45
+ } else if (!e.includes(u)) return a;
46
+ r ? a-- : a++;
47
+ }
48
+ return a === -1 || a === s ? a : !1;
49
+ };
50
+ }
51
+ function It(e, t, n) {
52
+ let i = !!(n != null && n.backwards);
53
+ if (t === !1) return !1;
54
+ let r = e.charAt(t);
55
+ if (i) {
56
+ if (e.charAt(t - 1) === "\r" && r === `
57
+ `) return t - 2;
58
+ if (r === `
59
+ ` || r === "\r" || r === "\u2028" || r === "\u2029") return t - 1;
60
+ } else {
61
+ if (r === "\r" && e.charAt(t + 1) === `
62
+ `) return t + 2;
63
+ if (r === `
64
+ ` || r === "\r" || r === "\u2028" || r === "\u2029") return t + 1;
65
+ }
66
+ return t;
67
+ }
68
+ function At(e, t, n = {}) {
69
+ let i = J(e, n.backwards ? t - 1 : t, n);
70
+ return i !== q(e, i, n);
71
+ }
72
+ function Dt(e, t) {
73
+ if (t === !1) return !1;
74
+ if (e.charAt(t) === "/" && e.charAt(t + 1) === "*") {
75
+ for (let n = t + 2; n < e.length; ++n) if (e.charAt(n) === "*" && e.charAt(n + 1) === "/") return n + 2;
76
+ }
77
+ return t;
78
+ }
79
+ function gt(e, t) {
80
+ return t === !1 ? !1 : e.charAt(t) === "/" && e.charAt(t + 1) === "/" ? Le(e, t) : t;
81
+ }
82
+ function kt(e, t) {
83
+ let n = null, i = t;
84
+ for (; i !== n;) n = i, i = ve(e, i), i = Pe(e, i), i = J(e, i);
85
+ return i = we(e, i), i = q(e, i), i !== !1 && be(e, i);
86
+ }
87
+ function St(e) {
88
+ return Array.isArray(e) && e.length > 0;
89
+ }
90
+ function B(e) {
91
+ if (F !== null && typeof F.property) {
92
+ let t = F;
93
+ return F = B.prototype = null, t;
94
+ }
95
+ return F = B.prototype = e ?? Object.create(null), new B();
96
+ }
97
+ function he(e) {
98
+ return B(e);
99
+ }
100
+ function Rt(e, t = "type") {
101
+ he(e);
102
+ function n(i) {
103
+ let r = i[t], s = e[r];
104
+ if (!Array.isArray(s)) throw Object.assign(/* @__PURE__ */ new Error(`Missing visitor keys for '${r}'.`), { node: i });
105
+ return s;
106
+ }
107
+ return n;
108
+ }
109
+ function K(e) {
110
+ return e.loc.start;
111
+ }
112
+ function z(e) {
113
+ return e.loc.end;
114
+ }
115
+ function je(e) {
116
+ return Ge.test(e);
117
+ }
118
+ function $e(e) {
119
+ return Ye.test(e);
120
+ }
121
+ function Xe(e) {
122
+ return `# @${Ve}
123
+
124
+ ${e}`;
125
+ }
126
+ function Lt(e, t, n) {
127
+ let { node: i } = e;
128
+ if (!i.description) return "";
129
+ let r = [n("description")];
130
+ return i.kind === "InputValueDefinition" && !i.description.block ? r.push(k) : r.push(f), r;
131
+ }
132
+ function bt(e, t, n) {
133
+ let { node: i } = e;
134
+ switch (i.kind) {
135
+ case "Document": return [...E(f, g(e, t, n, "definitions")), f];
136
+ case "OperationDefinition": {
137
+ let r = t.originalText[K(i)] !== "{", s = !!i.name;
138
+ return [
139
+ r ? i.operation : "",
140
+ r && s ? [" ", n("name")] : "",
141
+ r && !s && pe(i.variableDefinitions) ? " " : "",
142
+ He(e, n),
143
+ x(e, n, i),
144
+ !r && !s ? "" : " ",
145
+ n("selectionSet")
146
+ ];
147
+ }
148
+ case "FragmentDefinition": return [
149
+ "fragment ",
150
+ n("name"),
151
+ He(e, n),
152
+ " on ",
153
+ n("typeCondition"),
154
+ x(e, n, i),
155
+ " ",
156
+ n("selectionSet")
157
+ ];
158
+ case "SelectionSet": return [
159
+ "{",
160
+ N([f, E(f, g(e, t, n, "selections"))]),
161
+ f,
162
+ "}"
163
+ ];
164
+ case "Field": return y([
165
+ i.alias ? [n("alias"), ": "] : "",
166
+ n("name"),
167
+ i.arguments.length > 0 ? y([
168
+ "(",
169
+ N([p, E([I("", ", "), p], g(e, t, n, "arguments"))]),
170
+ p,
171
+ ")"
172
+ ]) : "",
173
+ x(e, n, i),
174
+ i.selectionSet ? " " : "",
175
+ n("selectionSet")
176
+ ]);
177
+ case "Name": return i.value;
178
+ case "StringValue":
179
+ if (i.block) {
180
+ let r = G(!1, i.value, "\"\"\"", String.raw`\"""`).split(`
181
+ `);
182
+ return r.length === 1 && (r[0] = r[0].trim()), r.every((s) => s === "") && (r.length = 0), E(f, [
183
+ "\"\"\"",
184
+ ...r,
185
+ "\"\"\""
186
+ ]);
187
+ }
188
+ return [
189
+ "\"",
190
+ G(!1, G(!1, i.value, /["\\]/gu, String.raw`\$&`), `
191
+ `, String.raw`\n`),
192
+ "\""
193
+ ];
194
+ case "IntValue":
195
+ case "FloatValue":
196
+ case "EnumValue": return i.value;
197
+ case "BooleanValue": return i.value ? "true" : "false";
198
+ case "NullValue": return "null";
199
+ case "Variable": return ["$", n("name")];
200
+ case "ListValue": return y([
201
+ "[",
202
+ N([p, E([I("", ", "), p], e.map(n, "values"))]),
203
+ p,
204
+ "]"
205
+ ]);
206
+ case "ObjectValue": {
207
+ let r = t.bracketSpacing && i.fields.length > 0 ? " " : "";
208
+ return y([
209
+ "{",
210
+ r,
211
+ N([p, E([I("", ", "), p], e.map(n, "fields"))]),
212
+ p,
213
+ I("", r),
214
+ "}"
215
+ ]);
216
+ }
217
+ case "ObjectField":
218
+ case "Argument": return [
219
+ n("name"),
220
+ ": ",
221
+ n("value")
222
+ ];
223
+ case "Directive": return [
224
+ "@",
225
+ n("name"),
226
+ i.arguments.length > 0 ? y([
227
+ "(",
228
+ N([p, E([I("", ", "), p], g(e, t, n, "arguments"))]),
229
+ p,
230
+ ")"
231
+ ]) : ""
232
+ ];
233
+ case "NamedType": return n("name");
234
+ case "VariableDefinition": return [
235
+ n("variable"),
236
+ ": ",
237
+ n("type"),
238
+ i.defaultValue ? [" = ", n("defaultValue")] : "",
239
+ x(e, n, i)
240
+ ];
241
+ case "ObjectTypeExtension":
242
+ case "ObjectTypeDefinition":
243
+ case "InputObjectTypeExtension":
244
+ case "InputObjectTypeDefinition":
245
+ case "InterfaceTypeExtension":
246
+ case "InterfaceTypeDefinition": {
247
+ let { kind: r } = i, s = [];
248
+ return r.endsWith("TypeDefinition") ? s.push(D(e, t, n)) : s.push("extend "), r.startsWith("ObjectType") ? s.push("type") : r.startsWith("InputObjectType") ? s.push("input") : s.push("interface"), s.push(" ", n("name")), !r.startsWith("InputObjectType") && i.interfaces.length > 0 && s.push(" implements ", ...Ft(e, t, n)), s.push(x(e, n, i)), i.fields.length > 0 && s.push([
249
+ " {",
250
+ N([f, E(f, g(e, t, n, "fields"))]),
251
+ f,
252
+ "}"
253
+ ]), s;
254
+ }
255
+ case "FieldDefinition": return [
256
+ D(e, t, n),
257
+ n("name"),
258
+ i.arguments.length > 0 ? y([
259
+ "(",
260
+ N([p, E([I("", ", "), p], g(e, t, n, "arguments"))]),
261
+ p,
262
+ ")"
263
+ ]) : "",
264
+ ": ",
265
+ n("type"),
266
+ x(e, n, i)
267
+ ];
268
+ case "DirectiveDefinition": return [
269
+ D(e, t, n),
270
+ "directive ",
271
+ "@",
272
+ n("name"),
273
+ i.arguments.length > 0 ? y([
274
+ "(",
275
+ N([p, E([I("", ", "), p], g(e, t, n, "arguments"))]),
276
+ p,
277
+ ")"
278
+ ]) : "",
279
+ i.repeatable ? " repeatable" : "",
280
+ " on ",
281
+ ...E(" | ", e.map(n, "locations"))
282
+ ];
283
+ case "EnumTypeExtension":
284
+ case "EnumTypeDefinition": return [
285
+ D(e, t, n),
286
+ i.kind === "EnumTypeExtension" ? "extend " : "",
287
+ "enum ",
288
+ n("name"),
289
+ x(e, n, i),
290
+ i.values.length > 0 ? [
291
+ " {",
292
+ N([f, E(f, g(e, t, n, "values"))]),
293
+ f,
294
+ "}"
295
+ ] : ""
296
+ ];
297
+ case "EnumValueDefinition": return [
298
+ D(e, t, n),
299
+ n("name"),
300
+ x(e, n, i)
301
+ ];
302
+ case "InputValueDefinition": return [
303
+ D(e, t, n),
304
+ n("name"),
305
+ ": ",
306
+ n("type"),
307
+ i.defaultValue ? [" = ", n("defaultValue")] : "",
308
+ x(e, n, i)
309
+ ];
310
+ case "SchemaExtension": return [
311
+ "extend schema",
312
+ x(e, n, i),
313
+ ...i.operationTypes.length > 0 ? [
314
+ " {",
315
+ N([f, E(f, g(e, t, n, "operationTypes"))]),
316
+ f,
317
+ "}"
318
+ ] : []
319
+ ];
320
+ case "SchemaDefinition": return [
321
+ D(e, t, n),
322
+ "schema",
323
+ x(e, n, i),
324
+ " {",
325
+ i.operationTypes.length > 0 ? N([f, E(f, g(e, t, n, "operationTypes"))]) : "",
326
+ f,
327
+ "}"
328
+ ];
329
+ case "OperationTypeDefinition": return [
330
+ i.operation,
331
+ ": ",
332
+ n("type")
333
+ ];
334
+ case "FragmentSpread": return [
335
+ "...",
336
+ n("name"),
337
+ x(e, n, i)
338
+ ];
339
+ case "InlineFragment": return [
340
+ "...",
341
+ i.typeCondition ? [" on ", n("typeCondition")] : "",
342
+ x(e, n, i),
343
+ " ",
344
+ n("selectionSet")
345
+ ];
346
+ case "UnionTypeExtension":
347
+ case "UnionTypeDefinition": return y([D(e, t, n), y([
348
+ i.kind === "UnionTypeExtension" ? "extend " : "",
349
+ "union ",
350
+ n("name"),
351
+ x(e, n, i),
352
+ i.types.length > 0 ? [
353
+ " =",
354
+ I("", " "),
355
+ N([I([k, "| "]), E([k, "| "], e.map(n, "types"))])
356
+ ] : ""
357
+ ])]);
358
+ case "ScalarTypeExtension":
359
+ case "ScalarTypeDefinition": return [
360
+ D(e, t, n),
361
+ i.kind === "ScalarTypeExtension" ? "extend " : "",
362
+ "scalar ",
363
+ n("name"),
364
+ x(e, n, i)
365
+ ];
366
+ case "NonNullType": return [n("type"), "!"];
367
+ case "ListType": return [
368
+ "[",
369
+ n("type"),
370
+ "]"
371
+ ];
372
+ default: throw new Be(i, "Graphql", "kind");
373
+ }
374
+ }
375
+ function x(e, t, n) {
376
+ if (n.directives.length === 0) return "";
377
+ let i = E(k, e.map(t, "directives"));
378
+ return n.kind === "FragmentDefinition" || n.kind === "OperationDefinition" ? y([k, i]) : [" ", y(N([p, i]))];
379
+ }
380
+ function g(e, t, n, i) {
381
+ return e.map(({ isLast: r, node: s }) => {
382
+ let a = n();
383
+ return !r && Fe(t.originalText, z(s)) ? [a, f] : a;
384
+ }, i);
385
+ }
386
+ function Pt(e) {
387
+ return e.kind !== "Comment";
388
+ }
389
+ function wt(e) {
390
+ let t = e.node;
391
+ if (t.kind === "Comment") return "#" + t.value.trimEnd();
392
+ throw new Error("Not a comment: " + JSON.stringify(t));
393
+ }
394
+ function Ft(e, t, n) {
395
+ let { node: i } = e, r = [], { interfaces: s } = i, a = e.map(n, "interfaces");
396
+ for (let u = 0; u < s.length; u++) {
397
+ let l = s[u];
398
+ r.push(a[u]);
399
+ let T = s[u + 1];
400
+ if (T) {
401
+ let A = t.originalText.slice(l.loc.end, T.loc.start).includes("#");
402
+ r.push(" &", A ? k : " ");
403
+ }
404
+ }
405
+ return r;
406
+ }
407
+ function He(e, t) {
408
+ let { node: n } = e;
409
+ return pe(n.variableDefinitions) ? y([
410
+ "(",
411
+ N([p, E([I("", ", "), p], e.map(t, "variableDefinitions"))]),
412
+ p,
413
+ ")"
414
+ ]) : "";
415
+ }
416
+ function Je(e, t) {
417
+ e.kind === "StringValue" && e.block && !e.value.includes(`
418
+ `) && (t.value = e.value.trim());
419
+ }
420
+ function Bt(e) {
421
+ var n;
422
+ let { node: t } = e;
423
+ return (n = t == null ? void 0 : t.comments) == null ? void 0 : n.some((i) => i.value.trim() === "prettier-ignore");
424
+ }
425
+ function ze(e) {
426
+ return typeof e == "object" && e !== null;
427
+ }
428
+ function Ze(e, t) {
429
+ if (!!!e) throw new Error(t ?? "Unexpected invariant triggered.");
430
+ }
431
+ function M(e, t) {
432
+ let n = 0, i = 1;
433
+ for (let r of e.body.matchAll(Vt)) {
434
+ if (typeof r.index == "number" || Ze(!1), r.index >= t) break;
435
+ n = r.index + r[0].length, i += 1;
436
+ }
437
+ return {
438
+ line: i,
439
+ column: t + 1 - n
440
+ };
441
+ }
442
+ function tt(e) {
443
+ return de(e.source, M(e.source, e.start));
444
+ }
445
+ function de(e, t) {
446
+ let n = e.locationOffset.column - 1, i = "".padStart(n) + e.body, r = t.line - 1, s = e.locationOffset.line - 1, a = t.line + s, u = t.line === 1 ? n : 0, l = t.column + u, T = `${e.name}:${a}:${l}
447
+ `, h = i.split(/\r\n|[\n\r]/g), A = h[r];
448
+ if (A.length > 120) {
449
+ let O = Math.floor(l / 80), ae = l % 80, _ = [];
450
+ for (let v = 0; v < A.length; v += 80) _.push(A.slice(v, v + 80));
451
+ return T + et([
452
+ [`${a} |`, _[0]],
453
+ ..._.slice(1, O + 1).map((v) => ["|", v]),
454
+ ["|", "^".padStart(ae)],
455
+ ["|", _[O + 1]]
456
+ ]);
457
+ }
458
+ return T + et([
459
+ [`${a - 1} |`, h[r - 1]],
460
+ [`${a} |`, A],
461
+ ["|", "^".padStart(l)],
462
+ [`${a + 1} |`, h[r + 1]]
463
+ ]);
464
+ }
465
+ function et(e) {
466
+ let t = e.filter(([i, r]) => r !== void 0), n = Math.max(...t.map(([i]) => i.length));
467
+ return t.map(([i, r]) => i.padStart(n) + (r ? " " + r : "")).join(`
468
+ `);
469
+ }
470
+ function Yt(e) {
471
+ let t = e[0];
472
+ return t == null || "kind" in t || "length" in t ? {
473
+ nodes: t,
474
+ source: e[1],
475
+ positions: e[2],
476
+ path: e[3],
477
+ originalError: e[4],
478
+ extensions: e[5]
479
+ } : t;
480
+ }
481
+ function nt(e) {
482
+ return e === void 0 || e.length === 0 ? void 0 : e;
483
+ }
484
+ function d(e, t, n) {
485
+ return new Z(`Syntax Error: ${n}`, {
486
+ source: e,
487
+ positions: [t]
488
+ });
489
+ }
490
+ function rt(e) {
491
+ return e === 9 || e === 32;
492
+ }
493
+ function b(e) {
494
+ return e >= 48 && e <= 57;
495
+ }
496
+ function it(e) {
497
+ return e >= 97 && e <= 122 || e >= 65 && e <= 90;
498
+ }
499
+ function me(e) {
500
+ return it(e) || e === 95;
501
+ }
502
+ function st(e) {
503
+ return it(e) || b(e) || e === 95;
504
+ }
505
+ function ot(e) {
506
+ var t;
507
+ let n = Number.MAX_SAFE_INTEGER, i = null, r = -1;
508
+ for (let a = 0; a < e.length; ++a) {
509
+ var s;
510
+ let u = e[a], l = Gt(u);
511
+ l !== u.length && (i = (s = i) !== null && s !== void 0 ? s : a, r = a, a !== 0 && l < n && (n = l));
512
+ }
513
+ return e.map((a, u) => u === 0 ? a : a.slice(n)).slice((t = i) !== null && t !== void 0 ? t : 0, r + 1);
514
+ }
515
+ function Gt(e) {
516
+ let t = 0;
517
+ for (; t < e.length && rt(e.charCodeAt(t));) ++t;
518
+ return t;
519
+ }
520
+ function ct(e) {
521
+ return e === o.BANG || e === o.DOLLAR || e === o.AMP || e === o.PAREN_L || e === o.PAREN_R || e === o.SPREAD || e === o.COLON || e === o.EQUALS || e === o.AT || e === o.BRACKET_L || e === o.BRACKET_R || e === o.BRACE_L || e === o.PIPE || e === o.BRACE_R;
522
+ }
523
+ function P(e) {
524
+ return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111;
525
+ }
526
+ function ne(e, t) {
527
+ return ut(e.charCodeAt(t)) && lt(e.charCodeAt(t + 1));
528
+ }
529
+ function ut(e) {
530
+ return e >= 55296 && e <= 56319;
531
+ }
532
+ function lt(e) {
533
+ return e >= 56320 && e <= 57343;
534
+ }
535
+ function R(e, t) {
536
+ let n = e.source.body.codePointAt(t);
537
+ if (n === void 0) return o.EOF;
538
+ if (n >= 32 && n <= 126) {
539
+ let i = String.fromCodePoint(n);
540
+ return i === "\"" ? `'"'` : `"${i}"`;
541
+ }
542
+ return "U+" + n.toString(16).toUpperCase().padStart(4, "0");
543
+ }
544
+ function m(e, t, n, i, r) {
545
+ let s = e.line;
546
+ return new U(t, n, i, s, 1 + n - e.lineStart, r);
547
+ }
548
+ function jt(e, t) {
549
+ let n = e.source.body, i = n.length, r = t;
550
+ for (; r < i;) {
551
+ let s = n.charCodeAt(r);
552
+ switch (s) {
553
+ case 65279:
554
+ case 9:
555
+ case 32:
556
+ case 44:
557
+ ++r;
558
+ continue;
559
+ case 10:
560
+ ++r, ++e.line, e.lineStart = r;
561
+ continue;
562
+ case 13:
563
+ n.charCodeAt(r + 1) === 10 ? r += 2 : ++r, ++e.line, e.lineStart = r;
564
+ continue;
565
+ case 35: return $t(e, r);
566
+ case 33: return m(e, o.BANG, r, r + 1);
567
+ case 36: return m(e, o.DOLLAR, r, r + 1);
568
+ case 38: return m(e, o.AMP, r, r + 1);
569
+ case 40: return m(e, o.PAREN_L, r, r + 1);
570
+ case 41: return m(e, o.PAREN_R, r, r + 1);
571
+ case 46:
572
+ if (n.charCodeAt(r + 1) === 46 && n.charCodeAt(r + 2) === 46) return m(e, o.SPREAD, r, r + 3);
573
+ break;
574
+ case 58: return m(e, o.COLON, r, r + 1);
575
+ case 61: return m(e, o.EQUALS, r, r + 1);
576
+ case 64: return m(e, o.AT, r, r + 1);
577
+ case 91: return m(e, o.BRACKET_L, r, r + 1);
578
+ case 93: return m(e, o.BRACKET_R, r, r + 1);
579
+ case 123: return m(e, o.BRACE_L, r, r + 1);
580
+ case 124: return m(e, o.PIPE, r, r + 1);
581
+ case 125: return m(e, o.BRACE_R, r, r + 1);
582
+ case 34: return n.charCodeAt(r + 1) === 34 && n.charCodeAt(r + 2) === 34 ? Wt(e, r) : Ht(e, r);
583
+ }
584
+ if (b(s) || s === 45) return Xt(e, r, s);
585
+ if (me(s)) return Kt(e, r);
586
+ throw d(e.source, r, s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : P(s) || ne(n, r) ? `Unexpected character: ${R(e, r)}.` : `Invalid character: ${R(e, r)}.`);
587
+ }
588
+ return m(e, o.EOF, i, i);
589
+ }
590
+ function $t(e, t) {
591
+ let n = e.source.body, i = n.length, r = t + 1;
592
+ for (; r < i;) {
593
+ let s = n.charCodeAt(r);
594
+ if (s === 10 || s === 13) break;
595
+ if (P(s)) ++r;
596
+ else if (ne(n, r)) r += 2;
597
+ else break;
598
+ }
599
+ return m(e, o.COMMENT, t, r, n.slice(t + 1, r));
600
+ }
601
+ function Xt(e, t, n) {
602
+ let i = e.source.body, r = t, s = n, a = !1;
603
+ if (s === 45 && (s = i.charCodeAt(++r)), s === 48) {
604
+ if (s = i.charCodeAt(++r), b(s)) throw d(e.source, r, `Invalid number, unexpected digit after 0: ${R(e, r)}.`);
605
+ } else r = Ee(e, r, s), s = i.charCodeAt(r);
606
+ if (s === 46 && (a = !0, s = i.charCodeAt(++r), r = Ee(e, r, s), s = i.charCodeAt(r)), (s === 69 || s === 101) && (a = !0, s = i.charCodeAt(++r), (s === 43 || s === 45) && (s = i.charCodeAt(++r)), r = Ee(e, r, s), s = i.charCodeAt(r)), s === 46 || me(s)) throw d(e.source, r, `Invalid number, expected digit but got: ${R(e, r)}.`);
607
+ return m(e, a ? o.FLOAT : o.INT, t, r, i.slice(t, r));
608
+ }
609
+ function Ee(e, t, n) {
610
+ if (!b(n)) throw d(e.source, t, `Invalid number, expected digit but got: ${R(e, t)}.`);
611
+ let i = e.source.body, r = t + 1;
612
+ for (; b(i.charCodeAt(r));) ++r;
613
+ return r;
614
+ }
615
+ function Ht(e, t) {
616
+ let n = e.source.body, i = n.length, r = t + 1, s = r, a = "";
617
+ for (; r < i;) {
618
+ let u = n.charCodeAt(r);
619
+ if (u === 34) return a += n.slice(s, r), m(e, o.STRING, t, r + 1, a);
620
+ if (u === 92) {
621
+ a += n.slice(s, r);
622
+ let l = n.charCodeAt(r + 1) === 117 ? n.charCodeAt(r + 2) === 123 ? Jt(e, r) : qt(e, r) : Qt(e, r);
623
+ a += l.value, r += l.size, s = r;
624
+ continue;
625
+ }
626
+ if (u === 10 || u === 13) break;
627
+ if (P(u)) ++r;
628
+ else if (ne(n, r)) r += 2;
629
+ else throw d(e.source, r, `Invalid character within String: ${R(e, r)}.`);
630
+ }
631
+ throw d(e.source, r, "Unterminated string.");
632
+ }
633
+ function Jt(e, t) {
634
+ let n = e.source.body, i = 0, r = 3;
635
+ for (; r < 12;) {
636
+ let s = n.charCodeAt(t + r++);
637
+ if (s === 125) {
638
+ if (r < 5 || !P(i)) break;
639
+ return {
640
+ value: String.fromCodePoint(i),
641
+ size: r
642
+ };
643
+ }
644
+ if (i = i << 4 | V(s), i < 0) break;
645
+ }
646
+ throw d(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + r)}".`);
647
+ }
648
+ function qt(e, t) {
649
+ let n = e.source.body, i = at(n, t + 2);
650
+ if (P(i)) return {
651
+ value: String.fromCodePoint(i),
652
+ size: 6
653
+ };
654
+ if (ut(i) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) {
655
+ let r = at(n, t + 8);
656
+ if (lt(r)) return {
657
+ value: String.fromCodePoint(i, r),
658
+ size: 12
659
+ };
660
+ }
661
+ throw d(e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".`);
662
+ }
663
+ function at(e, t) {
664
+ return V(e.charCodeAt(t)) << 12 | V(e.charCodeAt(t + 1)) << 8 | V(e.charCodeAt(t + 2)) << 4 | V(e.charCodeAt(t + 3));
665
+ }
666
+ function V(e) {
667
+ return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1;
668
+ }
669
+ function Qt(e, t) {
670
+ let n = e.source.body;
671
+ switch (n.charCodeAt(t + 1)) {
672
+ case 34: return {
673
+ value: "\"",
674
+ size: 2
675
+ };
676
+ case 92: return {
677
+ value: "\\",
678
+ size: 2
679
+ };
680
+ case 47: return {
681
+ value: "/",
682
+ size: 2
683
+ };
684
+ case 98: return {
685
+ value: "\b",
686
+ size: 2
687
+ };
688
+ case 102: return {
689
+ value: "\f",
690
+ size: 2
691
+ };
692
+ case 110: return {
693
+ value: `
694
+ `,
695
+ size: 2
696
+ };
697
+ case 114: return {
698
+ value: "\r",
699
+ size: 2
700
+ };
701
+ case 116: return {
702
+ value: " ",
703
+ size: 2
704
+ };
705
+ }
706
+ throw d(e.source, t, `Invalid character escape sequence: "${n.slice(t, t + 2)}".`);
707
+ }
708
+ function Wt(e, t) {
709
+ let n = e.source.body, i = n.length, r = e.lineStart, s = t + 3, a = s, u = "", l = [];
710
+ for (; s < i;) {
711
+ let T = n.charCodeAt(s);
712
+ if (T === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) {
713
+ u += n.slice(a, s), l.push(u);
714
+ let h = m(e, o.BLOCK_STRING, t, s + 3, ot(l).join(`
715
+ `));
716
+ return e.line += l.length - 1, e.lineStart = r, h;
717
+ }
718
+ if (T === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) {
719
+ u += n.slice(a, s), a = s + 1, s += 4;
720
+ continue;
721
+ }
722
+ if (T === 10 || T === 13) {
723
+ u += n.slice(a, s), l.push(u), T === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, u = "", a = s, r = s;
724
+ continue;
725
+ }
726
+ if (P(T)) ++s;
727
+ else if (ne(n, s)) s += 2;
728
+ else throw d(e.source, s, `Invalid character within String: ${R(e, s)}.`);
729
+ }
730
+ throw d(e.source, s, "Unterminated string.");
731
+ }
732
+ function Kt(e, t) {
733
+ let n = e.source.body, i = n.length, r = t + 1;
734
+ for (; r < i;) if (st(n.charCodeAt(r))) ++r;
735
+ else break;
736
+ return m(e, o.NAME, t, r, n.slice(t, r));
737
+ }
738
+ function re(e, t) {
739
+ if (!!!e) throw new Error(t);
740
+ }
741
+ function ie(e) {
742
+ return se(e, []);
743
+ }
744
+ function se(e, t) {
745
+ switch (typeof e) {
746
+ case "string": return JSON.stringify(e);
747
+ case "function": return e.name ? `[function ${e.name}]` : "[function]";
748
+ case "object": return zt(e, t);
749
+ default: return String(e);
750
+ }
751
+ }
752
+ function zt(e, t) {
753
+ if (e === null) return "null";
754
+ if (t.includes(e)) return "[Circular]";
755
+ let n = [...t, e];
756
+ if (Zt(e)) {
757
+ let i = e.toJSON();
758
+ if (i !== e) return typeof i == "string" ? i : se(i, n);
759
+ } else if (Array.isArray(e)) return tn(e, n);
760
+ return en(e, n);
761
+ }
762
+ function Zt(e) {
763
+ return typeof e.toJSON == "function";
764
+ }
765
+ function en(e, t) {
766
+ let n = Object.entries(e);
767
+ return n.length === 0 ? "{}" : t.length > 2 ? "[" + nn(e) + "]" : "{ " + n.map(([r, s]) => r + ": " + se(s, t)).join(", ") + " }";
768
+ }
769
+ function tn(e, t) {
770
+ if (e.length === 0) return "[]";
771
+ if (t.length > 2) return "[Array]";
772
+ let n = Math.min(10, e.length), i = e.length - n, r = [];
773
+ for (let s = 0; s < n; ++s) r.push(se(e[s], t));
774
+ return i === 1 ? r.push("... 1 more item") : i > 1 && r.push(`... ${i} more items`), "[" + r.join(", ") + "]";
775
+ }
776
+ function nn(e) {
777
+ let t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, "");
778
+ if (t === "Object" && typeof e.constructor == "function") {
779
+ let n = e.constructor.name;
780
+ if (typeof n == "string" && n !== "") return n;
781
+ }
782
+ return t;
783
+ }
784
+ function ft(e) {
785
+ return pt(e, Y);
786
+ }
787
+ function ht(e, t) {
788
+ let n = new Te(e, t), i = n.parseDocument();
789
+ return Object.defineProperty(i, "tokenCount", {
790
+ enumerable: !1,
791
+ value: n.tokenCount
792
+ }), i;
793
+ }
794
+ function oe(e) {
795
+ let t = e.value;
796
+ return dt(e.kind) + (t != null ? ` "${t}"` : "");
797
+ }
798
+ function dt(e) {
799
+ return ct(e) ? `"${e}"` : e;
800
+ }
801
+ function sn(e, t) {
802
+ let n = /* @__PURE__ */ new SyntaxError(e + " (" + t.loc.start.line + ":" + t.loc.start.column + ")");
803
+ return Object.assign(n, t);
804
+ }
805
+ function on(e) {
806
+ let t = [], { startToken: n, endToken: i } = e.loc;
807
+ for (let r = n; r !== i; r = r.next) r.kind === "Comment" && t.push({
808
+ ...r,
809
+ loc: {
810
+ start: r.start,
811
+ end: r.end
812
+ }
813
+ });
814
+ return t;
815
+ }
816
+ function cn(e) {
817
+ if ((e == null ? void 0 : e.name) === "GraphQLError") {
818
+ let { message: t, locations: [n] } = e;
819
+ return mt(t, {
820
+ loc: { start: n },
821
+ cause: e
822
+ });
823
+ }
824
+ return e;
825
+ }
826
+ function un(e) {
827
+ let t;
828
+ try {
829
+ t = ht(e, an);
830
+ } catch (n) {
831
+ throw cn(n);
832
+ }
833
+ return t.comments = on(t), t;
834
+ }
835
+ var Et, xe, Ne, Tt, G, j, $, w, S, X, Re, L, le, yt, Ot, k, p, f, J, ve, Le, q, be, Pe, we, Fe, pe, fe, Be, F, Ct, Ue, Q, U, W, C, Me, Ve, Ye, Ge, D, qe, Qe, Ke, _e, Vt, Z, ee, c, o, te, pt, Y, Te, mt, an, ln, pn, Ui;
836
+ //#endregion
837
+ __esmMin((() => {
838
+ Et = Object.defineProperty;
839
+ xe = (e, t) => {
840
+ for (var n in t) Et(e, n, {
841
+ get: t[n],
842
+ enumerable: !0
843
+ });
844
+ };
845
+ Ne = {};
846
+ xe(Ne, {
847
+ languages: () => Qe,
848
+ options: () => Ke,
849
+ parsers: () => _e,
850
+ printers: () => pn
851
+ });
852
+ Tt = (e, t, n, i) => {
853
+ if (!(e && t == null)) return t.replaceAll ? t.replaceAll(n, i) : n.global ? t.replace(n, i) : t.split(n).join(i);
854
+ }, G = Tt;
855
+ j = "indent";
856
+ $ = "group";
857
+ w = "if-break";
858
+ S = "line";
859
+ X = "break-parent";
860
+ Re = () => {}, L = Re, le = Re;
861
+ yt = { type: X };
862
+ Ot = {
863
+ type: S,
864
+ hard: !0
865
+ };
866
+ k = { type: S }, p = {
867
+ type: S,
868
+ soft: !0
869
+ }, f = [Ot, yt];
870
+ H(/\s/u);
871
+ J = H(" "), ve = H(",; "), Le = H(/[^\n\r]/u);
872
+ q = It;
873
+ be = At;
874
+ Pe = Dt;
875
+ we = gt;
876
+ Fe = kt;
877
+ pe = St;
878
+ fe = class extends Error {
879
+ name = "UnexpectedNodeError";
880
+ constructor(t, n, i = "type") {
881
+ super(`Unexpected ${n} node ${i}: ${JSON.stringify(t[i])}.`), this.node = t;
882
+ }
883
+ }, Be = fe;
884
+ F = null;
885
+ Ct = 10;
886
+ for (let e = 0; e <= Ct; e++) B();
887
+ Ue = Rt, Q = class {
888
+ constructor(t, n, i) {
889
+ this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = i;
890
+ }
891
+ get [Symbol.toStringTag]() {
892
+ return "Location";
893
+ }
894
+ toJSON() {
895
+ return {
896
+ start: this.start,
897
+ end: this.end
898
+ };
899
+ }
900
+ }, U = class {
901
+ constructor(t, n, i, r, s, a) {
902
+ this.kind = t, this.start = n, this.end = i, this.line = r, this.column = s, this.value = a, this.prev = null, this.next = null;
903
+ }
904
+ get [Symbol.toStringTag]() {
905
+ return "Token";
906
+ }
907
+ toJSON() {
908
+ return {
909
+ kind: this.kind,
910
+ value: this.value,
911
+ line: this.line,
912
+ column: this.column
913
+ };
914
+ }
915
+ }, W = {
916
+ Name: [],
917
+ Document: ["definitions"],
918
+ OperationDefinition: [
919
+ "name",
920
+ "variableDefinitions",
921
+ "directives",
922
+ "selectionSet"
923
+ ],
924
+ VariableDefinition: [
925
+ "variable",
926
+ "type",
927
+ "defaultValue",
928
+ "directives"
929
+ ],
930
+ Variable: ["name"],
931
+ SelectionSet: ["selections"],
932
+ Field: [
933
+ "alias",
934
+ "name",
935
+ "arguments",
936
+ "directives",
937
+ "selectionSet"
938
+ ],
939
+ Argument: ["name", "value"],
940
+ FragmentSpread: ["name", "directives"],
941
+ InlineFragment: [
942
+ "typeCondition",
943
+ "directives",
944
+ "selectionSet"
945
+ ],
946
+ FragmentDefinition: [
947
+ "name",
948
+ "variableDefinitions",
949
+ "typeCondition",
950
+ "directives",
951
+ "selectionSet"
952
+ ],
953
+ IntValue: [],
954
+ FloatValue: [],
955
+ StringValue: [],
956
+ BooleanValue: [],
957
+ NullValue: [],
958
+ EnumValue: [],
959
+ ListValue: ["values"],
960
+ ObjectValue: ["fields"],
961
+ ObjectField: ["name", "value"],
962
+ Directive: ["name", "arguments"],
963
+ NamedType: ["name"],
964
+ ListType: ["type"],
965
+ NonNullType: ["type"],
966
+ SchemaDefinition: [
967
+ "description",
968
+ "directives",
969
+ "operationTypes"
970
+ ],
971
+ OperationTypeDefinition: ["type"],
972
+ ScalarTypeDefinition: [
973
+ "description",
974
+ "name",
975
+ "directives"
976
+ ],
977
+ ObjectTypeDefinition: [
978
+ "description",
979
+ "name",
980
+ "interfaces",
981
+ "directives",
982
+ "fields"
983
+ ],
984
+ FieldDefinition: [
985
+ "description",
986
+ "name",
987
+ "arguments",
988
+ "type",
989
+ "directives"
990
+ ],
991
+ InputValueDefinition: [
992
+ "description",
993
+ "name",
994
+ "type",
995
+ "defaultValue",
996
+ "directives"
997
+ ],
998
+ InterfaceTypeDefinition: [
999
+ "description",
1000
+ "name",
1001
+ "interfaces",
1002
+ "directives",
1003
+ "fields"
1004
+ ],
1005
+ UnionTypeDefinition: [
1006
+ "description",
1007
+ "name",
1008
+ "directives",
1009
+ "types"
1010
+ ],
1011
+ EnumTypeDefinition: [
1012
+ "description",
1013
+ "name",
1014
+ "directives",
1015
+ "values"
1016
+ ],
1017
+ EnumValueDefinition: [
1018
+ "description",
1019
+ "name",
1020
+ "directives"
1021
+ ],
1022
+ InputObjectTypeDefinition: [
1023
+ "description",
1024
+ "name",
1025
+ "directives",
1026
+ "fields"
1027
+ ],
1028
+ DirectiveDefinition: [
1029
+ "description",
1030
+ "name",
1031
+ "arguments",
1032
+ "locations"
1033
+ ],
1034
+ SchemaExtension: ["directives", "operationTypes"],
1035
+ ScalarTypeExtension: ["name", "directives"],
1036
+ ObjectTypeExtension: [
1037
+ "name",
1038
+ "interfaces",
1039
+ "directives",
1040
+ "fields"
1041
+ ],
1042
+ InterfaceTypeExtension: [
1043
+ "name",
1044
+ "interfaces",
1045
+ "directives",
1046
+ "fields"
1047
+ ],
1048
+ UnionTypeExtension: [
1049
+ "name",
1050
+ "directives",
1051
+ "types"
1052
+ ],
1053
+ EnumTypeExtension: [
1054
+ "name",
1055
+ "directives",
1056
+ "values"
1057
+ ],
1058
+ InputObjectTypeExtension: [
1059
+ "name",
1060
+ "directives",
1061
+ "fields"
1062
+ ]
1063
+ };
1064
+ new Set(Object.keys(W));
1065
+ (function(e) {
1066
+ e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription";
1067
+ })(C || (C = {}));
1068
+ Me = Ue(W, "kind");
1069
+ Ve = "format", Ye = /^\s*#[^\S\n]*@(?:noformat|noprettier)\s*(?:\n|$)/u, Ge = /^\s*#[^\S\n]*@(?:format|prettier)\s*(?:\n|$)/u;
1070
+ D = Lt;
1071
+ Je.ignoredProperties = new Set(["loc", "comments"]);
1072
+ qe = {
1073
+ print: bt,
1074
+ massageAstNode: Je,
1075
+ hasPrettierIgnore: Bt,
1076
+ insertPragma: Xe,
1077
+ printComment: wt,
1078
+ canAttachComment: Pt,
1079
+ getVisitorKeys: Me
1080
+ };
1081
+ Qe = [{
1082
+ name: "GraphQL",
1083
+ type: "data",
1084
+ extensions: [
1085
+ ".graphql",
1086
+ ".gql",
1087
+ ".graphqls"
1088
+ ],
1089
+ tmScope: "source.graphql",
1090
+ aceMode: "text",
1091
+ parsers: ["graphql"],
1092
+ vscodeLanguageIds: ["graphql"],
1093
+ linguistLanguageId: 139
1094
+ }];
1095
+ Ke = { bracketSpacing: {
1096
+ bracketSpacing: {
1097
+ category: "Common",
1098
+ type: "boolean",
1099
+ default: !0,
1100
+ description: "Print spaces between brackets.",
1101
+ oppositeDescription: "Do not print spaces between brackets."
1102
+ },
1103
+ objectWrap: {
1104
+ category: "Common",
1105
+ type: "choice",
1106
+ default: "preserve",
1107
+ description: "How to wrap object literals.",
1108
+ choices: [{
1109
+ value: "preserve",
1110
+ description: "Keep as multi-line, if there is a newline between the opening brace and first property."
1111
+ }, {
1112
+ value: "collapse",
1113
+ description: "Fit to a single line when possible."
1114
+ }]
1115
+ },
1116
+ singleQuote: {
1117
+ category: "Common",
1118
+ type: "boolean",
1119
+ default: !1,
1120
+ description: "Use single quotes instead of double quotes."
1121
+ },
1122
+ proseWrap: {
1123
+ category: "Common",
1124
+ type: "choice",
1125
+ default: "preserve",
1126
+ description: "How to wrap prose.",
1127
+ choices: [
1128
+ {
1129
+ value: "always",
1130
+ description: "Wrap prose if it exceeds the print width."
1131
+ },
1132
+ {
1133
+ value: "never",
1134
+ description: "Do not wrap prose."
1135
+ },
1136
+ {
1137
+ value: "preserve",
1138
+ description: "Wrap prose as-is."
1139
+ }
1140
+ ]
1141
+ },
1142
+ bracketSameLine: {
1143
+ category: "Common",
1144
+ type: "boolean",
1145
+ default: !1,
1146
+ description: "Put > of opening tags on the last line instead of on a new line."
1147
+ },
1148
+ singleAttributePerLine: {
1149
+ category: "Common",
1150
+ type: "boolean",
1151
+ default: !1,
1152
+ description: "Enforce single attribute per line in HTML, Vue and JSX."
1153
+ }
1154
+ }.bracketSpacing };
1155
+ _e = {};
1156
+ xe(_e, { graphql: () => ln });
1157
+ Vt = /\r\n|[\n\r]/g;
1158
+ Z = class e extends Error {
1159
+ constructor(t, ...n) {
1160
+ var i, r, s;
1161
+ let { nodes: a, source: u, positions: l, path: T, originalError: h, extensions: A } = Yt(n);
1162
+ super(t), this.name = "GraphQLError", this.path = T ?? void 0, this.originalError = h ?? void 0, this.nodes = nt(Array.isArray(a) ? a : a ? [a] : void 0);
1163
+ let O = nt((i = this.nodes) === null || i === void 0 ? void 0 : i.map((_) => _.loc).filter((_) => _ != null));
1164
+ this.source = u ?? (O == null || (r = O[0]) === null || r === void 0 ? void 0 : r.source), this.positions = l ?? (O == null ? void 0 : O.map((_) => _.start)), this.locations = l && u ? l.map((_) => M(u, _)) : O == null ? void 0 : O.map((_) => M(_.source, _.start));
1165
+ let ae = ze(h == null ? void 0 : h.extensions) ? h == null ? void 0 : h.extensions : void 0;
1166
+ this.extensions = (s = A ?? ae) !== null && s !== void 0 ? s : Object.create(null), Object.defineProperties(this, {
1167
+ message: {
1168
+ writable: !0,
1169
+ enumerable: !0
1170
+ },
1171
+ name: { enumerable: !1 },
1172
+ nodes: { enumerable: !1 },
1173
+ source: { enumerable: !1 },
1174
+ positions: { enumerable: !1 },
1175
+ originalError: { enumerable: !1 }
1176
+ }), h != null && h.stack ? Object.defineProperty(this, "stack", {
1177
+ value: h.stack,
1178
+ writable: !0,
1179
+ configurable: !0
1180
+ }) : Error.captureStackTrace ? Error.captureStackTrace(this, e) : Object.defineProperty(this, "stack", {
1181
+ value: Error().stack,
1182
+ writable: !0,
1183
+ configurable: !0
1184
+ });
1185
+ }
1186
+ get [Symbol.toStringTag]() {
1187
+ return "GraphQLError";
1188
+ }
1189
+ toString() {
1190
+ let t = this.message;
1191
+ if (this.nodes) for (let n of this.nodes) n.loc && (t += `
1192
+
1193
+ ` + tt(n.loc));
1194
+ else if (this.source && this.locations) for (let n of this.locations) t += `
1195
+
1196
+ ` + de(this.source, n);
1197
+ return t;
1198
+ }
1199
+ toJSON() {
1200
+ let t = { message: this.message };
1201
+ return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t;
1202
+ }
1203
+ };
1204
+ (function(e) {
1205
+ e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION";
1206
+ })(ee || (ee = {}));
1207
+ (function(e) {
1208
+ e.NAME = "Name", e.DOCUMENT = "Document", e.OPERATION_DEFINITION = "OperationDefinition", e.VARIABLE_DEFINITION = "VariableDefinition", e.SELECTION_SET = "SelectionSet", e.FIELD = "Field", e.ARGUMENT = "Argument", e.FRAGMENT_SPREAD = "FragmentSpread", e.INLINE_FRAGMENT = "InlineFragment", e.FRAGMENT_DEFINITION = "FragmentDefinition", e.VARIABLE = "Variable", e.INT = "IntValue", e.FLOAT = "FloatValue", e.STRING = "StringValue", e.BOOLEAN = "BooleanValue", e.NULL = "NullValue", e.ENUM = "EnumValue", e.LIST = "ListValue", e.OBJECT = "ObjectValue", e.OBJECT_FIELD = "ObjectField", e.DIRECTIVE = "Directive", e.NAMED_TYPE = "NamedType", e.LIST_TYPE = "ListType", e.NON_NULL_TYPE = "NonNullType", e.SCHEMA_DEFINITION = "SchemaDefinition", e.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", e.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", e.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", e.FIELD_DEFINITION = "FieldDefinition", e.INPUT_VALUE_DEFINITION = "InputValueDefinition", e.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", e.UNION_TYPE_DEFINITION = "UnionTypeDefinition", e.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", e.ENUM_VALUE_DEFINITION = "EnumValueDefinition", e.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", e.DIRECTIVE_DEFINITION = "DirectiveDefinition", e.SCHEMA_EXTENSION = "SchemaExtension", e.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", e.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", e.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", e.UNION_TYPE_EXTENSION = "UnionTypeExtension", e.ENUM_TYPE_EXTENSION = "EnumTypeExtension", e.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension";
1209
+ })(c || (c = {}));
1210
+ (function(e) {
1211
+ e.SOF = "<SOF>", e.EOF = "<EOF>", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment";
1212
+ })(o || (o = {}));
1213
+ te = class {
1214
+ constructor(t) {
1215
+ let n = new U(o.SOF, 0, 0, 0, 0);
1216
+ this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
1217
+ }
1218
+ get [Symbol.toStringTag]() {
1219
+ return "Lexer";
1220
+ }
1221
+ advance() {
1222
+ return this.lastToken = this.token, this.token = this.lookahead();
1223
+ }
1224
+ lookahead() {
1225
+ let t = this.token;
1226
+ if (t.kind !== o.EOF) do
1227
+ if (t.next) t = t.next;
1228
+ else {
1229
+ let n = jt(this, t.end);
1230
+ t.next = n, n.prev = t, t = n;
1231
+ }
1232
+ while (t.kind === o.COMMENT);
1233
+ return t;
1234
+ }
1235
+ };
1236
+ pt = globalThis.process && !0 ? function(t, n) {
1237
+ return t instanceof n;
1238
+ } : function(t, n) {
1239
+ if (t instanceof n) return !0;
1240
+ if (typeof t == "object" && t !== null) {
1241
+ var i;
1242
+ let r = n.prototype[Symbol.toStringTag];
1243
+ if (r === (Symbol.toStringTag in t ? t[Symbol.toStringTag] : (i = t.constructor) === null || i === void 0 ? void 0 : i.name)) {
1244
+ let a = ie(t);
1245
+ throw new Error(`Cannot use ${r} "${a}" from another module or realm.
1246
+
1247
+ Ensure that there is only one instance of "graphql" in the node_modules
1248
+ directory. If different versions of "graphql" are the dependencies of other
1249
+ relied on modules, use "resolutions" to ensure only one version is installed.
1250
+
1251
+ https://yarnpkg.com/en/docs/selective-version-resolutions
1252
+
1253
+ Duplicate "graphql" modules cannot be used at the same time since different
1254
+ versions may have different capabilities and behavior. The data from one
1255
+ version used in the function from another could produce confusing and
1256
+ spurious results.`);
1257
+ }
1258
+ }
1259
+ return !1;
1260
+ };
1261
+ Y = class {
1262
+ constructor(t, n = "GraphQL request", i = {
1263
+ line: 1,
1264
+ column: 1
1265
+ }) {
1266
+ typeof t == "string" || re(!1, `Body must be a string. Received: ${ie(t)}.`), this.body = t, this.name = n, this.locationOffset = i, this.locationOffset.line > 0 || re(!1, "line in locationOffset is 1-indexed and must be positive."), this.locationOffset.column > 0 || re(!1, "column in locationOffset is 1-indexed and must be positive.");
1267
+ }
1268
+ get [Symbol.toStringTag]() {
1269
+ return "Source";
1270
+ }
1271
+ };
1272
+ Te = class {
1273
+ constructor(t, n = {}) {
1274
+ let i = ft(t) ? t : new Y(t);
1275
+ this._lexer = new te(i), this._options = n, this._tokenCounter = 0;
1276
+ }
1277
+ get tokenCount() {
1278
+ return this._tokenCounter;
1279
+ }
1280
+ parseName() {
1281
+ let t = this.expectToken(o.NAME);
1282
+ return this.node(t, {
1283
+ kind: c.NAME,
1284
+ value: t.value
1285
+ });
1286
+ }
1287
+ parseDocument() {
1288
+ return this.node(this._lexer.token, {
1289
+ kind: c.DOCUMENT,
1290
+ definitions: this.many(o.SOF, this.parseDefinition, o.EOF)
1291
+ });
1292
+ }
1293
+ parseDefinition() {
1294
+ if (this.peek(o.BRACE_L)) return this.parseOperationDefinition();
1295
+ let t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token;
1296
+ if (n.kind === o.NAME) {
1297
+ switch (n.value) {
1298
+ case "schema": return this.parseSchemaDefinition();
1299
+ case "scalar": return this.parseScalarTypeDefinition();
1300
+ case "type": return this.parseObjectTypeDefinition();
1301
+ case "interface": return this.parseInterfaceTypeDefinition();
1302
+ case "union": return this.parseUnionTypeDefinition();
1303
+ case "enum": return this.parseEnumTypeDefinition();
1304
+ case "input": return this.parseInputObjectTypeDefinition();
1305
+ case "directive": return this.parseDirectiveDefinition();
1306
+ }
1307
+ if (t) throw d(this._lexer.source, this._lexer.token.start, "Unexpected description, descriptions are supported only on type definitions.");
1308
+ switch (n.value) {
1309
+ case "query":
1310
+ case "mutation":
1311
+ case "subscription": return this.parseOperationDefinition();
1312
+ case "fragment": return this.parseFragmentDefinition();
1313
+ case "extend": return this.parseTypeSystemExtension();
1314
+ }
1315
+ }
1316
+ throw this.unexpected(n);
1317
+ }
1318
+ parseOperationDefinition() {
1319
+ let t = this._lexer.token;
1320
+ if (this.peek(o.BRACE_L)) return this.node(t, {
1321
+ kind: c.OPERATION_DEFINITION,
1322
+ operation: C.QUERY,
1323
+ name: void 0,
1324
+ variableDefinitions: [],
1325
+ directives: [],
1326
+ selectionSet: this.parseSelectionSet()
1327
+ });
1328
+ let n = this.parseOperationType(), i;
1329
+ return this.peek(o.NAME) && (i = this.parseName()), this.node(t, {
1330
+ kind: c.OPERATION_DEFINITION,
1331
+ operation: n,
1332
+ name: i,
1333
+ variableDefinitions: this.parseVariableDefinitions(),
1334
+ directives: this.parseDirectives(!1),
1335
+ selectionSet: this.parseSelectionSet()
1336
+ });
1337
+ }
1338
+ parseOperationType() {
1339
+ let t = this.expectToken(o.NAME);
1340
+ switch (t.value) {
1341
+ case "query": return C.QUERY;
1342
+ case "mutation": return C.MUTATION;
1343
+ case "subscription": return C.SUBSCRIPTION;
1344
+ }
1345
+ throw this.unexpected(t);
1346
+ }
1347
+ parseVariableDefinitions() {
1348
+ return this.optionalMany(o.PAREN_L, this.parseVariableDefinition, o.PAREN_R);
1349
+ }
1350
+ parseVariableDefinition() {
1351
+ return this.node(this._lexer.token, {
1352
+ kind: c.VARIABLE_DEFINITION,
1353
+ variable: this.parseVariable(),
1354
+ type: (this.expectToken(o.COLON), this.parseTypeReference()),
1355
+ defaultValue: this.expectOptionalToken(o.EQUALS) ? this.parseConstValueLiteral() : void 0,
1356
+ directives: this.parseConstDirectives()
1357
+ });
1358
+ }
1359
+ parseVariable() {
1360
+ let t = this._lexer.token;
1361
+ return this.expectToken(o.DOLLAR), this.node(t, {
1362
+ kind: c.VARIABLE,
1363
+ name: this.parseName()
1364
+ });
1365
+ }
1366
+ parseSelectionSet() {
1367
+ return this.node(this._lexer.token, {
1368
+ kind: c.SELECTION_SET,
1369
+ selections: this.many(o.BRACE_L, this.parseSelection, o.BRACE_R)
1370
+ });
1371
+ }
1372
+ parseSelection() {
1373
+ return this.peek(o.SPREAD) ? this.parseFragment() : this.parseField();
1374
+ }
1375
+ parseField() {
1376
+ let t = this._lexer.token, n = this.parseName(), i, r;
1377
+ return this.expectOptionalToken(o.COLON) ? (i = n, r = this.parseName()) : r = n, this.node(t, {
1378
+ kind: c.FIELD,
1379
+ alias: i,
1380
+ name: r,
1381
+ arguments: this.parseArguments(!1),
1382
+ directives: this.parseDirectives(!1),
1383
+ selectionSet: this.peek(o.BRACE_L) ? this.parseSelectionSet() : void 0
1384
+ });
1385
+ }
1386
+ parseArguments(t) {
1387
+ let n = t ? this.parseConstArgument : this.parseArgument;
1388
+ return this.optionalMany(o.PAREN_L, n, o.PAREN_R);
1389
+ }
1390
+ parseArgument(t = !1) {
1391
+ let n = this._lexer.token, i = this.parseName();
1392
+ return this.expectToken(o.COLON), this.node(n, {
1393
+ kind: c.ARGUMENT,
1394
+ name: i,
1395
+ value: this.parseValueLiteral(t)
1396
+ });
1397
+ }
1398
+ parseConstArgument() {
1399
+ return this.parseArgument(!0);
1400
+ }
1401
+ parseFragment() {
1402
+ let t = this._lexer.token;
1403
+ this.expectToken(o.SPREAD);
1404
+ let n = this.expectOptionalKeyword("on");
1405
+ return !n && this.peek(o.NAME) ? this.node(t, {
1406
+ kind: c.FRAGMENT_SPREAD,
1407
+ name: this.parseFragmentName(),
1408
+ directives: this.parseDirectives(!1)
1409
+ }) : this.node(t, {
1410
+ kind: c.INLINE_FRAGMENT,
1411
+ typeCondition: n ? this.parseNamedType() : void 0,
1412
+ directives: this.parseDirectives(!1),
1413
+ selectionSet: this.parseSelectionSet()
1414
+ });
1415
+ }
1416
+ parseFragmentDefinition() {
1417
+ let t = this._lexer.token;
1418
+ return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(t, {
1419
+ kind: c.FRAGMENT_DEFINITION,
1420
+ name: this.parseFragmentName(),
1421
+ variableDefinitions: this.parseVariableDefinitions(),
1422
+ typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
1423
+ directives: this.parseDirectives(!1),
1424
+ selectionSet: this.parseSelectionSet()
1425
+ }) : this.node(t, {
1426
+ kind: c.FRAGMENT_DEFINITION,
1427
+ name: this.parseFragmentName(),
1428
+ typeCondition: (this.expectKeyword("on"), this.parseNamedType()),
1429
+ directives: this.parseDirectives(!1),
1430
+ selectionSet: this.parseSelectionSet()
1431
+ });
1432
+ }
1433
+ parseFragmentName() {
1434
+ if (this._lexer.token.value === "on") throw this.unexpected();
1435
+ return this.parseName();
1436
+ }
1437
+ parseValueLiteral(t) {
1438
+ let n = this._lexer.token;
1439
+ switch (n.kind) {
1440
+ case o.BRACKET_L: return this.parseList(t);
1441
+ case o.BRACE_L: return this.parseObject(t);
1442
+ case o.INT: return this.advanceLexer(), this.node(n, {
1443
+ kind: c.INT,
1444
+ value: n.value
1445
+ });
1446
+ case o.FLOAT: return this.advanceLexer(), this.node(n, {
1447
+ kind: c.FLOAT,
1448
+ value: n.value
1449
+ });
1450
+ case o.STRING:
1451
+ case o.BLOCK_STRING: return this.parseStringLiteral();
1452
+ case o.NAME: switch (this.advanceLexer(), n.value) {
1453
+ case "true": return this.node(n, {
1454
+ kind: c.BOOLEAN,
1455
+ value: !0
1456
+ });
1457
+ case "false": return this.node(n, {
1458
+ kind: c.BOOLEAN,
1459
+ value: !1
1460
+ });
1461
+ case "null": return this.node(n, { kind: c.NULL });
1462
+ default: return this.node(n, {
1463
+ kind: c.ENUM,
1464
+ value: n.value
1465
+ });
1466
+ }
1467
+ case o.DOLLAR:
1468
+ if (t) if (this.expectToken(o.DOLLAR), this._lexer.token.kind === o.NAME) {
1469
+ let i = this._lexer.token.value;
1470
+ throw d(this._lexer.source, n.start, `Unexpected variable "$${i}" in constant value.`);
1471
+ } else throw this.unexpected(n);
1472
+ return this.parseVariable();
1473
+ default: throw this.unexpected();
1474
+ }
1475
+ }
1476
+ parseConstValueLiteral() {
1477
+ return this.parseValueLiteral(!0);
1478
+ }
1479
+ parseStringLiteral() {
1480
+ let t = this._lexer.token;
1481
+ return this.advanceLexer(), this.node(t, {
1482
+ kind: c.STRING,
1483
+ value: t.value,
1484
+ block: t.kind === o.BLOCK_STRING
1485
+ });
1486
+ }
1487
+ parseList(t) {
1488
+ let n = () => this.parseValueLiteral(t);
1489
+ return this.node(this._lexer.token, {
1490
+ kind: c.LIST,
1491
+ values: this.any(o.BRACKET_L, n, o.BRACKET_R)
1492
+ });
1493
+ }
1494
+ parseObject(t) {
1495
+ let n = () => this.parseObjectField(t);
1496
+ return this.node(this._lexer.token, {
1497
+ kind: c.OBJECT,
1498
+ fields: this.any(o.BRACE_L, n, o.BRACE_R)
1499
+ });
1500
+ }
1501
+ parseObjectField(t) {
1502
+ let n = this._lexer.token, i = this.parseName();
1503
+ return this.expectToken(o.COLON), this.node(n, {
1504
+ kind: c.OBJECT_FIELD,
1505
+ name: i,
1506
+ value: this.parseValueLiteral(t)
1507
+ });
1508
+ }
1509
+ parseDirectives(t) {
1510
+ let n = [];
1511
+ for (; this.peek(o.AT);) n.push(this.parseDirective(t));
1512
+ return n;
1513
+ }
1514
+ parseConstDirectives() {
1515
+ return this.parseDirectives(!0);
1516
+ }
1517
+ parseDirective(t) {
1518
+ let n = this._lexer.token;
1519
+ return this.expectToken(o.AT), this.node(n, {
1520
+ kind: c.DIRECTIVE,
1521
+ name: this.parseName(),
1522
+ arguments: this.parseArguments(t)
1523
+ });
1524
+ }
1525
+ parseTypeReference() {
1526
+ let t = this._lexer.token, n;
1527
+ if (this.expectOptionalToken(o.BRACKET_L)) {
1528
+ let i = this.parseTypeReference();
1529
+ this.expectToken(o.BRACKET_R), n = this.node(t, {
1530
+ kind: c.LIST_TYPE,
1531
+ type: i
1532
+ });
1533
+ } else n = this.parseNamedType();
1534
+ return this.expectOptionalToken(o.BANG) ? this.node(t, {
1535
+ kind: c.NON_NULL_TYPE,
1536
+ type: n
1537
+ }) : n;
1538
+ }
1539
+ parseNamedType() {
1540
+ return this.node(this._lexer.token, {
1541
+ kind: c.NAMED_TYPE,
1542
+ name: this.parseName()
1543
+ });
1544
+ }
1545
+ peekDescription() {
1546
+ return this.peek(o.STRING) || this.peek(o.BLOCK_STRING);
1547
+ }
1548
+ parseDescription() {
1549
+ if (this.peekDescription()) return this.parseStringLiteral();
1550
+ }
1551
+ parseSchemaDefinition() {
1552
+ let t = this._lexer.token, n = this.parseDescription();
1553
+ this.expectKeyword("schema");
1554
+ let i = this.parseConstDirectives(), r = this.many(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R);
1555
+ return this.node(t, {
1556
+ kind: c.SCHEMA_DEFINITION,
1557
+ description: n,
1558
+ directives: i,
1559
+ operationTypes: r
1560
+ });
1561
+ }
1562
+ parseOperationTypeDefinition() {
1563
+ let t = this._lexer.token, n = this.parseOperationType();
1564
+ this.expectToken(o.COLON);
1565
+ let i = this.parseNamedType();
1566
+ return this.node(t, {
1567
+ kind: c.OPERATION_TYPE_DEFINITION,
1568
+ operation: n,
1569
+ type: i
1570
+ });
1571
+ }
1572
+ parseScalarTypeDefinition() {
1573
+ let t = this._lexer.token, n = this.parseDescription();
1574
+ this.expectKeyword("scalar");
1575
+ let i = this.parseName(), r = this.parseConstDirectives();
1576
+ return this.node(t, {
1577
+ kind: c.SCALAR_TYPE_DEFINITION,
1578
+ description: n,
1579
+ name: i,
1580
+ directives: r
1581
+ });
1582
+ }
1583
+ parseObjectTypeDefinition() {
1584
+ let t = this._lexer.token, n = this.parseDescription();
1585
+ this.expectKeyword("type");
1586
+ let i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1587
+ return this.node(t, {
1588
+ kind: c.OBJECT_TYPE_DEFINITION,
1589
+ description: n,
1590
+ name: i,
1591
+ interfaces: r,
1592
+ directives: s,
1593
+ fields: a
1594
+ });
1595
+ }
1596
+ parseImplementsInterfaces() {
1597
+ return this.expectOptionalKeyword("implements") ? this.delimitedMany(o.AMP, this.parseNamedType) : [];
1598
+ }
1599
+ parseFieldsDefinition() {
1600
+ return this.optionalMany(o.BRACE_L, this.parseFieldDefinition, o.BRACE_R);
1601
+ }
1602
+ parseFieldDefinition() {
1603
+ let t = this._lexer.token, n = this.parseDescription(), i = this.parseName(), r = this.parseArgumentDefs();
1604
+ this.expectToken(o.COLON);
1605
+ let s = this.parseTypeReference(), a = this.parseConstDirectives();
1606
+ return this.node(t, {
1607
+ kind: c.FIELD_DEFINITION,
1608
+ description: n,
1609
+ name: i,
1610
+ arguments: r,
1611
+ type: s,
1612
+ directives: a
1613
+ });
1614
+ }
1615
+ parseArgumentDefs() {
1616
+ return this.optionalMany(o.PAREN_L, this.parseInputValueDef, o.PAREN_R);
1617
+ }
1618
+ parseInputValueDef() {
1619
+ let t = this._lexer.token, n = this.parseDescription(), i = this.parseName();
1620
+ this.expectToken(o.COLON);
1621
+ let r = this.parseTypeReference(), s;
1622
+ this.expectOptionalToken(o.EQUALS) && (s = this.parseConstValueLiteral());
1623
+ let a = this.parseConstDirectives();
1624
+ return this.node(t, {
1625
+ kind: c.INPUT_VALUE_DEFINITION,
1626
+ description: n,
1627
+ name: i,
1628
+ type: r,
1629
+ defaultValue: s,
1630
+ directives: a
1631
+ });
1632
+ }
1633
+ parseInterfaceTypeDefinition() {
1634
+ let t = this._lexer.token, n = this.parseDescription();
1635
+ this.expectKeyword("interface");
1636
+ let i = this.parseName(), r = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), a = this.parseFieldsDefinition();
1637
+ return this.node(t, {
1638
+ kind: c.INTERFACE_TYPE_DEFINITION,
1639
+ description: n,
1640
+ name: i,
1641
+ interfaces: r,
1642
+ directives: s,
1643
+ fields: a
1644
+ });
1645
+ }
1646
+ parseUnionTypeDefinition() {
1647
+ let t = this._lexer.token, n = this.parseDescription();
1648
+ this.expectKeyword("union");
1649
+ let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseUnionMemberTypes();
1650
+ return this.node(t, {
1651
+ kind: c.UNION_TYPE_DEFINITION,
1652
+ description: n,
1653
+ name: i,
1654
+ directives: r,
1655
+ types: s
1656
+ });
1657
+ }
1658
+ parseUnionMemberTypes() {
1659
+ return this.expectOptionalToken(o.EQUALS) ? this.delimitedMany(o.PIPE, this.parseNamedType) : [];
1660
+ }
1661
+ parseEnumTypeDefinition() {
1662
+ let t = this._lexer.token, n = this.parseDescription();
1663
+ this.expectKeyword("enum");
1664
+ let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseEnumValuesDefinition();
1665
+ return this.node(t, {
1666
+ kind: c.ENUM_TYPE_DEFINITION,
1667
+ description: n,
1668
+ name: i,
1669
+ directives: r,
1670
+ values: s
1671
+ });
1672
+ }
1673
+ parseEnumValuesDefinition() {
1674
+ return this.optionalMany(o.BRACE_L, this.parseEnumValueDefinition, o.BRACE_R);
1675
+ }
1676
+ parseEnumValueDefinition() {
1677
+ let t = this._lexer.token, n = this.parseDescription(), i = this.parseEnumValueName(), r = this.parseConstDirectives();
1678
+ return this.node(t, {
1679
+ kind: c.ENUM_VALUE_DEFINITION,
1680
+ description: n,
1681
+ name: i,
1682
+ directives: r
1683
+ });
1684
+ }
1685
+ parseEnumValueName() {
1686
+ if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null") throw d(this._lexer.source, this._lexer.token.start, `${oe(this._lexer.token)} is reserved and cannot be used for an enum value.`);
1687
+ return this.parseName();
1688
+ }
1689
+ parseInputObjectTypeDefinition() {
1690
+ let t = this._lexer.token, n = this.parseDescription();
1691
+ this.expectKeyword("input");
1692
+ let i = this.parseName(), r = this.parseConstDirectives(), s = this.parseInputFieldsDefinition();
1693
+ return this.node(t, {
1694
+ kind: c.INPUT_OBJECT_TYPE_DEFINITION,
1695
+ description: n,
1696
+ name: i,
1697
+ directives: r,
1698
+ fields: s
1699
+ });
1700
+ }
1701
+ parseInputFieldsDefinition() {
1702
+ return this.optionalMany(o.BRACE_L, this.parseInputValueDef, o.BRACE_R);
1703
+ }
1704
+ parseTypeSystemExtension() {
1705
+ let t = this._lexer.lookahead();
1706
+ if (t.kind === o.NAME) switch (t.value) {
1707
+ case "schema": return this.parseSchemaExtension();
1708
+ case "scalar": return this.parseScalarTypeExtension();
1709
+ case "type": return this.parseObjectTypeExtension();
1710
+ case "interface": return this.parseInterfaceTypeExtension();
1711
+ case "union": return this.parseUnionTypeExtension();
1712
+ case "enum": return this.parseEnumTypeExtension();
1713
+ case "input": return this.parseInputObjectTypeExtension();
1714
+ }
1715
+ throw this.unexpected(t);
1716
+ }
1717
+ parseSchemaExtension() {
1718
+ let t = this._lexer.token;
1719
+ this.expectKeyword("extend"), this.expectKeyword("schema");
1720
+ let n = this.parseConstDirectives(), i = this.optionalMany(o.BRACE_L, this.parseOperationTypeDefinition, o.BRACE_R);
1721
+ if (n.length === 0 && i.length === 0) throw this.unexpected();
1722
+ return this.node(t, {
1723
+ kind: c.SCHEMA_EXTENSION,
1724
+ directives: n,
1725
+ operationTypes: i
1726
+ });
1727
+ }
1728
+ parseScalarTypeExtension() {
1729
+ let t = this._lexer.token;
1730
+ this.expectKeyword("extend"), this.expectKeyword("scalar");
1731
+ let n = this.parseName(), i = this.parseConstDirectives();
1732
+ if (i.length === 0) throw this.unexpected();
1733
+ return this.node(t, {
1734
+ kind: c.SCALAR_TYPE_EXTENSION,
1735
+ name: n,
1736
+ directives: i
1737
+ });
1738
+ }
1739
+ parseObjectTypeExtension() {
1740
+ let t = this._lexer.token;
1741
+ this.expectKeyword("extend"), this.expectKeyword("type");
1742
+ let n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1743
+ if (i.length === 0 && r.length === 0 && s.length === 0) throw this.unexpected();
1744
+ return this.node(t, {
1745
+ kind: c.OBJECT_TYPE_EXTENSION,
1746
+ name: n,
1747
+ interfaces: i,
1748
+ directives: r,
1749
+ fields: s
1750
+ });
1751
+ }
1752
+ parseInterfaceTypeExtension() {
1753
+ let t = this._lexer.token;
1754
+ this.expectKeyword("extend"), this.expectKeyword("interface");
1755
+ let n = this.parseName(), i = this.parseImplementsInterfaces(), r = this.parseConstDirectives(), s = this.parseFieldsDefinition();
1756
+ if (i.length === 0 && r.length === 0 && s.length === 0) throw this.unexpected();
1757
+ return this.node(t, {
1758
+ kind: c.INTERFACE_TYPE_EXTENSION,
1759
+ name: n,
1760
+ interfaces: i,
1761
+ directives: r,
1762
+ fields: s
1763
+ });
1764
+ }
1765
+ parseUnionTypeExtension() {
1766
+ let t = this._lexer.token;
1767
+ this.expectKeyword("extend"), this.expectKeyword("union");
1768
+ let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseUnionMemberTypes();
1769
+ if (i.length === 0 && r.length === 0) throw this.unexpected();
1770
+ return this.node(t, {
1771
+ kind: c.UNION_TYPE_EXTENSION,
1772
+ name: n,
1773
+ directives: i,
1774
+ types: r
1775
+ });
1776
+ }
1777
+ parseEnumTypeExtension() {
1778
+ let t = this._lexer.token;
1779
+ this.expectKeyword("extend"), this.expectKeyword("enum");
1780
+ let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseEnumValuesDefinition();
1781
+ if (i.length === 0 && r.length === 0) throw this.unexpected();
1782
+ return this.node(t, {
1783
+ kind: c.ENUM_TYPE_EXTENSION,
1784
+ name: n,
1785
+ directives: i,
1786
+ values: r
1787
+ });
1788
+ }
1789
+ parseInputObjectTypeExtension() {
1790
+ let t = this._lexer.token;
1791
+ this.expectKeyword("extend"), this.expectKeyword("input");
1792
+ let n = this.parseName(), i = this.parseConstDirectives(), r = this.parseInputFieldsDefinition();
1793
+ if (i.length === 0 && r.length === 0) throw this.unexpected();
1794
+ return this.node(t, {
1795
+ kind: c.INPUT_OBJECT_TYPE_EXTENSION,
1796
+ name: n,
1797
+ directives: i,
1798
+ fields: r
1799
+ });
1800
+ }
1801
+ parseDirectiveDefinition() {
1802
+ let t = this._lexer.token, n = this.parseDescription();
1803
+ this.expectKeyword("directive"), this.expectToken(o.AT);
1804
+ let i = this.parseName(), r = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable");
1805
+ this.expectKeyword("on");
1806
+ let a = this.parseDirectiveLocations();
1807
+ return this.node(t, {
1808
+ kind: c.DIRECTIVE_DEFINITION,
1809
+ description: n,
1810
+ name: i,
1811
+ arguments: r,
1812
+ repeatable: s,
1813
+ locations: a
1814
+ });
1815
+ }
1816
+ parseDirectiveLocations() {
1817
+ return this.delimitedMany(o.PIPE, this.parseDirectiveLocation);
1818
+ }
1819
+ parseDirectiveLocation() {
1820
+ let t = this._lexer.token, n = this.parseName();
1821
+ if (Object.prototype.hasOwnProperty.call(ee, n.value)) return n;
1822
+ throw this.unexpected(t);
1823
+ }
1824
+ node(t, n) {
1825
+ return this._options.noLocation !== !0 && (n.loc = new Q(t, this._lexer.lastToken, this._lexer.source)), n;
1826
+ }
1827
+ peek(t) {
1828
+ return this._lexer.token.kind === t;
1829
+ }
1830
+ expectToken(t) {
1831
+ let n = this._lexer.token;
1832
+ if (n.kind === t) return this.advanceLexer(), n;
1833
+ throw d(this._lexer.source, n.start, `Expected ${dt(t)}, found ${oe(n)}.`);
1834
+ }
1835
+ expectOptionalToken(t) {
1836
+ return this._lexer.token.kind === t ? (this.advanceLexer(), !0) : !1;
1837
+ }
1838
+ expectKeyword(t) {
1839
+ let n = this._lexer.token;
1840
+ if (n.kind === o.NAME && n.value === t) this.advanceLexer();
1841
+ else throw d(this._lexer.source, n.start, `Expected "${t}", found ${oe(n)}.`);
1842
+ }
1843
+ expectOptionalKeyword(t) {
1844
+ let n = this._lexer.token;
1845
+ return n.kind === o.NAME && n.value === t ? (this.advanceLexer(), !0) : !1;
1846
+ }
1847
+ unexpected(t) {
1848
+ let n = t ?? this._lexer.token;
1849
+ return d(this._lexer.source, n.start, `Unexpected ${oe(n)}.`);
1850
+ }
1851
+ any(t, n, i) {
1852
+ this.expectToken(t);
1853
+ let r = [];
1854
+ for (; !this.expectOptionalToken(i);) r.push(n.call(this));
1855
+ return r;
1856
+ }
1857
+ optionalMany(t, n, i) {
1858
+ if (this.expectOptionalToken(t)) {
1859
+ let r = [];
1860
+ do
1861
+ r.push(n.call(this));
1862
+ while (!this.expectOptionalToken(i));
1863
+ return r;
1864
+ }
1865
+ return [];
1866
+ }
1867
+ many(t, n, i) {
1868
+ this.expectToken(t);
1869
+ let r = [];
1870
+ do
1871
+ r.push(n.call(this));
1872
+ while (!this.expectOptionalToken(i));
1873
+ return r;
1874
+ }
1875
+ delimitedMany(t, n) {
1876
+ this.expectOptionalToken(t);
1877
+ let i = [];
1878
+ do
1879
+ i.push(n.call(this));
1880
+ while (this.expectOptionalToken(t));
1881
+ return i;
1882
+ }
1883
+ advanceLexer() {
1884
+ let { maxTokens: t } = this._options, n = this._lexer.advance();
1885
+ if (n.kind !== o.EOF && (++this._tokenCounter, t !== void 0 && this._tokenCounter > t)) throw d(this._lexer.source, n.start, `Document contains more that ${t} tokens. Parsing aborted.`);
1886
+ }
1887
+ };
1888
+ mt = sn;
1889
+ an = { allowLegacyFragmentVariables: !0 };
1890
+ ln = {
1891
+ parse: un,
1892
+ astFormat: "graphql",
1893
+ hasPragma: je,
1894
+ hasIgnorePragma: $e,
1895
+ locStart: K,
1896
+ locEnd: z
1897
+ };
1898
+ pn = { graphql: qe };
1899
+ Ui = Ne;
1900
+ }))();
1901
+ export { Ui as default, Qe as languages, Ke as options, _e as parsers, pn as printers };