@powerhousedao/connect 5.0.0-staging.9 → 5.0.1-staging.10

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 (638) hide show
  1. package/{dist/.env → .env} +4 -6
  2. package/README.md +3 -4
  3. package/assets/icon.icns +0 -0
  4. package/assets/icon.ico +0 -0
  5. package/assets/icon.png +0 -0
  6. package/assets/icons/Atlas-Logomark.svg +24 -0
  7. package/assets/icons/BBP-logo-hover-dark.svg +14 -0
  8. package/assets/icons/BBP-logo-hover-light.svg +14 -0
  9. package/assets/icons/BBP-logo-main.svg +14 -0
  10. package/assets/icons/collapse.svg +7 -0
  11. package/assets/icons/connect-small.svg +3 -0
  12. package/assets/icons/connect.svg +16 -0
  13. package/assets/icons/cross.svg +4 -0
  14. package/assets/icons/dark.svg +5 -0
  15. package/assets/icons/draft.svg +3 -0
  16. package/assets/icons/file.svg +3 -0
  17. package/assets/icons/file2.svg +10 -0
  18. package/assets/icons/folder.svg +3 -0
  19. package/assets/icons/light.svg +20 -0
  20. package/assets/icons/logo.svg +11 -0
  21. package/assets/icons/plus-circle.svg +5 -0
  22. package/assets/icons/refresh.svg +4 -0
  23. package/assets/icons/renown.svg +27 -0
  24. package/assets/icons/settings.svg +6 -0
  25. package/assets/icons/template.svg +3 -0
  26. package/assets/info.plist +85 -0
  27. package/dist/assets/AddDriveModal-_VEckfgs.js +1 -0
  28. package/dist/assets/ClearStorageModal-BIEumLFB.js +1 -0
  29. package/dist/assets/CookiesPolicyModal-DxXlDzMD.js +1 -0
  30. package/dist/assets/CreateDocumentModal-i8Mn-zHZ.js +1 -0
  31. package/dist/assets/DebugSettingsModal-B7_0MfyY.js +1 -0
  32. package/dist/assets/DeleteDriveModal-Z_QkBHwL.js +1 -0
  33. package/dist/assets/DeleteItemModal-PX5rpWQp.js +1 -0
  34. package/dist/assets/DisclaimerModal-DnyAi8SY.js +1 -0
  35. package/dist/assets/DriveSettingsModal-CKBxDPF4.js +1 -0
  36. package/dist/assets/ExportDocumentWithErrorsModal-PwfR0wZb.js +1 -0
  37. package/dist/assets/SettingsModal-CvlSE5u_.js +1 -0
  38. package/dist/assets/UpgradeDriveModal-C5OBv8od.js +1 -0
  39. package/dist/assets/config-CU-aFfVJ.js +1 -0
  40. package/dist/assets/design_system-wkSa2XkO.js +45 -0
  41. package/dist/assets/design_system_connect-KiHH4lsC.js +45 -0
  42. package/dist/assets/design_system_ui-yn9Bp8-M.js +1 -0
  43. package/dist/assets/document_drive-BEIKnuGM.js +305 -0
  44. package/dist/assets/document_engineering-DwkL4RC_.js +1 -0
  45. package/dist/assets/document_model-DXcLJEjZ.js +230 -0
  46. package/dist/assets/document_model_editor-Dzl0xzA_.js +23 -0
  47. package/dist/assets/drive_explorer-BXnew3vz.js +2 -0
  48. package/dist/assets/graphql-BS4Brs_E.js +75 -0
  49. package/dist/assets/graphql-editor-CYvFkX8-.js +73 -0
  50. package/dist/assets/graphql_request-9RNJ00DB.js +3 -0
  51. package/dist/assets/hmr-LMNkvzP7.js +1 -0
  52. package/dist/assets/hooks-D1J714hY.js +12 -0
  53. package/dist/assets/index-2InhLUpC.js +18 -0
  54. package/dist/assets/index-Br7E7qjt.css +1 -0
  55. package/dist/assets/json-editor-Meugtes8.js +1 -0
  56. package/dist/assets/react/jsx-runtime-DldvXD6N.js +1 -0
  57. package/dist/assets/react-DQSxOgtG.js +1 -0
  58. package/dist/assets/react-dom/client-BVPiT_FE.js +9 -0
  59. package/dist/assets/react-dom-D6zQJsh6.js +1 -0
  60. package/dist/assets/reactor_browser-CSyNHuU2.js +25 -0
  61. package/dist/assets/sentry_browser-B4YoBIIG.js +498 -0
  62. package/dist/assets/sentry_react-cODD7zWc.js +3 -0
  63. package/dist/assets/state-schemas-Dq1fQPOB.js +2 -0
  64. package/dist/assets/tailwind_merge-Dr4f9Rms.js +1 -0
  65. package/dist/assets/virtual_ph_external-packages-CM1tCR4L.js +1 -0
  66. package/dist/assets/zod-C6yxFxyo.js +1 -0
  67. package/dist/index.html +51 -75
  68. package/heroku/Dockerfile +98 -0
  69. package/heroku/Procfile +1 -0
  70. package/heroku/config/nginx.conf.template +77 -0
  71. package/heroku/heroku-entrypoint.sh +38 -0
  72. package/lib/cypress/e2e/navigation.cy.d.ts +2 -0
  73. package/lib/cypress/e2e/navigation.cy.d.ts.map +1 -0
  74. package/lib/cypress/e2e/navigation.cy.js +221 -0
  75. package/lib/cypress/e2e/navigation.cy.js.map +1 -0
  76. package/lib/cypress/e2e/utils/index.d.ts +15 -0
  77. package/lib/cypress/e2e/utils/index.d.ts.map +1 -0
  78. package/lib/cypress/e2e/utils/index.js +121 -0
  79. package/lib/cypress/e2e/utils/index.js.map +1 -0
  80. package/lib/cypress/support/commands.d.ts +2 -0
  81. package/lib/cypress/support/commands.d.ts.map +1 -0
  82. package/lib/cypress/support/commands.js +29 -0
  83. package/lib/cypress/support/commands.js.map +1 -0
  84. package/lib/cypress/support/e2e.d.ts +2 -0
  85. package/lib/cypress/support/e2e.d.ts.map +1 -0
  86. package/lib/cypress/support/e2e.js +19 -0
  87. package/lib/cypress/support/e2e.js.map +1 -0
  88. package/lib/cypress.config.d.ts +3 -0
  89. package/lib/cypress.config.d.ts.map +1 -0
  90. package/lib/cypress.config.js +15 -0
  91. package/lib/cypress.config.js.map +1 -0
  92. package/lib/package.copy.json +165 -0
  93. package/lib/scripts/render-skeleton.d.ts +2 -0
  94. package/lib/scripts/render-skeleton.d.ts.map +1 -0
  95. package/lib/scripts/render-skeleton.js +11 -0
  96. package/lib/scripts/render-skeleton.js.map +1 -0
  97. package/lib/src/components/analytics.d.ts +8 -0
  98. package/lib/src/components/analytics.d.ts.map +1 -0
  99. package/lib/src/components/analytics.js +30 -0
  100. package/lib/src/components/analytics.js.map +1 -0
  101. package/lib/src/components/app-loader.d.ts +7 -0
  102. package/lib/src/components/app-loader.d.ts.map +1 -0
  103. package/lib/src/components/app-loader.js +20 -0
  104. package/lib/src/components/app-loader.js.map +1 -0
  105. package/lib/src/components/app-skeleton.d.ts +3 -0
  106. package/lib/src/components/app-skeleton.d.ts.map +1 -0
  107. package/lib/src/components/app-skeleton.js +38 -0
  108. package/lib/src/components/app-skeleton.js.map +1 -0
  109. package/lib/src/components/app.d.ts +2 -0
  110. package/lib/src/components/app.d.ts.map +1 -0
  111. package/lib/src/components/app.js +18 -0
  112. package/lib/src/components/app.js.map +1 -0
  113. package/lib/src/components/button.d.ts +3 -0
  114. package/lib/src/components/button.d.ts.map +1 -0
  115. package/lib/src/components/button.js +7 -0
  116. package/lib/src/components/button.js.map +1 -0
  117. package/lib/src/components/cookie-banner.d.ts +2 -0
  118. package/lib/src/components/cookie-banner.d.ts.map +1 -0
  119. package/lib/src/components/cookie-banner.js +48 -0
  120. package/lib/src/components/cookie-banner.js.map +1 -0
  121. package/lib/src/components/document-editor-container.d.ts +2 -0
  122. package/lib/src/components/document-editor-container.d.ts.map +1 -0
  123. package/lib/src/components/document-editor-container.js +62 -0
  124. package/lib/src/components/document-editor-container.js.map +1 -0
  125. package/lib/src/components/dots-loader.d.ts +2 -0
  126. package/lib/src/components/dots-loader.d.ts.map +1 -0
  127. package/lib/src/components/dots-loader.js +15 -0
  128. package/lib/src/components/dots-loader.js.map +1 -0
  129. package/lib/src/components/drive-editor-container.d.ts +2 -0
  130. package/lib/src/components/drive-editor-container.d.ts.map +1 -0
  131. package/lib/src/components/drive-editor-container.js +25 -0
  132. package/lib/src/components/drive-editor-container.js.map +1 -0
  133. package/lib/src/components/drive-icon.d.ts +5 -0
  134. package/lib/src/components/drive-icon.d.ts.map +1 -0
  135. package/lib/src/components/drive-icon.js +15 -0
  136. package/lib/src/components/drive-icon.js.map +1 -0
  137. package/lib/src/components/editor-loader.d.ts +9 -0
  138. package/lib/src/components/editor-loader.d.ts.map +1 -0
  139. package/lib/src/components/editor-loader.js +19 -0
  140. package/lib/src/components/editor-loader.js.map +1 -0
  141. package/lib/src/components/editors.d.ts +10 -0
  142. package/lib/src/components/editors.d.ts.map +1 -0
  143. package/lib/src/components/editors.js +93 -0
  144. package/lib/src/components/editors.js.map +1 -0
  145. package/lib/src/components/footer.d.ts +2 -0
  146. package/lib/src/components/footer.d.ts.map +1 -0
  147. package/lib/src/components/footer.js +16 -0
  148. package/lib/src/components/footer.js.map +1 -0
  149. package/lib/src/components/index.d.ts +22 -0
  150. package/lib/src/components/index.d.ts.map +1 -0
  151. package/lib/src/components/index.js +22 -0
  152. package/lib/src/components/index.js.map +1 -0
  153. package/lib/src/components/login.d.ts +2 -0
  154. package/lib/src/components/login.d.ts.map +1 -0
  155. package/lib/src/components/login.js +12 -0
  156. package/lib/src/components/login.js.map +1 -0
  157. package/lib/src/components/modal/index.d.ts +19 -0
  158. package/lib/src/components/modal/index.d.ts.map +1 -0
  159. package/lib/src/components/modal/index.js +19 -0
  160. package/lib/src/components/modal/index.js.map +1 -0
  161. package/lib/src/components/modal/modals/AddDriveModal.d.ts +2 -0
  162. package/lib/src/components/modal/modals/AddDriveModal.d.ts.map +1 -0
  163. package/lib/src/components/modal/modals/AddDriveModal.js +113 -0
  164. package/lib/src/components/modal/modals/AddDriveModal.js.map +1 -0
  165. package/lib/src/components/modal/modals/ClearStorageModal.d.ts +2 -0
  166. package/lib/src/components/modal/modals/ClearStorageModal.d.ts.map +1 -0
  167. package/lib/src/components/modal/modals/ClearStorageModal.js +35 -0
  168. package/lib/src/components/modal/modals/ClearStorageModal.js.map +1 -0
  169. package/lib/src/components/modal/modals/CookiesPolicyModal.d.ts +2 -0
  170. package/lib/src/components/modal/modals/CookiesPolicyModal.d.ts.map +1 -0
  171. package/lib/src/components/modal/modals/CookiesPolicyModal.js +16 -0
  172. package/lib/src/components/modal/modals/CookiesPolicyModal.js.map +1 -0
  173. package/lib/src/components/modal/modals/CreateDocumentModal.d.ts +2 -0
  174. package/lib/src/components/modal/modals/CreateDocumentModal.d.ts.map +1 -0
  175. package/lib/src/components/modal/modals/CreateDocumentModal.js +24 -0
  176. package/lib/src/components/modal/modals/CreateDocumentModal.js.map +1 -0
  177. package/lib/src/components/modal/modals/DebugSettingsModal.d.ts +2 -0
  178. package/lib/src/components/modal/modals/DebugSettingsModal.d.ts.map +1 -0
  179. package/lib/src/components/modal/modals/DebugSettingsModal.js +108 -0
  180. package/lib/src/components/modal/modals/DebugSettingsModal.js.map +1 -0
  181. package/lib/src/components/modal/modals/DeleteDriveModal.d.ts +2 -0
  182. package/lib/src/components/modal/modals/DeleteDriveModal.d.ts.map +1 -0
  183. package/lib/src/components/modal/modals/DeleteDriveModal.js +32 -0
  184. package/lib/src/components/modal/modals/DeleteDriveModal.js.map +1 -0
  185. package/lib/src/components/modal/modals/DeleteItemModal.d.ts +3 -0
  186. package/lib/src/components/modal/modals/DeleteItemModal.d.ts.map +1 -0
  187. package/lib/src/components/modal/modals/DeleteItemModal.js +33 -0
  188. package/lib/src/components/modal/modals/DeleteItemModal.js.map +1 -0
  189. package/lib/src/components/modal/modals/DisclaimerModal.d.ts +3 -0
  190. package/lib/src/components/modal/modals/DisclaimerModal.d.ts.map +1 -0
  191. package/lib/src/components/modal/modals/DisclaimerModal.js +12 -0
  192. package/lib/src/components/modal/modals/DisclaimerModal.js.map +1 -0
  193. package/lib/src/components/modal/modals/DriveSettingsModal.d.ts +2 -0
  194. package/lib/src/components/modal/modals/DriveSettingsModal.d.ts.map +1 -0
  195. package/lib/src/components/modal/modals/DriveSettingsModal.js +28 -0
  196. package/lib/src/components/modal/modals/DriveSettingsModal.js.map +1 -0
  197. package/lib/src/components/modal/modals/ExportDocumentWithErrorsModal.d.ts +2 -0
  198. package/lib/src/components/modal/modals/ExportDocumentWithErrorsModal.d.ts.map +1 -0
  199. package/lib/src/components/modal/modals/ExportDocumentWithErrorsModal.js +30 -0
  200. package/lib/src/components/modal/modals/ExportDocumentWithErrorsModal.js.map +1 -0
  201. package/lib/src/components/modal/modals/SettingsModal.d.ts +3 -0
  202. package/lib/src/components/modal/modals/SettingsModal.d.ts.map +1 -0
  203. package/lib/src/components/modal/modals/SettingsModal.js +45 -0
  204. package/lib/src/components/modal/modals/SettingsModal.js.map +1 -0
  205. package/lib/src/components/modal/modals/UpgradeDriveModal.d.ts +3 -0
  206. package/lib/src/components/modal/modals/UpgradeDriveModal.d.ts.map +1 -0
  207. package/lib/src/components/modal/modals/UpgradeDriveModal.js +21 -0
  208. package/lib/src/components/modal/modals/UpgradeDriveModal.js.map +1 -0
  209. package/lib/src/components/modal/modals/settings/about.d.ts +2 -0
  210. package/lib/src/components/modal/modals/settings/about.d.ts.map +1 -0
  211. package/lib/src/components/modal/modals/settings/about.js +10 -0
  212. package/lib/src/components/modal/modals/settings/about.js.map +1 -0
  213. package/lib/src/components/modal/modals/settings/danger-zone.d.ts +2 -0
  214. package/lib/src/components/modal/modals/settings/danger-zone.d.ts.map +1 -0
  215. package/lib/src/components/modal/modals/settings/danger-zone.js +15 -0
  216. package/lib/src/components/modal/modals/settings/danger-zone.js.map +1 -0
  217. package/lib/src/components/modal/modals/settings/default-editor.d.ts +2 -0
  218. package/lib/src/components/modal/modals/settings/default-editor.d.ts.map +1 -0
  219. package/lib/src/components/modal/modals/settings/default-editor.js +18 -0
  220. package/lib/src/components/modal/modals/settings/default-editor.js.map +1 -0
  221. package/lib/src/components/modal/modals/settings/package-manager.d.ts +3 -0
  222. package/lib/src/components/modal/modals/settings/package-manager.d.ts.map +1 -0
  223. package/lib/src/components/modal/modals/settings/package-manager.js +87 -0
  224. package/lib/src/components/modal/modals/settings/package-manager.js.map +1 -0
  225. package/lib/src/components/modal/modals-container.d.ts +2 -0
  226. package/lib/src/components/modal/modals-container.d.ts.map +1 -0
  227. package/lib/src/components/modal/modals-container.js +62 -0
  228. package/lib/src/components/modal/modals-container.js.map +1 -0
  229. package/lib/src/components/modal/modals-error-boundary.d.ts +18 -0
  230. package/lib/src/components/modal/modals-error-boundary.d.ts.map +1 -0
  231. package/lib/src/components/modal/modals-error-boundary.js +22 -0
  232. package/lib/src/components/modal/modals-error-boundary.js.map +1 -0
  233. package/lib/src/components/ph-logo.d.ts +2 -0
  234. package/lib/src/components/ph-logo.d.ts.map +1 -0
  235. package/lib/src/components/ph-logo.js +7 -0
  236. package/lib/src/components/ph-logo.js.map +1 -0
  237. package/lib/src/components/reload-connect-toast.d.ts +2 -0
  238. package/lib/src/components/reload-connect-toast.d.ts.map +1 -0
  239. package/lib/src/components/reload-connect-toast.js +7 -0
  240. package/lib/src/components/reload-connect-toast.js.map +1 -0
  241. package/lib/src/components/root.d.ts +2 -0
  242. package/lib/src/components/root.d.ts.map +1 -0
  243. package/lib/src/components/root.js +8 -0
  244. package/lib/src/components/root.js.map +1 -0
  245. package/lib/src/components/router.d.ts +2 -0
  246. package/lib/src/components/router.d.ts.map +1 -0
  247. package/lib/src/components/router.js +41 -0
  248. package/lib/src/components/router.js.map +1 -0
  249. package/lib/src/components/search-bar.d.ts +2 -0
  250. package/lib/src/components/search-bar.d.ts.map +1 -0
  251. package/lib/src/components/search-bar.js +36 -0
  252. package/lib/src/components/search-bar.js.map +1 -0
  253. package/lib/src/components/sidebar.d.ts +2 -0
  254. package/lib/src/components/sidebar.d.ts.map +1 -0
  255. package/lib/src/components/sidebar.js +27 -0
  256. package/lib/src/components/sidebar.js.map +1 -0
  257. package/lib/src/connect.config.d.ts +113 -0
  258. package/lib/src/connect.config.d.ts.map +1 -0
  259. package/lib/src/connect.config.js +147 -0
  260. package/lib/src/connect.config.js.map +1 -0
  261. package/lib/src/context/index.d.ts +4 -0
  262. package/lib/src/context/index.d.ts.map +1 -0
  263. package/lib/src/context/index.js +4 -0
  264. package/lib/src/context/index.js.map +1 -0
  265. package/lib/src/context/processor-manager.d.ts +3 -0
  266. package/lib/src/context/processor-manager.d.ts.map +1 -0
  267. package/lib/src/context/processor-manager.js +189 -0
  268. package/lib/src/context/processor-manager.js.map +1 -0
  269. package/lib/src/context/read-mode.d.ts +2 -0
  270. package/lib/src/context/read-mode.d.ts.map +1 -0
  271. package/lib/src/context/read-mode.js +219 -0
  272. package/lib/src/context/read-mode.js.map +1 -0
  273. package/lib/src/context/sentry-provider.d.ts +6 -0
  274. package/lib/src/context/sentry-provider.d.ts.map +1 -0
  275. package/lib/src/context/sentry-provider.js +6 -0
  276. package/lib/src/context/sentry-provider.js.map +1 -0
  277. package/lib/src/feature-flags.d.ts +34 -0
  278. package/lib/src/feature-flags.d.ts.map +1 -0
  279. package/lib/src/feature-flags.js +124 -0
  280. package/lib/src/feature-flags.js.map +1 -0
  281. package/lib/src/globals.d.ts +9 -0
  282. package/lib/src/globals.d.ts.map +1 -0
  283. package/lib/src/globals.js +2 -0
  284. package/lib/src/globals.js.map +1 -0
  285. package/lib/src/hmr.d.ts +3 -0
  286. package/lib/src/hmr.d.ts.map +1 -0
  287. package/lib/src/hmr.js +2 -0
  288. package/lib/src/hmr.js.map +1 -0
  289. package/lib/src/hooks/index.d.ts +10 -0
  290. package/lib/src/hooks/index.d.ts.map +1 -0
  291. package/lib/src/hooks/index.js +10 -0
  292. package/lib/src/hooks/index.js.map +1 -0
  293. package/lib/src/hooks/useAcceptedCookies.d.ts +9 -0
  294. package/lib/src/hooks/useAcceptedCookies.d.ts.map +1 -0
  295. package/lib/src/hooks/useAcceptedCookies.js +34 -0
  296. package/lib/src/hooks/useAcceptedCookies.js.map +1 -0
  297. package/lib/src/hooks/useCheckLatestVersion.d.ts +2 -0
  298. package/lib/src/hooks/useCheckLatestVersion.d.ts.map +1 -0
  299. package/lib/src/hooks/useCheckLatestVersion.js +33 -0
  300. package/lib/src/hooks/useCheckLatestVersion.js.map +1 -0
  301. package/lib/src/hooks/useClientErrorHandler.d.ts +6 -0
  302. package/lib/src/hooks/useClientErrorHandler.d.ts.map +1 -0
  303. package/lib/src/hooks/useClientErrorHandler.js +120 -0
  304. package/lib/src/hooks/useClientErrorHandler.js.map +1 -0
  305. package/lib/src/hooks/useCookieBanner.d.ts +5 -0
  306. package/lib/src/hooks/useCookieBanner.d.ts.map +1 -0
  307. package/lib/src/hooks/useCookieBanner.js +32 -0
  308. package/lib/src/hooks/useCookieBanner.js.map +1 -0
  309. package/lib/src/hooks/useInitSentry.d.ts +2 -0
  310. package/lib/src/hooks/useInitSentry.d.ts.map +1 -0
  311. package/lib/src/hooks/useInitSentry.js +80 -0
  312. package/lib/src/hooks/useInitSentry.js.map +1 -0
  313. package/lib/src/hooks/useNodeActions.d.ts +6 -0
  314. package/lib/src/hooks/useNodeActions.d.ts.map +1 -0
  315. package/lib/src/hooks/useNodeActions.js +35 -0
  316. package/lib/src/hooks/useNodeActions.js.map +1 -0
  317. package/lib/src/hooks/useUndoRedoShortcuts.d.ts +8 -0
  318. package/lib/src/hooks/useUndoRedoShortcuts.d.ts.map +1 -0
  319. package/lib/src/hooks/useUndoRedoShortcuts.js +26 -0
  320. package/lib/src/hooks/useUndoRedoShortcuts.js.map +1 -0
  321. package/lib/src/hooks/useWindowSize.d.ts +5 -0
  322. package/lib/src/hooks/useWindowSize.d.ts.map +1 -0
  323. package/lib/src/hooks/useWindowSize.js +21 -0
  324. package/lib/src/hooks/useWindowSize.js.map +1 -0
  325. package/lib/src/hooks/utils.d.ts +7 -0
  326. package/lib/src/hooks/utils.d.ts.map +1 -0
  327. package/lib/src/hooks/utils.js +46 -0
  328. package/lib/src/hooks/utils.js.map +1 -0
  329. package/lib/src/i18n/index.d.ts +4 -0
  330. package/lib/src/i18n/index.d.ts.map +1 -0
  331. package/lib/src/i18n/index.js +26 -0
  332. package/lib/src/i18n/index.js.map +1 -0
  333. package/lib/src/i18n/locales/en.json +114 -0
  334. package/lib/src/index.d.ts +2 -0
  335. package/lib/src/index.d.ts.map +1 -0
  336. package/lib/src/index.js +2 -0
  337. package/lib/src/index.js.map +1 -0
  338. package/lib/src/main.d.ts +2 -0
  339. package/lib/src/main.d.ts.map +1 -0
  340. package/lib/src/main.js +5 -0
  341. package/lib/src/main.js.map +1 -0
  342. package/lib/src/pages/content.d.ts +2 -0
  343. package/lib/src/pages/content.d.ts.map +1 -0
  344. package/lib/src/pages/content.js +39 -0
  345. package/lib/src/pages/content.js.map +1 -0
  346. package/lib/src/pages/demo/atlas-import.d.ts +2 -0
  347. package/lib/src/pages/demo/atlas-import.d.ts.map +1 -0
  348. package/lib/src/pages/demo/atlas-import.js +122 -0
  349. package/lib/src/pages/demo/atlas-import.js.map +1 -0
  350. package/lib/src/pages/index.d.ts +4 -0
  351. package/lib/src/pages/index.d.ts.map +1 -0
  352. package/lib/src/pages/index.js +4 -0
  353. package/lib/src/pages/index.js.map +1 -0
  354. package/lib/src/pages/settings.d.ts +4 -0
  355. package/lib/src/pages/settings.d.ts.map +1 -0
  356. package/lib/src/pages/settings.js +9 -0
  357. package/lib/src/pages/settings.js.map +1 -0
  358. package/lib/src/service-worker.d.ts +2 -0
  359. package/lib/src/service-worker.d.ts.map +1 -0
  360. package/lib/src/service-worker.js +58 -0
  361. package/lib/src/service-worker.js.map +1 -0
  362. package/lib/src/services/hmr.d.ts +13 -0
  363. package/lib/src/services/hmr.d.ts.map +1 -0
  364. package/lib/src/services/hmr.js +85 -0
  365. package/lib/src/services/hmr.js.map +1 -0
  366. package/lib/src/services/index.d.ts +10 -0
  367. package/lib/src/services/index.d.ts.map +1 -0
  368. package/lib/src/services/index.js +9 -0
  369. package/lib/src/services/index.js.map +1 -0
  370. package/lib/src/services/logger.d.ts +2 -0
  371. package/lib/src/services/logger.d.ts.map +1 -0
  372. package/lib/src/services/logger.js +28 -0
  373. package/lib/src/services/logger.js.map +1 -0
  374. package/lib/src/services/renown/browser.d.ts +2 -0
  375. package/lib/src/services/renown/browser.d.ts.map +1 -0
  376. package/lib/src/services/renown/browser.js +6 -0
  377. package/lib/src/services/renown/browser.js.map +1 -0
  378. package/lib/src/services/renown/constants.d.ts +130 -0
  379. package/lib/src/services/renown/constants.d.ts.map +1 -0
  380. package/lib/src/services/renown/constants.js +41 -0
  381. package/lib/src/services/renown/constants.js.map +1 -0
  382. package/lib/src/services/renown/utils.d.ts +7 -0
  383. package/lib/src/services/renown/utils.d.ts.map +1 -0
  384. package/lib/src/services/renown/utils.js +20 -0
  385. package/lib/src/services/renown/utils.js.map +1 -0
  386. package/lib/src/services/storage/base-storage.d.ts +9 -0
  387. package/lib/src/services/storage/base-storage.d.ts.map +1 -0
  388. package/lib/src/services/storage/base-storage.js +21 -0
  389. package/lib/src/services/storage/base-storage.js.map +1 -0
  390. package/lib/src/services/storage/browser.d.ts +5 -0
  391. package/lib/src/services/storage/browser.d.ts.map +1 -0
  392. package/lib/src/services/storage/browser.js +25 -0
  393. package/lib/src/services/storage/browser.js.map +1 -0
  394. package/lib/src/services/storage/types.d.ts +6 -0
  395. package/lib/src/services/storage/types.d.ts.map +1 -0
  396. package/lib/src/services/storage/types.js +2 -0
  397. package/lib/src/services/storage/types.js.map +1 -0
  398. package/lib/src/services/toast.d.ts +8 -0
  399. package/lib/src/services/toast.d.ts.map +1 -0
  400. package/lib/src/services/toast.js +11 -0
  401. package/lib/src/services/toast.js.map +1 -0
  402. package/lib/src/store/document-model.d.ts +3 -0
  403. package/lib/src/store/document-model.d.ts.map +1 -0
  404. package/lib/src/store/document-model.js +79 -0
  405. package/lib/src/store/document-model.js.map +1 -0
  406. package/lib/src/store/editor.d.ts +5 -0
  407. package/lib/src/store/editor.d.ts.map +1 -0
  408. package/lib/src/store/editor.js +31 -0
  409. package/lib/src/store/editor.js.map +1 -0
  410. package/lib/src/store/external-packages.d.ts +4 -0
  411. package/lib/src/store/external-packages.d.ts.map +1 -0
  412. package/lib/src/store/external-packages.js +36 -0
  413. package/lib/src/store/external-packages.js.map +1 -0
  414. package/lib/src/store/index.d.ts +7 -0
  415. package/lib/src/store/index.d.ts.map +1 -0
  416. package/lib/src/store/index.js +7 -0
  417. package/lib/src/store/index.js.map +1 -0
  418. package/lib/src/store/reactor.d.ts +3 -0
  419. package/lib/src/store/reactor.d.ts.map +1 -0
  420. package/lib/src/store/reactor.js +177 -0
  421. package/lib/src/store/reactor.js.map +1 -0
  422. package/lib/src/store/user.d.ts +2 -0
  423. package/lib/src/store/user.d.ts.map +1 -0
  424. package/lib/src/store/user.js +16 -0
  425. package/lib/src/store/user.js.map +1 -0
  426. package/lib/src/store/utils.d.ts +2 -0
  427. package/lib/src/store/utils.d.ts.map +1 -0
  428. package/lib/src/store/utils.js +59 -0
  429. package/lib/src/store/utils.js.map +1 -0
  430. package/lib/src/utils/browser.d.ts +2 -0
  431. package/lib/src/utils/browser.d.ts.map +1 -0
  432. package/lib/src/utils/browser.js +9 -0
  433. package/lib/src/utils/browser.js.map +1 -0
  434. package/lib/src/utils/document-editor-debug-tools.d.ts +17 -0
  435. package/lib/src/utils/document-editor-debug-tools.d.ts.map +1 -0
  436. package/lib/src/utils/document-editor-debug-tools.js +55 -0
  437. package/lib/src/utils/document-editor-debug-tools.js.map +1 -0
  438. package/lib/src/utils/drive-preservation.d.ts +19 -0
  439. package/lib/src/utils/drive-preservation.d.ts.map +1 -0
  440. package/lib/src/utils/drive-preservation.js +51 -0
  441. package/lib/src/utils/drive-preservation.js.map +1 -0
  442. package/lib/src/utils/drive-sections.d.ts +31 -0
  443. package/lib/src/utils/drive-sections.d.ts.map +1 -0
  444. package/lib/src/utils/drive-sections.js +63 -0
  445. package/lib/src/utils/drive-sections.js.map +1 -0
  446. package/lib/src/utils/index.d.ts +12 -0
  447. package/lib/src/utils/index.d.ts.map +1 -0
  448. package/lib/src/utils/index.js +12 -0
  449. package/lib/src/utils/index.js.map +1 -0
  450. package/lib/src/utils/join.d.ts +2 -0
  451. package/lib/src/utils/join.d.ts.map +1 -0
  452. package/lib/src/utils/join.js +11 -0
  453. package/lib/src/utils/join.js.map +1 -0
  454. package/lib/src/utils/openUrl.d.ts +2 -0
  455. package/lib/src/utils/openUrl.d.ts.map +1 -0
  456. package/lib/src/utils/openUrl.js +3 -0
  457. package/lib/src/utils/openUrl.js.map +1 -0
  458. package/lib/src/utils/path.d.ts +4 -0
  459. package/lib/src/utils/path.d.ts.map +1 -0
  460. package/lib/src/utils/path.js +17 -0
  461. package/lib/src/utils/path.js.map +1 -0
  462. package/lib/src/utils/reactor.d.ts +6 -0
  463. package/lib/src/utils/reactor.d.ts.map +1 -0
  464. package/lib/src/utils/reactor.js +57 -0
  465. package/lib/src/utils/reactor.js.map +1 -0
  466. package/lib/src/utils/registerServiceWorker.d.ts +12 -0
  467. package/lib/src/utils/registerServiceWorker.d.ts.map +1 -0
  468. package/lib/src/utils/registerServiceWorker.js +97 -0
  469. package/lib/src/utils/registerServiceWorker.js.map +1 -0
  470. package/lib/src/utils/signature.d.ts +4 -0
  471. package/lib/src/utils/signature.d.ts.map +1 -0
  472. package/lib/src/utils/signature.js +36 -0
  473. package/lib/src/utils/signature.js.map +1 -0
  474. package/lib/src/utils/slug.d.ts +2 -0
  475. package/lib/src/utils/slug.d.ts.map +1 -0
  476. package/lib/src/utils/slug.js +4 -0
  477. package/lib/src/utils/slug.js.map +1 -0
  478. package/lib/src/workers/pglite-worker.d.ts +2 -0
  479. package/lib/src/workers/pglite-worker.d.ts.map +1 -0
  480. package/lib/src/workers/pglite-worker.js +32 -0
  481. package/lib/src/workers/pglite-worker.js.map +1 -0
  482. package/lib/tsconfig.tsbuildinfo +1 -0
  483. package/lib/vite.config.d.ts +3 -0
  484. package/lib/vite.config.d.ts.map +1 -0
  485. package/lib/vite.config.js +55 -0
  486. package/lib/vite.config.js.map +1 -0
  487. package/package.copy.json +165 -0
  488. package/package.json +126 -66
  489. package/public/icon.ico +0 -0
  490. package/public/robots.txt +3 -0
  491. package/public/settings.png +0 -0
  492. package/scripts/render-skeleton.ts +8 -10
  493. package/src/index.css +4 -0
  494. package/dist/assets/AddDriveModal.CsX1V9k8.js +0 -2
  495. package/dist/assets/AddDriveModal.CsX1V9k8.js.map +0 -1
  496. package/dist/assets/AddLocalDriveModal.9wlqUaI7.js +0 -2
  497. package/dist/assets/AddLocalDriveModal.9wlqUaI7.js.map +0 -1
  498. package/dist/assets/AddRemoteDriveModal.BViKJcIG.js +0 -2
  499. package/dist/assets/AddRemoteDriveModal.BViKJcIG.js.map +0 -1
  500. package/dist/assets/ConfirmationModal.Cwd4p-FQ.js +0 -2
  501. package/dist/assets/ConfirmationModal.Cwd4p-FQ.js.map +0 -1
  502. package/dist/assets/CookiesPolicyModal.DBYakGYw.js +0 -2
  503. package/dist/assets/CookiesPolicyModal.DBYakGYw.js.map +0 -1
  504. package/dist/assets/CreateDocumentModal.BCLwbl_7.js +0 -2
  505. package/dist/assets/CreateDocumentModal.BCLwbl_7.js.map +0 -1
  506. package/dist/assets/DebugSettingsModal.C2JfEGKx.js +0 -7
  507. package/dist/assets/DebugSettingsModal.C2JfEGKx.js.map +0 -1
  508. package/dist/assets/DeleteDriveModal.ccJLuz-v.js +0 -2
  509. package/dist/assets/DeleteDriveModal.ccJLuz-v.js.map +0 -1
  510. package/dist/assets/DeleteItemModal.lxt16WLJ.js +0 -2
  511. package/dist/assets/DeleteItemModal.lxt16WLJ.js.map +0 -1
  512. package/dist/assets/DisclaimerModal.YKaHnRz1.js +0 -2
  513. package/dist/assets/DisclaimerModal.YKaHnRz1.js.map +0 -1
  514. package/dist/assets/DriveSettingsModal.DUtXh2J3.js +0 -2
  515. package/dist/assets/DriveSettingsModal.DUtXh2J3.js.map +0 -1
  516. package/dist/assets/SettingsModal.NCZyx-LZ.js +0 -2
  517. package/dist/assets/SettingsModal.NCZyx-LZ.js.map +0 -1
  518. package/dist/assets/UpgradeDriveModal.Bp1cbwzD.js +0 -2
  519. package/dist/assets/UpgradeDriveModal.Bp1cbwzD.js.map +0 -1
  520. package/dist/assets/app-form-input.DrsD0P0g.js +0 -2
  521. package/dist/assets/app-form-input.DrsD0P0g.js.map +0 -1
  522. package/dist/assets/atlas-import.S0zyqygI.js +0 -6
  523. package/dist/assets/atlas-import.S0zyqygI.js.map +0 -1
  524. package/dist/assets/ccip.DbzT2NeK.js +0 -2
  525. package/dist/assets/ccip.DbzT2NeK.js.map +0 -1
  526. package/dist/assets/confirmation-modal.BRg1WqhO.js +0 -2
  527. package/dist/assets/confirmation-modal.BRg1WqhO.js.map +0 -1
  528. package/dist/assets/content.BwwSwPoU.js +0 -11
  529. package/dist/assets/content.BwwSwPoU.js.map +0 -1
  530. package/dist/assets/creators.Beog8W4R.js +0 -2
  531. package/dist/assets/creators.Beog8W4R.js.map +0 -1
  532. package/dist/assets/crypto.DdbxIXEQ.js +0 -2
  533. package/dist/assets/crypto.DdbxIXEQ.js.map +0 -1
  534. package/dist/assets/disclosure.g6ojAjR7.js +0 -2
  535. package/dist/assets/disclosure.g6ojAjR7.js.map +0 -1
  536. package/dist/assets/document.CskU24Eo.js +0 -2
  537. package/dist/assets/document.CskU24Eo.js.map +0 -1
  538. package/dist/assets/documents.WANXuQQw.js +0 -2
  539. package/dist/assets/documents.WANXuQQw.js.map +0 -1
  540. package/dist/assets/drive-name.f6u15KL9.js +0 -2
  541. package/dist/assets/drive-name.f6u15KL9.js.map +0 -1
  542. package/dist/assets/drive.Bwke9qtc.js +0 -2
  543. package/dist/assets/drive.Bwke9qtc.js.map +0 -1
  544. package/dist/assets/drives.BT9_cNvB.js +0 -2
  545. package/dist/assets/drives.BT9_cNvB.js.map +0 -1
  546. package/dist/assets/drives.CnLEcvUe.js +0 -2
  547. package/dist/assets/drives.CnLEcvUe.js.map +0 -1
  548. package/dist/assets/dropdown-menu.CrltaMAi.js +0 -2
  549. package/dist/assets/dropdown-menu.CrltaMAi.js.map +0 -1
  550. package/dist/assets/form-input.CKWaNWHS.js +0 -2
  551. package/dist/assets/form-input.CKWaNWHS.js.map +0 -1
  552. package/dist/assets/index.B0KswTVc.js +0 -2
  553. package/dist/assets/index.B0KswTVc.js.map +0 -1
  554. package/dist/assets/index.B5Jahs6e.js +0 -210
  555. package/dist/assets/index.B5Jahs6e.js.map +0 -1
  556. package/dist/assets/index.B_w9kQDS.js +0 -2
  557. package/dist/assets/index.B_w9kQDS.js.map +0 -1
  558. package/dist/assets/index.CJhJIgr2.js +0 -5
  559. package/dist/assets/index.CJhJIgr2.js.map +0 -1
  560. package/dist/assets/index.CZGlv_DJ.js +0 -2
  561. package/dist/assets/index.CZGlv_DJ.js.map +0 -1
  562. package/dist/assets/index.Cy9Uih6l.js +0 -368
  563. package/dist/assets/index.Cy9Uih6l.js.map +0 -1
  564. package/dist/assets/index.DgMWNgC4.js +0 -2
  565. package/dist/assets/index.DgMWNgC4.js.map +0 -1
  566. package/dist/assets/index.DnmeBfoc.js +0 -2
  567. package/dist/assets/index.DnmeBfoc.js.map +0 -1
  568. package/dist/assets/index.LCmAGl8C.js +0 -114
  569. package/dist/assets/index.LCmAGl8C.js.map +0 -1
  570. package/dist/assets/index._iE_O567.js +0 -2
  571. package/dist/assets/index._iE_O567.js.map +0 -1
  572. package/dist/assets/index.esm.B0PnDknv.js +0 -2
  573. package/dist/assets/index.esm.B0PnDknv.js.map +0 -1
  574. package/dist/assets/index.jCXguwyn.js +0 -2
  575. package/dist/assets/index.jCXguwyn.js.map +0 -1
  576. package/dist/assets/index.rWEXHbK2.js +0 -2
  577. package/dist/assets/index.rWEXHbK2.js.map +0 -1
  578. package/dist/assets/index.rdGjBzAn.js +0 -2
  579. package/dist/assets/index.rdGjBzAn.js.map +0 -1
  580. package/dist/assets/location-info.CUOr58bf.js +0 -2
  581. package/dist/assets/location-info.CUOr58bf.js.map +0 -1
  582. package/dist/assets/main-BhSHpqSI.css +0 -1
  583. package/dist/assets/main.DaFo88Bw.js +0 -857
  584. package/dist/assets/main.DaFo88Bw.js.map +0 -1
  585. package/dist/assets/modal.oz3Jhm_k.js +0 -6
  586. package/dist/assets/modal.oz3Jhm_k.js.map +0 -1
  587. package/dist/assets/modals.Qs6mizxC.js +0 -2
  588. package/dist/assets/modals.Qs6mizxC.js.map +0 -1
  589. package/dist/assets/nodefs-CYAJKQhI.js +0 -2
  590. package/dist/assets/nodefs-CYAJKQhI.js.map +0 -1
  591. package/dist/assets/nodefs.DhjGeTvv.js +0 -2
  592. package/dist/assets/nodefs.DhjGeTvv.js.map +0 -1
  593. package/dist/assets/opfs-ahp-Br3qpBoL.js +0 -4
  594. package/dist/assets/opfs-ahp-Br3qpBoL.js.map +0 -1
  595. package/dist/assets/opfs-ahp.r3uiPDIk.js +0 -4
  596. package/dist/assets/opfs-ahp.r3uiPDIk.js.map +0 -1
  597. package/dist/assets/options.BWIJIz-I.js +0 -2
  598. package/dist/assets/options.BWIJIz-I.js.map +0 -1
  599. package/dist/assets/pglite-worker-DgAiCanq.js +0 -144
  600. package/dist/assets/pglite-worker-DgAiCanq.js.map +0 -1
  601. package/dist/assets/pglite-worker.BmajlV4J.js +0 -2
  602. package/dist/assets/pglite-worker.BmajlV4J.js.map +0 -1
  603. package/dist/assets/postgres-CkP7QCDB.data +0 -0
  604. package/dist/assets/postgres-CyuUVpXN.wasm +0 -0
  605. package/dist/assets/queue.CnIzwthA.js +0 -2
  606. package/dist/assets/queue.CnIzwthA.js.map +0 -1
  607. package/dist/assets/read-required-modal.DpPnKHjB.js +0 -2
  608. package/dist/assets/read-required-modal.DpPnKHjB.js.map +0 -1
  609. package/dist/assets/root.ZkWX3Xsc.js +0 -2
  610. package/dist/assets/root.ZkWX3Xsc.js.map +0 -1
  611. package/dist/assets/select.DJuJpI3A.js +0 -2
  612. package/dist/assets/select.DJuJpI3A.js.map +0 -1
  613. package/dist/assets/sharing-type-form-input.CUG75fNB.js +0 -2
  614. package/dist/assets/sharing-type-form-input.CUG75fNB.js.map +0 -1
  615. package/dist/assets/style-GxvX-8si.css +0 -1
  616. package/dist/assets/toggle.8B3GpI90.js +0 -2
  617. package/dist/assets/toggle.8B3GpI90.js.map +0 -1
  618. package/dist/assets/user.7iHZB6Al.js +0 -2
  619. package/dist/assets/user.7iHZB6Al.js.map +0 -1
  620. package/dist/assets/utils.BpWye9Xm.js +0 -2
  621. package/dist/assets/utils.BpWye9Xm.js.map +0 -1
  622. package/dist/external-packages.js +0 -1
  623. package/dist/fonts/Inter-Black.ttf +0 -0
  624. package/dist/fonts/Inter-Bold.ttf +0 -0
  625. package/dist/fonts/Inter-ExtraBold.ttf +0 -0
  626. package/dist/fonts/Inter-ExtraLight.ttf +0 -0
  627. package/dist/fonts/Inter-Light.ttf +0 -0
  628. package/dist/fonts/Inter-Medium.ttf +0 -0
  629. package/dist/fonts/Inter-Regular.ttf +0 -0
  630. package/dist/fonts/Inter-SemiBold.ttf +0 -0
  631. package/dist/fonts/Inter-Thin.ttf +0 -0
  632. package/dist/fonts/Inter-VariableFont_slnt,wght.ttf +0 -0
  633. package/dist/hmr.js +0 -2
  634. package/dist/hmr.js.map +0 -1
  635. package/dist/service-worker.js +0 -2
  636. package/dist/service-worker.js.map +0 -1
  637. package/dist/swEnv.js +0 -70
  638. package/dist/vite-envs.sh +0 -494
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-2InhLUpC.js","assets/document_model_editor-Dzl0xzA_.js","assets/graphql-BS4Brs_E.js","assets/react/jsx-runtime-DldvXD6N.js","assets/document_model-DXcLJEjZ.js","assets/zod-C6yxFxyo.js","assets/react-DQSxOgtG.js","assets/sentry_react-cODD7zWc.js","assets/sentry_browser-B4YoBIIG.js","assets/design_system-wkSa2XkO.js","assets/tailwind_merge-Dr4f9Rms.js","assets/reactor_browser-CSyNHuU2.js","assets/document_drive-BEIKnuGM.js","assets/config-CU-aFfVJ.js","assets/react-dom-D6zQJsh6.js","assets/design_system_connect-KiHH4lsC.js","assets/design_system_ui-yn9Bp8-M.js","assets/react-dom/client-BVPiT_FE.js","assets/graphql_request-9RNJ00DB.js","assets/index-Br7E7qjt.css"])))=>i.map(i=>d[i]);
2
+ import{r as h}from"./sentry_react-cODD7zWc.js";const E="modulepreload",v=function(c){return"/"+c},u={},y=function(d,i,P){let l=Promise.resolve();if(i&&i.length>0){let m=function(e){return Promise.all(e.map(o=>Promise.resolve(o).then(s=>({status:"fulfilled",value:s}),s=>({status:"rejected",reason:s}))))};document.getElementsByTagName("link");const n=document.querySelector("meta[property=csp-nonce]"),t=n?.nonce||n?.getAttribute("nonce");l=m(i.map(e=>{if(e=v(e),e in u)return;u[e]=!0;const o=e.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${s}`))return;const r=document.createElement("link");if(r.rel=o?"stylesheet":E,o||(r.as="script"),r.crossOrigin="",r.href=e,t&&r.setAttribute("nonce",t),document.head.appendChild(r),o)return new Promise((f,p)=>{r.addEventListener("load",f),r.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${e}`)))})}))}function a(n){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=n,window.dispatchEvent(t),!t.defaultPrevented)throw n}return l.then(n=>{for(const t of n||[])t.status==="rejected"&&a(t.reason);return d().catch(a)})},w={Component:h.lazy(()=>y(()=>import("./index-2InhLUpC.js").then(c=>c.e),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])))};export{w as G,y as _};
@@ -0,0 +1,75 @@
1
+ const oo=Object.freeze({major:16,minor:12,patch:0,preReleaseTag:null});function D(e,t){if(!!!e)throw new Error(t)}function Ne(e){return typeof e=="object"&&e!==null}function J(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}const Ii=/\r\n|[\n\r]/g;function Tt(e,t){let n=0,i=1;for(const s of e.body.matchAll(Ii)){if(typeof s.index=="number"||J(!1),s.index>=t)break;n=s.index+s[0].length,i+=1}return{line:i,column:t+1-n}}function gi(e){return Nn(e.source,Tt(e.source,e.start))}function Nn(e,t){const n=e.locationOffset.column-1,i="".padStart(n)+e.body,s=t.line-1,r=e.locationOffset.line-1,o=t.line+r,a=t.line===1?n:0,u=t.column+a,l=`${e.name}:${o}:${u}
2
+ `,f=i.split(/\r\n|[\n\r]/g),p=f[s];if(p.length>120){const T=Math.floor(u/80),_=u%80,I=[];for(let w=0;w<p.length;w+=80)I.push(p.slice(w,w+80));return l+Kt([[`${o} |`,I[0]],...I.slice(1,T+1).map(w=>["|",w]),["|","^".padStart(_)],["|",I[T+1]]])}return l+Kt([[`${o-1} |`,f[s-1]],[`${o} |`,p],["|","^".padStart(u)],[`${o+1} |`,f[s+1]]])}function Kt(e){const t=e.filter(([i,s])=>s!==void 0),n=Math.max(...t.map(([i])=>i.length));return t.map(([i,s])=>i.padStart(n)+(s?" "+s:"")).join(`
3
+ `)}function Oi(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class m extends Error{constructor(t,...n){var i,s,r;const{nodes:o,source:a,positions:u,path:l,originalError:f,extensions:p}=Oi(n);super(t),this.name="GraphQLError",this.path=l??void 0,this.originalError=f??void 0,this.nodes=en(Array.isArray(o)?o:o?[o]:void 0);const T=en((i=this.nodes)===null||i===void 0?void 0:i.map(I=>I.loc).filter(I=>I!=null));this.source=a??(T==null||(s=T[0])===null||s===void 0?void 0:s.source),this.positions=u??T?.map(I=>I.start),this.locations=u&&a?u.map(I=>Tt(a,I)):T?.map(I=>Tt(I.source,I.start));const _=Ne(f?.extensions)?f?.extensions:void 0;this.extensions=(r=p??_)!==null&&r!==void 0?r:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),f!=null&&f.stack?Object.defineProperty(this,"stack",{value:f.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,m):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=`
4
+
5
+ `+gi(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
6
+
7
+ `+Nn(this.source,n);return t}toJSON(){const t={message:this.message};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}}function en(e){return e===void 0||e.length===0?void 0:e}function j(e,t,n){return new m(`Syntax Error: ${n}`,{source:e,positions:[t]})}class _i{constructor(t,n,i){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class In{constructor(t,n,i,s,r,o){this.kind=t,this.start=n,this.end=i,this.line=s,this.column=r,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const gn={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},bi=new Set(Object.keys(gn));function Et(e){const t=e?.kind;return typeof t=="string"&&bi.has(t)}var Q;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Q||(Q={}));var O;(function(e){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"})(O||(O={}));var c;(function(e){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",e.TYPE_COORDINATE="TypeCoordinate",e.MEMBER_COORDINATE="MemberCoordinate",e.ARGUMENT_COORDINATE="ArgumentCoordinate",e.DIRECTIVE_COORDINATE="DirectiveCoordinate",e.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(c||(c={}));function vt(e){return e===9||e===32}function Me(e){return e>=48&&e<=57}function On(e){return e>=97&&e<=122||e>=65&&e<=90}function wt(e){return On(e)||e===95}function _n(e){return On(e)||Me(e)||e===95}function Si(e){var t;let n=Number.MAX_SAFE_INTEGER,i=null,s=-1;for(let o=0;o<e.length;++o){var r;const a=e[o],u=Di(a);u!==a.length&&(i=(r=i)!==null&&r!==void 0?r:o,s=o,o!==0&&u<n&&(n=u))}return e.map((o,a)=>a===0?o:o.slice(n)).slice((t=i)!==null&&t!==void 0?t:0,s+1)}function Di(e){let t=0;for(;t<e.length&&vt(e.charCodeAt(t));)++t;return t}function Ai(e){if(e==="")return!0;let t=!0,n=!1,i=!0,s=!1;for(let r=0;r<e.length;++r)switch(e.codePointAt(r)){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 11:case 12:case 14:case 15:return!1;case 13:return!1;case 10:if(t&&!s)return!1;s=!0,t=!0,n=!1;break;case 9:case 32:n||(n=t);break;default:i&&(i=n),t=!1}return!(t||i&&s)}function wi(e,t){const n=e.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),s=i.length===1,r=i.length>1&&i.slice(1).every(_=>_.length===0||vt(_.charCodeAt(0))),o=n.endsWith('\\"""'),a=e.endsWith('"')&&!o,u=e.endsWith("\\"),l=a||u,f=!s||e.length>70||l||r||o;let p="";const T=s&&vt(e.charCodeAt(0));return(f&&!T||r)&&(p+=`
8
+ `),p+=n,(f||l)&&(p+=`
9
+ `),'"""'+p+'"""'}var h;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.DOT=".",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"})(h||(h={}));class Ri{constructor(t){const n=new In(h.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==h.EOF)do if(t.next)t=t.next;else{const n=Li(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===h.COMMENT);return t}}function ki(e){return e===h.BANG||e===h.DOLLAR||e===h.AMP||e===h.PAREN_L||e===h.PAREN_R||e===h.DOT||e===h.SPREAD||e===h.COLON||e===h.EQUALS||e===h.AT||e===h.BRACKET_L||e===h.BRACKET_R||e===h.BRACE_L||e===h.PIPE||e===h.BRACE_R}function ke(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function st(e,t){return bn(e.charCodeAt(t))&&Sn(e.charCodeAt(t+1))}function bn(e){return e>=55296&&e<=56319}function Sn(e){return e>=56320&&e<=57343}function Ie(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return h.EOF;if(n>=32&&n<=126){const i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function U(e,t,n,i,s){const r=e.line,o=1+n-e.lineStart;return new In(t,n,i,r,o,s)}function Li(e,t){const n=e.source.body,i=n.length;let s=t;for(;s<i;){const r=n.charCodeAt(s);switch(r){case 65279:case 9:case 32:case 44:++s;continue;case 10:++s,++e.line,e.lineStart=s;continue;case 13:n.charCodeAt(s+1)===10?s+=2:++s,++e.line,e.lineStart=s;continue;case 35:return xi(e,s);case 33:return U(e,h.BANG,s,s+1);case 36:return U(e,h.DOLLAR,s,s+1);case 38:return U(e,h.AMP,s,s+1);case 40:return U(e,h.PAREN_L,s,s+1);case 41:return U(e,h.PAREN_R,s,s+1);case 46:if(n.charCodeAt(s+1)===46&&n.charCodeAt(s+2)===46)return U(e,h.SPREAD,s,s+3);break;case 58:return U(e,h.COLON,s,s+1);case 61:return U(e,h.EQUALS,s,s+1);case 64:return U(e,h.AT,s,s+1);case 91:return U(e,h.BRACKET_L,s,s+1);case 93:return U(e,h.BRACKET_R,s,s+1);case 123:return U(e,h.BRACE_L,s,s+1);case 124:return U(e,h.PIPE,s,s+1);case 125:return U(e,h.BRACE_R,s,s+1);case 34:return n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34?Vi(e,s):Ci(e,s)}if(Me(r)||r===45)return Fi(e,s,r);if(wt(r))return ji(e,s);throw j(e.source,s,r===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:ke(r)||st(n,s)?`Unexpected character: ${Ie(e,s)}.`:`Invalid character: ${Ie(e,s)}.`)}return U(e,h.EOF,i,i)}function xi(e,t){const n=e.source.body,i=n.length;let s=t+1;for(;s<i;){const r=n.charCodeAt(s);if(r===10||r===13)break;if(ke(r))++s;else if(st(n,s))s+=2;else break}return U(e,h.COMMENT,t,s,n.slice(t+1,s))}function Fi(e,t,n){const i=e.source.body;let s=t,r=n,o=!1;if(r===45&&(r=i.charCodeAt(++s)),r===48){if(r=i.charCodeAt(++s),Me(r))throw j(e.source,s,`Invalid number, unexpected digit after 0: ${Ie(e,s)}.`)}else s=lt(e,s,r),r=i.charCodeAt(s);if(r===46&&(o=!0,r=i.charCodeAt(++s),s=lt(e,s,r),r=i.charCodeAt(s)),(r===69||r===101)&&(o=!0,r=i.charCodeAt(++s),(r===43||r===45)&&(r=i.charCodeAt(++s)),s=lt(e,s,r),r=i.charCodeAt(s)),r===46||wt(r))throw j(e.source,s,`Invalid number, expected digit but got: ${Ie(e,s)}.`);return U(e,o?h.FLOAT:h.INT,t,s,i.slice(t,s))}function lt(e,t,n){if(!Me(n))throw j(e.source,t,`Invalid number, expected digit but got: ${Ie(e,t)}.`);const i=e.source.body;let s=t+1;for(;Me(i.charCodeAt(s));)++s;return s}function Ci(e,t){const n=e.source.body,i=n.length;let s=t+1,r=s,o="";for(;s<i;){const a=n.charCodeAt(s);if(a===34)return o+=n.slice(r,s),U(e,h.STRING,t,s+1,o);if(a===92){o+=n.slice(r,s);const u=n.charCodeAt(s+1)===117?n.charCodeAt(s+2)===123?$i(e,s):Ui(e,s):Mi(e,s);o+=u.value,s+=u.size,r=s;continue}if(a===10||a===13)break;if(ke(a))++s;else if(st(n,s))s+=2;else throw j(e.source,s,`Invalid character within String: ${Ie(e,s)}.`)}throw j(e.source,s,"Unterminated string.")}function $i(e,t){const n=e.source.body;let i=0,s=3;for(;s<12;){const r=n.charCodeAt(t+s++);if(r===125){if(s<5||!ke(i))break;return{value:String.fromCodePoint(i),size:s}}if(i=i<<4|Fe(r),i<0)break}throw j(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+s)}".`)}function Ui(e,t){const n=e.source.body,i=tn(n,t+2);if(ke(i))return{value:String.fromCodePoint(i),size:6};if(bn(i)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const s=tn(n,t+8);if(Sn(s))return{value:String.fromCodePoint(i,s),size:12}}throw j(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function tn(e,t){return Fe(e.charCodeAt(t))<<12|Fe(e.charCodeAt(t+1))<<8|Fe(e.charCodeAt(t+2))<<4|Fe(e.charCodeAt(t+3))}function Fe(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Mi(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
10
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw j(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Vi(e,t){const n=e.source.body,i=n.length;let s=e.lineStart,r=t+3,o=r,a="";const u=[];for(;r<i;){const l=n.charCodeAt(r);if(l===34&&n.charCodeAt(r+1)===34&&n.charCodeAt(r+2)===34){a+=n.slice(o,r),u.push(a);const f=U(e,h.BLOCK_STRING,t,r+3,Si(u).join(`
11
+ `));return e.line+=u.length-1,e.lineStart=s,f}if(l===92&&n.charCodeAt(r+1)===34&&n.charCodeAt(r+2)===34&&n.charCodeAt(r+3)===34){a+=n.slice(o,r),o=r+1,r+=4;continue}if(l===10||l===13){a+=n.slice(o,r),u.push(a),l===13&&n.charCodeAt(r+1)===10?r+=2:++r,a="",o=r,s=r;continue}if(ke(l))++r;else if(st(n,r))r+=2;else throw j(e.source,r,`Invalid character within String: ${Ie(e,r)}.`)}throw j(e.source,r,"Unterminated string.")}function ji(e,t){const n=e.source.body,i=n.length;let s=t+1;for(;s<i;){const r=n.charCodeAt(s);if(_n(r))++s;else break}return U(e,h.NAME,t,s,n.slice(t,s))}const Pi=10,Dn=2;function E(e){return rt(e,[])}function rt(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return Bi(e,t);default:return String(e)}}function Bi(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(Gi(e)){const i=e.toJSON();if(i!==e)return typeof i=="string"?i:rt(i,n)}else if(Array.isArray(e))return Qi(e,n);return Yi(e,n)}function Gi(e){return typeof e.toJSON=="function"}function Yi(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>Dn?"["+Ji(e)+"]":"{ "+n.map(([s,r])=>s+": "+rt(r,t)).join(", ")+" }"}function Qi(e,t){if(e.length===0)return"[]";if(t.length>Dn)return"[Array]";const n=Math.min(Pi,e.length),i=e.length-n,s=[];for(let r=0;r<n;++r)s.push(rt(e[r],t));return i===1?s.push("... 1 more item"):i>1&&s.push(`... ${i} more items`),"["+s.join(", ")+"]"}function Ji(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const qi=globalThis.process&&!0,oe=qi?function(t,n){return t instanceof n}:function(t,n){if(t instanceof n)return!0;if(typeof t=="object"&&t!==null){var i;const s=n.prototype[Symbol.toStringTag],r=Symbol.toStringTag in t?t[Symbol.toStringTag]:(i=t.constructor)===null||i===void 0?void 0:i.name;if(s===r){const o=E(t);throw new Error(`Cannot use ${s} "${o}" from another module or realm.
12
+
13
+ Ensure that there is only one instance of "graphql" in the node_modules
14
+ directory. If different versions of "graphql" are the dependencies of other
15
+ relied on modules, use "resolutions" to ensure only one version is installed.
16
+
17
+ https://yarnpkg.com/en/docs/selective-version-resolutions
18
+
19
+ Duplicate "graphql" modules cannot be used at the same time since different
20
+ versions may have different capabilities and behavior. The data from one
21
+ version used in the function from another could produce confusing and
22
+ spurious results.`)}}return!1};class An{constructor(t,n="GraphQL request",i={line:1,column:1}){typeof t=="string"||D(!1,`Body must be a string. Received: ${E(t)}.`),this.body=t,this.name=n,this.locationOffset=i,this.locationOffset.line>0||D(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||D(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function Xi(e){return oe(e,An)}function zi(e,t){const n=new Hi(e,t),i=n.parseDocument();return Object.defineProperty(i,"tokenCount",{enumerable:!1,value:n.tokenCount}),i}class Hi{constructor(t,n={}){const{lexer:i,...s}=n;if(i)this._lexer=i;else{const r=Xi(t)?t:new An(t);this._lexer=new Ri(r)}this._options=s,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(h.NAME);return this.node(t,{kind:c.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:c.DOCUMENT,definitions:this.many(h.SOF,this.parseDefinition,h.EOF)})}parseDefinition(){if(this.peek(h.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(t&&n.kind===h.BRACE_L)throw j(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(n.kind===h.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(t)throw j(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");switch(n.value){case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(h.BRACE_L))return this.node(t,{kind:c.OPERATION_DEFINITION,operation:Q.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseDescription(),i=this.parseOperationType();let s;return this.peek(h.NAME)&&(s=this.parseName()),this.node(t,{kind:c.OPERATION_DEFINITION,operation:i,description:n,name:s,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(h.NAME);switch(t.value){case"query":return Q.QUERY;case"mutation":return Q.MUTATION;case"subscription":return Q.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(h.PAREN_L,this.parseVariableDefinition,h.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:c.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(h.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(h.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(h.DOLLAR),this.node(t,{kind:c.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:c.SELECTION_SET,selections:this.many(h.BRACE_L,this.parseSelection,h.BRACE_R)})}parseSelection(){return this.peek(h.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let i,s;return this.expectOptionalToken(h.COLON)?(i=n,s=this.parseName()):s=n,this.node(t,{kind:c.FIELD,alias:i,name:s,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(h.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(h.PAREN_L,n,h.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,i=this.parseName();return this.expectToken(h.COLON),this.node(n,{kind:c.ARGUMENT,name:i,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(h.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(h.NAME)?this.node(t,{kind:c.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:c.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token,n=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:c.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:c.FRAGMENT_DEFINITION,description:n,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case h.BRACKET_L:return this.parseList(t);case h.BRACE_L:return this.parseObject(t);case h.INT:return this.advanceLexer(),this.node(n,{kind:c.INT,value:n.value});case h.FLOAT:return this.advanceLexer(),this.node(n,{kind:c.FLOAT,value:n.value});case h.STRING:case h.BLOCK_STRING:return this.parseStringLiteral();case h.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:c.BOOLEAN,value:!0});case"false":return this.node(n,{kind:c.BOOLEAN,value:!1});case"null":return this.node(n,{kind:c.NULL});default:return this.node(n,{kind:c.ENUM,value:n.value})}case h.DOLLAR:if(t)if(this.expectToken(h.DOLLAR),this._lexer.token.kind===h.NAME){const i=this._lexer.token.value;throw j(this._lexer.source,n.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:c.STRING,value:t.value,block:t.kind===h.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:c.LIST,values:this.any(h.BRACKET_L,n,h.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:c.OBJECT,fields:this.any(h.BRACE_L,n,h.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,i=this.parseName();return this.expectToken(h.COLON),this.node(n,{kind:c.OBJECT_FIELD,name:i,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(h.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(h.AT),this.node(n,{kind:c.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(h.BRACKET_L)){const i=this.parseTypeReference();this.expectToken(h.BRACKET_R),n=this.node(t,{kind:c.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(h.BANG)?this.node(t,{kind:c.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:c.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(h.STRING)||this.peek(h.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const i=this.parseConstDirectives(),s=this.many(h.BRACE_L,this.parseOperationTypeDefinition,h.BRACE_R);return this.node(t,{kind:c.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:s})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(h.COLON);const i=this.parseNamedType();return this.node(t,{kind:c.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const i=this.parseName(),s=this.parseConstDirectives();return this.node(t,{kind:c.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:s})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const i=this.parseName(),s=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:c.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:s,directives:r,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(h.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(h.BRACE_L,this.parseFieldDefinition,h.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),i=this.parseName(),s=this.parseArgumentDefs();this.expectToken(h.COLON);const r=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:c.FIELD_DEFINITION,description:n,name:i,arguments:s,type:r,directives:o})}parseArgumentDefs(){return this.optionalMany(h.PAREN_L,this.parseInputValueDef,h.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(h.COLON);const s=this.parseTypeReference();let r;this.expectOptionalToken(h.EQUALS)&&(r=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:c.INPUT_VALUE_DEFINITION,description:n,name:i,type:s,defaultValue:r,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const i=this.parseName(),s=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:c.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:s,directives:r,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const i=this.parseName(),s=this.parseConstDirectives(),r=this.parseUnionMemberTypes();return this.node(t,{kind:c.UNION_TYPE_DEFINITION,description:n,name:i,directives:s,types:r})}parseUnionMemberTypes(){return this.expectOptionalToken(h.EQUALS)?this.delimitedMany(h.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const i=this.parseName(),s=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();return this.node(t,{kind:c.ENUM_TYPE_DEFINITION,description:n,name:i,directives:s,values:r})}parseEnumValuesDefinition(){return this.optionalMany(h.BRACE_L,this.parseEnumValueDefinition,h.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),s=this.parseConstDirectives();return this.node(t,{kind:c.ENUM_VALUE_DEFINITION,description:n,name:i,directives:s})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw j(this._lexer.source,this._lexer.token.start,`${ze(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const i=this.parseName(),s=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:s,fields:r})}parseInputFieldsDefinition(){return this.optionalMany(h.BRACE_L,this.parseInputValueDef,h.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===h.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.optionalMany(h.BRACE_L,this.parseOperationTypeDefinition,h.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:c.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(t,{kind:c.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(i.length===0&&s.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:s,fields:r})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),r=this.parseFieldsDefinition();if(i.length===0&&s.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:c.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:s,fields:r})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseUnionMemberTypes();if(i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.UNION_TYPE_EXTENSION,name:n,directives:i,types:s})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();if(i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.ENUM_TYPE_EXTENSION,name:n,directives:i,values:s})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();if(i.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:c.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:s})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(h.AT);const i=this.parseName(),s=this.parseArgumentDefs(),r=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:c.DIRECTIVE_DEFINITION,description:n,name:i,arguments:s,repeatable:r,locations:o})}parseDirectiveLocations(){return this.delimitedMany(h.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(O,n.value))return n;throw this.unexpected(t)}parseSchemaCoordinate(){const t=this._lexer.token,n=this.expectOptionalToken(h.AT),i=this.parseName();let s;!n&&this.expectOptionalToken(h.DOT)&&(s=this.parseName());let r;return(n||s)&&this.expectOptionalToken(h.PAREN_L)&&(r=this.parseName(),this.expectToken(h.COLON),this.expectToken(h.PAREN_R)),n?r?this.node(t,{kind:c.DIRECTIVE_ARGUMENT_COORDINATE,name:i,argumentName:r}):this.node(t,{kind:c.DIRECTIVE_COORDINATE,name:i}):s?r?this.node(t,{kind:c.ARGUMENT_COORDINATE,name:i,fieldName:s,argumentName:r}):this.node(t,{kind:c.MEMBER_COORDINATE,name:i,memberName:s}):this.node(t,{kind:c.TYPE_COORDINATE,name:i})}node(t,n){return this._options.noLocation!==!0&&(n.loc=new _i(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw j(this._lexer.source,n.start,`Expected ${wn(t)}, found ${ze(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===h.NAME&&n.value===t)this.advanceLexer();else throw j(this._lexer.source,n.start,`Expected "${t}", found ${ze(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===h.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return j(this._lexer.source,n.start,`Unexpected ${ze(n)}.`)}any(t,n,i){this.expectToken(t);const s=[];for(;!this.expectOptionalToken(i);)s.push(n.call(this));return s}optionalMany(t,n,i){if(this.expectOptionalToken(t)){const s=[];do s.push(n.call(this));while(!this.expectOptionalToken(i));return s}return[]}many(t,n,i){this.expectToken(t);const s=[];do s.push(n.call(this));while(!this.expectOptionalToken(i));return s}delimitedMany(t,n){this.expectOptionalToken(t);const i=[];do i.push(n.call(this));while(this.expectOptionalToken(t));return i}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==h.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw j(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}}function ze(e){const t=e.value;return wn(e.kind)+(t!=null?` "${t}"`:"")}function wn(e){return ki(e)?`"${e}"`:e}const Wi=5;function de(e,t){const[n,i]=t?[e,t]:[void 0,e];let s=" Did you mean ";n&&(s+=n+" ");const r=i.map(u=>`"${u}"`);switch(r.length){case 0:return"";case 1:return s+r[0]+"?";case 2:return s+r[0]+" or "+r[1]+"?"}const o=r.slice(0,Wi),a=o.pop();return s+o.join(", ")+", or "+a+"?"}function nn(e){return e}function ge(e,t){const n=Object.create(null);for(const i of e)n[t(i)]=i;return n}function Rt(e,t,n){const i=Object.create(null);for(const s of e)i[t(s)]=n(s);return i}function ue(e,t){const n=Object.create(null);for(const i of Object.keys(e))n[i]=t(e[i],i);return n}function kt(e,t){let n=0,i=0;for(;n<e.length&&i<t.length;){let s=e.charCodeAt(n),r=t.charCodeAt(i);if(He(s)&&He(r)){let o=0;do++n,o=o*10+s-yt,s=e.charCodeAt(n);while(He(s)&&o>0);let a=0;do++i,a=a*10+r-yt,r=t.charCodeAt(i);while(He(r)&&a>0);if(o<a)return-1;if(o>a)return 1}else{if(s<r)return-1;if(s>r)return 1;++n,++i}}return e.length-t.length}const yt=48,Zi=57;function He(e){return!isNaN(e)&&yt<=e&&e<=Zi}function _e(e,t){const n=Object.create(null),i=new Ki(e),s=Math.floor(e.length*.4)+1;for(const r of t){const o=i.measure(r,s);o!==void 0&&(n[r]=o)}return Object.keys(n).sort((r,o)=>{const a=n[r]-n[o];return a!==0?a:kt(r,o)})}class Ki{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=sn(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,n){if(this._input===t)return 0;const i=t.toLowerCase();if(this._inputLowerCase===i)return 1;let s=sn(i),r=this._inputArray;if(s.length<r.length){const f=s;s=r,r=f}const o=s.length,a=r.length;if(o-a>n)return;const u=this._rows;for(let f=0;f<=a;f++)u[0][f]=f;for(let f=1;f<=o;f++){const p=u[(f-1)%3],T=u[f%3];let _=T[0]=f;for(let I=1;I<=a;I++){const w=s[f-1]===r[I-1]?0:1;let F=Math.min(p[I]+1,T[I-1]+1,p[I-1]+w);if(f>1&&I>1&&s[f-1]===r[I-2]&&s[f-2]===r[I-1]){const B=u[(f-2)%3][I-2];F=Math.min(F,B+1)}F<_&&(_=F),T[I]=F}if(_>n)return}const l=u[o%3][a];return l<=n?l:void 0}}function sn(e){const t=e.length,n=new Array(t);for(let i=0;i<t;++i)n[i]=e.charCodeAt(i);return n}function te(e){if(e==null)return Object.create(null);if(Object.getPrototypeOf(e)===null)return e;const t=Object.create(null);for(const[n,i]of Object.entries(e))t[n]=i;return t}function es(e){return`"${e.replace(ts,ns)}"`}const ts=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function ns(e){return is[e.charCodeAt(0)]}const is=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],Ce=Object.freeze({});function ot(e,t,n=gn){const i=new Map;for(const B of Object.values(c))i.set(B,et(t,B));let s,r=Array.isArray(e),o=[e],a=-1,u=[],l=e,f,p;const T=[],_=[];do{a++;const B=a===o.length,Ee=B&&u.length!==0;if(B){if(f=_.length===0?void 0:T[T.length-1],l=p,p=_.pop(),Ee)if(r){l=l.slice();let z=0;for(const[Le,Ye]of u){const Qe=Le-z;Ye===null?(l.splice(Qe,1),z++):l[Qe]=Ye}}else{l={...l};for(const[z,Le]of u)l[z]=Le}a=s.index,o=s.keys,u=s.edits,r=s.inArray,s=s.prev}else if(p){if(f=r?a:o[a],l=p[f],l==null)continue;T.push(f)}let Y;if(!Array.isArray(l)){var I,w;Et(l)||D(!1,`Invalid AST Node: ${E(l)}.`);const z=B?(I=i.get(l.kind))===null||I===void 0?void 0:I.leave:(w=i.get(l.kind))===null||w===void 0?void 0:w.enter;if(Y=z?.call(t,l,f,p,T,_),Y===Ce)break;if(Y===!1){if(!B){T.pop();continue}}else if(Y!==void 0&&(u.push([f,Y]),!B))if(Et(Y))l=Y;else{T.pop();continue}}if(Y===void 0&&Ee&&u.push([f,l]),B)T.pop();else{var F;s={inArray:r,index:a,keys:o,edits:u,prev:s},r=Array.isArray(l),o=r?l:(F=n[l.kind])!==null&&F!==void 0?F:[],a=-1,u=[],p&&_.push(p),p=l}}while(s!==void 0);return u.length!==0?u[u.length-1][1]:e}function Rn(e){const t=new Array(e.length).fill(null),n=Object.create(null);for(const i of Object.values(c)){let s=!1;const r=new Array(e.length).fill(void 0),o=new Array(e.length).fill(void 0);for(let u=0;u<e.length;++u){const{enter:l,leave:f}=et(e[u],i);s||(s=l!=null||f!=null),r[u]=l,o[u]=f}if(!s)continue;const a={enter(...u){const l=u[0];for(let p=0;p<e.length;p++)if(t[p]===null){var f;const T=(f=r[p])===null||f===void 0?void 0:f.apply(e[p],u);if(T===!1)t[p]=l;else if(T===Ce)t[p]=Ce;else if(T!==void 0)return T}},leave(...u){const l=u[0];for(let p=0;p<e.length;p++)if(t[p]===null){var f;const T=(f=o[p])===null||f===void 0?void 0:f.apply(e[p],u);if(T===Ce)t[p]=Ce;else if(T!==void 0&&T!==!1)return T}else t[p]===l&&(t[p]=null)}};n[i]=a}return n}function et(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function C(e){return ot(e,rs)}const ss=80,rs={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>y(e.definitions,`
23
+
24
+ `)},OperationDefinition:{leave(e){const t=ft(e.variableDefinitions)?b(`(
25
+ `,y(e.variableDefinitions,`
26
+ `),`
27
+ )`):b("(",y(e.variableDefinitions,", "),")"),n=b("",e.description,`
28
+ `)+y([e.operation,y([e.name,t]),y(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:i,description:s})=>b("",s,`
29
+ `)+e+": "+t+b(" = ",n)+b(" ",y(i," "))},SelectionSet:{leave:({selections:e})=>ie(e)},Field:{leave({alias:e,name:t,arguments:n,directives:i,selectionSet:s}){const r=b("",e,": ")+t;let o=r+b("(",y(n,", "),")");return o.length>ss&&(o=r+b(`(
30
+ `,Ke(y(n,`
31
+ `)),`
32
+ )`)),y([o,y(i," "),s]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+b(" ",y(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>y(["...",b("on ",e),y(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:i,selectionSet:s,description:r})=>b("",r,`
33
+ `)+`fragment ${e}${b("(",y(n,", "),")")} on ${t} ${b("",y(i," ")," ")}`+s},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?wi(e):es(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+y(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+y(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+b("(",y(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>b("",e,`
34
+ `)+y(["schema",y(t," "),ie(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>b("",e,`
35
+ `)+y(["scalar",t,y(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:i,fields:s})=>b("",e,`
36
+ `)+y(["type",t,b("implements ",y(n," & ")),y(i," "),ie(s)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:i,directives:s})=>b("",e,`
37
+ `)+t+(ft(n)?b(`(
38
+ `,Ke(y(n,`
39
+ `)),`
40
+ )`):b("(",y(n,", "),")"))+": "+i+b(" ",y(s," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:i,directives:s})=>b("",e,`
41
+ `)+y([t+": "+n,b("= ",i),y(s," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:i,fields:s})=>b("",e,`
42
+ `)+y(["interface",t,b("implements ",y(n," & ")),y(i," "),ie(s)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:i})=>b("",e,`
43
+ `)+y(["union",t,y(n," "),b("= ",y(i," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:i})=>b("",e,`
44
+ `)+y(["enum",t,y(n," "),ie(i)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>b("",e,`
45
+ `)+y([t,y(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:i})=>b("",e,`
46
+ `)+y(["input",t,y(n," "),ie(i)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:i,locations:s})=>b("",e,`
47
+ `)+"directive @"+t+(ft(n)?b(`(
48
+ `,Ke(y(n,`
49
+ `)),`
50
+ )`):b("(",y(n,", "),")"))+(i?" repeatable":"")+" on "+y(s," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>y(["extend schema",y(e," "),ie(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>y(["extend scalar",e,y(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:i})=>y(["extend type",e,b("implements ",y(t," & ")),y(n," "),ie(i)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:i})=>y(["extend interface",e,b("implements ",y(t," & ")),y(n," "),ie(i)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>y(["extend union",e,y(t," "),b("= ",y(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>y(["extend enum",e,y(t," "),ie(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>y(["extend input",e,y(t," "),ie(n)]," ")},TypeCoordinate:{leave:({name:e})=>e},MemberCoordinate:{leave:({name:e,memberName:t})=>y([e,b(".",t)])},ArgumentCoordinate:{leave:({name:e,fieldName:t,argumentName:n})=>y([e,b(".",t),b("(",n,":)")])},DirectiveCoordinate:{leave:({name:e})=>y(["@",e])},DirectiveArgumentCoordinate:{leave:({name:e,argumentName:t})=>y(["@",e,b("(",t,":)")])}};function y(e,t=""){var n;return(n=e?.filter(i=>i).join(t))!==null&&n!==void 0?n:""}function ie(e){return b(`{
51
+ `,Ke(y(e,`
52
+ `)),`
53
+ }`)}function b(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function Ke(e){return b(" ",e.replace(/\n/g,`
54
+ `))}function ft(e){var t;return(t=e?.some(n=>n.includes(`
55
+ `)))!==null&&t!==void 0?t:!1}function Nt(e,t){switch(e.kind){case c.NULL:return null;case c.INT:return parseInt(e.value,10);case c.FLOAT:return parseFloat(e.value);case c.STRING:case c.ENUM:case c.BOOLEAN:return e.value;case c.LIST:return e.values.map(n=>Nt(n,t));case c.OBJECT:return Rt(e.fields,n=>n.name.value,n=>Nt(n.value,t));case c.VARIABLE:return t?.[e.name.value]}}function ae(e){if(e!=null||D(!1,"Must provide name."),typeof e=="string"||D(!1,"Expected name to be a string."),e.length===0)throw new m("Expected name to be a non-empty string.");for(let t=1;t<e.length;++t)if(!_n(e.charCodeAt(t)))throw new m(`Names must only contain [_a-zA-Z0-9] but "${e}" does not.`);if(!wt(e.charCodeAt(0)))throw new m(`Names must start with [_a-zA-Z] but "${e}" does not.`);return e}function os(e){if(e==="true"||e==="false"||e==="null")throw new m(`Enum values cannot be named: ${e}`);return ae(e)}function Lt(e){return fe(e)||k(e)||x(e)||Z(e)||X(e)||M(e)||G(e)||A(e)}function fe(e){return oe(e,me)}function k(e){return oe(e,le)}function x(e){return oe(e,It)}function Z(e){return oe(e,gt)}function X(e){return oe(e,Ve)}function M(e){return oe(e,Ot)}function G(e){return oe(e,q)}function A(e){return oe(e,S)}function ce(e){return fe(e)||X(e)||M(e)||xt(e)&&ce(e.ofType)}function $e(e){return fe(e)||k(e)||x(e)||Z(e)||X(e)||xt(e)&&$e(e.ofType)}function Re(e){return fe(e)||X(e)}function he(e){return k(e)||x(e)||Z(e)}function pe(e){return x(e)||Z(e)}function ao(e){if(!pe(e))throw new Error(`Expected ${E(e)} to be a GraphQL abstract type.`);return e}class q{constructor(t){Lt(t)||D(!1,`Expected ${E(t)} to be a GraphQL type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLList"}toString(){return"["+String(this.ofType)+"]"}toJSON(){return this.toString()}}class S{constructor(t){kn(t)||D(!1,`Expected ${E(t)} to be a GraphQL nullable type.`),this.ofType=t}get[Symbol.toStringTag](){return"GraphQLNonNull"}toString(){return String(this.ofType)+"!"}toJSON(){return this.toString()}}function xt(e){return G(e)||A(e)}function kn(e){return Lt(e)&&!A(e)}function Ln(e){if(e)return A(e)?e.ofType:e}function as(e){return fe(e)||k(e)||x(e)||Z(e)||X(e)||M(e)}function H(e){if(e){let t=e;for(;xt(t);)t=t.ofType;return t}}function xn(e){return typeof e=="function"?e():e}function Fn(e){return typeof e=="function"?e():e}class me{constructor(t){var n,i,s,r;const o=(n=t.parseValue)!==null&&n!==void 0?n:nn;this.name=ae(t.name),this.description=t.description,this.specifiedByURL=t.specifiedByURL,this.serialize=(i=t.serialize)!==null&&i!==void 0?i:nn,this.parseValue=o,this.parseLiteral=(s=t.parseLiteral)!==null&&s!==void 0?s:(a,u)=>o(Nt(a,u)),this.extensions=te(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||D(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${E(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||D(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||D(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class le{constructor(t){var n;this.name=ae(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=te(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=()=>$n(t),this._interfaces=()=>Cn(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||D(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${E(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Mn(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Cn(e){var t;const n=xn((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(n)||D(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),n}function $n(e){const t=Fn(e.fields);return Ae(t)||D(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),ue(t,(n,i)=>{var s;Ae(n)||D(!1,`${e.name}.${i} field config must be an object.`),n.resolve==null||typeof n.resolve=="function"||D(!1,`${e.name}.${i} field resolver must be a function if provided, but got: ${E(n.resolve)}.`);const r=(s=n.args)!==null&&s!==void 0?s:{};return Ae(r)||D(!1,`${e.name}.${i} args must be an object with argument names as keys.`),{name:ae(i),description:n.description,type:n.type,args:Un(r),resolve:n.resolve,subscribe:n.subscribe,deprecationReason:n.deprecationReason,extensions:te(n.extensions),astNode:n.astNode}})}function Un(e){return Object.entries(e).map(([t,n])=>({name:ae(t),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:te(n.extensions),astNode:n.astNode}))}function Ae(e){return Ne(e)&&!Array.isArray(e)}function Mn(e){return ue(e,t=>({description:t.description,type:t.type,args:Vn(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Vn(e){return Rt(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Pe(e){return A(e.type)&&e.defaultValue===void 0}class It{constructor(t){var n;this.name=ae(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=te(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._fields=$n.bind(void 0,t),this._interfaces=Cn.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||D(!1,`${this.name} must provide "resolveType" as a function, but got: ${E(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Mn(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class gt{constructor(t){var n;this.name=ae(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=te(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._types=cs.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||D(!1,`${this.name} must provide "resolveType" as a function, but got: ${E(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function cs(e){const t=xn(e.types);return Array.isArray(t)||D(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class Ve{constructor(t){var n;this.name=ae(t.name),this.description=t.description,this.extensions=te(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._values=typeof t.values=="function"?t.values:rn(this.name,t.values),this._valueLookup=null,this._nameLookup=null}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return typeof this._values=="function"&&(this._values=rn(this.name,this._values())),this._values}getValue(t){return this._nameLookup===null&&(this._nameLookup=ge(this.getValues(),n=>n.name)),this._nameLookup[t]}serialize(t){this._valueLookup===null&&(this._valueLookup=new Map(this.getValues().map(i=>[i.value,i])));const n=this._valueLookup.get(t);if(n===void 0)throw new m(`Enum "${this.name}" cannot represent value: ${E(t)}`);return n.name}parseValue(t){if(typeof t!="string"){const i=E(t);throw new m(`Enum "${this.name}" cannot represent non-string value: ${i}.`+We(this,i))}const n=this.getValue(t);if(n==null)throw new m(`Value "${t}" does not exist in "${this.name}" enum.`+We(this,t));return n.value}parseLiteral(t,n){if(t.kind!==c.ENUM){const s=C(t);throw new m(`Enum "${this.name}" cannot represent non-enum value: ${s}.`+We(this,s),{nodes:t})}const i=this.getValue(t.value);if(i==null){const s=C(t);throw new m(`Value "${s}" does not exist in "${this.name}" enum.`+We(this,s),{nodes:t})}return i.value}toConfig(){const t=Rt(this.getValues(),n=>n.name,n=>({description:n.description,value:n.value,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function We(e,t){const n=e.getValues().map(s=>s.name),i=_e(t,n);return de("the enum value",i)}function rn(e,t){return Ae(t)||D(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([n,i])=>(Ae(i)||D(!1,`${e}.${n} must refer to an object with a "value" key representing an internal value but got: ${E(i)}.`),{name:os(n),description:i.description,value:i.value!==void 0?i.value:n,deprecationReason:i.deprecationReason,extensions:te(i.extensions),astNode:i.astNode}))}class Ot{constructor(t){var n,i;this.name=ae(t.name),this.description=t.description,this.extensions=te(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this.isOneOf=(i=t.isOneOf)!==null&&i!==void 0?i:!1,this._fields=us.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const t=ue(this.getFields(),n=>({description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions,astNode:n.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,isOneOf:this.isOneOf}}toString(){return this.name}toJSON(){return this.toString()}}function us(e){const t=Fn(e.fields);return Ae(t)||D(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),ue(t,(n,i)=>(!("resolve"in n)||D(!1,`${e.name}.${i} field has a resolve property, but Input Types cannot define resolvers.`),{name:ae(i),description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:te(n.extensions),astNode:n.astNode}))}function jn(e){return A(e.type)&&e.defaultValue===void 0}function _t(e,t){return e===t?!0:A(e)&&A(t)||G(e)&&G(t)?_t(e.ofType,t.ofType):!1}function we(e,t,n){return t===n?!0:A(n)?A(t)?we(e,t.ofType,n.ofType):!1:A(t)?we(e,t.ofType,n):G(n)?G(t)?we(e,t.ofType,n.ofType):!1:G(t)?!1:pe(n)&&(x(t)||k(t))&&e.isSubType(n,t)}function on(e,t,n){return t===n?!0:pe(t)?pe(n)?e.getPossibleTypes(t).some(i=>e.isSubType(n,i)):e.isSubType(t,n):pe(n)?e.isSubType(n,t):!1}const pt=2147483647,dt=-2147483648,ls=new me({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=Be(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isInteger(n))throw new m(`Int cannot represent non-integer value: ${E(t)}`);if(n>pt||n<dt)throw new m("Int cannot represent non 32-bit signed integer value: "+E(t));return n},parseValue(e){if(typeof e!="number"||!Number.isInteger(e))throw new m(`Int cannot represent non-integer value: ${E(e)}`);if(e>pt||e<dt)throw new m(`Int cannot represent non 32-bit signed integer value: ${e}`);return e},parseLiteral(e){if(e.kind!==c.INT)throw new m(`Int cannot represent non-integer value: ${C(e)}`,{nodes:e});const t=parseInt(e.value,10);if(t>pt||t<dt)throw new m(`Int cannot represent non 32-bit signed integer value: ${e.value}`,{nodes:e});return t}}),fs=new me({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize(e){const t=Be(e);if(typeof t=="boolean")return t?1:0;let n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),typeof n!="number"||!Number.isFinite(n))throw new m(`Float cannot represent non numeric value: ${E(t)}`);return n},parseValue(e){if(typeof e!="number"||!Number.isFinite(e))throw new m(`Float cannot represent non numeric value: ${E(e)}`);return e},parseLiteral(e){if(e.kind!==c.FLOAT&&e.kind!==c.INT)throw new m(`Float cannot represent non numeric value: ${C(e)}`,e);return parseFloat(e.value)}}),$=new me({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize(e){const t=Be(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(typeof t=="number"&&Number.isFinite(t))return t.toString();throw new m(`String cannot represent value: ${E(e)}`)},parseValue(e){if(typeof e!="string")throw new m(`String cannot represent a non string value: ${E(e)}`);return e},parseLiteral(e){if(e.kind!==c.STRING)throw new m(`String cannot represent a non string value: ${C(e)}`,{nodes:e});return e.value}}),W=new me({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize(e){const t=Be(e);if(typeof t=="boolean")return t;if(Number.isFinite(t))return t!==0;throw new m(`Boolean cannot represent a non boolean value: ${E(t)}`)},parseValue(e){if(typeof e!="boolean")throw new m(`Boolean cannot represent a non boolean value: ${E(e)}`);return e},parseLiteral(e){if(e.kind!==c.BOOLEAN)throw new m(`Boolean cannot represent a non boolean value: ${C(e)}`,{nodes:e});return e.value}}),Pn=new me({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize(e){const t=Be(e);if(typeof t=="string")return t;if(Number.isInteger(t))return String(t);throw new m(`ID cannot represent value: ${E(e)}`)},parseValue(e){if(typeof e=="string")return e;if(typeof e=="number"&&Number.isInteger(e))return e.toString();throw new m(`ID cannot represent value: ${E(e)}`)},parseLiteral(e){if(e.kind!==c.STRING&&e.kind!==c.INT)throw new m("ID cannot represent a non-string and non-integer value: "+C(e),{nodes:e});return e.value}}),Ft=Object.freeze([$,ls,fs,W,Pn]);function Bn(e){return Ft.some(({name:t})=>e.name===t)}function Be(e){if(Ne(e)){if(typeof e.valueOf=="function"){const t=e.valueOf();if(!Ne(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function Gn(e){return oe(e,Te)}class Te{constructor(t){var n,i;this.name=ae(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(n=t.isRepeatable)!==null&&n!==void 0?n:!1,this.extensions=te(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||D(!1,`@${t.name} locations must be an Array.`);const s=(i=t.args)!==null&&i!==void 0?i:{};Ne(s)&&!Array.isArray(s)||D(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=Un(s)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:Vn(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const Yn=new Te({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[O.FIELD,O.FRAGMENT_SPREAD,O.INLINE_FRAGMENT],args:{if:{type:new S(W),description:"Included when true."}}}),Qn=new Te({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[O.FIELD,O.FRAGMENT_SPREAD,O.INLINE_FRAGMENT],args:{if:{type:new S(W),description:"Skipped when true."}}}),Jn="No longer supported",Ct=new Te({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[O.FIELD_DEFINITION,O.ARGUMENT_DEFINITION,O.INPUT_FIELD_DEFINITION,O.ENUM_VALUE],args:{reason:{type:$,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:Jn}}}),qn=new Te({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[O.SCALAR],args:{url:{type:new S($),description:"The URL that specifies the behavior of this scalar."}}}),Xn=new Te({name:"oneOf",description:"Indicates exactly one field must be supplied and this field must not be `null`.",locations:[O.INPUT_OBJECT],args:{}}),be=Object.freeze([Yn,Qn,Ct,qn,Xn]);function ps(e){return be.some(({name:t})=>t===e.name)}function ds(e){return typeof e=="object"&&typeof e?.[Symbol.iterator]=="function"}function De(e,t){if(A(t)){const n=De(e,t.ofType);return n?.kind===c.NULL?null:n}if(e===null)return{kind:c.NULL};if(e===void 0)return null;if(G(t)){const n=t.ofType;if(ds(e)){const i=[];for(const s of e){const r=De(s,n);r!=null&&i.push(r)}return{kind:c.LIST,values:i}}return De(e,n)}if(M(t)){if(!Ne(e))return null;const n=[];for(const i of Object.values(t.getFields())){const s=De(e[i.name],i.type);s&&n.push({kind:c.OBJECT_FIELD,name:{kind:c.NAME,value:i.name},value:s})}return{kind:c.OBJECT,fields:n}}if(Re(t)){const n=t.serialize(e);if(n==null)return null;if(typeof n=="boolean")return{kind:c.BOOLEAN,value:n};if(typeof n=="number"&&Number.isFinite(n)){const i=String(n);return an.test(i)?{kind:c.INT,value:i}:{kind:c.FLOAT,value:i}}if(typeof n=="string")return X(t)?{kind:c.ENUM,value:n}:t===Pn&&an.test(n)?{kind:c.INT,value:n}:{kind:c.STRING,value:n};throw new TypeError(`Cannot convert value to AST: ${E(n)}.`)}J(!1,"Unexpected input type: "+E(t))}const an=/^-?(?:0|[1-9][0-9]*)$/,$t=new le({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:$,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new S(new q(new S(re))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new S(re),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:re,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:re,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new S(new q(new S(zn))),resolve:e=>e.getDirectives()}})}),zn=new le({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
56
+
57
+ In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new S($),resolve:e=>e.name},description:{type:$,resolve:e=>e.description},isRepeatable:{type:new S(W),resolve:e=>e.isRepeatable},locations:{type:new S(new q(new S(Hn))),resolve:e=>e.locations},args:{type:new S(new q(new S(at))),args:{includeDeprecated:{type:W,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}}})}),Hn=new Ve({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:O.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:O.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:O.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:O.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:O.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:O.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:O.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:O.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:O.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:O.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:O.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:O.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:O.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:O.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:O.UNION,description:"Location adjacent to a union definition."},ENUM:{value:O.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:O.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:O.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:O.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),re=new le({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new S(Kn),resolve(e){if(fe(e))return P.SCALAR;if(k(e))return P.OBJECT;if(x(e))return P.INTERFACE;if(Z(e))return P.UNION;if(X(e))return P.ENUM;if(M(e))return P.INPUT_OBJECT;if(G(e))return P.LIST;if(A(e))return P.NON_NULL;J(!1,`Unexpected type: "${E(e)}".`)}},name:{type:$,resolve:e=>"name"in e?e.name:void 0},description:{type:$,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:$,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new q(new S(Wn)),args:{includeDeprecated:{type:W,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(k(e)||x(e)){const n=Object.values(e.getFields());return t?n:n.filter(i=>i.deprecationReason==null)}}},interfaces:{type:new q(new S(re)),resolve(e){if(k(e)||x(e))return e.getInterfaces()}},possibleTypes:{type:new q(new S(re)),resolve(e,t,n,{schema:i}){if(pe(e))return i.getPossibleTypes(e)}},enumValues:{type:new q(new S(Zn)),args:{includeDeprecated:{type:W,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(X(e)){const n=e.getValues();return t?n:n.filter(i=>i.deprecationReason==null)}}},inputFields:{type:new q(new S(at)),args:{includeDeprecated:{type:W,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(M(e)){const n=Object.values(e.getFields());return t?n:n.filter(i=>i.deprecationReason==null)}}},ofType:{type:re,resolve:e=>"ofType"in e?e.ofType:void 0},isOneOf:{type:W,resolve:e=>{if(M(e))return e.isOneOf}}})}),Wn=new le({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new S($),resolve:e=>e.name},description:{type:$,resolve:e=>e.description},args:{type:new S(new q(new S(at))),args:{includeDeprecated:{type:W,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(n=>n.deprecationReason==null)}},type:{type:new S(re),resolve:e=>e.type},isDeprecated:{type:new S(W),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:$,resolve:e=>e.deprecationReason}})}),at=new le({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new S($),resolve:e=>e.name},description:{type:$,resolve:e=>e.description},type:{type:new S(re),resolve:e=>e.type},defaultValue:{type:$,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:n}=e,i=De(n,t);return i?C(i):null}},isDeprecated:{type:new S(W),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:$,resolve:e=>e.deprecationReason}})}),Zn=new le({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new S($),resolve:e=>e.name},description:{type:$,resolve:e=>e.description},isDeprecated:{type:new S(W),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:$,resolve:e=>e.deprecationReason}})});var P;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(P||(P={}));const Kn=new Ve({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:P.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:P.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:P.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:P.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:P.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:P.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:P.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:P.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),cn={name:"__schema",type:new S($t),description:"Access the current type schema of this server.",args:[],resolve:(e,t,n,{schema:i})=>i,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},un={name:"__type",type:re,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new S($),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},n,{schema:i})=>i.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},ln={name:"__typename",type:new S($),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,n,{parentType:i})=>i.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Ut=Object.freeze([$t,zn,Hn,re,Wn,at,Zn,Kn]);function Mt(e){return Ut.some(({name:t})=>e.name===t)}function hs(e){return oe(e,ei)}function ms(e){if(!hs(e))throw new Error(`Expected ${E(e)} to be a GraphQL schema.`);return e}class ei{constructor(t){var n,i;this.__validationErrors=t.assumeValid===!0?[]:void 0,Ne(t)||D(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||D(!1,`"types" must be Array if provided but got: ${E(t.types)}.`),!t.directives||Array.isArray(t.directives)||D(!1,`"directives" must be Array if provided but got: ${E(t.directives)}.`),this.description=t.description,this.extensions=te(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(n=t.extensionASTNodes)!==null&&n!==void 0?n:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(i=t.directives)!==null&&i!==void 0?i:be;const s=new Set(t.types);if(t.types!=null)for(const r of t.types)s.delete(r),se(r,s);this._queryType!=null&&se(this._queryType,s),this._mutationType!=null&&se(this._mutationType,s),this._subscriptionType!=null&&se(this._subscriptionType,s);for(const r of this._directives)if(Gn(r))for(const o of r.args)se(o.type,s);se($t,s),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const r of s){if(r==null)continue;const o=r.name;if(o||D(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=r,x(r)){for(const a of r.getInterfaces())if(x(a)){let u=this._implementationsMap[a.name];u===void 0&&(u=this._implementationsMap[a.name]={objects:[],interfaces:[]}),u.interfaces.push(r)}}else if(k(r)){for(const a of r.getInterfaces())if(x(a)){let u=this._implementationsMap[a.name];u===void 0&&(u=this._implementationsMap[a.name]={objects:[],interfaces:[]}),u.objects.push(r)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case Q.QUERY:return this.getQueryType();case Q.MUTATION:return this.getMutationType();case Q.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return Z(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){const n=this._implementationsMap[t.name];return n??{objects:[],interfaces:[]}}isSubType(t,n){let i=this._subTypeMap[t.name];if(i===void 0){if(i=Object.create(null),Z(t))for(const s of t.getTypes())i[s.name]=!0;else{const s=this.getImplementations(t);for(const r of s.objects)i[r.name]=!0;for(const r of s.interfaces)i[r.name]=!0}this._subTypeMap[t.name]=i}return i[n.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(n=>n.name===t)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}}function se(e,t){const n=H(e);if(!t.has(n)){if(t.add(n),Z(n))for(const i of n.getTypes())se(i,t);else if(k(n)||x(n)){for(const i of n.getInterfaces())se(i,t);for(const i of Object.values(n.getFields())){se(i.type,t);for(const s of i.args)se(s.type,t)}}else if(M(n))for(const i of Object.values(n.getFields()))se(i.type,t)}return t}function Ts(e){if(ms(e),e.__validationErrors)return e.__validationErrors;const t=new vs(e);ys(t),Ns(t),Is(t);const n=t.getErrors();return e.__validationErrors=n,n}function Es(e){const t=Ts(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
58
+
59
+ `))}class vs{constructor(t){this._errors=[],this.schema=t}reportError(t,n){const i=Array.isArray(n)?n.filter(Boolean):n;this._errors.push(new m(t,{nodes:i}))}getErrors(){return this._errors}}function ys(e){const t=e.schema,n=t.getQueryType();if(!n)e.reportError("Query root type must be provided.",t.astNode);else if(!k(n)){var i;e.reportError(`Query root type must be Object type, it cannot be ${E(n)}.`,(i=ht(t,Q.QUERY))!==null&&i!==void 0?i:n.astNode)}const s=t.getMutationType();if(s&&!k(s)){var r;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${E(s)}.`,(r=ht(t,Q.MUTATION))!==null&&r!==void 0?r:s.astNode)}const o=t.getSubscriptionType();if(o&&!k(o)){var a;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${E(o)}.`,(a=ht(t,Q.SUBSCRIPTION))!==null&&a!==void 0?a:o.astNode)}}function ht(e,t){var n;return(n=[e.astNode,...e.extensionASTNodes].flatMap(i=>{var s;return(s=i?.operationTypes)!==null&&s!==void 0?s:[]}).find(i=>i.operation===t))===null||n===void 0?void 0:n.type}function Ns(e){for(const n of e.schema.getDirectives()){if(!Gn(n)){e.reportError(`Expected directive but got: ${E(n)}.`,n?.astNode);continue}Oe(e,n),n.locations.length===0&&e.reportError(`Directive @${n.name} must include 1 or more locations.`,n.astNode);for(const i of n.args)if(Oe(e,i),ce(i.type)||e.reportError(`The type of @${n.name}(${i.name}:) must be Input Type but got: ${E(i.type)}.`,i.astNode),Pe(i)&&i.deprecationReason!=null){var t;e.reportError(`Required argument @${n.name}(${i.name}:) cannot be deprecated.`,[Vt(i.astNode),(t=i.astNode)===null||t===void 0?void 0:t.type])}}}function Oe(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function Is(e){const t=As(e),n=e.schema.getTypeMap();for(const i of Object.values(n)){if(!as(i)){e.reportError(`Expected GraphQL named type but got: ${E(i)}.`,i.astNode);continue}Mt(i)||Oe(e,i),k(i)||x(i)?(fn(e,i),pn(e,i)):Z(i)?_s(e,i):X(i)?bs(e,i):M(i)&&(Ss(e,i),t(i))}}function fn(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const o of n){if(Oe(e,o),!$e(o.type)){var i;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${E(o.type)}.`,(i=o.astNode)===null||i===void 0?void 0:i.type)}for(const a of o.args){const u=a.name;if(Oe(e,a),!ce(a.type)){var s;e.reportError(`The type of ${t.name}.${o.name}(${u}:) must be Input Type but got: ${E(a.type)}.`,(s=a.astNode)===null||s===void 0?void 0:s.type)}if(Pe(a)&&a.deprecationReason!=null){var r;e.reportError(`Required argument ${t.name}.${o.name}(${u}:) cannot be deprecated.`,[Vt(a.astNode),(r=a.astNode)===null||r===void 0?void 0:r.type])}}}}function pn(e,t){const n=Object.create(null);for(const i of t.getInterfaces()){if(!x(i)){e.reportError(`Type ${E(t)} must only implement Interface types, it cannot implement ${E(i)}.`,Ue(t,i));continue}if(t===i){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,Ue(t,i));continue}if(n[i.name]){e.reportError(`Type ${t.name} can only implement ${i.name} once.`,Ue(t,i));continue}n[i.name]=!0,Os(e,t,i),gs(e,t,i)}}function gs(e,t,n){const i=t.getFields();for(const u of Object.values(n.getFields())){const l=u.name,f=i[l];if(!f){e.reportError(`Interface field ${n.name}.${l} expected but ${t.name} does not provide it.`,[u.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!we(e.schema,f.type,u.type)){var s,r;e.reportError(`Interface field ${n.name}.${l} expects type ${E(u.type)} but ${t.name}.${l} is type ${E(f.type)}.`,[(s=u.astNode)===null||s===void 0?void 0:s.type,(r=f.astNode)===null||r===void 0?void 0:r.type])}for(const p of u.args){const T=p.name,_=f.args.find(I=>I.name===T);if(!_){e.reportError(`Interface field argument ${n.name}.${l}(${T}:) expected but ${t.name}.${l} does not provide it.`,[p.astNode,f.astNode]);continue}if(!_t(p.type,_.type)){var o,a;e.reportError(`Interface field argument ${n.name}.${l}(${T}:) expects type ${E(p.type)} but ${t.name}.${l}(${T}:) is type ${E(_.type)}.`,[(o=p.astNode)===null||o===void 0?void 0:o.type,(a=_.astNode)===null||a===void 0?void 0:a.type])}}for(const p of f.args){const T=p.name;!u.args.find(I=>I.name===T)&&Pe(p)&&e.reportError(`Object field ${t.name}.${l} includes required argument ${T} that is missing from the Interface field ${n.name}.${l}.`,[p.astNode,u.astNode])}}}function Os(e,t,n){const i=t.getInterfaces();for(const s of n.getInterfaces())i.includes(s)||e.reportError(s===t?`Type ${t.name} cannot implement ${n.name} because it would create a circular reference.`:`Type ${t.name} must implement ${s.name} because it is implemented by ${n.name}.`,[...Ue(n,s),...Ue(t,n)])}function _s(e,t){const n=t.getTypes();n.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const i=Object.create(null);for(const s of n){if(i[s.name]){e.reportError(`Union type ${t.name} can only include type ${s.name} once.`,dn(t,s.name));continue}i[s.name]=!0,k(s)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${E(s)}.`,dn(t,String(s)))}}function bs(e,t){const n=t.getValues();n.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const i of n)Oe(e,i)}function Ss(e,t){const n=Object.values(t.getFields());n.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const r of n){if(Oe(e,r),!ce(r.type)){var i;e.reportError(`The type of ${t.name}.${r.name} must be Input Type but got: ${E(r.type)}.`,(i=r.astNode)===null||i===void 0?void 0:i.type)}if(jn(r)&&r.deprecationReason!=null){var s;e.reportError(`Required input field ${t.name}.${r.name} cannot be deprecated.`,[Vt(r.astNode),(s=r.astNode)===null||s===void 0?void 0:s.type])}t.isOneOf&&Ds(t,r,e)}}function Ds(e,t,n){if(A(t.type)){var i;n.reportError(`OneOf input field ${e.name}.${t.name} must be nullable.`,(i=t.astNode)===null||i===void 0?void 0:i.type)}t.defaultValue!==void 0&&n.reportError(`OneOf input field ${e.name}.${t.name} cannot have a default value.`,t.astNode)}function As(e){const t=Object.create(null),n=[],i=Object.create(null);return s;function s(r){if(t[r.name])return;t[r.name]=!0,i[r.name]=n.length;const o=Object.values(r.getFields());for(const a of o)if(A(a.type)&&M(a.type.ofType)){const u=a.type.ofType,l=i[u.name];if(n.push(a),l===void 0)s(u);else{const f=n.slice(l),p=f.map(T=>T.name).join(".");e.reportError(`Cannot reference Input Object "${u.name}" within itself through a series of non-null fields: "${p}".`,f.map(T=>T.astNode))}n.pop()}i[r.name]=void 0}}function Ue(e,t){const{astNode:n,extensionASTNodes:i}=e;return(n!=null?[n,...i]:i).flatMap(r=>{var o;return(o=r.interfaces)!==null&&o!==void 0?o:[]}).filter(r=>r.name.value===t.name)}function dn(e,t){const{astNode:n,extensionASTNodes:i}=e;return(n!=null?[n,...i]:i).flatMap(r=>{var o;return(o=r.types)!==null&&o!==void 0?o:[]}).filter(r=>r.name.value===t)}function Vt(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(n=>n.name.value===Ct.name)}function K(e,t){switch(t.kind){case c.LIST_TYPE:{const n=K(e,t.type);return n&&new q(n)}case c.NON_NULL_TYPE:{const n=K(e,t.type);return n&&new S(n)}case c.NAMED_TYPE:return e.getType(t.name.value)}}class ti{constructor(t,n,i){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=i??ws,n&&(ce(n)&&this._inputTypeStack.push(n),he(n)&&this._parentTypeStack.push(n),$e(n)&&this._typeStack.push(n))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(t){const n=this._schema;switch(t.kind){case c.SELECTION_SET:{const s=H(this.getType());this._parentTypeStack.push(he(s)?s:void 0);break}case c.FIELD:{const s=this.getParentType();let r,o;s&&(r=this._getFieldDef(n,s,t),r&&(o=r.type)),this._fieldDefStack.push(r),this._typeStack.push($e(o)?o:void 0);break}case c.DIRECTIVE:this._directive=n.getDirective(t.name.value);break;case c.OPERATION_DEFINITION:{const s=n.getRootType(t.operation);this._typeStack.push(k(s)?s:void 0);break}case c.INLINE_FRAGMENT:case c.FRAGMENT_DEFINITION:{const s=t.typeCondition,r=s?K(n,s):H(this.getType());this._typeStack.push($e(r)?r:void 0);break}case c.VARIABLE_DEFINITION:{const s=K(n,t.type);this._inputTypeStack.push(ce(s)?s:void 0);break}case c.ARGUMENT:{var i;let s,r;const o=(i=this.getDirective())!==null&&i!==void 0?i:this.getFieldDef();o&&(s=o.args.find(a=>a.name===t.name.value),s&&(r=s.type)),this._argument=s,this._defaultValueStack.push(s?s.defaultValue:void 0),this._inputTypeStack.push(ce(r)?r:void 0);break}case c.LIST:{const s=Ln(this.getInputType()),r=G(s)?s.ofType:s;this._defaultValueStack.push(void 0),this._inputTypeStack.push(ce(r)?r:void 0);break}case c.OBJECT_FIELD:{const s=H(this.getInputType());let r,o;M(s)&&(o=s.getFields()[t.name.value],o&&(r=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push(ce(r)?r:void 0);break}case c.ENUM:{const s=H(this.getInputType());let r;X(s)&&(r=s.getValue(t.value)),this._enumValue=r;break}}}leave(t){switch(t.kind){case c.SELECTION_SET:this._parentTypeStack.pop();break;case c.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case c.DIRECTIVE:this._directive=null;break;case c.OPERATION_DEFINITION:case c.INLINE_FRAGMENT:case c.FRAGMENT_DEFINITION:this._typeStack.pop();break;case c.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case c.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case c.LIST:case c.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case c.ENUM:this._enumValue=null;break}}}function ws(e,t,n){const i=n.name.value;if(i===cn.name&&e.getQueryType()===t)return cn;if(i===un.name&&e.getQueryType()===t)return un;if(i===ln.name&&he(t))return ln;if(k(t)||x(t))return t.getFields()[i]}function ni(e,t){return{enter(...n){const i=n[0];e.enter(i);const s=et(t,i.kind).enter;if(s){const r=s.apply(t,n);return r!==void 0&&(e.leave(i),Et(r)&&e.enter(r)),r}},leave(...n){const i=n[0],s=et(t,i.kind).leave;let r;return s&&(r=s.apply(t,n)),e.leave(i),r}}}function Rs(e){return e.kind===c.OPERATION_DEFINITION||e.kind===c.FRAGMENT_DEFINITION}function ks(e){return e.kind===c.SCHEMA_DEFINITION||Ge(e)||e.kind===c.DIRECTIVE_DEFINITION}function Ge(e){return e.kind===c.SCALAR_TYPE_DEFINITION||e.kind===c.OBJECT_TYPE_DEFINITION||e.kind===c.INTERFACE_TYPE_DEFINITION||e.kind===c.UNION_TYPE_DEFINITION||e.kind===c.ENUM_TYPE_DEFINITION||e.kind===c.INPUT_OBJECT_TYPE_DEFINITION}function Ls(e){return e.kind===c.SCHEMA_EXTENSION||jt(e)}function jt(e){return e.kind===c.SCALAR_TYPE_EXTENSION||e.kind===c.OBJECT_TYPE_EXTENSION||e.kind===c.INTERFACE_TYPE_EXTENSION||e.kind===c.UNION_TYPE_EXTENSION||e.kind===c.ENUM_TYPE_EXTENSION||e.kind===c.INPUT_OBJECT_TYPE_EXTENSION}function xs(e){return{Document(t){for(const n of t.definitions)if(!Rs(n)){const i=n.kind===c.SCHEMA_DEFINITION||n.kind===c.SCHEMA_EXTENSION?"schema":'"'+n.name.value+'"';e.reportError(new m(`The ${i} definition is not executable.`,{nodes:n}))}return!1}}}function Fs(e){return{Field(t){const n=e.getParentType();if(n&&!e.getFieldDef()){const s=e.getSchema(),r=t.name.value;let o=de("to use an inline fragment on",Cs(s,n,r));o===""&&(o=de($s(n,r))),e.reportError(new m(`Cannot query field "${r}" on type "${n.name}".`+o,{nodes:t}))}}}}function Cs(e,t,n){if(!pe(t))return[];const i=new Set,s=Object.create(null);for(const o of e.getPossibleTypes(t))if(o.getFields()[n]){i.add(o),s[o.name]=1;for(const a of o.getInterfaces()){var r;a.getFields()[n]&&(i.add(a),s[a.name]=((r=s[a.name])!==null&&r!==void 0?r:0)+1)}}return[...i].sort((o,a)=>{const u=s[a.name]-s[o.name];return u!==0?u:x(o)&&e.isSubType(o,a)?-1:x(a)&&e.isSubType(a,o)?1:kt(o.name,a.name)}).map(o=>o.name)}function $s(e,t){if(k(e)||x(e)){const n=Object.keys(e.getFields());return _e(t,n)}return[]}function Us(e){return{InlineFragment(t){const n=t.typeCondition;if(n){const i=K(e.getSchema(),n);if(i&&!he(i)){const s=C(n);e.reportError(new m(`Fragment cannot condition on non composite type "${s}".`,{nodes:n}))}}},FragmentDefinition(t){const n=K(e.getSchema(),t.typeCondition);if(n&&!he(n)){const i=C(t.typeCondition);e.reportError(new m(`Fragment "${t.name.value}" cannot condition on non composite type "${i}".`,{nodes:t.typeCondition}))}}}}function Ms(e){return{...ii(e),Argument(t){const n=e.getArgument(),i=e.getFieldDef(),s=e.getParentType();if(!n&&i&&s){const r=t.name.value,o=i.args.map(u=>u.name),a=_e(r,o);e.reportError(new m(`Unknown argument "${r}" on field "${s.name}.${i.name}".`+de(a),{nodes:t}))}}}}function ii(e){const t=Object.create(null),n=e.getSchema(),i=n?n.getDirectives():be;for(const o of i)t[o.name]=o.args.map(a=>a.name);const s=e.getDocument().definitions;for(const o of s)if(o.kind===c.DIRECTIVE_DEFINITION){var r;const a=(r=o.arguments)!==null&&r!==void 0?r:[];t[o.name.value]=a.map(u=>u.name.value)}return{Directive(o){const a=o.name.value,u=t[a];if(o.arguments&&u)for(const l of o.arguments){const f=l.name.value;if(!u.includes(f)){const p=_e(f,u);e.reportError(new m(`Unknown argument "${f}" on directive "@${a}".`+de(p),{nodes:l}))}}return!1}}}function si(e){const t=Object.create(null),n=e.getSchema(),i=n?n.getDirectives():be;for(const r of i)t[r.name]=r.locations;const s=e.getDocument().definitions;for(const r of s)r.kind===c.DIRECTIVE_DEFINITION&&(t[r.name.value]=r.locations.map(o=>o.value));return{Directive(r,o,a,u,l){const f=r.name.value,p=t[f];if(!p){e.reportError(new m(`Unknown directive "@${f}".`,{nodes:r}));return}const T=Vs(l);T&&!p.includes(T)&&e.reportError(new m(`Directive "@${f}" may not be used on ${T}.`,{nodes:r}))}}}function Vs(e){const t=e[e.length-1];switch("kind"in t||J(!1),t.kind){case c.OPERATION_DEFINITION:return js(t.operation);case c.FIELD:return O.FIELD;case c.FRAGMENT_SPREAD:return O.FRAGMENT_SPREAD;case c.INLINE_FRAGMENT:return O.INLINE_FRAGMENT;case c.FRAGMENT_DEFINITION:return O.FRAGMENT_DEFINITION;case c.VARIABLE_DEFINITION:return O.VARIABLE_DEFINITION;case c.SCHEMA_DEFINITION:case c.SCHEMA_EXTENSION:return O.SCHEMA;case c.SCALAR_TYPE_DEFINITION:case c.SCALAR_TYPE_EXTENSION:return O.SCALAR;case c.OBJECT_TYPE_DEFINITION:case c.OBJECT_TYPE_EXTENSION:return O.OBJECT;case c.FIELD_DEFINITION:return O.FIELD_DEFINITION;case c.INTERFACE_TYPE_DEFINITION:case c.INTERFACE_TYPE_EXTENSION:return O.INTERFACE;case c.UNION_TYPE_DEFINITION:case c.UNION_TYPE_EXTENSION:return O.UNION;case c.ENUM_TYPE_DEFINITION:case c.ENUM_TYPE_EXTENSION:return O.ENUM;case c.ENUM_VALUE_DEFINITION:return O.ENUM_VALUE;case c.INPUT_OBJECT_TYPE_DEFINITION:case c.INPUT_OBJECT_TYPE_EXTENSION:return O.INPUT_OBJECT;case c.INPUT_VALUE_DEFINITION:{const n=e[e.length-3];return"kind"in n||J(!1),n.kind===c.INPUT_OBJECT_TYPE_DEFINITION?O.INPUT_FIELD_DEFINITION:O.ARGUMENT_DEFINITION}default:J(!1,"Unexpected kind: "+E(t.kind))}}function js(e){switch(e){case Q.QUERY:return O.QUERY;case Q.MUTATION:return O.MUTATION;case Q.SUBSCRIPTION:return O.SUBSCRIPTION}}function Ps(e){return{FragmentSpread(t){const n=t.name.value;e.getFragment(n)||e.reportError(new m(`Unknown fragment "${n}".`,{nodes:t.name}))}}}function ri(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),i=Object.create(null);for(const r of e.getDocument().definitions)Ge(r)&&(i[r.name.value]=!0);const s=[...Object.keys(n),...Object.keys(i)];return{NamedType(r,o,a,u,l){const f=r.name.value;if(!n[f]&&!i[f]){var p;const T=(p=l[2])!==null&&p!==void 0?p:a,_=T!=null&&Bs(T);if(_&&hn.includes(f))return;const I=_e(f,_?hn.concat(s):s);e.reportError(new m(`Unknown type "${f}".`+de(I),{nodes:r}))}}}}const hn=[...Ft,...Ut].map(e=>e.name);function Bs(e){return"kind"in e&&(ks(e)||Ls(e))}function Gs(e){let t=0;return{Document(n){t=n.definitions.filter(i=>i.kind===c.OPERATION_DEFINITION).length},OperationDefinition(n){!n.name&&t>1&&e.reportError(new m("This anonymous operation must be the only defined operation.",{nodes:n}))}}}function Ys(e){var t,n,i;const s=e.getSchema(),r=(t=(n=(i=s?.astNode)!==null&&i!==void 0?i:s?.getQueryType())!==null&&n!==void 0?n:s?.getMutationType())!==null&&t!==void 0?t:s?.getSubscriptionType();let o=0;return{SchemaDefinition(a){if(r){e.reportError(new m("Cannot define a new schema within a schema extension.",{nodes:a}));return}o>0&&e.reportError(new m("Must provide only one schema definition.",{nodes:a})),++o}}}const Qs=3;function Js(e){function t(n,i=Object.create(null),s=0){if(n.kind===c.FRAGMENT_SPREAD){const r=n.name.value;if(i[r]===!0)return!1;const o=e.getFragment(r);if(!o)return!1;try{return i[r]=!0,t(o,i,s)}finally{i[r]=void 0}}if(n.kind===c.FIELD&&(n.name.value==="fields"||n.name.value==="interfaces"||n.name.value==="possibleTypes"||n.name.value==="inputFields")&&(s++,s>=Qs))return!0;if("selectionSet"in n&&n.selectionSet){for(const r of n.selectionSet.selections)if(t(r,i,s))return!0}return!1}return{Field(n){if((n.name.value==="__schema"||n.name.value==="__type")&&t(n))return e.reportError(new m("Maximum introspection depth exceeded",{nodes:[n]})),!1}}}function qs(e){const t=Object.create(null),n=[],i=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(r){return s(r),!1}};function s(r){if(t[r.name.value])return;const o=r.name.value;t[o]=!0;const a=e.getFragmentSpreads(r.selectionSet);if(a.length!==0){i[o]=n.length;for(const u of a){const l=u.name.value,f=i[l];if(n.push(u),f===void 0){const p=e.getFragment(l);p&&s(p)}else{const p=n.slice(f),T=p.slice(0,-1).map(_=>'"'+_.name.value+'"').join(", ");e.reportError(new m(`Cannot spread fragment "${l}" within itself`+(T!==""?` via ${T}.`:"."),{nodes:p}))}n.pop()}i[o]=void 0}}}function Xs(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const i=e.getRecursiveVariableUsages(n);for(const{node:s}of i){const r=s.name.value;t[r]!==!0&&e.reportError(new m(n.name?`Variable "$${r}" is not defined by operation "${n.name.value}".`:`Variable "$${r}" is not defined.`,{nodes:[s,n]}))}}},VariableDefinition(n){t[n.variable.name.value]=!0}}}function zs(e){const t=[],n=[];return{OperationDefinition(i){return t.push(i),!1},FragmentDefinition(i){return n.push(i),!1},Document:{leave(){const i=Object.create(null);for(const s of t)for(const r of e.getRecursivelyReferencedFragments(s))i[r.name.value]=!0;for(const s of n){const r=s.name.value;i[r]!==!0&&e.reportError(new m(`Fragment "${r}" is never used.`,{nodes:s}))}}}}}function Hs(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(n){const i=Object.create(null),s=e.getRecursiveVariableUsages(n);for(const{node:r}of s)i[r.name.value]=!0;for(const r of t){const o=r.variable.name.value;i[o]!==!0&&e.reportError(new m(n.name?`Variable "$${o}" is never used in operation "${n.name.value}".`:`Variable "$${o}" is never used.`,{nodes:r}))}}},VariableDefinition(n){t.push(n)}}}function Pt(e){switch(e.kind){case c.OBJECT:return{...e,fields:Ws(e.fields)};case c.LIST:return{...e,values:e.values.map(Pt)};case c.INT:case c.FLOAT:case c.STRING:case c.BOOLEAN:case c.NULL:case c.ENUM:case c.VARIABLE:return e}}function Ws(e){return e.map(t=>({...t,value:Pt(t.value)})).sort((t,n)=>kt(t.name.value,n.name.value))}function oi(e){return Array.isArray(e)?e.map(([t,n])=>`subfields "${t}" conflict because `+oi(n)).join(" and "):e}function Zs(e){const t=new ui,n=new sr,i=new Map;return{SelectionSet(s){const r=Ks(e,i,t,n,e.getParentType(),s);for(const[[o,a],u,l]of r){const f=oi(a);e.reportError(new m(`Fields "${o}" conflict because ${f}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:u.concat(l)}))}}}}function Ks(e,t,n,i,s,r){const o=[],[a,u]=it(e,t,s,r);if(tr(e,o,t,n,i,a),u.length!==0)for(let l=0;l<u.length;l++){tt(e,o,t,n,i,!1,a,u[l]);for(let f=l+1;f<u.length;f++)nt(e,o,t,n,i,!1,u[l],u[f])}return o}function tt(e,t,n,i,s,r,o,a){if(i.has(o,a,r))return;i.add(o,a,r);const u=e.getFragment(a);if(!u)return;const[l,f]=St(e,n,u);if(o!==l){Bt(e,t,n,i,s,r,o,l);for(const p of f)tt(e,t,n,i,s,r,o,p)}}function nt(e,t,n,i,s,r,o,a){if(o===a||s.has(o,a,r))return;s.add(o,a,r);const u=e.getFragment(o),l=e.getFragment(a);if(!u||!l)return;const[f,p]=St(e,n,u),[T,_]=St(e,n,l);Bt(e,t,n,i,s,r,f,T);for(const I of _)nt(e,t,n,i,s,r,o,I);for(const I of p)nt(e,t,n,i,s,r,I,a)}function er(e,t,n,i,s,r,o,a,u){const l=[],[f,p]=it(e,t,r,o),[T,_]=it(e,t,a,u);Bt(e,l,t,n,i,s,f,T);for(const I of _)tt(e,l,t,n,i,s,f,I);for(const I of p)tt(e,l,t,n,i,s,T,I);for(const I of p)for(const w of _)nt(e,l,t,n,i,s,I,w);return l}function tr(e,t,n,i,s,r){for(const[o,a]of Object.entries(r))if(a.length>1)for(let u=0;u<a.length;u++)for(let l=u+1;l<a.length;l++){const f=ai(e,n,i,s,!1,o,a[u],a[l]);f&&t.push(f)}}function Bt(e,t,n,i,s,r,o,a){for(const[u,l]of Object.entries(o)){const f=a[u];if(f)for(const p of l)for(const T of f){const _=ai(e,n,i,s,r,u,p,T);_&&t.push(_)}}}function ai(e,t,n,i,s,r,o,a){const[u,l,f]=o,[p,T,_]=a,I=s||u!==p&&k(u)&&k(p);if(!I){const Y=l.name.value,z=T.name.value;if(Y!==z)return[[r,`"${Y}" and "${z}" are different fields`],[l],[T]];if(!nr(l,T))return[[r,"they have differing arguments"],[l],[T]]}const w=f?.type,F=_?.type;if(w&&F&&bt(w,F))return[[r,`they return conflicting types "${E(w)}" and "${E(F)}"`],[l],[T]];const B=l.selectionSet,Ee=T.selectionSet;if(B&&Ee){const Y=er(e,t,n,i,I,H(w),B,H(F),Ee);return ir(Y,r,l,T)}}function nr(e,t){const n=e.arguments,i=t.arguments;if(n===void 0||n.length===0)return i===void 0||i.length===0;if(i===void 0||i.length===0||n.length!==i.length)return!1;const s=new Map(i.map(({name:r,value:o})=>[r.value,o]));return n.every(r=>{const o=r.value,a=s.get(r.name.value);return a===void 0?!1:mn(o)===mn(a)})}function mn(e){return C(Pt(e))}function bt(e,t){return G(e)?G(t)?bt(e.ofType,t.ofType):!0:G(t)?!0:A(e)?A(t)?bt(e.ofType,t.ofType):!0:A(t)?!0:Re(e)||Re(t)?e!==t:!1}function it(e,t,n,i){const s=t.get(i);if(s)return s;const r=Object.create(null),o=Object.create(null);ci(e,n,i,r,o);const a=[r,Object.keys(o)];return t.set(i,a),a}function St(e,t,n){const i=t.get(n.selectionSet);if(i)return i;const s=K(e.getSchema(),n.typeCondition);return it(e,t,s,n.selectionSet)}function ci(e,t,n,i,s){for(const r of n.selections)switch(r.kind){case c.FIELD:{const o=r.name.value;let a;(k(t)||x(t))&&(a=t.getFields()[o]);const u=r.alias?r.alias.value:o;i[u]||(i[u]=[]),i[u].push([t,r,a]);break}case c.FRAGMENT_SPREAD:s[r.name.value]=!0;break;case c.INLINE_FRAGMENT:{const o=r.typeCondition,a=o?K(e.getSchema(),o):t;ci(e,a,r.selectionSet,i,s);break}}}function ir(e,t,n,i){if(e.length>0)return[[t,e.map(([s])=>s)],[n,...e.map(([,s])=>s).flat()],[i,...e.map(([,,s])=>s).flat()]]}class ui{constructor(){this._data=new Map}has(t,n,i){var s;const r=(s=this._data.get(t))===null||s===void 0?void 0:s.get(n);return r===void 0?!1:i?!0:i===r}add(t,n,i){const s=this._data.get(t);s===void 0?this._data.set(t,new Map([[n,i]])):s.set(n,i)}}class sr{constructor(){this._orderedPairSet=new ui}has(t,n,i){return t<n?this._orderedPairSet.has(t,n,i):this._orderedPairSet.has(n,t,i)}add(t,n,i){t<n?this._orderedPairSet.add(t,n,i):this._orderedPairSet.add(n,t,i)}}function rr(e){return{InlineFragment(t){const n=e.getType(),i=e.getParentType();if(he(n)&&he(i)&&!on(e.getSchema(),n,i)){const s=E(i),r=E(n);e.reportError(new m(`Fragment cannot be spread here as objects of type "${s}" can never be of type "${r}".`,{nodes:t}))}},FragmentSpread(t){const n=t.name.value,i=or(e,n),s=e.getParentType();if(i&&s&&!on(e.getSchema(),i,s)){const r=E(s),o=E(i);e.reportError(new m(`Fragment "${n}" cannot be spread here as objects of type "${r}" can never be of type "${o}".`,{nodes:t}))}}}}function or(e,t){const n=e.getFragment(t);if(n){const i=K(e.getSchema(),n.typeCondition);if(he(i))return i}}function ar(e){const t=e.getSchema(),n=Object.create(null);for(const s of e.getDocument().definitions)Ge(s)&&(n[s.name.value]=s);return{ScalarTypeExtension:i,ObjectTypeExtension:i,InterfaceTypeExtension:i,UnionTypeExtension:i,EnumTypeExtension:i,InputObjectTypeExtension:i};function i(s){const r=s.name.value,o=n[r],a=t?.getType(r);let u;if(o?u=cr[o.kind]:a&&(u=ur(a)),u){if(u!==s.kind){const l=lr(s.kind);e.reportError(new m(`Cannot extend non-${l} type "${r}".`,{nodes:o?[o,s]:s}))}}else{const l=Object.keys({...n,...t?.getTypeMap()}),f=_e(r,l);e.reportError(new m(`Cannot extend type "${r}" because it is not defined.`+de(f),{nodes:s.name}))}}}const cr={[c.SCALAR_TYPE_DEFINITION]:c.SCALAR_TYPE_EXTENSION,[c.OBJECT_TYPE_DEFINITION]:c.OBJECT_TYPE_EXTENSION,[c.INTERFACE_TYPE_DEFINITION]:c.INTERFACE_TYPE_EXTENSION,[c.UNION_TYPE_DEFINITION]:c.UNION_TYPE_EXTENSION,[c.ENUM_TYPE_DEFINITION]:c.ENUM_TYPE_EXTENSION,[c.INPUT_OBJECT_TYPE_DEFINITION]:c.INPUT_OBJECT_TYPE_EXTENSION};function ur(e){if(fe(e))return c.SCALAR_TYPE_EXTENSION;if(k(e))return c.OBJECT_TYPE_EXTENSION;if(x(e))return c.INTERFACE_TYPE_EXTENSION;if(Z(e))return c.UNION_TYPE_EXTENSION;if(X(e))return c.ENUM_TYPE_EXTENSION;if(M(e))return c.INPUT_OBJECT_TYPE_EXTENSION;J(!1,"Unexpected type: "+E(e))}function lr(e){switch(e){case c.SCALAR_TYPE_EXTENSION:return"scalar";case c.OBJECT_TYPE_EXTENSION:return"object";case c.INTERFACE_TYPE_EXTENSION:return"interface";case c.UNION_TYPE_EXTENSION:return"union";case c.ENUM_TYPE_EXTENSION:return"enum";case c.INPUT_OBJECT_TYPE_EXTENSION:return"input object";default:J(!1,"Unexpected kind: "+E(e))}}function fr(e){return{...li(e),Field:{leave(t){var n;const i=e.getFieldDef();if(!i)return!1;const s=new Set((n=t.arguments)===null||n===void 0?void 0:n.map(r=>r.name.value));for(const r of i.args)if(!s.has(r.name)&&Pe(r)){const o=E(r.type);e.reportError(new m(`Field "${i.name}" argument "${r.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}}}function li(e){var t;const n=Object.create(null),i=e.getSchema(),s=(t=i?.getDirectives())!==null&&t!==void 0?t:be;for(const a of s)n[a.name]=ge(a.args.filter(Pe),u=>u.name);const r=e.getDocument().definitions;for(const a of r)if(a.kind===c.DIRECTIVE_DEFINITION){var o;const u=(o=a.arguments)!==null&&o!==void 0?o:[];n[a.name.value]=ge(u.filter(pr),l=>l.name.value)}return{Directive:{leave(a){const u=a.name.value,l=n[u];if(l){var f;const p=(f=a.arguments)!==null&&f!==void 0?f:[],T=new Set(p.map(_=>_.name.value));for(const[_,I]of Object.entries(l))if(!T.has(_)){const w=Lt(I.type)?E(I.type):C(I.type);e.reportError(new m(`Directive "@${u}" argument "${_}" of type "${w}" is required, but it was not provided.`,{nodes:a}))}}}}}}function pr(e){return e.type.kind===c.NON_NULL_TYPE&&e.defaultValue==null}function dr(e){return{Field(t){const n=e.getType(),i=t.selectionSet;if(n)if(Re(H(n))){if(i){const s=t.name.value,r=E(n);e.reportError(new m(`Field "${s}" must not have a selection since type "${r}" has no subfields.`,{nodes:i}))}}else if(i){if(i.selections.length===0){const s=t.name.value,r=E(n);e.reportError(new m(`Field "${s}" of type "${r}" must have at least one field selected.`,{nodes:t}))}}else{const s=t.name.value,r=E(n);e.reportError(new m(`Field "${s}" of type "${r}" must have a selection of subfields. Did you mean "${s} { ... }"?`,{nodes:t}))}}}}function ye(e,t,n){if(e){if(e.kind===c.VARIABLE){const i=e.name.value;if(n==null||n[i]===void 0)return;const s=n[i];return s===null&&A(t)?void 0:s}if(A(t))return e.kind===c.NULL?void 0:ye(e,t.ofType,n);if(e.kind===c.NULL)return null;if(G(t)){const i=t.ofType;if(e.kind===c.LIST){const r=[];for(const o of e.values)if(Tn(o,n)){if(A(i))return;r.push(null)}else{const a=ye(o,i,n);if(a===void 0)return;r.push(a)}return r}const s=ye(e,i,n);return s===void 0?void 0:[s]}if(M(t)){if(e.kind!==c.OBJECT)return;const i=Object.create(null),s=ge(e.fields,r=>r.name.value);for(const r of Object.values(t.getFields())){const o=s[r.name];if(!o||Tn(o.value,n)){if(r.defaultValue!==void 0)i[r.name]=r.defaultValue;else if(A(r.type))return;continue}const a=ye(o.value,r.type,n);if(a===void 0)return;i[r.name]=a}if(t.isOneOf){const r=Object.keys(i);if(r.length!==1||i[r[0]]===null)return}return i}if(Re(t)){let i;try{i=t.parseLiteral(e,n)}catch{return}return i===void 0?void 0:i}J(!1,"Unexpected input type: "+E(t))}}function Tn(e,t){return e.kind===c.VARIABLE&&(t==null||t[e.name.value]===void 0)}function hr(e,t,n){var i;const s={},r=(i=t.arguments)!==null&&i!==void 0?i:[],o=ge(r,a=>a.name.value);for(const a of e.args){const u=a.name,l=a.type,f=o[u];if(!f){if(a.defaultValue!==void 0)s[u]=a.defaultValue;else if(A(l))throw new m(`Argument "${u}" of required type "${E(l)}" was not provided.`,{nodes:t});continue}const p=f.value;let T=p.kind===c.NULL;if(p.kind===c.VARIABLE){const I=p.name.value;if(n==null||!mr(n,I)){if(a.defaultValue!==void 0)s[u]=a.defaultValue;else if(A(l))throw new m(`Argument "${u}" of required type "${E(l)}" was provided the variable "$${I}" which was not provided a runtime value.`,{nodes:p});continue}T=n[I]==null}if(T&&A(l))throw new m(`Argument "${u}" of non-null type "${E(l)}" must not be null.`,{nodes:p});const _=ye(p,l,n);if(_===void 0)throw new m(`Argument "${u}" has invalid value ${C(p)}.`,{nodes:p});s[u]=_}return s}function je(e,t,n){var i;const s=(i=t.directives)===null||i===void 0?void 0:i.find(r=>r.name.value===e.name);if(s)return hr(e,s,n)}function mr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Tr(e,t,n,i,s){const r=new Map;return Dt(e,t,n,i,s,r,new Set),r}function Dt(e,t,n,i,s,r,o){for(const a of s.selections)switch(a.kind){case c.FIELD:{if(!mt(n,a))continue;const u=Er(a),l=r.get(u);l!==void 0?l.push(a):r.set(u,[a]);break}case c.INLINE_FRAGMENT:{if(!mt(n,a)||!En(e,a,i))continue;Dt(e,t,n,i,a.selectionSet,r,o);break}case c.FRAGMENT_SPREAD:{const u=a.name.value;if(o.has(u)||!mt(n,a))continue;o.add(u);const l=t[u];if(!l||!En(e,l,i))continue;Dt(e,t,n,i,l.selectionSet,r,o);break}}}function mt(e,t){const n=je(Qn,t,e);if(n?.if===!0)return!1;const i=je(Yn,t,e);return i?.if!==!1}function En(e,t,n){const i=t.typeCondition;if(!i)return!0;const s=K(e,i);return s===n?!0:pe(s)?e.isSubType(s,n):!1}function Er(e){return e.alias?e.alias.value:e.name.value}function vr(e){return{OperationDefinition(t){if(t.operation==="subscription"){const n=e.getSchema(),i=n.getSubscriptionType();if(i){const s=t.name?t.name.value:null,r=Object.create(null),o=e.getDocument(),a=Object.create(null);for(const l of o.definitions)l.kind===c.FRAGMENT_DEFINITION&&(a[l.name.value]=l);const u=Tr(n,a,r,i,t.selectionSet);if(u.size>1){const p=[...u.values()].slice(1).flat();e.reportError(new m(s!=null?`Subscription "${s}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:p}))}for(const l of u.values())l[0].name.value.startsWith("__")&&e.reportError(new m(s!=null?`Subscription "${s}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:l}))}}}}}function Gt(e,t){const n=new Map;for(const i of e){const s=t(i),r=n.get(s);r===void 0?n.set(s,[i]):r.push(i)}return n}function yr(e){return{DirectiveDefinition(i){var s;const r=(s=i.arguments)!==null&&s!==void 0?s:[];return n(`@${i.name.value}`,r)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(i){var s;const r=i.name.value,o=(s=i.fields)!==null&&s!==void 0?s:[];for(const u of o){var a;const l=u.name.value,f=(a=u.arguments)!==null&&a!==void 0?a:[];n(`${r}.${l}`,f)}return!1}function n(i,s){const r=Gt(s,o=>o.name.value);for(const[o,a]of r)a.length>1&&e.reportError(new m(`Argument "${i}(${o}:)" can only be defined once.`,{nodes:a.map(u=>u.name)}));return!1}}function fi(e){return{Field:t,Directive:t};function t(n){var i;const s=(i=n.arguments)!==null&&i!==void 0?i:[],r=Gt(s,o=>o.name.value);for(const[o,a]of r)a.length>1&&e.reportError(new m(`There can be only one argument named "${o}".`,{nodes:a.map(u=>u.name)}))}}function Nr(e){const t=Object.create(null),n=e.getSchema();return{DirectiveDefinition(i){const s=i.name.value;if(n!=null&&n.getDirective(s)){e.reportError(new m(`Directive "@${s}" already exists in the schema. It cannot be redefined.`,{nodes:i.name}));return}return t[s]?e.reportError(new m(`There can be only one directive named "@${s}".`,{nodes:[t[s],i.name]})):t[s]=i.name,!1}}}function pi(e){const t=Object.create(null),n=e.getSchema(),i=n?n.getDirectives():be;for(const a of i)t[a.name]=!a.isRepeatable;const s=e.getDocument().definitions;for(const a of s)a.kind===c.DIRECTIVE_DEFINITION&&(t[a.name.value]=!a.repeatable);const r=Object.create(null),o=Object.create(null);return{enter(a){if(!("directives"in a)||!a.directives)return;let u;if(a.kind===c.SCHEMA_DEFINITION||a.kind===c.SCHEMA_EXTENSION)u=r;else if(Ge(a)||jt(a)){const l=a.name.value;u=o[l],u===void 0&&(o[l]=u=Object.create(null))}else u=Object.create(null);for(const l of a.directives){const f=l.name.value;t[f]&&(u[f]?e.reportError(new m(`The directive "@${f}" can only be used once at this location.`,{nodes:[u[f],l]})):u[f]=l)}}}}function Ir(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),i=Object.create(null);return{EnumTypeDefinition:s,EnumTypeExtension:s};function s(r){var o;const a=r.name.value;i[a]||(i[a]=Object.create(null));const u=(o=r.values)!==null&&o!==void 0?o:[],l=i[a];for(const f of u){const p=f.name.value,T=n[a];X(T)&&T.getValue(p)?e.reportError(new m(`Enum value "${a}.${p}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):l[p]?e.reportError(new m(`Enum value "${a}.${p}" can only be defined once.`,{nodes:[l[p],f.name]})):l[p]=f.name}return!1}}function gr(e){const t=e.getSchema(),n=t?t.getTypeMap():Object.create(null),i=Object.create(null);return{InputObjectTypeDefinition:s,InputObjectTypeExtension:s,InterfaceTypeDefinition:s,InterfaceTypeExtension:s,ObjectTypeDefinition:s,ObjectTypeExtension:s};function s(r){var o;const a=r.name.value;i[a]||(i[a]=Object.create(null));const u=(o=r.fields)!==null&&o!==void 0?o:[],l=i[a];for(const f of u){const p=f.name.value;Or(n[a],p)?e.reportError(new m(`Field "${a}.${p}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:f.name})):l[p]?e.reportError(new m(`Field "${a}.${p}" can only be defined once.`,{nodes:[l[p],f.name]})):l[p]=f.name}return!1}}function Or(e,t){return k(e)||x(e)||M(e)?e.getFields()[t]!=null:!1}function _r(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(n){const i=n.name.value;return t[i]?e.reportError(new m(`There can be only one fragment named "${i}".`,{nodes:[t[i],n.name]})):t[i]=n.name,!1}}}function di(e){const t=[];let n=Object.create(null);return{ObjectValue:{enter(){t.push(n),n=Object.create(null)},leave(){const i=t.pop();i||J(!1),n=i}},ObjectField(i){const s=i.name.value;n[s]?e.reportError(new m(`There can be only one input field named "${s}".`,{nodes:[n[s],i.name]})):n[s]=i.name}}}function br(e){const t=Object.create(null);return{OperationDefinition(n){const i=n.name;return i&&(t[i.value]?e.reportError(new m(`There can be only one operation named "${i.value}".`,{nodes:[t[i.value],i]})):t[i.value]=i),!1},FragmentDefinition:()=>!1}}function Sr(e){const t=e.getSchema(),n=Object.create(null),i=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:s,SchemaExtension:s};function s(r){var o;const a=(o=r.operationTypes)!==null&&o!==void 0?o:[];for(const u of a){const l=u.operation,f=n[l];i[l]?e.reportError(new m(`Type for ${l} already defined in the schema. It cannot be redefined.`,{nodes:u})):f?e.reportError(new m(`There can be only one ${l} type in schema.`,{nodes:[f,u]})):n[l]=u}return!1}}function Dr(e){const t=Object.create(null),n=e.getSchema();return{ScalarTypeDefinition:i,ObjectTypeDefinition:i,InterfaceTypeDefinition:i,UnionTypeDefinition:i,EnumTypeDefinition:i,InputObjectTypeDefinition:i};function i(s){const r=s.name.value;if(n!=null&&n.getType(r)){e.reportError(new m(`Type "${r}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:s.name}));return}return t[r]?e.reportError(new m(`There can be only one type named "${r}".`,{nodes:[t[r],s.name]})):t[r]=s.name,!1}}function Ar(e){return{OperationDefinition(t){var n;const i=(n=t.variableDefinitions)!==null&&n!==void 0?n:[],s=Gt(i,r=>r.variable.name.value);for(const[r,o]of s)o.length>1&&e.reportError(new m(`There can be only one variable named "$${r}".`,{nodes:o.map(a=>a.variable.name)}))}}}function wr(e){let t={};return{OperationDefinition:{enter(){t={}}},VariableDefinition(n){t[n.variable.name.value]=n},ListValue(n){const i=Ln(e.getParentInputType());if(!G(i))return ve(e,n),!1},ObjectValue(n){const i=H(e.getInputType());if(!M(i))return ve(e,n),!1;const s=ge(n.fields,r=>r.name.value);for(const r of Object.values(i.getFields()))if(!s[r.name]&&jn(r)){const a=E(r.type);e.reportError(new m(`Field "${i.name}.${r.name}" of required type "${a}" was not provided.`,{nodes:n}))}i.isOneOf&&Rr(e,n,i,s)},ObjectField(n){const i=H(e.getParentInputType());if(!e.getInputType()&&M(i)){const r=_e(n.name.value,Object.keys(i.getFields()));e.reportError(new m(`Field "${n.name.value}" is not defined by type "${i.name}".`+de(r),{nodes:n}))}},NullValue(n){const i=e.getInputType();A(i)&&e.reportError(new m(`Expected value of type "${E(i)}", found ${C(n)}.`,{nodes:n}))},EnumValue:n=>ve(e,n),IntValue:n=>ve(e,n),FloatValue:n=>ve(e,n),StringValue:n=>ve(e,n),BooleanValue:n=>ve(e,n)}}function ve(e,t){const n=e.getInputType();if(!n)return;const i=H(n);if(!Re(i)){const s=E(n);e.reportError(new m(`Expected value of type "${s}", found ${C(t)}.`,{nodes:t}));return}try{if(i.parseLiteral(t,void 0)===void 0){const r=E(n);e.reportError(new m(`Expected value of type "${r}", found ${C(t)}.`,{nodes:t}))}}catch(s){const r=E(n);s instanceof m?e.reportError(s):e.reportError(new m(`Expected value of type "${r}", found ${C(t)}; `+s.message,{nodes:t,originalError:s}))}}function Rr(e,t,n,i){var s;const r=Object.keys(i);if(r.length!==1){e.reportError(new m(`OneOf Input Object "${n.name}" must specify exactly one key.`,{nodes:[t]}));return}const a=(s=i[r[0]])===null||s===void 0?void 0:s.value;(!a||a.kind===c.NULL)&&e.reportError(new m(`Field "${n.name}.${r[0]}" must be non-null.`,{nodes:[t]}))}function kr(e){return{VariableDefinition(t){const n=K(e.getSchema(),t.type);if(n!==void 0&&!ce(n)){const i=t.variable.name.value,s=C(t.type);e.reportError(new m(`Variable "$${i}" cannot be non-input type "${s}".`,{nodes:t.type}))}}}}function Lr(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(n){const i=e.getRecursiveVariableUsages(n);for(const{node:s,type:r,defaultValue:o,parentType:a}of i){const u=s.name.value,l=t[u];if(l&&r){const f=e.getSchema(),p=K(f,l.type);if(p&&!xr(f,p,l.defaultValue,r,o)){const T=E(p),_=E(r);e.reportError(new m(`Variable "$${u}" of type "${T}" used in position expecting type "${_}".`,{nodes:[l,s]}))}M(a)&&a.isOneOf&&kn(p)&&e.reportError(new m(`Variable "$${u}" is of type "${p}" but must be non-nullable to be used for OneOf Input Object "${a}".`,{nodes:[l,s]}))}}}},VariableDefinition(n){t[n.variable.name.value]=n}}}function xr(e,t,n,i,s){if(A(i)&&!A(t)){if(!(n!=null&&n.kind!==c.NULL)&&!(s!==void 0))return!1;const a=i.ofType;return we(e,t,a)}return we(e,t,i)}const Fr=Object.freeze([Js]),Cr=Object.freeze([xs,br,Gs,vr,ri,Us,kr,dr,Fs,_r,Ps,zs,rr,qs,Ar,Xs,Hs,si,pi,Ms,fi,wr,fr,Lr,Zs,di,...Fr]),$r=Object.freeze([Ys,Sr,Dr,Ir,gr,yr,Nr,ri,si,pi,ar,ii,fi,di,li]);class hi{constructor(t,n){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=n}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let n;if(this._fragments)n=this._fragments;else{n=Object.create(null);for(const i of this.getDocument().definitions)i.kind===c.FRAGMENT_DEFINITION&&(n[i.name.value]=i);this._fragments=n}return n[t]}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];const i=[t];let s;for(;s=i.pop();)for(const r of s.selections)r.kind===c.FRAGMENT_SPREAD?n.push(r):r.selectionSet&&i.push(r.selectionSet);this._fragmentSpreads.set(t,n)}return n}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];const i=Object.create(null),s=[t.selectionSet];let r;for(;r=s.pop();)for(const o of this.getFragmentSpreads(r)){const a=o.name.value;if(i[a]!==!0){i[a]=!0;const u=this.getFragment(a);u&&(n.push(u),s.push(u.selectionSet))}}this._recursivelyReferencedFragments.set(t,n)}return n}}class Ur extends hi{constructor(t,n,i){super(t,i),this._schema=n}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class Mr extends hi{constructor(t,n,i,s){super(n,s),this._schema=t,this._typeInfo=i,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let n=this._variableUsages.get(t);if(!n){const i=[],s=new ti(this._schema);ot(t,ni(s,{VariableDefinition:()=>!1,Variable(r){i.push({node:r,type:s.getInputType(),defaultValue:s.getDefaultValue(),parentType:s.getParentInputType()})}})),n=i,this._variableUsages.set(t,n)}return n}getRecursiveVariableUsages(t){let n=this._recursiveVariableUsages.get(t);if(!n){n=this.getVariableUsages(t);for(const i of this.getRecursivelyReferencedFragments(t))n=n.concat(this.getVariableUsages(i));this._recursiveVariableUsages.set(t,n)}return n}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function co(e,t,n=Cr,i,s=new ti(e)){var r;const o=(r=void 0)!==null&&r!==void 0?r:100;t||D(!1,"Must provide document."),Es(e);const a=Object.freeze({}),u=[],l=new Mr(e,t,s,p=>{if(u.length>=o)throw u.push(new m("Too many validation errors, error limit reached. Validation aborted.")),a;u.push(p)}),f=Rn(n.map(p=>p(l)));try{ot(t,ni(s,f))}catch(p){if(p!==a)throw p}return u}function Vr(e,t,n=$r){const i=[],s=new Ur(e,t,o=>{i.push(o)}),r=n.map(o=>o(s));return ot(e,Rn(r)),i}function jr(e){const t=Vr(e);if(t.length!==0)throw new Error(t.map(n=>n.message).join(`
60
+
61
+ `))}function Pr(e){return e instanceof Error?e:new Br(e)}class Br extends Error{constructor(t){super("Unexpected error value: "+E(t)),this.name="NonErrorThrown",this.thrownValue=t}}function uo(e,t,n){var i;const s=Pr(e);return Gr(s)?s:new m(s.message,{nodes:(i=s.nodes)!==null&&i!==void 0?i:t,source:s.source,positions:s.positions,path:n,originalError:s})}function Gr(e){return Array.isArray(e.path)}function lo(e){return{Field(t){const n=e.getFieldDef(),i=n?.deprecationReason;if(n&&i!=null){const s=e.getParentType();s!=null||J(!1),e.reportError(new m(`The field ${s.name}.${n.name} is deprecated. ${i}`,{nodes:t}))}},Argument(t){const n=e.getArgument(),i=n?.deprecationReason;if(n&&i!=null){const s=e.getDirective();if(s!=null)e.reportError(new m(`Directive "@${s.name}" argument "${n.name}" is deprecated. ${i}`,{nodes:t}));else{const r=e.getParentType(),o=e.getFieldDef();r!=null&&o!=null||J(!1),e.reportError(new m(`Field "${r.name}.${o.name}" argument "${n.name}" is deprecated. ${i}`,{nodes:t}))}}},ObjectField(t){const n=H(e.getParentInputType());if(M(n)){const i=n.getFields()[t.name.value],s=i?.deprecationReason;s!=null&&e.reportError(new m(`The input field ${n.name}.${i.name} is deprecated. ${s}`,{nodes:t}))}},EnumValue(t){const n=e.getEnumValue(),i=n?.deprecationReason;if(n&&i!=null){const s=H(e.getInputType());s!=null||J(!1),e.reportError(new m(`The enum value "${s.name}.${n.name}" is deprecated. ${i}`,{nodes:t}))}}}}function Yr(e,t,n){var i,s,r,o;const a=[],u=Object.create(null),l=[];let f;const p=[];for(const d of t.definitions)if(d.kind===c.SCHEMA_DEFINITION)f=d;else if(d.kind===c.SCHEMA_EXTENSION)p.push(d);else if(Ge(d))a.push(d);else if(jt(d)){const N=d.name.value,v=u[N];u[N]=v?v.concat([d]):[d]}else d.kind===c.DIRECTIVE_DEFINITION&&l.push(d);if(Object.keys(u).length===0&&a.length===0&&l.length===0&&p.length===0&&f==null)return e;const T=Object.create(null);for(const d of e.types)T[d.name]=Ee(d);for(const d of a){var _;const N=d.name.value;T[N]=(_=vn[N])!==null&&_!==void 0?_:Ni(d)}const I={query:e.query&&F(e.query),mutation:e.mutation&&F(e.mutation),subscription:e.subscription&&F(e.subscription),...f&&Xt([f]),...Xt(p)};return{description:(i=f)===null||i===void 0||(s=i.description)===null||s===void 0?void 0:s.value,...I,types:Object.values(T),directives:[...e.directives.map(B),...l.map(yi)],extensions:Object.create(null),astNode:(r=f)!==null&&r!==void 0?r:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(p),assumeValid:(o=n?.assumeValid)!==null&&o!==void 0?o:!1};function w(d){return G(d)?new q(w(d.ofType)):A(d)?new S(w(d.ofType)):F(d)}function F(d){return T[d.name]}function B(d){const N=d.toConfig();return new Te({...N,args:ue(N.args,qt)})}function Ee(d){if(Mt(d)||Bn(d))return d;if(fe(d))return Le(d);if(k(d))return Ye(d);if(x(d))return Qe(d);if(Z(d))return vi(d);if(X(d))return z(d);if(M(d))return Y(d);J(!1,"Unexpected type: "+E(d))}function Y(d){var N;const v=d.toConfig(),g=(N=u[v.name])!==null&&N!==void 0?N:[];return new Ot({...v,fields:()=>({...ue(v.fields,R=>({...R,type:w(R.type)})),...Ht(g)}),extensionASTNodes:v.extensionASTNodes.concat(g)})}function z(d){var N;const v=d.toConfig(),g=(N=u[d.name])!==null&&N!==void 0?N:[];return new Ve({...v,values:{...v.values,...Wt(g)},extensionASTNodes:v.extensionASTNodes.concat(g)})}function Le(d){var N;const v=d.toConfig(),g=(N=u[v.name])!==null&&N!==void 0?N:[];let R=v.specifiedByURL;for(const L of g){var V;R=(V=yn(L))!==null&&V!==void 0?V:R}return new me({...v,specifiedByURL:R,extensionASTNodes:v.extensionASTNodes.concat(g)})}function Ye(d){var N;const v=d.toConfig(),g=(N=u[v.name])!==null&&N!==void 0?N:[];return new le({...v,interfaces:()=>[...d.getInterfaces().map(F),...Xe(g)],fields:()=>({...ue(v.fields,Jt),...qe(g)}),extensionASTNodes:v.extensionASTNodes.concat(g)})}function Qe(d){var N;const v=d.toConfig(),g=(N=u[v.name])!==null&&N!==void 0?N:[];return new It({...v,interfaces:()=>[...d.getInterfaces().map(F),...Xe(g)],fields:()=>({...ue(v.fields,Jt),...qe(g)}),extensionASTNodes:v.extensionASTNodes.concat(g)})}function vi(d){var N;const v=d.toConfig(),g=(N=u[v.name])!==null&&N!==void 0?N:[];return new gt({...v,types:()=>[...d.getTypes().map(F),...Zt(g)],extensionASTNodes:v.extensionASTNodes.concat(g)})}function Jt(d){return{...d,type:w(d.type),args:d.args&&ue(d.args,qt)}}function qt(d){return{...d,type:w(d.type)}}function Xt(d){const N={};for(const g of d){var v;const R=(v=g.operationTypes)!==null&&v!==void 0?v:[];for(const V of R)N[V.operation]=Je(V.type)}return N}function Je(d){var N;const v=d.name.value,g=(N=vn[v])!==null&&N!==void 0?N:T[v];if(g===void 0)throw new Error(`Unknown type: "${v}".`);return g}function xe(d){return d.kind===c.LIST_TYPE?new q(xe(d.type)):d.kind===c.NON_NULL_TYPE?new S(xe(d.type)):Je(d)}function yi(d){var N;return new Te({name:d.name.value,description:(N=d.description)===null||N===void 0?void 0:N.value,locations:d.locations.map(({value:v})=>v),isRepeatable:d.repeatable,args:zt(d.arguments),astNode:d})}function qe(d){const N=Object.create(null);for(const R of d){var v;const V=(v=R.fields)!==null&&v!==void 0?v:[];for(const L of V){var g;N[L.name.value]={type:xe(L.type),description:(g=L.description)===null||g===void 0?void 0:g.value,args:zt(L.arguments),deprecationReason:Ze(L),astNode:L}}}return N}function zt(d){const N=d??[],v=Object.create(null);for(const R of N){var g;const V=xe(R.type);v[R.name.value]={type:V,description:(g=R.description)===null||g===void 0?void 0:g.value,defaultValue:ye(R.defaultValue,V),deprecationReason:Ze(R),astNode:R}}return v}function Ht(d){const N=Object.create(null);for(const R of d){var v;const V=(v=R.fields)!==null&&v!==void 0?v:[];for(const L of V){var g;const Se=xe(L.type);N[L.name.value]={type:Se,description:(g=L.description)===null||g===void 0?void 0:g.value,defaultValue:ye(L.defaultValue,Se),deprecationReason:Ze(L),astNode:L}}}return N}function Wt(d){const N=Object.create(null);for(const R of d){var v;const V=(v=R.values)!==null&&v!==void 0?v:[];for(const L of V){var g;N[L.name.value]={description:(g=L.description)===null||g===void 0?void 0:g.value,deprecationReason:Ze(L),astNode:L}}}return N}function Xe(d){return d.flatMap(N=>{var v,g;return(v=(g=N.interfaces)===null||g===void 0?void 0:g.map(Je))!==null&&v!==void 0?v:[]})}function Zt(d){return d.flatMap(N=>{var v,g;return(v=(g=N.types)===null||g===void 0?void 0:g.map(Je))!==null&&v!==void 0?v:[]})}function Ni(d){var N;const v=d.name.value,g=(N=u[v])!==null&&N!==void 0?N:[];switch(d.kind){case c.OBJECT_TYPE_DEFINITION:{var R;const ne=[d,...g];return new le({name:v,description:(R=d.description)===null||R===void 0?void 0:R.value,interfaces:()=>Xe(ne),fields:()=>qe(ne),astNode:d,extensionASTNodes:g})}case c.INTERFACE_TYPE_DEFINITION:{var V;const ne=[d,...g];return new It({name:v,description:(V=d.description)===null||V===void 0?void 0:V.value,interfaces:()=>Xe(ne),fields:()=>qe(ne),astNode:d,extensionASTNodes:g})}case c.ENUM_TYPE_DEFINITION:{var L;const ne=[d,...g];return new Ve({name:v,description:(L=d.description)===null||L===void 0?void 0:L.value,values:Wt(ne),astNode:d,extensionASTNodes:g})}case c.UNION_TYPE_DEFINITION:{var Se;const ne=[d,...g];return new gt({name:v,description:(Se=d.description)===null||Se===void 0?void 0:Se.value,types:()=>Zt(ne),astNode:d,extensionASTNodes:g})}case c.SCALAR_TYPE_DEFINITION:{var ct;return new me({name:v,description:(ct=d.description)===null||ct===void 0?void 0:ct.value,specifiedByURL:yn(d),astNode:d,extensionASTNodes:g})}case c.INPUT_OBJECT_TYPE_DEFINITION:{var ut;const ne=[d,...g];return new Ot({name:v,description:(ut=d.description)===null||ut===void 0?void 0:ut.value,fields:()=>Ht(ne),astNode:d,extensionASTNodes:g,isOneOf:Qr(d)})}}}}const vn=ge([...Ft,...Ut],e=>e.name);function Ze(e){const t=je(Ct,e);return t?.reason}function yn(e){const t=je(qn,e);return t?.url}function Qr(e){return!!je(Xn,e)}function Jr(e,t){e!=null&&e.kind===c.DOCUMENT||D(!1,"Must provide valid Document AST."),t?.assumeValid!==!0&&t?.assumeValidSDL!==!0&&jr(e);const i=Yr({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(i.astNode==null)for(const r of i.types)switch(r.name){case"Query":i.query=r;break;case"Mutation":i.mutation=r;break;case"Subscription":i.subscription=r;break}const s=[...i.directives,...be.filter(r=>i.directives.every(o=>o.name!==r.name))];return new ei({...i,directives:s})}function fo(e,t){const n=zi(e,{noLocation:void 0,allowLegacyFragmentVariables:void 0});return Jr(n,{assumeValidSDL:void 0,assumeValid:void 0})}function po(e){return Xr(e,t=>!ps(t),qr)}function qr(e){return!Bn(e)&&!Mt(e)}function Xr(e,t,n){const i=e.getDirectives().filter(t),s=Object.values(e.getTypeMap()).filter(n);return[zr(e),...i.map(r=>so(r)),...s.map(r=>Wr(r))].filter(Boolean).join(`
62
+
63
+ `)}function zr(e){if(e.description==null&&Hr(e))return;const t=[],n=e.getQueryType();n&&t.push(` query: ${n.name}`);const i=e.getMutationType();i&&t.push(` mutation: ${i.name}`);const s=e.getSubscriptionType();return s&&t.push(` subscription: ${s.name}`),ee(e)+`schema {
64
+ ${t.join(`
65
+ `)}
66
+ }`}function Hr(e){const t=e.getQueryType();if(t&&t.name!=="Query")return!1;const n=e.getMutationType();if(n&&n.name!=="Mutation")return!1;const i=e.getSubscriptionType();return!(i&&i.name!=="Subscription")}function Wr(e){if(fe(e))return Zr(e);if(k(e))return Kr(e);if(x(e))return eo(e);if(Z(e))return to(e);if(X(e))return no(e);if(M(e))return io(e);J(!1,"Unexpected type: "+E(e))}function Zr(e){return ee(e)+`scalar ${e.name}`+ro(e)}function mi(e){const t=e.getInterfaces();return t.length?" implements "+t.map(n=>n.name).join(" & "):""}function Kr(e){return ee(e)+`type ${e.name}`+mi(e)+Ti(e)}function eo(e){return ee(e)+`interface ${e.name}`+mi(e)+Ti(e)}function to(e){const t=e.getTypes(),n=t.length?" = "+t.join(" | "):"";return ee(e)+"union "+e.name+n}function no(e){const t=e.getValues().map((n,i)=>ee(n," ",!i)+" "+n.name+Qt(n.deprecationReason));return ee(e)+`enum ${e.name}`+Yt(t)}function io(e){const t=Object.values(e.getFields()).map((n,i)=>ee(n," ",!i)+" "+At(n));return ee(e)+`input ${e.name}`+(e.isOneOf?" @oneOf":"")+Yt(t)}function Ti(e){const t=Object.values(e.getFields()).map((n,i)=>ee(n," ",!i)+" "+n.name+Ei(n.args," ")+": "+String(n.type)+Qt(n.deprecationReason));return Yt(t)}function Yt(e){return e.length!==0?` {
67
+ `+e.join(`
68
+ `)+`
69
+ }`:""}function Ei(e,t=""){return e.length===0?"":e.every(n=>!n.description)?"("+e.map(At).join(", ")+")":`(
70
+ `+e.map((n,i)=>ee(n," "+t,!i)+" "+t+At(n)).join(`
71
+ `)+`
72
+ `+t+")"}function At(e){const t=De(e.defaultValue,e.type);let n=e.name+": "+String(e.type);return t&&(n+=` = ${C(t)}`),n+Qt(e.deprecationReason)}function so(e){return ee(e)+"directive @"+e.name+Ei(e.args)+(e.isRepeatable?" repeatable":"")+" on "+e.locations.join(" | ")}function Qt(e){return e==null?"":e!==Jn?` @deprecated(reason: ${C({kind:c.STRING,value:e})})`:" @deprecated"}function ro(e){return e.specifiedByURL==null?"":` @specifiedBy(url: ${C({kind:c.STRING,value:e.specifiedByURL})})`}function ee(e,t="",n=!0){const{description:i}=e;if(i==null)return"";const s=C({kind:c.STRING,value:i,block:Ai(i)});return(t&&!n?`
73
+ `+t:t)+s.replace(/\n/g,`
74
+ `+t)+`
75
+ `}export{lo as $,Bn as A,G as B,A as C,as as D,Ln as E,Re as F,m as G,ei as H,po as I,Jr as J,c as K,co as L,ot as M,H as N,pe as O,Ce as P,ln as Q,he as R,cn as S,un as T,$e as U,ce as V,ao as W,on as X,O as Y,zs as Z,xs as _,zi as a,Ts as a0,uo as a1,fo as b,le as c,S as d,gt as e,q as f,me as g,Pn as h,k as i,W as j,$ as k,fs as l,ls as m,ps as n,Te as o,C as p,x as q,It as r,Cr as s,Z as t,M as u,oo as v,Ot as w,X as x,Ve as y,fe as z};