@burdenoff/microfe-eventfullymanaged 2026.1102.5 → 2026.1108.2

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 (487) hide show
  1. package/dist/dev/main.d.ts +0 -2
  2. package/dist/eventfullymanaged/EventfullyManagedRoot.d.ts +1 -3
  3. package/dist/eventfullymanaged/EventfullyManagedRoot.js +6 -6
  4. package/dist/eventfullymanaged/EventfullyManagedRoot.js.map +1 -1
  5. package/dist/eventfullymanaged/EventfullyManagedRoutes.d.ts +1 -2
  6. package/dist/eventfullymanaged/api/eventApi.d.ts +16 -2
  7. package/dist/eventfullymanaged/api/eventApi.js +107 -97
  8. package/dist/eventfullymanaged/api/eventApi.js.map +1 -1
  9. package/dist/eventfullymanaged/components/ActionMenu.d.ts +1 -3
  10. package/dist/eventfullymanaged/components/AttendanceForecast.d.ts +1 -3
  11. package/dist/eventfullymanaged/components/EntityFormShell.d.ts +1 -3
  12. package/dist/eventfullymanaged/components/EntityTagsField.d.ts +1 -2
  13. package/dist/eventfullymanaged/components/EventCharts.d.ts +4 -5
  14. package/dist/eventfullymanaged/components/EventDraftAssistant.d.ts +1 -3
  15. package/dist/eventfullymanaged/components/FloorPlanZoneEditor.d.ts +1 -3
  16. package/dist/eventfullymanaged/components/ImageUploadField.d.ts +1 -2
  17. package/dist/eventfullymanaged/components/PageLayout.d.ts +1 -3
  18. package/dist/eventfullymanaged/components/Pagination.d.ts +1 -2
  19. package/dist/eventfullymanaged/components/ResolvedImage.d.ts +1 -3
  20. package/dist/eventfullymanaged/components/SafeLink.d.ts +1 -3
  21. package/dist/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.d.ts +1 -3
  22. package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.d.ts +3 -5
  23. package/dist/eventfullymanaged/components/floorPlanEditor/useZoneEditorState.d.ts +0 -2
  24. package/dist/eventfullymanaged/components/index.d.ts +0 -1
  25. package/dist/eventfullymanaged/context/EventfullyManagedContext.d.ts +1 -3
  26. package/dist/eventfullymanaged/hooks/index.d.ts +0 -1
  27. package/dist/eventfullymanaged/hooks/useEventDelete.d.ts +0 -1
  28. package/dist/eventfullymanaged/hooks/useEvmSubscription.d.ts +0 -1
  29. package/dist/eventfullymanaged/hooks/useResolvedImageUrl.d.ts +0 -2
  30. package/dist/eventfullymanaged/hooks/useVirtualCall.d.ts +0 -1
  31. package/dist/eventfullymanaged/index.d.ts +0 -1
  32. package/dist/eventfullymanaged/lib/eventDraft.d.ts +0 -1
  33. package/dist/eventfullymanaged/lib/fileRef.d.ts +0 -1
  34. package/dist/eventfullymanaged/lib/floorPlanZones.d.ts +0 -1
  35. package/dist/eventfullymanaged/lib/format.d.ts +0 -1
  36. package/dist/eventfullymanaged/lib/mutationResult.d.ts +0 -2
  37. package/dist/eventfullymanaged/lib/offlineCheckInQueue.d.ts +0 -1
  38. package/dist/eventfullymanaged/lib/printBadge.d.ts +1 -0
  39. package/dist/eventfullymanaged/lib/printBadge.js +30 -0
  40. package/dist/eventfullymanaged/lib/printBadge.js.map +1 -0
  41. package/dist/eventfullymanaged/lib/toast.d.ts +0 -2
  42. package/dist/eventfullymanaged/lib/useBadgePrint.d.ts +11 -0
  43. package/dist/eventfullymanaged/lib/useBadgePrint.js +38 -0
  44. package/dist/eventfullymanaged/lib/useBadgePrint.js.map +1 -0
  45. package/dist/eventfullymanaged/lib/useOfflineCheckInSync.d.ts +0 -2
  46. package/dist/eventfullymanaged/pages/dashboard/DashboardPage.d.ts +1 -2
  47. package/dist/eventfullymanaged/pages/events/EventDetailPage.d.ts +1 -2
  48. package/dist/eventfullymanaged/pages/events/EventFormPage.d.ts +1 -2
  49. package/dist/eventfullymanaged/pages/events/SessionFormPage.d.ts +1 -2
  50. package/dist/eventfullymanaged/pages/events/TicketTypeFormPage.d.ts +1 -2
  51. package/dist/eventfullymanaged/pages/events/VirtualSessionPage.d.ts +1 -2
  52. package/dist/eventfullymanaged/pages/events/VirtualSessionPage.js +3 -3
  53. package/dist/eventfullymanaged/pages/events/VirtualSessionPage.js.map +1 -1
  54. package/dist/eventfullymanaged/pages/events/eventFormUtils.d.ts +0 -1
  55. package/dist/eventfullymanaged/pages/exhibitors/ExhibitorFormPage.d.ts +1 -2
  56. package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.d.ts +1 -2
  57. package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.d.ts +1 -2
  58. package/dist/eventfullymanaged/pages/modules/AnalyticsPage.d.ts +1 -2
  59. package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.d.ts +1 -2
  60. package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.d.ts +1 -2
  61. package/dist/eventfullymanaged/pages/modules/CommunicationPage.d.ts +1 -2
  62. package/dist/eventfullymanaged/pages/modules/EntityListSection.d.ts +1 -2
  63. package/dist/eventfullymanaged/pages/modules/EventsPage.d.ts +1 -2
  64. package/dist/eventfullymanaged/pages/modules/IntegrationsPage.d.ts +1 -2
  65. package/dist/eventfullymanaged/pages/modules/KioskPage.d.ts +1 -2
  66. package/dist/eventfullymanaged/pages/modules/KioskPage.js +321 -285
  67. package/dist/eventfullymanaged/pages/modules/KioskPage.js.map +1 -1
  68. package/dist/eventfullymanaged/pages/modules/NetworkingPage.d.ts +1 -2
  69. package/dist/eventfullymanaged/pages/modules/OperationsHubPage.d.ts +1 -2
  70. package/dist/eventfullymanaged/pages/modules/RegistrationPage.d.ts +1 -2
  71. package/dist/eventfullymanaged/pages/modules/RegistrationPage.js +1 -1
  72. package/dist/eventfullymanaged/pages/modules/RegistrationPage.js.map +1 -1
  73. package/dist/eventfullymanaged/pages/modules/RoadmapPanel.d.ts +1 -2
  74. package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.d.ts +1 -2
  75. package/dist/eventfullymanaged/pages/modules/SponsorLeadsPage.d.ts +1 -2
  76. package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.d.ts +1 -2
  77. package/dist/eventfullymanaged/pages/modules/WorkflowsPage.d.ts +1 -2
  78. package/dist/eventfullymanaged/pages/networking/MeetingFormPage.d.ts +1 -2
  79. package/dist/eventfullymanaged/pages/networking/NetworkingProfileFormPage.d.ts +1 -2
  80. package/dist/eventfullymanaged/pages/registration/AttendeeFormPage.d.ts +1 -2
  81. package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.d.ts +1 -2
  82. package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.d.ts +1 -2
  83. package/dist/eventfullymanaged/pages/speakers/SpeakerFormPage.d.ts +1 -2
  84. package/dist/eventfullymanaged/pages/speakers/SpeakersPage.d.ts +1 -2
  85. package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.d.ts +1 -2
  86. package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.d.ts +1 -2
  87. package/dist/eventfullymanaged/pages/venues/FloorPlansPage.d.ts +1 -2
  88. package/dist/eventfullymanaged/pages/venues/VenueDetailPage.d.ts +1 -2
  89. package/dist/eventfullymanaged/pages/venues/VenueFormPage.d.ts +1 -2
  90. package/dist/eventfullymanaged/pages/venues/VenueListPage.d.ts +1 -2
  91. package/dist/eventfullymanaged/store/eventfullyManagedStore.d.ts +0 -1
  92. package/dist/eventfullymanaged/types/index.d.ts +0 -2
  93. package/dist/eventfullymanaged/utils/cn.d.ts +0 -1
  94. package/dist/eventfullymanaged/utils/constants.d.ts +0 -1
  95. package/dist/eventfullymanaged/utils/navigation.d.ts +0 -1
  96. package/dist/eventfullymanaged/utils/shellBridge.d.ts +0 -1
  97. package/dist/generated/global-operations.d.ts +0 -1
  98. package/dist/generated/global-types.d.ts +0 -1
  99. package/dist/generated/wspace-operations.d.ts +0 -1
  100. package/dist/generated/wspace-types.d.ts +0 -1
  101. package/dist/index.d.ts +0 -1
  102. package/dist/node_modules/@apollo/client/version.js +1 -1
  103. package/dist/node_modules/@apollo/client/version.js.map +1 -1
  104. package/dist/node_modules/d3-array/dist/d3-array.js +204 -0
  105. package/dist/node_modules/d3-array/dist/d3-array.js.map +1 -0
  106. package/dist/node_modules/d3-color/dist/d3-color.js +388 -0
  107. package/dist/node_modules/d3-color/dist/d3-color.js.map +1 -0
  108. package/dist/node_modules/d3-format/dist/d3-format.js +186 -0
  109. package/dist/node_modules/d3-format/dist/d3-format.js.map +1 -0
  110. package/dist/node_modules/d3-interpolate/dist/d3-interpolate.js +185 -0
  111. package/dist/node_modules/d3-interpolate/dist/d3-interpolate.js.map +1 -0
  112. package/dist/node_modules/d3-path/{src/path.js → dist/d3-path.js} +33 -9
  113. package/dist/node_modules/d3-path/dist/d3-path.js.map +1 -0
  114. package/dist/node_modules/d3-scale/dist/d3-scale.js +622 -0
  115. package/dist/node_modules/d3-scale/dist/d3-scale.js.map +1 -0
  116. package/dist/node_modules/d3-shape/dist/d3-shape.js +901 -0
  117. package/dist/node_modules/d3-shape/dist/d3-shape.js.map +1 -0
  118. package/dist/node_modules/d3-time/dist/d3-time.js +241 -0
  119. package/dist/node_modules/d3-time/dist/d3-time.js.map +1 -0
  120. package/dist/node_modules/d3-time-format/{src/locale.js → dist/d3-time-format.js} +229 -173
  121. package/dist/node_modules/d3-time-format/dist/d3-time-format.js.map +1 -0
  122. package/dist/node_modules/fast-equals/dist/es/index.js +107 -76
  123. package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
  124. package/dist/node_modules/graphql/error/GraphQLError.js +5 -2
  125. package/dist/node_modules/graphql/error/GraphQLError.js.map +1 -1
  126. package/dist/node_modules/graphql/language/ast.js.map +1 -1
  127. package/dist/node_modules/graphql/language/lexer.js +14 -8
  128. package/dist/node_modules/graphql/language/lexer.js.map +1 -1
  129. package/dist/node_modules/graphql/language/location.js +30 -11
  130. package/dist/node_modules/graphql/language/location.js.map +1 -1
  131. package/dist/node_modules/graphql/language/parser.js +9 -7
  132. package/dist/node_modules/graphql/language/parser.js.map +1 -1
  133. package/dist/node_modules/graphql/language/printLocation.js.map +1 -1
  134. package/dist/node_modules/graphql/language/source.js.map +1 -1
  135. package/dist/node_modules/graphql-tag/lib/index.js +2 -1
  136. package/dist/node_modules/graphql-tag/lib/index.js.map +1 -1
  137. package/dist/node_modules/recharts/es6/cartesian/Brush.js +1 -1
  138. package/dist/node_modules/recharts/es6/cartesian/Brush.js.map +1 -1
  139. package/dist/node_modules/recharts/es6/shape/Curve.js +22 -32
  140. package/dist/node_modules/recharts/es6/shape/Curve.js.map +1 -1
  141. package/dist/node_modules/recharts/es6/shape/Symbols.js +1 -8
  142. package/dist/node_modules/recharts/es6/shape/Symbols.js.map +1 -1
  143. package/dist/node_modules/recharts/es6/util/ChartUtils.js +7 -13
  144. package/dist/node_modules/recharts/es6/util/ChartUtils.js.map +1 -1
  145. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +1 -1
  146. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +1 -1
  147. package/dist/node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js +1 -1
  148. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/Action.js +1 -1
  149. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsapAction.js +1 -1
  150. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsapScheduler.js +1 -1
  151. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncAction.js +1 -1
  152. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/AsyncScheduler.js +1 -1
  153. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/immediateProvider.js +1 -1
  154. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/intervalProvider.js +1 -1
  155. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +1 -1
  156. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js +51 -0
  157. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +1 -0
  158. package/dist/node_modules/tslib/tslib.es6.js +4 -51
  159. package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
  160. package/dist/node_modules/victory-vendor/es/d3-scale.js +27 -43
  161. package/dist/node_modules/victory-vendor/es/d3-scale.js.map +1 -1
  162. package/dist/services/createSandboxAssistantTransport.d.ts +0 -1
  163. package/dist/shared/hooks/index.d.ts +0 -1
  164. package/dist/shared/hooks/useTr.d.ts +0 -1
  165. package/dist/stories/ActionMenu.stories.d.ts +0 -2
  166. package/dist/stories/Pagination.stories.d.ts +0 -2
  167. package/dist/stories/SafeLink.stories.d.ts +0 -2
  168. package/dist/test/happydom.d.ts +1 -0
  169. package/dist/utils/pageContext.d.ts +0 -1
  170. package/dist/utils/pageContext.js +1 -1
  171. package/package.json +69 -58
  172. package/dist/dev/main.d.ts.map +0 -1
  173. package/dist/eventfullymanaged/EventfullyManagedRoot.d.ts.map +0 -1
  174. package/dist/eventfullymanaged/EventfullyManagedRoutes.d.ts.map +0 -1
  175. package/dist/eventfullymanaged/api/eventApi.d.ts.map +0 -1
  176. package/dist/eventfullymanaged/components/ActionMenu.d.ts.map +0 -1
  177. package/dist/eventfullymanaged/components/AttendanceForecast.d.ts.map +0 -1
  178. package/dist/eventfullymanaged/components/EntityFormShell.d.ts.map +0 -1
  179. package/dist/eventfullymanaged/components/EntityTagsField.d.ts.map +0 -1
  180. package/dist/eventfullymanaged/components/EventCharts.d.ts.map +0 -1
  181. package/dist/eventfullymanaged/components/EventDraftAssistant.d.ts.map +0 -1
  182. package/dist/eventfullymanaged/components/FloorPlanZoneEditor.d.ts.map +0 -1
  183. package/dist/eventfullymanaged/components/ImageUploadField.d.ts.map +0 -1
  184. package/dist/eventfullymanaged/components/PageLayout.d.ts.map +0 -1
  185. package/dist/eventfullymanaged/components/Pagination.d.ts.map +0 -1
  186. package/dist/eventfullymanaged/components/ResolvedImage.d.ts.map +0 -1
  187. package/dist/eventfullymanaged/components/SafeLink.d.ts.map +0 -1
  188. package/dist/eventfullymanaged/components/floorPlanEditor/ZoneCanvas.d.ts.map +0 -1
  189. package/dist/eventfullymanaged/components/floorPlanEditor/ZonePanels.d.ts.map +0 -1
  190. package/dist/eventfullymanaged/components/floorPlanEditor/useZoneEditorState.d.ts.map +0 -1
  191. package/dist/eventfullymanaged/components/index.d.ts.map +0 -1
  192. package/dist/eventfullymanaged/context/EventfullyManagedContext.d.ts.map +0 -1
  193. package/dist/eventfullymanaged/hooks/index.d.ts.map +0 -1
  194. package/dist/eventfullymanaged/hooks/useEventDelete.d.ts.map +0 -1
  195. package/dist/eventfullymanaged/hooks/useEvmSubscription.d.ts.map +0 -1
  196. package/dist/eventfullymanaged/hooks/useResolvedImageUrl.d.ts.map +0 -1
  197. package/dist/eventfullymanaged/hooks/useVirtualCall.d.ts.map +0 -1
  198. package/dist/eventfullymanaged/index.d.ts.map +0 -1
  199. package/dist/eventfullymanaged/lib/eventDraft.d.ts.map +0 -1
  200. package/dist/eventfullymanaged/lib/fileRef.d.ts.map +0 -1
  201. package/dist/eventfullymanaged/lib/floorPlanZones.d.ts.map +0 -1
  202. package/dist/eventfullymanaged/lib/format.d.ts.map +0 -1
  203. package/dist/eventfullymanaged/lib/mutationResult.d.ts.map +0 -1
  204. package/dist/eventfullymanaged/lib/offlineCheckInQueue.d.ts.map +0 -1
  205. package/dist/eventfullymanaged/lib/toast.d.ts.map +0 -1
  206. package/dist/eventfullymanaged/lib/useOfflineCheckInSync.d.ts.map +0 -1
  207. package/dist/eventfullymanaged/pages/dashboard/DashboardPage.d.ts.map +0 -1
  208. package/dist/eventfullymanaged/pages/events/EventDetailPage.d.ts.map +0 -1
  209. package/dist/eventfullymanaged/pages/events/EventFormPage.d.ts.map +0 -1
  210. package/dist/eventfullymanaged/pages/events/SessionFormPage.d.ts.map +0 -1
  211. package/dist/eventfullymanaged/pages/events/TicketTypeFormPage.d.ts.map +0 -1
  212. package/dist/eventfullymanaged/pages/events/VirtualSessionPage.d.ts.map +0 -1
  213. package/dist/eventfullymanaged/pages/events/eventFormUtils.d.ts.map +0 -1
  214. package/dist/eventfullymanaged/pages/exhibitors/ExhibitorFormPage.d.ts.map +0 -1
  215. package/dist/eventfullymanaged/pages/exhibitors/ExhibitorsPage.d.ts.map +0 -1
  216. package/dist/eventfullymanaged/pages/leads/LeadCaptureDialog.d.ts.map +0 -1
  217. package/dist/eventfullymanaged/pages/modules/AnalyticsPage.d.ts.map +0 -1
  218. package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.d.ts.map +0 -1
  219. package/dist/eventfullymanaged/pages/modules/AttendeeRecommendations.d.ts.map +0 -1
  220. package/dist/eventfullymanaged/pages/modules/CommunicationPage.d.ts.map +0 -1
  221. package/dist/eventfullymanaged/pages/modules/EntityListSection.d.ts.map +0 -1
  222. package/dist/eventfullymanaged/pages/modules/EventsPage.d.ts.map +0 -1
  223. package/dist/eventfullymanaged/pages/modules/IntegrationsPage.d.ts.map +0 -1
  224. package/dist/eventfullymanaged/pages/modules/KioskPage.d.ts.map +0 -1
  225. package/dist/eventfullymanaged/pages/modules/NetworkingPage.d.ts.map +0 -1
  226. package/dist/eventfullymanaged/pages/modules/OperationsHubPage.d.ts.map +0 -1
  227. package/dist/eventfullymanaged/pages/modules/RegistrationPage.d.ts.map +0 -1
  228. package/dist/eventfullymanaged/pages/modules/RoadmapPanel.d.ts.map +0 -1
  229. package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.d.ts.map +0 -1
  230. package/dist/eventfullymanaged/pages/modules/SponsorLeadsPage.d.ts.map +0 -1
  231. package/dist/eventfullymanaged/pages/modules/VenueResourcesPage.d.ts.map +0 -1
  232. package/dist/eventfullymanaged/pages/modules/WorkflowsPage.d.ts.map +0 -1
  233. package/dist/eventfullymanaged/pages/networking/MeetingFormPage.d.ts.map +0 -1
  234. package/dist/eventfullymanaged/pages/networking/NetworkingProfileFormPage.d.ts.map +0 -1
  235. package/dist/eventfullymanaged/pages/registration/AttendeeFormPage.d.ts.map +0 -1
  236. package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.d.ts.map +0 -1
  237. package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.d.ts.map +0 -1
  238. package/dist/eventfullymanaged/pages/speakers/SpeakerFormPage.d.ts.map +0 -1
  239. package/dist/eventfullymanaged/pages/speakers/SpeakersPage.d.ts.map +0 -1
  240. package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.d.ts.map +0 -1
  241. package/dist/eventfullymanaged/pages/sponsors/SponsorsListPage.d.ts.map +0 -1
  242. package/dist/eventfullymanaged/pages/venues/FloorPlansPage.d.ts.map +0 -1
  243. package/dist/eventfullymanaged/pages/venues/VenueDetailPage.d.ts.map +0 -1
  244. package/dist/eventfullymanaged/pages/venues/VenueFormPage.d.ts.map +0 -1
  245. package/dist/eventfullymanaged/pages/venues/VenueListPage.d.ts.map +0 -1
  246. package/dist/eventfullymanaged/store/eventfullyManagedStore.d.ts.map +0 -1
  247. package/dist/eventfullymanaged/types/index.d.ts.map +0 -1
  248. package/dist/eventfullymanaged/utils/cn.d.ts.map +0 -1
  249. package/dist/eventfullymanaged/utils/constants.d.ts.map +0 -1
  250. package/dist/eventfullymanaged/utils/navigation.d.ts.map +0 -1
  251. package/dist/eventfullymanaged/utils/shellBridge.d.ts.map +0 -1
  252. package/dist/generated/global-operations.d.ts.map +0 -1
  253. package/dist/generated/global-types.d.ts.map +0 -1
  254. package/dist/generated/wspace-operations.d.ts.map +0 -1
  255. package/dist/generated/wspace-types.d.ts.map +0 -1
  256. package/dist/index.d.ts.map +0 -1
  257. package/dist/node_modules/d3-array/src/ascending.js +0 -7
  258. package/dist/node_modules/d3-array/src/ascending.js.map +0 -1
  259. package/dist/node_modules/d3-array/src/bisect.js +0 -9
  260. package/dist/node_modules/d3-array/src/bisect.js.map +0 -1
  261. package/dist/node_modules/d3-array/src/bisector.js +0 -42
  262. package/dist/node_modules/d3-array/src/bisector.js.map +0 -1
  263. package/dist/node_modules/d3-array/src/descending.js +0 -7
  264. package/dist/node_modules/d3-array/src/descending.js.map +0 -1
  265. package/dist/node_modules/d3-array/src/max.js +0 -13
  266. package/dist/node_modules/d3-array/src/max.js.map +0 -1
  267. package/dist/node_modules/d3-array/src/min.js +0 -13
  268. package/dist/node_modules/d3-array/src/min.js.map +0 -1
  269. package/dist/node_modules/d3-array/src/number.js +0 -14
  270. package/dist/node_modules/d3-array/src/number.js.map +0 -1
  271. package/dist/node_modules/d3-array/src/quantile.js +0 -24
  272. package/dist/node_modules/d3-array/src/quantile.js.map +0 -1
  273. package/dist/node_modules/d3-array/src/quickselect.js +0 -25
  274. package/dist/node_modules/d3-array/src/quickselect.js.map +0 -1
  275. package/dist/node_modules/d3-array/src/range.js +0 -9
  276. package/dist/node_modules/d3-array/src/range.js.map +0 -1
  277. package/dist/node_modules/d3-array/src/sort.js +0 -16
  278. package/dist/node_modules/d3-array/src/sort.js.map +0 -1
  279. package/dist/node_modules/d3-array/src/ticks.js +0 -34
  280. package/dist/node_modules/d3-array/src/ticks.js.map +0 -1
  281. package/dist/node_modules/d3-color/src/color.js +0 -290
  282. package/dist/node_modules/d3-color/src/color.js.map +0 -1
  283. package/dist/node_modules/d3-color/src/define.js +0 -12
  284. package/dist/node_modules/d3-color/src/define.js.map +0 -1
  285. package/dist/node_modules/d3-format/src/defaultLocale.js +0 -14
  286. package/dist/node_modules/d3-format/src/defaultLocale.js.map +0 -1
  287. package/dist/node_modules/d3-format/src/exponent.js +0 -8
  288. package/dist/node_modules/d3-format/src/exponent.js.map +0 -1
  289. package/dist/node_modules/d3-format/src/formatDecimal.js +0 -12
  290. package/dist/node_modules/d3-format/src/formatDecimal.js.map +0 -1
  291. package/dist/node_modules/d3-format/src/formatGroup.js +0 -10
  292. package/dist/node_modules/d3-format/src/formatGroup.js.map +0 -1
  293. package/dist/node_modules/d3-format/src/formatNumerals.js +0 -11
  294. package/dist/node_modules/d3-format/src/formatNumerals.js.map +0 -1
  295. package/dist/node_modules/d3-format/src/formatPrefixAuto.js +0 -12
  296. package/dist/node_modules/d3-format/src/formatPrefixAuto.js.map +0 -1
  297. package/dist/node_modules/d3-format/src/formatRounded.js +0 -11
  298. package/dist/node_modules/d3-format/src/formatRounded.js.map +0 -1
  299. package/dist/node_modules/d3-format/src/formatSpecifier.js +0 -28
  300. package/dist/node_modules/d3-format/src/formatSpecifier.js.map +0 -1
  301. package/dist/node_modules/d3-format/src/formatTrim.js +0 -18
  302. package/dist/node_modules/d3-format/src/formatTrim.js.map +0 -1
  303. package/dist/node_modules/d3-format/src/formatTypes.js +0 -22
  304. package/dist/node_modules/d3-format/src/formatTypes.js.map +0 -1
  305. package/dist/node_modules/d3-format/src/identity.js +0 -7
  306. package/dist/node_modules/d3-format/src/identity.js.map +0 -1
  307. package/dist/node_modules/d3-format/src/locale.js +0 -83
  308. package/dist/node_modules/d3-format/src/locale.js.map +0 -1
  309. package/dist/node_modules/d3-format/src/precisionFixed.js +0 -8
  310. package/dist/node_modules/d3-format/src/precisionFixed.js.map +0 -1
  311. package/dist/node_modules/d3-format/src/precisionPrefix.js +0 -8
  312. package/dist/node_modules/d3-format/src/precisionPrefix.js.map +0 -1
  313. package/dist/node_modules/d3-format/src/precisionRound.js +0 -8
  314. package/dist/node_modules/d3-format/src/precisionRound.js.map +0 -1
  315. package/dist/node_modules/d3-interpolate/src/array.js +0 -13
  316. package/dist/node_modules/d3-interpolate/src/array.js.map +0 -1
  317. package/dist/node_modules/d3-interpolate/src/basis.js +0 -15
  318. package/dist/node_modules/d3-interpolate/src/basis.js.map +0 -1
  319. package/dist/node_modules/d3-interpolate/src/basisClosed.js +0 -12
  320. package/dist/node_modules/d3-interpolate/src/basisClosed.js.map +0 -1
  321. package/dist/node_modules/d3-interpolate/src/color.js +0 -24
  322. package/dist/node_modules/d3-interpolate/src/color.js.map +0 -1
  323. package/dist/node_modules/d3-interpolate/src/constant.js +0 -5
  324. package/dist/node_modules/d3-interpolate/src/constant.js.map +0 -1
  325. package/dist/node_modules/d3-interpolate/src/date.js +0 -10
  326. package/dist/node_modules/d3-interpolate/src/date.js.map +0 -1
  327. package/dist/node_modules/d3-interpolate/src/number.js +0 -9
  328. package/dist/node_modules/d3-interpolate/src/number.js.map +0 -1
  329. package/dist/node_modules/d3-interpolate/src/numberArray.js +0 -15
  330. package/dist/node_modules/d3-interpolate/src/numberArray.js.map +0 -1
  331. package/dist/node_modules/d3-interpolate/src/object.js +0 -13
  332. package/dist/node_modules/d3-interpolate/src/object.js.map +0 -1
  333. package/dist/node_modules/d3-interpolate/src/piecewise.js +0 -13
  334. package/dist/node_modules/d3-interpolate/src/piecewise.js.map +0 -1
  335. package/dist/node_modules/d3-interpolate/src/rgb.js +0 -18
  336. package/dist/node_modules/d3-interpolate/src/rgb.js.map +0 -1
  337. package/dist/node_modules/d3-interpolate/src/round.js +0 -9
  338. package/dist/node_modules/d3-interpolate/src/round.js.map +0 -1
  339. package/dist/node_modules/d3-interpolate/src/string.js +0 -27
  340. package/dist/node_modules/d3-interpolate/src/string.js.map +0 -1
  341. package/dist/node_modules/d3-interpolate/src/value.js +0 -17
  342. package/dist/node_modules/d3-interpolate/src/value.js.map +0 -1
  343. package/dist/node_modules/d3-path/src/path.js.map +0 -1
  344. package/dist/node_modules/d3-scale/src/band.js +0 -51
  345. package/dist/node_modules/d3-scale/src/band.js.map +0 -1
  346. package/dist/node_modules/d3-scale/src/constant.js +0 -9
  347. package/dist/node_modules/d3-scale/src/constant.js.map +0 -1
  348. package/dist/node_modules/d3-scale/src/continuous.js +0 -72
  349. package/dist/node_modules/d3-scale/src/continuous.js.map +0 -1
  350. package/dist/node_modules/d3-scale/src/diverging.js +0 -81
  351. package/dist/node_modules/d3-scale/src/diverging.js.map +0 -1
  352. package/dist/node_modules/d3-scale/src/identity.js +0 -19
  353. package/dist/node_modules/d3-scale/src/identity.js.map +0 -1
  354. package/dist/node_modules/d3-scale/src/init.js +0 -24
  355. package/dist/node_modules/d3-scale/src/init.js.map +0 -1
  356. package/dist/node_modules/d3-scale/src/linear.js +0 -35
  357. package/dist/node_modules/d3-scale/src/linear.js.map +0 -1
  358. package/dist/node_modules/d3-scale/src/log.js +0 -76
  359. package/dist/node_modules/d3-scale/src/log.js.map +0 -1
  360. package/dist/node_modules/d3-scale/src/nice.js +0 -9
  361. package/dist/node_modules/d3-scale/src/nice.js.map +0 -1
  362. package/dist/node_modules/d3-scale/src/number.js +0 -7
  363. package/dist/node_modules/d3-scale/src/number.js.map +0 -1
  364. package/dist/node_modules/d3-scale/src/ordinal.js +0 -30
  365. package/dist/node_modules/d3-scale/src/ordinal.js.map +0 -1
  366. package/dist/node_modules/d3-scale/src/pow.js +0 -36
  367. package/dist/node_modules/d3-scale/src/pow.js.map +0 -1
  368. package/dist/node_modules/d3-scale/src/quantile.js +0 -36
  369. package/dist/node_modules/d3-scale/src/quantile.js.map +0 -1
  370. package/dist/node_modules/d3-scale/src/quantize.js +0 -32
  371. package/dist/node_modules/d3-scale/src/quantize.js.map +0 -1
  372. package/dist/node_modules/d3-scale/src/radial.js +0 -38
  373. package/dist/node_modules/d3-scale/src/radial.js.map +0 -1
  374. package/dist/node_modules/d3-scale/src/sequential.js +0 -66
  375. package/dist/node_modules/d3-scale/src/sequential.js.map +0 -1
  376. package/dist/node_modules/d3-scale/src/sequentialQuantile.js +0 -29
  377. package/dist/node_modules/d3-scale/src/sequentialQuantile.js.map +0 -1
  378. package/dist/node_modules/d3-scale/src/symlog.js +0 -29
  379. package/dist/node_modules/d3-scale/src/symlog.js.map +0 -1
  380. package/dist/node_modules/d3-scale/src/threshold.js +0 -24
  381. package/dist/node_modules/d3-scale/src/threshold.js.map +0 -1
  382. package/dist/node_modules/d3-scale/src/tickFormat.js +0 -28
  383. package/dist/node_modules/d3-scale/src/tickFormat.js.map +0 -1
  384. package/dist/node_modules/d3-scale/src/time.js +0 -46
  385. package/dist/node_modules/d3-scale/src/time.js.map +0 -1
  386. package/dist/node_modules/d3-scale/src/utcTime.js +0 -18
  387. package/dist/node_modules/d3-scale/src/utcTime.js.map +0 -1
  388. package/dist/node_modules/d3-shape/src/area.js +0 -56
  389. package/dist/node_modules/d3-shape/src/area.js.map +0 -1
  390. package/dist/node_modules/d3-shape/src/array.js +0 -7
  391. package/dist/node_modules/d3-shape/src/array.js.map +0 -1
  392. package/dist/node_modules/d3-shape/src/constant.js +0 -9
  393. package/dist/node_modules/d3-shape/src/constant.js.map +0 -1
  394. package/dist/node_modules/d3-shape/src/curve/basis.js +0 -44
  395. package/dist/node_modules/d3-shape/src/curve/basis.js.map +0 -1
  396. package/dist/node_modules/d3-shape/src/curve/basisClosed.js +0 -45
  397. package/dist/node_modules/d3-shape/src/curve/basisClosed.js.map +0 -1
  398. package/dist/node_modules/d3-shape/src/curve/basisOpen.js +0 -43
  399. package/dist/node_modules/d3-shape/src/curve/basisOpen.js.map +0 -1
  400. package/dist/node_modules/d3-shape/src/curve/bump.js +0 -37
  401. package/dist/node_modules/d3-shape/src/curve/bump.js.map +0 -1
  402. package/dist/node_modules/d3-shape/src/curve/linear.js +0 -33
  403. package/dist/node_modules/d3-shape/src/curve/linear.js.map +0 -1
  404. package/dist/node_modules/d3-shape/src/curve/linearClosed.js +0 -24
  405. package/dist/node_modules/d3-shape/src/curve/linearClosed.js.map +0 -1
  406. package/dist/node_modules/d3-shape/src/curve/monotone.js +0 -89
  407. package/dist/node_modules/d3-shape/src/curve/monotone.js.map +0 -1
  408. package/dist/node_modules/d3-shape/src/curve/natural.js +0 -40
  409. package/dist/node_modules/d3-shape/src/curve/natural.js.map +0 -1
  410. package/dist/node_modules/d3-shape/src/curve/step.js +0 -44
  411. package/dist/node_modules/d3-shape/src/curve/step.js.map +0 -1
  412. package/dist/node_modules/d3-shape/src/line.js +0 -29
  413. package/dist/node_modules/d3-shape/src/line.js.map +0 -1
  414. package/dist/node_modules/d3-shape/src/math.js +0 -7
  415. package/dist/node_modules/d3-shape/src/math.js.map +0 -1
  416. package/dist/node_modules/d3-shape/src/noop.js +0 -5
  417. package/dist/node_modules/d3-shape/src/noop.js.map +0 -1
  418. package/dist/node_modules/d3-shape/src/offset/expand.js +0 -14
  419. package/dist/node_modules/d3-shape/src/offset/expand.js.map +0 -1
  420. package/dist/node_modules/d3-shape/src/offset/none.js +0 -7
  421. package/dist/node_modules/d3-shape/src/offset/none.js.map +0 -1
  422. package/dist/node_modules/d3-shape/src/offset/silhouette.js +0 -14
  423. package/dist/node_modules/d3-shape/src/offset/silhouette.js.map +0 -1
  424. package/dist/node_modules/d3-shape/src/offset/wiggle.js +0 -20
  425. package/dist/node_modules/d3-shape/src/offset/wiggle.js.map +0 -1
  426. package/dist/node_modules/d3-shape/src/order/none.js +0 -8
  427. package/dist/node_modules/d3-shape/src/order/none.js.map +0 -1
  428. package/dist/node_modules/d3-shape/src/path.js +0 -18
  429. package/dist/node_modules/d3-shape/src/path.js.map +0 -1
  430. package/dist/node_modules/d3-shape/src/point.js +0 -10
  431. package/dist/node_modules/d3-shape/src/point.js.map +0 -1
  432. package/dist/node_modules/d3-shape/src/stack.js +0 -33
  433. package/dist/node_modules/d3-shape/src/stack.js.map +0 -1
  434. package/dist/node_modules/d3-shape/src/symbol/circle.js +0 -9
  435. package/dist/node_modules/d3-shape/src/symbol/circle.js.map +0 -1
  436. package/dist/node_modules/d3-shape/src/symbol/cross.js +0 -9
  437. package/dist/node_modules/d3-shape/src/symbol/cross.js.map +0 -1
  438. package/dist/node_modules/d3-shape/src/symbol/diamond.js +0 -9
  439. package/dist/node_modules/d3-shape/src/symbol/diamond.js.map +0 -1
  440. package/dist/node_modules/d3-shape/src/symbol/square.js +0 -9
  441. package/dist/node_modules/d3-shape/src/symbol/square.js.map +0 -1
  442. package/dist/node_modules/d3-shape/src/symbol/star.js +0 -14
  443. package/dist/node_modules/d3-shape/src/symbol/star.js.map +0 -1
  444. package/dist/node_modules/d3-shape/src/symbol/triangle.js +0 -9
  445. package/dist/node_modules/d3-shape/src/symbol/triangle.js.map +0 -1
  446. package/dist/node_modules/d3-shape/src/symbol/wye.js +0 -9
  447. package/dist/node_modules/d3-shape/src/symbol/wye.js.map +0 -1
  448. package/dist/node_modules/d3-shape/src/symbol.js +0 -22
  449. package/dist/node_modules/d3-shape/src/symbol.js.map +0 -1
  450. package/dist/node_modules/d3-time/src/day.js +0 -20
  451. package/dist/node_modules/d3-time/src/day.js.map +0 -1
  452. package/dist/node_modules/d3-time/src/duration.js +0 -5
  453. package/dist/node_modules/d3-time/src/duration.js.map +0 -1
  454. package/dist/node_modules/d3-time/src/hour.js +0 -18
  455. package/dist/node_modules/d3-time/src/hour.js.map +0 -1
  456. package/dist/node_modules/d3-time/src/interval.js +0 -29
  457. package/dist/node_modules/d3-time/src/interval.js.map +0 -1
  458. package/dist/node_modules/d3-time/src/millisecond.js +0 -13
  459. package/dist/node_modules/d3-time/src/millisecond.js.map +0 -1
  460. package/dist/node_modules/d3-time/src/minute.js +0 -18
  461. package/dist/node_modules/d3-time/src/minute.js.map +0 -1
  462. package/dist/node_modules/d3-time/src/month.js +0 -17
  463. package/dist/node_modules/d3-time/src/month.js.map +0 -1
  464. package/dist/node_modules/d3-time/src/second.js +0 -12
  465. package/dist/node_modules/d3-time/src/second.js.map +0 -1
  466. package/dist/node_modules/d3-time/src/ticks.js +0 -124
  467. package/dist/node_modules/d3-time/src/ticks.js.map +0 -1
  468. package/dist/node_modules/d3-time/src/week.js +0 -24
  469. package/dist/node_modules/d3-time/src/week.js.map +0 -1
  470. package/dist/node_modules/d3-time/src/year.js +0 -25
  471. package/dist/node_modules/d3-time/src/year.js.map +0 -1
  472. package/dist/node_modules/d3-time-format/src/defaultLocale.js +0 -61
  473. package/dist/node_modules/d3-time-format/src/defaultLocale.js.map +0 -1
  474. package/dist/node_modules/d3-time-format/src/locale.js.map +0 -1
  475. package/dist/node_modules/graphql/jsutils/invariant.js +0 -7
  476. package/dist/node_modules/graphql/jsutils/invariant.js.map +0 -1
  477. package/dist/node_modules/internmap/src/index.js +0 -39
  478. package/dist/node_modules/internmap/src/index.js.map +0 -1
  479. package/dist/services/createSandboxAssistantTransport.d.ts.map +0 -1
  480. package/dist/shared/hooks/index.d.ts.map +0 -1
  481. package/dist/shared/hooks/useTr.d.ts.map +0 -1
  482. package/dist/stories/ActionMenu.stories.d.ts.map +0 -1
  483. package/dist/stories/Pagination.stories.d.ts.map +0 -1
  484. package/dist/stories/SafeLink.stories.d.ts.map +0 -1
  485. package/dist/test/setup.d.ts +0 -11
  486. package/dist/test/setup.d.ts.map +0 -1
  487. package/dist/utils/pageContext.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"GraphQLError.js","names":["toNormalizedOptions","firstArg","args","GraphQLError","rawArgs","message","path","originalError","undefinedIfEmpty","nodes","nodeLocations","node","loc","source","positions","getLocation","pos","originalExtensions","isObjectLike","extensions","output","printLocation","location","printSourceLocation","formattedError","array"],"sources":["../../../../node_modules/graphql/error/GraphQLError.mjs"],"sourcesContent":["/** @category Errors */\nimport { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { getLocation } from '../language/location.mjs';\nimport {\n printLocation,\n printSourceLocation,\n} from '../language/printLocation.mjs';\n\nfunction toNormalizedOptions(args) {\n const firstArg = args[0];\n\n if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {\n return {\n nodes: firstArg,\n source: args[1],\n positions: args[2],\n path: args[3],\n originalError: args[4],\n extensions: args[5],\n };\n }\n\n return firstArg;\n}\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nexport class GraphQLError extends Error {\n /**\n * An array of `{ line, column }` locations within the source GraphQL document\n * which correspond to this error.\n *\n * Errors during validation often contain multiple locations, for example to\n * point out two things with the same name. Errors during execution include a\n * single location, the field which produced the error.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array describing the JSON-path into the execution response which\n * corresponds to this error. Only included for errors during execution.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /** An array of GraphQL AST Nodes corresponding to this error. */\n\n /**\n * The source GraphQL document for the first location of this error.\n *\n * Note that if this Error represents more than one node, the source may not\n * represent nodes after the first node.\n */\n\n /**\n * An array of character offsets within the source GraphQL document\n * which correspond to this error.\n */\n\n /** Original error that caused this GraphQLError, if one exists. */\n\n /** Extension fields to add to the formatted error. */\n\n /**\n * Creates a GraphQLError instance.\n * @param message - Human-readable error message.\n * @param options - Error metadata such as source locations, response path, original error, and extensions.\n * This positional-arguments constructor overload is deprecated. Use the\n * `GraphQLError(message, options)` overload instead.\n * @example\n * ```ts\n * // Create an error from AST nodes and response metadata.\n * import { parse } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const document = parse('{ greeting }');\n * const fieldNode = document.definitions[0].selectionSet.selections[0];\n * const error = new GraphQLError('Cannot query this field.', {\n * nodes: fieldNode,\n * path: ['greeting'],\n * extensions: { code: 'FORBIDDEN' },\n * });\n *\n * error.message; // => 'Cannot query this field.'\n * error.locations; // => [{ line: 1, column: 3 }]\n * error.path; // => ['greeting']\n * error.extensions; // => { code: 'FORBIDDEN' }\n * ```\n * @example\n * ```ts\n * // This variant derives locations from source positions and preserves the original error.\n * import { Source } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const source = new Source('{ greeting }');\n * const originalError = new Error('Database unavailable.');\n * const error = new GraphQLError('Resolver failed.', {\n * source,\n * positions: [2],\n * path: ['greeting'],\n * originalError,\n * });\n *\n * error.locations; // => [{ line: 1, column: 3 }]\n * error.path; // => ['greeting']\n * error.originalError; // => originalError\n * ```\n */\n\n /**\n * Creates a GraphQLError instance using the legacy positional constructor.\n * This deprecated overload will be removed in v17. Prefer the\n * `GraphQLErrorOptions` object overload, which keeps optional error metadata\n * in a single options bag.\n * @param message - Human-readable error message.\n * @param nodes - AST node or nodes associated with this error.\n * @param source - Source document used to derive error locations.\n * @param positions - Character offsets in the source document associated with\n * this error.\n * @param path - Response path where this error occurred during execution.\n * @param originalError - Original error that caused this GraphQLError, if one\n * exists.\n * @param extensions - Extension fields to include in the formatted error.\n * @example\n * ```ts\n * import { Source } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const source = new Source('{ greeting }');\n * const originalError = new Error('Database unavailable.');\n * const error = new GraphQLError(\n * 'Resolver failed.',\n * undefined,\n * source,\n * [2],\n * ['greeting'],\n * originalError,\n * { code: 'INTERNAL' },\n * );\n *\n * error.locations; // => [{ line: 1, column: 3 }]\n * error.path; // => ['greeting']\n * error.originalError; // => originalError\n * error.extensions; // => { code: 'INTERNAL' }\n * ```\n * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.\n */\n constructor(message, ...rawArgs) {\n var _this$nodes, _nodeLocations$, _ref;\n\n const { nodes, source, positions, path, originalError, extensions } =\n toNormalizedOptions(rawArgs);\n super(message);\n this.name = 'GraphQLError';\n this.path = path !== null && path !== void 0 ? path : undefined;\n this.originalError =\n originalError !== null && originalError !== void 0\n ? originalError\n : undefined; // Compute list of blame nodes.\n\n this.nodes = undefinedIfEmpty(\n Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined,\n );\n const nodeLocations = undefinedIfEmpty(\n (_this$nodes = this.nodes) === null || _this$nodes === void 0\n ? void 0\n : _this$nodes.map((node) => node.loc).filter((loc) => loc != null),\n ); // Compute locations in the source for the given nodes/positions.\n\n this.source =\n source !== null && source !== void 0\n ? source\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : (_nodeLocations$ = nodeLocations[0]) === null ||\n _nodeLocations$ === void 0\n ? void 0\n : _nodeLocations$.source;\n this.positions =\n positions !== null && positions !== void 0\n ? positions\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => loc.start);\n this.locations =\n positions && source\n ? positions.map((pos) => getLocation(source, pos))\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => getLocation(loc.source, loc.start));\n const originalExtensions = isObjectLike(\n originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions,\n )\n ? originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions\n : undefined;\n this.extensions =\n (_ref =\n extensions !== null && extensions !== void 0\n ? extensions\n : originalExtensions) !== null && _ref !== void 0\n ? _ref\n : Object.create(null); // Only properties prescribed by the spec should be enumerable.\n // Keep the rest as non-enumerable.\n\n Object.defineProperties(this, {\n message: {\n writable: true,\n enumerable: true,\n },\n name: {\n enumerable: false,\n },\n nodes: {\n enumerable: false,\n },\n source: {\n enumerable: false,\n },\n positions: {\n enumerable: false,\n },\n originalError: {\n enumerable: false,\n },\n }); // Include (non-enumerable) stack trace.\n\n /* c8 ignore start */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n\n if (\n originalError !== null &&\n originalError !== void 0 &&\n originalError.stack\n ) {\n Object.defineProperty(this, 'stack', {\n value: originalError.stack,\n writable: true,\n configurable: true,\n });\n } else if (Error.captureStackTrace) {\n Error.captureStackTrace(this, GraphQLError);\n } else {\n Object.defineProperty(this, 'stack', {\n value: Error().stack,\n writable: true,\n configurable: true,\n });\n }\n /* c8 ignore stop */\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'GraphQLError';\n }\n /**\n * Returns this error as a human-readable message with source locations.\n * @returns The formatted error string.\n * @example\n * ```ts\n * import { Source } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const error = new GraphQLError('Cannot query field \"name\".', {\n * source: new Source('{ name }'),\n * positions: [2],\n * });\n *\n * error.toString(); // => 'Cannot query field \"name\".\\n\\nGraphQL request:1:3\\n1 | { name }\\n | ^'\n * ```\n */\n\n toString() {\n let output = this.message;\n\n if (this.nodes) {\n for (const node of this.nodes) {\n if (node.loc) {\n output += '\\n\\n' + printLocation(node.loc);\n }\n }\n } else if (this.source && this.locations) {\n for (const location of this.locations) {\n output += '\\n\\n' + printSourceLocation(this.source, location);\n }\n }\n\n return output;\n }\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { GraphQLError } from 'graphql/error';\n *\n * const error = new GraphQLError('Resolver failed.', {\n * path: ['viewer', 'name'],\n * extensions: { code: 'INTERNAL' },\n * });\n *\n * error.toJSON(); // => { message: 'Resolver failed.', path: ['viewer', 'name'], extensions: { code: 'INTERNAL' } }\n * ```\n */\n\n toJSON() {\n const formattedError = {\n message: this.message,\n };\n\n if (this.locations != null) {\n formattedError.locations = this.locations;\n }\n\n if (this.path != null) {\n formattedError.path = this.path;\n }\n\n if (this.extensions != null && Object.keys(this.extensions).length > 0) {\n formattedError.extensions = this.extensions;\n }\n\n return formattedError;\n }\n}\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/** See: https://spec.graphql.org/draft/#sec-Errors */\n\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source. This deprecated helper is retained\n * for backwards compatibility; call `error.toString()` instead because\n * printError will be removed in v17.\n * @param error - The error to format.\n * @returns The printed string representation.\n * @example\n * ```ts\n * import { GraphQLError, printError } from 'graphql/error';\n *\n * const message = printError(new GraphQLError('Example error'));\n *\n * message; // => 'Example error'\n * ```\n * @deprecated Please use `error.toString` instead. Will be removed in v17\n */\nexport function printError(error) {\n return error.toString();\n}\n/**\n * Given a GraphQLError, format it according to the rules described by the\n * Response Format, Errors section of the GraphQL Specification. This deprecated\n * helper is retained for backwards compatibility; call `error.toJSON()`\n * instead because formatError will be removed in v17.\n * @param error - The error to format.\n * @returns The JSON-serializable formatted error.\n * @example\n * ```ts\n * import { GraphQLError, formatError } from 'graphql/error';\n *\n * const formatted = formatError(new GraphQLError('Example error'));\n *\n * formatted; // => { message: 'Example error' }\n * ```\n * @deprecated Please use `error.toJSON` instead. Will be removed in v17\n */\n\nexport function formatError(error) {\n return error.toJSON();\n}\n"],"ignoreList":[0],"mappings":";;;;AAQA,SAASA,EAAoB,GAAM;CACjC,IAAMC,IAAWC,EAAK;CAatB,OAXID,KAAY,QAAQ,UAAUA,KAAY,YAAYA,IACjD;EACL,OAAOA;EACP,QAAQC,EAAK;EACb,WAAWA,EAAK;EAChB,MAAMA,EAAK;EACX,eAAeA,EAAK;EACpB,YA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MJ,CAAY,IAE1C,OAAO,eAAe,MAAM,SAAS;GACnC,OAAO,MAAM,CAAC,CAAC;GACf,UAAU;GACV,cAAc;EAChB,CAAC;;CAGL;CAMA,KAAK,OAAO,eAAe;EACzB,OAAO;CACT;CAkBA,WAAW;EACT,IAAIiB,IAAS,KAAK;EAElB,IAAI,KAAK,OACF,KAAA,IAAMT,KAAQ,KAAK,OACtB,AAAIA,EAAK,QACP,KAAU,SAASU,EAAcV,EAAK,GAAG;OAGxC,IAAI,KAAK,UAAU,KAAK,WAC7B,KAAK,IAAMW,KAAY,KAAK,WAC1B,KAAU,SAASC,EAAoB,KAAK,QAAQD,CAAQ;EAIhE,OAAOF;CACT;CAiBA,SAAS;EACP,IAAMI,IAAiB,EACrB,SAAS,KAAK,QAChB;EAcA,OAZI,KAAK,aAAa,SACpB,EAAe,YAAY,KAAK,YAG9B,KAAK,QAAQ,SACf,EAAe,OAAO,KAAK,OAGzB,KAAK,cAAc,QAAQ,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,SAAS,MACnE,EAAe,aAAa,KAAK,aAG5BA;CACT;AACF;AAEA,SAAShB,EAAiB,GAAO;CAC/B,OAAOiB,MAAU,KAAA,KAAaA,EAAM,WAAW,IAAI,KAAA,IAAYA;AACjE"}
1
+ {"version":3,"file":"GraphQLError.js","names":["toNormalizedOptions","firstArg","args","GraphQLError","rawArgs","message","path","originalError","undefinedIfEmpty","nodes","nodeLocations","node","loc","source","positions","getLocations","originalExtensions","isObjectLike","extensions","output","printLocation","location","printSourceLocation","formattedError","array"],"sources":["../../../../node_modules/graphql/error/GraphQLError.mjs"],"sourcesContent":["/** @category Errors */\nimport { isObjectLike } from '../jsutils/isObjectLike.mjs';\nimport { getLocations } from '../language/location.mjs';\nimport {\n printLocation,\n printSourceLocation,\n} from '../language/printLocation.mjs';\n\nfunction toNormalizedOptions(args) {\n const firstArg = args[0];\n\n if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {\n return {\n nodes: firstArg,\n source: args[1],\n positions: args[2],\n path: args[3],\n originalError: args[4],\n extensions: args[5],\n };\n }\n\n return firstArg;\n}\n/**\n * A GraphQLError describes an Error found during the parse, validate, or\n * execute phases of performing a GraphQL operation. In addition to a message\n * and stack trace, it also includes information about the locations in a\n * GraphQL document and/or execution result that correspond to the Error.\n */\n\nexport class GraphQLError extends Error {\n /**\n * An array of `{ line, column }` locations within the source GraphQL document\n * which correspond to this error.\n *\n * Errors during validation often contain multiple locations, for example to\n * point out two things with the same name. Errors during execution include a\n * single location, the field which produced the error.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /**\n * An array describing the JSON-path into the execution response which\n * corresponds to this error. Only included for errors during execution.\n *\n * Enumerable, and appears in the result of JSON.stringify().\n */\n\n /** An array of GraphQL AST Nodes corresponding to this error. */\n\n /**\n * The source GraphQL document for the first location of this error.\n *\n * Note that if this Error represents more than one node, the source may not\n * represent nodes after the first node.\n */\n\n /**\n * An array of character offsets within the source GraphQL document\n * which correspond to this error.\n */\n\n /** Original error that caused this GraphQLError, if one exists. */\n\n /** Extension fields to add to the formatted error. */\n\n /**\n * Creates a GraphQLError instance.\n * @param message - Human-readable error message.\n * @param options - Error metadata such as source locations, response path, original error, and extensions.\n * This positional-arguments constructor overload is deprecated. Use the\n * `GraphQLError(message, options)` overload instead.\n * @example\n * ```ts\n * import { Kind } from 'graphql/language';\n * import assert from 'node:assert/strict';\n * // Create an error from AST nodes and response metadata.\n * import { parse } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const document = parse('{ greeting }');\n * const operation = document.definitions[0];\n * assert(operation.kind === Kind.OPERATION_DEFINITION);\n * const fieldNode = operation.selectionSet.selections[0];\n * const error = new GraphQLError('Cannot query this field.', {\n * nodes: fieldNode,\n * path: ['greeting'],\n * extensions: { code: 'FORBIDDEN' },\n * });\n *\n * error.message; // => 'Cannot query this field.'\n * error.locations; // => [{ line: 1, column: 3 }]\n * error.path; // => ['greeting']\n * error.extensions; // => { code: 'FORBIDDEN' }\n * ```\n * @example\n * ```ts\n * // This variant derives locations from source positions and preserves the original error.\n * import { Source } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const source = new Source('{ greeting }');\n * const originalError = new Error('Database unavailable.');\n * const error = new GraphQLError('Resolver failed.', {\n * source,\n * positions: [2],\n * path: ['greeting'],\n * originalError,\n * });\n *\n * error.locations; // => [{ line: 1, column: 3 }]\n * error.path; // => ['greeting']\n * error.originalError; // => originalError\n * ```\n */\n\n /**\n * Creates a GraphQLError instance using the legacy positional constructor.\n * This deprecated overload will be removed in v17. Prefer the\n * `GraphQLErrorOptions` object overload, which keeps optional error metadata\n * in a single options bag.\n * @param message - Human-readable error message.\n * @param nodes - AST node or nodes associated with this error.\n * @param source - Source document used to derive error locations.\n * @param positions - Character offsets in the source document associated with\n * this error.\n * @param path - Response path where this error occurred during execution.\n * @param originalError - Original error that caused this GraphQLError, if one\n * exists.\n * @param extensions - Extension fields to include in the formatted error.\n * @example\n * ```ts\n * import { Source } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const source = new Source('{ greeting }');\n * const originalError = new Error('Database unavailable.');\n * const error = new GraphQLError(\n * 'Resolver failed.',\n * undefined,\n * source,\n * [2],\n * ['greeting'],\n * originalError,\n * { code: 'INTERNAL' },\n * );\n *\n * error.locations; // => [{ line: 1, column: 3 }]\n * error.path; // => ['greeting']\n * error.originalError; // => originalError\n * error.extensions; // => { code: 'INTERNAL' }\n * ```\n * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.\n */\n constructor(message, ...rawArgs) {\n var _this$nodes, _nodeLocations$, _ref;\n\n const { nodes, source, positions, path, originalError, extensions } =\n toNormalizedOptions(rawArgs);\n super(message);\n this.name = 'GraphQLError';\n this.path = path !== null && path !== void 0 ? path : undefined;\n this.originalError =\n originalError !== null && originalError !== void 0\n ? originalError\n : undefined; // Compute list of blame nodes.\n\n this.nodes = undefinedIfEmpty(\n Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined,\n );\n const nodeLocations = undefinedIfEmpty(\n (_this$nodes = this.nodes) === null || _this$nodes === void 0\n ? void 0\n : _this$nodes.map((node) => node.loc).filter((loc) => loc != null),\n ); // Compute locations in the source for the given nodes/positions.\n\n this.source =\n source !== null && source !== void 0\n ? source\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : (_nodeLocations$ = nodeLocations[0]) === null ||\n _nodeLocations$ === void 0\n ? void 0\n : _nodeLocations$.source;\n this.positions =\n positions !== null && positions !== void 0\n ? positions\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) => loc.start);\n this.locations =\n positions && source\n ? getLocations(\n positions.map((start) => ({\n source,\n start,\n })),\n )\n : nodeLocations && getLocations(nodeLocations);\n const originalExtensions = isObjectLike(\n originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions,\n )\n ? originalError === null || originalError === void 0\n ? void 0\n : originalError.extensions\n : undefined;\n this.extensions =\n (_ref =\n extensions !== null && extensions !== void 0\n ? extensions\n : originalExtensions) !== null && _ref !== void 0\n ? _ref\n : Object.create(null); // Only properties prescribed by the spec should be enumerable.\n // Keep the rest as non-enumerable.\n\n Object.defineProperties(this, {\n message: {\n writable: true,\n enumerable: true,\n },\n name: {\n enumerable: false,\n },\n nodes: {\n enumerable: false,\n },\n source: {\n enumerable: false,\n },\n positions: {\n enumerable: false,\n },\n originalError: {\n enumerable: false,\n },\n }); // Include (non-enumerable) stack trace.\n\n /* c8 ignore start */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n\n if (\n originalError !== null &&\n originalError !== void 0 &&\n originalError.stack\n ) {\n Object.defineProperty(this, 'stack', {\n value: originalError.stack,\n writable: true,\n configurable: true,\n });\n } else if (Error.captureStackTrace) {\n Error.captureStackTrace(this, GraphQLError);\n } else {\n Object.defineProperty(this, 'stack', {\n value: Error().stack,\n writable: true,\n configurable: true,\n });\n }\n /* c8 ignore stop */\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'GraphQLError';\n }\n /**\n * Returns this error as a human-readable message with source locations.\n * @returns The formatted error string.\n * @example\n * ```ts\n * import { Source } from 'graphql/language';\n * import { GraphQLError } from 'graphql/error';\n *\n * const error = new GraphQLError('Cannot query field \"name\".', {\n * source: new Source('{ name }'),\n * positions: [2],\n * });\n *\n * error.toString(); // => 'Cannot query field \"name\".\\n\\nGraphQL request:1:3\\n1 | { name }\\n | ^'\n * ```\n */\n\n toString() {\n let output = this.message;\n\n if (this.nodes) {\n for (const node of this.nodes) {\n if (node.loc) {\n output += '\\n\\n' + printLocation(node.loc);\n }\n }\n } else if (this.source && this.locations) {\n for (const location of this.locations) {\n output += '\\n\\n' + printSourceLocation(this.source, location);\n }\n }\n\n return output;\n }\n /**\n * Returns the JSON representation used when this object is serialized.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { GraphQLError } from 'graphql/error';\n *\n * const error = new GraphQLError('Resolver failed.', {\n * path: ['viewer', 'name'],\n * extensions: { code: 'INTERNAL' },\n * });\n *\n * error.toJSON(); // => { message: 'Resolver failed.', path: ['viewer', 'name'], extensions: { code: 'INTERNAL' } }\n * ```\n */\n\n toJSON() {\n const formattedError = {\n message: this.message,\n };\n\n if (this.locations != null) {\n formattedError.locations = this.locations;\n }\n\n if (this.path != null) {\n formattedError.path = this.path;\n }\n\n if (this.extensions != null && Object.keys(this.extensions).length > 0) {\n formattedError.extensions = this.extensions;\n }\n\n return formattedError;\n }\n}\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/** See: https://spec.graphql.org/draft/#sec-Errors */\n\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source. This deprecated helper is retained\n * for backwards compatibility; call `error.toString()` instead because\n * printError will be removed in v17.\n * @param error - The error to format.\n * @returns The printed string representation.\n * @example\n * ```ts\n * import { GraphQLError, printError } from 'graphql/error';\n *\n * const message = printError(new GraphQLError('Example error'));\n *\n * message; // => 'Example error'\n * ```\n * @deprecated Please use `error.toString` instead. Will be removed in v17\n */\nexport function printError(error) {\n return error.toString();\n}\n/**\n * Given a GraphQLError, format it according to the rules described by the\n * Response Format, Errors section of the GraphQL Specification. This deprecated\n * helper is retained for backwards compatibility; call `error.toJSON()`\n * instead because formatError will be removed in v17.\n * @param error - The error to format.\n * @returns The JSON-serializable formatted error.\n * @example\n * ```ts\n * import { GraphQLError, formatError } from 'graphql/error';\n *\n * const formatted = formatError(new GraphQLError('Example error'));\n *\n * formatted; // => { message: 'Example error' }\n * ```\n * @deprecated Please use `error.toJSON` instead. Will be removed in v17\n */\n\nexport function formatError(error) {\n return error.toJSON();\n}\n"],"ignoreList":[0],"mappings":";;;;AAQA,SAASA,EAAoB,GAAM;CACjC,IAAMC,IAAWC,EAAK;CAatB,OAXID,KAAY,QAAQ,UAAUA,KAAY,YAAYA,IACjD;EACL,OAAOA;EACP,QAAQC,EAAK;EACb,WAAWA,EAAK;EAChB,MAAMA,EAAK;EACX,eAAeA,EAAK;EACpB,YAAYA,EAAK;CACnB,IAGKD;AACT;AAQA,IAAaE,IAAb,MAAaA,UAAqB,MAAM;CA6HtC,YAAY,GAAS,GAAGC,GAAS;EAG/B,IAAM,EAAE,UAAO,WAAQ,cAAW,SAAM,kBAAe,kBACrDJ,EAAoBI,CAAO;EAS7B,AARA,MAAMC,CAAO,GACb,KAAK,OAAO,gBACZ,KAAK,OAAOC,KAA0C,KAAA,GACtD,KAAK,gBACHC,KAEI,KAAA,GAEN,KAAK,QAAQC,EACX,MAAM,QAAQC,CAAK,IAAIA,IAAQA,IAAQ,CAACA,CAAK,IAAI,KAAA,CACnD;EACA,IAAMC,IAAgBF,EACL,KAAK,OAEJ,KAAK,MAASG,EAAK,GAAG,CAAC,CAAC,QAAQ,MAAQC,KAAO,IAAI,CACrE;EAiBA,AAfA,KAAK,SACHC,KAEIH,IAEiC,EAAA,EAGjB,QACtB,KAAK,YACHI,KAEIJ,GA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OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,SAAS,MACnE,EAAe,aAAa,KAAK,aAG5BA;CACT;AACF;AAEA,SAASf,EAAiB,GAAO;CAC/B,OAAOgB,MAAU,KAAA,KAAaA,EAAM,WAAW,IAAI,KAAA,IAAYA;AACjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"ast.js","names":["Location","startToken","endToken","source","Token","kind","start","end","line","column","value","QueryDocumentKeys","OperationTypeNode","\"QUERY\"","\"MUTATION\"","\"SUBSCRIPTION\""],"sources":["../../../../node_modules/graphql/language/ast.mjs"],"sourcesContent":["/** @category AST */\n\n/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nexport class Location {\n /** The character offset at which this Node begins. */\n\n /** The character offset at which this Node ends. */\n\n /** The Token at which this Node begins. */\n\n /** The Token at which this Node ends. */\n\n /** The Source document the AST represents. */\n\n /**\n * Creates a Location instance.\n * @param startToken - The start token.\n * @param endToken - The end token.\n * @param source - Source document used to derive error locations.\n * @example\n * ```ts\n * import { Location, Source, Token, TokenKind } from 'graphql/language';\n *\n * const source = new Source('{ hello }');\n * const startToken = new Token(TokenKind.BRACE_L, 0, 1, 1, 1);\n * const endToken = new Token(TokenKind.BRACE_R, 8, 9, 1, 9);\n * const location = new Location(startToken, endToken, source);\n *\n * location.start; // => 0\n * location.end; // => 9\n * location.source.body; // => '{ hello }'\n * ```\n */\n constructor(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'Location';\n }\n /**\n * Returns a JSON representation of this location.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { parse } from 'graphql/language';\n *\n * const document = parse('{ hello }');\n * const location = document.loc?.toJSON();\n *\n * location; // => { start: 0, end: 9 }\n * ```\n */\n\n toJSON() {\n return {\n start: this.start,\n end: this.end,\n };\n }\n}\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nexport class Token {\n /** The kind of Token. */\n\n /** The character offset at which this Node begins. */\n\n /** The character offset at which this Node ends. */\n\n /** The 1-indexed line number on which this Token appears. */\n\n /** The 1-indexed column number at which this Token begins. */\n\n /**\n * For non-punctuation tokens, represents the interpreted value of the token.\n *\n * Note: is undefined for punctuation tokens, but typed as string for\n * convenience in the parser.\n */\n\n /**\n * Tokens exist as nodes in a double-linked-list amongst all tokens\n * including ignored tokens. <SOF> is always the first node and <EOF>\n * the last.\n */\n\n /** Next token in the token stream, including ignored tokens. */\n\n /**\n * Creates a Token instance.\n * @param kind - Token kind produced by lexical analysis.\n * @param start - Character offset where this token begins.\n * @param end - Character offset where this token ends.\n * @param line - One-indexed line number where this token begins.\n * @param column - One-indexed column number where this token begins.\n * @param value - Interpreted value for non-punctuation tokens.\n * @example\n * ```ts\n * import { Token, TokenKind } from 'graphql/language';\n *\n * const token = new Token(TokenKind.NAME, 2, 7, 1, 3, 'hello');\n *\n * token.kind; // => TokenKind.NAME\n * token.value; // => 'hello'\n * token.toJSON(); // => { kind: 'Name', value: 'hello', line: 1, column: 3 }\n * ```\n */\n constructor(kind, start, end, line, column, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\n this.value = value;\n this.prev = null;\n this.next = null;\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'Token';\n }\n /**\n * Returns a JSON representation of this token.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { Lexer, Source } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n * const token = lexer.advance().toJSON();\n *\n * token; // => { kind: '{', value: undefined, line: 1, column: 1 }\n * ```\n */\n\n toJSON() {\n return {\n kind: this.kind,\n value: this.value,\n line: this.line,\n column: this.column,\n };\n }\n}\n/** The list of all possible AST node types. */\n\n/** @internal */\nexport const QueryDocumentKeys = {\n Name: [],\n Document: ['definitions'],\n OperationDefinition: [\n 'description',\n 'name',\n 'variableDefinitions',\n 'directives',\n 'selectionSet',\n ],\n VariableDefinition: [\n 'description',\n 'variable',\n 'type',\n 'defaultValue',\n 'directives',\n ],\n Variable: ['name'],\n SelectionSet: ['selections'],\n Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],\n Argument: ['name', 'value'],\n FragmentSpread: ['name', 'directives'],\n InlineFragment: ['typeCondition', 'directives', 'selectionSet'],\n FragmentDefinition: [\n 'description',\n 'name', // Note: fragment variable definitions are deprecated and will removed in v17.0.0\n 'variableDefinitions',\n 'typeCondition',\n 'directives',\n 'selectionSet',\n ],\n IntValue: [],\n FloatValue: [],\n StringValue: [],\n BooleanValue: [],\n NullValue: [],\n EnumValue: [],\n ListValue: ['values'],\n ObjectValue: ['fields'],\n ObjectField: ['name', 'value'],\n Directive: ['name', 'arguments'],\n NamedType: ['name'],\n ListType: ['type'],\n NonNullType: ['type'],\n SchemaDefinition: ['description', 'directives', 'operationTypes'],\n OperationTypeDefinition: ['type'],\n ScalarTypeDefinition: ['description', 'name', 'directives'],\n ObjectTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],\n InputValueDefinition: [\n 'description',\n 'name',\n 'type',\n 'defaultValue',\n 'directives',\n ],\n InterfaceTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n UnionTypeDefinition: ['description', 'name', 'directives', 'types'],\n EnumTypeDefinition: ['description', 'name', 'directives', 'values'],\n EnumValueDefinition: ['description', 'name', 'directives'],\n InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],\n DirectiveDefinition: [\n 'description',\n 'name',\n 'arguments',\n 'directives',\n 'locations',\n ],\n SchemaExtension: ['directives', 'operationTypes'],\n DirectiveExtension: ['name', 'directives'],\n ScalarTypeExtension: ['name', 'directives'],\n ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n UnionTypeExtension: ['name', 'directives', 'types'],\n EnumTypeExtension: ['name', 'directives', 'values'],\n InputObjectTypeExtension: ['name', 'directives', 'fields'],\n TypeCoordinate: ['name'],\n MemberCoordinate: ['name', 'memberName'],\n ArgumentCoordinate: ['name', 'fieldName', 'argumentName'],\n DirectiveCoordinate: ['name'],\n DirectiveArgumentCoordinate: ['name', 'argumentName'],\n};\nconst kindValues = new Set(Object.keys(QueryDocumentKeys));\n/** @internal */\n\nexport function isNode(maybeNode) {\n const maybeKind =\n maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;\n return typeof maybeKind === 'string' && kindValues.has(maybeKind);\n}\n/** An identifier in a GraphQL document. */\n\n/**\n * The operation types supported by GraphQL executable definitions.\n * @category Kinds\n */\nvar OperationTypeNode;\n\n(function (OperationTypeNode) {\n OperationTypeNode['QUERY'] = 'query';\n OperationTypeNode['MUTATION'] = 'mutation';\n OperationTypeNode['SUBSCRIPTION'] = 'subscription';\n})(OperationTypeNode || (OperationTypeNode = {}));\n\nexport { OperationTypeNode };\n/** A variable declaration in an operation or legacy fragment definition. */\n"],"ignoreList":[0],"mappings":";AAMA,IAAaA,IAAb,MAAsB;CA8BpB,YAAY,GAAY,GAAU,GAAQ;EAKxC,AAJA,KAAK,QAAQC,EAAW,OACxB,KAAK,MAAMC,EAAS,KACpB,KAAK,aAAaD,GAClB,KAAK,WAAWC,GAChB,KAAK,SAASC;CAChB;CAMA,KAAK,OAAO,eAAe;EACzB,OAAO;CACT;CAeA,SAAS;EACP,OAAO;GACL,OAAO,KAAK;GACZ,KAAK,KAAK;EACZ;CACF;AACF,GAMaC,IAAb,MAAmB;CA6CjB,YAAY,GAAM,GAAO,GAAK,GAAM,GAAQ,GAAO;EASjD,AARA,K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A,yBAAyB;EACvB;EACA;EACA;EACA;EACA;CACF;CACA,qBAAqB;EAAC;EAAe;EAAQ;EAAc;CAAO;CAClE,oBAAoB;EAAC;EAAe;EAAQ;EAAc;CAAQ;CAClE,qBAAqB;EAAC;EAAe;EAAQ;CAAY;CACzD,2BAA2B;EAAC;EAAe;EAAQ;EAAc;CAAQ;CACzE,qBAAqB;EACnB;EACA;EACA;EACA;EACA;CACF;CACA,iBAAiB,CAAC,cAAc,gBAAgB;CAChD,oBAAoB,CAAC,QAAQ,YAAY;CACzC,qBAAqB,CAAC,QAAQ,YAAY;CAC1C,qBAAqB;EAAC;EAAQ;EAAc;EAAc;CAAQ;CAClE,wBAAwB;EAAC;EAAQ;EAAc;EAAc;CAAQ;CACrE,oBAAoB;EAAC;EAAQ;EAAc;CAAO;CAClD,mBAAmB;EAAC;EAAQ;EAAc;CAAQ;CAClD,0BAA0B;EAAC;EAAQ;EAAc;CAAQ;CACzD,gBAAgB,CAAC,MAAM;CACvB,kBAAkB,CAAC,QAAQ,YAAY;CACvC,oBAAoB;EAAC;EAAQ;EAAa;CAAc;CACxD,qBAAqB,CAAC,MAAM;CAC5B,6BAA6B,CAAC,QAAQ,cAAc;AACtD;AACmB,IAAI,IAAI,OAAO,KAAKA,CAAiB,CAAC;AAczD,IAAIC;CAEH,SAAU,GAAmB;CAG5B,AAFA,EAAkBC,QAAW,SAC7B,EAAkBC,WAAc,YAChC,EAAkBC,eAAkB;AACtC,EAAA,CAAG,AAAsBH,MAAoB,CAAC,CAAE"}
1
+ {"version":3,"file":"ast.js","names":["Location","startToken","endToken","source","Token","kind","start","end","line","column","value","QueryDocumentKeys","OperationTypeNode","\"QUERY\"","\"MUTATION\"","\"SUBSCRIPTION\""],"sources":["../../../../node_modules/graphql/language/ast.mjs"],"sourcesContent":["/** @category AST */\n\n/**\n * Contains a range of UTF-8 character offsets and token references that\n * identify the region of the source from which the AST derived.\n */\nexport class Location {\n /** The character offset at which this Node begins. */\n\n /** The character offset at which this Node ends. */\n\n /** The Token at which this Node begins. */\n\n /** The Token at which this Node ends. */\n\n /** The Source document the AST represents. */\n\n /**\n * Creates a Location instance.\n * @param startToken - The start token.\n * @param endToken - The end token.\n * @param source - Source document used to derive error locations.\n * @example\n * ```ts\n * import { Location, Source, Token, TokenKind } from 'graphql/language';\n *\n * const source = new Source('{ hello }');\n * const startToken = new Token(TokenKind.BRACE_L, 0, 1, 1, 1);\n * const endToken = new Token(TokenKind.BRACE_R, 8, 9, 1, 9);\n * const location = new Location(startToken, endToken, source);\n *\n * location.start; // => 0\n * location.end; // => 9\n * location.source.body; // => '{ hello }'\n * ```\n */\n constructor(startToken, endToken, source) {\n this.start = startToken.start;\n this.end = endToken.end;\n this.startToken = startToken;\n this.endToken = endToken;\n this.source = source;\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'Location';\n }\n /**\n * Returns a JSON representation of this location.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { parse } from 'graphql/language';\n *\n * const document = parse('{ hello }');\n * const location = document.loc?.toJSON(); // => { start: 0, end: 9 }\n * ```\n */\n\n toJSON() {\n return {\n start: this.start,\n end: this.end,\n };\n }\n}\n/**\n * Represents a range of characters represented by a lexical token\n * within a Source.\n */\n\nexport class Token {\n /** The kind of Token. */\n\n /** The character offset at which this Node begins. */\n\n /** The character offset at which this Node ends. */\n\n /** The 1-indexed line number on which this Token appears. */\n\n /** The 1-indexed column number at which this Token begins. */\n\n /**\n * For non-punctuation tokens, represents the interpreted value of the token.\n *\n * Note: is undefined for punctuation tokens, but typed as string for\n * convenience in the parser.\n */\n\n /**\n * Tokens exist as nodes in a double-linked-list amongst all tokens\n * including ignored tokens. <SOF> is always the first node and <EOF>\n * the last.\n */\n\n /** Next token in the token stream, including ignored tokens. */\n\n /**\n * Creates a Token instance.\n * @param kind - Token kind produced by lexical analysis.\n * @param start - Character offset where this token begins.\n * @param end - Character offset where this token ends.\n * @param line - One-indexed line number where this token begins.\n * @param column - One-indexed column number where this token begins.\n * @param value - Interpreted value for non-punctuation tokens.\n * @example\n * ```ts\n * import { Token, TokenKind } from 'graphql/language';\n *\n * const token = new Token(TokenKind.NAME, 2, 7, 1, 3, 'hello');\n *\n * token.kind; // => TokenKind.NAME\n * token.value; // => 'hello'\n * token.toJSON(); // => { kind: 'Name', value: 'hello', line: 1, column: 3 }\n * ```\n */\n constructor(kind, start, end, line, column, value) {\n this.kind = kind;\n this.start = start;\n this.end = end;\n this.line = line;\n this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\n this.value = value;\n this.prev = null;\n this.next = null;\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'Token';\n }\n /**\n * Returns a JSON representation of this token.\n * @returns The JSON-serializable representation.\n * @example\n * ```ts\n * import { Lexer, Source } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n * const token = lexer.advance().toJSON(); // => { kind: '{', value: undefined, line: 1, column: 1 }\n * ```\n */\n\n toJSON() {\n return {\n kind: this.kind,\n value: this.value,\n line: this.line,\n column: this.column,\n };\n }\n}\n/** The list of all possible AST node types. */\n\n/** @internal */\nexport const QueryDocumentKeys = {\n Name: [],\n Document: ['definitions'],\n OperationDefinition: [\n 'description',\n 'name',\n 'variableDefinitions',\n 'directives',\n 'selectionSet',\n ],\n VariableDefinition: [\n 'description',\n 'variable',\n 'type',\n 'defaultValue',\n 'directives',\n ],\n Variable: ['name'],\n SelectionSet: ['selections'],\n Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],\n Argument: ['name', 'value'],\n FragmentSpread: ['name', 'directives'],\n InlineFragment: ['typeCondition', 'directives', 'selectionSet'],\n FragmentDefinition: [\n 'description',\n 'name', // Note: fragment variable definitions are deprecated and will removed in v17.0.0\n 'variableDefinitions',\n 'typeCondition',\n 'directives',\n 'selectionSet',\n ],\n IntValue: [],\n FloatValue: [],\n StringValue: [],\n BooleanValue: [],\n NullValue: [],\n EnumValue: [],\n ListValue: ['values'],\n ObjectValue: ['fields'],\n ObjectField: ['name', 'value'],\n Directive: ['name', 'arguments'],\n NamedType: ['name'],\n ListType: ['type'],\n NonNullType: ['type'],\n SchemaDefinition: ['description', 'directives', 'operationTypes'],\n OperationTypeDefinition: ['type'],\n ScalarTypeDefinition: ['description', 'name', 'directives'],\n ObjectTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],\n InputValueDefinition: [\n 'description',\n 'name',\n 'type',\n 'defaultValue',\n 'directives',\n ],\n InterfaceTypeDefinition: [\n 'description',\n 'name',\n 'interfaces',\n 'directives',\n 'fields',\n ],\n UnionTypeDefinition: ['description', 'name', 'directives', 'types'],\n EnumTypeDefinition: ['description', 'name', 'directives', 'values'],\n EnumValueDefinition: ['description', 'name', 'directives'],\n InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],\n DirectiveDefinition: [\n 'description',\n 'name',\n 'arguments',\n 'directives',\n 'locations',\n ],\n SchemaExtension: ['directives', 'operationTypes'],\n DirectiveExtension: ['name', 'directives'],\n ScalarTypeExtension: ['name', 'directives'],\n ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],\n UnionTypeExtension: ['name', 'directives', 'types'],\n EnumTypeExtension: ['name', 'directives', 'values'],\n InputObjectTypeExtension: ['name', 'directives', 'fields'],\n TypeCoordinate: ['name'],\n MemberCoordinate: ['name', 'memberName'],\n ArgumentCoordinate: ['name', 'fieldName', 'argumentName'],\n DirectiveCoordinate: ['name'],\n DirectiveArgumentCoordinate: ['name', 'argumentName'],\n};\nconst kindValues = new Set(Object.keys(QueryDocumentKeys));\n/** @internal */\n\nexport function isNode(maybeNode) {\n const maybeKind =\n maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;\n return typeof maybeKind === 'string' && kindValues.has(maybeKind);\n}\n/** An identifier in a GraphQL document. */\n\n/**\n * The operation types supported by GraphQL executable definitions.\n * @category Kinds\n */\nvar OperationTypeNode;\n\n(function (OperationTypeNode) {\n OperationTypeNode['QUERY'] = 'query';\n OperationTypeNode['MUTATION'] = 'mutation';\n OperationTypeNode['SUBSCRIPTION'] = 'subscription';\n})(OperationTypeNode || (OperationTypeNode = {}));\n\nexport { OperationTypeNode };\n/** A variable declaration in an operation or legacy fragment definition. */\n"],"ignoreList":[0],"mappings":";AAMA,IAAaA,IAAb,MAAsB;CA8BpB,YAAY,GAAY,GAAU,GAAQ;EAKxC,AAJA,KAAK,QAAQC,EAAW,OACxB,KAAK,MAAMC,EAAS,KACpB,KAAK,aAAaD,GAClB,KAAK,WAAWC,GAChB,KAAK,SAASC;CAChB;CAMA,KAAK,OAAO,eAAe;EACzB,OAAO;CACT;CAaA,SAAS;EACP,OAAO;GACL,OAAO,KAAK;GACZ,KAAK,KAAK;EACZ;CACF;AACF,GAMaC,IAAb,MAAmB;CA6CjB,YAAY,GAAM,GAAO,GAAK,GAAM,GAAQ,GAAO;EASjD,AARA,KAAK,OAAOC,GACZ,KAAK,QAAQC,GACb,KAAK,MAAMC,GACX,KAAK,OAAOC,GACZ,KAAK,SAASC,GAEd,KAAK,QAAQC,GACb,KAAK,OAAO,MACZ,KAAK,OAAO;CACd;CAMA,KAAK,OAAO,eAAe;EACzB,OAAO;CACT;CAaA,SAAS;EACP,OAAO;GACL,MAAM,KAAK;GACX,OAAO,KAAK;GACZ,MAAM,KAAK;GACX,QAAQ,KAAK;EACf;CACF;AACF,GAIaC,IAAoB;CAC/B,MAAM,CAAC;CACP,UAAU,CAAC,aAAa;CACxB,qBAAqB;EACnB;EACA;EACA;EACA;EACA;CACF;CACA,oBAAoB;EAClB;EACA;EACA;EACA;EACA;CACF;CACA,UAAU,CAAC,MAAM;CACjB,cAAc,CAAC,YAAY;CAC3B,OAAO;EAAC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ClD,mBAAmB;EAAC;EAAQ;EAAc;CAAQ;CAClD,0BAA0B;EAAC;EAAQ;EAAc;CAAQ;CACzD,gBAAgB,CAAC,MAAM;CACvB,kBAAkB,CAAC,QAAQ,YAAY;CACvC,oBAAoB;EAAC;EAAQ;EAAa;CAAc;CACxD,qBAAqB,CAAC,MAAM;CAC5B,6BAA6B,CAAC,QAAQ,cAAc;AACtD;AACmB,IAAI,IAAI,OAAO,KAAKA,CAAiB,CAAC;AAczD,IAAIC;CAEH,SAAU,GAAmB;CAG5B,AAFA,EAAkBC,QAAW,SAC7B,EAAkBC,WAAc,YAChC,EAAkBC,eAAkB;AACtC,EAAA,CAAG,AAAsBH,MAAoB,CAAC,CAAE"}
@@ -7,7 +7,7 @@ import { TokenKind as o } from "./tokenKind.js";
7
7
  var s = class {
8
8
  constructor(e) {
9
9
  let n = new t(o.SOF, 0, 0, 0, 0);
10
- this.source = e, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0;
10
+ this.source = e, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0, this._maxComments = void 0, this._commentCount = 0;
11
11
  }
12
12
  get [Symbol.toStringTag]() {
13
13
  return "Lexer";
@@ -97,16 +97,22 @@ function h(t, n) {
97
97
  }
98
98
  return m(t, o.EOF, s, s);
99
99
  }
100
- function g(e, t) {
101
- let n = e.source.body, r = n.length, i = t + 1;
102
- for (; i < r;) {
103
- let e = n.charCodeAt(i);
100
+ function g(t, n) {
101
+ let r = t._maxComments;
102
+ if (r !== void 0) {
103
+ let i = t._commentCount + 1;
104
+ if (i > r) throw e(t.source, n, `Document contains more than ${r} comments. Parsing aborted.`);
105
+ t._commentCount = i;
106
+ }
107
+ let i = t.source.body, a = i.length, s = n + 1;
108
+ for (; s < a;) {
109
+ let e = i.charCodeAt(s);
104
110
  if (e === 10 || e === 13) break;
105
- if (l(e)) ++i;
106
- else if (u(n, i)) i += 2;
111
+ if (l(e)) ++s;
112
+ else if (u(i, s)) s += 2;
107
113
  else break;
108
114
  }
109
- return m(e, o.COMMENT, t, i, n.slice(t + 1, i));
115
+ return m(t, o.COMMENT, n, s, i.slice(n + 1, s));
110
116
  }
111
117
  function _(t, n, i) {
112
118
  let s = t.source.body, c = n, l = i, u = !1;
@@ -1 +1 @@
1
- {"version":3,"file":"lexer.js","names":["Lexer","startOfFileToken","Token","TokenKind","source","token","nextToken","readNextToken","isPunctuatorTokenKind","kind","isUnicodeScalarValue","code","isSupplementaryCodePoint","isLeadingSurrogate","body","location","isTrailingSurrogate","printCodePointAt","lexer","char","createToken","line","col","start","end","value","bodyLength","position","readComment","readBlockString","readString","isDigit","readNumber","isNameStart","readName","syntaxError","firstCode","isFloat","readDigits","chunkStart","escape","readEscapedUnicodeVariableWidth","readEscapedUnicodeFixedWidth","readEscapedCharacter","point","size","readHexDigit","read16BitHexCode","trailingCode","lineStart","currentLine","blockLines","dedentBlockStringLines","isNameContinue"],"sources":["../../../../node_modules/graphql/language/lexer.mjs"],"sourcesContent":["/** @category Lexing */\nimport { syntaxError } from '../error/syntaxError.mjs';\nimport { Token } from './ast.mjs';\nimport { dedentBlockStringLines } from './blockString.mjs';\nimport { isDigit, isNameContinue, isNameStart } from './characterClasses.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/**\n * A Lexer interface which provides common properties and methods required for\n * lexing GraphQL source.\n *\n * @internal\n */\n\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\nexport class Lexer {\n /** Source document used to derive error locations. */\n\n /** Most recent non-ignored token returned by the lexer. */\n\n /** Current non-ignored token at the lexer cursor. */\n\n /** The (1-indexed) line containing the current token. */\n\n /** Character offset where the current line starts. */\n\n /**\n * Creates a Lexer instance.\n * @param source - Source document used to derive error locations.\n * @example\n * ```ts\n * import { Lexer, Source, TokenKind } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n *\n * lexer.token.kind; // => TokenKind.SOF\n * lexer.advance().kind; // => TokenKind.BRACE_L\n * lexer.advance().value; // => 'hello'\n * lexer.advance().kind; // => TokenKind.BRACE_R\n * ```\n */\n constructor(source) {\n const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'Lexer';\n }\n /**\n * Advances the token stream to the next non-ignored token.\n * @returns The next non-ignored token.\n * @example\n * ```ts\n * import { Lexer, Source } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n * const token = lexer.advance();\n *\n * token.kind; // => '{'\n * lexer.token; // => token\n * ```\n */\n\n advance() {\n this.lastToken = this.token;\n const token = (this.token = this.lookahead());\n return token;\n }\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the state of Lexer.\n * @returns The next non-ignored token without advancing the lexer.\n * @example\n * ```ts\n * import { Lexer, Source } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n * const token = lexer.lookahead();\n *\n * token.kind; // => '{'\n * lexer.token.kind; // => '<SOF>'\n * ```\n */\n\n lookahead() {\n let token = this.token;\n\n if (token.kind !== TokenKind.EOF) {\n do {\n if (token.next) {\n token = token.next;\n } else {\n // Read the next token and form a link in the token linked-list.\n const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing.\n\n token.next = nextToken; // @ts-expect-error prev is only mutable during parsing.\n\n nextToken.prev = token;\n token = nextToken;\n }\n } while (token.kind === TokenKind.COMMENT);\n }\n\n return token;\n }\n}\n/** @internal */\n\nexport function isPunctuatorTokenKind(kind) {\n return (\n kind === TokenKind.BANG ||\n kind === TokenKind.DOLLAR ||\n kind === TokenKind.AMP ||\n kind === TokenKind.PAREN_L ||\n kind === TokenKind.PAREN_R ||\n kind === TokenKind.DOT ||\n kind === TokenKind.SPREAD ||\n kind === TokenKind.COLON ||\n kind === TokenKind.EQUALS ||\n kind === TokenKind.AT ||\n kind === TokenKind.BRACKET_L ||\n kind === TokenKind.BRACKET_R ||\n kind === TokenKind.BRACE_L ||\n kind === TokenKind.PIPE ||\n kind === TokenKind.BRACE_R\n );\n}\n/**\n * A Unicode scalar value is any Unicode code point except surrogate code\n * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and\n * 0xE000 to 0x10FFFF.\n *\n * SourceCharacter ::\n * - \"Any Unicode scalar value\"\n *\n * @internal\n */\n\nfunction isUnicodeScalarValue(code) {\n return (\n (code >= 0x0000 && code <= 0xd7ff) || (code >= 0xe000 && code <= 0x10ffff)\n );\n}\n/**\n * The GraphQL specification defines source text as a sequence of unicode scalar\n * values (which Unicode defines to exclude surrogate code points). However\n * JavaScript defines strings as a sequence of UTF-16 code units which may\n * include surrogates. A surrogate pair is a valid source character as it\n * encodes a supplementary code point (above U+FFFF), but unpaired surrogate\n * code points are not valid source characters.\n *\n * @internal\n */\n\nfunction isSupplementaryCodePoint(body, location) {\n return (\n isLeadingSurrogate(body.charCodeAt(location)) &&\n isTrailingSurrogate(body.charCodeAt(location + 1))\n );\n}\n\nfunction isLeadingSurrogate(code) {\n return code >= 0xd800 && code <= 0xdbff;\n}\n\nfunction isTrailingSurrogate(code) {\n return code >= 0xdc00 && code <= 0xdfff;\n}\n/**\n * Prints the code point (or end of file reference) at a given location in a\n * source for use in error messages.\n *\n * Printable ASCII is printed quoted, while other points are printed in Unicode\n * code point form (ie. U+1234).\n *\n * @internal\n */\n\nexport function printCodePointAt(lexer, location) {\n const code = lexer.source.body.codePointAt(location);\n\n if (code === undefined) {\n return TokenKind.EOF;\n } else if (code >= 0x0020 && code <= 0x007e) {\n // Printable ASCII\n const char = String.fromCodePoint(code);\n return char === '\"' ? \"'\\\"'\" : `\"${char}\"`;\n } // Unicode code point\n\n return 'U+' + code.toString(16).toUpperCase().padStart(4, '0');\n}\n/**\n * Create a token with line and column location information.\n *\n * @internal\n */\n\nexport function createToken(lexer, kind, start, end, value) {\n const line = lexer.line;\n const col = 1 + start - lexer.lineStart;\n return new Token(kind, start, end, line, col, value);\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n *\n * @internal\n */\n\nfunction readNextToken(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // SourceCharacter\n\n switch (code) {\n // Ignored ::\n // - UnicodeBOM\n // - WhiteSpace\n // - LineTerminator\n // - Comment\n // - Comma\n //\n // UnicodeBOM :: \"Byte Order Mark (U+FEFF)\"\n //\n // WhiteSpace ::\n // - \"Horizontal Tab (U+0009)\"\n // - \"Space (U+0020)\"\n //\n // Comma :: ,\n case 0xfeff: // <BOM>\n\n case 0x0009: // \\t\n\n case 0x0020: // <space>\n\n case 0x002c:\n // ,\n ++position;\n continue;\n // LineTerminator ::\n // - \"New Line (U+000A)\"\n // - \"Carriage Return (U+000D)\" [lookahead != \"New Line (U+000A)\"]\n // - \"Carriage Return (U+000D)\" \"New Line (U+000A)\"\n\n case 0x000a:\n // \\n\n ++position;\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n\n case 0x000d:\n // \\r\n if (body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n // Comment\n\n case 0x0023:\n // #\n return readComment(lexer, position);\n // Token ::\n // - Punctuator\n // - Name\n // - IntValue\n // - FloatValue\n // - StringValue\n //\n // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }\n\n case 0x0021:\n // !\n return createToken(lexer, TokenKind.BANG, position, position + 1);\n\n case 0x0024:\n // $\n return createToken(lexer, TokenKind.DOLLAR, position, position + 1);\n\n case 0x0026:\n // &\n return createToken(lexer, TokenKind.AMP, position, position + 1);\n\n case 0x0028:\n // (\n return createToken(lexer, TokenKind.PAREN_L, position, position + 1);\n\n case 0x0029:\n // )\n return createToken(lexer, TokenKind.PAREN_R, position, position + 1);\n\n case 0x002e:\n // .\n if (\n body.charCodeAt(position + 1) === 0x002e &&\n body.charCodeAt(position + 2) === 0x002e\n ) {\n return createToken(lexer, TokenKind.SPREAD, position, position + 3);\n }\n\n break;\n\n case 0x003a:\n // :\n return createToken(lexer, TokenKind.COLON, position, position + 1);\n\n case 0x003d:\n // =\n return createToken(lexer, TokenKind.EQUALS, position, position + 1);\n\n case 0x0040:\n // @\n return createToken(lexer, TokenKind.AT, position, position + 1);\n\n case 0x005b:\n // [\n return createToken(lexer, TokenKind.BRACKET_L, position, position + 1);\n\n case 0x005d:\n // ]\n return createToken(lexer, TokenKind.BRACKET_R, position, position + 1);\n\n case 0x007b:\n // {\n return createToken(lexer, TokenKind.BRACE_L, position, position + 1);\n\n case 0x007c:\n // |\n return createToken(lexer, TokenKind.PIPE, position, position + 1);\n\n case 0x007d:\n // }\n return createToken(lexer, TokenKind.BRACE_R, position, position + 1);\n // StringValue\n\n case 0x0022:\n // \"\n if (\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n return readBlockString(lexer, position);\n }\n\n return readString(lexer, position);\n } // IntValue | FloatValue (Digit | -)\n\n if (isDigit(code) || code === 0x002d) {\n return readNumber(lexer, position, code);\n } // Name\n\n if (isNameStart(code)) {\n return readName(lexer, position);\n }\n\n throw syntaxError(\n lexer.source,\n position,\n code === 0x0027\n ? 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?'\n : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position)\n ? `Unexpected character: ${printCodePointAt(lexer, position)}.`\n : `Invalid character: ${printCodePointAt(lexer, position)}.`,\n );\n }\n\n return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength);\n}\n/**\n * Reads a comment token from the source file.\n *\n * ```\n * Comment :: # CommentChar* [lookahead != CommentChar]\n *\n * CommentChar :: SourceCharacter but not LineTerminator\n * ```\n *\n * @internal\n */\n\nfunction readComment(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.COMMENT,\n start,\n position,\n body.slice(start + 1, position),\n );\n}\n/**\n * Reads a number token from the source file, either a FloatValue or an IntValue\n * depending on whether a FractionalPart or ExponentPart is encountered.\n *\n * ```\n * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}]\n *\n * IntegerPart ::\n * - NegativeSign? 0\n * - NegativeSign? NonZeroDigit Digit*\n *\n * NegativeSign :: -\n *\n * NonZeroDigit :: Digit but not `0`\n *\n * FloatValue ::\n * - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n *\n * FractionalPart :: . Digit+\n *\n * ExponentPart :: ExponentIndicator Sign? Digit+\n *\n * ExponentIndicator :: one of `e` `E`\n *\n * Sign :: one of + -\n * ```\n *\n * @internal\n */\n\nfunction readNumber(lexer, start, firstCode) {\n const body = lexer.source.body;\n let position = start;\n let code = firstCode;\n let isFloat = false; // NegativeSign (-)\n\n if (code === 0x002d) {\n code = body.charCodeAt(++position);\n } // Zero (0)\n\n if (code === 0x0030) {\n code = body.charCodeAt(++position);\n\n if (isDigit(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, unexpected digit after 0: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n } else {\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Full stop (.)\n\n if (code === 0x002e) {\n isFloat = true;\n code = body.charCodeAt(++position);\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // E e\n\n if (code === 0x0045 || code === 0x0065) {\n isFloat = true;\n code = body.charCodeAt(++position); // + -\n\n if (code === 0x002b || code === 0x002d) {\n code = body.charCodeAt(++position);\n }\n\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Numbers cannot be followed by . or NameStart\n\n if (code === 0x002e || isNameStart(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n\n return createToken(\n lexer,\n isFloat ? TokenKind.FLOAT : TokenKind.INT,\n start,\n position,\n body.slice(start, position),\n );\n}\n/**\n * Returns the new position in the source after reading one or more digits.\n *\n * @internal\n */\n\nfunction readDigits(lexer, start, firstCode) {\n if (!isDigit(firstCode)) {\n throw syntaxError(\n lexer.source,\n start,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n start,\n )}.`,\n );\n }\n\n const body = lexer.source.body;\n let position = start + 1; // +1 to skip first firstCode\n\n while (isDigit(body.charCodeAt(position))) {\n ++position;\n }\n\n return position;\n}\n/**\n * Reads a single-quote string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"` [lookahead != `\"`]\n * - `\"` StringCharacter+ `\"`\n *\n * StringCharacter ::\n * - SourceCharacter but not `\"` or `\\` or LineTerminator\n * - `\\u` EscapedUnicode\n * - `\\` EscapedCharacter\n *\n * EscapedUnicode ::\n * - `{` HexDigit+ `}`\n * - HexDigit HexDigit HexDigit HexDigit\n *\n * EscapedCharacter :: one of `\"` `\\` `/` `b` `f` `n` `r` `t`\n * ```\n *\n * @internal\n */\n\nfunction readString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n let chunkStart = position;\n let value = '';\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Quote (\")\n\n if (code === 0x0022) {\n value += body.slice(chunkStart, position);\n return createToken(lexer, TokenKind.STRING, start, position + 1, value);\n } // Escape Sequence (\\)\n\n if (code === 0x005c) {\n value += body.slice(chunkStart, position);\n const escape =\n body.charCodeAt(position + 1) === 0x0075 // u\n ? body.charCodeAt(position + 2) === 0x007b // {\n ? readEscapedUnicodeVariableWidth(lexer, position)\n : readEscapedUnicodeFixedWidth(lexer, position)\n : readEscapedCharacter(lexer, position);\n value += escape.value;\n position += escape.size;\n chunkStart = position;\n continue;\n } // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n} // The string value and lexed size of an escape sequence.\n\nfunction readEscapedUnicodeVariableWidth(lexer, position) {\n const body = lexer.source.body;\n let point = 0;\n let size = 3; // Cannot be larger than 12 chars (\\u{00000000}).\n\n while (size < 12) {\n const code = body.charCodeAt(position + size++); // Closing Brace (})\n\n if (code === 0x007d) {\n // Must be at least 5 chars (\\u{0}) and encode a Unicode scalar value.\n if (size < 5 || !isUnicodeScalarValue(point)) {\n break;\n }\n\n return {\n value: String.fromCodePoint(point),\n size,\n };\n } // Append this hex digit to the code point.\n\n point = (point << 4) | readHexDigit(code);\n\n if (point < 0) {\n break;\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(\n position,\n position + size,\n )}\".`,\n );\n}\n\nfunction readEscapedUnicodeFixedWidth(lexer, position) {\n const body = lexer.source.body;\n const code = read16BitHexCode(body, position + 2);\n\n if (isUnicodeScalarValue(code)) {\n return {\n value: String.fromCodePoint(code),\n size: 6,\n };\n } // GraphQL allows JSON-style surrogate pair escape sequences, but only when\n // a valid pair is formed.\n\n if (isLeadingSurrogate(code)) {\n // \\u\n if (\n body.charCodeAt(position + 6) === 0x005c &&\n body.charCodeAt(position + 7) === 0x0075\n ) {\n const trailingCode = read16BitHexCode(body, position + 8);\n\n if (isTrailingSurrogate(trailingCode)) {\n // JavaScript defines strings as a sequence of UTF-16 code units and\n // encodes Unicode code points above U+FFFF using a surrogate pair of\n // code units. Since this is a surrogate pair escape sequence, just\n // include both codes into the JavaScript string value. Had JavaScript\n // not been internally based on UTF-16, then this surrogate pair would\n // be decoded to retrieve the supplementary code point.\n return {\n value: String.fromCodePoint(code, trailingCode),\n size: 12,\n };\n }\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(position, position + 6)}\".`,\n );\n}\n/**\n * Reads four hexadecimal characters and returns the positive integer that 16bit\n * hexadecimal string represents. For example, \"000f\" will return 15, and \"dead\"\n * will return 57005.\n *\n * Returns a negative number if any char was not a valid hexadecimal digit.\n *\n * @internal\n */\n\nfunction read16BitHexCode(body, position) {\n // readHexDigit() returns -1 on error. ORing a negative value with any other\n // value always produces a negative value.\n return (\n (readHexDigit(body.charCodeAt(position)) << 12) |\n (readHexDigit(body.charCodeAt(position + 1)) << 8) |\n (readHexDigit(body.charCodeAt(position + 2)) << 4) |\n readHexDigit(body.charCodeAt(position + 3))\n );\n}\n/**\n * Reads a hexadecimal character and returns its positive integer value (0-15).\n *\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 if the provided character code was not a valid hexadecimal digit.\n *\n * HexDigit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * - `A` `B` `C` `D` `E` `F`\n * - `a` `b` `c` `d` `e` `f`\n *\n * @internal\n */\n\nfunction readHexDigit(code) {\n return code >= 0x0030 && code <= 0x0039 // 0-9\n ? code - 0x0030\n : code >= 0x0041 && code <= 0x0046 // A-F\n ? code - 0x0037\n : code >= 0x0061 && code <= 0x0066 // a-f\n ? code - 0x0057\n : -1;\n}\n/**\n * | Escaped Character | Code Point | Character Name |\n * | ----------------- | ---------- | ---------------------------- |\n * | `\"` | U+0022 | double quote |\n * | `\\` | U+005C | reverse solidus (back slash) |\n * | `/` | U+002F | solidus (forward slash) |\n * | `b` | U+0008 | backspace |\n * | `f` | U+000C | form feed |\n * | `n` | U+000A | line feed (new line) |\n * | `r` | U+000D | carriage return |\n * | `t` | U+0009 | horizontal tab |\n *\n * @internal\n */\n\nfunction readEscapedCharacter(lexer, position) {\n const body = lexer.source.body;\n const code = body.charCodeAt(position + 1);\n\n switch (code) {\n case 0x0022:\n // \"\n return {\n value: '\\u0022',\n size: 2,\n };\n\n case 0x005c:\n // \\\n return {\n value: '\\u005c',\n size: 2,\n };\n\n case 0x002f:\n // /\n return {\n value: '\\u002f',\n size: 2,\n };\n\n case 0x0062:\n // b\n return {\n value: '\\u0008',\n size: 2,\n };\n\n case 0x0066:\n // f\n return {\n value: '\\u000c',\n size: 2,\n };\n\n case 0x006e:\n // n\n return {\n value: '\\u000a',\n size: 2,\n };\n\n case 0x0072:\n // r\n return {\n value: '\\u000d',\n size: 2,\n };\n\n case 0x0074:\n // t\n return {\n value: '\\u0009',\n size: 2,\n };\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character escape sequence: \"${body.slice(\n position,\n position + 2,\n )}\".`,\n );\n}\n/**\n * Reads a block string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"\"` BlockStringCharacter* `\"\"\"`\n *\n * BlockStringCharacter ::\n * - SourceCharacter but not `\"\"\"` or `\\\"\"\"`\n * - `\\\"\"\"`\n * ```\n *\n * @internal\n */\n\nfunction readBlockString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let lineStart = lexer.lineStart;\n let position = start + 3;\n let chunkStart = position;\n let currentLine = '';\n const blockLines = [];\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Triple-Quote (\"\"\")\n\n if (\n code === 0x0022 &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n const token = createToken(\n lexer,\n TokenKind.BLOCK_STRING,\n start,\n position + 3, // Return a string of the lines joined with U+000A.\n dedentBlockStringLines(blockLines).join('\\n'),\n );\n lexer.line += blockLines.length - 1;\n lexer.lineStart = lineStart;\n return token;\n } // Escaped Triple-Quote (\\\"\"\")\n\n if (\n code === 0x005c &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022 &&\n body.charCodeAt(position + 3) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n chunkStart = position + 1; // skip only slash\n\n position += 4;\n continue;\n } // LineTerminator\n\n if (code === 0x000a || code === 0x000d) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n\n if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n currentLine = '';\n chunkStart = position;\n lineStart = position;\n continue;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * ```\n * Name ::\n * - NameStart NameContinue* [lookahead != NameContinue]\n * ```\n *\n * @internal\n */\n\nexport function readName(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position);\n\n if (isNameContinue(code)) {\n ++position;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.NAME,\n start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AAK,WAAWa,IAAW,CAAC,MAAM,KACvD,KAAY,IAEZ,EAAEA,GAGJ,IAAc,IACd,IAAaA,GACb,IAAYA;OAId,IAAIjB,EAAqBC,CAAI,GAC3B,EAAEgB;OACG,IAAIf,EAAyBE,GAAMa,CAAQ,GAChD,KAAY;OAEZ,MAAMQ,EACJjB,EAAM,QACNS,GACA,oCAAoCV,EAClCC,GACAS,CACF,EAAE,EACJ;CAEJ;CAEA,MAAMQ,EAAYjB,EAAM,QAAQS,GAAU,sBAAsB;AAClE;AAYA,SAAgBO,EAAS,GAAO,GAAO;CACrC,IAAMpB,IAAOI,EAAM,OAAO,MACpBQ,IAAaZ,EAAK,QACpBa,IAAWJ,IAAQ;CAEvB,OAAOI,IAAWD,IAAY;EAC5B,IAAMf,IAAOG,EAAK,WAAWa,CAAQ;EAErC,IAAI0B,EAAe1C,CAAI,GACrB,EAAEgB;OAEF;CAEJ;CAEA,OAAOP,EACLF,GACAf,EAAU,MACVoB,GACAI,GACAb,EAAK,MAAMS,GAAOI,CAAQ,CAC5B;AACF"}
1
+ {"version":3,"file":"lexer.js","names":["Lexer","startOfFileToken","Token","TokenKind","source","token","nextToken","readNextToken","isPunctuatorTokenKind","kind","isUnicodeScalarValue","code","isSupplementaryCodePoint","isLeadingSurrogate","body","location","isTrailingSurrogate","printCodePointAt","lexer","char","createToken","line","col","start","end","value","bodyLength","position","readComment","readBlockString","readString","isDigit","readNumber","isNameStart","readName","syntaxError","maxComments","nextCommentCount","firstCode","isFloat","readDigits","chunkStart","escape","readEscapedUnicodeVariableWidth","readEscapedUnicodeFixedWidth","readEscapedCharacter","point","size","readHexDigit","read16BitHexCode","trailingCode","lineStart","currentLine","blockLines","dedentBlockStringLines","isNameContinue"],"sources":["../../../../node_modules/graphql/language/lexer.mjs"],"sourcesContent":["/** @category Lexing */\nimport { syntaxError } from '../error/syntaxError.mjs';\nimport { Token } from './ast.mjs';\nimport { dedentBlockStringLines } from './blockString.mjs';\nimport { isDigit, isNameContinue, isNameStart } from './characterClasses.mjs';\nimport { TokenKind } from './tokenKind.mjs';\n/**\n * A Lexer interface which provides common properties and methods required for\n * lexing GraphQL source.\n *\n * @internal\n */\n\n/**\n * Given a Source object, creates a Lexer for that source.\n * A Lexer is a stateful stream generator in that every time\n * it is advanced, it returns the next token in the Source. Assuming the\n * source lexes, the final Token emitted by the lexer will be of kind\n * EOF, after which the lexer will repeatedly return the same EOF token\n * whenever called.\n */\nexport class Lexer {\n /** Source document used to derive error locations. */\n\n /** Most recent non-ignored token returned by the lexer. */\n\n /** Current non-ignored token at the lexer cursor. */\n\n /** The (1-indexed) line containing the current token. */\n\n /** Character offset where the current line starts. */\n\n /** @internal */\n\n /** @internal */\n\n /**\n * Creates a Lexer instance.\n * @param source - Source document used to derive error locations.\n * @example\n * ```ts\n * import { Lexer, Source, TokenKind } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n *\n * lexer.token.kind; // => TokenKind.SOF\n * lexer.advance().kind; // => TokenKind.BRACE_L\n * lexer.advance().value; // => 'hello'\n * lexer.advance().kind; // => TokenKind.BRACE_R\n * ```\n */\n constructor(source) {\n const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n this._maxComments = undefined;\n this._commentCount = 0;\n }\n /**\n * Returns the value used by `Object.prototype.toString`.\n * @returns The built-in string tag for this object.\n */\n\n get [Symbol.toStringTag]() {\n return 'Lexer';\n }\n /**\n * Advances the token stream to the next non-ignored token.\n * @returns The next non-ignored token.\n * @example\n * ```ts\n * import { Lexer, Source } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n * const token = lexer.advance();\n *\n * token.kind; // => '{'\n * lexer.token; // => token\n * ```\n */\n\n advance() {\n this.lastToken = this.token;\n const token = (this.token = this.lookahead());\n return token;\n }\n /**\n * Looks ahead and returns the next non-ignored token, but does not change\n * the state of Lexer.\n * @returns The next non-ignored token without advancing the lexer.\n * @example\n * ```ts\n * import { Lexer, Source } from 'graphql/language';\n *\n * const lexer = new Lexer(new Source('{ hello }'));\n * const token = lexer.lookahead();\n *\n * token.kind; // => '{'\n * lexer.token.kind; // => '<SOF>'\n * ```\n */\n\n lookahead() {\n let token = this.token;\n\n if (token.kind !== TokenKind.EOF) {\n do {\n if (token.next) {\n token = token.next;\n } else {\n // Read the next token and form a link in the token linked-list.\n const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing.\n\n token.next = nextToken; // @ts-expect-error prev is only mutable during parsing.\n\n nextToken.prev = token;\n token = nextToken;\n }\n } while (token.kind === TokenKind.COMMENT);\n }\n\n return token;\n }\n}\n/** @internal */\n\nexport function isPunctuatorTokenKind(kind) {\n return (\n kind === TokenKind.BANG ||\n kind === TokenKind.DOLLAR ||\n kind === TokenKind.AMP ||\n kind === TokenKind.PAREN_L ||\n kind === TokenKind.PAREN_R ||\n kind === TokenKind.DOT ||\n kind === TokenKind.SPREAD ||\n kind === TokenKind.COLON ||\n kind === TokenKind.EQUALS ||\n kind === TokenKind.AT ||\n kind === TokenKind.BRACKET_L ||\n kind === TokenKind.BRACKET_R ||\n kind === TokenKind.BRACE_L ||\n kind === TokenKind.PIPE ||\n kind === TokenKind.BRACE_R\n );\n}\n/**\n * A Unicode scalar value is any Unicode code point except surrogate code\n * points. In other words, the inclusive ranges of values 0x0000 to 0xD7FF and\n * 0xE000 to 0x10FFFF.\n *\n * SourceCharacter ::\n * - \"Any Unicode scalar value\"\n *\n * @internal\n */\n\nfunction isUnicodeScalarValue(code) {\n return (\n (code >= 0x0000 && code <= 0xd7ff) || (code >= 0xe000 && code <= 0x10ffff)\n );\n}\n/**\n * The GraphQL specification defines source text as a sequence of unicode scalar\n * values (which Unicode defines to exclude surrogate code points). However\n * JavaScript defines strings as a sequence of UTF-16 code units which may\n * include surrogates. A surrogate pair is a valid source character as it\n * encodes a supplementary code point (above U+FFFF), but unpaired surrogate\n * code points are not valid source characters.\n *\n * @internal\n */\n\nfunction isSupplementaryCodePoint(body, location) {\n return (\n isLeadingSurrogate(body.charCodeAt(location)) &&\n isTrailingSurrogate(body.charCodeAt(location + 1))\n );\n}\n\nfunction isLeadingSurrogate(code) {\n return code >= 0xd800 && code <= 0xdbff;\n}\n\nfunction isTrailingSurrogate(code) {\n return code >= 0xdc00 && code <= 0xdfff;\n}\n/**\n * Prints the code point (or end of file reference) at a given location in a\n * source for use in error messages.\n *\n * Printable ASCII is printed quoted, while other points are printed in Unicode\n * code point form (ie. U+1234).\n *\n * @internal\n */\n\nexport function printCodePointAt(lexer, location) {\n const code = lexer.source.body.codePointAt(location);\n\n if (code === undefined) {\n return TokenKind.EOF;\n } else if (code >= 0x0020 && code <= 0x007e) {\n // Printable ASCII\n const char = String.fromCodePoint(code);\n return char === '\"' ? \"'\\\"'\" : `\"${char}\"`;\n } // Unicode code point\n\n return 'U+' + code.toString(16).toUpperCase().padStart(4, '0');\n}\n/**\n * Create a token with line and column location information.\n *\n * @internal\n */\n\nexport function createToken(lexer, kind, start, end, value) {\n const line = lexer.line;\n const col = 1 + start - lexer.lineStart;\n return new Token(kind, start, end, line, col, value);\n}\n/**\n * Gets the next token from the source starting at the given position.\n *\n * This skips over whitespace until it finds the next lexable token, then lexes\n * punctuators immediately or calls the appropriate helper function for more\n * complicated tokens.\n *\n * @internal\n */\n\nfunction readNextToken(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // SourceCharacter\n\n switch (code) {\n // Ignored ::\n // - UnicodeBOM\n // - WhiteSpace\n // - LineTerminator\n // - Comment\n // - Comma\n //\n // UnicodeBOM :: \"Byte Order Mark (U+FEFF)\"\n //\n // WhiteSpace ::\n // - \"Horizontal Tab (U+0009)\"\n // - \"Space (U+0020)\"\n //\n // Comma :: ,\n case 0xfeff: // <BOM>\n\n case 0x0009: // \\t\n\n case 0x0020: // <space>\n\n case 0x002c:\n // ,\n ++position;\n continue;\n // LineTerminator ::\n // - \"New Line (U+000A)\"\n // - \"Carriage Return (U+000D)\" [lookahead != \"New Line (U+000A)\"]\n // - \"Carriage Return (U+000D)\" \"New Line (U+000A)\"\n\n case 0x000a:\n // \\n\n ++position;\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n\n case 0x000d:\n // \\r\n if (body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n ++lexer.line;\n lexer.lineStart = position;\n continue;\n // Comment\n\n case 0x0023:\n // #\n return readComment(lexer, position);\n // Token ::\n // - Punctuator\n // - Name\n // - IntValue\n // - FloatValue\n // - StringValue\n //\n // Punctuator :: one of ! $ & ( ) ... : = @ [ ] { | }\n\n case 0x0021:\n // !\n return createToken(lexer, TokenKind.BANG, position, position + 1);\n\n case 0x0024:\n // $\n return createToken(lexer, TokenKind.DOLLAR, position, position + 1);\n\n case 0x0026:\n // &\n return createToken(lexer, TokenKind.AMP, position, position + 1);\n\n case 0x0028:\n // (\n return createToken(lexer, TokenKind.PAREN_L, position, position + 1);\n\n case 0x0029:\n // )\n return createToken(lexer, TokenKind.PAREN_R, position, position + 1);\n\n case 0x002e:\n // .\n if (\n body.charCodeAt(position + 1) === 0x002e &&\n body.charCodeAt(position + 2) === 0x002e\n ) {\n return createToken(lexer, TokenKind.SPREAD, position, position + 3);\n }\n\n break;\n\n case 0x003a:\n // :\n return createToken(lexer, TokenKind.COLON, position, position + 1);\n\n case 0x003d:\n // =\n return createToken(lexer, TokenKind.EQUALS, position, position + 1);\n\n case 0x0040:\n // @\n return createToken(lexer, TokenKind.AT, position, position + 1);\n\n case 0x005b:\n // [\n return createToken(lexer, TokenKind.BRACKET_L, position, position + 1);\n\n case 0x005d:\n // ]\n return createToken(lexer, TokenKind.BRACKET_R, position, position + 1);\n\n case 0x007b:\n // {\n return createToken(lexer, TokenKind.BRACE_L, position, position + 1);\n\n case 0x007c:\n // |\n return createToken(lexer, TokenKind.PIPE, position, position + 1);\n\n case 0x007d:\n // }\n return createToken(lexer, TokenKind.BRACE_R, position, position + 1);\n // StringValue\n\n case 0x0022:\n // \"\n if (\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n return readBlockString(lexer, position);\n }\n\n return readString(lexer, position);\n } // IntValue | FloatValue (Digit | -)\n\n if (isDigit(code) || code === 0x002d) {\n return readNumber(lexer, position, code);\n } // Name\n\n if (isNameStart(code)) {\n return readName(lexer, position);\n }\n\n throw syntaxError(\n lexer.source,\n position,\n code === 0x0027\n ? 'Unexpected single quote character (\\'), did you mean to use a double quote (\")?'\n : isUnicodeScalarValue(code) || isSupplementaryCodePoint(body, position)\n ? `Unexpected character: ${printCodePointAt(lexer, position)}.`\n : `Invalid character: ${printCodePointAt(lexer, position)}.`,\n );\n }\n\n return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength);\n}\n/**\n * Reads a comment token from the source file.\n *\n * ```\n * Comment :: # CommentChar* [lookahead != CommentChar]\n *\n * CommentChar :: SourceCharacter but not LineTerminator\n * ```\n *\n * @internal\n */\n\nfunction readComment(lexer, start) {\n const maxComments = lexer._maxComments;\n\n if (maxComments !== undefined) {\n const nextCommentCount = lexer._commentCount + 1;\n\n if (nextCommentCount > maxComments) {\n throw syntaxError(\n lexer.source,\n start,\n `Document contains more than ${maxComments} comments. Parsing aborted.`,\n );\n }\n\n lexer._commentCount = nextCommentCount;\n }\n\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.COMMENT,\n start,\n position,\n body.slice(start + 1, position),\n );\n}\n/**\n * Reads a number token from the source file, either a FloatValue or an IntValue\n * depending on whether a FractionalPart or ExponentPart is encountered.\n *\n * ```\n * IntValue :: IntegerPart [lookahead != {Digit, `.`, NameStart}]\n *\n * IntegerPart ::\n * - NegativeSign? 0\n * - NegativeSign? NonZeroDigit Digit*\n *\n * NegativeSign :: -\n *\n * NonZeroDigit :: Digit but not `0`\n *\n * FloatValue ::\n * - IntegerPart FractionalPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart FractionalPart [lookahead != {Digit, `.`, NameStart}]\n * - IntegerPart ExponentPart [lookahead != {Digit, `.`, NameStart}]\n *\n * FractionalPart :: . Digit+\n *\n * ExponentPart :: ExponentIndicator Sign? Digit+\n *\n * ExponentIndicator :: one of `e` `E`\n *\n * Sign :: one of + -\n * ```\n *\n * @internal\n */\n\nfunction readNumber(lexer, start, firstCode) {\n const body = lexer.source.body;\n let position = start;\n let code = firstCode;\n let isFloat = false; // NegativeSign (-)\n\n if (code === 0x002d) {\n code = body.charCodeAt(++position);\n } // Zero (0)\n\n if (code === 0x0030) {\n code = body.charCodeAt(++position);\n\n if (isDigit(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, unexpected digit after 0: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n } else {\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Full stop (.)\n\n if (code === 0x002e) {\n isFloat = true;\n code = body.charCodeAt(++position);\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // E e\n\n if (code === 0x0045 || code === 0x0065) {\n isFloat = true;\n code = body.charCodeAt(++position); // + -\n\n if (code === 0x002b || code === 0x002d) {\n code = body.charCodeAt(++position);\n }\n\n position = readDigits(lexer, position, code);\n code = body.charCodeAt(position);\n } // Numbers cannot be followed by . or NameStart\n\n if (code === 0x002e || isNameStart(code)) {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n\n return createToken(\n lexer,\n isFloat ? TokenKind.FLOAT : TokenKind.INT,\n start,\n position,\n body.slice(start, position),\n );\n}\n/**\n * Returns the new position in the source after reading one or more digits.\n *\n * @internal\n */\n\nfunction readDigits(lexer, start, firstCode) {\n if (!isDigit(firstCode)) {\n throw syntaxError(\n lexer.source,\n start,\n `Invalid number, expected digit but got: ${printCodePointAt(\n lexer,\n start,\n )}.`,\n );\n }\n\n const body = lexer.source.body;\n let position = start + 1; // +1 to skip first firstCode\n\n while (isDigit(body.charCodeAt(position))) {\n ++position;\n }\n\n return position;\n}\n/**\n * Reads a single-quote string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"` [lookahead != `\"`]\n * - `\"` StringCharacter+ `\"`\n *\n * StringCharacter ::\n * - SourceCharacter but not `\"` or `\\` or LineTerminator\n * - `\\u` EscapedUnicode\n * - `\\` EscapedCharacter\n *\n * EscapedUnicode ::\n * - `{` HexDigit+ `}`\n * - HexDigit HexDigit HexDigit HexDigit\n *\n * EscapedCharacter :: one of `\"` `\\` `/` `b` `f` `n` `r` `t`\n * ```\n *\n * @internal\n */\n\nfunction readString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n let chunkStart = position;\n let value = '';\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Quote (\")\n\n if (code === 0x0022) {\n value += body.slice(chunkStart, position);\n return createToken(lexer, TokenKind.STRING, start, position + 1, value);\n } // Escape Sequence (\\)\n\n if (code === 0x005c) {\n value += body.slice(chunkStart, position);\n const escape =\n body.charCodeAt(position + 1) === 0x0075 // u\n ? body.charCodeAt(position + 2) === 0x007b // {\n ? readEscapedUnicodeVariableWidth(lexer, position)\n : readEscapedUnicodeFixedWidth(lexer, position)\n : readEscapedCharacter(lexer, position);\n value += escape.value;\n position += escape.size;\n chunkStart = position;\n continue;\n } // LineTerminator (\\n | \\r)\n\n if (code === 0x000a || code === 0x000d) {\n break;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n} // The string value and lexed size of an escape sequence.\n\nfunction readEscapedUnicodeVariableWidth(lexer, position) {\n const body = lexer.source.body;\n let point = 0;\n let size = 3; // Cannot be larger than 12 chars (\\u{00000000}).\n\n while (size < 12) {\n const code = body.charCodeAt(position + size++); // Closing Brace (})\n\n if (code === 0x007d) {\n // Must be at least 5 chars (\\u{0}) and encode a Unicode scalar value.\n if (size < 5 || !isUnicodeScalarValue(point)) {\n break;\n }\n\n return {\n value: String.fromCodePoint(point),\n size,\n };\n } // Append this hex digit to the code point.\n\n point = (point << 4) | readHexDigit(code);\n\n if (point < 0) {\n break;\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(\n position,\n position + size,\n )}\".`,\n );\n}\n\nfunction readEscapedUnicodeFixedWidth(lexer, position) {\n const body = lexer.source.body;\n const code = read16BitHexCode(body, position + 2);\n\n if (isUnicodeScalarValue(code)) {\n return {\n value: String.fromCodePoint(code),\n size: 6,\n };\n } // GraphQL allows JSON-style surrogate pair escape sequences, but only when\n // a valid pair is formed.\n\n if (isLeadingSurrogate(code)) {\n // \\u\n if (\n body.charCodeAt(position + 6) === 0x005c &&\n body.charCodeAt(position + 7) === 0x0075\n ) {\n const trailingCode = read16BitHexCode(body, position + 8);\n\n if (isTrailingSurrogate(trailingCode)) {\n // JavaScript defines strings as a sequence of UTF-16 code units and\n // encodes Unicode code points above U+FFFF using a surrogate pair of\n // code units. Since this is a surrogate pair escape sequence, just\n // include both codes into the JavaScript string value. Had JavaScript\n // not been internally based on UTF-16, then this surrogate pair would\n // be decoded to retrieve the supplementary code point.\n return {\n value: String.fromCodePoint(code, trailingCode),\n size: 12,\n };\n }\n }\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid Unicode escape sequence: \"${body.slice(position, position + 6)}\".`,\n );\n}\n/**\n * Reads four hexadecimal characters and returns the positive integer that 16bit\n * hexadecimal string represents. For example, \"000f\" will return 15, and \"dead\"\n * will return 57005.\n *\n * Returns a negative number if any char was not a valid hexadecimal digit.\n *\n * @internal\n */\n\nfunction read16BitHexCode(body, position) {\n // readHexDigit() returns -1 on error. ORing a negative value with any other\n // value always produces a negative value.\n return (\n (readHexDigit(body.charCodeAt(position)) << 12) |\n (readHexDigit(body.charCodeAt(position + 1)) << 8) |\n (readHexDigit(body.charCodeAt(position + 2)) << 4) |\n readHexDigit(body.charCodeAt(position + 3))\n );\n}\n/**\n * Reads a hexadecimal character and returns its positive integer value (0-15).\n *\n * '0' becomes 0, '9' becomes 9\n * 'A' becomes 10, 'F' becomes 15\n * 'a' becomes 10, 'f' becomes 15\n *\n * Returns -1 if the provided character code was not a valid hexadecimal digit.\n *\n * HexDigit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * - `A` `B` `C` `D` `E` `F`\n * - `a` `b` `c` `d` `e` `f`\n *\n * @internal\n */\n\nfunction readHexDigit(code) {\n return code >= 0x0030 && code <= 0x0039 // 0-9\n ? code - 0x0030\n : code >= 0x0041 && code <= 0x0046 // A-F\n ? code - 0x0037\n : code >= 0x0061 && code <= 0x0066 // a-f\n ? code - 0x0057\n : -1;\n}\n/**\n * | Escaped Character | Code Point | Character Name |\n * | ----------------- | ---------- | ---------------------------- |\n * | `\"` | U+0022 | double quote |\n * | `\\` | U+005C | reverse solidus (back slash) |\n * | `/` | U+002F | solidus (forward slash) |\n * | `b` | U+0008 | backspace |\n * | `f` | U+000C | form feed |\n * | `n` | U+000A | line feed (new line) |\n * | `r` | U+000D | carriage return |\n * | `t` | U+0009 | horizontal tab |\n *\n * @internal\n */\n\nfunction readEscapedCharacter(lexer, position) {\n const body = lexer.source.body;\n const code = body.charCodeAt(position + 1);\n\n switch (code) {\n case 0x0022:\n // \"\n return {\n value: '\\u0022',\n size: 2,\n };\n\n case 0x005c:\n // \\\n return {\n value: '\\u005c',\n size: 2,\n };\n\n case 0x002f:\n // /\n return {\n value: '\\u002f',\n size: 2,\n };\n\n case 0x0062:\n // b\n return {\n value: '\\u0008',\n size: 2,\n };\n\n case 0x0066:\n // f\n return {\n value: '\\u000c',\n size: 2,\n };\n\n case 0x006e:\n // n\n return {\n value: '\\u000a',\n size: 2,\n };\n\n case 0x0072:\n // r\n return {\n value: '\\u000d',\n size: 2,\n };\n\n case 0x0074:\n // t\n return {\n value: '\\u0009',\n size: 2,\n };\n }\n\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character escape sequence: \"${body.slice(\n position,\n position + 2,\n )}\".`,\n );\n}\n/**\n * Reads a block string token from the source file.\n *\n * ```\n * StringValue ::\n * - `\"\"\"` BlockStringCharacter* `\"\"\"`\n *\n * BlockStringCharacter ::\n * - SourceCharacter but not `\"\"\"` or `\\\"\"\"`\n * - `\\\"\"\"`\n * ```\n *\n * @internal\n */\n\nfunction readBlockString(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let lineStart = lexer.lineStart;\n let position = start + 3;\n let chunkStart = position;\n let currentLine = '';\n const blockLines = [];\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position); // Closing Triple-Quote (\"\"\")\n\n if (\n code === 0x0022 &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n const token = createToken(\n lexer,\n TokenKind.BLOCK_STRING,\n start,\n position + 3, // Return a string of the lines joined with U+000A.\n dedentBlockStringLines(blockLines).join('\\n'),\n );\n lexer.line += blockLines.length - 1;\n lexer.lineStart = lineStart;\n return token;\n } // Escaped Triple-Quote (\\\"\"\")\n\n if (\n code === 0x005c &&\n body.charCodeAt(position + 1) === 0x0022 &&\n body.charCodeAt(position + 2) === 0x0022 &&\n body.charCodeAt(position + 3) === 0x0022\n ) {\n currentLine += body.slice(chunkStart, position);\n chunkStart = position + 1; // skip only slash\n\n position += 4;\n continue;\n } // LineTerminator\n\n if (code === 0x000a || code === 0x000d) {\n currentLine += body.slice(chunkStart, position);\n blockLines.push(currentLine);\n\n if (code === 0x000d && body.charCodeAt(position + 1) === 0x000a) {\n position += 2;\n } else {\n ++position;\n }\n\n currentLine = '';\n chunkStart = position;\n lineStart = position;\n continue;\n } // SourceCharacter\n\n if (isUnicodeScalarValue(code)) {\n ++position;\n } else if (isSupplementaryCodePoint(body, position)) {\n position += 2;\n } else {\n throw syntaxError(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw syntaxError(lexer.source, position, 'Unterminated string.');\n}\n/**\n * Reads an alphanumeric + underscore name from the source.\n *\n * ```\n * Name ::\n * - NameStart NameContinue* [lookahead != NameContinue]\n * ```\n *\n * @internal\n */\n\nexport function readName(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n let position = start + 1;\n\n while (position < bodyLength) {\n const code = body.charCodeAt(position);\n\n if (isNameContinue(code)) {\n ++position;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n TokenKind.NAME,\n start,\n position,\n body.slice(start, position),\n );\n}\n"],"ignoreList":[0],"mappings":";;;;;;AAqBA,IAAaA,IAAb,MAAmB;CA8BjB,YAAY,GAAQ;EAClB,IAAMC,IAAmB,IAAIC,EAAMC,EAAU,KAAK,GAAG,GAAG,GAAG,CAAC;EAO5D,AANA,KAAK,SAASC,GACd,KAAK,YAAYH,GACjB,KAAK,QAAQA,GACb,KAAK,OAAO,GACZ,KAAK,YAAY,GACjB,KAAK,eAAe,KAAA,GACpB,KAAK,gBAAgB;CACvB;CAMA,KAAK,OAAO,eAAe;EACzB,OAAO;CACT;CAgBA,UAAU;EAGR,OAFA,KAAK,YAAY,KAAK,OAEf,KADa,QAAQ,KAAK,UAAU;CAE7C;CAiBA,YAAY;EACV,IAAII,IAA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A,oCAAoCV,EAClCC,GACAS,CACF,EAAE,EACJ;CAEJ;CAEA,MAAMQ,EAAYjB,EAAM,QAAQS,GAAU,sBAAsB;AAClE;AAYA,SAAgBO,EAAS,GAAO,GAAO;CACrC,IAAMpB,IAAOI,EAAM,OAAO,MACpBQ,IAAaZ,EAAK,QACpBa,IAAWJ,IAAQ;CAEvB,OAAOI,IAAWD,IAAY;EAC5B,IAAMf,IAAOG,EAAK,WAAWa,CAAQ;EAErC,IAAI4B,EAAe5C,CAAI,GACrB,EAAEgB;OAEF;CAEJ;CAEA,OAAOP,EACLF,GACAf,EAAU,MACVoB,GACAI,GACAb,EAAK,MAAMS,GAAOI,CAAQ,CAC5B;AACF"}
@@ -1,17 +1,36 @@
1
- import { invariant as e } from "../jsutils/invariant.js";
2
1
  // node_modules/graphql/language/location.mjs
3
- var t = /\r\n|[\n\r]/g;
4
- function n(n, r) {
5
- let i = 0, a = 1;
6
- for (let o of n.body.matchAll(t)) {
7
- if (typeof o.index == "number" || e(!1), o.index >= r) break;
8
- i = o.index + o[0].length, a += 1;
9
- }
2
+ function e(e, t) {
3
+ let n = /\r\n|[\n\r]/g, r = 1, i = t + 1, a;
4
+ for (; (a = n.exec(e.body)) && a.index < t;) r++, i = t + 1 - (a.index + a[0].length);
10
5
  return {
11
- line: a,
12
- column: r + 1 - i
6
+ line: r,
7
+ column: i
13
8
  };
14
9
  }
15
- export { n as getLocation };
10
+ function t(t) {
11
+ if (t.length < 2) return t.map(({ source: t, start: n }) => e(t, n));
12
+ let n = /* @__PURE__ */ new Map();
13
+ t.forEach(({ source: e, start: t }, r) => {
14
+ let i = n.get(e);
15
+ i === void 0 && (i = [], n.set(e, i)), i.push({
16
+ position: t,
17
+ index: r
18
+ });
19
+ });
20
+ let r = Array(t.length);
21
+ for (let [e, t] of n) {
22
+ let n = /\r\n|[\n\r]/g, i = n.exec(e.body), a = 1, o = 0;
23
+ t.sort((e, t) => e.position - t.position);
24
+ for (let { position: s, index: c } of t) {
25
+ for (; i !== null && i.index < s;) o = i.index + i[0].length, a++, i = n.exec(e.body);
26
+ r[c] = {
27
+ line: a,
28
+ column: s + 1 - o
29
+ };
30
+ }
31
+ }
32
+ return r;
33
+ }
34
+ export { e as getLocation, t as getLocations };
16
35
 
17
36
  //# sourceMappingURL=location.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"location.js","names":["LineRegExp","getLocation","lastLineStart","line","match","source","invariant","position"],"sources":["../../../../node_modules/graphql/language/location.mjs"],"sourcesContent":["/** @category Source */\nimport { invariant } from '../jsutils/invariant.mjs';\nconst LineRegExp = /\\r\\n|[\\n\\r]/g;\n/** Represents a location in a Source. */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n * @param source - The source document that contains the position.\n * @param position - The UTF-8 character offset in the source body.\n * @returns The 1-indexed line and column for the given source position.\n * @example\n * ```ts\n * import { Source, getLocation } from 'graphql/language';\n *\n * const source = new Source('type Query { hello: String }');\n * const location = getLocation(source, 13);\n *\n * location; // => { line: 1, column: 14 }\n * ```\n */\nexport function getLocation(source, position) {\n let lastLineStart = 0;\n let line = 1;\n\n for (const match of source.body.matchAll(LineRegExp)) {\n typeof match.index === 'number' || invariant(false);\n\n if (match.index >= position) {\n break;\n }\n\n lastLineStart = match.index + match[0].length;\n line += 1;\n }\n\n return {\n line,\n column: position + 1 - lastLineStart,\n };\n}\n"],"ignoreList":[0],"mappings":";;AAEA,IAAMA,IAAa;AAmBnB,SAAgBC,EAAY,GAAQ,GAAU;CAC5C,IAAIC,IAAgB,GAChBC,IAAO;CAEX,KAAK,IAAMC,KAASC,EAAO,KAAK,SAASL,CAAU,GAAG;EAGpD,IAFA,OAAOI,EAAM,SAAU,YAAYE,EAAU,EAAK,GAE9CF,EAAM,SAASG,GACjB;EAIF,AADA,IAAgBH,EAAM,QAAQA,EAAM,EAAE,CAAC,QACvC,KAAQ;CACV;CAEA,OAAO;EACL;EACA,QAAQG,IAAW,IAAIL;CACzB;AACF"}
1
+ {"version":3,"file":"location.js","names":["getLocation","lineRegexp","line","column","position","match","source","getLocations","locations","start","bySource","positions","result","lastLineStart","a","b","index"],"sources":["../../../../node_modules/graphql/language/location.mjs"],"sourcesContent":["/** @category Source */\n\n/** Represents a location in a Source. */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n * @param source - The source document that contains the position.\n * @param position - The UTF-8 character offset in the source body.\n * @returns The 1-indexed line and column for the given source position.\n * @example\n * ```ts\n * import { Source, getLocation } from 'graphql/language';\n *\n * const source = new Source('type Query { hello: String }');\n * const location = getLocation(source, 13); // => { line: 1, column: 14 }\n * ```\n */\nexport function getLocation(source, position) {\n const lineRegexp = /\\r\\n|[\\n\\r]/g;\n let line = 1;\n let column = position + 1;\n let match;\n\n while ((match = lineRegexp.exec(source.body)) && match.index < position) {\n line++;\n column = position + 1 - (match.index + match[0].length);\n }\n\n return {\n line,\n column,\n };\n}\n/** @internal */\n\nexport function getLocations(locations) {\n if (locations.length < 2) {\n return locations.map(({ source, start }) => getLocation(source, start));\n }\n\n const bySource = new Map();\n locations.forEach(({ source, start }, index) => {\n let positions = bySource.get(source);\n\n if (positions === undefined) {\n positions = [];\n bySource.set(source, positions);\n }\n\n positions.push({\n position: start,\n index,\n });\n });\n const result = new Array(locations.length);\n\n for (const [source, positions] of bySource) {\n const lineRegexp = /\\r\\n|[\\n\\r]/g;\n let match = lineRegexp.exec(source.body);\n let line = 1;\n let lastLineStart = 0; // These arrays are local; sorting never changes the caller's input.\n\n positions.sort((a, b) => a.position - b.position);\n\n for (const { position, index } of positions) {\n while (match !== null && match.index < position) {\n lastLineStart = match.index + match[0].length;\n line++;\n match = lineRegexp.exec(source.body);\n }\n\n result[index] = {\n line,\n column: position + 1 - lastLineStart,\n };\n }\n }\n\n return result;\n}\n"],"ignoreList":[0],"mappings":";AAkBA,SAAgBA,EAAY,GAAQ,GAAU;CAC5C,IAAMC,IAAa,gBACfC,IAAO,GACPC,IAASC,IAAW,GACpBC;CAEJ,QAAQ,IAAQJ,EAAW,KAAKK,EAAO,IAAI,MAAMD,EAAM,QAAQD,IAE7D,AADA,KACA,IAASA,IAAW,KAAKC,EAAM,QAAQA,EAAM,EAAE,CAAC;CAGlD,OAAO;EACL;EACA;CACF;AACF;AAGA,SAAgBE,EAAa,GAAW;CACtC,IAAIC,EAAU,SAAS,GACrB,OAAOA,EAAU,KAAK,EAAE,WAAQ,eAAYR,EAAYM,GAAQG,CAAK,CAAC;CAGxE,IAAMC,oBAAW,IAAI,IAAI;CACzB,EAAU,SAAS,EAAE,WAAQ,YAAS,MAAU;EAC9C,IAAIC,IAAYD,EAAS,IAAIJ,CAAM;EAOnC,AALIK,MAAc,KAAA,MAChB,IAAY,CAAC,GACbD,EAAS,IAAIJ,GAAQK,CAAS,IAGhCA,EAAU,KAAK;GACb,UAAUF;GACV;EACF,CAAC;CACH,CAAC;CACD,IAAMG,IAAa,MAAMJ,EAAU,MAAM;CAEzC,KAAK,IAAM,CAACF,GAAQK,MAAcD,GAAU;EAC1C,IAAMT,IAAa,gBACfI,IAAQJ,EAAW,KAAKK,EAAO,IAAI,GACnCJ,IAAO,GACPW,IAAgB;EAEpB,EAAU,MAAM,GAAG,MAAMC,EAAE,WAAWC,EAAE,QAAQ;EAEhD,KAAK,IAAM,EAAE,aAAU,cAAWJ,GAAW;GAC3C,OAAON,MAAU,QAAQA,EAAM,QAAQD,IAGrC,AAFA,IAAgBC,EAAM,QAAQA,EAAM,EAAE,CAAC,QACvC,KACA,IAAQJ,EAAW,KAAKK,EAAO,IAAI;GAGrC,EAAOU,KAAS;IACd;IACA,QAAQZ,IAAW,IAAIS;GACzB;EACF;CACF;CAEA,OAAOD;AACT"}
@@ -14,14 +14,16 @@ function u(e, t) {
14
14
  }), r;
15
15
  }
16
16
  var d = class {
17
- constructor(e, t = {}) {
18
- let { lexer: n, ...r } = t;
19
- if (n) this._lexer = n;
17
+ constructor(t, n = {}) {
18
+ let { lexer: r, ...i } = n;
19
+ if (r) this._lexer = r;
20
20
  else {
21
- let t = c(e) ? e : new s(e);
22
- this._lexer = new a(t);
21
+ let e = c(t) ? t : new s(t);
22
+ this._lexer = new a(e);
23
23
  }
24
- this._options = r, this._tokenCounter = 0;
24
+ this._options = i, this._tokenCounter = 0, this._lexer._maxComments = n?.maxComments, this._lexer._commentCount = 0;
25
+ let o = n?.maxSourceLength;
26
+ if (o !== void 0 && this._lexer.source.body.length > o) throw e(this._lexer.source, o, `Source contains more than ${o} UTF-16 code units. Parsing aborted.`);
25
27
  }
26
28
  get tokenCount() {
27
29
  return this._tokenCounter;
@@ -675,7 +677,7 @@ var d = class {
675
677
  return n;
676
678
  }
677
679
  advanceLexer() {
678
- let { maxTokens: t } = this._options, n = this._lexer.advance();
680
+ let { maxLexicalTokens: t = this._options.maxTokens } = this._options, n = this._lexer.advance();
679
681
  if (n.kind !== l.EOF && (++this._tokenCounter, t !== void 0 && this._tokenCounter > t)) throw e(this._lexer.source, n.start, `Document contains more that ${t} tokens. Parsing aborted.`);
680
682
  }
681
683
  };