@powerhousedao/workflow 6.2.3-dev.29 → 6.2.3-dev.31

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 (374) hide show
  1. package/README.md +8 -8
  2. package/dist/browser/BlockSelector-BHJQOhie.js +3051 -0
  3. package/dist/browser/BlockSelector-BHJQOhie.js.map +1 -0
  4. package/dist/browser/{connection-form-D-NETdDQ.js → connection-form-CaduwBiu.js} +349 -50
  5. package/dist/browser/connection-form-CaduwBiu.js.map +1 -0
  6. package/dist/browser/{data-tree-DA4sc7B7.js → data-tree-8219PVfh.js} +2 -2
  7. package/dist/browser/{data-tree-DA4sc7B7.js.map → data-tree-8219PVfh.js.map} +1 -1
  8. package/dist/browser/document-models/index.js +2 -2
  9. package/dist/browser/document-models/workflow/index.js +3 -3
  10. package/dist/browser/{document-models-BohsduV4.js → document-models-C1ZgIZyV.js} +7 -2
  11. package/dist/browser/{document-models-BohsduV4.js.map → document-models-C1ZgIZyV.js.map} +1 -1
  12. package/dist/browser/{editor-B6N0PCuZ.js → editor-BHV1MZS8.js} +2437 -6283
  13. package/dist/browser/editor-BHV1MZS8.js.map +1 -0
  14. package/dist/{node/editor-StBssjcQ.mjs → browser/editor-C0C1eB0R.js} +385 -119
  15. package/dist/browser/editor-C0C1eB0R.js.map +1 -0
  16. package/dist/browser/{editor-BkdwuOC-.js → editor-CFcXlZY2.js} +14 -24
  17. package/dist/browser/editor-CFcXlZY2.js.map +1 -0
  18. package/dist/browser/editors/connection-editor/module.js +1 -1
  19. package/dist/browser/editors/workflow-editor/module.js +1 -1
  20. package/dist/browser/editors/workflow-studio/module.js +1 -1
  21. package/dist/browser/index.js +97 -43
  22. package/dist/browser/index.js.map +1 -1
  23. package/dist/browser/{module-Bkms70LV.js → module-DU2vb3FH.js} +574 -94
  24. package/dist/browser/module-DU2vb3FH.js.map +1 -0
  25. package/dist/browser/{piece-auth-Z4mZEOtL.js → piece-auth-BS5CtQOG.js} +45 -12
  26. package/dist/browser/piece-auth-BS5CtQOG.js.map +1 -0
  27. package/dist/browser/reactor/index.js +2 -2
  28. package/dist/browser/runtime-queries-Ds2kk-Ow.js +2535 -0
  29. package/dist/browser/runtime-queries-Ds2kk-Ow.js.map +1 -0
  30. package/dist/browser/trigger-text-BkcklsMX.js +5569 -0
  31. package/dist/browser/trigger-text-BkcklsMX.js.map +1 -0
  32. package/dist/browser/{upgrade-manifests-BLrv3cf2.js → upgrade-manifests-BpakVE9l.js} +2 -2
  33. package/dist/browser/{upgrade-manifests-BLrv3cf2.js.map → upgrade-manifests-BpakVE9l.js.map} +1 -1
  34. package/dist/browser/{workflow-CGtVlhr8.js → workflow-BxShRhVy.js} +3 -2
  35. package/dist/browser/workflow-BxShRhVy.js.map +1 -0
  36. package/dist/node/BlockSelector-lOcIiaqt.mjs +3055 -0
  37. package/dist/node/BlockSelector-lOcIiaqt.mjs.map +1 -0
  38. package/dist/node/{connection-form-C9vbfSnA.mjs → connection-form-DWt29kft.mjs} +349 -50
  39. package/dist/node/connection-form-DWt29kft.mjs.map +1 -0
  40. package/dist/node/{data-tree-CbqpF3lC.mjs → data-tree-Cdx85Y19.mjs} +2 -2
  41. package/dist/node/{data-tree-CbqpF3lC.mjs.map → data-tree-Cdx85Y19.mjs.map} +1 -1
  42. package/dist/node/document-models/index.mjs +2 -2
  43. package/dist/node/document-models/workflow/index.mjs +3 -3
  44. package/dist/{browser/editor-CZ5NvCyv.js → node/editor-CR823u-y.mjs} +385 -119
  45. package/dist/node/editor-CR823u-y.mjs.map +1 -0
  46. package/dist/node/{editor-DP36YDk5.mjs → editor-CwX-G2Jv.mjs} +2437 -7479
  47. package/dist/node/editor-CwX-G2Jv.mjs.map +1 -0
  48. package/dist/node/{editor-By9BHI8e.mjs → editor-D_t8OtZn.mjs} +14 -24
  49. package/dist/node/editor-D_t8OtZn.mjs.map +1 -0
  50. package/dist/node/editors/connection-editor/module.mjs +1 -1
  51. package/dist/node/editors/workflow-editor/module.mjs +1 -1
  52. package/dist/node/editors/workflow-studio/module.mjs +1 -1
  53. package/dist/node/index.mjs +102 -43
  54. package/dist/node/index.mjs.map +1 -1
  55. package/dist/node/{module-DuxxhgKs.mjs → module-Dhe5E-VA.mjs} +574 -94
  56. package/dist/node/module-Dhe5E-VA.mjs.map +1 -0
  57. package/dist/node/{piece-auth-Z4mZEOtL.mjs → piece-auth-BS5CtQOG.mjs} +45 -12
  58. package/dist/node/piece-auth-BS5CtQOG.mjs.map +1 -0
  59. package/dist/node/pieces/index.mjs +0 -1
  60. package/dist/node/pieces/index.mjs.map +1 -1
  61. package/dist/node/pieces/reactor/descriptor.json +85 -3
  62. package/dist/node/pieces/reactor/index.mjs +14843 -163
  63. package/dist/node/pieces/reactor/index.mjs.map +1 -1
  64. package/dist/node/pieces/reactor/package.json +1 -1
  65. package/dist/node/runtime-queries-D5EGaCrH.mjs +2544 -0
  66. package/dist/node/runtime-queries-D5EGaCrH.mjs.map +1 -0
  67. package/dist/node/trigger-text-DJIAQBWg.mjs +6765 -0
  68. package/dist/node/trigger-text-DJIAQBWg.mjs.map +1 -0
  69. package/dist/node/{upgrade-manifests-C1sl_M-H.mjs → upgrade-manifests-CmNd742Y.mjs} +2 -2
  70. package/dist/node/{upgrade-manifests-C1sl_M-H.mjs.map → upgrade-manifests-CmNd742Y.mjs.map} +1 -1
  71. package/dist/node/{workflow-C-uuQPnf.mjs → workflow-CGzYGZnr.mjs} +3 -2
  72. package/dist/node/workflow-CGzYGZnr.mjs.map +1 -0
  73. package/dist/powerhouse.manifest.json +6 -1
  74. package/dist/style.css +151 -19
  75. package/dist/types/ai/tools.d.ts +3 -1
  76. package/dist/types/ai/tools.d.ts.map +1 -1
  77. package/dist/types/ai/workflow-tools.d.ts.map +1 -1
  78. package/dist/types/document-models/document-models.d.ts +3 -0
  79. package/dist/types/document-models/document-models.d.ts.map +1 -1
  80. package/dist/types/document-models/workflow/v1/actions.d.ts +3 -0
  81. package/dist/types/document-models/workflow/v1/actions.d.ts.map +1 -1
  82. package/dist/types/document-models/workflow/v1/gen/actions.d.ts +3 -1
  83. package/dist/types/document-models/workflow/v1/gen/actions.d.ts.map +1 -1
  84. package/dist/types/document-models/workflow/v1/gen/creators.d.ts +2 -0
  85. package/dist/types/document-models/workflow/v1/gen/creators.d.ts.map +1 -1
  86. package/dist/types/document-models/workflow/v1/gen/document-model.d.ts.map +1 -1
  87. package/dist/types/document-models/workflow/v1/gen/document-schema.d.ts +3 -0
  88. package/dist/types/document-models/workflow/v1/gen/document-schema.d.ts.map +1 -1
  89. package/dist/types/document-models/workflow/v1/gen/index.d.ts +1 -0
  90. package/dist/types/document-models/workflow/v1/gen/index.d.ts.map +1 -1
  91. package/dist/types/document-models/workflow/v1/gen/ph-factories.d.ts.map +1 -1
  92. package/dist/types/document-models/workflow/v1/gen/publishing/actions.d.ts +16 -0
  93. package/dist/types/document-models/workflow/v1/gen/publishing/actions.d.ts.map +1 -0
  94. package/dist/types/document-models/workflow/v1/gen/publishing/creators.d.ts +5 -0
  95. package/dist/types/document-models/workflow/v1/gen/publishing/creators.d.ts.map +1 -0
  96. package/dist/types/document-models/workflow/v1/gen/publishing/error.d.ts +14 -0
  97. package/dist/types/document-models/workflow/v1/gen/publishing/error.d.ts.map +1 -0
  98. package/dist/types/document-models/workflow/v1/gen/publishing/operations.d.ts +12 -0
  99. package/dist/types/document-models/workflow/v1/gen/publishing/operations.d.ts.map +1 -0
  100. package/dist/types/document-models/workflow/v1/gen/reducer.d.ts.map +1 -1
  101. package/dist/types/document-models/workflow/v1/gen/runtime/actions.d.ts +6 -2
  102. package/dist/types/document-models/workflow/v1/gen/runtime/actions.d.ts.map +1 -1
  103. package/dist/types/document-models/workflow/v1/gen/runtime/creators.d.ts +3 -2
  104. package/dist/types/document-models/workflow/v1/gen/runtime/creators.d.ts.map +1 -1
  105. package/dist/types/document-models/workflow/v1/gen/runtime/error.d.ts +13 -1
  106. package/dist/types/document-models/workflow/v1/gen/runtime/error.d.ts.map +1 -1
  107. package/dist/types/document-models/workflow/v1/gen/runtime/operations.d.ts +2 -1
  108. package/dist/types/document-models/workflow/v1/gen/runtime/operations.d.ts.map +1 -1
  109. package/dist/types/document-models/workflow/v1/gen/schema/types.d.ts +102 -12
  110. package/dist/types/document-models/workflow/v1/gen/schema/types.d.ts.map +1 -1
  111. package/dist/types/document-models/workflow/v1/gen/schema/zod.d.ts +21 -1
  112. package/dist/types/document-models/workflow/v1/gen/schema/zod.d.ts.map +1 -1
  113. package/dist/types/document-models/workflow/v1/gen/steps/error.d.ts +26 -1
  114. package/dist/types/document-models/workflow/v1/gen/steps/error.d.ts.map +1 -1
  115. package/dist/types/document-models/workflow/v1/gen/trigger/error.d.ts +13 -1
  116. package/dist/types/document-models/workflow/v1/gen/trigger/error.d.ts.map +1 -1
  117. package/dist/types/document-models/workflow/v1/gen/utils.d.ts.map +1 -1
  118. package/dist/types/document-models/workflow/v1/gen/variables/error.d.ts +13 -1
  119. package/dist/types/document-models/workflow/v1/gen/variables/error.d.ts.map +1 -1
  120. package/dist/types/document-models/workflow/v1/gen/workflow/error.d.ts +13 -1
  121. package/dist/types/document-models/workflow/v1/gen/workflow/error.d.ts.map +1 -1
  122. package/dist/types/document-models/workflow/v1/module.d.ts +3 -0
  123. package/dist/types/document-models/workflow/v1/module.d.ts.map +1 -1
  124. package/dist/types/document-models/workflow/v1/src/helpers.d.ts +15 -0
  125. package/dist/types/document-models/workflow/v1/src/helpers.d.ts.map +1 -0
  126. package/dist/types/document-models/workflow/v1/src/reducers/edges.d.ts.map +1 -1
  127. package/dist/types/document-models/workflow/v1/src/reducers/publishing.d.ts +3 -0
  128. package/dist/types/document-models/workflow/v1/src/reducers/publishing.d.ts.map +1 -0
  129. package/dist/types/document-models/workflow/v1/src/reducers/runtime.d.ts.map +1 -1
  130. package/dist/types/document-models/workflow/v1/src/reducers/steps.d.ts.map +1 -1
  131. package/dist/types/document-models/workflow/v1/src/reducers/trigger.d.ts.map +1 -1
  132. package/dist/types/document-models/workflow/v1/src/reducers/variables.d.ts.map +1 -1
  133. package/dist/types/document-models/workflow/v1/src/reducers/workflow.d.ts.map +1 -1
  134. package/dist/types/document-models/workflow/v1/tests/block-validation-and-enable.test.d.ts +2 -0
  135. package/dist/types/document-models/workflow/v1/tests/block-validation-and-enable.test.d.ts.map +1 -0
  136. package/dist/types/document-models/workflow/v1/tests/config-and-variables.test.d.ts +2 -0
  137. package/dist/types/document-models/workflow/v1/tests/config-and-variables.test.d.ts.map +1 -0
  138. package/dist/types/document-models/workflow/v1/tests/draft-and-publish.test.d.ts +2 -0
  139. package/dist/types/document-models/workflow/v1/tests/draft-and-publish.test.d.ts.map +1 -0
  140. package/dist/types/document-models/workflow/v1/tests/updated-at.test.d.ts +2 -0
  141. package/dist/types/document-models/workflow/v1/tests/updated-at.test.d.ts.map +1 -0
  142. package/dist/types/editors/connection-editor/ConnectionToolbar.d.ts.map +1 -1
  143. package/dist/types/editors/connection-editor/UsedBy.d.ts.map +1 -1
  144. package/dist/types/editors/connection-editor/connection-callbacks.d.ts.map +1 -1
  145. package/dist/types/editors/connection-editor/connection-form.d.ts +2 -1
  146. package/dist/types/editors/connection-editor/connection-form.d.ts.map +1 -1
  147. package/dist/types/editors/connection-editor/connection-usage.d.ts +3 -2
  148. package/dist/types/editors/connection-editor/connection-usage.d.ts.map +1 -1
  149. package/dist/types/editors/connection-editor/editor.d.ts.map +1 -1
  150. package/dist/types/editors/connection-editor/piece-auth.d.ts +7 -1
  151. package/dist/types/editors/connection-editor/piece-auth.d.ts.map +1 -1
  152. package/dist/types/editors/connection-editor/status.d.ts +2 -1
  153. package/dist/types/editors/connection-editor/status.d.ts.map +1 -1
  154. package/dist/types/editors/shared/controls.d.ts +17 -1
  155. package/dist/types/editors/shared/controls.d.ts.map +1 -1
  156. package/dist/types/editors/shared/editor-chrome.d.ts +2 -0
  157. package/dist/types/editors/shared/editor-chrome.d.ts.map +1 -1
  158. package/dist/types/editors/shared/icons.d.ts +2 -0
  159. package/dist/types/editors/shared/icons.d.ts.map +1 -1
  160. package/dist/types/editors/shared/undo-plan.d.ts +20 -0
  161. package/dist/types/editors/shared/undo-plan.d.ts.map +1 -0
  162. package/dist/types/editors/shared/undo-plan.test.d.ts +2 -0
  163. package/dist/types/editors/shared/undo-plan.test.d.ts.map +1 -0
  164. package/dist/types/editors/workflow-editor/document/useWorkflowModel.d.ts.map +1 -1
  165. package/dist/types/editors/workflow-editor/editor.d.ts +0 -1
  166. package/dist/types/editors/workflow-editor/editor.d.ts.map +1 -1
  167. package/dist/types/editors/workflow-editor/run-kinds.d.ts +5 -0
  168. package/dist/types/editors/workflow-editor/run-kinds.d.ts.map +1 -0
  169. package/dist/types/editors/workflow-editor/runtime-api.d.ts +12 -139
  170. package/dist/types/editors/workflow-editor/runtime-api.d.ts.map +1 -1
  171. package/dist/types/editors/workflow-editor/runtime-client.d.ts +260 -0
  172. package/dist/types/editors/workflow-editor/runtime-client.d.ts.map +1 -0
  173. package/dist/types/editors/workflow-editor/runtime-client.test.d.ts +2 -0
  174. package/dist/types/editors/workflow-editor/runtime-client.test.d.ts.map +1 -0
  175. package/dist/types/editors/workflow-editor/runtime-context.d.ts +45 -0
  176. package/dist/types/editors/workflow-editor/runtime-context.d.ts.map +1 -0
  177. package/dist/types/editors/workflow-editor/runtime-persist.d.ts +23 -0
  178. package/dist/types/editors/workflow-editor/runtime-persist.d.ts.map +1 -0
  179. package/dist/types/editors/workflow-editor/runtime-persist.test.d.ts +2 -0
  180. package/dist/types/editors/workflow-editor/runtime-persist.test.d.ts.map +1 -0
  181. package/dist/types/editors/workflow-editor/runtime-queries.d.ts +128 -0
  182. package/dist/types/editors/workflow-editor/runtime-queries.d.ts.map +1 -0
  183. package/dist/types/editors/workflow-editor/ui/BlockSelector.d.ts +3 -3
  184. package/dist/types/editors/workflow-editor/ui/BlockSelector.d.ts.map +1 -1
  185. package/dist/types/editors/workflow-editor/ui/CanvasContextMenu.d.ts +4 -3
  186. package/dist/types/editors/workflow-editor/ui/CanvasContextMenu.d.ts.map +1 -1
  187. package/dist/types/editors/workflow-editor/ui/ConnectionField.d.ts +2 -3
  188. package/dist/types/editors/workflow-editor/ui/ConnectionField.d.ts.map +1 -1
  189. package/dist/types/editors/workflow-editor/ui/CreateConnectionModal.d.ts.map +1 -1
  190. package/dist/types/editors/workflow-editor/ui/ExpressionPicker.d.ts +6 -5
  191. package/dist/types/editors/workflow-editor/ui/ExpressionPicker.d.ts.map +1 -1
  192. package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts +7 -1
  193. package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts.map +1 -1
  194. package/dist/types/editors/workflow-editor/ui/PublishControls.d.ts +34 -0
  195. package/dist/types/editors/workflow-editor/ui/PublishControls.d.ts.map +1 -0
  196. package/dist/types/editors/workflow-editor/ui/ScheduleBuilder.d.ts.map +1 -1
  197. package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts +2 -3
  198. package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts.map +1 -1
  199. package/dist/types/editors/workflow-editor/ui/StepTest.d.ts +11 -0
  200. package/dist/types/editors/workflow-editor/ui/StepTest.d.ts.map +1 -0
  201. package/dist/types/editors/workflow-editor/ui/VariablesEditor.d.ts +0 -1
  202. package/dist/types/editors/workflow-editor/ui/VariablesEditor.d.ts.map +1 -1
  203. package/dist/types/editors/workflow-editor/ui/WorkflowCanvas.d.ts +1 -3
  204. package/dist/types/editors/workflow-editor/ui/WorkflowCanvas.d.ts.map +1 -1
  205. package/dist/types/editors/workflow-editor/ui/WorkflowEditorApp.d.ts +1 -3
  206. package/dist/types/editors/workflow-editor/ui/WorkflowEditorApp.d.ts.map +1 -1
  207. package/dist/types/editors/workflow-editor/ui/add-follow-up.d.ts +31 -0
  208. package/dist/types/editors/workflow-editor/ui/add-follow-up.d.ts.map +1 -0
  209. package/dist/types/editors/workflow-editor/ui/add-follow-up.test.d.ts +2 -0
  210. package/dist/types/editors/workflow-editor/ui/add-follow-up.test.d.ts.map +1 -0
  211. package/dist/types/editors/workflow-editor/ui/ap-edge.d.ts.map +1 -1
  212. package/dist/types/editors/workflow-editor/ui/ap-layout.d.ts +2 -1
  213. package/dist/types/editors/workflow-editor/ui/ap-layout.d.ts.map +1 -1
  214. package/dist/types/editors/workflow-editor/ui/ap-nodes.d.ts +7 -9
  215. package/dist/types/editors/workflow-editor/ui/ap-nodes.d.ts.map +1 -1
  216. package/dist/types/editors/workflow-editor/ui/block-meta.d.ts +10 -5
  217. package/dist/types/editors/workflow-editor/ui/block-meta.d.ts.map +1 -1
  218. package/dist/types/editors/workflow-editor/ui/blocks.d.ts +43 -2
  219. package/dist/types/editors/workflow-editor/ui/blocks.d.ts.map +1 -1
  220. package/dist/types/editors/workflow-editor/ui/blocks.test.d.ts +2 -0
  221. package/dist/types/editors/workflow-editor/ui/blocks.test.d.ts.map +1 -0
  222. package/dist/types/editors/workflow-editor/ui/canvas-menu.d.ts +4 -2
  223. package/dist/types/editors/workflow-editor/ui/canvas-menu.d.ts.map +1 -1
  224. package/dist/types/editors/workflow-editor/ui/connection-create.d.ts +3 -3
  225. package/dist/types/editors/workflow-editor/ui/connection-create.d.ts.map +1 -1
  226. package/dist/types/editors/workflow-editor/ui/design-time.d.ts +92 -0
  227. package/dist/types/editors/workflow-editor/ui/design-time.d.ts.map +1 -0
  228. package/dist/types/editors/workflow-editor/ui/design-time.test.d.ts +2 -0
  229. package/dist/types/editors/workflow-editor/ui/design-time.test.d.ts.map +1 -0
  230. package/dist/types/editors/workflow-editor/ui/expression-scope.d.ts +10 -2
  231. package/dist/types/editors/workflow-editor/ui/expression-scope.d.ts.map +1 -1
  232. package/dist/types/editors/workflow-editor/ui/forms.d.ts +35 -6
  233. package/dist/types/editors/workflow-editor/ui/forms.d.ts.map +1 -1
  234. package/dist/types/editors/workflow-editor/ui/model.d.ts +58 -13
  235. package/dist/types/editors/workflow-editor/ui/model.d.ts.map +1 -1
  236. package/dist/types/editors/workflow-editor/ui/piece-source.d.ts +11 -6
  237. package/dist/types/editors/workflow-editor/ui/piece-source.d.ts.map +1 -1
  238. package/dist/types/editors/workflow-editor/ui/prop-controls.d.ts +5 -0
  239. package/dist/types/editors/workflow-editor/ui/prop-controls.d.ts.map +1 -1
  240. package/dist/types/editors/workflow-editor/ui/prop-controls.test.d.ts +2 -0
  241. package/dist/types/editors/workflow-editor/ui/prop-controls.test.d.ts.map +1 -0
  242. package/dist/types/editors/workflow-editor/ui/prop-defaults.d.ts +4 -0
  243. package/dist/types/editors/workflow-editor/ui/prop-defaults.d.ts.map +1 -0
  244. package/dist/types/editors/workflow-editor/ui/prop-defaults.test.d.ts +2 -0
  245. package/dist/types/editors/workflow-editor/ui/prop-defaults.test.d.ts.map +1 -0
  246. package/dist/types/editors/workflow-editor/ui/query-keys.d.ts +54 -0
  247. package/dist/types/editors/workflow-editor/ui/query-keys.d.ts.map +1 -0
  248. package/dist/types/editors/workflow-editor/ui/schedule-draft.d.ts +3 -8
  249. package/dist/types/editors/workflow-editor/ui/schedule-draft.d.ts.map +1 -1
  250. package/dist/types/editors/workflow-editor/ui/secret-ref.d.ts +18 -0
  251. package/dist/types/editors/workflow-editor/ui/secret-ref.d.ts.map +1 -0
  252. package/dist/types/editors/workflow-editor/ui/step-test.d.ts +14 -0
  253. package/dist/types/editors/workflow-editor/ui/step-test.d.ts.map +1 -0
  254. package/dist/types/editors/workflow-editor/ui/step-test.test.d.ts +2 -0
  255. package/dist/types/editors/workflow-editor/ui/step-test.test.d.ts.map +1 -0
  256. package/dist/types/editors/workflow-editor/ui/test-state.d.ts +7 -0
  257. package/dist/types/editors/workflow-editor/ui/test-state.d.ts.map +1 -0
  258. package/dist/types/editors/workflow-editor/ui/trigger-text.d.ts +2 -1
  259. package/dist/types/editors/workflow-editor/ui/trigger-text.d.ts.map +1 -1
  260. package/dist/types/editors/workflow-editor/ui/use-validity.d.ts +28 -0
  261. package/dist/types/editors/workflow-editor/ui/use-validity.d.ts.map +1 -0
  262. package/dist/types/editors/workflow-editor/ui/validation.d.ts +33 -1
  263. package/dist/types/editors/workflow-editor/ui/validation.d.ts.map +1 -1
  264. package/dist/types/editors/workflow-editor/ui/variable-types.d.ts +14 -0
  265. package/dist/types/editors/workflow-editor/ui/variable-types.d.ts.map +1 -0
  266. package/dist/types/editors/workflow-editor/ui/variable-types.test.d.ts +2 -0
  267. package/dist/types/editors/workflow-editor/ui/variable-types.test.d.ts.map +1 -0
  268. package/dist/types/editors/workflow-editor/ui/version-badge.d.ts +33 -0
  269. package/dist/types/editors/workflow-editor/ui/version-badge.d.ts.map +1 -0
  270. package/dist/types/editors/workflow-editor/ui/version-badge.test.d.ts +2 -0
  271. package/dist/types/editors/workflow-editor/ui/version-badge.test.d.ts.map +1 -0
  272. package/dist/types/editors/workflow-editor/use-runtime-url.d.ts +0 -1
  273. package/dist/types/editors/workflow-editor/use-runtime-url.d.ts.map +1 -1
  274. package/dist/types/editors/workflow-studio/components/RunsTable.d.ts +1 -1
  275. package/dist/types/editors/workflow-studio/components/RunsTable.d.ts.map +1 -1
  276. package/dist/types/editors/workflow-studio/components/RunsView.d.ts +4 -1
  277. package/dist/types/editors/workflow-studio/components/RunsView.d.ts.map +1 -1
  278. package/dist/types/editors/workflow-studio/components/Sidebar.d.ts.map +1 -1
  279. package/dist/types/editors/workflow-studio/components/WorkflowBoard.d.ts +1 -1
  280. package/dist/types/editors/workflow-studio/components/WorkflowBoard.d.ts.map +1 -1
  281. package/dist/types/editors/workflow-studio/components/WorkflowHeader.d.ts +2 -1
  282. package/dist/types/editors/workflow-studio/components/WorkflowHeader.d.ts.map +1 -1
  283. package/dist/types/editors/workflow-studio/components/WorkflowMenu.d.ts +13 -0
  284. package/dist/types/editors/workflow-studio/components/WorkflowMenu.d.ts.map +1 -0
  285. package/dist/types/editors/workflow-studio/components/WorkflowSteps.d.ts +1 -1
  286. package/dist/types/editors/workflow-studio/components/WorkflowSteps.d.ts.map +1 -1
  287. package/dist/types/editors/workflow-studio/components/WorkflowStudio.d.ts +0 -1
  288. package/dist/types/editors/workflow-studio/components/WorkflowStudio.d.ts.map +1 -1
  289. package/dist/types/editors/workflow-studio/components/chain.d.ts +5 -3
  290. package/dist/types/editors/workflow-studio/components/chain.d.ts.map +1 -1
  291. package/dist/types/editors/workflow-studio/components/run-format.d.ts +11 -2
  292. package/dist/types/editors/workflow-studio/components/run-format.d.ts.map +1 -1
  293. package/dist/types/editors/workflow-studio/components/step-outline.d.ts +3 -1
  294. package/dist/types/editors/workflow-studio/components/step-outline.d.ts.map +1 -1
  295. package/dist/types/editors/workflow-studio/components/ui.d.ts +2 -0
  296. package/dist/types/editors/workflow-studio/components/ui.d.ts.map +1 -1
  297. package/dist/types/editors/workflow-studio/components/useRuns.d.ts +4 -1
  298. package/dist/types/editors/workflow-studio/components/useRuns.d.ts.map +1 -1
  299. package/dist/types/editors/workflow-studio/editor.d.ts.map +1 -1
  300. package/dist/types/pieces/index.d.ts.map +1 -1
  301. package/dist/types/pieces/reactor/lib/actions/action-list-prop.test.d.ts +2 -0
  302. package/dist/types/pieces/reactor/lib/actions/action-list-prop.test.d.ts.map +1 -0
  303. package/dist/types/pieces/reactor/lib/actions/document-create.d.ts +14 -1
  304. package/dist/types/pieces/reactor/lib/actions/document-create.d.ts.map +1 -1
  305. package/dist/types/pieces/reactor/lib/actions/document-dispatch.d.ts +14 -1
  306. package/dist/types/pieces/reactor/lib/actions/document-dispatch.d.ts.map +1 -1
  307. package/dist/types/pieces/reactor/lib/actions/document-get.d.ts +1 -0
  308. package/dist/types/pieces/reactor/lib/actions/document-get.d.ts.map +1 -1
  309. package/dist/types/pieces/reactor/lib/actions/document-schema.d.ts +1 -0
  310. package/dist/types/pieces/reactor/lib/actions/document-schema.d.ts.map +1 -1
  311. package/dist/types/pieces/reactor/lib/input-props.d.ts.map +1 -1
  312. package/dist/types/pieces/reactor/lib/input-schema.d.ts +11 -2
  313. package/dist/types/pieces/reactor/lib/input-schema.d.ts.map +1 -1
  314. package/dist/types/pieces/reactor/lib/parse.d.ts +22 -4
  315. package/dist/types/pieces/reactor/lib/parse.d.ts.map +1 -1
  316. package/dist/types/pieces/reactor/lib/reactor.d.ts +15 -1
  317. package/dist/types/pieces/reactor/lib/reactor.d.ts.map +1 -1
  318. package/dist/types/scripts/ui-stack.d.ts +53 -11
  319. package/dist/types/scripts/ui-stack.d.ts.map +1 -1
  320. package/dist/types/test/ui/block-picker.spec.d.ts +2 -0
  321. package/dist/types/test/ui/block-picker.spec.d.ts.map +1 -0
  322. package/dist/types/test/ui/branch.spec.d.ts +2 -0
  323. package/dist/types/test/ui/branch.spec.d.ts.map +1 -0
  324. package/dist/types/test/ui/canvas-logos.spec.d.ts +2 -0
  325. package/dist/types/test/ui/canvas-logos.spec.d.ts.map +1 -0
  326. package/dist/types/test/ui/fixtures.d.ts +1 -0
  327. package/dist/types/test/ui/fixtures.d.ts.map +1 -1
  328. package/dist/types/test/ui/global-setup.d.ts.map +1 -1
  329. package/dist/types/test/ui/harness/prop-controls.d.ts.map +1 -1
  330. package/dist/types/test/ui/piece-version.spec.d.ts +2 -0
  331. package/dist/types/test/ui/piece-version.spec.d.ts.map +1 -0
  332. package/dist/types/test/ui/ports.spec.d.ts +2 -0
  333. package/dist/types/test/ui/ports.spec.d.ts.map +1 -0
  334. package/dist/types/test/ui/publish.spec.d.ts +2 -0
  335. package/dist/types/test/ui/publish.spec.d.ts.map +1 -0
  336. package/dist/types/test/ui/step-test.spec.d.ts +2 -0
  337. package/dist/types/test/ui/step-test.spec.d.ts.map +1 -0
  338. package/dist/types/test/ui/variables.spec.d.ts +2 -0
  339. package/dist/types/test/ui/variables.spec.d.ts.map +1 -0
  340. package/dist/types/test/ui/webhook.spec.d.ts +2 -0
  341. package/dist/types/test/ui/webhook.spec.d.ts.map +1 -0
  342. package/dist/types/test/ui/workflow-menu.spec.d.ts +2 -0
  343. package/dist/types/test/ui/workflow-menu.spec.d.ts.map +1 -0
  344. package/package.json +11 -10
  345. package/dist/browser/BlockSelector-D24DIiSX.js +0 -1388
  346. package/dist/browser/BlockSelector-D24DIiSX.js.map +0 -1
  347. package/dist/browser/connection-form-D-NETdDQ.js.map +0 -1
  348. package/dist/browser/editor-B6N0PCuZ.js.map +0 -1
  349. package/dist/browser/editor-BkdwuOC-.js.map +0 -1
  350. package/dist/browser/editor-CZ5NvCyv.js.map +0 -1
  351. package/dist/browser/module-Bkms70LV.js.map +0 -1
  352. package/dist/browser/piece-auth-Z4mZEOtL.js.map +0 -1
  353. package/dist/browser/runtime-api-DDMQc4PB.js +0 -558
  354. package/dist/browser/runtime-api-DDMQc4PB.js.map +0 -1
  355. package/dist/browser/trigger-text-CUv5Z2Uk.js +0 -551
  356. package/dist/browser/trigger-text-CUv5Z2Uk.js.map +0 -1
  357. package/dist/browser/workflow-CGtVlhr8.js.map +0 -1
  358. package/dist/node/BlockSelector-CTmmpYxu.mjs +0 -1388
  359. package/dist/node/BlockSelector-CTmmpYxu.mjs.map +0 -1
  360. package/dist/node/connection-form-C9vbfSnA.mjs.map +0 -1
  361. package/dist/node/editor-By9BHI8e.mjs.map +0 -1
  362. package/dist/node/editor-DP36YDk5.mjs.map +0 -1
  363. package/dist/node/editor-StBssjcQ.mjs.map +0 -1
  364. package/dist/node/module-DuxxhgKs.mjs.map +0 -1
  365. package/dist/node/piece-auth-Z4mZEOtL.mjs.map +0 -1
  366. package/dist/node/runtime-api-DDMQc4PB.mjs +0 -558
  367. package/dist/node/runtime-api-DDMQc4PB.mjs.map +0 -1
  368. package/dist/node/trigger-text-Bzq6VfOQ.mjs +0 -551
  369. package/dist/node/trigger-text-Bzq6VfOQ.mjs.map +0 -1
  370. package/dist/node/workflow-C-uuQPnf.mjs.map +0 -1
  371. package/dist/types/editors/workflow-editor/runtime-api.test.d.ts +0 -2
  372. package/dist/types/editors/workflow-editor/runtime-api.test.d.ts.map +0 -1
  373. package/dist/types/editors/workflow-editor/runtime-piece-source.d.ts +0 -2
  374. package/dist/types/editors/workflow-editor/runtime-piece-source.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["F","util.jsonStringifyReplacer","core.$ZodAsyncError","util.finalizeIssue","core.config","errors.$ZodRealError","errors.$ZodError","string","number","boolean","util.nullish","util.getLengthableOrigin","util.aborted","core.$ZodAsyncError","regexes.string","regexes.number","regexes.boolean","util.prefixIssues","util.optionalKeys","util.cached","isObject","util.isObject","util.finalizeIssue","core.config","util.cleanRegex","util.isPlainObject","util.getEnumValues","util.escapeRegex","core.$ZodEncodeError","util.issue","util.normalizeParams","_void","checks.$ZodCheckMinLength","checks.$ZodCheckRegex","parse.parse","parse.safeParse","parse.parseAsync","parse.safeParseAsync","core.clone","core._string","core._url","number","core._number","core._boolean","core._any","core._unknown","core._void","util.normalizeParams","core._custom","core._coercedNumber","schemas.ZodMiniNumber","z.object","z.string","z.optional","z.boolean","z.enum","z.literal","z.any","z.unknown","z.array","z.number","z.void","z.object","z.optional","z.boolean","z.unknown","z.array","z.string","z.union","z.record","z.object","z.enum","z.optional","z.string","z.boolean","z.record","z.union","z.unknown","z.array","z.literal","z.any","z.object","z.optional","z.number","z.unknown","z.record","z.string","z.literal","z.enum","z.regex","z.pipe","z.transform","z.nullable","z.array","z.minLength","z.discriminatedUnion","z.url","z.union","z.boolean","z.coerce.number","z.custom","BLOCK"],"sources":["../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/schemas.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/coerce.js","../../../../../pieces-framework/dist/markdown-property-DMfHjEiL.js","../../../../../pieces-framework/dist/input-BHkj_oP5.js","../../../../../pieces-framework/dist/authentication-o-4CdAPR.js","../../../../../../node_modules/.pnpm/nanoid@3.3.17/node_modules/nanoid/index.js","../../../../../pieces-framework/dist/index.js","../../../../pieces/reactor/lib/logo.ts","../../../../pieces/reactor/lib/input-schema.ts","../../../../pieces/reactor/lib/input-props.ts","../../../../pieces/reactor/lib/parse.ts","../../../../pieces/reactor/lib/schema-text.ts","../../../../pieces/reactor/lib/reactor.ts","../../../../pieces/reactor/lib/actions/document-create.ts","../../../../pieces/reactor/lib/actions/document-dispatch.ts","../../../../pieces/reactor/lib/actions/document-find.ts","../../../../pieces/reactor/lib/actions/document-get.ts","../../../../pieces/reactor/lib/actions/document-schema.ts","../../../../pieces/reactor/lib/actions/document-types.ts","../../../../pieces/reactor/lib/triggers/document-event.ts","../../../../pieces/reactor/index.ts"],"sourcesContent":["/** A special constant with type `never` */\nexport const NEVER = Object.freeze({\n status: \"aborted\",\n});\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, params) {\n function init(inst, def) {\n if (!inst._zod) {\n Object.defineProperty(inst, \"_zod\", {\n value: {\n def,\n constr: _,\n traits: new Set(),\n },\n enumerable: false,\n });\n }\n if (inst._zod.traits.has(name)) {\n return;\n }\n inst._zod.traits.add(name);\n initializer(inst, def);\n // support prototype modifications\n const proto = _.prototype;\n const keys = Object.keys(proto);\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n if (!(k in inst)) {\n inst[k] = proto[k].bind(inst);\n }\n }\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n var _a;\n const inst = params?.Parent ? new Definition() : this;\n init(inst, def);\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n for (const fn of inst._zod.deferred) {\n fn();\n }\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport class $ZodEncodeError extends Error {\n constructor(name) {\n super(`Encountered unidirectional transform during encode: ${name}`);\n this.name = \"ZodEncodeError\";\n }\n}\nexport const globalConfig = {};\nexport function config(newConfig) {\n if (newConfig)\n Object.assign(globalConfig, newConfig);\n return globalConfig;\n}\n","// functions\nexport function assertEqual(val) {\n return val;\n}\nexport function assertNotEqual(val) {\n return val;\n}\nexport function assertIs(_arg) { }\nexport function assertNever(_x) {\n throw new Error(\"Unexpected value in exhaustive check\");\n}\nexport function assert(_) { }\nexport function getEnumValues(entries) {\n const numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n const values = Object.entries(entries)\n .filter(([k, _]) => numericValues.indexOf(+k) === -1)\n .map(([_, v]) => v);\n return values;\n}\nexport function joinValues(array, separator = \"|\") {\n return array.map((val) => stringifyPrimitive(val)).join(separator);\n}\nexport function jsonStringifyReplacer(_, value) {\n if (typeof value === \"bigint\")\n return value.toString();\n return value;\n}\nexport function cached(getter) {\n const set = false;\n return {\n get value() {\n if (!set) {\n const value = getter();\n Object.defineProperty(this, \"value\", { value });\n return value;\n }\n throw new Error(\"cached value already set\");\n },\n };\n}\nexport function nullish(input) {\n return input === null || input === undefined;\n}\nexport function cleanRegex(source) {\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n return source.slice(start, end);\n}\nexport function floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepString = step.toString();\n let stepDecCount = (stepString.split(\".\")[1] || \"\").length;\n if (stepDecCount === 0 && /\\d?e-\\d?/.test(stepString)) {\n const match = stepString.match(/\\d?e-(\\d?)/);\n if (match?.[1]) {\n stepDecCount = Number.parseInt(match[1]);\n }\n }\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / 10 ** decCount;\n}\nconst EVALUATING = Symbol(\"evaluating\");\nexport function defineLazy(object, key, getter) {\n let value = undefined;\n Object.defineProperty(object, key, {\n get() {\n if (value === EVALUATING) {\n // Circular reference detected, return undefined to break the cycle\n return undefined;\n }\n if (value === undefined) {\n value = EVALUATING;\n value = getter();\n }\n return value;\n },\n set(v) {\n Object.defineProperty(object, key, {\n value: v,\n // configurable: true,\n });\n // object[key] = v;\n },\n configurable: true,\n });\n}\nexport function objectClone(obj) {\n return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n}\nexport function assignProp(target, prop, value) {\n Object.defineProperty(target, prop, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n}\nexport function mergeDefs(...defs) {\n const mergedDescriptors = {};\n for (const def of defs) {\n const descriptors = Object.getOwnPropertyDescriptors(def);\n Object.assign(mergedDescriptors, descriptors);\n }\n return Object.defineProperties({}, mergedDescriptors);\n}\nexport function cloneDef(schema) {\n return mergeDefs(schema._zod.def);\n}\nexport function getElementAtPath(obj, path) {\n if (!path)\n return obj;\n return path.reduce((acc, key) => acc?.[key], obj);\n}\nexport function promiseAllObject(promisesObj) {\n const keys = Object.keys(promisesObj);\n const promises = keys.map((key) => promisesObj[key]);\n return Promise.all(promises).then((results) => {\n const resolvedObj = {};\n for (let i = 0; i < keys.length; i++) {\n resolvedObj[keys[i]] = results[i];\n }\n return resolvedObj;\n });\n}\nexport function randomString(length = 10) {\n const chars = \"abcdefghijklmnopqrstuvwxyz\";\n let str = \"\";\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * chars.length)];\n }\n return str;\n}\nexport function esc(str) {\n return JSON.stringify(str);\n}\nexport function slugify(input) {\n return input\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\nexport const captureStackTrace = (\"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => { });\nexport function isObject(data) {\n return typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nexport const allowsEval = cached(() => {\n // @ts-ignore\n if (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) {\n return false;\n }\n try {\n const F = Function;\n new F(\"\");\n return true;\n }\n catch (_) {\n return false;\n }\n});\nexport function isPlainObject(o) {\n if (isObject(o) === false)\n return false;\n // modified constructor\n const ctor = o.constructor;\n if (ctor === undefined)\n return true;\n if (typeof ctor !== \"function\")\n return true;\n // modified prototype\n const prot = ctor.prototype;\n if (isObject(prot) === false)\n return false;\n // ctor doesn't have static `isPrototypeOf`\n if (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) {\n return false;\n }\n return true;\n}\nexport function shallowClone(o) {\n if (isPlainObject(o))\n return { ...o };\n if (Array.isArray(o))\n return [...o];\n return o;\n}\nexport function numKeys(data) {\n let keyCount = 0;\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n keyCount++;\n }\n }\n return keyCount;\n}\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return \"undefined\";\n case \"string\":\n return \"string\";\n case \"number\":\n return Number.isNaN(data) ? \"nan\" : \"number\";\n case \"boolean\":\n return \"boolean\";\n case \"function\":\n return \"function\";\n case \"bigint\":\n return \"bigint\";\n case \"symbol\":\n return \"symbol\";\n case \"object\":\n if (Array.isArray(data)) {\n return \"array\";\n }\n if (data === null) {\n return \"null\";\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return \"promise\";\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return \"map\";\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return \"set\";\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return \"date\";\n }\n // @ts-ignore\n if (typeof File !== \"undefined\" && data instanceof File) {\n return \"file\";\n }\n return \"object\";\n default:\n throw new Error(`Unknown data type: ${t}`);\n }\n};\nexport const propertyKeyTypes = new Set([\"string\", \"number\", \"symbol\"]);\nexport const primitiveTypes = new Set([\"string\", \"number\", \"bigint\", \"boolean\", \"symbol\", \"undefined\"]);\nexport function escapeRegex(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n// zod-specific utils\nexport function clone(inst, def, params) {\n const cl = new inst._zod.constr(def ?? inst._zod.def);\n if (!def || params?.parent)\n cl._zod.parent = inst;\n return cl;\n}\nexport function normalizeParams(_params) {\n const params = _params;\n if (!params)\n return {};\n if (typeof params === \"string\")\n return { error: () => params };\n if (params?.message !== undefined) {\n if (params?.error !== undefined)\n throw new Error(\"Cannot specify both `message` and `error` params\");\n params.error = params.message;\n }\n delete params.message;\n if (typeof params.error === \"string\")\n return { ...params, error: () => params.error };\n return params;\n}\nexport function createTransparentProxy(getter) {\n let target;\n return new Proxy({}, {\n get(_, prop, receiver) {\n target ?? (target = getter());\n return Reflect.get(target, prop, receiver);\n },\n set(_, prop, value, receiver) {\n target ?? (target = getter());\n return Reflect.set(target, prop, value, receiver);\n },\n has(_, prop) {\n target ?? (target = getter());\n return Reflect.has(target, prop);\n },\n deleteProperty(_, prop) {\n target ?? (target = getter());\n return Reflect.deleteProperty(target, prop);\n },\n ownKeys(_) {\n target ?? (target = getter());\n return Reflect.ownKeys(target);\n },\n getOwnPropertyDescriptor(_, prop) {\n target ?? (target = getter());\n return Reflect.getOwnPropertyDescriptor(target, prop);\n },\n defineProperty(_, prop, descriptor) {\n target ?? (target = getter());\n return Reflect.defineProperty(target, prop, descriptor);\n },\n });\n}\nexport function stringifyPrimitive(value) {\n if (typeof value === \"bigint\")\n return value.toString() + \"n\";\n if (typeof value === \"string\")\n return `\"${value}\"`;\n return `${value}`;\n}\nexport function optionalKeys(shape) {\n return Object.keys(shape).filter((k) => {\n return shape[k]._zod.optin === \"optional\" && shape[k]._zod.optout === \"optional\";\n });\n}\nexport const NUMBER_FORMAT_RANGES = {\n safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n int32: [-2147483648, 2147483647],\n uint32: [0, 4294967295],\n float32: [-3.4028234663852886e38, 3.4028234663852886e38],\n float64: [-Number.MAX_VALUE, Number.MAX_VALUE],\n};\nexport const BIGINT_FORMAT_RANGES = {\n int64: [/* @__PURE__*/ BigInt(\"-9223372036854775808\"), /* @__PURE__*/ BigInt(\"9223372036854775807\")],\n uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt(\"18446744073709551615\")],\n};\nexport function pick(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = {};\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n newShape[key] = currDef.shape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function omit(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = { ...schema._zod.def.shape };\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n delete newShape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function extend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to extend: expected a plain object\");\n }\n const checks = schema._zod.def.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n // Only throw if new shape overlaps with existing shape\n // Use getOwnPropertyDescriptor to check key existence without accessing values\n const existingShape = schema._zod.def.shape;\n for (const key in shape) {\n if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {\n throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n }\n }\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function safeExtend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function merge(a, b) {\n const def = mergeDefs(a._zod.def, {\n get shape() {\n const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n get catchall() {\n return b._zod.def.catchall;\n },\n checks: [], // delete existing checks\n });\n return clone(a, def);\n}\nexport function partial(Class, schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".partial() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in oldShape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n else {\n for (const key in oldShape) {\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function required(Class, schema, mask) {\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n else {\n for (const key in oldShape) {\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n });\n return clone(schema, def);\n}\n// invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom\nexport function aborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue !== true) {\n return true;\n }\n }\n return false;\n}\nexport function prefixIssues(path, issues) {\n return issues.map((iss) => {\n var _a;\n (_a = iss).path ?? (_a.path = []);\n iss.path.unshift(path);\n return iss;\n });\n}\nexport function unwrapMessage(message) {\n return typeof message === \"string\" ? message : message?.message;\n}\nexport function finalizeIssue(iss, ctx, config) {\n const full = { ...iss, path: iss.path ?? [] };\n // for backwards compatibility\n if (!iss.message) {\n const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??\n unwrapMessage(ctx?.error?.(iss)) ??\n unwrapMessage(config.customError?.(iss)) ??\n unwrapMessage(config.localeError?.(iss)) ??\n \"Invalid input\";\n full.message = message;\n }\n // delete (full as any).def;\n delete full.inst;\n delete full.continue;\n if (!ctx?.reportInput) {\n delete full.input;\n }\n return full;\n}\nexport function getSizableOrigin(input) {\n if (input instanceof Set)\n return \"set\";\n if (input instanceof Map)\n return \"map\";\n // @ts-ignore\n if (input instanceof File)\n return \"file\";\n return \"unknown\";\n}\nexport function getLengthableOrigin(input) {\n if (Array.isArray(input))\n return \"array\";\n if (typeof input === \"string\")\n return \"string\";\n return \"unknown\";\n}\nexport function parsedType(data) {\n const t = typeof data;\n switch (t) {\n case \"number\": {\n return Number.isNaN(data) ? \"nan\" : \"number\";\n }\n case \"object\": {\n if (data === null) {\n return \"null\";\n }\n if (Array.isArray(data)) {\n return \"array\";\n }\n const obj = data;\n if (obj && Object.getPrototypeOf(obj) !== Object.prototype && \"constructor\" in obj && obj.constructor) {\n return obj.constructor.name;\n }\n }\n }\n return t;\n}\nexport function issue(...args) {\n const [iss, input, inst] = args;\n if (typeof iss === \"string\") {\n return {\n message: iss,\n code: \"custom\",\n input,\n inst,\n };\n }\n return { ...iss };\n}\nexport function cleanEnum(obj) {\n return Object.entries(obj)\n .filter(([k, _]) => {\n // return true if NaN, meaning it's not a number, thus a string key\n return Number.isNaN(Number.parseInt(k, 10));\n })\n .map((el) => el[1]);\n}\n// Codec utility functions\nexport function base64ToUint8Array(base64) {\n const binaryString = atob(base64);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes;\n}\nexport function uint8ArrayToBase64(bytes) {\n let binaryString = \"\";\n for (let i = 0; i < bytes.length; i++) {\n binaryString += String.fromCharCode(bytes[i]);\n }\n return btoa(binaryString);\n}\nexport function base64urlToUint8Array(base64url) {\n const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padding = \"=\".repeat((4 - (base64.length % 4)) % 4);\n return base64ToUint8Array(base64 + padding);\n}\nexport function uint8ArrayToBase64url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\nexport function hexToUint8Array(hex) {\n const cleanHex = hex.replace(/^0x/, \"\");\n if (cleanHex.length % 2 !== 0) {\n throw new Error(\"Invalid hex string length\");\n }\n const bytes = new Uint8Array(cleanHex.length / 2);\n for (let i = 0; i < cleanHex.length; i += 2) {\n bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);\n }\n return bytes;\n}\nexport function uint8ArrayToHex(bytes) {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n// instanceof\nexport class Class {\n constructor(..._args) { }\n}\n","import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod,\n enumerable: false,\n });\n Object.defineProperty(inst, \"issues\", {\n value: def,\n enumerable: false,\n });\n inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);\n Object.defineProperty(inst, \"toString\", {\n value: () => inst.message,\n enumerable: false,\n });\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, { Parent: Error });\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues });\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues });\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a, _b;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, issue.path));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_b = curr.items)[el] ?? (_b[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`✖ ${issue.message}`);\n if (issue.path?.length)\n lines.push(` → at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n","import * as core from \"./core.js\";\nimport * as errors from \"./errors.js\";\nimport * as util from \"./util.js\";\nexport const _parse = (_Err) => (schema, value, _ctx, _params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n if (result.issues.length) {\n const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, _params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parse = /* @__PURE__*/ _parse(errors.$ZodRealError);\nexport const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n if (result.issues.length) {\n const e = new (params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parseAsync = /* @__PURE__*/ _parseAsync(errors.$ZodRealError);\nexport const _safeParse = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length\n ? {\n success: false,\n error: new (_Err ?? errors.$ZodError)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);\nexport const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length\n ? {\n success: false,\n error: new _Err(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);\nexport const _encode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _parse(_Err)(schema, value, ctx);\n};\nexport const encode = /* @__PURE__*/ _encode(errors.$ZodRealError);\nexport const _decode = (_Err) => (schema, value, _ctx) => {\n return _parse(_Err)(schema, value, _ctx);\n};\nexport const decode = /* @__PURE__*/ _decode(errors.$ZodRealError);\nexport const _encodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _parseAsync(_Err)(schema, value, ctx);\n};\nexport const encodeAsync = /* @__PURE__*/ _encodeAsync(errors.$ZodRealError);\nexport const _decodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _parseAsync(_Err)(schema, value, _ctx);\n};\nexport const decodeAsync = /* @__PURE__*/ _decodeAsync(errors.$ZodRealError);\nexport const _safeEncode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _safeParse(_Err)(schema, value, ctx);\n};\nexport const safeEncode = /* @__PURE__*/ _safeEncode(errors.$ZodRealError);\nexport const _safeDecode = (_Err) => (schema, value, _ctx) => {\n return _safeParse(_Err)(schema, value, _ctx);\n};\nexport const safeDecode = /* @__PURE__*/ _safeDecode(errors.$ZodRealError);\nexport const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _safeParseAsync(_Err)(schema, value, ctx);\n};\nexport const safeEncodeAsync = /* @__PURE__*/ _safeEncodeAsync(errors.$ZodRealError);\nexport const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _safeParseAsync(_Err)(schema, value, _ctx);\n};\nexport const safeDecodeAsync = /* @__PURE__*/ _safeDecodeAsync(errors.$ZodRealError);\n","import * as util from \"./util.js\";\nexport const cuid = /^[cC][^\\s-]{8,}$/;\nexport const cuid2 = /^[0-9a-z]+$/;\nexport const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;\nexport const xid = /^[0-9a-vA-V]{20}$/;\nexport const ksuid = /^[A-Za-z0-9]{27}$/;\nexport const nanoid = /^[a-zA-Z0-9_-]{21}$/;\n/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */\nexport const duration = /^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;\n/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */\nexport const extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */\nexport const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;\n/** Returns a regex for validating an RFC 9562/4122 UUID.\n *\n * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */\nexport const uuid = (version) => {\n if (!version)\n return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;\n return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);\n};\nexport const uuid4 = /*@__PURE__*/ uuid(4);\nexport const uuid6 = /*@__PURE__*/ uuid(6);\nexport const uuid7 = /*@__PURE__*/ uuid(7);\n/** Practical email validation */\nexport const email = /^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;\n/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */\nexport const html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n/** The classic emailregex.com regex for RFC 5322-compliant emails */\nexport const rfc5322Email = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */\nexport const unicodeEmail = /^[^\\s@\"]{1,64}@[^\\s@]{1,255}$/u;\nexport const idnEmail = unicodeEmail;\nexport const browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emoji = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nexport function emoji() {\n return new RegExp(_emoji, \"u\");\n}\nexport const ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nexport const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;\nexport const mac = (delimiter) => {\n const escapedDelim = util.escapeRegex(delimiter ?? \":\");\n return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);\n};\nexport const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/;\nexport const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nexport const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;\nexport const base64url = /^[A-Za-z0-9_-]*$/;\n// based on https://stackoverflow.com/questions/106179/regular-expression-to-match-dns-hostname-or-ip-address\n// export const hostname: RegExp = /^([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+$/;\nexport const hostname = /^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/;\nexport const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/;\n// https://blog.stevenlevithan.com/archives/validate-phone-number#r4-3 (regex sans spaces)\n// E.164: leading digit must be 1-9; total digits (excluding '+') between 7-15\nexport const e164 = /^\\+[1-9]\\d{6,14}$/;\n// const dateSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\nconst dateSource = `(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))`;\nexport const date = /*@__PURE__*/ new RegExp(`^${dateSource}$`);\nfunction timeSource(args) {\n const hhmm = `(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;\n const regex = typeof args.precision === \"number\"\n ? args.precision === -1\n ? `${hhmm}`\n : args.precision === 0\n ? `${hhmm}:[0-5]\\\\d`\n : `${hhmm}:[0-5]\\\\d\\\\.\\\\d{${args.precision}}`\n : `${hhmm}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`;\n return regex;\n}\nexport function time(args) {\n return new RegExp(`^${timeSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nexport function datetime(args) {\n const time = timeSource({ precision: args.precision });\n const opts = [\"Z\"];\n if (args.local)\n opts.push(\"\");\n // if (args.offset) opts.push(`([+-]\\\\d{2}:\\\\d{2})`);\n if (args.offset)\n opts.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);\n const timeRegex = `${time}(?:${opts.join(\"|\")})`;\n return new RegExp(`^${dateSource}T(?:${timeRegex})$`);\n}\nexport const string = (params) => {\n const regex = params ? `[\\\\s\\\\S]{${params?.minimum ?? 0},${params?.maximum ?? \"\"}}` : `[\\\\s\\\\S]*`;\n return new RegExp(`^${regex}$`);\n};\nexport const bigint = /^-?\\d+n?$/;\nexport const integer = /^-?\\d+$/;\nexport const number = /^-?\\d+(?:\\.\\d+)?$/;\nexport const boolean = /^(?:true|false)$/i;\nconst _null = /^null$/i;\nexport { _null as null };\nconst _undefined = /^undefined$/i;\nexport { _undefined as undefined };\n// regex for string with no uppercase letters\nexport const lowercase = /^[^A-Z]*$/;\n// regex for string with no lowercase letters\nexport const uppercase = /^[^a-z]*$/;\n// regex for hexadecimal strings (any length)\nexport const hex = /^[0-9a-fA-F]*$/;\n// Hash regexes for different algorithms and encodings\n// Helper function to create base64 regex with exact length and padding\nfunction fixedBase64(bodyLength, padding) {\n return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);\n}\n// Helper function to create base64url regex with exact length (no padding)\nfunction fixedBase64url(length) {\n return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);\n}\n// MD5 (16 bytes): base64 = 24 chars total (22 + \"==\")\nexport const md5_hex = /^[0-9a-fA-F]{32}$/;\nexport const md5_base64 = /*@__PURE__*/ fixedBase64(22, \"==\");\nexport const md5_base64url = /*@__PURE__*/ fixedBase64url(22);\n// SHA1 (20 bytes): base64 = 28 chars total (27 + \"=\")\nexport const sha1_hex = /^[0-9a-fA-F]{40}$/;\nexport const sha1_base64 = /*@__PURE__*/ fixedBase64(27, \"=\");\nexport const sha1_base64url = /*@__PURE__*/ fixedBase64url(27);\n// SHA256 (32 bytes): base64 = 44 chars total (43 + \"=\")\nexport const sha256_hex = /^[0-9a-fA-F]{64}$/;\nexport const sha256_base64 = /*@__PURE__*/ fixedBase64(43, \"=\");\nexport const sha256_base64url = /*@__PURE__*/ fixedBase64url(43);\n// SHA384 (48 bytes): base64 = 64 chars total (no padding)\nexport const sha384_hex = /^[0-9a-fA-F]{96}$/;\nexport const sha384_base64 = /*@__PURE__*/ fixedBase64(64, \"\");\nexport const sha384_base64url = /*@__PURE__*/ fixedBase64url(64);\n// SHA512 (64 bytes): base64 = 88 chars total (86 + \"==\")\nexport const sha512_hex = /^[0-9a-fA-F]{128}$/;\nexport const sha512_base64 = /*@__PURE__*/ fixedBase64(86, \"==\");\nexport const sha512_base64url = /*@__PURE__*/ fixedBase64url(86);\n","// import { $ZodType } from \"./schemas.js\";\nimport * as core from \"./core.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nexport const $ZodCheck = /*@__PURE__*/ core.$constructor(\"$ZodCheck\", (inst, def) => {\n var _a;\n inst._zod ?? (inst._zod = {});\n inst._zod.def = def;\n (_a = inst._zod).onattach ?? (_a.onattach = []);\n});\nconst numericOriginMap = {\n number: \"number\",\n bigint: \"bigint\",\n object: \"date\",\n};\nexport const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckLessThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;\n if (def.value < curr) {\n if (def.inclusive)\n bag.maximum = def.value;\n else\n bag.exclusiveMaximum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;\n if (def.value > curr) {\n if (def.inclusive)\n bag.minimum = def.value;\n else\n bag.exclusiveMinimum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMultipleOf = \n/*@__PURE__*/ core.$constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n var _a;\n (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);\n });\n inst._zod.check = (payload) => {\n if (typeof payload.value !== typeof def.value)\n throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n const isMultiple = typeof payload.value === \"bigint\"\n ? payload.value % def.value === BigInt(0)\n : util.floatSafeRemainder(payload.value, def.value) === 0;\n if (isMultiple)\n return;\n payload.issues.push({\n origin: typeof payload.value,\n code: \"not_multiple_of\",\n divisor: def.value,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n def.format = def.format || \"float64\";\n const isInt = def.format?.includes(\"int\");\n const origin = isInt ? \"int\" : \"number\";\n const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n if (isInt)\n bag.pattern = regexes.integer;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (isInt) {\n if (!Number.isInteger(input)) {\n // invalid_format issue\n // payload.issues.push({\n // expected: def.format,\n // format: def.format,\n // code: \"invalid_format\",\n // input,\n // inst,\n // });\n // invalid_type issue\n payload.issues.push({\n expected: origin,\n format: def.format,\n code: \"invalid_type\",\n continue: false,\n input,\n inst,\n });\n return;\n // not_multiple_of issue\n // payload.issues.push({\n // code: \"not_multiple_of\",\n // origin: \"number\",\n // input,\n // inst,\n // divisor: 1,\n // });\n }\n if (!Number.isSafeInteger(input)) {\n if (input > 0) {\n // too_big\n payload.issues.push({\n input,\n code: \"too_big\",\n maximum: Number.MAX_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n else {\n // too_small\n payload.issues.push({\n input,\n code: \"too_small\",\n minimum: Number.MIN_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n return;\n }\n }\n if (input < minimum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_small\",\n minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckBigIntFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (input < minimum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_small\",\n minimum: minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size <= def.maximum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size >= def.minimum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckSizeEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.size;\n bag.maximum = def.size;\n bag.size = def.size;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size === def.size)\n return;\n const tooBig = size > def.size;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n ...(tooBig ? { code: \"too_big\", maximum: def.size } : { code: \"too_small\", minimum: def.size }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length <= def.maximum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length >= def.minimum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.length;\n bag.maximum = def.length;\n bag.length = def.length;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length === def.length)\n return;\n const origin = util.getLengthableOrigin(input);\n const tooBig = length > def.length;\n payload.issues.push({\n origin,\n ...(tooBig ? { code: \"too_big\", maximum: def.length } : { code: \"too_small\", minimum: def.length }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n var _a, _b;\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n if (def.pattern) {\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(def.pattern);\n }\n });\n if (def.pattern)\n (_a = inst._zod).check ?? (_a.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n ...(def.pattern ? { pattern: def.pattern.toString() } : {}),\n inst,\n continue: !def.abort,\n });\n });\n else\n (_b = inst._zod).check ?? (_b.check = () => { });\n});\nexport const $ZodCheckRegex = /*@__PURE__*/ core.$constructor(\"$ZodCheckRegex\", (inst, def) => {\n $ZodCheckStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"regex\",\n input: payload.value,\n pattern: def.pattern.toString(),\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLowerCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.lowercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckUpperCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.uppercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckIncludes = /*@__PURE__*/ core.$constructor(\"$ZodCheckIncludes\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const escapedRegex = util.escapeRegex(def.includes);\n const pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);\n def.pattern = pattern;\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.includes(def.includes, def.position))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"includes\",\n includes: def.includes,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStartsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.startsWith(def.prefix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"starts_with\",\n prefix: def.prefix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckEndsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.endsWith(def.suffix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"ends_with\",\n suffix: def.suffix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n///////////////////////////////////\n///// $ZodCheckProperty /////\n///////////////////////////////////\nfunction handleCheckPropertyResult(result, payload, property) {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(property, result.issues));\n }\n}\nexport const $ZodCheckProperty = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperty\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n const result = def.schema._zod.run({\n value: payload.value[def.property],\n issues: [],\n }, {});\n if (result instanceof Promise) {\n return result.then((result) => handleCheckPropertyResult(result, payload, def.property));\n }\n handleCheckPropertyResult(result, payload, def.property);\n return;\n };\n});\nexport const $ZodCheckMimeType = /*@__PURE__*/ core.$constructor(\"$ZodCheckMimeType\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const mimeSet = new Set(def.mime);\n inst._zod.onattach.push((inst) => {\n inst._zod.bag.mime = def.mime;\n });\n inst._zod.check = (payload) => {\n if (mimeSet.has(payload.value.type))\n return;\n payload.issues.push({\n code: \"invalid_value\",\n values: def.mime,\n input: payload.value.type,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckOverwrite = /*@__PURE__*/ core.$constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n payload.value = def.tx(payload.value);\n };\n});\n","export const version = {\n major: 4,\n minor: 3,\n patch: 6,\n};\n","import * as checks from \"./checks.js\";\nimport * as core from \"./core.js\";\nimport { Doc } from \"./doc.js\";\nimport { parse, parseAsync, safeParse, safeParseAsync } from \"./parse.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nimport { version } from \"./versions.js\";\nexport const $ZodType = /*@__PURE__*/ core.$constructor(\"$ZodType\", (inst, def) => {\n var _a;\n inst ?? (inst = {});\n inst._zod.def = def; // set _def property\n inst._zod.bag = inst._zod.bag || {}; // initialize _bag object\n inst._zod.version = version;\n const checks = [...(inst._zod.def.checks ?? [])];\n // if inst is itself a checks.$ZodCheck, run it as a check\n if (inst._zod.traits.has(\"$ZodCheck\")) {\n checks.unshift(inst);\n }\n for (const ch of checks) {\n for (const fn of ch._zod.onattach) {\n fn(inst);\n }\n }\n if (checks.length === 0) {\n // deferred initializer\n // inst._zod.parse is not yet defined\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred?.push(() => {\n inst._zod.run = inst._zod.parse;\n });\n }\n else {\n const runChecks = (payload, checks, ctx) => {\n let isAborted = util.aborted(payload);\n let asyncResult;\n for (const ch of checks) {\n if (ch._zod.def.when) {\n const shouldRun = ch._zod.def.when(payload);\n if (!shouldRun)\n continue;\n }\n else if (isAborted) {\n continue;\n }\n const currLen = payload.issues.length;\n const _ = ch._zod.check(payload);\n if (_ instanceof Promise && ctx?.async === false) {\n throw new core.$ZodAsyncError();\n }\n if (asyncResult || _ instanceof Promise) {\n asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {\n await _;\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n return;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n });\n }\n else {\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n continue;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n }\n }\n if (asyncResult) {\n return asyncResult.then(() => {\n return payload;\n });\n }\n return payload;\n };\n const handleCanaryResult = (canary, payload, ctx) => {\n // abort if the canary is aborted\n if (util.aborted(canary)) {\n canary.aborted = true;\n return canary;\n }\n // run checks first, then\n const checkResult = runChecks(payload, checks, ctx);\n if (checkResult instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));\n }\n return inst._zod.parse(checkResult, ctx);\n };\n inst._zod.run = (payload, ctx) => {\n if (ctx.skipChecks) {\n return inst._zod.parse(payload, ctx);\n }\n if (ctx.direction === \"backward\") {\n // run canary\n // initial pass (no checks)\n const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });\n if (canary instanceof Promise) {\n return canary.then((canary) => {\n return handleCanaryResult(canary, payload, ctx);\n });\n }\n return handleCanaryResult(canary, payload, ctx);\n }\n // forward\n const result = inst._zod.parse(payload, ctx);\n if (result instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return result.then((result) => runChecks(result, checks, ctx));\n }\n return runChecks(result, checks, ctx);\n };\n }\n // Lazy initialize ~standard to avoid creating objects for every schema\n util.defineLazy(inst, \"~standard\", () => ({\n validate: (value) => {\n try {\n const r = safeParse(inst, value);\n return r.success ? { value: r.data } : { issues: r.error?.issues };\n }\n catch (_) {\n return safeParseAsync(inst, value).then((r) => (r.success ? { value: r.data } : { issues: r.error?.issues }));\n }\n },\n vendor: \"zod\",\n version: 1,\n }));\n});\nexport { clone } from \"./util.js\";\nexport const $ZodString = /*@__PURE__*/ core.$constructor(\"$ZodString\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);\n inst._zod.parse = (payload, _) => {\n if (def.coerce)\n try {\n payload.value = String(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"string\")\n return payload;\n payload.issues.push({\n expected: \"string\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodStringFormat\", (inst, def) => {\n // check initialization must come first\n checks.$ZodCheckStringFormat.init(inst, def);\n $ZodString.init(inst, def);\n});\nexport const $ZodGUID = /*@__PURE__*/ core.$constructor(\"$ZodGUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.guid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodUUID = /*@__PURE__*/ core.$constructor(\"$ZodUUID\", (inst, def) => {\n if (def.version) {\n const versionMap = {\n v1: 1,\n v2: 2,\n v3: 3,\n v4: 4,\n v5: 5,\n v6: 6,\n v7: 7,\n v8: 8,\n };\n const v = versionMap[def.version];\n if (v === undefined)\n throw new Error(`Invalid UUID version: \"${def.version}\"`);\n def.pattern ?? (def.pattern = regexes.uuid(v));\n }\n else\n def.pattern ?? (def.pattern = regexes.uuid());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodEmail = /*@__PURE__*/ core.$constructor(\"$ZodEmail\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.email);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodURL = /*@__PURE__*/ core.$constructor(\"$ZodURL\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n try {\n // Trim whitespace from input\n const trimmed = payload.value.trim();\n // @ts-ignore\n const url = new URL(trimmed);\n if (def.hostname) {\n def.hostname.lastIndex = 0;\n if (!def.hostname.test(url.hostname)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid hostname\",\n pattern: def.hostname.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n if (def.protocol) {\n def.protocol.lastIndex = 0;\n if (!def.protocol.test(url.protocol.endsWith(\":\") ? url.protocol.slice(0, -1) : url.protocol)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid protocol\",\n pattern: def.protocol.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n // Set the output value based on normalize flag\n if (def.normalize) {\n // Use normalized URL\n payload.value = url.href;\n }\n else {\n // Preserve the original input (trimmed)\n payload.value = trimmed;\n }\n return;\n }\n catch (_) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodEmoji = /*@__PURE__*/ core.$constructor(\"$ZodEmoji\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.emoji());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodNanoID = /*@__PURE__*/ core.$constructor(\"$ZodNanoID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.nanoid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID = /*@__PURE__*/ core.$constructor(\"$ZodCUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID2 = /*@__PURE__*/ core.$constructor(\"$ZodCUID2\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid2);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodULID = /*@__PURE__*/ core.$constructor(\"$ZodULID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ulid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodXID = /*@__PURE__*/ core.$constructor(\"$ZodXID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.xid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodKSUID = /*@__PURE__*/ core.$constructor(\"$ZodKSUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ksuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODateTime = /*@__PURE__*/ core.$constructor(\"$ZodISODateTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.datetime(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODate = /*@__PURE__*/ core.$constructor(\"$ZodISODate\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.date);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISOTime = /*@__PURE__*/ core.$constructor(\"$ZodISOTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.time(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODuration = /*@__PURE__*/ core.$constructor(\"$ZodISODuration\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.duration);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodIPv4 = /*@__PURE__*/ core.$constructor(\"$ZodIPv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv4);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv4`;\n});\nexport const $ZodIPv6 = /*@__PURE__*/ core.$constructor(\"$ZodIPv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv6);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv6`;\n inst._zod.check = (payload) => {\n try {\n // @ts-ignore\n new URL(`http://[${payload.value}]`);\n // return;\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"ipv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodMAC = /*@__PURE__*/ core.$constructor(\"$ZodMAC\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.mac(def.delimiter));\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `mac`;\n});\nexport const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv4);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n const parts = payload.value.split(\"/\");\n try {\n if (parts.length !== 2)\n throw new Error();\n const [address, prefix] = parts;\n if (!prefix)\n throw new Error();\n const prefixNum = Number(prefix);\n if (`${prefixNum}` !== prefix)\n throw new Error();\n if (prefixNum < 0 || prefixNum > 128)\n throw new Error();\n // @ts-ignore\n new URL(`http://[${address}]`);\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"cidrv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64(data) {\n if (data === \"\")\n return true;\n if (data.length % 4 !== 0)\n return false;\n try {\n // @ts-ignore\n atob(data);\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodBase64 = /*@__PURE__*/ core.$constructor(\"$ZodBase64\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64\";\n inst._zod.check = (payload) => {\n if (isValidBase64(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64URL(data) {\n if (!regexes.base64url.test(data))\n return false;\n const base64 = data.replace(/[-_]/g, (c) => (c === \"-\" ? \"+\" : \"/\"));\n const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, \"=\");\n return isValidBase64(padded);\n}\nexport const $ZodBase64URL = /*@__PURE__*/ core.$constructor(\"$ZodBase64URL\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64url);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64url\";\n inst._zod.check = (payload) => {\n if (isValidBase64URL(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodE164 = /*@__PURE__*/ core.$constructor(\"$ZodE164\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.e164);\n $ZodStringFormat.init(inst, def);\n});\n////////////////////////////// ZodJWT //////////////////////////////\nexport function isValidJWT(token, algorithm = null) {\n try {\n const tokensParts = token.split(\".\");\n if (tokensParts.length !== 3)\n return false;\n const [header] = tokensParts;\n if (!header)\n return false;\n // @ts-ignore\n const parsedHeader = JSON.parse(atob(header));\n if (\"typ\" in parsedHeader && parsedHeader?.typ !== \"JWT\")\n return false;\n if (!parsedHeader.alg)\n return false;\n if (algorithm && (!(\"alg\" in parsedHeader) || parsedHeader.alg !== algorithm))\n return false;\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodJWT = /*@__PURE__*/ core.$constructor(\"$ZodJWT\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidJWT(payload.value, def.alg))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"jwt\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCustomStringFormat\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (def.fn(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodNumber = /*@__PURE__*/ core.$constructor(\"$ZodNumber\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Number(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"number\" && !Number.isNaN(input) && Number.isFinite(input)) {\n return payload;\n }\n const received = typeof input === \"number\"\n ? Number.isNaN(input)\n ? \"NaN\"\n : !Number.isFinite(input)\n ? \"Infinity\"\n : undefined\n : undefined;\n payload.issues.push({\n expected: \"number\",\n code: \"invalid_type\",\n input,\n inst,\n ...(received ? { received } : {}),\n });\n return payload;\n };\n});\nexport const $ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodNumberFormat\", (inst, def) => {\n checks.$ZodCheckNumberFormat.init(inst, def);\n $ZodNumber.init(inst, def); // no format checks\n});\nexport const $ZodBoolean = /*@__PURE__*/ core.$constructor(\"$ZodBoolean\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.boolean;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Boolean(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"boolean\")\n return payload;\n payload.issues.push({\n expected: \"boolean\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigInt = /*@__PURE__*/ core.$constructor(\"$ZodBigInt\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.bigint;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = BigInt(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"bigint\")\n return payload;\n payload.issues.push({\n expected: \"bigint\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodBigIntFormat\", (inst, def) => {\n checks.$ZodCheckBigIntFormat.init(inst, def);\n $ZodBigInt.init(inst, def); // no format checks\n});\nexport const $ZodSymbol = /*@__PURE__*/ core.$constructor(\"$ZodSymbol\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"symbol\")\n return payload;\n payload.issues.push({\n expected: \"symbol\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodUndefined = /*@__PURE__*/ core.$constructor(\"$ZodUndefined\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.undefined;\n inst._zod.values = new Set([undefined]);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"undefined\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodNull = /*@__PURE__*/ core.$constructor(\"$ZodNull\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.null;\n inst._zod.values = new Set([null]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (input === null)\n return payload;\n payload.issues.push({\n expected: \"null\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodAny = /*@__PURE__*/ core.$constructor(\"$ZodAny\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodUnknown = /*@__PURE__*/ core.$constructor(\"$ZodUnknown\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodNever = /*@__PURE__*/ core.$constructor(\"$ZodNever\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n payload.issues.push({\n expected: \"never\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodVoid = /*@__PURE__*/ core.$constructor(\"$ZodVoid\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"void\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodDate = /*@__PURE__*/ core.$constructor(\"$ZodDate\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce) {\n try {\n payload.value = new Date(payload.value);\n }\n catch (_err) { }\n }\n const input = payload.value;\n const isDate = input instanceof Date;\n const isValidDate = isDate && !Number.isNaN(input.getTime());\n if (isValidDate)\n return payload;\n payload.issues.push({\n expected: \"date\",\n code: \"invalid_type\",\n input,\n ...(isDate ? { received: \"Invalid Date\" } : {}),\n inst,\n });\n return payload;\n };\n});\nfunction handleArrayResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodArray = /*@__PURE__*/ core.$constructor(\"$ZodArray\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n expected: \"array\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = Array(input.length);\n const proms = [];\n for (let i = 0; i < input.length; i++) {\n const item = input[i];\n const result = def.element._zod.run({\n value: item,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleArrayResult(result, payload, i)));\n }\n else {\n handleArrayResult(result, payload, i);\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload; //handleArrayResultsAsync(parseResults, final);\n };\n});\nfunction handlePropertyResult(result, final, key, input, isOptionalOut) {\n if (result.issues.length) {\n // For optional-out schemas, ignore errors on absent keys\n if (isOptionalOut && !(key in input)) {\n return;\n }\n final.issues.push(...util.prefixIssues(key, result.issues));\n }\n if (result.value === undefined) {\n if (key in input) {\n final.value[key] = undefined;\n }\n }\n else {\n final.value[key] = result.value;\n }\n}\nfunction normalizeDef(def) {\n const keys = Object.keys(def.shape);\n for (const k of keys) {\n if (!def.shape?.[k]?._zod?.traits?.has(\"$ZodType\")) {\n throw new Error(`Invalid element at key \"${k}\": expected a Zod schema`);\n }\n }\n const okeys = util.optionalKeys(def.shape);\n return {\n ...def,\n keys,\n keySet: new Set(keys),\n numKeys: keys.length,\n optionalKeys: new Set(okeys),\n };\n}\nfunction handleCatchall(proms, input, payload, ctx, def, inst) {\n const unrecognized = [];\n // iterate over input keys\n const keySet = def.keySet;\n const _catchall = def.catchall._zod;\n const t = _catchall.def.type;\n const isOptionalOut = _catchall.optout === \"optional\";\n for (const key in input) {\n if (keySet.has(key))\n continue;\n if (t === \"never\") {\n unrecognized.push(key);\n continue;\n }\n const r = _catchall.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalOut);\n }\n }\n if (unrecognized.length) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n keys: unrecognized,\n input,\n inst,\n });\n }\n if (!proms.length)\n return payload;\n return Promise.all(proms).then(() => {\n return payload;\n });\n}\nexport const $ZodObject = /*@__PURE__*/ core.$constructor(\"$ZodObject\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodType.init(inst, def);\n // const sh = def.shape;\n const desc = Object.getOwnPropertyDescriptor(def, \"shape\");\n if (!desc?.get) {\n const sh = def.shape;\n Object.defineProperty(def, \"shape\", {\n get: () => {\n const newSh = { ...sh };\n Object.defineProperty(def, \"shape\", {\n value: newSh,\n });\n return newSh;\n },\n });\n }\n const _normalized = util.cached(() => normalizeDef(def));\n util.defineLazy(inst._zod, \"propValues\", () => {\n const shape = def.shape;\n const propValues = {};\n for (const key in shape) {\n const field = shape[key]._zod;\n if (field.values) {\n propValues[key] ?? (propValues[key] = new Set());\n for (const v of field.values)\n propValues[key].add(v);\n }\n }\n return propValues;\n });\n const isObject = util.isObject;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = {};\n const proms = [];\n const shape = value.shape;\n for (const key of value.keys) {\n const el = shape[key];\n const isOptionalOut = el._zod.optout === \"optional\";\n const r = el._zod.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalOut);\n }\n }\n if (!catchall) {\n return proms.length ? Promise.all(proms).then(() => payload) : payload;\n }\n return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);\n };\n});\nexport const $ZodObjectJIT = /*@__PURE__*/ core.$constructor(\"$ZodObjectJIT\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodObject.init(inst, def);\n const superParse = inst._zod.parse;\n const _normalized = util.cached(() => normalizeDef(def));\n const generateFastpass = (shape) => {\n const doc = new Doc([\"shape\", \"payload\", \"ctx\"]);\n const normalized = _normalized.value;\n const parseStr = (key) => {\n const k = util.esc(key);\n return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;\n };\n doc.write(`const input = payload.value;`);\n const ids = Object.create(null);\n let counter = 0;\n for (const key of normalized.keys) {\n ids[key] = `key_${counter++}`;\n }\n // A: preserve key order {\n doc.write(`const newResult = {};`);\n for (const key of normalized.keys) {\n const id = ids[key];\n const k = util.esc(key);\n const schema = shape[key];\n const isOptionalOut = schema?._zod?.optout === \"optional\";\n doc.write(`const ${id} = ${parseStr(key)};`);\n if (isOptionalOut) {\n // For optional-out schemas, ignore errors on absent keys\n doc.write(`\n if (${id}.issues.length) {\n if (${k} in input) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n else {\n doc.write(`\n if (${id}.issues.length) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n }\n doc.write(`payload.value = newResult;`);\n doc.write(`return payload;`);\n const fn = doc.compile();\n return (payload, ctx) => fn(shape, payload, ctx);\n };\n let fastpass;\n const isObject = util.isObject;\n const jit = !core.globalConfig.jitless;\n const allowsEval = util.allowsEval;\n const fastEnabled = jit && allowsEval.value; // && !def.catchall;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {\n // always synchronous\n if (!fastpass)\n fastpass = generateFastpass(def.shape);\n payload = fastpass(payload, ctx);\n if (!catchall)\n return payload;\n return handleCatchall([], input, payload, ctx, value, inst);\n }\n return superParse(payload, ctx);\n };\n});\nfunction handleUnionResults(results, final, inst, ctx) {\n for (const result of results) {\n if (result.issues.length === 0) {\n final.value = result.value;\n return final;\n }\n }\n const nonaborted = results.filter((r) => !util.aborted(r));\n if (nonaborted.length === 1) {\n final.value = nonaborted[0].value;\n return nonaborted[0];\n }\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n return final;\n}\nexport const $ZodUnion = /*@__PURE__*/ core.$constructor(\"$ZodUnion\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.options.some((o) => o._zod.optin === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"optout\", () => def.options.some((o) => o._zod.optout === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"values\", () => {\n if (def.options.every((o) => o._zod.values)) {\n return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));\n }\n return undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n if (def.options.every((o) => o._zod.pattern)) {\n const patterns = def.options.map((o) => o._zod.pattern);\n return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join(\"|\")})$`);\n }\n return undefined;\n });\n const single = def.options.length === 1;\n const first = def.options[0]._zod.run;\n inst._zod.parse = (payload, ctx) => {\n if (single) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n if (result.issues.length === 0)\n return result;\n results.push(result);\n }\n }\n if (!async)\n return handleUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleUnionResults(results, payload, inst, ctx);\n });\n };\n});\nfunction handleExclusiveUnionResults(results, final, inst, ctx) {\n const successes = results.filter((r) => r.issues.length === 0);\n if (successes.length === 1) {\n final.value = successes[0].value;\n return final;\n }\n if (successes.length === 0) {\n // No matches - same as regular union\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n }\n else {\n // Multiple matches - exclusive union failure\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: [],\n inclusive: false,\n });\n }\n return final;\n}\nexport const $ZodXor = /*@__PURE__*/ core.$constructor(\"$ZodXor\", (inst, def) => {\n $ZodUnion.init(inst, def);\n def.inclusive = false;\n const single = def.options.length === 1;\n const first = def.options[0]._zod.run;\n inst._zod.parse = (payload, ctx) => {\n if (single) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n results.push(result);\n }\n }\n if (!async)\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n });\n };\n});\nexport const $ZodDiscriminatedUnion = \n/*@__PURE__*/\ncore.$constructor(\"$ZodDiscriminatedUnion\", (inst, def) => {\n def.inclusive = false;\n $ZodUnion.init(inst, def);\n const _super = inst._zod.parse;\n util.defineLazy(inst._zod, \"propValues\", () => {\n const propValues = {};\n for (const option of def.options) {\n const pv = option._zod.propValues;\n if (!pv || Object.keys(pv).length === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(option)}\"`);\n for (const [k, v] of Object.entries(pv)) {\n if (!propValues[k])\n propValues[k] = new Set();\n for (const val of v) {\n propValues[k].add(val);\n }\n }\n }\n return propValues;\n });\n const disc = util.cached(() => {\n const opts = def.options;\n const map = new Map();\n for (const o of opts) {\n const values = o._zod.propValues?.[def.discriminator];\n if (!values || values.size === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(o)}\"`);\n for (const v of values) {\n if (map.has(v)) {\n throw new Error(`Duplicate discriminator value \"${String(v)}\"`);\n }\n map.set(v, o);\n }\n }\n return map;\n });\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isObject(input)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"object\",\n input,\n inst,\n });\n return payload;\n }\n const opt = disc.value.get(input?.[def.discriminator]);\n if (opt) {\n return opt._zod.run(payload, ctx);\n }\n if (def.unionFallback) {\n return _super(payload, ctx);\n }\n // no matching discriminator\n payload.issues.push({\n code: \"invalid_union\",\n errors: [],\n note: \"No matching discriminator\",\n discriminator: def.discriminator,\n input,\n path: [def.discriminator],\n inst,\n });\n return payload;\n };\n});\nexport const $ZodIntersection = /*@__PURE__*/ core.$constructor(\"$ZodIntersection\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n const left = def.left._zod.run({ value: input, issues: [] }, ctx);\n const right = def.right._zod.run({ value: input, issues: [] }, ctx);\n const async = left instanceof Promise || right instanceof Promise;\n if (async) {\n return Promise.all([left, right]).then(([left, right]) => {\n return handleIntersectionResults(payload, left, right);\n });\n }\n return handleIntersectionResults(payload, left, right);\n };\n});\nfunction mergeValues(a, b) {\n // const aType = parse.t(a);\n // const bType = parse.t(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n if (a instanceof Date && b instanceof Date && +a === +b) {\n return { valid: true, data: a };\n }\n if (util.isPlainObject(a) && util.isPlainObject(b)) {\n const bKeys = Object.keys(b);\n const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [key, ...sharedValue.mergeErrorPath],\n };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) {\n return { valid: false, mergeErrorPath: [] };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [index, ...sharedValue.mergeErrorPath],\n };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n return { valid: false, mergeErrorPath: [] };\n}\nfunction handleIntersectionResults(result, left, right) {\n // Track which side(s) report each key as unrecognized\n const unrecKeys = new Map();\n let unrecIssue;\n for (const iss of left.issues) {\n if (iss.code === \"unrecognized_keys\") {\n unrecIssue ?? (unrecIssue = iss);\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).l = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n for (const iss of right.issues) {\n if (iss.code === \"unrecognized_keys\") {\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).r = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n // Report only keys unrecognized by BOTH sides\n const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);\n if (bothKeys.length && unrecIssue) {\n result.issues.push({ ...unrecIssue, keys: bothKeys });\n }\n if (util.aborted(result))\n return result;\n const merged = mergeValues(left.value, right.value);\n if (!merged.valid) {\n throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);\n }\n result.value = merged.data;\n return result;\n}\nexport const $ZodTuple = /*@__PURE__*/ core.$constructor(\"$ZodTuple\", (inst, def) => {\n $ZodType.init(inst, def);\n const items = def.items;\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n input,\n inst,\n expected: \"tuple\",\n code: \"invalid_type\",\n });\n return payload;\n }\n payload.value = [];\n const proms = [];\n const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== \"optional\");\n const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;\n if (!def.rest) {\n const tooBig = input.length > items.length;\n const tooSmall = input.length < optStart - 1;\n if (tooBig || tooSmall) {\n payload.issues.push({\n ...(tooBig\n ? { code: \"too_big\", maximum: items.length, inclusive: true }\n : { code: \"too_small\", minimum: items.length }),\n input,\n inst,\n origin: \"array\",\n });\n return payload;\n }\n }\n let i = -1;\n for (const item of items) {\n i++;\n if (i >= input.length)\n if (i >= optStart)\n continue;\n const result = item._zod.run({\n value: input[i],\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleTupleResult(result, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n if (def.rest) {\n const rest = input.slice(items.length);\n for (const el of rest) {\n i++;\n const result = def.rest._zod.run({\n value: el,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleTupleResult(result, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleTupleResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodRecord = /*@__PURE__*/ core.$constructor(\"$ZodRecord\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isPlainObject(input)) {\n payload.issues.push({\n expected: \"record\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n const values = def.keyType._zod.values;\n if (values) {\n payload.value = {};\n const recordKeys = new Set();\n for (const key of values) {\n if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\") {\n recordKeys.add(typeof key === \"number\" ? key.toString() : key);\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[key] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[key] = result.value;\n }\n }\n }\n let unrecognized;\n for (const key in input) {\n if (!recordKeys.has(key)) {\n unrecognized = unrecognized ?? [];\n unrecognized.push(key);\n }\n }\n if (unrecognized && unrecognized.length > 0) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n input,\n inst,\n keys: unrecognized,\n });\n }\n }\n else {\n payload.value = {};\n for (const key of Reflect.ownKeys(input)) {\n if (key === \"__proto__\")\n continue;\n let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n // Numeric string fallback: if key is a numeric string and failed, retry with Number(key)\n // This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals\n const checkNumericKey = typeof key === \"string\" && regexes.number.test(key) && keyResult.issues.length;\n if (checkNumericKey) {\n const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);\n if (retryResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (retryResult.issues.length === 0) {\n keyResult = retryResult;\n }\n }\n if (keyResult.issues.length) {\n if (def.mode === \"loose\") {\n // Pass through unchanged\n payload.value[key] = input[key];\n }\n else {\n // Default \"strict\" behavior: error on invalid key\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n }\n continue;\n }\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload;\n };\n});\nexport const $ZodMap = /*@__PURE__*/ core.$constructor(\"$ZodMap\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Map)) {\n payload.issues.push({\n expected: \"map\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n payload.value = new Map();\n for (const [key, value] of input) {\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);\n if (keyResult instanceof Promise || valueResult instanceof Promise) {\n proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }));\n }\n else {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {\n if (keyResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, keyResult.issues));\n }\n else {\n final.issues.push({\n code: \"invalid_key\",\n origin: \"map\",\n input,\n inst,\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n if (valueResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, valueResult.issues));\n }\n else {\n final.issues.push({\n origin: \"map\",\n code: \"invalid_element\",\n input,\n inst,\n key: key,\n issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n final.value.set(keyResult.value, valueResult.value);\n}\nexport const $ZodSet = /*@__PURE__*/ core.$constructor(\"$ZodSet\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Set)) {\n payload.issues.push({\n input,\n inst,\n expected: \"set\",\n code: \"invalid_type\",\n });\n return payload;\n }\n const proms = [];\n payload.value = new Set();\n for (const item of input) {\n const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleSetResult(result, payload)));\n }\n else\n handleSetResult(result, payload);\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleSetResult(result, final) {\n if (result.issues.length) {\n final.issues.push(...result.issues);\n }\n final.value.add(result.value);\n}\nexport const $ZodEnum = /*@__PURE__*/ core.$constructor(\"$ZodEnum\", (inst, def) => {\n $ZodType.init(inst, def);\n const values = util.getEnumValues(def.entries);\n const valuesSet = new Set(values);\n inst._zod.values = valuesSet;\n inst._zod.pattern = new RegExp(`^(${values\n .filter((k) => util.propertyKeyTypes.has(typeof k))\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o.toString()))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (valuesSet.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodLiteral = /*@__PURE__*/ core.$constructor(\"$ZodLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n if (def.values.length === 0) {\n throw new Error(\"Cannot create literal schema with no valid values\");\n }\n const values = new Set(def.values);\n inst._zod.values = values;\n inst._zod.pattern = new RegExp(`^(${def.values\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (values.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values: def.values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodFile = /*@__PURE__*/ core.$constructor(\"$ZodFile\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n // @ts-ignore\n if (input instanceof File)\n return payload;\n payload.issues.push({\n expected: \"file\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodTransform = /*@__PURE__*/ core.$constructor(\"$ZodTransform\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n const _out = def.transform(payload.value, payload);\n if (ctx.async) {\n const output = _out instanceof Promise ? _out : Promise.resolve(_out);\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n if (_out instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n payload.value = _out;\n return payload;\n };\n});\nfunction handleOptionalResult(result, input) {\n if (result.issues.length && input === undefined) {\n return { issues: [], value: undefined };\n }\n return result;\n}\nexport const $ZodOptional = /*@__PURE__*/ core.$constructor(\"$ZodOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, undefined]) : undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n if (def.innerType._zod.optin === \"optional\") {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise)\n return result.then((r) => handleOptionalResult(r, payload.value));\n return handleOptionalResult(result, payload.value);\n }\n if (payload.value === undefined) {\n return payload;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodExactOptional = /*@__PURE__*/ core.$constructor(\"$ZodExactOptional\", (inst, def) => {\n // Call parent init - inherits optin/optout = \"optional\"\n $ZodOptional.init(inst, def);\n // Override values/pattern to NOT add undefined\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"pattern\", () => def.innerType._zod.pattern);\n // Override parse to just delegate (no undefined handling)\n inst._zod.parse = (payload, ctx) => {\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNullable = /*@__PURE__*/ core.$constructor(\"$ZodNullable\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;\n });\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n // Forward direction (decode): allow null to pass through\n if (payload.value === null)\n return payload;\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodDefault = /*@__PURE__*/ core.$constructor(\"$ZodDefault\", (inst, def) => {\n $ZodType.init(inst, def);\n // inst._zod.qin = \"true\";\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply defaults for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n /**\n * $ZodDefault returns the default value immediately in forward direction.\n * It doesn't pass the default value into the validator (\"prefault\"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a \"prefault\" for the pipe. */\n return payload;\n }\n // Forward direction: continue with default handling\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleDefaultResult(result, def));\n }\n return handleDefaultResult(result, def);\n };\n});\nfunction handleDefaultResult(payload, def) {\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return payload;\n}\nexport const $ZodPrefault = /*@__PURE__*/ core.$constructor(\"$ZodPrefault\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply prefault for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNonOptional = /*@__PURE__*/ core.$constructor(\"$ZodNonOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => {\n const v = def.innerType._zod.values;\n return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleNonOptionalResult(result, inst));\n }\n return handleNonOptionalResult(result, inst);\n };\n});\nfunction handleNonOptionalResult(payload, inst) {\n if (!payload.issues.length && payload.value === undefined) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: payload.value,\n inst,\n });\n }\n return payload;\n}\nexport const $ZodSuccess = /*@__PURE__*/ core.$constructor(\"$ZodSuccess\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(\"ZodSuccess\");\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.issues.length === 0;\n return payload;\n });\n }\n payload.value = result.issues.length === 0;\n return payload;\n };\n});\nexport const $ZodCatch = /*@__PURE__*/ core.$constructor(\"$ZodCatch\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply catch logic\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n }\n return payload;\n });\n }\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n }\n return payload;\n };\n});\nexport const $ZodNaN = /*@__PURE__*/ core.$constructor(\"$ZodNaN\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"number\" || !Number.isNaN(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"nan\",\n code: \"invalid_type\",\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodPipe = /*@__PURE__*/ core.$constructor(\"$ZodPipe\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handlePipeResult(right, def.in, ctx));\n }\n return handlePipeResult(right, def.in, ctx);\n }\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handlePipeResult(left, def.out, ctx));\n }\n return handlePipeResult(left, def.out, ctx);\n };\n});\nfunction handlePipeResult(left, next, ctx) {\n if (left.issues.length) {\n // prevent further checks\n left.aborted = true;\n return left;\n }\n return next._zod.run({ value: left.value, issues: left.issues }, ctx);\n}\nexport const $ZodCodec = /*@__PURE__*/ core.$constructor(\"$ZodCodec\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handleCodecAResult(left, def, ctx));\n }\n return handleCodecAResult(left, def, ctx);\n }\n else {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handleCodecAResult(right, def, ctx));\n }\n return handleCodecAResult(right, def, ctx);\n }\n };\n});\nfunction handleCodecAResult(result, def, ctx) {\n if (result.issues.length) {\n // prevent further checks\n result.aborted = true;\n return result;\n }\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const transformed = def.transform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));\n }\n return handleCodecTxResult(result, transformed, def.out, ctx);\n }\n else {\n const transformed = def.reverseTransform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));\n }\n return handleCodecTxResult(result, transformed, def.in, ctx);\n }\n}\nfunction handleCodecTxResult(left, value, nextSchema, ctx) {\n // Check if transform added any issues\n if (left.issues.length) {\n left.aborted = true;\n return left;\n }\n return nextSchema._zod.run({ value, issues: left.issues }, ctx);\n}\nexport const $ZodReadonly = /*@__PURE__*/ core.$constructor(\"$ZodReadonly\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"propValues\", () => def.innerType._zod.propValues);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType?._zod?.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType?._zod?.optout);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then(handleReadonlyResult);\n }\n return handleReadonlyResult(result);\n };\n});\nfunction handleReadonlyResult(payload) {\n payload.value = Object.freeze(payload.value);\n return payload;\n}\nexport const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"$ZodTemplateLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n const regexParts = [];\n for (const part of def.parts) {\n if (typeof part === \"object\" && part !== null) {\n // is Zod schema\n if (!part._zod.pattern) {\n // if (!source)\n throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);\n }\n const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;\n if (!source)\n throw new Error(`Invalid template literal part: ${part._zod.traits}`);\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n regexParts.push(source.slice(start, end));\n }\n else if (part === null || util.primitiveTypes.has(typeof part)) {\n regexParts.push(util.escapeRegex(`${part}`));\n }\n else {\n throw new Error(`Invalid template literal part: ${part}`);\n }\n }\n inst._zod.pattern = new RegExp(`^${regexParts.join(\"\")}$`);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"string\") {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"string\",\n code: \"invalid_type\",\n });\n return payload;\n }\n inst._zod.pattern.lastIndex = 0;\n if (!inst._zod.pattern.test(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n code: \"invalid_format\",\n format: def.format ?? \"template_literal\",\n pattern: inst._zod.pattern.source,\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodFunction = /*@__PURE__*/ core.$constructor(\"$ZodFunction\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._def = def;\n inst._zod.def = def;\n inst.implement = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implement() must be called with a function\");\n }\n return function (...args) {\n const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;\n const result = Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return parse(inst._def.output, result);\n }\n return result;\n };\n };\n inst.implementAsync = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implementAsync() must be called with a function\");\n }\n return async function (...args) {\n const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;\n const result = await Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return await parseAsync(inst._def.output, result);\n }\n return result;\n };\n };\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"function\") {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"function\",\n input: payload.value,\n inst,\n });\n return payload;\n }\n // Check if output is a promise type to determine if we should use async implementation\n const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === \"promise\";\n if (hasPromiseOutput) {\n payload.value = inst.implementAsync(payload.value);\n }\n else {\n payload.value = inst.implement(payload.value);\n }\n return payload;\n };\n inst.input = (...args) => {\n const F = inst.constructor;\n if (Array.isArray(args[0])) {\n return new F({\n type: \"function\",\n input: new $ZodTuple({\n type: \"tuple\",\n items: args[0],\n rest: args[1],\n }),\n output: inst._def.output,\n });\n }\n return new F({\n type: \"function\",\n input: args[0],\n output: inst._def.output,\n });\n };\n inst.output = (output) => {\n const F = inst.constructor;\n return new F({\n type: \"function\",\n input: inst._def.input,\n output,\n });\n };\n return inst;\n});\nexport const $ZodPromise = /*@__PURE__*/ core.$constructor(\"$ZodPromise\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));\n };\n});\nexport const $ZodLazy = /*@__PURE__*/ core.$constructor(\"$ZodLazy\", (inst, def) => {\n $ZodType.init(inst, def);\n // let _innerType!: any;\n // util.defineLazy(def, \"getter\", () => {\n // if (!_innerType) {\n // _innerType = def.getter();\n // }\n // return () => _innerType;\n // });\n util.defineLazy(inst._zod, \"innerType\", () => def.getter());\n util.defineLazy(inst._zod, \"pattern\", () => inst._zod.innerType?._zod?.pattern);\n util.defineLazy(inst._zod, \"propValues\", () => inst._zod.innerType?._zod?.propValues);\n util.defineLazy(inst._zod, \"optin\", () => inst._zod.innerType?._zod?.optin ?? undefined);\n util.defineLazy(inst._zod, \"optout\", () => inst._zod.innerType?._zod?.optout ?? undefined);\n inst._zod.parse = (payload, ctx) => {\n const inner = inst._zod.innerType;\n return inner._zod.run(payload, ctx);\n };\n});\nexport const $ZodCustom = /*@__PURE__*/ core.$constructor(\"$ZodCustom\", (inst, def) => {\n checks.$ZodCheck.init(inst, def);\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _) => {\n return payload;\n };\n inst._zod.check = (payload) => {\n const input = payload.value;\n const r = def.fn(input);\n if (r instanceof Promise) {\n return r.then((r) => handleRefineResult(r, payload, input, inst));\n }\n handleRefineResult(r, payload, input, inst);\n return;\n };\n});\nfunction handleRefineResult(result, payload, input, inst) {\n if (!result) {\n const _iss = {\n code: \"custom\",\n input,\n inst, // incorporates params.error into issue reporting\n path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting\n continue: !inst._zod.def.abort,\n // params: inst._zod.def.params,\n };\n if (inst._zod.def.params)\n _iss.params = inst._zod.def.params;\n payload.issues.push(util.issue(_iss));\n }\n}\n","import * as checks from \"./checks.js\";\nimport * as registries from \"./registries.js\";\nimport * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\n// @__NO_SIDE_EFFECTS__\nexport function _string(Class, params) {\n return new Class({\n type: \"string\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedString(Class, params) {\n return new Class({\n type: \"string\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _email(Class, params) {\n return new Class({\n type: \"string\",\n format: \"email\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _guid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"guid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v4\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v6\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv7(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v7\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _emoji(Class, params) {\n return new Class({\n type: \"string\",\n format: \"emoji\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nanoid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"nanoid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid2(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid2\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ulid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ulid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _xid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"xid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ksuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ksuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mac(Class, params) {\n return new Class({\n type: \"string\",\n format: \"mac\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _e164(Class, params) {\n return new Class({\n type: \"string\",\n format: \"e164\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _jwt(Class, params) {\n return new Class({\n type: \"string\",\n format: \"jwt\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport const TimePrecision = {\n Any: null,\n Minute: -1,\n Second: 0,\n Millisecond: 3,\n Microsecond: 6,\n};\n// @__NO_SIDE_EFFECTS__\nexport function _isoDateTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"datetime\",\n check: \"string_format\",\n offset: false,\n local: false,\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDate(Class, params) {\n return new Class({\n type: \"string\",\n format: \"date\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"time\",\n check: \"string_format\",\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDuration(Class, params) {\n return new Class({\n type: \"string\",\n format: \"duration\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _number(Class, params) {\n return new Class({\n type: \"number\",\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedNumber(Class, params) {\n return new Class({\n type: \"number\",\n coerce: true,\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"safeint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float64(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"int32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"uint32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _boolean(Class, params) {\n return new Class({\n type: \"boolean\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBoolean(Class, params) {\n return new Class({\n type: \"boolean\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _bigint(Class, params) {\n return new Class({\n type: \"bigint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBigint(Class, params) {\n return new Class({\n type: \"bigint\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"int64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"uint64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _symbol(Class, params) {\n return new Class({\n type: \"symbol\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _undefined(Class, params) {\n return new Class({\n type: \"undefined\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _null(Class, params) {\n return new Class({\n type: \"null\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _any(Class) {\n return new Class({\n type: \"any\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _unknown(Class) {\n return new Class({\n type: \"unknown\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _never(Class, params) {\n return new Class({\n type: \"never\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _void(Class, params) {\n return new Class({\n type: \"void\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _date(Class, params) {\n return new Class({\n type: \"date\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedDate(Class, params) {\n return new Class({\n type: \"date\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nan(Class, params) {\n return new Class({\n type: \"nan\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lt(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lte(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\n// @__NO_SIDE_EFFECTS__\nexport function _gt(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _gte(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\n// @__NO_SIDE_EFFECTS__\nexport function _positive(params) {\n return _gt(0, params);\n}\n// negative\n// @__NO_SIDE_EFFECTS__\nexport function _negative(params) {\n return _lt(0, params);\n}\n// nonpositive\n// @__NO_SIDE_EFFECTS__\nexport function _nonpositive(params) {\n return _lte(0, params);\n}\n// nonnegative\n// @__NO_SIDE_EFFECTS__\nexport function _nonnegative(params) {\n return _gte(0, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function _multipleOf(value, params) {\n return new checks.$ZodCheckMultipleOf({\n check: \"multiple_of\",\n ...util.normalizeParams(params),\n value,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxSize(maximum, params) {\n return new checks.$ZodCheckMaxSize({\n check: \"max_size\",\n ...util.normalizeParams(params),\n maximum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minSize(minimum, params) {\n return new checks.$ZodCheckMinSize({\n check: \"min_size\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _size(size, params) {\n return new checks.$ZodCheckSizeEquals({\n check: \"size_equals\",\n ...util.normalizeParams(params),\n size,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxLength(maximum, params) {\n const ch = new checks.$ZodCheckMaxLength({\n check: \"max_length\",\n ...util.normalizeParams(params),\n maximum,\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minLength(minimum, params) {\n return new checks.$ZodCheckMinLength({\n check: \"min_length\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _length(length, params) {\n return new checks.$ZodCheckLengthEquals({\n check: \"length_equals\",\n ...util.normalizeParams(params),\n length,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _regex(pattern, params) {\n return new checks.$ZodCheckRegex({\n check: \"string_format\",\n format: \"regex\",\n ...util.normalizeParams(params),\n pattern,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lowercase(params) {\n return new checks.$ZodCheckLowerCase({\n check: \"string_format\",\n format: \"lowercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uppercase(params) {\n return new checks.$ZodCheckUpperCase({\n check: \"string_format\",\n format: \"uppercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _includes(includes, params) {\n return new checks.$ZodCheckIncludes({\n check: \"string_format\",\n format: \"includes\",\n ...util.normalizeParams(params),\n includes,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _startsWith(prefix, params) {\n return new checks.$ZodCheckStartsWith({\n check: \"string_format\",\n format: \"starts_with\",\n ...util.normalizeParams(params),\n prefix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _endsWith(suffix, params) {\n return new checks.$ZodCheckEndsWith({\n check: \"string_format\",\n format: \"ends_with\",\n ...util.normalizeParams(params),\n suffix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _property(property, schema, params) {\n return new checks.$ZodCheckProperty({\n check: \"property\",\n property,\n schema,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mime(types, params) {\n return new checks.$ZodCheckMimeType({\n check: \"mime_type\",\n mime: types,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _overwrite(tx) {\n return new checks.$ZodCheckOverwrite({\n check: \"overwrite\",\n tx,\n });\n}\n// normalize\n// @__NO_SIDE_EFFECTS__\nexport function _normalize(form) {\n return _overwrite((input) => input.normalize(form));\n}\n// trim\n// @__NO_SIDE_EFFECTS__\nexport function _trim() {\n return _overwrite((input) => input.trim());\n}\n// toLowerCase\n// @__NO_SIDE_EFFECTS__\nexport function _toLowerCase() {\n return _overwrite((input) => input.toLowerCase());\n}\n// toUpperCase\n// @__NO_SIDE_EFFECTS__\nexport function _toUpperCase() {\n return _overwrite((input) => input.toUpperCase());\n}\n// slugify\n// @__NO_SIDE_EFFECTS__\nexport function _slugify() {\n return _overwrite((input) => util.slugify(input));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _array(Class, element, params) {\n return new Class({\n type: \"array\",\n element,\n // get element() {\n // return element;\n // },\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _union(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n ...util.normalizeParams(params),\n });\n}\nexport function _xor(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _discriminatedUnion(Class, discriminator, options, params) {\n return new Class({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _intersection(Class, left, right) {\n return new Class({\n type: \"intersection\",\n left,\n right,\n });\n}\n// export function _tuple(\n// Class: util.SchemaClass<schemas.$ZodTuple>,\n// items: [],\n// params?: string | $ZodTupleParams\n// ): schemas.$ZodTuple<[], null>;\n// @__NO_SIDE_EFFECTS__\nexport function _tuple(Class, items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof schemas.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new Class({\n type: \"tuple\",\n items,\n rest,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _record(Class, keyType, valueType, params) {\n return new Class({\n type: \"record\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _map(Class, keyType, valueType, params) {\n return new Class({\n type: \"map\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _set(Class, valueType, params) {\n return new Class({\n type: \"set\",\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _enum(Class, values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n // if (Array.isArray(values)) {\n // for (const value of values) {\n // entries[value] = value;\n // }\n // } else {\n // Object.assign(entries, values);\n // }\n // const entries: util.EnumLike = {};\n // for (const val of values) {\n // entries[val] = val;\n // }\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function _nativeEnum(Class, entries, params) {\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _literal(Class, value, params) {\n return new Class({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _file(Class, params) {\n return new Class({\n type: \"file\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _transform(Class, fn) {\n return new Class({\n type: \"transform\",\n transform: fn,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _optional(Class, innerType) {\n return new Class({\n type: \"optional\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nullable(Class, innerType) {\n return new Class({\n type: \"nullable\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _default(Class, innerType, defaultValue) {\n return new Class({\n type: \"default\",\n innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nonoptional(Class, innerType, params) {\n return new Class({\n type: \"nonoptional\",\n innerType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _success(Class, innerType) {\n return new Class({\n type: \"success\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _catch(Class, innerType, catchValue) {\n return new Class({\n type: \"catch\",\n innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _pipe(Class, in_, out) {\n return new Class({\n type: \"pipe\",\n in: in_,\n out,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _readonly(Class, innerType) {\n return new Class({\n type: \"readonly\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _templateLiteral(Class, parts, params) {\n return new Class({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lazy(Class, getter) {\n return new Class({\n type: \"lazy\",\n getter,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _promise(Class, innerType) {\n return new Class({\n type: \"promise\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _custom(Class, fn, _params) {\n const norm = util.normalizeParams(_params);\n norm.abort ?? (norm.abort = true); // default to abort:false\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...norm,\n });\n return schema;\n}\n// same as _custom but defaults to abort:false\n// @__NO_SIDE_EFFECTS__\nexport function _refine(Class, fn, _params) {\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...util.normalizeParams(_params),\n });\n return schema;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _superRefine(fn) {\n const ch = _check((payload) => {\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, ch._zod.def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n _issue.input ?? (_issue.input = payload.value);\n _issue.inst ?? (_issue.inst = ch);\n _issue.continue ?? (_issue.continue = !ch._zod.def.abort); // abort is always undefined, so this is always true...\n payload.issues.push(util.issue(_issue));\n }\n };\n return fn(payload.value, payload);\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _check(fn, params) {\n const ch = new checks.$ZodCheck({\n check: \"custom\",\n ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function describe(description) {\n const ch = new checks.$ZodCheck({ check: \"describe\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, description });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function meta(metadata) {\n const ch = new checks.$ZodCheck({ check: \"meta\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, ...metadata });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringbool(Classes, _params) {\n const params = util.normalizeParams(_params);\n let truthyArray = params.truthy ?? [\"true\", \"1\", \"yes\", \"on\", \"y\", \"enabled\"];\n let falsyArray = params.falsy ?? [\"false\", \"0\", \"no\", \"off\", \"n\", \"disabled\"];\n if (params.case !== \"sensitive\") {\n truthyArray = truthyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n falsyArray = falsyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n }\n const truthySet = new Set(truthyArray);\n const falsySet = new Set(falsyArray);\n const _Codec = Classes.Codec ?? schemas.$ZodCodec;\n const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;\n const _String = Classes.String ?? schemas.$ZodString;\n const stringSchema = new _String({ type: \"string\", error: params.error });\n const booleanSchema = new _Boolean({ type: \"boolean\", error: params.error });\n const codec = new _Codec({\n type: \"pipe\",\n in: stringSchema,\n out: booleanSchema,\n transform: ((input, payload) => {\n let data = input;\n if (params.case !== \"sensitive\")\n data = data.toLowerCase();\n if (truthySet.has(data)) {\n return true;\n }\n else if (falsySet.has(data)) {\n return false;\n }\n else {\n payload.issues.push({\n code: \"invalid_value\",\n expected: \"stringbool\",\n values: [...truthySet, ...falsySet],\n input: payload.value,\n inst: codec,\n continue: false,\n });\n return {};\n }\n }),\n reverseTransform: ((input, _payload) => {\n if (input === true) {\n return truthyArray[0] || \"true\";\n }\n else {\n return falsyArray[0] || \"false\";\n }\n }),\n error: params.error,\n });\n return codec;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringFormat(Class, format, fnOrRegex, _params = {}) {\n const params = util.normalizeParams(_params);\n const def = {\n ...util.normalizeParams(_params),\n check: \"string_format\",\n type: \"string\",\n format,\n fn: typeof fnOrRegex === \"function\" ? fnOrRegex : (val) => fnOrRegex.test(val),\n ...params,\n };\n if (fnOrRegex instanceof RegExp) {\n def.pattern = fnOrRegex;\n }\n const inst = new Class(def);\n return inst;\n}\n","import * as core from \"../core/index.js\";\nimport * as util from \"../core/util.js\";\nimport * as parse from \"./parse.js\";\nexport const ZodMiniType = /*@__PURE__*/ core.$constructor(\"ZodMiniType\", (inst, def) => {\n if (!inst._zod)\n throw new Error(\"Uninitialized schema in ZodMiniType.\");\n core.$ZodType.init(inst, def);\n inst.def = def;\n inst.type = def.type;\n inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });\n inst.safeParse = (data, params) => parse.safeParse(inst, data, params);\n inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });\n inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);\n inst.check = (...checks) => {\n return inst.clone({\n ...def,\n checks: [\n ...(def.checks ?? []),\n ...checks.map((ch) => typeof ch === \"function\" ? { _zod: { check: ch, def: { check: \"custom\" }, onattach: [] } } : ch),\n ],\n }, { parent: true });\n };\n inst.with = inst.check;\n inst.clone = (_def, params) => core.clone(inst, _def, params);\n inst.brand = () => inst;\n inst.register = ((reg, meta) => {\n reg.add(inst, meta);\n return inst;\n });\n inst.apply = (fn) => fn(inst);\n});\nexport const ZodMiniString = /*@__PURE__*/ core.$constructor(\"ZodMiniString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function string(params) {\n return core._string(ZodMiniString, params);\n}\nexport const ZodMiniStringFormat = /*@__PURE__*/ core.$constructor(\"ZodMiniStringFormat\", (inst, def) => {\n core.$ZodStringFormat.init(inst, def);\n ZodMiniString.init(inst, def);\n});\nexport const ZodMiniEmail = /*@__PURE__*/ core.$constructor(\"ZodMiniEmail\", (inst, def) => {\n core.$ZodEmail.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function email(params) {\n return core._email(ZodMiniEmail, params);\n}\nexport const ZodMiniGUID = /*@__PURE__*/ core.$constructor(\"ZodMiniGUID\", (inst, def) => {\n core.$ZodGUID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function guid(params) {\n return core._guid(ZodMiniGUID, params);\n}\nexport const ZodMiniUUID = /*@__PURE__*/ core.$constructor(\"ZodMiniUUID\", (inst, def) => {\n core.$ZodUUID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function uuid(params) {\n return core._uuid(ZodMiniUUID, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function uuidv4(params) {\n return core._uuidv4(ZodMiniUUID, params);\n}\n// ZodMiniUUIDv6\n// @__NO_SIDE_EFFECTS__\nexport function uuidv6(params) {\n return core._uuidv6(ZodMiniUUID, params);\n}\n// ZodMiniUUIDv7\n// @__NO_SIDE_EFFECTS__\nexport function uuidv7(params) {\n return core._uuidv7(ZodMiniUUID, params);\n}\nexport const ZodMiniURL = /*@__PURE__*/ core.$constructor(\"ZodMiniURL\", (inst, def) => {\n core.$ZodURL.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function url(params) {\n return core._url(ZodMiniURL, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function httpUrl(params) {\n return core._url(ZodMiniURL, {\n protocol: /^https?$/,\n hostname: core.regexes.domain,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniEmoji = /*@__PURE__*/ core.$constructor(\"ZodMiniEmoji\", (inst, def) => {\n core.$ZodEmoji.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function emoji(params) {\n return core._emoji(ZodMiniEmoji, params);\n}\nexport const ZodMiniNanoID = /*@__PURE__*/ core.$constructor(\"ZodMiniNanoID\", (inst, def) => {\n core.$ZodNanoID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function nanoid(params) {\n return core._nanoid(ZodMiniNanoID, params);\n}\nexport const ZodMiniCUID = /*@__PURE__*/ core.$constructor(\"ZodMiniCUID\", (inst, def) => {\n core.$ZodCUID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function cuid(params) {\n return core._cuid(ZodMiniCUID, params);\n}\nexport const ZodMiniCUID2 = /*@__PURE__*/ core.$constructor(\"ZodMiniCUID2\", (inst, def) => {\n core.$ZodCUID2.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function cuid2(params) {\n return core._cuid2(ZodMiniCUID2, params);\n}\nexport const ZodMiniULID = /*@__PURE__*/ core.$constructor(\"ZodMiniULID\", (inst, def) => {\n core.$ZodULID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function ulid(params) {\n return core._ulid(ZodMiniULID, params);\n}\nexport const ZodMiniXID = /*@__PURE__*/ core.$constructor(\"ZodMiniXID\", (inst, def) => {\n core.$ZodXID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function xid(params) {\n return core._xid(ZodMiniXID, params);\n}\nexport const ZodMiniKSUID = /*@__PURE__*/ core.$constructor(\"ZodMiniKSUID\", (inst, def) => {\n core.$ZodKSUID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function ksuid(params) {\n return core._ksuid(ZodMiniKSUID, params);\n}\nexport const ZodMiniIPv4 = /*@__PURE__*/ core.$constructor(\"ZodMiniIPv4\", (inst, def) => {\n core.$ZodIPv4.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function ipv4(params) {\n return core._ipv4(ZodMiniIPv4, params);\n}\nexport const ZodMiniIPv6 = /*@__PURE__*/ core.$constructor(\"ZodMiniIPv6\", (inst, def) => {\n core.$ZodIPv6.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function ipv6(params) {\n return core._ipv6(ZodMiniIPv6, params);\n}\nexport const ZodMiniCIDRv4 = /*@__PURE__*/ core.$constructor(\"ZodMiniCIDRv4\", (inst, def) => {\n core.$ZodCIDRv4.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function cidrv4(params) {\n return core._cidrv4(ZodMiniCIDRv4, params);\n}\nexport const ZodMiniCIDRv6 = /*@__PURE__*/ core.$constructor(\"ZodMiniCIDRv6\", (inst, def) => {\n core.$ZodCIDRv6.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function cidrv6(params) {\n return core._cidrv6(ZodMiniCIDRv6, params);\n}\nexport const ZodMiniMAC = /*@__PURE__*/ core.$constructor(\"ZodMiniMAC\", (inst, def) => {\n core.$ZodMAC.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function mac(params) {\n return core._mac(ZodMiniMAC, params);\n}\nexport const ZodMiniBase64 = /*@__PURE__*/ core.$constructor(\"ZodMiniBase64\", (inst, def) => {\n core.$ZodBase64.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function base64(params) {\n return core._base64(ZodMiniBase64, params);\n}\nexport const ZodMiniBase64URL = /*@__PURE__*/ core.$constructor(\"ZodMiniBase64URL\", (inst, def) => {\n core.$ZodBase64URL.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function base64url(params) {\n return core._base64url(ZodMiniBase64URL, params);\n}\nexport const ZodMiniE164 = /*@__PURE__*/ core.$constructor(\"ZodMiniE164\", (inst, def) => {\n core.$ZodE164.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function e164(params) {\n return core._e164(ZodMiniE164, params);\n}\nexport const ZodMiniJWT = /*@__PURE__*/ core.$constructor(\"ZodMiniJWT\", (inst, def) => {\n core.$ZodJWT.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function jwt(params) {\n return core._jwt(ZodMiniJWT, params);\n}\nexport const ZodMiniCustomStringFormat = /*@__PURE__*/ core.$constructor(\"ZodMiniCustomStringFormat\", (inst, def) => {\n core.$ZodCustomStringFormat.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function stringFormat(format, fnOrRegex, _params = {}) {\n return core._stringFormat(ZodMiniCustomStringFormat, format, fnOrRegex, _params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function hostname(_params) {\n return core._stringFormat(ZodMiniCustomStringFormat, \"hostname\", core.regexes.hostname, _params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function hex(_params) {\n return core._stringFormat(ZodMiniCustomStringFormat, \"hex\", core.regexes.hex, _params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function hash(alg, params) {\n const enc = params?.enc ?? \"hex\";\n const format = `${alg}_${enc}`;\n const regex = core.regexes[format];\n // check for unrecognized format\n if (!regex)\n throw new Error(`Unrecognized hash format: ${format}`);\n return core._stringFormat(ZodMiniCustomStringFormat, format, regex, params);\n}\nexport const ZodMiniNumber = /*@__PURE__*/ core.$constructor(\"ZodMiniNumber\", (inst, def) => {\n core.$ZodNumber.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function number(params) {\n return core._number(ZodMiniNumber, params);\n}\nexport const ZodMiniNumberFormat = /*@__PURE__*/ core.$constructor(\"ZodMiniNumberFormat\", (inst, def) => {\n core.$ZodNumberFormat.init(inst, def);\n ZodMiniNumber.init(inst, def);\n});\n// int\n// @__NO_SIDE_EFFECTS__\nexport function int(params) {\n return core._int(ZodMiniNumberFormat, params);\n}\n// float32\n// @__NO_SIDE_EFFECTS__\nexport function float32(params) {\n return core._float32(ZodMiniNumberFormat, params);\n}\n// float64\n// @__NO_SIDE_EFFECTS__\nexport function float64(params) {\n return core._float64(ZodMiniNumberFormat, params);\n}\n// int32\n// @__NO_SIDE_EFFECTS__\nexport function int32(params) {\n return core._int32(ZodMiniNumberFormat, params);\n}\n// uint32\n// @__NO_SIDE_EFFECTS__\nexport function uint32(params) {\n return core._uint32(ZodMiniNumberFormat, params);\n}\nexport const ZodMiniBoolean = /*@__PURE__*/ core.$constructor(\"ZodMiniBoolean\", (inst, def) => {\n core.$ZodBoolean.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function boolean(params) {\n return core._boolean(ZodMiniBoolean, params);\n}\nexport const ZodMiniBigInt = /*@__PURE__*/ core.$constructor(\"ZodMiniBigInt\", (inst, def) => {\n core.$ZodBigInt.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function bigint(params) {\n return core._bigint(ZodMiniBigInt, params);\n}\nexport const ZodMiniBigIntFormat = /*@__PURE__*/ core.$constructor(\"ZodMiniBigIntFormat\", (inst, def) => {\n core.$ZodBigIntFormat.init(inst, def);\n ZodMiniBigInt.init(inst, def);\n});\n// int64\n// @__NO_SIDE_EFFECTS__\nexport function int64(params) {\n return core._int64(ZodMiniBigIntFormat, params);\n}\n// uint64\n// @__NO_SIDE_EFFECTS__\nexport function uint64(params) {\n return core._uint64(ZodMiniBigIntFormat, params);\n}\nexport const ZodMiniSymbol = /*@__PURE__*/ core.$constructor(\"ZodMiniSymbol\", (inst, def) => {\n core.$ZodSymbol.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function symbol(params) {\n return core._symbol(ZodMiniSymbol, params);\n}\nexport const ZodMiniUndefined = /*@__PURE__*/ core.$constructor(\"ZodMiniUndefined\", (inst, def) => {\n core.$ZodUndefined.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nfunction _undefined(params) {\n return core._undefined(ZodMiniUndefined, params);\n}\nexport { _undefined as undefined };\nexport const ZodMiniNull = /*@__PURE__*/ core.$constructor(\"ZodMiniNull\", (inst, def) => {\n core.$ZodNull.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nfunction _null(params) {\n return core._null(ZodMiniNull, params);\n}\nexport { _null as null };\nexport const ZodMiniAny = /*@__PURE__*/ core.$constructor(\"ZodMiniAny\", (inst, def) => {\n core.$ZodAny.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function any() {\n return core._any(ZodMiniAny);\n}\nexport const ZodMiniUnknown = /*@__PURE__*/ core.$constructor(\"ZodMiniUnknown\", (inst, def) => {\n core.$ZodUnknown.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function unknown() {\n return core._unknown(ZodMiniUnknown);\n}\nexport const ZodMiniNever = /*@__PURE__*/ core.$constructor(\"ZodMiniNever\", (inst, def) => {\n core.$ZodNever.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function never(params) {\n return core._never(ZodMiniNever, params);\n}\nexport const ZodMiniVoid = /*@__PURE__*/ core.$constructor(\"ZodMiniVoid\", (inst, def) => {\n core.$ZodVoid.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nfunction _void(params) {\n return core._void(ZodMiniVoid, params);\n}\nexport { _void as void };\nexport const ZodMiniDate = /*@__PURE__*/ core.$constructor(\"ZodMiniDate\", (inst, def) => {\n core.$ZodDate.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function date(params) {\n return core._date(ZodMiniDate, params);\n}\nexport const ZodMiniArray = /*@__PURE__*/ core.$constructor(\"ZodMiniArray\", (inst, def) => {\n core.$ZodArray.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function array(element, params) {\n return new ZodMiniArray({\n type: \"array\",\n element: element,\n ...util.normalizeParams(params),\n });\n}\n// .keyof\n// @__NO_SIDE_EFFECTS__\nexport function keyof(schema) {\n const shape = schema._zod.def.shape;\n return _enum(Object.keys(shape));\n}\nexport const ZodMiniObject = /*@__PURE__*/ core.$constructor(\"ZodMiniObject\", (inst, def) => {\n core.$ZodObject.init(inst, def);\n ZodMiniType.init(inst, def);\n util.defineLazy(inst, \"shape\", () => def.shape);\n});\n// @__NO_SIDE_EFFECTS__\nexport function object(shape, params) {\n const def = {\n type: \"object\",\n shape: shape ?? {},\n ...util.normalizeParams(params),\n };\n return new ZodMiniObject(def);\n}\n// strictObject\n// @__NO_SIDE_EFFECTS__\nexport function strictObject(shape, params) {\n return new ZodMiniObject({\n type: \"object\",\n shape,\n catchall: never(),\n ...util.normalizeParams(params),\n });\n}\n// looseObject\n// @__NO_SIDE_EFFECTS__\nexport function looseObject(shape, params) {\n return new ZodMiniObject({\n type: \"object\",\n shape,\n catchall: unknown(),\n ...util.normalizeParams(params),\n });\n}\n// object methods\n// @__NO_SIDE_EFFECTS__\nexport function extend(schema, shape) {\n return util.extend(schema, shape);\n}\n// @__NO_SIDE_EFFECTS__\nexport function safeExtend(schema, shape) {\n return util.safeExtend(schema, shape);\n}\n// @__NO_SIDE_EFFECTS__\nexport function merge(schema, shape) {\n return util.extend(schema, shape);\n}\n// @__NO_SIDE_EFFECTS__\nexport function pick(schema, mask) {\n return util.pick(schema, mask);\n}\n// .omit\n// @__NO_SIDE_EFFECTS__\nexport function omit(schema, mask) {\n return util.omit(schema, mask);\n}\n// @__NO_SIDE_EFFECTS__\nexport function partial(schema, mask) {\n return util.partial(ZodMiniOptional, schema, mask);\n}\n// @__NO_SIDE_EFFECTS__\nexport function required(schema, mask) {\n return util.required(ZodMiniNonOptional, schema, mask);\n}\n// @__NO_SIDE_EFFECTS__\nexport function catchall(inst, catchall) {\n return inst.clone({ ...inst._zod.def, catchall: catchall });\n}\nexport const ZodMiniUnion = /*@__PURE__*/ core.$constructor(\"ZodMiniUnion\", (inst, def) => {\n core.$ZodUnion.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function union(options, params) {\n return new ZodMiniUnion({\n type: \"union\",\n options: options,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniXor = /*@__PURE__*/ core.$constructor(\"ZodMiniXor\", (inst, def) => {\n ZodMiniUnion.init(inst, def);\n core.$ZodXor.init(inst, def);\n});\n/** Creates an exclusive union (XOR) where exactly one option must match.\n * Unlike regular unions that succeed when any option matches, xor fails if\n * zero or more than one option matches the input. */\nexport function xor(options, params) {\n return new ZodMiniXor({\n type: \"union\",\n options: options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniDiscriminatedUnion = /*@__PURE__*/ core.$constructor(\"ZodMiniDiscriminatedUnion\", (inst, def) => {\n core.$ZodDiscriminatedUnion.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function discriminatedUnion(discriminator, options, params) {\n return new ZodMiniDiscriminatedUnion({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniIntersection = /*@__PURE__*/ core.$constructor(\"ZodMiniIntersection\", (inst, def) => {\n core.$ZodIntersection.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function intersection(left, right) {\n return new ZodMiniIntersection({\n type: \"intersection\",\n left: left,\n right: right,\n });\n}\nexport const ZodMiniTuple = /*@__PURE__*/ core.$constructor(\"ZodMiniTuple\", (inst, def) => {\n core.$ZodTuple.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function tuple(items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof core.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new ZodMiniTuple({\n type: \"tuple\",\n items: items,\n rest,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniRecord = /*@__PURE__*/ core.$constructor(\"ZodMiniRecord\", (inst, def) => {\n core.$ZodRecord.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function record(keyType, valueType, params) {\n return new ZodMiniRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function partialRecord(keyType, valueType, params) {\n const k = core.clone(keyType);\n k._zod.values = undefined;\n return new ZodMiniRecord({\n type: \"record\",\n keyType: k,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport function looseRecord(keyType, valueType, params) {\n return new ZodMiniRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n mode: \"loose\",\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniMap = /*@__PURE__*/ core.$constructor(\"ZodMiniMap\", (inst, def) => {\n core.$ZodMap.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function map(keyType, valueType, params) {\n return new ZodMiniMap({\n type: \"map\",\n keyType: keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniSet = /*@__PURE__*/ core.$constructor(\"ZodMiniSet\", (inst, def) => {\n core.$ZodSet.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function set(valueType, params) {\n return new ZodMiniSet({\n type: \"set\",\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniEnum = /*@__PURE__*/ core.$constructor(\"ZodMiniEnum\", (inst, def) => {\n core.$ZodEnum.init(inst, def);\n ZodMiniType.init(inst, def);\n inst.options = Object.values(def.entries);\n});\n// @__NO_SIDE_EFFECTS__\nfunction _enum(values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n return new ZodMiniEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport { _enum as enum };\n// @__NO_SIDE_EFFECTS__\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function nativeEnum(entries, params) {\n return new ZodMiniEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniLiteral = /*@__PURE__*/ core.$constructor(\"ZodMiniLiteral\", (inst, def) => {\n core.$ZodLiteral.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function literal(value, params) {\n return new ZodMiniLiteral({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniFile = /*@__PURE__*/ core.$constructor(\"ZodMiniFile\", (inst, def) => {\n core.$ZodFile.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function file(params) {\n return core._file(ZodMiniFile, params);\n}\nexport const ZodMiniTransform = /*@__PURE__*/ core.$constructor(\"ZodMiniTransform\", (inst, def) => {\n core.$ZodTransform.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function transform(fn) {\n return new ZodMiniTransform({\n type: \"transform\",\n transform: fn,\n });\n}\nexport const ZodMiniOptional = /*@__PURE__*/ core.$constructor(\"ZodMiniOptional\", (inst, def) => {\n core.$ZodOptional.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function optional(innerType) {\n return new ZodMiniOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodMiniExactOptional = /*@__PURE__*/ core.$constructor(\"ZodMiniExactOptional\", (inst, def) => {\n core.$ZodExactOptional.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function exactOptional(innerType) {\n return new ZodMiniExactOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodMiniNullable = /*@__PURE__*/ core.$constructor(\"ZodMiniNullable\", (inst, def) => {\n core.$ZodNullable.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function nullable(innerType) {\n return new ZodMiniNullable({\n type: \"nullable\",\n innerType: innerType,\n });\n}\n// nullish\n// @__NO_SIDE_EFFECTS__\nexport function nullish(innerType) {\n return optional(nullable(innerType));\n}\nexport const ZodMiniDefault = /*@__PURE__*/ core.$constructor(\"ZodMiniDefault\", (inst, def) => {\n core.$ZodDefault.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function _default(innerType, defaultValue) {\n return new ZodMiniDefault({\n type: \"default\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodMiniPrefault = /*@__PURE__*/ core.$constructor(\"ZodMiniPrefault\", (inst, def) => {\n core.$ZodPrefault.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function prefault(innerType, defaultValue) {\n return new ZodMiniPrefault({\n type: \"prefault\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodMiniNonOptional = /*@__PURE__*/ core.$constructor(\"ZodMiniNonOptional\", (inst, def) => {\n core.$ZodNonOptional.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function nonoptional(innerType, params) {\n return new ZodMiniNonOptional({\n type: \"nonoptional\",\n innerType: innerType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniSuccess = /*@__PURE__*/ core.$constructor(\"ZodMiniSuccess\", (inst, def) => {\n core.$ZodSuccess.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function success(innerType) {\n return new ZodMiniSuccess({\n type: \"success\",\n innerType: innerType,\n });\n}\nexport const ZodMiniCatch = /*@__PURE__*/ core.$constructor(\"ZodMiniCatch\", (inst, def) => {\n core.$ZodCatch.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nfunction _catch(innerType, catchValue) {\n return new ZodMiniCatch({\n type: \"catch\",\n innerType: innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\nexport { _catch as catch };\nexport const ZodMiniNaN = /*@__PURE__*/ core.$constructor(\"ZodMiniNaN\", (inst, def) => {\n core.$ZodNaN.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function nan(params) {\n return core._nan(ZodMiniNaN, params);\n}\nexport const ZodMiniPipe = /*@__PURE__*/ core.$constructor(\"ZodMiniPipe\", (inst, def) => {\n core.$ZodPipe.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function pipe(in_, out) {\n return new ZodMiniPipe({\n type: \"pipe\",\n in: in_,\n out: out,\n });\n}\nexport const ZodMiniCodec = /*@__PURE__*/ core.$constructor(\"ZodMiniCodec\", (inst, def) => {\n ZodMiniPipe.init(inst, def);\n core.$ZodCodec.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function codec(in_, out, params) {\n return new ZodMiniCodec({\n type: \"pipe\",\n in: in_,\n out: out,\n transform: params.decode,\n reverseTransform: params.encode,\n });\n}\nexport const ZodMiniReadonly = /*@__PURE__*/ core.$constructor(\"ZodMiniReadonly\", (inst, def) => {\n core.$ZodReadonly.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function readonly(innerType) {\n return new ZodMiniReadonly({\n type: \"readonly\",\n innerType: innerType,\n });\n}\nexport const ZodMiniTemplateLiteral = /*@__PURE__*/ core.$constructor(\"ZodMiniTemplateLiteral\", (inst, def) => {\n core.$ZodTemplateLiteral.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function templateLiteral(parts, params) {\n return new ZodMiniTemplateLiteral({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniLazy = /*@__PURE__*/ core.$constructor(\"ZodMiniLazy\", (inst, def) => {\n core.$ZodLazy.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// export function lazy<T extends object>(getter: () => T): T {\n// return util.createTransparentProxy<T>(getter);\n// }\n// @__NO_SIDE_EFFECTS__\nfunction _lazy(getter) {\n return new ZodMiniLazy({\n type: \"lazy\",\n getter: getter,\n });\n}\nexport { _lazy as lazy };\nexport const ZodMiniPromise = /*@__PURE__*/ core.$constructor(\"ZodMiniPromise\", (inst, def) => {\n core.$ZodPromise.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function promise(innerType) {\n return new ZodMiniPromise({\n type: \"promise\",\n innerType: innerType,\n });\n}\nexport const ZodMiniCustom = /*@__PURE__*/ core.$constructor(\"ZodMiniCustom\", (inst, def) => {\n core.$ZodCustom.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// custom checks\n// @__NO_SIDE_EFFECTS__\nexport function check(fn, params) {\n const ch = new core.$ZodCheck({\n check: \"custom\",\n ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\n// ZodCustom\n// custom schema\n// @__NO_SIDE_EFFECTS__\nexport function custom(fn, _params) {\n return core._custom(ZodMiniCustom, fn ?? (() => true), _params);\n}\n// refine\n// @__NO_SIDE_EFFECTS__\nexport function refine(fn, _params = {}) {\n return core._refine(ZodMiniCustom, fn, _params);\n}\n// superRefine\n// @__NO_SIDE_EFFECTS__\nexport function superRefine(fn) {\n return core._superRefine(fn);\n}\n// Re-export describe and meta from core\nexport const describe = core.describe;\nexport const meta = core.meta;\n// instanceof\nclass Class {\n constructor(..._args) { }\n}\n// @__NO_SIDE_EFFECTS__\nfunction _instanceof(cls, params = {}) {\n const inst = custom((data) => data instanceof cls, params);\n inst._zod.bag.Class = cls;\n // Override check to emit invalid_type instead of custom\n inst._zod.check = (payload) => {\n if (!(payload.value instanceof cls)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: cls.name,\n input: payload.value,\n inst,\n path: [...(inst._zod.def.path ?? [])],\n });\n }\n };\n return inst;\n}\nexport { _instanceof as instanceof };\n// stringbool\nexport const stringbool = (...args) => core._stringbool({\n Codec: ZodMiniCodec,\n Boolean: ZodMiniBoolean,\n String: ZodMiniString,\n}, ...args);\n// @__NO_SIDE_EFFECTS__\nexport function json() {\n const jsonSchema = _lazy(() => {\n return union([string(), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);\n });\n return jsonSchema;\n}\nexport const ZodMiniFunction = /*@__PURE__*/ core.$constructor(\"ZodMiniFunction\", (inst, def) => {\n core.$ZodFunction.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function _function(params) {\n return new ZodMiniFunction({\n type: \"function\",\n input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),\n output: params?.output ?? unknown(),\n });\n}\nexport { _function as function };\n","import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\n// @__NO_SIDE_EFFECTS__\nexport function string(params) {\n return core._coercedString(schemas.ZodMiniString, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function number(params) {\n return core._coercedNumber(schemas.ZodMiniNumber, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function boolean(params) {\n return core._coercedBoolean(schemas.ZodMiniBoolean, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function bigint(params) {\n return core._coercedBigint(schemas.ZodMiniBigInt, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function date(params) {\n return core._coercedDate(schemas.ZodMiniDate, params);\n}\n","import * as z from \"zod/mini\";\n\n//#region upstream/framework/lib/property/input/common.ts\nconst BasePropertySchema = z.object({\n\tdisplayName: z.string(),\n\tdescription: z.optional(z.string()),\n\tadvanced: z.optional(z.boolean()),\n\twidth: z.optional(z.enum([\"half\", \"full\"])),\n\ticon: z.optional(z.string()),\n\tplaceholder: z.optional(z.string())\n});\nconst TPropertyValue = (_T, propertyType) => z.object({\n\ttype: z.literal(propertyType),\n\trequired: z.boolean(),\n\tdefaultValue: z.optional(z.any())\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/property-type.ts\nlet PropertyType = /* @__PURE__ */ function(PropertyType) {\n\tPropertyType[\"SHORT_TEXT\"] = \"SHORT_TEXT\";\n\tPropertyType[\"LONG_TEXT\"] = \"LONG_TEXT\";\n\tPropertyType[\"RICH_TEXT\"] = \"RICH_TEXT\";\n\tPropertyType[\"MARKDOWN\"] = \"MARKDOWN\";\n\tPropertyType[\"DROPDOWN\"] = \"DROPDOWN\";\n\tPropertyType[\"STATIC_DROPDOWN\"] = \"STATIC_DROPDOWN\";\n\tPropertyType[\"NUMBER\"] = \"NUMBER\";\n\tPropertyType[\"CHECKBOX\"] = \"CHECKBOX\";\n\tPropertyType[\"OAUTH2\"] = \"OAUTH2\";\n\tPropertyType[\"SECRET_TEXT\"] = \"SECRET_TEXT\";\n\tPropertyType[\"ARRAY\"] = \"ARRAY\";\n\tPropertyType[\"OBJECT\"] = \"OBJECT\";\n\tPropertyType[\"BASIC_AUTH\"] = \"BASIC_AUTH\";\n\tPropertyType[\"JSON\"] = \"JSON\";\n\tPropertyType[\"MULTI_SELECT_DROPDOWN\"] = \"MULTI_SELECT_DROPDOWN\";\n\tPropertyType[\"STATIC_MULTI_SELECT_DROPDOWN\"] = \"STATIC_MULTI_SELECT_DROPDOWN\";\n\tPropertyType[\"DYNAMIC\"] = \"DYNAMIC\";\n\tPropertyType[\"CUSTOM_AUTH\"] = \"CUSTOM_AUTH\";\n\tPropertyType[\"OIDC\"] = \"OIDC\";\n\tPropertyType[\"DATE_TIME\"] = \"DATE_TIME\";\n\tPropertyType[\"DATE_RANGE\"] = \"DATE_RANGE\";\n\tPropertyType[\"FILE\"] = \"FILE\";\n\tPropertyType[\"CUSTOM\"] = \"CUSTOM\";\n\tPropertyType[\"COLOR\"] = \"COLOR\";\n\treturn PropertyType;\n}({});\n\n//#endregion\n//#region upstream/framework/lib/property/input/text-property.ts\nconst ShortTextProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.string(), \"SHORT_TEXT\").shape\n});\nconst LongTextProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.string(), \"LONG_TEXT\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/dropdown/common.ts\nconst DropdownOption = z.object({\n\tlabel: z.string(),\n\tvalue: z.unknown(),\n\tdescription: z.optional(z.string()),\n\ticon: z.optional(z.string())\n});\nconst DropdownState = z.object({\n\tdisabled: z.optional(z.boolean()),\n\tplaceholder: z.optional(z.string()),\n\toptions: z.array(DropdownOption)\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/dropdown/static-dropdown.ts\nconst StaticDropdownDisplay = z.enum([\"cards\"]);\nconst StaticDropdownProperty = z.object({\n\t...BasePropertySchema.shape,\n\toptions: DropdownState,\n\tdisplay: z.optional(StaticDropdownDisplay),\n\t...TPropertyValue(z.unknown(), \"STATIC_DROPDOWN\").shape\n});\nconst StaticMultiSelectDropdownProperty = z.object({\n\t...BasePropertySchema.shape,\n\toptions: DropdownState,\n\t...TPropertyValue(z.array(z.unknown()), \"STATIC_MULTI_SELECT_DROPDOWN\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/checkbox-property.ts\nconst CheckboxProperty = z.object({\n\t...BasePropertySchema.shape,\n\treveals: z.optional(z.array(z.string())),\n\t...TPropertyValue(z.boolean(), \"CHECKBOX\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/number-property.ts\nconst NumberProperty = z.object({\n\t...BasePropertySchema.shape,\n\tdisplay: z.optional(z.enum([\"stepper\"])),\n\tmin: z.optional(z.number()),\n\tmax: z.optional(z.number()),\n\tstep: z.optional(z.number()),\n\t...TPropertyValue(z.number(), \"NUMBER\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/file-property.ts\nvar ApFile = class {\n\tfilename;\n\tdata;\n\textension;\n\tconstructor(filename, data, extension) {\n\t\tthis.filename = filename;\n\t\tthis.data = data;\n\t\tthis.extension = extension;\n\t}\n\tget base64() {\n\t\treturn this.data.toString(\"base64\");\n\t}\n};\nconst FileProperty = z.object({\n\t...BasePropertySchema.shape,\n\tstreaming: z.optional(z.boolean()),\n\t...TPropertyValue(z.unknown(), \"FILE\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/date-range-property.ts\nconst DateRangePreset = z.enum([\n\t\"any_time\",\n\t\"last_24_hours\",\n\t\"last_7_days\",\n\t\"last_30_days\",\n\t\"last_90_days\",\n\t\"this_month\",\n\t\"custom\"\n]);\nconst DateRangeValue = z.object({\n\tpreset: z.optional(DateRangePreset),\n\tafter: z.optional(z.string()),\n\tbefore: z.optional(z.string())\n});\nconst DateRangeProperty = z.object({\n\t...BasePropertySchema.shape,\n\tdisplay: z.optional(z.enum([\"dropdown\"])),\n\t...TPropertyValue(DateRangeValue, \"DATE_RANGE\").shape\n});\nfunction isoDaysAgo(days) {\n\treturn (/* @__PURE__ */ new Date(Date.now() - days * 24 * 60 * 60 * 1e3)).toISOString();\n}\nfunction startOfThisMonth() {\n\tconst now = /* @__PURE__ */ new Date();\n\treturn new Date(now.getFullYear(), now.getMonth(), 1).toISOString();\n}\nfunction resolve(value) {\n\tif (!value || !value.preset || value.preset === \"any_time\") return {};\n\tswitch (value.preset) {\n\t\tcase \"last_24_hours\": return { after: isoDaysAgo(1) };\n\t\tcase \"last_7_days\": return { after: isoDaysAgo(7) };\n\t\tcase \"last_30_days\": return { after: isoDaysAgo(30) };\n\t\tcase \"last_90_days\": return { after: isoDaysAgo(90) };\n\t\tcase \"this_month\": return { after: startOfThisMonth() };\n\t\tcase \"custom\": return {\n\t\t\tafter: value.after && value.after.length > 0 ? value.after : void 0,\n\t\t\tbefore: value.before && value.before.length > 0 ? value.before : void 0\n\t\t};\n\t\tdefault: return {};\n\t}\n}\nconst dateRangeUtils = { resolve };\n\n//#endregion\n//#region upstream/core-piece-types/lib/markdown.ts\nlet MarkdownVariant = /* @__PURE__ */ function(MarkdownVariant) {\n\tMarkdownVariant[\"BORDERLESS\"] = \"BORDERLESS\";\n\tMarkdownVariant[\"INFO\"] = \"INFO\";\n\tMarkdownVariant[\"WARNING\"] = \"WARNING\";\n\tMarkdownVariant[\"TIP\"] = \"TIP\";\n\treturn MarkdownVariant;\n}({});\n\n//#endregion\n//#region upstream/core-utils/lib/utils.ts\nfunction isString(str) {\n\treturn str != null && typeof str === \"string\";\n}\nfunction isNil(value) {\n\treturn value === null || value === void 0;\n}\nfunction kebabCase(str) {\n\treturn str.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/\\s+/g, \"-\").replace(/_/g, \"-\").toLowerCase().replace(/^-+|-+$/g, \"\");\n}\nfunction isEmpty(value) {\n\tif (value == null) return true;\n\tif (typeof value === \"string\" || Array.isArray(value)) return value.length === 0;\n\tif (typeof value === \"object\") return Object.keys(value).length === 0;\n\treturn false;\n}\nfunction startCase(str) {\n\treturn str.replace(/([a-z])([A-Z])/g, \"$1 $2\").replace(/[_-]+/g, \" \").replace(/\\s+/g, \" \").replace(/^[a-z]/, (match) => match.toUpperCase()).replace(/\\b[a-z]/g, (match) => match.toUpperCase());\n}\nfunction camelCase(str) {\n\treturn str.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace(\"-\", \"\").replace(\"_\", \"\"));\n}\nfunction parseToJsonIfPossible(str) {\n\ttry {\n\t\treturn JSON.parse(str);\n\t} catch (e) {\n\t\treturn str;\n\t}\n}\nfunction pickBy(object, predicate) {\n\treturn Object.keys(object).reduce((result, key) => {\n\t\tif (predicate(object[key], key)) result[key] = object[key];\n\t\treturn result;\n\t}, {});\n}\nfunction chunk(records, size) {\n\tconst chunks = [];\n\tfor (let i = 0; i < records.length; i += size) chunks.push(records.slice(i, i + size));\n\treturn chunks;\n}\nfunction unique(array) {\n\tconst seen = /* @__PURE__ */ new Set();\n\treturn array.filter((item) => {\n\t\tconst key = JSON.stringify(item);\n\t\tif (seen.has(key)) return false;\n\t\tseen.add(key);\n\t\treturn true;\n\t});\n}\nconst INVALID_BASE64_CHARS = /[^A-Za-z0-9+/=]/;\nfunction isBase64(value, options) {\n\tif (!isString(value) || value.length === 0) return false;\n\tif (options?.allowMime) {\n\t\tconst base64MarkerIndex = value.indexOf(\";base64,\");\n\t\tif (base64MarkerIndex !== -1 && value.startsWith(\"data:\")) return _isValidBase64String(value.slice(base64MarkerIndex + 8));\n\t}\n\treturn _isValidBase64String(value);\n}\nfunction _isValidBase64String(str) {\n\tconst len = str.length;\n\tif (len === 0 || len % 4 !== 0 || INVALID_BASE64_CHARS.test(str)) return false;\n\tconst firstPaddingIndex = str.indexOf(\"=\");\n\treturn firstPaddingIndex === -1 || firstPaddingIndex === len - 1 || firstPaddingIndex === len - 2 && str[len - 1] === \"=\";\n}\n\n//#endregion\n//#region upstream/core-utils/lib/try-catch.ts\nasync function tryCatch(fn) {\n\ttry {\n\t\treturn {\n\t\t\tdata: await fn(),\n\t\t\terror: null\n\t\t};\n\t} catch (error) {\n\t\treturn {\n\t\t\tdata: null,\n\t\t\terror\n\t\t};\n\t}\n}\nfunction tryCatchSync(fn) {\n\ttry {\n\t\treturn {\n\t\t\tdata: fn(),\n\t\t\terror: null\n\t\t};\n\t} catch (error) {\n\t\treturn {\n\t\t\tdata: null,\n\t\t\terror\n\t\t};\n\t}\n}\n\n//#endregion\n//#region upstream/framework/lib/property/input/markdown-property.ts\nconst MarkDownProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.void(), \"MARKDOWN\").shape,\n\tvariant: z.optional(z.enum(MarkdownVariant))\n});\n\n//#endregion\nexport { PropertyType as A, CheckboxProperty as C, DropdownState as D, DropdownOption as E, TPropertyValue as M, LongTextProperty as O, NumberProperty as S, StaticMultiSelectDropdownProperty as T, DateRangeProperty as _, chunk as a, ApFile as b, isNil as c, parseToJsonIfPossible as d, pickBy as f, DateRangePreset as g, MarkdownVariant as h, camelCase as i, BasePropertySchema as j, ShortTextProperty as k, isString as l, unique as m, tryCatch as n, isBase64 as o, startCase as p, tryCatchSync as r, isEmpty as s, MarkDownProperty as t, kebabCase as u, DateRangeValue as v, StaticDropdownProperty as w, FileProperty as x, dateRangeUtils as y };\n//# sourceMappingURL=markdown-property-DMfHjEiL.js.map","import { A as PropertyType, C as CheckboxProperty, M as TPropertyValue, O as LongTextProperty, S as NumberProperty, T as StaticMultiSelectDropdownProperty, _ as DateRangeProperty, h as MarkdownVariant, j as BasePropertySchema, k as ShortTextProperty, t as MarkDownProperty, w as StaticDropdownProperty, x as FileProperty } from \"./markdown-property-DMfHjEiL.js\";\nimport * as z from \"zod/mini\";\n\n//#region upstream/framework/lib/action/action.ts\nconst ErrorHandlingOptionsParam = z.object({\n\tretryOnFailure: z.object({\n\t\tdefaultValue: z.optional(z.boolean()),\n\t\thide: z.optional(z.boolean())\n\t}),\n\tcontinueOnFailure: z.object({\n\t\tdefaultValue: z.optional(z.boolean()),\n\t\thide: z.optional(z.boolean())\n\t})\n});\nvar IAction = class {\n\tname;\n\tdisplayName;\n\tdescription;\n\tprops;\n\tpropertyGroups;\n\trun;\n\ttest;\n\trequireAuth;\n\terrorHandlingOptions;\n\toutputSchema;\n\taudience;\n\taiMetadata;\n\tclassification;\n\tconstructor(name, displayName, description, props, propertyGroups, run, test, requireAuth, errorHandlingOptions, outputSchema, audience, aiMetadata, classification) {\n\t\tthis.name = name;\n\t\tthis.displayName = displayName;\n\t\tthis.description = description;\n\t\tthis.props = props;\n\t\tthis.propertyGroups = propertyGroups;\n\t\tthis.run = run;\n\t\tthis.test = test;\n\t\tthis.requireAuth = requireAuth;\n\t\tthis.errorHandlingOptions = errorHandlingOptions;\n\t\tthis.outputSchema = outputSchema;\n\t\tthis.audience = audience;\n\t\tthis.aiMetadata = aiMetadata;\n\t\tthis.classification = classification;\n\t}\n};\nconst createAction = (params) => {\n\treturn new IAction(params.name, params.displayName, params.description, params.props, params.propertyGroups, params.run, params.test ?? params.run, params.requireAuth ?? true, params.errorHandlingOptions ?? {\n\t\tcontinueOnFailure: { defaultValue: false },\n\t\tretryOnFailure: { defaultValue: false }\n\t}, params.outputSchema, params.audience, params.aiMetadata, params.classification);\n};\n\n//#endregion\n//#region upstream/framework/lib/property/input/dropdown/dropdown-prop.ts\nconst DropdownProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.unknown(), \"DROPDOWN\").shape,\n\trefreshers: z.array(z.string())\n});\nconst MultiSelectDropdownProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.array(z.unknown()), \"MULTI_SELECT_DROPDOWN\").shape,\n\trefreshers: z.array(z.string())\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/json-property.ts\nconst JsonProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.union([z.record(z.string(), z.unknown())]), \"JSON\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/color-property.ts\nconst ColorProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.string(), \"COLOR\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/date-time-property.ts\nconst DateTimeProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.string(), \"DATE_TIME\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/array-property.ts\nconst ArraySubProps = z.record(z.string(), z.union([\n\tShortTextProperty,\n\tLongTextProperty,\n\tStaticDropdownProperty,\n\tMultiSelectDropdownProperty,\n\tStaticMultiSelectDropdownProperty,\n\tCheckboxProperty,\n\tNumberProperty,\n\tFileProperty,\n\tJsonProperty,\n\tColorProperty,\n\tDateTimeProperty\n]));\nconst ArrayProperty = z.object({\n\t...BasePropertySchema.shape,\n\tproperties: z.optional(ArraySubProps),\n\t...TPropertyValue(z.array(z.unknown()), \"ARRAY\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/dynamic-prop.ts\nconst DynamicProp = z.union([\n\tShortTextProperty,\n\tStaticDropdownProperty,\n\tJsonProperty,\n\tArrayProperty,\n\tStaticMultiSelectDropdownProperty\n]);\nconst DynamicPropsValue = z.record(z.string(), DynamicProp);\nconst DynamicProperties = z.object({\n\trefreshers: z.array(z.string()),\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.unknown(), \"DYNAMIC\").shape\n});\n\n//#endregion\n//#region upstream/core-utils/lib/assertions.ts\nfunction assertNotNullOrUndefined(value, fieldName) {\n\tif (value === null || value === void 0) throw new Error(`${fieldName} is null or undefined`);\n}\nconst isNotUndefined = (value) => {\n\treturn value !== void 0;\n};\n\n//#endregion\n//#region upstream/framework/lib/property/input/object-property.ts\nconst ObjectProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.record(z.string(), z.unknown()), \"OBJECT\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/rich-text-property.ts\nconst RichTextProperty = z.object({\n\t...BasePropertySchema.shape,\n\tformatProperty: z.optional(z.string()),\n\t...TPropertyValue(z.string(), \"RICH_TEXT\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/custom-property.ts\nconst CustomProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.unknown(), \"CUSTOM\").shape,\n\tcode: z.string()\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/index.ts\nconst InputProperty = z.union([\n\tShortTextProperty,\n\tLongTextProperty,\n\tRichTextProperty,\n\tMarkDownProperty,\n\tCheckboxProperty,\n\tStaticDropdownProperty,\n\tStaticMultiSelectDropdownProperty,\n\tDropdownProperty,\n\tMultiSelectDropdownProperty,\n\tDynamicProperties,\n\tNumberProperty,\n\tArrayProperty,\n\tObjectProperty,\n\tJsonProperty,\n\tDateTimeProperty,\n\tDateRangeProperty,\n\tFileProperty,\n\tCustomProperty,\n\tColorProperty\n]);\nconst Property = {\n\tShortText(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"SHORT_TEXT\"\n\t\t};\n\t},\n\tCheckbox(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"CHECKBOX\"\n\t\t};\n\t},\n\tLongText(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"LONG_TEXT\"\n\t\t};\n\t},\n\tRichText(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"RICH_TEXT\"\n\t\t};\n\t},\n\tMarkDown(request) {\n\t\treturn {\n\t\t\tdisplayName: \"Markdown\",\n\t\t\trequired: false,\n\t\t\tdescription: request.value,\n\t\t\ttype: \"MARKDOWN\",\n\t\t\tvalueSchema: void 0,\n\t\t\tvariant: request.variant ?? \"INFO\"\n\t\t};\n\t},\n\tNumber(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"NUMBER\"\n\t\t};\n\t},\n\tJson(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"JSON\"\n\t\t};\n\t},\n\tArray(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"ARRAY\"\n\t\t};\n\t},\n\tObject(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"OBJECT\"\n\t\t};\n\t},\n\tDropdown(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"DROPDOWN\"\n\t\t};\n\t},\n\tStaticDropdown(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"STATIC_DROPDOWN\"\n\t\t};\n\t},\n\tMultiSelectDropdown(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"MULTI_SELECT_DROPDOWN\"\n\t\t};\n\t},\n\tDynamicProperties(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"DYNAMIC\"\n\t\t};\n\t},\n\tStaticMultiSelectDropdown(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"STATIC_MULTI_SELECT_DROPDOWN\"\n\t\t};\n\t},\n\tDateTime(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"DATE_TIME\"\n\t\t};\n\t},\n\tDateRange(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"DATE_RANGE\"\n\t\t};\n\t},\n\tFile(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"FILE\"\n\t\t};\n\t},\n\tCustom(request) {\n\t\tconst code = request.code.toString();\n\t\treturn {\n\t\t\t...request,\n\t\t\tcode,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"CUSTOM\"\n\t\t};\n\t},\n\tColor(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"COLOR\"\n\t\t};\n\t}\n};\n\n//#endregion\nexport { ErrorHandlingOptionsParam as _, ObjectProperty as a, DynamicProp as c, ArrayProperty as d, ArraySubProps as f, MultiSelectDropdownProperty as g, DropdownProperty as h, RichTextProperty as i, DynamicProperties as l, JsonProperty as m, Property as n, assertNotNullOrUndefined as o, DateTimeProperty as p, CustomProperty as r, isNotUndefined as s, InputProperty as t, DynamicPropsValue as u, IAction as v, createAction as y };\n//# sourceMappingURL=input-BHkj_oP5.js.map","import { A as PropertyType, C as CheckboxProperty, M as TPropertyValue, O as LongTextProperty, S as NumberProperty, T as StaticMultiSelectDropdownProperty, c as isNil, k as ShortTextProperty, t as MarkDownProperty, w as StaticDropdownProperty } from \"./markdown-property-DMfHjEiL.js\";\nimport * as z from \"zod/mini\";\n\n//#region upstream/core-piece-types/lib/app-connection.ts\nlet AppConnectionType = /* @__PURE__ */ function(AppConnectionType) {\n\tAppConnectionType[\"OAUTH2\"] = \"OAUTH2\";\n\tAppConnectionType[\"PLATFORM_OAUTH2\"] = \"PLATFORM_OAUTH2\";\n\tAppConnectionType[\"CLOUD_OAUTH2\"] = \"CLOUD_OAUTH2\";\n\tAppConnectionType[\"SECRET_TEXT\"] = \"SECRET_TEXT\";\n\tAppConnectionType[\"BASIC_AUTH\"] = \"BASIC_AUTH\";\n\tAppConnectionType[\"CUSTOM_AUTH\"] = \"CUSTOM_AUTH\";\n\tAppConnectionType[\"OIDC\"] = \"OIDC\";\n\tAppConnectionType[\"NO_AUTH\"] = \"NO_AUTH\";\n\treturn AppConnectionType;\n}({});\nlet OAuth2GrantType = /* @__PURE__ */ function(OAuth2GrantType) {\n\tOAuth2GrantType[\"AUTHORIZATION_CODE\"] = \"authorization_code\";\n\tOAuth2GrantType[\"CLIENT_CREDENTIALS\"] = \"client_credentials\";\n\treturn OAuth2GrantType;\n}({});\nconst BOTH_CLIENT_CREDENTIALS_AND_AUTHORIZATION_CODE = \"both_client_credentials_and_authorization_code\";\n\n//#endregion\n//#region upstream/core-piece-types/lib/trigger.ts\nlet TriggerStrategy = /* @__PURE__ */ function(TriggerStrategy) {\n\tTriggerStrategy[\"POLLING\"] = \"POLLING\";\n\tTriggerStrategy[\"WEBHOOK\"] = \"WEBHOOK\";\n\tTriggerStrategy[\"APP_WEBHOOK\"] = \"APP_WEBHOOK\";\n\tTriggerStrategy[\"MANUAL\"] = \"MANUAL\";\n\treturn TriggerStrategy;\n}({});\nlet WebhookHandshakeStrategy = /* @__PURE__ */ function(WebhookHandshakeStrategy) {\n\tWebhookHandshakeStrategy[\"NONE\"] = \"NONE\";\n\tWebhookHandshakeStrategy[\"HEADER_PRESENT\"] = \"HEADER_PRESENT\";\n\tWebhookHandshakeStrategy[\"QUERY_PRESENT\"] = \"QUERY_PRESENT\";\n\tWebhookHandshakeStrategy[\"BODY_PARAM_PRESENT\"] = \"BODY_PARAM_PRESENT\";\n\tWebhookHandshakeStrategy[\"HEAD_REQUEST\"] = \"HEAD_REQUEST\";\n\treturn WebhookHandshakeStrategy;\n}({});\nconst WebhookHandshakeConfiguration = z.object({\n\tstrategy: z.enum(WebhookHandshakeStrategy),\n\tparamName: z.optional(z.string())\n});\nlet TriggerTestStrategy = /* @__PURE__ */ function(TriggerTestStrategy) {\n\tTriggerTestStrategy[\"SIMULATION\"] = \"SIMULATION\";\n\tTriggerTestStrategy[\"TEST_FUNCTION\"] = \"TEST_FUNCTION\";\n\treturn TriggerTestStrategy;\n}({});\nconst AUTHENTICATION_PROPERTY_NAME = \"auth\";\n\n//#endregion\n//#region upstream/core-utils/lib/object-utils.ts\nconst spreadIfDefined = (key, value) => {\n\tif (isNil(value)) return {};\n\treturn { [key]: value };\n};\nconst isObject = (obj) => {\n\treturn typeof obj === \"object\" && obj !== null && !Array.isArray(obj);\n};\n\n//#endregion\n//#region upstream/framework/lib/property/authentication/common.ts\nconst BasePieceAuthSchema = z.object({\n\tdisplayName: z.string(),\n\tdescription: z.optional(z.string()),\n\thasConnectionIdentifier: z.optional(z.boolean())\n});\n\n//#endregion\n//#region upstream/framework/lib/property/authentication/basic-auth-prop.ts\nconst BasicAuthPropertyValue = z.object({\n\tusername: z.string(),\n\tpassword: z.string()\n});\nconst BasicAuthProperty = z.object({\n\t...BasePieceAuthSchema.shape,\n\tusername: z.object({\n\t\tdisplayName: z.string(),\n\t\tdescription: z.optional(z.string())\n\t}),\n\tpassword: z.object({\n\t\tdisplayName: z.string(),\n\t\tdescription: z.optional(z.string())\n\t}),\n\t...TPropertyValue(BasicAuthPropertyValue, \"BASIC_AUTH\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/authentication/secret-text-property.ts\nconst SecretTextProperty = z.object({\n\t...BasePieceAuthSchema.shape,\n\t...TPropertyValue(z.object({ auth: z.string() }), \"SECRET_TEXT\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/authentication/custom-auth-prop.ts\nconst CustomAuthProps = z.record(z.string(), z.union([\n\tShortTextProperty,\n\tLongTextProperty,\n\tSecretTextProperty,\n\tNumberProperty,\n\tStaticDropdownProperty,\n\tCheckboxProperty,\n\tMarkDownProperty,\n\tStaticMultiSelectDropdownProperty\n]));\nconst CustomAuthProperty = z.object({\n\t...BasePieceAuthSchema.shape,\n\tprops: CustomAuthProps,\n\t...TPropertyValue(z.unknown(), \"CUSTOM_AUTH\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/authentication/oidc-prop.ts\nconst OIDCAuthProps = z.record(z.string(), z.union([\n\tShortTextProperty,\n\tLongTextProperty,\n\tSecretTextProperty,\n\tNumberProperty,\n\tCheckboxProperty,\n\tStaticDropdownProperty,\n\tStaticMultiSelectDropdownProperty,\n\tMarkDownProperty\n]));\nconst OIDCProperty = z.object({\n\t...BasePieceAuthSchema.shape,\n\tprops: OIDCAuthProps,\n\t...TPropertyValue(z.unknown(), \"OIDC\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/authentication/oauth2-prop.ts\nlet OAuth2AuthorizationMethod = /* @__PURE__ */ function(OAuth2AuthorizationMethod) {\n\tOAuth2AuthorizationMethod[\"HEADER\"] = \"HEADER\";\n\tOAuth2AuthorizationMethod[\"BODY\"] = \"BODY\";\n\treturn OAuth2AuthorizationMethod;\n}({});\nconst OAuthProp = z.union([\n\tShortTextProperty,\n\tSecretTextProperty,\n\tStaticDropdownProperty\n]);\nconst OAuth2Props = z.record(z.string(), OAuthProp);\nconst OAuth2ExtraProps = z.object({\n\tprops: z.optional(z.record(z.string(), OAuthProp)),\n\tauthUrl: z.string(),\n\ttokenUrl: z.string(),\n\tscope: z.array(z.string()),\n\tprompt: z.optional(z.union([\n\t\tz.literal(\"none\"),\n\t\tz.literal(\"consent\"),\n\t\tz.literal(\"login\"),\n\t\tz.literal(\"omit\")\n\t])),\n\tpkce: z.optional(z.boolean()),\n\tpkceMethod: z.optional(z.union([z.literal(\"plain\"), z.literal(\"S256\")])),\n\tauthorizationMethod: z.optional(z.enum(OAuth2AuthorizationMethod)),\n\tgrantType: z.optional(z.union([z.enum(OAuth2GrantType), z.literal(BOTH_CLIENT_CREDENTIALS_AND_AUTHORIZATION_CODE)])),\n\textra: z.optional(z.record(z.string(), z.string()))\n});\nconst OAuth2PropertyValue = z.object({\n\taccess_token: z.string(),\n\tprops: z.optional(OAuth2Props),\n\tdata: z.record(z.string(), z.any())\n});\nconst OAuth2Property = z.object({\n\t...BasePieceAuthSchema.shape,\n\t...OAuth2ExtraProps.shape,\n\t...TPropertyValue(OAuth2PropertyValue, \"OAUTH2\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/authentication/index.ts\nconst PieceAuthProperty = z.union([\n\tBasicAuthProperty,\n\tCustomAuthProperty,\n\tOIDCProperty,\n\tOAuth2Property,\n\tSecretTextProperty\n]);\nconst DEFAULT_CONNECTION_DISPLAY_NAME = \"Connection\";\nconst PieceAuth = {\n\tSecretText(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"SECRET_TEXT\"\n\t\t};\n\t},\n\tOAuth2(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"OAUTH2\",\n\t\t\tdisplayName: request.displayName || \"Connection\"\n\t\t};\n\t},\n\tBasicAuth(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"BASIC_AUTH\",\n\t\t\tdisplayName: request.displayName || \"Connection\",\n\t\t\trequired: true\n\t\t};\n\t},\n\tCustomAuth(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"CUSTOM_AUTH\",\n\t\t\tdisplayName: request.displayName || \"Connection\"\n\t\t};\n\t},\n\tOIDC(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"OIDC\",\n\t\t\tdisplayName: request.displayName || \"Connection\"\n\t\t};\n\t},\n\tNone() {}\n};\nfunction getAuthPropertyForValue({ authValueType, pieceAuth }) {\n\tif (!Array.isArray(pieceAuth) || isNil(pieceAuth)) return pieceAuth;\n\treturn pieceAuth.find((auth) => authConnectionTypeToPropertyType[authValueType] === auth.type) ?? pieceAuth.at(0);\n}\nconst authConnectionTypeToPropertyType = {\n\t[\"OAUTH2\"]: \"OAUTH2\",\n\t[\"CLOUD_OAUTH2\"]: \"OAUTH2\",\n\t[\"PLATFORM_OAUTH2\"]: \"OAUTH2\",\n\t[\"BASIC_AUTH\"]: \"BASIC_AUTH\",\n\t[\"CUSTOM_AUTH\"]: \"CUSTOM_AUTH\",\n\t[\"OIDC\"]: \"OIDC\",\n\t[\"SECRET_TEXT\"]: \"SECRET_TEXT\",\n\t[\"NO_AUTH\"]: void 0\n};\n\n//#endregion\nexport { TriggerStrategy as _, OAuth2AuthorizationMethod as a, AppConnectionType as b, OAuth2Props as c, SecretTextProperty as d, BasicAuthProperty as f, AUTHENTICATION_PROPERTY_NAME as g, spreadIfDefined as h, getAuthPropertyForValue as i, OIDCProperty as l, isObject as m, PieceAuth as n, OAuth2Property as o, BasicAuthPropertyValue as p, PieceAuthProperty as r, OAuth2PropertyValue as s, DEFAULT_CONNECTION_DISPLAY_NAME as t, CustomAuthProperty as u, TriggerTestStrategy as v, OAuth2GrantType as x, WebhookHandshakeStrategy as y };\n//# sourceMappingURL=authentication-o-4CdAPR.js.map","import crypto from 'crypto'\n\nimport { urlAlphabet } from './url-alphabet/index.js'\n\nconst POOL_SIZE_MULTIPLIER = 128\nlet pool, poolOffset\n\nlet fillPool = bytes => {\n if (bytes < 0) throw new RangeError('Wrong ID size')\n try {\n if (!pool || pool.length < bytes) {\n pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)\n crypto.randomFillSync(pool)\n poolOffset = 0\n } else if (poolOffset + bytes > pool.length) {\n crypto.randomFillSync(pool)\n poolOffset = 0\n }\n } catch (e) {\n pool = undefined\n throw e\n }\n poolOffset += bytes\n}\n\nlet random = bytes => {\n fillPool((bytes |= 0))\n return pool.subarray(poolOffset - bytes, poolOffset)\n}\n\nlet customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1\n\n\n let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)\n\n return (size = defaultSize) => {\n if (size <= 0) return ''\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let i = step\n while (i--) {\n id += alphabet[bytes[i] & mask] || ''\n if (id.length === size) return id\n }\n }\n }\n}\n\nlet customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size, random)\n\nlet nanoid = (size = 21) => {\n fillPool((size |= 0))\n let id = ''\n for (let i = poolOffset - size; i < poolOffset; i++) {\n id += urlAlphabet[pool[i] & 63]\n }\n return id\n}\n\nexport { nanoid, customAlphabet, customRandom, urlAlphabet, random }\n","import { _ as ErrorHandlingOptionsParam, a as ObjectProperty, c as DynamicProp, d as ArrayProperty, f as ArraySubProps, g as MultiSelectDropdownProperty, h as DropdownProperty, i as RichTextProperty, l as DynamicProperties, m as JsonProperty, n as Property, o as assertNotNullOrUndefined, p as DateTimeProperty, r as CustomProperty, s as isNotUndefined, t as InputProperty, u as DynamicPropsValue, v as IAction, y as createAction } from \"./input-BHkj_oP5.js\";\nimport { A as PropertyType, C as CheckboxProperty, D as DropdownState, E as DropdownOption, O as LongTextProperty, S as NumberProperty, T as StaticMultiSelectDropdownProperty, _ as DateRangeProperty, a as chunk, b as ApFile, c as isNil, f as pickBy, g as DateRangePreset, h as MarkdownVariant, i as camelCase, j as BasePropertySchema, k as ShortTextProperty, l as isString, m as unique, n as tryCatch, p as startCase, s as isEmpty, u as kebabCase, v as DateRangeValue, w as StaticDropdownProperty, x as FileProperty, y as dateRangeUtils } from \"./markdown-property-DMfHjEiL.js\";\nimport { _ as TriggerStrategy, a as OAuth2AuthorizationMethod, b as AppConnectionType, c as OAuth2Props, d as SecretTextProperty, f as BasicAuthProperty, g as AUTHENTICATION_PROPERTY_NAME, h as spreadIfDefined, i as getAuthPropertyForValue, l as OIDCProperty, n as PieceAuth, o as OAuth2Property, p as BasicAuthPropertyValue, r as PieceAuthProperty, s as OAuth2PropertyValue, t as DEFAULT_CONNECTION_DISPLAY_NAME, u as CustomAuthProperty, v as TriggerTestStrategy, x as OAuth2GrantType, y as WebhookHandshakeStrategy } from \"./authentication-o-4CdAPR.js\";\nimport * as z from \"zod/mini\";\nimport { customAlphabet } from \"nanoid\";\nimport path from \"node:path\";\nimport fs from \"node:fs/promises\";\n\n//#region upstream/core-piece-types/lib/piece.ts\nlet PackageType = /* @__PURE__ */ function(PackageType) {\n\tPackageType[\"ARCHIVE\"] = \"ARCHIVE\";\n\tPackageType[\"REGISTRY\"] = \"REGISTRY\";\n\treturn PackageType;\n}({});\nlet PieceType = /* @__PURE__ */ function(PieceType) {\n\tPieceType[\"CUSTOM\"] = \"CUSTOM\";\n\tPieceType[\"OFFICIAL\"] = \"OFFICIAL\";\n\treturn PieceType;\n}({});\nlet PieceCategory = /* @__PURE__ */ function(PieceCategory) {\n\tPieceCategory[\"ARTIFICIAL_INTELLIGENCE\"] = \"ARTIFICIAL_INTELLIGENCE\";\n\tPieceCategory[\"COMMUNICATION\"] = \"COMMUNICATION\";\n\tPieceCategory[\"COMMERCE\"] = \"COMMERCE\";\n\tPieceCategory[\"CORE\"] = \"CORE\";\n\tPieceCategory[\"UNIVERSAL_AI\"] = \"UNIVERSAL_AI\";\n\tPieceCategory[\"FLOW_CONTROL\"] = \"FLOW_CONTROL\";\n\tPieceCategory[\"BUSINESS_INTELLIGENCE\"] = \"BUSINESS_INTELLIGENCE\";\n\tPieceCategory[\"ACCOUNTING\"] = \"ACCOUNTING\";\n\tPieceCategory[\"PRODUCTIVITY\"] = \"PRODUCTIVITY\";\n\tPieceCategory[\"CONTENT_AND_FILES\"] = \"CONTENT_AND_FILES\";\n\tPieceCategory[\"DEVELOPER_TOOLS\"] = \"DEVELOPER_TOOLS\";\n\tPieceCategory[\"CUSTOMER_SUPPORT\"] = \"CUSTOMER_SUPPORT\";\n\tPieceCategory[\"FORMS_AND_SURVEYS\"] = \"FORMS_AND_SURVEYS\";\n\tPieceCategory[\"HUMAN_RESOURCES\"] = \"HUMAN_RESOURCES\";\n\tPieceCategory[\"PAYMENT_PROCESSING\"] = \"PAYMENT_PROCESSING\";\n\tPieceCategory[\"MARKETING\"] = \"MARKETING\";\n\tPieceCategory[\"SALES_AND_CRM\"] = \"SALES_AND_CRM\";\n\treturn PieceCategory;\n}({});\n\n//#endregion\n//#region upstream/core-piece-types/lib/execution.ts\nlet ExecutionType = /* @__PURE__ */ function(ExecutionType) {\n\tExecutionType[\"BEGIN\"] = \"BEGIN\";\n\tExecutionType[\"RESUME\"] = \"RESUME\";\n\treturn ExecutionType;\n}({});\nlet StreamStepProgress = /* @__PURE__ */ function(StreamStepProgress) {\n\tStreamStepProgress[\"WEBSOCKET\"] = \"WEBSOCKET\";\n\tStreamStepProgress[\"NONE\"] = \"NONE\";\n\treturn StreamStepProgress;\n}({});\nconst RespondResponse = z.object({\n\tstatus: z.optional(z.number()),\n\tbody: z.optional(z.unknown()),\n\theaders: z.optional(z.record(z.string(), z.string()))\n});\nconst DelayPauseMetadata = z.object({\n\ttype: z.literal(\"DELAY\"),\n\tresumeDateTime: z.string(),\n\trequestIdToReply: z.optional(z.string()),\n\thandlerId: z.optional(z.string()),\n\tstreamStepProgress: z.optional(z.enum(StreamStepProgress))\n});\nconst WebhookPauseMetadata = z.object({\n\ttype: z.literal(\"WEBHOOK\"),\n\trequestId: z.string(),\n\trequestIdToReply: z.optional(z.string()),\n\tresponse: RespondResponse,\n\thandlerId: z.optional(z.string()),\n\tstreamStepProgress: z.optional(z.enum(StreamStepProgress))\n});\nconst PauseMetadata = z.union([DelayPauseMetadata, WebhookPauseMetadata]);\n\n//#endregion\n//#region upstream/core-utils/lib/id-generator.ts\nconst ALPHABET = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\nconst ID_LENGTH = 21;\nconst ApId = z.string().check(z.regex(new RegExp(`^[0-9a-zA-Z]{${ID_LENGTH}}$`)));\nconst apId = customAlphabet(ALPHABET, ID_LENGTH);\n\n//#endregion\n//#region upstream/core-utils/lib/base-model.ts\nconst DateOrString = z.pipe(z.transform((val) => val instanceof Date ? val.toISOString() : val), z.string());\nconst BaseModelSchema = {\n\tid: z.string(),\n\tcreated: DateOrString,\n\tupdated: DateOrString\n};\nconst Nullable = (schema) => z.optional(z.nullable(schema));\nfunction NullableEnum(enumObj) {\n\treturn z.optional(z.nullable(z.enum(enumObj)));\n}\nconst OptionalBooleanFromQuery = z.pipe(z.transform((val) => val === \"true\" || val === true ? true : val === \"false\" || val === false ? false : void 0), z.optional(z.boolean()));\nconst OptionalArrayFromQuery = (schema) => z.pipe(z.transform((val) => Array.isArray(val) ? val : val !== void 0 ? [val] : void 0), z.optional(z.array(schema)));\n\n//#endregion\n//#region upstream/core-utils/lib/seek-page.ts\nconst SeekPage = (t) => z.object({\n\tdata: z.array(t),\n\tnext: Nullable(z.string()),\n\tprevious: Nullable(z.string())\n});\n\n//#endregion\n//#region upstream/core-utils/lib/locale.ts\nlet LocalesEnum = /* @__PURE__ */ function(LocalesEnum) {\n\tLocalesEnum[\"DUTCH\"] = \"nl\";\n\tLocalesEnum[\"ENGLISH\"] = \"en\";\n\tLocalesEnum[\"GERMAN\"] = \"de\";\n\tLocalesEnum[\"FRENCH\"] = \"fr\";\n\tLocalesEnum[\"SPANISH\"] = \"es\";\n\tLocalesEnum[\"JAPANESE\"] = \"ja\";\n\tLocalesEnum[\"CHINESE_SIMPLIFIED\"] = \"zh\";\n\tLocalesEnum[\"PORTUGUESE\"] = \"pt\";\n\tLocalesEnum[\"ARABIC\"] = \"ar\";\n\tLocalesEnum[\"CHINESE_TRADITIONAL\"] = \"zh-TW\";\n\treturn LocalesEnum;\n}({});\n\n//#endregion\n//#region upstream/core-utils/lib/permission.ts\nlet AIProviderName = /* @__PURE__ */ function(AIProviderName) {\n\tAIProviderName[\"OPENAI\"] = \"openai\";\n\tAIProviderName[\"OPENROUTER\"] = \"openrouter\";\n\tAIProviderName[\"ANTHROPIC\"] = \"anthropic\";\n\tAIProviderName[\"AZURE\"] = \"azure\";\n\tAIProviderName[\"GOOGLE\"] = \"google\";\n\tAIProviderName[\"ACTIVEPIECES\"] = \"activepieces\";\n\tAIProviderName[\"CLOUDFLARE_GATEWAY\"] = \"cloudflare-gateway\";\n\tAIProviderName[\"CUSTOM\"] = \"custom\";\n\tAIProviderName[\"BEDROCK\"] = \"bedrock\";\n\tAIProviderName[\"VERTEX\"] = \"vertex\";\n\tAIProviderName[\"MISTRAL\"] = \"mistral\";\n\tAIProviderName[\"XAI\"] = \"xai\";\n\tAIProviderName[\"DEEPSEEK\"] = \"deepseek\";\n\tAIProviderName[\"ZAI\"] = \"zai\";\n\tAIProviderName[\"QWEN\"] = \"qwen\";\n\tAIProviderName[\"MINIMAX\"] = \"minimax\";\n\tAIProviderName[\"MOONSHOT\"] = \"moonshot\";\n\treturn AIProviderName;\n}({});\n\n//#endregion\n//#region upstream/core-piece-types/lib/agents.ts\nconst TASK_COMPLETION_TOOL_NAME = \"updateTaskStatus\";\nlet AgentToolType = /* @__PURE__ */ function(AgentToolType) {\n\tAgentToolType[\"PIECE\"] = \"PIECE\";\n\tAgentToolType[\"FLOW\"] = \"FLOW\";\n\tAgentToolType[\"MCP\"] = \"MCP\";\n\tAgentToolType[\"KNOWLEDGE_BASE\"] = \"KNOWLEDGE_BASE\";\n\treturn AgentToolType;\n}({});\nlet FieldControlMode = /* @__PURE__ */ function(FieldControlMode) {\n\tFieldControlMode[\"AGENT_DECIDE\"] = \"agent-decide\";\n\tFieldControlMode[\"CHOOSE_YOURSELF\"] = \"choose-yourself\";\n\tFieldControlMode[\"LEAVE_EMPTY\"] = \"leave-empty\";\n\treturn FieldControlMode;\n}({});\nlet KnowledgeBaseSourceType = /* @__PURE__ */ function(KnowledgeBaseSourceType) {\n\tKnowledgeBaseSourceType[\"FILE\"] = \"FILE\";\n\tKnowledgeBaseSourceType[\"TABLE\"] = \"TABLE\";\n\treturn KnowledgeBaseSourceType;\n}({});\nlet McpProtocol = /* @__PURE__ */ function(McpProtocol) {\n\tMcpProtocol[\"SSE\"] = \"sse\";\n\tMcpProtocol[\"STREAMABLE_HTTP\"] = \"streamable-http\";\n\tMcpProtocol[\"SIMPLE_HTTP\"] = \"http\";\n\treturn McpProtocol;\n}({});\nlet McpAuthType = /* @__PURE__ */ function(McpAuthType) {\n\tMcpAuthType[\"NONE\"] = \"none\";\n\tMcpAuthType[\"ACCESS_TOKEN\"] = \"access_token\";\n\tMcpAuthType[\"API_KEY\"] = \"api_key\";\n\tMcpAuthType[\"HEADERS\"] = \"headers\";\n\treturn McpAuthType;\n}({});\nlet AgentOutputFieldType = /* @__PURE__ */ function(AgentOutputFieldType) {\n\tAgentOutputFieldType[\"TEXT\"] = \"text\";\n\tAgentOutputFieldType[\"NUMBER\"] = \"number\";\n\tAgentOutputFieldType[\"BOOLEAN\"] = \"boolean\";\n\treturn AgentOutputFieldType;\n}({});\nlet AgentTaskStatus = /* @__PURE__ */ function(AgentTaskStatus) {\n\tAgentTaskStatus[\"COMPLETED\"] = \"COMPLETED\";\n\tAgentTaskStatus[\"FAILED\"] = \"FAILED\";\n\tAgentTaskStatus[\"IN_PROGRESS\"] = \"IN_PROGRESS\";\n\treturn AgentTaskStatus;\n}({});\nlet ContentBlockType = /* @__PURE__ */ function(ContentBlockType) {\n\tContentBlockType[\"MARKDOWN\"] = \"MARKDOWN\";\n\tContentBlockType[\"TOOL_CALL\"] = \"TOOL_CALL\";\n\treturn ContentBlockType;\n}({});\nlet ToolCallStatus = /* @__PURE__ */ function(ToolCallStatus) {\n\tToolCallStatus[\"IN_PROGRESS\"] = \"in-progress\";\n\tToolCallStatus[\"COMPLETED\"] = \"completed\";\n\treturn ToolCallStatus;\n}({});\nlet ExecutionToolStatus = /* @__PURE__ */ function(ExecutionToolStatus) {\n\tExecutionToolStatus[\"SUCCESS\"] = \"SUCCESS\";\n\tExecutionToolStatus[\"FAILED\"] = \"FAILED\";\n\treturn ExecutionToolStatus;\n}({});\nlet ToolCallType = /* @__PURE__ */ function(ToolCallType) {\n\tToolCallType[\"PIECE\"] = \"PIECE\";\n\tToolCallType[\"FLOW\"] = \"FLOW\";\n\tToolCallType[\"MCP\"] = \"MCP\";\n\tToolCallType[\"KNOWLEDGE_BASE\"] = \"KNOWLEDGE_BASE\";\n\tToolCallType[\"UNKNOWN\"] = \"UNKNOWN\";\n\treturn ToolCallType;\n}({});\nlet AgentPieceProps = /* @__PURE__ */ function(AgentPieceProps) {\n\tAgentPieceProps[\"AGENT_ID\"] = \"agentId\";\n\tAgentPieceProps[\"AGENT_TOOLS\"] = \"agentTools\";\n\tAgentPieceProps[\"STRUCTURED_OUTPUT\"] = \"structuredOutput\";\n\tAgentPieceProps[\"PROMPT\"] = \"prompt\";\n\tAgentPieceProps[\"MAX_STEPS\"] = \"maxSteps\";\n\tAgentPieceProps[\"AI_PROVIDER_MODEL\"] = \"aiProviderModel\";\n\tAgentPieceProps[\"WEB_SEARCH\"] = \"webSearch\";\n\tAgentPieceProps[\"WEB_SEARCH_OPTIONS\"] = \"webSearchOptions\";\n\treturn AgentPieceProps;\n}({});\nconst PredefinedInputField = z.object({\n\tmode: z.enum(FieldControlMode),\n\tvalue: z.unknown()\n});\nconst PredefinedInputsStructure = z.object({\n\tauth: z.optional(z.string()),\n\tfields: z.record(z.string(), PredefinedInputField)\n});\nconst AgentPieceToolMetadata = z.object({\n\tpieceName: z.string(),\n\tpieceVersion: z.string(),\n\tactionName: z.string(),\n\tpredefinedInput: z.optional(PredefinedInputsStructure)\n});\nconst AgentPieceTool = z.object({\n\ttype: z.literal(\"PIECE\"),\n\ttoolName: z.string().check(z.minLength(1)),\n\tpieceMetadata: AgentPieceToolMetadata\n});\nconst McpAuthNone = z.object({ type: z.literal(\"none\") });\nconst McpAuthAccessToken = z.object({\n\ttype: z.literal(\"access_token\"),\n\taccessToken: z.string()\n});\nconst McpAuthApiKey = z.object({\n\ttype: z.literal(\"api_key\"),\n\tapiKey: z.string(),\n\tapiKeyHeader: z.string()\n});\nconst McpAuthHeaders = z.object({\n\ttype: z.literal(\"headers\"),\n\theaders: z.record(z.string(), z.string())\n});\nconst McpAuthConfig = z.discriminatedUnion(\"type\", [\n\tMcpAuthNone,\n\tMcpAuthAccessToken,\n\tMcpAuthApiKey,\n\tMcpAuthHeaders\n]);\nconst AgentFlowTool = z.object({\n\ttype: z.literal(\"FLOW\"),\n\ttoolName: z.string().check(z.minLength(1)),\n\texternalFlowId: z.string(),\n\tflowDisplayName: z.optional(z.string())\n});\nconst AgentMcpTool = z.object({\n\ttype: z.literal(\"MCP\"),\n\ttoolName: z.string().check(z.minLength(1)),\n\tserverUrl: z.url(),\n\tprotocol: z.enum(McpProtocol),\n\tauth: McpAuthConfig\n});\nconst AgentKnowledgeBaseTool = z.object({\n\ttype: z.literal(\"KNOWLEDGE_BASE\"),\n\ttoolName: z.string().check(z.minLength(1)),\n\tsourceType: z.enum(KnowledgeBaseSourceType),\n\tsourceId: z.string(),\n\tsourceName: z.string()\n});\nconst AgentTool = z.discriminatedUnion(\"type\", [\n\tAgentPieceTool,\n\tAgentFlowTool,\n\tAgentMcpTool,\n\tAgentKnowledgeBaseTool\n]);\nconst AgentOutputField = z.object({\n\tdisplayName: z.string(),\n\tdescription: z.optional(z.string()),\n\ttype: z.enum(AgentOutputFieldType)\n});\nconst MarkdownContentBlock = z.object({\n\ttype: z.literal(\"MARKDOWN\"),\n\tmarkdown: z.string()\n});\nconst toolCallBaseShape = {\n\ttype: z.literal(\"TOOL_CALL\"),\n\tinput: Nullable(z.record(z.string(), z.unknown())),\n\toutput: z.optional(z.unknown()),\n\ttoolName: z.string(),\n\tstatus: z.enum(ToolCallStatus),\n\ttoolCallId: z.string(),\n\tstartTime: z.string(),\n\tendTime: z.optional(z.string())\n};\nz.object(toolCallBaseShape);\nconst ToolCallContentBlock = z.discriminatedUnion(\"toolCallType\", [\n\tz.object({\n\t\t...toolCallBaseShape,\n\t\ttoolCallType: z.literal(\"PIECE\"),\n\t\tpieceName: z.string(),\n\t\tpieceVersion: z.string(),\n\t\tactionName: z.string()\n\t}),\n\tz.object({\n\t\t...toolCallBaseShape,\n\t\ttoolCallType: z.literal(\"FLOW\"),\n\t\tdisplayName: z.string(),\n\t\texternalFlowId: z.string()\n\t}),\n\tz.object({\n\t\t...toolCallBaseShape,\n\t\ttoolCallType: z.literal(\"MCP\"),\n\t\tdisplayName: z.string(),\n\t\tserverUrl: z.string()\n\t}),\n\tz.object({\n\t\t...toolCallBaseShape,\n\t\ttoolCallType: z.literal(\"KNOWLEDGE_BASE\"),\n\t\tdisplayName: z.string(),\n\t\tsourceType: z.string()\n\t}),\n\tz.object({\n\t\t...toolCallBaseShape,\n\t\ttoolCallType: z.literal(\"UNKNOWN\"),\n\t\tdisplayName: z.string()\n\t})\n]);\nconst AgentStepBlock = z.union([MarkdownContentBlock, ToolCallContentBlock]);\nfunction buildAuthHeaders(authConfig) {\n\tlet headers = {};\n\tswitch (authConfig.type) {\n\t\tcase \"none\": break;\n\t\tcase \"headers\":\n\t\t\theaders = authConfig.headers;\n\t\t\tbreak;\n\t\tcase \"access_token\":\n\t\t\theaders[\"Authorization\"] = `Bearer ${authConfig.accessToken}`;\n\t\t\tbreak;\n\t\tcase \"api_key\": {\n\t\t\tconst headerName = authConfig.apiKeyHeader;\n\t\t\theaders[headerName] = authConfig.apiKey;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn headers;\n}\nfunction shortHash(str) {\n\tlet h = 5381;\n\tfor (let i = 0; i < str.length; i++) h = (Math.imul(h, 33) ^ str.charCodeAt(i)) >>> 0;\n\treturn h.toString(36).padStart(6, \"0\").slice(-6);\n}\nfunction sanitizeToolName(name) {\n\treturn name.toLowerCase().replace(/[^a-z0-9_-]/g, \"_\").replace(/_+/g, \"_\").replace(/^_+|_+$/g, \"\");\n}\nfunction createToolName(name) {\n\tconst sanitized = sanitizeToolName(name);\n\treturn `${sanitized.slice(0, MAX_PREFIX_LENGTH)}_${shortHash(sanitized.length > 0 ? sanitized : name)}_mcp`;\n}\nfunction toValidToolName(name) {\n\tif (PROVIDER_TOOL_NAME_PATTERN.test(name)) return name;\n\tconst generated = createToolName(name);\n\treturn PROVIDER_TOOL_NAME_PATTERN.test(generated) ? generated : createToolName(`tool_${name}`);\n}\nfunction suggestToolName(sourceName) {\n\treturn toValidToolName(sanitizeToolName(sourceName));\n}\nfunction isProviderSafeIdentifier(name) {\n\treturn PROVIDER_TOOL_NAME_PATTERN.test(name);\n}\nfunction toProviderSafeIdentifier({ name, fallback }) {\n\tif (isProviderSafeIdentifier(name)) return name;\n\tconst sanitized = sanitizeToolName(name).slice(0, MAX_IDENTIFIER_LENGTH);\n\tif (sanitized.length === 0) return fallback;\n\tconst seeded = /^[a-z_]/.test(sanitized) ? sanitized : `_${sanitized}`;\n\treturn isProviderSafeIdentifier(seeded) ? seeded : fallback;\n}\nfunction createPieceToolName(pieceName, actionName) {\n\tconst idx = pieceName.indexOf(\"piece-\");\n\treturn createToolName(`${idx >= 0 ? pieceName.substring(idx + 6) : pieceName}-${actionName}`);\n}\nconst MAX_PREFIX_LENGTH = 53;\nconst MAX_IDENTIFIER_LENGTH = 64;\nconst PROVIDER_TOOL_NAME_PATTERN = /^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$/;\nconst mcpToolNameUtils = {\n\tcreateToolName,\n\tcreatePieceToolName,\n\ttoValidToolName,\n\tsuggestToolName,\n\tisProviderSafeIdentifier,\n\ttoProviderSafeIdentifier\n};\nconst AGENT_STEP_TIMEOUT_MS = 108e5;\nconst AGENT_STEP_TEST_TIMEOUT_MS = 9e5;\n\n//#endregion\n//#region upstream/core-piece-types/lib/ai-providers.ts\nlet AIProviderModelType = /* @__PURE__ */ function(AIProviderModelType) {\n\tAIProviderModelType[\"IMAGE\"] = \"image\";\n\tAIProviderModelType[\"TEXT\"] = \"text\";\n\treturn AIProviderModelType;\n}({});\nconst BaseAIProviderAuthConfig = z.object({ apiKey: z.string() });\nconst AnthropicProviderAuthConfig = BaseAIProviderAuthConfig;\nconst ActivePiecesProviderAuthConfig = z.object({\n\tapiKey: z.string(),\n\tapiKeyHash: z.string()\n});\nconst OpenAICompatibleProviderAuthConfig = BaseAIProviderAuthConfig;\nconst CloudflareGatewayProviderAuthConfig = BaseAIProviderAuthConfig;\nconst AzureProviderAuthConfig = BaseAIProviderAuthConfig;\nconst GoogleProviderAuthConfig = BaseAIProviderAuthConfig;\nconst OpenAIProviderAuthConfig = BaseAIProviderAuthConfig;\nconst OpenRouterProviderAuthConfig = BaseAIProviderAuthConfig;\nconst MistralProviderAuthConfig = BaseAIProviderAuthConfig;\nconst VertexProviderAuthConfig = z.object({ serviceAccountJson: z.string().check(z.minLength(1)) });\nconst BedrockProviderAuthConfig = z.object({\n\taccessKeyId: z.string().check(z.minLength(1)),\n\tsecretAccessKey: z.string().check(z.minLength(1))\n});\nconst AnthropicProviderConfig = z.object({});\nconst ActivePiecesProviderConfig = z.object({});\nconst GoogleProviderConfig = z.object({});\nconst OpenAIProviderConfig = z.object({});\nconst OpenRouterProviderConfig = z.object({});\nconst MistralProviderConfig = z.object({});\nconst ProviderModelConfig = z.object({\n\tmodelId: z.string(),\n\tmodelName: z.string(),\n\tmodelType: z.enum(AIProviderModelType)\n});\nconst OpenAICompatibleProviderConfig = z.object({\n\tapiKeyHeader: z.string(),\n\tbaseUrl: z.string(),\n\tmodels: z.array(ProviderModelConfig),\n\tdefaultHeaders: z.optional(z.record(z.string(), z.string())),\n\tapiStyle: z.optional(z.enum([\"chat\", \"responses\"]))\n});\nconst CloudflareGatewayProviderConfig = z.object({\n\taccountId: z.string(),\n\tgatewayId: z.string(),\n\tmodels: z.array(ProviderModelConfig),\n\tvertexProject: z.optional(z.string()),\n\tvertexRegion: z.optional(z.string())\n});\nconst AzureProviderConfig = z.object({\n\tresourceName: z.string(),\n\tapiVersion: z.pipe(z.transform((v) => typeof v === \"string\" && v.trim().length === 0 ? void 0 : v), z.optional(z.string()))\n});\nconst BedrockProviderConfig = z.object({ region: z.string().check(z.minLength(1)) });\nconst VertexProviderConfig = z.object({\n\tproject: z.string().check(z.regex(/^[a-z0-9][a-z0-9-]{0,62}$/)),\n\tregion: z.string().check(z.regex(/^[a-z0-9][a-z0-9-]{0,62}$/)),\n\tmodels: z.array(ProviderModelConfig)\n});\nconst OpenAiCompatibleVendorConfig = z.object({});\nconst AIProviderAuthConfig = z.union([\n\tAnthropicProviderAuthConfig,\n\tAzureProviderAuthConfig,\n\tGoogleProviderAuthConfig,\n\tOpenAIProviderAuthConfig,\n\tOpenRouterProviderAuthConfig,\n\tCloudflareGatewayProviderAuthConfig,\n\tOpenAICompatibleProviderAuthConfig,\n\tActivePiecesProviderAuthConfig,\n\tBedrockProviderAuthConfig,\n\tVertexProviderAuthConfig,\n\tMistralProviderAuthConfig\n]);\nconst AIProviderConfig = z.union([\n\tOpenAICompatibleProviderConfig,\n\tCloudflareGatewayProviderConfig,\n\tAzureProviderConfig,\n\tVertexProviderConfig,\n\tBedrockProviderConfig,\n\tAnthropicProviderConfig,\n\tGoogleProviderConfig,\n\tOpenAIProviderConfig,\n\tOpenRouterProviderConfig,\n\tActivePiecesProviderConfig,\n\tMistralProviderConfig,\n\tOpenAiCompatibleVendorConfig\n]);\nconst AIProviderModel = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\ttype: z.enum(AIProviderModelType)\n});\nconst AIProviderWithoutSensitiveData = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tprovider: z.enum(AIProviderName),\n\tconfig: AIProviderConfig,\n\tenabledForChat: z.boolean()\n});\nconst ProjectAIProvider = z.object({\n\tprovider: z.enum(AIProviderName),\n\tname: z.string(),\n\tenabledForChat: z.boolean(),\n\tkeys: z.array(z.object({\n\t\tid: z.string(),\n\t\tname: z.string()\n\t}))\n});\nconst GetProviderConfigResponse = z.object({\n\tprovider: z.enum(AIProviderName),\n\tconfigId: z.string(),\n\tconfig: AIProviderConfig,\n\tauth: AIProviderAuthConfig,\n\tplatformId: z.string()\n});\nfunction splitCloudflareGatewayModelId(modelId) {\n\tconst slashIndex = modelId.indexOf(\"/\");\n\tif (slashIndex === -1) return {\n\t\tprovider: void 0,\n\t\tmodel: modelId,\n\t\tpublisher: void 0\n\t};\n\tconst provider = modelId.substring(0, slashIndex).trim().toLowerCase();\n\tconst rest = modelId.substring(slashIndex + 1);\n\tif (provider === \"google-vertex-ai\") {\n\t\tconst secondSlashIndex = rest.indexOf(\"/\");\n\t\tif (secondSlashIndex === -1) return {\n\t\t\tprovider: void 0,\n\t\t\tmodel: modelId,\n\t\t\tpublisher: void 0\n\t\t};\n\t\treturn {\n\t\t\tprovider: \"google-vertex-ai\",\n\t\t\tpublisher: rest.substring(0, secondSlashIndex),\n\t\t\tmodel: rest.substring(secondSlashIndex + 1)\n\t\t};\n\t}\n\treturn {\n\t\tprovider,\n\t\tmodel: rest,\n\t\tpublisher: void 0\n\t};\n}\nfunction getEffectiveProviderAndModel({ provider, model }) {\n\tif (provider !== \"cloudflare-gateway\" || !model) return {\n\t\tprovider,\n\t\tmodel\n\t};\n\tconst split = splitCloudflareGatewayModelId(model);\n\tconst gatewaySubmodelPrefix = (split.provider ?? \"\").trim().toLowerCase();\n\tconst mapped = CF_GATEWAY_SUBMODEL_TO_PROVIDER[gatewaySubmodelPrefix];\n\tif (!mapped) return {\n\t\tprovider,\n\t\tmodel\n\t};\n\treturn {\n\t\tprovider: mapped,\n\t\tmodel: split.model\n\t};\n}\nconst CF_GATEWAY_SUBMODEL_TO_PROVIDER = {\n\topenai: \"openai\",\n\tanthropic: \"anthropic\",\n\t\"google-ai-studio\": \"google\",\n\t\"google-vertex-ai\": \"google\"\n};\nconst OPENAI_CHAT_MODELS = [\n\t\"gpt-5.5\",\n\t\"gpt-5.4-mini\",\n\t\"gpt-5.4-nano\",\n\t\"gpt-4.1\",\n\t\"gpt-4.1-mini\"\n];\nconst ANTHROPIC_CHAT_MODELS = [\n\t\"claude-sonnet-4-6\",\n\t\"claude-opus-4-7\",\n\t\"claude-haiku-4-5\"\n];\nconst ANTHROPIC_OPENROUTER_CHAT_MODELS = [\n\t\"claude-sonnet-4.6\",\n\t\"claude-opus-4.7\",\n\t\"claude-opus-4.8\",\n\t\"claude-haiku-4.5\"\n];\nconst GOOGLE_CHAT_MODELS = [\n\t\"gemini-2.5-pro\",\n\t\"gemini-2.5-flash\",\n\t\"gemini-3.7-flash\",\n\t\"gemini-3.1-pro-preview\",\n\t\"gemini-3-flash-preview\"\n];\nconst X_AI_OPENROUTER_CHAT_MODELS = [\"grok-4.20\"];\nconst REASONING_OPTIONAL_CHAT_MODELS = ANTHROPIC_OPENROUTER_CHAT_MODELS.map((model) => `${\"anthropic\"}/${model}`);\nconst ALLOWED_CHAT_MODELS_BY_PROVIDER = {\n\t[\"openai\"]: OPENAI_CHAT_MODELS,\n\t[\"anthropic\"]: ANTHROPIC_CHAT_MODELS,\n\t[\"google\"]: GOOGLE_CHAT_MODELS,\n\t[\"vertex\"]: GOOGLE_CHAT_MODELS,\n\t[\"activepieces\"]: [\n\t\t...ANTHROPIC_OPENROUTER_CHAT_MODELS.map((m) => `${\"anthropic\"}/${m}`),\n\t\t...OPENAI_CHAT_MODELS.map((m) => `${\"openai\"}/${m}`),\n\t\t...GOOGLE_CHAT_MODELS.map((m) => `${\"google\"}/${m}`),\n\t\t...X_AI_OPENROUTER_CHAT_MODELS.map((m) => `x-ai/${m}`)\n\t]\n};\nconst DEFAULT_MAX_CONTEXT_TOKENS = 128e3;\nconst PROVIDER_MAX_CONTEXT_TOKENS = {\n\t[\"openai\"]: 128e3,\n\t[\"anthropic\"]: 2e5,\n\t[\"google\"]: 1048576,\n\t[\"bedrock\"]: 2e5,\n\t[\"vertex\"]: 1048576,\n\t[\"azure\"]: 128e3,\n\t[\"openrouter\"]: 128e3,\n\t[\"activepieces\"]: 2e5,\n\t[\"mistral\"]: 128e3\n};\nfunction getMaxContextTokens({ provider }) {\n\tif (!provider) return DEFAULT_MAX_CONTEXT_TOKENS;\n\treturn PROVIDER_MAX_CONTEXT_TOKENS[provider] ?? DEFAULT_MAX_CONTEXT_TOKENS;\n}\nconst DEFAULT_EMBEDDING_MODELS = {\n\t[\"openai\"]: \"text-embedding-3-small\",\n\t[\"google\"]: \"text-embedding-004\",\n\t[\"azure\"]: \"text-embedding-3-small\",\n\t[\"activepieces\"]: \"text-embedding-3-small\",\n\t[\"openrouter\"]: \"openai/text-embedding-3-small\"\n};\nconst WEB_SEARCH_MODE_BY_PROVIDER = {\n\t[\"anthropic\"]: \"native\",\n\t[\"google\"]: \"native\",\n\t[\"openrouter\"]: \"plugin\",\n\t[\"activepieces\"]: \"plugin\"\n};\nconst NO_IMAGE_GENERATION_PROVIDERS = /* @__PURE__ */ new Set([\n\t\"anthropic\",\n\t\"mistral\",\n\t\"xai\",\n\t\"deepseek\",\n\t\"zai\",\n\t\"qwen\",\n\t\"minimax\",\n\t\"moonshot\"\n]);\nconst OPENAI_COMPATIBLE_VENDOR_BASE_URLS = {\n\t[\"xai\"]: \"https://api.x.ai/v1\",\n\t[\"deepseek\"]: \"https://api.deepseek.com/v1\",\n\t[\"zai\"]: \"https://api.z.ai/api/paas/v4\",\n\t[\"qwen\"]: \"https://dashscope-intl.aliyuncs.com/compatible-mode/v1\",\n\t[\"minimax\"]: \"https://api.minimax.io/v1\",\n\t[\"moonshot\"]: \"https://api.moonshot.ai/v1\"\n};\nfunction buildProviderCapabilities(provider) {\n\treturn {\n\t\tchatModels: ALLOWED_CHAT_MODELS_BY_PROVIDER[provider],\n\t\tmaxContextTokens: getMaxContextTokens({ provider }),\n\t\tdefaultEmbeddingModel: DEFAULT_EMBEDDING_MODELS[provider],\n\t\tsupportsEmbedding: DEFAULT_EMBEDDING_MODELS[provider] !== void 0,\n\t\tsupportsImageGeneration: !NO_IMAGE_GENERATION_PROVIDERS.has(provider),\n\t\twebSearch: WEB_SEARCH_MODE_BY_PROVIDER[provider]\n\t};\n}\nconst ACTIVEPIECES_CHAT_TIERS = [\n\t{\n\t\tid: \"fast\",\n\t\tlabel: \"Fast\",\n\t\tmodelId: \"anthropic/claude-haiku-4.5\",\n\t\tnativeModelId: \"claude-haiku-4-5\",\n\t\tthinkingBudget: 5e3,\n\t\tcreditWeight: 2\n\t},\n\t{\n\t\tid: \"smart\",\n\t\tlabel: \"Expert\",\n\t\tmodelId: \"anthropic/claude-sonnet-4.6\",\n\t\tnativeModelId: \"claude-sonnet-4-6\",\n\t\tthinkingBudget: 1e4,\n\t\tcreditWeight: 10\n\t},\n\t{\n\t\tid: \"premium\",\n\t\tlabel: \"Heavy\",\n\t\tmodelId: \"anthropic/claude-opus-4.8\",\n\t\tnativeModelId: \"claude-opus-4-7\",\n\t\tthinkingBudget: 2e4,\n\t\tcreditWeight: 20\n\t}\n];\nconst DEFAULT_CHAT_TIER_ID = \"smart\";\nconst AI_PROVIDER_CAPABILITIES = {\n\t[\"openai\"]: buildProviderCapabilities(\"openai\"),\n\t[\"anthropic\"]: buildProviderCapabilities(\"anthropic\"),\n\t[\"openrouter\"]: buildProviderCapabilities(\"openrouter\"),\n\t[\"azure\"]: buildProviderCapabilities(\"azure\"),\n\t[\"google\"]: buildProviderCapabilities(\"google\"),\n\t[\"cloudflare-gateway\"]: buildProviderCapabilities(\"cloudflare-gateway\"),\n\t[\"custom\"]: buildProviderCapabilities(\"custom\"),\n\t[\"bedrock\"]: buildProviderCapabilities(\"bedrock\"),\n\t[\"vertex\"]: buildProviderCapabilities(\"vertex\"),\n\t[\"mistral\"]: buildProviderCapabilities(\"mistral\"),\n\t[\"activepieces\"]: buildProviderCapabilities(\"activepieces\"),\n\t[\"xai\"]: buildProviderCapabilities(\"xai\"),\n\t[\"deepseek\"]: buildProviderCapabilities(\"deepseek\"),\n\t[\"zai\"]: buildProviderCapabilities(\"zai\"),\n\t[\"qwen\"]: buildProviderCapabilities(\"qwen\"),\n\t[\"minimax\"]: buildProviderCapabilities(\"minimax\"),\n\t[\"moonshot\"]: buildProviderCapabilities(\"moonshot\")\n};\n\n//#endregion\n//#region upstream/core-piece-types/lib/forms.ts\nconst FileResponseInterfaceV1 = z.object({\n\tbase64Url: z.string(),\n\tfileName: z.string(),\n\textension: z.optional(z.string())\n});\nconst FileResponseInterfaceV2 = z.object({\n\tmimeType: z.string(),\n\turl: z.string(),\n\tfileName: z.optional(z.string())\n});\nconst FileResponseInterface = z.union([FileResponseInterfaceV1, FileResponseInterfaceV2]);\nlet HumanInputFormResultTypes = /* @__PURE__ */ function(HumanInputFormResultTypes) {\n\tHumanInputFormResultTypes[\"FILE\"] = \"file\";\n\tHumanInputFormResultTypes[\"MARKDOWN\"] = \"markdown\";\n\treturn HumanInputFormResultTypes;\n}({});\nfunction createKeyForFormInput(displayName) {\n\t/**We do this because react form inputs must not contain quotes */\n\treturn displayName.toLowerCase().replace(/\\s+(\\w)/g, (_, letter) => letter.toUpperCase()).replace(/^(.)/, (letter) => letter.toLowerCase()).replaceAll(/[\\\\\"''\\n\\r\\t]/g, \"\");\n}\nconst HumanInputFormResult = z.union([z.object({\n\ttype: z.literal(\"file\"),\n\tvalue: FileResponseInterface\n}), z.object({\n\ttype: z.literal(\"markdown\"),\n\tvalue: z.string(),\n\tfiles: z.optional(z.array(FileResponseInterface))\n})]);\nconst ChatFormResponse = z.object({\n\tsessionId: z.string(),\n\tmessage: z.string(),\n\tfiles: z.optional(z.array(z.string()))\n});\n\n//#endregion\n//#region upstream/core-piece-types/lib/tables.ts\nlet FieldType = /* @__PURE__ */ function(FieldType) {\n\tFieldType[\"TEXT\"] = \"TEXT\";\n\tFieldType[\"NUMBER\"] = \"NUMBER\";\n\tFieldType[\"DATE\"] = \"DATE\";\n\tFieldType[\"DATETIME\"] = \"DATETIME\";\n\tFieldType[\"STATIC_DROPDOWN\"] = \"STATIC_DROPDOWN\";\n\treturn FieldType;\n}({});\nlet TableAutomationTrigger = /* @__PURE__ */ function(TableAutomationTrigger) {\n\tTableAutomationTrigger[\"ON_NEW_RECORD\"] = \"ON_NEW_RECORD\";\n\tTableAutomationTrigger[\"ON_UPDATE_RECORD\"] = \"ON_UPDATE_RECORD\";\n\treturn TableAutomationTrigger;\n}({});\nlet TableAutomationStatus = /* @__PURE__ */ function(TableAutomationStatus) {\n\tTableAutomationStatus[\"ENABLED\"] = \"ENABLED\";\n\tTableAutomationStatus[\"DISABLED\"] = \"DISABLED\";\n\treturn TableAutomationStatus;\n}({});\nlet TableWebhookEventType = /* @__PURE__ */ function(TableWebhookEventType) {\n\tTableWebhookEventType[\"RECORD_CREATED\"] = \"RECORD_CREATED\";\n\tTableWebhookEventType[\"RECORD_UPDATED\"] = \"RECORD_UPDATED\";\n\tTableWebhookEventType[\"RECORD_DELETED\"] = \"RECORD_DELETED\";\n\treturn TableWebhookEventType;\n}({});\nlet FilterOperator = /* @__PURE__ */ function(FilterOperator) {\n\tFilterOperator[\"EQ\"] = \"eq\";\n\tFilterOperator[\"NEQ\"] = \"neq\";\n\tFilterOperator[\"GT\"] = \"gt\";\n\tFilterOperator[\"GTE\"] = \"gte\";\n\tFilterOperator[\"LT\"] = \"lt\";\n\tFilterOperator[\"LTE\"] = \"lte\";\n\tFilterOperator[\"CO\"] = \"co\";\n\tFilterOperator[\"EXISTS\"] = \"exists\";\n\tFilterOperator[\"NOT_EXISTS\"] = \"not_exists\";\n\treturn FilterOperator;\n}({});\nconst Field = z.union([z.object({\n\t...BaseModelSchema,\n\tname: z.string(),\n\texternalId: z.string(),\n\ttype: z.literal(\"STATIC_DROPDOWN\"),\n\ttableId: z.string(),\n\tprojectId: z.string(),\n\tdata: z.object({ options: z.array(z.object({ value: z.string() })) })\n}), z.object({\n\t...BaseModelSchema,\n\tname: z.string(),\n\texternalId: z.string(),\n\ttype: z.union([\n\t\tz.literal(\"TEXT\"),\n\t\tz.literal(\"NUMBER\"),\n\t\tz.literal(\"DATE\"),\n\t\tz.literal(\"DATETIME\")\n\t]),\n\ttableId: z.string(),\n\tprojectId: z.string()\n})]);\nconst Table = z.object({\n\t...BaseModelSchema,\n\tname: z.string(),\n\tfolderId: Nullable(z.string()),\n\tprojectId: z.string(),\n\texternalId: z.string(),\n\tstatus: NullableEnum(TableAutomationStatus),\n\ttrigger: NullableEnum(TableAutomationTrigger)\n});\nconst PopulatedRecord = z.object({\n\t...BaseModelSchema,\n\ttableId: z.string(),\n\tprojectId: z.string(),\n\tcells: z.record(z.string(), z.object({\n\t\tupdated: z.string(),\n\t\tcreated: z.string(),\n\t\tvalue: z.unknown(),\n\t\tfieldName: z.string()\n\t}))\n});\nconst CreateTableWebhookRequest = z.object({\n\tevents: z.array(z.enum(TableWebhookEventType)),\n\twebhookUrl: z.string(),\n\tflowId: z.string()\n});\nconst ExportTableResponse = z.object({\n\tfields: z.array(z.object({\n\t\tid: z.string(),\n\t\tname: z.string()\n\t})),\n\trows: z.array(z.record(z.string(), z.string())),\n\tname: z.string()\n});\nconst ListTablesRequest = z.object({\n\tprojectId: z.string(),\n\tlimit: z.optional(z.coerce.number()),\n\tcursor: z.optional(z.string()),\n\tname: z.optional(z.string()),\n\texternalIds: OptionalArrayFromQuery(z.string()),\n\tfolderId: z.optional(z.string()),\n\tfolderIds: OptionalArrayFromQuery(z.string())\n});\nconst CreateRecordsRequest = z.object({\n\trecords: z.array(z.array(z.object({\n\t\tfieldId: z.string(),\n\t\tvalue: coerceToString()\n\t}))),\n\ttableId: z.string()\n});\nconst UpdateRecordRequest = z.object({\n\tcells: z.optional(z.array(z.object({\n\t\tfieldId: z.string(),\n\t\tvalue: coerceToString()\n\t}))),\n\ttableId: z.string(),\n\tagentUpdate: z.optional(z.boolean())\n});\nconst Filter = z.discriminatedUnion(\"operator\", [\n\tvalueFilter(\"eq\"),\n\tvalueFilter(\"neq\"),\n\tvalueFilter(\"gt\"),\n\tvalueFilter(\"gte\"),\n\tvalueFilter(\"lt\"),\n\tvalueFilter(\"lte\"),\n\tvalueFilter(\"co\"),\n\texistenceFilter(\"exists\"),\n\texistenceFilter(\"not_exists\")\n]);\nconst ListRecordsRequest = z.object({\n\ttableId: z.string(),\n\tlimit: z.optional(z.coerce.number()),\n\tcursor: z.optional(z.string()),\n\tfilters: OptionalArrayFromQuery(Filter)\n});\nconst StaticDropdownEmptyOption = {\n\tlabel: \"\",\n\tvalue: \"\"\n};\nfunction coerceToString() {\n\treturn z.pipe(z.transform((v) => v === null || v === void 0 ? v : String(v)), z.nullable(z.string()));\n}\nfunction valueFilter(op) {\n\treturn z.object({\n\t\tfieldId: z.string(),\n\t\toperator: z.literal(op),\n\t\tvalue: z.string()\n\t});\n}\nfunction existenceFilter(op) {\n\treturn z.object({\n\t\tfieldId: z.string(),\n\t\toperator: z.literal(op)\n\t});\n}\n\n//#endregion\n//#region upstream/core-piece-types/lib/flow-contracts.ts\nlet FlowStatus = /* @__PURE__ */ function(FlowStatus) {\n\tFlowStatus[\"ENABLED\"] = \"ENABLED\";\n\tFlowStatus[\"DISABLED\"] = \"DISABLED\";\n\treturn FlowStatus;\n}({});\nlet FlowTriggerType = /* @__PURE__ */ function(FlowTriggerType) {\n\tFlowTriggerType[\"EMPTY\"] = \"EMPTY\";\n\tFlowTriggerType[\"PIECE\"] = \"PIECE_TRIGGER\";\n\treturn FlowTriggerType;\n}({});\nconst StopResponse = z.object({\n\tstatus: z.optional(z.number()),\n\tbody: z.optional(z.unknown()),\n\theaders: z.optional(z.record(z.string(), z.string()))\n});\nconst Project = z.object({\n\t...BaseModelSchema,\n\tdeleted: Nullable(DateOrString),\n\townerId: z.string(),\n\tdisplayName: z.string(),\n\tplatformId: z.string(),\n\texternalId: Nullable(z.string())\n});\nconst USE_DRAFT_QUERY_PARAM_NAME = \"useDraft\";\nconst PARENT_RUN_ID_HEADER = \"ap-parent-run-id\";\nconst FAIL_PARENT_ON_FAILURE_HEADER = \"ap-fail-parent-on-failure\";\nconst RAW_PAYLOAD_HEADER = \"ap-raw-payload\";\n\n//#endregion\n//#region upstream/core-piece-types/lib/mcp-piece.ts\nlet McpPropertyType = /* @__PURE__ */ function(McpPropertyType) {\n\tMcpPropertyType[\"TEXT\"] = \"Text\";\n\tMcpPropertyType[\"BOOLEAN\"] = \"Boolean\";\n\tMcpPropertyType[\"DATE\"] = \"Date\";\n\tMcpPropertyType[\"NUMBER\"] = \"Number\";\n\tMcpPropertyType[\"ARRAY\"] = \"Array\";\n\tMcpPropertyType[\"OBJECT\"] = \"Object\";\n\treturn McpPropertyType;\n}({});\nconst McpProperty = z.object({\n\tname: z.string(),\n\tdescription: z.optional(z.string()),\n\ttype: z.string(),\n\trequired: z.boolean()\n});\nconst McpTrigger = z.object({\n\tpieceName: z.string(),\n\ttriggerName: z.string(),\n\tinput: z.object({\n\t\ttoolName: z.string(),\n\t\ttoolDescription: z.string(),\n\t\tinputSchema: z.array(McpProperty),\n\t\treturnsResponse: z.boolean()\n\t})\n});\n\n//#endregion\n//#region upstream/core-piece-types/lib/engine-tools.ts\nfunction normalizeToolOutputToExecuteResponse(raw) {\n\tif (raw === null || typeof raw !== \"object\") return {\n\t\tstatus: \"FAILED\",\n\t\toutput: raw,\n\t\tresolvedInput: {},\n\t\terrorMessage: \"Invalid tool output\"\n\t};\n\tconst o = raw;\n\tif (o[\"status\"] === \"SUCCESS\" || o[\"status\"] === \"FAILED\") return {\n\t\tstatus: o[\"status\"],\n\t\toutput: o[\"output\"],\n\t\tresolvedInput: o[\"resolvedInput\"] ?? {},\n\t\terrorMessage: o[\"errorMessage\"]\n\t};\n\tconst isError = o[\"isError\"] === true;\n\tlet output = o[\"structuredContent\"];\n\tif (output === void 0 && Array.isArray(o[\"content\"])) {\n\t\tconst parts = o[\"content\"].map((c) => c?.text).filter(Boolean);\n\t\toutput = parts.length === 1 ? parts[0] : parts.length ? { text: parts.join(\"\") } : o[\"content\"];\n\t}\n\tif (output === void 0) output = o;\n\treturn {\n\t\tstatus: isError ? \"FAILED\" : \"SUCCESS\",\n\t\toutput,\n\t\tresolvedInput: {},\n\t\terrorMessage: isError ? o[\"content\"]?.[0]?.text ?? o[\"message\"] ?? \"Tool failed\" : void 0\n\t};\n}\n\n//#endregion\n//#region upstream/framework/lib/property/util.ts\nfunction buildSchema(props, auth, requireAuth = true) {\n\tconst entries = Object.entries(props);\n\tconst propsSchema = {};\n\tfor (const [name, property] of entries) {\n\t\tswitch (property.type) {\n\t\t\tcase \"MARKDOWN\":\n\t\t\t\tpropsSchema[name] = z.optional(z.union([\n\t\t\t\t\tz.null(),\n\t\t\t\t\tz.undefined(),\n\t\t\t\t\tz.never(),\n\t\t\t\t\tz.unknown()\n\t\t\t\t]));\n\t\t\t\tbreak;\n\t\t\tcase \"DATE_TIME\":\n\t\t\tcase \"SHORT_TEXT\":\n\t\t\tcase \"LONG_TEXT\":\n\t\t\tcase \"RICH_TEXT\":\n\t\t\tcase \"COLOR\":\n\t\t\tcase \"FILE\":\n\t\t\t\tpropsSchema[name] = property.required ? z.string().check(z.minLength(1)) : z.string();\n\t\t\t\tbreak;\n\t\t\tcase \"CHECKBOX\":\n\t\t\t\tpropsSchema[name] = z.union([z.boolean(), z.string()]);\n\t\t\t\tbreak;\n\t\t\tcase \"NUMBER\":\n\t\t\t\tpropsSchema[name] = z.union([property.required ? z.string().check(z.minLength(1)) : z.string(), z.number()]);\n\t\t\t\tbreak;\n\t\t\tcase \"STATIC_DROPDOWN\":\n\t\t\tcase \"DROPDOWN\":\n\t\t\t\tpropsSchema[name] = z.unknown().check(z.refine((val) => val !== null && val !== void 0, { error: \"Value must not be null or undefined\" }));\n\t\t\t\tbreak;\n\t\t\tcase \"SECRET_TEXT\":\n\t\t\t\tpropsSchema[name] = property.required ? z.string().check(z.minLength(1)) : z.string();\n\t\t\t\tbreak;\n\t\t\tcase \"BASIC_AUTH\":\n\t\t\tcase \"CUSTOM_AUTH\":\n\t\t\tcase \"OAUTH2\": break;\n\t\t\tcase \"ARRAY\": {\n\t\t\t\tconst arrayItemSchema = isNil(property.properties) ? property.required ? z.string().check(z.minLength(1)) : z.string() : buildSchema(property.properties, void 0);\n\t\t\t\tpropsSchema[name] = z.union([\n\t\t\t\t\tproperty.required ? z.array(arrayItemSchema).check(z.minLength(1)) : z.array(arrayItemSchema),\n\t\t\t\t\tz.record(z.string(), z.unknown()),\n\t\t\t\t\tproperty.required ? z.string().check(z.minLength(1)) : z.string()\n\t\t\t\t]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"OBJECT\":\n\t\t\t\tpropsSchema[name] = z.union([z.record(z.string(), z.any()), property.required ? z.string().check(z.minLength(1)) : z.string()]);\n\t\t\t\tbreak;\n\t\t\tcase \"DATE_RANGE\":\n\t\t\t\tpropsSchema[name] = z.union([z.record(z.string(), z.any()), z.string()]);\n\t\t\t\tbreak;\n\t\t\tcase \"JSON\":\n\t\t\t\tpropsSchema[name] = z.union([\n\t\t\t\t\tz.record(z.string(), z.any()),\n\t\t\t\t\tz.array(z.any()),\n\t\t\t\t\tproperty.required ? z.string().check(z.minLength(1)) : z.string()\n\t\t\t\t]);\n\t\t\t\tbreak;\n\t\t\tcase \"MULTI_SELECT_DROPDOWN\":\n\t\t\tcase \"STATIC_MULTI_SELECT_DROPDOWN\":\n\t\t\t\tpropsSchema[name] = z.union([property.required ? z.array(z.any()).check(z.minLength(1)) : z.array(z.any()), property.required ? z.string().check(z.minLength(1)) : z.string()]);\n\t\t\t\tbreak;\n\t\t\tcase \"DYNAMIC\":\n\t\t\t\tpropsSchema[name] = z.record(z.string(), z.any());\n\t\t\t\tbreak;\n\t\t\tcase \"CUSTOM\": propsSchema[name] = z.unknown();\n\t\t}\n\t\tif (!property.required && property.type !== \"ARRAY\") propsSchema[name] = z.optional(z.union(isEmpty(propsSchema[name]) ? [\n\t\t\tz.any(),\n\t\t\tz.null(),\n\t\t\tz.undefined()\n\t\t] : [\n\t\t\tpropsSchema[name],\n\t\t\tz.null(),\n\t\t\tz.undefined()\n\t\t]));\n\t}\n\tif (auth && requireAuth) propsSchema[AUTHENTICATION_PROPERTY_NAME] = z.string().check(z.minLength(1));\n\treturn z.object(propsSchema);\n}\nconst piecePropertiesUtils = { buildSchema };\n\n//#endregion\n//#region upstream/framework/lib/property/index.ts\nconst PieceProperty = z.union([InputProperty, PieceAuthProperty]);\nconst PiecePropertyMap = z.record(z.string(), PieceProperty);\nconst InputPropertyMap = z.record(z.string(), InputProperty);\n\n//#endregion\n//#region upstream/framework/lib/trigger/trigger.ts\nconst DEDUPE_KEY_PROPERTY = \"_dedupe_key\";\nlet WebhookRenewStrategy = /* @__PURE__ */ function(WebhookRenewStrategy) {\n\tWebhookRenewStrategy[\"CRON\"] = \"CRON\";\n\tWebhookRenewStrategy[\"NONE\"] = \"NONE\";\n\treturn WebhookRenewStrategy;\n}({});\nconst WebhookRenewConfiguration = z.union([z.object({\n\tstrategy: z.literal(\"CRON\"),\n\tcronExpression: z.string()\n}), z.object({ strategy: z.literal(\"NONE\") })]);\nvar ITrigger = class {\n\tname;\n\tdisplayName;\n\tdescription;\n\trequireAuth;\n\tprops;\n\ttype;\n\thandshakeConfiguration;\n\tonHandshake;\n\trenewConfiguration;\n\tonRenew;\n\tonEnable;\n\tonDisable;\n\tonStart;\n\trun;\n\ttest;\n\tsampleData;\n\ttestStrategy;\n\toutputSchema;\n\taiMetadata;\n\tclassification;\n\tpropertyGroups;\n\tconstructor(name, displayName, description, requireAuth, props, type, handshakeConfiguration, onHandshake, renewConfiguration, onRenew, onEnable, onDisable, onStart, run, test, sampleData, testStrategy, outputSchema, aiMetadata, classification, propertyGroups) {\n\t\tthis.name = name;\n\t\tthis.displayName = displayName;\n\t\tthis.description = description;\n\t\tthis.requireAuth = requireAuth;\n\t\tthis.props = props;\n\t\tthis.type = type;\n\t\tthis.handshakeConfiguration = handshakeConfiguration;\n\t\tthis.onHandshake = onHandshake;\n\t\tthis.renewConfiguration = renewConfiguration;\n\t\tthis.onRenew = onRenew;\n\t\tthis.onEnable = onEnable;\n\t\tthis.onDisable = onDisable;\n\t\tthis.onStart = onStart;\n\t\tthis.run = run;\n\t\tthis.test = test;\n\t\tthis.sampleData = sampleData;\n\t\tthis.testStrategy = testStrategy;\n\t\tthis.outputSchema = outputSchema;\n\t\tthis.aiMetadata = aiMetadata;\n\t\tthis.classification = classification;\n\t\tthis.propertyGroups = propertyGroups;\n\t}\n};\nconst createTrigger = (params) => {\n\tswitch (params.type) {\n\t\tcase \"WEBHOOK\": return new ITrigger(params.name, params.displayName, params.description, params.requireAuth ?? true, params.props, params.type, params.handshakeConfiguration ?? { strategy: \"NONE\" }, params.onHandshake ?? (async () => ({ status: 200 })), params.renewConfiguration ?? { strategy: \"NONE\" }, params.onRenew ?? (async () => Promise.resolve()), params.onEnable, params.onDisable, params.onStart ?? (async () => Promise.resolve()), params.run, params.test ?? (() => Promise.resolve([params.sampleData])), params.sampleData, params.test ? \"TEST_FUNCTION\" : \"SIMULATION\", params.outputSchema, params.aiMetadata, params.classification, params.propertyGroups);\n\t\tcase \"POLLING\": return new ITrigger(params.name, params.displayName, params.description, params.requireAuth ?? true, params.props, params.type, { strategy: \"NONE\" }, async () => ({ status: 200 }), { strategy: \"NONE\" }, async () => Promise.resolve(), params.onEnable, params.onDisable, params.onStart ?? (async () => Promise.resolve()), params.run, params.test ?? (() => Promise.resolve([params.sampleData])), params.sampleData, \"TEST_FUNCTION\", params.outputSchema, params.aiMetadata, params.classification, params.propertyGroups);\n\t\tcase \"MANUAL\": return new ITrigger(params.name, params.displayName, params.description, params.requireAuth ?? true, params.props, params.type, { strategy: \"NONE\" }, async () => ({ status: 200 }), { strategy: \"NONE\" }, async () => Promise.resolve(), params.onEnable, params.onDisable, params.onStart ?? (async () => Promise.resolve()), params.run, params.test ?? (() => Promise.resolve([params.sampleData])), params.sampleData, \"TEST_FUNCTION\", params.outputSchema, params.aiMetadata, params.classification, params.propertyGroups);\n\t\tcase \"APP_WEBHOOK\": return new ITrigger(params.name, params.displayName, params.description, params.requireAuth ?? true, params.props, params.type, { strategy: \"NONE\" }, async () => ({ status: 200 }), { strategy: \"NONE\" }, async () => Promise.resolve(), params.onEnable, params.onDisable, params.onStart ?? (async () => Promise.resolve()), params.run, params.test ?? (() => Promise.resolve([params.sampleData])), params.sampleData, isNil(params.sampleData) && isNil(params.test) ? \"SIMULATION\" : \"TEST_FUNCTION\", params.outputSchema, params.aiMetadata, params.classification, params.propertyGroups);\n\t\tdefault: {\n\t\t\tconst { name, type, strategy } = params;\n\t\t\tthrow new Error(type === void 0 && strategy !== void 0 ? `createTrigger: trigger ${JSON.stringify(name)} sets \\`strategy\\`; the field is \\`type\\`, e.g. type: TriggerStrategy.POLLING` : `createTrigger: trigger ${JSON.stringify(name)} has \\`type\\` ${JSON.stringify(type)}; set type: TriggerStrategy.POLLING or TriggerStrategy.WEBHOOK`);\n\t\t}\n\t}\n};\n\n//#endregion\n//#region upstream/framework/lib/context/index.ts\nvar PieceServerContextError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"PieceServerContextError\";\n\t}\n};\nfunction isPieceServerContextError(error) {\n\treturn error instanceof Error && error.name === \"PieceServerContextError\";\n}\nlet StoreScope = /* @__PURE__ */ function(StoreScope) {\n\tStoreScope[\"PROJECT\"] = \"COLLECTION\";\n\tStoreScope[\"FLOW\"] = \"FLOW\";\n\treturn StoreScope;\n}({});\n\n//#endregion\n//#region upstream/framework/lib/context/versioning.ts\nlet ContextVersion = /* @__PURE__ */ function(ContextVersion) {\n\tContextVersion[\"V1\"] = \"1\";\n\tContextVersion[\"V2\"] = \"2\";\n\treturn ContextVersion;\n}({});\nconst LATEST_CONTEXT_VERSION = \"2\";\nconst MINIMUM_SUPPORTED_RELEASE_AFTER_LATEST_CONTEXT_VERSION = \"0.82.0\";\nconst backwardCompatabilityContextUtils = { makeActionContextBackwardCompatible({ context, contextVersion }) {\n\tswitch (contextVersion) {\n\t\tcase \"2\": return context;\n\t\tcase \"1\": return addLegacyMethods({ context });\n\t\tcase void 0: return addLegacyMethodsAndServerUrl({ context });\n\t}\n} };\nfunction addLegacyMethods({ context }) {\n\treturn {\n\t\t...context,\n\t\tgenerateResumeUrl: buildLegacyGenerateResumeUrl({ context }),\n\t\trun: {\n\t\t\t...context.run,\n\t\t\tpause: buildLegacyPauseHook({ context })\n\t\t}\n\t};\n}\nfunction addLegacyMethodsAndServerUrl({ context }) {\n\treturn {\n\t\t...addLegacyMethods({ context }),\n\t\tserverUrl: context.server.publicUrl\n\t};\n}\n/**\n* @deprecated Since 2026-04-12. Remove after 2026-10-12 once all pieces migrate to createWaitpoint/waitForWaitpoint.\n*/\nfunction buildLegacyPauseHook({ context }) {\n\treturn (req) => {\n\t\tconst type = req.pauseMetadata.type === \"DELAY\" ? \"DELAY\" : \"WEBHOOK\";\n\t\tconst responseToSend = req.pauseMetadata.type === \"WEBHOOK\" ? req.pauseMetadata.response : void 0;\n\t\tconst resumeDateTime = req.pauseMetadata.type === \"DELAY\" ? req.pauseMetadata.resumeDateTime : void 0;\n\t\tcontext.run.createWaitpoint({\n\t\t\ttype,\n\t\t\tversion: \"V0\",\n\t\t\tresumeDateTime,\n\t\t\tresponseToSend\n\t\t}).catch((e) => {\n\t\t\tconsole.error(\"[buildLegacyPauseHook] Failed to create waitpoint\", e);\n\t\t\tprocess.exit(1);\n\t\t});\n\t\tcontext.run.waitForWaitpoint(\"\");\n\t};\n}\n/**\n* @deprecated Since 2026-04-12. Remove after 2026-10-12 once all pieces migrate to createWaitpoint/waitForWaitpoint.\n*/\nfunction buildLegacyGenerateResumeUrl({ context }) {\n\treturn (params) => {\n\t\tconst randomId = Math.random().toString(36).substring(2);\n\t\tconst url = new URL(`${context.server.publicUrl}v1/flow-runs/${context.run.id}/requests/${randomId}${params.sync ? \"/sync\" : \"\"}`);\n\t\turl.search = new URLSearchParams(params.queryParams).toString();\n\t\treturn url.toString();\n\t};\n}\n\n//#endregion\n//#region upstream/framework/lib/piece.ts\nvar Piece = class {\n\tdisplayName;\n\tlogoUrl;\n\tauthors;\n\tevents;\n\tcategories;\n\tauth;\n\tminimumSupportedRelease;\n\tmaximumSupportedRelease;\n\tdescription;\n\tdeprecated;\n\t_actions = {};\n\t_triggers = {};\n\tgetContextInfo = () => ({ version: \"2\" });\n\tconstructor(displayName, logoUrl, authors, events, actions, triggers, categories, auth, minimumSupportedRelease = MINIMUM_SUPPORTED_RELEASE_AFTER_LATEST_CONTEXT_VERSION, maximumSupportedRelease, description = \"\", deprecated) {\n\t\tthis.displayName = displayName;\n\t\tthis.logoUrl = logoUrl;\n\t\tthis.authors = authors;\n\t\tthis.events = events;\n\t\tthis.categories = categories;\n\t\tthis.auth = auth;\n\t\tthis.minimumSupportedRelease = minimumSupportedRelease;\n\t\tthis.maximumSupportedRelease = maximumSupportedRelease;\n\t\tthis.description = description;\n\t\tthis.deprecated = deprecated;\n\t\tif (!isValidSimpleSemver(minimumSupportedRelease) || isSemverLessThan(minimumSupportedRelease, \"0.82.0\")) this.minimumSupportedRelease = MINIMUM_SUPPORTED_RELEASE_AFTER_LATEST_CONTEXT_VERSION;\n\t\tactions.forEach((action) => this._actions[action.name] = action);\n\t\ttriggers.forEach((trigger) => this._triggers[trigger.name] = trigger);\n\t}\n\tmetadata() {\n\t\treturn {\n\t\t\tdisplayName: this.displayName,\n\t\t\tlogoUrl: this.logoUrl,\n\t\t\tactions: this._actions,\n\t\t\ttriggers: this._triggers,\n\t\t\tcategories: this.categories,\n\t\t\tdescription: this.description,\n\t\t\tauthors: this.authors,\n\t\t\tauth: withConnectionIdentifierFlag(this.auth),\n\t\t\tminimumSupportedRelease: this.minimumSupportedRelease,\n\t\t\tmaximumSupportedRelease: this.maximumSupportedRelease,\n\t\t\tdeprecated: this.deprecated,\n\t\t\tcontextInfo: this.getContextInfo?.()\n\t\t};\n\t}\n\tgetAction(actionName) {\n\t\treturn this._actions[actionName];\n\t}\n\tgetTrigger(triggerName) {\n\t\treturn this._triggers[triggerName];\n\t}\n\tactions() {\n\t\treturn this._actions;\n\t}\n\ttriggers() {\n\t\treturn this._triggers;\n\t}\n};\nconst createPiece = (params) => {\n\tif (params.auth && Array.isArray(params.auth)) {\n\t\tif (!params.auth.every((auth, index, self) => index === self.findIndex((t) => t.type === auth.type))) throw new Error(\"Auth properties must be unique by type\");\n\t}\n\treturn new Piece(params.displayName, params.logoUrl, params.authors ?? [], params.events, params.actions, params.triggers, params.categories ?? [], params.auth, params.minimumSupportedRelease, params.maximumSupportedRelease, params.description, params.deprecated);\n};\nfunction withConnectionIdentifierFlag(auth) {\n\tif (auth === void 0) return;\n\treturn Array.isArray(auth) ? auth.map(flagConnectionIdentifier) : flagConnectionIdentifier(auth);\n}\nfunction flagConnectionIdentifier(auth) {\n\treturn {\n\t\t...auth,\n\t\thasConnectionIdentifier: auth.getConnectionIdentifier !== void 0\n\t};\n}\nfunction isValidSimpleSemver(version) {\n\treturn /^\\d+\\.\\d+\\.\\d+$/.test(version);\n}\nfunction isSemverLessThan(a, b) {\n\tconst [a1, a2, a3] = a.split(\".\").map(Number);\n\tconst [b1, b2, b3] = b.split(\".\").map(Number);\n\tif (a1 !== b1) return a1 < b1;\n\tif (a2 !== b2) return a2 < b2;\n\treturn a3 < b3;\n}\n\n//#endregion\n//#region upstream/framework/lib/piece-metadata.ts\nconst I18nForPiece = z.optional(z.record(z.string(), z.record(z.string(), z.string())));\nconst PieceBase = z.object({\n\tid: z.optional(z.string()),\n\tname: z.string(),\n\tdisplayName: z.string(),\n\tlogoUrl: z.string(),\n\tdescription: z.string(),\n\tauthors: z.array(z.string()),\n\tplatformId: z.optional(z.string()),\n\tdirectoryPath: z.optional(z.string()),\n\tauth: z.optional(z.union([PieceAuthProperty, z.array(PieceAuthProperty)])),\n\tversion: z.string(),\n\tcategories: z.optional(z.array(z.enum(PieceCategory))),\n\tminimumSupportedRelease: z.optional(z.string()),\n\tmaximumSupportedRelease: z.optional(z.string()),\n\tdeprecated: z.optional(z.boolean()),\n\ti18n: I18nForPiece\n});\nconst Audience = z.enum([\n\t\"human\",\n\t\"ai\",\n\t\"both\"\n]);\nconst AiMetadata = z.object({\n\tdescription: z.optional(z.string()),\n\tidempotent: z.optional(z.boolean())\n});\nconst ActionClassification = z.enum([\n\t\"READ\",\n\t\"SEARCH\",\n\t\"WRITE\",\n\t\"DESTRUCTIVE\"\n]);\nconst READ_ONLY_CLASSIFICATIONS = [\"READ\", \"SEARCH\"];\nconst isReadOnlyClassification = (classification) => classification !== void 0 && READ_ONLY_CLASSIFICATIONS.includes(classification);\nconst PropertyGroupDisplay = z.enum([\n\t\"tabs\",\n\t\"section\",\n\t\"summary\",\n\t\"builder\",\n\t\"footer\"\n]);\nconst PropertyGroup = z.object({\n\tkey: z.string(),\n\tdisplay: PropertyGroupDisplay,\n\tlabel: z.optional(z.string()),\n\tdescription: z.optional(z.string()),\n\ticon: z.optional(z.string()),\n\tprops: z.array(z.string())\n});\nconst ActionBase = z.object({\n\tname: z.string(),\n\tdisplayName: z.string(),\n\tdescription: z.string(),\n\tprops: PiecePropertyMap,\n\tpropertyGroups: z.optional(z.array(PropertyGroup)),\n\trequireAuth: z.boolean(),\n\terrorHandlingOptions: z.optional(ErrorHandlingOptionsParam),\n\toutputSchema: z.optional(z.custom()),\n\taudience: z.optional(Audience),\n\taiMetadata: z.optional(AiMetadata),\n\tclassification: z.optional(ActionClassification)\n});\nconst TriggerBase = z.object({\n\tname: z.string(),\n\tdisplayName: z.string(),\n\tdescription: z.string(),\n\tprops: PiecePropertyMap,\n\tpropertyGroups: z.optional(z.array(PropertyGroup)),\n\terrorHandlingOptions: z.optional(ErrorHandlingOptionsParam),\n\ttype: z.enum(TriggerStrategy),\n\tsampleData: z.unknown(),\n\thandshakeConfiguration: z.optional(z.custom()),\n\trenewConfiguration: z.optional(WebhookRenewConfiguration),\n\ttestStrategy: z.enum(TriggerTestStrategy),\n\toutputSchema: z.optional(z.custom()),\n\taiMetadata: z.optional(AiMetadata),\n\tclassification: z.optional(ActionClassification)\n});\nconst PieceMetadata = z.object({\n\t...PieceBase.shape,\n\tactions: z.record(z.string(), ActionBase),\n\ttriggers: z.record(z.string(), TriggerBase)\n});\nconst PieceMetadataSummary = z.object({\n\t...PieceBase.shape,\n\tactions: z.number(),\n\ttriggers: z.number(),\n\tsuggestedActions: z.optional(z.array(ActionBase)),\n\tsuggestedTriggers: z.optional(z.array(TriggerBase))\n});\nconst PiecePackageMetadata = z.object({\n\tprojectUsage: z.number(),\n\tpieceType: z.enum(PieceType),\n\tpackageType: z.enum(PackageType),\n\tplatformId: z.optional(z.string()),\n\tarchiveId: z.optional(z.string())\n});\nconst PieceMetadataModel = z.object({\n\t...PieceMetadata.shape,\n\t...PiecePackageMetadata.shape\n});\nconst PieceMetadataModelSummary = z.object({\n\t...PieceMetadataSummary.shape,\n\t...PiecePackageMetadata.shape\n});\nconst PiecePackageInformation = z.object({\n\tname: z.string(),\n\tversion: z.string()\n});\n\n//#endregion\n//#region upstream/framework/lib/i18n.ts\nconst pieceTranslation = {\n\ttranslatePiece: (params) => {\n\t\tconst { piece, locale, mutate = false } = params;\n\t\tif (!locale) return piece;\n\t\ttry {\n\t\t\tconst target = piece.i18n?.[locale];\n\t\t\tif (!target) return piece;\n\t\t\tconst translatedPiece = mutate ? piece : JSON.parse(JSON.stringify(piece));\n\t\t\tpieceTranslation.pathsToValuesToTranslate.forEach((key) => {\n\t\t\t\ttranslateProperty(translatedPiece, key, target);\n\t\t\t});\n\t\t\treturn translatedPiece;\n\t\t} catch (err) {\n\t\t\tconsole.error(`error translating piece ${piece.name}:`, err);\n\t\t\treturn piece;\n\t\t}\n\t},\n\t/**Gets the piece metadata regardles of piece location (node_modules or dist), wasn't included inside piece.metadata() for backwards compatibility issues (if an old ap version installs a new piece it would fail)*/\n\tinitializeI18n: async (pieceOutputPath) => {\n\t\ttry {\n\t\t\tconst locales = Object.values(LocalesEnum);\n\t\t\tconst i18n = {};\n\t\t\tfor (const locale of locales) {\n\t\t\t\tconst translations = await readLocaleFile(locale, pieceOutputPath);\n\t\t\t\tif (translations) i18n[locale] = translations;\n\t\t\t}\n\t\t\treturn Object.keys(i18n).length > 0 ? i18n : void 0;\n\t\t} catch (err) {\n\t\t\tconsole.log(`Error initializing i18n for ${pieceOutputPath}:`, err);\n\t\t\treturn;\n\t\t}\n\t},\n\tpathsToValuesToTranslate: [\n\t\t\"description\",\n\t\t\"auth.username.displayName\",\n\t\t\"auth.username.description\",\n\t\t\"auth.password.displayName\",\n\t\t\"auth.password.description\",\n\t\t\"auth.props.*.displayName\",\n\t\t\"auth.props.*.description\",\n\t\t\"auth.props.*.options.options.*.label\",\n\t\t\"auth.description\",\n\t\t\"actions.*.displayName\",\n\t\t\"actions.*.description\",\n\t\t\"actions.*.props.*.displayName\",\n\t\t\"actions.*.props.*.description\",\n\t\t\"actions.*.props.*.options.options.*.label\",\n\t\t\"triggers.*.displayName\",\n\t\t\"triggers.*.description\",\n\t\t\"triggers.*.props.*.displayName\",\n\t\t\"triggers.*.props.*.description\",\n\t\t\"triggers.*.props.*.options.options.*.label\"\n\t]\n};\n/**This function translates a property inside a piece, i.e description, displayName, etc...\n*\n* @param pieceModelOrProperty - The piece model or property to translate\n* @param path - The path to the property to translate, i.e auth.username.displayName\n* @param i18n - The i18n object\n*/\nfunction translateProperty(pieceModelOrProperty, path, i18n) {\n\tconst parsedKeys = path.split(\".\");\n\tif (parsedKeys[0] === \"*\") return Object.values(pieceModelOrProperty).forEach((item) => translateProperty(item, parsedKeys.slice(1).join(\".\"), i18n));\n\tconst nextObject = pieceModelOrProperty[parsedKeys[0]];\n\tif (!nextObject) return;\n\tif (parsedKeys.length > 1) return translateProperty(nextObject, parsedKeys.slice(1).join(\".\"), i18n);\n\tconst valueInI18n = i18n[pieceModelOrProperty[parsedKeys[0]].slice(0, 512)];\n\tif (valueInI18n) pieceModelOrProperty[parsedKeys[0]] = valueInI18n;\n}\nasync function fileExists(filePath) {\n\ttry {\n\t\tawait fs.access(filePath);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\nconst readLocaleFile = async (locale, pieceOutputPath) => {\n\tconst filePath = path.join(pieceOutputPath, \"src\", \"i18n\", `${locale}.json`);\n\tif (!await fileExists(filePath)) return null;\n\ttry {\n\t\tconst fileContent = await fs.readFile(filePath, \"utf8\");\n\t\tconst translations = JSON.parse(fileContent);\n\t\tif (typeof translations === \"object\" && translations !== null) return translations;\n\t\tthrow new Error(`Invalid i18n file format for ${locale} in piece ${pieceOutputPath}`);\n\t} catch (error) {\n\t\tconsole.error(`Error reading i18n file for ${locale} in piece ${pieceOutputPath}:`, error);\n\t\treturn null;\n\t}\n};\n\n//#endregion\n//#region upstream/framework/lib/test/index.ts\nfunction createMockActionContext(params) {\n\treturn {\n\t\texecutionType: \"BEGIN\",\n\t\tauth: void 0,\n\t\tpropsValue: params.propsValue,\n\t\tstore: {\n\t\t\tput: async (key, value) => value,\n\t\t\tget: async () => null,\n\t\t\tdelete: async () => {}\n\t\t},\n\t\tconnections: { get: async () => null },\n\t\ttags: { add: async () => {} },\n\t\tserver: {\n\t\t\tapiUrl: \"http://localhost:3000\",\n\t\t\tpublicUrl: \"http://localhost:4200\",\n\t\t\ttoken: \"test-token\"\n\t\t},\n\t\tfiles: { write: async () => \"test-file-url\" },\n\t\toutput: { update: async () => {} },\n\t\tagent: { tools: async () => ({}) },\n\t\trun: {\n\t\t\tid: \"test-run-id\",\n\t\t\tstop: () => {},\n\t\t\tpause: () => {},\n\t\t\trespond: () => {}\n\t\t},\n\t\tproject: {\n\t\t\tid: \"test-project-id\",\n\t\t\texternalId: async () => void 0\n\t\t},\n\t\tflows: {\n\t\t\tlist: async () => ({\n\t\t\t\tdata: [],\n\t\t\t\tnext: null,\n\t\t\t\tprevious: null\n\t\t\t}),\n\t\t\tcurrent: {\n\t\t\t\tid: \"test-flow-id\",\n\t\t\t\tversion: { id: \"test-flow-version-id\" }\n\t\t\t}\n\t\t},\n\t\tstep: { name: \"test-step\" },\n\t\tgenerateResumeUrl: () => \"http://localhost:3000/resume\"\n\t};\n}\nfunction createMockPollingTriggerContext(params) {\n\treturn {\n\t\t...createMockActionContext({ propsValue: params.propsValue }),\n\t\tsetSchedule: (schedule) => {\n\t\t\tparams.onSetSchedule?.(schedule);\n\t\t}\n\t};\n}\n\n//#endregion\n//#region src/powerhouse/context.ts\nfunction reactorOf(ctx) {\n\tconst reactor = ctx !== null && typeof ctx === \"object\" ? ctx.reactor : void 0;\n\tif (!reactor) throw new Error(\"ctx.reactor is not available: this piece is not running on a Powerhouse reactor\");\n\treturn reactor;\n}\n\n//#endregion\nexport { ACTIVEPIECES_CHAT_TIERS, AGENT_STEP_TEST_TIMEOUT_MS, AGENT_STEP_TIMEOUT_MS, AIProviderModel, AIProviderName, AIProviderWithoutSensitiveData, AI_PROVIDER_CAPABILITIES, ActionBase, ActionClassification, AgentFlowTool, AgentKnowledgeBaseTool, AgentMcpTool, AgentOutputField, AgentOutputFieldType, AgentPieceProps, AgentStepBlock, AgentTaskStatus, AgentTool, AgentToolType, AiMetadata, ApFile, AppConnectionType, ArrayProperty, ArraySubProps, Audience, AzureProviderConfig, BaseAIProviderAuthConfig, BasePropertySchema, BasicAuthProperty, BasicAuthPropertyValue, BedrockProviderAuthConfig, BedrockProviderConfig, ChatFormResponse, CheckboxProperty, CloudflareGatewayProviderConfig, ContentBlockType, ContextVersion, CreateRecordsRequest, CreateTableWebhookRequest, CustomAuthProperty, CustomProperty, DEDUPE_KEY_PROPERTY, DEFAULT_CHAT_TIER_ID, DEFAULT_CONNECTION_DISPLAY_NAME, DateRangePreset, DateRangeProperty, DateRangeValue, DateTimeProperty, DropdownOption, DropdownProperty, DropdownState, DynamicProp, DynamicProperties, DynamicPropsValue, ErrorHandlingOptionsParam, ExecutionToolStatus, ExecutionType, ExportTableResponse, FAIL_PARENT_ON_FAILURE_HEADER, Field, FieldType, FileProperty, FileResponseInterface, Filter, FilterOperator, FlowStatus, FlowTriggerType, GetProviderConfigResponse, HumanInputFormResult, HumanInputFormResultTypes, IAction, ITrigger, InputProperty, InputPropertyMap, JsonProperty, KnowledgeBaseSourceType, LATEST_CONTEXT_VERSION, ListRecordsRequest, ListTablesRequest, LongTextProperty, MINIMUM_SUPPORTED_RELEASE_AFTER_LATEST_CONTEXT_VERSION, MarkdownContentBlock, MarkdownVariant, McpAuthConfig, McpAuthType, McpProperty, McpPropertyType, McpProtocol, McpTrigger, MultiSelectDropdownProperty, NumberProperty, OAuth2AuthorizationMethod, OAuth2GrantType, OAuth2Property, OAuth2PropertyValue, OAuth2Props, OIDCProperty, OPENAI_COMPATIBLE_VENDOR_BASE_URLS, ObjectProperty, OpenAICompatibleProviderConfig, OpenAiCompatibleVendorConfig, PARENT_RUN_ID_HEADER, Piece, PieceAuth, PieceAuthProperty, PieceBase, PieceCategory, PieceMetadata, PieceMetadataModel, PieceMetadataModelSummary, PieceMetadataSummary, PiecePackageInformation, PieceProperty, PiecePropertyMap, PieceServerContextError, PopulatedRecord, Project, ProjectAIProvider, Property, PropertyGroup, PropertyGroupDisplay, PropertyType, RAW_PAYLOAD_HEADER, READ_ONLY_CLASSIFICATIONS, RichTextProperty, SecretTextProperty, SeekPage, ShortTextProperty, StaticDropdownEmptyOption, StaticDropdownProperty, StaticMultiSelectDropdownProperty, StopResponse, StoreScope, TASK_COMPLETION_TOOL_NAME, Table, TableWebhookEventType, ToolCallContentBlock, ToolCallStatus, ToolCallType, TriggerBase, TriggerStrategy, USE_DRAFT_QUERY_PARAM_NAME, UpdateRecordRequest, VertexProviderAuthConfig, VertexProviderConfig, WebhookHandshakeStrategy, WebhookRenewConfiguration, WebhookRenewStrategy, apId, assertNotNullOrUndefined, backwardCompatabilityContextUtils, buildAuthHeaders, camelCase, chunk, createAction, createKeyForFormInput, createMockActionContext, createMockPollingTriggerContext, createPiece, createTrigger, dateRangeUtils, getAuthPropertyForValue, getEffectiveProviderAndModel, isEmpty, isNil, isNotUndefined, isPieceServerContextError, isReadOnlyClassification, isString, kebabCase, mcpToolNameUtils, normalizeToolOutputToExecuteResponse, pickBy, piecePropertiesUtils, pieceTranslation, reactorOf, splitCloudflareGatewayModelId, spreadIfDefined, startCase, tryCatch, unique };\n//# sourceMappingURL=index.js.map","// The Powerhouse mark, from the logo powerhouse.inc serves (its first path,\n// which is the icon; the rest of that file is the wordmark).\n\n// The mark alone, not the app icon: the app icon insets it on a dark canvas,\n// and the editor frames every piece logo with padding of its own, so that\n// version would sit padded twice. Filled dark because the frame is white.\nexport const POWERHOUSE_LOGO =\n \"data:image/svg+xml;base64,\" +\n \"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMTQg\" +\n \"MTE0IiBmaWxsPSJub25lIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZl\" +\n \"bm9kZCIgZmlsbD0iIzE2MTYxNiIgZD0iTTcxLjI5MTkgMEwyNC4zNDE1IDM4Ljg3NzJDMTcuNDU0\" +\n \"OCA0NC41Nzk4IDE2Ljk1MzkgNTQuOTY1OSAyMy4yNiA2MS4zMDQ3TDM5LjUwMjggNzcuNjMxOEM0\" +\n \"NC4yNjg0IDgyLjQyMjEgNDUuMjk5NiA4OS43ODM0IDQyLjAzMzUgOTUuNjk4OEwzMS45MjkgMTE0\" +\n \"SDE1LjJDNi44MDUyNyAxMTQgMCAxMDcuMTk1IDAgOTguOFYxNS4yQzAgNi44MDUyNyA2LjgwNTI3\" +\n \"IDAgMTUuMiAwSDcxLjI5MTlaTTgwLjExMSAwTDcxLjM0MTIgMTUuOTc1OEM2OC4xMDc4IDIxLjg2\" +\n \"NiA2OS4xMjU1IDI5LjE4MDQgNzMuODQ0MSAzMy45NjQxTDkxLjA3NTEgNTEuNDMzMUM5Ny4zNjc0\" +\n \"IDU3LjgxMjQgOTYuODA0NCA2OC4yMjI3IDg5Ljg2MDcgNzMuODg2MUw0MC42NzgyIDExNEg5OC44\" +\n \"QzEwNy4xOTUgMTE0IDExNCAxMDcuMTk1IDExNCA5OC44VjE1LjJDMTE0IDYuODA1MjcgMTA3LjE5\" +\n \"NSAwIDk4LjggMEg4MC4xMTFaIi8+PC9zdmc+\";\n","// Reads an action's GraphQL input SDL into fields a form can render: the root\n// `<ActionType>Input`, the input types it nests, and the enums it uses.\n\nexport interface TypeRef {\n name: string;\n list: boolean;\n required: boolean;\n}\n\nexport interface InputField {\n name: string;\n type: TypeRef;\n description?: string;\n}\n\nexport interface ActionInputSchema {\n root: InputField[];\n inputs: Map<string, InputField[]>;\n enums: Map<string, string[]>;\n}\n\nexport type FieldKind =\n | \"text\"\n | \"number\"\n | \"integer\"\n | \"boolean\"\n | \"enum\"\n | \"object\"\n | \"json\";\n\nconst TEXT_SCALARS = new Set([\n \"String\",\n \"ID\",\n \"OID\",\n \"PHID\",\n \"OLabel\",\n \"URL\",\n \"Date\",\n \"DateTime\",\n \"EmailAddress\",\n \"EthereumAddress\",\n \"Currency\",\n]);\n\nexport function rootInputName(actionType: string): string {\n const pascal = actionType\n .toLowerCase()\n .split(/[_\\s]+/)\n .filter(Boolean)\n .map((part) => part[0].toUpperCase() + part.slice(1))\n .join(\"\");\n return `${pascal}Input`;\n}\n\nfunction parseType(raw: string): TypeRef {\n const trimmed = raw.trim();\n const required = trimmed.endsWith(\"!\");\n const bare = required ? trimmed.slice(0, -1) : trimmed;\n const list = bare.startsWith(\"[\");\n const name = bare.replace(/[[\\]!]/g, \"\").trim();\n return { name, list, required };\n}\n\nfunction parseFields(body: string): InputField[] {\n const fields: InputField[] = [];\n let description: string | undefined;\n // Block descriptions fold onto one line first, so none of their lines can\n // read as a field or open a line string.\n const lines = body\n .replace(\n /\"\"\"([\\s\\S]*?)\"\"\"/g,\n (_, text: string) => `\"${text.trim().replace(/\\s+/g, \" \")}\"`,\n )\n .split(\"\\n\");\n for (const rawLine of lines) {\n const line = rawLine.replace(/#.*$/, \"\").trim();\n if (!line) continue;\n const doc = /^\"(.*)\"$/.exec(line);\n if (doc) {\n description = doc[1].replace(/\\s+/g, \" \");\n continue;\n }\n const match = /^(\\w+)\\s*:\\s*([\\w[\\]!\\s]+?)(?:\\s*=.*)?$/.exec(line);\n if (!match) continue;\n const [, name, type] = match;\n // The generator's stand-in for an input with no fields.\n if (name !== \"_\") {\n fields.push({\n name,\n type: parseType(type),\n ...(description ? { description } : {}),\n });\n }\n description = undefined;\n }\n return fields;\n}\n\n// Null when the SDL has no `<ActionType>Input`, so the caller falls back to JSON.\nexport function parseActionInputSchema(\n sdl: string,\n actionType: string,\n): ActionInputSchema | null {\n const inputs = new Map<string, InputField[]>();\n const enums = new Map<string, string[]>();\n for (const match of sdl.matchAll(/\\b(input|enum)\\s+(\\w+)\\s*\\{([^}]*)\\}/g)) {\n const [, keyword, name, body] = match;\n if (keyword === \"input\") inputs.set(name, parseFields(body));\n else {\n enums.set(\n name,\n body\n .replace(/#.*$/gm, \"\")\n .replace(/\"[^\"]*\"/g, \"\")\n .split(/[\\s,]+/)\n .filter(Boolean),\n );\n }\n }\n const root = inputs.get(rootInputName(actionType));\n return root ? { root, inputs, enums } : null;\n}\n\nexport function fieldKind(type: TypeRef, schema: ActionInputSchema): FieldKind {\n if (schema.inputs.has(type.name)) return \"object\";\n if (schema.enums.has(type.name)) return \"enum\";\n if (type.name === \"Boolean\") return \"boolean\";\n if (type.name === \"Int\") return \"integer\";\n if (type.name === \"Float\") return \"number\";\n if (TEXT_SCALARS.has(type.name)) return \"text\";\n return \"json\";\n}\n\n// A starting value: required fields get an empty value of their kind, and\n// optional ones are left out rather than sent as null.\nexport function templateFor(\n fields: InputField[],\n schema: ActionInputSchema,\n depth = 0,\n): Record<string, unknown> {\n const template: Record<string, unknown> = {};\n for (const field of fields) {\n if (!field.type.required) continue;\n if (field.type.list) {\n template[field.name] = [];\n continue;\n }\n const kind = fieldKind(field.type, schema);\n const nested = schema.inputs.get(field.type.name);\n // Self-referencing inputs stop here rather than recurse forever.\n if (kind === \"object\" && nested && depth < 4) {\n template[field.name] = templateFor(nested, schema, depth + 1);\n } else if (kind === \"text\") template[field.name] = \"\";\n else if (kind === \"integer\" || kind === \"number\") template[field.name] = 0;\n else if (kind === \"boolean\") template[field.name] = false;\n else if (kind === \"enum\") {\n template[field.name] = schema.enums.get(field.type.name)?.[0] ?? \"\";\n }\n }\n return template;\n}\n\n// \"createdAt\" → \"Created at\", for labels.\nexport function humanize(name: string): string {\n const spaced = name\n .replace(/([a-z0-9])([A-Z])/g, \"$1 $2\")\n .replace(/[_-]+/g, \" \")\n .toLowerCase()\n .trim();\n return spaced.charAt(0).toUpperCase() + spaced.slice(1);\n}\n","// An action's input as the props any Activepieces host renders, and the values\n// those props produce turned back into the types the action's schema declares.\nimport {\n Property,\n type DynamicPropsValue,\n} from \"@powerhousedao/pieces-framework\";\nimport {\n fieldKind,\n humanize,\n type ActionInputSchema,\n type InputField,\n} from \"./input-schema.js\";\n\n// DynamicProperties allows text, static dropdowns and JSON only, so numbers\n// are text and booleans a yes/no dropdown; coerceInput restores their types.\nfunction propFor(field: InputField, schema: ActionInputSchema) {\n const base = {\n displayName: humanize(field.name),\n required: field.type.required,\n ...(field.description ? { description: field.description } : {}),\n };\n if (field.type.list) {\n return Property.Json({\n ...base,\n description: field.description ?? \"A JSON list\",\n });\n }\n switch (fieldKind(field.type, schema)) {\n case \"text\":\n return Property.ShortText(base);\n case \"integer\":\n case \"number\":\n return Property.ShortText({\n ...base,\n description: field.description ?? \"A number\",\n });\n case \"boolean\":\n return Property.StaticDropdown({\n ...base,\n options: {\n options: [\n { label: \"Yes\", value: true },\n { label: \"No\", value: false },\n ],\n },\n });\n case \"enum\":\n return Property.StaticDropdown({\n ...base,\n options: {\n options: (schema.enums.get(field.type.name) ?? []).map((value) => ({\n label: humanize(value),\n value,\n })),\n },\n });\n default:\n return Property.Json(base);\n }\n}\n\nexport function inputProps(schema: ActionInputSchema): DynamicPropsValue {\n const props: Record<string, unknown> = {};\n for (const field of schema.root) props[field.name] = propFor(field, schema);\n return props as DynamicPropsValue;\n}\n\nfunction parseJson(value: unknown): unknown {\n if (typeof value !== \"string\") return value;\n try {\n return JSON.parse(value);\n } catch {\n return value;\n }\n}\n\n// Unset fields are left out; a value that won't convert is passed through\n// for the model's own schema to reject by name.\nexport function coerceInput(\n schema: ActionInputSchema,\n raw: unknown,\n): Record<string, unknown> {\n const values =\n typeof raw === \"object\" && raw !== null\n ? (raw as Record<string, unknown>)\n : {};\n const input: Record<string, unknown> = {};\n for (const field of schema.root) {\n const value = values[field.name];\n if (value === undefined || value === null || value === \"\") continue;\n if (field.type.list) {\n input[field.name] = parseJson(value);\n continue;\n }\n const kind = fieldKind(field.type, schema);\n if (kind === \"integer\" || kind === \"number\") {\n const number = typeof value === \"string\" ? Number(value.trim()) : value;\n input[field.name] = Number.isFinite(number) ? number : value;\n } else if (kind === \"boolean\") {\n input[field.name] =\n value === \"true\" ? true : value === \"false\" ? false : value;\n } else if (kind === \"object\" || kind === \"json\") {\n input[field.name] = parseJson(value);\n } else {\n input[field.name] = value;\n }\n }\n return input;\n}\n","// Config parsing shared by the document actions.\n\n// Every one of these accepts what a model step produces as readily as what an\n// author typed: fenced JSON, a bare object, a quoted id inside a sentence.\nexport interface ActionInputConfig {\n type: string;\n input?: unknown;\n scope?: string;\n}\n\nexport interface DispatchPayload {\n // Present when the payload object named its own target document.\n documentId?: string;\n actions: ActionInputConfig[];\n}\n\nexport interface CreatePayload {\n documentType?: string;\n name?: string;\n actions?: unknown;\n}\n\nfunction unfence(text: string): string {\n return text\n .trim()\n .replace(/^```(?:json)?\\s*/i, \"\")\n .replace(/```$/, \"\")\n .trim();\n}\n\n// Every top-level {...} or [...] in a string, in the order they appear.\n//\n// Scanned rather than matched with a regular expression because a brace inside\n// a string literal is not a brace: `{\"note\": \"a } here\"}` is one value, and a\n// regex that does not track quoting splits it.\nfunction jsonSpans(text: string): string[] {\n const spans: string[] = [];\n let depth = 0;\n let start = -1;\n let inString = false;\n let escaped = false;\n for (let index = 0; index < text.length; index++) {\n const character = text[index];\n if (inString) {\n if (escaped) escaped = false;\n else if (character === \"\\\\\") escaped = true;\n else if (character === '\"') inString = false;\n continue;\n }\n if (character === '\"') {\n inString = true;\n continue;\n }\n if (character === \"{\" || character === \"[\") {\n if (depth === 0) start = index;\n depth++;\n continue;\n }\n if (character === \"}\" || character === \"]\") {\n if (depth === 0) continue;\n depth--;\n if (depth === 0 && start >= 0) {\n spans.push(text.slice(start, index + 1));\n start = -1;\n }\n }\n }\n return spans;\n}\n\n// JSON out of whatever a model actually said.\n//\n// The prompt asks for JSON alone and a model may still reason out loud first:\n// a reasoning model answered this piece with two pages of deliberation and the\n// object on the last line, behind a leaked channel marker. Fences were already\n// tolerated here for the same reason — this is the same accommodation, one step\n// further.\n//\n// The LAST top-level value wins, because the pattern is deliberation first and\n// answer last; an example the model quoted from the prompt would otherwise be\n// preferred over the answer it worked out.\nexport function parseModelJson(text: string): unknown {\n const cleaned = unfence(text);\n try {\n return JSON.parse(cleaned);\n } catch {\n // Not JSON on its own; look for JSON inside it.\n }\n const spans = jsonSpans(cleaned);\n for (let index = spans.length - 1; index >= 0; index--) {\n try {\n return JSON.parse(spans[index]);\n } catch {\n // A span that does not parse is prose that happened to hold a brace.\n }\n }\n throw new SyntaxError(\"no JSON value found\");\n}\n\nexport function parseActions(\n value: unknown,\n blockName: string,\n): ActionInputConfig[] {\n return parseDispatchPayload(value, blockName).actions;\n}\n\n// Accepts an array, a single action object, or JSON text (typically an LLM's\n// output, possibly fenced); an object may also carry the target documentId.\nexport function parseDispatchPayload(\n value: unknown,\n blockName: string,\n): DispatchPayload {\n let documentId: string | undefined;\n if (typeof value === \"string\") {\n try {\n value = parseModelJson(value);\n } catch {\n throw new Error(`${blockName}: \"actions\" is a string but not valid JSON`);\n }\n }\n if (value && typeof value === \"object\" && !Array.isArray(value)) {\n const record = value as Record<string, unknown>;\n if (typeof record.documentId === \"string\") documentId = record.documentId;\n value = Array.isArray(record.actions) ? record.actions : [value];\n }\n if (!Array.isArray(value)) return { documentId, actions: [] };\n const actions = value.map((entry, index) => {\n const record = entry as Record<string, unknown> | null;\n if (!record || typeof record.type !== \"string\") {\n throw new Error(`${blockName}: actions[${index}] needs a string \"type\"`);\n }\n return {\n type: record.type,\n input: record.input,\n scope: typeof record.scope === \"string\" ? record.scope : undefined,\n };\n });\n return { documentId, actions };\n}\n\n// {documentType, name, actions?} as an object or as JSON text, possibly fenced.\nexport function parseCreatePayload(\n value: unknown,\n blockName: string,\n): CreatePayload {\n let record = value;\n if (typeof record === \"string\") {\n if (unfence(record) === \"\") return {};\n try {\n record = parseModelJson(record);\n } catch {\n throw new Error(`${blockName}: \"payload\" is a string but not valid JSON`);\n }\n }\n if (!record || typeof record !== \"object\" || Array.isArray(record)) return {};\n const entry = record as Record<string, unknown>;\n return {\n documentType:\n typeof entry.documentType === \"string\" ? entry.documentType : undefined,\n name: typeof entry.name === \"string\" ? entry.name : undefined,\n actions: entry.actions,\n };\n}\n\n// Whitelist for the dispatch action: a comma-separated string, a list of\n// names, or a document-schema actions array.\nexport function allowedActionTypes(value: unknown): string[] {\n const raw = typeof value === \"string\" ? value.split(\",\") : value;\n if (!Array.isArray(raw)) return [];\n return raw\n .map((entry) => {\n if (typeof entry === \"string\") return entry;\n const record = entry as { type?: unknown } | null;\n return typeof record?.type === \"string\" ? record.type : \"\";\n })\n .map((entry) => entry.trim())\n .filter(Boolean);\n}\n\nconst UUID = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i;\n\n// Ids fed by an AI step arrive quoted, fenced or wrapped in prose; documents\n// are addressed by uuid, so prefer one when the text contains it.\nexport function resolveDocumentId(value: unknown): string | undefined {\n if (typeof value !== \"string\") return undefined;\n const text = value.trim();\n if (!text) return undefined;\n const uuid = UUID.exec(text);\n if (uuid) return uuid[0];\n // Slugs are valid identifiers too, so fall back to the bare text.\n return text.replace(/^[\"'`]+|[\"'`]+$/g, \"\").trim() || undefined;\n}\n\n// A design-time value that can actually be resolved: an expression cannot.\nexport function staticString(value: unknown): string | undefined {\n if (typeof value !== \"string\") return undefined;\n const trimmed = value.trim();\n if (!trimmed || trimmed.includes(\"{{\")) return undefined;\n return trimmed;\n}\n","// Pure helpers over what the reactor reports: a drive's folders, and the SDL\n// an action's input needs to be read on its own.\n\ninterface DriveNode {\n id: string;\n name?: string;\n kind?: string;\n parentFolder?: string | null;\n}\n\nexport interface FolderOption {\n label: string;\n value: string;\n}\n\nfunction driveNodes(state: unknown): DriveNode[] {\n const nodes = (state as { nodes?: unknown } | null)?.nodes;\n if (!Array.isArray(nodes)) return [];\n return nodes.filter(\n (node): node is DriveNode =>\n typeof node === \"object\" &&\n node !== null &&\n typeof (node as DriveNode).id === \"string\",\n );\n}\n\n// Every folder in a drive, labelled by its path so two \"2026\" folders under\n// different parents stay apart.\nexport function folderOptions(driveState: unknown): FolderOption[] {\n const folders = driveNodes(driveState).filter(\n (node) => node.kind === \"folder\",\n );\n const byId = new Map(folders.map((folder) => [folder.id, folder]));\n const pathOf = (folder: DriveNode): string => {\n const names: string[] = [];\n const seen = new Set<string>();\n let current: DriveNode | undefined = folder;\n // A cycle in corrupt state must not hang the options call.\n while (current && !seen.has(current.id)) {\n seen.add(current.id);\n names.unshift(current.name || \"(unnamed)\");\n current = current.parentFolder\n ? byId.get(current.parentFolder)\n : undefined;\n }\n return names.join(\" / \");\n };\n return folders\n .map((folder) => ({ label: pathOf(folder), value: folder.id }))\n .sort((a, b) => a.label.localeCompare(b.label));\n}\n\nconst DEFINITION = /\\b(?:input|enum|type)\\s+(\\w+)/g;\nconst SCALARS = new Set([\"String\", \"Int\", \"Float\", \"Boolean\", \"ID\"]);\n\nfunction blockOf(sdl: string, keyword: string, name: string): string | null {\n return (\n new RegExp(`${keyword}\\\\s+${name}\\\\s*\\\\{[^}]*\\\\}`).exec(sdl)?.[0] ?? null\n );\n}\n\n// An operation's SDL defines its input types but not the enums they use, which\n// live in the state schema; this appends the referenced ones.\nexport function withReferencedEnums(\n inputSchema: string,\n stateSchema: string | null | undefined,\n): string {\n if (!stateSchema) return inputSchema;\n const defined = new Set(\n [...inputSchema.matchAll(DEFINITION)].map((match) => match[1]),\n );\n const referenced = new Set(\n [...inputSchema.matchAll(/:\\s*\\[?\\s*(\\w+)/g)]\n .map((match) => match[1])\n .filter((name) => !defined.has(name) && !SCALARS.has(name)),\n );\n const enums = [...referenced]\n .map((name) => blockOf(stateSchema, \"enum\", name))\n .filter((block): block is string => block !== null);\n return enums.length ? `${inputSchema}\\n\\n${enums.join(\"\\n\\n\")}` : inputSchema;\n}\n","// Reaching the reactor from piece code, and the props whose choices come\n// from it.\n\n// `ctx.reactor` is served by the host over the worker's call channel and only\n// to a piece an installed reactor package ships. Absent, reactorOf throws by\n// name, so a piece that ends up somewhere else fails legibly.\nimport {\n Property,\n reactorOf,\n type ReactorService,\n} from \"@powerhousedao/pieces-framework\";\nimport { staticString } from \"./parse.js\";\nimport { inputProps } from \"./input-props.js\";\nimport {\n parseActionInputSchema,\n type ActionInputSchema,\n} from \"./input-schema.js\";\nimport { folderOptions, withReferencedEnums } from \"./schema-text.js\";\n\nconst DRIVE_DOCUMENT_TYPE = \"powerhouse/document-drive\";\n\ninterface OptionEntry {\n label: string;\n value: string;\n // actionType only: the input's SDL and the model it belongs to, which the\n // editor's action list builds a form from and validates against.\n inputSchema?: string;\n documentType?: string;\n}\n\ninterface OptionState {\n options: OptionEntry[];\n placeholder?: string;\n}\n\nconst SET_NAME: OptionEntry = {\n label: \"SET_NAME (base)\",\n value: \"SET_NAME\",\n inputSchema: \"input SetNameInput {\\n name: String!\\n}\",\n};\n\nasync function documentOptions(\n reactor: ReactorService,\n documentType: string | undefined,\n): Promise<OptionState> {\n const documents = await reactor.find(documentType ? { documentType } : {});\n const nameOf = (document: (typeof documents)[number]) =>\n document.name || document.slug || \"(unnamed)\";\n const seen = new Map<string, number>();\n for (const document of documents) {\n seen.set(nameOf(document), (seen.get(nameOf(document)) ?? 0) + 1);\n }\n return {\n options: documents.map((document) => {\n const name = nameOf(document);\n // Two documents of one name are told apart by slug, else a short id.\n const shown =\n (seen.get(name) ?? 0) > 1\n ? `${name} (${document.slug && document.slug !== name ? document.slug : document.documentId.slice(0, 8)})`\n : name;\n // The type is noise when every option shares it.\n return {\n label: documentType ? shown : `${shown} — ${document.documentType}`,\n value: document.documentId,\n };\n }),\n placeholder:\n documentType === DRIVE_DOCUMENT_TYPE\n ? \"Choose a drive\"\n : documentType\n ? `Documents of type ${documentType}`\n : \"All documents on this reactor\",\n };\n}\n\n// The installed document models. Free text stays possible in this editor,\n// which is what an expression-fed step needs.\nexport const documentTypeProp = (\n displayName = \"Document type\",\n required = false,\n description?: string,\n) =>\n Property.Dropdown<string>({\n auth: undefined,\n displayName,\n description,\n required,\n refreshers: [],\n options: async (_propsValue, ctx) => {\n const models = await reactorOf(ctx).models();\n return {\n options: models\n .map((model) => ({\n label: model.name\n ? `${model.name} (${model.documentType})`\n : model.documentType,\n value: model.documentType,\n }))\n .sort((a, b) => a.value.localeCompare(b.value)),\n };\n },\n });\n\nexport const documentIdProp = (\n displayName = \"Document id\",\n required = false,\n description?: string,\n) =>\n Property.Dropdown<string>({\n auth: undefined,\n displayName,\n description,\n required,\n // Narrowed by the sibling type when one is set, which is why it refreshes.\n refreshers: [\"documentType\"],\n options: (propsValue, ctx) =>\n documentOptions(reactorOf(ctx), staticString(propsValue.documentType)),\n });\n\nexport const driveProp = (displayName: string, description?: string) =>\n Property.Dropdown<string>({\n auth: undefined,\n displayName,\n description,\n required: false,\n refreshers: [],\n options: (_propsValue, ctx) =>\n documentOptions(reactorOf(ctx), DRIVE_DOCUMENT_TYPE),\n });\n\n// A folder inside the drive the `driveProp` sibling names, labelled by path;\n// the step files the document there instead of at the drive's root.\nexport const folderProp = (\n displayName: string,\n driveProp: string,\n description?: string,\n) =>\n Property.Dropdown<string>({\n auth: undefined,\n displayName,\n description,\n required: false,\n refreshers: [driveProp],\n options: async (propsValue, ctx) => {\n const driveId = staticString(propsValue[driveProp]);\n if (!driveId) {\n return {\n disabled: true,\n options: [],\n placeholder: \"Pick a drive first\",\n };\n }\n const drive = await reactorOf(ctx).get({ documentId: driveId });\n const options = folderOptions(drive.state);\n return {\n options,\n placeholder: options.length\n ? `Folders in ${drive.name || \"this drive\"}`\n : `${drive.name || \"This drive\"} has no folders`,\n };\n },\n });\n\n// A JSON array of {type, input, scope?}, for several actions in one step or\n// a payload an earlier step produced. Advanced: the single action is the form.\nexport const actionsProp = (displayName: string, description?: string) =>\n Property.Json({ displayName, required: false, description, advanced: true });\n\n// The target type's own actions, each carrying its input SDL, plus the base\n// actions every document accepts.\nexport const actionTypeProp = (\n displayName = \"Action type\",\n required = false,\n description?: string,\n) =>\n Property.Dropdown<string>({\n auth: undefined,\n displayName,\n description,\n required,\n refreshers: [\"documentType\", \"documentId\"],\n options: async (propsValue, ctx) => {\n const reactor = reactorOf(ctx);\n let documentType = staticString(propsValue.documentType);\n if (!documentType) {\n // A resolvable id names its own type, which is what a step that only\n // knows the document has to offer.\n const documentId = staticString(propsValue.documentId);\n if (documentId) {\n documentType = (await reactor.get({ documentId })).documentType;\n }\n }\n if (!documentType) {\n return {\n disabled: true,\n options: [SET_NAME],\n placeholder: \"Pick a document type first\",\n };\n }\n const model = await reactor.model(documentType);\n return {\n options: [\n ...model.actions.map((action) => ({\n label: `${action.type} (${action.module})`,\n value: action.type,\n documentType,\n ...(action.inputSchema\n ? {\n inputSchema: withReferencedEnums(\n action.inputSchema,\n model.stateSchema,\n ),\n }\n : {}),\n })),\n ],\n placeholder: `Actions of ${documentType}`,\n };\n },\n });\n\n// The model a step targets: named, or read off the document it names.\nasync function targetType(\n reactor: ReactorService,\n propsValue: Record<string, unknown>,\n): Promise<string | undefined> {\n const named = staticString(propsValue.documentType);\n if (named) return named;\n const documentId = staticString(propsValue.documentId);\n return documentId\n ? (await reactor.get({ documentId })).documentType\n : undefined;\n}\n\n// The chosen action's input schema, with the enums it uses; undefined when the\n// step doesn't yet say which model and action.\nexport async function actionInputSchema(\n reactor: ReactorService,\n propsValue: Record<string, unknown>,\n): Promise<ActionInputSchema | undefined> {\n const actionType = staticString(propsValue.actionType);\n if (!actionType) return undefined;\n const documentType = await targetType(reactor, propsValue);\n if (!documentType) return undefined;\n const model = await reactor.model(documentType);\n const action = model.actions.find((entry) => entry.type === actionType);\n if (!action?.inputSchema) return undefined;\n return (\n parseActionInputSchema(\n withReferencedEnums(action.inputSchema, model.stateSchema),\n actionType,\n ) ?? undefined\n );\n}\n\n// One field per input field of the chosen action, rebuilt when it changes.\nexport const actionInputProp = (displayName = \"Input\") =>\n Property.DynamicProperties({\n auth: undefined,\n displayName,\n required: false,\n refreshers: [\"documentType\", \"documentId\", \"actionType\"],\n props: async (propsValue, ctx) => {\n const schema = await actionInputSchema(\n reactorOf(ctx),\n propsValue as Record<string, unknown>,\n );\n return schema ? inputProps(schema) : {};\n },\n });\n\n// The action and its input, in one card: they only make sense together.\nexport const ACTION_GROUP = (when: string) => ({\n key: \"action\",\n display: \"section\" as const,\n label: \"Action\",\n description: `${when} Pick a type, then fill in its input: the action needs both.`,\n props: [\"actionType\", \"input\"],\n});\n","import {\n createAction,\n Property,\n reactorOf,\n} from \"@powerhousedao/pieces-framework\";\nimport { coerceInput } from \"../input-props.js\";\nimport { parseActions, parseCreatePayload } from \"../parse.js\";\nimport {\n ACTION_GROUP,\n actionInputProp,\n actionInputSchema,\n actionsProp,\n actionTypeProp,\n documentTypeProp,\n driveProp,\n folderProp,\n} from \"../reactor.js\";\n\nconst BLOCK = \"document-create\";\n\nexport const documentCreateAction = createAction({\n name: BLOCK,\n displayName: \"Create document\",\n description: \"Creates a Powerhouse document.\",\n requireAuth: false,\n propertyGroups: [ACTION_GROUP(\"Optional, sent right after the create.\")],\n props: {\n documentType: documentTypeProp(),\n name: Property.ShortText({ displayName: \"Document name\", required: false }),\n parentId: driveProp(\"Parent drive\"),\n folderId: folderProp(\"Folder\", \"parentId\", \"Omit for the drive's root\"),\n actionType: actionTypeProp(\"Type\", false),\n input: actionInputProp(\"Input\"),\n actions: actionsProp(\n \"Action list (JSON)\",\n 'Several actions after the create, or a payload from an earlier step: [{ \"type\": …, \"input\": … }]',\n ),\n payload: Property.ShortText({\n displayName: \"Payload\",\n description:\n \"JSON {documentType, name, actions?}, e.g. {{steps.draft.output}}\",\n required: false,\n advanced: true,\n }),\n },\n run: async (ctx) => {\n const reactor = reactorOf(ctx);\n const config = ctx.propsValue;\n // A payload (typically model output) can name the type and the document.\n const payload = parseCreatePayload(config.payload, BLOCK);\n const documentType =\n (typeof config.documentType === \"string\" && config.documentType) ||\n payload.documentType;\n if (!documentType) {\n throw new Error(\n `${BLOCK}: \"documentType\" is required, in the config or the payload`,\n );\n }\n const name =\n (typeof config.name === \"string\" && config.name) || payload.name;\n const created = await reactor.create({\n documentType,\n ...(name ? { name } : {}),\n // The host files into a folder by its id alone, finding its drive.\n ...(config.folderId || config.parentId\n ? { parentId: config.folderId || config.parentId }\n : {}),\n });\n\n // The name travelled with the create; only the author's own actions are\n // left to dispatch.\n const followUps = parseActions(config.actions ?? payload.actions, BLOCK);\n const actionType =\n typeof config.actionType === \"string\" ? config.actionType.trim() : \"\";\n if (actionType) {\n const schema = await actionInputSchema(reactor, {\n documentType,\n actionType,\n });\n followUps.unshift({\n type: actionType,\n input: schema\n ? coerceInput(schema, config.input)\n : (config.input ?? {}),\n scope: undefined,\n });\n }\n const document = followUps.length\n ? await reactor.execute({\n documentId: created.documentId,\n actions: followUps,\n })\n : created;\n\n return {\n documentId: document.documentId,\n documentType: document.documentType,\n name: document.name,\n state: document.state,\n };\n },\n});\n","import {\n createAction,\n Property,\n reactorOf,\n} from \"@powerhousedao/pieces-framework\";\nimport {\n allowedActionTypes,\n parseDispatchPayload,\n resolveDocumentId,\n} from \"../parse.js\";\nimport { coerceInput } from \"../input-props.js\";\nimport {\n ACTION_GROUP,\n actionInputProp,\n actionInputSchema,\n actionsProp,\n actionTypeProp,\n documentIdProp,\n documentTypeProp,\n} from \"../reactor.js\";\n\nconst BLOCK = \"document-dispatch\";\n\nexport const documentDispatchAction = createAction({\n name: BLOCK,\n displayName: \"Dispatch actions\",\n description: \"Sends actions to a document.\",\n requireAuth: false,\n propertyGroups: [ACTION_GROUP(\"Sent to the document.\")],\n props: {\n documentId: documentIdProp(\n \"Document id\",\n true,\n \"e.g. {{steps.create.output.documentId}}\",\n ),\n documentType: documentTypeProp(\n \"Document type\",\n false,\n \"Design-time hint when the document id is an expression\",\n ),\n actionType: actionTypeProp(\"Type\", false),\n input: actionInputProp(\"Input\"),\n actions: actionsProp(\n \"Action list (JSON)\",\n 'Several actions at once, or a payload from an earlier step: [{ \"type\": …, \"input\": … }]',\n ),\n allowedActions: Property.ShortText({\n displayName: \"Allowed action types\",\n description: \"Comma-separated whitelist; enforced when set\",\n required: false,\n advanced: true,\n }),\n branch: Property.ShortText({\n displayName: \"Branch\",\n description: 'Defaults to \"main\"',\n required: false,\n advanced: true,\n }),\n },\n run: async (ctx) => {\n const config = ctx.propsValue;\n const payload = parseDispatchPayload(config.actions, BLOCK);\n // The picked action goes first, its input typed by the model's schema.\n const actionType =\n typeof config.actionType === \"string\" ? config.actionType.trim() : \"\";\n if (actionType) {\n const schema = await actionInputSchema(\n reactorOf(ctx),\n config as Record<string, unknown>,\n );\n payload.actions.unshift({\n type: actionType,\n input: schema\n ? coerceInput(schema, config.input)\n : (config.input ?? {}),\n scope: undefined,\n });\n }\n const documentId =\n resolveDocumentId(config.documentId) ??\n resolveDocumentId(payload.documentId);\n if (!documentId) {\n throw new Error(\n `${BLOCK}: \"documentId\" is required, in the config or the actions payload`,\n );\n }\n // Enforced, not merely suggested: the payload may come from an LLM.\n const allowed = allowedActionTypes(config.allowedActions);\n const rejected = allowed.length\n ? payload.actions.filter((entry) => !allowed.includes(entry.type))\n : [];\n if (rejected.length > 0) {\n throw new Error(\n `${BLOCK}: action(s) not allowed here: ${[\n ...new Set(rejected.map((entry) => entry.type)),\n ].join(\", \")}`,\n );\n }\n if (payload.actions.length === 0) {\n throw new Error(\n `${BLOCK}: choose an Action, or give a non-empty \"Action list (JSON)\"`,\n );\n }\n const document = await reactorOf(ctx).execute({\n documentId,\n ...(config.branch ? { branch: config.branch } : {}),\n actions: payload.actions,\n });\n return {\n documentId: document.documentId,\n documentType: document.documentType,\n name: document.name,\n state: document.state,\n };\n },\n});\n","import {\n createAction,\n Property,\n reactorOf,\n} from \"@powerhousedao/pieces-framework\";\nimport { documentTypeProp, driveProp } from \"../reactor.js\";\n\nconst DEFAULT_LIMIT = 25;\nconst MAX_LIMIT = 100;\n\nexport const documentFindAction = createAction({\n name: \"document-find\",\n displayName: \"Find documents\",\n description: \"Lists documents by type and name.\",\n requireAuth: false,\n props: {\n documentType: documentTypeProp(\"Document type\", false, \"Omit for any type\"),\n parentId: driveProp(\"In drive\", \"Omit for the whole reactor\"),\n name: Property.ShortText({\n displayName: \"Name contains\",\n description: \"Case-insensitive match\",\n required: false,\n }),\n matchPath: Property.ShortText({\n displayName: \"State field\",\n description:\n 'Dotted path into the document\\'s state, e.g. \"orderId\" or \"settlement.status\". With a value below, only documents holding it are returned.',\n required: false,\n }),\n matchValue: Property.ShortText({\n displayName: \"State value\",\n description:\n \"Compared as text, e.g. {{trigger.payload.orderId}}. Documents missing the field never match.\",\n required: false,\n }),\n includeState: Property.Checkbox({\n displayName: \"Include state\",\n description:\n \"Returns each document's state as well as its id and name. Off by default: a page of documents carries a page of states.\",\n required: false,\n defaultValue: false,\n }),\n limit: Property.Number({\n displayName: \"Max results\",\n description: `Defaults to ${DEFAULT_LIMIT}`,\n required: false,\n }),\n },\n run: async (ctx) => {\n const {\n documentType,\n parentId,\n name,\n limit,\n matchPath,\n matchValue,\n includeState,\n } = ctx.propsValue;\n const capped = Math.min(\n Math.max(typeof limit === \"number\" ? limit : DEFAULT_LIMIT, 1),\n MAX_LIMIT,\n );\n // A state match names a field but not its value, or the other way round:\n // that is an unfinished step, and answering it as \"no filter\" would return\n // every document of the type to something that asked for one.\n const path = typeof matchPath === \"string\" ? matchPath.trim() : \"\";\n const wanted = typeof matchValue === \"string\" ? matchValue.trim() : \"\";\n if ((path === \"\") !== (wanted === \"\")) {\n throw new Error(\n 'document-find: \"State field\" and \"State value\" are set together or not at all',\n );\n }\n // Neither the name nor the state filter is an index query, so either one\n // has to see more rows than the step will keep; without one, ask for\n // exactly the page wanted rather than a default page per model.\n const needle = typeof name === \"string\" ? name.trim().toLowerCase() : \"\";\n const filtered = needle !== \"\" || path !== \"\";\n const found = await reactorOf(ctx).find({\n ...(documentType ? { documentType } : {}),\n ...(parentId ? { parentId } : {}),\n ...(filtered ? {} : { limit: capped }),\n ...(path ? { match: { path, value: wanted } } : {}),\n ...(includeState === true ? { withState: true } : {}),\n });\n const documents = found\n .filter(\n (document) => !needle || document.name.toLowerCase().includes(needle),\n )\n .slice(0, capped);\n return { count: documents.length, documents };\n },\n});\n","import { createAction, reactorOf } from \"@powerhousedao/pieces-framework\";\nimport { resolveDocumentId } from \"../parse.js\";\nimport { documentIdProp, documentTypeProp } from \"../reactor.js\";\n\nexport const documentGetAction = createAction({\n name: \"document-get\",\n displayName: \"Get document\",\n description: \"Reads a document's current state.\",\n requireAuth: false,\n props: {\n documentId: documentIdProp(\n \"Document id\",\n true,\n \"e.g. {{steps.find.output.documents.0.documentId}}\",\n ),\n documentType: documentTypeProp(\n \"Document type\",\n false,\n \"Design-time hint when the document id is an expression\",\n ),\n },\n run: async (ctx) => {\n const documentId = resolveDocumentId(ctx.propsValue.documentId);\n if (!documentId) {\n throw new Error('document-get: \"documentId\" is required');\n }\n return reactorOf(ctx).get({ documentId });\n },\n});\n","import { createAction, reactorOf } from \"@powerhousedao/pieces-framework\";\nimport { resolveDocumentId } from \"../parse.js\";\nimport {\n actionTypeProp,\n documentIdProp,\n documentTypeProp,\n} from \"../reactor.js\";\n\nexport const documentSchemaAction = createAction({\n name: \"document-schema\",\n displayName: \"Get document schema\",\n description: \"Action and state schemas of a document type.\",\n requireAuth: false,\n props: {\n documentType: documentTypeProp(\n \"Document type\",\n false,\n \"Required unless a document id is given\",\n ),\n documentId: documentIdProp(\n \"Document id\",\n false,\n \"Resolves the type from this document instead\",\n ),\n actionType: actionTypeProp(\n \"Only this action\",\n false,\n \"Omit to list every action\",\n ),\n },\n run: async (ctx) => {\n const reactor = reactorOf(ctx);\n const { actionType } = ctx.propsValue;\n let documentType =\n typeof ctx.propsValue.documentType === \"string\"\n ? ctx.propsValue.documentType\n : \"\";\n // A document id is accepted in place of a type, for expression-fed steps.\n const fromId = resolveDocumentId(ctx.propsValue.documentId);\n if (!documentType && fromId) {\n documentType = (await reactor.get({ documentId: fromId })).documentType;\n }\n if (!documentType) {\n throw new Error('document-schema: \"documentType\" is required');\n }\n const model = await reactor.model(documentType);\n return {\n documentType: model.documentType,\n name: model.name,\n stateSchema: model.stateSchema,\n actions: actionType\n ? model.actions.filter((action) => action.type === actionType)\n : model.actions,\n };\n },\n});\n","import { createAction, reactorOf } from \"@powerhousedao/pieces-framework\";\n\nexport const documentTypesAction = createAction({\n name: \"document-types\",\n displayName: \"List document types\",\n description: \"Document models installed on this reactor.\",\n requireAuth: false,\n props: {},\n run: async (ctx) => {\n const types = await reactorOf(ctx).models();\n return { count: types.length, types };\n },\n});\n","// The three document triggers the reactor feeds.\n\n// Their hooks are never called: matching an operation against a filter is the\n// host's, because the processor sees every operation in the reactor and an IPC\n// round trip per operation would sit on that path. The piece declares them so\n// the editor reads their props and payload shape from the same place it reads\n// every other block's.\nimport {\n createTrigger,\n TriggerStrategy,\n} from \"@powerhousedao/pieces-framework\";\nimport {\n actionTypeProp,\n documentIdProp,\n documentTypeProp,\n driveProp,\n} from \"../reactor.js\";\n\n// A hook that runs would mean the host stopped feeding this trigger, which is\n// a bug in the host rather than something a piece can answer.\nfunction hostFed(name: string): () => Promise<never> {\n return () =>\n Promise.reject(\n new Error(`The \"${name}\" trigger is fired by the reactor, not polled`),\n );\n}\n\nconst OPERATION_SAMPLE = {\n documentId: \"01234567-89ab-cdef-0123-456789abcdef\",\n documentType: \"powerhouse/workflow\",\n branch: \"main\",\n scope: \"global\",\n action: { type: \"SET_NAME\", input: { name: \"Invoice\" } },\n operation: { index: 7, timestampUtcMs: \"1757500000000\" },\n};\n\nconst LIFECYCLE_SAMPLE = {\n documentId: \"01234567-89ab-cdef-0123-456789abcdef\",\n documentType: \"powerhouse/workflow\",\n name: \"Invoice\",\n driveId: \"fedcba98-7654-3210-fedc-ba9876543210\",\n parentId: null,\n operation: { index: 0, timestampUtcMs: \"1757500000000\" },\n};\n\nexport const documentEventTrigger = createTrigger({\n name: \"document-event\",\n displayName: \"Document event\",\n description: \"Fires when a matching document operation lands.\",\n type: TriggerStrategy.POLLING,\n requireAuth: false,\n props: {\n documentType: documentTypeProp(\n \"Document type\",\n false,\n \"e.g. powerhouse/connection\",\n ),\n documentId: documentIdProp(\n \"Document id\",\n false,\n \"Omit to match any document\",\n ),\n actionType: actionTypeProp(\n \"Action type\",\n false,\n \"Omit to match any action\",\n ),\n },\n sampleData: OPERATION_SAMPLE,\n onEnable: hostFed(\"document-event\"),\n onDisable: hostFed(\"document-event\"),\n run: hostFed(\"document-event\"),\n});\n\nexport const documentCreatedTrigger = createTrigger({\n name: \"document-created\",\n displayName: \"Document created\",\n description: \"Fires when a document is added to a drive.\",\n type: TriggerStrategy.POLLING,\n requireAuth: false,\n props: {\n documentType: documentTypeProp(\n \"Document type\",\n false,\n \"Type of the created document; omit to match any\",\n ),\n driveId: driveProp(\n \"Drive\",\n \"Omit to match documents outside every drive too\",\n ),\n },\n sampleData: LIFECYCLE_SAMPLE,\n onEnable: hostFed(\"document-created\"),\n onDisable: hostFed(\"document-created\"),\n run: hostFed(\"document-created\"),\n});\n\nexport const documentDeletedTrigger = createTrigger({\n name: \"document-deleted\",\n displayName: \"Document deleted\",\n description: \"Fires when a document is removed from a drive.\",\n type: TriggerStrategy.POLLING,\n requireAuth: false,\n props: {\n documentType: documentTypeProp(\n \"Document type\",\n false,\n \"Type of the deleted document; omit to match any\",\n ),\n driveId: driveProp(\n \"Drive\",\n \"Omit to match documents outside every drive too\",\n ),\n },\n sampleData: LIFECYCLE_SAMPLE,\n onEnable: hostFed(\"document-deleted\"),\n onDisable: hostFed(\"document-deleted\"),\n run: hostFed(\"document-deleted\"),\n});\n","// The Powerhouse reactor piece: documents and document models as workflow\n// blocks, for the reactor the workflow itself runs in.\n\n// It reaches the reactor through ctx.reactor, which the host serves over the\n// worker's call channel — piece code never holds a reactor client, and a copy\n// of this piece fetched from a registry would find the member throwing.\nimport { createPiece } from \"@powerhousedao/pieces-framework\";\nimport { POWERHOUSE_LOGO } from \"./lib/logo.js\";\nimport { documentCreateAction } from \"./lib/actions/document-create.js\";\nimport { documentDispatchAction } from \"./lib/actions/document-dispatch.js\";\nimport { documentFindAction } from \"./lib/actions/document-find.js\";\nimport { documentGetAction } from \"./lib/actions/document-get.js\";\nimport { documentSchemaAction } from \"./lib/actions/document-schema.js\";\nimport { documentTypesAction } from \"./lib/actions/document-types.js\";\nimport {\n documentCreatedTrigger,\n documentDeletedTrigger,\n documentEventTrigger,\n} from \"./lib/triggers/document-event.js\";\n\nexport const reactor = createPiece({\n displayName: \"Powerhouse Reactor\",\n description:\n \"Read and write Powerhouse documents on the reactor this workflow runs in: create documents, dispatch actions, read state and schemas, and fire on document events.\",\n logoUrl: POWERHOUSE_LOGO,\n authors: [\"powerhouse\"],\n // The reactor is reached through the host, not over a connection.\n auth: undefined,\n actions: [\n documentCreateAction,\n documentDispatchAction,\n documentGetAction,\n documentFindAction,\n documentSchemaAction,\n documentTypesAction,\n ],\n triggers: [\n documentEventTrigger,\n documentCreatedTrigger,\n documentDeletedTrigger,\n ],\n});\n\nexport default reactor;\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,14],"mappings":";AACqB,OAAO,OAAO,EAC/B,QAAQ,UACZ,CAAC;AACD,SAAyC,aAAa,MAAM,aAAa,QAAQ;CAC7E,SAAS,KAAK,MAAM,KAAK;EACrB,IAAI,CAAC,KAAK,MACN,OAAO,eAAe,MAAM,QAAQ;GAChC,OAAO;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index.mjs","names":["F","util.jsonStringifyReplacer","core.$ZodAsyncError","util.finalizeIssue","core.config","parse","errors.$ZodRealError","errors.$ZodError","string","number","boolean","util.nullish","util.getLengthableOrigin","util.aborted","core.$ZodAsyncError","regexes.string","regexes.number","regexes.boolean","util.prefixIssues","util.optionalKeys","util.cached","isObject","util.isObject","util.finalizeIssue","core.config","util.cleanRegex","util.isPlainObject","util.getEnumValues","util.escapeRegex","core.$ZodEncodeError","util.issue","util.normalizeParams","_void","checks.$ZodCheckMinLength","checks.$ZodCheckRegex","parse.parse","parse.safeParse","parse.parseAsync","parse.safeParseAsync","core.clone","core._string","core._url","number","core._number","core._boolean","core._any","core._unknown","core._void","util.normalizeParams","core._custom","core._coercedNumber","schemas.ZodMiniNumber","z.object","z.string","z.optional","z.boolean","z.enum","z.literal","z.any","z.unknown","z.array","z.number","z.void","z.object","z.optional","z.boolean","z.unknown","z.array","z.string","z.union","z.record","z.object","z.enum","z.optional","z.string","z.boolean","z.record","z.union","z.unknown","z.array","z.literal","z.any","z.object","z.optional","z.number","z.unknown","z.record","z.string","z.literal","z.enum","z.regex","z.pipe","z.transform","z.nullable","z.array","z.minLength","z.discriminatedUnion","z.url","z.union","z.boolean","z.coerce.number","z.custom","Kind","parse","GraphQLError","isRecord","preview","BLOCK","BLOCK","BLOCK"],"sources":["../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/schemas.js","../../../../../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/mini/coerce.js","../../../../../pieces-framework/dist/markdown-property-DMfHjEiL.js","../../../../../pieces-framework/dist/input-BHkj_oP5.js","../../../../../pieces-framework/dist/authentication-o-4CdAPR.js","../../../../../../node_modules/.pnpm/nanoid@3.3.17/node_modules/nanoid/index.js","../../../../../pieces-framework/dist/index.js","../../../../pieces/reactor/lib/logo.ts","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/version.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/devAssert.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/isPromise.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/isObjectLike.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/invariant.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/location.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/printLocation.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/error/GraphQLError.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/error/syntaxError.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/ast.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/directiveLocation.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/kinds.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/characterClasses.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/blockString.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/tokenKind.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/lexer.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/schemaCoordinateLexer.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/inspect.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/instanceOf.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/source.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/parser.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/didYouMean.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/identityFunc.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/keyMap.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/keyValMap.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/mapValue.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/naturalCompare.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/suggestionList.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/toObjMap.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/printString.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/visitor.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/printer.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/valueFromASTUntyped.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/type/assertName.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/type/definition.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/typeComparators.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/type/scalars.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/type/directives.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/isIterableObject.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/astFromValue.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/type/introspection.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/type/schema.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/type/validate.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/typeFromAST.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/TypeInfo.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/predicates.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/ExecutableDefinitionsRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/FieldsOnCorrectTypeRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/FragmentsOnCompositeTypesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/KnownArgumentNamesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/KnownDirectivesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/KnownFragmentNamesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/KnownTypeNamesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/LoneAnonymousOperationRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/LoneSchemaDefinitionRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/MaxIntrospectionDepthRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/NoFragmentCyclesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/NoUndefinedVariablesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/NoUnusedFragmentsRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/NoUnusedVariablesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/sortValueNode.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/OverlappingFieldsCanBeMergedRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/PossibleFragmentSpreadsRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/PossibleTypeExtensionsRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/ProvidedRequiredArgumentsRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/ScalarLeafsRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/printPathArray.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/Path.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/coerceInputValue.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/valueFromAST.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/execution/values.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/execution/collectFields.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/SingleFieldSubscriptionsRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/groupBy.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/UniqueArgumentDefinitionNamesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/UniqueArgumentNamesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/UniqueDirectiveNamesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/UniqueDirectivesPerLocationRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/UniqueEnumValueNamesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/UniqueFieldDefinitionNamesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/UniqueFragmentNamesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/UniqueInputFieldNamesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/UniqueOperationNamesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/UniqueOperationTypesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/UniqueTypeNamesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/UniqueVariableNamesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/ValuesOfCorrectTypeRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/VariablesAreInputTypesRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/VariablesInAllowedPositionRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/specifiedRules.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/ValidationContext.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/validate.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/memoize3.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/promiseForObject.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/promiseReduce.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/toError.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/error/locatedError.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/execution/execute.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/graphql.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/type/index.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/language/index.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/jsutils/isAsyncIterable.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/execution/mapAsyncIterator.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/execution/subscribe.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/execution/index.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/custom/NoDeprecatedCustomRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/rules/custom/NoSchemaIntrospectionCustomRule.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/validation/index.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/error/index.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/getIntrospectionQuery.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/getOperationAST.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/getOperationRootType.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/introspectionFromSchema.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/buildClientSchema.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/extendSchema.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/buildASTSchema.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/lexicographicSortSchema.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/printSchema.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/concatAST.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/separateOperations.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/stripIgnoredCharacters.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/assertValidName.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/findBreakingChanges.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/resolveSchemaCoordinate.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/utilities/index.js","../../../../../../node_modules/.pnpm/graphql@16.12.0/node_modules/graphql/index.js","../../../../pieces/reactor/lib/input-schema.ts","../../../../pieces/reactor/lib/input-props.ts","../../../../pieces/reactor/lib/parse.ts","../../../../pieces/reactor/lib/schema-text.ts","../../../../pieces/reactor/lib/reactor.ts","../../../../pieces/reactor/lib/actions/document-create.ts","../../../../pieces/reactor/lib/actions/document-dispatch.ts","../../../../pieces/reactor/lib/actions/document-find.ts","../../../../pieces/reactor/lib/actions/document-get.ts","../../../../pieces/reactor/lib/actions/document-schema.ts","../../../../pieces/reactor/lib/actions/document-types.ts","../../../../pieces/reactor/lib/triggers/document-event.ts","../../../../pieces/reactor/index.ts"],"sourcesContent":["/** A special constant with type `never` */\nexport const NEVER = Object.freeze({\n status: \"aborted\",\n});\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, params) {\n function init(inst, def) {\n if (!inst._zod) {\n Object.defineProperty(inst, \"_zod\", {\n value: {\n def,\n constr: _,\n traits: new Set(),\n },\n enumerable: false,\n });\n }\n if (inst._zod.traits.has(name)) {\n return;\n }\n inst._zod.traits.add(name);\n initializer(inst, def);\n // support prototype modifications\n const proto = _.prototype;\n const keys = Object.keys(proto);\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n if (!(k in inst)) {\n inst[k] = proto[k].bind(inst);\n }\n }\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n var _a;\n const inst = params?.Parent ? new Definition() : this;\n init(inst, def);\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n for (const fn of inst._zod.deferred) {\n fn();\n }\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport class $ZodEncodeError extends Error {\n constructor(name) {\n super(`Encountered unidirectional transform during encode: ${name}`);\n this.name = \"ZodEncodeError\";\n }\n}\nexport const globalConfig = {};\nexport function config(newConfig) {\n if (newConfig)\n Object.assign(globalConfig, newConfig);\n return globalConfig;\n}\n","// functions\nexport function assertEqual(val) {\n return val;\n}\nexport function assertNotEqual(val) {\n return val;\n}\nexport function assertIs(_arg) { }\nexport function assertNever(_x) {\n throw new Error(\"Unexpected value in exhaustive check\");\n}\nexport function assert(_) { }\nexport function getEnumValues(entries) {\n const numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n const values = Object.entries(entries)\n .filter(([k, _]) => numericValues.indexOf(+k) === -1)\n .map(([_, v]) => v);\n return values;\n}\nexport function joinValues(array, separator = \"|\") {\n return array.map((val) => stringifyPrimitive(val)).join(separator);\n}\nexport function jsonStringifyReplacer(_, value) {\n if (typeof value === \"bigint\")\n return value.toString();\n return value;\n}\nexport function cached(getter) {\n const set = false;\n return {\n get value() {\n if (!set) {\n const value = getter();\n Object.defineProperty(this, \"value\", { value });\n return value;\n }\n throw new Error(\"cached value already set\");\n },\n };\n}\nexport function nullish(input) {\n return input === null || input === undefined;\n}\nexport function cleanRegex(source) {\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n return source.slice(start, end);\n}\nexport function floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepString = step.toString();\n let stepDecCount = (stepString.split(\".\")[1] || \"\").length;\n if (stepDecCount === 0 && /\\d?e-\\d?/.test(stepString)) {\n const match = stepString.match(/\\d?e-(\\d?)/);\n if (match?.[1]) {\n stepDecCount = Number.parseInt(match[1]);\n }\n }\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / 10 ** decCount;\n}\nconst EVALUATING = Symbol(\"evaluating\");\nexport function defineLazy(object, key, getter) {\n let value = undefined;\n Object.defineProperty(object, key, {\n get() {\n if (value === EVALUATING) {\n // Circular reference detected, return undefined to break the cycle\n return undefined;\n }\n if (value === undefined) {\n value = EVALUATING;\n value = getter();\n }\n return value;\n },\n set(v) {\n Object.defineProperty(object, key, {\n value: v,\n // configurable: true,\n });\n // object[key] = v;\n },\n configurable: true,\n });\n}\nexport function objectClone(obj) {\n return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n}\nexport function assignProp(target, prop, value) {\n Object.defineProperty(target, prop, {\n value,\n writable: true,\n enumerable: true,\n configurable: true,\n });\n}\nexport function mergeDefs(...defs) {\n const mergedDescriptors = {};\n for (const def of defs) {\n const descriptors = Object.getOwnPropertyDescriptors(def);\n Object.assign(mergedDescriptors, descriptors);\n }\n return Object.defineProperties({}, mergedDescriptors);\n}\nexport function cloneDef(schema) {\n return mergeDefs(schema._zod.def);\n}\nexport function getElementAtPath(obj, path) {\n if (!path)\n return obj;\n return path.reduce((acc, key) => acc?.[key], obj);\n}\nexport function promiseAllObject(promisesObj) {\n const keys = Object.keys(promisesObj);\n const promises = keys.map((key) => promisesObj[key]);\n return Promise.all(promises).then((results) => {\n const resolvedObj = {};\n for (let i = 0; i < keys.length; i++) {\n resolvedObj[keys[i]] = results[i];\n }\n return resolvedObj;\n });\n}\nexport function randomString(length = 10) {\n const chars = \"abcdefghijklmnopqrstuvwxyz\";\n let str = \"\";\n for (let i = 0; i < length; i++) {\n str += chars[Math.floor(Math.random() * chars.length)];\n }\n return str;\n}\nexport function esc(str) {\n return JSON.stringify(str);\n}\nexport function slugify(input) {\n return input\n .toLowerCase()\n .trim()\n .replace(/[^\\w\\s-]/g, \"\")\n .replace(/[\\s_-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\");\n}\nexport const captureStackTrace = (\"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => { });\nexport function isObject(data) {\n return typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nexport const allowsEval = cached(() => {\n // @ts-ignore\n if (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) {\n return false;\n }\n try {\n const F = Function;\n new F(\"\");\n return true;\n }\n catch (_) {\n return false;\n }\n});\nexport function isPlainObject(o) {\n if (isObject(o) === false)\n return false;\n // modified constructor\n const ctor = o.constructor;\n if (ctor === undefined)\n return true;\n if (typeof ctor !== \"function\")\n return true;\n // modified prototype\n const prot = ctor.prototype;\n if (isObject(prot) === false)\n return false;\n // ctor doesn't have static `isPrototypeOf`\n if (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) {\n return false;\n }\n return true;\n}\nexport function shallowClone(o) {\n if (isPlainObject(o))\n return { ...o };\n if (Array.isArray(o))\n return [...o];\n return o;\n}\nexport function numKeys(data) {\n let keyCount = 0;\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n keyCount++;\n }\n }\n return keyCount;\n}\nexport const getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return \"undefined\";\n case \"string\":\n return \"string\";\n case \"number\":\n return Number.isNaN(data) ? \"nan\" : \"number\";\n case \"boolean\":\n return \"boolean\";\n case \"function\":\n return \"function\";\n case \"bigint\":\n return \"bigint\";\n case \"symbol\":\n return \"symbol\";\n case \"object\":\n if (Array.isArray(data)) {\n return \"array\";\n }\n if (data === null) {\n return \"null\";\n }\n if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n return \"promise\";\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return \"map\";\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return \"set\";\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return \"date\";\n }\n // @ts-ignore\n if (typeof File !== \"undefined\" && data instanceof File) {\n return \"file\";\n }\n return \"object\";\n default:\n throw new Error(`Unknown data type: ${t}`);\n }\n};\nexport const propertyKeyTypes = new Set([\"string\", \"number\", \"symbol\"]);\nexport const primitiveTypes = new Set([\"string\", \"number\", \"bigint\", \"boolean\", \"symbol\", \"undefined\"]);\nexport function escapeRegex(str) {\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n// zod-specific utils\nexport function clone(inst, def, params) {\n const cl = new inst._zod.constr(def ?? inst._zod.def);\n if (!def || params?.parent)\n cl._zod.parent = inst;\n return cl;\n}\nexport function normalizeParams(_params) {\n const params = _params;\n if (!params)\n return {};\n if (typeof params === \"string\")\n return { error: () => params };\n if (params?.message !== undefined) {\n if (params?.error !== undefined)\n throw new Error(\"Cannot specify both `message` and `error` params\");\n params.error = params.message;\n }\n delete params.message;\n if (typeof params.error === \"string\")\n return { ...params, error: () => params.error };\n return params;\n}\nexport function createTransparentProxy(getter) {\n let target;\n return new Proxy({}, {\n get(_, prop, receiver) {\n target ?? (target = getter());\n return Reflect.get(target, prop, receiver);\n },\n set(_, prop, value, receiver) {\n target ?? (target = getter());\n return Reflect.set(target, prop, value, receiver);\n },\n has(_, prop) {\n target ?? (target = getter());\n return Reflect.has(target, prop);\n },\n deleteProperty(_, prop) {\n target ?? (target = getter());\n return Reflect.deleteProperty(target, prop);\n },\n ownKeys(_) {\n target ?? (target = getter());\n return Reflect.ownKeys(target);\n },\n getOwnPropertyDescriptor(_, prop) {\n target ?? (target = getter());\n return Reflect.getOwnPropertyDescriptor(target, prop);\n },\n defineProperty(_, prop, descriptor) {\n target ?? (target = getter());\n return Reflect.defineProperty(target, prop, descriptor);\n },\n });\n}\nexport function stringifyPrimitive(value) {\n if (typeof value === \"bigint\")\n return value.toString() + \"n\";\n if (typeof value === \"string\")\n return `\"${value}\"`;\n return `${value}`;\n}\nexport function optionalKeys(shape) {\n return Object.keys(shape).filter((k) => {\n return shape[k]._zod.optin === \"optional\" && shape[k]._zod.optout === \"optional\";\n });\n}\nexport const NUMBER_FORMAT_RANGES = {\n safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n int32: [-2147483648, 2147483647],\n uint32: [0, 4294967295],\n float32: [-3.4028234663852886e38, 3.4028234663852886e38],\n float64: [-Number.MAX_VALUE, Number.MAX_VALUE],\n};\nexport const BIGINT_FORMAT_RANGES = {\n int64: [/* @__PURE__*/ BigInt(\"-9223372036854775808\"), /* @__PURE__*/ BigInt(\"9223372036854775807\")],\n uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt(\"18446744073709551615\")],\n};\nexport function pick(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = {};\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n newShape[key] = currDef.shape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function omit(schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const newShape = { ...schema._zod.def.shape };\n for (const key in mask) {\n if (!(key in currDef.shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n delete newShape[key];\n }\n assignProp(this, \"shape\", newShape); // self-caching\n return newShape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function extend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to extend: expected a plain object\");\n }\n const checks = schema._zod.def.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n // Only throw if new shape overlaps with existing shape\n // Use getOwnPropertyDescriptor to check key existence without accessing values\n const existingShape = schema._zod.def.shape;\n for (const key in shape) {\n if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {\n throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n }\n }\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function safeExtend(schema, shape) {\n if (!isPlainObject(shape)) {\n throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const _shape = { ...schema._zod.def.shape, ...shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n });\n return clone(schema, def);\n}\nexport function merge(a, b) {\n const def = mergeDefs(a._zod.def, {\n get shape() {\n const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };\n assignProp(this, \"shape\", _shape); // self-caching\n return _shape;\n },\n get catchall() {\n return b._zod.def.catchall;\n },\n checks: [], // delete existing checks\n });\n return clone(a, def);\n}\nexport function partial(Class, schema, mask) {\n const currDef = schema._zod.def;\n const checks = currDef.checks;\n const hasChecks = checks && checks.length > 0;\n if (hasChecks) {\n throw new Error(\".partial() cannot be used on object schemas containing refinements\");\n }\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in oldShape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n else {\n for (const key in oldShape) {\n // if (oldShape[key]!._zod.optin === \"optional\") continue;\n shape[key] = Class\n ? new Class({\n type: \"optional\",\n innerType: oldShape[key],\n })\n : oldShape[key];\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n checks: [],\n });\n return clone(schema, def);\n}\nexport function required(Class, schema, mask) {\n const def = mergeDefs(schema._zod.def, {\n get shape() {\n const oldShape = schema._zod.def.shape;\n const shape = { ...oldShape };\n if (mask) {\n for (const key in mask) {\n if (!(key in shape)) {\n throw new Error(`Unrecognized key: \"${key}\"`);\n }\n if (!mask[key])\n continue;\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n else {\n for (const key in oldShape) {\n // overwrite with non-optional\n shape[key] = new Class({\n type: \"nonoptional\",\n innerType: oldShape[key],\n });\n }\n }\n assignProp(this, \"shape\", shape); // self-caching\n return shape;\n },\n });\n return clone(schema, def);\n}\n// invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom\nexport function aborted(x, startIndex = 0) {\n if (x.aborted === true)\n return true;\n for (let i = startIndex; i < x.issues.length; i++) {\n if (x.issues[i]?.continue !== true) {\n return true;\n }\n }\n return false;\n}\nexport function prefixIssues(path, issues) {\n return issues.map((iss) => {\n var _a;\n (_a = iss).path ?? (_a.path = []);\n iss.path.unshift(path);\n return iss;\n });\n}\nexport function unwrapMessage(message) {\n return typeof message === \"string\" ? message : message?.message;\n}\nexport function finalizeIssue(iss, ctx, config) {\n const full = { ...iss, path: iss.path ?? [] };\n // for backwards compatibility\n if (!iss.message) {\n const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??\n unwrapMessage(ctx?.error?.(iss)) ??\n unwrapMessage(config.customError?.(iss)) ??\n unwrapMessage(config.localeError?.(iss)) ??\n \"Invalid input\";\n full.message = message;\n }\n // delete (full as any).def;\n delete full.inst;\n delete full.continue;\n if (!ctx?.reportInput) {\n delete full.input;\n }\n return full;\n}\nexport function getSizableOrigin(input) {\n if (input instanceof Set)\n return \"set\";\n if (input instanceof Map)\n return \"map\";\n // @ts-ignore\n if (input instanceof File)\n return \"file\";\n return \"unknown\";\n}\nexport function getLengthableOrigin(input) {\n if (Array.isArray(input))\n return \"array\";\n if (typeof input === \"string\")\n return \"string\";\n return \"unknown\";\n}\nexport function parsedType(data) {\n const t = typeof data;\n switch (t) {\n case \"number\": {\n return Number.isNaN(data) ? \"nan\" : \"number\";\n }\n case \"object\": {\n if (data === null) {\n return \"null\";\n }\n if (Array.isArray(data)) {\n return \"array\";\n }\n const obj = data;\n if (obj && Object.getPrototypeOf(obj) !== Object.prototype && \"constructor\" in obj && obj.constructor) {\n return obj.constructor.name;\n }\n }\n }\n return t;\n}\nexport function issue(...args) {\n const [iss, input, inst] = args;\n if (typeof iss === \"string\") {\n return {\n message: iss,\n code: \"custom\",\n input,\n inst,\n };\n }\n return { ...iss };\n}\nexport function cleanEnum(obj) {\n return Object.entries(obj)\n .filter(([k, _]) => {\n // return true if NaN, meaning it's not a number, thus a string key\n return Number.isNaN(Number.parseInt(k, 10));\n })\n .map((el) => el[1]);\n}\n// Codec utility functions\nexport function base64ToUint8Array(base64) {\n const binaryString = atob(base64);\n const bytes = new Uint8Array(binaryString.length);\n for (let i = 0; i < binaryString.length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes;\n}\nexport function uint8ArrayToBase64(bytes) {\n let binaryString = \"\";\n for (let i = 0; i < bytes.length; i++) {\n binaryString += String.fromCharCode(bytes[i]);\n }\n return btoa(binaryString);\n}\nexport function base64urlToUint8Array(base64url) {\n const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const padding = \"=\".repeat((4 - (base64.length % 4)) % 4);\n return base64ToUint8Array(base64 + padding);\n}\nexport function uint8ArrayToBase64url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\nexport function hexToUint8Array(hex) {\n const cleanHex = hex.replace(/^0x/, \"\");\n if (cleanHex.length % 2 !== 0) {\n throw new Error(\"Invalid hex string length\");\n }\n const bytes = new Uint8Array(cleanHex.length / 2);\n for (let i = 0; i < cleanHex.length; i += 2) {\n bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);\n }\n return bytes;\n}\nexport function uint8ArrayToHex(bytes) {\n return Array.from(bytes)\n .map((b) => b.toString(16).padStart(2, \"0\"))\n .join(\"\");\n}\n// instanceof\nexport class Class {\n constructor(..._args) { }\n}\n","import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod,\n enumerable: false,\n });\n Object.defineProperty(inst, \"issues\", {\n value: def,\n enumerable: false,\n });\n inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);\n Object.defineProperty(inst, \"toString\", {\n value: () => inst.message,\n enumerable: false,\n });\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, { Parent: Error });\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues });\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues });\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a, _b;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, issue.path));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_b = curr.items)[el] ?? (_b[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`✖ ${issue.message}`);\n if (issue.path?.length)\n lines.push(` → at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n","import * as core from \"./core.js\";\nimport * as errors from \"./errors.js\";\nimport * as util from \"./util.js\";\nexport const _parse = (_Err) => (schema, value, _ctx, _params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n if (result.issues.length) {\n const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, _params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parse = /* @__PURE__*/ _parse(errors.$ZodRealError);\nexport const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n if (result.issues.length) {\n const e = new (params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n util.captureStackTrace(e, params?.callee);\n throw e;\n }\n return result.value;\n};\nexport const parseAsync = /* @__PURE__*/ _parseAsync(errors.$ZodRealError);\nexport const _safeParse = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n const result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n return result.issues.length\n ? {\n success: false,\n error: new (_Err ?? errors.$ZodError)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);\nexport const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };\n let result = schema._zod.run({ value, issues: [] }, ctx);\n if (result instanceof Promise)\n result = await result;\n return result.issues.length\n ? {\n success: false,\n error: new _Err(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n }\n : { success: true, data: result.value };\n};\nexport const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);\nexport const _encode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _parse(_Err)(schema, value, ctx);\n};\nexport const encode = /* @__PURE__*/ _encode(errors.$ZodRealError);\nexport const _decode = (_Err) => (schema, value, _ctx) => {\n return _parse(_Err)(schema, value, _ctx);\n};\nexport const decode = /* @__PURE__*/ _decode(errors.$ZodRealError);\nexport const _encodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _parseAsync(_Err)(schema, value, ctx);\n};\nexport const encodeAsync = /* @__PURE__*/ _encodeAsync(errors.$ZodRealError);\nexport const _decodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _parseAsync(_Err)(schema, value, _ctx);\n};\nexport const decodeAsync = /* @__PURE__*/ _decodeAsync(errors.$ZodRealError);\nexport const _safeEncode = (_Err) => (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _safeParse(_Err)(schema, value, ctx);\n};\nexport const safeEncode = /* @__PURE__*/ _safeEncode(errors.$ZodRealError);\nexport const _safeDecode = (_Err) => (schema, value, _ctx) => {\n return _safeParse(_Err)(schema, value, _ctx);\n};\nexport const safeDecode = /* @__PURE__*/ _safeDecode(errors.$ZodRealError);\nexport const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {\n const ctx = _ctx ? Object.assign(_ctx, { direction: \"backward\" }) : { direction: \"backward\" };\n return _safeParseAsync(_Err)(schema, value, ctx);\n};\nexport const safeEncodeAsync = /* @__PURE__*/ _safeEncodeAsync(errors.$ZodRealError);\nexport const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {\n return _safeParseAsync(_Err)(schema, value, _ctx);\n};\nexport const safeDecodeAsync = /* @__PURE__*/ _safeDecodeAsync(errors.$ZodRealError);\n","import * as util from \"./util.js\";\nexport const cuid = /^[cC][^\\s-]{8,}$/;\nexport const cuid2 = /^[0-9a-z]+$/;\nexport const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;\nexport const xid = /^[0-9a-vA-V]{20}$/;\nexport const ksuid = /^[A-Za-z0-9]{27}$/;\nexport const nanoid = /^[a-zA-Z0-9_-]{21}$/;\n/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */\nexport const duration = /^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;\n/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */\nexport const extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\\d+Y)|(?:[-+]?\\d+[.,]\\d+Y$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:(?:[-+]?\\d+W)|(?:[-+]?\\d+[.,]\\d+W$))?(?:(?:[-+]?\\d+D)|(?:[-+]?\\d+[.,]\\d+D$))?(?:T(?=[\\d+-])(?:(?:[-+]?\\d+H)|(?:[-+]?\\d+[.,]\\d+H$))?(?:(?:[-+]?\\d+M)|(?:[-+]?\\d+[.,]\\d+M$))?(?:[-+]?\\d+(?:[.,]\\d+)?S)?)??$/;\n/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */\nexport const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;\n/** Returns a regex for validating an RFC 9562/4122 UUID.\n *\n * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */\nexport const uuid = (version) => {\n if (!version)\n return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;\n return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);\n};\nexport const uuid4 = /*@__PURE__*/ uuid(4);\nexport const uuid6 = /*@__PURE__*/ uuid(6);\nexport const uuid7 = /*@__PURE__*/ uuid(7);\n/** Practical email validation */\nexport const email = /^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;\n/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */\nexport const html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n/** The classic emailregex.com regex for RFC 5322-compliant emails */\nexport const rfc5322Email = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */\nexport const unicodeEmail = /^[^\\s@\"]{1,64}@[^\\s@]{1,255}$/u;\nexport const idnEmail = unicodeEmail;\nexport const browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emoji = `^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$`;\nexport function emoji() {\n return new RegExp(_emoji, \"u\");\n}\nexport const ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;\nexport const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;\nexport const mac = (delimiter) => {\n const escapedDelim = util.escapeRegex(delimiter ?? \":\");\n return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);\n};\nexport const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\/([0-9]|[1-2][0-9]|3[0-2])$/;\nexport const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nexport const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;\nexport const base64url = /^[A-Za-z0-9_-]*$/;\n// based on https://stackoverflow.com/questions/106179/regular-expression-to-match-dns-hostname-or-ip-address\n// export const hostname: RegExp = /^([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+$/;\nexport const hostname = /^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/;\nexport const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,}$/;\n// https://blog.stevenlevithan.com/archives/validate-phone-number#r4-3 (regex sans spaces)\n// E.164: leading digit must be 1-9; total digits (excluding '+') between 7-15\nexport const e164 = /^\\+[1-9]\\d{6,14}$/;\n// const dateSource = `((\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\\\d|30)|(02)-(0[1-9]|1\\\\d|2[0-8])))`;\nconst dateSource = `(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))`;\nexport const date = /*@__PURE__*/ new RegExp(`^${dateSource}$`);\nfunction timeSource(args) {\n const hhmm = `(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;\n const regex = typeof args.precision === \"number\"\n ? args.precision === -1\n ? `${hhmm}`\n : args.precision === 0\n ? `${hhmm}:[0-5]\\\\d`\n : `${hhmm}:[0-5]\\\\d\\\\.\\\\d{${args.precision}}`\n : `${hhmm}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`;\n return regex;\n}\nexport function time(args) {\n return new RegExp(`^${timeSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nexport function datetime(args) {\n const time = timeSource({ precision: args.precision });\n const opts = [\"Z\"];\n if (args.local)\n opts.push(\"\");\n // if (args.offset) opts.push(`([+-]\\\\d{2}:\\\\d{2})`);\n if (args.offset)\n opts.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);\n const timeRegex = `${time}(?:${opts.join(\"|\")})`;\n return new RegExp(`^${dateSource}T(?:${timeRegex})$`);\n}\nexport const string = (params) => {\n const regex = params ? `[\\\\s\\\\S]{${params?.minimum ?? 0},${params?.maximum ?? \"\"}}` : `[\\\\s\\\\S]*`;\n return new RegExp(`^${regex}$`);\n};\nexport const bigint = /^-?\\d+n?$/;\nexport const integer = /^-?\\d+$/;\nexport const number = /^-?\\d+(?:\\.\\d+)?$/;\nexport const boolean = /^(?:true|false)$/i;\nconst _null = /^null$/i;\nexport { _null as null };\nconst _undefined = /^undefined$/i;\nexport { _undefined as undefined };\n// regex for string with no uppercase letters\nexport const lowercase = /^[^A-Z]*$/;\n// regex for string with no lowercase letters\nexport const uppercase = /^[^a-z]*$/;\n// regex for hexadecimal strings (any length)\nexport const hex = /^[0-9a-fA-F]*$/;\n// Hash regexes for different algorithms and encodings\n// Helper function to create base64 regex with exact length and padding\nfunction fixedBase64(bodyLength, padding) {\n return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);\n}\n// Helper function to create base64url regex with exact length (no padding)\nfunction fixedBase64url(length) {\n return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);\n}\n// MD5 (16 bytes): base64 = 24 chars total (22 + \"==\")\nexport const md5_hex = /^[0-9a-fA-F]{32}$/;\nexport const md5_base64 = /*@__PURE__*/ fixedBase64(22, \"==\");\nexport const md5_base64url = /*@__PURE__*/ fixedBase64url(22);\n// SHA1 (20 bytes): base64 = 28 chars total (27 + \"=\")\nexport const sha1_hex = /^[0-9a-fA-F]{40}$/;\nexport const sha1_base64 = /*@__PURE__*/ fixedBase64(27, \"=\");\nexport const sha1_base64url = /*@__PURE__*/ fixedBase64url(27);\n// SHA256 (32 bytes): base64 = 44 chars total (43 + \"=\")\nexport const sha256_hex = /^[0-9a-fA-F]{64}$/;\nexport const sha256_base64 = /*@__PURE__*/ fixedBase64(43, \"=\");\nexport const sha256_base64url = /*@__PURE__*/ fixedBase64url(43);\n// SHA384 (48 bytes): base64 = 64 chars total (no padding)\nexport const sha384_hex = /^[0-9a-fA-F]{96}$/;\nexport const sha384_base64 = /*@__PURE__*/ fixedBase64(64, \"\");\nexport const sha384_base64url = /*@__PURE__*/ fixedBase64url(64);\n// SHA512 (64 bytes): base64 = 88 chars total (86 + \"==\")\nexport const sha512_hex = /^[0-9a-fA-F]{128}$/;\nexport const sha512_base64 = /*@__PURE__*/ fixedBase64(86, \"==\");\nexport const sha512_base64url = /*@__PURE__*/ fixedBase64url(86);\n","// import { $ZodType } from \"./schemas.js\";\nimport * as core from \"./core.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nexport const $ZodCheck = /*@__PURE__*/ core.$constructor(\"$ZodCheck\", (inst, def) => {\n var _a;\n inst._zod ?? (inst._zod = {});\n inst._zod.def = def;\n (_a = inst._zod).onattach ?? (_a.onattach = []);\n});\nconst numericOriginMap = {\n number: \"number\",\n bigint: \"bigint\",\n object: \"date\",\n};\nexport const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckLessThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;\n if (def.value < curr) {\n if (def.inclusive)\n bag.maximum = def.value;\n else\n bag.exclusiveMaximum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const origin = numericOriginMap[typeof def.value];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;\n if (def.value > curr) {\n if (def.inclusive)\n bag.minimum = def.value;\n else\n bag.exclusiveMinimum = def.value;\n }\n });\n inst._zod.check = (payload) => {\n if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {\n return;\n }\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n input: payload.value,\n inclusive: def.inclusive,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMultipleOf = \n/*@__PURE__*/ core.$constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n var _a;\n (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);\n });\n inst._zod.check = (payload) => {\n if (typeof payload.value !== typeof def.value)\n throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n const isMultiple = typeof payload.value === \"bigint\"\n ? payload.value % def.value === BigInt(0)\n : util.floatSafeRemainder(payload.value, def.value) === 0;\n if (isMultiple)\n return;\n payload.issues.push({\n origin: typeof payload.value,\n code: \"not_multiple_of\",\n divisor: def.value,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n def.format = def.format || \"float64\";\n const isInt = def.format?.includes(\"int\");\n const origin = isInt ? \"int\" : \"number\";\n const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n if (isInt)\n bag.pattern = regexes.integer;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (isInt) {\n if (!Number.isInteger(input)) {\n // invalid_format issue\n // payload.issues.push({\n // expected: def.format,\n // format: def.format,\n // code: \"invalid_format\",\n // input,\n // inst,\n // });\n // invalid_type issue\n payload.issues.push({\n expected: origin,\n format: def.format,\n code: \"invalid_type\",\n continue: false,\n input,\n inst,\n });\n return;\n // not_multiple_of issue\n // payload.issues.push({\n // code: \"not_multiple_of\",\n // origin: \"number\",\n // input,\n // inst,\n // divisor: 1,\n // });\n }\n if (!Number.isSafeInteger(input)) {\n if (input > 0) {\n // too_big\n payload.issues.push({\n input,\n code: \"too_big\",\n maximum: Number.MAX_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n else {\n // too_small\n payload.issues.push({\n input,\n code: \"too_small\",\n minimum: Number.MIN_SAFE_INTEGER,\n note: \"Integers must be within the safe integer range.\",\n inst,\n origin,\n inclusive: true,\n continue: !def.abort,\n });\n }\n return;\n }\n }\n if (input < minimum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_small\",\n minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"number\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckBigIntFormat\", (inst, def) => {\n $ZodCheck.init(inst, def); // no format checks\n const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n bag.minimum = minimum;\n bag.maximum = maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n if (input < minimum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_small\",\n minimum: minimum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n if (input > maximum) {\n payload.issues.push({\n origin: \"bigint\",\n input,\n code: \"too_big\",\n maximum,\n inclusive: true,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size <= def.maximum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinSize\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size >= def.minimum)\n return;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckSizeEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.size !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.size;\n bag.maximum = def.size;\n bag.size = def.size;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const size = input.size;\n if (size === def.size)\n return;\n const tooBig = size > def.size;\n payload.issues.push({\n origin: util.getSizableOrigin(input),\n ...(tooBig ? { code: \"too_big\", maximum: def.size } : { code: \"too_small\", minimum: def.size }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY);\n if (def.maximum < curr)\n inst._zod.bag.maximum = def.maximum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length <= def.maximum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_big\",\n maximum: def.maximum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinLength\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const curr = (inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY);\n if (def.minimum > curr)\n inst._zod.bag.minimum = def.minimum;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length >= def.minimum)\n return;\n const origin = util.getLengthableOrigin(input);\n payload.issues.push({\n origin,\n code: \"too_small\",\n minimum: def.minimum,\n inclusive: true,\n input,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n var _a;\n $ZodCheck.init(inst, def);\n (_a = inst._zod.def).when ?? (_a.when = (payload) => {\n const val = payload.value;\n return !util.nullish(val) && val.length !== undefined;\n });\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.minimum = def.length;\n bag.maximum = def.length;\n bag.length = def.length;\n });\n inst._zod.check = (payload) => {\n const input = payload.value;\n const length = input.length;\n if (length === def.length)\n return;\n const origin = util.getLengthableOrigin(input);\n const tooBig = length > def.length;\n payload.issues.push({\n origin,\n ...(tooBig ? { code: \"too_big\", maximum: def.length } : { code: \"too_small\", minimum: def.length }),\n inclusive: true,\n exact: true,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n var _a, _b;\n $ZodCheck.init(inst, def);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.format = def.format;\n if (def.pattern) {\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(def.pattern);\n }\n });\n if (def.pattern)\n (_a = inst._zod).check ?? (_a.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n ...(def.pattern ? { pattern: def.pattern.toString() } : {}),\n inst,\n continue: !def.abort,\n });\n });\n else\n (_b = inst._zod).check ?? (_b.check = () => { });\n});\nexport const $ZodCheckRegex = /*@__PURE__*/ core.$constructor(\"$ZodCheckRegex\", (inst, def) => {\n $ZodCheckStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n def.pattern.lastIndex = 0;\n if (def.pattern.test(payload.value))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"regex\",\n input: payload.value,\n pattern: def.pattern.toString(),\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckLowerCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.lowercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckUpperCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.uppercase);\n $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckIncludes = /*@__PURE__*/ core.$constructor(\"$ZodCheckIncludes\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const escapedRegex = util.escapeRegex(def.includes);\n const pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);\n def.pattern = pattern;\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.includes(def.includes, def.position))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"includes\",\n includes: def.includes,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckStartsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.startsWith(def.prefix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"starts_with\",\n prefix: def.prefix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckEndsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);\n def.pattern ?? (def.pattern = pattern);\n inst._zod.onattach.push((inst) => {\n const bag = inst._zod.bag;\n bag.patterns ?? (bag.patterns = new Set());\n bag.patterns.add(pattern);\n });\n inst._zod.check = (payload) => {\n if (payload.value.endsWith(def.suffix))\n return;\n payload.issues.push({\n origin: \"string\",\n code: \"invalid_format\",\n format: \"ends_with\",\n suffix: def.suffix,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n///////////////////////////////////\n///// $ZodCheckProperty /////\n///////////////////////////////////\nfunction handleCheckPropertyResult(result, payload, property) {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(property, result.issues));\n }\n}\nexport const $ZodCheckProperty = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperty\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n const result = def.schema._zod.run({\n value: payload.value[def.property],\n issues: [],\n }, {});\n if (result instanceof Promise) {\n return result.then((result) => handleCheckPropertyResult(result, payload, def.property));\n }\n handleCheckPropertyResult(result, payload, def.property);\n return;\n };\n});\nexport const $ZodCheckMimeType = /*@__PURE__*/ core.$constructor(\"$ZodCheckMimeType\", (inst, def) => {\n $ZodCheck.init(inst, def);\n const mimeSet = new Set(def.mime);\n inst._zod.onattach.push((inst) => {\n inst._zod.bag.mime = def.mime;\n });\n inst._zod.check = (payload) => {\n if (mimeSet.has(payload.value.type))\n return;\n payload.issues.push({\n code: \"invalid_value\",\n values: def.mime,\n input: payload.value.type,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCheckOverwrite = /*@__PURE__*/ core.$constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n $ZodCheck.init(inst, def);\n inst._zod.check = (payload) => {\n payload.value = def.tx(payload.value);\n };\n});\n","export const version = {\n major: 4,\n minor: 3,\n patch: 6,\n};\n","import * as checks from \"./checks.js\";\nimport * as core from \"./core.js\";\nimport { Doc } from \"./doc.js\";\nimport { parse, parseAsync, safeParse, safeParseAsync } from \"./parse.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nimport { version } from \"./versions.js\";\nexport const $ZodType = /*@__PURE__*/ core.$constructor(\"$ZodType\", (inst, def) => {\n var _a;\n inst ?? (inst = {});\n inst._zod.def = def; // set _def property\n inst._zod.bag = inst._zod.bag || {}; // initialize _bag object\n inst._zod.version = version;\n const checks = [...(inst._zod.def.checks ?? [])];\n // if inst is itself a checks.$ZodCheck, run it as a check\n if (inst._zod.traits.has(\"$ZodCheck\")) {\n checks.unshift(inst);\n }\n for (const ch of checks) {\n for (const fn of ch._zod.onattach) {\n fn(inst);\n }\n }\n if (checks.length === 0) {\n // deferred initializer\n // inst._zod.parse is not yet defined\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n inst._zod.deferred?.push(() => {\n inst._zod.run = inst._zod.parse;\n });\n }\n else {\n const runChecks = (payload, checks, ctx) => {\n let isAborted = util.aborted(payload);\n let asyncResult;\n for (const ch of checks) {\n if (ch._zod.def.when) {\n const shouldRun = ch._zod.def.when(payload);\n if (!shouldRun)\n continue;\n }\n else if (isAborted) {\n continue;\n }\n const currLen = payload.issues.length;\n const _ = ch._zod.check(payload);\n if (_ instanceof Promise && ctx?.async === false) {\n throw new core.$ZodAsyncError();\n }\n if (asyncResult || _ instanceof Promise) {\n asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {\n await _;\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n return;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n });\n }\n else {\n const nextLen = payload.issues.length;\n if (nextLen === currLen)\n continue;\n if (!isAborted)\n isAborted = util.aborted(payload, currLen);\n }\n }\n if (asyncResult) {\n return asyncResult.then(() => {\n return payload;\n });\n }\n return payload;\n };\n const handleCanaryResult = (canary, payload, ctx) => {\n // abort if the canary is aborted\n if (util.aborted(canary)) {\n canary.aborted = true;\n return canary;\n }\n // run checks first, then\n const checkResult = runChecks(payload, checks, ctx);\n if (checkResult instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));\n }\n return inst._zod.parse(checkResult, ctx);\n };\n inst._zod.run = (payload, ctx) => {\n if (ctx.skipChecks) {\n return inst._zod.parse(payload, ctx);\n }\n if (ctx.direction === \"backward\") {\n // run canary\n // initial pass (no checks)\n const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });\n if (canary instanceof Promise) {\n return canary.then((canary) => {\n return handleCanaryResult(canary, payload, ctx);\n });\n }\n return handleCanaryResult(canary, payload, ctx);\n }\n // forward\n const result = inst._zod.parse(payload, ctx);\n if (result instanceof Promise) {\n if (ctx.async === false)\n throw new core.$ZodAsyncError();\n return result.then((result) => runChecks(result, checks, ctx));\n }\n return runChecks(result, checks, ctx);\n };\n }\n // Lazy initialize ~standard to avoid creating objects for every schema\n util.defineLazy(inst, \"~standard\", () => ({\n validate: (value) => {\n try {\n const r = safeParse(inst, value);\n return r.success ? { value: r.data } : { issues: r.error?.issues };\n }\n catch (_) {\n return safeParseAsync(inst, value).then((r) => (r.success ? { value: r.data } : { issues: r.error?.issues }));\n }\n },\n vendor: \"zod\",\n version: 1,\n }));\n});\nexport { clone } from \"./util.js\";\nexport const $ZodString = /*@__PURE__*/ core.$constructor(\"$ZodString\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);\n inst._zod.parse = (payload, _) => {\n if (def.coerce)\n try {\n payload.value = String(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"string\")\n return payload;\n payload.issues.push({\n expected: \"string\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodStringFormat\", (inst, def) => {\n // check initialization must come first\n checks.$ZodCheckStringFormat.init(inst, def);\n $ZodString.init(inst, def);\n});\nexport const $ZodGUID = /*@__PURE__*/ core.$constructor(\"$ZodGUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.guid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodUUID = /*@__PURE__*/ core.$constructor(\"$ZodUUID\", (inst, def) => {\n if (def.version) {\n const versionMap = {\n v1: 1,\n v2: 2,\n v3: 3,\n v4: 4,\n v5: 5,\n v6: 6,\n v7: 7,\n v8: 8,\n };\n const v = versionMap[def.version];\n if (v === undefined)\n throw new Error(`Invalid UUID version: \"${def.version}\"`);\n def.pattern ?? (def.pattern = regexes.uuid(v));\n }\n else\n def.pattern ?? (def.pattern = regexes.uuid());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodEmail = /*@__PURE__*/ core.$constructor(\"$ZodEmail\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.email);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodURL = /*@__PURE__*/ core.$constructor(\"$ZodURL\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n try {\n // Trim whitespace from input\n const trimmed = payload.value.trim();\n // @ts-ignore\n const url = new URL(trimmed);\n if (def.hostname) {\n def.hostname.lastIndex = 0;\n if (!def.hostname.test(url.hostname)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid hostname\",\n pattern: def.hostname.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n if (def.protocol) {\n def.protocol.lastIndex = 0;\n if (!def.protocol.test(url.protocol.endsWith(\":\") ? url.protocol.slice(0, -1) : url.protocol)) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n note: \"Invalid protocol\",\n pattern: def.protocol.source,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n }\n // Set the output value based on normalize flag\n if (def.normalize) {\n // Use normalized URL\n payload.value = url.href;\n }\n else {\n // Preserve the original input (trimmed)\n payload.value = trimmed;\n }\n return;\n }\n catch (_) {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodEmoji = /*@__PURE__*/ core.$constructor(\"$ZodEmoji\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.emoji());\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodNanoID = /*@__PURE__*/ core.$constructor(\"$ZodNanoID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.nanoid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID = /*@__PURE__*/ core.$constructor(\"$ZodCUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID2 = /*@__PURE__*/ core.$constructor(\"$ZodCUID2\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cuid2);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodULID = /*@__PURE__*/ core.$constructor(\"$ZodULID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ulid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodXID = /*@__PURE__*/ core.$constructor(\"$ZodXID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.xid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodKSUID = /*@__PURE__*/ core.$constructor(\"$ZodKSUID\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ksuid);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODateTime = /*@__PURE__*/ core.$constructor(\"$ZodISODateTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.datetime(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODate = /*@__PURE__*/ core.$constructor(\"$ZodISODate\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.date);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISOTime = /*@__PURE__*/ core.$constructor(\"$ZodISOTime\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.time(def));\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODuration = /*@__PURE__*/ core.$constructor(\"$ZodISODuration\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.duration);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodIPv4 = /*@__PURE__*/ core.$constructor(\"$ZodIPv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv4);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv4`;\n});\nexport const $ZodIPv6 = /*@__PURE__*/ core.$constructor(\"$ZodIPv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.ipv6);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `ipv6`;\n inst._zod.check = (payload) => {\n try {\n // @ts-ignore\n new URL(`http://[${payload.value}]`);\n // return;\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"ipv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\nexport const $ZodMAC = /*@__PURE__*/ core.$constructor(\"$ZodMAC\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.mac(def.delimiter));\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.format = `mac`;\n});\nexport const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv4\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv4);\n $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv6\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n const parts = payload.value.split(\"/\");\n try {\n if (parts.length !== 2)\n throw new Error();\n const [address, prefix] = parts;\n if (!prefix)\n throw new Error();\n const prefixNum = Number(prefix);\n if (`${prefixNum}` !== prefix)\n throw new Error();\n if (prefixNum < 0 || prefixNum > 128)\n throw new Error();\n // @ts-ignore\n new URL(`http://[${address}]`);\n }\n catch {\n payload.issues.push({\n code: \"invalid_format\",\n format: \"cidrv6\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n }\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64(data) {\n if (data === \"\")\n return true;\n if (data.length % 4 !== 0)\n return false;\n try {\n // @ts-ignore\n atob(data);\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodBase64 = /*@__PURE__*/ core.$constructor(\"$ZodBase64\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64\";\n inst._zod.check = (payload) => {\n if (isValidBase64(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\n////////////////////////////// ZodBase64 //////////////////////////////\nexport function isValidBase64URL(data) {\n if (!regexes.base64url.test(data))\n return false;\n const base64 = data.replace(/[-_]/g, (c) => (c === \"-\" ? \"+\" : \"/\"));\n const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, \"=\");\n return isValidBase64(padded);\n}\nexport const $ZodBase64URL = /*@__PURE__*/ core.$constructor(\"$ZodBase64URL\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.base64url);\n $ZodStringFormat.init(inst, def);\n inst._zod.bag.contentEncoding = \"base64url\";\n inst._zod.check = (payload) => {\n if (isValidBase64URL(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"base64url\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodE164 = /*@__PURE__*/ core.$constructor(\"$ZodE164\", (inst, def) => {\n def.pattern ?? (def.pattern = regexes.e164);\n $ZodStringFormat.init(inst, def);\n});\n////////////////////////////// ZodJWT //////////////////////////////\nexport function isValidJWT(token, algorithm = null) {\n try {\n const tokensParts = token.split(\".\");\n if (tokensParts.length !== 3)\n return false;\n const [header] = tokensParts;\n if (!header)\n return false;\n // @ts-ignore\n const parsedHeader = JSON.parse(atob(header));\n if (\"typ\" in parsedHeader && parsedHeader?.typ !== \"JWT\")\n return false;\n if (!parsedHeader.alg)\n return false;\n if (algorithm && (!(\"alg\" in parsedHeader) || parsedHeader.alg !== algorithm))\n return false;\n return true;\n }\n catch {\n return false;\n }\n}\nexport const $ZodJWT = /*@__PURE__*/ core.$constructor(\"$ZodJWT\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (isValidJWT(payload.value, def.alg))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: \"jwt\",\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCustomStringFormat\", (inst, def) => {\n $ZodStringFormat.init(inst, def);\n inst._zod.check = (payload) => {\n if (def.fn(payload.value))\n return;\n payload.issues.push({\n code: \"invalid_format\",\n format: def.format,\n input: payload.value,\n inst,\n continue: !def.abort,\n });\n };\n});\nexport const $ZodNumber = /*@__PURE__*/ core.$constructor(\"$ZodNumber\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Number(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"number\" && !Number.isNaN(input) && Number.isFinite(input)) {\n return payload;\n }\n const received = typeof input === \"number\"\n ? Number.isNaN(input)\n ? \"NaN\"\n : !Number.isFinite(input)\n ? \"Infinity\"\n : undefined\n : undefined;\n payload.issues.push({\n expected: \"number\",\n code: \"invalid_type\",\n input,\n inst,\n ...(received ? { received } : {}),\n });\n return payload;\n };\n});\nexport const $ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodNumberFormat\", (inst, def) => {\n checks.$ZodCheckNumberFormat.init(inst, def);\n $ZodNumber.init(inst, def); // no format checks\n});\nexport const $ZodBoolean = /*@__PURE__*/ core.$constructor(\"$ZodBoolean\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.boolean;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = Boolean(payload.value);\n }\n catch (_) { }\n const input = payload.value;\n if (typeof input === \"boolean\")\n return payload;\n payload.issues.push({\n expected: \"boolean\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigInt = /*@__PURE__*/ core.$constructor(\"$ZodBigInt\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.bigint;\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce)\n try {\n payload.value = BigInt(payload.value);\n }\n catch (_) { }\n if (typeof payload.value === \"bigint\")\n return payload;\n payload.issues.push({\n expected: \"bigint\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodBigIntFormat\", (inst, def) => {\n checks.$ZodCheckBigIntFormat.init(inst, def);\n $ZodBigInt.init(inst, def); // no format checks\n});\nexport const $ZodSymbol = /*@__PURE__*/ core.$constructor(\"$ZodSymbol\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"symbol\")\n return payload;\n payload.issues.push({\n expected: \"symbol\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodUndefined = /*@__PURE__*/ core.$constructor(\"$ZodUndefined\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.undefined;\n inst._zod.values = new Set([undefined]);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"undefined\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodNull = /*@__PURE__*/ core.$constructor(\"$ZodNull\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.pattern = regexes.null;\n inst._zod.values = new Set([null]);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (input === null)\n return payload;\n payload.issues.push({\n expected: \"null\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodAny = /*@__PURE__*/ core.$constructor(\"$ZodAny\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodUnknown = /*@__PURE__*/ core.$constructor(\"$ZodUnknown\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload) => payload;\n});\nexport const $ZodNever = /*@__PURE__*/ core.$constructor(\"$ZodNever\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n payload.issues.push({\n expected: \"never\",\n code: \"invalid_type\",\n input: payload.value,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodVoid = /*@__PURE__*/ core.$constructor(\"$ZodVoid\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (typeof input === \"undefined\")\n return payload;\n payload.issues.push({\n expected: \"void\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodDate = /*@__PURE__*/ core.$constructor(\"$ZodDate\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (def.coerce) {\n try {\n payload.value = new Date(payload.value);\n }\n catch (_err) { }\n }\n const input = payload.value;\n const isDate = input instanceof Date;\n const isValidDate = isDate && !Number.isNaN(input.getTime());\n if (isValidDate)\n return payload;\n payload.issues.push({\n expected: \"date\",\n code: \"invalid_type\",\n input,\n ...(isDate ? { received: \"Invalid Date\" } : {}),\n inst,\n });\n return payload;\n };\n});\nfunction handleArrayResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodArray = /*@__PURE__*/ core.$constructor(\"$ZodArray\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n expected: \"array\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = Array(input.length);\n const proms = [];\n for (let i = 0; i < input.length; i++) {\n const item = input[i];\n const result = def.element._zod.run({\n value: item,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleArrayResult(result, payload, i)));\n }\n else {\n handleArrayResult(result, payload, i);\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload; //handleArrayResultsAsync(parseResults, final);\n };\n});\nfunction handlePropertyResult(result, final, key, input, isOptionalOut) {\n if (result.issues.length) {\n // For optional-out schemas, ignore errors on absent keys\n if (isOptionalOut && !(key in input)) {\n return;\n }\n final.issues.push(...util.prefixIssues(key, result.issues));\n }\n if (result.value === undefined) {\n if (key in input) {\n final.value[key] = undefined;\n }\n }\n else {\n final.value[key] = result.value;\n }\n}\nfunction normalizeDef(def) {\n const keys = Object.keys(def.shape);\n for (const k of keys) {\n if (!def.shape?.[k]?._zod?.traits?.has(\"$ZodType\")) {\n throw new Error(`Invalid element at key \"${k}\": expected a Zod schema`);\n }\n }\n const okeys = util.optionalKeys(def.shape);\n return {\n ...def,\n keys,\n keySet: new Set(keys),\n numKeys: keys.length,\n optionalKeys: new Set(okeys),\n };\n}\nfunction handleCatchall(proms, input, payload, ctx, def, inst) {\n const unrecognized = [];\n // iterate over input keys\n const keySet = def.keySet;\n const _catchall = def.catchall._zod;\n const t = _catchall.def.type;\n const isOptionalOut = _catchall.optout === \"optional\";\n for (const key in input) {\n if (keySet.has(key))\n continue;\n if (t === \"never\") {\n unrecognized.push(key);\n continue;\n }\n const r = _catchall.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalOut);\n }\n }\n if (unrecognized.length) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n keys: unrecognized,\n input,\n inst,\n });\n }\n if (!proms.length)\n return payload;\n return Promise.all(proms).then(() => {\n return payload;\n });\n}\nexport const $ZodObject = /*@__PURE__*/ core.$constructor(\"$ZodObject\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodType.init(inst, def);\n // const sh = def.shape;\n const desc = Object.getOwnPropertyDescriptor(def, \"shape\");\n if (!desc?.get) {\n const sh = def.shape;\n Object.defineProperty(def, \"shape\", {\n get: () => {\n const newSh = { ...sh };\n Object.defineProperty(def, \"shape\", {\n value: newSh,\n });\n return newSh;\n },\n });\n }\n const _normalized = util.cached(() => normalizeDef(def));\n util.defineLazy(inst._zod, \"propValues\", () => {\n const shape = def.shape;\n const propValues = {};\n for (const key in shape) {\n const field = shape[key]._zod;\n if (field.values) {\n propValues[key] ?? (propValues[key] = new Set());\n for (const v of field.values)\n propValues[key].add(v);\n }\n }\n return propValues;\n });\n const isObject = util.isObject;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n payload.value = {};\n const proms = [];\n const shape = value.shape;\n for (const key of value.keys) {\n const el = shape[key];\n const isOptionalOut = el._zod.optout === \"optional\";\n const r = el._zod.run({ value: input[key], issues: [] }, ctx);\n if (r instanceof Promise) {\n proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));\n }\n else {\n handlePropertyResult(r, payload, key, input, isOptionalOut);\n }\n }\n if (!catchall) {\n return proms.length ? Promise.all(proms).then(() => payload) : payload;\n }\n return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);\n };\n});\nexport const $ZodObjectJIT = /*@__PURE__*/ core.$constructor(\"$ZodObjectJIT\", (inst, def) => {\n // requires cast because technically $ZodObject doesn't extend\n $ZodObject.init(inst, def);\n const superParse = inst._zod.parse;\n const _normalized = util.cached(() => normalizeDef(def));\n const generateFastpass = (shape) => {\n const doc = new Doc([\"shape\", \"payload\", \"ctx\"]);\n const normalized = _normalized.value;\n const parseStr = (key) => {\n const k = util.esc(key);\n return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;\n };\n doc.write(`const input = payload.value;`);\n const ids = Object.create(null);\n let counter = 0;\n for (const key of normalized.keys) {\n ids[key] = `key_${counter++}`;\n }\n // A: preserve key order {\n doc.write(`const newResult = {};`);\n for (const key of normalized.keys) {\n const id = ids[key];\n const k = util.esc(key);\n const schema = shape[key];\n const isOptionalOut = schema?._zod?.optout === \"optional\";\n doc.write(`const ${id} = ${parseStr(key)};`);\n if (isOptionalOut) {\n // For optional-out schemas, ignore errors on absent keys\n doc.write(`\n if (${id}.issues.length) {\n if (${k} in input) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n else {\n doc.write(`\n if (${id}.issues.length) {\n payload.issues = payload.issues.concat(${id}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${k}, ...iss.path] : [${k}]\n })));\n }\n \n if (${id}.value === undefined) {\n if (${k} in input) {\n newResult[${k}] = undefined;\n }\n } else {\n newResult[${k}] = ${id}.value;\n }\n \n `);\n }\n }\n doc.write(`payload.value = newResult;`);\n doc.write(`return payload;`);\n const fn = doc.compile();\n return (payload, ctx) => fn(shape, payload, ctx);\n };\n let fastpass;\n const isObject = util.isObject;\n const jit = !core.globalConfig.jitless;\n const allowsEval = util.allowsEval;\n const fastEnabled = jit && allowsEval.value; // && !def.catchall;\n const catchall = def.catchall;\n let value;\n inst._zod.parse = (payload, ctx) => {\n value ?? (value = _normalized.value);\n const input = payload.value;\n if (!isObject(input)) {\n payload.issues.push({\n expected: \"object\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {\n // always synchronous\n if (!fastpass)\n fastpass = generateFastpass(def.shape);\n payload = fastpass(payload, ctx);\n if (!catchall)\n return payload;\n return handleCatchall([], input, payload, ctx, value, inst);\n }\n return superParse(payload, ctx);\n };\n});\nfunction handleUnionResults(results, final, inst, ctx) {\n for (const result of results) {\n if (result.issues.length === 0) {\n final.value = result.value;\n return final;\n }\n }\n const nonaborted = results.filter((r) => !util.aborted(r));\n if (nonaborted.length === 1) {\n final.value = nonaborted[0].value;\n return nonaborted[0];\n }\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n return final;\n}\nexport const $ZodUnion = /*@__PURE__*/ core.$constructor(\"$ZodUnion\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.options.some((o) => o._zod.optin === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"optout\", () => def.options.some((o) => o._zod.optout === \"optional\") ? \"optional\" : undefined);\n util.defineLazy(inst._zod, \"values\", () => {\n if (def.options.every((o) => o._zod.values)) {\n return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));\n }\n return undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n if (def.options.every((o) => o._zod.pattern)) {\n const patterns = def.options.map((o) => o._zod.pattern);\n return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join(\"|\")})$`);\n }\n return undefined;\n });\n const single = def.options.length === 1;\n const first = def.options[0]._zod.run;\n inst._zod.parse = (payload, ctx) => {\n if (single) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n if (result.issues.length === 0)\n return result;\n results.push(result);\n }\n }\n if (!async)\n return handleUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleUnionResults(results, payload, inst, ctx);\n });\n };\n});\nfunction handleExclusiveUnionResults(results, final, inst, ctx) {\n const successes = results.filter((r) => r.issues.length === 0);\n if (successes.length === 1) {\n final.value = successes[0].value;\n return final;\n }\n if (successes.length === 0) {\n // No matches - same as regular union\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n });\n }\n else {\n // Multiple matches - exclusive union failure\n final.issues.push({\n code: \"invalid_union\",\n input: final.value,\n inst,\n errors: [],\n inclusive: false,\n });\n }\n return final;\n}\nexport const $ZodXor = /*@__PURE__*/ core.$constructor(\"$ZodXor\", (inst, def) => {\n $ZodUnion.init(inst, def);\n def.inclusive = false;\n const single = def.options.length === 1;\n const first = def.options[0]._zod.run;\n inst._zod.parse = (payload, ctx) => {\n if (single) {\n return first(payload, ctx);\n }\n let async = false;\n const results = [];\n for (const option of def.options) {\n const result = option._zod.run({\n value: payload.value,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n results.push(result);\n async = true;\n }\n else {\n results.push(result);\n }\n }\n if (!async)\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n return Promise.all(results).then((results) => {\n return handleExclusiveUnionResults(results, payload, inst, ctx);\n });\n };\n});\nexport const $ZodDiscriminatedUnion = \n/*@__PURE__*/\ncore.$constructor(\"$ZodDiscriminatedUnion\", (inst, def) => {\n def.inclusive = false;\n $ZodUnion.init(inst, def);\n const _super = inst._zod.parse;\n util.defineLazy(inst._zod, \"propValues\", () => {\n const propValues = {};\n for (const option of def.options) {\n const pv = option._zod.propValues;\n if (!pv || Object.keys(pv).length === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(option)}\"`);\n for (const [k, v] of Object.entries(pv)) {\n if (!propValues[k])\n propValues[k] = new Set();\n for (const val of v) {\n propValues[k].add(val);\n }\n }\n }\n return propValues;\n });\n const disc = util.cached(() => {\n const opts = def.options;\n const map = new Map();\n for (const o of opts) {\n const values = o._zod.propValues?.[def.discriminator];\n if (!values || values.size === 0)\n throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(o)}\"`);\n for (const v of values) {\n if (map.has(v)) {\n throw new Error(`Duplicate discriminator value \"${String(v)}\"`);\n }\n map.set(v, o);\n }\n }\n return map;\n });\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isObject(input)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"object\",\n input,\n inst,\n });\n return payload;\n }\n const opt = disc.value.get(input?.[def.discriminator]);\n if (opt) {\n return opt._zod.run(payload, ctx);\n }\n if (def.unionFallback) {\n return _super(payload, ctx);\n }\n // no matching discriminator\n payload.issues.push({\n code: \"invalid_union\",\n errors: [],\n note: \"No matching discriminator\",\n discriminator: def.discriminator,\n input,\n path: [def.discriminator],\n inst,\n });\n return payload;\n };\n});\nexport const $ZodIntersection = /*@__PURE__*/ core.$constructor(\"$ZodIntersection\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n const left = def.left._zod.run({ value: input, issues: [] }, ctx);\n const right = def.right._zod.run({ value: input, issues: [] }, ctx);\n const async = left instanceof Promise || right instanceof Promise;\n if (async) {\n return Promise.all([left, right]).then(([left, right]) => {\n return handleIntersectionResults(payload, left, right);\n });\n }\n return handleIntersectionResults(payload, left, right);\n };\n});\nfunction mergeValues(a, b) {\n // const aType = parse.t(a);\n // const bType = parse.t(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n if (a instanceof Date && b instanceof Date && +a === +b) {\n return { valid: true, data: a };\n }\n if (util.isPlainObject(a) && util.isPlainObject(b)) {\n const bKeys = Object.keys(b);\n const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [key, ...sharedValue.mergeErrorPath],\n };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n if (Array.isArray(a) && Array.isArray(b)) {\n if (a.length !== b.length) {\n return { valid: false, mergeErrorPath: [] };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return {\n valid: false,\n mergeErrorPath: [index, ...sharedValue.mergeErrorPath],\n };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n return { valid: false, mergeErrorPath: [] };\n}\nfunction handleIntersectionResults(result, left, right) {\n // Track which side(s) report each key as unrecognized\n const unrecKeys = new Map();\n let unrecIssue;\n for (const iss of left.issues) {\n if (iss.code === \"unrecognized_keys\") {\n unrecIssue ?? (unrecIssue = iss);\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).l = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n for (const iss of right.issues) {\n if (iss.code === \"unrecognized_keys\") {\n for (const k of iss.keys) {\n if (!unrecKeys.has(k))\n unrecKeys.set(k, {});\n unrecKeys.get(k).r = true;\n }\n }\n else {\n result.issues.push(iss);\n }\n }\n // Report only keys unrecognized by BOTH sides\n const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);\n if (bothKeys.length && unrecIssue) {\n result.issues.push({ ...unrecIssue, keys: bothKeys });\n }\n if (util.aborted(result))\n return result;\n const merged = mergeValues(left.value, right.value);\n if (!merged.valid) {\n throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);\n }\n result.value = merged.data;\n return result;\n}\nexport const $ZodTuple = /*@__PURE__*/ core.$constructor(\"$ZodTuple\", (inst, def) => {\n $ZodType.init(inst, def);\n const items = def.items;\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!Array.isArray(input)) {\n payload.issues.push({\n input,\n inst,\n expected: \"tuple\",\n code: \"invalid_type\",\n });\n return payload;\n }\n payload.value = [];\n const proms = [];\n const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== \"optional\");\n const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;\n if (!def.rest) {\n const tooBig = input.length > items.length;\n const tooSmall = input.length < optStart - 1;\n if (tooBig || tooSmall) {\n payload.issues.push({\n ...(tooBig\n ? { code: \"too_big\", maximum: items.length, inclusive: true }\n : { code: \"too_small\", minimum: items.length }),\n input,\n inst,\n origin: \"array\",\n });\n return payload;\n }\n }\n let i = -1;\n for (const item of items) {\n i++;\n if (i >= input.length)\n if (i >= optStart)\n continue;\n const result = item._zod.run({\n value: input[i],\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleTupleResult(result, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n if (def.rest) {\n const rest = input.slice(items.length);\n for (const el of rest) {\n i++;\n const result = def.rest._zod.run({\n value: el,\n issues: [],\n }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleTupleResult(result, payload, i)));\n }\n else {\n handleTupleResult(result, payload, i);\n }\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleTupleResult(result, final, index) {\n if (result.issues.length) {\n final.issues.push(...util.prefixIssues(index, result.issues));\n }\n final.value[index] = result.value;\n}\nexport const $ZodRecord = /*@__PURE__*/ core.$constructor(\"$ZodRecord\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!util.isPlainObject(input)) {\n payload.issues.push({\n expected: \"record\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n const values = def.keyType._zod.values;\n if (values) {\n payload.value = {};\n const recordKeys = new Set();\n for (const key of values) {\n if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\") {\n recordKeys.add(typeof key === \"number\" ? key.toString() : key);\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[key] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[key] = result.value;\n }\n }\n }\n let unrecognized;\n for (const key in input) {\n if (!recordKeys.has(key)) {\n unrecognized = unrecognized ?? [];\n unrecognized.push(key);\n }\n }\n if (unrecognized && unrecognized.length > 0) {\n payload.issues.push({\n code: \"unrecognized_keys\",\n input,\n inst,\n keys: unrecognized,\n });\n }\n }\n else {\n payload.value = {};\n for (const key of Reflect.ownKeys(input)) {\n if (key === \"__proto__\")\n continue;\n let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n if (keyResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n // Numeric string fallback: if key is a numeric string and failed, retry with Number(key)\n // This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals\n const checkNumericKey = typeof key === \"string\" && regexes.number.test(key) && keyResult.issues.length;\n if (checkNumericKey) {\n const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);\n if (retryResult instanceof Promise) {\n throw new Error(\"Async schemas not supported in object keys currently\");\n }\n if (retryResult.issues.length === 0) {\n keyResult = retryResult;\n }\n }\n if (keyResult.issues.length) {\n if (def.mode === \"loose\") {\n // Pass through unchanged\n payload.value[key] = input[key];\n }\n else {\n // Default \"strict\" behavior: error on invalid key\n payload.issues.push({\n code: \"invalid_key\",\n origin: \"record\",\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n input: key,\n path: [key],\n inst,\n });\n }\n continue;\n }\n const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }));\n }\n else {\n if (result.issues.length) {\n payload.issues.push(...util.prefixIssues(key, result.issues));\n }\n payload.value[keyResult.value] = result.value;\n }\n }\n }\n if (proms.length) {\n return Promise.all(proms).then(() => payload);\n }\n return payload;\n };\n});\nexport const $ZodMap = /*@__PURE__*/ core.$constructor(\"$ZodMap\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Map)) {\n payload.issues.push({\n expected: \"map\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n }\n const proms = [];\n payload.value = new Map();\n for (const [key, value] of input) {\n const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);\n if (keyResult instanceof Promise || valueResult instanceof Promise) {\n proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }));\n }\n else {\n handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n }\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {\n if (keyResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, keyResult.issues));\n }\n else {\n final.issues.push({\n code: \"invalid_key\",\n origin: \"map\",\n input,\n inst,\n issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n if (valueResult.issues.length) {\n if (util.propertyKeyTypes.has(typeof key)) {\n final.issues.push(...util.prefixIssues(key, valueResult.issues));\n }\n else {\n final.issues.push({\n origin: \"map\",\n code: \"invalid_element\",\n input,\n inst,\n key: key,\n issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n });\n }\n }\n final.value.set(keyResult.value, valueResult.value);\n}\nexport const $ZodSet = /*@__PURE__*/ core.$constructor(\"$ZodSet\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n const input = payload.value;\n if (!(input instanceof Set)) {\n payload.issues.push({\n input,\n inst,\n expected: \"set\",\n code: \"invalid_type\",\n });\n return payload;\n }\n const proms = [];\n payload.value = new Set();\n for (const item of input) {\n const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);\n if (result instanceof Promise) {\n proms.push(result.then((result) => handleSetResult(result, payload)));\n }\n else\n handleSetResult(result, payload);\n }\n if (proms.length)\n return Promise.all(proms).then(() => payload);\n return payload;\n };\n});\nfunction handleSetResult(result, final) {\n if (result.issues.length) {\n final.issues.push(...result.issues);\n }\n final.value.add(result.value);\n}\nexport const $ZodEnum = /*@__PURE__*/ core.$constructor(\"$ZodEnum\", (inst, def) => {\n $ZodType.init(inst, def);\n const values = util.getEnumValues(def.entries);\n const valuesSet = new Set(values);\n inst._zod.values = valuesSet;\n inst._zod.pattern = new RegExp(`^(${values\n .filter((k) => util.propertyKeyTypes.has(typeof k))\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o.toString()))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (valuesSet.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodLiteral = /*@__PURE__*/ core.$constructor(\"$ZodLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n if (def.values.length === 0) {\n throw new Error(\"Cannot create literal schema with no valid values\");\n }\n const values = new Set(def.values);\n inst._zod.values = values;\n inst._zod.pattern = new RegExp(`^(${def.values\n .map((o) => (typeof o === \"string\" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o)))\n .join(\"|\")})$`);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n if (values.has(input)) {\n return payload;\n }\n payload.issues.push({\n code: \"invalid_value\",\n values: def.values,\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodFile = /*@__PURE__*/ core.$constructor(\"$ZodFile\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n const input = payload.value;\n // @ts-ignore\n if (input instanceof File)\n return payload;\n payload.issues.push({\n expected: \"file\",\n code: \"invalid_type\",\n input,\n inst,\n });\n return payload;\n };\n});\nexport const $ZodTransform = /*@__PURE__*/ core.$constructor(\"$ZodTransform\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(inst.constructor.name);\n }\n const _out = def.transform(payload.value, payload);\n if (ctx.async) {\n const output = _out instanceof Promise ? _out : Promise.resolve(_out);\n return output.then((output) => {\n payload.value = output;\n return payload;\n });\n }\n if (_out instanceof Promise) {\n throw new core.$ZodAsyncError();\n }\n payload.value = _out;\n return payload;\n };\n});\nfunction handleOptionalResult(result, input) {\n if (result.issues.length && input === undefined) {\n return { issues: [], value: undefined };\n }\n return result;\n}\nexport const $ZodOptional = /*@__PURE__*/ core.$constructor(\"$ZodOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n inst._zod.optout = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, undefined]) : undefined;\n });\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n if (def.innerType._zod.optin === \"optional\") {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise)\n return result.then((r) => handleOptionalResult(r, payload.value));\n return handleOptionalResult(result, payload.value);\n }\n if (payload.value === undefined) {\n return payload;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodExactOptional = /*@__PURE__*/ core.$constructor(\"$ZodExactOptional\", (inst, def) => {\n // Call parent init - inherits optin/optout = \"optional\"\n $ZodOptional.init(inst, def);\n // Override values/pattern to NOT add undefined\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"pattern\", () => def.innerType._zod.pattern);\n // Override parse to just delegate (no undefined handling)\n inst._zod.parse = (payload, ctx) => {\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNullable = /*@__PURE__*/ core.$constructor(\"$ZodNullable\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"pattern\", () => {\n const pattern = def.innerType._zod.pattern;\n return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;\n });\n util.defineLazy(inst._zod, \"values\", () => {\n return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n // Forward direction (decode): allow null to pass through\n if (payload.value === null)\n return payload;\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodDefault = /*@__PURE__*/ core.$constructor(\"$ZodDefault\", (inst, def) => {\n $ZodType.init(inst, def);\n // inst._zod.qin = \"true\";\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply defaults for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n /**\n * $ZodDefault returns the default value immediately in forward direction.\n * It doesn't pass the default value into the validator (\"prefault\"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a \"prefault\" for the pipe. */\n return payload;\n }\n // Forward direction: continue with default handling\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleDefaultResult(result, def));\n }\n return handleDefaultResult(result, def);\n };\n});\nfunction handleDefaultResult(payload, def) {\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return payload;\n}\nexport const $ZodPrefault = /*@__PURE__*/ core.$constructor(\"$ZodPrefault\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.optin = \"optional\";\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply prefault for undefined input\n if (payload.value === undefined) {\n payload.value = def.defaultValue;\n }\n return def.innerType._zod.run(payload, ctx);\n };\n});\nexport const $ZodNonOptional = /*@__PURE__*/ core.$constructor(\"$ZodNonOptional\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => {\n const v = def.innerType._zod.values;\n return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;\n });\n inst._zod.parse = (payload, ctx) => {\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => handleNonOptionalResult(result, inst));\n }\n return handleNonOptionalResult(result, inst);\n };\n});\nfunction handleNonOptionalResult(payload, inst) {\n if (!payload.issues.length && payload.value === undefined) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"nonoptional\",\n input: payload.value,\n inst,\n });\n }\n return payload;\n}\nexport const $ZodSuccess = /*@__PURE__*/ core.$constructor(\"$ZodSuccess\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n throw new core.$ZodEncodeError(\"ZodSuccess\");\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.issues.length === 0;\n return payload;\n });\n }\n payload.value = result.issues.length === 0;\n return payload;\n };\n});\nexport const $ZodCatch = /*@__PURE__*/ core.$constructor(\"$ZodCatch\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType._zod.optout);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n // Forward direction (decode): apply catch logic\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then((result) => {\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n }\n return payload;\n });\n }\n payload.value = result.value;\n if (result.issues.length) {\n payload.value = def.catchValue({\n ...payload,\n error: {\n issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n },\n input: payload.value,\n });\n payload.issues = [];\n }\n return payload;\n };\n});\nexport const $ZodNaN = /*@__PURE__*/ core.$constructor(\"$ZodNaN\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"number\" || !Number.isNaN(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"nan\",\n code: \"invalid_type\",\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodPipe = /*@__PURE__*/ core.$constructor(\"$ZodPipe\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handlePipeResult(right, def.in, ctx));\n }\n return handlePipeResult(right, def.in, ctx);\n }\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handlePipeResult(left, def.out, ctx));\n }\n return handlePipeResult(left, def.out, ctx);\n };\n});\nfunction handlePipeResult(left, next, ctx) {\n if (left.issues.length) {\n // prevent further checks\n left.aborted = true;\n return left;\n }\n return next._zod.run({ value: left.value, issues: left.issues }, ctx);\n}\nexport const $ZodCodec = /*@__PURE__*/ core.$constructor(\"$ZodCodec\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"values\", () => def.in._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.in._zod.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.out._zod.optout);\n util.defineLazy(inst._zod, \"propValues\", () => def.in._zod.propValues);\n inst._zod.parse = (payload, ctx) => {\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const left = def.in._zod.run(payload, ctx);\n if (left instanceof Promise) {\n return left.then((left) => handleCodecAResult(left, def, ctx));\n }\n return handleCodecAResult(left, def, ctx);\n }\n else {\n const right = def.out._zod.run(payload, ctx);\n if (right instanceof Promise) {\n return right.then((right) => handleCodecAResult(right, def, ctx));\n }\n return handleCodecAResult(right, def, ctx);\n }\n };\n});\nfunction handleCodecAResult(result, def, ctx) {\n if (result.issues.length) {\n // prevent further checks\n result.aborted = true;\n return result;\n }\n const direction = ctx.direction || \"forward\";\n if (direction === \"forward\") {\n const transformed = def.transform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));\n }\n return handleCodecTxResult(result, transformed, def.out, ctx);\n }\n else {\n const transformed = def.reverseTransform(result.value, result);\n if (transformed instanceof Promise) {\n return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));\n }\n return handleCodecTxResult(result, transformed, def.in, ctx);\n }\n}\nfunction handleCodecTxResult(left, value, nextSchema, ctx) {\n // Check if transform added any issues\n if (left.issues.length) {\n left.aborted = true;\n return left;\n }\n return nextSchema._zod.run({ value, issues: left.issues }, ctx);\n}\nexport const $ZodReadonly = /*@__PURE__*/ core.$constructor(\"$ZodReadonly\", (inst, def) => {\n $ZodType.init(inst, def);\n util.defineLazy(inst._zod, \"propValues\", () => def.innerType._zod.propValues);\n util.defineLazy(inst._zod, \"values\", () => def.innerType._zod.values);\n util.defineLazy(inst._zod, \"optin\", () => def.innerType?._zod?.optin);\n util.defineLazy(inst._zod, \"optout\", () => def.innerType?._zod?.optout);\n inst._zod.parse = (payload, ctx) => {\n if (ctx.direction === \"backward\") {\n return def.innerType._zod.run(payload, ctx);\n }\n const result = def.innerType._zod.run(payload, ctx);\n if (result instanceof Promise) {\n return result.then(handleReadonlyResult);\n }\n return handleReadonlyResult(result);\n };\n});\nfunction handleReadonlyResult(payload) {\n payload.value = Object.freeze(payload.value);\n return payload;\n}\nexport const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"$ZodTemplateLiteral\", (inst, def) => {\n $ZodType.init(inst, def);\n const regexParts = [];\n for (const part of def.parts) {\n if (typeof part === \"object\" && part !== null) {\n // is Zod schema\n if (!part._zod.pattern) {\n // if (!source)\n throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);\n }\n const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;\n if (!source)\n throw new Error(`Invalid template literal part: ${part._zod.traits}`);\n const start = source.startsWith(\"^\") ? 1 : 0;\n const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n regexParts.push(source.slice(start, end));\n }\n else if (part === null || util.primitiveTypes.has(typeof part)) {\n regexParts.push(util.escapeRegex(`${part}`));\n }\n else {\n throw new Error(`Invalid template literal part: ${part}`);\n }\n }\n inst._zod.pattern = new RegExp(`^${regexParts.join(\"\")}$`);\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"string\") {\n payload.issues.push({\n input: payload.value,\n inst,\n expected: \"string\",\n code: \"invalid_type\",\n });\n return payload;\n }\n inst._zod.pattern.lastIndex = 0;\n if (!inst._zod.pattern.test(payload.value)) {\n payload.issues.push({\n input: payload.value,\n inst,\n code: \"invalid_format\",\n format: def.format ?? \"template_literal\",\n pattern: inst._zod.pattern.source,\n });\n return payload;\n }\n return payload;\n };\n});\nexport const $ZodFunction = /*@__PURE__*/ core.$constructor(\"$ZodFunction\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._def = def;\n inst._zod.def = def;\n inst.implement = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implement() must be called with a function\");\n }\n return function (...args) {\n const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;\n const result = Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return parse(inst._def.output, result);\n }\n return result;\n };\n };\n inst.implementAsync = (func) => {\n if (typeof func !== \"function\") {\n throw new Error(\"implementAsync() must be called with a function\");\n }\n return async function (...args) {\n const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;\n const result = await Reflect.apply(func, this, parsedArgs);\n if (inst._def.output) {\n return await parseAsync(inst._def.output, result);\n }\n return result;\n };\n };\n inst._zod.parse = (payload, _ctx) => {\n if (typeof payload.value !== \"function\") {\n payload.issues.push({\n code: \"invalid_type\",\n expected: \"function\",\n input: payload.value,\n inst,\n });\n return payload;\n }\n // Check if output is a promise type to determine if we should use async implementation\n const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === \"promise\";\n if (hasPromiseOutput) {\n payload.value = inst.implementAsync(payload.value);\n }\n else {\n payload.value = inst.implement(payload.value);\n }\n return payload;\n };\n inst.input = (...args) => {\n const F = inst.constructor;\n if (Array.isArray(args[0])) {\n return new F({\n type: \"function\",\n input: new $ZodTuple({\n type: \"tuple\",\n items: args[0],\n rest: args[1],\n }),\n output: inst._def.output,\n });\n }\n return new F({\n type: \"function\",\n input: args[0],\n output: inst._def.output,\n });\n };\n inst.output = (output) => {\n const F = inst.constructor;\n return new F({\n type: \"function\",\n input: inst._def.input,\n output,\n });\n };\n return inst;\n});\nexport const $ZodPromise = /*@__PURE__*/ core.$constructor(\"$ZodPromise\", (inst, def) => {\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, ctx) => {\n return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));\n };\n});\nexport const $ZodLazy = /*@__PURE__*/ core.$constructor(\"$ZodLazy\", (inst, def) => {\n $ZodType.init(inst, def);\n // let _innerType!: any;\n // util.defineLazy(def, \"getter\", () => {\n // if (!_innerType) {\n // _innerType = def.getter();\n // }\n // return () => _innerType;\n // });\n util.defineLazy(inst._zod, \"innerType\", () => def.getter());\n util.defineLazy(inst._zod, \"pattern\", () => inst._zod.innerType?._zod?.pattern);\n util.defineLazy(inst._zod, \"propValues\", () => inst._zod.innerType?._zod?.propValues);\n util.defineLazy(inst._zod, \"optin\", () => inst._zod.innerType?._zod?.optin ?? undefined);\n util.defineLazy(inst._zod, \"optout\", () => inst._zod.innerType?._zod?.optout ?? undefined);\n inst._zod.parse = (payload, ctx) => {\n const inner = inst._zod.innerType;\n return inner._zod.run(payload, ctx);\n };\n});\nexport const $ZodCustom = /*@__PURE__*/ core.$constructor(\"$ZodCustom\", (inst, def) => {\n checks.$ZodCheck.init(inst, def);\n $ZodType.init(inst, def);\n inst._zod.parse = (payload, _) => {\n return payload;\n };\n inst._zod.check = (payload) => {\n const input = payload.value;\n const r = def.fn(input);\n if (r instanceof Promise) {\n return r.then((r) => handleRefineResult(r, payload, input, inst));\n }\n handleRefineResult(r, payload, input, inst);\n return;\n };\n});\nfunction handleRefineResult(result, payload, input, inst) {\n if (!result) {\n const _iss = {\n code: \"custom\",\n input,\n inst, // incorporates params.error into issue reporting\n path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting\n continue: !inst._zod.def.abort,\n // params: inst._zod.def.params,\n };\n if (inst._zod.def.params)\n _iss.params = inst._zod.def.params;\n payload.issues.push(util.issue(_iss));\n }\n}\n","import * as checks from \"./checks.js\";\nimport * as registries from \"./registries.js\";\nimport * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\n// @__NO_SIDE_EFFECTS__\nexport function _string(Class, params) {\n return new Class({\n type: \"string\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedString(Class, params) {\n return new Class({\n type: \"string\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _email(Class, params) {\n return new Class({\n type: \"string\",\n format: \"email\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _guid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"guid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v4\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v6\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv7(Class, params) {\n return new Class({\n type: \"string\",\n format: \"uuid\",\n check: \"string_format\",\n abort: false,\n version: \"v7\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _emoji(Class, params) {\n return new Class({\n type: \"string\",\n format: \"emoji\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nanoid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"nanoid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid2(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cuid2\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ulid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ulid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _xid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"xid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ksuid(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ksuid\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"ipv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mac(Class, params) {\n return new Class({\n type: \"string\",\n format: \"mac\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv4(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv4\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv6(Class, params) {\n return new Class({\n type: \"string\",\n format: \"cidrv6\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64url(Class, params) {\n return new Class({\n type: \"string\",\n format: \"base64url\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _e164(Class, params) {\n return new Class({\n type: \"string\",\n format: \"e164\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _jwt(Class, params) {\n return new Class({\n type: \"string\",\n format: \"jwt\",\n check: \"string_format\",\n abort: false,\n ...util.normalizeParams(params),\n });\n}\nexport const TimePrecision = {\n Any: null,\n Minute: -1,\n Second: 0,\n Millisecond: 3,\n Microsecond: 6,\n};\n// @__NO_SIDE_EFFECTS__\nexport function _isoDateTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"datetime\",\n check: \"string_format\",\n offset: false,\n local: false,\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDate(Class, params) {\n return new Class({\n type: \"string\",\n format: \"date\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoTime(Class, params) {\n return new Class({\n type: \"string\",\n format: \"time\",\n check: \"string_format\",\n precision: null,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDuration(Class, params) {\n return new Class({\n type: \"string\",\n format: \"duration\",\n check: \"string_format\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _number(Class, params) {\n return new Class({\n type: \"number\",\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedNumber(Class, params) {\n return new Class({\n type: \"number\",\n coerce: true,\n checks: [],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"safeint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float64(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"float64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"int32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint32(Class, params) {\n return new Class({\n type: \"number\",\n check: \"number_format\",\n abort: false,\n format: \"uint32\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _boolean(Class, params) {\n return new Class({\n type: \"boolean\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBoolean(Class, params) {\n return new Class({\n type: \"boolean\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _bigint(Class, params) {\n return new Class({\n type: \"bigint\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBigint(Class, params) {\n return new Class({\n type: \"bigint\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"int64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint64(Class, params) {\n return new Class({\n type: \"bigint\",\n check: \"bigint_format\",\n abort: false,\n format: \"uint64\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _symbol(Class, params) {\n return new Class({\n type: \"symbol\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _undefined(Class, params) {\n return new Class({\n type: \"undefined\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _null(Class, params) {\n return new Class({\n type: \"null\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _any(Class) {\n return new Class({\n type: \"any\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _unknown(Class) {\n return new Class({\n type: \"unknown\",\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _never(Class, params) {\n return new Class({\n type: \"never\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _void(Class, params) {\n return new Class({\n type: \"void\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _date(Class, params) {\n return new Class({\n type: \"date\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedDate(Class, params) {\n return new Class({\n type: \"date\",\n coerce: true,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nan(Class, params) {\n return new Class({\n type: \"nan\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lt(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lte(value, params) {\n return new checks.$ZodCheckLessThan({\n check: \"less_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\n// @__NO_SIDE_EFFECTS__\nexport function _gt(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: false,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _gte(value, params) {\n return new checks.$ZodCheckGreaterThan({\n check: \"greater_than\",\n ...util.normalizeParams(params),\n value,\n inclusive: true,\n });\n}\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\n// @__NO_SIDE_EFFECTS__\nexport function _positive(params) {\n return _gt(0, params);\n}\n// negative\n// @__NO_SIDE_EFFECTS__\nexport function _negative(params) {\n return _lt(0, params);\n}\n// nonpositive\n// @__NO_SIDE_EFFECTS__\nexport function _nonpositive(params) {\n return _lte(0, params);\n}\n// nonnegative\n// @__NO_SIDE_EFFECTS__\nexport function _nonnegative(params) {\n return _gte(0, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function _multipleOf(value, params) {\n return new checks.$ZodCheckMultipleOf({\n check: \"multiple_of\",\n ...util.normalizeParams(params),\n value,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxSize(maximum, params) {\n return new checks.$ZodCheckMaxSize({\n check: \"max_size\",\n ...util.normalizeParams(params),\n maximum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minSize(minimum, params) {\n return new checks.$ZodCheckMinSize({\n check: \"min_size\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _size(size, params) {\n return new checks.$ZodCheckSizeEquals({\n check: \"size_equals\",\n ...util.normalizeParams(params),\n size,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxLength(maximum, params) {\n const ch = new checks.$ZodCheckMaxLength({\n check: \"max_length\",\n ...util.normalizeParams(params),\n maximum,\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minLength(minimum, params) {\n return new checks.$ZodCheckMinLength({\n check: \"min_length\",\n ...util.normalizeParams(params),\n minimum,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _length(length, params) {\n return new checks.$ZodCheckLengthEquals({\n check: \"length_equals\",\n ...util.normalizeParams(params),\n length,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _regex(pattern, params) {\n return new checks.$ZodCheckRegex({\n check: \"string_format\",\n format: \"regex\",\n ...util.normalizeParams(params),\n pattern,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lowercase(params) {\n return new checks.$ZodCheckLowerCase({\n check: \"string_format\",\n format: \"lowercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uppercase(params) {\n return new checks.$ZodCheckUpperCase({\n check: \"string_format\",\n format: \"uppercase\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _includes(includes, params) {\n return new checks.$ZodCheckIncludes({\n check: \"string_format\",\n format: \"includes\",\n ...util.normalizeParams(params),\n includes,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _startsWith(prefix, params) {\n return new checks.$ZodCheckStartsWith({\n check: \"string_format\",\n format: \"starts_with\",\n ...util.normalizeParams(params),\n prefix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _endsWith(suffix, params) {\n return new checks.$ZodCheckEndsWith({\n check: \"string_format\",\n format: \"ends_with\",\n ...util.normalizeParams(params),\n suffix,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _property(property, schema, params) {\n return new checks.$ZodCheckProperty({\n check: \"property\",\n property,\n schema,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mime(types, params) {\n return new checks.$ZodCheckMimeType({\n check: \"mime_type\",\n mime: types,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _overwrite(tx) {\n return new checks.$ZodCheckOverwrite({\n check: \"overwrite\",\n tx,\n });\n}\n// normalize\n// @__NO_SIDE_EFFECTS__\nexport function _normalize(form) {\n return _overwrite((input) => input.normalize(form));\n}\n// trim\n// @__NO_SIDE_EFFECTS__\nexport function _trim() {\n return _overwrite((input) => input.trim());\n}\n// toLowerCase\n// @__NO_SIDE_EFFECTS__\nexport function _toLowerCase() {\n return _overwrite((input) => input.toLowerCase());\n}\n// toUpperCase\n// @__NO_SIDE_EFFECTS__\nexport function _toUpperCase() {\n return _overwrite((input) => input.toUpperCase());\n}\n// slugify\n// @__NO_SIDE_EFFECTS__\nexport function _slugify() {\n return _overwrite((input) => util.slugify(input));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _array(Class, element, params) {\n return new Class({\n type: \"array\",\n element,\n // get element() {\n // return element;\n // },\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _union(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n ...util.normalizeParams(params),\n });\n}\nexport function _xor(Class, options, params) {\n return new Class({\n type: \"union\",\n options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _discriminatedUnion(Class, discriminator, options, params) {\n return new Class({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _intersection(Class, left, right) {\n return new Class({\n type: \"intersection\",\n left,\n right,\n });\n}\n// export function _tuple(\n// Class: util.SchemaClass<schemas.$ZodTuple>,\n// items: [],\n// params?: string | $ZodTupleParams\n// ): schemas.$ZodTuple<[], null>;\n// @__NO_SIDE_EFFECTS__\nexport function _tuple(Class, items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof schemas.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new Class({\n type: \"tuple\",\n items,\n rest,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _record(Class, keyType, valueType, params) {\n return new Class({\n type: \"record\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _map(Class, keyType, valueType, params) {\n return new Class({\n type: \"map\",\n keyType,\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _set(Class, valueType, params) {\n return new Class({\n type: \"set\",\n valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _enum(Class, values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n // if (Array.isArray(values)) {\n // for (const value of values) {\n // entries[value] = value;\n // }\n // } else {\n // Object.assign(entries, values);\n // }\n // const entries: util.EnumLike = {};\n // for (const val of values) {\n // entries[val] = val;\n // }\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function _nativeEnum(Class, entries, params) {\n return new Class({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _literal(Class, value, params) {\n return new Class({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _file(Class, params) {\n return new Class({\n type: \"file\",\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _transform(Class, fn) {\n return new Class({\n type: \"transform\",\n transform: fn,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _optional(Class, innerType) {\n return new Class({\n type: \"optional\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nullable(Class, innerType) {\n return new Class({\n type: \"nullable\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _default(Class, innerType, defaultValue) {\n return new Class({\n type: \"default\",\n innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nonoptional(Class, innerType, params) {\n return new Class({\n type: \"nonoptional\",\n innerType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _success(Class, innerType) {\n return new Class({\n type: \"success\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _catch(Class, innerType, catchValue) {\n return new Class({\n type: \"catch\",\n innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _pipe(Class, in_, out) {\n return new Class({\n type: \"pipe\",\n in: in_,\n out,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _readonly(Class, innerType) {\n return new Class({\n type: \"readonly\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _templateLiteral(Class, parts, params) {\n return new Class({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lazy(Class, getter) {\n return new Class({\n type: \"lazy\",\n getter,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _promise(Class, innerType) {\n return new Class({\n type: \"promise\",\n innerType,\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _custom(Class, fn, _params) {\n const norm = util.normalizeParams(_params);\n norm.abort ?? (norm.abort = true); // default to abort:false\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...norm,\n });\n return schema;\n}\n// same as _custom but defaults to abort:false\n// @__NO_SIDE_EFFECTS__\nexport function _refine(Class, fn, _params) {\n const schema = new Class({\n type: \"custom\",\n check: \"custom\",\n fn: fn,\n ...util.normalizeParams(_params),\n });\n return schema;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _superRefine(fn) {\n const ch = _check((payload) => {\n payload.addIssue = (issue) => {\n if (typeof issue === \"string\") {\n payload.issues.push(util.issue(issue, payload.value, ch._zod.def));\n }\n else {\n // for Zod 3 backwards compatibility\n const _issue = issue;\n if (_issue.fatal)\n _issue.continue = false;\n _issue.code ?? (_issue.code = \"custom\");\n _issue.input ?? (_issue.input = payload.value);\n _issue.inst ?? (_issue.inst = ch);\n _issue.continue ?? (_issue.continue = !ch._zod.def.abort); // abort is always undefined, so this is always true...\n payload.issues.push(util.issue(_issue));\n }\n };\n return fn(payload.value, payload);\n });\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _check(fn, params) {\n const ch = new checks.$ZodCheck({\n check: \"custom\",\n ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function describe(description) {\n const ch = new checks.$ZodCheck({ check: \"describe\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, description });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function meta(metadata) {\n const ch = new checks.$ZodCheck({ check: \"meta\" });\n ch._zod.onattach = [\n (inst) => {\n const existing = registries.globalRegistry.get(inst) ?? {};\n registries.globalRegistry.add(inst, { ...existing, ...metadata });\n },\n ];\n ch._zod.check = () => { }; // no-op check\n return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringbool(Classes, _params) {\n const params = util.normalizeParams(_params);\n let truthyArray = params.truthy ?? [\"true\", \"1\", \"yes\", \"on\", \"y\", \"enabled\"];\n let falsyArray = params.falsy ?? [\"false\", \"0\", \"no\", \"off\", \"n\", \"disabled\"];\n if (params.case !== \"sensitive\") {\n truthyArray = truthyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n falsyArray = falsyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n }\n const truthySet = new Set(truthyArray);\n const falsySet = new Set(falsyArray);\n const _Codec = Classes.Codec ?? schemas.$ZodCodec;\n const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;\n const _String = Classes.String ?? schemas.$ZodString;\n const stringSchema = new _String({ type: \"string\", error: params.error });\n const booleanSchema = new _Boolean({ type: \"boolean\", error: params.error });\n const codec = new _Codec({\n type: \"pipe\",\n in: stringSchema,\n out: booleanSchema,\n transform: ((input, payload) => {\n let data = input;\n if (params.case !== \"sensitive\")\n data = data.toLowerCase();\n if (truthySet.has(data)) {\n return true;\n }\n else if (falsySet.has(data)) {\n return false;\n }\n else {\n payload.issues.push({\n code: \"invalid_value\",\n expected: \"stringbool\",\n values: [...truthySet, ...falsySet],\n input: payload.value,\n inst: codec,\n continue: false,\n });\n return {};\n }\n }),\n reverseTransform: ((input, _payload) => {\n if (input === true) {\n return truthyArray[0] || \"true\";\n }\n else {\n return falsyArray[0] || \"false\";\n }\n }),\n error: params.error,\n });\n return codec;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringFormat(Class, format, fnOrRegex, _params = {}) {\n const params = util.normalizeParams(_params);\n const def = {\n ...util.normalizeParams(_params),\n check: \"string_format\",\n type: \"string\",\n format,\n fn: typeof fnOrRegex === \"function\" ? fnOrRegex : (val) => fnOrRegex.test(val),\n ...params,\n };\n if (fnOrRegex instanceof RegExp) {\n def.pattern = fnOrRegex;\n }\n const inst = new Class(def);\n return inst;\n}\n","import * as core from \"../core/index.js\";\nimport * as util from \"../core/util.js\";\nimport * as parse from \"./parse.js\";\nexport const ZodMiniType = /*@__PURE__*/ core.$constructor(\"ZodMiniType\", (inst, def) => {\n if (!inst._zod)\n throw new Error(\"Uninitialized schema in ZodMiniType.\");\n core.$ZodType.init(inst, def);\n inst.def = def;\n inst.type = def.type;\n inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });\n inst.safeParse = (data, params) => parse.safeParse(inst, data, params);\n inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });\n inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);\n inst.check = (...checks) => {\n return inst.clone({\n ...def,\n checks: [\n ...(def.checks ?? []),\n ...checks.map((ch) => typeof ch === \"function\" ? { _zod: { check: ch, def: { check: \"custom\" }, onattach: [] } } : ch),\n ],\n }, { parent: true });\n };\n inst.with = inst.check;\n inst.clone = (_def, params) => core.clone(inst, _def, params);\n inst.brand = () => inst;\n inst.register = ((reg, meta) => {\n reg.add(inst, meta);\n return inst;\n });\n inst.apply = (fn) => fn(inst);\n});\nexport const ZodMiniString = /*@__PURE__*/ core.$constructor(\"ZodMiniString\", (inst, def) => {\n core.$ZodString.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function string(params) {\n return core._string(ZodMiniString, params);\n}\nexport const ZodMiniStringFormat = /*@__PURE__*/ core.$constructor(\"ZodMiniStringFormat\", (inst, def) => {\n core.$ZodStringFormat.init(inst, def);\n ZodMiniString.init(inst, def);\n});\nexport const ZodMiniEmail = /*@__PURE__*/ core.$constructor(\"ZodMiniEmail\", (inst, def) => {\n core.$ZodEmail.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function email(params) {\n return core._email(ZodMiniEmail, params);\n}\nexport const ZodMiniGUID = /*@__PURE__*/ core.$constructor(\"ZodMiniGUID\", (inst, def) => {\n core.$ZodGUID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function guid(params) {\n return core._guid(ZodMiniGUID, params);\n}\nexport const ZodMiniUUID = /*@__PURE__*/ core.$constructor(\"ZodMiniUUID\", (inst, def) => {\n core.$ZodUUID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function uuid(params) {\n return core._uuid(ZodMiniUUID, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function uuidv4(params) {\n return core._uuidv4(ZodMiniUUID, params);\n}\n// ZodMiniUUIDv6\n// @__NO_SIDE_EFFECTS__\nexport function uuidv6(params) {\n return core._uuidv6(ZodMiniUUID, params);\n}\n// ZodMiniUUIDv7\n// @__NO_SIDE_EFFECTS__\nexport function uuidv7(params) {\n return core._uuidv7(ZodMiniUUID, params);\n}\nexport const ZodMiniURL = /*@__PURE__*/ core.$constructor(\"ZodMiniURL\", (inst, def) => {\n core.$ZodURL.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function url(params) {\n return core._url(ZodMiniURL, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function httpUrl(params) {\n return core._url(ZodMiniURL, {\n protocol: /^https?$/,\n hostname: core.regexes.domain,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniEmoji = /*@__PURE__*/ core.$constructor(\"ZodMiniEmoji\", (inst, def) => {\n core.$ZodEmoji.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function emoji(params) {\n return core._emoji(ZodMiniEmoji, params);\n}\nexport const ZodMiniNanoID = /*@__PURE__*/ core.$constructor(\"ZodMiniNanoID\", (inst, def) => {\n core.$ZodNanoID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function nanoid(params) {\n return core._nanoid(ZodMiniNanoID, params);\n}\nexport const ZodMiniCUID = /*@__PURE__*/ core.$constructor(\"ZodMiniCUID\", (inst, def) => {\n core.$ZodCUID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function cuid(params) {\n return core._cuid(ZodMiniCUID, params);\n}\nexport const ZodMiniCUID2 = /*@__PURE__*/ core.$constructor(\"ZodMiniCUID2\", (inst, def) => {\n core.$ZodCUID2.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function cuid2(params) {\n return core._cuid2(ZodMiniCUID2, params);\n}\nexport const ZodMiniULID = /*@__PURE__*/ core.$constructor(\"ZodMiniULID\", (inst, def) => {\n core.$ZodULID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function ulid(params) {\n return core._ulid(ZodMiniULID, params);\n}\nexport const ZodMiniXID = /*@__PURE__*/ core.$constructor(\"ZodMiniXID\", (inst, def) => {\n core.$ZodXID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function xid(params) {\n return core._xid(ZodMiniXID, params);\n}\nexport const ZodMiniKSUID = /*@__PURE__*/ core.$constructor(\"ZodMiniKSUID\", (inst, def) => {\n core.$ZodKSUID.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function ksuid(params) {\n return core._ksuid(ZodMiniKSUID, params);\n}\nexport const ZodMiniIPv4 = /*@__PURE__*/ core.$constructor(\"ZodMiniIPv4\", (inst, def) => {\n core.$ZodIPv4.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function ipv4(params) {\n return core._ipv4(ZodMiniIPv4, params);\n}\nexport const ZodMiniIPv6 = /*@__PURE__*/ core.$constructor(\"ZodMiniIPv6\", (inst, def) => {\n core.$ZodIPv6.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function ipv6(params) {\n return core._ipv6(ZodMiniIPv6, params);\n}\nexport const ZodMiniCIDRv4 = /*@__PURE__*/ core.$constructor(\"ZodMiniCIDRv4\", (inst, def) => {\n core.$ZodCIDRv4.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function cidrv4(params) {\n return core._cidrv4(ZodMiniCIDRv4, params);\n}\nexport const ZodMiniCIDRv6 = /*@__PURE__*/ core.$constructor(\"ZodMiniCIDRv6\", (inst, def) => {\n core.$ZodCIDRv6.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function cidrv6(params) {\n return core._cidrv6(ZodMiniCIDRv6, params);\n}\nexport const ZodMiniMAC = /*@__PURE__*/ core.$constructor(\"ZodMiniMAC\", (inst, def) => {\n core.$ZodMAC.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function mac(params) {\n return core._mac(ZodMiniMAC, params);\n}\nexport const ZodMiniBase64 = /*@__PURE__*/ core.$constructor(\"ZodMiniBase64\", (inst, def) => {\n core.$ZodBase64.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function base64(params) {\n return core._base64(ZodMiniBase64, params);\n}\nexport const ZodMiniBase64URL = /*@__PURE__*/ core.$constructor(\"ZodMiniBase64URL\", (inst, def) => {\n core.$ZodBase64URL.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function base64url(params) {\n return core._base64url(ZodMiniBase64URL, params);\n}\nexport const ZodMiniE164 = /*@__PURE__*/ core.$constructor(\"ZodMiniE164\", (inst, def) => {\n core.$ZodE164.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function e164(params) {\n return core._e164(ZodMiniE164, params);\n}\nexport const ZodMiniJWT = /*@__PURE__*/ core.$constructor(\"ZodMiniJWT\", (inst, def) => {\n core.$ZodJWT.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function jwt(params) {\n return core._jwt(ZodMiniJWT, params);\n}\nexport const ZodMiniCustomStringFormat = /*@__PURE__*/ core.$constructor(\"ZodMiniCustomStringFormat\", (inst, def) => {\n core.$ZodCustomStringFormat.init(inst, def);\n ZodMiniStringFormat.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function stringFormat(format, fnOrRegex, _params = {}) {\n return core._stringFormat(ZodMiniCustomStringFormat, format, fnOrRegex, _params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function hostname(_params) {\n return core._stringFormat(ZodMiniCustomStringFormat, \"hostname\", core.regexes.hostname, _params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function hex(_params) {\n return core._stringFormat(ZodMiniCustomStringFormat, \"hex\", core.regexes.hex, _params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function hash(alg, params) {\n const enc = params?.enc ?? \"hex\";\n const format = `${alg}_${enc}`;\n const regex = core.regexes[format];\n // check for unrecognized format\n if (!regex)\n throw new Error(`Unrecognized hash format: ${format}`);\n return core._stringFormat(ZodMiniCustomStringFormat, format, regex, params);\n}\nexport const ZodMiniNumber = /*@__PURE__*/ core.$constructor(\"ZodMiniNumber\", (inst, def) => {\n core.$ZodNumber.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function number(params) {\n return core._number(ZodMiniNumber, params);\n}\nexport const ZodMiniNumberFormat = /*@__PURE__*/ core.$constructor(\"ZodMiniNumberFormat\", (inst, def) => {\n core.$ZodNumberFormat.init(inst, def);\n ZodMiniNumber.init(inst, def);\n});\n// int\n// @__NO_SIDE_EFFECTS__\nexport function int(params) {\n return core._int(ZodMiniNumberFormat, params);\n}\n// float32\n// @__NO_SIDE_EFFECTS__\nexport function float32(params) {\n return core._float32(ZodMiniNumberFormat, params);\n}\n// float64\n// @__NO_SIDE_EFFECTS__\nexport function float64(params) {\n return core._float64(ZodMiniNumberFormat, params);\n}\n// int32\n// @__NO_SIDE_EFFECTS__\nexport function int32(params) {\n return core._int32(ZodMiniNumberFormat, params);\n}\n// uint32\n// @__NO_SIDE_EFFECTS__\nexport function uint32(params) {\n return core._uint32(ZodMiniNumberFormat, params);\n}\nexport const ZodMiniBoolean = /*@__PURE__*/ core.$constructor(\"ZodMiniBoolean\", (inst, def) => {\n core.$ZodBoolean.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function boolean(params) {\n return core._boolean(ZodMiniBoolean, params);\n}\nexport const ZodMiniBigInt = /*@__PURE__*/ core.$constructor(\"ZodMiniBigInt\", (inst, def) => {\n core.$ZodBigInt.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function bigint(params) {\n return core._bigint(ZodMiniBigInt, params);\n}\nexport const ZodMiniBigIntFormat = /*@__PURE__*/ core.$constructor(\"ZodMiniBigIntFormat\", (inst, def) => {\n core.$ZodBigIntFormat.init(inst, def);\n ZodMiniBigInt.init(inst, def);\n});\n// int64\n// @__NO_SIDE_EFFECTS__\nexport function int64(params) {\n return core._int64(ZodMiniBigIntFormat, params);\n}\n// uint64\n// @__NO_SIDE_EFFECTS__\nexport function uint64(params) {\n return core._uint64(ZodMiniBigIntFormat, params);\n}\nexport const ZodMiniSymbol = /*@__PURE__*/ core.$constructor(\"ZodMiniSymbol\", (inst, def) => {\n core.$ZodSymbol.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function symbol(params) {\n return core._symbol(ZodMiniSymbol, params);\n}\nexport const ZodMiniUndefined = /*@__PURE__*/ core.$constructor(\"ZodMiniUndefined\", (inst, def) => {\n core.$ZodUndefined.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nfunction _undefined(params) {\n return core._undefined(ZodMiniUndefined, params);\n}\nexport { _undefined as undefined };\nexport const ZodMiniNull = /*@__PURE__*/ core.$constructor(\"ZodMiniNull\", (inst, def) => {\n core.$ZodNull.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nfunction _null(params) {\n return core._null(ZodMiniNull, params);\n}\nexport { _null as null };\nexport const ZodMiniAny = /*@__PURE__*/ core.$constructor(\"ZodMiniAny\", (inst, def) => {\n core.$ZodAny.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function any() {\n return core._any(ZodMiniAny);\n}\nexport const ZodMiniUnknown = /*@__PURE__*/ core.$constructor(\"ZodMiniUnknown\", (inst, def) => {\n core.$ZodUnknown.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function unknown() {\n return core._unknown(ZodMiniUnknown);\n}\nexport const ZodMiniNever = /*@__PURE__*/ core.$constructor(\"ZodMiniNever\", (inst, def) => {\n core.$ZodNever.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function never(params) {\n return core._never(ZodMiniNever, params);\n}\nexport const ZodMiniVoid = /*@__PURE__*/ core.$constructor(\"ZodMiniVoid\", (inst, def) => {\n core.$ZodVoid.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nfunction _void(params) {\n return core._void(ZodMiniVoid, params);\n}\nexport { _void as void };\nexport const ZodMiniDate = /*@__PURE__*/ core.$constructor(\"ZodMiniDate\", (inst, def) => {\n core.$ZodDate.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function date(params) {\n return core._date(ZodMiniDate, params);\n}\nexport const ZodMiniArray = /*@__PURE__*/ core.$constructor(\"ZodMiniArray\", (inst, def) => {\n core.$ZodArray.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function array(element, params) {\n return new ZodMiniArray({\n type: \"array\",\n element: element,\n ...util.normalizeParams(params),\n });\n}\n// .keyof\n// @__NO_SIDE_EFFECTS__\nexport function keyof(schema) {\n const shape = schema._zod.def.shape;\n return _enum(Object.keys(shape));\n}\nexport const ZodMiniObject = /*@__PURE__*/ core.$constructor(\"ZodMiniObject\", (inst, def) => {\n core.$ZodObject.init(inst, def);\n ZodMiniType.init(inst, def);\n util.defineLazy(inst, \"shape\", () => def.shape);\n});\n// @__NO_SIDE_EFFECTS__\nexport function object(shape, params) {\n const def = {\n type: \"object\",\n shape: shape ?? {},\n ...util.normalizeParams(params),\n };\n return new ZodMiniObject(def);\n}\n// strictObject\n// @__NO_SIDE_EFFECTS__\nexport function strictObject(shape, params) {\n return new ZodMiniObject({\n type: \"object\",\n shape,\n catchall: never(),\n ...util.normalizeParams(params),\n });\n}\n// looseObject\n// @__NO_SIDE_EFFECTS__\nexport function looseObject(shape, params) {\n return new ZodMiniObject({\n type: \"object\",\n shape,\n catchall: unknown(),\n ...util.normalizeParams(params),\n });\n}\n// object methods\n// @__NO_SIDE_EFFECTS__\nexport function extend(schema, shape) {\n return util.extend(schema, shape);\n}\n// @__NO_SIDE_EFFECTS__\nexport function safeExtend(schema, shape) {\n return util.safeExtend(schema, shape);\n}\n// @__NO_SIDE_EFFECTS__\nexport function merge(schema, shape) {\n return util.extend(schema, shape);\n}\n// @__NO_SIDE_EFFECTS__\nexport function pick(schema, mask) {\n return util.pick(schema, mask);\n}\n// .omit\n// @__NO_SIDE_EFFECTS__\nexport function omit(schema, mask) {\n return util.omit(schema, mask);\n}\n// @__NO_SIDE_EFFECTS__\nexport function partial(schema, mask) {\n return util.partial(ZodMiniOptional, schema, mask);\n}\n// @__NO_SIDE_EFFECTS__\nexport function required(schema, mask) {\n return util.required(ZodMiniNonOptional, schema, mask);\n}\n// @__NO_SIDE_EFFECTS__\nexport function catchall(inst, catchall) {\n return inst.clone({ ...inst._zod.def, catchall: catchall });\n}\nexport const ZodMiniUnion = /*@__PURE__*/ core.$constructor(\"ZodMiniUnion\", (inst, def) => {\n core.$ZodUnion.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function union(options, params) {\n return new ZodMiniUnion({\n type: \"union\",\n options: options,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniXor = /*@__PURE__*/ core.$constructor(\"ZodMiniXor\", (inst, def) => {\n ZodMiniUnion.init(inst, def);\n core.$ZodXor.init(inst, def);\n});\n/** Creates an exclusive union (XOR) where exactly one option must match.\n * Unlike regular unions that succeed when any option matches, xor fails if\n * zero or more than one option matches the input. */\nexport function xor(options, params) {\n return new ZodMiniXor({\n type: \"union\",\n options: options,\n inclusive: false,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniDiscriminatedUnion = /*@__PURE__*/ core.$constructor(\"ZodMiniDiscriminatedUnion\", (inst, def) => {\n core.$ZodDiscriminatedUnion.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function discriminatedUnion(discriminator, options, params) {\n return new ZodMiniDiscriminatedUnion({\n type: \"union\",\n options,\n discriminator,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniIntersection = /*@__PURE__*/ core.$constructor(\"ZodMiniIntersection\", (inst, def) => {\n core.$ZodIntersection.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function intersection(left, right) {\n return new ZodMiniIntersection({\n type: \"intersection\",\n left: left,\n right: right,\n });\n}\nexport const ZodMiniTuple = /*@__PURE__*/ core.$constructor(\"ZodMiniTuple\", (inst, def) => {\n core.$ZodTuple.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function tuple(items, _paramsOrRest, _params) {\n const hasRest = _paramsOrRest instanceof core.$ZodType;\n const params = hasRest ? _params : _paramsOrRest;\n const rest = hasRest ? _paramsOrRest : null;\n return new ZodMiniTuple({\n type: \"tuple\",\n items: items,\n rest,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniRecord = /*@__PURE__*/ core.$constructor(\"ZodMiniRecord\", (inst, def) => {\n core.$ZodRecord.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function record(keyType, valueType, params) {\n return new ZodMiniRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\n// @__NO_SIDE_EFFECTS__\nexport function partialRecord(keyType, valueType, params) {\n const k = core.clone(keyType);\n k._zod.values = undefined;\n return new ZodMiniRecord({\n type: \"record\",\n keyType: k,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport function looseRecord(keyType, valueType, params) {\n return new ZodMiniRecord({\n type: \"record\",\n keyType,\n valueType: valueType,\n mode: \"loose\",\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniMap = /*@__PURE__*/ core.$constructor(\"ZodMiniMap\", (inst, def) => {\n core.$ZodMap.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function map(keyType, valueType, params) {\n return new ZodMiniMap({\n type: \"map\",\n keyType: keyType,\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniSet = /*@__PURE__*/ core.$constructor(\"ZodMiniSet\", (inst, def) => {\n core.$ZodSet.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function set(valueType, params) {\n return new ZodMiniSet({\n type: \"set\",\n valueType: valueType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniEnum = /*@__PURE__*/ core.$constructor(\"ZodMiniEnum\", (inst, def) => {\n core.$ZodEnum.init(inst, def);\n ZodMiniType.init(inst, def);\n inst.options = Object.values(def.entries);\n});\n// @__NO_SIDE_EFFECTS__\nfunction _enum(values, params) {\n const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n return new ZodMiniEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport { _enum as enum };\n// @__NO_SIDE_EFFECTS__\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function nativeEnum(entries, params) {\n return new ZodMiniEnum({\n type: \"enum\",\n entries,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniLiteral = /*@__PURE__*/ core.$constructor(\"ZodMiniLiteral\", (inst, def) => {\n core.$ZodLiteral.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function literal(value, params) {\n return new ZodMiniLiteral({\n type: \"literal\",\n values: Array.isArray(value) ? value : [value],\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniFile = /*@__PURE__*/ core.$constructor(\"ZodMiniFile\", (inst, def) => {\n core.$ZodFile.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function file(params) {\n return core._file(ZodMiniFile, params);\n}\nexport const ZodMiniTransform = /*@__PURE__*/ core.$constructor(\"ZodMiniTransform\", (inst, def) => {\n core.$ZodTransform.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function transform(fn) {\n return new ZodMiniTransform({\n type: \"transform\",\n transform: fn,\n });\n}\nexport const ZodMiniOptional = /*@__PURE__*/ core.$constructor(\"ZodMiniOptional\", (inst, def) => {\n core.$ZodOptional.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function optional(innerType) {\n return new ZodMiniOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodMiniExactOptional = /*@__PURE__*/ core.$constructor(\"ZodMiniExactOptional\", (inst, def) => {\n core.$ZodExactOptional.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function exactOptional(innerType) {\n return new ZodMiniExactOptional({\n type: \"optional\",\n innerType: innerType,\n });\n}\nexport const ZodMiniNullable = /*@__PURE__*/ core.$constructor(\"ZodMiniNullable\", (inst, def) => {\n core.$ZodNullable.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function nullable(innerType) {\n return new ZodMiniNullable({\n type: \"nullable\",\n innerType: innerType,\n });\n}\n// nullish\n// @__NO_SIDE_EFFECTS__\nexport function nullish(innerType) {\n return optional(nullable(innerType));\n}\nexport const ZodMiniDefault = /*@__PURE__*/ core.$constructor(\"ZodMiniDefault\", (inst, def) => {\n core.$ZodDefault.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function _default(innerType, defaultValue) {\n return new ZodMiniDefault({\n type: \"default\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodMiniPrefault = /*@__PURE__*/ core.$constructor(\"ZodMiniPrefault\", (inst, def) => {\n core.$ZodPrefault.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function prefault(innerType, defaultValue) {\n return new ZodMiniPrefault({\n type: \"prefault\",\n innerType: innerType,\n get defaultValue() {\n return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n },\n });\n}\nexport const ZodMiniNonOptional = /*@__PURE__*/ core.$constructor(\"ZodMiniNonOptional\", (inst, def) => {\n core.$ZodNonOptional.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function nonoptional(innerType, params) {\n return new ZodMiniNonOptional({\n type: \"nonoptional\",\n innerType: innerType,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniSuccess = /*@__PURE__*/ core.$constructor(\"ZodMiniSuccess\", (inst, def) => {\n core.$ZodSuccess.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function success(innerType) {\n return new ZodMiniSuccess({\n type: \"success\",\n innerType: innerType,\n });\n}\nexport const ZodMiniCatch = /*@__PURE__*/ core.$constructor(\"ZodMiniCatch\", (inst, def) => {\n core.$ZodCatch.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nfunction _catch(innerType, catchValue) {\n return new ZodMiniCatch({\n type: \"catch\",\n innerType: innerType,\n catchValue: (typeof catchValue === \"function\" ? catchValue : () => catchValue),\n });\n}\nexport { _catch as catch };\nexport const ZodMiniNaN = /*@__PURE__*/ core.$constructor(\"ZodMiniNaN\", (inst, def) => {\n core.$ZodNaN.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function nan(params) {\n return core._nan(ZodMiniNaN, params);\n}\nexport const ZodMiniPipe = /*@__PURE__*/ core.$constructor(\"ZodMiniPipe\", (inst, def) => {\n core.$ZodPipe.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function pipe(in_, out) {\n return new ZodMiniPipe({\n type: \"pipe\",\n in: in_,\n out: out,\n });\n}\nexport const ZodMiniCodec = /*@__PURE__*/ core.$constructor(\"ZodMiniCodec\", (inst, def) => {\n ZodMiniPipe.init(inst, def);\n core.$ZodCodec.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function codec(in_, out, params) {\n return new ZodMiniCodec({\n type: \"pipe\",\n in: in_,\n out: out,\n transform: params.decode,\n reverseTransform: params.encode,\n });\n}\nexport const ZodMiniReadonly = /*@__PURE__*/ core.$constructor(\"ZodMiniReadonly\", (inst, def) => {\n core.$ZodReadonly.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function readonly(innerType) {\n return new ZodMiniReadonly({\n type: \"readonly\",\n innerType: innerType,\n });\n}\nexport const ZodMiniTemplateLiteral = /*@__PURE__*/ core.$constructor(\"ZodMiniTemplateLiteral\", (inst, def) => {\n core.$ZodTemplateLiteral.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function templateLiteral(parts, params) {\n return new ZodMiniTemplateLiteral({\n type: \"template_literal\",\n parts,\n ...util.normalizeParams(params),\n });\n}\nexport const ZodMiniLazy = /*@__PURE__*/ core.$constructor(\"ZodMiniLazy\", (inst, def) => {\n core.$ZodLazy.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// export function lazy<T extends object>(getter: () => T): T {\n// return util.createTransparentProxy<T>(getter);\n// }\n// @__NO_SIDE_EFFECTS__\nfunction _lazy(getter) {\n return new ZodMiniLazy({\n type: \"lazy\",\n getter: getter,\n });\n}\nexport { _lazy as lazy };\nexport const ZodMiniPromise = /*@__PURE__*/ core.$constructor(\"ZodMiniPromise\", (inst, def) => {\n core.$ZodPromise.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function promise(innerType) {\n return new ZodMiniPromise({\n type: \"promise\",\n innerType: innerType,\n });\n}\nexport const ZodMiniCustom = /*@__PURE__*/ core.$constructor(\"ZodMiniCustom\", (inst, def) => {\n core.$ZodCustom.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// custom checks\n// @__NO_SIDE_EFFECTS__\nexport function check(fn, params) {\n const ch = new core.$ZodCheck({\n check: \"custom\",\n ...util.normalizeParams(params),\n });\n ch._zod.check = fn;\n return ch;\n}\n// ZodCustom\n// custom schema\n// @__NO_SIDE_EFFECTS__\nexport function custom(fn, _params) {\n return core._custom(ZodMiniCustom, fn ?? (() => true), _params);\n}\n// refine\n// @__NO_SIDE_EFFECTS__\nexport function refine(fn, _params = {}) {\n return core._refine(ZodMiniCustom, fn, _params);\n}\n// superRefine\n// @__NO_SIDE_EFFECTS__\nexport function superRefine(fn) {\n return core._superRefine(fn);\n}\n// Re-export describe and meta from core\nexport const describe = core.describe;\nexport const meta = core.meta;\n// instanceof\nclass Class {\n constructor(..._args) { }\n}\n// @__NO_SIDE_EFFECTS__\nfunction _instanceof(cls, params = {}) {\n const inst = custom((data) => data instanceof cls, params);\n inst._zod.bag.Class = cls;\n // Override check to emit invalid_type instead of custom\n inst._zod.check = (payload) => {\n if (!(payload.value instanceof cls)) {\n payload.issues.push({\n code: \"invalid_type\",\n expected: cls.name,\n input: payload.value,\n inst,\n path: [...(inst._zod.def.path ?? [])],\n });\n }\n };\n return inst;\n}\nexport { _instanceof as instanceof };\n// stringbool\nexport const stringbool = (...args) => core._stringbool({\n Codec: ZodMiniCodec,\n Boolean: ZodMiniBoolean,\n String: ZodMiniString,\n}, ...args);\n// @__NO_SIDE_EFFECTS__\nexport function json() {\n const jsonSchema = _lazy(() => {\n return union([string(), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);\n });\n return jsonSchema;\n}\nexport const ZodMiniFunction = /*@__PURE__*/ core.$constructor(\"ZodMiniFunction\", (inst, def) => {\n core.$ZodFunction.init(inst, def);\n ZodMiniType.init(inst, def);\n});\n// @__NO_SIDE_EFFECTS__\nexport function _function(params) {\n return new ZodMiniFunction({\n type: \"function\",\n input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),\n output: params?.output ?? unknown(),\n });\n}\nexport { _function as function };\n","import * as core from \"../core/index.js\";\nimport * as schemas from \"./schemas.js\";\n// @__NO_SIDE_EFFECTS__\nexport function string(params) {\n return core._coercedString(schemas.ZodMiniString, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function number(params) {\n return core._coercedNumber(schemas.ZodMiniNumber, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function boolean(params) {\n return core._coercedBoolean(schemas.ZodMiniBoolean, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function bigint(params) {\n return core._coercedBigint(schemas.ZodMiniBigInt, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function date(params) {\n return core._coercedDate(schemas.ZodMiniDate, params);\n}\n","import * as z from \"zod/mini\";\n\n//#region upstream/framework/lib/property/input/common.ts\nconst BasePropertySchema = z.object({\n\tdisplayName: z.string(),\n\tdescription: z.optional(z.string()),\n\tadvanced: z.optional(z.boolean()),\n\twidth: z.optional(z.enum([\"half\", \"full\"])),\n\ticon: z.optional(z.string()),\n\tplaceholder: z.optional(z.string())\n});\nconst TPropertyValue = (_T, propertyType) => z.object({\n\ttype: z.literal(propertyType),\n\trequired: z.boolean(),\n\tdefaultValue: z.optional(z.any())\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/property-type.ts\nlet PropertyType = /* @__PURE__ */ function(PropertyType) {\n\tPropertyType[\"SHORT_TEXT\"] = \"SHORT_TEXT\";\n\tPropertyType[\"LONG_TEXT\"] = \"LONG_TEXT\";\n\tPropertyType[\"RICH_TEXT\"] = \"RICH_TEXT\";\n\tPropertyType[\"MARKDOWN\"] = \"MARKDOWN\";\n\tPropertyType[\"DROPDOWN\"] = \"DROPDOWN\";\n\tPropertyType[\"STATIC_DROPDOWN\"] = \"STATIC_DROPDOWN\";\n\tPropertyType[\"NUMBER\"] = \"NUMBER\";\n\tPropertyType[\"CHECKBOX\"] = \"CHECKBOX\";\n\tPropertyType[\"OAUTH2\"] = \"OAUTH2\";\n\tPropertyType[\"SECRET_TEXT\"] = \"SECRET_TEXT\";\n\tPropertyType[\"ARRAY\"] = \"ARRAY\";\n\tPropertyType[\"OBJECT\"] = \"OBJECT\";\n\tPropertyType[\"BASIC_AUTH\"] = \"BASIC_AUTH\";\n\tPropertyType[\"JSON\"] = \"JSON\";\n\tPropertyType[\"MULTI_SELECT_DROPDOWN\"] = \"MULTI_SELECT_DROPDOWN\";\n\tPropertyType[\"STATIC_MULTI_SELECT_DROPDOWN\"] = \"STATIC_MULTI_SELECT_DROPDOWN\";\n\tPropertyType[\"DYNAMIC\"] = \"DYNAMIC\";\n\tPropertyType[\"CUSTOM_AUTH\"] = \"CUSTOM_AUTH\";\n\tPropertyType[\"OIDC\"] = \"OIDC\";\n\tPropertyType[\"DATE_TIME\"] = \"DATE_TIME\";\n\tPropertyType[\"DATE_RANGE\"] = \"DATE_RANGE\";\n\tPropertyType[\"FILE\"] = \"FILE\";\n\tPropertyType[\"CUSTOM\"] = \"CUSTOM\";\n\tPropertyType[\"COLOR\"] = \"COLOR\";\n\treturn PropertyType;\n}({});\n\n//#endregion\n//#region upstream/framework/lib/property/input/text-property.ts\nconst ShortTextProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.string(), \"SHORT_TEXT\").shape\n});\nconst LongTextProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.string(), \"LONG_TEXT\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/dropdown/common.ts\nconst DropdownOption = z.object({\n\tlabel: z.string(),\n\tvalue: z.unknown(),\n\tdescription: z.optional(z.string()),\n\ticon: z.optional(z.string())\n});\nconst DropdownState = z.object({\n\tdisabled: z.optional(z.boolean()),\n\tplaceholder: z.optional(z.string()),\n\toptions: z.array(DropdownOption)\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/dropdown/static-dropdown.ts\nconst StaticDropdownDisplay = z.enum([\"cards\"]);\nconst StaticDropdownProperty = z.object({\n\t...BasePropertySchema.shape,\n\toptions: DropdownState,\n\tdisplay: z.optional(StaticDropdownDisplay),\n\t...TPropertyValue(z.unknown(), \"STATIC_DROPDOWN\").shape\n});\nconst StaticMultiSelectDropdownProperty = z.object({\n\t...BasePropertySchema.shape,\n\toptions: DropdownState,\n\t...TPropertyValue(z.array(z.unknown()), \"STATIC_MULTI_SELECT_DROPDOWN\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/checkbox-property.ts\nconst CheckboxProperty = z.object({\n\t...BasePropertySchema.shape,\n\treveals: z.optional(z.array(z.string())),\n\t...TPropertyValue(z.boolean(), \"CHECKBOX\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/number-property.ts\nconst NumberProperty = z.object({\n\t...BasePropertySchema.shape,\n\tdisplay: z.optional(z.enum([\"stepper\"])),\n\tmin: z.optional(z.number()),\n\tmax: z.optional(z.number()),\n\tstep: z.optional(z.number()),\n\t...TPropertyValue(z.number(), \"NUMBER\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/file-property.ts\nvar ApFile = class {\n\tfilename;\n\tdata;\n\textension;\n\tconstructor(filename, data, extension) {\n\t\tthis.filename = filename;\n\t\tthis.data = data;\n\t\tthis.extension = extension;\n\t}\n\tget base64() {\n\t\treturn this.data.toString(\"base64\");\n\t}\n};\nconst FileProperty = z.object({\n\t...BasePropertySchema.shape,\n\tstreaming: z.optional(z.boolean()),\n\t...TPropertyValue(z.unknown(), \"FILE\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/date-range-property.ts\nconst DateRangePreset = z.enum([\n\t\"any_time\",\n\t\"last_24_hours\",\n\t\"last_7_days\",\n\t\"last_30_days\",\n\t\"last_90_days\",\n\t\"this_month\",\n\t\"custom\"\n]);\nconst DateRangeValue = z.object({\n\tpreset: z.optional(DateRangePreset),\n\tafter: z.optional(z.string()),\n\tbefore: z.optional(z.string())\n});\nconst DateRangeProperty = z.object({\n\t...BasePropertySchema.shape,\n\tdisplay: z.optional(z.enum([\"dropdown\"])),\n\t...TPropertyValue(DateRangeValue, \"DATE_RANGE\").shape\n});\nfunction isoDaysAgo(days) {\n\treturn (/* @__PURE__ */ new Date(Date.now() - days * 24 * 60 * 60 * 1e3)).toISOString();\n}\nfunction startOfThisMonth() {\n\tconst now = /* @__PURE__ */ new Date();\n\treturn new Date(now.getFullYear(), now.getMonth(), 1).toISOString();\n}\nfunction resolve(value) {\n\tif (!value || !value.preset || value.preset === \"any_time\") return {};\n\tswitch (value.preset) {\n\t\tcase \"last_24_hours\": return { after: isoDaysAgo(1) };\n\t\tcase \"last_7_days\": return { after: isoDaysAgo(7) };\n\t\tcase \"last_30_days\": return { after: isoDaysAgo(30) };\n\t\tcase \"last_90_days\": return { after: isoDaysAgo(90) };\n\t\tcase \"this_month\": return { after: startOfThisMonth() };\n\t\tcase \"custom\": return {\n\t\t\tafter: value.after && value.after.length > 0 ? value.after : void 0,\n\t\t\tbefore: value.before && value.before.length > 0 ? value.before : void 0\n\t\t};\n\t\tdefault: return {};\n\t}\n}\nconst dateRangeUtils = { resolve };\n\n//#endregion\n//#region upstream/core-piece-types/lib/markdown.ts\nlet MarkdownVariant = /* @__PURE__ */ function(MarkdownVariant) {\n\tMarkdownVariant[\"BORDERLESS\"] = \"BORDERLESS\";\n\tMarkdownVariant[\"INFO\"] = \"INFO\";\n\tMarkdownVariant[\"WARNING\"] = \"WARNING\";\n\tMarkdownVariant[\"TIP\"] = \"TIP\";\n\treturn MarkdownVariant;\n}({});\n\n//#endregion\n//#region upstream/core-utils/lib/utils.ts\nfunction isString(str) {\n\treturn str != null && typeof str === \"string\";\n}\nfunction isNil(value) {\n\treturn value === null || value === void 0;\n}\nfunction kebabCase(str) {\n\treturn str.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/\\s+/g, \"-\").replace(/_/g, \"-\").toLowerCase().replace(/^-+|-+$/g, \"\");\n}\nfunction isEmpty(value) {\n\tif (value == null) return true;\n\tif (typeof value === \"string\" || Array.isArray(value)) return value.length === 0;\n\tif (typeof value === \"object\") return Object.keys(value).length === 0;\n\treturn false;\n}\nfunction startCase(str) {\n\treturn str.replace(/([a-z])([A-Z])/g, \"$1 $2\").replace(/[_-]+/g, \" \").replace(/\\s+/g, \" \").replace(/^[a-z]/, (match) => match.toUpperCase()).replace(/\\b[a-z]/g, (match) => match.toUpperCase());\n}\nfunction camelCase(str) {\n\treturn str.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace(\"-\", \"\").replace(\"_\", \"\"));\n}\nfunction parseToJsonIfPossible(str) {\n\ttry {\n\t\treturn JSON.parse(str);\n\t} catch (e) {\n\t\treturn str;\n\t}\n}\nfunction pickBy(object, predicate) {\n\treturn Object.keys(object).reduce((result, key) => {\n\t\tif (predicate(object[key], key)) result[key] = object[key];\n\t\treturn result;\n\t}, {});\n}\nfunction chunk(records, size) {\n\tconst chunks = [];\n\tfor (let i = 0; i < records.length; i += size) chunks.push(records.slice(i, i + size));\n\treturn chunks;\n}\nfunction unique(array) {\n\tconst seen = /* @__PURE__ */ new Set();\n\treturn array.filter((item) => {\n\t\tconst key = JSON.stringify(item);\n\t\tif (seen.has(key)) return false;\n\t\tseen.add(key);\n\t\treturn true;\n\t});\n}\nconst INVALID_BASE64_CHARS = /[^A-Za-z0-9+/=]/;\nfunction isBase64(value, options) {\n\tif (!isString(value) || value.length === 0) return false;\n\tif (options?.allowMime) {\n\t\tconst base64MarkerIndex = value.indexOf(\";base64,\");\n\t\tif (base64MarkerIndex !== -1 && value.startsWith(\"data:\")) return _isValidBase64String(value.slice(base64MarkerIndex + 8));\n\t}\n\treturn _isValidBase64String(value);\n}\nfunction _isValidBase64String(str) {\n\tconst len = str.length;\n\tif (len === 0 || len % 4 !== 0 || INVALID_BASE64_CHARS.test(str)) return false;\n\tconst firstPaddingIndex = str.indexOf(\"=\");\n\treturn firstPaddingIndex === -1 || firstPaddingIndex === len - 1 || firstPaddingIndex === len - 2 && str[len - 1] === \"=\";\n}\n\n//#endregion\n//#region upstream/core-utils/lib/try-catch.ts\nasync function tryCatch(fn) {\n\ttry {\n\t\treturn {\n\t\t\tdata: await fn(),\n\t\t\terror: null\n\t\t};\n\t} catch (error) {\n\t\treturn {\n\t\t\tdata: null,\n\t\t\terror\n\t\t};\n\t}\n}\nfunction tryCatchSync(fn) {\n\ttry {\n\t\treturn {\n\t\t\tdata: fn(),\n\t\t\terror: null\n\t\t};\n\t} catch (error) {\n\t\treturn {\n\t\t\tdata: null,\n\t\t\terror\n\t\t};\n\t}\n}\n\n//#endregion\n//#region upstream/framework/lib/property/input/markdown-property.ts\nconst MarkDownProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.void(), \"MARKDOWN\").shape,\n\tvariant: z.optional(z.enum(MarkdownVariant))\n});\n\n//#endregion\nexport { PropertyType as A, CheckboxProperty as C, DropdownState as D, DropdownOption as E, TPropertyValue as M, LongTextProperty as O, NumberProperty as S, StaticMultiSelectDropdownProperty as T, DateRangeProperty as _, chunk as a, ApFile as b, isNil as c, parseToJsonIfPossible as d, pickBy as f, DateRangePreset as g, MarkdownVariant as h, camelCase as i, BasePropertySchema as j, ShortTextProperty as k, isString as l, unique as m, tryCatch as n, isBase64 as o, startCase as p, tryCatchSync as r, isEmpty as s, MarkDownProperty as t, kebabCase as u, DateRangeValue as v, StaticDropdownProperty as w, FileProperty as x, dateRangeUtils as y };\n//# sourceMappingURL=markdown-property-DMfHjEiL.js.map","import { A as PropertyType, C as CheckboxProperty, M as TPropertyValue, O as LongTextProperty, S as NumberProperty, T as StaticMultiSelectDropdownProperty, _ as DateRangeProperty, h as MarkdownVariant, j as BasePropertySchema, k as ShortTextProperty, t as MarkDownProperty, w as StaticDropdownProperty, x as FileProperty } from \"./markdown-property-DMfHjEiL.js\";\nimport * as z from \"zod/mini\";\n\n//#region upstream/framework/lib/action/action.ts\nconst ErrorHandlingOptionsParam = z.object({\n\tretryOnFailure: z.object({\n\t\tdefaultValue: z.optional(z.boolean()),\n\t\thide: z.optional(z.boolean())\n\t}),\n\tcontinueOnFailure: z.object({\n\t\tdefaultValue: z.optional(z.boolean()),\n\t\thide: z.optional(z.boolean())\n\t})\n});\nvar IAction = class {\n\tname;\n\tdisplayName;\n\tdescription;\n\tprops;\n\tpropertyGroups;\n\trun;\n\ttest;\n\trequireAuth;\n\terrorHandlingOptions;\n\toutputSchema;\n\taudience;\n\taiMetadata;\n\tclassification;\n\tconstructor(name, displayName, description, props, propertyGroups, run, test, requireAuth, errorHandlingOptions, outputSchema, audience, aiMetadata, classification) {\n\t\tthis.name = name;\n\t\tthis.displayName = displayName;\n\t\tthis.description = description;\n\t\tthis.props = props;\n\t\tthis.propertyGroups = propertyGroups;\n\t\tthis.run = run;\n\t\tthis.test = test;\n\t\tthis.requireAuth = requireAuth;\n\t\tthis.errorHandlingOptions = errorHandlingOptions;\n\t\tthis.outputSchema = outputSchema;\n\t\tthis.audience = audience;\n\t\tthis.aiMetadata = aiMetadata;\n\t\tthis.classification = classification;\n\t}\n};\nconst createAction = (params) => {\n\treturn new IAction(params.name, params.displayName, params.description, params.props, params.propertyGroups, params.run, params.test ?? params.run, params.requireAuth ?? true, params.errorHandlingOptions ?? {\n\t\tcontinueOnFailure: { defaultValue: false },\n\t\tretryOnFailure: { defaultValue: false }\n\t}, params.outputSchema, params.audience, params.aiMetadata, params.classification);\n};\n\n//#endregion\n//#region upstream/framework/lib/property/input/dropdown/dropdown-prop.ts\nconst DropdownProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.unknown(), \"DROPDOWN\").shape,\n\trefreshers: z.array(z.string())\n});\nconst MultiSelectDropdownProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.array(z.unknown()), \"MULTI_SELECT_DROPDOWN\").shape,\n\trefreshers: z.array(z.string())\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/json-property.ts\nconst JsonProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.union([z.record(z.string(), z.unknown())]), \"JSON\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/color-property.ts\nconst ColorProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.string(), \"COLOR\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/date-time-property.ts\nconst DateTimeProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.string(), \"DATE_TIME\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/array-property.ts\nconst ArraySubProps = z.record(z.string(), z.union([\n\tShortTextProperty,\n\tLongTextProperty,\n\tStaticDropdownProperty,\n\tMultiSelectDropdownProperty,\n\tStaticMultiSelectDropdownProperty,\n\tCheckboxProperty,\n\tNumberProperty,\n\tFileProperty,\n\tJsonProperty,\n\tColorProperty,\n\tDateTimeProperty\n]));\nconst ArrayProperty = z.object({\n\t...BasePropertySchema.shape,\n\tproperties: z.optional(ArraySubProps),\n\t...TPropertyValue(z.array(z.unknown()), \"ARRAY\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/dynamic-prop.ts\nconst DynamicProp = z.union([\n\tShortTextProperty,\n\tStaticDropdownProperty,\n\tJsonProperty,\n\tArrayProperty,\n\tStaticMultiSelectDropdownProperty\n]);\nconst DynamicPropsValue = z.record(z.string(), DynamicProp);\nconst DynamicProperties = z.object({\n\trefreshers: z.array(z.string()),\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.unknown(), \"DYNAMIC\").shape\n});\n\n//#endregion\n//#region upstream/core-utils/lib/assertions.ts\nfunction assertNotNullOrUndefined(value, fieldName) {\n\tif (value === null || value === void 0) throw new Error(`${fieldName} is null or undefined`);\n}\nconst isNotUndefined = (value) => {\n\treturn value !== void 0;\n};\n\n//#endregion\n//#region upstream/framework/lib/property/input/object-property.ts\nconst ObjectProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.record(z.string(), z.unknown()), \"OBJECT\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/rich-text-property.ts\nconst RichTextProperty = z.object({\n\t...BasePropertySchema.shape,\n\tformatProperty: z.optional(z.string()),\n\t...TPropertyValue(z.string(), \"RICH_TEXT\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/custom-property.ts\nconst CustomProperty = z.object({\n\t...BasePropertySchema.shape,\n\t...TPropertyValue(z.unknown(), \"CUSTOM\").shape,\n\tcode: z.string()\n});\n\n//#endregion\n//#region upstream/framework/lib/property/input/index.ts\nconst InputProperty = z.union([\n\tShortTextProperty,\n\tLongTextProperty,\n\tRichTextProperty,\n\tMarkDownProperty,\n\tCheckboxProperty,\n\tStaticDropdownProperty,\n\tStaticMultiSelectDropdownProperty,\n\tDropdownProperty,\n\tMultiSelectDropdownProperty,\n\tDynamicProperties,\n\tNumberProperty,\n\tArrayProperty,\n\tObjectProperty,\n\tJsonProperty,\n\tDateTimeProperty,\n\tDateRangeProperty,\n\tFileProperty,\n\tCustomProperty,\n\tColorProperty\n]);\nconst Property = {\n\tShortText(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"SHORT_TEXT\"\n\t\t};\n\t},\n\tCheckbox(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"CHECKBOX\"\n\t\t};\n\t},\n\tLongText(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"LONG_TEXT\"\n\t\t};\n\t},\n\tRichText(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"RICH_TEXT\"\n\t\t};\n\t},\n\tMarkDown(request) {\n\t\treturn {\n\t\t\tdisplayName: \"Markdown\",\n\t\t\trequired: false,\n\t\t\tdescription: request.value,\n\t\t\ttype: \"MARKDOWN\",\n\t\t\tvalueSchema: void 0,\n\t\t\tvariant: request.variant ?? \"INFO\"\n\t\t};\n\t},\n\tNumber(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"NUMBER\"\n\t\t};\n\t},\n\tJson(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"JSON\"\n\t\t};\n\t},\n\tArray(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"ARRAY\"\n\t\t};\n\t},\n\tObject(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"OBJECT\"\n\t\t};\n\t},\n\tDropdown(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"DROPDOWN\"\n\t\t};\n\t},\n\tStaticDropdown(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"STATIC_DROPDOWN\"\n\t\t};\n\t},\n\tMultiSelectDropdown(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"MULTI_SELECT_DROPDOWN\"\n\t\t};\n\t},\n\tDynamicProperties(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"DYNAMIC\"\n\t\t};\n\t},\n\tStaticMultiSelectDropdown(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"STATIC_MULTI_SELECT_DROPDOWN\"\n\t\t};\n\t},\n\tDateTime(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"DATE_TIME\"\n\t\t};\n\t},\n\tDateRange(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"DATE_RANGE\"\n\t\t};\n\t},\n\tFile(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"FILE\"\n\t\t};\n\t},\n\tCustom(request) {\n\t\tconst code = request.code.toString();\n\t\treturn {\n\t\t\t...request,\n\t\t\tcode,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"CUSTOM\"\n\t\t};\n\t},\n\tColor(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"COLOR\"\n\t\t};\n\t}\n};\n\n//#endregion\nexport { ErrorHandlingOptionsParam as _, ObjectProperty as a, DynamicProp as c, ArrayProperty as d, ArraySubProps as f, MultiSelectDropdownProperty as g, DropdownProperty as h, RichTextProperty as i, DynamicProperties as l, JsonProperty as m, Property as n, assertNotNullOrUndefined as o, DateTimeProperty as p, CustomProperty as r, isNotUndefined as s, InputProperty as t, DynamicPropsValue as u, IAction as v, createAction as y };\n//# sourceMappingURL=input-BHkj_oP5.js.map","import { A as PropertyType, C as CheckboxProperty, M as TPropertyValue, O as LongTextProperty, S as NumberProperty, T as StaticMultiSelectDropdownProperty, c as isNil, k as ShortTextProperty, t as MarkDownProperty, w as StaticDropdownProperty } from \"./markdown-property-DMfHjEiL.js\";\nimport * as z from \"zod/mini\";\n\n//#region upstream/core-piece-types/lib/app-connection.ts\nlet AppConnectionType = /* @__PURE__ */ function(AppConnectionType) {\n\tAppConnectionType[\"OAUTH2\"] = \"OAUTH2\";\n\tAppConnectionType[\"PLATFORM_OAUTH2\"] = \"PLATFORM_OAUTH2\";\n\tAppConnectionType[\"CLOUD_OAUTH2\"] = \"CLOUD_OAUTH2\";\n\tAppConnectionType[\"SECRET_TEXT\"] = \"SECRET_TEXT\";\n\tAppConnectionType[\"BASIC_AUTH\"] = \"BASIC_AUTH\";\n\tAppConnectionType[\"CUSTOM_AUTH\"] = \"CUSTOM_AUTH\";\n\tAppConnectionType[\"OIDC\"] = \"OIDC\";\n\tAppConnectionType[\"NO_AUTH\"] = \"NO_AUTH\";\n\treturn AppConnectionType;\n}({});\nlet OAuth2GrantType = /* @__PURE__ */ function(OAuth2GrantType) {\n\tOAuth2GrantType[\"AUTHORIZATION_CODE\"] = \"authorization_code\";\n\tOAuth2GrantType[\"CLIENT_CREDENTIALS\"] = \"client_credentials\";\n\treturn OAuth2GrantType;\n}({});\nconst BOTH_CLIENT_CREDENTIALS_AND_AUTHORIZATION_CODE = \"both_client_credentials_and_authorization_code\";\n\n//#endregion\n//#region upstream/core-piece-types/lib/trigger.ts\nlet TriggerStrategy = /* @__PURE__ */ function(TriggerStrategy) {\n\tTriggerStrategy[\"POLLING\"] = \"POLLING\";\n\tTriggerStrategy[\"WEBHOOK\"] = \"WEBHOOK\";\n\tTriggerStrategy[\"APP_WEBHOOK\"] = \"APP_WEBHOOK\";\n\tTriggerStrategy[\"MANUAL\"] = \"MANUAL\";\n\treturn TriggerStrategy;\n}({});\nlet WebhookHandshakeStrategy = /* @__PURE__ */ function(WebhookHandshakeStrategy) {\n\tWebhookHandshakeStrategy[\"NONE\"] = \"NONE\";\n\tWebhookHandshakeStrategy[\"HEADER_PRESENT\"] = \"HEADER_PRESENT\";\n\tWebhookHandshakeStrategy[\"QUERY_PRESENT\"] = \"QUERY_PRESENT\";\n\tWebhookHandshakeStrategy[\"BODY_PARAM_PRESENT\"] = \"BODY_PARAM_PRESENT\";\n\tWebhookHandshakeStrategy[\"HEAD_REQUEST\"] = \"HEAD_REQUEST\";\n\treturn WebhookHandshakeStrategy;\n}({});\nconst WebhookHandshakeConfiguration = z.object({\n\tstrategy: z.enum(WebhookHandshakeStrategy),\n\tparamName: z.optional(z.string())\n});\nlet TriggerTestStrategy = /* @__PURE__ */ function(TriggerTestStrategy) {\n\tTriggerTestStrategy[\"SIMULATION\"] = \"SIMULATION\";\n\tTriggerTestStrategy[\"TEST_FUNCTION\"] = \"TEST_FUNCTION\";\n\treturn TriggerTestStrategy;\n}({});\nconst AUTHENTICATION_PROPERTY_NAME = \"auth\";\n\n//#endregion\n//#region upstream/core-utils/lib/object-utils.ts\nconst spreadIfDefined = (key, value) => {\n\tif (isNil(value)) return {};\n\treturn { [key]: value };\n};\nconst isObject = (obj) => {\n\treturn typeof obj === \"object\" && obj !== null && !Array.isArray(obj);\n};\n\n//#endregion\n//#region upstream/framework/lib/property/authentication/common.ts\nconst BasePieceAuthSchema = z.object({\n\tdisplayName: z.string(),\n\tdescription: z.optional(z.string()),\n\thasConnectionIdentifier: z.optional(z.boolean())\n});\n\n//#endregion\n//#region upstream/framework/lib/property/authentication/basic-auth-prop.ts\nconst BasicAuthPropertyValue = z.object({\n\tusername: z.string(),\n\tpassword: z.string()\n});\nconst BasicAuthProperty = z.object({\n\t...BasePieceAuthSchema.shape,\n\tusername: z.object({\n\t\tdisplayName: z.string(),\n\t\tdescription: z.optional(z.string())\n\t}),\n\tpassword: z.object({\n\t\tdisplayName: z.string(),\n\t\tdescription: z.optional(z.string())\n\t}),\n\t...TPropertyValue(BasicAuthPropertyValue, \"BASIC_AUTH\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/authentication/secret-text-property.ts\nconst SecretTextProperty = z.object({\n\t...BasePieceAuthSchema.shape,\n\t...TPropertyValue(z.object({ auth: z.string() }), \"SECRET_TEXT\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/authentication/custom-auth-prop.ts\nconst CustomAuthProps = z.record(z.string(), z.union([\n\tShortTextProperty,\n\tLongTextProperty,\n\tSecretTextProperty,\n\tNumberProperty,\n\tStaticDropdownProperty,\n\tCheckboxProperty,\n\tMarkDownProperty,\n\tStaticMultiSelectDropdownProperty\n]));\nconst CustomAuthProperty = z.object({\n\t...BasePieceAuthSchema.shape,\n\tprops: CustomAuthProps,\n\t...TPropertyValue(z.unknown(), \"CUSTOM_AUTH\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/authentication/oidc-prop.ts\nconst OIDCAuthProps = z.record(z.string(), z.union([\n\tShortTextProperty,\n\tLongTextProperty,\n\tSecretTextProperty,\n\tNumberProperty,\n\tCheckboxProperty,\n\tStaticDropdownProperty,\n\tStaticMultiSelectDropdownProperty,\n\tMarkDownProperty\n]));\nconst OIDCProperty = z.object({\n\t...BasePieceAuthSchema.shape,\n\tprops: OIDCAuthProps,\n\t...TPropertyValue(z.unknown(), \"OIDC\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/authentication/oauth2-prop.ts\nlet OAuth2AuthorizationMethod = /* @__PURE__ */ function(OAuth2AuthorizationMethod) {\n\tOAuth2AuthorizationMethod[\"HEADER\"] = \"HEADER\";\n\tOAuth2AuthorizationMethod[\"BODY\"] = \"BODY\";\n\treturn OAuth2AuthorizationMethod;\n}({});\nconst OAuthProp = z.union([\n\tShortTextProperty,\n\tSecretTextProperty,\n\tStaticDropdownProperty\n]);\nconst OAuth2Props = z.record(z.string(), OAuthProp);\nconst OAuth2ExtraProps = z.object({\n\tprops: z.optional(z.record(z.string(), OAuthProp)),\n\tauthUrl: z.string(),\n\ttokenUrl: z.string(),\n\tscope: z.array(z.string()),\n\tprompt: z.optional(z.union([\n\t\tz.literal(\"none\"),\n\t\tz.literal(\"consent\"),\n\t\tz.literal(\"login\"),\n\t\tz.literal(\"omit\")\n\t])),\n\tpkce: z.optional(z.boolean()),\n\tpkceMethod: z.optional(z.union([z.literal(\"plain\"), z.literal(\"S256\")])),\n\tauthorizationMethod: z.optional(z.enum(OAuth2AuthorizationMethod)),\n\tgrantType: z.optional(z.union([z.enum(OAuth2GrantType), z.literal(BOTH_CLIENT_CREDENTIALS_AND_AUTHORIZATION_CODE)])),\n\textra: z.optional(z.record(z.string(), z.string()))\n});\nconst OAuth2PropertyValue = z.object({\n\taccess_token: z.string(),\n\tprops: z.optional(OAuth2Props),\n\tdata: z.record(z.string(), z.any())\n});\nconst OAuth2Property = z.object({\n\t...BasePieceAuthSchema.shape,\n\t...OAuth2ExtraProps.shape,\n\t...TPropertyValue(OAuth2PropertyValue, \"OAUTH2\").shape\n});\n\n//#endregion\n//#region upstream/framework/lib/property/authentication/index.ts\nconst PieceAuthProperty = z.union([\n\tBasicAuthProperty,\n\tCustomAuthProperty,\n\tOIDCProperty,\n\tOAuth2Property,\n\tSecretTextProperty\n]);\nconst DEFAULT_CONNECTION_DISPLAY_NAME = \"Connection\";\nconst PieceAuth = {\n\tSecretText(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"SECRET_TEXT\"\n\t\t};\n\t},\n\tOAuth2(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"OAUTH2\",\n\t\t\tdisplayName: request.displayName || \"Connection\"\n\t\t};\n\t},\n\tBasicAuth(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"BASIC_AUTH\",\n\t\t\tdisplayName: request.displayName || \"Connection\",\n\t\t\trequired: true\n\t\t};\n\t},\n\tCustomAuth(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"CUSTOM_AUTH\",\n\t\t\tdisplayName: request.displayName || \"Connection\"\n\t\t};\n\t},\n\tOIDC(request) {\n\t\treturn {\n\t\t\t...request,\n\t\t\tvalueSchema: void 0,\n\t\t\ttype: \"OIDC\",\n\t\t\tdisplayName: request.displayName || \"Connection\"\n\t\t};\n\t},\n\tNone() {}\n};\nfunction getAuthPropertyForValue({ authValueType, pieceAuth }) {\n\tif (!Array.isArray(pieceAuth) || isNil(pieceAuth)) return pieceAuth;\n\treturn pieceAuth.find((auth) => authConnectionTypeToPropertyType[authValueType] === auth.type) ?? pieceAuth.at(0);\n}\nconst authConnectionTypeToPropertyType = {\n\t[\"OAUTH2\"]: \"OAUTH2\",\n\t[\"CLOUD_OAUTH2\"]: \"OAUTH2\",\n\t[\"PLATFORM_OAUTH2\"]: \"OAUTH2\",\n\t[\"BASIC_AUTH\"]: \"BASIC_AUTH\",\n\t[\"CUSTOM_AUTH\"]: \"CUSTOM_AUTH\",\n\t[\"OIDC\"]: \"OIDC\",\n\t[\"SECRET_TEXT\"]: \"SECRET_TEXT\",\n\t[\"NO_AUTH\"]: void 0\n};\n\n//#endregion\nexport { TriggerStrategy as _, OAuth2AuthorizationMethod as a, AppConnectionType as b, OAuth2Props as c, SecretTextProperty as d, BasicAuthProperty as f, AUTHENTICATION_PROPERTY_NAME as g, spreadIfDefined as h, getAuthPropertyForValue as i, OIDCProperty as l, isObject as m, PieceAuth as n, OAuth2Property as o, BasicAuthPropertyValue as p, PieceAuthProperty as r, OAuth2PropertyValue as s, DEFAULT_CONNECTION_DISPLAY_NAME as t, CustomAuthProperty as u, TriggerTestStrategy as v, OAuth2GrantType as x, WebhookHandshakeStrategy as y };\n//# sourceMappingURL=authentication-o-4CdAPR.js.map","import crypto from 'crypto'\n\nimport { urlAlphabet } from './url-alphabet/index.js'\n\nconst POOL_SIZE_MULTIPLIER = 128\nlet pool, poolOffset\n\nlet fillPool = bytes => {\n if (bytes < 0) throw new RangeError('Wrong ID size')\n try {\n if (!pool || pool.length < bytes) {\n pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)\n crypto.randomFillSync(pool)\n poolOffset = 0\n } else if (poolOffset + bytes > pool.length) {\n crypto.randomFillSync(pool)\n poolOffset = 0\n }\n } catch (e) {\n pool = undefined\n throw e\n }\n poolOffset += bytes\n}\n\nlet random = bytes => {\n fillPool((bytes |= 0))\n return pool.subarray(poolOffset - bytes, poolOffset)\n}\n\nlet customRandom = (alphabet, defaultSize, getRandom) => {\n let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1\n\n\n let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)\n\n return (size = defaultSize) => {\n if (size <= 0) return ''\n let id = ''\n while (true) {\n let bytes = getRandom(step)\n let i = step\n while (i--) {\n id += alphabet[bytes[i] & mask] || ''\n if (id.length === size) return id\n }\n }\n }\n}\n\nlet customAlphabet = (alphabet, size = 21) =>\n customRandom(alphabet, size, random)\n\nlet nanoid = (size = 21) => {\n fillPool((size |= 0))\n let id = ''\n for (let i = poolOffset - size; i < poolOffset; i++) {\n id += urlAlphabet[pool[i] & 63]\n }\n return id\n}\n\nexport { nanoid, customAlphabet, customRandom, urlAlphabet, random }\n","import { _ as ErrorHandlingOptionsParam, a as ObjectProperty, c as DynamicProp, d as ArrayProperty, f as ArraySubProps, g as MultiSelectDropdownProperty, h as DropdownProperty, i as RichTextProperty, l as DynamicProperties, m as JsonProperty, n as Property, o as assertNotNullOrUndefined, p as DateTimeProperty, r as CustomProperty, s as isNotUndefined, t as InputProperty, u as DynamicPropsValue, v as IAction, y as createAction } from \"./input-BHkj_oP5.js\";\nimport { A as PropertyType, C as CheckboxProperty, D as DropdownState, E as DropdownOption, O as LongTextProperty, S as NumberProperty, T as StaticMultiSelectDropdownProperty, _ as DateRangeProperty, a as chunk, b as ApFile, c as isNil, f as pickBy, g as DateRangePreset, h as MarkdownVariant, i as camelCase, j as BasePropertySchema, k as ShortTextProperty, l as isString, m as unique, n as tryCatch, p as startCase, s as isEmpty, u as kebabCase, v as DateRangeValue, w as StaticDropdownProperty, x as FileProperty, y as dateRangeUtils } from \"./markdown-property-DMfHjEiL.js\";\nimport { _ as TriggerStrategy, a as OAuth2AuthorizationMethod, b as AppConnectionType, c as OAuth2Props, d as SecretTextProperty, f as BasicAuthProperty, g as AUTHENTICATION_PROPERTY_NAME, h as spreadIfDefined, i as getAuthPropertyForValue, l as OIDCProperty, n as PieceAuth, o as OAuth2Property, p as BasicAuthPropertyValue, r as PieceAuthProperty, s as OAuth2PropertyValue, t as DEFAULT_CONNECTION_DISPLAY_NAME, u as CustomAuthProperty, v as TriggerTestStrategy, x as OAuth2GrantType, y as WebhookHandshakeStrategy } from \"./authentication-o-4CdAPR.js\";\nimport * as z from \"zod/mini\";\nimport { customAlphabet } from \"nanoid\";\nimport path from \"node:path\";\nimport fs from \"node:fs/promises\";\n\n//#region upstream/core-piece-types/lib/piece.ts\nlet PackageType = /* @__PURE__ */ function(PackageType) {\n\tPackageType[\"ARCHIVE\"] = \"ARCHIVE\";\n\tPackageType[\"REGISTRY\"] = \"REGISTRY\";\n\treturn PackageType;\n}({});\nlet PieceType = /* @__PURE__ */ function(PieceType) {\n\tPieceType[\"CUSTOM\"] = \"CUSTOM\";\n\tPieceType[\"OFFICIAL\"] = \"OFFICIAL\";\n\treturn PieceType;\n}({});\nlet PieceCategory = /* @__PURE__ */ function(PieceCategory) {\n\tPieceCategory[\"ARTIFICIAL_INTELLIGENCE\"] = \"ARTIFICIAL_INTELLIGENCE\";\n\tPieceCategory[\"COMMUNICATION\"] = \"COMMUNICATION\";\n\tPieceCategory[\"COMMERCE\"] = \"COMMERCE\";\n\tPieceCategory[\"CORE\"] = \"CORE\";\n\tPieceCategory[\"UNIVERSAL_AI\"] = \"UNIVERSAL_AI\";\n\tPieceCategory[\"FLOW_CONTROL\"] = \"FLOW_CONTROL\";\n\tPieceCategory[\"BUSINESS_INTELLIGENCE\"] = \"BUSINESS_INTELLIGENCE\";\n\tPieceCategory[\"ACCOUNTING\"] = \"ACCOUNTING\";\n\tPieceCategory[\"PRODUCTIVITY\"] = \"PRODUCTIVITY\";\n\tPieceCategory[\"CONTENT_AND_FILES\"] = \"CONTENT_AND_FILES\";\n\tPieceCategory[\"DEVELOPER_TOOLS\"] = \"DEVELOPER_TOOLS\";\n\tPieceCategory[\"CUSTOMER_SUPPORT\"] = \"CUSTOMER_SUPPORT\";\n\tPieceCategory[\"FORMS_AND_SURVEYS\"] = \"FORMS_AND_SURVEYS\";\n\tPieceCategory[\"HUMAN_RESOURCES\"] = \"HUMAN_RESOURCES\";\n\tPieceCategory[\"PAYMENT_PROCESSING\"] = \"PAYMENT_PROCESSING\";\n\tPieceCategory[\"MARKETING\"] = \"MARKETING\";\n\tPieceCategory[\"SALES_AND_CRM\"] = \"SALES_AND_CRM\";\n\treturn PieceCategory;\n}({});\n\n//#endregion\n//#region upstream/core-piece-types/lib/execution.ts\nlet ExecutionType = /* @__PURE__ */ function(ExecutionType) {\n\tExecutionType[\"BEGIN\"] = \"BEGIN\";\n\tExecutionType[\"RESUME\"] = \"RESUME\";\n\treturn ExecutionType;\n}({});\nlet StreamStepProgress = /* @__PURE__ */ function(StreamStepProgress) {\n\tStreamStepProgress[\"WEBSOCKET\"] = \"WEBSOCKET\";\n\tStreamStepProgress[\"NONE\"] = \"NONE\";\n\treturn StreamStepProgress;\n}({});\nconst RespondResponse = z.object({\n\tstatus: z.optional(z.number()),\n\tbody: z.optional(z.unknown()),\n\theaders: z.optional(z.record(z.string(), z.string()))\n});\nconst DelayPauseMetadata = z.object({\n\ttype: z.literal(\"DELAY\"),\n\tresumeDateTime: z.string(),\n\trequestIdToReply: z.optional(z.string()),\n\thandlerId: z.optional(z.string()),\n\tstreamStepProgress: z.optional(z.enum(StreamStepProgress))\n});\nconst WebhookPauseMetadata = z.object({\n\ttype: z.literal(\"WEBHOOK\"),\n\trequestId: z.string(),\n\trequestIdToReply: z.optional(z.string()),\n\tresponse: RespondResponse,\n\thandlerId: z.optional(z.string()),\n\tstreamStepProgress: z.optional(z.enum(StreamStepProgress))\n});\nconst PauseMetadata = z.union([DelayPauseMetadata, WebhookPauseMetadata]);\n\n//#endregion\n//#region upstream/core-utils/lib/id-generator.ts\nconst ALPHABET = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\nconst ID_LENGTH = 21;\nconst ApId = z.string().check(z.regex(new RegExp(`^[0-9a-zA-Z]{${ID_LENGTH}}$`)));\nconst apId = customAlphabet(ALPHABET, ID_LENGTH);\n\n//#endregion\n//#region upstream/core-utils/lib/base-model.ts\nconst DateOrString = z.pipe(z.transform((val) => val instanceof Date ? val.toISOString() : val), z.string());\nconst BaseModelSchema = {\n\tid: z.string(),\n\tcreated: DateOrString,\n\tupdated: DateOrString\n};\nconst Nullable = (schema) => z.optional(z.nullable(schema));\nfunction NullableEnum(enumObj) {\n\treturn z.optional(z.nullable(z.enum(enumObj)));\n}\nconst OptionalBooleanFromQuery = z.pipe(z.transform((val) => val === \"true\" || val === true ? true : val === \"false\" || val === false ? false : void 0), z.optional(z.boolean()));\nconst OptionalArrayFromQuery = (schema) => z.pipe(z.transform((val) => Array.isArray(val) ? val : val !== void 0 ? [val] : void 0), z.optional(z.array(schema)));\n\n//#endregion\n//#region upstream/core-utils/lib/seek-page.ts\nconst SeekPage = (t) => z.object({\n\tdata: z.array(t),\n\tnext: Nullable(z.string()),\n\tprevious: Nullable(z.string())\n});\n\n//#endregion\n//#region upstream/core-utils/lib/locale.ts\nlet LocalesEnum = /* @__PURE__ */ function(LocalesEnum) {\n\tLocalesEnum[\"DUTCH\"] = \"nl\";\n\tLocalesEnum[\"ENGLISH\"] = \"en\";\n\tLocalesEnum[\"GERMAN\"] = \"de\";\n\tLocalesEnum[\"FRENCH\"] = \"fr\";\n\tLocalesEnum[\"SPANISH\"] = \"es\";\n\tLocalesEnum[\"JAPANESE\"] = \"ja\";\n\tLocalesEnum[\"CHINESE_SIMPLIFIED\"] = \"zh\";\n\tLocalesEnum[\"PORTUGUESE\"] = \"pt\";\n\tLocalesEnum[\"ARABIC\"] = \"ar\";\n\tLocalesEnum[\"CHINESE_TRADITIONAL\"] = \"zh-TW\";\n\treturn LocalesEnum;\n}({});\n\n//#endregion\n//#region upstream/core-utils/lib/permission.ts\nlet AIProviderName = /* @__PURE__ */ function(AIProviderName) {\n\tAIProviderName[\"OPENAI\"] = \"openai\";\n\tAIProviderName[\"OPENROUTER\"] = \"openrouter\";\n\tAIProviderName[\"ANTHROPIC\"] = \"anthropic\";\n\tAIProviderName[\"AZURE\"] = \"azure\";\n\tAIProviderName[\"GOOGLE\"] = \"google\";\n\tAIProviderName[\"ACTIVEPIECES\"] = \"activepieces\";\n\tAIProviderName[\"CLOUDFLARE_GATEWAY\"] = \"cloudflare-gateway\";\n\tAIProviderName[\"CUSTOM\"] = \"custom\";\n\tAIProviderName[\"BEDROCK\"] = \"bedrock\";\n\tAIProviderName[\"VERTEX\"] = \"vertex\";\n\tAIProviderName[\"MISTRAL\"] = \"mistral\";\n\tAIProviderName[\"XAI\"] = \"xai\";\n\tAIProviderName[\"DEEPSEEK\"] = \"deepseek\";\n\tAIProviderName[\"ZAI\"] = \"zai\";\n\tAIProviderName[\"QWEN\"] = \"qwen\";\n\tAIProviderName[\"MINIMAX\"] = \"minimax\";\n\tAIProviderName[\"MOONSHOT\"] = \"moonshot\";\n\treturn AIProviderName;\n}({});\n\n//#endregion\n//#region upstream/core-piece-types/lib/agents.ts\nconst TASK_COMPLETION_TOOL_NAME = \"updateTaskStatus\";\nlet AgentToolType = /* @__PURE__ */ function(AgentToolType) {\n\tAgentToolType[\"PIECE\"] = \"PIECE\";\n\tAgentToolType[\"FLOW\"] = \"FLOW\";\n\tAgentToolType[\"MCP\"] = \"MCP\";\n\tAgentToolType[\"KNOWLEDGE_BASE\"] = \"KNOWLEDGE_BASE\";\n\treturn AgentToolType;\n}({});\nlet FieldControlMode = /* @__PURE__ */ function(FieldControlMode) {\n\tFieldControlMode[\"AGENT_DECIDE\"] = \"agent-decide\";\n\tFieldControlMode[\"CHOOSE_YOURSELF\"] = \"choose-yourself\";\n\tFieldControlMode[\"LEAVE_EMPTY\"] = \"leave-empty\";\n\treturn FieldControlMode;\n}({});\nlet KnowledgeBaseSourceType = /* @__PURE__ */ function(KnowledgeBaseSourceType) {\n\tKnowledgeBaseSourceType[\"FILE\"] = \"FILE\";\n\tKnowledgeBaseSourceType[\"TABLE\"] = \"TABLE\";\n\treturn KnowledgeBaseSourceType;\n}({});\nlet McpProtocol = /* @__PURE__ */ function(McpProtocol) {\n\tMcpProtocol[\"SSE\"] = \"sse\";\n\tMcpProtocol[\"STREAMABLE_HTTP\"] = \"streamable-http\";\n\tMcpProtocol[\"SIMPLE_HTTP\"] = \"http\";\n\treturn McpProtocol;\n}({});\nlet McpAuthType = /* @__PURE__ */ function(McpAuthType) {\n\tMcpAuthType[\"NONE\"] = \"none\";\n\tMcpAuthType[\"ACCESS_TOKEN\"] = \"access_token\";\n\tMcpAuthType[\"API_KEY\"] = \"api_key\";\n\tMcpAuthType[\"HEADERS\"] = \"headers\";\n\treturn McpAuthType;\n}({});\nlet AgentOutputFieldType = /* @__PURE__ */ function(AgentOutputFieldType) {\n\tAgentOutputFieldType[\"TEXT\"] = \"text\";\n\tAgentOutputFieldType[\"NUMBER\"] = \"number\";\n\tAgentOutputFieldType[\"BOOLEAN\"] = \"boolean\";\n\treturn AgentOutputFieldType;\n}({});\nlet AgentTaskStatus = /* @__PURE__ */ function(AgentTaskStatus) {\n\tAgentTaskStatus[\"COMPLETED\"] = \"COMPLETED\";\n\tAgentTaskStatus[\"FAILED\"] = \"FAILED\";\n\tAgentTaskStatus[\"IN_PROGRESS\"] = \"IN_PROGRESS\";\n\treturn AgentTaskStatus;\n}({});\nlet ContentBlockType = /* @__PURE__ */ function(ContentBlockType) {\n\tContentBlockType[\"MARKDOWN\"] = \"MARKDOWN\";\n\tContentBlockType[\"TOOL_CALL\"] = \"TOOL_CALL\";\n\treturn ContentBlockType;\n}({});\nlet ToolCallStatus = /* @__PURE__ */ function(ToolCallStatus) {\n\tToolCallStatus[\"IN_PROGRESS\"] = \"in-progress\";\n\tToolCallStatus[\"COMPLETED\"] = \"completed\";\n\treturn ToolCallStatus;\n}({});\nlet ExecutionToolStatus = /* @__PURE__ */ function(ExecutionToolStatus) {\n\tExecutionToolStatus[\"SUCCESS\"] = \"SUCCESS\";\n\tExecutionToolStatus[\"FAILED\"] = \"FAILED\";\n\treturn ExecutionToolStatus;\n}({});\nlet ToolCallType = /* @__PURE__ */ function(ToolCallType) {\n\tToolCallType[\"PIECE\"] = \"PIECE\";\n\tToolCallType[\"FLOW\"] = \"FLOW\";\n\tToolCallType[\"MCP\"] = \"MCP\";\n\tToolCallType[\"KNOWLEDGE_BASE\"] = \"KNOWLEDGE_BASE\";\n\tToolCallType[\"UNKNOWN\"] = \"UNKNOWN\";\n\treturn ToolCallType;\n}({});\nlet AgentPieceProps = /* @__PURE__ */ function(AgentPieceProps) {\n\tAgentPieceProps[\"AGENT_ID\"] = \"agentId\";\n\tAgentPieceProps[\"AGENT_TOOLS\"] = \"agentTools\";\n\tAgentPieceProps[\"STRUCTURED_OUTPUT\"] = \"structuredOutput\";\n\tAgentPieceProps[\"PROMPT\"] = \"prompt\";\n\tAgentPieceProps[\"MAX_STEPS\"] = \"maxSteps\";\n\tAgentPieceProps[\"AI_PROVIDER_MODEL\"] = \"aiProviderModel\";\n\tAgentPieceProps[\"WEB_SEARCH\"] = \"webSearch\";\n\tAgentPieceProps[\"WEB_SEARCH_OPTIONS\"] = \"webSearchOptions\";\n\treturn AgentPieceProps;\n}({});\nconst PredefinedInputField = z.object({\n\tmode: z.enum(FieldControlMode),\n\tvalue: z.unknown()\n});\nconst PredefinedInputsStructure = z.object({\n\tauth: z.optional(z.string()),\n\tfields: z.record(z.string(), PredefinedInputField)\n});\nconst AgentPieceToolMetadata = z.object({\n\tpieceName: z.string(),\n\tpieceVersion: z.string(),\n\tactionName: z.string(),\n\tpredefinedInput: z.optional(PredefinedInputsStructure)\n});\nconst AgentPieceTool = z.object({\n\ttype: z.literal(\"PIECE\"),\n\ttoolName: z.string().check(z.minLength(1)),\n\tpieceMetadata: AgentPieceToolMetadata\n});\nconst McpAuthNone = z.object({ type: z.literal(\"none\") });\nconst McpAuthAccessToken = z.object({\n\ttype: z.literal(\"access_token\"),\n\taccessToken: z.string()\n});\nconst McpAuthApiKey = z.object({\n\ttype: z.literal(\"api_key\"),\n\tapiKey: z.string(),\n\tapiKeyHeader: z.string()\n});\nconst McpAuthHeaders = z.object({\n\ttype: z.literal(\"headers\"),\n\theaders: z.record(z.string(), z.string())\n});\nconst McpAuthConfig = z.discriminatedUnion(\"type\", [\n\tMcpAuthNone,\n\tMcpAuthAccessToken,\n\tMcpAuthApiKey,\n\tMcpAuthHeaders\n]);\nconst AgentFlowTool = z.object({\n\ttype: z.literal(\"FLOW\"),\n\ttoolName: z.string().check(z.minLength(1)),\n\texternalFlowId: z.string(),\n\tflowDisplayName: z.optional(z.string())\n});\nconst AgentMcpTool = z.object({\n\ttype: z.literal(\"MCP\"),\n\ttoolName: z.string().check(z.minLength(1)),\n\tserverUrl: z.url(),\n\tprotocol: z.enum(McpProtocol),\n\tauth: McpAuthConfig\n});\nconst AgentKnowledgeBaseTool = z.object({\n\ttype: z.literal(\"KNOWLEDGE_BASE\"),\n\ttoolName: z.string().check(z.minLength(1)),\n\tsourceType: z.enum(KnowledgeBaseSourceType),\n\tsourceId: z.string(),\n\tsourceName: z.string()\n});\nconst AgentTool = z.discriminatedUnion(\"type\", [\n\tAgentPieceTool,\n\tAgentFlowTool,\n\tAgentMcpTool,\n\tAgentKnowledgeBaseTool\n]);\nconst AgentOutputField = z.object({\n\tdisplayName: z.string(),\n\tdescription: z.optional(z.string()),\n\ttype: z.enum(AgentOutputFieldType)\n});\nconst MarkdownContentBlock = z.object({\n\ttype: z.literal(\"MARKDOWN\"),\n\tmarkdown: z.string()\n});\nconst toolCallBaseShape = {\n\ttype: z.literal(\"TOOL_CALL\"),\n\tinput: Nullable(z.record(z.string(), z.unknown())),\n\toutput: z.optional(z.unknown()),\n\ttoolName: z.string(),\n\tstatus: z.enum(ToolCallStatus),\n\ttoolCallId: z.string(),\n\tstartTime: z.string(),\n\tendTime: z.optional(z.string())\n};\nz.object(toolCallBaseShape);\nconst ToolCallContentBlock = z.discriminatedUnion(\"toolCallType\", [\n\tz.object({\n\t\t...toolCallBaseShape,\n\t\ttoolCallType: z.literal(\"PIECE\"),\n\t\tpieceName: z.string(),\n\t\tpieceVersion: z.string(),\n\t\tactionName: z.string()\n\t}),\n\tz.object({\n\t\t...toolCallBaseShape,\n\t\ttoolCallType: z.literal(\"FLOW\"),\n\t\tdisplayName: z.string(),\n\t\texternalFlowId: z.string()\n\t}),\n\tz.object({\n\t\t...toolCallBaseShape,\n\t\ttoolCallType: z.literal(\"MCP\"),\n\t\tdisplayName: z.string(),\n\t\tserverUrl: z.string()\n\t}),\n\tz.object({\n\t\t...toolCallBaseShape,\n\t\ttoolCallType: z.literal(\"KNOWLEDGE_BASE\"),\n\t\tdisplayName: z.string(),\n\t\tsourceType: z.string()\n\t}),\n\tz.object({\n\t\t...toolCallBaseShape,\n\t\ttoolCallType: z.literal(\"UNKNOWN\"),\n\t\tdisplayName: z.string()\n\t})\n]);\nconst AgentStepBlock = z.union([MarkdownContentBlock, ToolCallContentBlock]);\nfunction buildAuthHeaders(authConfig) {\n\tlet headers = {};\n\tswitch (authConfig.type) {\n\t\tcase \"none\": break;\n\t\tcase \"headers\":\n\t\t\theaders = authConfig.headers;\n\t\t\tbreak;\n\t\tcase \"access_token\":\n\t\t\theaders[\"Authorization\"] = `Bearer ${authConfig.accessToken}`;\n\t\t\tbreak;\n\t\tcase \"api_key\": {\n\t\t\tconst headerName = authConfig.apiKeyHeader;\n\t\t\theaders[headerName] = authConfig.apiKey;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn headers;\n}\nfunction shortHash(str) {\n\tlet h = 5381;\n\tfor (let i = 0; i < str.length; i++) h = (Math.imul(h, 33) ^ str.charCodeAt(i)) >>> 0;\n\treturn h.toString(36).padStart(6, \"0\").slice(-6);\n}\nfunction sanitizeToolName(name) {\n\treturn name.toLowerCase().replace(/[^a-z0-9_-]/g, \"_\").replace(/_+/g, \"_\").replace(/^_+|_+$/g, \"\");\n}\nfunction createToolName(name) {\n\tconst sanitized = sanitizeToolName(name);\n\treturn `${sanitized.slice(0, MAX_PREFIX_LENGTH)}_${shortHash(sanitized.length > 0 ? sanitized : name)}_mcp`;\n}\nfunction toValidToolName(name) {\n\tif (PROVIDER_TOOL_NAME_PATTERN.test(name)) return name;\n\tconst generated = createToolName(name);\n\treturn PROVIDER_TOOL_NAME_PATTERN.test(generated) ? generated : createToolName(`tool_${name}`);\n}\nfunction suggestToolName(sourceName) {\n\treturn toValidToolName(sanitizeToolName(sourceName));\n}\nfunction isProviderSafeIdentifier(name) {\n\treturn PROVIDER_TOOL_NAME_PATTERN.test(name);\n}\nfunction toProviderSafeIdentifier({ name, fallback }) {\n\tif (isProviderSafeIdentifier(name)) return name;\n\tconst sanitized = sanitizeToolName(name).slice(0, MAX_IDENTIFIER_LENGTH);\n\tif (sanitized.length === 0) return fallback;\n\tconst seeded = /^[a-z_]/.test(sanitized) ? sanitized : `_${sanitized}`;\n\treturn isProviderSafeIdentifier(seeded) ? seeded : fallback;\n}\nfunction createPieceToolName(pieceName, actionName) {\n\tconst idx = pieceName.indexOf(\"piece-\");\n\treturn createToolName(`${idx >= 0 ? pieceName.substring(idx + 6) : pieceName}-${actionName}`);\n}\nconst MAX_PREFIX_LENGTH = 53;\nconst MAX_IDENTIFIER_LENGTH = 64;\nconst PROVIDER_TOOL_NAME_PATTERN = /^[a-zA-Z_][a-zA-Z0-9_-]{0,63}$/;\nconst mcpToolNameUtils = {\n\tcreateToolName,\n\tcreatePieceToolName,\n\ttoValidToolName,\n\tsuggestToolName,\n\tisProviderSafeIdentifier,\n\ttoProviderSafeIdentifier\n};\nconst AGENT_STEP_TIMEOUT_MS = 108e5;\nconst AGENT_STEP_TEST_TIMEOUT_MS = 9e5;\n\n//#endregion\n//#region upstream/core-piece-types/lib/ai-providers.ts\nlet AIProviderModelType = /* @__PURE__ */ function(AIProviderModelType) {\n\tAIProviderModelType[\"IMAGE\"] = \"image\";\n\tAIProviderModelType[\"TEXT\"] = \"text\";\n\treturn AIProviderModelType;\n}({});\nconst BaseAIProviderAuthConfig = z.object({ apiKey: z.string() });\nconst AnthropicProviderAuthConfig = BaseAIProviderAuthConfig;\nconst ActivePiecesProviderAuthConfig = z.object({\n\tapiKey: z.string(),\n\tapiKeyHash: z.string()\n});\nconst OpenAICompatibleProviderAuthConfig = BaseAIProviderAuthConfig;\nconst CloudflareGatewayProviderAuthConfig = BaseAIProviderAuthConfig;\nconst AzureProviderAuthConfig = BaseAIProviderAuthConfig;\nconst GoogleProviderAuthConfig = BaseAIProviderAuthConfig;\nconst OpenAIProviderAuthConfig = BaseAIProviderAuthConfig;\nconst OpenRouterProviderAuthConfig = BaseAIProviderAuthConfig;\nconst MistralProviderAuthConfig = BaseAIProviderAuthConfig;\nconst VertexProviderAuthConfig = z.object({ serviceAccountJson: z.string().check(z.minLength(1)) });\nconst BedrockProviderAuthConfig = z.object({\n\taccessKeyId: z.string().check(z.minLength(1)),\n\tsecretAccessKey: z.string().check(z.minLength(1))\n});\nconst AnthropicProviderConfig = z.object({});\nconst ActivePiecesProviderConfig = z.object({});\nconst GoogleProviderConfig = z.object({});\nconst OpenAIProviderConfig = z.object({});\nconst OpenRouterProviderConfig = z.object({});\nconst MistralProviderConfig = z.object({});\nconst ProviderModelConfig = z.object({\n\tmodelId: z.string(),\n\tmodelName: z.string(),\n\tmodelType: z.enum(AIProviderModelType)\n});\nconst OpenAICompatibleProviderConfig = z.object({\n\tapiKeyHeader: z.string(),\n\tbaseUrl: z.string(),\n\tmodels: z.array(ProviderModelConfig),\n\tdefaultHeaders: z.optional(z.record(z.string(), z.string())),\n\tapiStyle: z.optional(z.enum([\"chat\", \"responses\"]))\n});\nconst CloudflareGatewayProviderConfig = z.object({\n\taccountId: z.string(),\n\tgatewayId: z.string(),\n\tmodels: z.array(ProviderModelConfig),\n\tvertexProject: z.optional(z.string()),\n\tvertexRegion: z.optional(z.string())\n});\nconst AzureProviderConfig = z.object({\n\tresourceName: z.string(),\n\tapiVersion: z.pipe(z.transform((v) => typeof v === \"string\" && v.trim().length === 0 ? void 0 : v), z.optional(z.string()))\n});\nconst BedrockProviderConfig = z.object({ region: z.string().check(z.minLength(1)) });\nconst VertexProviderConfig = z.object({\n\tproject: z.string().check(z.regex(/^[a-z0-9][a-z0-9-]{0,62}$/)),\n\tregion: z.string().check(z.regex(/^[a-z0-9][a-z0-9-]{0,62}$/)),\n\tmodels: z.array(ProviderModelConfig)\n});\nconst OpenAiCompatibleVendorConfig = z.object({});\nconst AIProviderAuthConfig = z.union([\n\tAnthropicProviderAuthConfig,\n\tAzureProviderAuthConfig,\n\tGoogleProviderAuthConfig,\n\tOpenAIProviderAuthConfig,\n\tOpenRouterProviderAuthConfig,\n\tCloudflareGatewayProviderAuthConfig,\n\tOpenAICompatibleProviderAuthConfig,\n\tActivePiecesProviderAuthConfig,\n\tBedrockProviderAuthConfig,\n\tVertexProviderAuthConfig,\n\tMistralProviderAuthConfig\n]);\nconst AIProviderConfig = z.union([\n\tOpenAICompatibleProviderConfig,\n\tCloudflareGatewayProviderConfig,\n\tAzureProviderConfig,\n\tVertexProviderConfig,\n\tBedrockProviderConfig,\n\tAnthropicProviderConfig,\n\tGoogleProviderConfig,\n\tOpenAIProviderConfig,\n\tOpenRouterProviderConfig,\n\tActivePiecesProviderConfig,\n\tMistralProviderConfig,\n\tOpenAiCompatibleVendorConfig\n]);\nconst AIProviderModel = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\ttype: z.enum(AIProviderModelType)\n});\nconst AIProviderWithoutSensitiveData = z.object({\n\tid: z.string(),\n\tname: z.string(),\n\tprovider: z.enum(AIProviderName),\n\tconfig: AIProviderConfig,\n\tenabledForChat: z.boolean()\n});\nconst ProjectAIProvider = z.object({\n\tprovider: z.enum(AIProviderName),\n\tname: z.string(),\n\tenabledForChat: z.boolean(),\n\tkeys: z.array(z.object({\n\t\tid: z.string(),\n\t\tname: z.string()\n\t}))\n});\nconst GetProviderConfigResponse = z.object({\n\tprovider: z.enum(AIProviderName),\n\tconfigId: z.string(),\n\tconfig: AIProviderConfig,\n\tauth: AIProviderAuthConfig,\n\tplatformId: z.string()\n});\nfunction splitCloudflareGatewayModelId(modelId) {\n\tconst slashIndex = modelId.indexOf(\"/\");\n\tif (slashIndex === -1) return {\n\t\tprovider: void 0,\n\t\tmodel: modelId,\n\t\tpublisher: void 0\n\t};\n\tconst provider = modelId.substring(0, slashIndex).trim().toLowerCase();\n\tconst rest = modelId.substring(slashIndex + 1);\n\tif (provider === \"google-vertex-ai\") {\n\t\tconst secondSlashIndex = rest.indexOf(\"/\");\n\t\tif (secondSlashIndex === -1) return {\n\t\t\tprovider: void 0,\n\t\t\tmodel: modelId,\n\t\t\tpublisher: void 0\n\t\t};\n\t\treturn {\n\t\t\tprovider: \"google-vertex-ai\",\n\t\t\tpublisher: rest.substring(0, secondSlashIndex),\n\t\t\tmodel: rest.substring(secondSlashIndex + 1)\n\t\t};\n\t}\n\treturn {\n\t\tprovider,\n\t\tmodel: rest,\n\t\tpublisher: void 0\n\t};\n}\nfunction getEffectiveProviderAndModel({ provider, model }) {\n\tif (provider !== \"cloudflare-gateway\" || !model) return {\n\t\tprovider,\n\t\tmodel\n\t};\n\tconst split = splitCloudflareGatewayModelId(model);\n\tconst gatewaySubmodelPrefix = (split.provider ?? \"\").trim().toLowerCase();\n\tconst mapped = CF_GATEWAY_SUBMODEL_TO_PROVIDER[gatewaySubmodelPrefix];\n\tif (!mapped) return {\n\t\tprovider,\n\t\tmodel\n\t};\n\treturn {\n\t\tprovider: mapped,\n\t\tmodel: split.model\n\t};\n}\nconst CF_GATEWAY_SUBMODEL_TO_PROVIDER = {\n\topenai: \"openai\",\n\tanthropic: \"anthropic\",\n\t\"google-ai-studio\": \"google\",\n\t\"google-vertex-ai\": \"google\"\n};\nconst OPENAI_CHAT_MODELS = [\n\t\"gpt-5.5\",\n\t\"gpt-5.4-mini\",\n\t\"gpt-5.4-nano\",\n\t\"gpt-4.1\",\n\t\"gpt-4.1-mini\"\n];\nconst ANTHROPIC_CHAT_MODELS = [\n\t\"claude-sonnet-4-6\",\n\t\"claude-opus-4-7\",\n\t\"claude-haiku-4-5\"\n];\nconst ANTHROPIC_OPENROUTER_CHAT_MODELS = [\n\t\"claude-sonnet-4.6\",\n\t\"claude-opus-4.7\",\n\t\"claude-opus-4.8\",\n\t\"claude-haiku-4.5\"\n];\nconst GOOGLE_CHAT_MODELS = [\n\t\"gemini-2.5-pro\",\n\t\"gemini-2.5-flash\",\n\t\"gemini-3.7-flash\",\n\t\"gemini-3.1-pro-preview\",\n\t\"gemini-3-flash-preview\"\n];\nconst X_AI_OPENROUTER_CHAT_MODELS = [\"grok-4.20\"];\nconst REASONING_OPTIONAL_CHAT_MODELS = ANTHROPIC_OPENROUTER_CHAT_MODELS.map((model) => `${\"anthropic\"}/${model}`);\nconst ALLOWED_CHAT_MODELS_BY_PROVIDER = {\n\t[\"openai\"]: OPENAI_CHAT_MODELS,\n\t[\"anthropic\"]: ANTHROPIC_CHAT_MODELS,\n\t[\"google\"]: GOOGLE_CHAT_MODELS,\n\t[\"vertex\"]: GOOGLE_CHAT_MODELS,\n\t[\"activepieces\"]: [\n\t\t...ANTHROPIC_OPENROUTER_CHAT_MODELS.map((m) => `${\"anthropic\"}/${m}`),\n\t\t...OPENAI_CHAT_MODELS.map((m) => `${\"openai\"}/${m}`),\n\t\t...GOOGLE_CHAT_MODELS.map((m) => `${\"google\"}/${m}`),\n\t\t...X_AI_OPENROUTER_CHAT_MODELS.map((m) => `x-ai/${m}`)\n\t]\n};\nconst DEFAULT_MAX_CONTEXT_TOKENS = 128e3;\nconst PROVIDER_MAX_CONTEXT_TOKENS = {\n\t[\"openai\"]: 128e3,\n\t[\"anthropic\"]: 2e5,\n\t[\"google\"]: 1048576,\n\t[\"bedrock\"]: 2e5,\n\t[\"vertex\"]: 1048576,\n\t[\"azure\"]: 128e3,\n\t[\"openrouter\"]: 128e3,\n\t[\"activepieces\"]: 2e5,\n\t[\"mistral\"]: 128e3\n};\nfunction getMaxContextTokens({ provider }) {\n\tif (!provider) return DEFAULT_MAX_CONTEXT_TOKENS;\n\treturn PROVIDER_MAX_CONTEXT_TOKENS[provider] ?? DEFAULT_MAX_CONTEXT_TOKENS;\n}\nconst DEFAULT_EMBEDDING_MODELS = {\n\t[\"openai\"]: \"text-embedding-3-small\",\n\t[\"google\"]: \"text-embedding-004\",\n\t[\"azure\"]: \"text-embedding-3-small\",\n\t[\"activepieces\"]: \"text-embedding-3-small\",\n\t[\"openrouter\"]: \"openai/text-embedding-3-small\"\n};\nconst WEB_SEARCH_MODE_BY_PROVIDER = {\n\t[\"anthropic\"]: \"native\",\n\t[\"google\"]: \"native\",\n\t[\"openrouter\"]: \"plugin\",\n\t[\"activepieces\"]: \"plugin\"\n};\nconst NO_IMAGE_GENERATION_PROVIDERS = /* @__PURE__ */ new Set([\n\t\"anthropic\",\n\t\"mistral\",\n\t\"xai\",\n\t\"deepseek\",\n\t\"zai\",\n\t\"qwen\",\n\t\"minimax\",\n\t\"moonshot\"\n]);\nconst OPENAI_COMPATIBLE_VENDOR_BASE_URLS = {\n\t[\"xai\"]: \"https://api.x.ai/v1\",\n\t[\"deepseek\"]: \"https://api.deepseek.com/v1\",\n\t[\"zai\"]: \"https://api.z.ai/api/paas/v4\",\n\t[\"qwen\"]: \"https://dashscope-intl.aliyuncs.com/compatible-mode/v1\",\n\t[\"minimax\"]: \"https://api.minimax.io/v1\",\n\t[\"moonshot\"]: \"https://api.moonshot.ai/v1\"\n};\nfunction buildProviderCapabilities(provider) {\n\treturn {\n\t\tchatModels: ALLOWED_CHAT_MODELS_BY_PROVIDER[provider],\n\t\tmaxContextTokens: getMaxContextTokens({ provider }),\n\t\tdefaultEmbeddingModel: DEFAULT_EMBEDDING_MODELS[provider],\n\t\tsupportsEmbedding: DEFAULT_EMBEDDING_MODELS[provider] !== void 0,\n\t\tsupportsImageGeneration: !NO_IMAGE_GENERATION_PROVIDERS.has(provider),\n\t\twebSearch: WEB_SEARCH_MODE_BY_PROVIDER[provider]\n\t};\n}\nconst ACTIVEPIECES_CHAT_TIERS = [\n\t{\n\t\tid: \"fast\",\n\t\tlabel: \"Fast\",\n\t\tmodelId: \"anthropic/claude-haiku-4.5\",\n\t\tnativeModelId: \"claude-haiku-4-5\",\n\t\tthinkingBudget: 5e3,\n\t\tcreditWeight: 2\n\t},\n\t{\n\t\tid: \"smart\",\n\t\tlabel: \"Expert\",\n\t\tmodelId: \"anthropic/claude-sonnet-4.6\",\n\t\tnativeModelId: \"claude-sonnet-4-6\",\n\t\tthinkingBudget: 1e4,\n\t\tcreditWeight: 10\n\t},\n\t{\n\t\tid: \"premium\",\n\t\tlabel: \"Heavy\",\n\t\tmodelId: \"anthropic/claude-opus-4.8\",\n\t\tnativeModelId: \"claude-opus-4-7\",\n\t\tthinkingBudget: 2e4,\n\t\tcreditWeight: 20\n\t}\n];\nconst DEFAULT_CHAT_TIER_ID = \"smart\";\nconst AI_PROVIDER_CAPABILITIES = {\n\t[\"openai\"]: buildProviderCapabilities(\"openai\"),\n\t[\"anthropic\"]: buildProviderCapabilities(\"anthropic\"),\n\t[\"openrouter\"]: buildProviderCapabilities(\"openrouter\"),\n\t[\"azure\"]: buildProviderCapabilities(\"azure\"),\n\t[\"google\"]: buildProviderCapabilities(\"google\"),\n\t[\"cloudflare-gateway\"]: buildProviderCapabilities(\"cloudflare-gateway\"),\n\t[\"custom\"]: buildProviderCapabilities(\"custom\"),\n\t[\"bedrock\"]: buildProviderCapabilities(\"bedrock\"),\n\t[\"vertex\"]: buildProviderCapabilities(\"vertex\"),\n\t[\"mistral\"]: buildProviderCapabilities(\"mistral\"),\n\t[\"activepieces\"]: buildProviderCapabilities(\"activepieces\"),\n\t[\"xai\"]: buildProviderCapabilities(\"xai\"),\n\t[\"deepseek\"]: buildProviderCapabilities(\"deepseek\"),\n\t[\"zai\"]: buildProviderCapabilities(\"zai\"),\n\t[\"qwen\"]: buildProviderCapabilities(\"qwen\"),\n\t[\"minimax\"]: buildProviderCapabilities(\"minimax\"),\n\t[\"moonshot\"]: buildProviderCapabilities(\"moonshot\")\n};\n\n//#endregion\n//#region upstream/core-piece-types/lib/forms.ts\nconst FileResponseInterfaceV1 = z.object({\n\tbase64Url: z.string(),\n\tfileName: z.string(),\n\textension: z.optional(z.string())\n});\nconst FileResponseInterfaceV2 = z.object({\n\tmimeType: z.string(),\n\turl: z.string(),\n\tfileName: z.optional(z.string())\n});\nconst FileResponseInterface = z.union([FileResponseInterfaceV1, FileResponseInterfaceV2]);\nlet HumanInputFormResultTypes = /* @__PURE__ */ function(HumanInputFormResultTypes) {\n\tHumanInputFormResultTypes[\"FILE\"] = \"file\";\n\tHumanInputFormResultTypes[\"MARKDOWN\"] = \"markdown\";\n\treturn HumanInputFormResultTypes;\n}({});\nfunction createKeyForFormInput(displayName) {\n\t/**We do this because react form inputs must not contain quotes */\n\treturn displayName.toLowerCase().replace(/\\s+(\\w)/g, (_, letter) => letter.toUpperCase()).replace(/^(.)/, (letter) => letter.toLowerCase()).replaceAll(/[\\\\\"''\\n\\r\\t]/g, \"\");\n}\nconst HumanInputFormResult = z.union([z.object({\n\ttype: z.literal(\"file\"),\n\tvalue: FileResponseInterface\n}), z.object({\n\ttype: z.literal(\"markdown\"),\n\tvalue: z.string(),\n\tfiles: z.optional(z.array(FileResponseInterface))\n})]);\nconst ChatFormResponse = z.object({\n\tsessionId: z.string(),\n\tmessage: z.string(),\n\tfiles: z.optional(z.array(z.string()))\n});\n\n//#endregion\n//#region upstream/core-piece-types/lib/tables.ts\nlet FieldType = /* @__PURE__ */ function(FieldType) {\n\tFieldType[\"TEXT\"] = \"TEXT\";\n\tFieldType[\"NUMBER\"] = \"NUMBER\";\n\tFieldType[\"DATE\"] = \"DATE\";\n\tFieldType[\"DATETIME\"] = \"DATETIME\";\n\tFieldType[\"STATIC_DROPDOWN\"] = \"STATIC_DROPDOWN\";\n\treturn FieldType;\n}({});\nlet TableAutomationTrigger = /* @__PURE__ */ function(TableAutomationTrigger) {\n\tTableAutomationTrigger[\"ON_NEW_RECORD\"] = \"ON_NEW_RECORD\";\n\tTableAutomationTrigger[\"ON_UPDATE_RECORD\"] = \"ON_UPDATE_RECORD\";\n\treturn TableAutomationTrigger;\n}({});\nlet TableAutomationStatus = /* @__PURE__ */ function(TableAutomationStatus) {\n\tTableAutomationStatus[\"ENABLED\"] = \"ENABLED\";\n\tTableAutomationStatus[\"DISABLED\"] = \"DISABLED\";\n\treturn TableAutomationStatus;\n}({});\nlet TableWebhookEventType = /* @__PURE__ */ function(TableWebhookEventType) {\n\tTableWebhookEventType[\"RECORD_CREATED\"] = \"RECORD_CREATED\";\n\tTableWebhookEventType[\"RECORD_UPDATED\"] = \"RECORD_UPDATED\";\n\tTableWebhookEventType[\"RECORD_DELETED\"] = \"RECORD_DELETED\";\n\treturn TableWebhookEventType;\n}({});\nlet FilterOperator = /* @__PURE__ */ function(FilterOperator) {\n\tFilterOperator[\"EQ\"] = \"eq\";\n\tFilterOperator[\"NEQ\"] = \"neq\";\n\tFilterOperator[\"GT\"] = \"gt\";\n\tFilterOperator[\"GTE\"] = \"gte\";\n\tFilterOperator[\"LT\"] = \"lt\";\n\tFilterOperator[\"LTE\"] = \"lte\";\n\tFilterOperator[\"CO\"] = \"co\";\n\tFilterOperator[\"EXISTS\"] = \"exists\";\n\tFilterOperator[\"NOT_EXISTS\"] = \"not_exists\";\n\treturn FilterOperator;\n}({});\nconst Field = z.union([z.object({\n\t...BaseModelSchema,\n\tname: z.string(),\n\texternalId: z.string(),\n\ttype: z.literal(\"STATIC_DROPDOWN\"),\n\ttableId: z.string(),\n\tprojectId: z.string(),\n\tdata: z.object({ options: z.array(z.object({ value: z.string() })) })\n}), z.object({\n\t...BaseModelSchema,\n\tname: z.string(),\n\texternalId: z.string(),\n\ttype: z.union([\n\t\tz.literal(\"TEXT\"),\n\t\tz.literal(\"NUMBER\"),\n\t\tz.literal(\"DATE\"),\n\t\tz.literal(\"DATETIME\")\n\t]),\n\ttableId: z.string(),\n\tprojectId: z.string()\n})]);\nconst Table = z.object({\n\t...BaseModelSchema,\n\tname: z.string(),\n\tfolderId: Nullable(z.string()),\n\tprojectId: z.string(),\n\texternalId: z.string(),\n\tstatus: NullableEnum(TableAutomationStatus),\n\ttrigger: NullableEnum(TableAutomationTrigger)\n});\nconst PopulatedRecord = z.object({\n\t...BaseModelSchema,\n\ttableId: z.string(),\n\tprojectId: z.string(),\n\tcells: z.record(z.string(), z.object({\n\t\tupdated: z.string(),\n\t\tcreated: z.string(),\n\t\tvalue: z.unknown(),\n\t\tfieldName: z.string()\n\t}))\n});\nconst CreateTableWebhookRequest = z.object({\n\tevents: z.array(z.enum(TableWebhookEventType)),\n\twebhookUrl: z.string(),\n\tflowId: z.string()\n});\nconst ExportTableResponse = z.object({\n\tfields: z.array(z.object({\n\t\tid: z.string(),\n\t\tname: z.string()\n\t})),\n\trows: z.array(z.record(z.string(), z.string())),\n\tname: z.string()\n});\nconst ListTablesRequest = z.object({\n\tprojectId: z.string(),\n\tlimit: z.optional(z.coerce.number()),\n\tcursor: z.optional(z.string()),\n\tname: z.optional(z.string()),\n\texternalIds: OptionalArrayFromQuery(z.string()),\n\tfolderId: z.optional(z.string()),\n\tfolderIds: OptionalArrayFromQuery(z.string())\n});\nconst CreateRecordsRequest = z.object({\n\trecords: z.array(z.array(z.object({\n\t\tfieldId: z.string(),\n\t\tvalue: coerceToString()\n\t}))),\n\ttableId: z.string()\n});\nconst UpdateRecordRequest = z.object({\n\tcells: z.optional(z.array(z.object({\n\t\tfieldId: z.string(),\n\t\tvalue: coerceToString()\n\t}))),\n\ttableId: z.string(),\n\tagentUpdate: z.optional(z.boolean())\n});\nconst Filter = z.discriminatedUnion(\"operator\", [\n\tvalueFilter(\"eq\"),\n\tvalueFilter(\"neq\"),\n\tvalueFilter(\"gt\"),\n\tvalueFilter(\"gte\"),\n\tvalueFilter(\"lt\"),\n\tvalueFilter(\"lte\"),\n\tvalueFilter(\"co\"),\n\texistenceFilter(\"exists\"),\n\texistenceFilter(\"not_exists\")\n]);\nconst ListRecordsRequest = z.object({\n\ttableId: z.string(),\n\tlimit: z.optional(z.coerce.number()),\n\tcursor: z.optional(z.string()),\n\tfilters: OptionalArrayFromQuery(Filter)\n});\nconst StaticDropdownEmptyOption = {\n\tlabel: \"\",\n\tvalue: \"\"\n};\nfunction coerceToString() {\n\treturn z.pipe(z.transform((v) => v === null || v === void 0 ? v : String(v)), z.nullable(z.string()));\n}\nfunction valueFilter(op) {\n\treturn z.object({\n\t\tfieldId: z.string(),\n\t\toperator: z.literal(op),\n\t\tvalue: z.string()\n\t});\n}\nfunction existenceFilter(op) {\n\treturn z.object({\n\t\tfieldId: z.string(),\n\t\toperator: z.literal(op)\n\t});\n}\n\n//#endregion\n//#region upstream/core-piece-types/lib/flow-contracts.ts\nlet FlowStatus = /* @__PURE__ */ function(FlowStatus) {\n\tFlowStatus[\"ENABLED\"] = \"ENABLED\";\n\tFlowStatus[\"DISABLED\"] = \"DISABLED\";\n\treturn FlowStatus;\n}({});\nlet FlowTriggerType = /* @__PURE__ */ function(FlowTriggerType) {\n\tFlowTriggerType[\"EMPTY\"] = \"EMPTY\";\n\tFlowTriggerType[\"PIECE\"] = \"PIECE_TRIGGER\";\n\treturn FlowTriggerType;\n}({});\nconst StopResponse = z.object({\n\tstatus: z.optional(z.number()),\n\tbody: z.optional(z.unknown()),\n\theaders: z.optional(z.record(z.string(), z.string()))\n});\nconst Project = z.object({\n\t...BaseModelSchema,\n\tdeleted: Nullable(DateOrString),\n\townerId: z.string(),\n\tdisplayName: z.string(),\n\tplatformId: z.string(),\n\texternalId: Nullable(z.string())\n});\nconst USE_DRAFT_QUERY_PARAM_NAME = \"useDraft\";\nconst PARENT_RUN_ID_HEADER = \"ap-parent-run-id\";\nconst FAIL_PARENT_ON_FAILURE_HEADER = \"ap-fail-parent-on-failure\";\nconst RAW_PAYLOAD_HEADER = \"ap-raw-payload\";\n\n//#endregion\n//#region upstream/core-piece-types/lib/mcp-piece.ts\nlet McpPropertyType = /* @__PURE__ */ function(McpPropertyType) {\n\tMcpPropertyType[\"TEXT\"] = \"Text\";\n\tMcpPropertyType[\"BOOLEAN\"] = \"Boolean\";\n\tMcpPropertyType[\"DATE\"] = \"Date\";\n\tMcpPropertyType[\"NUMBER\"] = \"Number\";\n\tMcpPropertyType[\"ARRAY\"] = \"Array\";\n\tMcpPropertyType[\"OBJECT\"] = \"Object\";\n\treturn McpPropertyType;\n}({});\nconst McpProperty = z.object({\n\tname: z.string(),\n\tdescription: z.optional(z.string()),\n\ttype: z.string(),\n\trequired: z.boolean()\n});\nconst McpTrigger = z.object({\n\tpieceName: z.string(),\n\ttriggerName: z.string(),\n\tinput: z.object({\n\t\ttoolName: z.string(),\n\t\ttoolDescription: z.string(),\n\t\tinputSchema: z.array(McpProperty),\n\t\treturnsResponse: z.boolean()\n\t})\n});\n\n//#endregion\n//#region upstream/core-piece-types/lib/engine-tools.ts\nfunction normalizeToolOutputToExecuteResponse(raw) {\n\tif (raw === null || typeof raw !== \"object\") return {\n\t\tstatus: \"FAILED\",\n\t\toutput: raw,\n\t\tresolvedInput: {},\n\t\terrorMessage: \"Invalid tool output\"\n\t};\n\tconst o = raw;\n\tif (o[\"status\"] === \"SUCCESS\" || o[\"status\"] === \"FAILED\") return {\n\t\tstatus: o[\"status\"],\n\t\toutput: o[\"output\"],\n\t\tresolvedInput: o[\"resolvedInput\"] ?? {},\n\t\terrorMessage: o[\"errorMessage\"]\n\t};\n\tconst isError = o[\"isError\"] === true;\n\tlet output = o[\"structuredContent\"];\n\tif (output === void 0 && Array.isArray(o[\"content\"])) {\n\t\tconst parts = o[\"content\"].map((c) => c?.text).filter(Boolean);\n\t\toutput = parts.length === 1 ? parts[0] : parts.length ? { text: parts.join(\"\") } : o[\"content\"];\n\t}\n\tif (output === void 0) output = o;\n\treturn {\n\t\tstatus: isError ? \"FAILED\" : \"SUCCESS\",\n\t\toutput,\n\t\tresolvedInput: {},\n\t\terrorMessage: isError ? o[\"content\"]?.[0]?.text ?? o[\"message\"] ?? \"Tool failed\" : void 0\n\t};\n}\n\n//#endregion\n//#region upstream/framework/lib/property/util.ts\nfunction buildSchema(props, auth, requireAuth = true) {\n\tconst entries = Object.entries(props);\n\tconst propsSchema = {};\n\tfor (const [name, property] of entries) {\n\t\tswitch (property.type) {\n\t\t\tcase \"MARKDOWN\":\n\t\t\t\tpropsSchema[name] = z.optional(z.union([\n\t\t\t\t\tz.null(),\n\t\t\t\t\tz.undefined(),\n\t\t\t\t\tz.never(),\n\t\t\t\t\tz.unknown()\n\t\t\t\t]));\n\t\t\t\tbreak;\n\t\t\tcase \"DATE_TIME\":\n\t\t\tcase \"SHORT_TEXT\":\n\t\t\tcase \"LONG_TEXT\":\n\t\t\tcase \"RICH_TEXT\":\n\t\t\tcase \"COLOR\":\n\t\t\tcase \"FILE\":\n\t\t\t\tpropsSchema[name] = property.required ? z.string().check(z.minLength(1)) : z.string();\n\t\t\t\tbreak;\n\t\t\tcase \"CHECKBOX\":\n\t\t\t\tpropsSchema[name] = z.union([z.boolean(), z.string()]);\n\t\t\t\tbreak;\n\t\t\tcase \"NUMBER\":\n\t\t\t\tpropsSchema[name] = z.union([property.required ? z.string().check(z.minLength(1)) : z.string(), z.number()]);\n\t\t\t\tbreak;\n\t\t\tcase \"STATIC_DROPDOWN\":\n\t\t\tcase \"DROPDOWN\":\n\t\t\t\tpropsSchema[name] = z.unknown().check(z.refine((val) => val !== null && val !== void 0, { error: \"Value must not be null or undefined\" }));\n\t\t\t\tbreak;\n\t\t\tcase \"SECRET_TEXT\":\n\t\t\t\tpropsSchema[name] = property.required ? z.string().check(z.minLength(1)) : z.string();\n\t\t\t\tbreak;\n\t\t\tcase \"BASIC_AUTH\":\n\t\t\tcase \"CUSTOM_AUTH\":\n\t\t\tcase \"OAUTH2\": break;\n\t\t\tcase \"ARRAY\": {\n\t\t\t\tconst arrayItemSchema = isNil(property.properties) ? property.required ? z.string().check(z.minLength(1)) : z.string() : buildSchema(property.properties, void 0);\n\t\t\t\tpropsSchema[name] = z.union([\n\t\t\t\t\tproperty.required ? z.array(arrayItemSchema).check(z.minLength(1)) : z.array(arrayItemSchema),\n\t\t\t\t\tz.record(z.string(), z.unknown()),\n\t\t\t\t\tproperty.required ? z.string().check(z.minLength(1)) : z.string()\n\t\t\t\t]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"OBJECT\":\n\t\t\t\tpropsSchema[name] = z.union([z.record(z.string(), z.any()), property.required ? z.string().check(z.minLength(1)) : z.string()]);\n\t\t\t\tbreak;\n\t\t\tcase \"DATE_RANGE\":\n\t\t\t\tpropsSchema[name] = z.union([z.record(z.string(), z.any()), z.string()]);\n\t\t\t\tbreak;\n\t\t\tcase \"JSON\":\n\t\t\t\tpropsSchema[name] = z.union([\n\t\t\t\t\tz.record(z.string(), z.any()),\n\t\t\t\t\tz.array(z.any()),\n\t\t\t\t\tproperty.required ? z.string().check(z.minLength(1)) : z.string()\n\t\t\t\t]);\n\t\t\t\tbreak;\n\t\t\tcase \"MULTI_SELECT_DROPDOWN\":\n\t\t\tcase \"STATIC_MULTI_SELECT_DROPDOWN\":\n\t\t\t\tpropsSchema[name] = z.union([property.required ? z.array(z.any()).check(z.minLength(1)) : z.array(z.any()), property.required ? z.string().check(z.minLength(1)) : z.string()]);\n\t\t\t\tbreak;\n\t\t\tcase \"DYNAMIC\":\n\t\t\t\tpropsSchema[name] = z.record(z.string(), z.any());\n\t\t\t\tbreak;\n\t\t\tcase \"CUSTOM\": propsSchema[name] = z.unknown();\n\t\t}\n\t\tif (!property.required && property.type !== \"ARRAY\") propsSchema[name] = z.optional(z.union(isEmpty(propsSchema[name]) ? [\n\t\t\tz.any(),\n\t\t\tz.null(),\n\t\t\tz.undefined()\n\t\t] : [\n\t\t\tpropsSchema[name],\n\t\t\tz.null(),\n\t\t\tz.undefined()\n\t\t]));\n\t}\n\tif (auth && requireAuth) propsSchema[AUTHENTICATION_PROPERTY_NAME] = z.string().check(z.minLength(1));\n\treturn z.object(propsSchema);\n}\nconst piecePropertiesUtils = { buildSchema };\n\n//#endregion\n//#region upstream/framework/lib/property/index.ts\nconst PieceProperty = z.union([InputProperty, PieceAuthProperty]);\nconst PiecePropertyMap = z.record(z.string(), PieceProperty);\nconst InputPropertyMap = z.record(z.string(), InputProperty);\n\n//#endregion\n//#region upstream/framework/lib/trigger/trigger.ts\nconst DEDUPE_KEY_PROPERTY = \"_dedupe_key\";\nlet WebhookRenewStrategy = /* @__PURE__ */ function(WebhookRenewStrategy) {\n\tWebhookRenewStrategy[\"CRON\"] = \"CRON\";\n\tWebhookRenewStrategy[\"NONE\"] = \"NONE\";\n\treturn WebhookRenewStrategy;\n}({});\nconst WebhookRenewConfiguration = z.union([z.object({\n\tstrategy: z.literal(\"CRON\"),\n\tcronExpression: z.string()\n}), z.object({ strategy: z.literal(\"NONE\") })]);\nvar ITrigger = class {\n\tname;\n\tdisplayName;\n\tdescription;\n\trequireAuth;\n\tprops;\n\ttype;\n\thandshakeConfiguration;\n\tonHandshake;\n\trenewConfiguration;\n\tonRenew;\n\tonEnable;\n\tonDisable;\n\tonStart;\n\trun;\n\ttest;\n\tsampleData;\n\ttestStrategy;\n\toutputSchema;\n\taiMetadata;\n\tclassification;\n\tpropertyGroups;\n\tconstructor(name, displayName, description, requireAuth, props, type, handshakeConfiguration, onHandshake, renewConfiguration, onRenew, onEnable, onDisable, onStart, run, test, sampleData, testStrategy, outputSchema, aiMetadata, classification, propertyGroups) {\n\t\tthis.name = name;\n\t\tthis.displayName = displayName;\n\t\tthis.description = description;\n\t\tthis.requireAuth = requireAuth;\n\t\tthis.props = props;\n\t\tthis.type = type;\n\t\tthis.handshakeConfiguration = handshakeConfiguration;\n\t\tthis.onHandshake = onHandshake;\n\t\tthis.renewConfiguration = renewConfiguration;\n\t\tthis.onRenew = onRenew;\n\t\tthis.onEnable = onEnable;\n\t\tthis.onDisable = onDisable;\n\t\tthis.onStart = onStart;\n\t\tthis.run = run;\n\t\tthis.test = test;\n\t\tthis.sampleData = sampleData;\n\t\tthis.testStrategy = testStrategy;\n\t\tthis.outputSchema = outputSchema;\n\t\tthis.aiMetadata = aiMetadata;\n\t\tthis.classification = classification;\n\t\tthis.propertyGroups = propertyGroups;\n\t}\n};\nconst createTrigger = (params) => {\n\tswitch (params.type) {\n\t\tcase \"WEBHOOK\": return new ITrigger(params.name, params.displayName, params.description, params.requireAuth ?? true, params.props, params.type, params.handshakeConfiguration ?? { strategy: \"NONE\" }, params.onHandshake ?? (async () => ({ status: 200 })), params.renewConfiguration ?? { strategy: \"NONE\" }, params.onRenew ?? (async () => Promise.resolve()), params.onEnable, params.onDisable, params.onStart ?? (async () => Promise.resolve()), params.run, params.test ?? (() => Promise.resolve([params.sampleData])), params.sampleData, params.test ? \"TEST_FUNCTION\" : \"SIMULATION\", params.outputSchema, params.aiMetadata, params.classification, params.propertyGroups);\n\t\tcase \"POLLING\": return new ITrigger(params.name, params.displayName, params.description, params.requireAuth ?? true, params.props, params.type, { strategy: \"NONE\" }, async () => ({ status: 200 }), { strategy: \"NONE\" }, async () => Promise.resolve(), params.onEnable, params.onDisable, params.onStart ?? (async () => Promise.resolve()), params.run, params.test ?? (() => Promise.resolve([params.sampleData])), params.sampleData, \"TEST_FUNCTION\", params.outputSchema, params.aiMetadata, params.classification, params.propertyGroups);\n\t\tcase \"MANUAL\": return new ITrigger(params.name, params.displayName, params.description, params.requireAuth ?? true, params.props, params.type, { strategy: \"NONE\" }, async () => ({ status: 200 }), { strategy: \"NONE\" }, async () => Promise.resolve(), params.onEnable, params.onDisable, params.onStart ?? (async () => Promise.resolve()), params.run, params.test ?? (() => Promise.resolve([params.sampleData])), params.sampleData, \"TEST_FUNCTION\", params.outputSchema, params.aiMetadata, params.classification, params.propertyGroups);\n\t\tcase \"APP_WEBHOOK\": return new ITrigger(params.name, params.displayName, params.description, params.requireAuth ?? true, params.props, params.type, { strategy: \"NONE\" }, async () => ({ status: 200 }), { strategy: \"NONE\" }, async () => Promise.resolve(), params.onEnable, params.onDisable, params.onStart ?? (async () => Promise.resolve()), params.run, params.test ?? (() => Promise.resolve([params.sampleData])), params.sampleData, isNil(params.sampleData) && isNil(params.test) ? \"SIMULATION\" : \"TEST_FUNCTION\", params.outputSchema, params.aiMetadata, params.classification, params.propertyGroups);\n\t\tdefault: {\n\t\t\tconst { name, type, strategy } = params;\n\t\t\tthrow new Error(type === void 0 && strategy !== void 0 ? `createTrigger: trigger ${JSON.stringify(name)} sets \\`strategy\\`; the field is \\`type\\`, e.g. type: TriggerStrategy.POLLING` : `createTrigger: trigger ${JSON.stringify(name)} has \\`type\\` ${JSON.stringify(type)}; set type: TriggerStrategy.POLLING or TriggerStrategy.WEBHOOK`);\n\t\t}\n\t}\n};\n\n//#endregion\n//#region upstream/framework/lib/context/index.ts\nvar PieceServerContextError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"PieceServerContextError\";\n\t}\n};\nfunction isPieceServerContextError(error) {\n\treturn error instanceof Error && error.name === \"PieceServerContextError\";\n}\nlet StoreScope = /* @__PURE__ */ function(StoreScope) {\n\tStoreScope[\"PROJECT\"] = \"COLLECTION\";\n\tStoreScope[\"FLOW\"] = \"FLOW\";\n\treturn StoreScope;\n}({});\n\n//#endregion\n//#region upstream/framework/lib/context/versioning.ts\nlet ContextVersion = /* @__PURE__ */ function(ContextVersion) {\n\tContextVersion[\"V1\"] = \"1\";\n\tContextVersion[\"V2\"] = \"2\";\n\treturn ContextVersion;\n}({});\nconst LATEST_CONTEXT_VERSION = \"2\";\nconst MINIMUM_SUPPORTED_RELEASE_AFTER_LATEST_CONTEXT_VERSION = \"0.82.0\";\nconst backwardCompatabilityContextUtils = { makeActionContextBackwardCompatible({ context, contextVersion }) {\n\tswitch (contextVersion) {\n\t\tcase \"2\": return context;\n\t\tcase \"1\": return addLegacyMethods({ context });\n\t\tcase void 0: return addLegacyMethodsAndServerUrl({ context });\n\t}\n} };\nfunction addLegacyMethods({ context }) {\n\treturn {\n\t\t...context,\n\t\tgenerateResumeUrl: buildLegacyGenerateResumeUrl({ context }),\n\t\trun: {\n\t\t\t...context.run,\n\t\t\tpause: buildLegacyPauseHook({ context })\n\t\t}\n\t};\n}\nfunction addLegacyMethodsAndServerUrl({ context }) {\n\treturn {\n\t\t...addLegacyMethods({ context }),\n\t\tserverUrl: context.server.publicUrl\n\t};\n}\n/**\n* @deprecated Since 2026-04-12. Remove after 2026-10-12 once all pieces migrate to createWaitpoint/waitForWaitpoint.\n*/\nfunction buildLegacyPauseHook({ context }) {\n\treturn (req) => {\n\t\tconst type = req.pauseMetadata.type === \"DELAY\" ? \"DELAY\" : \"WEBHOOK\";\n\t\tconst responseToSend = req.pauseMetadata.type === \"WEBHOOK\" ? req.pauseMetadata.response : void 0;\n\t\tconst resumeDateTime = req.pauseMetadata.type === \"DELAY\" ? req.pauseMetadata.resumeDateTime : void 0;\n\t\tcontext.run.createWaitpoint({\n\t\t\ttype,\n\t\t\tversion: \"V0\",\n\t\t\tresumeDateTime,\n\t\t\tresponseToSend\n\t\t}).catch((e) => {\n\t\t\tconsole.error(\"[buildLegacyPauseHook] Failed to create waitpoint\", e);\n\t\t\tprocess.exit(1);\n\t\t});\n\t\tcontext.run.waitForWaitpoint(\"\");\n\t};\n}\n/**\n* @deprecated Since 2026-04-12. Remove after 2026-10-12 once all pieces migrate to createWaitpoint/waitForWaitpoint.\n*/\nfunction buildLegacyGenerateResumeUrl({ context }) {\n\treturn (params) => {\n\t\tconst randomId = Math.random().toString(36).substring(2);\n\t\tconst url = new URL(`${context.server.publicUrl}v1/flow-runs/${context.run.id}/requests/${randomId}${params.sync ? \"/sync\" : \"\"}`);\n\t\turl.search = new URLSearchParams(params.queryParams).toString();\n\t\treturn url.toString();\n\t};\n}\n\n//#endregion\n//#region upstream/framework/lib/piece.ts\nvar Piece = class {\n\tdisplayName;\n\tlogoUrl;\n\tauthors;\n\tevents;\n\tcategories;\n\tauth;\n\tminimumSupportedRelease;\n\tmaximumSupportedRelease;\n\tdescription;\n\tdeprecated;\n\t_actions = {};\n\t_triggers = {};\n\tgetContextInfo = () => ({ version: \"2\" });\n\tconstructor(displayName, logoUrl, authors, events, actions, triggers, categories, auth, minimumSupportedRelease = MINIMUM_SUPPORTED_RELEASE_AFTER_LATEST_CONTEXT_VERSION, maximumSupportedRelease, description = \"\", deprecated) {\n\t\tthis.displayName = displayName;\n\t\tthis.logoUrl = logoUrl;\n\t\tthis.authors = authors;\n\t\tthis.events = events;\n\t\tthis.categories = categories;\n\t\tthis.auth = auth;\n\t\tthis.minimumSupportedRelease = minimumSupportedRelease;\n\t\tthis.maximumSupportedRelease = maximumSupportedRelease;\n\t\tthis.description = description;\n\t\tthis.deprecated = deprecated;\n\t\tif (!isValidSimpleSemver(minimumSupportedRelease) || isSemverLessThan(minimumSupportedRelease, \"0.82.0\")) this.minimumSupportedRelease = MINIMUM_SUPPORTED_RELEASE_AFTER_LATEST_CONTEXT_VERSION;\n\t\tactions.forEach((action) => this._actions[action.name] = action);\n\t\ttriggers.forEach((trigger) => this._triggers[trigger.name] = trigger);\n\t}\n\tmetadata() {\n\t\treturn {\n\t\t\tdisplayName: this.displayName,\n\t\t\tlogoUrl: this.logoUrl,\n\t\t\tactions: this._actions,\n\t\t\ttriggers: this._triggers,\n\t\t\tcategories: this.categories,\n\t\t\tdescription: this.description,\n\t\t\tauthors: this.authors,\n\t\t\tauth: withConnectionIdentifierFlag(this.auth),\n\t\t\tminimumSupportedRelease: this.minimumSupportedRelease,\n\t\t\tmaximumSupportedRelease: this.maximumSupportedRelease,\n\t\t\tdeprecated: this.deprecated,\n\t\t\tcontextInfo: this.getContextInfo?.()\n\t\t};\n\t}\n\tgetAction(actionName) {\n\t\treturn this._actions[actionName];\n\t}\n\tgetTrigger(triggerName) {\n\t\treturn this._triggers[triggerName];\n\t}\n\tactions() {\n\t\treturn this._actions;\n\t}\n\ttriggers() {\n\t\treturn this._triggers;\n\t}\n};\nconst createPiece = (params) => {\n\tif (params.auth && Array.isArray(params.auth)) {\n\t\tif (!params.auth.every((auth, index, self) => index === self.findIndex((t) => t.type === auth.type))) throw new Error(\"Auth properties must be unique by type\");\n\t}\n\treturn new Piece(params.displayName, params.logoUrl, params.authors ?? [], params.events, params.actions, params.triggers, params.categories ?? [], params.auth, params.minimumSupportedRelease, params.maximumSupportedRelease, params.description, params.deprecated);\n};\nfunction withConnectionIdentifierFlag(auth) {\n\tif (auth === void 0) return;\n\treturn Array.isArray(auth) ? auth.map(flagConnectionIdentifier) : flagConnectionIdentifier(auth);\n}\nfunction flagConnectionIdentifier(auth) {\n\treturn {\n\t\t...auth,\n\t\thasConnectionIdentifier: auth.getConnectionIdentifier !== void 0\n\t};\n}\nfunction isValidSimpleSemver(version) {\n\treturn /^\\d+\\.\\d+\\.\\d+$/.test(version);\n}\nfunction isSemverLessThan(a, b) {\n\tconst [a1, a2, a3] = a.split(\".\").map(Number);\n\tconst [b1, b2, b3] = b.split(\".\").map(Number);\n\tif (a1 !== b1) return a1 < b1;\n\tif (a2 !== b2) return a2 < b2;\n\treturn a3 < b3;\n}\n\n//#endregion\n//#region upstream/framework/lib/piece-metadata.ts\nconst I18nForPiece = z.optional(z.record(z.string(), z.record(z.string(), z.string())));\nconst PieceBase = z.object({\n\tid: z.optional(z.string()),\n\tname: z.string(),\n\tdisplayName: z.string(),\n\tlogoUrl: z.string(),\n\tdescription: z.string(),\n\tauthors: z.array(z.string()),\n\tplatformId: z.optional(z.string()),\n\tdirectoryPath: z.optional(z.string()),\n\tauth: z.optional(z.union([PieceAuthProperty, z.array(PieceAuthProperty)])),\n\tversion: z.string(),\n\tcategories: z.optional(z.array(z.enum(PieceCategory))),\n\tminimumSupportedRelease: z.optional(z.string()),\n\tmaximumSupportedRelease: z.optional(z.string()),\n\tdeprecated: z.optional(z.boolean()),\n\ti18n: I18nForPiece\n});\nconst Audience = z.enum([\n\t\"human\",\n\t\"ai\",\n\t\"both\"\n]);\nconst AiMetadata = z.object({\n\tdescription: z.optional(z.string()),\n\tidempotent: z.optional(z.boolean())\n});\nconst ActionClassification = z.enum([\n\t\"READ\",\n\t\"SEARCH\",\n\t\"WRITE\",\n\t\"DESTRUCTIVE\"\n]);\nconst READ_ONLY_CLASSIFICATIONS = [\"READ\", \"SEARCH\"];\nconst isReadOnlyClassification = (classification) => classification !== void 0 && READ_ONLY_CLASSIFICATIONS.includes(classification);\nconst PropertyGroupDisplay = z.enum([\n\t\"tabs\",\n\t\"section\",\n\t\"summary\",\n\t\"builder\",\n\t\"footer\"\n]);\nconst PropertyGroup = z.object({\n\tkey: z.string(),\n\tdisplay: PropertyGroupDisplay,\n\tlabel: z.optional(z.string()),\n\tdescription: z.optional(z.string()),\n\ticon: z.optional(z.string()),\n\tprops: z.array(z.string())\n});\nconst ActionBase = z.object({\n\tname: z.string(),\n\tdisplayName: z.string(),\n\tdescription: z.string(),\n\tprops: PiecePropertyMap,\n\tpropertyGroups: z.optional(z.array(PropertyGroup)),\n\trequireAuth: z.boolean(),\n\terrorHandlingOptions: z.optional(ErrorHandlingOptionsParam),\n\toutputSchema: z.optional(z.custom()),\n\taudience: z.optional(Audience),\n\taiMetadata: z.optional(AiMetadata),\n\tclassification: z.optional(ActionClassification)\n});\nconst TriggerBase = z.object({\n\tname: z.string(),\n\tdisplayName: z.string(),\n\tdescription: z.string(),\n\tprops: PiecePropertyMap,\n\tpropertyGroups: z.optional(z.array(PropertyGroup)),\n\terrorHandlingOptions: z.optional(ErrorHandlingOptionsParam),\n\ttype: z.enum(TriggerStrategy),\n\tsampleData: z.unknown(),\n\thandshakeConfiguration: z.optional(z.custom()),\n\trenewConfiguration: z.optional(WebhookRenewConfiguration),\n\ttestStrategy: z.enum(TriggerTestStrategy),\n\toutputSchema: z.optional(z.custom()),\n\taiMetadata: z.optional(AiMetadata),\n\tclassification: z.optional(ActionClassification)\n});\nconst PieceMetadata = z.object({\n\t...PieceBase.shape,\n\tactions: z.record(z.string(), ActionBase),\n\ttriggers: z.record(z.string(), TriggerBase)\n});\nconst PieceMetadataSummary = z.object({\n\t...PieceBase.shape,\n\tactions: z.number(),\n\ttriggers: z.number(),\n\tsuggestedActions: z.optional(z.array(ActionBase)),\n\tsuggestedTriggers: z.optional(z.array(TriggerBase))\n});\nconst PiecePackageMetadata = z.object({\n\tprojectUsage: z.number(),\n\tpieceType: z.enum(PieceType),\n\tpackageType: z.enum(PackageType),\n\tplatformId: z.optional(z.string()),\n\tarchiveId: z.optional(z.string())\n});\nconst PieceMetadataModel = z.object({\n\t...PieceMetadata.shape,\n\t...PiecePackageMetadata.shape\n});\nconst PieceMetadataModelSummary = z.object({\n\t...PieceMetadataSummary.shape,\n\t...PiecePackageMetadata.shape\n});\nconst PiecePackageInformation = z.object({\n\tname: z.string(),\n\tversion: z.string()\n});\n\n//#endregion\n//#region upstream/framework/lib/i18n.ts\nconst pieceTranslation = {\n\ttranslatePiece: (params) => {\n\t\tconst { piece, locale, mutate = false } = params;\n\t\tif (!locale) return piece;\n\t\ttry {\n\t\t\tconst target = piece.i18n?.[locale];\n\t\t\tif (!target) return piece;\n\t\t\tconst translatedPiece = mutate ? piece : JSON.parse(JSON.stringify(piece));\n\t\t\tpieceTranslation.pathsToValuesToTranslate.forEach((key) => {\n\t\t\t\ttranslateProperty(translatedPiece, key, target);\n\t\t\t});\n\t\t\treturn translatedPiece;\n\t\t} catch (err) {\n\t\t\tconsole.error(`error translating piece ${piece.name}:`, err);\n\t\t\treturn piece;\n\t\t}\n\t},\n\t/**Gets the piece metadata regardles of piece location (node_modules or dist), wasn't included inside piece.metadata() for backwards compatibility issues (if an old ap version installs a new piece it would fail)*/\n\tinitializeI18n: async (pieceOutputPath) => {\n\t\ttry {\n\t\t\tconst locales = Object.values(LocalesEnum);\n\t\t\tconst i18n = {};\n\t\t\tfor (const locale of locales) {\n\t\t\t\tconst translations = await readLocaleFile(locale, pieceOutputPath);\n\t\t\t\tif (translations) i18n[locale] = translations;\n\t\t\t}\n\t\t\treturn Object.keys(i18n).length > 0 ? i18n : void 0;\n\t\t} catch (err) {\n\t\t\tconsole.log(`Error initializing i18n for ${pieceOutputPath}:`, err);\n\t\t\treturn;\n\t\t}\n\t},\n\tpathsToValuesToTranslate: [\n\t\t\"description\",\n\t\t\"auth.username.displayName\",\n\t\t\"auth.username.description\",\n\t\t\"auth.password.displayName\",\n\t\t\"auth.password.description\",\n\t\t\"auth.props.*.displayName\",\n\t\t\"auth.props.*.description\",\n\t\t\"auth.props.*.options.options.*.label\",\n\t\t\"auth.description\",\n\t\t\"actions.*.displayName\",\n\t\t\"actions.*.description\",\n\t\t\"actions.*.props.*.displayName\",\n\t\t\"actions.*.props.*.description\",\n\t\t\"actions.*.props.*.options.options.*.label\",\n\t\t\"triggers.*.displayName\",\n\t\t\"triggers.*.description\",\n\t\t\"triggers.*.props.*.displayName\",\n\t\t\"triggers.*.props.*.description\",\n\t\t\"triggers.*.props.*.options.options.*.label\"\n\t]\n};\n/**This function translates a property inside a piece, i.e description, displayName, etc...\n*\n* @param pieceModelOrProperty - The piece model or property to translate\n* @param path - The path to the property to translate, i.e auth.username.displayName\n* @param i18n - The i18n object\n*/\nfunction translateProperty(pieceModelOrProperty, path, i18n) {\n\tconst parsedKeys = path.split(\".\");\n\tif (parsedKeys[0] === \"*\") return Object.values(pieceModelOrProperty).forEach((item) => translateProperty(item, parsedKeys.slice(1).join(\".\"), i18n));\n\tconst nextObject = pieceModelOrProperty[parsedKeys[0]];\n\tif (!nextObject) return;\n\tif (parsedKeys.length > 1) return translateProperty(nextObject, parsedKeys.slice(1).join(\".\"), i18n);\n\tconst valueInI18n = i18n[pieceModelOrProperty[parsedKeys[0]].slice(0, 512)];\n\tif (valueInI18n) pieceModelOrProperty[parsedKeys[0]] = valueInI18n;\n}\nasync function fileExists(filePath) {\n\ttry {\n\t\tawait fs.access(filePath);\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\nconst readLocaleFile = async (locale, pieceOutputPath) => {\n\tconst filePath = path.join(pieceOutputPath, \"src\", \"i18n\", `${locale}.json`);\n\tif (!await fileExists(filePath)) return null;\n\ttry {\n\t\tconst fileContent = await fs.readFile(filePath, \"utf8\");\n\t\tconst translations = JSON.parse(fileContent);\n\t\tif (typeof translations === \"object\" && translations !== null) return translations;\n\t\tthrow new Error(`Invalid i18n file format for ${locale} in piece ${pieceOutputPath}`);\n\t} catch (error) {\n\t\tconsole.error(`Error reading i18n file for ${locale} in piece ${pieceOutputPath}:`, error);\n\t\treturn null;\n\t}\n};\n\n//#endregion\n//#region upstream/framework/lib/test/index.ts\nfunction createMockActionContext(params) {\n\treturn {\n\t\texecutionType: \"BEGIN\",\n\t\tauth: void 0,\n\t\tpropsValue: params.propsValue,\n\t\tstore: {\n\t\t\tput: async (key, value) => value,\n\t\t\tget: async () => null,\n\t\t\tdelete: async () => {}\n\t\t},\n\t\tconnections: { get: async () => null },\n\t\ttags: { add: async () => {} },\n\t\tserver: {\n\t\t\tapiUrl: \"http://localhost:3000\",\n\t\t\tpublicUrl: \"http://localhost:4200\",\n\t\t\ttoken: \"test-token\"\n\t\t},\n\t\tfiles: { write: async () => \"test-file-url\" },\n\t\toutput: { update: async () => {} },\n\t\tagent: { tools: async () => ({}) },\n\t\trun: {\n\t\t\tid: \"test-run-id\",\n\t\t\tstop: () => {},\n\t\t\tpause: () => {},\n\t\t\trespond: () => {}\n\t\t},\n\t\tproject: {\n\t\t\tid: \"test-project-id\",\n\t\t\texternalId: async () => void 0\n\t\t},\n\t\tflows: {\n\t\t\tlist: async () => ({\n\t\t\t\tdata: [],\n\t\t\t\tnext: null,\n\t\t\t\tprevious: null\n\t\t\t}),\n\t\t\tcurrent: {\n\t\t\t\tid: \"test-flow-id\",\n\t\t\t\tversion: { id: \"test-flow-version-id\" }\n\t\t\t}\n\t\t},\n\t\tstep: { name: \"test-step\" },\n\t\tgenerateResumeUrl: () => \"http://localhost:3000/resume\"\n\t};\n}\nfunction createMockPollingTriggerContext(params) {\n\treturn {\n\t\t...createMockActionContext({ propsValue: params.propsValue }),\n\t\tsetSchedule: (schedule) => {\n\t\t\tparams.onSetSchedule?.(schedule);\n\t\t}\n\t};\n}\n\n//#endregion\n//#region src/powerhouse/context.ts\nfunction reactorOf(ctx) {\n\tconst reactor = ctx !== null && typeof ctx === \"object\" ? ctx.reactor : void 0;\n\tif (!reactor) throw new Error(\"ctx.reactor is not available: this piece is not running on a Powerhouse reactor\");\n\treturn reactor;\n}\n\n//#endregion\nexport { ACTIVEPIECES_CHAT_TIERS, AGENT_STEP_TEST_TIMEOUT_MS, AGENT_STEP_TIMEOUT_MS, AIProviderModel, AIProviderName, AIProviderWithoutSensitiveData, AI_PROVIDER_CAPABILITIES, ActionBase, ActionClassification, AgentFlowTool, AgentKnowledgeBaseTool, AgentMcpTool, AgentOutputField, AgentOutputFieldType, AgentPieceProps, AgentStepBlock, AgentTaskStatus, AgentTool, AgentToolType, AiMetadata, ApFile, AppConnectionType, ArrayProperty, ArraySubProps, Audience, AzureProviderConfig, BaseAIProviderAuthConfig, BasePropertySchema, BasicAuthProperty, BasicAuthPropertyValue, BedrockProviderAuthConfig, BedrockProviderConfig, ChatFormResponse, CheckboxProperty, CloudflareGatewayProviderConfig, ContentBlockType, ContextVersion, CreateRecordsRequest, CreateTableWebhookRequest, CustomAuthProperty, CustomProperty, DEDUPE_KEY_PROPERTY, DEFAULT_CHAT_TIER_ID, DEFAULT_CONNECTION_DISPLAY_NAME, DateRangePreset, DateRangeProperty, DateRangeValue, DateTimeProperty, DropdownOption, DropdownProperty, DropdownState, DynamicProp, DynamicProperties, DynamicPropsValue, ErrorHandlingOptionsParam, ExecutionToolStatus, ExecutionType, ExportTableResponse, FAIL_PARENT_ON_FAILURE_HEADER, Field, FieldType, FileProperty, FileResponseInterface, Filter, FilterOperator, FlowStatus, FlowTriggerType, GetProviderConfigResponse, HumanInputFormResult, HumanInputFormResultTypes, IAction, ITrigger, InputProperty, InputPropertyMap, JsonProperty, KnowledgeBaseSourceType, LATEST_CONTEXT_VERSION, ListRecordsRequest, ListTablesRequest, LongTextProperty, MINIMUM_SUPPORTED_RELEASE_AFTER_LATEST_CONTEXT_VERSION, MarkdownContentBlock, MarkdownVariant, McpAuthConfig, McpAuthType, McpProperty, McpPropertyType, McpProtocol, McpTrigger, MultiSelectDropdownProperty, NumberProperty, OAuth2AuthorizationMethod, OAuth2GrantType, OAuth2Property, OAuth2PropertyValue, OAuth2Props, OIDCProperty, OPENAI_COMPATIBLE_VENDOR_BASE_URLS, ObjectProperty, OpenAICompatibleProviderConfig, OpenAiCompatibleVendorConfig, PARENT_RUN_ID_HEADER, Piece, PieceAuth, PieceAuthProperty, PieceBase, PieceCategory, PieceMetadata, PieceMetadataModel, PieceMetadataModelSummary, PieceMetadataSummary, PiecePackageInformation, PieceProperty, PiecePropertyMap, PieceServerContextError, PopulatedRecord, Project, ProjectAIProvider, Property, PropertyGroup, PropertyGroupDisplay, PropertyType, RAW_PAYLOAD_HEADER, READ_ONLY_CLASSIFICATIONS, RichTextProperty, SecretTextProperty, SeekPage, ShortTextProperty, StaticDropdownEmptyOption, StaticDropdownProperty, StaticMultiSelectDropdownProperty, StopResponse, StoreScope, TASK_COMPLETION_TOOL_NAME, Table, TableWebhookEventType, ToolCallContentBlock, ToolCallStatus, ToolCallType, TriggerBase, TriggerStrategy, USE_DRAFT_QUERY_PARAM_NAME, UpdateRecordRequest, VertexProviderAuthConfig, VertexProviderConfig, WebhookHandshakeStrategy, WebhookRenewConfiguration, WebhookRenewStrategy, apId, assertNotNullOrUndefined, backwardCompatabilityContextUtils, buildAuthHeaders, camelCase, chunk, createAction, createKeyForFormInput, createMockActionContext, createMockPollingTriggerContext, createPiece, createTrigger, dateRangeUtils, getAuthPropertyForValue, getEffectiveProviderAndModel, isEmpty, isNil, isNotUndefined, isPieceServerContextError, isReadOnlyClassification, isString, kebabCase, mcpToolNameUtils, normalizeToolOutputToExecuteResponse, pickBy, piecePropertiesUtils, pieceTranslation, reactorOf, splitCloudflareGatewayModelId, spreadIfDefined, startCase, tryCatch, unique };\n//# sourceMappingURL=index.js.map","// The Powerhouse mark, from the logo powerhouse.inc serves (its first path,\n// which is the icon; the rest of that file is the wordmark).\n\n// The mark alone, not the app icon: the app icon insets it on a dark canvas,\n// and the editor frames every piece logo with padding of its own, so that\n// version would sit padded twice. Filled dark because the frame is white.\nexport const POWERHOUSE_LOGO =\n \"data:image/svg+xml;base64,\" +\n \"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMTQg\" +\n \"MTE0IiBmaWxsPSJub25lIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZl\" +\n \"bm9kZCIgZmlsbD0iIzE2MTYxNiIgZD0iTTcxLjI5MTkgMEwyNC4zNDE1IDM4Ljg3NzJDMTcuNDU0\" +\n \"OCA0NC41Nzk4IDE2Ljk1MzkgNTQuOTY1OSAyMy4yNiA2MS4zMDQ3TDM5LjUwMjggNzcuNjMxOEM0\" +\n \"NC4yNjg0IDgyLjQyMjEgNDUuMjk5NiA4OS43ODM0IDQyLjAzMzUgOTUuNjk4OEwzMS45MjkgMTE0\" +\n \"SDE1LjJDNi44MDUyNyAxMTQgMCAxMDcuMTk1IDAgOTguOFYxNS4yQzAgNi44MDUyNyA2LjgwNTI3\" +\n \"IDAgMTUuMiAwSDcxLjI5MTlaTTgwLjExMSAwTDcxLjM0MTIgMTUuOTc1OEM2OC4xMDc4IDIxLjg2\" +\n \"NiA2OS4xMjU1IDI5LjE4MDQgNzMuODQ0MSAzMy45NjQxTDkxLjA3NTEgNTEuNDMzMUM5Ny4zNjc0\" +\n \"IDU3LjgxMjQgOTYuODA0NCA2OC4yMjI3IDg5Ljg2MDcgNzMuODg2MUw0MC42NzgyIDExNEg5OC44\" +\n \"QzEwNy4xOTUgMTE0IDExNCAxMDcuMTk1IDExNCA5OC44VjE1LjJDMTE0IDYuODA1MjcgMTA3LjE5\" +\n \"NSAwIDk4LjggMEg4MC4xMTFaIi8+PC9zdmc+\";\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.versionInfo = exports.version = void 0;\n// Note: This file is autogenerated using \"resources/gen-version.js\" script and\n// automatically updated by \"npm version\" command.\n\n/**\n * A string containing the version of the GraphQL.js library\n */\nconst version = '16.12.0';\n/**\n * An object containing the components of the GraphQL.js version string\n */\n\nexports.version = version;\nconst versionInfo = Object.freeze({\n major: 16,\n minor: 12,\n patch: 0,\n preReleaseTag: null,\n});\nexports.versionInfo = versionInfo;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.devAssert = devAssert;\n\nfunction devAssert(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(message);\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.isPromise = isPromise;\n\n/**\n * Returns true if the value acts like a Promise, i.e. has a \"then\" function,\n * otherwise returns false.\n */\nfunction isPromise(value) {\n return (\n typeof (value === null || value === void 0 ? void 0 : value.then) ===\n 'function'\n );\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.isObjectLike = isObjectLike;\n\n/**\n * Return true if `value` is object-like. A value is object-like if it's not\n * `null` and has a `typeof` result of \"object\".\n */\nfunction isObjectLike(value) {\n return typeof value == 'object' && value !== null;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.invariant = invariant;\n\nfunction invariant(condition, message) {\n const booleanCondition = Boolean(condition);\n\n if (!booleanCondition) {\n throw new Error(\n message != null ? message : 'Unexpected invariant triggered.',\n );\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.getLocation = getLocation;\n\nvar _invariant = require('../jsutils/invariant.js');\n\nconst LineRegExp = /\\r\\n|[\\n\\r]/g;\n/**\n * Represents a location in a Source.\n */\n\n/**\n * Takes a Source and a UTF-8 character offset, and returns the corresponding\n * line and column as a SourceLocation.\n */\nfunction 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' || (0, _invariant.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","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.printLocation = printLocation;\nexports.printSourceLocation = printSourceLocation;\n\nvar _location = require('./location.js');\n\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\nfunction printLocation(location) {\n return printSourceLocation(\n location.source,\n (0, _location.getLocation)(location.source, location.start),\n );\n}\n/**\n * Render a helpful description of the location in the GraphQL Source document.\n */\n\nfunction printSourceLocation(source, sourceLocation) {\n const firstLineColumnOffset = source.locationOffset.column - 1;\n const body = ''.padStart(firstLineColumnOffset) + source.body;\n const lineIndex = sourceLocation.line - 1;\n const lineOffset = source.locationOffset.line - 1;\n const lineNum = sourceLocation.line + lineOffset;\n const columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;\n const columnNum = sourceLocation.column + columnOffset;\n const locationStr = `${source.name}:${lineNum}:${columnNum}\\n`;\n const lines = body.split(/\\r\\n|[\\n\\r]/g);\n const locationLine = lines[lineIndex]; // Special case for minified documents\n\n if (locationLine.length > 120) {\n const subLineIndex = Math.floor(columnNum / 80);\n const subLineColumnNum = columnNum % 80;\n const subLines = [];\n\n for (let i = 0; i < locationLine.length; i += 80) {\n subLines.push(locationLine.slice(i, i + 80));\n }\n\n return (\n locationStr +\n printPrefixedLines([\n [`${lineNum} |`, subLines[0]],\n ...subLines.slice(1, subLineIndex + 1).map((subLine) => ['|', subLine]),\n ['|', '^'.padStart(subLineColumnNum)],\n ['|', subLines[subLineIndex + 1]],\n ])\n );\n }\n\n return (\n locationStr +\n printPrefixedLines([\n // Lines specified like this: [\"prefix\", \"string\"],\n [`${lineNum - 1} |`, lines[lineIndex - 1]],\n [`${lineNum} |`, locationLine],\n ['|', '^'.padStart(columnNum)],\n [`${lineNum + 1} |`, lines[lineIndex + 1]],\n ])\n );\n}\n\nfunction printPrefixedLines(lines) {\n const existingLines = lines.filter(([_, line]) => line !== undefined);\n const padLen = Math.max(...existingLines.map(([prefix]) => prefix.length));\n return existingLines\n .map(([prefix, line]) => prefix.padStart(padLen) + (line ? ' ' + line : ''))\n .join('\\n');\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.GraphQLError = void 0;\nexports.formatError = formatError;\nexports.printError = printError;\n\nvar _isObjectLike = require('../jsutils/isObjectLike.js');\n\nvar _location = require('../language/location.js');\n\nvar _printLocation = require('../language/printLocation.js');\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\nclass 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 /**\n * An array of GraphQL AST Nodes corresponding to this error.\n */\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 /**\n * The original error thrown from a field resolver during execution.\n */\n\n /**\n * Extension fields to add to the formatted error.\n */\n\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) => (0, _location.getLocation)(source, pos))\n : nodeLocations === null || nodeLocations === void 0\n ? void 0\n : nodeLocations.map((loc) =>\n (0, _location.getLocation)(loc.source, loc.start),\n );\n const originalExtensions = (0, _isObjectLike.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 get [Symbol.toStringTag]() {\n return 'GraphQLError';\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' + (0, _printLocation.printLocation)(node.loc);\n }\n }\n } else if (this.source && this.locations) {\n for (const location of this.locations) {\n output +=\n '\\n\\n' +\n (0, _printLocation.printSourceLocation)(this.source, location);\n }\n }\n\n return output;\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\nexports.GraphQLError = GraphQLError;\n\nfunction undefinedIfEmpty(array) {\n return array === undefined || array.length === 0 ? undefined : array;\n}\n/**\n * See: https://spec.graphql.org/draft/#sec-Errors\n */\n\n/**\n * Prints a GraphQLError to a string, representing useful location information\n * about the error's position in the source.\n *\n * @deprecated Please use `error.toString` instead. Will be removed in v17\n */\nfunction 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.\n *\n * @deprecated Please use `error.toJSON` instead. Will be removed in v17\n */\n\nfunction formatError(error) {\n return error.toJSON();\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.syntaxError = syntaxError;\n\nvar _GraphQLError = require('./GraphQLError.js');\n\n/**\n * Produces a GraphQLError representing a syntax error, containing useful\n * descriptive information about the syntax error's position in the source.\n */\nfunction syntaxError(source, position, description) {\n return new _GraphQLError.GraphQLError(`Syntax Error: ${description}`, {\n source,\n positions: [position],\n });\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.Token =\n exports.QueryDocumentKeys =\n exports.OperationTypeNode =\n exports.Location =\n void 0;\nexports.isNode = isNode;\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 */\nclass Location {\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The Token at which this Node begins.\n */\n\n /**\n * The Token at which this Node ends.\n */\n\n /**\n * The Source document the AST represents.\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 get [Symbol.toStringTag]() {\n return 'Location';\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\nexports.Location = Location;\n\nclass Token {\n /**\n * The kind of Token.\n */\n\n /**\n * The character offset at which this Node begins.\n */\n\n /**\n * The character offset at which this Node ends.\n */\n\n /**\n * The 1-indexed line number on which this Token appears.\n */\n\n /**\n * The 1-indexed column number at which this Token begins.\n */\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 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 get [Symbol.toStringTag]() {\n return 'Token';\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/**\n * The list of all possible AST node types.\n */\n\nexports.Token = Token;\n\n/**\n * @internal\n */\nconst 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: ['description', 'name', 'arguments', 'locations'],\n SchemaExtension: ['directives', 'operationTypes'],\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};\nexports.QueryDocumentKeys = QueryDocumentKeys;\nconst kindValues = new Set(Object.keys(QueryDocumentKeys));\n/**\n * @internal\n */\n\nfunction 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/** Name */\n\nvar OperationTypeNode;\nexports.OperationTypeNode = OperationTypeNode;\n\n(function (OperationTypeNode) {\n OperationTypeNode['QUERY'] = 'query';\n OperationTypeNode['MUTATION'] = 'mutation';\n OperationTypeNode['SUBSCRIPTION'] = 'subscription';\n})(OperationTypeNode || (exports.OperationTypeNode = OperationTypeNode = {}));\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.DirectiveLocation = void 0;\n\n/**\n * The set of allowed directive location values.\n */\nvar DirectiveLocation;\nexports.DirectiveLocation = DirectiveLocation;\n\n(function (DirectiveLocation) {\n DirectiveLocation['QUERY'] = 'QUERY';\n DirectiveLocation['MUTATION'] = 'MUTATION';\n DirectiveLocation['SUBSCRIPTION'] = 'SUBSCRIPTION';\n DirectiveLocation['FIELD'] = 'FIELD';\n DirectiveLocation['FRAGMENT_DEFINITION'] = 'FRAGMENT_DEFINITION';\n DirectiveLocation['FRAGMENT_SPREAD'] = 'FRAGMENT_SPREAD';\n DirectiveLocation['INLINE_FRAGMENT'] = 'INLINE_FRAGMENT';\n DirectiveLocation['VARIABLE_DEFINITION'] = 'VARIABLE_DEFINITION';\n DirectiveLocation['SCHEMA'] = 'SCHEMA';\n DirectiveLocation['SCALAR'] = 'SCALAR';\n DirectiveLocation['OBJECT'] = 'OBJECT';\n DirectiveLocation['FIELD_DEFINITION'] = 'FIELD_DEFINITION';\n DirectiveLocation['ARGUMENT_DEFINITION'] = 'ARGUMENT_DEFINITION';\n DirectiveLocation['INTERFACE'] = 'INTERFACE';\n DirectiveLocation['UNION'] = 'UNION';\n DirectiveLocation['ENUM'] = 'ENUM';\n DirectiveLocation['ENUM_VALUE'] = 'ENUM_VALUE';\n DirectiveLocation['INPUT_OBJECT'] = 'INPUT_OBJECT';\n DirectiveLocation['INPUT_FIELD_DEFINITION'] = 'INPUT_FIELD_DEFINITION';\n})(DirectiveLocation || (exports.DirectiveLocation = DirectiveLocation = {}));\n/**\n * The enum type representing the directive location values.\n *\n * @deprecated Please use `DirectiveLocation`. Will be remove in v17.\n */\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.Kind = void 0;\n\n/**\n * The set of allowed kind values for AST nodes.\n */\nvar Kind;\nexports.Kind = Kind;\n\n(function (Kind) {\n Kind['NAME'] = 'Name';\n Kind['DOCUMENT'] = 'Document';\n Kind['OPERATION_DEFINITION'] = 'OperationDefinition';\n Kind['VARIABLE_DEFINITION'] = 'VariableDefinition';\n Kind['SELECTION_SET'] = 'SelectionSet';\n Kind['FIELD'] = 'Field';\n Kind['ARGUMENT'] = 'Argument';\n Kind['FRAGMENT_SPREAD'] = 'FragmentSpread';\n Kind['INLINE_FRAGMENT'] = 'InlineFragment';\n Kind['FRAGMENT_DEFINITION'] = 'FragmentDefinition';\n Kind['VARIABLE'] = 'Variable';\n Kind['INT'] = 'IntValue';\n Kind['FLOAT'] = 'FloatValue';\n Kind['STRING'] = 'StringValue';\n Kind['BOOLEAN'] = 'BooleanValue';\n Kind['NULL'] = 'NullValue';\n Kind['ENUM'] = 'EnumValue';\n Kind['LIST'] = 'ListValue';\n Kind['OBJECT'] = 'ObjectValue';\n Kind['OBJECT_FIELD'] = 'ObjectField';\n Kind['DIRECTIVE'] = 'Directive';\n Kind['NAMED_TYPE'] = 'NamedType';\n Kind['LIST_TYPE'] = 'ListType';\n Kind['NON_NULL_TYPE'] = 'NonNullType';\n Kind['SCHEMA_DEFINITION'] = 'SchemaDefinition';\n Kind['OPERATION_TYPE_DEFINITION'] = 'OperationTypeDefinition';\n Kind['SCALAR_TYPE_DEFINITION'] = 'ScalarTypeDefinition';\n Kind['OBJECT_TYPE_DEFINITION'] = 'ObjectTypeDefinition';\n Kind['FIELD_DEFINITION'] = 'FieldDefinition';\n Kind['INPUT_VALUE_DEFINITION'] = 'InputValueDefinition';\n Kind['INTERFACE_TYPE_DEFINITION'] = 'InterfaceTypeDefinition';\n Kind['UNION_TYPE_DEFINITION'] = 'UnionTypeDefinition';\n Kind['ENUM_TYPE_DEFINITION'] = 'EnumTypeDefinition';\n Kind['ENUM_VALUE_DEFINITION'] = 'EnumValueDefinition';\n Kind['INPUT_OBJECT_TYPE_DEFINITION'] = 'InputObjectTypeDefinition';\n Kind['DIRECTIVE_DEFINITION'] = 'DirectiveDefinition';\n Kind['SCHEMA_EXTENSION'] = 'SchemaExtension';\n Kind['SCALAR_TYPE_EXTENSION'] = 'ScalarTypeExtension';\n Kind['OBJECT_TYPE_EXTENSION'] = 'ObjectTypeExtension';\n Kind['INTERFACE_TYPE_EXTENSION'] = 'InterfaceTypeExtension';\n Kind['UNION_TYPE_EXTENSION'] = 'UnionTypeExtension';\n Kind['ENUM_TYPE_EXTENSION'] = 'EnumTypeExtension';\n Kind['INPUT_OBJECT_TYPE_EXTENSION'] = 'InputObjectTypeExtension';\n Kind['TYPE_COORDINATE'] = 'TypeCoordinate';\n Kind['MEMBER_COORDINATE'] = 'MemberCoordinate';\n Kind['ARGUMENT_COORDINATE'] = 'ArgumentCoordinate';\n Kind['DIRECTIVE_COORDINATE'] = 'DirectiveCoordinate';\n Kind['DIRECTIVE_ARGUMENT_COORDINATE'] = 'DirectiveArgumentCoordinate';\n})(Kind || (exports.Kind = Kind = {}));\n/**\n * The enum type representing the possible kind values of AST nodes.\n *\n * @deprecated Please use `Kind`. Will be remove in v17.\n */\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.isDigit = isDigit;\nexports.isLetter = isLetter;\nexports.isNameContinue = isNameContinue;\nexports.isNameStart = isNameStart;\nexports.isWhiteSpace = isWhiteSpace;\n\n/**\n * ```\n * WhiteSpace ::\n * - \"Horizontal Tab (U+0009)\"\n * - \"Space (U+0020)\"\n * ```\n * @internal\n */\nfunction isWhiteSpace(code) {\n return code === 0x0009 || code === 0x0020;\n}\n/**\n * ```\n * Digit :: one of\n * - `0` `1` `2` `3` `4` `5` `6` `7` `8` `9`\n * ```\n * @internal\n */\n\nfunction isDigit(code) {\n return code >= 0x0030 && code <= 0x0039;\n}\n/**\n * ```\n * Letter :: one of\n * - `A` `B` `C` `D` `E` `F` `G` `H` `I` `J` `K` `L` `M`\n * - `N` `O` `P` `Q` `R` `S` `T` `U` `V` `W` `X` `Y` `Z`\n * - `a` `b` `c` `d` `e` `f` `g` `h` `i` `j` `k` `l` `m`\n * - `n` `o` `p` `q` `r` `s` `t` `u` `v` `w` `x` `y` `z`\n * ```\n * @internal\n */\n\nfunction isLetter(code) {\n return (\n (code >= 0x0061 && code <= 0x007a) || // A-Z\n (code >= 0x0041 && code <= 0x005a) // a-z\n );\n}\n/**\n * ```\n * NameStart ::\n * - Letter\n * - `_`\n * ```\n * @internal\n */\n\nfunction isNameStart(code) {\n return isLetter(code) || code === 0x005f;\n}\n/**\n * ```\n * NameContinue ::\n * - Letter\n * - Digit\n * - `_`\n * ```\n * @internal\n */\n\nfunction isNameContinue(code) {\n return isLetter(code) || isDigit(code) || code === 0x005f;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.dedentBlockStringLines = dedentBlockStringLines;\nexports.isPrintableAsBlockString = isPrintableAsBlockString;\nexports.printBlockString = printBlockString;\n\nvar _characterClasses = require('./characterClasses.js');\n\n/**\n * Produces the value of a block string from its parsed raw value, similar to\n * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.\n *\n * This implements the GraphQL spec's BlockStringValue() static algorithm.\n *\n * @internal\n */\nfunction dedentBlockStringLines(lines) {\n var _firstNonEmptyLine2;\n\n let commonIndent = Number.MAX_SAFE_INTEGER;\n let firstNonEmptyLine = null;\n let lastNonEmptyLine = -1;\n\n for (let i = 0; i < lines.length; ++i) {\n var _firstNonEmptyLine;\n\n const line = lines[i];\n const indent = leadingWhitespace(line);\n\n if (indent === line.length) {\n continue; // skip empty lines\n }\n\n firstNonEmptyLine =\n (_firstNonEmptyLine = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine !== void 0\n ? _firstNonEmptyLine\n : i;\n lastNonEmptyLine = i;\n\n if (i !== 0 && indent < commonIndent) {\n commonIndent = indent;\n }\n }\n\n return lines // Remove common indentation from all lines but first.\n .map((line, i) => (i === 0 ? line : line.slice(commonIndent))) // Remove leading and trailing blank lines.\n .slice(\n (_firstNonEmptyLine2 = firstNonEmptyLine) !== null &&\n _firstNonEmptyLine2 !== void 0\n ? _firstNonEmptyLine2\n : 0,\n lastNonEmptyLine + 1,\n );\n}\n\nfunction leadingWhitespace(str) {\n let i = 0;\n\n while (\n i < str.length &&\n (0, _characterClasses.isWhiteSpace)(str.charCodeAt(i))\n ) {\n ++i;\n }\n\n return i;\n}\n/**\n * @internal\n */\n\nfunction isPrintableAsBlockString(value) {\n if (value === '') {\n return true; // empty string is printable\n }\n\n let isEmptyLine = true;\n let hasIndent = false;\n let hasCommonIndent = true;\n let seenNonEmptyLine = false;\n\n for (let i = 0; i < value.length; ++i) {\n switch (value.codePointAt(i)) {\n case 0x0000:\n case 0x0001:\n case 0x0002:\n case 0x0003:\n case 0x0004:\n case 0x0005:\n case 0x0006:\n case 0x0007:\n case 0x0008:\n case 0x000b:\n case 0x000c:\n case 0x000e:\n case 0x000f:\n return false;\n // Has non-printable characters\n\n case 0x000d:\n // \\r\n return false;\n // Has \\r or \\r\\n which will be replaced as \\n\n\n case 10:\n // \\n\n if (isEmptyLine && !seenNonEmptyLine) {\n return false; // Has leading new line\n }\n\n seenNonEmptyLine = true;\n isEmptyLine = true;\n hasIndent = false;\n break;\n\n case 9: // \\t\n\n case 32:\n // <space>\n hasIndent || (hasIndent = isEmptyLine);\n break;\n\n default:\n hasCommonIndent && (hasCommonIndent = hasIndent);\n isEmptyLine = false;\n }\n }\n\n if (isEmptyLine) {\n return false; // Has trailing empty lines\n }\n\n if (hasCommonIndent && seenNonEmptyLine) {\n return false; // Has internal indent\n }\n\n return true;\n}\n/**\n * Print a block string in the indented block form by adding a leading and\n * trailing blank line. However, if a block string starts with whitespace and is\n * a single-line, adding a leading blank line would strip that whitespace.\n *\n * @internal\n */\n\nfunction printBlockString(value, options) {\n const escapedValue = value.replace(/\"\"\"/g, '\\\\\"\"\"'); // Expand a block string's raw value into independent lines.\n\n const lines = escapedValue.split(/\\r\\n|[\\n\\r]/g);\n const isSingleLine = lines.length === 1; // If common indentation is found we can fix some of those cases by adding leading new line\n\n const forceLeadingNewLine =\n lines.length > 1 &&\n lines\n .slice(1)\n .every(\n (line) =>\n line.length === 0 ||\n (0, _characterClasses.isWhiteSpace)(line.charCodeAt(0)),\n ); // Trailing triple quotes just looks confusing but doesn't force trailing new line\n\n const hasTrailingTripleQuotes = escapedValue.endsWith('\\\\\"\"\"'); // Trailing quote (single or double) or slash forces trailing new line\n\n const hasTrailingQuote = value.endsWith('\"') && !hasTrailingTripleQuotes;\n const hasTrailingSlash = value.endsWith('\\\\');\n const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;\n const printAsMultipleLines =\n !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability\n (!isSingleLine ||\n value.length > 70 ||\n forceTrailingNewline ||\n forceLeadingNewLine ||\n hasTrailingTripleQuotes);\n let result = ''; // Format a multi-line block quote to account for leading space.\n\n const skipLeadingNewLine =\n isSingleLine && (0, _characterClasses.isWhiteSpace)(value.charCodeAt(0));\n\n if ((printAsMultipleLines && !skipLeadingNewLine) || forceLeadingNewLine) {\n result += '\\n';\n }\n\n result += escapedValue;\n\n if (printAsMultipleLines || forceTrailingNewline) {\n result += '\\n';\n }\n\n return '\"\"\"' + result + '\"\"\"';\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.TokenKind = void 0;\n\n/**\n * An exported enum describing the different kinds of tokens that the\n * lexer emits.\n */\nvar TokenKind;\nexports.TokenKind = TokenKind;\n\n(function (TokenKind) {\n TokenKind['SOF'] = '<SOF>';\n TokenKind['EOF'] = '<EOF>';\n TokenKind['BANG'] = '!';\n TokenKind['DOLLAR'] = '$';\n TokenKind['AMP'] = '&';\n TokenKind['PAREN_L'] = '(';\n TokenKind['PAREN_R'] = ')';\n TokenKind['DOT'] = '.';\n TokenKind['SPREAD'] = '...';\n TokenKind['COLON'] = ':';\n TokenKind['EQUALS'] = '=';\n TokenKind['AT'] = '@';\n TokenKind['BRACKET_L'] = '[';\n TokenKind['BRACKET_R'] = ']';\n TokenKind['BRACE_L'] = '{';\n TokenKind['PIPE'] = '|';\n TokenKind['BRACE_R'] = '}';\n TokenKind['NAME'] = 'Name';\n TokenKind['INT'] = 'Int';\n TokenKind['FLOAT'] = 'Float';\n TokenKind['STRING'] = 'String';\n TokenKind['BLOCK_STRING'] = 'BlockString';\n TokenKind['COMMENT'] = 'Comment';\n})(TokenKind || (exports.TokenKind = TokenKind = {}));\n/**\n * The enum type representing the token kinds values.\n *\n * @deprecated Please use `TokenKind`. Will be remove in v17.\n */\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.Lexer = void 0;\nexports.createToken = createToken;\nexports.isPunctuatorTokenKind = isPunctuatorTokenKind;\nexports.printCodePointAt = printCodePointAt;\nexports.readName = readName;\n\nvar _syntaxError = require('../error/syntaxError.js');\n\nvar _ast = require('./ast.js');\n\nvar _blockString = require('./blockString.js');\n\nvar _characterClasses = require('./characterClasses.js');\n\nvar _tokenKind = require('./tokenKind.js');\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 */\nclass Lexer {\n /**\n * The previously focused non-ignored token.\n */\n\n /**\n * The currently focused non-ignored token.\n */\n\n /**\n * The (1-indexed) line containing the current token.\n */\n\n /**\n * The character offset at which the current line begins.\n */\n constructor(source) {\n const startOfFileToken = new _ast.Token(\n _tokenKind.TokenKind.SOF,\n 0,\n 0,\n 0,\n 0,\n );\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n this.line = 1;\n this.lineStart = 0;\n }\n\n get [Symbol.toStringTag]() {\n return 'Lexer';\n }\n /**\n * Advances the token stream to the next non-ignored token.\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 */\n\n lookahead() {\n let token = this.token;\n\n if (token.kind !== _tokenKind.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.TokenKind.COMMENT);\n }\n\n return token;\n }\n}\n/**\n * @internal\n */\n\nexports.Lexer = Lexer;\n\nfunction isPunctuatorTokenKind(kind) {\n return (\n kind === _tokenKind.TokenKind.BANG ||\n kind === _tokenKind.TokenKind.DOLLAR ||\n kind === _tokenKind.TokenKind.AMP ||\n kind === _tokenKind.TokenKind.PAREN_L ||\n kind === _tokenKind.TokenKind.PAREN_R ||\n kind === _tokenKind.TokenKind.DOT ||\n kind === _tokenKind.TokenKind.SPREAD ||\n kind === _tokenKind.TokenKind.COLON ||\n kind === _tokenKind.TokenKind.EQUALS ||\n kind === _tokenKind.TokenKind.AT ||\n kind === _tokenKind.TokenKind.BRACKET_L ||\n kind === _tokenKind.TokenKind.BRACKET_R ||\n kind === _tokenKind.TokenKind.BRACE_L ||\n kind === _tokenKind.TokenKind.PIPE ||\n kind === _tokenKind.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\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\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\nfunction printCodePointAt(lexer, location) {\n const code = lexer.source.body.codePointAt(location);\n\n if (code === undefined) {\n return _tokenKind.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\nfunction createToken(lexer, kind, start, end, value) {\n const line = lexer.line;\n const col = 1 + start - lexer.lineStart;\n return new _ast.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\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(\n lexer,\n _tokenKind.TokenKind.BANG,\n position,\n position + 1,\n );\n\n case 0x0024:\n // $\n return createToken(\n lexer,\n _tokenKind.TokenKind.DOLLAR,\n position,\n position + 1,\n );\n\n case 0x0026:\n // &\n return createToken(\n lexer,\n _tokenKind.TokenKind.AMP,\n position,\n position + 1,\n );\n\n case 0x0028:\n // (\n return createToken(\n lexer,\n _tokenKind.TokenKind.PAREN_L,\n position,\n position + 1,\n );\n\n case 0x0029:\n // )\n return createToken(\n lexer,\n _tokenKind.TokenKind.PAREN_R,\n position,\n position + 1,\n );\n\n case 0x002e:\n // .\n if (\n body.charCodeAt(position + 1) === 0x002e &&\n body.charCodeAt(position + 2) === 0x002e\n ) {\n return createToken(\n lexer,\n _tokenKind.TokenKind.SPREAD,\n position,\n position + 3,\n );\n }\n\n break;\n\n case 0x003a:\n // :\n return createToken(\n lexer,\n _tokenKind.TokenKind.COLON,\n position,\n position + 1,\n );\n\n case 0x003d:\n // =\n return createToken(\n lexer,\n _tokenKind.TokenKind.EQUALS,\n position,\n position + 1,\n );\n\n case 0x0040:\n // @\n return createToken(\n lexer,\n _tokenKind.TokenKind.AT,\n position,\n position + 1,\n );\n\n case 0x005b:\n // [\n return createToken(\n lexer,\n _tokenKind.TokenKind.BRACKET_L,\n position,\n position + 1,\n );\n\n case 0x005d:\n // ]\n return createToken(\n lexer,\n _tokenKind.TokenKind.BRACKET_R,\n position,\n position + 1,\n );\n\n case 0x007b:\n // {\n return createToken(\n lexer,\n _tokenKind.TokenKind.BRACE_L,\n position,\n position + 1,\n );\n\n case 0x007c:\n // |\n return createToken(\n lexer,\n _tokenKind.TokenKind.PIPE,\n position,\n position + 1,\n );\n\n case 0x007d:\n // }\n return createToken(\n lexer,\n _tokenKind.TokenKind.BRACE_R,\n position,\n position + 1,\n );\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 ((0, _characterClasses.isDigit)(code) || code === 0x002d) {\n return readNumber(lexer, position, code);\n } // Name\n\n if ((0, _characterClasses.isNameStart)(code)) {\n return readName(lexer, position);\n }\n\n throw (0, _syntaxError.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.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\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.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\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 ((0, _characterClasses.isDigit)(code)) {\n throw (0, _syntaxError.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 || (0, _characterClasses.isNameStart)(code)) {\n throw (0, _syntaxError.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.TokenKind.FLOAT : _tokenKind.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\nfunction readDigits(lexer, start, firstCode) {\n if (!(0, _characterClasses.isDigit)(firstCode)) {\n throw (0, _syntaxError.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 ((0, _characterClasses.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\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(\n lexer,\n _tokenKind.TokenKind.STRING,\n start,\n position + 1,\n value,\n );\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 (0, _syntaxError.syntaxError)(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw (0, _syntaxError.syntaxError)(\n lexer.source,\n position,\n 'Unterminated string.',\n );\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 (0, _syntaxError.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 (0, _syntaxError.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\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\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\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 (0, _syntaxError.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\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.TokenKind.BLOCK_STRING,\n start,\n position + 3, // Return a string of the lines joined with U+000A.\n (0, _blockString.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 (0, _syntaxError.syntaxError)(\n lexer.source,\n position,\n `Invalid character within String: ${printCodePointAt(\n lexer,\n position,\n )}.`,\n );\n }\n }\n\n throw (0, _syntaxError.syntaxError)(\n lexer.source,\n position,\n 'Unterminated string.',\n );\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\nfunction 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 ((0, _characterClasses.isNameContinue)(code)) {\n ++position;\n } else {\n break;\n }\n }\n\n return createToken(\n lexer,\n _tokenKind.TokenKind.NAME,\n start,\n position,\n body.slice(start, position),\n );\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.SchemaCoordinateLexer = void 0;\n\nvar _syntaxError = require('../error/syntaxError.js');\n\nvar _ast = require('./ast.js');\n\nvar _characterClasses = require('./characterClasses.js');\n\nvar _lexer = require('./lexer.js');\n\nvar _tokenKind = require('./tokenKind.js');\n\n/**\n * Given a Source schema coordinate, creates a Lexer for that source.\n * A SchemaCoordinateLexer 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 */\nclass SchemaCoordinateLexer {\n /**\n * The previously focused non-ignored token.\n */\n\n /**\n * The currently focused non-ignored token.\n */\n\n /**\n * The (1-indexed) line containing the current token.\n * Since a schema coordinate may not contain newline, this value is always 1.\n */\n line = 1;\n /**\n * The character offset at which the current line begins.\n * Since a schema coordinate may not contain newline, this value is always 0.\n */\n\n lineStart = 0;\n\n constructor(source) {\n const startOfFileToken = new _ast.Token(\n _tokenKind.TokenKind.SOF,\n 0,\n 0,\n 0,\n 0,\n );\n this.source = source;\n this.lastToken = startOfFileToken;\n this.token = startOfFileToken;\n }\n\n get [Symbol.toStringTag]() {\n return 'SchemaCoordinateLexer';\n }\n /**\n * Advances the token stream to the next non-ignored token.\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 current Lexer token.\n */\n\n lookahead() {\n let token = this.token;\n\n if (token.kind !== _tokenKind.TokenKind.EOF) {\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\n return token;\n }\n}\n/**\n * Gets the next token from the source starting at the given position.\n */\n\nexports.SchemaCoordinateLexer = SchemaCoordinateLexer;\n\nfunction readNextToken(lexer, start) {\n const body = lexer.source.body;\n const bodyLength = body.length;\n const position = start;\n\n if (position < bodyLength) {\n const code = body.charCodeAt(position);\n\n switch (code) {\n case 0x002e:\n // .\n return (0, _lexer.createToken)(\n lexer,\n _tokenKind.TokenKind.DOT,\n position,\n position + 1,\n );\n\n case 0x0028:\n // (\n return (0, _lexer.createToken)(\n lexer,\n _tokenKind.TokenKind.PAREN_L,\n position,\n position + 1,\n );\n\n case 0x0029:\n // )\n return (0, _lexer.createToken)(\n lexer,\n _tokenKind.TokenKind.PAREN_R,\n position,\n position + 1,\n );\n\n case 0x003a:\n // :\n return (0, _lexer.createToken)(\n lexer,\n _tokenKind.TokenKind.COLON,\n position,\n position + 1,\n );\n\n case 0x0040:\n // @\n return (0, _lexer.createToken)(\n lexer,\n _tokenKind.TokenKind.AT,\n position,\n position + 1,\n );\n } // Name\n\n if ((0, _characterClasses.isNameStart)(code)) {\n return (0, _lexer.readName)(lexer, position);\n }\n\n throw (0, _syntaxError.syntaxError)(\n lexer.source,\n position,\n `Invalid character: ${(0, _lexer.printCodePointAt)(lexer, position)}.`,\n );\n }\n\n return (0, _lexer.createToken)(\n lexer,\n _tokenKind.TokenKind.EOF,\n bodyLength,\n bodyLength,\n );\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.inspect = inspect;\nconst MAX_ARRAY_LENGTH = 10;\nconst MAX_RECURSIVE_DEPTH = 2;\n/**\n * Used to print values in error messages.\n */\n\nfunction inspect(value) {\n return formatValue(value, []);\n}\n\nfunction formatValue(value, seenValues) {\n switch (typeof value) {\n case 'string':\n return JSON.stringify(value);\n\n case 'function':\n return value.name ? `[function ${value.name}]` : '[function]';\n\n case 'object':\n return formatObjectValue(value, seenValues);\n\n default:\n return String(value);\n }\n}\n\nfunction formatObjectValue(value, previouslySeenValues) {\n if (value === null) {\n return 'null';\n }\n\n if (previouslySeenValues.includes(value)) {\n return '[Circular]';\n }\n\n const seenValues = [...previouslySeenValues, value];\n\n if (isJSONable(value)) {\n const jsonValue = value.toJSON(); // check for infinite recursion\n\n if (jsonValue !== value) {\n return typeof jsonValue === 'string'\n ? jsonValue\n : formatValue(jsonValue, seenValues);\n }\n } else if (Array.isArray(value)) {\n return formatArray(value, seenValues);\n }\n\n return formatObject(value, seenValues);\n}\n\nfunction isJSONable(value) {\n return typeof value.toJSON === 'function';\n}\n\nfunction formatObject(object, seenValues) {\n const entries = Object.entries(object);\n\n if (entries.length === 0) {\n return '{}';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[' + getObjectTag(object) + ']';\n }\n\n const properties = entries.map(\n ([key, value]) => key + ': ' + formatValue(value, seenValues),\n );\n return '{ ' + properties.join(', ') + ' }';\n}\n\nfunction formatArray(array, seenValues) {\n if (array.length === 0) {\n return '[]';\n }\n\n if (seenValues.length > MAX_RECURSIVE_DEPTH) {\n return '[Array]';\n }\n\n const len = Math.min(MAX_ARRAY_LENGTH, array.length);\n const remaining = array.length - len;\n const items = [];\n\n for (let i = 0; i < len; ++i) {\n items.push(formatValue(array[i], seenValues));\n }\n\n if (remaining === 1) {\n items.push('... 1 more item');\n } else if (remaining > 1) {\n items.push(`... ${remaining} more items`);\n }\n\n return '[' + items.join(', ') + ']';\n}\n\nfunction getObjectTag(object) {\n const tag = Object.prototype.toString\n .call(object)\n .replace(/^\\[object /, '')\n .replace(/]$/, '');\n\n if (tag === 'Object' && typeof object.constructor === 'function') {\n const name = object.constructor.name;\n\n if (typeof name === 'string' && name !== '') {\n return name;\n }\n }\n\n return tag;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.instanceOf = void 0;\n\nvar _inspect = require('./inspect.js');\n\n/* c8 ignore next 3 */\nconst isProduction =\n globalThis.process && // eslint-disable-next-line no-undef\n process.env.NODE_ENV === 'production';\n/**\n * A replacement for instanceof which includes an error warning when multi-realm\n * constructors are detected.\n * See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production\n * See: https://webpack.js.org/guides/production/\n */\n\nconst instanceOf =\n /* c8 ignore next 6 */\n // FIXME: https://github.com/graphql/graphql-js/issues/2317\n isProduction\n ? function instanceOf(value, constructor) {\n return value instanceof constructor;\n }\n : function instanceOf(value, constructor) {\n if (value instanceof constructor) {\n return true;\n }\n\n if (typeof value === 'object' && value !== null) {\n var _value$constructor;\n\n // Prefer Symbol.toStringTag since it is immune to minification.\n const className = constructor.prototype[Symbol.toStringTag];\n const valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.\n Symbol.toStringTag in value // @ts-expect-error TS bug see, https://github.com/microsoft/TypeScript/issues/38009\n ? value[Symbol.toStringTag]\n : (_value$constructor = value.constructor) === null ||\n _value$constructor === void 0\n ? void 0\n : _value$constructor.name;\n\n if (className === valueClassName) {\n const stringifiedValue = (0, _inspect.inspect)(value);\n throw new Error(`Cannot use ${className} \"${stringifiedValue}\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results.`);\n }\n }\n\n return false;\n };\nexports.instanceOf = instanceOf;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.Source = void 0;\nexports.isSource = isSource;\n\nvar _devAssert = require('../jsutils/devAssert.js');\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _instanceOf = require('../jsutils/instanceOf.js');\n\n/**\n * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are\n * optional, but they are useful for clients who store GraphQL documents in source files.\n * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might\n * be useful for `name` to be `\"Foo.graphql\"` and location to be `{ line: 40, column: 1 }`.\n * The `line` and `column` properties in `locationOffset` are 1-indexed.\n */\nclass Source {\n constructor(\n body,\n name = 'GraphQL request',\n locationOffset = {\n line: 1,\n column: 1,\n },\n ) {\n typeof body === 'string' ||\n (0, _devAssert.devAssert)(\n false,\n `Body must be a string. Received: ${(0, _inspect.inspect)(body)}.`,\n );\n this.body = body;\n this.name = name;\n this.locationOffset = locationOffset;\n this.locationOffset.line > 0 ||\n (0, _devAssert.devAssert)(\n false,\n 'line in locationOffset is 1-indexed and must be positive.',\n );\n this.locationOffset.column > 0 ||\n (0, _devAssert.devAssert)(\n false,\n 'column in locationOffset is 1-indexed and must be positive.',\n );\n }\n\n get [Symbol.toStringTag]() {\n return 'Source';\n }\n}\n/**\n * Test if the given value is a Source object.\n *\n * @internal\n */\n\nexports.Source = Source;\n\nfunction isSource(source) {\n return (0, _instanceOf.instanceOf)(source, Source);\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.Parser = void 0;\nexports.parse = parse;\nexports.parseConstValue = parseConstValue;\nexports.parseSchemaCoordinate = parseSchemaCoordinate;\nexports.parseType = parseType;\nexports.parseValue = parseValue;\n\nvar _syntaxError = require('../error/syntaxError.js');\n\nvar _ast = require('./ast.js');\n\nvar _directiveLocation = require('./directiveLocation.js');\n\nvar _kinds = require('./kinds.js');\n\nvar _lexer = require('./lexer.js');\n\nvar _schemaCoordinateLexer = require('./schemaCoordinateLexer.js');\n\nvar _source = require('./source.js');\n\nvar _tokenKind = require('./tokenKind.js');\n\n/**\n * Given a GraphQL source, parses it into a Document.\n * Throws GraphQLError if a syntax error is encountered.\n */\nfunction parse(source, options) {\n const parser = new Parser(source, options);\n const document = parser.parseDocument();\n Object.defineProperty(document, 'tokenCount', {\n enumerable: false,\n value: parser.tokenCount,\n });\n return document;\n}\n/**\n * Given a string containing a GraphQL value (ex. `[42]`), parse the AST for\n * that value.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Values directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: valueFromAST().\n */\n\nfunction parseValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(_tokenKind.TokenKind.SOF);\n const value = parser.parseValueLiteral(false);\n parser.expectToken(_tokenKind.TokenKind.EOF);\n return value;\n}\n/**\n * Similar to parseValue(), but raises a parse error if it encounters a\n * variable. The return type will be a constant value.\n */\n\nfunction parseConstValue(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(_tokenKind.TokenKind.SOF);\n const value = parser.parseConstValueLiteral();\n parser.expectToken(_tokenKind.TokenKind.EOF);\n return value;\n}\n/**\n * Given a string containing a GraphQL Type (ex. `[Int!]`), parse the AST for\n * that type.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * This is useful within tools that operate upon GraphQL Types directly and\n * in isolation of complete GraphQL documents.\n *\n * Consider providing the results to the utility function: typeFromAST().\n */\n\nfunction parseType(source, options) {\n const parser = new Parser(source, options);\n parser.expectToken(_tokenKind.TokenKind.SOF);\n const type = parser.parseTypeReference();\n parser.expectToken(_tokenKind.TokenKind.EOF);\n return type;\n}\n/**\n * Given a string containing a GraphQL Schema Coordinate (ex. `Type.field`),\n * parse the AST for that schema coordinate.\n * Throws GraphQLError if a syntax error is encountered.\n *\n * Consider providing the results to the utility function:\n * resolveASTSchemaCoordinate(). Or calling resolveSchemaCoordinate() directly\n * with an unparsed source.\n */\n\nfunction parseSchemaCoordinate(source) {\n const sourceObj = (0, _source.isSource)(source)\n ? source\n : new _source.Source(source);\n const lexer = new _schemaCoordinateLexer.SchemaCoordinateLexer(sourceObj);\n const parser = new Parser(source, {\n lexer,\n });\n parser.expectToken(_tokenKind.TokenKind.SOF);\n const coordinate = parser.parseSchemaCoordinate();\n parser.expectToken(_tokenKind.TokenKind.EOF);\n return coordinate;\n}\n/**\n * This class is exported only to assist people in implementing their own parsers\n * without duplicating too much code and should be used only as last resort for cases\n * such as experimental syntax or if certain features could not be contributed upstream.\n *\n * It is still part of the internal API and is versioned, so any changes to it are never\n * considered breaking changes. If you still need to support multiple versions of the\n * library, please use the `versionInfo` variable for version detection.\n *\n * @internal\n */\n\nclass Parser {\n constructor(source, options = {}) {\n const { lexer, ..._options } = options;\n\n if (lexer) {\n this._lexer = lexer;\n } else {\n const sourceObj = (0, _source.isSource)(source)\n ? source\n : new _source.Source(source);\n this._lexer = new _lexer.Lexer(sourceObj);\n }\n\n this._options = _options;\n this._tokenCounter = 0;\n }\n\n get tokenCount() {\n return this._tokenCounter;\n }\n /**\n * Converts a name lex token into a name parse node.\n */\n\n parseName() {\n const token = this.expectToken(_tokenKind.TokenKind.NAME);\n return this.node(token, {\n kind: _kinds.Kind.NAME,\n value: token.value,\n });\n } // Implements the parsing rules in the Document section.\n\n /**\n * Document : Definition+\n */\n\n parseDocument() {\n return this.node(this._lexer.token, {\n kind: _kinds.Kind.DOCUMENT,\n definitions: this.many(\n _tokenKind.TokenKind.SOF,\n this.parseDefinition,\n _tokenKind.TokenKind.EOF,\n ),\n });\n }\n /**\n * Definition :\n * - ExecutableDefinition\n * - TypeSystemDefinition\n * - TypeSystemExtension\n *\n * ExecutableDefinition :\n * - OperationDefinition\n * - FragmentDefinition\n *\n * TypeSystemDefinition :\n * - SchemaDefinition\n * - TypeDefinition\n * - DirectiveDefinition\n *\n * TypeDefinition :\n * - ScalarTypeDefinition\n * - ObjectTypeDefinition\n * - InterfaceTypeDefinition\n * - UnionTypeDefinition\n * - EnumTypeDefinition\n * - InputObjectTypeDefinition\n */\n\n parseDefinition() {\n if (this.peek(_tokenKind.TokenKind.BRACE_L)) {\n return this.parseOperationDefinition();\n } // Many definitions begin with a description and require a lookahead.\n\n const hasDescription = this.peekDescription();\n const keywordToken = hasDescription\n ? this._lexer.lookahead()\n : this._lexer.token;\n\n if (hasDescription && keywordToken.kind === _tokenKind.TokenKind.BRACE_L) {\n throw (0, _syntaxError.syntaxError)(\n this._lexer.source,\n this._lexer.token.start,\n 'Unexpected description, descriptions are not supported on shorthand queries.',\n );\n }\n\n if (keywordToken.kind === _tokenKind.TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaDefinition();\n\n case 'scalar':\n return this.parseScalarTypeDefinition();\n\n case 'type':\n return this.parseObjectTypeDefinition();\n\n case 'interface':\n return this.parseInterfaceTypeDefinition();\n\n case 'union':\n return this.parseUnionTypeDefinition();\n\n case 'enum':\n return this.parseEnumTypeDefinition();\n\n case 'input':\n return this.parseInputObjectTypeDefinition();\n\n case 'directive':\n return this.parseDirectiveDefinition();\n }\n\n switch (keywordToken.value) {\n case 'query':\n case 'mutation':\n case 'subscription':\n return this.parseOperationDefinition();\n\n case 'fragment':\n return this.parseFragmentDefinition();\n }\n\n if (hasDescription) {\n throw (0, _syntaxError.syntaxError)(\n this._lexer.source,\n this._lexer.token.start,\n 'Unexpected description, only GraphQL definitions support descriptions.',\n );\n }\n\n switch (keywordToken.value) {\n case 'extend':\n return this.parseTypeSystemExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n } // Implements the parsing rules in the Operations section.\n\n /**\n * OperationDefinition :\n * - SelectionSet\n * - OperationType Name? VariableDefinitions? Directives? SelectionSet\n */\n\n parseOperationDefinition() {\n const start = this._lexer.token;\n\n if (this.peek(_tokenKind.TokenKind.BRACE_L)) {\n return this.node(start, {\n kind: _kinds.Kind.OPERATION_DEFINITION,\n operation: _ast.OperationTypeNode.QUERY,\n description: undefined,\n name: undefined,\n variableDefinitions: [],\n directives: [],\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n const description = this.parseDescription();\n const operation = this.parseOperationType();\n let name;\n\n if (this.peek(_tokenKind.TokenKind.NAME)) {\n name = this.parseName();\n }\n\n return this.node(start, {\n kind: _kinds.Kind.OPERATION_DEFINITION,\n operation,\n description,\n name,\n variableDefinitions: this.parseVariableDefinitions(),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * OperationType : one of query mutation subscription\n */\n\n parseOperationType() {\n const operationToken = this.expectToken(_tokenKind.TokenKind.NAME);\n\n switch (operationToken.value) {\n case 'query':\n return _ast.OperationTypeNode.QUERY;\n\n case 'mutation':\n return _ast.OperationTypeNode.MUTATION;\n\n case 'subscription':\n return _ast.OperationTypeNode.SUBSCRIPTION;\n }\n\n throw this.unexpected(operationToken);\n }\n /**\n * VariableDefinitions : ( VariableDefinition+ )\n */\n\n parseVariableDefinitions() {\n return this.optionalMany(\n _tokenKind.TokenKind.PAREN_L,\n this.parseVariableDefinition,\n _tokenKind.TokenKind.PAREN_R,\n );\n }\n /**\n * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?\n */\n\n parseVariableDefinition() {\n return this.node(this._lexer.token, {\n kind: _kinds.Kind.VARIABLE_DEFINITION,\n description: this.parseDescription(),\n variable: this.parseVariable(),\n type:\n (this.expectToken(_tokenKind.TokenKind.COLON),\n this.parseTypeReference()),\n defaultValue: this.expectOptionalToken(_tokenKind.TokenKind.EQUALS)\n ? this.parseConstValueLiteral()\n : undefined,\n directives: this.parseConstDirectives(),\n });\n }\n /**\n * Variable : $ Name\n */\n\n parseVariable() {\n const start = this._lexer.token;\n this.expectToken(_tokenKind.TokenKind.DOLLAR);\n return this.node(start, {\n kind: _kinds.Kind.VARIABLE,\n name: this.parseName(),\n });\n }\n /**\n * ```\n * SelectionSet : { Selection+ }\n * ```\n */\n\n parseSelectionSet() {\n return this.node(this._lexer.token, {\n kind: _kinds.Kind.SELECTION_SET,\n selections: this.many(\n _tokenKind.TokenKind.BRACE_L,\n this.parseSelection,\n _tokenKind.TokenKind.BRACE_R,\n ),\n });\n }\n /**\n * Selection :\n * - Field\n * - FragmentSpread\n * - InlineFragment\n */\n\n parseSelection() {\n return this.peek(_tokenKind.TokenKind.SPREAD)\n ? this.parseFragment()\n : this.parseField();\n }\n /**\n * Field : Alias? Name Arguments? Directives? SelectionSet?\n *\n * Alias : Name :\n */\n\n parseField() {\n const start = this._lexer.token;\n const nameOrAlias = this.parseName();\n let alias;\n let name;\n\n if (this.expectOptionalToken(_tokenKind.TokenKind.COLON)) {\n alias = nameOrAlias;\n name = this.parseName();\n } else {\n name = nameOrAlias;\n }\n\n return this.node(start, {\n kind: _kinds.Kind.FIELD,\n alias,\n name,\n arguments: this.parseArguments(false),\n directives: this.parseDirectives(false),\n selectionSet: this.peek(_tokenKind.TokenKind.BRACE_L)\n ? this.parseSelectionSet()\n : undefined,\n });\n }\n /**\n * Arguments[Const] : ( Argument[?Const]+ )\n */\n\n parseArguments(isConst) {\n const item = isConst ? this.parseConstArgument : this.parseArgument;\n return this.optionalMany(\n _tokenKind.TokenKind.PAREN_L,\n item,\n _tokenKind.TokenKind.PAREN_R,\n );\n }\n /**\n * Argument[Const] : Name : Value[?Const]\n */\n\n parseArgument(isConst = false) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(_tokenKind.TokenKind.COLON);\n return this.node(start, {\n kind: _kinds.Kind.ARGUMENT,\n name,\n value: this.parseValueLiteral(isConst),\n });\n }\n\n parseConstArgument() {\n return this.parseArgument(true);\n } // Implements the parsing rules in the Fragments section.\n\n /**\n * Corresponds to both FragmentSpread and InlineFragment in the spec.\n *\n * FragmentSpread : ... FragmentName Directives?\n *\n * InlineFragment : ... TypeCondition? Directives? SelectionSet\n */\n\n parseFragment() {\n const start = this._lexer.token;\n this.expectToken(_tokenKind.TokenKind.SPREAD);\n const hasTypeCondition = this.expectOptionalKeyword('on');\n\n if (!hasTypeCondition && this.peek(_tokenKind.TokenKind.NAME)) {\n return this.node(start, {\n kind: _kinds.Kind.FRAGMENT_SPREAD,\n name: this.parseFragmentName(),\n directives: this.parseDirectives(false),\n });\n }\n\n return this.node(start, {\n kind: _kinds.Kind.INLINE_FRAGMENT,\n typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentDefinition :\n * - fragment FragmentName on TypeCondition Directives? SelectionSet\n *\n * TypeCondition : NamedType\n */\n\n parseFragmentDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('fragment'); // Legacy support for defining variables within fragments changes\n // the grammar of FragmentDefinition:\n // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet\n\n if (this._options.allowLegacyFragmentVariables === true) {\n return this.node(start, {\n kind: _kinds.Kind.FRAGMENT_DEFINITION,\n description,\n name: this.parseFragmentName(),\n variableDefinitions: this.parseVariableDefinitions(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n\n return this.node(start, {\n kind: _kinds.Kind.FRAGMENT_DEFINITION,\n description,\n name: this.parseFragmentName(),\n typeCondition: (this.expectKeyword('on'), this.parseNamedType()),\n directives: this.parseDirectives(false),\n selectionSet: this.parseSelectionSet(),\n });\n }\n /**\n * FragmentName : Name but not `on`\n */\n\n parseFragmentName() {\n if (this._lexer.token.value === 'on') {\n throw this.unexpected();\n }\n\n return this.parseName();\n } // Implements the parsing rules in the Values section.\n\n /**\n * Value[Const] :\n * - [~Const] Variable\n * - IntValue\n * - FloatValue\n * - StringValue\n * - BooleanValue\n * - NullValue\n * - EnumValue\n * - ListValue[?Const]\n * - ObjectValue[?Const]\n *\n * BooleanValue : one of `true` `false`\n *\n * NullValue : `null`\n *\n * EnumValue : Name but not `true`, `false` or `null`\n */\n\n parseValueLiteral(isConst) {\n const token = this._lexer.token;\n\n switch (token.kind) {\n case _tokenKind.TokenKind.BRACKET_L:\n return this.parseList(isConst);\n\n case _tokenKind.TokenKind.BRACE_L:\n return this.parseObject(isConst);\n\n case _tokenKind.TokenKind.INT:\n this.advanceLexer();\n return this.node(token, {\n kind: _kinds.Kind.INT,\n value: token.value,\n });\n\n case _tokenKind.TokenKind.FLOAT:\n this.advanceLexer();\n return this.node(token, {\n kind: _kinds.Kind.FLOAT,\n value: token.value,\n });\n\n case _tokenKind.TokenKind.STRING:\n case _tokenKind.TokenKind.BLOCK_STRING:\n return this.parseStringLiteral();\n\n case _tokenKind.TokenKind.NAME:\n this.advanceLexer();\n\n switch (token.value) {\n case 'true':\n return this.node(token, {\n kind: _kinds.Kind.BOOLEAN,\n value: true,\n });\n\n case 'false':\n return this.node(token, {\n kind: _kinds.Kind.BOOLEAN,\n value: false,\n });\n\n case 'null':\n return this.node(token, {\n kind: _kinds.Kind.NULL,\n });\n\n default:\n return this.node(token, {\n kind: _kinds.Kind.ENUM,\n value: token.value,\n });\n }\n\n case _tokenKind.TokenKind.DOLLAR:\n if (isConst) {\n this.expectToken(_tokenKind.TokenKind.DOLLAR);\n\n if (this._lexer.token.kind === _tokenKind.TokenKind.NAME) {\n const varName = this._lexer.token.value;\n throw (0, _syntaxError.syntaxError)(\n this._lexer.source,\n token.start,\n `Unexpected variable \"$${varName}\" in constant value.`,\n );\n } else {\n throw this.unexpected(token);\n }\n }\n\n return this.parseVariable();\n\n default:\n throw this.unexpected();\n }\n }\n\n parseConstValueLiteral() {\n return this.parseValueLiteral(true);\n }\n\n parseStringLiteral() {\n const token = this._lexer.token;\n this.advanceLexer();\n return this.node(token, {\n kind: _kinds.Kind.STRING,\n value: token.value,\n block: token.kind === _tokenKind.TokenKind.BLOCK_STRING,\n });\n }\n /**\n * ListValue[Const] :\n * - [ ]\n * - [ Value[?Const]+ ]\n */\n\n parseList(isConst) {\n const item = () => this.parseValueLiteral(isConst);\n\n return this.node(this._lexer.token, {\n kind: _kinds.Kind.LIST,\n values: this.any(\n _tokenKind.TokenKind.BRACKET_L,\n item,\n _tokenKind.TokenKind.BRACKET_R,\n ),\n });\n }\n /**\n * ```\n * ObjectValue[Const] :\n * - { }\n * - { ObjectField[?Const]+ }\n * ```\n */\n\n parseObject(isConst) {\n const item = () => this.parseObjectField(isConst);\n\n return this.node(this._lexer.token, {\n kind: _kinds.Kind.OBJECT,\n fields: this.any(\n _tokenKind.TokenKind.BRACE_L,\n item,\n _tokenKind.TokenKind.BRACE_R,\n ),\n });\n }\n /**\n * ObjectField[Const] : Name : Value[?Const]\n */\n\n parseObjectField(isConst) {\n const start = this._lexer.token;\n const name = this.parseName();\n this.expectToken(_tokenKind.TokenKind.COLON);\n return this.node(start, {\n kind: _kinds.Kind.OBJECT_FIELD,\n name,\n value: this.parseValueLiteral(isConst),\n });\n } // Implements the parsing rules in the Directives section.\n\n /**\n * Directives[Const] : Directive[?Const]+\n */\n\n parseDirectives(isConst) {\n const directives = [];\n\n while (this.peek(_tokenKind.TokenKind.AT)) {\n directives.push(this.parseDirective(isConst));\n }\n\n return directives;\n }\n\n parseConstDirectives() {\n return this.parseDirectives(true);\n }\n /**\n * ```\n * Directive[Const] : @ Name Arguments[?Const]?\n * ```\n */\n\n parseDirective(isConst) {\n const start = this._lexer.token;\n this.expectToken(_tokenKind.TokenKind.AT);\n return this.node(start, {\n kind: _kinds.Kind.DIRECTIVE,\n name: this.parseName(),\n arguments: this.parseArguments(isConst),\n });\n } // Implements the parsing rules in the Types section.\n\n /**\n * Type :\n * - NamedType\n * - ListType\n * - NonNullType\n */\n\n parseTypeReference() {\n const start = this._lexer.token;\n let type;\n\n if (this.expectOptionalToken(_tokenKind.TokenKind.BRACKET_L)) {\n const innerType = this.parseTypeReference();\n this.expectToken(_tokenKind.TokenKind.BRACKET_R);\n type = this.node(start, {\n kind: _kinds.Kind.LIST_TYPE,\n type: innerType,\n });\n } else {\n type = this.parseNamedType();\n }\n\n if (this.expectOptionalToken(_tokenKind.TokenKind.BANG)) {\n return this.node(start, {\n kind: _kinds.Kind.NON_NULL_TYPE,\n type,\n });\n }\n\n return type;\n }\n /**\n * NamedType : Name\n */\n\n parseNamedType() {\n return this.node(this._lexer.token, {\n kind: _kinds.Kind.NAMED_TYPE,\n name: this.parseName(),\n });\n } // Implements the parsing rules in the Type Definition section.\n\n peekDescription() {\n return (\n this.peek(_tokenKind.TokenKind.STRING) ||\n this.peek(_tokenKind.TokenKind.BLOCK_STRING)\n );\n }\n /**\n * Description : StringValue\n */\n\n parseDescription() {\n if (this.peekDescription()) {\n return this.parseStringLiteral();\n }\n }\n /**\n * ```\n * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }\n * ```\n */\n\n parseSchemaDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.many(\n _tokenKind.TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n _tokenKind.TokenKind.BRACE_R,\n );\n return this.node(start, {\n kind: _kinds.Kind.SCHEMA_DEFINITION,\n description,\n directives,\n operationTypes,\n });\n }\n /**\n * OperationTypeDefinition : OperationType : NamedType\n */\n\n parseOperationTypeDefinition() {\n const start = this._lexer.token;\n const operation = this.parseOperationType();\n this.expectToken(_tokenKind.TokenKind.COLON);\n const type = this.parseNamedType();\n return this.node(start, {\n kind: _kinds.Kind.OPERATION_TYPE_DEFINITION,\n operation,\n type,\n });\n }\n /**\n * ScalarTypeDefinition : Description? scalar Name Directives[Const]?\n */\n\n parseScalarTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: _kinds.Kind.SCALAR_TYPE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeDefinition :\n * Description?\n * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?\n */\n\n parseObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: _kinds.Kind.OBJECT_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * ImplementsInterfaces :\n * - implements `&`? NamedType\n * - ImplementsInterfaces & NamedType\n */\n\n parseImplementsInterfaces() {\n return this.expectOptionalKeyword('implements')\n ? this.delimitedMany(_tokenKind.TokenKind.AMP, this.parseNamedType)\n : [];\n }\n /**\n * ```\n * FieldsDefinition : { FieldDefinition+ }\n * ```\n */\n\n parseFieldsDefinition() {\n return this.optionalMany(\n _tokenKind.TokenKind.BRACE_L,\n this.parseFieldDefinition,\n _tokenKind.TokenKind.BRACE_R,\n );\n }\n /**\n * FieldDefinition :\n * - Description? Name ArgumentsDefinition? : Type Directives[Const]?\n */\n\n parseFieldDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n this.expectToken(_tokenKind.TokenKind.COLON);\n const type = this.parseTypeReference();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: _kinds.Kind.FIELD_DEFINITION,\n description,\n name,\n arguments: args,\n type,\n directives,\n });\n }\n /**\n * ArgumentsDefinition : ( InputValueDefinition+ )\n */\n\n parseArgumentDefs() {\n return this.optionalMany(\n _tokenKind.TokenKind.PAREN_L,\n this.parseInputValueDef,\n _tokenKind.TokenKind.PAREN_R,\n );\n }\n /**\n * InputValueDefinition :\n * - Description? Name : Type DefaultValue? Directives[Const]?\n */\n\n parseInputValueDef() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseName();\n this.expectToken(_tokenKind.TokenKind.COLON);\n const type = this.parseTypeReference();\n let defaultValue;\n\n if (this.expectOptionalToken(_tokenKind.TokenKind.EQUALS)) {\n defaultValue = this.parseConstValueLiteral();\n }\n\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: _kinds.Kind.INPUT_VALUE_DEFINITION,\n description,\n name,\n type,\n defaultValue,\n directives,\n });\n }\n /**\n * InterfaceTypeDefinition :\n * - Description? interface Name Directives[Const]? FieldsDefinition?\n */\n\n parseInterfaceTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n return this.node(start, {\n kind: _kinds.Kind.INTERFACE_TYPE_DEFINITION,\n description,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeDefinition :\n * - Description? union Name Directives[Const]? UnionMemberTypes?\n */\n\n parseUnionTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n return this.node(start, {\n kind: _kinds.Kind.UNION_TYPE_DEFINITION,\n description,\n name,\n directives,\n types,\n });\n }\n /**\n * UnionMemberTypes :\n * - = `|`? NamedType\n * - UnionMemberTypes | NamedType\n */\n\n parseUnionMemberTypes() {\n return this.expectOptionalToken(_tokenKind.TokenKind.EQUALS)\n ? this.delimitedMany(_tokenKind.TokenKind.PIPE, this.parseNamedType)\n : [];\n }\n /**\n * EnumTypeDefinition :\n * - Description? enum Name Directives[Const]? EnumValuesDefinition?\n */\n\n parseEnumTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n return this.node(start, {\n kind: _kinds.Kind.ENUM_TYPE_DEFINITION,\n description,\n name,\n directives,\n values,\n });\n }\n /**\n * ```\n * EnumValuesDefinition : { EnumValueDefinition+ }\n * ```\n */\n\n parseEnumValuesDefinition() {\n return this.optionalMany(\n _tokenKind.TokenKind.BRACE_L,\n this.parseEnumValueDefinition,\n _tokenKind.TokenKind.BRACE_R,\n );\n }\n /**\n * EnumValueDefinition : Description? EnumValue Directives[Const]?\n */\n\n parseEnumValueDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n const name = this.parseEnumValueName();\n const directives = this.parseConstDirectives();\n return this.node(start, {\n kind: _kinds.Kind.ENUM_VALUE_DEFINITION,\n description,\n name,\n directives,\n });\n }\n /**\n * EnumValue : Name but not `true`, `false` or `null`\n */\n\n parseEnumValueName() {\n if (\n this._lexer.token.value === 'true' ||\n this._lexer.token.value === 'false' ||\n this._lexer.token.value === 'null'\n ) {\n throw (0, _syntaxError.syntaxError)(\n this._lexer.source,\n this._lexer.token.start,\n `${getTokenDesc(\n this._lexer.token,\n )} is reserved and cannot be used for an enum value.`,\n );\n }\n\n return this.parseName();\n }\n /**\n * InputObjectTypeDefinition :\n * - Description? input Name Directives[Const]? InputFieldsDefinition?\n */\n\n parseInputObjectTypeDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n return this.node(start, {\n kind: _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION,\n description,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * InputFieldsDefinition : { InputValueDefinition+ }\n * ```\n */\n\n parseInputFieldsDefinition() {\n return this.optionalMany(\n _tokenKind.TokenKind.BRACE_L,\n this.parseInputValueDef,\n _tokenKind.TokenKind.BRACE_R,\n );\n }\n /**\n * TypeSystemExtension :\n * - SchemaExtension\n * - TypeExtension\n *\n * TypeExtension :\n * - ScalarTypeExtension\n * - ObjectTypeExtension\n * - InterfaceTypeExtension\n * - UnionTypeExtension\n * - EnumTypeExtension\n * - InputObjectTypeDefinition\n */\n\n parseTypeSystemExtension() {\n const keywordToken = this._lexer.lookahead();\n\n if (keywordToken.kind === _tokenKind.TokenKind.NAME) {\n switch (keywordToken.value) {\n case 'schema':\n return this.parseSchemaExtension();\n\n case 'scalar':\n return this.parseScalarTypeExtension();\n\n case 'type':\n return this.parseObjectTypeExtension();\n\n case 'interface':\n return this.parseInterfaceTypeExtension();\n\n case 'union':\n return this.parseUnionTypeExtension();\n\n case 'enum':\n return this.parseEnumTypeExtension();\n\n case 'input':\n return this.parseInputObjectTypeExtension();\n }\n }\n\n throw this.unexpected(keywordToken);\n }\n /**\n * ```\n * SchemaExtension :\n * - extend schema Directives[Const]? { OperationTypeDefinition+ }\n * - extend schema Directives[Const]\n * ```\n */\n\n parseSchemaExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('schema');\n const directives = this.parseConstDirectives();\n const operationTypes = this.optionalMany(\n _tokenKind.TokenKind.BRACE_L,\n this.parseOperationTypeDefinition,\n _tokenKind.TokenKind.BRACE_R,\n );\n\n if (directives.length === 0 && operationTypes.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: _kinds.Kind.SCHEMA_EXTENSION,\n directives,\n operationTypes,\n });\n }\n /**\n * ScalarTypeExtension :\n * - extend scalar Name Directives[Const]\n */\n\n parseScalarTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('scalar');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n\n if (directives.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: _kinds.Kind.SCALAR_TYPE_EXTENSION,\n name,\n directives,\n });\n }\n /**\n * ObjectTypeExtension :\n * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend type Name ImplementsInterfaces? Directives[Const]\n * - extend type Name ImplementsInterfaces\n */\n\n parseObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('type');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: _kinds.Kind.OBJECT_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * InterfaceTypeExtension :\n * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition\n * - extend interface Name ImplementsInterfaces? Directives[Const]\n * - extend interface Name ImplementsInterfaces\n */\n\n parseInterfaceTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('interface');\n const name = this.parseName();\n const interfaces = this.parseImplementsInterfaces();\n const directives = this.parseConstDirectives();\n const fields = this.parseFieldsDefinition();\n\n if (\n interfaces.length === 0 &&\n directives.length === 0 &&\n fields.length === 0\n ) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: _kinds.Kind.INTERFACE_TYPE_EXTENSION,\n name,\n interfaces,\n directives,\n fields,\n });\n }\n /**\n * UnionTypeExtension :\n * - extend union Name Directives[Const]? UnionMemberTypes\n * - extend union Name Directives[Const]\n */\n\n parseUnionTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('union');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const types = this.parseUnionMemberTypes();\n\n if (directives.length === 0 && types.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: _kinds.Kind.UNION_TYPE_EXTENSION,\n name,\n directives,\n types,\n });\n }\n /**\n * EnumTypeExtension :\n * - extend enum Name Directives[Const]? EnumValuesDefinition\n * - extend enum Name Directives[Const]\n */\n\n parseEnumTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('enum');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const values = this.parseEnumValuesDefinition();\n\n if (directives.length === 0 && values.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: _kinds.Kind.ENUM_TYPE_EXTENSION,\n name,\n directives,\n values,\n });\n }\n /**\n * InputObjectTypeExtension :\n * - extend input Name Directives[Const]? InputFieldsDefinition\n * - extend input Name Directives[Const]\n */\n\n parseInputObjectTypeExtension() {\n const start = this._lexer.token;\n this.expectKeyword('extend');\n this.expectKeyword('input');\n const name = this.parseName();\n const directives = this.parseConstDirectives();\n const fields = this.parseInputFieldsDefinition();\n\n if (directives.length === 0 && fields.length === 0) {\n throw this.unexpected();\n }\n\n return this.node(start, {\n kind: _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION,\n name,\n directives,\n fields,\n });\n }\n /**\n * ```\n * DirectiveDefinition :\n * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations\n * ```\n */\n\n parseDirectiveDefinition() {\n const start = this._lexer.token;\n const description = this.parseDescription();\n this.expectKeyword('directive');\n this.expectToken(_tokenKind.TokenKind.AT);\n const name = this.parseName();\n const args = this.parseArgumentDefs();\n const repeatable = this.expectOptionalKeyword('repeatable');\n this.expectKeyword('on');\n const locations = this.parseDirectiveLocations();\n return this.node(start, {\n kind: _kinds.Kind.DIRECTIVE_DEFINITION,\n description,\n name,\n arguments: args,\n repeatable,\n locations,\n });\n }\n /**\n * DirectiveLocations :\n * - `|`? DirectiveLocation\n * - DirectiveLocations | DirectiveLocation\n */\n\n parseDirectiveLocations() {\n return this.delimitedMany(\n _tokenKind.TokenKind.PIPE,\n this.parseDirectiveLocation,\n );\n }\n /*\n * DirectiveLocation :\n * - ExecutableDirectiveLocation\n * - TypeSystemDirectiveLocation\n *\n * ExecutableDirectiveLocation : one of\n * `QUERY`\n * `MUTATION`\n * `SUBSCRIPTION`\n * `FIELD`\n * `FRAGMENT_DEFINITION`\n * `FRAGMENT_SPREAD`\n * `INLINE_FRAGMENT`\n *\n * TypeSystemDirectiveLocation : one of\n * `SCHEMA`\n * `SCALAR`\n * `OBJECT`\n * `FIELD_DEFINITION`\n * `ARGUMENT_DEFINITION`\n * `INTERFACE`\n * `UNION`\n * `ENUM`\n * `ENUM_VALUE`\n * `INPUT_OBJECT`\n * `INPUT_FIELD_DEFINITION`\n */\n\n parseDirectiveLocation() {\n const start = this._lexer.token;\n const name = this.parseName();\n\n if (\n Object.prototype.hasOwnProperty.call(\n _directiveLocation.DirectiveLocation,\n name.value,\n )\n ) {\n return name;\n }\n\n throw this.unexpected(start);\n } // Schema Coordinates\n\n /**\n * SchemaCoordinate :\n * - Name\n * - Name . Name\n * - Name . Name ( Name : )\n * - \\@ Name\n * - \\@ Name ( Name : )\n */\n\n parseSchemaCoordinate() {\n const start = this._lexer.token;\n const ofDirective = this.expectOptionalToken(_tokenKind.TokenKind.AT);\n const name = this.parseName();\n let memberName;\n\n if (!ofDirective && this.expectOptionalToken(_tokenKind.TokenKind.DOT)) {\n memberName = this.parseName();\n }\n\n let argumentName;\n\n if (\n (ofDirective || memberName) &&\n this.expectOptionalToken(_tokenKind.TokenKind.PAREN_L)\n ) {\n argumentName = this.parseName();\n this.expectToken(_tokenKind.TokenKind.COLON);\n this.expectToken(_tokenKind.TokenKind.PAREN_R);\n }\n\n if (ofDirective) {\n if (argumentName) {\n return this.node(start, {\n kind: _kinds.Kind.DIRECTIVE_ARGUMENT_COORDINATE,\n name,\n argumentName,\n });\n }\n\n return this.node(start, {\n kind: _kinds.Kind.DIRECTIVE_COORDINATE,\n name,\n });\n } else if (memberName) {\n if (argumentName) {\n return this.node(start, {\n kind: _kinds.Kind.ARGUMENT_COORDINATE,\n name,\n fieldName: memberName,\n argumentName,\n });\n }\n\n return this.node(start, {\n kind: _kinds.Kind.MEMBER_COORDINATE,\n name,\n memberName,\n });\n }\n\n return this.node(start, {\n kind: _kinds.Kind.TYPE_COORDINATE,\n name,\n });\n } // Core parsing utility functions\n\n /**\n * Returns a node that, if configured to do so, sets a \"loc\" field as a\n * location object, used to identify the place in the source that created a\n * given parsed object.\n */\n\n node(startToken, node) {\n if (this._options.noLocation !== true) {\n node.loc = new _ast.Location(\n startToken,\n this._lexer.lastToken,\n this._lexer.source,\n );\n }\n\n return node;\n }\n /**\n * Determines if the next token is of a given kind\n */\n\n peek(kind) {\n return this._lexer.token.kind === kind;\n }\n /**\n * If the next token is of the given kind, return that token after advancing the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n\n expectToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return token;\n }\n\n throw (0, _syntaxError.syntaxError)(\n this._lexer.source,\n token.start,\n `Expected ${getTokenKindDesc(kind)}, found ${getTokenDesc(token)}.`,\n );\n }\n /**\n * If the next token is of the given kind, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n\n expectOptionalToken(kind) {\n const token = this._lexer.token;\n\n if (token.kind === kind) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * If the next token is a given keyword, advance the lexer.\n * Otherwise, do not change the parser state and throw an error.\n */\n\n expectKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === _tokenKind.TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n } else {\n throw (0, _syntaxError.syntaxError)(\n this._lexer.source,\n token.start,\n `Expected \"${value}\", found ${getTokenDesc(token)}.`,\n );\n }\n }\n /**\n * If the next token is a given keyword, return \"true\" after advancing the lexer.\n * Otherwise, do not change the parser state and return \"false\".\n */\n\n expectOptionalKeyword(value) {\n const token = this._lexer.token;\n\n if (token.kind === _tokenKind.TokenKind.NAME && token.value === value) {\n this.advanceLexer();\n return true;\n }\n\n return false;\n }\n /**\n * Helper function for creating an error when an unexpected lexed token is encountered.\n */\n\n unexpected(atToken) {\n const token =\n atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;\n return (0, _syntaxError.syntaxError)(\n this._lexer.source,\n token.start,\n `Unexpected ${getTokenDesc(token)}.`,\n );\n }\n /**\n * Returns a possibly empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n any(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n while (!this.expectOptionalToken(closeKind)) {\n nodes.push(parseFn.call(this));\n }\n\n return nodes;\n }\n /**\n * Returns a list of parse nodes, determined by the parseFn.\n * It can be empty only if open token is missing otherwise it will always return non-empty list\n * that begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n optionalMany(openKind, parseFn, closeKind) {\n if (this.expectOptionalToken(openKind)) {\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n\n return [];\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list begins with a lex token of openKind and ends with a lex token of closeKind.\n * Advances the parser to the next lex token after the closing token.\n */\n\n many(openKind, parseFn, closeKind) {\n this.expectToken(openKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (!this.expectOptionalToken(closeKind));\n\n return nodes;\n }\n /**\n * Returns a non-empty list of parse nodes, determined by the parseFn.\n * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.\n * Advances the parser to the next lex token after last item in the list.\n */\n\n delimitedMany(delimiterKind, parseFn) {\n this.expectOptionalToken(delimiterKind);\n const nodes = [];\n\n do {\n nodes.push(parseFn.call(this));\n } while (this.expectOptionalToken(delimiterKind));\n\n return nodes;\n }\n\n advanceLexer() {\n const { maxTokens } = this._options;\n\n const token = this._lexer.advance();\n\n if (token.kind !== _tokenKind.TokenKind.EOF) {\n ++this._tokenCounter;\n\n if (maxTokens !== undefined && this._tokenCounter > maxTokens) {\n throw (0, _syntaxError.syntaxError)(\n this._lexer.source,\n token.start,\n `Document contains more that ${maxTokens} tokens. Parsing aborted.`,\n );\n }\n }\n }\n}\n/**\n * A helper function to describe a token as a string for debugging.\n */\n\nexports.Parser = Parser;\n\nfunction getTokenDesc(token) {\n const value = token.value;\n return getTokenKindDesc(token.kind) + (value != null ? ` \"${value}\"` : '');\n}\n/**\n * A helper function to describe a token kind as a string for debugging.\n */\n\nfunction getTokenKindDesc(kind) {\n return (0, _lexer.isPunctuatorTokenKind)(kind) ? `\"${kind}\"` : kind;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.didYouMean = didYouMean;\nconst MAX_SUGGESTIONS = 5;\n/**\n * Given [ A, B, C ] return ' Did you mean A, B, or C?'.\n */\n\nfunction didYouMean(firstArg, secondArg) {\n const [subMessage, suggestionsArg] = secondArg\n ? [firstArg, secondArg]\n : [undefined, firstArg];\n let message = ' Did you mean ';\n\n if (subMessage) {\n message += subMessage + ' ';\n }\n\n const suggestions = suggestionsArg.map((x) => `\"${x}\"`);\n\n switch (suggestions.length) {\n case 0:\n return '';\n\n case 1:\n return message + suggestions[0] + '?';\n\n case 2:\n return message + suggestions[0] + ' or ' + suggestions[1] + '?';\n }\n\n const selected = suggestions.slice(0, MAX_SUGGESTIONS);\n const lastItem = selected.pop();\n return message + selected.join(', ') + ', or ' + lastItem + '?';\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.identityFunc = identityFunc;\n\n/**\n * Returns the first argument it receives.\n */\nfunction identityFunc(x) {\n return x;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.keyMap = keyMap;\n\n/**\n * Creates a keyed JS object from an array, given a function to produce the keys\n * for each value in the array.\n *\n * This provides a convenient lookup for the array items if the key function\n * produces unique results.\n * ```ts\n * const phoneBook = [\n * { name: 'Jon', num: '555-1234' },\n * { name: 'Jenny', num: '867-5309' }\n * ]\n *\n * const entriesByName = keyMap(\n * phoneBook,\n * entry => entry.name\n * )\n *\n * // {\n * // Jon: { name: 'Jon', num: '555-1234' },\n * // Jenny: { name: 'Jenny', num: '867-5309' }\n * // }\n *\n * const jennyEntry = entriesByName['Jenny']\n *\n * // { name: 'Jenny', num: '857-6309' }\n * ```\n */\nfunction keyMap(list, keyFn) {\n const result = Object.create(null);\n\n for (const item of list) {\n result[keyFn(item)] = item;\n }\n\n return result;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.keyValMap = keyValMap;\n\n/**\n * Creates a keyed JS object from an array, given a function to produce the keys\n * and a function to produce the values from each item in the array.\n * ```ts\n * const phoneBook = [\n * { name: 'Jon', num: '555-1234' },\n * { name: 'Jenny', num: '867-5309' }\n * ]\n *\n * // { Jon: '555-1234', Jenny: '867-5309' }\n * const phonesByName = keyValMap(\n * phoneBook,\n * entry => entry.name,\n * entry => entry.num\n * )\n * ```\n */\nfunction keyValMap(list, keyFn, valFn) {\n const result = Object.create(null);\n\n for (const item of list) {\n result[keyFn(item)] = valFn(item);\n }\n\n return result;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.mapValue = mapValue;\n\n/**\n * Creates an object map with the same keys as `map` and values generated by\n * running each value of `map` thru `fn`.\n */\nfunction mapValue(map, fn) {\n const result = Object.create(null);\n\n for (const key of Object.keys(map)) {\n result[key] = fn(map[key], key);\n }\n\n return result;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.naturalCompare = naturalCompare;\n\n/**\n * Returns a number indicating whether a reference string comes before, or after,\n * or is the same as the given string in natural sort order.\n *\n * See: https://en.wikipedia.org/wiki/Natural_sort_order\n *\n */\nfunction naturalCompare(aStr, bStr) {\n let aIndex = 0;\n let bIndex = 0;\n\n while (aIndex < aStr.length && bIndex < bStr.length) {\n let aChar = aStr.charCodeAt(aIndex);\n let bChar = bStr.charCodeAt(bIndex);\n\n if (isDigit(aChar) && isDigit(bChar)) {\n let aNum = 0;\n\n do {\n ++aIndex;\n aNum = aNum * 10 + aChar - DIGIT_0;\n aChar = aStr.charCodeAt(aIndex);\n } while (isDigit(aChar) && aNum > 0);\n\n let bNum = 0;\n\n do {\n ++bIndex;\n bNum = bNum * 10 + bChar - DIGIT_0;\n bChar = bStr.charCodeAt(bIndex);\n } while (isDigit(bChar) && bNum > 0);\n\n if (aNum < bNum) {\n return -1;\n }\n\n if (aNum > bNum) {\n return 1;\n }\n } else {\n if (aChar < bChar) {\n return -1;\n }\n\n if (aChar > bChar) {\n return 1;\n }\n\n ++aIndex;\n ++bIndex;\n }\n }\n\n return aStr.length - bStr.length;\n}\n\nconst DIGIT_0 = 48;\nconst DIGIT_9 = 57;\n\nfunction isDigit(code) {\n return !isNaN(code) && DIGIT_0 <= code && code <= DIGIT_9;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.suggestionList = suggestionList;\n\nvar _naturalCompare = require('./naturalCompare.js');\n\n/**\n * Given an invalid input string and a list of valid options, returns a filtered\n * list of valid options sorted based on their similarity with the input.\n */\nfunction suggestionList(input, options) {\n const optionsByDistance = Object.create(null);\n const lexicalDistance = new LexicalDistance(input);\n const threshold = Math.floor(input.length * 0.4) + 1;\n\n for (const option of options) {\n const distance = lexicalDistance.measure(option, threshold);\n\n if (distance !== undefined) {\n optionsByDistance[option] = distance;\n }\n }\n\n return Object.keys(optionsByDistance).sort((a, b) => {\n const distanceDiff = optionsByDistance[a] - optionsByDistance[b];\n return distanceDiff !== 0\n ? distanceDiff\n : (0, _naturalCompare.naturalCompare)(a, b);\n });\n}\n/**\n * Computes the lexical distance between strings A and B.\n *\n * The \"distance\" between two strings is given by counting the minimum number\n * of edits needed to transform string A into string B. An edit can be an\n * insertion, deletion, or substitution of a single character, or a swap of two\n * adjacent characters.\n *\n * Includes a custom alteration from Damerau-Levenshtein to treat case changes\n * as a single edit which helps identify mis-cased values with an edit distance\n * of 1.\n *\n * This distance can be useful for detecting typos in input or sorting\n */\n\nclass LexicalDistance {\n constructor(input) {\n this._input = input;\n this._inputLowerCase = input.toLowerCase();\n this._inputArray = stringToArray(this._inputLowerCase);\n this._rows = [\n new Array(input.length + 1).fill(0),\n new Array(input.length + 1).fill(0),\n new Array(input.length + 1).fill(0),\n ];\n }\n\n measure(option, threshold) {\n if (this._input === option) {\n return 0;\n }\n\n const optionLowerCase = option.toLowerCase(); // Any case change counts as a single edit\n\n if (this._inputLowerCase === optionLowerCase) {\n return 1;\n }\n\n let a = stringToArray(optionLowerCase);\n let b = this._inputArray;\n\n if (a.length < b.length) {\n const tmp = a;\n a = b;\n b = tmp;\n }\n\n const aLength = a.length;\n const bLength = b.length;\n\n if (aLength - bLength > threshold) {\n return undefined;\n }\n\n const rows = this._rows;\n\n for (let j = 0; j <= bLength; j++) {\n rows[0][j] = j;\n }\n\n for (let i = 1; i <= aLength; i++) {\n const upRow = rows[(i - 1) % 3];\n const currentRow = rows[i % 3];\n let smallestCell = (currentRow[0] = i);\n\n for (let j = 1; j <= bLength; j++) {\n const cost = a[i - 1] === b[j - 1] ? 0 : 1;\n let currentCell = Math.min(\n upRow[j] + 1, // delete\n currentRow[j - 1] + 1, // insert\n upRow[j - 1] + cost, // substitute\n );\n\n if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {\n // transposition\n const doubleDiagonalCell = rows[(i - 2) % 3][j - 2];\n currentCell = Math.min(currentCell, doubleDiagonalCell + 1);\n }\n\n if (currentCell < smallestCell) {\n smallestCell = currentCell;\n }\n\n currentRow[j] = currentCell;\n } // Early exit, since distance can't go smaller than smallest element of the previous row.\n\n if (smallestCell > threshold) {\n return undefined;\n }\n }\n\n const distance = rows[aLength % 3][bLength];\n return distance <= threshold ? distance : undefined;\n }\n}\n\nfunction stringToArray(str) {\n const strLength = str.length;\n const array = new Array(strLength);\n\n for (let i = 0; i < strLength; ++i) {\n array[i] = str.charCodeAt(i);\n }\n\n return array;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.toObjMap = toObjMap;\n\nfunction toObjMap(obj) {\n if (obj == null) {\n return Object.create(null);\n }\n\n if (Object.getPrototypeOf(obj) === null) {\n return obj;\n }\n\n const map = Object.create(null);\n\n for (const [key, value] of Object.entries(obj)) {\n map[key] = value;\n }\n\n return map;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.printString = printString;\n\n/**\n * Prints a string as a GraphQL StringValue literal. Replaces control characters\n * and excluded characters (\" U+0022 and \\\\ U+005C) with escape sequences.\n */\nfunction printString(str) {\n return `\"${str.replace(escapedRegExp, escapedReplacer)}\"`;\n} // eslint-disable-next-line no-control-regex\n\nconst escapedRegExp = /[\\x00-\\x1f\\x22\\x5c\\x7f-\\x9f]/g;\n\nfunction escapedReplacer(str) {\n return escapeSequences[str.charCodeAt(0)];\n} // prettier-ignore\n\nconst escapeSequences = [\n '\\\\u0000',\n '\\\\u0001',\n '\\\\u0002',\n '\\\\u0003',\n '\\\\u0004',\n '\\\\u0005',\n '\\\\u0006',\n '\\\\u0007',\n '\\\\b',\n '\\\\t',\n '\\\\n',\n '\\\\u000B',\n '\\\\f',\n '\\\\r',\n '\\\\u000E',\n '\\\\u000F',\n '\\\\u0010',\n '\\\\u0011',\n '\\\\u0012',\n '\\\\u0013',\n '\\\\u0014',\n '\\\\u0015',\n '\\\\u0016',\n '\\\\u0017',\n '\\\\u0018',\n '\\\\u0019',\n '\\\\u001A',\n '\\\\u001B',\n '\\\\u001C',\n '\\\\u001D',\n '\\\\u001E',\n '\\\\u001F',\n '',\n '',\n '\\\\\"',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 2F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 3F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 4F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '\\\\\\\\',\n '',\n '',\n '', // 5F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '', // 6F\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '\\\\u007F',\n '\\\\u0080',\n '\\\\u0081',\n '\\\\u0082',\n '\\\\u0083',\n '\\\\u0084',\n '\\\\u0085',\n '\\\\u0086',\n '\\\\u0087',\n '\\\\u0088',\n '\\\\u0089',\n '\\\\u008A',\n '\\\\u008B',\n '\\\\u008C',\n '\\\\u008D',\n '\\\\u008E',\n '\\\\u008F',\n '\\\\u0090',\n '\\\\u0091',\n '\\\\u0092',\n '\\\\u0093',\n '\\\\u0094',\n '\\\\u0095',\n '\\\\u0096',\n '\\\\u0097',\n '\\\\u0098',\n '\\\\u0099',\n '\\\\u009A',\n '\\\\u009B',\n '\\\\u009C',\n '\\\\u009D',\n '\\\\u009E',\n '\\\\u009F',\n];\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.BREAK = void 0;\nexports.getEnterLeaveForKind = getEnterLeaveForKind;\nexports.getVisitFn = getVisitFn;\nexports.visit = visit;\nexports.visitInParallel = visitInParallel;\n\nvar _devAssert = require('../jsutils/devAssert.js');\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _ast = require('./ast.js');\n\nvar _kinds = require('./kinds.js');\n\nconst BREAK = Object.freeze({});\n/**\n * visit() will walk through an AST using a depth-first traversal, calling\n * the visitor's enter function at each node in the traversal, and calling the\n * leave function after visiting that node and all of its child nodes.\n *\n * By returning different values from the enter and leave functions, the\n * behavior of the visitor can be altered, including skipping over a sub-tree of\n * the AST (by returning false), editing the AST by returning a value or null\n * to remove the value, or to stop the whole traversal by returning BREAK.\n *\n * When using visit() to edit an AST, the original AST will not be modified, and\n * a new version of the AST with the changes applied will be returned from the\n * visit function.\n *\n * ```ts\n * const editedAST = visit(ast, {\n * enter(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: skip visiting this node\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * },\n * leave(node, key, parent, path, ancestors) {\n * // @return\n * // undefined: no action\n * // false: no action\n * // visitor.BREAK: stop visiting altogether\n * // null: delete this node\n * // any value: replace this node with the returned value\n * }\n * });\n * ```\n *\n * Alternatively to providing enter() and leave() functions, a visitor can\n * instead provide functions named the same as the kinds of AST nodes, or\n * enter/leave visitors at a named key, leading to three permutations of the\n * visitor API:\n *\n * 1) Named visitors triggered when entering a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n * Kind(node) {\n * // enter the \"Kind\" node\n * }\n * })\n * ```\n *\n * 2) Named visitors that trigger upon entering and leaving a node of a specific kind.\n *\n * ```ts\n * visit(ast, {\n * Kind: {\n * enter(node) {\n * // enter the \"Kind\" node\n * }\n * leave(node) {\n * // leave the \"Kind\" node\n * }\n * }\n * })\n * ```\n *\n * 3) Generic visitors that trigger upon entering and leaving any node.\n *\n * ```ts\n * visit(ast, {\n * enter(node) {\n * // enter any node\n * },\n * leave(node) {\n * // leave any node\n * }\n * })\n * ```\n */\n\nexports.BREAK = BREAK;\n\nfunction visit(root, visitor, visitorKeys = _ast.QueryDocumentKeys) {\n const enterLeaveMap = new Map();\n\n for (const kind of Object.values(_kinds.Kind)) {\n enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));\n }\n /* eslint-disable no-undef-init */\n\n let stack = undefined;\n let inArray = Array.isArray(root);\n let keys = [root];\n let index = -1;\n let edits = [];\n let node = root;\n let key = undefined;\n let parent = undefined;\n const path = [];\n const ancestors = [];\n /* eslint-enable no-undef-init */\n\n do {\n index++;\n const isLeaving = index === keys.length;\n const isEdited = isLeaving && edits.length !== 0;\n\n if (isLeaving) {\n key = ancestors.length === 0 ? undefined : path[path.length - 1];\n node = parent;\n parent = ancestors.pop();\n\n if (isEdited) {\n if (inArray) {\n node = node.slice();\n let editOffset = 0;\n\n for (const [editKey, editValue] of edits) {\n const arrayKey = editKey - editOffset;\n\n if (editValue === null) {\n node.splice(arrayKey, 1);\n editOffset++;\n } else {\n node[arrayKey] = editValue;\n }\n }\n } else {\n node = { ...node };\n\n for (const [editKey, editValue] of edits) {\n node[editKey] = editValue;\n }\n }\n }\n\n index = stack.index;\n keys = stack.keys;\n edits = stack.edits;\n inArray = stack.inArray;\n stack = stack.prev;\n } else if (parent) {\n key = inArray ? index : keys[index];\n node = parent[key];\n\n if (node === null || node === undefined) {\n continue;\n }\n\n path.push(key);\n }\n\n let result;\n\n if (!Array.isArray(node)) {\n var _enterLeaveMap$get, _enterLeaveMap$get2;\n\n (0, _ast.isNode)(node) ||\n (0, _devAssert.devAssert)(\n false,\n `Invalid AST Node: ${(0, _inspect.inspect)(node)}.`,\n );\n const visitFn = isLeaving\n ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null ||\n _enterLeaveMap$get === void 0\n ? void 0\n : _enterLeaveMap$get.leave\n : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null ||\n _enterLeaveMap$get2 === void 0\n ? void 0\n : _enterLeaveMap$get2.enter;\n result =\n visitFn === null || visitFn === void 0\n ? void 0\n : visitFn.call(visitor, node, key, parent, path, ancestors);\n\n if (result === BREAK) {\n break;\n }\n\n if (result === false) {\n if (!isLeaving) {\n path.pop();\n continue;\n }\n } else if (result !== undefined) {\n edits.push([key, result]);\n\n if (!isLeaving) {\n if ((0, _ast.isNode)(result)) {\n node = result;\n } else {\n path.pop();\n continue;\n }\n }\n }\n }\n\n if (result === undefined && isEdited) {\n edits.push([key, node]);\n }\n\n if (isLeaving) {\n path.pop();\n } else {\n var _node$kind;\n\n stack = {\n inArray,\n index,\n keys,\n edits,\n prev: stack,\n };\n inArray = Array.isArray(node);\n keys = inArray\n ? node\n : (_node$kind = visitorKeys[node.kind]) !== null &&\n _node$kind !== void 0\n ? _node$kind\n : [];\n index = -1;\n edits = [];\n\n if (parent) {\n ancestors.push(parent);\n }\n\n parent = node;\n }\n } while (stack !== undefined);\n\n if (edits.length !== 0) {\n // New root\n return edits[edits.length - 1][1];\n }\n\n return root;\n}\n/**\n * Creates a new visitor instance which delegates to many visitors to run in\n * parallel. Each visitor will be visited for each node before moving on.\n *\n * If a prior visitor edits a node, no following visitors will see that node.\n */\n\nfunction visitInParallel(visitors) {\n const skipping = new Array(visitors.length).fill(null);\n const mergedVisitor = Object.create(null);\n\n for (const kind of Object.values(_kinds.Kind)) {\n let hasVisitor = false;\n const enterList = new Array(visitors.length).fill(undefined);\n const leaveList = new Array(visitors.length).fill(undefined);\n\n for (let i = 0; i < visitors.length; ++i) {\n const { enter, leave } = getEnterLeaveForKind(visitors[i], kind);\n hasVisitor || (hasVisitor = enter != null || leave != null);\n enterList[i] = enter;\n leaveList[i] = leave;\n }\n\n if (!hasVisitor) {\n continue;\n }\n\n const mergedEnterLeave = {\n enter(...args) {\n const node = args[0];\n\n for (let i = 0; i < visitors.length; i++) {\n if (skipping[i] === null) {\n var _enterList$i;\n\n const result =\n (_enterList$i = enterList[i]) === null || _enterList$i === void 0\n ? void 0\n : _enterList$i.apply(visitors[i], args);\n\n if (result === false) {\n skipping[i] = node;\n } else if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined) {\n return result;\n }\n }\n }\n },\n\n leave(...args) {\n const node = args[0];\n\n for (let i = 0; i < visitors.length; i++) {\n if (skipping[i] === null) {\n var _leaveList$i;\n\n const result =\n (_leaveList$i = leaveList[i]) === null || _leaveList$i === void 0\n ? void 0\n : _leaveList$i.apply(visitors[i], args);\n\n if (result === BREAK) {\n skipping[i] = BREAK;\n } else if (result !== undefined && result !== false) {\n return result;\n }\n } else if (skipping[i] === node) {\n skipping[i] = null;\n }\n }\n },\n };\n mergedVisitor[kind] = mergedEnterLeave;\n }\n\n return mergedVisitor;\n}\n/**\n * Given a visitor instance and a node kind, return EnterLeaveVisitor for that kind.\n */\n\nfunction getEnterLeaveForKind(visitor, kind) {\n const kindVisitor = visitor[kind];\n\n if (typeof kindVisitor === 'object') {\n // { Kind: { enter() {}, leave() {} } }\n return kindVisitor;\n } else if (typeof kindVisitor === 'function') {\n // { Kind() {} }\n return {\n enter: kindVisitor,\n leave: undefined,\n };\n } // { enter() {}, leave() {} }\n\n return {\n enter: visitor.enter,\n leave: visitor.leave,\n };\n}\n/**\n * Given a visitor instance, if it is leaving or not, and a node kind, return\n * the function the visitor runtime should call.\n *\n * @deprecated Please use `getEnterLeaveForKind` instead. Will be removed in v17\n */\n\n/* c8 ignore next 8 */\n\nfunction getVisitFn(visitor, kind, isLeaving) {\n const { enter, leave } = getEnterLeaveForKind(visitor, kind);\n return isLeaving ? leave : enter;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.print = print;\n\nvar _blockString = require('./blockString.js');\n\nvar _printString = require('./printString.js');\n\nvar _visitor = require('./visitor.js');\n\n/**\n * Converts an AST into a string, using one set of reasonable\n * formatting rules.\n */\nfunction print(ast) {\n return (0, _visitor.visit)(ast, printDocASTReducer);\n}\n\nconst MAX_LINE_LENGTH = 80;\nconst printDocASTReducer = {\n Name: {\n leave: (node) => node.value,\n },\n Variable: {\n leave: (node) => '$' + node.name,\n },\n // Document\n Document: {\n leave: (node) => join(node.definitions, '\\n\\n'),\n },\n OperationDefinition: {\n leave(node) {\n const varDefs = hasMultilineItems(node.variableDefinitions)\n ? wrap('(\\n', join(node.variableDefinitions, '\\n'), '\\n)')\n : wrap('(', join(node.variableDefinitions, ', '), ')');\n const prefix =\n wrap('', node.description, '\\n') +\n join(\n [\n node.operation,\n join([node.name, varDefs]),\n join(node.directives, ' '),\n ],\n ' ',\n ); // Anonymous queries with no directives or variable definitions can use\n // the query short form.\n\n return (prefix === 'query' ? '' : prefix + ' ') + node.selectionSet;\n },\n },\n VariableDefinition: {\n leave: ({ variable, type, defaultValue, directives, description }) =>\n wrap('', description, '\\n') +\n variable +\n ': ' +\n type +\n wrap(' = ', defaultValue) +\n wrap(' ', join(directives, ' ')),\n },\n SelectionSet: {\n leave: ({ selections }) => block(selections),\n },\n Field: {\n leave({ alias, name, arguments: args, directives, selectionSet }) {\n const prefix = wrap('', alias, ': ') + name;\n let argsLine = prefix + wrap('(', join(args, ', '), ')');\n\n if (argsLine.length > MAX_LINE_LENGTH) {\n argsLine = prefix + wrap('(\\n', indent(join(args, '\\n')), '\\n)');\n }\n\n return join([argsLine, join(directives, ' '), selectionSet], ' ');\n },\n },\n Argument: {\n leave: ({ name, value }) => name + ': ' + value,\n },\n // Fragments\n FragmentSpread: {\n leave: ({ name, directives }) =>\n '...' + name + wrap(' ', join(directives, ' ')),\n },\n InlineFragment: {\n leave: ({ typeCondition, directives, selectionSet }) =>\n join(\n [\n '...',\n wrap('on ', typeCondition),\n join(directives, ' '),\n selectionSet,\n ],\n ' ',\n ),\n },\n FragmentDefinition: {\n leave: ({\n name,\n typeCondition,\n variableDefinitions,\n directives,\n selectionSet,\n description,\n }) =>\n wrap('', description, '\\n') + // Note: fragment variable definitions are experimental and may be changed\n // or removed in the future.\n `fragment ${name}${wrap('(', join(variableDefinitions, ', '), ')')} ` +\n `on ${typeCondition} ${wrap('', join(directives, ' '), ' ')}` +\n selectionSet,\n },\n // Value\n IntValue: {\n leave: ({ value }) => value,\n },\n FloatValue: {\n leave: ({ value }) => value,\n },\n StringValue: {\n leave: ({ value, block: isBlockString }) =>\n isBlockString\n ? (0, _blockString.printBlockString)(value)\n : (0, _printString.printString)(value),\n },\n BooleanValue: {\n leave: ({ value }) => (value ? 'true' : 'false'),\n },\n NullValue: {\n leave: () => 'null',\n },\n EnumValue: {\n leave: ({ value }) => value,\n },\n ListValue: {\n leave: ({ values }) => '[' + join(values, ', ') + ']',\n },\n ObjectValue: {\n leave: ({ fields }) => '{' + join(fields, ', ') + '}',\n },\n ObjectField: {\n leave: ({ name, value }) => name + ': ' + value,\n },\n // Directive\n Directive: {\n leave: ({ name, arguments: args }) =>\n '@' + name + wrap('(', join(args, ', '), ')'),\n },\n // Type\n NamedType: {\n leave: ({ name }) => name,\n },\n ListType: {\n leave: ({ type }) => '[' + type + ']',\n },\n NonNullType: {\n leave: ({ type }) => type + '!',\n },\n // Type System Definitions\n SchemaDefinition: {\n leave: ({ description, directives, operationTypes }) =>\n wrap('', description, '\\n') +\n join(['schema', join(directives, ' '), block(operationTypes)], ' '),\n },\n OperationTypeDefinition: {\n leave: ({ operation, type }) => operation + ': ' + type,\n },\n ScalarTypeDefinition: {\n leave: ({ description, name, directives }) =>\n wrap('', description, '\\n') +\n join(['scalar', name, join(directives, ' ')], ' '),\n },\n ObjectTypeDefinition: {\n leave: ({ description, name, interfaces, directives, fields }) =>\n wrap('', description, '\\n') +\n join(\n [\n 'type',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n FieldDefinition: {\n leave: ({ description, name, arguments: args, type, directives }) =>\n wrap('', description, '\\n') +\n name +\n (hasMultilineItems(args)\n ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n : wrap('(', join(args, ', '), ')')) +\n ': ' +\n type +\n wrap(' ', join(directives, ' ')),\n },\n InputValueDefinition: {\n leave: ({ description, name, type, defaultValue, directives }) =>\n wrap('', description, '\\n') +\n join(\n [name + ': ' + type, wrap('= ', defaultValue), join(directives, ' ')],\n ' ',\n ),\n },\n InterfaceTypeDefinition: {\n leave: ({ description, name, interfaces, directives, fields }) =>\n wrap('', description, '\\n') +\n join(\n [\n 'interface',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n UnionTypeDefinition: {\n leave: ({ description, name, directives, types }) =>\n wrap('', description, '\\n') +\n join(\n ['union', name, join(directives, ' '), wrap('= ', join(types, ' | '))],\n ' ',\n ),\n },\n EnumTypeDefinition: {\n leave: ({ description, name, directives, values }) =>\n wrap('', description, '\\n') +\n join(['enum', name, join(directives, ' '), block(values)], ' '),\n },\n EnumValueDefinition: {\n leave: ({ description, name, directives }) =>\n wrap('', description, '\\n') + join([name, join(directives, ' ')], ' '),\n },\n InputObjectTypeDefinition: {\n leave: ({ description, name, directives, fields }) =>\n wrap('', description, '\\n') +\n join(['input', name, join(directives, ' '), block(fields)], ' '),\n },\n DirectiveDefinition: {\n leave: ({ description, name, arguments: args, repeatable, locations }) =>\n wrap('', description, '\\n') +\n 'directive @' +\n name +\n (hasMultilineItems(args)\n ? wrap('(\\n', indent(join(args, '\\n')), '\\n)')\n : wrap('(', join(args, ', '), ')')) +\n (repeatable ? ' repeatable' : '') +\n ' on ' +\n join(locations, ' | '),\n },\n SchemaExtension: {\n leave: ({ directives, operationTypes }) =>\n join(\n ['extend schema', join(directives, ' '), block(operationTypes)],\n ' ',\n ),\n },\n ScalarTypeExtension: {\n leave: ({ name, directives }) =>\n join(['extend scalar', name, join(directives, ' ')], ' '),\n },\n ObjectTypeExtension: {\n leave: ({ name, interfaces, directives, fields }) =>\n join(\n [\n 'extend type',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n InterfaceTypeExtension: {\n leave: ({ name, interfaces, directives, fields }) =>\n join(\n [\n 'extend interface',\n name,\n wrap('implements ', join(interfaces, ' & ')),\n join(directives, ' '),\n block(fields),\n ],\n ' ',\n ),\n },\n UnionTypeExtension: {\n leave: ({ name, directives, types }) =>\n join(\n [\n 'extend union',\n name,\n join(directives, ' '),\n wrap('= ', join(types, ' | ')),\n ],\n ' ',\n ),\n },\n EnumTypeExtension: {\n leave: ({ name, directives, values }) =>\n join(['extend enum', name, join(directives, ' '), block(values)], ' '),\n },\n InputObjectTypeExtension: {\n leave: ({ name, directives, fields }) =>\n join(['extend input', name, join(directives, ' '), block(fields)], ' '),\n },\n // Schema Coordinates\n TypeCoordinate: {\n leave: ({ name }) => name,\n },\n MemberCoordinate: {\n leave: ({ name, memberName }) => join([name, wrap('.', memberName)]),\n },\n ArgumentCoordinate: {\n leave: ({ name, fieldName, argumentName }) =>\n join([name, wrap('.', fieldName), wrap('(', argumentName, ':)')]),\n },\n DirectiveCoordinate: {\n leave: ({ name }) => join(['@', name]),\n },\n DirectiveArgumentCoordinate: {\n leave: ({ name, argumentName }) =>\n join(['@', name, wrap('(', argumentName, ':)')]),\n },\n};\n/**\n * Given maybeArray, print an empty string if it is null or empty, otherwise\n * print all items together separated by separator if provided\n */\n\nfunction join(maybeArray, separator = '') {\n var _maybeArray$filter$jo;\n\n return (_maybeArray$filter$jo =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.filter((x) => x).join(separator)) !== null &&\n _maybeArray$filter$jo !== void 0\n ? _maybeArray$filter$jo\n : '';\n}\n/**\n * Given array, print each item on its own line, wrapped in an indented `{ }` block.\n */\n\nfunction block(array) {\n return wrap('{\\n', indent(join(array, '\\n')), '\\n}');\n}\n/**\n * If maybeString is not null or empty, then wrap with start and end, otherwise print an empty string.\n */\n\nfunction wrap(start, maybeString, end = '') {\n return maybeString != null && maybeString !== ''\n ? start + maybeString + end\n : '';\n}\n\nfunction indent(str) {\n return wrap(' ', str.replace(/\\n/g, '\\n '));\n}\n\nfunction hasMultilineItems(maybeArray) {\n var _maybeArray$some;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n return (_maybeArray$some =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.some((str) => str.includes('\\n'))) !== null &&\n _maybeArray$some !== void 0\n ? _maybeArray$some\n : false;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.valueFromASTUntyped = valueFromASTUntyped;\n\nvar _keyValMap = require('../jsutils/keyValMap.js');\n\nvar _kinds = require('../language/kinds.js');\n\n/**\n * Produces a JavaScript value given a GraphQL Value AST.\n *\n * Unlike `valueFromAST()`, no type is provided. The resulting JavaScript value\n * will reflect the provided GraphQL value AST.\n *\n * | GraphQL Value | JavaScript Value |\n * | -------------------- | ---------------- |\n * | Input Object | Object |\n * | List | Array |\n * | Boolean | Boolean |\n * | String / Enum | String |\n * | Int / Float | Number |\n * | Null | null |\n *\n */\nfunction valueFromASTUntyped(valueNode, variables) {\n switch (valueNode.kind) {\n case _kinds.Kind.NULL:\n return null;\n\n case _kinds.Kind.INT:\n return parseInt(valueNode.value, 10);\n\n case _kinds.Kind.FLOAT:\n return parseFloat(valueNode.value);\n\n case _kinds.Kind.STRING:\n case _kinds.Kind.ENUM:\n case _kinds.Kind.BOOLEAN:\n return valueNode.value;\n\n case _kinds.Kind.LIST:\n return valueNode.values.map((node) =>\n valueFromASTUntyped(node, variables),\n );\n\n case _kinds.Kind.OBJECT:\n return (0, _keyValMap.keyValMap)(\n valueNode.fields,\n (field) => field.name.value,\n (field) => valueFromASTUntyped(field.value, variables),\n );\n\n case _kinds.Kind.VARIABLE:\n return variables === null || variables === void 0\n ? void 0\n : variables[valueNode.name.value];\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.assertEnumValueName = assertEnumValueName;\nexports.assertName = assertName;\n\nvar _devAssert = require('../jsutils/devAssert.js');\n\nvar _GraphQLError = require('../error/GraphQLError.js');\n\nvar _characterClasses = require('../language/characterClasses.js');\n\n/**\n * Upholds the spec rules about naming.\n */\nfunction assertName(name) {\n name != null || (0, _devAssert.devAssert)(false, 'Must provide name.');\n typeof name === 'string' ||\n (0, _devAssert.devAssert)(false, 'Expected name to be a string.');\n\n if (name.length === 0) {\n throw new _GraphQLError.GraphQLError(\n 'Expected name to be a non-empty string.',\n );\n }\n\n for (let i = 1; i < name.length; ++i) {\n if (!(0, _characterClasses.isNameContinue)(name.charCodeAt(i))) {\n throw new _GraphQLError.GraphQLError(\n `Names must only contain [_a-zA-Z0-9] but \"${name}\" does not.`,\n );\n }\n }\n\n if (!(0, _characterClasses.isNameStart)(name.charCodeAt(0))) {\n throw new _GraphQLError.GraphQLError(\n `Names must start with [_a-zA-Z] but \"${name}\" does not.`,\n );\n }\n\n return name;\n}\n/**\n * Upholds the spec rules about naming enum values.\n *\n * @internal\n */\n\nfunction assertEnumValueName(name) {\n if (name === 'true' || name === 'false' || name === 'null') {\n throw new _GraphQLError.GraphQLError(\n `Enum values cannot be named: ${name}`,\n );\n }\n\n return assertName(name);\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.GraphQLUnionType =\n exports.GraphQLScalarType =\n exports.GraphQLObjectType =\n exports.GraphQLNonNull =\n exports.GraphQLList =\n exports.GraphQLInterfaceType =\n exports.GraphQLInputObjectType =\n exports.GraphQLEnumType =\n void 0;\nexports.argsToArgsConfig = argsToArgsConfig;\nexports.assertAbstractType = assertAbstractType;\nexports.assertCompositeType = assertCompositeType;\nexports.assertEnumType = assertEnumType;\nexports.assertInputObjectType = assertInputObjectType;\nexports.assertInputType = assertInputType;\nexports.assertInterfaceType = assertInterfaceType;\nexports.assertLeafType = assertLeafType;\nexports.assertListType = assertListType;\nexports.assertNamedType = assertNamedType;\nexports.assertNonNullType = assertNonNullType;\nexports.assertNullableType = assertNullableType;\nexports.assertObjectType = assertObjectType;\nexports.assertOutputType = assertOutputType;\nexports.assertScalarType = assertScalarType;\nexports.assertType = assertType;\nexports.assertUnionType = assertUnionType;\nexports.assertWrappingType = assertWrappingType;\nexports.defineArguments = defineArguments;\nexports.getNamedType = getNamedType;\nexports.getNullableType = getNullableType;\nexports.isAbstractType = isAbstractType;\nexports.isCompositeType = isCompositeType;\nexports.isEnumType = isEnumType;\nexports.isInputObjectType = isInputObjectType;\nexports.isInputType = isInputType;\nexports.isInterfaceType = isInterfaceType;\nexports.isLeafType = isLeafType;\nexports.isListType = isListType;\nexports.isNamedType = isNamedType;\nexports.isNonNullType = isNonNullType;\nexports.isNullableType = isNullableType;\nexports.isObjectType = isObjectType;\nexports.isOutputType = isOutputType;\nexports.isRequiredArgument = isRequiredArgument;\nexports.isRequiredInputField = isRequiredInputField;\nexports.isScalarType = isScalarType;\nexports.isType = isType;\nexports.isUnionType = isUnionType;\nexports.isWrappingType = isWrappingType;\nexports.resolveObjMapThunk = resolveObjMapThunk;\nexports.resolveReadonlyArrayThunk = resolveReadonlyArrayThunk;\n\nvar _devAssert = require('../jsutils/devAssert.js');\n\nvar _didYouMean = require('../jsutils/didYouMean.js');\n\nvar _identityFunc = require('../jsutils/identityFunc.js');\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _instanceOf = require('../jsutils/instanceOf.js');\n\nvar _isObjectLike = require('../jsutils/isObjectLike.js');\n\nvar _keyMap = require('../jsutils/keyMap.js');\n\nvar _keyValMap = require('../jsutils/keyValMap.js');\n\nvar _mapValue = require('../jsutils/mapValue.js');\n\nvar _suggestionList = require('../jsutils/suggestionList.js');\n\nvar _toObjMap = require('../jsutils/toObjMap.js');\n\nvar _GraphQLError = require('../error/GraphQLError.js');\n\nvar _kinds = require('../language/kinds.js');\n\nvar _printer = require('../language/printer.js');\n\nvar _valueFromASTUntyped = require('../utilities/valueFromASTUntyped.js');\n\nvar _assertName = require('./assertName.js');\n\nfunction isType(type) {\n return (\n isScalarType(type) ||\n isObjectType(type) ||\n isInterfaceType(type) ||\n isUnionType(type) ||\n isEnumType(type) ||\n isInputObjectType(type) ||\n isListType(type) ||\n isNonNullType(type)\n );\n}\n\nfunction assertType(type) {\n if (!isType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL type.`,\n );\n }\n\n return type;\n}\n/**\n * There are predicates for each kind of GraphQL type.\n */\n\nfunction isScalarType(type) {\n return (0, _instanceOf.instanceOf)(type, GraphQLScalarType);\n}\n\nfunction assertScalarType(type) {\n if (!isScalarType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Scalar type.`,\n );\n }\n\n return type;\n}\n\nfunction isObjectType(type) {\n return (0, _instanceOf.instanceOf)(type, GraphQLObjectType);\n}\n\nfunction assertObjectType(type) {\n if (!isObjectType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Object type.`,\n );\n }\n\n return type;\n}\n\nfunction isInterfaceType(type) {\n return (0, _instanceOf.instanceOf)(type, GraphQLInterfaceType);\n}\n\nfunction assertInterfaceType(type) {\n if (!isInterfaceType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Interface type.`,\n );\n }\n\n return type;\n}\n\nfunction isUnionType(type) {\n return (0, _instanceOf.instanceOf)(type, GraphQLUnionType);\n}\n\nfunction assertUnionType(type) {\n if (!isUnionType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Union type.`,\n );\n }\n\n return type;\n}\n\nfunction isEnumType(type) {\n return (0, _instanceOf.instanceOf)(type, GraphQLEnumType);\n}\n\nfunction assertEnumType(type) {\n if (!isEnumType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Enum type.`,\n );\n }\n\n return type;\n}\n\nfunction isInputObjectType(type) {\n return (0, _instanceOf.instanceOf)(type, GraphQLInputObjectType);\n}\n\nfunction assertInputObjectType(type) {\n if (!isInputObjectType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(\n type,\n )} to be a GraphQL Input Object type.`,\n );\n }\n\n return type;\n}\n\nfunction isListType(type) {\n return (0, _instanceOf.instanceOf)(type, GraphQLList);\n}\n\nfunction assertListType(type) {\n if (!isListType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL List type.`,\n );\n }\n\n return type;\n}\n\nfunction isNonNullType(type) {\n return (0, _instanceOf.instanceOf)(type, GraphQLNonNull);\n}\n\nfunction assertNonNullType(type) {\n if (!isNonNullType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL Non-Null type.`,\n );\n }\n\n return type;\n}\n/**\n * These types may be used as input types for arguments and directives.\n */\n\nfunction isInputType(type) {\n return (\n isScalarType(type) ||\n isEnumType(type) ||\n isInputObjectType(type) ||\n (isWrappingType(type) && isInputType(type.ofType))\n );\n}\n\nfunction assertInputType(type) {\n if (!isInputType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL input type.`,\n );\n }\n\n return type;\n}\n/**\n * These types may be used as output types as the result of fields.\n */\n\nfunction isOutputType(type) {\n return (\n isScalarType(type) ||\n isObjectType(type) ||\n isInterfaceType(type) ||\n isUnionType(type) ||\n isEnumType(type) ||\n (isWrappingType(type) && isOutputType(type.ofType))\n );\n}\n\nfunction assertOutputType(type) {\n if (!isOutputType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL output type.`,\n );\n }\n\n return type;\n}\n/**\n * These types may describe types which may be leaf values.\n */\n\nfunction isLeafType(type) {\n return isScalarType(type) || isEnumType(type);\n}\n\nfunction assertLeafType(type) {\n if (!isLeafType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL leaf type.`,\n );\n }\n\n return type;\n}\n/**\n * These types may describe the parent context of a selection set.\n */\n\nfunction isCompositeType(type) {\n return isObjectType(type) || isInterfaceType(type) || isUnionType(type);\n}\n\nfunction assertCompositeType(type) {\n if (!isCompositeType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL composite type.`,\n );\n }\n\n return type;\n}\n/**\n * These types may describe the parent context of a selection set.\n */\n\nfunction isAbstractType(type) {\n return isInterfaceType(type) || isUnionType(type);\n}\n\nfunction assertAbstractType(type) {\n if (!isAbstractType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL abstract type.`,\n );\n }\n\n return type;\n}\n/**\n * List Type Wrapper\n *\n * A list is a wrapping type which points to another type.\n * Lists are often created within the context of defining the fields of\n * an object type.\n *\n * Example:\n *\n * ```ts\n * const PersonType = new GraphQLObjectType({\n * name: 'Person',\n * fields: () => ({\n * parents: { type: new GraphQLList(PersonType) },\n * children: { type: new GraphQLList(PersonType) },\n * })\n * })\n * ```\n */\n\nclass GraphQLList {\n constructor(ofType) {\n isType(ofType) ||\n (0, _devAssert.devAssert)(\n false,\n `Expected ${(0, _inspect.inspect)(ofType)} to be a GraphQL type.`,\n );\n this.ofType = ofType;\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLList';\n }\n\n toString() {\n return '[' + String(this.ofType) + ']';\n }\n\n toJSON() {\n return this.toString();\n }\n}\n/**\n * Non-Null Type Wrapper\n *\n * A non-null is a wrapping type which points to another type.\n * Non-null types enforce that their values are never null and can ensure\n * an error is raised if this ever occurs during a request. It is useful for\n * fields which you can make a strong guarantee on non-nullability, for example\n * usually the id field of a database row will never be null.\n *\n * Example:\n *\n * ```ts\n * const RowType = new GraphQLObjectType({\n * name: 'Row',\n * fields: () => ({\n * id: { type: new GraphQLNonNull(GraphQLString) },\n * })\n * })\n * ```\n * Note: the enforcement of non-nullability occurs within the executor.\n */\n\nexports.GraphQLList = GraphQLList;\n\nclass GraphQLNonNull {\n constructor(ofType) {\n isNullableType(ofType) ||\n (0, _devAssert.devAssert)(\n false,\n `Expected ${(0, _inspect.inspect)(\n ofType,\n )} to be a GraphQL nullable type.`,\n );\n this.ofType = ofType;\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLNonNull';\n }\n\n toString() {\n return String(this.ofType) + '!';\n }\n\n toJSON() {\n return this.toString();\n }\n}\n/**\n * These types wrap and modify other types\n */\n\nexports.GraphQLNonNull = GraphQLNonNull;\n\nfunction isWrappingType(type) {\n return isListType(type) || isNonNullType(type);\n}\n\nfunction assertWrappingType(type) {\n if (!isWrappingType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL wrapping type.`,\n );\n }\n\n return type;\n}\n/**\n * These types can all accept null as a value.\n */\n\nfunction isNullableType(type) {\n return isType(type) && !isNonNullType(type);\n}\n\nfunction assertNullableType(type) {\n if (!isNullableType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL nullable type.`,\n );\n }\n\n return type;\n}\n\nfunction getNullableType(type) {\n if (type) {\n return isNonNullType(type) ? type.ofType : type;\n }\n}\n/**\n * These named types do not include modifiers like List or NonNull.\n */\n\nfunction isNamedType(type) {\n return (\n isScalarType(type) ||\n isObjectType(type) ||\n isInterfaceType(type) ||\n isUnionType(type) ||\n isEnumType(type) ||\n isInputObjectType(type)\n );\n}\n\nfunction assertNamedType(type) {\n if (!isNamedType(type)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(type)} to be a GraphQL named type.`,\n );\n }\n\n return type;\n}\n\nfunction getNamedType(type) {\n if (type) {\n let unwrappedType = type;\n\n while (isWrappingType(unwrappedType)) {\n unwrappedType = unwrappedType.ofType;\n }\n\n return unwrappedType;\n }\n}\n/**\n * Used while defining GraphQL types to allow for circular references in\n * otherwise immutable type definitions.\n */\n\nfunction resolveReadonlyArrayThunk(thunk) {\n return typeof thunk === 'function' ? thunk() : thunk;\n}\n\nfunction resolveObjMapThunk(thunk) {\n return typeof thunk === 'function' ? thunk() : thunk;\n}\n/**\n * Custom extensions\n *\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n */\n\n/**\n * Scalar Type Definition\n *\n * The leaf values of any request and input values to arguments are\n * Scalars (or Enums) and are defined with a name and a series of functions\n * used to parse input from ast or variables and to ensure validity.\n *\n * If a type's serialize function returns `null` or does not return a value\n * (i.e. it returns `undefined`) then an error will be raised and a `null`\n * value will be returned in the response. It is always better to validate\n *\n * Example:\n *\n * ```ts\n * const OddType = new GraphQLScalarType({\n * name: 'Odd',\n * serialize(value) {\n * if (!Number.isFinite(value)) {\n * throw new Error(\n * `Scalar \"Odd\" cannot represent \"${value}\" since it is not a finite number.`,\n * );\n * }\n *\n * if (value % 2 === 0) {\n * throw new Error(`Scalar \"Odd\" cannot represent \"${value}\" since it is even.`);\n * }\n * return value;\n * }\n * });\n * ```\n */\nclass GraphQLScalarType {\n constructor(config) {\n var _config$parseValue,\n _config$serialize,\n _config$parseLiteral,\n _config$extensionASTN;\n\n const parseValue =\n (_config$parseValue = config.parseValue) !== null &&\n _config$parseValue !== void 0\n ? _config$parseValue\n : _identityFunc.identityFunc;\n this.name = (0, _assertName.assertName)(config.name);\n this.description = config.description;\n this.specifiedByURL = config.specifiedByURL;\n this.serialize =\n (_config$serialize = config.serialize) !== null &&\n _config$serialize !== void 0\n ? _config$serialize\n : _identityFunc.identityFunc;\n this.parseValue = parseValue;\n this.parseLiteral =\n (_config$parseLiteral = config.parseLiteral) !== null &&\n _config$parseLiteral !== void 0\n ? _config$parseLiteral\n : (node, variables) =>\n parseValue(\n (0, _valueFromASTUntyped.valueFromASTUntyped)(node, variables),\n );\n this.extensions = (0, _toObjMap.toObjMap)(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes =\n (_config$extensionASTN = config.extensionASTNodes) !== null &&\n _config$extensionASTN !== void 0\n ? _config$extensionASTN\n : [];\n config.specifiedByURL == null ||\n typeof config.specifiedByURL === 'string' ||\n (0, _devAssert.devAssert)(\n false,\n `${this.name} must provide \"specifiedByURL\" as a string, ` +\n `but got: ${(0, _inspect.inspect)(config.specifiedByURL)}.`,\n );\n config.serialize == null ||\n typeof config.serialize === 'function' ||\n (0, _devAssert.devAssert)(\n false,\n `${this.name} must provide \"serialize\" function. If this custom Scalar is also used as an input type, ensure \"parseValue\" and \"parseLiteral\" functions are also provided.`,\n );\n\n if (config.parseLiteral) {\n (typeof config.parseValue === 'function' &&\n typeof config.parseLiteral === 'function') ||\n (0, _devAssert.devAssert)(\n false,\n `${this.name} must provide both \"parseValue\" and \"parseLiteral\" functions.`,\n );\n }\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLScalarType';\n }\n\n toConfig() {\n return {\n name: this.name,\n description: this.description,\n specifiedByURL: this.specifiedByURL,\n serialize: this.serialize,\n parseValue: this.parseValue,\n parseLiteral: this.parseLiteral,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n toString() {\n return this.name;\n }\n\n toJSON() {\n return this.toString();\n }\n}\n\nexports.GraphQLScalarType = GraphQLScalarType;\n\n/**\n * Object Type Definition\n *\n * Almost all of the GraphQL types you define will be object types. Object types\n * have a name, but most importantly describe their fields.\n *\n * Example:\n *\n * ```ts\n * const AddressType = new GraphQLObjectType({\n * name: 'Address',\n * fields: {\n * street: { type: GraphQLString },\n * number: { type: GraphQLInt },\n * formatted: {\n * type: GraphQLString,\n * resolve(obj) {\n * return obj.number + ' ' + obj.street\n * }\n * }\n * }\n * });\n * ```\n *\n * When two types need to refer to each other, or a type needs to refer to\n * itself in a field, you can use a function expression (aka a closure or a\n * thunk) to supply the fields lazily.\n *\n * Example:\n *\n * ```ts\n * const PersonType = new GraphQLObjectType({\n * name: 'Person',\n * fields: () => ({\n * name: { type: GraphQLString },\n * bestFriend: { type: PersonType },\n * })\n * });\n * ```\n */\nclass GraphQLObjectType {\n constructor(config) {\n var _config$extensionASTN2;\n\n this.name = (0, _assertName.assertName)(config.name);\n this.description = config.description;\n this.isTypeOf = config.isTypeOf;\n this.extensions = (0, _toObjMap.toObjMap)(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes =\n (_config$extensionASTN2 = config.extensionASTNodes) !== null &&\n _config$extensionASTN2 !== void 0\n ? _config$extensionASTN2\n : [];\n\n this._fields = () => defineFieldMap(config);\n\n this._interfaces = () => defineInterfaces(config);\n\n config.isTypeOf == null ||\n typeof config.isTypeOf === 'function' ||\n (0, _devAssert.devAssert)(\n false,\n `${this.name} must provide \"isTypeOf\" as a function, ` +\n `but got: ${(0, _inspect.inspect)(config.isTypeOf)}.`,\n );\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLObjectType';\n }\n\n getFields() {\n if (typeof this._fields === 'function') {\n this._fields = this._fields();\n }\n\n return this._fields;\n }\n\n getInterfaces() {\n if (typeof this._interfaces === 'function') {\n this._interfaces = this._interfaces();\n }\n\n return this._interfaces;\n }\n\n toConfig() {\n return {\n name: this.name,\n description: this.description,\n interfaces: this.getInterfaces(),\n fields: fieldsToFieldsConfig(this.getFields()),\n isTypeOf: this.isTypeOf,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n toString() {\n return this.name;\n }\n\n toJSON() {\n return this.toString();\n }\n}\n\nexports.GraphQLObjectType = GraphQLObjectType;\n\nfunction defineInterfaces(config) {\n var _config$interfaces;\n\n const interfaces = resolveReadonlyArrayThunk(\n (_config$interfaces = config.interfaces) !== null &&\n _config$interfaces !== void 0\n ? _config$interfaces\n : [],\n );\n Array.isArray(interfaces) ||\n (0, _devAssert.devAssert)(\n false,\n `${config.name} interfaces must be an Array or a function which returns an Array.`,\n );\n return interfaces;\n}\n\nfunction defineFieldMap(config) {\n const fieldMap = resolveObjMapThunk(config.fields);\n isPlainObj(fieldMap) ||\n (0, _devAssert.devAssert)(\n false,\n `${config.name} fields must be an object with field names as keys or a function which returns such an object.`,\n );\n return (0, _mapValue.mapValue)(fieldMap, (fieldConfig, fieldName) => {\n var _fieldConfig$args;\n\n isPlainObj(fieldConfig) ||\n (0, _devAssert.devAssert)(\n false,\n `${config.name}.${fieldName} field config must be an object.`,\n );\n fieldConfig.resolve == null ||\n typeof fieldConfig.resolve === 'function' ||\n (0, _devAssert.devAssert)(\n false,\n `${config.name}.${fieldName} field resolver must be a function if ` +\n `provided, but got: ${(0, _inspect.inspect)(fieldConfig.resolve)}.`,\n );\n const argsConfig =\n (_fieldConfig$args = fieldConfig.args) !== null &&\n _fieldConfig$args !== void 0\n ? _fieldConfig$args\n : {};\n isPlainObj(argsConfig) ||\n (0, _devAssert.devAssert)(\n false,\n `${config.name}.${fieldName} args must be an object with argument names as keys.`,\n );\n return {\n name: (0, _assertName.assertName)(fieldName),\n description: fieldConfig.description,\n type: fieldConfig.type,\n args: defineArguments(argsConfig),\n resolve: fieldConfig.resolve,\n subscribe: fieldConfig.subscribe,\n deprecationReason: fieldConfig.deprecationReason,\n extensions: (0, _toObjMap.toObjMap)(fieldConfig.extensions),\n astNode: fieldConfig.astNode,\n };\n });\n}\n\nfunction defineArguments(config) {\n return Object.entries(config).map(([argName, argConfig]) => ({\n name: (0, _assertName.assertName)(argName),\n description: argConfig.description,\n type: argConfig.type,\n defaultValue: argConfig.defaultValue,\n deprecationReason: argConfig.deprecationReason,\n extensions: (0, _toObjMap.toObjMap)(argConfig.extensions),\n astNode: argConfig.astNode,\n }));\n}\n\nfunction isPlainObj(obj) {\n return (0, _isObjectLike.isObjectLike)(obj) && !Array.isArray(obj);\n}\n\nfunction fieldsToFieldsConfig(fields) {\n return (0, _mapValue.mapValue)(fields, (field) => ({\n description: field.description,\n type: field.type,\n args: argsToArgsConfig(field.args),\n resolve: field.resolve,\n subscribe: field.subscribe,\n deprecationReason: field.deprecationReason,\n extensions: field.extensions,\n astNode: field.astNode,\n }));\n}\n/**\n * @internal\n */\n\nfunction argsToArgsConfig(args) {\n return (0, _keyValMap.keyValMap)(\n args,\n (arg) => arg.name,\n (arg) => ({\n description: arg.description,\n type: arg.type,\n defaultValue: arg.defaultValue,\n deprecationReason: arg.deprecationReason,\n extensions: arg.extensions,\n astNode: arg.astNode,\n }),\n );\n}\n\nfunction isRequiredArgument(arg) {\n return isNonNullType(arg.type) && arg.defaultValue === undefined;\n}\n\n/**\n * Interface Type Definition\n *\n * When a field can return one of a heterogeneous set of types, a Interface type\n * is used to describe what types are possible, what fields are in common across\n * all types, as well as a function to determine which type is actually used\n * when the field is resolved.\n *\n * Example:\n *\n * ```ts\n * const EntityType = new GraphQLInterfaceType({\n * name: 'Entity',\n * fields: {\n * name: { type: GraphQLString }\n * }\n * });\n * ```\n */\nclass GraphQLInterfaceType {\n constructor(config) {\n var _config$extensionASTN3;\n\n this.name = (0, _assertName.assertName)(config.name);\n this.description = config.description;\n this.resolveType = config.resolveType;\n this.extensions = (0, _toObjMap.toObjMap)(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes =\n (_config$extensionASTN3 = config.extensionASTNodes) !== null &&\n _config$extensionASTN3 !== void 0\n ? _config$extensionASTN3\n : [];\n this._fields = defineFieldMap.bind(undefined, config);\n this._interfaces = defineInterfaces.bind(undefined, config);\n config.resolveType == null ||\n typeof config.resolveType === 'function' ||\n (0, _devAssert.devAssert)(\n false,\n `${this.name} must provide \"resolveType\" as a function, ` +\n `but got: ${(0, _inspect.inspect)(config.resolveType)}.`,\n );\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLInterfaceType';\n }\n\n getFields() {\n if (typeof this._fields === 'function') {\n this._fields = this._fields();\n }\n\n return this._fields;\n }\n\n getInterfaces() {\n if (typeof this._interfaces === 'function') {\n this._interfaces = this._interfaces();\n }\n\n return this._interfaces;\n }\n\n toConfig() {\n return {\n name: this.name,\n description: this.description,\n interfaces: this.getInterfaces(),\n fields: fieldsToFieldsConfig(this.getFields()),\n resolveType: this.resolveType,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n toString() {\n return this.name;\n }\n\n toJSON() {\n return this.toString();\n }\n}\n\nexports.GraphQLInterfaceType = GraphQLInterfaceType;\n\n/**\n * Union Type Definition\n *\n * When a field can return one of a heterogeneous set of types, a Union type\n * is used to describe what types are possible as well as providing a function\n * to determine which type is actually used when the field is resolved.\n *\n * Example:\n *\n * ```ts\n * const PetType = new GraphQLUnionType({\n * name: 'Pet',\n * types: [ DogType, CatType ],\n * resolveType(value) {\n * if (value instanceof Dog) {\n * return DogType;\n * }\n * if (value instanceof Cat) {\n * return CatType;\n * }\n * }\n * });\n * ```\n */\nclass GraphQLUnionType {\n constructor(config) {\n var _config$extensionASTN4;\n\n this.name = (0, _assertName.assertName)(config.name);\n this.description = config.description;\n this.resolveType = config.resolveType;\n this.extensions = (0, _toObjMap.toObjMap)(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes =\n (_config$extensionASTN4 = config.extensionASTNodes) !== null &&\n _config$extensionASTN4 !== void 0\n ? _config$extensionASTN4\n : [];\n this._types = defineTypes.bind(undefined, config);\n config.resolveType == null ||\n typeof config.resolveType === 'function' ||\n (0, _devAssert.devAssert)(\n false,\n `${this.name} must provide \"resolveType\" as a function, ` +\n `but got: ${(0, _inspect.inspect)(config.resolveType)}.`,\n );\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLUnionType';\n }\n\n getTypes() {\n if (typeof this._types === 'function') {\n this._types = this._types();\n }\n\n return this._types;\n }\n\n toConfig() {\n return {\n name: this.name,\n description: this.description,\n types: this.getTypes(),\n resolveType: this.resolveType,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n toString() {\n return this.name;\n }\n\n toJSON() {\n return this.toString();\n }\n}\n\nexports.GraphQLUnionType = GraphQLUnionType;\n\nfunction defineTypes(config) {\n const types = resolveReadonlyArrayThunk(config.types);\n Array.isArray(types) ||\n (0, _devAssert.devAssert)(\n false,\n `Must provide Array of types or a function which returns such an array for Union ${config.name}.`,\n );\n return types;\n}\n\n/**\n * Enum Type Definition\n *\n * Some leaf values of requests and input values are Enums. GraphQL serializes\n * Enum values as strings, however internally Enums can be represented by any\n * kind of type, often integers.\n *\n * Example:\n *\n * ```ts\n * const RGBType = new GraphQLEnumType({\n * name: 'RGB',\n * values: {\n * RED: { value: 0 },\n * GREEN: { value: 1 },\n * BLUE: { value: 2 }\n * }\n * });\n * ```\n *\n * Note: If a value is not provided in a definition, the name of the enum value\n * will be used as its internal value.\n */\nclass GraphQLEnumType {\n /* <T> */\n constructor(config) {\n var _config$extensionASTN5;\n\n this.name = (0, _assertName.assertName)(config.name);\n this.description = config.description;\n this.extensions = (0, _toObjMap.toObjMap)(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes =\n (_config$extensionASTN5 = config.extensionASTNodes) !== null &&\n _config$extensionASTN5 !== void 0\n ? _config$extensionASTN5\n : [];\n this._values =\n typeof config.values === 'function'\n ? config.values\n : defineEnumValues(this.name, config.values);\n this._valueLookup = null;\n this._nameLookup = null;\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLEnumType';\n }\n\n getValues() {\n if (typeof this._values === 'function') {\n this._values = defineEnumValues(this.name, this._values());\n }\n\n return this._values;\n }\n\n getValue(name) {\n if (this._nameLookup === null) {\n this._nameLookup = (0, _keyMap.keyMap)(\n this.getValues(),\n (value) => value.name,\n );\n }\n\n return this._nameLookup[name];\n }\n\n serialize(outputValue) {\n if (this._valueLookup === null) {\n this._valueLookup = new Map(\n this.getValues().map((enumValue) => [enumValue.value, enumValue]),\n );\n }\n\n const enumValue = this._valueLookup.get(outputValue);\n\n if (enumValue === undefined) {\n throw new _GraphQLError.GraphQLError(\n `Enum \"${this.name}\" cannot represent value: ${(0, _inspect.inspect)(\n outputValue,\n )}`,\n );\n }\n\n return enumValue.name;\n }\n\n parseValue(inputValue) /* T */\n {\n if (typeof inputValue !== 'string') {\n const valueStr = (0, _inspect.inspect)(inputValue);\n throw new _GraphQLError.GraphQLError(\n `Enum \"${this.name}\" cannot represent non-string value: ${valueStr}.` +\n didYouMeanEnumValue(this, valueStr),\n );\n }\n\n const enumValue = this.getValue(inputValue);\n\n if (enumValue == null) {\n throw new _GraphQLError.GraphQLError(\n `Value \"${inputValue}\" does not exist in \"${this.name}\" enum.` +\n didYouMeanEnumValue(this, inputValue),\n );\n }\n\n return enumValue.value;\n }\n\n parseLiteral(valueNode, _variables) /* T */\n {\n // Note: variables will be resolved to a value before calling this function.\n if (valueNode.kind !== _kinds.Kind.ENUM) {\n const valueStr = (0, _printer.print)(valueNode);\n throw new _GraphQLError.GraphQLError(\n `Enum \"${this.name}\" cannot represent non-enum value: ${valueStr}.` +\n didYouMeanEnumValue(this, valueStr),\n {\n nodes: valueNode,\n },\n );\n }\n\n const enumValue = this.getValue(valueNode.value);\n\n if (enumValue == null) {\n const valueStr = (0, _printer.print)(valueNode);\n throw new _GraphQLError.GraphQLError(\n `Value \"${valueStr}\" does not exist in \"${this.name}\" enum.` +\n didYouMeanEnumValue(this, valueStr),\n {\n nodes: valueNode,\n },\n );\n }\n\n return enumValue.value;\n }\n\n toConfig() {\n const values = (0, _keyValMap.keyValMap)(\n this.getValues(),\n (value) => value.name,\n (value) => ({\n description: value.description,\n value: value.value,\n deprecationReason: value.deprecationReason,\n extensions: value.extensions,\n astNode: value.astNode,\n }),\n );\n return {\n name: this.name,\n description: this.description,\n values,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n };\n }\n\n toString() {\n return this.name;\n }\n\n toJSON() {\n return this.toString();\n }\n}\n\nexports.GraphQLEnumType = GraphQLEnumType;\n\nfunction didYouMeanEnumValue(enumType, unknownValueStr) {\n const allNames = enumType.getValues().map((value) => value.name);\n const suggestedValues = (0, _suggestionList.suggestionList)(\n unknownValueStr,\n allNames,\n );\n return (0, _didYouMean.didYouMean)('the enum value', suggestedValues);\n}\n\nfunction defineEnumValues(typeName, valueMap) {\n isPlainObj(valueMap) ||\n (0, _devAssert.devAssert)(\n false,\n `${typeName} values must be an object with value names as keys.`,\n );\n return Object.entries(valueMap).map(([valueName, valueConfig]) => {\n isPlainObj(valueConfig) ||\n (0, _devAssert.devAssert)(\n false,\n `${typeName}.${valueName} must refer to an object with a \"value\" key ` +\n `representing an internal value but got: ${(0, _inspect.inspect)(\n valueConfig,\n )}.`,\n );\n return {\n name: (0, _assertName.assertEnumValueName)(valueName),\n description: valueConfig.description,\n value: valueConfig.value !== undefined ? valueConfig.value : valueName,\n deprecationReason: valueConfig.deprecationReason,\n extensions: (0, _toObjMap.toObjMap)(valueConfig.extensions),\n astNode: valueConfig.astNode,\n };\n });\n}\n\n/**\n * Input Object Type Definition\n *\n * An input object defines a structured collection of fields which may be\n * supplied to a field argument.\n *\n * Using `NonNull` will ensure that a value must be provided by the query\n *\n * Example:\n *\n * ```ts\n * const GeoPoint = new GraphQLInputObjectType({\n * name: 'GeoPoint',\n * fields: {\n * lat: { type: new GraphQLNonNull(GraphQLFloat) },\n * lon: { type: new GraphQLNonNull(GraphQLFloat) },\n * alt: { type: GraphQLFloat, defaultValue: 0 },\n * }\n * });\n * ```\n */\nclass GraphQLInputObjectType {\n constructor(config) {\n var _config$extensionASTN6, _config$isOneOf;\n\n this.name = (0, _assertName.assertName)(config.name);\n this.description = config.description;\n this.extensions = (0, _toObjMap.toObjMap)(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes =\n (_config$extensionASTN6 = config.extensionASTNodes) !== null &&\n _config$extensionASTN6 !== void 0\n ? _config$extensionASTN6\n : [];\n this.isOneOf =\n (_config$isOneOf = config.isOneOf) !== null && _config$isOneOf !== void 0\n ? _config$isOneOf\n : false;\n this._fields = defineInputFieldMap.bind(undefined, config);\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLInputObjectType';\n }\n\n getFields() {\n if (typeof this._fields === 'function') {\n this._fields = this._fields();\n }\n\n return this._fields;\n }\n\n toConfig() {\n const fields = (0, _mapValue.mapValue)(this.getFields(), (field) => ({\n description: field.description,\n type: field.type,\n defaultValue: field.defaultValue,\n deprecationReason: field.deprecationReason,\n extensions: field.extensions,\n astNode: field.astNode,\n }));\n return {\n name: this.name,\n description: this.description,\n fields,\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n isOneOf: this.isOneOf,\n };\n }\n\n toString() {\n return this.name;\n }\n\n toJSON() {\n return this.toString();\n }\n}\n\nexports.GraphQLInputObjectType = GraphQLInputObjectType;\n\nfunction defineInputFieldMap(config) {\n const fieldMap = resolveObjMapThunk(config.fields);\n isPlainObj(fieldMap) ||\n (0, _devAssert.devAssert)(\n false,\n `${config.name} fields must be an object with field names as keys or a function which returns such an object.`,\n );\n return (0, _mapValue.mapValue)(fieldMap, (fieldConfig, fieldName) => {\n !('resolve' in fieldConfig) ||\n (0, _devAssert.devAssert)(\n false,\n `${config.name}.${fieldName} field has a resolve property, but Input Types cannot define resolvers.`,\n );\n return {\n name: (0, _assertName.assertName)(fieldName),\n description: fieldConfig.description,\n type: fieldConfig.type,\n defaultValue: fieldConfig.defaultValue,\n deprecationReason: fieldConfig.deprecationReason,\n extensions: (0, _toObjMap.toObjMap)(fieldConfig.extensions),\n astNode: fieldConfig.astNode,\n };\n });\n}\n\nfunction isRequiredInputField(field) {\n return isNonNullType(field.type) && field.defaultValue === undefined;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.doTypesOverlap = doTypesOverlap;\nexports.isEqualType = isEqualType;\nexports.isTypeSubTypeOf = isTypeSubTypeOf;\n\nvar _definition = require('../type/definition.js');\n\n/**\n * Provided two types, return true if the types are equal (invariant).\n */\nfunction isEqualType(typeA, typeB) {\n // Equivalent types are equal.\n if (typeA === typeB) {\n return true;\n } // If either type is non-null, the other must also be non-null.\n\n if (\n (0, _definition.isNonNullType)(typeA) &&\n (0, _definition.isNonNullType)(typeB)\n ) {\n return isEqualType(typeA.ofType, typeB.ofType);\n } // If either type is a list, the other must also be a list.\n\n if (\n (0, _definition.isListType)(typeA) &&\n (0, _definition.isListType)(typeB)\n ) {\n return isEqualType(typeA.ofType, typeB.ofType);\n } // Otherwise the types are not equal.\n\n return false;\n}\n/**\n * Provided a type and a super type, return true if the first type is either\n * equal or a subset of the second super type (covariant).\n */\n\nfunction isTypeSubTypeOf(schema, maybeSubType, superType) {\n // Equivalent type is a valid subtype\n if (maybeSubType === superType) {\n return true;\n } // If superType is non-null, maybeSubType must also be non-null.\n\n if ((0, _definition.isNonNullType)(superType)) {\n if ((0, _definition.isNonNullType)(maybeSubType)) {\n return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType);\n }\n\n return false;\n }\n\n if ((0, _definition.isNonNullType)(maybeSubType)) {\n // If superType is nullable, maybeSubType may be non-null or nullable.\n return isTypeSubTypeOf(schema, maybeSubType.ofType, superType);\n } // If superType type is a list, maybeSubType type must also be a list.\n\n if ((0, _definition.isListType)(superType)) {\n if ((0, _definition.isListType)(maybeSubType)) {\n return isTypeSubTypeOf(schema, maybeSubType.ofType, superType.ofType);\n }\n\n return false;\n }\n\n if ((0, _definition.isListType)(maybeSubType)) {\n // If superType is not a list, maybeSubType must also be not a list.\n return false;\n } // If superType type is an abstract type, check if it is super type of maybeSubType.\n // Otherwise, the child type is not a valid subtype of the parent type.\n\n return (\n (0, _definition.isAbstractType)(superType) &&\n ((0, _definition.isInterfaceType)(maybeSubType) ||\n (0, _definition.isObjectType)(maybeSubType)) &&\n schema.isSubType(superType, maybeSubType)\n );\n}\n/**\n * Provided two composite types, determine if they \"overlap\". Two composite\n * types overlap when the Sets of possible concrete types for each intersect.\n *\n * This is often used to determine if a fragment of a given type could possibly\n * be visited in a context of another type.\n *\n * This function is commutative.\n */\n\nfunction doTypesOverlap(schema, typeA, typeB) {\n // Equivalent types overlap\n if (typeA === typeB) {\n return true;\n }\n\n if ((0, _definition.isAbstractType)(typeA)) {\n if ((0, _definition.isAbstractType)(typeB)) {\n // If both types are abstract, then determine if there is any intersection\n // between possible concrete types of each.\n return schema\n .getPossibleTypes(typeA)\n .some((type) => schema.isSubType(typeB, type));\n } // Determine if the latter type is a possible concrete type of the former.\n\n return schema.isSubType(typeA, typeB);\n }\n\n if ((0, _definition.isAbstractType)(typeB)) {\n // Determine if the former type is a possible concrete type of the latter.\n return schema.isSubType(typeB, typeA);\n } // Otherwise the types do not overlap.\n\n return false;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.GraphQLString =\n exports.GraphQLInt =\n exports.GraphQLID =\n exports.GraphQLFloat =\n exports.GraphQLBoolean =\n exports.GRAPHQL_MIN_INT =\n exports.GRAPHQL_MAX_INT =\n void 0;\nexports.isSpecifiedScalarType = isSpecifiedScalarType;\nexports.specifiedScalarTypes = void 0;\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _isObjectLike = require('../jsutils/isObjectLike.js');\n\nvar _GraphQLError = require('../error/GraphQLError.js');\n\nvar _kinds = require('../language/kinds.js');\n\nvar _printer = require('../language/printer.js');\n\nvar _definition = require('./definition.js');\n\n/**\n * Maximum possible Int value as per GraphQL Spec (32-bit signed integer).\n * n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe up-to 2^53 - 1\n * */\nconst GRAPHQL_MAX_INT = 2147483647;\n/**\n * Minimum possible Int value as per GraphQL Spec (32-bit signed integer).\n * n.b. This differs from JavaScript's numbers that are IEEE 754 doubles safe starting at -(2^53 - 1)\n * */\n\nexports.GRAPHQL_MAX_INT = GRAPHQL_MAX_INT;\nconst GRAPHQL_MIN_INT = -2147483648;\nexports.GRAPHQL_MIN_INT = GRAPHQL_MIN_INT;\nconst GraphQLInt = new _definition.GraphQLScalarType({\n name: 'Int',\n description:\n 'The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.',\n\n serialize(outputValue) {\n const coercedValue = serializeObject(outputValue);\n\n if (typeof coercedValue === 'boolean') {\n return coercedValue ? 1 : 0;\n }\n\n let num = coercedValue;\n\n if (typeof coercedValue === 'string' && coercedValue !== '') {\n num = Number(coercedValue);\n }\n\n if (typeof num !== 'number' || !Number.isInteger(num)) {\n throw new _GraphQLError.GraphQLError(\n `Int cannot represent non-integer value: ${(0, _inspect.inspect)(\n coercedValue,\n )}`,\n );\n }\n\n if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {\n throw new _GraphQLError.GraphQLError(\n 'Int cannot represent non 32-bit signed integer value: ' +\n (0, _inspect.inspect)(coercedValue),\n );\n }\n\n return num;\n },\n\n parseValue(inputValue) {\n if (typeof inputValue !== 'number' || !Number.isInteger(inputValue)) {\n throw new _GraphQLError.GraphQLError(\n `Int cannot represent non-integer value: ${(0, _inspect.inspect)(\n inputValue,\n )}`,\n );\n }\n\n if (inputValue > GRAPHQL_MAX_INT || inputValue < GRAPHQL_MIN_INT) {\n throw new _GraphQLError.GraphQLError(\n `Int cannot represent non 32-bit signed integer value: ${inputValue}`,\n );\n }\n\n return inputValue;\n },\n\n parseLiteral(valueNode) {\n if (valueNode.kind !== _kinds.Kind.INT) {\n throw new _GraphQLError.GraphQLError(\n `Int cannot represent non-integer value: ${(0, _printer.print)(\n valueNode,\n )}`,\n {\n nodes: valueNode,\n },\n );\n }\n\n const num = parseInt(valueNode.value, 10);\n\n if (num > GRAPHQL_MAX_INT || num < GRAPHQL_MIN_INT) {\n throw new _GraphQLError.GraphQLError(\n `Int cannot represent non 32-bit signed integer value: ${valueNode.value}`,\n {\n nodes: valueNode,\n },\n );\n }\n\n return num;\n },\n});\nexports.GraphQLInt = GraphQLInt;\nconst GraphQLFloat = new _definition.GraphQLScalarType({\n name: 'Float',\n description:\n 'The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).',\n\n serialize(outputValue) {\n const coercedValue = serializeObject(outputValue);\n\n if (typeof coercedValue === 'boolean') {\n return coercedValue ? 1 : 0;\n }\n\n let num = coercedValue;\n\n if (typeof coercedValue === 'string' && coercedValue !== '') {\n num = Number(coercedValue);\n }\n\n if (typeof num !== 'number' || !Number.isFinite(num)) {\n throw new _GraphQLError.GraphQLError(\n `Float cannot represent non numeric value: ${(0, _inspect.inspect)(\n coercedValue,\n )}`,\n );\n }\n\n return num;\n },\n\n parseValue(inputValue) {\n if (typeof inputValue !== 'number' || !Number.isFinite(inputValue)) {\n throw new _GraphQLError.GraphQLError(\n `Float cannot represent non numeric value: ${(0, _inspect.inspect)(\n inputValue,\n )}`,\n );\n }\n\n return inputValue;\n },\n\n parseLiteral(valueNode) {\n if (\n valueNode.kind !== _kinds.Kind.FLOAT &&\n valueNode.kind !== _kinds.Kind.INT\n ) {\n throw new _GraphQLError.GraphQLError(\n `Float cannot represent non numeric value: ${(0, _printer.print)(\n valueNode,\n )}`,\n valueNode,\n );\n }\n\n return parseFloat(valueNode.value);\n },\n});\nexports.GraphQLFloat = GraphQLFloat;\nconst GraphQLString = new _definition.GraphQLScalarType({\n name: 'String',\n description:\n 'The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.',\n\n serialize(outputValue) {\n const coercedValue = serializeObject(outputValue); // Serialize string, boolean and number values to a string, but do not\n // attempt to coerce object, function, symbol, or other types as strings.\n\n if (typeof coercedValue === 'string') {\n return coercedValue;\n }\n\n if (typeof coercedValue === 'boolean') {\n return coercedValue ? 'true' : 'false';\n }\n\n if (typeof coercedValue === 'number' && Number.isFinite(coercedValue)) {\n return coercedValue.toString();\n }\n\n throw new _GraphQLError.GraphQLError(\n `String cannot represent value: ${(0, _inspect.inspect)(outputValue)}`,\n );\n },\n\n parseValue(inputValue) {\n if (typeof inputValue !== 'string') {\n throw new _GraphQLError.GraphQLError(\n `String cannot represent a non string value: ${(0, _inspect.inspect)(\n inputValue,\n )}`,\n );\n }\n\n return inputValue;\n },\n\n parseLiteral(valueNode) {\n if (valueNode.kind !== _kinds.Kind.STRING) {\n throw new _GraphQLError.GraphQLError(\n `String cannot represent a non string value: ${(0, _printer.print)(\n valueNode,\n )}`,\n {\n nodes: valueNode,\n },\n );\n }\n\n return valueNode.value;\n },\n});\nexports.GraphQLString = GraphQLString;\nconst GraphQLBoolean = new _definition.GraphQLScalarType({\n name: 'Boolean',\n description: 'The `Boolean` scalar type represents `true` or `false`.',\n\n serialize(outputValue) {\n const coercedValue = serializeObject(outputValue);\n\n if (typeof coercedValue === 'boolean') {\n return coercedValue;\n }\n\n if (Number.isFinite(coercedValue)) {\n return coercedValue !== 0;\n }\n\n throw new _GraphQLError.GraphQLError(\n `Boolean cannot represent a non boolean value: ${(0, _inspect.inspect)(\n coercedValue,\n )}`,\n );\n },\n\n parseValue(inputValue) {\n if (typeof inputValue !== 'boolean') {\n throw new _GraphQLError.GraphQLError(\n `Boolean cannot represent a non boolean value: ${(0, _inspect.inspect)(\n inputValue,\n )}`,\n );\n }\n\n return inputValue;\n },\n\n parseLiteral(valueNode) {\n if (valueNode.kind !== _kinds.Kind.BOOLEAN) {\n throw new _GraphQLError.GraphQLError(\n `Boolean cannot represent a non boolean value: ${(0, _printer.print)(\n valueNode,\n )}`,\n {\n nodes: valueNode,\n },\n );\n }\n\n return valueNode.value;\n },\n});\nexports.GraphQLBoolean = GraphQLBoolean;\nconst GraphQLID = new _definition.GraphQLScalarType({\n name: 'ID',\n description:\n 'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"4\"`) or integer (such as `4`) input value will be accepted as an ID.',\n\n serialize(outputValue) {\n const coercedValue = serializeObject(outputValue);\n\n if (typeof coercedValue === 'string') {\n return coercedValue;\n }\n\n if (Number.isInteger(coercedValue)) {\n return String(coercedValue);\n }\n\n throw new _GraphQLError.GraphQLError(\n `ID cannot represent value: ${(0, _inspect.inspect)(outputValue)}`,\n );\n },\n\n parseValue(inputValue) {\n if (typeof inputValue === 'string') {\n return inputValue;\n }\n\n if (typeof inputValue === 'number' && Number.isInteger(inputValue)) {\n return inputValue.toString();\n }\n\n throw new _GraphQLError.GraphQLError(\n `ID cannot represent value: ${(0, _inspect.inspect)(inputValue)}`,\n );\n },\n\n parseLiteral(valueNode) {\n if (\n valueNode.kind !== _kinds.Kind.STRING &&\n valueNode.kind !== _kinds.Kind.INT\n ) {\n throw new _GraphQLError.GraphQLError(\n 'ID cannot represent a non-string and non-integer value: ' +\n (0, _printer.print)(valueNode),\n {\n nodes: valueNode,\n },\n );\n }\n\n return valueNode.value;\n },\n});\nexports.GraphQLID = GraphQLID;\nconst specifiedScalarTypes = Object.freeze([\n GraphQLString,\n GraphQLInt,\n GraphQLFloat,\n GraphQLBoolean,\n GraphQLID,\n]);\nexports.specifiedScalarTypes = specifiedScalarTypes;\n\nfunction isSpecifiedScalarType(type) {\n return specifiedScalarTypes.some(({ name }) => type.name === name);\n} // Support serializing objects with custom valueOf() or toJSON() functions -\n// a common way to represent a complex value which can be represented as\n// a string (ex: MongoDB id objects).\n\nfunction serializeObject(outputValue) {\n if ((0, _isObjectLike.isObjectLike)(outputValue)) {\n if (typeof outputValue.valueOf === 'function') {\n const valueOfResult = outputValue.valueOf();\n\n if (!(0, _isObjectLike.isObjectLike)(valueOfResult)) {\n return valueOfResult;\n }\n }\n\n if (typeof outputValue.toJSON === 'function') {\n return outputValue.toJSON();\n }\n }\n\n return outputValue;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.GraphQLSpecifiedByDirective =\n exports.GraphQLSkipDirective =\n exports.GraphQLOneOfDirective =\n exports.GraphQLIncludeDirective =\n exports.GraphQLDirective =\n exports.GraphQLDeprecatedDirective =\n exports.DEFAULT_DEPRECATION_REASON =\n void 0;\nexports.assertDirective = assertDirective;\nexports.isDirective = isDirective;\nexports.isSpecifiedDirective = isSpecifiedDirective;\nexports.specifiedDirectives = void 0;\n\nvar _devAssert = require('../jsutils/devAssert.js');\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _instanceOf = require('../jsutils/instanceOf.js');\n\nvar _isObjectLike = require('../jsutils/isObjectLike.js');\n\nvar _toObjMap = require('../jsutils/toObjMap.js');\n\nvar _directiveLocation = require('../language/directiveLocation.js');\n\nvar _assertName = require('./assertName.js');\n\nvar _definition = require('./definition.js');\n\nvar _scalars = require('./scalars.js');\n\n/**\n * Test if the given value is a GraphQL directive.\n */\nfunction isDirective(directive) {\n return (0, _instanceOf.instanceOf)(directive, GraphQLDirective);\n}\n\nfunction assertDirective(directive) {\n if (!isDirective(directive)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(directive)} to be a GraphQL directive.`,\n );\n }\n\n return directive;\n}\n/**\n * Custom extensions\n *\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n */\n\n/**\n * Directives are used by the GraphQL runtime as a way of modifying execution\n * behavior. Type system creators will usually not create these directly.\n */\nclass GraphQLDirective {\n constructor(config) {\n var _config$isRepeatable, _config$args;\n\n this.name = (0, _assertName.assertName)(config.name);\n this.description = config.description;\n this.locations = config.locations;\n this.isRepeatable =\n (_config$isRepeatable = config.isRepeatable) !== null &&\n _config$isRepeatable !== void 0\n ? _config$isRepeatable\n : false;\n this.extensions = (0, _toObjMap.toObjMap)(config.extensions);\n this.astNode = config.astNode;\n Array.isArray(config.locations) ||\n (0, _devAssert.devAssert)(\n false,\n `@${config.name} locations must be an Array.`,\n );\n const args =\n (_config$args = config.args) !== null && _config$args !== void 0\n ? _config$args\n : {};\n ((0, _isObjectLike.isObjectLike)(args) && !Array.isArray(args)) ||\n (0, _devAssert.devAssert)(\n false,\n `@${config.name} args must be an object with argument names as keys.`,\n );\n this.args = (0, _definition.defineArguments)(args);\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLDirective';\n }\n\n toConfig() {\n return {\n name: this.name,\n description: this.description,\n locations: this.locations,\n args: (0, _definition.argsToArgsConfig)(this.args),\n isRepeatable: this.isRepeatable,\n extensions: this.extensions,\n astNode: this.astNode,\n };\n }\n\n toString() {\n return '@' + this.name;\n }\n\n toJSON() {\n return this.toString();\n }\n}\n\nexports.GraphQLDirective = GraphQLDirective;\n\n/**\n * Used to conditionally include fields or fragments.\n */\nconst GraphQLIncludeDirective = new GraphQLDirective({\n name: 'include',\n description:\n 'Directs the executor to include this field or fragment only when the `if` argument is true.',\n locations: [\n _directiveLocation.DirectiveLocation.FIELD,\n _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD,\n _directiveLocation.DirectiveLocation.INLINE_FRAGMENT,\n ],\n args: {\n if: {\n type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),\n description: 'Included when true.',\n },\n },\n});\n/**\n * Used to conditionally skip (exclude) fields or fragments.\n */\n\nexports.GraphQLIncludeDirective = GraphQLIncludeDirective;\nconst GraphQLSkipDirective = new GraphQLDirective({\n name: 'skip',\n description:\n 'Directs the executor to skip this field or fragment when the `if` argument is true.',\n locations: [\n _directiveLocation.DirectiveLocation.FIELD,\n _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD,\n _directiveLocation.DirectiveLocation.INLINE_FRAGMENT,\n ],\n args: {\n if: {\n type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),\n description: 'Skipped when true.',\n },\n },\n});\n/**\n * Constant string used for default reason for a deprecation.\n */\n\nexports.GraphQLSkipDirective = GraphQLSkipDirective;\nconst DEFAULT_DEPRECATION_REASON = 'No longer supported';\n/**\n * Used to declare element of a GraphQL schema as deprecated.\n */\n\nexports.DEFAULT_DEPRECATION_REASON = DEFAULT_DEPRECATION_REASON;\nconst GraphQLDeprecatedDirective = new GraphQLDirective({\n name: 'deprecated',\n description: 'Marks an element of a GraphQL schema as no longer supported.',\n locations: [\n _directiveLocation.DirectiveLocation.FIELD_DEFINITION,\n _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION,\n _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION,\n _directiveLocation.DirectiveLocation.ENUM_VALUE,\n ],\n args: {\n reason: {\n type: _scalars.GraphQLString,\n description:\n 'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).',\n defaultValue: DEFAULT_DEPRECATION_REASON,\n },\n },\n});\n/**\n * Used to provide a URL for specifying the behavior of custom scalar definitions.\n */\n\nexports.GraphQLDeprecatedDirective = GraphQLDeprecatedDirective;\nconst GraphQLSpecifiedByDirective = new GraphQLDirective({\n name: 'specifiedBy',\n description: 'Exposes a URL that specifies the behavior of this scalar.',\n locations: [_directiveLocation.DirectiveLocation.SCALAR],\n args: {\n url: {\n type: new _definition.GraphQLNonNull(_scalars.GraphQLString),\n description: 'The URL that specifies the behavior of this scalar.',\n },\n },\n});\n/**\n * Used to indicate an Input Object is a OneOf Input Object.\n */\n\nexports.GraphQLSpecifiedByDirective = GraphQLSpecifiedByDirective;\nconst GraphQLOneOfDirective = new GraphQLDirective({\n name: 'oneOf',\n description:\n 'Indicates exactly one field must be supplied and this field must not be `null`.',\n locations: [_directiveLocation.DirectiveLocation.INPUT_OBJECT],\n args: {},\n});\n/**\n * The full list of specified directives.\n */\n\nexports.GraphQLOneOfDirective = GraphQLOneOfDirective;\nconst specifiedDirectives = Object.freeze([\n GraphQLIncludeDirective,\n GraphQLSkipDirective,\n GraphQLDeprecatedDirective,\n GraphQLSpecifiedByDirective,\n GraphQLOneOfDirective,\n]);\nexports.specifiedDirectives = specifiedDirectives;\n\nfunction isSpecifiedDirective(directive) {\n return specifiedDirectives.some(({ name }) => name === directive.name);\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.isIterableObject = isIterableObject;\n\n/**\n * Returns true if the provided object is an Object (i.e. not a string literal)\n * and implements the Iterator protocol.\n *\n * This may be used in place of [Array.isArray()][isArray] to determine if\n * an object should be iterated-over e.g. Array, Map, Set, Int8Array,\n * TypedArray, etc. but excludes string literals.\n *\n * @example\n * ```ts\n * isIterableObject([ 1, 2, 3 ]) // true\n * isIterableObject(new Map()) // true\n * isIterableObject('ABC') // false\n * isIterableObject({ key: 'value' }) // false\n * isIterableObject({ length: 1, 0: 'Alpha' }) // false\n * ```\n */\nfunction isIterableObject(maybeIterable) {\n return (\n typeof maybeIterable === 'object' &&\n typeof (maybeIterable === null || maybeIterable === void 0\n ? void 0\n : maybeIterable[Symbol.iterator]) === 'function'\n );\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.astFromValue = astFromValue;\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _invariant = require('../jsutils/invariant.js');\n\nvar _isIterableObject = require('../jsutils/isIterableObject.js');\n\nvar _isObjectLike = require('../jsutils/isObjectLike.js');\n\nvar _kinds = require('../language/kinds.js');\n\nvar _definition = require('../type/definition.js');\n\nvar _scalars = require('../type/scalars.js');\n\n/**\n * Produces a GraphQL Value AST given a JavaScript object.\n * Function will match JavaScript/JSON values to GraphQL AST schema format\n * by using suggested GraphQLInputType. For example:\n *\n * astFromValue(\"value\", GraphQLString)\n *\n * A GraphQL type must be provided, which will be used to interpret different\n * JavaScript values.\n *\n * | JSON Value | GraphQL Value |\n * | ------------- | -------------------- |\n * | Object | Input Object |\n * | Array | List |\n * | Boolean | Boolean |\n * | String | String / Enum Value |\n * | Number | Int / Float |\n * | Unknown | Enum Value |\n * | null | NullValue |\n *\n */\nfunction astFromValue(value, type) {\n if ((0, _definition.isNonNullType)(type)) {\n const astValue = astFromValue(value, type.ofType);\n\n if (\n (astValue === null || astValue === void 0 ? void 0 : astValue.kind) ===\n _kinds.Kind.NULL\n ) {\n return null;\n }\n\n return astValue;\n } // only explicit null, not undefined, NaN\n\n if (value === null) {\n return {\n kind: _kinds.Kind.NULL,\n };\n } // undefined\n\n if (value === undefined) {\n return null;\n } // Convert JavaScript array to GraphQL list. If the GraphQLType is a list, but\n // the value is not an array, convert the value using the list's item type.\n\n if ((0, _definition.isListType)(type)) {\n const itemType = type.ofType;\n\n if ((0, _isIterableObject.isIterableObject)(value)) {\n const valuesNodes = [];\n\n for (const item of value) {\n const itemNode = astFromValue(item, itemType);\n\n if (itemNode != null) {\n valuesNodes.push(itemNode);\n }\n }\n\n return {\n kind: _kinds.Kind.LIST,\n values: valuesNodes,\n };\n }\n\n return astFromValue(value, itemType);\n } // Populate the fields of the input object by creating ASTs from each value\n // in the JavaScript object according to the fields in the input type.\n\n if ((0, _definition.isInputObjectType)(type)) {\n if (!(0, _isObjectLike.isObjectLike)(value)) {\n return null;\n }\n\n const fieldNodes = [];\n\n for (const field of Object.values(type.getFields())) {\n const fieldValue = astFromValue(value[field.name], field.type);\n\n if (fieldValue) {\n fieldNodes.push({\n kind: _kinds.Kind.OBJECT_FIELD,\n name: {\n kind: _kinds.Kind.NAME,\n value: field.name,\n },\n value: fieldValue,\n });\n }\n }\n\n return {\n kind: _kinds.Kind.OBJECT,\n fields: fieldNodes,\n };\n }\n\n if ((0, _definition.isLeafType)(type)) {\n // Since value is an internally represented value, it must be serialized\n // to an externally represented value before converting into an AST.\n const serialized = type.serialize(value);\n\n if (serialized == null) {\n return null;\n } // Others serialize based on their corresponding JavaScript scalar types.\n\n if (typeof serialized === 'boolean') {\n return {\n kind: _kinds.Kind.BOOLEAN,\n value: serialized,\n };\n } // JavaScript numbers can be Int or Float values.\n\n if (typeof serialized === 'number' && Number.isFinite(serialized)) {\n const stringNum = String(serialized);\n return integerStringRegExp.test(stringNum)\n ? {\n kind: _kinds.Kind.INT,\n value: stringNum,\n }\n : {\n kind: _kinds.Kind.FLOAT,\n value: stringNum,\n };\n }\n\n if (typeof serialized === 'string') {\n // Enum types use Enum literals.\n if ((0, _definition.isEnumType)(type)) {\n return {\n kind: _kinds.Kind.ENUM,\n value: serialized,\n };\n } // ID types can use Int literals.\n\n if (type === _scalars.GraphQLID && integerStringRegExp.test(serialized)) {\n return {\n kind: _kinds.Kind.INT,\n value: serialized,\n };\n }\n\n return {\n kind: _kinds.Kind.STRING,\n value: serialized,\n };\n }\n\n throw new TypeError(\n `Cannot convert value to AST: ${(0, _inspect.inspect)(serialized)}.`,\n );\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible types have been considered.\n\n false ||\n (0, _invariant.invariant)(\n false,\n 'Unexpected input type: ' + (0, _inspect.inspect)(type),\n );\n}\n/**\n * IntValue:\n * - NegativeSign? 0\n * - NegativeSign? NonZeroDigit ( Digit+ )?\n */\n\nconst integerStringRegExp = /^-?(?:0|[1-9][0-9]*)$/;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.introspectionTypes =\n exports.__TypeKind =\n exports.__Type =\n exports.__Schema =\n exports.__InputValue =\n exports.__Field =\n exports.__EnumValue =\n exports.__DirectiveLocation =\n exports.__Directive =\n exports.TypeNameMetaFieldDef =\n exports.TypeMetaFieldDef =\n exports.TypeKind =\n exports.SchemaMetaFieldDef =\n void 0;\nexports.isIntrospectionType = isIntrospectionType;\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _invariant = require('../jsutils/invariant.js');\n\nvar _directiveLocation = require('../language/directiveLocation.js');\n\nvar _printer = require('../language/printer.js');\n\nvar _astFromValue = require('../utilities/astFromValue.js');\n\nvar _definition = require('./definition.js');\n\nvar _scalars = require('./scalars.js');\n\nconst __Schema = new _definition.GraphQLObjectType({\n name: '__Schema',\n description:\n 'A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.',\n fields: () => ({\n description: {\n type: _scalars.GraphQLString,\n resolve: (schema) => schema.description,\n },\n types: {\n description: 'A list of all types supported by this server.',\n type: new _definition.GraphQLNonNull(\n new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)),\n ),\n\n resolve(schema) {\n return Object.values(schema.getTypeMap());\n },\n },\n queryType: {\n description: 'The type that query operations will be rooted at.',\n type: new _definition.GraphQLNonNull(__Type),\n resolve: (schema) => schema.getQueryType(),\n },\n mutationType: {\n description:\n 'If this server supports mutation, the type that mutation operations will be rooted at.',\n type: __Type,\n resolve: (schema) => schema.getMutationType(),\n },\n subscriptionType: {\n description:\n 'If this server support subscription, the type that subscription operations will be rooted at.',\n type: __Type,\n resolve: (schema) => schema.getSubscriptionType(),\n },\n directives: {\n description: 'A list of all directives supported by this server.',\n type: new _definition.GraphQLNonNull(\n new _definition.GraphQLList(\n new _definition.GraphQLNonNull(__Directive),\n ),\n ),\n resolve: (schema) => schema.getDirectives(),\n },\n }),\n});\n\nexports.__Schema = __Schema;\n\nconst __Directive = new _definition.GraphQLObjectType({\n name: '__Directive',\n description:\n \"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\\n\\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.\",\n fields: () => ({\n name: {\n type: new _definition.GraphQLNonNull(_scalars.GraphQLString),\n resolve: (directive) => directive.name,\n },\n description: {\n type: _scalars.GraphQLString,\n resolve: (directive) => directive.description,\n },\n isRepeatable: {\n type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),\n resolve: (directive) => directive.isRepeatable,\n },\n locations: {\n type: new _definition.GraphQLNonNull(\n new _definition.GraphQLList(\n new _definition.GraphQLNonNull(__DirectiveLocation),\n ),\n ),\n resolve: (directive) => directive.locations,\n },\n args: {\n type: new _definition.GraphQLNonNull(\n new _definition.GraphQLList(\n new _definition.GraphQLNonNull(__InputValue),\n ),\n ),\n args: {\n includeDeprecated: {\n type: _scalars.GraphQLBoolean,\n defaultValue: false,\n },\n },\n\n resolve(field, { includeDeprecated }) {\n return includeDeprecated\n ? field.args\n : field.args.filter((arg) => arg.deprecationReason == null);\n },\n },\n }),\n});\n\nexports.__Directive = __Directive;\n\nconst __DirectiveLocation = new _definition.GraphQLEnumType({\n name: '__DirectiveLocation',\n description:\n 'A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.',\n values: {\n QUERY: {\n value: _directiveLocation.DirectiveLocation.QUERY,\n description: 'Location adjacent to a query operation.',\n },\n MUTATION: {\n value: _directiveLocation.DirectiveLocation.MUTATION,\n description: 'Location adjacent to a mutation operation.',\n },\n SUBSCRIPTION: {\n value: _directiveLocation.DirectiveLocation.SUBSCRIPTION,\n description: 'Location adjacent to a subscription operation.',\n },\n FIELD: {\n value: _directiveLocation.DirectiveLocation.FIELD,\n description: 'Location adjacent to a field.',\n },\n FRAGMENT_DEFINITION: {\n value: _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION,\n description: 'Location adjacent to a fragment definition.',\n },\n FRAGMENT_SPREAD: {\n value: _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD,\n description: 'Location adjacent to a fragment spread.',\n },\n INLINE_FRAGMENT: {\n value: _directiveLocation.DirectiveLocation.INLINE_FRAGMENT,\n description: 'Location adjacent to an inline fragment.',\n },\n VARIABLE_DEFINITION: {\n value: _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION,\n description: 'Location adjacent to a variable definition.',\n },\n SCHEMA: {\n value: _directiveLocation.DirectiveLocation.SCHEMA,\n description: 'Location adjacent to a schema definition.',\n },\n SCALAR: {\n value: _directiveLocation.DirectiveLocation.SCALAR,\n description: 'Location adjacent to a scalar definition.',\n },\n OBJECT: {\n value: _directiveLocation.DirectiveLocation.OBJECT,\n description: 'Location adjacent to an object type definition.',\n },\n FIELD_DEFINITION: {\n value: _directiveLocation.DirectiveLocation.FIELD_DEFINITION,\n description: 'Location adjacent to a field definition.',\n },\n ARGUMENT_DEFINITION: {\n value: _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION,\n description: 'Location adjacent to an argument definition.',\n },\n INTERFACE: {\n value: _directiveLocation.DirectiveLocation.INTERFACE,\n description: 'Location adjacent to an interface definition.',\n },\n UNION: {\n value: _directiveLocation.DirectiveLocation.UNION,\n description: 'Location adjacent to a union definition.',\n },\n ENUM: {\n value: _directiveLocation.DirectiveLocation.ENUM,\n description: 'Location adjacent to an enum definition.',\n },\n ENUM_VALUE: {\n value: _directiveLocation.DirectiveLocation.ENUM_VALUE,\n description: 'Location adjacent to an enum value definition.',\n },\n INPUT_OBJECT: {\n value: _directiveLocation.DirectiveLocation.INPUT_OBJECT,\n description: 'Location adjacent to an input object type definition.',\n },\n INPUT_FIELD_DEFINITION: {\n value: _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION,\n description: 'Location adjacent to an input object field definition.',\n },\n },\n});\n\nexports.__DirectiveLocation = __DirectiveLocation;\n\nconst __Type = new _definition.GraphQLObjectType({\n name: '__Type',\n description:\n 'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\\n\\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.',\n fields: () => ({\n kind: {\n type: new _definition.GraphQLNonNull(__TypeKind),\n\n resolve(type) {\n if ((0, _definition.isScalarType)(type)) {\n return TypeKind.SCALAR;\n }\n\n if ((0, _definition.isObjectType)(type)) {\n return TypeKind.OBJECT;\n }\n\n if ((0, _definition.isInterfaceType)(type)) {\n return TypeKind.INTERFACE;\n }\n\n if ((0, _definition.isUnionType)(type)) {\n return TypeKind.UNION;\n }\n\n if ((0, _definition.isEnumType)(type)) {\n return TypeKind.ENUM;\n }\n\n if ((0, _definition.isInputObjectType)(type)) {\n return TypeKind.INPUT_OBJECT;\n }\n\n if ((0, _definition.isListType)(type)) {\n return TypeKind.LIST;\n }\n\n if ((0, _definition.isNonNullType)(type)) {\n return TypeKind.NON_NULL;\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible types have been considered)\n\n false ||\n (0, _invariant.invariant)(\n false,\n `Unexpected type: \"${(0, _inspect.inspect)(type)}\".`,\n );\n },\n },\n name: {\n type: _scalars.GraphQLString,\n resolve: (type) => ('name' in type ? type.name : undefined),\n },\n description: {\n type: _scalars.GraphQLString,\n resolve: (\n type, // FIXME: add test case\n ) =>\n /* c8 ignore next */\n 'description' in type ? type.description : undefined,\n },\n specifiedByURL: {\n type: _scalars.GraphQLString,\n resolve: (obj) =>\n 'specifiedByURL' in obj ? obj.specifiedByURL : undefined,\n },\n fields: {\n type: new _definition.GraphQLList(\n new _definition.GraphQLNonNull(__Field),\n ),\n args: {\n includeDeprecated: {\n type: _scalars.GraphQLBoolean,\n defaultValue: false,\n },\n },\n\n resolve(type, { includeDeprecated }) {\n if (\n (0, _definition.isObjectType)(type) ||\n (0, _definition.isInterfaceType)(type)\n ) {\n const fields = Object.values(type.getFields());\n return includeDeprecated\n ? fields\n : fields.filter((field) => field.deprecationReason == null);\n }\n },\n },\n interfaces: {\n type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)),\n\n resolve(type) {\n if (\n (0, _definition.isObjectType)(type) ||\n (0, _definition.isInterfaceType)(type)\n ) {\n return type.getInterfaces();\n }\n },\n },\n possibleTypes: {\n type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)),\n\n resolve(type, _args, _context, { schema }) {\n if ((0, _definition.isAbstractType)(type)) {\n return schema.getPossibleTypes(type);\n }\n },\n },\n enumValues: {\n type: new _definition.GraphQLList(\n new _definition.GraphQLNonNull(__EnumValue),\n ),\n args: {\n includeDeprecated: {\n type: _scalars.GraphQLBoolean,\n defaultValue: false,\n },\n },\n\n resolve(type, { includeDeprecated }) {\n if ((0, _definition.isEnumType)(type)) {\n const values = type.getValues();\n return includeDeprecated\n ? values\n : values.filter((field) => field.deprecationReason == null);\n }\n },\n },\n inputFields: {\n type: new _definition.GraphQLList(\n new _definition.GraphQLNonNull(__InputValue),\n ),\n args: {\n includeDeprecated: {\n type: _scalars.GraphQLBoolean,\n defaultValue: false,\n },\n },\n\n resolve(type, { includeDeprecated }) {\n if ((0, _definition.isInputObjectType)(type)) {\n const values = Object.values(type.getFields());\n return includeDeprecated\n ? values\n : values.filter((field) => field.deprecationReason == null);\n }\n },\n },\n ofType: {\n type: __Type,\n resolve: (type) => ('ofType' in type ? type.ofType : undefined),\n },\n isOneOf: {\n type: _scalars.GraphQLBoolean,\n resolve: (type) => {\n if ((0, _definition.isInputObjectType)(type)) {\n return type.isOneOf;\n }\n },\n },\n }),\n});\n\nexports.__Type = __Type;\n\nconst __Field = new _definition.GraphQLObjectType({\n name: '__Field',\n description:\n 'Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.',\n fields: () => ({\n name: {\n type: new _definition.GraphQLNonNull(_scalars.GraphQLString),\n resolve: (field) => field.name,\n },\n description: {\n type: _scalars.GraphQLString,\n resolve: (field) => field.description,\n },\n args: {\n type: new _definition.GraphQLNonNull(\n new _definition.GraphQLList(\n new _definition.GraphQLNonNull(__InputValue),\n ),\n ),\n args: {\n includeDeprecated: {\n type: _scalars.GraphQLBoolean,\n defaultValue: false,\n },\n },\n\n resolve(field, { includeDeprecated }) {\n return includeDeprecated\n ? field.args\n : field.args.filter((arg) => arg.deprecationReason == null);\n },\n },\n type: {\n type: new _definition.GraphQLNonNull(__Type),\n resolve: (field) => field.type,\n },\n isDeprecated: {\n type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),\n resolve: (field) => field.deprecationReason != null,\n },\n deprecationReason: {\n type: _scalars.GraphQLString,\n resolve: (field) => field.deprecationReason,\n },\n }),\n});\n\nexports.__Field = __Field;\n\nconst __InputValue = new _definition.GraphQLObjectType({\n name: '__InputValue',\n description:\n 'Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.',\n fields: () => ({\n name: {\n type: new _definition.GraphQLNonNull(_scalars.GraphQLString),\n resolve: (inputValue) => inputValue.name,\n },\n description: {\n type: _scalars.GraphQLString,\n resolve: (inputValue) => inputValue.description,\n },\n type: {\n type: new _definition.GraphQLNonNull(__Type),\n resolve: (inputValue) => inputValue.type,\n },\n defaultValue: {\n type: _scalars.GraphQLString,\n description:\n 'A GraphQL-formatted string representing the default value for this input value.',\n\n resolve(inputValue) {\n const { type, defaultValue } = inputValue;\n const valueAST = (0, _astFromValue.astFromValue)(defaultValue, type);\n return valueAST ? (0, _printer.print)(valueAST) : null;\n },\n },\n isDeprecated: {\n type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),\n resolve: (field) => field.deprecationReason != null,\n },\n deprecationReason: {\n type: _scalars.GraphQLString,\n resolve: (obj) => obj.deprecationReason,\n },\n }),\n});\n\nexports.__InputValue = __InputValue;\n\nconst __EnumValue = new _definition.GraphQLObjectType({\n name: '__EnumValue',\n description:\n 'One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.',\n fields: () => ({\n name: {\n type: new _definition.GraphQLNonNull(_scalars.GraphQLString),\n resolve: (enumValue) => enumValue.name,\n },\n description: {\n type: _scalars.GraphQLString,\n resolve: (enumValue) => enumValue.description,\n },\n isDeprecated: {\n type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),\n resolve: (enumValue) => enumValue.deprecationReason != null,\n },\n deprecationReason: {\n type: _scalars.GraphQLString,\n resolve: (enumValue) => enumValue.deprecationReason,\n },\n }),\n});\n\nexports.__EnumValue = __EnumValue;\nvar TypeKind;\nexports.TypeKind = TypeKind;\n\n(function (TypeKind) {\n TypeKind['SCALAR'] = 'SCALAR';\n TypeKind['OBJECT'] = 'OBJECT';\n TypeKind['INTERFACE'] = 'INTERFACE';\n TypeKind['UNION'] = 'UNION';\n TypeKind['ENUM'] = 'ENUM';\n TypeKind['INPUT_OBJECT'] = 'INPUT_OBJECT';\n TypeKind['LIST'] = 'LIST';\n TypeKind['NON_NULL'] = 'NON_NULL';\n})(TypeKind || (exports.TypeKind = TypeKind = {}));\n\nconst __TypeKind = new _definition.GraphQLEnumType({\n name: '__TypeKind',\n description: 'An enum describing what kind of type a given `__Type` is.',\n values: {\n SCALAR: {\n value: TypeKind.SCALAR,\n description: 'Indicates this type is a scalar.',\n },\n OBJECT: {\n value: TypeKind.OBJECT,\n description:\n 'Indicates this type is an object. `fields` and `interfaces` are valid fields.',\n },\n INTERFACE: {\n value: TypeKind.INTERFACE,\n description:\n 'Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.',\n },\n UNION: {\n value: TypeKind.UNION,\n description:\n 'Indicates this type is a union. `possibleTypes` is a valid field.',\n },\n ENUM: {\n value: TypeKind.ENUM,\n description:\n 'Indicates this type is an enum. `enumValues` is a valid field.',\n },\n INPUT_OBJECT: {\n value: TypeKind.INPUT_OBJECT,\n description:\n 'Indicates this type is an input object. `inputFields` is a valid field.',\n },\n LIST: {\n value: TypeKind.LIST,\n description: 'Indicates this type is a list. `ofType` is a valid field.',\n },\n NON_NULL: {\n value: TypeKind.NON_NULL,\n description:\n 'Indicates this type is a non-null. `ofType` is a valid field.',\n },\n },\n});\n/**\n * Note that these are GraphQLField and not GraphQLFieldConfig,\n * so the format for args is different.\n */\n\nexports.__TypeKind = __TypeKind;\nconst SchemaMetaFieldDef = {\n name: '__schema',\n type: new _definition.GraphQLNonNull(__Schema),\n description: 'Access the current type schema of this server.',\n args: [],\n resolve: (_source, _args, _context, { schema }) => schema,\n deprecationReason: undefined,\n extensions: Object.create(null),\n astNode: undefined,\n};\nexports.SchemaMetaFieldDef = SchemaMetaFieldDef;\nconst TypeMetaFieldDef = {\n name: '__type',\n type: __Type,\n description: 'Request the type information of a single type.',\n args: [\n {\n name: 'name',\n description: undefined,\n type: new _definition.GraphQLNonNull(_scalars.GraphQLString),\n defaultValue: undefined,\n deprecationReason: undefined,\n extensions: Object.create(null),\n astNode: undefined,\n },\n ],\n resolve: (_source, { name }, _context, { schema }) => schema.getType(name),\n deprecationReason: undefined,\n extensions: Object.create(null),\n astNode: undefined,\n};\nexports.TypeMetaFieldDef = TypeMetaFieldDef;\nconst TypeNameMetaFieldDef = {\n name: '__typename',\n type: new _definition.GraphQLNonNull(_scalars.GraphQLString),\n description: 'The name of the current Object type at runtime.',\n args: [],\n resolve: (_source, _args, _context, { parentType }) => parentType.name,\n deprecationReason: undefined,\n extensions: Object.create(null),\n astNode: undefined,\n};\nexports.TypeNameMetaFieldDef = TypeNameMetaFieldDef;\nconst introspectionTypes = Object.freeze([\n __Schema,\n __Directive,\n __DirectiveLocation,\n __Type,\n __Field,\n __InputValue,\n __EnumValue,\n __TypeKind,\n]);\nexports.introspectionTypes = introspectionTypes;\n\nfunction isIntrospectionType(type) {\n return introspectionTypes.some(({ name }) => type.name === name);\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.GraphQLSchema = void 0;\nexports.assertSchema = assertSchema;\nexports.isSchema = isSchema;\n\nvar _devAssert = require('../jsutils/devAssert.js');\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _instanceOf = require('../jsutils/instanceOf.js');\n\nvar _isObjectLike = require('../jsutils/isObjectLike.js');\n\nvar _toObjMap = require('../jsutils/toObjMap.js');\n\nvar _ast = require('../language/ast.js');\n\nvar _definition = require('./definition.js');\n\nvar _directives = require('./directives.js');\n\nvar _introspection = require('./introspection.js');\n\n/**\n * Test if the given value is a GraphQL schema.\n */\nfunction isSchema(schema) {\n return (0, _instanceOf.instanceOf)(schema, GraphQLSchema);\n}\n\nfunction assertSchema(schema) {\n if (!isSchema(schema)) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(schema)} to be a GraphQL schema.`,\n );\n }\n\n return schema;\n}\n/**\n * Custom extensions\n *\n * @remarks\n * Use a unique identifier name for your extension, for example the name of\n * your library or project. Do not use a shortened identifier as this increases\n * the risk of conflicts. We recommend you add at most one extension field,\n * an object which can contain all the values you need.\n */\n\n/**\n * Schema Definition\n *\n * A Schema is created by supplying the root types of each type of operation,\n * query and mutation (optional). A schema definition is then supplied to the\n * validator and executor.\n *\n * Example:\n *\n * ```ts\n * const MyAppSchema = new GraphQLSchema({\n * query: MyAppQueryRootType,\n * mutation: MyAppMutationRootType,\n * })\n * ```\n *\n * Note: When the schema is constructed, by default only the types that are\n * reachable by traversing the root types are included, other types must be\n * explicitly referenced.\n *\n * Example:\n *\n * ```ts\n * const characterInterface = new GraphQLInterfaceType({\n * name: 'Character',\n * ...\n * });\n *\n * const humanType = new GraphQLObjectType({\n * name: 'Human',\n * interfaces: [characterInterface],\n * ...\n * });\n *\n * const droidType = new GraphQLObjectType({\n * name: 'Droid',\n * interfaces: [characterInterface],\n * ...\n * });\n *\n * const schema = new GraphQLSchema({\n * query: new GraphQLObjectType({\n * name: 'Query',\n * fields: {\n * hero: { type: characterInterface, ... },\n * }\n * }),\n * ...\n * // Since this schema references only the `Character` interface it's\n * // necessary to explicitly list the types that implement it if\n * // you want them to be included in the final schema.\n * types: [humanType, droidType],\n * })\n * ```\n *\n * Note: If an array of `directives` are provided to GraphQLSchema, that will be\n * the exact list of directives represented and allowed. If `directives` is not\n * provided then a default set of the specified directives (e.g. `@include` and\n * `@skip`) will be used. If you wish to provide *additional* directives to these\n * specified directives, you must explicitly declare them. Example:\n *\n * ```ts\n * const MyAppSchema = new GraphQLSchema({\n * ...\n * directives: specifiedDirectives.concat([ myCustomDirective ]),\n * })\n * ```\n */\nclass GraphQLSchema {\n // Used as a cache for validateSchema().\n constructor(config) {\n var _config$extensionASTN, _config$directives;\n\n // If this schema was built from a source known to be valid, then it may be\n // marked with assumeValid to avoid an additional type system validation.\n this.__validationErrors = config.assumeValid === true ? [] : undefined; // Check for common mistakes during construction to produce early errors.\n\n (0, _isObjectLike.isObjectLike)(config) ||\n (0, _devAssert.devAssert)(false, 'Must provide configuration object.');\n !config.types ||\n Array.isArray(config.types) ||\n (0, _devAssert.devAssert)(\n false,\n `\"types\" must be Array if provided but got: ${(0, _inspect.inspect)(\n config.types,\n )}.`,\n );\n !config.directives ||\n Array.isArray(config.directives) ||\n (0, _devAssert.devAssert)(\n false,\n '\"directives\" must be Array if provided but got: ' +\n `${(0, _inspect.inspect)(config.directives)}.`,\n );\n this.description = config.description;\n this.extensions = (0, _toObjMap.toObjMap)(config.extensions);\n this.astNode = config.astNode;\n this.extensionASTNodes =\n (_config$extensionASTN = config.extensionASTNodes) !== null &&\n _config$extensionASTN !== void 0\n ? _config$extensionASTN\n : [];\n this._queryType = config.query;\n this._mutationType = config.mutation;\n this._subscriptionType = config.subscription; // Provide specified directives (e.g. @include and @skip) by default.\n\n this._directives =\n (_config$directives = config.directives) !== null &&\n _config$directives !== void 0\n ? _config$directives\n : _directives.specifiedDirectives; // To preserve order of user-provided types, we add first to add them to\n // the set of \"collected\" types, so `collectReferencedTypes` ignore them.\n\n const allReferencedTypes = new Set(config.types);\n\n if (config.types != null) {\n for (const type of config.types) {\n // When we ready to process this type, we remove it from \"collected\" types\n // and then add it together with all dependent types in the correct position.\n allReferencedTypes.delete(type);\n collectReferencedTypes(type, allReferencedTypes);\n }\n }\n\n if (this._queryType != null) {\n collectReferencedTypes(this._queryType, allReferencedTypes);\n }\n\n if (this._mutationType != null) {\n collectReferencedTypes(this._mutationType, allReferencedTypes);\n }\n\n if (this._subscriptionType != null) {\n collectReferencedTypes(this._subscriptionType, allReferencedTypes);\n }\n\n for (const directive of this._directives) {\n // Directives are not validated until validateSchema() is called.\n if ((0, _directives.isDirective)(directive)) {\n for (const arg of directive.args) {\n collectReferencedTypes(arg.type, allReferencedTypes);\n }\n }\n }\n\n collectReferencedTypes(_introspection.__Schema, allReferencedTypes); // Storing the resulting map for reference by the schema.\n\n this._typeMap = Object.create(null);\n this._subTypeMap = Object.create(null); // Keep track of all implementations by interface name.\n\n this._implementationsMap = Object.create(null);\n\n for (const namedType of allReferencedTypes) {\n if (namedType == null) {\n continue;\n }\n\n const typeName = namedType.name;\n typeName ||\n (0, _devAssert.devAssert)(\n false,\n 'One of the provided types for building the Schema is missing a name.',\n );\n\n if (this._typeMap[typeName] !== undefined) {\n throw new Error(\n `Schema must contain uniquely named types but contains multiple types named \"${typeName}\".`,\n );\n }\n\n this._typeMap[typeName] = namedType;\n\n if ((0, _definition.isInterfaceType)(namedType)) {\n // Store implementations by interface.\n for (const iface of namedType.getInterfaces()) {\n if ((0, _definition.isInterfaceType)(iface)) {\n let implementations = this._implementationsMap[iface.name];\n\n if (implementations === undefined) {\n implementations = this._implementationsMap[iface.name] = {\n objects: [],\n interfaces: [],\n };\n }\n\n implementations.interfaces.push(namedType);\n }\n }\n } else if ((0, _definition.isObjectType)(namedType)) {\n // Store implementations by objects.\n for (const iface of namedType.getInterfaces()) {\n if ((0, _definition.isInterfaceType)(iface)) {\n let implementations = this._implementationsMap[iface.name];\n\n if (implementations === undefined) {\n implementations = this._implementationsMap[iface.name] = {\n objects: [],\n interfaces: [],\n };\n }\n\n implementations.objects.push(namedType);\n }\n }\n }\n }\n }\n\n get [Symbol.toStringTag]() {\n return 'GraphQLSchema';\n }\n\n getQueryType() {\n return this._queryType;\n }\n\n getMutationType() {\n return this._mutationType;\n }\n\n getSubscriptionType() {\n return this._subscriptionType;\n }\n\n getRootType(operation) {\n switch (operation) {\n case _ast.OperationTypeNode.QUERY:\n return this.getQueryType();\n\n case _ast.OperationTypeNode.MUTATION:\n return this.getMutationType();\n\n case _ast.OperationTypeNode.SUBSCRIPTION:\n return this.getSubscriptionType();\n }\n }\n\n getTypeMap() {\n return this._typeMap;\n }\n\n getType(name) {\n return this.getTypeMap()[name];\n }\n\n getPossibleTypes(abstractType) {\n return (0, _definition.isUnionType)(abstractType)\n ? abstractType.getTypes()\n : this.getImplementations(abstractType).objects;\n }\n\n getImplementations(interfaceType) {\n const implementations = this._implementationsMap[interfaceType.name];\n return implementations !== null && implementations !== void 0\n ? implementations\n : {\n objects: [],\n interfaces: [],\n };\n }\n\n isSubType(abstractType, maybeSubType) {\n let map = this._subTypeMap[abstractType.name];\n\n if (map === undefined) {\n map = Object.create(null);\n\n if ((0, _definition.isUnionType)(abstractType)) {\n for (const type of abstractType.getTypes()) {\n map[type.name] = true;\n }\n } else {\n const implementations = this.getImplementations(abstractType);\n\n for (const type of implementations.objects) {\n map[type.name] = true;\n }\n\n for (const type of implementations.interfaces) {\n map[type.name] = true;\n }\n }\n\n this._subTypeMap[abstractType.name] = map;\n }\n\n return map[maybeSubType.name] !== undefined;\n }\n\n getDirectives() {\n return this._directives;\n }\n\n getDirective(name) {\n return this.getDirectives().find((directive) => directive.name === name);\n }\n\n toConfig() {\n return {\n description: this.description,\n query: this.getQueryType(),\n mutation: this.getMutationType(),\n subscription: this.getSubscriptionType(),\n types: Object.values(this.getTypeMap()),\n directives: this.getDirectives(),\n extensions: this.extensions,\n astNode: this.astNode,\n extensionASTNodes: this.extensionASTNodes,\n assumeValid: this.__validationErrors !== undefined,\n };\n }\n}\n\nexports.GraphQLSchema = GraphQLSchema;\n\nfunction collectReferencedTypes(type, typeSet) {\n const namedType = (0, _definition.getNamedType)(type);\n\n if (!typeSet.has(namedType)) {\n typeSet.add(namedType);\n\n if ((0, _definition.isUnionType)(namedType)) {\n for (const memberType of namedType.getTypes()) {\n collectReferencedTypes(memberType, typeSet);\n }\n } else if (\n (0, _definition.isObjectType)(namedType) ||\n (0, _definition.isInterfaceType)(namedType)\n ) {\n for (const interfaceType of namedType.getInterfaces()) {\n collectReferencedTypes(interfaceType, typeSet);\n }\n\n for (const field of Object.values(namedType.getFields())) {\n collectReferencedTypes(field.type, typeSet);\n\n for (const arg of field.args) {\n collectReferencedTypes(arg.type, typeSet);\n }\n }\n } else if ((0, _definition.isInputObjectType)(namedType)) {\n for (const field of Object.values(namedType.getFields())) {\n collectReferencedTypes(field.type, typeSet);\n }\n }\n }\n\n return typeSet;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.assertValidSchema = assertValidSchema;\nexports.validateSchema = validateSchema;\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _GraphQLError = require('../error/GraphQLError.js');\n\nvar _ast = require('../language/ast.js');\n\nvar _typeComparators = require('../utilities/typeComparators.js');\n\nvar _definition = require('./definition.js');\n\nvar _directives = require('./directives.js');\n\nvar _introspection = require('./introspection.js');\n\nvar _schema = require('./schema.js');\n\n/**\n * Implements the \"Type Validation\" sub-sections of the specification's\n * \"Type System\" section.\n *\n * Validation runs synchronously, returning an array of encountered errors, or\n * an empty array if no errors were encountered and the Schema is valid.\n */\nfunction validateSchema(schema) {\n // First check to ensure the provided value is in fact a GraphQLSchema.\n (0, _schema.assertSchema)(schema); // If this Schema has already been validated, return the previous results.\n\n if (schema.__validationErrors) {\n return schema.__validationErrors;\n } // Validate the schema, producing a list of errors.\n\n const context = new SchemaValidationContext(schema);\n validateRootTypes(context);\n validateDirectives(context);\n validateTypes(context); // Persist the results of validation before returning to ensure validation\n // does not run multiple times for this schema.\n\n const errors = context.getErrors();\n schema.__validationErrors = errors;\n return errors;\n}\n/**\n * Utility function which asserts a schema is valid by throwing an error if\n * it is invalid.\n */\n\nfunction assertValidSchema(schema) {\n const errors = validateSchema(schema);\n\n if (errors.length !== 0) {\n throw new Error(errors.map((error) => error.message).join('\\n\\n'));\n }\n}\n\nclass SchemaValidationContext {\n constructor(schema) {\n this._errors = [];\n this.schema = schema;\n }\n\n reportError(message, nodes) {\n const _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes;\n\n this._errors.push(\n new _GraphQLError.GraphQLError(message, {\n nodes: _nodes,\n }),\n );\n }\n\n getErrors() {\n return this._errors;\n }\n}\n\nfunction validateRootTypes(context) {\n const schema = context.schema;\n const queryType = schema.getQueryType();\n\n if (!queryType) {\n context.reportError('Query root type must be provided.', schema.astNode);\n } else if (!(0, _definition.isObjectType)(queryType)) {\n var _getOperationTypeNode;\n\n context.reportError(\n `Query root type must be Object type, it cannot be ${(0,\n _inspect.inspect)(queryType)}.`,\n (_getOperationTypeNode = getOperationTypeNode(\n schema,\n _ast.OperationTypeNode.QUERY,\n )) !== null && _getOperationTypeNode !== void 0\n ? _getOperationTypeNode\n : queryType.astNode,\n );\n }\n\n const mutationType = schema.getMutationType();\n\n if (mutationType && !(0, _definition.isObjectType)(mutationType)) {\n var _getOperationTypeNode2;\n\n context.reportError(\n 'Mutation root type must be Object type if provided, it cannot be ' +\n `${(0, _inspect.inspect)(mutationType)}.`,\n (_getOperationTypeNode2 = getOperationTypeNode(\n schema,\n _ast.OperationTypeNode.MUTATION,\n )) !== null && _getOperationTypeNode2 !== void 0\n ? _getOperationTypeNode2\n : mutationType.astNode,\n );\n }\n\n const subscriptionType = schema.getSubscriptionType();\n\n if (subscriptionType && !(0, _definition.isObjectType)(subscriptionType)) {\n var _getOperationTypeNode3;\n\n context.reportError(\n 'Subscription root type must be Object type if provided, it cannot be ' +\n `${(0, _inspect.inspect)(subscriptionType)}.`,\n (_getOperationTypeNode3 = getOperationTypeNode(\n schema,\n _ast.OperationTypeNode.SUBSCRIPTION,\n )) !== null && _getOperationTypeNode3 !== void 0\n ? _getOperationTypeNode3\n : subscriptionType.astNode,\n );\n }\n}\n\nfunction getOperationTypeNode(schema, operation) {\n var _flatMap$find;\n\n return (_flatMap$find = [schema.astNode, ...schema.extensionASTNodes]\n .flatMap(\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n (schemaNode) => {\n var _schemaNode$operation;\n\n return (\n /* c8 ignore next */\n (_schemaNode$operation =\n schemaNode === null || schemaNode === void 0\n ? void 0\n : schemaNode.operationTypes) !== null &&\n _schemaNode$operation !== void 0\n ? _schemaNode$operation\n : []\n );\n },\n )\n .find((operationNode) => operationNode.operation === operation)) === null ||\n _flatMap$find === void 0\n ? void 0\n : _flatMap$find.type;\n}\n\nfunction validateDirectives(context) {\n for (const directive of context.schema.getDirectives()) {\n // Ensure all directives are in fact GraphQL directives.\n if (!(0, _directives.isDirective)(directive)) {\n context.reportError(\n `Expected directive but got: ${(0, _inspect.inspect)(directive)}.`,\n directive === null || directive === void 0 ? void 0 : directive.astNode,\n );\n continue;\n } // Ensure they are named correctly.\n\n validateName(context, directive);\n\n if (directive.locations.length === 0) {\n context.reportError(\n `Directive @${directive.name} must include 1 or more locations.`,\n directive.astNode,\n );\n } // Ensure the arguments are valid.\n\n for (const arg of directive.args) {\n // Ensure they are named correctly.\n validateName(context, arg); // Ensure the type is an input type.\n\n if (!(0, _definition.isInputType)(arg.type)) {\n context.reportError(\n `The type of @${directive.name}(${arg.name}:) must be Input Type ` +\n `but got: ${(0, _inspect.inspect)(arg.type)}.`,\n arg.astNode,\n );\n }\n\n if (\n (0, _definition.isRequiredArgument)(arg) &&\n arg.deprecationReason != null\n ) {\n var _arg$astNode;\n\n context.reportError(\n `Required argument @${directive.name}(${arg.name}:) cannot be deprecated.`,\n [\n getDeprecatedDirectiveNode(arg.astNode),\n (_arg$astNode = arg.astNode) === null || _arg$astNode === void 0\n ? void 0\n : _arg$astNode.type,\n ],\n );\n }\n }\n }\n}\n\nfunction validateName(context, node) {\n // Ensure names are valid, however introspection types opt out.\n if (node.name.startsWith('__')) {\n context.reportError(\n `Name \"${node.name}\" must not begin with \"__\", which is reserved by GraphQL introspection.`,\n node.astNode,\n );\n }\n}\n\nfunction validateTypes(context) {\n const validateInputObjectCircularRefs =\n createInputObjectCircularRefsValidator(context);\n const typeMap = context.schema.getTypeMap();\n\n for (const type of Object.values(typeMap)) {\n // Ensure all provided types are in fact GraphQL type.\n if (!(0, _definition.isNamedType)(type)) {\n context.reportError(\n `Expected GraphQL named type but got: ${(0, _inspect.inspect)(type)}.`,\n type.astNode,\n );\n continue;\n } // Ensure it is named correctly (excluding introspection types).\n\n if (!(0, _introspection.isIntrospectionType)(type)) {\n validateName(context, type);\n }\n\n if ((0, _definition.isObjectType)(type)) {\n // Ensure fields are valid\n validateFields(context, type); // Ensure objects implement the interfaces they claim to.\n\n validateInterfaces(context, type);\n } else if ((0, _definition.isInterfaceType)(type)) {\n // Ensure fields are valid.\n validateFields(context, type); // Ensure interfaces implement the interfaces they claim to.\n\n validateInterfaces(context, type);\n } else if ((0, _definition.isUnionType)(type)) {\n // Ensure Unions include valid member types.\n validateUnionMembers(context, type);\n } else if ((0, _definition.isEnumType)(type)) {\n // Ensure Enums have valid values.\n validateEnumValues(context, type);\n } else if ((0, _definition.isInputObjectType)(type)) {\n // Ensure Input Object fields are valid.\n validateInputFields(context, type); // Ensure Input Objects do not contain non-nullable circular references\n\n validateInputObjectCircularRefs(type);\n }\n }\n}\n\nfunction validateFields(context, type) {\n const fields = Object.values(type.getFields()); // Objects and Interfaces both must define one or more fields.\n\n if (fields.length === 0) {\n context.reportError(`Type ${type.name} must define one or more fields.`, [\n type.astNode,\n ...type.extensionASTNodes,\n ]);\n }\n\n for (const field of fields) {\n // Ensure they are named correctly.\n validateName(context, field); // Ensure the type is an output type\n\n if (!(0, _definition.isOutputType)(field.type)) {\n var _field$astNode;\n\n context.reportError(\n `The type of ${type.name}.${field.name} must be Output Type ` +\n `but got: ${(0, _inspect.inspect)(field.type)}.`,\n (_field$astNode = field.astNode) === null || _field$astNode === void 0\n ? void 0\n : _field$astNode.type,\n );\n } // Ensure the arguments are valid\n\n for (const arg of field.args) {\n const argName = arg.name; // Ensure they are named correctly.\n\n validateName(context, arg); // Ensure the type is an input type\n\n if (!(0, _definition.isInputType)(arg.type)) {\n var _arg$astNode2;\n\n context.reportError(\n `The type of ${type.name}.${field.name}(${argName}:) must be Input ` +\n `Type but got: ${(0, _inspect.inspect)(arg.type)}.`,\n (_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0\n ? void 0\n : _arg$astNode2.type,\n );\n }\n\n if (\n (0, _definition.isRequiredArgument)(arg) &&\n arg.deprecationReason != null\n ) {\n var _arg$astNode3;\n\n context.reportError(\n `Required argument ${type.name}.${field.name}(${argName}:) cannot be deprecated.`,\n [\n getDeprecatedDirectiveNode(arg.astNode),\n (_arg$astNode3 = arg.astNode) === null || _arg$astNode3 === void 0\n ? void 0\n : _arg$astNode3.type,\n ],\n );\n }\n }\n }\n}\n\nfunction validateInterfaces(context, type) {\n const ifaceTypeNames = Object.create(null);\n\n for (const iface of type.getInterfaces()) {\n if (!(0, _definition.isInterfaceType)(iface)) {\n context.reportError(\n `Type ${(0, _inspect.inspect)(\n type,\n )} must only implement Interface types, ` +\n `it cannot implement ${(0, _inspect.inspect)(iface)}.`,\n getAllImplementsInterfaceNodes(type, iface),\n );\n continue;\n }\n\n if (type === iface) {\n context.reportError(\n `Type ${type.name} cannot implement itself because it would create a circular reference.`,\n getAllImplementsInterfaceNodes(type, iface),\n );\n continue;\n }\n\n if (ifaceTypeNames[iface.name]) {\n context.reportError(\n `Type ${type.name} can only implement ${iface.name} once.`,\n getAllImplementsInterfaceNodes(type, iface),\n );\n continue;\n }\n\n ifaceTypeNames[iface.name] = true;\n validateTypeImplementsAncestors(context, type, iface);\n validateTypeImplementsInterface(context, type, iface);\n }\n}\n\nfunction validateTypeImplementsInterface(context, type, iface) {\n const typeFieldMap = type.getFields(); // Assert each interface field is implemented.\n\n for (const ifaceField of Object.values(iface.getFields())) {\n const fieldName = ifaceField.name;\n const typeField = typeFieldMap[fieldName]; // Assert interface field exists on type.\n\n if (!typeField) {\n context.reportError(\n `Interface field ${iface.name}.${fieldName} expected but ${type.name} does not provide it.`,\n [ifaceField.astNode, type.astNode, ...type.extensionASTNodes],\n );\n continue;\n } // Assert interface field type is satisfied by type field type, by being\n // a valid subtype. (covariant)\n\n if (\n !(0, _typeComparators.isTypeSubTypeOf)(\n context.schema,\n typeField.type,\n ifaceField.type,\n )\n ) {\n var _ifaceField$astNode, _typeField$astNode;\n\n context.reportError(\n `Interface field ${iface.name}.${fieldName} expects type ` +\n `${(0, _inspect.inspect)(ifaceField.type)} but ${\n type.name\n }.${fieldName} ` +\n `is type ${(0, _inspect.inspect)(typeField.type)}.`,\n [\n (_ifaceField$astNode = ifaceField.astNode) === null ||\n _ifaceField$astNode === void 0\n ? void 0\n : _ifaceField$astNode.type,\n (_typeField$astNode = typeField.astNode) === null ||\n _typeField$astNode === void 0\n ? void 0\n : _typeField$astNode.type,\n ],\n );\n } // Assert each interface field arg is implemented.\n\n for (const ifaceArg of ifaceField.args) {\n const argName = ifaceArg.name;\n const typeArg = typeField.args.find((arg) => arg.name === argName); // Assert interface field arg exists on object field.\n\n if (!typeArg) {\n context.reportError(\n `Interface field argument ${iface.name}.${fieldName}(${argName}:) expected but ${type.name}.${fieldName} does not provide it.`,\n [ifaceArg.astNode, typeField.astNode],\n );\n continue;\n } // Assert interface field arg type matches object field arg type.\n // (invariant)\n // TODO: change to contravariant?\n\n if (!(0, _typeComparators.isEqualType)(ifaceArg.type, typeArg.type)) {\n var _ifaceArg$astNode, _typeArg$astNode;\n\n context.reportError(\n `Interface field argument ${iface.name}.${fieldName}(${argName}:) ` +\n `expects type ${(0, _inspect.inspect)(ifaceArg.type)} but ` +\n `${type.name}.${fieldName}(${argName}:) is type ` +\n `${(0, _inspect.inspect)(typeArg.type)}.`,\n [\n (_ifaceArg$astNode = ifaceArg.astNode) === null ||\n _ifaceArg$astNode === void 0\n ? void 0\n : _ifaceArg$astNode.type,\n (_typeArg$astNode = typeArg.astNode) === null ||\n _typeArg$astNode === void 0\n ? void 0\n : _typeArg$astNode.type,\n ],\n );\n } // TODO: validate default values?\n } // Assert additional arguments must not be required.\n\n for (const typeArg of typeField.args) {\n const argName = typeArg.name;\n const ifaceArg = ifaceField.args.find((arg) => arg.name === argName);\n\n if (!ifaceArg && (0, _definition.isRequiredArgument)(typeArg)) {\n context.reportError(\n `Object field ${type.name}.${fieldName} includes required argument ${argName} that is missing from the Interface field ${iface.name}.${fieldName}.`,\n [typeArg.astNode, ifaceField.astNode],\n );\n }\n }\n }\n}\n\nfunction validateTypeImplementsAncestors(context, type, iface) {\n const ifaceInterfaces = type.getInterfaces();\n\n for (const transitive of iface.getInterfaces()) {\n if (!ifaceInterfaces.includes(transitive)) {\n context.reportError(\n transitive === type\n ? `Type ${type.name} cannot implement ${iface.name} because it would create a circular reference.`\n : `Type ${type.name} must implement ${transitive.name} because it is implemented by ${iface.name}.`,\n [\n ...getAllImplementsInterfaceNodes(iface, transitive),\n ...getAllImplementsInterfaceNodes(type, iface),\n ],\n );\n }\n }\n}\n\nfunction validateUnionMembers(context, union) {\n const memberTypes = union.getTypes();\n\n if (memberTypes.length === 0) {\n context.reportError(\n `Union type ${union.name} must define one or more member types.`,\n [union.astNode, ...union.extensionASTNodes],\n );\n }\n\n const includedTypeNames = Object.create(null);\n\n for (const memberType of memberTypes) {\n if (includedTypeNames[memberType.name]) {\n context.reportError(\n `Union type ${union.name} can only include type ${memberType.name} once.`,\n getUnionMemberTypeNodes(union, memberType.name),\n );\n continue;\n }\n\n includedTypeNames[memberType.name] = true;\n\n if (!(0, _definition.isObjectType)(memberType)) {\n context.reportError(\n `Union type ${union.name} can only include Object types, ` +\n `it cannot include ${(0, _inspect.inspect)(memberType)}.`,\n getUnionMemberTypeNodes(union, String(memberType)),\n );\n }\n }\n}\n\nfunction validateEnumValues(context, enumType) {\n const enumValues = enumType.getValues();\n\n if (enumValues.length === 0) {\n context.reportError(\n `Enum type ${enumType.name} must define one or more values.`,\n [enumType.astNode, ...enumType.extensionASTNodes],\n );\n }\n\n for (const enumValue of enumValues) {\n // Ensure valid name.\n validateName(context, enumValue);\n }\n}\n\nfunction validateInputFields(context, inputObj) {\n const fields = Object.values(inputObj.getFields());\n\n if (fields.length === 0) {\n context.reportError(\n `Input Object type ${inputObj.name} must define one or more fields.`,\n [inputObj.astNode, ...inputObj.extensionASTNodes],\n );\n } // Ensure the arguments are valid\n\n for (const field of fields) {\n // Ensure they are named correctly.\n validateName(context, field); // Ensure the type is an input type\n\n if (!(0, _definition.isInputType)(field.type)) {\n var _field$astNode2;\n\n context.reportError(\n `The type of ${inputObj.name}.${field.name} must be Input Type ` +\n `but got: ${(0, _inspect.inspect)(field.type)}.`,\n (_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0\n ? void 0\n : _field$astNode2.type,\n );\n }\n\n if (\n (0, _definition.isRequiredInputField)(field) &&\n field.deprecationReason != null\n ) {\n var _field$astNode3;\n\n context.reportError(\n `Required input field ${inputObj.name}.${field.name} cannot be deprecated.`,\n [\n getDeprecatedDirectiveNode(field.astNode),\n (_field$astNode3 = field.astNode) === null ||\n _field$astNode3 === void 0\n ? void 0\n : _field$astNode3.type,\n ],\n );\n }\n\n if (inputObj.isOneOf) {\n validateOneOfInputObjectField(inputObj, field, context);\n }\n }\n}\n\nfunction validateOneOfInputObjectField(type, field, context) {\n if ((0, _definition.isNonNullType)(field.type)) {\n var _field$astNode4;\n\n context.reportError(\n `OneOf input field ${type.name}.${field.name} must be nullable.`,\n (_field$astNode4 = field.astNode) === null || _field$astNode4 === void 0\n ? void 0\n : _field$astNode4.type,\n );\n }\n\n if (field.defaultValue !== undefined) {\n context.reportError(\n `OneOf input field ${type.name}.${field.name} cannot have a default value.`,\n field.astNode,\n );\n }\n}\n\nfunction createInputObjectCircularRefsValidator(context) {\n // Modified copy of algorithm from 'src/validation/rules/NoFragmentCycles.js'.\n // Tracks already visited types to maintain O(N) and to ensure that cycles\n // are not redundantly reported.\n const visitedTypes = Object.create(null); // Array of types nodes used to produce meaningful errors\n\n const fieldPath = []; // Position in the type path\n\n const fieldPathIndexByTypeName = Object.create(null);\n return detectCycleRecursive; // This does a straight-forward DFS to find cycles.\n // It does not terminate when a cycle was found but continues to explore\n // the graph to find all possible cycles.\n\n function detectCycleRecursive(inputObj) {\n if (visitedTypes[inputObj.name]) {\n return;\n }\n\n visitedTypes[inputObj.name] = true;\n fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;\n const fields = Object.values(inputObj.getFields());\n\n for (const field of fields) {\n if (\n (0, _definition.isNonNullType)(field.type) &&\n (0, _definition.isInputObjectType)(field.type.ofType)\n ) {\n const fieldType = field.type.ofType;\n const cycleIndex = fieldPathIndexByTypeName[fieldType.name];\n fieldPath.push(field);\n\n if (cycleIndex === undefined) {\n detectCycleRecursive(fieldType);\n } else {\n const cyclePath = fieldPath.slice(cycleIndex);\n const pathStr = cyclePath.map((fieldObj) => fieldObj.name).join('.');\n context.reportError(\n `Cannot reference Input Object \"${fieldType.name}\" within itself through a series of non-null fields: \"${pathStr}\".`,\n cyclePath.map((fieldObj) => fieldObj.astNode),\n );\n }\n\n fieldPath.pop();\n }\n }\n\n fieldPathIndexByTypeName[inputObj.name] = undefined;\n }\n}\n\nfunction getAllImplementsInterfaceNodes(type, iface) {\n const { astNode, extensionASTNodes } = type;\n const nodes =\n astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n return nodes\n .flatMap((typeNode) => {\n var _typeNode$interfaces;\n\n return (\n /* c8 ignore next */\n (_typeNode$interfaces = typeNode.interfaces) !== null &&\n _typeNode$interfaces !== void 0\n ? _typeNode$interfaces\n : []\n );\n })\n .filter((ifaceNode) => ifaceNode.name.value === iface.name);\n}\n\nfunction getUnionMemberTypeNodes(union, typeName) {\n const { astNode, extensionASTNodes } = union;\n const nodes =\n astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n return nodes\n .flatMap((unionNode) => {\n var _unionNode$types;\n\n return (\n /* c8 ignore next */\n (_unionNode$types = unionNode.types) !== null &&\n _unionNode$types !== void 0\n ? _unionNode$types\n : []\n );\n })\n .filter((typeNode) => typeNode.name.value === typeName);\n}\n\nfunction getDeprecatedDirectiveNode(definitionNode) {\n var _definitionNode$direc;\n\n return definitionNode === null || definitionNode === void 0\n ? void 0\n : (_definitionNode$direc = definitionNode.directives) === null ||\n _definitionNode$direc === void 0\n ? void 0\n : _definitionNode$direc.find(\n (node) =>\n node.name.value === _directives.GraphQLDeprecatedDirective.name,\n );\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.typeFromAST = typeFromAST;\n\nvar _kinds = require('../language/kinds.js');\n\nvar _definition = require('../type/definition.js');\n\nfunction typeFromAST(schema, typeNode) {\n switch (typeNode.kind) {\n case _kinds.Kind.LIST_TYPE: {\n const innerType = typeFromAST(schema, typeNode.type);\n return innerType && new _definition.GraphQLList(innerType);\n }\n\n case _kinds.Kind.NON_NULL_TYPE: {\n const innerType = typeFromAST(schema, typeNode.type);\n return innerType && new _definition.GraphQLNonNull(innerType);\n }\n\n case _kinds.Kind.NAMED_TYPE:\n return schema.getType(typeNode.name.value);\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.TypeInfo = void 0;\nexports.visitWithTypeInfo = visitWithTypeInfo;\n\nvar _ast = require('../language/ast.js');\n\nvar _kinds = require('../language/kinds.js');\n\nvar _visitor = require('../language/visitor.js');\n\nvar _definition = require('../type/definition.js');\n\nvar _introspection = require('../type/introspection.js');\n\nvar _typeFromAST = require('./typeFromAST.js');\n\n/**\n * TypeInfo is a utility class which, given a GraphQL schema, can keep track\n * of the current field and type definitions at any point in a GraphQL document\n * AST during a recursive descent by calling `enter(node)` and `leave(node)`.\n */\nclass TypeInfo {\n constructor(\n schema,\n /**\n * Initial type may be provided in rare cases to facilitate traversals\n * beginning somewhere other than documents.\n */\n initialType,\n /** @deprecated will be removed in 17.0.0 */\n getFieldDefFn,\n ) {\n this._schema = schema;\n this._typeStack = [];\n this._parentTypeStack = [];\n this._inputTypeStack = [];\n this._fieldDefStack = [];\n this._defaultValueStack = [];\n this._directive = null;\n this._argument = null;\n this._enumValue = null;\n this._getFieldDef =\n getFieldDefFn !== null && getFieldDefFn !== void 0\n ? getFieldDefFn\n : getFieldDef;\n\n if (initialType) {\n if ((0, _definition.isInputType)(initialType)) {\n this._inputTypeStack.push(initialType);\n }\n\n if ((0, _definition.isCompositeType)(initialType)) {\n this._parentTypeStack.push(initialType);\n }\n\n if ((0, _definition.isOutputType)(initialType)) {\n this._typeStack.push(initialType);\n }\n }\n }\n\n get [Symbol.toStringTag]() {\n return 'TypeInfo';\n }\n\n getType() {\n if (this._typeStack.length > 0) {\n return this._typeStack[this._typeStack.length - 1];\n }\n }\n\n getParentType() {\n if (this._parentTypeStack.length > 0) {\n return this._parentTypeStack[this._parentTypeStack.length - 1];\n }\n }\n\n getInputType() {\n if (this._inputTypeStack.length > 0) {\n return this._inputTypeStack[this._inputTypeStack.length - 1];\n }\n }\n\n getParentInputType() {\n if (this._inputTypeStack.length > 1) {\n return this._inputTypeStack[this._inputTypeStack.length - 2];\n }\n }\n\n getFieldDef() {\n if (this._fieldDefStack.length > 0) {\n return this._fieldDefStack[this._fieldDefStack.length - 1];\n }\n }\n\n getDefaultValue() {\n if (this._defaultValueStack.length > 0) {\n return this._defaultValueStack[this._defaultValueStack.length - 1];\n }\n }\n\n getDirective() {\n return this._directive;\n }\n\n getArgument() {\n return this._argument;\n }\n\n getEnumValue() {\n return this._enumValue;\n }\n\n enter(node) {\n const schema = this._schema; // Note: many of the types below are explicitly typed as \"unknown\" to drop\n // any assumptions of a valid schema to ensure runtime types are properly\n // checked before continuing since TypeInfo is used as part of validation\n // which occurs before guarantees of schema and document validity.\n\n switch (node.kind) {\n case _kinds.Kind.SELECTION_SET: {\n const namedType = (0, _definition.getNamedType)(this.getType());\n\n this._parentTypeStack.push(\n (0, _definition.isCompositeType)(namedType) ? namedType : undefined,\n );\n\n break;\n }\n\n case _kinds.Kind.FIELD: {\n const parentType = this.getParentType();\n let fieldDef;\n let fieldType;\n\n if (parentType) {\n fieldDef = this._getFieldDef(schema, parentType, node);\n\n if (fieldDef) {\n fieldType = fieldDef.type;\n }\n }\n\n this._fieldDefStack.push(fieldDef);\n\n this._typeStack.push(\n (0, _definition.isOutputType)(fieldType) ? fieldType : undefined,\n );\n\n break;\n }\n\n case _kinds.Kind.DIRECTIVE:\n this._directive = schema.getDirective(node.name.value);\n break;\n\n case _kinds.Kind.OPERATION_DEFINITION: {\n const rootType = schema.getRootType(node.operation);\n\n this._typeStack.push(\n (0, _definition.isObjectType)(rootType) ? rootType : undefined,\n );\n\n break;\n }\n\n case _kinds.Kind.INLINE_FRAGMENT:\n case _kinds.Kind.FRAGMENT_DEFINITION: {\n const typeConditionAST = node.typeCondition;\n const outputType = typeConditionAST\n ? (0, _typeFromAST.typeFromAST)(schema, typeConditionAST)\n : (0, _definition.getNamedType)(this.getType());\n\n this._typeStack.push(\n (0, _definition.isOutputType)(outputType) ? outputType : undefined,\n );\n\n break;\n }\n\n case _kinds.Kind.VARIABLE_DEFINITION: {\n const inputType = (0, _typeFromAST.typeFromAST)(schema, node.type);\n\n this._inputTypeStack.push(\n (0, _definition.isInputType)(inputType) ? inputType : undefined,\n );\n\n break;\n }\n\n case _kinds.Kind.ARGUMENT: {\n var _this$getDirective;\n\n let argDef;\n let argType;\n const fieldOrDirective =\n (_this$getDirective = this.getDirective()) !== null &&\n _this$getDirective !== void 0\n ? _this$getDirective\n : this.getFieldDef();\n\n if (fieldOrDirective) {\n argDef = fieldOrDirective.args.find(\n (arg) => arg.name === node.name.value,\n );\n\n if (argDef) {\n argType = argDef.type;\n }\n }\n\n this._argument = argDef;\n\n this._defaultValueStack.push(argDef ? argDef.defaultValue : undefined);\n\n this._inputTypeStack.push(\n (0, _definition.isInputType)(argType) ? argType : undefined,\n );\n\n break;\n }\n\n case _kinds.Kind.LIST: {\n const listType = (0, _definition.getNullableType)(this.getInputType());\n const itemType = (0, _definition.isListType)(listType)\n ? listType.ofType\n : listType; // List positions never have a default value.\n\n this._defaultValueStack.push(undefined);\n\n this._inputTypeStack.push(\n (0, _definition.isInputType)(itemType) ? itemType : undefined,\n );\n\n break;\n }\n\n case _kinds.Kind.OBJECT_FIELD: {\n const objectType = (0, _definition.getNamedType)(this.getInputType());\n let inputFieldType;\n let inputField;\n\n if ((0, _definition.isInputObjectType)(objectType)) {\n inputField = objectType.getFields()[node.name.value];\n\n if (inputField) {\n inputFieldType = inputField.type;\n }\n }\n\n this._defaultValueStack.push(\n inputField ? inputField.defaultValue : undefined,\n );\n\n this._inputTypeStack.push(\n (0, _definition.isInputType)(inputFieldType)\n ? inputFieldType\n : undefined,\n );\n\n break;\n }\n\n case _kinds.Kind.ENUM: {\n const enumType = (0, _definition.getNamedType)(this.getInputType());\n let enumValue;\n\n if ((0, _definition.isEnumType)(enumType)) {\n enumValue = enumType.getValue(node.value);\n }\n\n this._enumValue = enumValue;\n break;\n }\n\n default: // Ignore other nodes\n }\n }\n\n leave(node) {\n switch (node.kind) {\n case _kinds.Kind.SELECTION_SET:\n this._parentTypeStack.pop();\n\n break;\n\n case _kinds.Kind.FIELD:\n this._fieldDefStack.pop();\n\n this._typeStack.pop();\n\n break;\n\n case _kinds.Kind.DIRECTIVE:\n this._directive = null;\n break;\n\n case _kinds.Kind.OPERATION_DEFINITION:\n case _kinds.Kind.INLINE_FRAGMENT:\n case _kinds.Kind.FRAGMENT_DEFINITION:\n this._typeStack.pop();\n\n break;\n\n case _kinds.Kind.VARIABLE_DEFINITION:\n this._inputTypeStack.pop();\n\n break;\n\n case _kinds.Kind.ARGUMENT:\n this._argument = null;\n\n this._defaultValueStack.pop();\n\n this._inputTypeStack.pop();\n\n break;\n\n case _kinds.Kind.LIST:\n case _kinds.Kind.OBJECT_FIELD:\n this._defaultValueStack.pop();\n\n this._inputTypeStack.pop();\n\n break;\n\n case _kinds.Kind.ENUM:\n this._enumValue = null;\n break;\n\n default: // Ignore other nodes\n }\n }\n}\n\nexports.TypeInfo = TypeInfo;\n\n/**\n * Not exactly the same as the executor's definition of getFieldDef, in this\n * statically evaluated environment we do not always have an Object type,\n * and need to handle Interface and Union types.\n */\nfunction getFieldDef(schema, parentType, fieldNode) {\n const name = fieldNode.name.value;\n\n if (\n name === _introspection.SchemaMetaFieldDef.name &&\n schema.getQueryType() === parentType\n ) {\n return _introspection.SchemaMetaFieldDef;\n }\n\n if (\n name === _introspection.TypeMetaFieldDef.name &&\n schema.getQueryType() === parentType\n ) {\n return _introspection.TypeMetaFieldDef;\n }\n\n if (\n name === _introspection.TypeNameMetaFieldDef.name &&\n (0, _definition.isCompositeType)(parentType)\n ) {\n return _introspection.TypeNameMetaFieldDef;\n }\n\n if (\n (0, _definition.isObjectType)(parentType) ||\n (0, _definition.isInterfaceType)(parentType)\n ) {\n return parentType.getFields()[name];\n }\n}\n/**\n * Creates a new visitor instance which maintains a provided TypeInfo instance\n * along with visiting visitor.\n */\n\nfunction visitWithTypeInfo(typeInfo, visitor) {\n return {\n enter(...args) {\n const node = args[0];\n typeInfo.enter(node);\n const fn = (0, _visitor.getEnterLeaveForKind)(visitor, node.kind).enter;\n\n if (fn) {\n const result = fn.apply(visitor, args);\n\n if (result !== undefined) {\n typeInfo.leave(node);\n\n if ((0, _ast.isNode)(result)) {\n typeInfo.enter(result);\n }\n }\n\n return result;\n }\n },\n\n leave(...args) {\n const node = args[0];\n const fn = (0, _visitor.getEnterLeaveForKind)(visitor, node.kind).leave;\n let result;\n\n if (fn) {\n result = fn.apply(visitor, args);\n }\n\n typeInfo.leave(node);\n return result;\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.isConstValueNode = isConstValueNode;\nexports.isDefinitionNode = isDefinitionNode;\nexports.isExecutableDefinitionNode = isExecutableDefinitionNode;\nexports.isSchemaCoordinateNode = isSchemaCoordinateNode;\nexports.isSelectionNode = isSelectionNode;\nexports.isTypeDefinitionNode = isTypeDefinitionNode;\nexports.isTypeExtensionNode = isTypeExtensionNode;\nexports.isTypeNode = isTypeNode;\nexports.isTypeSystemDefinitionNode = isTypeSystemDefinitionNode;\nexports.isTypeSystemExtensionNode = isTypeSystemExtensionNode;\nexports.isValueNode = isValueNode;\n\nvar _kinds = require('./kinds.js');\n\nfunction isDefinitionNode(node) {\n return (\n isExecutableDefinitionNode(node) ||\n isTypeSystemDefinitionNode(node) ||\n isTypeSystemExtensionNode(node)\n );\n}\n\nfunction isExecutableDefinitionNode(node) {\n return (\n node.kind === _kinds.Kind.OPERATION_DEFINITION ||\n node.kind === _kinds.Kind.FRAGMENT_DEFINITION\n );\n}\n\nfunction isSelectionNode(node) {\n return (\n node.kind === _kinds.Kind.FIELD ||\n node.kind === _kinds.Kind.FRAGMENT_SPREAD ||\n node.kind === _kinds.Kind.INLINE_FRAGMENT\n );\n}\n\nfunction isValueNode(node) {\n return (\n node.kind === _kinds.Kind.VARIABLE ||\n node.kind === _kinds.Kind.INT ||\n node.kind === _kinds.Kind.FLOAT ||\n node.kind === _kinds.Kind.STRING ||\n node.kind === _kinds.Kind.BOOLEAN ||\n node.kind === _kinds.Kind.NULL ||\n node.kind === _kinds.Kind.ENUM ||\n node.kind === _kinds.Kind.LIST ||\n node.kind === _kinds.Kind.OBJECT\n );\n}\n\nfunction isConstValueNode(node) {\n return (\n isValueNode(node) &&\n (node.kind === _kinds.Kind.LIST\n ? node.values.some(isConstValueNode)\n : node.kind === _kinds.Kind.OBJECT\n ? node.fields.some((field) => isConstValueNode(field.value))\n : node.kind !== _kinds.Kind.VARIABLE)\n );\n}\n\nfunction isTypeNode(node) {\n return (\n node.kind === _kinds.Kind.NAMED_TYPE ||\n node.kind === _kinds.Kind.LIST_TYPE ||\n node.kind === _kinds.Kind.NON_NULL_TYPE\n );\n}\n\nfunction isTypeSystemDefinitionNode(node) {\n return (\n node.kind === _kinds.Kind.SCHEMA_DEFINITION ||\n isTypeDefinitionNode(node) ||\n node.kind === _kinds.Kind.DIRECTIVE_DEFINITION\n );\n}\n\nfunction isTypeDefinitionNode(node) {\n return (\n node.kind === _kinds.Kind.SCALAR_TYPE_DEFINITION ||\n node.kind === _kinds.Kind.OBJECT_TYPE_DEFINITION ||\n node.kind === _kinds.Kind.INTERFACE_TYPE_DEFINITION ||\n node.kind === _kinds.Kind.UNION_TYPE_DEFINITION ||\n node.kind === _kinds.Kind.ENUM_TYPE_DEFINITION ||\n node.kind === _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION\n );\n}\n\nfunction isTypeSystemExtensionNode(node) {\n return (\n node.kind === _kinds.Kind.SCHEMA_EXTENSION || isTypeExtensionNode(node)\n );\n}\n\nfunction isTypeExtensionNode(node) {\n return (\n node.kind === _kinds.Kind.SCALAR_TYPE_EXTENSION ||\n node.kind === _kinds.Kind.OBJECT_TYPE_EXTENSION ||\n node.kind === _kinds.Kind.INTERFACE_TYPE_EXTENSION ||\n node.kind === _kinds.Kind.UNION_TYPE_EXTENSION ||\n node.kind === _kinds.Kind.ENUM_TYPE_EXTENSION ||\n node.kind === _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION\n );\n}\n\nfunction isSchemaCoordinateNode(node) {\n return (\n node.kind === _kinds.Kind.TYPE_COORDINATE ||\n node.kind === _kinds.Kind.MEMBER_COORDINATE ||\n node.kind === _kinds.Kind.ARGUMENT_COORDINATE ||\n node.kind === _kinds.Kind.DIRECTIVE_COORDINATE ||\n node.kind === _kinds.Kind.DIRECTIVE_ARGUMENT_COORDINATE\n );\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.ExecutableDefinitionsRule = ExecutableDefinitionsRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _kinds = require('../../language/kinds.js');\n\nvar _predicates = require('../../language/predicates.js');\n\n/**\n * Executable definitions\n *\n * A GraphQL document is only valid for execution if all definitions are either\n * operation or fragment definitions.\n *\n * See https://spec.graphql.org/draft/#sec-Executable-Definitions\n */\nfunction ExecutableDefinitionsRule(context) {\n return {\n Document(node) {\n for (const definition of node.definitions) {\n if (!(0, _predicates.isExecutableDefinitionNode)(definition)) {\n const defName =\n definition.kind === _kinds.Kind.SCHEMA_DEFINITION ||\n definition.kind === _kinds.Kind.SCHEMA_EXTENSION\n ? 'schema'\n : '\"' + definition.name.value + '\"';\n context.reportError(\n new _GraphQLError.GraphQLError(\n `The ${defName} definition is not executable.`,\n {\n nodes: definition,\n },\n ),\n );\n }\n }\n\n return false;\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.FieldsOnCorrectTypeRule = FieldsOnCorrectTypeRule;\n\nvar _didYouMean = require('../../jsutils/didYouMean.js');\n\nvar _naturalCompare = require('../../jsutils/naturalCompare.js');\n\nvar _suggestionList = require('../../jsutils/suggestionList.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _definition = require('../../type/definition.js');\n\n/**\n * Fields on correct type\n *\n * A GraphQL document is only valid if all fields selected are defined by the\n * parent type, or are an allowed meta field such as __typename.\n *\n * See https://spec.graphql.org/draft/#sec-Field-Selections\n */\nfunction FieldsOnCorrectTypeRule(context) {\n return {\n Field(node) {\n const type = context.getParentType();\n\n if (type) {\n const fieldDef = context.getFieldDef();\n\n if (!fieldDef) {\n // This field doesn't exist, lets look for suggestions.\n const schema = context.getSchema();\n const fieldName = node.name.value; // First determine if there are any suggested types to condition on.\n\n let suggestion = (0, _didYouMean.didYouMean)(\n 'to use an inline fragment on',\n getSuggestedTypeNames(schema, type, fieldName),\n ); // If there are no suggested types, then perhaps this was a typo?\n\n if (suggestion === '') {\n suggestion = (0, _didYouMean.didYouMean)(\n getSuggestedFieldNames(type, fieldName),\n );\n } // Report an error, including helpful suggestions.\n\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Cannot query field \"${fieldName}\" on type \"${type.name}\".` +\n suggestion,\n {\n nodes: node,\n },\n ),\n );\n }\n }\n },\n };\n}\n/**\n * Go through all of the implementations of type, as well as the interfaces that\n * they implement. If any of those types include the provided field, suggest them,\n * sorted by how often the type is referenced.\n */\n\nfunction getSuggestedTypeNames(schema, type, fieldName) {\n if (!(0, _definition.isAbstractType)(type)) {\n // Must be an Object type, which does not have possible fields.\n return [];\n }\n\n const suggestedTypes = new Set();\n const usageCount = Object.create(null);\n\n for (const possibleType of schema.getPossibleTypes(type)) {\n if (!possibleType.getFields()[fieldName]) {\n continue;\n } // This object type defines this field.\n\n suggestedTypes.add(possibleType);\n usageCount[possibleType.name] = 1;\n\n for (const possibleInterface of possibleType.getInterfaces()) {\n var _usageCount$possibleI;\n\n if (!possibleInterface.getFields()[fieldName]) {\n continue;\n } // This interface type defines this field.\n\n suggestedTypes.add(possibleInterface);\n usageCount[possibleInterface.name] =\n ((_usageCount$possibleI = usageCount[possibleInterface.name]) !==\n null && _usageCount$possibleI !== void 0\n ? _usageCount$possibleI\n : 0) + 1;\n }\n }\n\n return [...suggestedTypes]\n .sort((typeA, typeB) => {\n // Suggest both interface and object types based on how common they are.\n const usageCountDiff = usageCount[typeB.name] - usageCount[typeA.name];\n\n if (usageCountDiff !== 0) {\n return usageCountDiff;\n } // Suggest super types first followed by subtypes\n\n if (\n (0, _definition.isInterfaceType)(typeA) &&\n schema.isSubType(typeA, typeB)\n ) {\n return -1;\n }\n\n if (\n (0, _definition.isInterfaceType)(typeB) &&\n schema.isSubType(typeB, typeA)\n ) {\n return 1;\n }\n\n return (0, _naturalCompare.naturalCompare)(typeA.name, typeB.name);\n })\n .map((x) => x.name);\n}\n/**\n * For the field name provided, determine if there are any similar field names\n * that may be the result of a typo.\n */\n\nfunction getSuggestedFieldNames(type, fieldName) {\n if (\n (0, _definition.isObjectType)(type) ||\n (0, _definition.isInterfaceType)(type)\n ) {\n const possibleFieldNames = Object.keys(type.getFields());\n return (0, _suggestionList.suggestionList)(fieldName, possibleFieldNames);\n } // Otherwise, must be a Union type, which does not define fields.\n\n return [];\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.FragmentsOnCompositeTypesRule = FragmentsOnCompositeTypesRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _printer = require('../../language/printer.js');\n\nvar _definition = require('../../type/definition.js');\n\nvar _typeFromAST = require('../../utilities/typeFromAST.js');\n\n/**\n * Fragments on composite type\n *\n * Fragments use a type condition to determine if they apply, since fragments\n * can only be spread into a composite type (object, interface, or union), the\n * type condition must also be a composite type.\n *\n * See https://spec.graphql.org/draft/#sec-Fragments-On-Composite-Types\n */\nfunction FragmentsOnCompositeTypesRule(context) {\n return {\n InlineFragment(node) {\n const typeCondition = node.typeCondition;\n\n if (typeCondition) {\n const type = (0, _typeFromAST.typeFromAST)(\n context.getSchema(),\n typeCondition,\n );\n\n if (type && !(0, _definition.isCompositeType)(type)) {\n const typeStr = (0, _printer.print)(typeCondition);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Fragment cannot condition on non composite type \"${typeStr}\".`,\n {\n nodes: typeCondition,\n },\n ),\n );\n }\n }\n },\n\n FragmentDefinition(node) {\n const type = (0, _typeFromAST.typeFromAST)(\n context.getSchema(),\n node.typeCondition,\n );\n\n if (type && !(0, _definition.isCompositeType)(type)) {\n const typeStr = (0, _printer.print)(node.typeCondition);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Fragment \"${node.name.value}\" cannot condition on non composite type \"${typeStr}\".`,\n {\n nodes: node.typeCondition,\n },\n ),\n );\n }\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.KnownArgumentNamesOnDirectivesRule = KnownArgumentNamesOnDirectivesRule;\nexports.KnownArgumentNamesRule = KnownArgumentNamesRule;\n\nvar _didYouMean = require('../../jsutils/didYouMean.js');\n\nvar _suggestionList = require('../../jsutils/suggestionList.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _kinds = require('../../language/kinds.js');\n\nvar _directives = require('../../type/directives.js');\n\n/**\n * Known argument names\n *\n * A GraphQL field is only valid if all supplied arguments are defined by\n * that field.\n *\n * See https://spec.graphql.org/draft/#sec-Argument-Names\n * See https://spec.graphql.org/draft/#sec-Directives-Are-In-Valid-Locations\n */\nfunction KnownArgumentNamesRule(context) {\n return {\n // eslint-disable-next-line new-cap\n ...KnownArgumentNamesOnDirectivesRule(context),\n\n Argument(argNode) {\n const argDef = context.getArgument();\n const fieldDef = context.getFieldDef();\n const parentType = context.getParentType();\n\n if (!argDef && fieldDef && parentType) {\n const argName = argNode.name.value;\n const knownArgsNames = fieldDef.args.map((arg) => arg.name);\n const suggestions = (0, _suggestionList.suggestionList)(\n argName,\n knownArgsNames,\n );\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Unknown argument \"${argName}\" on field \"${parentType.name}.${fieldDef.name}\".` +\n (0, _didYouMean.didYouMean)(suggestions),\n {\n nodes: argNode,\n },\n ),\n );\n }\n },\n };\n}\n/**\n * @internal\n */\n\nfunction KnownArgumentNamesOnDirectivesRule(context) {\n const directiveArgs = Object.create(null);\n const schema = context.getSchema();\n const definedDirectives = schema\n ? schema.getDirectives()\n : _directives.specifiedDirectives;\n\n for (const directive of definedDirectives) {\n directiveArgs[directive.name] = directive.args.map((arg) => arg.name);\n }\n\n const astDefinitions = context.getDocument().definitions;\n\n for (const def of astDefinitions) {\n if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {\n var _def$arguments;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n const argsNodes =\n (_def$arguments = def.arguments) !== null && _def$arguments !== void 0\n ? _def$arguments\n : [];\n directiveArgs[def.name.value] = argsNodes.map((arg) => arg.name.value);\n }\n }\n\n return {\n Directive(directiveNode) {\n const directiveName = directiveNode.name.value;\n const knownArgs = directiveArgs[directiveName];\n\n if (directiveNode.arguments && knownArgs) {\n for (const argNode of directiveNode.arguments) {\n const argName = argNode.name.value;\n\n if (!knownArgs.includes(argName)) {\n const suggestions = (0, _suggestionList.suggestionList)(\n argName,\n knownArgs,\n );\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Unknown argument \"${argName}\" on directive \"@${directiveName}\".` +\n (0, _didYouMean.didYouMean)(suggestions),\n {\n nodes: argNode,\n },\n ),\n );\n }\n }\n }\n\n return false;\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.KnownDirectivesRule = KnownDirectivesRule;\n\nvar _inspect = require('../../jsutils/inspect.js');\n\nvar _invariant = require('../../jsutils/invariant.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _ast = require('../../language/ast.js');\n\nvar _directiveLocation = require('../../language/directiveLocation.js');\n\nvar _kinds = require('../../language/kinds.js');\n\nvar _directives = require('../../type/directives.js');\n\n/**\n * Known directives\n *\n * A GraphQL document is only valid if all `@directives` are known by the\n * schema and legally positioned.\n *\n * See https://spec.graphql.org/draft/#sec-Directives-Are-Defined\n */\nfunction KnownDirectivesRule(context) {\n const locationsMap = Object.create(null);\n const schema = context.getSchema();\n const definedDirectives = schema\n ? schema.getDirectives()\n : _directives.specifiedDirectives;\n\n for (const directive of definedDirectives) {\n locationsMap[directive.name] = directive.locations;\n }\n\n const astDefinitions = context.getDocument().definitions;\n\n for (const def of astDefinitions) {\n if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {\n locationsMap[def.name.value] = def.locations.map((name) => name.value);\n }\n }\n\n return {\n Directive(node, _key, _parent, _path, ancestors) {\n const name = node.name.value;\n const locations = locationsMap[name];\n\n if (!locations) {\n context.reportError(\n new _GraphQLError.GraphQLError(`Unknown directive \"@${name}\".`, {\n nodes: node,\n }),\n );\n return;\n }\n\n const candidateLocation = getDirectiveLocationForASTPath(ancestors);\n\n if (candidateLocation && !locations.includes(candidateLocation)) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Directive \"@${name}\" may not be used on ${candidateLocation}.`,\n {\n nodes: node,\n },\n ),\n );\n }\n },\n };\n}\n\nfunction getDirectiveLocationForASTPath(ancestors) {\n const appliedTo = ancestors[ancestors.length - 1];\n 'kind' in appliedTo || (0, _invariant.invariant)(false);\n\n switch (appliedTo.kind) {\n case _kinds.Kind.OPERATION_DEFINITION:\n return getDirectiveLocationForOperation(appliedTo.operation);\n\n case _kinds.Kind.FIELD:\n return _directiveLocation.DirectiveLocation.FIELD;\n\n case _kinds.Kind.FRAGMENT_SPREAD:\n return _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD;\n\n case _kinds.Kind.INLINE_FRAGMENT:\n return _directiveLocation.DirectiveLocation.INLINE_FRAGMENT;\n\n case _kinds.Kind.FRAGMENT_DEFINITION:\n return _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION;\n\n case _kinds.Kind.VARIABLE_DEFINITION:\n return _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION;\n\n case _kinds.Kind.SCHEMA_DEFINITION:\n case _kinds.Kind.SCHEMA_EXTENSION:\n return _directiveLocation.DirectiveLocation.SCHEMA;\n\n case _kinds.Kind.SCALAR_TYPE_DEFINITION:\n case _kinds.Kind.SCALAR_TYPE_EXTENSION:\n return _directiveLocation.DirectiveLocation.SCALAR;\n\n case _kinds.Kind.OBJECT_TYPE_DEFINITION:\n case _kinds.Kind.OBJECT_TYPE_EXTENSION:\n return _directiveLocation.DirectiveLocation.OBJECT;\n\n case _kinds.Kind.FIELD_DEFINITION:\n return _directiveLocation.DirectiveLocation.FIELD_DEFINITION;\n\n case _kinds.Kind.INTERFACE_TYPE_DEFINITION:\n case _kinds.Kind.INTERFACE_TYPE_EXTENSION:\n return _directiveLocation.DirectiveLocation.INTERFACE;\n\n case _kinds.Kind.UNION_TYPE_DEFINITION:\n case _kinds.Kind.UNION_TYPE_EXTENSION:\n return _directiveLocation.DirectiveLocation.UNION;\n\n case _kinds.Kind.ENUM_TYPE_DEFINITION:\n case _kinds.Kind.ENUM_TYPE_EXTENSION:\n return _directiveLocation.DirectiveLocation.ENUM;\n\n case _kinds.Kind.ENUM_VALUE_DEFINITION:\n return _directiveLocation.DirectiveLocation.ENUM_VALUE;\n\n case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION:\n case _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION:\n return _directiveLocation.DirectiveLocation.INPUT_OBJECT;\n\n case _kinds.Kind.INPUT_VALUE_DEFINITION: {\n const parentNode = ancestors[ancestors.length - 3];\n 'kind' in parentNode || (0, _invariant.invariant)(false);\n return parentNode.kind === _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION\n ? _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION\n : _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION;\n }\n // Not reachable, all possible types have been considered.\n\n /* c8 ignore next */\n\n default:\n false ||\n (0, _invariant.invariant)(\n false,\n 'Unexpected kind: ' + (0, _inspect.inspect)(appliedTo.kind),\n );\n }\n}\n\nfunction getDirectiveLocationForOperation(operation) {\n switch (operation) {\n case _ast.OperationTypeNode.QUERY:\n return _directiveLocation.DirectiveLocation.QUERY;\n\n case _ast.OperationTypeNode.MUTATION:\n return _directiveLocation.DirectiveLocation.MUTATION;\n\n case _ast.OperationTypeNode.SUBSCRIPTION:\n return _directiveLocation.DirectiveLocation.SUBSCRIPTION;\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.KnownFragmentNamesRule = KnownFragmentNamesRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * Known fragment names\n *\n * A GraphQL document is only valid if all `...Fragment` fragment spreads refer\n * to fragments defined in the same document.\n *\n * See https://spec.graphql.org/draft/#sec-Fragment-spread-target-defined\n */\nfunction KnownFragmentNamesRule(context) {\n return {\n FragmentSpread(node) {\n const fragmentName = node.name.value;\n const fragment = context.getFragment(fragmentName);\n\n if (!fragment) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Unknown fragment \"${fragmentName}\".`,\n {\n nodes: node.name,\n },\n ),\n );\n }\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.KnownTypeNamesRule = KnownTypeNamesRule;\n\nvar _didYouMean = require('../../jsutils/didYouMean.js');\n\nvar _suggestionList = require('../../jsutils/suggestionList.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _predicates = require('../../language/predicates.js');\n\nvar _introspection = require('../../type/introspection.js');\n\nvar _scalars = require('../../type/scalars.js');\n\n/**\n * Known type names\n *\n * A GraphQL document is only valid if referenced types (specifically\n * variable definitions and fragment conditions) are defined by the type schema.\n *\n * See https://spec.graphql.org/draft/#sec-Fragment-Spread-Type-Existence\n */\nfunction KnownTypeNamesRule(context) {\n const schema = context.getSchema();\n const existingTypesMap = schema ? schema.getTypeMap() : Object.create(null);\n const definedTypes = Object.create(null);\n\n for (const def of context.getDocument().definitions) {\n if ((0, _predicates.isTypeDefinitionNode)(def)) {\n definedTypes[def.name.value] = true;\n }\n }\n\n const typeNames = [\n ...Object.keys(existingTypesMap),\n ...Object.keys(definedTypes),\n ];\n return {\n NamedType(node, _1, parent, _2, ancestors) {\n const typeName = node.name.value;\n\n if (!existingTypesMap[typeName] && !definedTypes[typeName]) {\n var _ancestors$;\n\n const definitionNode =\n (_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0\n ? _ancestors$\n : parent;\n const isSDL = definitionNode != null && isSDLNode(definitionNode);\n\n if (isSDL && standardTypeNames.includes(typeName)) {\n return;\n }\n\n const suggestedTypes = (0, _suggestionList.suggestionList)(\n typeName,\n isSDL ? standardTypeNames.concat(typeNames) : typeNames,\n );\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Unknown type \"${typeName}\".` +\n (0, _didYouMean.didYouMean)(suggestedTypes),\n {\n nodes: node,\n },\n ),\n );\n }\n },\n };\n}\n\nconst standardTypeNames = [\n ..._scalars.specifiedScalarTypes,\n ..._introspection.introspectionTypes,\n].map((type) => type.name);\n\nfunction isSDLNode(value) {\n return (\n 'kind' in value &&\n ((0, _predicates.isTypeSystemDefinitionNode)(value) ||\n (0, _predicates.isTypeSystemExtensionNode)(value))\n );\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.LoneAnonymousOperationRule = LoneAnonymousOperationRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _kinds = require('../../language/kinds.js');\n\n/**\n * Lone anonymous operation\n *\n * A GraphQL document is only valid if when it contains an anonymous operation\n * (the query short-hand) that it contains only that one operation definition.\n *\n * See https://spec.graphql.org/draft/#sec-Lone-Anonymous-Operation\n */\nfunction LoneAnonymousOperationRule(context) {\n let operationCount = 0;\n return {\n Document(node) {\n operationCount = node.definitions.filter(\n (definition) => definition.kind === _kinds.Kind.OPERATION_DEFINITION,\n ).length;\n },\n\n OperationDefinition(node) {\n if (!node.name && operationCount > 1) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n 'This anonymous operation must be the only defined operation.',\n {\n nodes: node,\n },\n ),\n );\n }\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.LoneSchemaDefinitionRule = LoneSchemaDefinitionRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * Lone Schema definition\n *\n * A GraphQL document is only valid if it contains only one schema definition.\n */\nfunction LoneSchemaDefinitionRule(context) {\n var _ref, _ref2, _oldSchema$astNode;\n\n const oldSchema = context.getSchema();\n const alreadyDefined =\n (_ref =\n (_ref2 =\n (_oldSchema$astNode =\n oldSchema === null || oldSchema === void 0\n ? void 0\n : oldSchema.astNode) !== null && _oldSchema$astNode !== void 0\n ? _oldSchema$astNode\n : oldSchema === null || oldSchema === void 0\n ? void 0\n : oldSchema.getQueryType()) !== null && _ref2 !== void 0\n ? _ref2\n : oldSchema === null || oldSchema === void 0\n ? void 0\n : oldSchema.getMutationType()) !== null && _ref !== void 0\n ? _ref\n : oldSchema === null || oldSchema === void 0\n ? void 0\n : oldSchema.getSubscriptionType();\n let schemaDefinitionsCount = 0;\n return {\n SchemaDefinition(node) {\n if (alreadyDefined) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n 'Cannot define a new schema within a schema extension.',\n {\n nodes: node,\n },\n ),\n );\n return;\n }\n\n if (schemaDefinitionsCount > 0) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n 'Must provide only one schema definition.',\n {\n nodes: node,\n },\n ),\n );\n }\n\n ++schemaDefinitionsCount;\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.MaxIntrospectionDepthRule = MaxIntrospectionDepthRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _kinds = require('../../language/kinds.js');\n\nconst MAX_LISTS_DEPTH = 3;\n\nfunction MaxIntrospectionDepthRule(context) {\n /**\n * Counts the depth of list fields in \"__Type\" recursively and\n * returns `true` if the limit has been reached.\n */\n function checkDepth(node, visitedFragments = Object.create(null), depth = 0) {\n if (node.kind === _kinds.Kind.FRAGMENT_SPREAD) {\n const fragmentName = node.name.value;\n\n if (visitedFragments[fragmentName] === true) {\n // Fragment cycles are handled by `NoFragmentCyclesRule`.\n return false;\n }\n\n const fragment = context.getFragment(fragmentName);\n\n if (!fragment) {\n // Missing fragments checks are handled by `KnownFragmentNamesRule`.\n return false;\n } // Rather than following an immutable programming pattern which has\n // significant memory and garbage collection overhead, we've opted to\n // take a mutable approach for efficiency's sake. Importantly visiting a\n // fragment twice is fine, so long as you don't do one visit inside the\n // other.\n\n try {\n visitedFragments[fragmentName] = true;\n return checkDepth(fragment, visitedFragments, depth);\n } finally {\n visitedFragments[fragmentName] = undefined;\n }\n }\n\n if (\n node.kind === _kinds.Kind.FIELD && // check all introspection lists\n (node.name.value === 'fields' ||\n node.name.value === 'interfaces' ||\n node.name.value === 'possibleTypes' ||\n node.name.value === 'inputFields')\n ) {\n // eslint-disable-next-line no-param-reassign\n depth++;\n\n if (depth >= MAX_LISTS_DEPTH) {\n return true;\n }\n } // handles fields and inline fragments\n\n if ('selectionSet' in node && node.selectionSet) {\n for (const child of node.selectionSet.selections) {\n if (checkDepth(child, visitedFragments, depth)) {\n return true;\n }\n }\n }\n\n return false;\n }\n\n return {\n Field(node) {\n if (node.name.value === '__schema' || node.name.value === '__type') {\n if (checkDepth(node)) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n 'Maximum introspection depth exceeded',\n {\n nodes: [node],\n },\n ),\n );\n return false;\n }\n }\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.NoFragmentCyclesRule = NoFragmentCyclesRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * No fragment cycles\n *\n * The graph of fragment spreads must not form any cycles including spreading itself.\n * Otherwise an operation could infinitely spread or infinitely execute on cycles in the underlying data.\n *\n * See https://spec.graphql.org/draft/#sec-Fragment-spreads-must-not-form-cycles\n */\nfunction NoFragmentCyclesRule(context) {\n // Tracks already visited fragments to maintain O(N) and to ensure that cycles\n // are not redundantly reported.\n const visitedFrags = Object.create(null); // Array of AST nodes used to produce meaningful errors\n\n const spreadPath = []; // Position in the spread path\n\n const spreadPathIndexByName = Object.create(null);\n return {\n OperationDefinition: () => false,\n\n FragmentDefinition(node) {\n detectCycleRecursive(node);\n return false;\n },\n }; // This does a straight-forward DFS to find cycles.\n // It does not terminate when a cycle was found but continues to explore\n // the graph to find all possible cycles.\n\n function detectCycleRecursive(fragment) {\n if (visitedFrags[fragment.name.value]) {\n return;\n }\n\n const fragmentName = fragment.name.value;\n visitedFrags[fragmentName] = true;\n const spreadNodes = context.getFragmentSpreads(fragment.selectionSet);\n\n if (spreadNodes.length === 0) {\n return;\n }\n\n spreadPathIndexByName[fragmentName] = spreadPath.length;\n\n for (const spreadNode of spreadNodes) {\n const spreadName = spreadNode.name.value;\n const cycleIndex = spreadPathIndexByName[spreadName];\n spreadPath.push(spreadNode);\n\n if (cycleIndex === undefined) {\n const spreadFragment = context.getFragment(spreadName);\n\n if (spreadFragment) {\n detectCycleRecursive(spreadFragment);\n }\n } else {\n const cyclePath = spreadPath.slice(cycleIndex);\n const viaPath = cyclePath\n .slice(0, -1)\n .map((s) => '\"' + s.name.value + '\"')\n .join(', ');\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Cannot spread fragment \"${spreadName}\" within itself` +\n (viaPath !== '' ? ` via ${viaPath}.` : '.'),\n {\n nodes: cyclePath,\n },\n ),\n );\n }\n\n spreadPath.pop();\n }\n\n spreadPathIndexByName[fragmentName] = undefined;\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.NoUndefinedVariablesRule = NoUndefinedVariablesRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * No undefined variables\n *\n * A GraphQL operation is only valid if all variables encountered, both directly\n * and via fragment spreads, are defined by that operation.\n *\n * See https://spec.graphql.org/draft/#sec-All-Variable-Uses-Defined\n */\nfunction NoUndefinedVariablesRule(context) {\n let variableNameDefined = Object.create(null);\n return {\n OperationDefinition: {\n enter() {\n variableNameDefined = Object.create(null);\n },\n\n leave(operation) {\n const usages = context.getRecursiveVariableUsages(operation);\n\n for (const { node } of usages) {\n const varName = node.name.value;\n\n if (variableNameDefined[varName] !== true) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n operation.name\n ? `Variable \"$${varName}\" is not defined by operation \"${operation.name.value}\".`\n : `Variable \"$${varName}\" is not defined.`,\n {\n nodes: [node, operation],\n },\n ),\n );\n }\n }\n },\n },\n\n VariableDefinition(node) {\n variableNameDefined[node.variable.name.value] = true;\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.NoUnusedFragmentsRule = NoUnusedFragmentsRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * No unused fragments\n *\n * A GraphQL document is only valid if all fragment definitions are spread\n * within operations, or spread within other fragments spread within operations.\n *\n * See https://spec.graphql.org/draft/#sec-Fragments-Must-Be-Used\n */\nfunction NoUnusedFragmentsRule(context) {\n const operationDefs = [];\n const fragmentDefs = [];\n return {\n OperationDefinition(node) {\n operationDefs.push(node);\n return false;\n },\n\n FragmentDefinition(node) {\n fragmentDefs.push(node);\n return false;\n },\n\n Document: {\n leave() {\n const fragmentNameUsed = Object.create(null);\n\n for (const operation of operationDefs) {\n for (const fragment of context.getRecursivelyReferencedFragments(\n operation,\n )) {\n fragmentNameUsed[fragment.name.value] = true;\n }\n }\n\n for (const fragmentDef of fragmentDefs) {\n const fragName = fragmentDef.name.value;\n\n if (fragmentNameUsed[fragName] !== true) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Fragment \"${fragName}\" is never used.`,\n {\n nodes: fragmentDef,\n },\n ),\n );\n }\n }\n },\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.NoUnusedVariablesRule = NoUnusedVariablesRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * No unused variables\n *\n * A GraphQL operation is only valid if all variables defined by an operation\n * are used, either directly or within a spread fragment.\n *\n * See https://spec.graphql.org/draft/#sec-All-Variables-Used\n */\nfunction NoUnusedVariablesRule(context) {\n let variableDefs = [];\n return {\n OperationDefinition: {\n enter() {\n variableDefs = [];\n },\n\n leave(operation) {\n const variableNameUsed = Object.create(null);\n const usages = context.getRecursiveVariableUsages(operation);\n\n for (const { node } of usages) {\n variableNameUsed[node.name.value] = true;\n }\n\n for (const variableDef of variableDefs) {\n const variableName = variableDef.variable.name.value;\n\n if (variableNameUsed[variableName] !== true) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n operation.name\n ? `Variable \"$${variableName}\" is never used in operation \"${operation.name.value}\".`\n : `Variable \"$${variableName}\" is never used.`,\n {\n nodes: variableDef,\n },\n ),\n );\n }\n }\n },\n },\n\n VariableDefinition(def) {\n variableDefs.push(def);\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.sortValueNode = sortValueNode;\n\nvar _naturalCompare = require('../jsutils/naturalCompare.js');\n\nvar _kinds = require('../language/kinds.js');\n\n/**\n * Sort ValueNode.\n *\n * This function returns a sorted copy of the given ValueNode.\n *\n * @internal\n */\nfunction sortValueNode(valueNode) {\n switch (valueNode.kind) {\n case _kinds.Kind.OBJECT:\n return { ...valueNode, fields: sortFields(valueNode.fields) };\n\n case _kinds.Kind.LIST:\n return { ...valueNode, values: valueNode.values.map(sortValueNode) };\n\n case _kinds.Kind.INT:\n case _kinds.Kind.FLOAT:\n case _kinds.Kind.STRING:\n case _kinds.Kind.BOOLEAN:\n case _kinds.Kind.NULL:\n case _kinds.Kind.ENUM:\n case _kinds.Kind.VARIABLE:\n return valueNode;\n }\n}\n\nfunction sortFields(fields) {\n return fields\n .map((fieldNode) => ({\n ...fieldNode,\n value: sortValueNode(fieldNode.value),\n }))\n .sort((fieldA, fieldB) =>\n (0, _naturalCompare.naturalCompare)(fieldA.name.value, fieldB.name.value),\n );\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.OverlappingFieldsCanBeMergedRule = OverlappingFieldsCanBeMergedRule;\n\nvar _inspect = require('../../jsutils/inspect.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _kinds = require('../../language/kinds.js');\n\nvar _printer = require('../../language/printer.js');\n\nvar _definition = require('../../type/definition.js');\n\nvar _sortValueNode = require('../../utilities/sortValueNode.js');\n\nvar _typeFromAST = require('../../utilities/typeFromAST.js');\n\nfunction reasonMessage(reason) {\n if (Array.isArray(reason)) {\n return reason\n .map(\n ([responseName, subReason]) =>\n `subfields \"${responseName}\" conflict because ` +\n reasonMessage(subReason),\n )\n .join(' and ');\n }\n\n return reason;\n}\n/**\n * Overlapping fields can be merged\n *\n * A selection set is only valid if all fields (including spreading any\n * fragments) either correspond to distinct response names or can be merged\n * without ambiguity.\n *\n * See https://spec.graphql.org/draft/#sec-Field-Selection-Merging\n */\n\nfunction OverlappingFieldsCanBeMergedRule(context) {\n // A memoization for when fields and a fragment or two fragments are compared\n // \"between\" each other for conflicts. Comparisons made be made many times,\n // so memoizing this can dramatically improve the performance of this validator.\n const comparedFieldsAndFragmentPairs = new OrderedPairSet();\n const comparedFragmentPairs = new PairSet(); // A cache for the \"field map\" and list of fragment names found in any given\n // selection set. Selection sets may be asked for this information multiple\n // times, so this improves the performance of this validator.\n\n const cachedFieldsAndFragmentNames = new Map();\n return {\n SelectionSet(selectionSet) {\n const conflicts = findConflictsWithinSelectionSet(\n context,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n context.getParentType(),\n selectionSet,\n );\n\n for (const [[responseName, reason], fields1, fields2] of conflicts) {\n const reasonMsg = reasonMessage(reason);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Fields \"${responseName}\" conflict because ${reasonMsg}. Use different aliases on the fields to fetch both if this was intentional.`,\n {\n nodes: fields1.concat(fields2),\n },\n ),\n );\n }\n },\n };\n}\n\n/**\n * Algorithm:\n *\n * Conflicts occur when two fields exist in a query which will produce the same\n * response name, but represent differing values, thus creating a conflict.\n * The algorithm below finds all conflicts via making a series of comparisons\n * between fields. In order to compare as few fields as possible, this makes\n * a series of comparisons \"within\" sets of fields and \"between\" sets of fields.\n *\n * Given any selection set, a collection produces both a set of fields by\n * also including all inline fragments, as well as a list of fragments\n * referenced by fragment spreads.\n *\n * A) Each selection set represented in the document first compares \"within\" its\n * collected set of fields, finding any conflicts between every pair of\n * overlapping fields.\n * Note: This is the *only time* that a the fields \"within\" a set are compared\n * to each other. After this only fields \"between\" sets are compared.\n *\n * B) Also, if any fragment is referenced in a selection set, then a\n * comparison is made \"between\" the original set of fields and the\n * referenced fragment.\n *\n * C) Also, if multiple fragments are referenced, then comparisons\n * are made \"between\" each referenced fragment.\n *\n * D) When comparing \"between\" a set of fields and a referenced fragment, first\n * a comparison is made between each field in the original set of fields and\n * each field in the the referenced set of fields.\n *\n * E) Also, if any fragment is referenced in the referenced selection set,\n * then a comparison is made \"between\" the original set of fields and the\n * referenced fragment (recursively referring to step D).\n *\n * F) When comparing \"between\" two fragments, first a comparison is made between\n * each field in the first referenced set of fields and each field in the the\n * second referenced set of fields.\n *\n * G) Also, any fragments referenced by the first must be compared to the\n * second, and any fragments referenced by the second must be compared to the\n * first (recursively referring to step F).\n *\n * H) When comparing two fields, if both have selection sets, then a comparison\n * is made \"between\" both selection sets, first comparing the set of fields in\n * the first selection set with the set of fields in the second.\n *\n * I) Also, if any fragment is referenced in either selection set, then a\n * comparison is made \"between\" the other set of fields and the\n * referenced fragment.\n *\n * J) Also, if two fragments are referenced in both selection sets, then a\n * comparison is made \"between\" the two fragments.\n *\n */\n// Find all conflicts found \"within\" a selection set, including those found\n// via spreading in fragments. Called when visiting each SelectionSet in the\n// GraphQL Document.\nfunction findConflictsWithinSelectionSet(\n context,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n parentType,\n selectionSet,\n) {\n const conflicts = [];\n const [fieldMap, fragmentNames] = getFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n parentType,\n selectionSet,\n ); // (A) Find find all conflicts \"within\" the fields of this selection set.\n // Note: this is the *only place* `collectConflictsWithin` is called.\n\n collectConflictsWithin(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n fieldMap,\n );\n\n if (fragmentNames.length !== 0) {\n // (B) Then collect conflicts between these fields and those represented by\n // each spread fragment name found.\n for (let i = 0; i < fragmentNames.length; i++) {\n collectConflictsBetweenFieldsAndFragment(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n false,\n fieldMap,\n fragmentNames[i],\n ); // (C) Then compare this fragment with all other fragments found in this\n // selection set to collect conflicts between fragments spread together.\n // This compares each item in the list of fragment names to every other\n // item in that same list (except for itself).\n\n for (let j = i + 1; j < fragmentNames.length; j++) {\n collectConflictsBetweenFragments(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n false,\n fragmentNames[i],\n fragmentNames[j],\n );\n }\n }\n }\n\n return conflicts;\n} // Collect all conflicts found between a set of fields and a fragment reference\n// including via spreading in any nested fragments.\n\nfunction collectConflictsBetweenFieldsAndFragment(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fieldMap,\n fragmentName,\n) {\n // Memoize so the fields and fragments are not compared for conflicts more\n // than once.\n if (\n comparedFieldsAndFragmentPairs.has(\n fieldMap,\n fragmentName,\n areMutuallyExclusive,\n )\n ) {\n return;\n }\n\n comparedFieldsAndFragmentPairs.add(\n fieldMap,\n fragmentName,\n areMutuallyExclusive,\n );\n const fragment = context.getFragment(fragmentName);\n\n if (!fragment) {\n return;\n }\n\n const [fieldMap2, referencedFragmentNames] =\n getReferencedFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n fragment,\n ); // Do not compare a fragment's fieldMap to itself.\n\n if (fieldMap === fieldMap2) {\n return;\n } // (D) First collect any conflicts between the provided collection of fields\n // and the collection of fields represented by the given fragment.\n\n collectConflictsBetween(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fieldMap,\n fieldMap2,\n ); // (E) Then collect any conflicts between the provided collection of fields\n // and any fragment names found in the given fragment.\n\n for (const referencedFragmentName of referencedFragmentNames) {\n collectConflictsBetweenFieldsAndFragment(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fieldMap,\n referencedFragmentName,\n );\n }\n} // Collect all conflicts found between two fragments, including via spreading in\n// any nested fragments.\n\nfunction collectConflictsBetweenFragments(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fragmentName1,\n fragmentName2,\n) {\n // No need to compare a fragment to itself.\n if (fragmentName1 === fragmentName2) {\n return;\n } // Memoize so two fragments are not compared for conflicts more than once.\n\n if (\n comparedFragmentPairs.has(\n fragmentName1,\n fragmentName2,\n areMutuallyExclusive,\n )\n ) {\n return;\n }\n\n comparedFragmentPairs.add(fragmentName1, fragmentName2, areMutuallyExclusive);\n const fragment1 = context.getFragment(fragmentName1);\n const fragment2 = context.getFragment(fragmentName2);\n\n if (!fragment1 || !fragment2) {\n return;\n }\n\n const [fieldMap1, referencedFragmentNames1] =\n getReferencedFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n fragment1,\n );\n const [fieldMap2, referencedFragmentNames2] =\n getReferencedFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n fragment2,\n ); // (F) First, collect all conflicts between these two collections of fields\n // (not including any nested fragments).\n\n collectConflictsBetween(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fieldMap1,\n fieldMap2,\n ); // (G) Then collect conflicts between the first fragment and any nested\n // fragments spread in the second fragment.\n\n for (const referencedFragmentName2 of referencedFragmentNames2) {\n collectConflictsBetweenFragments(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fragmentName1,\n referencedFragmentName2,\n );\n } // (G) Then collect conflicts between the second fragment and any nested\n // fragments spread in the first fragment.\n\n for (const referencedFragmentName1 of referencedFragmentNames1) {\n collectConflictsBetweenFragments(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n areMutuallyExclusive,\n referencedFragmentName1,\n fragmentName2,\n );\n }\n} // Find all conflicts found between two selection sets, including those found\n// via spreading in fragments. Called when determining if conflicts exist\n// between the sub-fields of two overlapping fields.\n\nfunction findConflictsBetweenSubSelectionSets(\n context,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n areMutuallyExclusive,\n parentType1,\n selectionSet1,\n parentType2,\n selectionSet2,\n) {\n const conflicts = [];\n const [fieldMap1, fragmentNames1] = getFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n parentType1,\n selectionSet1,\n );\n const [fieldMap2, fragmentNames2] = getFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n parentType2,\n selectionSet2,\n ); // (H) First, collect all conflicts between these two collections of field.\n\n collectConflictsBetween(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fieldMap1,\n fieldMap2,\n ); // (I) Then collect conflicts between the first collection of fields and\n // those referenced by each fragment name associated with the second.\n\n for (const fragmentName2 of fragmentNames2) {\n collectConflictsBetweenFieldsAndFragment(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fieldMap1,\n fragmentName2,\n );\n } // (I) Then collect conflicts between the second collection of fields and\n // those referenced by each fragment name associated with the first.\n\n for (const fragmentName1 of fragmentNames1) {\n collectConflictsBetweenFieldsAndFragment(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fieldMap2,\n fragmentName1,\n );\n } // (J) Also collect conflicts between any fragment names by the first and\n // fragment names by the second. This compares each item in the first set of\n // names to each item in the second set of names.\n\n for (const fragmentName1 of fragmentNames1) {\n for (const fragmentName2 of fragmentNames2) {\n collectConflictsBetweenFragments(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n areMutuallyExclusive,\n fragmentName1,\n fragmentName2,\n );\n }\n }\n\n return conflicts;\n} // Collect all Conflicts \"within\" one collection of fields.\n\nfunction collectConflictsWithin(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n fieldMap,\n) {\n // A field map is a keyed collection, where each key represents a response\n // name and the value at that key is a list of all fields which provide that\n // response name. For every response name, if there are multiple fields, they\n // must be compared to find a potential conflict.\n for (const [responseName, fields] of Object.entries(fieldMap)) {\n // This compares every field in the list to every other field in this list\n // (except to itself). If the list only has one item, nothing needs to\n // be compared.\n if (fields.length > 1) {\n for (let i = 0; i < fields.length; i++) {\n for (let j = i + 1; j < fields.length; j++) {\n const conflict = findConflict(\n context,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n false, // within one collection is never mutually exclusive\n responseName,\n fields[i],\n fields[j],\n );\n\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n }\n} // Collect all Conflicts between two collections of fields. This is similar to,\n// but different from the `collectConflictsWithin` function above. This check\n// assumes that `collectConflictsWithin` has already been called on each\n// provided collection of fields. This is true because this validator traverses\n// each individual selection set.\n\nfunction collectConflictsBetween(\n context,\n conflicts,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n parentFieldsAreMutuallyExclusive,\n fieldMap1,\n fieldMap2,\n) {\n // A field map is a keyed collection, where each key represents a response\n // name and the value at that key is a list of all fields which provide that\n // response name. For any response name which appears in both provided field\n // maps, each field from the first field map must be compared to every field\n // in the second field map to find potential conflicts.\n for (const [responseName, fields1] of Object.entries(fieldMap1)) {\n const fields2 = fieldMap2[responseName];\n\n if (fields2) {\n for (const field1 of fields1) {\n for (const field2 of fields2) {\n const conflict = findConflict(\n context,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n parentFieldsAreMutuallyExclusive,\n responseName,\n field1,\n field2,\n );\n\n if (conflict) {\n conflicts.push(conflict);\n }\n }\n }\n }\n }\n} // Determines if there is a conflict between two particular fields, including\n// comparing their sub-fields.\n\nfunction findConflict(\n context,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n parentFieldsAreMutuallyExclusive,\n responseName,\n field1,\n field2,\n) {\n const [parentType1, node1, def1] = field1;\n const [parentType2, node2, def2] = field2; // If it is known that two fields could not possibly apply at the same\n // time, due to the parent types, then it is safe to permit them to diverge\n // in aliased field or arguments used as they will not present any ambiguity\n // by differing.\n // It is known that two parent types could never overlap if they are\n // different Object types. Interface or Union types might overlap - if not\n // in the current state of the schema, then perhaps in some future version,\n // thus may not safely diverge.\n\n const areMutuallyExclusive =\n parentFieldsAreMutuallyExclusive ||\n (parentType1 !== parentType2 &&\n (0, _definition.isObjectType)(parentType1) &&\n (0, _definition.isObjectType)(parentType2));\n\n if (!areMutuallyExclusive) {\n // Two aliases must refer to the same field.\n const name1 = node1.name.value;\n const name2 = node2.name.value;\n\n if (name1 !== name2) {\n return [\n [responseName, `\"${name1}\" and \"${name2}\" are different fields`],\n [node1],\n [node2],\n ];\n } // Two field calls must have the same arguments.\n\n if (!sameArguments(node1, node2)) {\n return [\n [responseName, 'they have differing arguments'],\n [node1],\n [node2],\n ];\n }\n } // The return type for each field.\n\n const type1 = def1 === null || def1 === void 0 ? void 0 : def1.type;\n const type2 = def2 === null || def2 === void 0 ? void 0 : def2.type;\n\n if (type1 && type2 && doTypesConflict(type1, type2)) {\n return [\n [\n responseName,\n `they return conflicting types \"${(0, _inspect.inspect)(\n type1,\n )}\" and \"${(0, _inspect.inspect)(type2)}\"`,\n ],\n [node1],\n [node2],\n ];\n } // Collect and compare sub-fields. Use the same \"visited fragment names\" list\n // for both collections so fields in a fragment reference are never\n // compared to themselves.\n\n const selectionSet1 = node1.selectionSet;\n const selectionSet2 = node2.selectionSet;\n\n if (selectionSet1 && selectionSet2) {\n const conflicts = findConflictsBetweenSubSelectionSets(\n context,\n cachedFieldsAndFragmentNames,\n comparedFieldsAndFragmentPairs,\n comparedFragmentPairs,\n areMutuallyExclusive,\n (0, _definition.getNamedType)(type1),\n selectionSet1,\n (0, _definition.getNamedType)(type2),\n selectionSet2,\n );\n return subfieldConflicts(conflicts, responseName, node1, node2);\n }\n}\n\nfunction sameArguments(node1, node2) {\n const args1 = node1.arguments;\n const args2 = node2.arguments;\n\n if (args1 === undefined || args1.length === 0) {\n return args2 === undefined || args2.length === 0;\n }\n\n if (args2 === undefined || args2.length === 0) {\n return false;\n }\n /* c8 ignore next */\n\n if (args1.length !== args2.length) {\n /* c8 ignore next */\n return false;\n /* c8 ignore next */\n }\n\n const values2 = new Map(args2.map(({ name, value }) => [name.value, value]));\n return args1.every((arg1) => {\n const value1 = arg1.value;\n const value2 = values2.get(arg1.name.value);\n\n if (value2 === undefined) {\n return false;\n }\n\n return stringifyValue(value1) === stringifyValue(value2);\n });\n}\n\nfunction stringifyValue(value) {\n return (0, _printer.print)((0, _sortValueNode.sortValueNode)(value));\n} // Two types conflict if both types could not apply to a value simultaneously.\n// Composite types are ignored as their individual field types will be compared\n// later recursively. However List and Non-Null types must match.\n\nfunction doTypesConflict(type1, type2) {\n if ((0, _definition.isListType)(type1)) {\n return (0, _definition.isListType)(type2)\n ? doTypesConflict(type1.ofType, type2.ofType)\n : true;\n }\n\n if ((0, _definition.isListType)(type2)) {\n return true;\n }\n\n if ((0, _definition.isNonNullType)(type1)) {\n return (0, _definition.isNonNullType)(type2)\n ? doTypesConflict(type1.ofType, type2.ofType)\n : true;\n }\n\n if ((0, _definition.isNonNullType)(type2)) {\n return true;\n }\n\n if (\n (0, _definition.isLeafType)(type1) ||\n (0, _definition.isLeafType)(type2)\n ) {\n return type1 !== type2;\n }\n\n return false;\n} // Given a selection set, return the collection of fields (a mapping of response\n// name to field nodes and definitions) as well as a list of fragment names\n// referenced via fragment spreads.\n\nfunction getFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n parentType,\n selectionSet,\n) {\n const cached = cachedFieldsAndFragmentNames.get(selectionSet);\n\n if (cached) {\n return cached;\n }\n\n const nodeAndDefs = Object.create(null);\n const fragmentNames = Object.create(null);\n\n _collectFieldsAndFragmentNames(\n context,\n parentType,\n selectionSet,\n nodeAndDefs,\n fragmentNames,\n );\n\n const result = [nodeAndDefs, Object.keys(fragmentNames)];\n cachedFieldsAndFragmentNames.set(selectionSet, result);\n return result;\n} // Given a reference to a fragment, return the represented collection of fields\n// as well as a list of nested fragment names referenced via fragment spreads.\n\nfunction getReferencedFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n fragment,\n) {\n // Short-circuit building a type from the node if possible.\n const cached = cachedFieldsAndFragmentNames.get(fragment.selectionSet);\n\n if (cached) {\n return cached;\n }\n\n const fragmentType = (0, _typeFromAST.typeFromAST)(\n context.getSchema(),\n fragment.typeCondition,\n );\n return getFieldsAndFragmentNames(\n context,\n cachedFieldsAndFragmentNames,\n fragmentType,\n fragment.selectionSet,\n );\n}\n\nfunction _collectFieldsAndFragmentNames(\n context,\n parentType,\n selectionSet,\n nodeAndDefs,\n fragmentNames,\n) {\n for (const selection of selectionSet.selections) {\n switch (selection.kind) {\n case _kinds.Kind.FIELD: {\n const fieldName = selection.name.value;\n let fieldDef;\n\n if (\n (0, _definition.isObjectType)(parentType) ||\n (0, _definition.isInterfaceType)(parentType)\n ) {\n fieldDef = parentType.getFields()[fieldName];\n }\n\n const responseName = selection.alias\n ? selection.alias.value\n : fieldName;\n\n if (!nodeAndDefs[responseName]) {\n nodeAndDefs[responseName] = [];\n }\n\n nodeAndDefs[responseName].push([parentType, selection, fieldDef]);\n break;\n }\n\n case _kinds.Kind.FRAGMENT_SPREAD:\n fragmentNames[selection.name.value] = true;\n break;\n\n case _kinds.Kind.INLINE_FRAGMENT: {\n const typeCondition = selection.typeCondition;\n const inlineFragmentType = typeCondition\n ? (0, _typeFromAST.typeFromAST)(context.getSchema(), typeCondition)\n : parentType;\n\n _collectFieldsAndFragmentNames(\n context,\n inlineFragmentType,\n selection.selectionSet,\n nodeAndDefs,\n fragmentNames,\n );\n\n break;\n }\n }\n }\n} // Given a series of Conflicts which occurred between two sub-fields, generate\n// a single Conflict.\n\nfunction subfieldConflicts(conflicts, responseName, node1, node2) {\n if (conflicts.length > 0) {\n return [\n [responseName, conflicts.map(([reason]) => reason)],\n [node1, ...conflicts.map(([, fields1]) => fields1).flat()],\n [node2, ...conflicts.map(([, , fields2]) => fields2).flat()],\n ];\n }\n}\n/**\n * A way to keep track of pairs of things where the ordering of the pair\n * matters.\n *\n * Provides a third argument for has/set to allow flagging the pair as\n * weakly or strongly present within the collection.\n */\n\nclass OrderedPairSet {\n constructor() {\n this._data = new Map();\n }\n\n has(a, b, weaklyPresent) {\n var _this$_data$get;\n\n const result =\n (_this$_data$get = this._data.get(a)) === null ||\n _this$_data$get === void 0\n ? void 0\n : _this$_data$get.get(b);\n\n if (result === undefined) {\n return false;\n }\n\n return weaklyPresent ? true : weaklyPresent === result;\n }\n\n add(a, b, weaklyPresent) {\n const map = this._data.get(a);\n\n if (map === undefined) {\n this._data.set(a, new Map([[b, weaklyPresent]]));\n } else {\n map.set(b, weaklyPresent);\n }\n }\n}\n/**\n * A way to keep track of pairs of similar things when the ordering of the pair\n * does not matter.\n */\n\nclass PairSet {\n constructor() {\n this._orderedPairSet = new OrderedPairSet();\n }\n\n has(a, b, weaklyPresent) {\n return a < b\n ? this._orderedPairSet.has(a, b, weaklyPresent)\n : this._orderedPairSet.has(b, a, weaklyPresent);\n }\n\n add(a, b, weaklyPresent) {\n if (a < b) {\n this._orderedPairSet.add(a, b, weaklyPresent);\n } else {\n this._orderedPairSet.add(b, a, weaklyPresent);\n }\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.PossibleFragmentSpreadsRule = PossibleFragmentSpreadsRule;\n\nvar _inspect = require('../../jsutils/inspect.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _definition = require('../../type/definition.js');\n\nvar _typeComparators = require('../../utilities/typeComparators.js');\n\nvar _typeFromAST = require('../../utilities/typeFromAST.js');\n\n/**\n * Possible fragment spread\n *\n * A fragment spread is only valid if the type condition could ever possibly\n * be true: if there is a non-empty intersection of the possible parent types,\n * and possible types which pass the type condition.\n */\nfunction PossibleFragmentSpreadsRule(context) {\n return {\n InlineFragment(node) {\n const fragType = context.getType();\n const parentType = context.getParentType();\n\n if (\n (0, _definition.isCompositeType)(fragType) &&\n (0, _definition.isCompositeType)(parentType) &&\n !(0, _typeComparators.doTypesOverlap)(\n context.getSchema(),\n fragType,\n parentType,\n )\n ) {\n const parentTypeStr = (0, _inspect.inspect)(parentType);\n const fragTypeStr = (0, _inspect.inspect)(fragType);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Fragment cannot be spread here as objects of type \"${parentTypeStr}\" can never be of type \"${fragTypeStr}\".`,\n {\n nodes: node,\n },\n ),\n );\n }\n },\n\n FragmentSpread(node) {\n const fragName = node.name.value;\n const fragType = getFragmentType(context, fragName);\n const parentType = context.getParentType();\n\n if (\n fragType &&\n parentType &&\n !(0, _typeComparators.doTypesOverlap)(\n context.getSchema(),\n fragType,\n parentType,\n )\n ) {\n const parentTypeStr = (0, _inspect.inspect)(parentType);\n const fragTypeStr = (0, _inspect.inspect)(fragType);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Fragment \"${fragName}\" cannot be spread here as objects of type \"${parentTypeStr}\" can never be of type \"${fragTypeStr}\".`,\n {\n nodes: node,\n },\n ),\n );\n }\n },\n };\n}\n\nfunction getFragmentType(context, name) {\n const frag = context.getFragment(name);\n\n if (frag) {\n const type = (0, _typeFromAST.typeFromAST)(\n context.getSchema(),\n frag.typeCondition,\n );\n\n if ((0, _definition.isCompositeType)(type)) {\n return type;\n }\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.PossibleTypeExtensionsRule = PossibleTypeExtensionsRule;\n\nvar _didYouMean = require('../../jsutils/didYouMean.js');\n\nvar _inspect = require('../../jsutils/inspect.js');\n\nvar _invariant = require('../../jsutils/invariant.js');\n\nvar _suggestionList = require('../../jsutils/suggestionList.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _kinds = require('../../language/kinds.js');\n\nvar _predicates = require('../../language/predicates.js');\n\nvar _definition = require('../../type/definition.js');\n\n/**\n * Possible type extension\n *\n * A type extension is only valid if the type is defined and has the same kind.\n */\nfunction PossibleTypeExtensionsRule(context) {\n const schema = context.getSchema();\n const definedTypes = Object.create(null);\n\n for (const def of context.getDocument().definitions) {\n if ((0, _predicates.isTypeDefinitionNode)(def)) {\n definedTypes[def.name.value] = def;\n }\n }\n\n return {\n ScalarTypeExtension: checkExtension,\n ObjectTypeExtension: checkExtension,\n InterfaceTypeExtension: checkExtension,\n UnionTypeExtension: checkExtension,\n EnumTypeExtension: checkExtension,\n InputObjectTypeExtension: checkExtension,\n };\n\n function checkExtension(node) {\n const typeName = node.name.value;\n const defNode = definedTypes[typeName];\n const existingType =\n schema === null || schema === void 0 ? void 0 : schema.getType(typeName);\n let expectedKind;\n\n if (defNode) {\n expectedKind = defKindToExtKind[defNode.kind];\n } else if (existingType) {\n expectedKind = typeToExtKind(existingType);\n }\n\n if (expectedKind) {\n if (expectedKind !== node.kind) {\n const kindStr = extensionKindToTypeName(node.kind);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Cannot extend non-${kindStr} type \"${typeName}\".`,\n {\n nodes: defNode ? [defNode, node] : node,\n },\n ),\n );\n }\n } else {\n const allTypeNames = Object.keys({\n ...definedTypes,\n ...(schema === null || schema === void 0\n ? void 0\n : schema.getTypeMap()),\n });\n const suggestedTypes = (0, _suggestionList.suggestionList)(\n typeName,\n allTypeNames,\n );\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Cannot extend type \"${typeName}\" because it is not defined.` +\n (0, _didYouMean.didYouMean)(suggestedTypes),\n {\n nodes: node.name,\n },\n ),\n );\n }\n }\n}\n\nconst defKindToExtKind = {\n [_kinds.Kind.SCALAR_TYPE_DEFINITION]: _kinds.Kind.SCALAR_TYPE_EXTENSION,\n [_kinds.Kind.OBJECT_TYPE_DEFINITION]: _kinds.Kind.OBJECT_TYPE_EXTENSION,\n [_kinds.Kind.INTERFACE_TYPE_DEFINITION]: _kinds.Kind.INTERFACE_TYPE_EXTENSION,\n [_kinds.Kind.UNION_TYPE_DEFINITION]: _kinds.Kind.UNION_TYPE_EXTENSION,\n [_kinds.Kind.ENUM_TYPE_DEFINITION]: _kinds.Kind.ENUM_TYPE_EXTENSION,\n [_kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION]:\n _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION,\n};\n\nfunction typeToExtKind(type) {\n if ((0, _definition.isScalarType)(type)) {\n return _kinds.Kind.SCALAR_TYPE_EXTENSION;\n }\n\n if ((0, _definition.isObjectType)(type)) {\n return _kinds.Kind.OBJECT_TYPE_EXTENSION;\n }\n\n if ((0, _definition.isInterfaceType)(type)) {\n return _kinds.Kind.INTERFACE_TYPE_EXTENSION;\n }\n\n if ((0, _definition.isUnionType)(type)) {\n return _kinds.Kind.UNION_TYPE_EXTENSION;\n }\n\n if ((0, _definition.isEnumType)(type)) {\n return _kinds.Kind.ENUM_TYPE_EXTENSION;\n }\n\n if ((0, _definition.isInputObjectType)(type)) {\n return _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION;\n }\n /* c8 ignore next 3 */\n // Not reachable. All possible types have been considered\n\n false ||\n (0, _invariant.invariant)(\n false,\n 'Unexpected type: ' + (0, _inspect.inspect)(type),\n );\n}\n\nfunction extensionKindToTypeName(kind) {\n switch (kind) {\n case _kinds.Kind.SCALAR_TYPE_EXTENSION:\n return 'scalar';\n\n case _kinds.Kind.OBJECT_TYPE_EXTENSION:\n return 'object';\n\n case _kinds.Kind.INTERFACE_TYPE_EXTENSION:\n return 'interface';\n\n case _kinds.Kind.UNION_TYPE_EXTENSION:\n return 'union';\n\n case _kinds.Kind.ENUM_TYPE_EXTENSION:\n return 'enum';\n\n case _kinds.Kind.INPUT_OBJECT_TYPE_EXTENSION:\n return 'input object';\n // Not reachable. All possible types have been considered\n\n /* c8 ignore next */\n\n default:\n false ||\n (0, _invariant.invariant)(\n false,\n 'Unexpected kind: ' + (0, _inspect.inspect)(kind),\n );\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.ProvidedRequiredArgumentsOnDirectivesRule =\n ProvidedRequiredArgumentsOnDirectivesRule;\nexports.ProvidedRequiredArgumentsRule = ProvidedRequiredArgumentsRule;\n\nvar _inspect = require('../../jsutils/inspect.js');\n\nvar _keyMap = require('../../jsutils/keyMap.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _kinds = require('../../language/kinds.js');\n\nvar _printer = require('../../language/printer.js');\n\nvar _definition = require('../../type/definition.js');\n\nvar _directives = require('../../type/directives.js');\n\n/**\n * Provided required arguments\n *\n * A field or directive is only valid if all required (non-null without a\n * default value) field arguments have been provided.\n */\nfunction ProvidedRequiredArgumentsRule(context) {\n return {\n // eslint-disable-next-line new-cap\n ...ProvidedRequiredArgumentsOnDirectivesRule(context),\n Field: {\n // Validate on leave to allow for deeper errors to appear first.\n leave(fieldNode) {\n var _fieldNode$arguments;\n\n const fieldDef = context.getFieldDef();\n\n if (!fieldDef) {\n return false;\n }\n\n const providedArgs = new Set( // FIXME: https://github.com/graphql/graphql-js/issues/2203\n /* c8 ignore next */\n (_fieldNode$arguments = fieldNode.arguments) === null ||\n _fieldNode$arguments === void 0\n ? void 0\n : _fieldNode$arguments.map((arg) => arg.name.value),\n );\n\n for (const argDef of fieldDef.args) {\n if (\n !providedArgs.has(argDef.name) &&\n (0, _definition.isRequiredArgument)(argDef)\n ) {\n const argTypeStr = (0, _inspect.inspect)(argDef.type);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Field \"${fieldDef.name}\" argument \"${argDef.name}\" of type \"${argTypeStr}\" is required, but it was not provided.`,\n {\n nodes: fieldNode,\n },\n ),\n );\n }\n }\n },\n },\n };\n}\n/**\n * @internal\n */\n\nfunction ProvidedRequiredArgumentsOnDirectivesRule(context) {\n var _schema$getDirectives;\n\n const requiredArgsMap = Object.create(null);\n const schema = context.getSchema();\n const definedDirectives =\n (_schema$getDirectives =\n schema === null || schema === void 0\n ? void 0\n : schema.getDirectives()) !== null && _schema$getDirectives !== void 0\n ? _schema$getDirectives\n : _directives.specifiedDirectives;\n\n for (const directive of definedDirectives) {\n requiredArgsMap[directive.name] = (0, _keyMap.keyMap)(\n directive.args.filter(_definition.isRequiredArgument),\n (arg) => arg.name,\n );\n }\n\n const astDefinitions = context.getDocument().definitions;\n\n for (const def of astDefinitions) {\n if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {\n var _def$arguments;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n const argNodes =\n (_def$arguments = def.arguments) !== null && _def$arguments !== void 0\n ? _def$arguments\n : [];\n requiredArgsMap[def.name.value] = (0, _keyMap.keyMap)(\n argNodes.filter(isRequiredArgumentNode),\n (arg) => arg.name.value,\n );\n }\n }\n\n return {\n Directive: {\n // Validate on leave to allow for deeper errors to appear first.\n leave(directiveNode) {\n const directiveName = directiveNode.name.value;\n const requiredArgs = requiredArgsMap[directiveName];\n\n if (requiredArgs) {\n var _directiveNode$argume;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n const argNodes =\n (_directiveNode$argume = directiveNode.arguments) !== null &&\n _directiveNode$argume !== void 0\n ? _directiveNode$argume\n : [];\n const argNodeMap = new Set(argNodes.map((arg) => arg.name.value));\n\n for (const [argName, argDef] of Object.entries(requiredArgs)) {\n if (!argNodeMap.has(argName)) {\n const argType = (0, _definition.isType)(argDef.type)\n ? (0, _inspect.inspect)(argDef.type)\n : (0, _printer.print)(argDef.type);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Directive \"@${directiveName}\" argument \"${argName}\" of type \"${argType}\" is required, but it was not provided.`,\n {\n nodes: directiveNode,\n },\n ),\n );\n }\n }\n }\n },\n },\n };\n}\n\nfunction isRequiredArgumentNode(arg) {\n return (\n arg.type.kind === _kinds.Kind.NON_NULL_TYPE && arg.defaultValue == null\n );\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.ScalarLeafsRule = ScalarLeafsRule;\n\nvar _inspect = require('../../jsutils/inspect.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _definition = require('../../type/definition.js');\n\n/**\n * Scalar leafs\n *\n * A GraphQL document is valid only if all leaf fields (fields without\n * sub selections) are of scalar or enum types.\n */\nfunction ScalarLeafsRule(context) {\n return {\n Field(node) {\n const type = context.getType();\n const selectionSet = node.selectionSet;\n\n if (type) {\n if ((0, _definition.isLeafType)((0, _definition.getNamedType)(type))) {\n if (selectionSet) {\n const fieldName = node.name.value;\n const typeStr = (0, _inspect.inspect)(type);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Field \"${fieldName}\" must not have a selection since type \"${typeStr}\" has no subfields.`,\n {\n nodes: selectionSet,\n },\n ),\n );\n }\n } else if (!selectionSet) {\n const fieldName = node.name.value;\n const typeStr = (0, _inspect.inspect)(type);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Field \"${fieldName}\" of type \"${typeStr}\" must have a selection of subfields. Did you mean \"${fieldName} { ... }\"?`,\n {\n nodes: node,\n },\n ),\n );\n } else if (selectionSet.selections.length === 0) {\n const fieldName = node.name.value;\n const typeStr = (0, _inspect.inspect)(type);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Field \"${fieldName}\" of type \"${typeStr}\" must have at least one field selected.`,\n {\n nodes: node,\n },\n ),\n );\n }\n }\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.printPathArray = printPathArray;\n\n/**\n * Build a string describing the path.\n */\nfunction printPathArray(path) {\n return path\n .map((key) =>\n typeof key === 'number' ? '[' + key.toString() + ']' : '.' + key,\n )\n .join('');\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.addPath = addPath;\nexports.pathToArray = pathToArray;\n\n/**\n * Given a Path and a key, return a new Path containing the new key.\n */\nfunction addPath(prev, key, typename) {\n return {\n prev,\n key,\n typename,\n };\n}\n/**\n * Given a Path, return an Array of the path keys.\n */\n\nfunction pathToArray(path) {\n const flattened = [];\n let curr = path;\n\n while (curr) {\n flattened.push(curr.key);\n curr = curr.prev;\n }\n\n return flattened.reverse();\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.coerceInputValue = coerceInputValue;\n\nvar _didYouMean = require('../jsutils/didYouMean.js');\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _invariant = require('../jsutils/invariant.js');\n\nvar _isIterableObject = require('../jsutils/isIterableObject.js');\n\nvar _isObjectLike = require('../jsutils/isObjectLike.js');\n\nvar _Path = require('../jsutils/Path.js');\n\nvar _printPathArray = require('../jsutils/printPathArray.js');\n\nvar _suggestionList = require('../jsutils/suggestionList.js');\n\nvar _GraphQLError = require('../error/GraphQLError.js');\n\nvar _definition = require('../type/definition.js');\n\n/**\n * Coerces a JavaScript value given a GraphQL Input Type.\n */\nfunction coerceInputValue(inputValue, type, onError = defaultOnError) {\n return coerceInputValueImpl(inputValue, type, onError, undefined);\n}\n\nfunction defaultOnError(path, invalidValue, error) {\n let errorPrefix = 'Invalid value ' + (0, _inspect.inspect)(invalidValue);\n\n if (path.length > 0) {\n errorPrefix += ` at \"value${(0, _printPathArray.printPathArray)(path)}\"`;\n }\n\n error.message = errorPrefix + ': ' + error.message;\n throw error;\n}\n\nfunction coerceInputValueImpl(inputValue, type, onError, path) {\n if ((0, _definition.isNonNullType)(type)) {\n if (inputValue != null) {\n return coerceInputValueImpl(inputValue, type.ofType, onError, path);\n }\n\n onError(\n (0, _Path.pathToArray)(path),\n inputValue,\n new _GraphQLError.GraphQLError(\n `Expected non-nullable type \"${(0, _inspect.inspect)(\n type,\n )}\" not to be null.`,\n ),\n );\n return;\n }\n\n if (inputValue == null) {\n // Explicitly return the value null.\n return null;\n }\n\n if ((0, _definition.isListType)(type)) {\n const itemType = type.ofType;\n\n if ((0, _isIterableObject.isIterableObject)(inputValue)) {\n return Array.from(inputValue, (itemValue, index) => {\n const itemPath = (0, _Path.addPath)(path, index, undefined);\n return coerceInputValueImpl(itemValue, itemType, onError, itemPath);\n });\n } // Lists accept a non-list value as a list of one.\n\n return [coerceInputValueImpl(inputValue, itemType, onError, path)];\n }\n\n if ((0, _definition.isInputObjectType)(type)) {\n if (\n !(0, _isObjectLike.isObjectLike)(inputValue) ||\n Array.isArray(inputValue)\n ) {\n onError(\n (0, _Path.pathToArray)(path),\n inputValue,\n new _GraphQLError.GraphQLError(\n `Expected type \"${type.name}\" to be an object.`,\n ),\n );\n return;\n }\n\n const coercedValue = {};\n const fieldDefs = type.getFields();\n\n for (const field of Object.values(fieldDefs)) {\n const fieldValue = inputValue[field.name];\n\n if (fieldValue === undefined) {\n if (field.defaultValue !== undefined) {\n coercedValue[field.name] = field.defaultValue;\n } else if ((0, _definition.isNonNullType)(field.type)) {\n const typeStr = (0, _inspect.inspect)(field.type);\n onError(\n (0, _Path.pathToArray)(path),\n inputValue,\n new _GraphQLError.GraphQLError(\n `Field \"${field.name}\" of required type \"${typeStr}\" was not provided.`,\n ),\n );\n }\n\n continue;\n }\n\n coercedValue[field.name] = coerceInputValueImpl(\n fieldValue,\n field.type,\n onError,\n (0, _Path.addPath)(path, field.name, type.name),\n );\n } // Ensure every provided field is defined.\n\n for (const fieldName of Object.keys(inputValue)) {\n if (!fieldDefs[fieldName]) {\n const suggestions = (0, _suggestionList.suggestionList)(\n fieldName,\n Object.keys(type.getFields()),\n );\n onError(\n (0, _Path.pathToArray)(path),\n inputValue,\n new _GraphQLError.GraphQLError(\n `Field \"${fieldName}\" is not defined by type \"${type.name}\".` +\n (0, _didYouMean.didYouMean)(suggestions),\n ),\n );\n }\n }\n\n if (type.isOneOf) {\n const keys = Object.keys(coercedValue);\n\n if (keys.length !== 1) {\n onError(\n (0, _Path.pathToArray)(path),\n inputValue,\n new _GraphQLError.GraphQLError(\n `Exactly one key must be specified for OneOf type \"${type.name}\".`,\n ),\n );\n }\n\n const key = keys[0];\n const value = coercedValue[key];\n\n if (value === null) {\n onError(\n (0, _Path.pathToArray)(path).concat(key),\n value,\n new _GraphQLError.GraphQLError(`Field \"${key}\" must be non-null.`),\n );\n }\n }\n\n return coercedValue;\n }\n\n if ((0, _definition.isLeafType)(type)) {\n let parseResult; // Scalars and Enums determine if a input value is valid via parseValue(),\n // which can throw to indicate failure. If it throws, maintain a reference\n // to the original error.\n\n try {\n parseResult = type.parseValue(inputValue);\n } catch (error) {\n if (error instanceof _GraphQLError.GraphQLError) {\n onError((0, _Path.pathToArray)(path), inputValue, error);\n } else {\n onError(\n (0, _Path.pathToArray)(path),\n inputValue,\n new _GraphQLError.GraphQLError(\n `Expected type \"${type.name}\". ` + error.message,\n {\n originalError: error,\n },\n ),\n );\n }\n\n return;\n }\n\n if (parseResult === undefined) {\n onError(\n (0, _Path.pathToArray)(path),\n inputValue,\n new _GraphQLError.GraphQLError(`Expected type \"${type.name}\".`),\n );\n }\n\n return parseResult;\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible types have been considered.\n\n false ||\n (0, _invariant.invariant)(\n false,\n 'Unexpected input type: ' + (0, _inspect.inspect)(type),\n );\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.valueFromAST = valueFromAST;\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _invariant = require('../jsutils/invariant.js');\n\nvar _keyMap = require('../jsutils/keyMap.js');\n\nvar _kinds = require('../language/kinds.js');\n\nvar _definition = require('../type/definition.js');\n\n/**\n * Produces a JavaScript value given a GraphQL Value AST.\n *\n * A GraphQL type must be provided, which will be used to interpret different\n * GraphQL Value literals.\n *\n * Returns `undefined` when the value could not be validly coerced according to\n * the provided type.\n *\n * | GraphQL Value | JSON Value |\n * | -------------------- | ------------- |\n * | Input Object | Object |\n * | List | Array |\n * | Boolean | Boolean |\n * | String | String |\n * | Int / Float | Number |\n * | Enum Value | Unknown |\n * | NullValue | null |\n *\n */\nfunction valueFromAST(valueNode, type, variables) {\n if (!valueNode) {\n // When there is no node, then there is also no value.\n // Importantly, this is different from returning the value null.\n return;\n }\n\n if (valueNode.kind === _kinds.Kind.VARIABLE) {\n const variableName = valueNode.name.value;\n\n if (variables == null || variables[variableName] === undefined) {\n // No valid return value.\n return;\n }\n\n const variableValue = variables[variableName];\n\n if (variableValue === null && (0, _definition.isNonNullType)(type)) {\n return; // Invalid: intentionally return no value.\n } // Note: This does no further checking that this variable is correct.\n // This assumes that this query has been validated and the variable\n // usage here is of the correct type.\n\n return variableValue;\n }\n\n if ((0, _definition.isNonNullType)(type)) {\n if (valueNode.kind === _kinds.Kind.NULL) {\n return; // Invalid: intentionally return no value.\n }\n\n return valueFromAST(valueNode, type.ofType, variables);\n }\n\n if (valueNode.kind === _kinds.Kind.NULL) {\n // This is explicitly returning the value null.\n return null;\n }\n\n if ((0, _definition.isListType)(type)) {\n const itemType = type.ofType;\n\n if (valueNode.kind === _kinds.Kind.LIST) {\n const coercedValues = [];\n\n for (const itemNode of valueNode.values) {\n if (isMissingVariable(itemNode, variables)) {\n // If an array contains a missing variable, it is either coerced to\n // null or if the item type is non-null, it considered invalid.\n if ((0, _definition.isNonNullType)(itemType)) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedValues.push(null);\n } else {\n const itemValue = valueFromAST(itemNode, itemType, variables);\n\n if (itemValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedValues.push(itemValue);\n }\n }\n\n return coercedValues;\n }\n\n const coercedValue = valueFromAST(valueNode, itemType, variables);\n\n if (coercedValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n return [coercedValue];\n }\n\n if ((0, _definition.isInputObjectType)(type)) {\n if (valueNode.kind !== _kinds.Kind.OBJECT) {\n return; // Invalid: intentionally return no value.\n }\n\n const coercedObj = Object.create(null);\n const fieldNodes = (0, _keyMap.keyMap)(\n valueNode.fields,\n (field) => field.name.value,\n );\n\n for (const field of Object.values(type.getFields())) {\n const fieldNode = fieldNodes[field.name];\n\n if (!fieldNode || isMissingVariable(fieldNode.value, variables)) {\n if (field.defaultValue !== undefined) {\n coercedObj[field.name] = field.defaultValue;\n } else if ((0, _definition.isNonNullType)(field.type)) {\n return; // Invalid: intentionally return no value.\n }\n\n continue;\n }\n\n const fieldValue = valueFromAST(fieldNode.value, field.type, variables);\n\n if (fieldValue === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n coercedObj[field.name] = fieldValue;\n }\n\n if (type.isOneOf) {\n const keys = Object.keys(coercedObj);\n\n if (keys.length !== 1) {\n return; // Invalid: not exactly one key, intentionally return no value.\n }\n\n if (coercedObj[keys[0]] === null) {\n return; // Invalid: value not non-null, intentionally return no value.\n }\n }\n\n return coercedObj;\n }\n\n if ((0, _definition.isLeafType)(type)) {\n // Scalars and Enums fulfill parsing a literal value via parseLiteral().\n // Invalid values represent a failure to parse correctly, in which case\n // no value is returned.\n let result;\n\n try {\n result = type.parseLiteral(valueNode, variables);\n } catch (_error) {\n return; // Invalid: intentionally return no value.\n }\n\n if (result === undefined) {\n return; // Invalid: intentionally return no value.\n }\n\n return result;\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible input types have been considered.\n\n false ||\n (0, _invariant.invariant)(\n false,\n 'Unexpected input type: ' + (0, _inspect.inspect)(type),\n );\n} // Returns true if the provided valueNode is a variable which is not defined\n// in the set of variables.\n\nfunction isMissingVariable(valueNode, variables) {\n return (\n valueNode.kind === _kinds.Kind.VARIABLE &&\n (variables == null || variables[valueNode.name.value] === undefined)\n );\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.getArgumentValues = getArgumentValues;\nexports.getDirectiveValues = getDirectiveValues;\nexports.getVariableValues = getVariableValues;\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _keyMap = require('../jsutils/keyMap.js');\n\nvar _printPathArray = require('../jsutils/printPathArray.js');\n\nvar _GraphQLError = require('../error/GraphQLError.js');\n\nvar _kinds = require('../language/kinds.js');\n\nvar _printer = require('../language/printer.js');\n\nvar _definition = require('../type/definition.js');\n\nvar _coerceInputValue = require('../utilities/coerceInputValue.js');\n\nvar _typeFromAST = require('../utilities/typeFromAST.js');\n\nvar _valueFromAST = require('../utilities/valueFromAST.js');\n\n/**\n * Prepares an object map of variableValues of the correct type based on the\n * provided variable definitions and arbitrary input. If the input cannot be\n * parsed to match the variable definitions, a GraphQLError will be thrown.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n */\nfunction getVariableValues(schema, varDefNodes, inputs, options) {\n const errors = [];\n const maxErrors =\n options === null || options === void 0 ? void 0 : options.maxErrors;\n\n try {\n const coerced = coerceVariableValues(\n schema,\n varDefNodes,\n inputs,\n (error) => {\n if (maxErrors != null && errors.length >= maxErrors) {\n throw new _GraphQLError.GraphQLError(\n 'Too many errors processing variables, error limit reached. Execution aborted.',\n );\n }\n\n errors.push(error);\n },\n );\n\n if (errors.length === 0) {\n return {\n coerced,\n };\n }\n } catch (error) {\n errors.push(error);\n }\n\n return {\n errors,\n };\n}\n\nfunction coerceVariableValues(schema, varDefNodes, inputs, onError) {\n const coercedValues = {};\n\n for (const varDefNode of varDefNodes) {\n const varName = varDefNode.variable.name.value;\n const varType = (0, _typeFromAST.typeFromAST)(schema, varDefNode.type);\n\n if (!(0, _definition.isInputType)(varType)) {\n // Must use input types for variables. This should be caught during\n // validation, however is checked again here for safety.\n const varTypeStr = (0, _printer.print)(varDefNode.type);\n onError(\n new _GraphQLError.GraphQLError(\n `Variable \"$${varName}\" expected value of type \"${varTypeStr}\" which cannot be used as an input type.`,\n {\n nodes: varDefNode.type,\n },\n ),\n );\n continue;\n }\n\n if (!hasOwnProperty(inputs, varName)) {\n if (varDefNode.defaultValue) {\n coercedValues[varName] = (0, _valueFromAST.valueFromAST)(\n varDefNode.defaultValue,\n varType,\n );\n } else if ((0, _definition.isNonNullType)(varType)) {\n const varTypeStr = (0, _inspect.inspect)(varType);\n onError(\n new _GraphQLError.GraphQLError(\n `Variable \"$${varName}\" of required type \"${varTypeStr}\" was not provided.`,\n {\n nodes: varDefNode,\n },\n ),\n );\n }\n\n continue;\n }\n\n const value = inputs[varName];\n\n if (value === null && (0, _definition.isNonNullType)(varType)) {\n const varTypeStr = (0, _inspect.inspect)(varType);\n onError(\n new _GraphQLError.GraphQLError(\n `Variable \"$${varName}\" of non-null type \"${varTypeStr}\" must not be null.`,\n {\n nodes: varDefNode,\n },\n ),\n );\n continue;\n }\n\n coercedValues[varName] = (0, _coerceInputValue.coerceInputValue)(\n value,\n varType,\n (path, invalidValue, error) => {\n let prefix =\n `Variable \"$${varName}\" got invalid value ` +\n (0, _inspect.inspect)(invalidValue);\n\n if (path.length > 0) {\n prefix += ` at \"${varName}${(0, _printPathArray.printPathArray)(\n path,\n )}\"`;\n }\n\n onError(\n new _GraphQLError.GraphQLError(prefix + '; ' + error.message, {\n nodes: varDefNode,\n originalError: error,\n }),\n );\n },\n );\n }\n\n return coercedValues;\n}\n/**\n * Prepares an object map of argument values given a list of argument\n * definitions and list of argument AST nodes.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n */\n\nfunction getArgumentValues(def, node, variableValues) {\n var _node$arguments;\n\n const coercedValues = {}; // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n\n const argumentNodes =\n (_node$arguments = node.arguments) !== null && _node$arguments !== void 0\n ? _node$arguments\n : [];\n const argNodeMap = (0, _keyMap.keyMap)(\n argumentNodes,\n (arg) => arg.name.value,\n );\n\n for (const argDef of def.args) {\n const name = argDef.name;\n const argType = argDef.type;\n const argumentNode = argNodeMap[name];\n\n if (!argumentNode) {\n if (argDef.defaultValue !== undefined) {\n coercedValues[name] = argDef.defaultValue;\n } else if ((0, _definition.isNonNullType)(argType)) {\n throw new _GraphQLError.GraphQLError(\n `Argument \"${name}\" of required type \"${(0, _inspect.inspect)(\n argType,\n )}\" ` + 'was not provided.',\n {\n nodes: node,\n },\n );\n }\n\n continue;\n }\n\n const valueNode = argumentNode.value;\n let isNull = valueNode.kind === _kinds.Kind.NULL;\n\n if (valueNode.kind === _kinds.Kind.VARIABLE) {\n const variableName = valueNode.name.value;\n\n if (\n variableValues == null ||\n !hasOwnProperty(variableValues, variableName)\n ) {\n if (argDef.defaultValue !== undefined) {\n coercedValues[name] = argDef.defaultValue;\n } else if ((0, _definition.isNonNullType)(argType)) {\n throw new _GraphQLError.GraphQLError(\n `Argument \"${name}\" of required type \"${(0, _inspect.inspect)(\n argType,\n )}\" ` +\n `was provided the variable \"$${variableName}\" which was not provided a runtime value.`,\n {\n nodes: valueNode,\n },\n );\n }\n\n continue;\n }\n\n isNull = variableValues[variableName] == null;\n }\n\n if (isNull && (0, _definition.isNonNullType)(argType)) {\n throw new _GraphQLError.GraphQLError(\n `Argument \"${name}\" of non-null type \"${(0, _inspect.inspect)(\n argType,\n )}\" ` + 'must not be null.',\n {\n nodes: valueNode,\n },\n );\n }\n\n const coercedValue = (0, _valueFromAST.valueFromAST)(\n valueNode,\n argType,\n variableValues,\n );\n\n if (coercedValue === undefined) {\n // Note: ValuesOfCorrectTypeRule validation should catch this before\n // execution. This is a runtime check to ensure execution does not\n // continue with an invalid argument value.\n throw new _GraphQLError.GraphQLError(\n `Argument \"${name}\" has invalid value ${(0, _printer.print)(\n valueNode,\n )}.`,\n {\n nodes: valueNode,\n },\n );\n }\n\n coercedValues[name] = coercedValue;\n }\n\n return coercedValues;\n}\n/**\n * Prepares an object map of argument values given a directive definition\n * and a AST node which may contain directives. Optionally also accepts a map\n * of variable values.\n *\n * If the directive does not exist on the node, returns undefined.\n *\n * Note: The returned value is a plain Object with a prototype, since it is\n * exposed to user code. Care should be taken to not pull values from the\n * Object prototype.\n */\n\nfunction getDirectiveValues(directiveDef, node, variableValues) {\n var _node$directives;\n\n const directiveNode =\n (_node$directives = node.directives) === null || _node$directives === void 0\n ? void 0\n : _node$directives.find(\n (directive) => directive.name.value === directiveDef.name,\n );\n\n if (directiveNode) {\n return getArgumentValues(directiveDef, directiveNode, variableValues);\n }\n}\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.collectFields = collectFields;\nexports.collectSubfields = collectSubfields;\n\nvar _kinds = require('../language/kinds.js');\n\nvar _definition = require('../type/definition.js');\n\nvar _directives = require('../type/directives.js');\n\nvar _typeFromAST = require('../utilities/typeFromAST.js');\n\nvar _values = require('./values.js');\n\n/**\n * Given a selectionSet, collects all of the fields and returns them.\n *\n * CollectFields requires the \"runtime type\" of an object. For a field that\n * returns an Interface or Union type, the \"runtime type\" will be the actual\n * object type returned by that field.\n *\n * @internal\n */\nfunction collectFields(\n schema,\n fragments,\n variableValues,\n runtimeType,\n selectionSet,\n) {\n const fields = new Map();\n collectFieldsImpl(\n schema,\n fragments,\n variableValues,\n runtimeType,\n selectionSet,\n fields,\n new Set(),\n );\n return fields;\n}\n/**\n * Given an array of field nodes, collects all of the subfields of the passed\n * in fields, and returns them at the end.\n *\n * CollectSubFields requires the \"return type\" of an object. For a field that\n * returns an Interface or Union type, the \"return type\" will be the actual\n * object type returned by that field.\n *\n * @internal\n */\n\nfunction collectSubfields(\n schema,\n fragments,\n variableValues,\n returnType,\n fieldNodes,\n) {\n const subFieldNodes = new Map();\n const visitedFragmentNames = new Set();\n\n for (const node of fieldNodes) {\n if (node.selectionSet) {\n collectFieldsImpl(\n schema,\n fragments,\n variableValues,\n returnType,\n node.selectionSet,\n subFieldNodes,\n visitedFragmentNames,\n );\n }\n }\n\n return subFieldNodes;\n}\n\nfunction collectFieldsImpl(\n schema,\n fragments,\n variableValues,\n runtimeType,\n selectionSet,\n fields,\n visitedFragmentNames,\n) {\n for (const selection of selectionSet.selections) {\n switch (selection.kind) {\n case _kinds.Kind.FIELD: {\n if (!shouldIncludeNode(variableValues, selection)) {\n continue;\n }\n\n const name = getFieldEntryKey(selection);\n const fieldList = fields.get(name);\n\n if (fieldList !== undefined) {\n fieldList.push(selection);\n } else {\n fields.set(name, [selection]);\n }\n\n break;\n }\n\n case _kinds.Kind.INLINE_FRAGMENT: {\n if (\n !shouldIncludeNode(variableValues, selection) ||\n !doesFragmentConditionMatch(schema, selection, runtimeType)\n ) {\n continue;\n }\n\n collectFieldsImpl(\n schema,\n fragments,\n variableValues,\n runtimeType,\n selection.selectionSet,\n fields,\n visitedFragmentNames,\n );\n break;\n }\n\n case _kinds.Kind.FRAGMENT_SPREAD: {\n const fragName = selection.name.value;\n\n if (\n visitedFragmentNames.has(fragName) ||\n !shouldIncludeNode(variableValues, selection)\n ) {\n continue;\n }\n\n visitedFragmentNames.add(fragName);\n const fragment = fragments[fragName];\n\n if (\n !fragment ||\n !doesFragmentConditionMatch(schema, fragment, runtimeType)\n ) {\n continue;\n }\n\n collectFieldsImpl(\n schema,\n fragments,\n variableValues,\n runtimeType,\n fragment.selectionSet,\n fields,\n visitedFragmentNames,\n );\n break;\n }\n }\n }\n}\n/**\n * Determines if a field should be included based on the `@include` and `@skip`\n * directives, where `@skip` has higher precedence than `@include`.\n */\n\nfunction shouldIncludeNode(variableValues, node) {\n const skip = (0, _values.getDirectiveValues)(\n _directives.GraphQLSkipDirective,\n node,\n variableValues,\n );\n\n if ((skip === null || skip === void 0 ? void 0 : skip.if) === true) {\n return false;\n }\n\n const include = (0, _values.getDirectiveValues)(\n _directives.GraphQLIncludeDirective,\n node,\n variableValues,\n );\n\n if (\n (include === null || include === void 0 ? void 0 : include.if) === false\n ) {\n return false;\n }\n\n return true;\n}\n/**\n * Determines if a fragment is applicable to the given type.\n */\n\nfunction doesFragmentConditionMatch(schema, fragment, type) {\n const typeConditionNode = fragment.typeCondition;\n\n if (!typeConditionNode) {\n return true;\n }\n\n const conditionalType = (0, _typeFromAST.typeFromAST)(\n schema,\n typeConditionNode,\n );\n\n if (conditionalType === type) {\n return true;\n }\n\n if ((0, _definition.isAbstractType)(conditionalType)) {\n return schema.isSubType(conditionalType, type);\n }\n\n return false;\n}\n/**\n * Implements the logic to compute the key of a given field's entry\n */\n\nfunction getFieldEntryKey(node) {\n return node.alias ? node.alias.value : node.name.value;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.SingleFieldSubscriptionsRule = SingleFieldSubscriptionsRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _kinds = require('../../language/kinds.js');\n\nvar _collectFields = require('../../execution/collectFields.js');\n\n/**\n * Subscriptions must only include a non-introspection field.\n *\n * A GraphQL subscription is valid only if it contains a single root field and\n * that root field is not an introspection field.\n *\n * See https://spec.graphql.org/draft/#sec-Single-root-field\n */\nfunction SingleFieldSubscriptionsRule(context) {\n return {\n OperationDefinition(node) {\n if (node.operation === 'subscription') {\n const schema = context.getSchema();\n const subscriptionType = schema.getSubscriptionType();\n\n if (subscriptionType) {\n const operationName = node.name ? node.name.value : null;\n const variableValues = Object.create(null);\n const document = context.getDocument();\n const fragments = Object.create(null);\n\n for (const definition of document.definitions) {\n if (definition.kind === _kinds.Kind.FRAGMENT_DEFINITION) {\n fragments[definition.name.value] = definition;\n }\n }\n\n const fields = (0, _collectFields.collectFields)(\n schema,\n fragments,\n variableValues,\n subscriptionType,\n node.selectionSet,\n );\n\n if (fields.size > 1) {\n const fieldSelectionLists = [...fields.values()];\n const extraFieldSelectionLists = fieldSelectionLists.slice(1);\n const extraFieldSelections = extraFieldSelectionLists.flat();\n context.reportError(\n new _GraphQLError.GraphQLError(\n operationName != null\n ? `Subscription \"${operationName}\" must select only one top level field.`\n : 'Anonymous Subscription must select only one top level field.',\n {\n nodes: extraFieldSelections,\n },\n ),\n );\n }\n\n for (const fieldNodes of fields.values()) {\n const field = fieldNodes[0];\n const fieldName = field.name.value;\n\n if (fieldName.startsWith('__')) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n operationName != null\n ? `Subscription \"${operationName}\" must not select an introspection top level field.`\n : 'Anonymous Subscription must not select an introspection top level field.',\n {\n nodes: fieldNodes,\n },\n ),\n );\n }\n }\n }\n }\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.groupBy = groupBy;\n\n/**\n * Groups array items into a Map, given a function to produce grouping key.\n */\nfunction groupBy(list, keyFn) {\n const result = new Map();\n\n for (const item of list) {\n const key = keyFn(item);\n const group = result.get(key);\n\n if (group === undefined) {\n result.set(key, [item]);\n } else {\n group.push(item);\n }\n }\n\n return result;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.UniqueArgumentDefinitionNamesRule = UniqueArgumentDefinitionNamesRule;\n\nvar _groupBy = require('../../jsutils/groupBy.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * Unique argument definition names\n *\n * A GraphQL Object or Interface type is only valid if all its fields have uniquely named arguments.\n * A GraphQL Directive is only valid if all its arguments are uniquely named.\n */\nfunction UniqueArgumentDefinitionNamesRule(context) {\n return {\n DirectiveDefinition(directiveNode) {\n var _directiveNode$argume;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n const argumentNodes =\n (_directiveNode$argume = directiveNode.arguments) !== null &&\n _directiveNode$argume !== void 0\n ? _directiveNode$argume\n : [];\n return checkArgUniqueness(`@${directiveNode.name.value}`, argumentNodes);\n },\n\n InterfaceTypeDefinition: checkArgUniquenessPerField,\n InterfaceTypeExtension: checkArgUniquenessPerField,\n ObjectTypeDefinition: checkArgUniquenessPerField,\n ObjectTypeExtension: checkArgUniquenessPerField,\n };\n\n function checkArgUniquenessPerField(typeNode) {\n var _typeNode$fields;\n\n const typeName = typeNode.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n\n const fieldNodes =\n (_typeNode$fields = typeNode.fields) !== null &&\n _typeNode$fields !== void 0\n ? _typeNode$fields\n : [];\n\n for (const fieldDef of fieldNodes) {\n var _fieldDef$arguments;\n\n const fieldName = fieldDef.name.value; // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n\n const argumentNodes =\n (_fieldDef$arguments = fieldDef.arguments) !== null &&\n _fieldDef$arguments !== void 0\n ? _fieldDef$arguments\n : [];\n checkArgUniqueness(`${typeName}.${fieldName}`, argumentNodes);\n }\n\n return false;\n }\n\n function checkArgUniqueness(parentName, argumentNodes) {\n const seenArgs = (0, _groupBy.groupBy)(\n argumentNodes,\n (arg) => arg.name.value,\n );\n\n for (const [argName, argNodes] of seenArgs) {\n if (argNodes.length > 1) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Argument \"${parentName}(${argName}:)\" can only be defined once.`,\n {\n nodes: argNodes.map((node) => node.name),\n },\n ),\n );\n }\n }\n\n return false;\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.UniqueArgumentNamesRule = UniqueArgumentNamesRule;\n\nvar _groupBy = require('../../jsutils/groupBy.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * Unique argument names\n *\n * A GraphQL field or directive is only valid if all supplied arguments are\n * uniquely named.\n *\n * See https://spec.graphql.org/draft/#sec-Argument-Names\n */\nfunction UniqueArgumentNamesRule(context) {\n return {\n Field: checkArgUniqueness,\n Directive: checkArgUniqueness,\n };\n\n function checkArgUniqueness(parentNode) {\n var _parentNode$arguments;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n const argumentNodes =\n (_parentNode$arguments = parentNode.arguments) !== null &&\n _parentNode$arguments !== void 0\n ? _parentNode$arguments\n : [];\n const seenArgs = (0, _groupBy.groupBy)(\n argumentNodes,\n (arg) => arg.name.value,\n );\n\n for (const [argName, argNodes] of seenArgs) {\n if (argNodes.length > 1) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `There can be only one argument named \"${argName}\".`,\n {\n nodes: argNodes.map((node) => node.name),\n },\n ),\n );\n }\n }\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.UniqueDirectiveNamesRule = UniqueDirectiveNamesRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * Unique directive names\n *\n * A GraphQL document is only valid if all defined directives have unique names.\n */\nfunction UniqueDirectiveNamesRule(context) {\n const knownDirectiveNames = Object.create(null);\n const schema = context.getSchema();\n return {\n DirectiveDefinition(node) {\n const directiveName = node.name.value;\n\n if (\n schema !== null &&\n schema !== void 0 &&\n schema.getDirective(directiveName)\n ) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Directive \"@${directiveName}\" already exists in the schema. It cannot be redefined.`,\n {\n nodes: node.name,\n },\n ),\n );\n return;\n }\n\n if (knownDirectiveNames[directiveName]) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `There can be only one directive named \"@${directiveName}\".`,\n {\n nodes: [knownDirectiveNames[directiveName], node.name],\n },\n ),\n );\n } else {\n knownDirectiveNames[directiveName] = node.name;\n }\n\n return false;\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.UniqueDirectivesPerLocationRule = UniqueDirectivesPerLocationRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _kinds = require('../../language/kinds.js');\n\nvar _predicates = require('../../language/predicates.js');\n\nvar _directives = require('../../type/directives.js');\n\n/**\n * Unique directive names per location\n *\n * A GraphQL document is only valid if all non-repeatable directives at\n * a given location are uniquely named.\n *\n * See https://spec.graphql.org/draft/#sec-Directives-Are-Unique-Per-Location\n */\nfunction UniqueDirectivesPerLocationRule(context) {\n const uniqueDirectiveMap = Object.create(null);\n const schema = context.getSchema();\n const definedDirectives = schema\n ? schema.getDirectives()\n : _directives.specifiedDirectives;\n\n for (const directive of definedDirectives) {\n uniqueDirectiveMap[directive.name] = !directive.isRepeatable;\n }\n\n const astDefinitions = context.getDocument().definitions;\n\n for (const def of astDefinitions) {\n if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {\n uniqueDirectiveMap[def.name.value] = !def.repeatable;\n }\n }\n\n const schemaDirectives = Object.create(null);\n const typeDirectivesMap = Object.create(null);\n return {\n // Many different AST nodes may contain directives. Rather than listing\n // them all, just listen for entering any node, and check to see if it\n // defines any directives.\n enter(node) {\n if (!('directives' in node) || !node.directives) {\n return;\n }\n\n let seenDirectives;\n\n if (\n node.kind === _kinds.Kind.SCHEMA_DEFINITION ||\n node.kind === _kinds.Kind.SCHEMA_EXTENSION\n ) {\n seenDirectives = schemaDirectives;\n } else if (\n (0, _predicates.isTypeDefinitionNode)(node) ||\n (0, _predicates.isTypeExtensionNode)(node)\n ) {\n const typeName = node.name.value;\n seenDirectives = typeDirectivesMap[typeName];\n\n if (seenDirectives === undefined) {\n typeDirectivesMap[typeName] = seenDirectives = Object.create(null);\n }\n } else {\n seenDirectives = Object.create(null);\n }\n\n for (const directive of node.directives) {\n const directiveName = directive.name.value;\n\n if (uniqueDirectiveMap[directiveName]) {\n if (seenDirectives[directiveName]) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `The directive \"@${directiveName}\" can only be used once at this location.`,\n {\n nodes: [seenDirectives[directiveName], directive],\n },\n ),\n );\n } else {\n seenDirectives[directiveName] = directive;\n }\n }\n }\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.UniqueEnumValueNamesRule = UniqueEnumValueNamesRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _definition = require('../../type/definition.js');\n\n/**\n * Unique enum value names\n *\n * A GraphQL enum type is only valid if all its values are uniquely named.\n */\nfunction UniqueEnumValueNamesRule(context) {\n const schema = context.getSchema();\n const existingTypeMap = schema ? schema.getTypeMap() : Object.create(null);\n const knownValueNames = Object.create(null);\n return {\n EnumTypeDefinition: checkValueUniqueness,\n EnumTypeExtension: checkValueUniqueness,\n };\n\n function checkValueUniqueness(node) {\n var _node$values;\n\n const typeName = node.name.value;\n\n if (!knownValueNames[typeName]) {\n knownValueNames[typeName] = Object.create(null);\n } // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n\n const valueNodes =\n (_node$values = node.values) !== null && _node$values !== void 0\n ? _node$values\n : [];\n const valueNames = knownValueNames[typeName];\n\n for (const valueDef of valueNodes) {\n const valueName = valueDef.name.value;\n const existingType = existingTypeMap[typeName];\n\n if (\n (0, _definition.isEnumType)(existingType) &&\n existingType.getValue(valueName)\n ) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Enum value \"${typeName}.${valueName}\" already exists in the schema. It cannot also be defined in this type extension.`,\n {\n nodes: valueDef.name,\n },\n ),\n );\n } else if (valueNames[valueName]) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Enum value \"${typeName}.${valueName}\" can only be defined once.`,\n {\n nodes: [valueNames[valueName], valueDef.name],\n },\n ),\n );\n } else {\n valueNames[valueName] = valueDef.name;\n }\n }\n\n return false;\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.UniqueFieldDefinitionNamesRule = UniqueFieldDefinitionNamesRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _definition = require('../../type/definition.js');\n\n/**\n * Unique field definition names\n *\n * A GraphQL complex type is only valid if all its fields are uniquely named.\n */\nfunction UniqueFieldDefinitionNamesRule(context) {\n const schema = context.getSchema();\n const existingTypeMap = schema ? schema.getTypeMap() : Object.create(null);\n const knownFieldNames = Object.create(null);\n return {\n InputObjectTypeDefinition: checkFieldUniqueness,\n InputObjectTypeExtension: checkFieldUniqueness,\n InterfaceTypeDefinition: checkFieldUniqueness,\n InterfaceTypeExtension: checkFieldUniqueness,\n ObjectTypeDefinition: checkFieldUniqueness,\n ObjectTypeExtension: checkFieldUniqueness,\n };\n\n function checkFieldUniqueness(node) {\n var _node$fields;\n\n const typeName = node.name.value;\n\n if (!knownFieldNames[typeName]) {\n knownFieldNames[typeName] = Object.create(null);\n } // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n\n const fieldNodes =\n (_node$fields = node.fields) !== null && _node$fields !== void 0\n ? _node$fields\n : [];\n const fieldNames = knownFieldNames[typeName];\n\n for (const fieldDef of fieldNodes) {\n const fieldName = fieldDef.name.value;\n\n if (hasField(existingTypeMap[typeName], fieldName)) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Field \"${typeName}.${fieldName}\" already exists in the schema. It cannot also be defined in this type extension.`,\n {\n nodes: fieldDef.name,\n },\n ),\n );\n } else if (fieldNames[fieldName]) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Field \"${typeName}.${fieldName}\" can only be defined once.`,\n {\n nodes: [fieldNames[fieldName], fieldDef.name],\n },\n ),\n );\n } else {\n fieldNames[fieldName] = fieldDef.name;\n }\n }\n\n return false;\n }\n}\n\nfunction hasField(type, fieldName) {\n if (\n (0, _definition.isObjectType)(type) ||\n (0, _definition.isInterfaceType)(type) ||\n (0, _definition.isInputObjectType)(type)\n ) {\n return type.getFields()[fieldName] != null;\n }\n\n return false;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.UniqueFragmentNamesRule = UniqueFragmentNamesRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * Unique fragment names\n *\n * A GraphQL document is only valid if all defined fragments have unique names.\n *\n * See https://spec.graphql.org/draft/#sec-Fragment-Name-Uniqueness\n */\nfunction UniqueFragmentNamesRule(context) {\n const knownFragmentNames = Object.create(null);\n return {\n OperationDefinition: () => false,\n\n FragmentDefinition(node) {\n const fragmentName = node.name.value;\n\n if (knownFragmentNames[fragmentName]) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `There can be only one fragment named \"${fragmentName}\".`,\n {\n nodes: [knownFragmentNames[fragmentName], node.name],\n },\n ),\n );\n } else {\n knownFragmentNames[fragmentName] = node.name;\n }\n\n return false;\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.UniqueInputFieldNamesRule = UniqueInputFieldNamesRule;\n\nvar _invariant = require('../../jsutils/invariant.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * Unique input field names\n *\n * A GraphQL input object value is only valid if all supplied fields are\n * uniquely named.\n *\n * See https://spec.graphql.org/draft/#sec-Input-Object-Field-Uniqueness\n */\nfunction UniqueInputFieldNamesRule(context) {\n const knownNameStack = [];\n let knownNames = Object.create(null);\n return {\n ObjectValue: {\n enter() {\n knownNameStack.push(knownNames);\n knownNames = Object.create(null);\n },\n\n leave() {\n const prevKnownNames = knownNameStack.pop();\n prevKnownNames || (0, _invariant.invariant)(false);\n knownNames = prevKnownNames;\n },\n },\n\n ObjectField(node) {\n const fieldName = node.name.value;\n\n if (knownNames[fieldName]) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `There can be only one input field named \"${fieldName}\".`,\n {\n nodes: [knownNames[fieldName], node.name],\n },\n ),\n );\n } else {\n knownNames[fieldName] = node.name;\n }\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.UniqueOperationNamesRule = UniqueOperationNamesRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * Unique operation names\n *\n * A GraphQL document is only valid if all defined operations have unique names.\n *\n * See https://spec.graphql.org/draft/#sec-Operation-Name-Uniqueness\n */\nfunction UniqueOperationNamesRule(context) {\n const knownOperationNames = Object.create(null);\n return {\n OperationDefinition(node) {\n const operationName = node.name;\n\n if (operationName) {\n if (knownOperationNames[operationName.value]) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `There can be only one operation named \"${operationName.value}\".`,\n {\n nodes: [\n knownOperationNames[operationName.value],\n operationName,\n ],\n },\n ),\n );\n } else {\n knownOperationNames[operationName.value] = operationName;\n }\n }\n\n return false;\n },\n\n FragmentDefinition: () => false,\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.UniqueOperationTypesRule = UniqueOperationTypesRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * Unique operation types\n *\n * A GraphQL document is only valid if it has only one type per operation.\n */\nfunction UniqueOperationTypesRule(context) {\n const schema = context.getSchema();\n const definedOperationTypes = Object.create(null);\n const existingOperationTypes = schema\n ? {\n query: schema.getQueryType(),\n mutation: schema.getMutationType(),\n subscription: schema.getSubscriptionType(),\n }\n : {};\n return {\n SchemaDefinition: checkOperationTypes,\n SchemaExtension: checkOperationTypes,\n };\n\n function checkOperationTypes(node) {\n var _node$operationTypes;\n\n // See: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n const operationTypesNodes =\n (_node$operationTypes = node.operationTypes) !== null &&\n _node$operationTypes !== void 0\n ? _node$operationTypes\n : [];\n\n for (const operationType of operationTypesNodes) {\n const operation = operationType.operation;\n const alreadyDefinedOperationType = definedOperationTypes[operation];\n\n if (existingOperationTypes[operation]) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Type for ${operation} already defined in the schema. It cannot be redefined.`,\n {\n nodes: operationType,\n },\n ),\n );\n } else if (alreadyDefinedOperationType) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `There can be only one ${operation} type in schema.`,\n {\n nodes: [alreadyDefinedOperationType, operationType],\n },\n ),\n );\n } else {\n definedOperationTypes[operation] = operationType;\n }\n }\n\n return false;\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.UniqueTypeNamesRule = UniqueTypeNamesRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * Unique type names\n *\n * A GraphQL document is only valid if all defined types have unique names.\n */\nfunction UniqueTypeNamesRule(context) {\n const knownTypeNames = Object.create(null);\n const schema = context.getSchema();\n return {\n ScalarTypeDefinition: checkTypeName,\n ObjectTypeDefinition: checkTypeName,\n InterfaceTypeDefinition: checkTypeName,\n UnionTypeDefinition: checkTypeName,\n EnumTypeDefinition: checkTypeName,\n InputObjectTypeDefinition: checkTypeName,\n };\n\n function checkTypeName(node) {\n const typeName = node.name.value;\n\n if (schema !== null && schema !== void 0 && schema.getType(typeName)) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Type \"${typeName}\" already exists in the schema. It cannot also be defined in this type definition.`,\n {\n nodes: node.name,\n },\n ),\n );\n return;\n }\n\n if (knownTypeNames[typeName]) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `There can be only one type named \"${typeName}\".`,\n {\n nodes: [knownTypeNames[typeName], node.name],\n },\n ),\n );\n } else {\n knownTypeNames[typeName] = node.name;\n }\n\n return false;\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.UniqueVariableNamesRule = UniqueVariableNamesRule;\n\nvar _groupBy = require('../../jsutils/groupBy.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\n/**\n * Unique variable names\n *\n * A GraphQL operation is only valid if all its variables are uniquely named.\n */\nfunction UniqueVariableNamesRule(context) {\n return {\n OperationDefinition(operationNode) {\n var _operationNode$variab;\n\n // See: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n const variableDefinitions =\n (_operationNode$variab = operationNode.variableDefinitions) !== null &&\n _operationNode$variab !== void 0\n ? _operationNode$variab\n : [];\n const seenVariableDefinitions = (0, _groupBy.groupBy)(\n variableDefinitions,\n (node) => node.variable.name.value,\n );\n\n for (const [variableName, variableNodes] of seenVariableDefinitions) {\n if (variableNodes.length > 1) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `There can be only one variable named \"$${variableName}\".`,\n {\n nodes: variableNodes.map((node) => node.variable.name),\n },\n ),\n );\n }\n }\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.ValuesOfCorrectTypeRule = ValuesOfCorrectTypeRule;\n\nvar _didYouMean = require('../../jsutils/didYouMean.js');\n\nvar _inspect = require('../../jsutils/inspect.js');\n\nvar _keyMap = require('../../jsutils/keyMap.js');\n\nvar _suggestionList = require('../../jsutils/suggestionList.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _kinds = require('../../language/kinds.js');\n\nvar _printer = require('../../language/printer.js');\n\nvar _definition = require('../../type/definition.js');\n\n/**\n * Value literals of correct type\n *\n * A GraphQL document is only valid if all value literals are of the type\n * expected at their position.\n *\n * See https://spec.graphql.org/draft/#sec-Values-of-Correct-Type\n */\nfunction ValuesOfCorrectTypeRule(context) {\n let variableDefinitions = {};\n return {\n OperationDefinition: {\n enter() {\n variableDefinitions = {};\n },\n },\n\n VariableDefinition(definition) {\n variableDefinitions[definition.variable.name.value] = definition;\n },\n\n ListValue(node) {\n // Note: TypeInfo will traverse into a list's item type, so look to the\n // parent input type to check if it is a list.\n const type = (0, _definition.getNullableType)(\n context.getParentInputType(),\n );\n\n if (!(0, _definition.isListType)(type)) {\n isValidValueNode(context, node);\n return false; // Don't traverse further.\n }\n },\n\n ObjectValue(node) {\n const type = (0, _definition.getNamedType)(context.getInputType());\n\n if (!(0, _definition.isInputObjectType)(type)) {\n isValidValueNode(context, node);\n return false; // Don't traverse further.\n } // Ensure every required field exists.\n\n const fieldNodeMap = (0, _keyMap.keyMap)(\n node.fields,\n (field) => field.name.value,\n );\n\n for (const fieldDef of Object.values(type.getFields())) {\n const fieldNode = fieldNodeMap[fieldDef.name];\n\n if (!fieldNode && (0, _definition.isRequiredInputField)(fieldDef)) {\n const typeStr = (0, _inspect.inspect)(fieldDef.type);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Field \"${type.name}.${fieldDef.name}\" of required type \"${typeStr}\" was not provided.`,\n {\n nodes: node,\n },\n ),\n );\n }\n }\n\n if (type.isOneOf) {\n validateOneOfInputObject(context, node, type, fieldNodeMap);\n }\n },\n\n ObjectField(node) {\n const parentType = (0, _definition.getNamedType)(\n context.getParentInputType(),\n );\n const fieldType = context.getInputType();\n\n if (!fieldType && (0, _definition.isInputObjectType)(parentType)) {\n const suggestions = (0, _suggestionList.suggestionList)(\n node.name.value,\n Object.keys(parentType.getFields()),\n );\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Field \"${node.name.value}\" is not defined by type \"${parentType.name}\".` +\n (0, _didYouMean.didYouMean)(suggestions),\n {\n nodes: node,\n },\n ),\n );\n }\n },\n\n NullValue(node) {\n const type = context.getInputType();\n\n if ((0, _definition.isNonNullType)(type)) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Expected value of type \"${(0, _inspect.inspect)(\n type,\n )}\", found ${(0, _printer.print)(node)}.`,\n {\n nodes: node,\n },\n ),\n );\n }\n },\n\n EnumValue: (node) => isValidValueNode(context, node),\n IntValue: (node) => isValidValueNode(context, node),\n FloatValue: (node) => isValidValueNode(context, node),\n StringValue: (node) => isValidValueNode(context, node),\n BooleanValue: (node) => isValidValueNode(context, node),\n };\n}\n/**\n * Any value literal may be a valid representation of a Scalar, depending on\n * that scalar type.\n */\n\nfunction isValidValueNode(context, node) {\n // Report any error at the full type expected by the location.\n const locationType = context.getInputType();\n\n if (!locationType) {\n return;\n }\n\n const type = (0, _definition.getNamedType)(locationType);\n\n if (!(0, _definition.isLeafType)(type)) {\n const typeStr = (0, _inspect.inspect)(locationType);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Expected value of type \"${typeStr}\", found ${(0, _printer.print)(\n node,\n )}.`,\n {\n nodes: node,\n },\n ),\n );\n return;\n } // Scalars and Enums determine if a literal value is valid via parseLiteral(),\n // which may throw or return an invalid value to indicate failure.\n\n try {\n const parseResult = type.parseLiteral(\n node,\n undefined,\n /* variables */\n );\n\n if (parseResult === undefined) {\n const typeStr = (0, _inspect.inspect)(locationType);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Expected value of type \"${typeStr}\", found ${(0, _printer.print)(\n node,\n )}.`,\n {\n nodes: node,\n },\n ),\n );\n }\n } catch (error) {\n const typeStr = (0, _inspect.inspect)(locationType);\n\n if (error instanceof _GraphQLError.GraphQLError) {\n context.reportError(error);\n } else {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Expected value of type \"${typeStr}\", found ${(0, _printer.print)(\n node,\n )}; ` + error.message,\n {\n nodes: node,\n originalError: error,\n },\n ),\n );\n }\n }\n}\n\nfunction validateOneOfInputObject(context, node, type, fieldNodeMap) {\n var _fieldNodeMap$keys$;\n\n const keys = Object.keys(fieldNodeMap);\n const isNotExactlyOneField = keys.length !== 1;\n\n if (isNotExactlyOneField) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `OneOf Input Object \"${type.name}\" must specify exactly one key.`,\n {\n nodes: [node],\n },\n ),\n );\n return;\n }\n\n const value =\n (_fieldNodeMap$keys$ = fieldNodeMap[keys[0]]) === null ||\n _fieldNodeMap$keys$ === void 0\n ? void 0\n : _fieldNodeMap$keys$.value;\n const isNullLiteral = !value || value.kind === _kinds.Kind.NULL;\n\n if (isNullLiteral) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Field \"${type.name}.${keys[0]}\" must be non-null.`,\n {\n nodes: [node],\n },\n ),\n );\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.VariablesAreInputTypesRule = VariablesAreInputTypesRule;\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _printer = require('../../language/printer.js');\n\nvar _definition = require('../../type/definition.js');\n\nvar _typeFromAST = require('../../utilities/typeFromAST.js');\n\n/**\n * Variables are input types\n *\n * A GraphQL operation is only valid if all the variables it defines are of\n * input types (scalar, enum, or input object).\n *\n * See https://spec.graphql.org/draft/#sec-Variables-Are-Input-Types\n */\nfunction VariablesAreInputTypesRule(context) {\n return {\n VariableDefinition(node) {\n const type = (0, _typeFromAST.typeFromAST)(\n context.getSchema(),\n node.type,\n );\n\n if (type !== undefined && !(0, _definition.isInputType)(type)) {\n const variableName = node.variable.name.value;\n const typeName = (0, _printer.print)(node.type);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Variable \"$${variableName}\" cannot be non-input type \"${typeName}\".`,\n {\n nodes: node.type,\n },\n ),\n );\n }\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.VariablesInAllowedPositionRule = VariablesInAllowedPositionRule;\n\nvar _inspect = require('../../jsutils/inspect.js');\n\nvar _GraphQLError = require('../../error/GraphQLError.js');\n\nvar _kinds = require('../../language/kinds.js');\n\nvar _definition = require('../../type/definition.js');\n\nvar _typeComparators = require('../../utilities/typeComparators.js');\n\nvar _typeFromAST = require('../../utilities/typeFromAST.js');\n\n/**\n * Variables in allowed position\n *\n * Variable usages must be compatible with the arguments they are passed to.\n *\n * See https://spec.graphql.org/draft/#sec-All-Variable-Usages-are-Allowed\n */\nfunction VariablesInAllowedPositionRule(context) {\n let varDefMap = Object.create(null);\n return {\n OperationDefinition: {\n enter() {\n varDefMap = Object.create(null);\n },\n\n leave(operation) {\n const usages = context.getRecursiveVariableUsages(operation);\n\n for (const { node, type, defaultValue, parentType } of usages) {\n const varName = node.name.value;\n const varDef = varDefMap[varName];\n\n if (varDef && type) {\n // A var type is allowed if it is the same or more strict (e.g. is\n // a subtype of) than the expected type. It can be more strict if\n // the variable type is non-null when the expected type is nullable.\n // If both are list types, the variable item type can be more strict\n // than the expected item type (contravariant).\n const schema = context.getSchema();\n const varType = (0, _typeFromAST.typeFromAST)(schema, varDef.type);\n\n if (\n varType &&\n !allowedVariableUsage(\n schema,\n varType,\n varDef.defaultValue,\n type,\n defaultValue,\n )\n ) {\n const varTypeStr = (0, _inspect.inspect)(varType);\n const typeStr = (0, _inspect.inspect)(type);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Variable \"$${varName}\" of type \"${varTypeStr}\" used in position expecting type \"${typeStr}\".`,\n {\n nodes: [varDef, node],\n },\n ),\n );\n }\n\n if (\n (0, _definition.isInputObjectType)(parentType) &&\n parentType.isOneOf &&\n (0, _definition.isNullableType)(varType)\n ) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Variable \"$${varName}\" is of type \"${varType}\" but must be non-nullable to be used for OneOf Input Object \"${parentType}\".`,\n {\n nodes: [varDef, node],\n },\n ),\n );\n }\n }\n }\n },\n },\n\n VariableDefinition(node) {\n varDefMap[node.variable.name.value] = node;\n },\n };\n}\n/**\n * Returns true if the variable is allowed in the location it was found,\n * which includes considering if default values exist for either the variable\n * or the location at which it is located.\n */\n\nfunction allowedVariableUsage(\n schema,\n varType,\n varDefaultValue,\n locationType,\n locationDefaultValue,\n) {\n if (\n (0, _definition.isNonNullType)(locationType) &&\n !(0, _definition.isNonNullType)(varType)\n ) {\n const hasNonNullVariableDefaultValue =\n varDefaultValue != null && varDefaultValue.kind !== _kinds.Kind.NULL;\n const hasLocationDefaultValue = locationDefaultValue !== undefined;\n\n if (!hasNonNullVariableDefaultValue && !hasLocationDefaultValue) {\n return false;\n }\n\n const nullableLocationType = locationType.ofType;\n return (0, _typeComparators.isTypeSubTypeOf)(\n schema,\n varType,\n nullableLocationType,\n );\n }\n\n return (0, _typeComparators.isTypeSubTypeOf)(schema, varType, locationType);\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.specifiedSDLRules =\n exports.specifiedRules =\n exports.recommendedRules =\n void 0;\n\nvar _ExecutableDefinitionsRule = require('./rules/ExecutableDefinitionsRule.js');\n\nvar _FieldsOnCorrectTypeRule = require('./rules/FieldsOnCorrectTypeRule.js');\n\nvar _FragmentsOnCompositeTypesRule = require('./rules/FragmentsOnCompositeTypesRule.js');\n\nvar _KnownArgumentNamesRule = require('./rules/KnownArgumentNamesRule.js');\n\nvar _KnownDirectivesRule = require('./rules/KnownDirectivesRule.js');\n\nvar _KnownFragmentNamesRule = require('./rules/KnownFragmentNamesRule.js');\n\nvar _KnownTypeNamesRule = require('./rules/KnownTypeNamesRule.js');\n\nvar _LoneAnonymousOperationRule = require('./rules/LoneAnonymousOperationRule.js');\n\nvar _LoneSchemaDefinitionRule = require('./rules/LoneSchemaDefinitionRule.js');\n\nvar _MaxIntrospectionDepthRule = require('./rules/MaxIntrospectionDepthRule.js');\n\nvar _NoFragmentCyclesRule = require('./rules/NoFragmentCyclesRule.js');\n\nvar _NoUndefinedVariablesRule = require('./rules/NoUndefinedVariablesRule.js');\n\nvar _NoUnusedFragmentsRule = require('./rules/NoUnusedFragmentsRule.js');\n\nvar _NoUnusedVariablesRule = require('./rules/NoUnusedVariablesRule.js');\n\nvar _OverlappingFieldsCanBeMergedRule = require('./rules/OverlappingFieldsCanBeMergedRule.js');\n\nvar _PossibleFragmentSpreadsRule = require('./rules/PossibleFragmentSpreadsRule.js');\n\nvar _PossibleTypeExtensionsRule = require('./rules/PossibleTypeExtensionsRule.js');\n\nvar _ProvidedRequiredArgumentsRule = require('./rules/ProvidedRequiredArgumentsRule.js');\n\nvar _ScalarLeafsRule = require('./rules/ScalarLeafsRule.js');\n\nvar _SingleFieldSubscriptionsRule = require('./rules/SingleFieldSubscriptionsRule.js');\n\nvar _UniqueArgumentDefinitionNamesRule = require('./rules/UniqueArgumentDefinitionNamesRule.js');\n\nvar _UniqueArgumentNamesRule = require('./rules/UniqueArgumentNamesRule.js');\n\nvar _UniqueDirectiveNamesRule = require('./rules/UniqueDirectiveNamesRule.js');\n\nvar _UniqueDirectivesPerLocationRule = require('./rules/UniqueDirectivesPerLocationRule.js');\n\nvar _UniqueEnumValueNamesRule = require('./rules/UniqueEnumValueNamesRule.js');\n\nvar _UniqueFieldDefinitionNamesRule = require('./rules/UniqueFieldDefinitionNamesRule.js');\n\nvar _UniqueFragmentNamesRule = require('./rules/UniqueFragmentNamesRule.js');\n\nvar _UniqueInputFieldNamesRule = require('./rules/UniqueInputFieldNamesRule.js');\n\nvar _UniqueOperationNamesRule = require('./rules/UniqueOperationNamesRule.js');\n\nvar _UniqueOperationTypesRule = require('./rules/UniqueOperationTypesRule.js');\n\nvar _UniqueTypeNamesRule = require('./rules/UniqueTypeNamesRule.js');\n\nvar _UniqueVariableNamesRule = require('./rules/UniqueVariableNamesRule.js');\n\nvar _ValuesOfCorrectTypeRule = require('./rules/ValuesOfCorrectTypeRule.js');\n\nvar _VariablesAreInputTypesRule = require('./rules/VariablesAreInputTypesRule.js');\n\nvar _VariablesInAllowedPositionRule = require('./rules/VariablesInAllowedPositionRule.js');\n\n// Spec Section: \"Executable Definitions\"\n// Spec Section: \"Field Selections on Objects, Interfaces, and Unions Types\"\n// Spec Section: \"Fragments on Composite Types\"\n// Spec Section: \"Argument Names\"\n// Spec Section: \"Directives Are Defined\"\n// Spec Section: \"Fragment spread target defined\"\n// Spec Section: \"Fragment Spread Type Existence\"\n// Spec Section: \"Lone Anonymous Operation\"\n// SDL-specific validation rules\n// TODO: Spec Section\n// Spec Section: \"Fragments must not form cycles\"\n// Spec Section: \"All Variable Used Defined\"\n// Spec Section: \"Fragments must be used\"\n// Spec Section: \"All Variables Used\"\n// Spec Section: \"Field Selection Merging\"\n// Spec Section: \"Fragment spread is possible\"\n// Spec Section: \"Argument Optionality\"\n// Spec Section: \"Leaf Field Selections\"\n// Spec Section: \"Subscriptions with Single Root Field\"\n// Spec Section: \"Argument Uniqueness\"\n// Spec Section: \"Directives Are Unique Per Location\"\n// Spec Section: \"Fragment Name Uniqueness\"\n// Spec Section: \"Input Object Field Uniqueness\"\n// Spec Section: \"Operation Name Uniqueness\"\n// Spec Section: \"Variable Uniqueness\"\n// Spec Section: \"Value Type Correctness\"\n// Spec Section: \"Variables are Input Types\"\n// Spec Section: \"All Variable Usages Are Allowed\"\n\n/**\n * Technically these aren't part of the spec but they are strongly encouraged\n * validation rules.\n */\nconst recommendedRules = Object.freeze([\n _MaxIntrospectionDepthRule.MaxIntrospectionDepthRule,\n]);\n/**\n * This set includes all validation rules defined by the GraphQL spec.\n *\n * The order of the rules in this list has been adjusted to lead to the\n * most clear output when encountering multiple validation errors.\n */\n\nexports.recommendedRules = recommendedRules;\nconst specifiedRules = Object.freeze([\n _ExecutableDefinitionsRule.ExecutableDefinitionsRule,\n _UniqueOperationNamesRule.UniqueOperationNamesRule,\n _LoneAnonymousOperationRule.LoneAnonymousOperationRule,\n _SingleFieldSubscriptionsRule.SingleFieldSubscriptionsRule,\n _KnownTypeNamesRule.KnownTypeNamesRule,\n _FragmentsOnCompositeTypesRule.FragmentsOnCompositeTypesRule,\n _VariablesAreInputTypesRule.VariablesAreInputTypesRule,\n _ScalarLeafsRule.ScalarLeafsRule,\n _FieldsOnCorrectTypeRule.FieldsOnCorrectTypeRule,\n _UniqueFragmentNamesRule.UniqueFragmentNamesRule,\n _KnownFragmentNamesRule.KnownFragmentNamesRule,\n _NoUnusedFragmentsRule.NoUnusedFragmentsRule,\n _PossibleFragmentSpreadsRule.PossibleFragmentSpreadsRule,\n _NoFragmentCyclesRule.NoFragmentCyclesRule,\n _UniqueVariableNamesRule.UniqueVariableNamesRule,\n _NoUndefinedVariablesRule.NoUndefinedVariablesRule,\n _NoUnusedVariablesRule.NoUnusedVariablesRule,\n _KnownDirectivesRule.KnownDirectivesRule,\n _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule,\n _KnownArgumentNamesRule.KnownArgumentNamesRule,\n _UniqueArgumentNamesRule.UniqueArgumentNamesRule,\n _ValuesOfCorrectTypeRule.ValuesOfCorrectTypeRule,\n _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsRule,\n _VariablesInAllowedPositionRule.VariablesInAllowedPositionRule,\n _OverlappingFieldsCanBeMergedRule.OverlappingFieldsCanBeMergedRule,\n _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule,\n ...recommendedRules,\n]);\n/**\n * @internal\n */\n\nexports.specifiedRules = specifiedRules;\nconst specifiedSDLRules = Object.freeze([\n _LoneSchemaDefinitionRule.LoneSchemaDefinitionRule,\n _UniqueOperationTypesRule.UniqueOperationTypesRule,\n _UniqueTypeNamesRule.UniqueTypeNamesRule,\n _UniqueEnumValueNamesRule.UniqueEnumValueNamesRule,\n _UniqueFieldDefinitionNamesRule.UniqueFieldDefinitionNamesRule,\n _UniqueArgumentDefinitionNamesRule.UniqueArgumentDefinitionNamesRule,\n _UniqueDirectiveNamesRule.UniqueDirectiveNamesRule,\n _KnownTypeNamesRule.KnownTypeNamesRule,\n _KnownDirectivesRule.KnownDirectivesRule,\n _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule,\n _PossibleTypeExtensionsRule.PossibleTypeExtensionsRule,\n _KnownArgumentNamesRule.KnownArgumentNamesOnDirectivesRule,\n _UniqueArgumentNamesRule.UniqueArgumentNamesRule,\n _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule,\n _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsOnDirectivesRule,\n]);\nexports.specifiedSDLRules = specifiedSDLRules;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.ValidationContext =\n exports.SDLValidationContext =\n exports.ASTValidationContext =\n void 0;\n\nvar _kinds = require('../language/kinds.js');\n\nvar _visitor = require('../language/visitor.js');\n\nvar _TypeInfo = require('../utilities/TypeInfo.js');\n\n/**\n * An instance of this class is passed as the \"this\" context to all validators,\n * allowing access to commonly useful contextual information from within a\n * validation rule.\n */\nclass ASTValidationContext {\n constructor(ast, onError) {\n this._ast = ast;\n this._fragments = undefined;\n this._fragmentSpreads = new Map();\n this._recursivelyReferencedFragments = new Map();\n this._onError = onError;\n }\n\n get [Symbol.toStringTag]() {\n return 'ASTValidationContext';\n }\n\n reportError(error) {\n this._onError(error);\n }\n\n getDocument() {\n return this._ast;\n }\n\n getFragment(name) {\n let fragments;\n\n if (this._fragments) {\n fragments = this._fragments;\n } else {\n fragments = Object.create(null);\n\n for (const defNode of this.getDocument().definitions) {\n if (defNode.kind === _kinds.Kind.FRAGMENT_DEFINITION) {\n fragments[defNode.name.value] = defNode;\n }\n }\n\n this._fragments = fragments;\n }\n\n return fragments[name];\n }\n\n getFragmentSpreads(node) {\n let spreads = this._fragmentSpreads.get(node);\n\n if (!spreads) {\n spreads = [];\n const setsToVisit = [node];\n let set;\n\n while ((set = setsToVisit.pop())) {\n for (const selection of set.selections) {\n if (selection.kind === _kinds.Kind.FRAGMENT_SPREAD) {\n spreads.push(selection);\n } else if (selection.selectionSet) {\n setsToVisit.push(selection.selectionSet);\n }\n }\n }\n\n this._fragmentSpreads.set(node, spreads);\n }\n\n return spreads;\n }\n\n getRecursivelyReferencedFragments(operation) {\n let fragments = this._recursivelyReferencedFragments.get(operation);\n\n if (!fragments) {\n fragments = [];\n const collectedNames = Object.create(null);\n const nodesToVisit = [operation.selectionSet];\n let node;\n\n while ((node = nodesToVisit.pop())) {\n for (const spread of this.getFragmentSpreads(node)) {\n const fragName = spread.name.value;\n\n if (collectedNames[fragName] !== true) {\n collectedNames[fragName] = true;\n const fragment = this.getFragment(fragName);\n\n if (fragment) {\n fragments.push(fragment);\n nodesToVisit.push(fragment.selectionSet);\n }\n }\n }\n }\n\n this._recursivelyReferencedFragments.set(operation, fragments);\n }\n\n return fragments;\n }\n}\n\nexports.ASTValidationContext = ASTValidationContext;\n\nclass SDLValidationContext extends ASTValidationContext {\n constructor(ast, schema, onError) {\n super(ast, onError);\n this._schema = schema;\n }\n\n get [Symbol.toStringTag]() {\n return 'SDLValidationContext';\n }\n\n getSchema() {\n return this._schema;\n }\n}\n\nexports.SDLValidationContext = SDLValidationContext;\n\nclass ValidationContext extends ASTValidationContext {\n constructor(schema, ast, typeInfo, onError) {\n super(ast, onError);\n this._schema = schema;\n this._typeInfo = typeInfo;\n this._variableUsages = new Map();\n this._recursiveVariableUsages = new Map();\n }\n\n get [Symbol.toStringTag]() {\n return 'ValidationContext';\n }\n\n getSchema() {\n return this._schema;\n }\n\n getVariableUsages(node) {\n let usages = this._variableUsages.get(node);\n\n if (!usages) {\n const newUsages = [];\n const typeInfo = new _TypeInfo.TypeInfo(this._schema);\n (0, _visitor.visit)(\n node,\n (0, _TypeInfo.visitWithTypeInfo)(typeInfo, {\n VariableDefinition: () => false,\n\n Variable(variable) {\n newUsages.push({\n node: variable,\n type: typeInfo.getInputType(),\n defaultValue: typeInfo.getDefaultValue(),\n parentType: typeInfo.getParentInputType(),\n });\n },\n }),\n );\n usages = newUsages;\n\n this._variableUsages.set(node, usages);\n }\n\n return usages;\n }\n\n getRecursiveVariableUsages(operation) {\n let usages = this._recursiveVariableUsages.get(operation);\n\n if (!usages) {\n usages = this.getVariableUsages(operation);\n\n for (const frag of this.getRecursivelyReferencedFragments(operation)) {\n usages = usages.concat(this.getVariableUsages(frag));\n }\n\n this._recursiveVariableUsages.set(operation, usages);\n }\n\n return usages;\n }\n\n getType() {\n return this._typeInfo.getType();\n }\n\n getParentType() {\n return this._typeInfo.getParentType();\n }\n\n getInputType() {\n return this._typeInfo.getInputType();\n }\n\n getParentInputType() {\n return this._typeInfo.getParentInputType();\n }\n\n getFieldDef() {\n return this._typeInfo.getFieldDef();\n }\n\n getDirective() {\n return this._typeInfo.getDirective();\n }\n\n getArgument() {\n return this._typeInfo.getArgument();\n }\n\n getEnumValue() {\n return this._typeInfo.getEnumValue();\n }\n}\n\nexports.ValidationContext = ValidationContext;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.assertValidSDL = assertValidSDL;\nexports.assertValidSDLExtension = assertValidSDLExtension;\nexports.validate = validate;\nexports.validateSDL = validateSDL;\n\nvar _devAssert = require('../jsutils/devAssert.js');\n\nvar _GraphQLError = require('../error/GraphQLError.js');\n\nvar _visitor = require('../language/visitor.js');\n\nvar _validate = require('../type/validate.js');\n\nvar _TypeInfo = require('../utilities/TypeInfo.js');\n\nvar _specifiedRules = require('./specifiedRules.js');\n\nvar _ValidationContext = require('./ValidationContext.js');\n\n/**\n * Implements the \"Validation\" section of the spec.\n *\n * Validation runs synchronously, returning an array of encountered errors, or\n * an empty array if no errors were encountered and the document is valid.\n *\n * A list of specific validation rules may be provided. If not provided, the\n * default list of rules defined by the GraphQL specification will be used.\n *\n * Each validation rules is a function which returns a visitor\n * (see the language/visitor API). Visitor methods are expected to return\n * GraphQLErrors, or Arrays of GraphQLErrors when invalid.\n *\n * Validate will stop validation after a `maxErrors` limit has been reached.\n * Attackers can send pathologically invalid queries to induce a DoS attack,\n * so by default `maxErrors` set to 100 errors.\n *\n * Optionally a custom TypeInfo instance may be provided. If not provided, one\n * will be created from the provided schema.\n */\nfunction validate(\n schema,\n documentAST,\n rules = _specifiedRules.specifiedRules,\n options,\n /** @deprecated will be removed in 17.0.0 */\n typeInfo = new _TypeInfo.TypeInfo(schema),\n) {\n var _options$maxErrors;\n\n const maxErrors =\n (_options$maxErrors =\n options === null || options === void 0 ? void 0 : options.maxErrors) !==\n null && _options$maxErrors !== void 0\n ? _options$maxErrors\n : 100;\n documentAST || (0, _devAssert.devAssert)(false, 'Must provide document.'); // If the schema used for validation is invalid, throw an error.\n\n (0, _validate.assertValidSchema)(schema);\n const abortObj = Object.freeze({});\n const errors = [];\n const context = new _ValidationContext.ValidationContext(\n schema,\n documentAST,\n typeInfo,\n (error) => {\n if (errors.length >= maxErrors) {\n errors.push(\n new _GraphQLError.GraphQLError(\n 'Too many validation errors, error limit reached. Validation aborted.',\n ),\n ); // eslint-disable-next-line @typescript-eslint/no-throw-literal\n\n throw abortObj;\n }\n\n errors.push(error);\n },\n ); // This uses a specialized visitor which runs multiple visitors in parallel,\n // while maintaining the visitor skip and break API.\n\n const visitor = (0, _visitor.visitInParallel)(\n rules.map((rule) => rule(context)),\n ); // Visit the whole document with each instance of all provided rules.\n\n try {\n (0, _visitor.visit)(\n documentAST,\n (0, _TypeInfo.visitWithTypeInfo)(typeInfo, visitor),\n );\n } catch (e) {\n if (e !== abortObj) {\n throw e;\n }\n }\n\n return errors;\n}\n/**\n * @internal\n */\n\nfunction validateSDL(\n documentAST,\n schemaToExtend,\n rules = _specifiedRules.specifiedSDLRules,\n) {\n const errors = [];\n const context = new _ValidationContext.SDLValidationContext(\n documentAST,\n schemaToExtend,\n (error) => {\n errors.push(error);\n },\n );\n const visitors = rules.map((rule) => rule(context));\n (0, _visitor.visit)(documentAST, (0, _visitor.visitInParallel)(visitors));\n return errors;\n}\n/**\n * Utility function which asserts a SDL document is valid by throwing an error\n * if it is invalid.\n *\n * @internal\n */\n\nfunction assertValidSDL(documentAST) {\n const errors = validateSDL(documentAST);\n\n if (errors.length !== 0) {\n throw new Error(errors.map((error) => error.message).join('\\n\\n'));\n }\n}\n/**\n * Utility function which asserts a SDL document is valid by throwing an error\n * if it is invalid.\n *\n * @internal\n */\n\nfunction assertValidSDLExtension(documentAST, schema) {\n const errors = validateSDL(documentAST, schema);\n\n if (errors.length !== 0) {\n throw new Error(errors.map((error) => error.message).join('\\n\\n'));\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.memoize3 = memoize3;\n\n/**\n * Memoizes the provided three-argument function.\n */\nfunction memoize3(fn) {\n let cache0;\n return function memoized(a1, a2, a3) {\n if (cache0 === undefined) {\n cache0 = new WeakMap();\n }\n\n let cache1 = cache0.get(a1);\n\n if (cache1 === undefined) {\n cache1 = new WeakMap();\n cache0.set(a1, cache1);\n }\n\n let cache2 = cache1.get(a2);\n\n if (cache2 === undefined) {\n cache2 = new WeakMap();\n cache1.set(a2, cache2);\n }\n\n let fnResult = cache2.get(a3);\n\n if (fnResult === undefined) {\n fnResult = fn(a1, a2, a3);\n cache2.set(a3, fnResult);\n }\n\n return fnResult;\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.promiseForObject = promiseForObject;\n\n/**\n * This function transforms a JS object `ObjMap<Promise<T>>` into\n * a `Promise<ObjMap<T>>`\n *\n * This is akin to bluebird's `Promise.props`, but implemented only using\n * `Promise.all` so it will work with any implementation of ES6 promises.\n */\nfunction promiseForObject(object) {\n return Promise.all(Object.values(object)).then((resolvedValues) => {\n const resolvedObject = Object.create(null);\n\n for (const [i, key] of Object.keys(object).entries()) {\n resolvedObject[key] = resolvedValues[i];\n }\n\n return resolvedObject;\n });\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.promiseReduce = promiseReduce;\n\nvar _isPromise = require('./isPromise.js');\n\n/**\n * Similar to Array.prototype.reduce(), however the reducing callback may return\n * a Promise, in which case reduction will continue after each promise resolves.\n *\n * If the callback does not return a Promise, then this function will also not\n * return a Promise.\n */\nfunction promiseReduce(values, callbackFn, initialValue) {\n let accumulator = initialValue;\n\n for (const value of values) {\n accumulator = (0, _isPromise.isPromise)(accumulator)\n ? accumulator.then((resolved) => callbackFn(resolved, value))\n : callbackFn(accumulator, value);\n }\n\n return accumulator;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.toError = toError;\n\nvar _inspect = require('./inspect.js');\n\n/**\n * Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface.\n */\nfunction toError(thrownValue) {\n return thrownValue instanceof Error\n ? thrownValue\n : new NonErrorThrown(thrownValue);\n}\n\nclass NonErrorThrown extends Error {\n constructor(thrownValue) {\n super('Unexpected error value: ' + (0, _inspect.inspect)(thrownValue));\n this.name = 'NonErrorThrown';\n this.thrownValue = thrownValue;\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.locatedError = locatedError;\n\nvar _toError = require('../jsutils/toError.js');\n\nvar _GraphQLError = require('./GraphQLError.js');\n\n/**\n * Given an arbitrary value, presumably thrown while attempting to execute a\n * GraphQL operation, produce a new GraphQLError aware of the location in the\n * document responsible for the original Error.\n */\nfunction locatedError(rawOriginalError, nodes, path) {\n var _nodes;\n\n const originalError = (0, _toError.toError)(rawOriginalError); // Note: this uses a brand-check to support GraphQL errors originating from other contexts.\n\n if (isLocatedGraphQLError(originalError)) {\n return originalError;\n }\n\n return new _GraphQLError.GraphQLError(originalError.message, {\n nodes:\n (_nodes = originalError.nodes) !== null && _nodes !== void 0\n ? _nodes\n : nodes,\n source: originalError.source,\n positions: originalError.positions,\n path,\n originalError,\n });\n}\n\nfunction isLocatedGraphQLError(error) {\n return Array.isArray(error.path);\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.assertValidExecutionArguments = assertValidExecutionArguments;\nexports.buildExecutionContext = buildExecutionContext;\nexports.buildResolveInfo = buildResolveInfo;\nexports.defaultTypeResolver = exports.defaultFieldResolver = void 0;\nexports.execute = execute;\nexports.executeSync = executeSync;\nexports.getFieldDef = getFieldDef;\n\nvar _devAssert = require('../jsutils/devAssert.js');\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _invariant = require('../jsutils/invariant.js');\n\nvar _isIterableObject = require('../jsutils/isIterableObject.js');\n\nvar _isObjectLike = require('../jsutils/isObjectLike.js');\n\nvar _isPromise = require('../jsutils/isPromise.js');\n\nvar _memoize = require('../jsutils/memoize3.js');\n\nvar _Path = require('../jsutils/Path.js');\n\nvar _promiseForObject = require('../jsutils/promiseForObject.js');\n\nvar _promiseReduce = require('../jsutils/promiseReduce.js');\n\nvar _GraphQLError = require('../error/GraphQLError.js');\n\nvar _locatedError = require('../error/locatedError.js');\n\nvar _ast = require('../language/ast.js');\n\nvar _kinds = require('../language/kinds.js');\n\nvar _definition = require('../type/definition.js');\n\nvar _introspection = require('../type/introspection.js');\n\nvar _validate = require('../type/validate.js');\n\nvar _collectFields = require('./collectFields.js');\n\nvar _values = require('./values.js');\n\n/**\n * A memoized collection of relevant subfields with regard to the return\n * type. Memoizing ensures the subfields are not repeatedly calculated, which\n * saves overhead when resolving lists of values.\n */\nconst collectSubfields = (0, _memoize.memoize3)(\n (exeContext, returnType, fieldNodes) =>\n (0, _collectFields.collectSubfields)(\n exeContext.schema,\n exeContext.fragments,\n exeContext.variableValues,\n returnType,\n fieldNodes,\n ),\n);\n/**\n * Terminology\n *\n * \"Definitions\" are the generic name for top-level statements in the document.\n * Examples of this include:\n * 1) Operations (such as a query)\n * 2) Fragments\n *\n * \"Operations\" are a generic name for requests in the document.\n * Examples of this include:\n * 1) query,\n * 2) mutation\n *\n * \"Selections\" are the definitions that can appear legally and at\n * single level of the query. These include:\n * 1) field references e.g `a`\n * 2) fragment \"spreads\" e.g. `...c`\n * 3) inline fragment \"spreads\" e.g. `...on Type { a }`\n */\n\n/**\n * Data that must be available at all points during query execution.\n *\n * Namely, schema of the type system that is currently executing,\n * and the fragments defined in the query document\n */\n\n/**\n * Implements the \"Executing requests\" section of the GraphQL specification.\n *\n * Returns either a synchronous ExecutionResult (if all encountered resolvers\n * are synchronous), or a Promise of an ExecutionResult that will eventually be\n * resolved and never rejected.\n *\n * If the arguments to this function do not result in a legal execution context,\n * a GraphQLError will be thrown immediately explaining the invalid input.\n */\nfunction execute(args) {\n // Temporary for v15 to v16 migration. Remove in v17\n arguments.length < 2 ||\n (0, _devAssert.devAssert)(\n false,\n 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.',\n );\n const { schema, document, variableValues, rootValue } = args; // If arguments are missing or incorrect, throw an error.\n\n assertValidExecutionArguments(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments,\n // a \"Response\" with only errors is returned.\n\n const exeContext = buildExecutionContext(args); // Return early errors if execution context failed.\n\n if (!('schema' in exeContext)) {\n return {\n errors: exeContext,\n };\n } // Return a Promise that will eventually resolve to the data described by\n // The \"Response\" section of the GraphQL specification.\n //\n // If errors are encountered while executing a GraphQL field, only that\n // field and its descendants will be omitted, and sibling fields will still\n // be executed. An execution which encounters errors will still result in a\n // resolved Promise.\n //\n // Errors from sub-fields of a NonNull type may propagate to the top level,\n // at which point we still log the error and null the parent field, which\n // in this case is the entire response.\n\n try {\n const { operation } = exeContext;\n const result = executeOperation(exeContext, operation, rootValue);\n\n if ((0, _isPromise.isPromise)(result)) {\n return result.then(\n (data) => buildResponse(data, exeContext.errors),\n (error) => {\n exeContext.errors.push(error);\n return buildResponse(null, exeContext.errors);\n },\n );\n }\n\n return buildResponse(result, exeContext.errors);\n } catch (error) {\n exeContext.errors.push(error);\n return buildResponse(null, exeContext.errors);\n }\n}\n/**\n * Also implements the \"Executing requests\" section of the GraphQL specification.\n * However, it guarantees to complete synchronously (or throw an error) assuming\n * that all field resolvers are also synchronous.\n */\n\nfunction executeSync(args) {\n const result = execute(args); // Assert that the execution was synchronous.\n\n if ((0, _isPromise.isPromise)(result)) {\n throw new Error('GraphQL execution failed to complete synchronously.');\n }\n\n return result;\n}\n/**\n * Given a completed execution context and data, build the `{ errors, data }`\n * response defined by the \"Response\" section of the GraphQL specification.\n */\n\nfunction buildResponse(data, errors) {\n return errors.length === 0\n ? {\n data,\n }\n : {\n errors,\n data,\n };\n}\n/**\n * Essential assertions before executing to provide developer feedback for\n * improper use of the GraphQL library.\n *\n * @internal\n */\n\nfunction assertValidExecutionArguments(schema, document, rawVariableValues) {\n document || (0, _devAssert.devAssert)(false, 'Must provide document.'); // If the schema used for execution is invalid, throw an error.\n\n (0, _validate.assertValidSchema)(schema); // Variables, if provided, must be an object.\n\n rawVariableValues == null ||\n (0, _isObjectLike.isObjectLike)(rawVariableValues) ||\n (0, _devAssert.devAssert)(\n false,\n 'Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.',\n );\n}\n/**\n * Constructs a ExecutionContext object from the arguments passed to\n * execute, which we will pass throughout the other execution methods.\n *\n * Throws a GraphQLError if a valid execution context cannot be created.\n *\n * @internal\n */\n\nfunction buildExecutionContext(args) {\n var _definition$name, _operation$variableDe, _options$maxCoercionE;\n\n const {\n schema,\n document,\n rootValue,\n contextValue,\n variableValues: rawVariableValues,\n operationName,\n fieldResolver,\n typeResolver,\n subscribeFieldResolver,\n options,\n } = args;\n let operation;\n const fragments = Object.create(null);\n\n for (const definition of document.definitions) {\n switch (definition.kind) {\n case _kinds.Kind.OPERATION_DEFINITION:\n if (operationName == null) {\n if (operation !== undefined) {\n return [\n new _GraphQLError.GraphQLError(\n 'Must provide operation name if query contains multiple operations.',\n ),\n ];\n }\n\n operation = definition;\n } else if (\n ((_definition$name = definition.name) === null ||\n _definition$name === void 0\n ? void 0\n : _definition$name.value) === operationName\n ) {\n operation = definition;\n }\n\n break;\n\n case _kinds.Kind.FRAGMENT_DEFINITION:\n fragments[definition.name.value] = definition;\n break;\n\n default: // ignore non-executable definitions\n }\n }\n\n if (!operation) {\n if (operationName != null) {\n return [\n new _GraphQLError.GraphQLError(\n `Unknown operation named \"${operationName}\".`,\n ),\n ];\n }\n\n return [new _GraphQLError.GraphQLError('Must provide an operation.')];\n } // FIXME: https://github.com/graphql/graphql-js/issues/2203\n\n /* c8 ignore next */\n\n const variableDefinitions =\n (_operation$variableDe = operation.variableDefinitions) !== null &&\n _operation$variableDe !== void 0\n ? _operation$variableDe\n : [];\n const coercedVariableValues = (0, _values.getVariableValues)(\n schema,\n variableDefinitions,\n rawVariableValues !== null && rawVariableValues !== void 0\n ? rawVariableValues\n : {},\n {\n maxErrors:\n (_options$maxCoercionE =\n options === null || options === void 0\n ? void 0\n : options.maxCoercionErrors) !== null &&\n _options$maxCoercionE !== void 0\n ? _options$maxCoercionE\n : 50,\n },\n );\n\n if (coercedVariableValues.errors) {\n return coercedVariableValues.errors;\n }\n\n return {\n schema,\n fragments,\n rootValue,\n contextValue,\n operation,\n variableValues: coercedVariableValues.coerced,\n fieldResolver:\n fieldResolver !== null && fieldResolver !== void 0\n ? fieldResolver\n : defaultFieldResolver,\n typeResolver:\n typeResolver !== null && typeResolver !== void 0\n ? typeResolver\n : defaultTypeResolver,\n subscribeFieldResolver:\n subscribeFieldResolver !== null && subscribeFieldResolver !== void 0\n ? subscribeFieldResolver\n : defaultFieldResolver,\n errors: [],\n };\n}\n/**\n * Implements the \"Executing operations\" section of the spec.\n */\n\nfunction executeOperation(exeContext, operation, rootValue) {\n const rootType = exeContext.schema.getRootType(operation.operation);\n\n if (rootType == null) {\n throw new _GraphQLError.GraphQLError(\n `Schema is not configured to execute ${operation.operation} operation.`,\n {\n nodes: operation,\n },\n );\n }\n\n const rootFields = (0, _collectFields.collectFields)(\n exeContext.schema,\n exeContext.fragments,\n exeContext.variableValues,\n rootType,\n operation.selectionSet,\n );\n const path = undefined;\n\n switch (operation.operation) {\n case _ast.OperationTypeNode.QUERY:\n return executeFields(exeContext, rootType, rootValue, path, rootFields);\n\n case _ast.OperationTypeNode.MUTATION:\n return executeFieldsSerially(\n exeContext,\n rootType,\n rootValue,\n path,\n rootFields,\n );\n\n case _ast.OperationTypeNode.SUBSCRIPTION:\n // TODO: deprecate `subscribe` and move all logic here\n // Temporary solution until we finish merging execute and subscribe together\n return executeFields(exeContext, rootType, rootValue, path, rootFields);\n }\n}\n/**\n * Implements the \"Executing selection sets\" section of the spec\n * for fields that must be executed serially.\n */\n\nfunction executeFieldsSerially(\n exeContext,\n parentType,\n sourceValue,\n path,\n fields,\n) {\n return (0, _promiseReduce.promiseReduce)(\n fields.entries(),\n (results, [responseName, fieldNodes]) => {\n const fieldPath = (0, _Path.addPath)(path, responseName, parentType.name);\n const result = executeField(\n exeContext,\n parentType,\n sourceValue,\n fieldNodes,\n fieldPath,\n );\n\n if (result === undefined) {\n return results;\n }\n\n if ((0, _isPromise.isPromise)(result)) {\n return result.then((resolvedResult) => {\n results[responseName] = resolvedResult;\n return results;\n });\n }\n\n results[responseName] = result;\n return results;\n },\n Object.create(null),\n );\n}\n/**\n * Implements the \"Executing selection sets\" section of the spec\n * for fields that may be executed in parallel.\n */\n\nfunction executeFields(exeContext, parentType, sourceValue, path, fields) {\n const results = Object.create(null);\n let containsPromise = false;\n\n try {\n for (const [responseName, fieldNodes] of fields.entries()) {\n const fieldPath = (0, _Path.addPath)(path, responseName, parentType.name);\n const result = executeField(\n exeContext,\n parentType,\n sourceValue,\n fieldNodes,\n fieldPath,\n );\n\n if (result !== undefined) {\n results[responseName] = result;\n\n if ((0, _isPromise.isPromise)(result)) {\n containsPromise = true;\n }\n }\n }\n } catch (error) {\n if (containsPromise) {\n // Ensure that any promises returned by other fields are handled, as they may also reject.\n return (0, _promiseForObject.promiseForObject)(results).finally(() => {\n throw error;\n });\n }\n\n throw error;\n } // If there are no promises, we can just return the object\n\n if (!containsPromise) {\n return results;\n } // Otherwise, results is a map from field name to the result of resolving that\n // field, which is possibly a promise. Return a promise that will return this\n // same map, but with any promises replaced with the values they resolved to.\n\n return (0, _promiseForObject.promiseForObject)(results);\n}\n/**\n * Implements the \"Executing fields\" section of the spec\n * In particular, this function figures out the value that the field returns by\n * calling its resolve function, then calls completeValue to complete promises,\n * serialize scalars, or execute the sub-selection-set for objects.\n */\n\nfunction executeField(exeContext, parentType, source, fieldNodes, path) {\n var _fieldDef$resolve;\n\n const fieldDef = getFieldDef(exeContext.schema, parentType, fieldNodes[0]);\n\n if (!fieldDef) {\n return;\n }\n\n const returnType = fieldDef.type;\n const resolveFn =\n (_fieldDef$resolve = fieldDef.resolve) !== null &&\n _fieldDef$resolve !== void 0\n ? _fieldDef$resolve\n : exeContext.fieldResolver;\n const info = buildResolveInfo(\n exeContext,\n fieldDef,\n fieldNodes,\n parentType,\n path,\n ); // Get the resolve function, regardless of if its result is normal or abrupt (error).\n\n try {\n // Build a JS object of arguments from the field.arguments AST, using the\n // variables scope to fulfill any variable references.\n // TODO: find a way to memoize, in case this field is within a List type.\n const args = (0, _values.getArgumentValues)(\n fieldDef,\n fieldNodes[0],\n exeContext.variableValues,\n ); // The resolve function's optional third argument is a context value that\n // is provided to every resolve function within an execution. It is commonly\n // used to represent an authenticated user, or request-specific caches.\n\n const contextValue = exeContext.contextValue;\n const result = resolveFn(source, args, contextValue, info);\n let completed;\n\n if ((0, _isPromise.isPromise)(result)) {\n completed = result.then((resolved) =>\n completeValue(exeContext, returnType, fieldNodes, info, path, resolved),\n );\n } else {\n completed = completeValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n );\n }\n\n if ((0, _isPromise.isPromise)(completed)) {\n // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n return completed.then(undefined, (rawError) => {\n const error = (0, _locatedError.locatedError)(\n rawError,\n fieldNodes,\n (0, _Path.pathToArray)(path),\n );\n return handleFieldError(error, returnType, exeContext);\n });\n }\n\n return completed;\n } catch (rawError) {\n const error = (0, _locatedError.locatedError)(\n rawError,\n fieldNodes,\n (0, _Path.pathToArray)(path),\n );\n return handleFieldError(error, returnType, exeContext);\n }\n}\n/**\n * @internal\n */\n\nfunction buildResolveInfo(exeContext, fieldDef, fieldNodes, parentType, path) {\n // The resolve function's optional fourth argument is a collection of\n // information about the current execution state.\n return {\n fieldName: fieldDef.name,\n fieldNodes,\n returnType: fieldDef.type,\n parentType,\n path,\n schema: exeContext.schema,\n fragments: exeContext.fragments,\n rootValue: exeContext.rootValue,\n operation: exeContext.operation,\n variableValues: exeContext.variableValues,\n };\n}\n\nfunction handleFieldError(error, returnType, exeContext) {\n // If the field type is non-nullable, then it is resolved without any\n // protection from errors, however it still properly locates the error.\n if ((0, _definition.isNonNullType)(returnType)) {\n throw error;\n } // Otherwise, error protection is applied, logging the error and resolving\n // a null value for this field if one is encountered.\n\n exeContext.errors.push(error);\n return null;\n}\n/**\n * Implements the instructions for completeValue as defined in the\n * \"Value Completion\" section of the spec.\n *\n * If the field type is Non-Null, then this recursively completes the value\n * for the inner type. It throws a field error if that completion returns null,\n * as per the \"Nullability\" section of the spec.\n *\n * If the field type is a List, then this recursively completes the value\n * for the inner type on each item in the list.\n *\n * If the field type is a Scalar or Enum, ensures the completed value is a legal\n * value of the type by calling the `serialize` method of GraphQL type\n * definition.\n *\n * If the field is an abstract type, determine the runtime type of the value\n * and then complete based on that type\n *\n * Otherwise, the field type expects a sub-selection set, and will complete the\n * value by executing all sub-selections.\n */\n\nfunction completeValue(exeContext, returnType, fieldNodes, info, path, result) {\n // If result is an Error, throw a located error.\n if (result instanceof Error) {\n throw result;\n } // If field type is NonNull, complete for inner type, and throw field error\n // if result is null.\n\n if ((0, _definition.isNonNullType)(returnType)) {\n const completed = completeValue(\n exeContext,\n returnType.ofType,\n fieldNodes,\n info,\n path,\n result,\n );\n\n if (completed === null) {\n throw new Error(\n `Cannot return null for non-nullable field ${info.parentType.name}.${info.fieldName}.`,\n );\n }\n\n return completed;\n } // If result value is null or undefined then return null.\n\n if (result == null) {\n return null;\n } // If field type is List, complete each item in the list with the inner type\n\n if ((0, _definition.isListType)(returnType)) {\n return completeListValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n );\n } // If field type is a leaf type, Scalar or Enum, serialize to a valid value,\n // returning null if serialization is not possible.\n\n if ((0, _definition.isLeafType)(returnType)) {\n return completeLeafValue(returnType, result);\n } // If field type is an abstract type, Interface or Union, determine the\n // runtime Object type and complete for that type.\n\n if ((0, _definition.isAbstractType)(returnType)) {\n return completeAbstractValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n );\n } // If field type is Object, execute and complete all sub-selections.\n\n if ((0, _definition.isObjectType)(returnType)) {\n return completeObjectValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n );\n }\n /* c8 ignore next 6 */\n // Not reachable, all possible output types have been considered.\n\n false ||\n (0, _invariant.invariant)(\n false,\n 'Cannot complete value of unexpected output type: ' +\n (0, _inspect.inspect)(returnType),\n );\n}\n/**\n * Complete a list value by completing each item in the list with the\n * inner type\n */\n\nfunction completeListValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n) {\n if (!(0, _isIterableObject.isIterableObject)(result)) {\n throw new _GraphQLError.GraphQLError(\n `Expected Iterable, but did not find one for field \"${info.parentType.name}.${info.fieldName}\".`,\n );\n } // This is specified as a simple map, however we're optimizing the path\n // where the list contains no Promises by avoiding creating another Promise.\n\n const itemType = returnType.ofType;\n let containsPromise = false;\n const completedResults = Array.from(result, (item, index) => {\n // No need to modify the info object containing the path,\n // since from here on it is not ever accessed by resolver functions.\n const itemPath = (0, _Path.addPath)(path, index, undefined);\n\n try {\n let completedItem;\n\n if ((0, _isPromise.isPromise)(item)) {\n completedItem = item.then((resolved) =>\n completeValue(\n exeContext,\n itemType,\n fieldNodes,\n info,\n itemPath,\n resolved,\n ),\n );\n } else {\n completedItem = completeValue(\n exeContext,\n itemType,\n fieldNodes,\n info,\n itemPath,\n item,\n );\n }\n\n if ((0, _isPromise.isPromise)(completedItem)) {\n containsPromise = true; // Note: we don't rely on a `catch` method, but we do expect \"thenable\"\n // to take a second callback for the error case.\n\n return completedItem.then(undefined, (rawError) => {\n const error = (0, _locatedError.locatedError)(\n rawError,\n fieldNodes,\n (0, _Path.pathToArray)(itemPath),\n );\n return handleFieldError(error, itemType, exeContext);\n });\n }\n\n return completedItem;\n } catch (rawError) {\n const error = (0, _locatedError.locatedError)(\n rawError,\n fieldNodes,\n (0, _Path.pathToArray)(itemPath),\n );\n return handleFieldError(error, itemType, exeContext);\n }\n });\n return containsPromise ? Promise.all(completedResults) : completedResults;\n}\n/**\n * Complete a Scalar or Enum by serializing to a valid value, returning\n * null if serialization is not possible.\n */\n\nfunction completeLeafValue(returnType, result) {\n const serializedResult = returnType.serialize(result);\n\n if (serializedResult == null) {\n throw new Error(\n `Expected \\`${(0, _inspect.inspect)(returnType)}.serialize(${(0,\n _inspect.inspect)(result)})\\` to ` +\n `return non-nullable value, returned: ${(0, _inspect.inspect)(\n serializedResult,\n )}`,\n );\n }\n\n return serializedResult;\n}\n/**\n * Complete a value of an abstract type by determining the runtime object type\n * of that value, then complete the value for that type.\n */\n\nfunction completeAbstractValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n) {\n var _returnType$resolveTy;\n\n const resolveTypeFn =\n (_returnType$resolveTy = returnType.resolveType) !== null &&\n _returnType$resolveTy !== void 0\n ? _returnType$resolveTy\n : exeContext.typeResolver;\n const contextValue = exeContext.contextValue;\n const runtimeType = resolveTypeFn(result, contextValue, info, returnType);\n\n if ((0, _isPromise.isPromise)(runtimeType)) {\n return runtimeType.then((resolvedRuntimeType) =>\n completeObjectValue(\n exeContext,\n ensureValidRuntimeType(\n resolvedRuntimeType,\n exeContext,\n returnType,\n fieldNodes,\n info,\n result,\n ),\n fieldNodes,\n info,\n path,\n result,\n ),\n );\n }\n\n return completeObjectValue(\n exeContext,\n ensureValidRuntimeType(\n runtimeType,\n exeContext,\n returnType,\n fieldNodes,\n info,\n result,\n ),\n fieldNodes,\n info,\n path,\n result,\n );\n}\n\nfunction ensureValidRuntimeType(\n runtimeTypeName,\n exeContext,\n returnType,\n fieldNodes,\n info,\n result,\n) {\n if (runtimeTypeName == null) {\n throw new _GraphQLError.GraphQLError(\n `Abstract type \"${returnType.name}\" must resolve to an Object type at runtime for field \"${info.parentType.name}.${info.fieldName}\". Either the \"${returnType.name}\" type should provide a \"resolveType\" function or each possible type should provide an \"isTypeOf\" function.`,\n fieldNodes,\n );\n } // releases before 16.0.0 supported returning `GraphQLObjectType` from `resolveType`\n // TODO: remove in 17.0.0 release\n\n if ((0, _definition.isObjectType)(runtimeTypeName)) {\n throw new _GraphQLError.GraphQLError(\n 'Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.',\n );\n }\n\n if (typeof runtimeTypeName !== 'string') {\n throw new _GraphQLError.GraphQLError(\n `Abstract type \"${returnType.name}\" must resolve to an Object type at runtime for field \"${info.parentType.name}.${info.fieldName}\" with ` +\n `value ${(0, _inspect.inspect)(result)}, received \"${(0,\n _inspect.inspect)(runtimeTypeName)}\".`,\n );\n }\n\n const runtimeType = exeContext.schema.getType(runtimeTypeName);\n\n if (runtimeType == null) {\n throw new _GraphQLError.GraphQLError(\n `Abstract type \"${returnType.name}\" was resolved to a type \"${runtimeTypeName}\" that does not exist inside the schema.`,\n {\n nodes: fieldNodes,\n },\n );\n }\n\n if (!(0, _definition.isObjectType)(runtimeType)) {\n throw new _GraphQLError.GraphQLError(\n `Abstract type \"${returnType.name}\" was resolved to a non-object type \"${runtimeTypeName}\".`,\n {\n nodes: fieldNodes,\n },\n );\n }\n\n if (!exeContext.schema.isSubType(returnType, runtimeType)) {\n throw new _GraphQLError.GraphQLError(\n `Runtime Object type \"${runtimeType.name}\" is not a possible type for \"${returnType.name}\".`,\n {\n nodes: fieldNodes,\n },\n );\n }\n\n return runtimeType;\n}\n/**\n * Complete an Object value by executing all sub-selections.\n */\n\nfunction completeObjectValue(\n exeContext,\n returnType,\n fieldNodes,\n info,\n path,\n result,\n) {\n // Collect sub-fields to execute to complete this value.\n const subFieldNodes = collectSubfields(exeContext, returnType, fieldNodes); // If there is an isTypeOf predicate function, call it with the\n // current result. If isTypeOf returns false, then raise an error rather\n // than continuing execution.\n\n if (returnType.isTypeOf) {\n const isTypeOf = returnType.isTypeOf(result, exeContext.contextValue, info);\n\n if ((0, _isPromise.isPromise)(isTypeOf)) {\n return isTypeOf.then((resolvedIsTypeOf) => {\n if (!resolvedIsTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n\n return executeFields(\n exeContext,\n returnType,\n result,\n path,\n subFieldNodes,\n );\n });\n }\n\n if (!isTypeOf) {\n throw invalidReturnTypeError(returnType, result, fieldNodes);\n }\n }\n\n return executeFields(exeContext, returnType, result, path, subFieldNodes);\n}\n\nfunction invalidReturnTypeError(returnType, result, fieldNodes) {\n return new _GraphQLError.GraphQLError(\n `Expected value of type \"${returnType.name}\" but got: ${(0,\n _inspect.inspect)(result)}.`,\n {\n nodes: fieldNodes,\n },\n );\n}\n/**\n * If a resolveType function is not given, then a default resolve behavior is\n * used which attempts two strategies:\n *\n * First, See if the provided value has a `__typename` field defined, if so, use\n * that value as name of the resolved type.\n *\n * Otherwise, test each possible type for the abstract type by calling\n * isTypeOf for the object being coerced, returning the first type that matches.\n */\n\nconst defaultTypeResolver = function (value, contextValue, info, abstractType) {\n // First, look for `__typename`.\n if (\n (0, _isObjectLike.isObjectLike)(value) &&\n typeof value.__typename === 'string'\n ) {\n return value.__typename;\n } // Otherwise, test each possible type.\n\n const possibleTypes = info.schema.getPossibleTypes(abstractType);\n const promisedIsTypeOfResults = [];\n\n for (let i = 0; i < possibleTypes.length; i++) {\n const type = possibleTypes[i];\n\n if (type.isTypeOf) {\n const isTypeOfResult = type.isTypeOf(value, contextValue, info);\n\n if ((0, _isPromise.isPromise)(isTypeOfResult)) {\n promisedIsTypeOfResults[i] = isTypeOfResult;\n } else if (isTypeOfResult) {\n if (promisedIsTypeOfResults.length) {\n // Explicitly ignore any promise rejections\n Promise.allSettled(promisedIsTypeOfResults)\n /* c8 ignore next 3 */\n .catch(() => {\n // Do nothing\n });\n }\n\n return type.name;\n }\n }\n }\n\n if (promisedIsTypeOfResults.length) {\n return Promise.all(promisedIsTypeOfResults).then((isTypeOfResults) => {\n for (let i = 0; i < isTypeOfResults.length; i++) {\n if (isTypeOfResults[i]) {\n return possibleTypes[i].name;\n }\n }\n });\n }\n};\n/**\n * If a resolve function is not given, then a default resolve behavior is used\n * which takes the property of the source object of the same name as the field\n * and returns it as the result, or if it's a function, returns the result\n * of calling that function while passing along args and context value.\n */\n\nexports.defaultTypeResolver = defaultTypeResolver;\n\nconst defaultFieldResolver = function (source, args, contextValue, info) {\n // ensure source is a value for which property access is acceptable.\n if ((0, _isObjectLike.isObjectLike)(source) || typeof source === 'function') {\n const property = source[info.fieldName];\n\n if (typeof property === 'function') {\n return source[info.fieldName](args, contextValue, info);\n }\n\n return property;\n }\n};\n/**\n * This method looks up the field on the given type definition.\n * It has special casing for the three introspection fields,\n * __schema, __type and __typename. __typename is special because\n * it can always be queried as a field, even in situations where no\n * other fields are allowed, like on a Union. __schema and __type\n * could get automatically added to the query type, but that would\n * require mutating type definitions, which would cause issues.\n *\n * @internal\n */\n\nexports.defaultFieldResolver = defaultFieldResolver;\n\nfunction getFieldDef(schema, parentType, fieldNode) {\n const fieldName = fieldNode.name.value;\n\n if (\n fieldName === _introspection.SchemaMetaFieldDef.name &&\n schema.getQueryType() === parentType\n ) {\n return _introspection.SchemaMetaFieldDef;\n } else if (\n fieldName === _introspection.TypeMetaFieldDef.name &&\n schema.getQueryType() === parentType\n ) {\n return _introspection.TypeMetaFieldDef;\n } else if (fieldName === _introspection.TypeNameMetaFieldDef.name) {\n return _introspection.TypeNameMetaFieldDef;\n }\n\n return parentType.getFields()[fieldName];\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.graphql = graphql;\nexports.graphqlSync = graphqlSync;\n\nvar _devAssert = require('./jsutils/devAssert.js');\n\nvar _isPromise = require('./jsutils/isPromise.js');\n\nvar _parser = require('./language/parser.js');\n\nvar _validate = require('./type/validate.js');\n\nvar _validate2 = require('./validation/validate.js');\n\nvar _execute = require('./execution/execute.js');\n\nfunction graphql(args) {\n // Always return a Promise for a consistent API.\n return new Promise((resolve) => resolve(graphqlImpl(args)));\n}\n/**\n * The graphqlSync function also fulfills GraphQL operations by parsing,\n * validating, and executing a GraphQL document along side a GraphQL schema.\n * However, it guarantees to complete synchronously (or throw an error) assuming\n * that all field resolvers are also synchronous.\n */\n\nfunction graphqlSync(args) {\n const result = graphqlImpl(args); // Assert that the execution was synchronous.\n\n if ((0, _isPromise.isPromise)(result)) {\n throw new Error('GraphQL execution failed to complete synchronously.');\n }\n\n return result;\n}\n\nfunction graphqlImpl(args) {\n // Temporary for v15 to v16 migration. Remove in v17\n arguments.length < 2 ||\n (0, _devAssert.devAssert)(\n false,\n 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.',\n );\n const {\n schema,\n source,\n rootValue,\n contextValue,\n variableValues,\n operationName,\n fieldResolver,\n typeResolver,\n } = args; // Validate Schema\n\n const schemaValidationErrors = (0, _validate.validateSchema)(schema);\n\n if (schemaValidationErrors.length > 0) {\n return {\n errors: schemaValidationErrors,\n };\n } // Parse\n\n let document;\n\n try {\n document = (0, _parser.parse)(source);\n } catch (syntaxError) {\n return {\n errors: [syntaxError],\n };\n } // Validate\n\n const validationErrors = (0, _validate2.validate)(schema, document);\n\n if (validationErrors.length > 0) {\n return {\n errors: validationErrors,\n };\n } // Execute\n\n return (0, _execute.execute)({\n schema,\n document,\n rootValue,\n contextValue,\n variableValues,\n operationName,\n fieldResolver,\n typeResolver,\n });\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nObject.defineProperty(exports, 'DEFAULT_DEPRECATION_REASON', {\n enumerable: true,\n get: function () {\n return _directives.DEFAULT_DEPRECATION_REASON;\n },\n});\nObject.defineProperty(exports, 'GRAPHQL_MAX_INT', {\n enumerable: true,\n get: function () {\n return _scalars.GRAPHQL_MAX_INT;\n },\n});\nObject.defineProperty(exports, 'GRAPHQL_MIN_INT', {\n enumerable: true,\n get: function () {\n return _scalars.GRAPHQL_MIN_INT;\n },\n});\nObject.defineProperty(exports, 'GraphQLBoolean', {\n enumerable: true,\n get: function () {\n return _scalars.GraphQLBoolean;\n },\n});\nObject.defineProperty(exports, 'GraphQLDeprecatedDirective', {\n enumerable: true,\n get: function () {\n return _directives.GraphQLDeprecatedDirective;\n },\n});\nObject.defineProperty(exports, 'GraphQLDirective', {\n enumerable: true,\n get: function () {\n return _directives.GraphQLDirective;\n },\n});\nObject.defineProperty(exports, 'GraphQLEnumType', {\n enumerable: true,\n get: function () {\n return _definition.GraphQLEnumType;\n },\n});\nObject.defineProperty(exports, 'GraphQLFloat', {\n enumerable: true,\n get: function () {\n return _scalars.GraphQLFloat;\n },\n});\nObject.defineProperty(exports, 'GraphQLID', {\n enumerable: true,\n get: function () {\n return _scalars.GraphQLID;\n },\n});\nObject.defineProperty(exports, 'GraphQLIncludeDirective', {\n enumerable: true,\n get: function () {\n return _directives.GraphQLIncludeDirective;\n },\n});\nObject.defineProperty(exports, 'GraphQLInputObjectType', {\n enumerable: true,\n get: function () {\n return _definition.GraphQLInputObjectType;\n },\n});\nObject.defineProperty(exports, 'GraphQLInt', {\n enumerable: true,\n get: function () {\n return _scalars.GraphQLInt;\n },\n});\nObject.defineProperty(exports, 'GraphQLInterfaceType', {\n enumerable: true,\n get: function () {\n return _definition.GraphQLInterfaceType;\n },\n});\nObject.defineProperty(exports, 'GraphQLList', {\n enumerable: true,\n get: function () {\n return _definition.GraphQLList;\n },\n});\nObject.defineProperty(exports, 'GraphQLNonNull', {\n enumerable: true,\n get: function () {\n return _definition.GraphQLNonNull;\n },\n});\nObject.defineProperty(exports, 'GraphQLObjectType', {\n enumerable: true,\n get: function () {\n return _definition.GraphQLObjectType;\n },\n});\nObject.defineProperty(exports, 'GraphQLOneOfDirective', {\n enumerable: true,\n get: function () {\n return _directives.GraphQLOneOfDirective;\n },\n});\nObject.defineProperty(exports, 'GraphQLScalarType', {\n enumerable: true,\n get: function () {\n return _definition.GraphQLScalarType;\n },\n});\nObject.defineProperty(exports, 'GraphQLSchema', {\n enumerable: true,\n get: function () {\n return _schema.GraphQLSchema;\n },\n});\nObject.defineProperty(exports, 'GraphQLSkipDirective', {\n enumerable: true,\n get: function () {\n return _directives.GraphQLSkipDirective;\n },\n});\nObject.defineProperty(exports, 'GraphQLSpecifiedByDirective', {\n enumerable: true,\n get: function () {\n return _directives.GraphQLSpecifiedByDirective;\n },\n});\nObject.defineProperty(exports, 'GraphQLString', {\n enumerable: true,\n get: function () {\n return _scalars.GraphQLString;\n },\n});\nObject.defineProperty(exports, 'GraphQLUnionType', {\n enumerable: true,\n get: function () {\n return _definition.GraphQLUnionType;\n },\n});\nObject.defineProperty(exports, 'SchemaMetaFieldDef', {\n enumerable: true,\n get: function () {\n return _introspection.SchemaMetaFieldDef;\n },\n});\nObject.defineProperty(exports, 'TypeKind', {\n enumerable: true,\n get: function () {\n return _introspection.TypeKind;\n },\n});\nObject.defineProperty(exports, 'TypeMetaFieldDef', {\n enumerable: true,\n get: function () {\n return _introspection.TypeMetaFieldDef;\n },\n});\nObject.defineProperty(exports, 'TypeNameMetaFieldDef', {\n enumerable: true,\n get: function () {\n return _introspection.TypeNameMetaFieldDef;\n },\n});\nObject.defineProperty(exports, '__Directive', {\n enumerable: true,\n get: function () {\n return _introspection.__Directive;\n },\n});\nObject.defineProperty(exports, '__DirectiveLocation', {\n enumerable: true,\n get: function () {\n return _introspection.__DirectiveLocation;\n },\n});\nObject.defineProperty(exports, '__EnumValue', {\n enumerable: true,\n get: function () {\n return _introspection.__EnumValue;\n },\n});\nObject.defineProperty(exports, '__Field', {\n enumerable: true,\n get: function () {\n return _introspection.__Field;\n },\n});\nObject.defineProperty(exports, '__InputValue', {\n enumerable: true,\n get: function () {\n return _introspection.__InputValue;\n },\n});\nObject.defineProperty(exports, '__Schema', {\n enumerable: true,\n get: function () {\n return _introspection.__Schema;\n },\n});\nObject.defineProperty(exports, '__Type', {\n enumerable: true,\n get: function () {\n return _introspection.__Type;\n },\n});\nObject.defineProperty(exports, '__TypeKind', {\n enumerable: true,\n get: function () {\n return _introspection.__TypeKind;\n },\n});\nObject.defineProperty(exports, 'assertAbstractType', {\n enumerable: true,\n get: function () {\n return _definition.assertAbstractType;\n },\n});\nObject.defineProperty(exports, 'assertCompositeType', {\n enumerable: true,\n get: function () {\n return _definition.assertCompositeType;\n },\n});\nObject.defineProperty(exports, 'assertDirective', {\n enumerable: true,\n get: function () {\n return _directives.assertDirective;\n },\n});\nObject.defineProperty(exports, 'assertEnumType', {\n enumerable: true,\n get: function () {\n return _definition.assertEnumType;\n },\n});\nObject.defineProperty(exports, 'assertEnumValueName', {\n enumerable: true,\n get: function () {\n return _assertName.assertEnumValueName;\n },\n});\nObject.defineProperty(exports, 'assertInputObjectType', {\n enumerable: true,\n get: function () {\n return _definition.assertInputObjectType;\n },\n});\nObject.defineProperty(exports, 'assertInputType', {\n enumerable: true,\n get: function () {\n return _definition.assertInputType;\n },\n});\nObject.defineProperty(exports, 'assertInterfaceType', {\n enumerable: true,\n get: function () {\n return _definition.assertInterfaceType;\n },\n});\nObject.defineProperty(exports, 'assertLeafType', {\n enumerable: true,\n get: function () {\n return _definition.assertLeafType;\n },\n});\nObject.defineProperty(exports, 'assertListType', {\n enumerable: true,\n get: function () {\n return _definition.assertListType;\n },\n});\nObject.defineProperty(exports, 'assertName', {\n enumerable: true,\n get: function () {\n return _assertName.assertName;\n },\n});\nObject.defineProperty(exports, 'assertNamedType', {\n enumerable: true,\n get: function () {\n return _definition.assertNamedType;\n },\n});\nObject.defineProperty(exports, 'assertNonNullType', {\n enumerable: true,\n get: function () {\n return _definition.assertNonNullType;\n },\n});\nObject.defineProperty(exports, 'assertNullableType', {\n enumerable: true,\n get: function () {\n return _definition.assertNullableType;\n },\n});\nObject.defineProperty(exports, 'assertObjectType', {\n enumerable: true,\n get: function () {\n return _definition.assertObjectType;\n },\n});\nObject.defineProperty(exports, 'assertOutputType', {\n enumerable: true,\n get: function () {\n return _definition.assertOutputType;\n },\n});\nObject.defineProperty(exports, 'assertScalarType', {\n enumerable: true,\n get: function () {\n return _definition.assertScalarType;\n },\n});\nObject.defineProperty(exports, 'assertSchema', {\n enumerable: true,\n get: function () {\n return _schema.assertSchema;\n },\n});\nObject.defineProperty(exports, 'assertType', {\n enumerable: true,\n get: function () {\n return _definition.assertType;\n },\n});\nObject.defineProperty(exports, 'assertUnionType', {\n enumerable: true,\n get: function () {\n return _definition.assertUnionType;\n },\n});\nObject.defineProperty(exports, 'assertValidSchema', {\n enumerable: true,\n get: function () {\n return _validate.assertValidSchema;\n },\n});\nObject.defineProperty(exports, 'assertWrappingType', {\n enumerable: true,\n get: function () {\n return _definition.assertWrappingType;\n },\n});\nObject.defineProperty(exports, 'getNamedType', {\n enumerable: true,\n get: function () {\n return _definition.getNamedType;\n },\n});\nObject.defineProperty(exports, 'getNullableType', {\n enumerable: true,\n get: function () {\n return _definition.getNullableType;\n },\n});\nObject.defineProperty(exports, 'introspectionTypes', {\n enumerable: true,\n get: function () {\n return _introspection.introspectionTypes;\n },\n});\nObject.defineProperty(exports, 'isAbstractType', {\n enumerable: true,\n get: function () {\n return _definition.isAbstractType;\n },\n});\nObject.defineProperty(exports, 'isCompositeType', {\n enumerable: true,\n get: function () {\n return _definition.isCompositeType;\n },\n});\nObject.defineProperty(exports, 'isDirective', {\n enumerable: true,\n get: function () {\n return _directives.isDirective;\n },\n});\nObject.defineProperty(exports, 'isEnumType', {\n enumerable: true,\n get: function () {\n return _definition.isEnumType;\n },\n});\nObject.defineProperty(exports, 'isInputObjectType', {\n enumerable: true,\n get: function () {\n return _definition.isInputObjectType;\n },\n});\nObject.defineProperty(exports, 'isInputType', {\n enumerable: true,\n get: function () {\n return _definition.isInputType;\n },\n});\nObject.defineProperty(exports, 'isInterfaceType', {\n enumerable: true,\n get: function () {\n return _definition.isInterfaceType;\n },\n});\nObject.defineProperty(exports, 'isIntrospectionType', {\n enumerable: true,\n get: function () {\n return _introspection.isIntrospectionType;\n },\n});\nObject.defineProperty(exports, 'isLeafType', {\n enumerable: true,\n get: function () {\n return _definition.isLeafType;\n },\n});\nObject.defineProperty(exports, 'isListType', {\n enumerable: true,\n get: function () {\n return _definition.isListType;\n },\n});\nObject.defineProperty(exports, 'isNamedType', {\n enumerable: true,\n get: function () {\n return _definition.isNamedType;\n },\n});\nObject.defineProperty(exports, 'isNonNullType', {\n enumerable: true,\n get: function () {\n return _definition.isNonNullType;\n },\n});\nObject.defineProperty(exports, 'isNullableType', {\n enumerable: true,\n get: function () {\n return _definition.isNullableType;\n },\n});\nObject.defineProperty(exports, 'isObjectType', {\n enumerable: true,\n get: function () {\n return _definition.isObjectType;\n },\n});\nObject.defineProperty(exports, 'isOutputType', {\n enumerable: true,\n get: function () {\n return _definition.isOutputType;\n },\n});\nObject.defineProperty(exports, 'isRequiredArgument', {\n enumerable: true,\n get: function () {\n return _definition.isRequiredArgument;\n },\n});\nObject.defineProperty(exports, 'isRequiredInputField', {\n enumerable: true,\n get: function () {\n return _definition.isRequiredInputField;\n },\n});\nObject.defineProperty(exports, 'isScalarType', {\n enumerable: true,\n get: function () {\n return _definition.isScalarType;\n },\n});\nObject.defineProperty(exports, 'isSchema', {\n enumerable: true,\n get: function () {\n return _schema.isSchema;\n },\n});\nObject.defineProperty(exports, 'isSpecifiedDirective', {\n enumerable: true,\n get: function () {\n return _directives.isSpecifiedDirective;\n },\n});\nObject.defineProperty(exports, 'isSpecifiedScalarType', {\n enumerable: true,\n get: function () {\n return _scalars.isSpecifiedScalarType;\n },\n});\nObject.defineProperty(exports, 'isType', {\n enumerable: true,\n get: function () {\n return _definition.isType;\n },\n});\nObject.defineProperty(exports, 'isUnionType', {\n enumerable: true,\n get: function () {\n return _definition.isUnionType;\n },\n});\nObject.defineProperty(exports, 'isWrappingType', {\n enumerable: true,\n get: function () {\n return _definition.isWrappingType;\n },\n});\nObject.defineProperty(exports, 'resolveObjMapThunk', {\n enumerable: true,\n get: function () {\n return _definition.resolveObjMapThunk;\n },\n});\nObject.defineProperty(exports, 'resolveReadonlyArrayThunk', {\n enumerable: true,\n get: function () {\n return _definition.resolveReadonlyArrayThunk;\n },\n});\nObject.defineProperty(exports, 'specifiedDirectives', {\n enumerable: true,\n get: function () {\n return _directives.specifiedDirectives;\n },\n});\nObject.defineProperty(exports, 'specifiedScalarTypes', {\n enumerable: true,\n get: function () {\n return _scalars.specifiedScalarTypes;\n },\n});\nObject.defineProperty(exports, 'validateSchema', {\n enumerable: true,\n get: function () {\n return _validate.validateSchema;\n },\n});\n\nvar _schema = require('./schema.js');\n\nvar _definition = require('./definition.js');\n\nvar _directives = require('./directives.js');\n\nvar _scalars = require('./scalars.js');\n\nvar _introspection = require('./introspection.js');\n\nvar _validate = require('./validate.js');\n\nvar _assertName = require('./assertName.js');\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nObject.defineProperty(exports, 'BREAK', {\n enumerable: true,\n get: function () {\n return _visitor.BREAK;\n },\n});\nObject.defineProperty(exports, 'DirectiveLocation', {\n enumerable: true,\n get: function () {\n return _directiveLocation.DirectiveLocation;\n },\n});\nObject.defineProperty(exports, 'Kind', {\n enumerable: true,\n get: function () {\n return _kinds.Kind;\n },\n});\nObject.defineProperty(exports, 'Lexer', {\n enumerable: true,\n get: function () {\n return _lexer.Lexer;\n },\n});\nObject.defineProperty(exports, 'Location', {\n enumerable: true,\n get: function () {\n return _ast.Location;\n },\n});\nObject.defineProperty(exports, 'OperationTypeNode', {\n enumerable: true,\n get: function () {\n return _ast.OperationTypeNode;\n },\n});\nObject.defineProperty(exports, 'Source', {\n enumerable: true,\n get: function () {\n return _source.Source;\n },\n});\nObject.defineProperty(exports, 'Token', {\n enumerable: true,\n get: function () {\n return _ast.Token;\n },\n});\nObject.defineProperty(exports, 'TokenKind', {\n enumerable: true,\n get: function () {\n return _tokenKind.TokenKind;\n },\n});\nObject.defineProperty(exports, 'getEnterLeaveForKind', {\n enumerable: true,\n get: function () {\n return _visitor.getEnterLeaveForKind;\n },\n});\nObject.defineProperty(exports, 'getLocation', {\n enumerable: true,\n get: function () {\n return _location.getLocation;\n },\n});\nObject.defineProperty(exports, 'getVisitFn', {\n enumerable: true,\n get: function () {\n return _visitor.getVisitFn;\n },\n});\nObject.defineProperty(exports, 'isConstValueNode', {\n enumerable: true,\n get: function () {\n return _predicates.isConstValueNode;\n },\n});\nObject.defineProperty(exports, 'isDefinitionNode', {\n enumerable: true,\n get: function () {\n return _predicates.isDefinitionNode;\n },\n});\nObject.defineProperty(exports, 'isExecutableDefinitionNode', {\n enumerable: true,\n get: function () {\n return _predicates.isExecutableDefinitionNode;\n },\n});\nObject.defineProperty(exports, 'isSchemaCoordinateNode', {\n enumerable: true,\n get: function () {\n return _predicates.isSchemaCoordinateNode;\n },\n});\nObject.defineProperty(exports, 'isSelectionNode', {\n enumerable: true,\n get: function () {\n return _predicates.isSelectionNode;\n },\n});\nObject.defineProperty(exports, 'isTypeDefinitionNode', {\n enumerable: true,\n get: function () {\n return _predicates.isTypeDefinitionNode;\n },\n});\nObject.defineProperty(exports, 'isTypeExtensionNode', {\n enumerable: true,\n get: function () {\n return _predicates.isTypeExtensionNode;\n },\n});\nObject.defineProperty(exports, 'isTypeNode', {\n enumerable: true,\n get: function () {\n return _predicates.isTypeNode;\n },\n});\nObject.defineProperty(exports, 'isTypeSystemDefinitionNode', {\n enumerable: true,\n get: function () {\n return _predicates.isTypeSystemDefinitionNode;\n },\n});\nObject.defineProperty(exports, 'isTypeSystemExtensionNode', {\n enumerable: true,\n get: function () {\n return _predicates.isTypeSystemExtensionNode;\n },\n});\nObject.defineProperty(exports, 'isValueNode', {\n enumerable: true,\n get: function () {\n return _predicates.isValueNode;\n },\n});\nObject.defineProperty(exports, 'parse', {\n enumerable: true,\n get: function () {\n return _parser.parse;\n },\n});\nObject.defineProperty(exports, 'parseConstValue', {\n enumerable: true,\n get: function () {\n return _parser.parseConstValue;\n },\n});\nObject.defineProperty(exports, 'parseSchemaCoordinate', {\n enumerable: true,\n get: function () {\n return _parser.parseSchemaCoordinate;\n },\n});\nObject.defineProperty(exports, 'parseType', {\n enumerable: true,\n get: function () {\n return _parser.parseType;\n },\n});\nObject.defineProperty(exports, 'parseValue', {\n enumerable: true,\n get: function () {\n return _parser.parseValue;\n },\n});\nObject.defineProperty(exports, 'print', {\n enumerable: true,\n get: function () {\n return _printer.print;\n },\n});\nObject.defineProperty(exports, 'printLocation', {\n enumerable: true,\n get: function () {\n return _printLocation.printLocation;\n },\n});\nObject.defineProperty(exports, 'printSourceLocation', {\n enumerable: true,\n get: function () {\n return _printLocation.printSourceLocation;\n },\n});\nObject.defineProperty(exports, 'visit', {\n enumerable: true,\n get: function () {\n return _visitor.visit;\n },\n});\nObject.defineProperty(exports, 'visitInParallel', {\n enumerable: true,\n get: function () {\n return _visitor.visitInParallel;\n },\n});\n\nvar _source = require('./source.js');\n\nvar _location = require('./location.js');\n\nvar _printLocation = require('./printLocation.js');\n\nvar _kinds = require('./kinds.js');\n\nvar _tokenKind = require('./tokenKind.js');\n\nvar _lexer = require('./lexer.js');\n\nvar _parser = require('./parser.js');\n\nvar _printer = require('./printer.js');\n\nvar _visitor = require('./visitor.js');\n\nvar _ast = require('./ast.js');\n\nvar _predicates = require('./predicates.js');\n\nvar _directiveLocation = require('./directiveLocation.js');\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.isAsyncIterable = isAsyncIterable;\n\n/**\n * Returns true if the provided object implements the AsyncIterator protocol via\n * implementing a `Symbol.asyncIterator` method.\n */\nfunction isAsyncIterable(maybeAsyncIterable) {\n return (\n typeof (maybeAsyncIterable === null || maybeAsyncIterable === void 0\n ? void 0\n : maybeAsyncIterable[Symbol.asyncIterator]) === 'function'\n );\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.mapAsyncIterator = mapAsyncIterator;\n\n/**\n * Given an AsyncIterable and a callback function, return an AsyncIterator\n * which produces values mapped via calling the callback function.\n */\nfunction mapAsyncIterator(iterable, callback) {\n const iterator = iterable[Symbol.asyncIterator]();\n\n async function mapResult(result) {\n if (result.done) {\n return result;\n }\n\n try {\n return {\n value: await callback(result.value),\n done: false,\n };\n } catch (error) {\n /* c8 ignore start */\n // FIXME: add test case\n if (typeof iterator.return === 'function') {\n try {\n await iterator.return();\n } catch (_e) {\n /* ignore error */\n }\n }\n\n throw error;\n /* c8 ignore stop */\n }\n }\n\n return {\n async next() {\n return mapResult(await iterator.next());\n },\n\n async return() {\n // If iterator.return() does not exist, then type R must be undefined.\n return typeof iterator.return === 'function'\n ? mapResult(await iterator.return())\n : {\n value: undefined,\n done: true,\n };\n },\n\n async throw(error) {\n if (typeof iterator.throw === 'function') {\n return mapResult(await iterator.throw(error));\n }\n\n throw error;\n },\n\n [Symbol.asyncIterator]() {\n return this;\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.createSourceEventStream = createSourceEventStream;\nexports.subscribe = subscribe;\n\nvar _devAssert = require('../jsutils/devAssert.js');\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _isAsyncIterable = require('../jsutils/isAsyncIterable.js');\n\nvar _Path = require('../jsutils/Path.js');\n\nvar _GraphQLError = require('../error/GraphQLError.js');\n\nvar _locatedError = require('../error/locatedError.js');\n\nvar _collectFields = require('./collectFields.js');\n\nvar _execute = require('./execute.js');\n\nvar _mapAsyncIterator = require('./mapAsyncIterator.js');\n\nvar _values = require('./values.js');\n\n/**\n * Implements the \"Subscribe\" algorithm described in the GraphQL specification.\n *\n * Returns a Promise which resolves to either an AsyncIterator (if successful)\n * or an ExecutionResult (error). The promise will be rejected if the schema or\n * other arguments to this function are invalid, or if the resolved event stream\n * is not an async iterable.\n *\n * If the client-provided arguments to this function do not result in a\n * compliant subscription, a GraphQL Response (ExecutionResult) with\n * descriptive errors and no data will be returned.\n *\n * If the source stream could not be created due to faulty subscription\n * resolver logic or underlying systems, the promise will resolve to a single\n * ExecutionResult containing `errors` and no `data`.\n *\n * If the operation succeeded, the promise resolves to an AsyncIterator, which\n * yields a stream of ExecutionResults representing the response stream.\n *\n * Accepts either an object with named arguments, or individual arguments.\n */\nasync function subscribe(args) {\n // Temporary for v15 to v16 migration. Remove in v17\n arguments.length < 2 ||\n (0, _devAssert.devAssert)(\n false,\n 'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.',\n );\n const resultOrStream = await createSourceEventStream(args);\n\n if (!(0, _isAsyncIterable.isAsyncIterable)(resultOrStream)) {\n return resultOrStream;\n } // For each payload yielded from a subscription, map it over the normal\n // GraphQL `execute` function, with `payload` as the rootValue.\n // This implements the \"MapSourceToResponseEvent\" algorithm described in\n // the GraphQL specification. The `execute` function provides the\n // \"ExecuteSubscriptionEvent\" algorithm, as it is nearly identical to the\n // \"ExecuteQuery\" algorithm, for which `execute` is also used.\n\n const mapSourceToResponse = (payload) =>\n (0, _execute.execute)({ ...args, rootValue: payload }); // Map every source value to a ExecutionResult value as described above.\n\n return (0, _mapAsyncIterator.mapAsyncIterator)(\n resultOrStream,\n mapSourceToResponse,\n );\n}\n\nfunction toNormalizedArgs(args) {\n const firstArg = args[0];\n\n if (firstArg && 'document' in firstArg) {\n return firstArg;\n }\n\n return {\n schema: firstArg,\n // FIXME: when underlying TS bug fixed, see https://github.com/microsoft/TypeScript/issues/31613\n document: args[1],\n rootValue: args[2],\n contextValue: args[3],\n variableValues: args[4],\n operationName: args[5],\n subscribeFieldResolver: args[6],\n };\n}\n/**\n * Implements the \"CreateSourceEventStream\" algorithm described in the\n * GraphQL specification, resolving the subscription source event stream.\n *\n * Returns a Promise which resolves to either an AsyncIterable (if successful)\n * or an ExecutionResult (error). The promise will be rejected if the schema or\n * other arguments to this function are invalid, or if the resolved event stream\n * is not an async iterable.\n *\n * If the client-provided arguments to this function do not result in a\n * compliant subscription, a GraphQL Response (ExecutionResult) with\n * descriptive errors and no data will be returned.\n *\n * If the the source stream could not be created due to faulty subscription\n * resolver logic or underlying systems, the promise will resolve to a single\n * ExecutionResult containing `errors` and no `data`.\n *\n * If the operation succeeded, the promise resolves to the AsyncIterable for the\n * event stream returned by the resolver.\n *\n * A Source Event Stream represents a sequence of events, each of which triggers\n * a GraphQL execution for that event.\n *\n * This may be useful when hosting the stateful subscription service in a\n * different process or machine than the stateless GraphQL execution engine,\n * or otherwise separating these two steps. For more on this, see the\n * \"Supporting Subscriptions at Scale\" information in the GraphQL specification.\n */\n\nasync function createSourceEventStream(...rawArgs) {\n const args = toNormalizedArgs(rawArgs);\n const { schema, document, variableValues } = args; // If arguments are missing or incorrectly typed, this is an internal\n // developer mistake which should throw an early error.\n\n (0, _execute.assertValidExecutionArguments)(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments,\n // a \"Response\" with only errors is returned.\n\n const exeContext = (0, _execute.buildExecutionContext)(args); // Return early errors if execution context failed.\n\n if (!('schema' in exeContext)) {\n return {\n errors: exeContext,\n };\n }\n\n try {\n const eventStream = await executeSubscription(exeContext); // Assert field returned an event stream, otherwise yield an error.\n\n if (!(0, _isAsyncIterable.isAsyncIterable)(eventStream)) {\n throw new Error(\n 'Subscription field must return Async Iterable. ' +\n `Received: ${(0, _inspect.inspect)(eventStream)}.`,\n );\n }\n\n return eventStream;\n } catch (error) {\n // If it GraphQLError, report it as an ExecutionResult, containing only errors and no data.\n // Otherwise treat the error as a system-class error and re-throw it.\n if (error instanceof _GraphQLError.GraphQLError) {\n return {\n errors: [error],\n };\n }\n\n throw error;\n }\n}\n\nasync function executeSubscription(exeContext) {\n const { schema, fragments, operation, variableValues, rootValue } =\n exeContext;\n const rootType = schema.getSubscriptionType();\n\n if (rootType == null) {\n throw new _GraphQLError.GraphQLError(\n 'Schema is not configured to execute subscription operation.',\n {\n nodes: operation,\n },\n );\n }\n\n const rootFields = (0, _collectFields.collectFields)(\n schema,\n fragments,\n variableValues,\n rootType,\n operation.selectionSet,\n );\n const [responseName, fieldNodes] = [...rootFields.entries()][0];\n const fieldDef = (0, _execute.getFieldDef)(schema, rootType, fieldNodes[0]);\n\n if (!fieldDef) {\n const fieldName = fieldNodes[0].name.value;\n throw new _GraphQLError.GraphQLError(\n `The subscription field \"${fieldName}\" is not defined.`,\n {\n nodes: fieldNodes,\n },\n );\n }\n\n const path = (0, _Path.addPath)(undefined, responseName, rootType.name);\n const info = (0, _execute.buildResolveInfo)(\n exeContext,\n fieldDef,\n fieldNodes,\n rootType,\n path,\n );\n\n try {\n var _fieldDef$subscribe;\n\n // Implements the \"ResolveFieldEventStream\" algorithm from GraphQL specification.\n // It differs from \"ResolveFieldValue\" due to providing a different `resolveFn`.\n // Build a JS object of arguments from the field.arguments AST, using the\n // variables scope to fulfill any variable references.\n const args = (0, _values.getArgumentValues)(\n fieldDef,\n fieldNodes[0],\n variableValues,\n ); // The resolve function's optional third argument is a context value that\n // is provided to every resolve function within an execution. It is commonly\n // used to represent an authenticated user, or request-specific caches.\n\n const contextValue = exeContext.contextValue; // Call the `subscribe()` resolver or the default resolver to produce an\n // AsyncIterable yielding raw payloads.\n\n const resolveFn =\n (_fieldDef$subscribe = fieldDef.subscribe) !== null &&\n _fieldDef$subscribe !== void 0\n ? _fieldDef$subscribe\n : exeContext.subscribeFieldResolver;\n const eventStream = await resolveFn(rootValue, args, contextValue, info);\n\n if (eventStream instanceof Error) {\n throw eventStream;\n }\n\n return eventStream;\n } catch (error) {\n throw (0, _locatedError.locatedError)(\n error,\n fieldNodes,\n (0, _Path.pathToArray)(path),\n );\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nObject.defineProperty(exports, 'createSourceEventStream', {\n enumerable: true,\n get: function () {\n return _subscribe.createSourceEventStream;\n },\n});\nObject.defineProperty(exports, 'defaultFieldResolver', {\n enumerable: true,\n get: function () {\n return _execute.defaultFieldResolver;\n },\n});\nObject.defineProperty(exports, 'defaultTypeResolver', {\n enumerable: true,\n get: function () {\n return _execute.defaultTypeResolver;\n },\n});\nObject.defineProperty(exports, 'execute', {\n enumerable: true,\n get: function () {\n return _execute.execute;\n },\n});\nObject.defineProperty(exports, 'executeSync', {\n enumerable: true,\n get: function () {\n return _execute.executeSync;\n },\n});\nObject.defineProperty(exports, 'getArgumentValues', {\n enumerable: true,\n get: function () {\n return _values.getArgumentValues;\n },\n});\nObject.defineProperty(exports, 'getDirectiveValues', {\n enumerable: true,\n get: function () {\n return _values.getDirectiveValues;\n },\n});\nObject.defineProperty(exports, 'getVariableValues', {\n enumerable: true,\n get: function () {\n return _values.getVariableValues;\n },\n});\nObject.defineProperty(exports, 'responsePathAsArray', {\n enumerable: true,\n get: function () {\n return _Path.pathToArray;\n },\n});\nObject.defineProperty(exports, 'subscribe', {\n enumerable: true,\n get: function () {\n return _subscribe.subscribe;\n },\n});\n\nvar _Path = require('../jsutils/Path.js');\n\nvar _execute = require('./execute.js');\n\nvar _subscribe = require('./subscribe.js');\n\nvar _values = require('./values.js');\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.NoDeprecatedCustomRule = NoDeprecatedCustomRule;\n\nvar _invariant = require('../../../jsutils/invariant.js');\n\nvar _GraphQLError = require('../../../error/GraphQLError.js');\n\nvar _definition = require('../../../type/definition.js');\n\n/**\n * No deprecated\n *\n * A GraphQL document is only valid if all selected fields and all used enum values have not been\n * deprecated.\n *\n * Note: This rule is optional and is not part of the Validation section of the GraphQL\n * Specification. The main purpose of this rule is detection of deprecated usages and not\n * necessarily to forbid their use when querying a service.\n */\nfunction NoDeprecatedCustomRule(context) {\n return {\n Field(node) {\n const fieldDef = context.getFieldDef();\n const deprecationReason =\n fieldDef === null || fieldDef === void 0\n ? void 0\n : fieldDef.deprecationReason;\n\n if (fieldDef && deprecationReason != null) {\n const parentType = context.getParentType();\n parentType != null || (0, _invariant.invariant)(false);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `The field ${parentType.name}.${fieldDef.name} is deprecated. ${deprecationReason}`,\n {\n nodes: node,\n },\n ),\n );\n }\n },\n\n Argument(node) {\n const argDef = context.getArgument();\n const deprecationReason =\n argDef === null || argDef === void 0\n ? void 0\n : argDef.deprecationReason;\n\n if (argDef && deprecationReason != null) {\n const directiveDef = context.getDirective();\n\n if (directiveDef != null) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Directive \"@${directiveDef.name}\" argument \"${argDef.name}\" is deprecated. ${deprecationReason}`,\n {\n nodes: node,\n },\n ),\n );\n } else {\n const parentType = context.getParentType();\n const fieldDef = context.getFieldDef();\n (parentType != null && fieldDef != null) ||\n (0, _invariant.invariant)(false);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `Field \"${parentType.name}.${fieldDef.name}\" argument \"${argDef.name}\" is deprecated. ${deprecationReason}`,\n {\n nodes: node,\n },\n ),\n );\n }\n }\n },\n\n ObjectField(node) {\n const inputObjectDef = (0, _definition.getNamedType)(\n context.getParentInputType(),\n );\n\n if ((0, _definition.isInputObjectType)(inputObjectDef)) {\n const inputFieldDef = inputObjectDef.getFields()[node.name.value];\n const deprecationReason =\n inputFieldDef === null || inputFieldDef === void 0\n ? void 0\n : inputFieldDef.deprecationReason;\n\n if (deprecationReason != null) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `The input field ${inputObjectDef.name}.${inputFieldDef.name} is deprecated. ${deprecationReason}`,\n {\n nodes: node,\n },\n ),\n );\n }\n }\n },\n\n EnumValue(node) {\n const enumValueDef = context.getEnumValue();\n const deprecationReason =\n enumValueDef === null || enumValueDef === void 0\n ? void 0\n : enumValueDef.deprecationReason;\n\n if (enumValueDef && deprecationReason != null) {\n const enumTypeDef = (0, _definition.getNamedType)(\n context.getInputType(),\n );\n enumTypeDef != null || (0, _invariant.invariant)(false);\n context.reportError(\n new _GraphQLError.GraphQLError(\n `The enum value \"${enumTypeDef.name}.${enumValueDef.name}\" is deprecated. ${deprecationReason}`,\n {\n nodes: node,\n },\n ),\n );\n }\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.NoSchemaIntrospectionCustomRule = NoSchemaIntrospectionCustomRule;\n\nvar _GraphQLError = require('../../../error/GraphQLError.js');\n\nvar _definition = require('../../../type/definition.js');\n\nvar _introspection = require('../../../type/introspection.js');\n\n/**\n * Prohibit introspection queries\n *\n * A GraphQL document is only valid if all fields selected are not fields that\n * return an introspection type.\n *\n * Note: This rule is optional and is not part of the Validation section of the\n * GraphQL Specification. This rule effectively disables introspection, which\n * does not reflect best practices and should only be done if absolutely necessary.\n */\nfunction NoSchemaIntrospectionCustomRule(context) {\n return {\n Field(node) {\n const type = (0, _definition.getNamedType)(context.getType());\n\n if (type && (0, _introspection.isIntrospectionType)(type)) {\n context.reportError(\n new _GraphQLError.GraphQLError(\n `GraphQL introspection has been disabled, but the requested query contained the field \"${node.name.value}\".`,\n {\n nodes: node,\n },\n ),\n );\n }\n },\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nObject.defineProperty(exports, 'ExecutableDefinitionsRule', {\n enumerable: true,\n get: function () {\n return _ExecutableDefinitionsRule.ExecutableDefinitionsRule;\n },\n});\nObject.defineProperty(exports, 'FieldsOnCorrectTypeRule', {\n enumerable: true,\n get: function () {\n return _FieldsOnCorrectTypeRule.FieldsOnCorrectTypeRule;\n },\n});\nObject.defineProperty(exports, 'FragmentsOnCompositeTypesRule', {\n enumerable: true,\n get: function () {\n return _FragmentsOnCompositeTypesRule.FragmentsOnCompositeTypesRule;\n },\n});\nObject.defineProperty(exports, 'KnownArgumentNamesRule', {\n enumerable: true,\n get: function () {\n return _KnownArgumentNamesRule.KnownArgumentNamesRule;\n },\n});\nObject.defineProperty(exports, 'KnownDirectivesRule', {\n enumerable: true,\n get: function () {\n return _KnownDirectivesRule.KnownDirectivesRule;\n },\n});\nObject.defineProperty(exports, 'KnownFragmentNamesRule', {\n enumerable: true,\n get: function () {\n return _KnownFragmentNamesRule.KnownFragmentNamesRule;\n },\n});\nObject.defineProperty(exports, 'KnownTypeNamesRule', {\n enumerable: true,\n get: function () {\n return _KnownTypeNamesRule.KnownTypeNamesRule;\n },\n});\nObject.defineProperty(exports, 'LoneAnonymousOperationRule', {\n enumerable: true,\n get: function () {\n return _LoneAnonymousOperationRule.LoneAnonymousOperationRule;\n },\n});\nObject.defineProperty(exports, 'LoneSchemaDefinitionRule', {\n enumerable: true,\n get: function () {\n return _LoneSchemaDefinitionRule.LoneSchemaDefinitionRule;\n },\n});\nObject.defineProperty(exports, 'MaxIntrospectionDepthRule', {\n enumerable: true,\n get: function () {\n return _MaxIntrospectionDepthRule.MaxIntrospectionDepthRule;\n },\n});\nObject.defineProperty(exports, 'NoDeprecatedCustomRule', {\n enumerable: true,\n get: function () {\n return _NoDeprecatedCustomRule.NoDeprecatedCustomRule;\n },\n});\nObject.defineProperty(exports, 'NoFragmentCyclesRule', {\n enumerable: true,\n get: function () {\n return _NoFragmentCyclesRule.NoFragmentCyclesRule;\n },\n});\nObject.defineProperty(exports, 'NoSchemaIntrospectionCustomRule', {\n enumerable: true,\n get: function () {\n return _NoSchemaIntrospectionCustomRule.NoSchemaIntrospectionCustomRule;\n },\n});\nObject.defineProperty(exports, 'NoUndefinedVariablesRule', {\n enumerable: true,\n get: function () {\n return _NoUndefinedVariablesRule.NoUndefinedVariablesRule;\n },\n});\nObject.defineProperty(exports, 'NoUnusedFragmentsRule', {\n enumerable: true,\n get: function () {\n return _NoUnusedFragmentsRule.NoUnusedFragmentsRule;\n },\n});\nObject.defineProperty(exports, 'NoUnusedVariablesRule', {\n enumerable: true,\n get: function () {\n return _NoUnusedVariablesRule.NoUnusedVariablesRule;\n },\n});\nObject.defineProperty(exports, 'OverlappingFieldsCanBeMergedRule', {\n enumerable: true,\n get: function () {\n return _OverlappingFieldsCanBeMergedRule.OverlappingFieldsCanBeMergedRule;\n },\n});\nObject.defineProperty(exports, 'PossibleFragmentSpreadsRule', {\n enumerable: true,\n get: function () {\n return _PossibleFragmentSpreadsRule.PossibleFragmentSpreadsRule;\n },\n});\nObject.defineProperty(exports, 'PossibleTypeExtensionsRule', {\n enumerable: true,\n get: function () {\n return _PossibleTypeExtensionsRule.PossibleTypeExtensionsRule;\n },\n});\nObject.defineProperty(exports, 'ProvidedRequiredArgumentsRule', {\n enumerable: true,\n get: function () {\n return _ProvidedRequiredArgumentsRule.ProvidedRequiredArgumentsRule;\n },\n});\nObject.defineProperty(exports, 'ScalarLeafsRule', {\n enumerable: true,\n get: function () {\n return _ScalarLeafsRule.ScalarLeafsRule;\n },\n});\nObject.defineProperty(exports, 'SingleFieldSubscriptionsRule', {\n enumerable: true,\n get: function () {\n return _SingleFieldSubscriptionsRule.SingleFieldSubscriptionsRule;\n },\n});\nObject.defineProperty(exports, 'UniqueArgumentDefinitionNamesRule', {\n enumerable: true,\n get: function () {\n return _UniqueArgumentDefinitionNamesRule.UniqueArgumentDefinitionNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueArgumentNamesRule', {\n enumerable: true,\n get: function () {\n return _UniqueArgumentNamesRule.UniqueArgumentNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueDirectiveNamesRule', {\n enumerable: true,\n get: function () {\n return _UniqueDirectiveNamesRule.UniqueDirectiveNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueDirectivesPerLocationRule', {\n enumerable: true,\n get: function () {\n return _UniqueDirectivesPerLocationRule.UniqueDirectivesPerLocationRule;\n },\n});\nObject.defineProperty(exports, 'UniqueEnumValueNamesRule', {\n enumerable: true,\n get: function () {\n return _UniqueEnumValueNamesRule.UniqueEnumValueNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueFieldDefinitionNamesRule', {\n enumerable: true,\n get: function () {\n return _UniqueFieldDefinitionNamesRule.UniqueFieldDefinitionNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueFragmentNamesRule', {\n enumerable: true,\n get: function () {\n return _UniqueFragmentNamesRule.UniqueFragmentNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueInputFieldNamesRule', {\n enumerable: true,\n get: function () {\n return _UniqueInputFieldNamesRule.UniqueInputFieldNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueOperationNamesRule', {\n enumerable: true,\n get: function () {\n return _UniqueOperationNamesRule.UniqueOperationNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueOperationTypesRule', {\n enumerable: true,\n get: function () {\n return _UniqueOperationTypesRule.UniqueOperationTypesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueTypeNamesRule', {\n enumerable: true,\n get: function () {\n return _UniqueTypeNamesRule.UniqueTypeNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueVariableNamesRule', {\n enumerable: true,\n get: function () {\n return _UniqueVariableNamesRule.UniqueVariableNamesRule;\n },\n});\nObject.defineProperty(exports, 'ValidationContext', {\n enumerable: true,\n get: function () {\n return _ValidationContext.ValidationContext;\n },\n});\nObject.defineProperty(exports, 'ValuesOfCorrectTypeRule', {\n enumerable: true,\n get: function () {\n return _ValuesOfCorrectTypeRule.ValuesOfCorrectTypeRule;\n },\n});\nObject.defineProperty(exports, 'VariablesAreInputTypesRule', {\n enumerable: true,\n get: function () {\n return _VariablesAreInputTypesRule.VariablesAreInputTypesRule;\n },\n});\nObject.defineProperty(exports, 'VariablesInAllowedPositionRule', {\n enumerable: true,\n get: function () {\n return _VariablesInAllowedPositionRule.VariablesInAllowedPositionRule;\n },\n});\nObject.defineProperty(exports, 'recommendedRules', {\n enumerable: true,\n get: function () {\n return _specifiedRules.recommendedRules;\n },\n});\nObject.defineProperty(exports, 'specifiedRules', {\n enumerable: true,\n get: function () {\n return _specifiedRules.specifiedRules;\n },\n});\nObject.defineProperty(exports, 'validate', {\n enumerable: true,\n get: function () {\n return _validate.validate;\n },\n});\n\nvar _validate = require('./validate.js');\n\nvar _ValidationContext = require('./ValidationContext.js');\n\nvar _specifiedRules = require('./specifiedRules.js');\n\nvar _ExecutableDefinitionsRule = require('./rules/ExecutableDefinitionsRule.js');\n\nvar _FieldsOnCorrectTypeRule = require('./rules/FieldsOnCorrectTypeRule.js');\n\nvar _FragmentsOnCompositeTypesRule = require('./rules/FragmentsOnCompositeTypesRule.js');\n\nvar _KnownArgumentNamesRule = require('./rules/KnownArgumentNamesRule.js');\n\nvar _KnownDirectivesRule = require('./rules/KnownDirectivesRule.js');\n\nvar _KnownFragmentNamesRule = require('./rules/KnownFragmentNamesRule.js');\n\nvar _KnownTypeNamesRule = require('./rules/KnownTypeNamesRule.js');\n\nvar _LoneAnonymousOperationRule = require('./rules/LoneAnonymousOperationRule.js');\n\nvar _NoFragmentCyclesRule = require('./rules/NoFragmentCyclesRule.js');\n\nvar _NoUndefinedVariablesRule = require('./rules/NoUndefinedVariablesRule.js');\n\nvar _NoUnusedFragmentsRule = require('./rules/NoUnusedFragmentsRule.js');\n\nvar _NoUnusedVariablesRule = require('./rules/NoUnusedVariablesRule.js');\n\nvar _OverlappingFieldsCanBeMergedRule = require('./rules/OverlappingFieldsCanBeMergedRule.js');\n\nvar _PossibleFragmentSpreadsRule = require('./rules/PossibleFragmentSpreadsRule.js');\n\nvar _ProvidedRequiredArgumentsRule = require('./rules/ProvidedRequiredArgumentsRule.js');\n\nvar _ScalarLeafsRule = require('./rules/ScalarLeafsRule.js');\n\nvar _SingleFieldSubscriptionsRule = require('./rules/SingleFieldSubscriptionsRule.js');\n\nvar _UniqueArgumentNamesRule = require('./rules/UniqueArgumentNamesRule.js');\n\nvar _UniqueDirectivesPerLocationRule = require('./rules/UniqueDirectivesPerLocationRule.js');\n\nvar _UniqueFragmentNamesRule = require('./rules/UniqueFragmentNamesRule.js');\n\nvar _UniqueInputFieldNamesRule = require('./rules/UniqueInputFieldNamesRule.js');\n\nvar _UniqueOperationNamesRule = require('./rules/UniqueOperationNamesRule.js');\n\nvar _UniqueVariableNamesRule = require('./rules/UniqueVariableNamesRule.js');\n\nvar _ValuesOfCorrectTypeRule = require('./rules/ValuesOfCorrectTypeRule.js');\n\nvar _VariablesAreInputTypesRule = require('./rules/VariablesAreInputTypesRule.js');\n\nvar _VariablesInAllowedPositionRule = require('./rules/VariablesInAllowedPositionRule.js');\n\nvar _MaxIntrospectionDepthRule = require('./rules/MaxIntrospectionDepthRule.js');\n\nvar _LoneSchemaDefinitionRule = require('./rules/LoneSchemaDefinitionRule.js');\n\nvar _UniqueOperationTypesRule = require('./rules/UniqueOperationTypesRule.js');\n\nvar _UniqueTypeNamesRule = require('./rules/UniqueTypeNamesRule.js');\n\nvar _UniqueEnumValueNamesRule = require('./rules/UniqueEnumValueNamesRule.js');\n\nvar _UniqueFieldDefinitionNamesRule = require('./rules/UniqueFieldDefinitionNamesRule.js');\n\nvar _UniqueArgumentDefinitionNamesRule = require('./rules/UniqueArgumentDefinitionNamesRule.js');\n\nvar _UniqueDirectiveNamesRule = require('./rules/UniqueDirectiveNamesRule.js');\n\nvar _PossibleTypeExtensionsRule = require('./rules/PossibleTypeExtensionsRule.js');\n\nvar _NoDeprecatedCustomRule = require('./rules/custom/NoDeprecatedCustomRule.js');\n\nvar _NoSchemaIntrospectionCustomRule = require('./rules/custom/NoSchemaIntrospectionCustomRule.js');\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nObject.defineProperty(exports, 'GraphQLError', {\n enumerable: true,\n get: function () {\n return _GraphQLError.GraphQLError;\n },\n});\nObject.defineProperty(exports, 'formatError', {\n enumerable: true,\n get: function () {\n return _GraphQLError.formatError;\n },\n});\nObject.defineProperty(exports, 'locatedError', {\n enumerable: true,\n get: function () {\n return _locatedError.locatedError;\n },\n});\nObject.defineProperty(exports, 'printError', {\n enumerable: true,\n get: function () {\n return _GraphQLError.printError;\n },\n});\nObject.defineProperty(exports, 'syntaxError', {\n enumerable: true,\n get: function () {\n return _syntaxError.syntaxError;\n },\n});\n\nvar _GraphQLError = require('./GraphQLError.js');\n\nvar _syntaxError = require('./syntaxError.js');\n\nvar _locatedError = require('./locatedError.js');\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.getIntrospectionQuery = getIntrospectionQuery;\n\n/**\n * Produce the GraphQL query recommended for a full schema introspection.\n * Accepts optional IntrospectionOptions.\n */\nfunction getIntrospectionQuery(options) {\n const optionsWithDefault = {\n descriptions: true,\n specifiedByUrl: false,\n directiveIsRepeatable: false,\n schemaDescription: false,\n inputValueDeprecation: false,\n oneOf: false,\n ...options,\n };\n const descriptions = optionsWithDefault.descriptions ? 'description' : '';\n const specifiedByUrl = optionsWithDefault.specifiedByUrl\n ? 'specifiedByURL'\n : '';\n const directiveIsRepeatable = optionsWithDefault.directiveIsRepeatable\n ? 'isRepeatable'\n : '';\n const schemaDescription = optionsWithDefault.schemaDescription\n ? descriptions\n : '';\n\n function inputDeprecation(str) {\n return optionsWithDefault.inputValueDeprecation ? str : '';\n }\n\n const oneOf = optionsWithDefault.oneOf ? 'isOneOf' : '';\n return `\n query IntrospectionQuery {\n __schema {\n ${schemaDescription}\n queryType { name kind }\n mutationType { name kind }\n subscriptionType { name kind }\n types {\n ...FullType\n }\n directives {\n name\n ${descriptions}\n ${directiveIsRepeatable}\n locations\n args${inputDeprecation('(includeDeprecated: true)')} {\n ...InputValue\n }\n }\n }\n }\n\n fragment FullType on __Type {\n kind\n name\n ${descriptions}\n ${specifiedByUrl}\n ${oneOf}\n fields(includeDeprecated: true) {\n name\n ${descriptions}\n args${inputDeprecation('(includeDeprecated: true)')} {\n ...InputValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields${inputDeprecation('(includeDeprecated: true)')} {\n ...InputValue\n }\n interfaces {\n ...TypeRef\n }\n enumValues(includeDeprecated: true) {\n name\n ${descriptions}\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n ...TypeRef\n }\n }\n\n fragment InputValue on __InputValue {\n name\n ${descriptions}\n type { ...TypeRef }\n defaultValue\n ${inputDeprecation('isDeprecated')}\n ${inputDeprecation('deprecationReason')}\n }\n\n fragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n `;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.getOperationAST = getOperationAST;\n\nvar _kinds = require('../language/kinds.js');\n\n/**\n * Returns an operation AST given a document AST and optionally an operation\n * name. If a name is not provided, an operation is only returned if only one is\n * provided in the document.\n */\nfunction getOperationAST(documentAST, operationName) {\n let operation = null;\n\n for (const definition of documentAST.definitions) {\n if (definition.kind === _kinds.Kind.OPERATION_DEFINITION) {\n var _definition$name;\n\n if (operationName == null) {\n // If no operation name was provided, only return an Operation if there\n // is one defined in the document. Upon encountering the second, return\n // null.\n if (operation) {\n return null;\n }\n\n operation = definition;\n } else if (\n ((_definition$name = definition.name) === null ||\n _definition$name === void 0\n ? void 0\n : _definition$name.value) === operationName\n ) {\n return definition;\n }\n }\n }\n\n return operation;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.getOperationRootType = getOperationRootType;\n\nvar _GraphQLError = require('../error/GraphQLError.js');\n\n/**\n * Extracts the root type of the operation from the schema.\n *\n * @deprecated Please use `GraphQLSchema.getRootType` instead. Will be removed in v17\n */\nfunction getOperationRootType(schema, operation) {\n if (operation.operation === 'query') {\n const queryType = schema.getQueryType();\n\n if (!queryType) {\n throw new _GraphQLError.GraphQLError(\n 'Schema does not define the required query root type.',\n {\n nodes: operation,\n },\n );\n }\n\n return queryType;\n }\n\n if (operation.operation === 'mutation') {\n const mutationType = schema.getMutationType();\n\n if (!mutationType) {\n throw new _GraphQLError.GraphQLError(\n 'Schema is not configured for mutations.',\n {\n nodes: operation,\n },\n );\n }\n\n return mutationType;\n }\n\n if (operation.operation === 'subscription') {\n const subscriptionType = schema.getSubscriptionType();\n\n if (!subscriptionType) {\n throw new _GraphQLError.GraphQLError(\n 'Schema is not configured for subscriptions.',\n {\n nodes: operation,\n },\n );\n }\n\n return subscriptionType;\n }\n\n throw new _GraphQLError.GraphQLError(\n 'Can only have query, mutation and subscription operations.',\n {\n nodes: operation,\n },\n );\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.introspectionFromSchema = introspectionFromSchema;\n\nvar _invariant = require('../jsutils/invariant.js');\n\nvar _parser = require('../language/parser.js');\n\nvar _execute = require('../execution/execute.js');\n\nvar _getIntrospectionQuery = require('./getIntrospectionQuery.js');\n\n/**\n * Build an IntrospectionQuery from a GraphQLSchema\n *\n * IntrospectionQuery is useful for utilities that care about type and field\n * relationships, but do not need to traverse through those relationships.\n *\n * This is the inverse of buildClientSchema. The primary use case is outside\n * of the server context, for instance when doing schema comparisons.\n */\nfunction introspectionFromSchema(schema, options) {\n const optionsWithDefaults = {\n specifiedByUrl: true,\n directiveIsRepeatable: true,\n schemaDescription: true,\n inputValueDeprecation: true,\n oneOf: true,\n ...options,\n };\n const document = (0, _parser.parse)(\n (0, _getIntrospectionQuery.getIntrospectionQuery)(optionsWithDefaults),\n );\n const result = (0, _execute.executeSync)({\n schema,\n document,\n });\n (!result.errors && result.data) || (0, _invariant.invariant)(false);\n return result.data;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.buildClientSchema = buildClientSchema;\n\nvar _devAssert = require('../jsutils/devAssert.js');\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _isObjectLike = require('../jsutils/isObjectLike.js');\n\nvar _keyValMap = require('../jsutils/keyValMap.js');\n\nvar _parser = require('../language/parser.js');\n\nvar _definition = require('../type/definition.js');\n\nvar _directives = require('../type/directives.js');\n\nvar _introspection = require('../type/introspection.js');\n\nvar _scalars = require('../type/scalars.js');\n\nvar _schema = require('../type/schema.js');\n\nvar _valueFromAST = require('./valueFromAST.js');\n\n/**\n * Build a GraphQLSchema for use by client tools.\n *\n * Given the result of a client running the introspection query, creates and\n * returns a GraphQLSchema instance which can be then used with all graphql-js\n * tools, but cannot be used to execute a query, as introspection does not\n * represent the \"resolver\", \"parse\" or \"serialize\" functions or any other\n * server-internal mechanisms.\n *\n * This function expects a complete introspection result. Don't forget to check\n * the \"errors\" field of a server response before calling this function.\n */\nfunction buildClientSchema(introspection, options) {\n ((0, _isObjectLike.isObjectLike)(introspection) &&\n (0, _isObjectLike.isObjectLike)(introspection.__schema)) ||\n (0, _devAssert.devAssert)(\n false,\n `Invalid or incomplete introspection result. Ensure that you are passing \"data\" property of introspection response and no \"errors\" was returned alongside: ${(0,\n _inspect.inspect)(introspection)}.`,\n ); // Get the schema from the introspection result.\n\n const schemaIntrospection = introspection.__schema; // Iterate through all types, getting the type definition for each.\n\n const typeMap = (0, _keyValMap.keyValMap)(\n schemaIntrospection.types,\n (typeIntrospection) => typeIntrospection.name,\n (typeIntrospection) => buildType(typeIntrospection),\n ); // Include standard types only if they are used.\n\n for (const stdType of [\n ..._scalars.specifiedScalarTypes,\n ..._introspection.introspectionTypes,\n ]) {\n if (typeMap[stdType.name]) {\n typeMap[stdType.name] = stdType;\n }\n } // Get the root Query, Mutation, and Subscription types.\n\n const queryType = schemaIntrospection.queryType\n ? getObjectType(schemaIntrospection.queryType)\n : null;\n const mutationType = schemaIntrospection.mutationType\n ? getObjectType(schemaIntrospection.mutationType)\n : null;\n const subscriptionType = schemaIntrospection.subscriptionType\n ? getObjectType(schemaIntrospection.subscriptionType)\n : null; // Get the directives supported by Introspection, assuming empty-set if\n // directives were not queried for.\n\n const directives = schemaIntrospection.directives\n ? schemaIntrospection.directives.map(buildDirective)\n : []; // Then produce and return a Schema with these types.\n\n return new _schema.GraphQLSchema({\n description: schemaIntrospection.description,\n query: queryType,\n mutation: mutationType,\n subscription: subscriptionType,\n types: Object.values(typeMap),\n directives,\n assumeValid:\n options === null || options === void 0 ? void 0 : options.assumeValid,\n }); // Given a type reference in introspection, return the GraphQLType instance.\n // preferring cached instances before building new instances.\n\n function getType(typeRef) {\n if (typeRef.kind === _introspection.TypeKind.LIST) {\n const itemRef = typeRef.ofType;\n\n if (!itemRef) {\n throw new Error('Decorated type deeper than introspection query.');\n }\n\n return new _definition.GraphQLList(getType(itemRef));\n }\n\n if (typeRef.kind === _introspection.TypeKind.NON_NULL) {\n const nullableRef = typeRef.ofType;\n\n if (!nullableRef) {\n throw new Error('Decorated type deeper than introspection query.');\n }\n\n const nullableType = getType(nullableRef);\n return new _definition.GraphQLNonNull(\n (0, _definition.assertNullableType)(nullableType),\n );\n }\n\n return getNamedType(typeRef);\n }\n\n function getNamedType(typeRef) {\n const typeName = typeRef.name;\n\n if (!typeName) {\n throw new Error(\n `Unknown type reference: ${(0, _inspect.inspect)(typeRef)}.`,\n );\n }\n\n const type = typeMap[typeName];\n\n if (!type) {\n throw new Error(\n `Invalid or incomplete schema, unknown type: ${typeName}. Ensure that a full introspection query is used in order to build a client schema.`,\n );\n }\n\n return type;\n }\n\n function getObjectType(typeRef) {\n return (0, _definition.assertObjectType)(getNamedType(typeRef));\n }\n\n function getInterfaceType(typeRef) {\n return (0, _definition.assertInterfaceType)(getNamedType(typeRef));\n } // Given a type's introspection result, construct the correct\n // GraphQLType instance.\n\n function buildType(type) {\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain\n if (type != null && type.name != null && type.kind != null) {\n // FIXME: Properly type IntrospectionType, it's a breaking change so fix in v17\n // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check\n switch (type.kind) {\n case _introspection.TypeKind.SCALAR:\n return buildScalarDef(type);\n\n case _introspection.TypeKind.OBJECT:\n return buildObjectDef(type);\n\n case _introspection.TypeKind.INTERFACE:\n return buildInterfaceDef(type);\n\n case _introspection.TypeKind.UNION:\n return buildUnionDef(type);\n\n case _introspection.TypeKind.ENUM:\n return buildEnumDef(type);\n\n case _introspection.TypeKind.INPUT_OBJECT:\n return buildInputObjectDef(type);\n }\n }\n\n const typeStr = (0, _inspect.inspect)(type);\n throw new Error(\n `Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${typeStr}.`,\n );\n }\n\n function buildScalarDef(scalarIntrospection) {\n return new _definition.GraphQLScalarType({\n name: scalarIntrospection.name,\n description: scalarIntrospection.description,\n specifiedByURL: scalarIntrospection.specifiedByURL,\n });\n }\n\n function buildImplementationsList(implementingIntrospection) {\n // TODO: Temporary workaround until GraphQL ecosystem will fully support\n // 'interfaces' on interface types.\n if (\n implementingIntrospection.interfaces === null &&\n implementingIntrospection.kind === _introspection.TypeKind.INTERFACE\n ) {\n return [];\n }\n\n if (!implementingIntrospection.interfaces) {\n const implementingIntrospectionStr = (0, _inspect.inspect)(\n implementingIntrospection,\n );\n throw new Error(\n `Introspection result missing interfaces: ${implementingIntrospectionStr}.`,\n );\n }\n\n return implementingIntrospection.interfaces.map(getInterfaceType);\n }\n\n function buildObjectDef(objectIntrospection) {\n return new _definition.GraphQLObjectType({\n name: objectIntrospection.name,\n description: objectIntrospection.description,\n interfaces: () => buildImplementationsList(objectIntrospection),\n fields: () => buildFieldDefMap(objectIntrospection),\n });\n }\n\n function buildInterfaceDef(interfaceIntrospection) {\n return new _definition.GraphQLInterfaceType({\n name: interfaceIntrospection.name,\n description: interfaceIntrospection.description,\n interfaces: () => buildImplementationsList(interfaceIntrospection),\n fields: () => buildFieldDefMap(interfaceIntrospection),\n });\n }\n\n function buildUnionDef(unionIntrospection) {\n if (!unionIntrospection.possibleTypes) {\n const unionIntrospectionStr = (0, _inspect.inspect)(unionIntrospection);\n throw new Error(\n `Introspection result missing possibleTypes: ${unionIntrospectionStr}.`,\n );\n }\n\n return new _definition.GraphQLUnionType({\n name: unionIntrospection.name,\n description: unionIntrospection.description,\n types: () => unionIntrospection.possibleTypes.map(getObjectType),\n });\n }\n\n function buildEnumDef(enumIntrospection) {\n if (!enumIntrospection.enumValues) {\n const enumIntrospectionStr = (0, _inspect.inspect)(enumIntrospection);\n throw new Error(\n `Introspection result missing enumValues: ${enumIntrospectionStr}.`,\n );\n }\n\n return new _definition.GraphQLEnumType({\n name: enumIntrospection.name,\n description: enumIntrospection.description,\n values: (0, _keyValMap.keyValMap)(\n enumIntrospection.enumValues,\n (valueIntrospection) => valueIntrospection.name,\n (valueIntrospection) => ({\n description: valueIntrospection.description,\n deprecationReason: valueIntrospection.deprecationReason,\n }),\n ),\n });\n }\n\n function buildInputObjectDef(inputObjectIntrospection) {\n if (!inputObjectIntrospection.inputFields) {\n const inputObjectIntrospectionStr = (0, _inspect.inspect)(\n inputObjectIntrospection,\n );\n throw new Error(\n `Introspection result missing inputFields: ${inputObjectIntrospectionStr}.`,\n );\n }\n\n return new _definition.GraphQLInputObjectType({\n name: inputObjectIntrospection.name,\n description: inputObjectIntrospection.description,\n fields: () => buildInputValueDefMap(inputObjectIntrospection.inputFields),\n isOneOf: inputObjectIntrospection.isOneOf,\n });\n }\n\n function buildFieldDefMap(typeIntrospection) {\n if (!typeIntrospection.fields) {\n throw new Error(\n `Introspection result missing fields: ${(0, _inspect.inspect)(\n typeIntrospection,\n )}.`,\n );\n }\n\n return (0, _keyValMap.keyValMap)(\n typeIntrospection.fields,\n (fieldIntrospection) => fieldIntrospection.name,\n buildField,\n );\n }\n\n function buildField(fieldIntrospection) {\n const type = getType(fieldIntrospection.type);\n\n if (!(0, _definition.isOutputType)(type)) {\n const typeStr = (0, _inspect.inspect)(type);\n throw new Error(\n `Introspection must provide output type for fields, but received: ${typeStr}.`,\n );\n }\n\n if (!fieldIntrospection.args) {\n const fieldIntrospectionStr = (0, _inspect.inspect)(fieldIntrospection);\n throw new Error(\n `Introspection result missing field args: ${fieldIntrospectionStr}.`,\n );\n }\n\n return {\n description: fieldIntrospection.description,\n deprecationReason: fieldIntrospection.deprecationReason,\n type,\n args: buildInputValueDefMap(fieldIntrospection.args),\n };\n }\n\n function buildInputValueDefMap(inputValueIntrospections) {\n return (0, _keyValMap.keyValMap)(\n inputValueIntrospections,\n (inputValue) => inputValue.name,\n buildInputValue,\n );\n }\n\n function buildInputValue(inputValueIntrospection) {\n const type = getType(inputValueIntrospection.type);\n\n if (!(0, _definition.isInputType)(type)) {\n const typeStr = (0, _inspect.inspect)(type);\n throw new Error(\n `Introspection must provide input type for arguments, but received: ${typeStr}.`,\n );\n }\n\n const defaultValue =\n inputValueIntrospection.defaultValue != null\n ? (0, _valueFromAST.valueFromAST)(\n (0, _parser.parseValue)(inputValueIntrospection.defaultValue),\n type,\n )\n : undefined;\n return {\n description: inputValueIntrospection.description,\n type,\n defaultValue,\n deprecationReason: inputValueIntrospection.deprecationReason,\n };\n }\n\n function buildDirective(directiveIntrospection) {\n if (!directiveIntrospection.args) {\n const directiveIntrospectionStr = (0, _inspect.inspect)(\n directiveIntrospection,\n );\n throw new Error(\n `Introspection result missing directive args: ${directiveIntrospectionStr}.`,\n );\n }\n\n if (!directiveIntrospection.locations) {\n const directiveIntrospectionStr = (0, _inspect.inspect)(\n directiveIntrospection,\n );\n throw new Error(\n `Introspection result missing directive locations: ${directiveIntrospectionStr}.`,\n );\n }\n\n return new _directives.GraphQLDirective({\n name: directiveIntrospection.name,\n description: directiveIntrospection.description,\n isRepeatable: directiveIntrospection.isRepeatable,\n locations: directiveIntrospection.locations.slice(),\n args: buildInputValueDefMap(directiveIntrospection.args),\n });\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.extendSchema = extendSchema;\nexports.extendSchemaImpl = extendSchemaImpl;\n\nvar _devAssert = require('../jsutils/devAssert.js');\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _invariant = require('../jsutils/invariant.js');\n\nvar _keyMap = require('../jsutils/keyMap.js');\n\nvar _mapValue = require('../jsutils/mapValue.js');\n\nvar _kinds = require('../language/kinds.js');\n\nvar _predicates = require('../language/predicates.js');\n\nvar _definition = require('../type/definition.js');\n\nvar _directives = require('../type/directives.js');\n\nvar _introspection = require('../type/introspection.js');\n\nvar _scalars = require('../type/scalars.js');\n\nvar _schema = require('../type/schema.js');\n\nvar _validate = require('../validation/validate.js');\n\nvar _values = require('../execution/values.js');\n\nvar _valueFromAST = require('./valueFromAST.js');\n\n/**\n * Produces a new schema given an existing schema and a document which may\n * contain GraphQL type extensions and definitions. The original schema will\n * remain unaltered.\n *\n * Because a schema represents a graph of references, a schema cannot be\n * extended without effectively making an entire copy. We do not know until it's\n * too late if subgraphs remain unchanged.\n *\n * This algorithm copies the provided schema, applying extensions while\n * producing the copy. The original schema remains unaltered.\n */\nfunction extendSchema(schema, documentAST, options) {\n (0, _schema.assertSchema)(schema);\n (documentAST != null && documentAST.kind === _kinds.Kind.DOCUMENT) ||\n (0, _devAssert.devAssert)(false, 'Must provide valid Document AST.');\n\n if (\n (options === null || options === void 0 ? void 0 : options.assumeValid) !==\n true &&\n (options === null || options === void 0\n ? void 0\n : options.assumeValidSDL) !== true\n ) {\n (0, _validate.assertValidSDLExtension)(documentAST, schema);\n }\n\n const schemaConfig = schema.toConfig();\n const extendedConfig = extendSchemaImpl(schemaConfig, documentAST, options);\n return schemaConfig === extendedConfig\n ? schema\n : new _schema.GraphQLSchema(extendedConfig);\n}\n/**\n * @internal\n */\n\nfunction extendSchemaImpl(schemaConfig, documentAST, options) {\n var _schemaDef, _schemaDef$descriptio, _schemaDef2, _options$assumeValid;\n\n // Collect the type definitions and extensions found in the document.\n const typeDefs = [];\n const typeExtensionsMap = Object.create(null); // New directives and types are separate because a directives and types can\n // have the same name. For example, a type named \"skip\".\n\n const directiveDefs = [];\n let schemaDef; // Schema extensions are collected which may add additional operation types.\n\n const schemaExtensions = [];\n\n for (const def of documentAST.definitions) {\n if (def.kind === _kinds.Kind.SCHEMA_DEFINITION) {\n schemaDef = def;\n } else if (def.kind === _kinds.Kind.SCHEMA_EXTENSION) {\n schemaExtensions.push(def);\n } else if ((0, _predicates.isTypeDefinitionNode)(def)) {\n typeDefs.push(def);\n } else if ((0, _predicates.isTypeExtensionNode)(def)) {\n const extendedTypeName = def.name.value;\n const existingTypeExtensions = typeExtensionsMap[extendedTypeName];\n typeExtensionsMap[extendedTypeName] = existingTypeExtensions\n ? existingTypeExtensions.concat([def])\n : [def];\n } else if (def.kind === _kinds.Kind.DIRECTIVE_DEFINITION) {\n directiveDefs.push(def);\n }\n } // If this document contains no new types, extensions, or directives then\n // return the same unmodified GraphQLSchema instance.\n\n if (\n Object.keys(typeExtensionsMap).length === 0 &&\n typeDefs.length === 0 &&\n directiveDefs.length === 0 &&\n schemaExtensions.length === 0 &&\n schemaDef == null\n ) {\n return schemaConfig;\n }\n\n const typeMap = Object.create(null);\n\n for (const existingType of schemaConfig.types) {\n typeMap[existingType.name] = extendNamedType(existingType);\n }\n\n for (const typeNode of typeDefs) {\n var _stdTypeMap$name;\n\n const name = typeNode.name.value;\n typeMap[name] =\n (_stdTypeMap$name = stdTypeMap[name]) !== null &&\n _stdTypeMap$name !== void 0\n ? _stdTypeMap$name\n : buildType(typeNode);\n }\n\n const operationTypes = {\n // Get the extended root operation types.\n query: schemaConfig.query && replaceNamedType(schemaConfig.query),\n mutation: schemaConfig.mutation && replaceNamedType(schemaConfig.mutation),\n subscription:\n schemaConfig.subscription && replaceNamedType(schemaConfig.subscription),\n // Then, incorporate schema definition and all schema extensions.\n ...(schemaDef && getOperationTypes([schemaDef])),\n ...getOperationTypes(schemaExtensions),\n }; // Then produce and return a Schema config with these types.\n\n return {\n description:\n (_schemaDef = schemaDef) === null || _schemaDef === void 0\n ? void 0\n : (_schemaDef$descriptio = _schemaDef.description) === null ||\n _schemaDef$descriptio === void 0\n ? void 0\n : _schemaDef$descriptio.value,\n ...operationTypes,\n types: Object.values(typeMap),\n directives: [\n ...schemaConfig.directives.map(replaceDirective),\n ...directiveDefs.map(buildDirective),\n ],\n extensions: Object.create(null),\n astNode:\n (_schemaDef2 = schemaDef) !== null && _schemaDef2 !== void 0\n ? _schemaDef2\n : schemaConfig.astNode,\n extensionASTNodes: schemaConfig.extensionASTNodes.concat(schemaExtensions),\n assumeValid:\n (_options$assumeValid =\n options === null || options === void 0\n ? void 0\n : options.assumeValid) !== null && _options$assumeValid !== void 0\n ? _options$assumeValid\n : false,\n }; // Below are functions used for producing this schema that have closed over\n // this scope and have access to the schema, cache, and newly defined types.\n\n function replaceType(type) {\n if ((0, _definition.isListType)(type)) {\n // @ts-expect-error\n return new _definition.GraphQLList(replaceType(type.ofType));\n }\n\n if ((0, _definition.isNonNullType)(type)) {\n // @ts-expect-error\n return new _definition.GraphQLNonNull(replaceType(type.ofType));\n } // @ts-expect-error FIXME\n\n return replaceNamedType(type);\n }\n\n function replaceNamedType(type) {\n // Note: While this could make early assertions to get the correctly\n // typed values, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n return typeMap[type.name];\n }\n\n function replaceDirective(directive) {\n const config = directive.toConfig();\n return new _directives.GraphQLDirective({\n ...config,\n args: (0, _mapValue.mapValue)(config.args, extendArg),\n });\n }\n\n function extendNamedType(type) {\n if (\n (0, _introspection.isIntrospectionType)(type) ||\n (0, _scalars.isSpecifiedScalarType)(type)\n ) {\n // Builtin types are not extended.\n return type;\n }\n\n if ((0, _definition.isScalarType)(type)) {\n return extendScalarType(type);\n }\n\n if ((0, _definition.isObjectType)(type)) {\n return extendObjectType(type);\n }\n\n if ((0, _definition.isInterfaceType)(type)) {\n return extendInterfaceType(type);\n }\n\n if ((0, _definition.isUnionType)(type)) {\n return extendUnionType(type);\n }\n\n if ((0, _definition.isEnumType)(type)) {\n return extendEnumType(type);\n }\n\n if ((0, _definition.isInputObjectType)(type)) {\n return extendInputObjectType(type);\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible type definition nodes have been considered.\n\n false ||\n (0, _invariant.invariant)(\n false,\n 'Unexpected type: ' + (0, _inspect.inspect)(type),\n );\n }\n\n function extendInputObjectType(type) {\n var _typeExtensionsMap$co;\n\n const config = type.toConfig();\n const extensions =\n (_typeExtensionsMap$co = typeExtensionsMap[config.name]) !== null &&\n _typeExtensionsMap$co !== void 0\n ? _typeExtensionsMap$co\n : [];\n return new _definition.GraphQLInputObjectType({\n ...config,\n fields: () => ({\n ...(0, _mapValue.mapValue)(config.fields, (field) => ({\n ...field,\n type: replaceType(field.type),\n })),\n ...buildInputFieldMap(extensions),\n }),\n extensionASTNodes: config.extensionASTNodes.concat(extensions),\n });\n }\n\n function extendEnumType(type) {\n var _typeExtensionsMap$ty;\n\n const config = type.toConfig();\n const extensions =\n (_typeExtensionsMap$ty = typeExtensionsMap[type.name]) !== null &&\n _typeExtensionsMap$ty !== void 0\n ? _typeExtensionsMap$ty\n : [];\n return new _definition.GraphQLEnumType({\n ...config,\n values: { ...config.values, ...buildEnumValueMap(extensions) },\n extensionASTNodes: config.extensionASTNodes.concat(extensions),\n });\n }\n\n function extendScalarType(type) {\n var _typeExtensionsMap$co2;\n\n const config = type.toConfig();\n const extensions =\n (_typeExtensionsMap$co2 = typeExtensionsMap[config.name]) !== null &&\n _typeExtensionsMap$co2 !== void 0\n ? _typeExtensionsMap$co2\n : [];\n let specifiedByURL = config.specifiedByURL;\n\n for (const extensionNode of extensions) {\n var _getSpecifiedByURL;\n\n specifiedByURL =\n (_getSpecifiedByURL = getSpecifiedByURL(extensionNode)) !== null &&\n _getSpecifiedByURL !== void 0\n ? _getSpecifiedByURL\n : specifiedByURL;\n }\n\n return new _definition.GraphQLScalarType({\n ...config,\n specifiedByURL,\n extensionASTNodes: config.extensionASTNodes.concat(extensions),\n });\n }\n\n function extendObjectType(type) {\n var _typeExtensionsMap$co3;\n\n const config = type.toConfig();\n const extensions =\n (_typeExtensionsMap$co3 = typeExtensionsMap[config.name]) !== null &&\n _typeExtensionsMap$co3 !== void 0\n ? _typeExtensionsMap$co3\n : [];\n return new _definition.GraphQLObjectType({\n ...config,\n interfaces: () => [\n ...type.getInterfaces().map(replaceNamedType),\n ...buildInterfaces(extensions),\n ],\n fields: () => ({\n ...(0, _mapValue.mapValue)(config.fields, extendField),\n ...buildFieldMap(extensions),\n }),\n extensionASTNodes: config.extensionASTNodes.concat(extensions),\n });\n }\n\n function extendInterfaceType(type) {\n var _typeExtensionsMap$co4;\n\n const config = type.toConfig();\n const extensions =\n (_typeExtensionsMap$co4 = typeExtensionsMap[config.name]) !== null &&\n _typeExtensionsMap$co4 !== void 0\n ? _typeExtensionsMap$co4\n : [];\n return new _definition.GraphQLInterfaceType({\n ...config,\n interfaces: () => [\n ...type.getInterfaces().map(replaceNamedType),\n ...buildInterfaces(extensions),\n ],\n fields: () => ({\n ...(0, _mapValue.mapValue)(config.fields, extendField),\n ...buildFieldMap(extensions),\n }),\n extensionASTNodes: config.extensionASTNodes.concat(extensions),\n });\n }\n\n function extendUnionType(type) {\n var _typeExtensionsMap$co5;\n\n const config = type.toConfig();\n const extensions =\n (_typeExtensionsMap$co5 = typeExtensionsMap[config.name]) !== null &&\n _typeExtensionsMap$co5 !== void 0\n ? _typeExtensionsMap$co5\n : [];\n return new _definition.GraphQLUnionType({\n ...config,\n types: () => [\n ...type.getTypes().map(replaceNamedType),\n ...buildUnionTypes(extensions),\n ],\n extensionASTNodes: config.extensionASTNodes.concat(extensions),\n });\n }\n\n function extendField(field) {\n return {\n ...field,\n type: replaceType(field.type),\n args: field.args && (0, _mapValue.mapValue)(field.args, extendArg),\n };\n }\n\n function extendArg(arg) {\n return { ...arg, type: replaceType(arg.type) };\n }\n\n function getOperationTypes(nodes) {\n const opTypes = {};\n\n for (const node of nodes) {\n var _node$operationTypes;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n const operationTypesNodes =\n /* c8 ignore next */\n (_node$operationTypes = node.operationTypes) !== null &&\n _node$operationTypes !== void 0\n ? _node$operationTypes\n : [];\n\n for (const operationType of operationTypesNodes) {\n // Note: While this could make early assertions to get the correctly\n // typed values below, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n // @ts-expect-error\n opTypes[operationType.operation] = getNamedType(operationType.type);\n }\n }\n\n return opTypes;\n }\n\n function getNamedType(node) {\n var _stdTypeMap$name2;\n\n const name = node.name.value;\n const type =\n (_stdTypeMap$name2 = stdTypeMap[name]) !== null &&\n _stdTypeMap$name2 !== void 0\n ? _stdTypeMap$name2\n : typeMap[name];\n\n if (type === undefined) {\n throw new Error(`Unknown type: \"${name}\".`);\n }\n\n return type;\n }\n\n function getWrappedType(node) {\n if (node.kind === _kinds.Kind.LIST_TYPE) {\n return new _definition.GraphQLList(getWrappedType(node.type));\n }\n\n if (node.kind === _kinds.Kind.NON_NULL_TYPE) {\n return new _definition.GraphQLNonNull(getWrappedType(node.type));\n }\n\n return getNamedType(node);\n }\n\n function buildDirective(node) {\n var _node$description;\n\n return new _directives.GraphQLDirective({\n name: node.name.value,\n description:\n (_node$description = node.description) === null ||\n _node$description === void 0\n ? void 0\n : _node$description.value,\n // @ts-expect-error\n locations: node.locations.map(({ value }) => value),\n isRepeatable: node.repeatable,\n args: buildArgumentMap(node.arguments),\n astNode: node,\n });\n }\n\n function buildFieldMap(nodes) {\n const fieldConfigMap = Object.create(null);\n\n for (const node of nodes) {\n var _node$fields;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n const nodeFields =\n /* c8 ignore next */\n (_node$fields = node.fields) !== null && _node$fields !== void 0\n ? _node$fields\n : [];\n\n for (const field of nodeFields) {\n var _field$description;\n\n fieldConfigMap[field.name.value] = {\n // Note: While this could make assertions to get the correctly typed\n // value, that would throw immediately while type system validation\n // with validateSchema() will produce more actionable results.\n type: getWrappedType(field.type),\n description:\n (_field$description = field.description) === null ||\n _field$description === void 0\n ? void 0\n : _field$description.value,\n args: buildArgumentMap(field.arguments),\n deprecationReason: getDeprecationReason(field),\n astNode: field,\n };\n }\n }\n\n return fieldConfigMap;\n }\n\n function buildArgumentMap(args) {\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n const argsNodes =\n /* c8 ignore next */\n args !== null && args !== void 0 ? args : [];\n const argConfigMap = Object.create(null);\n\n for (const arg of argsNodes) {\n var _arg$description;\n\n // Note: While this could make assertions to get the correctly typed\n // value, that would throw immediately while type system validation\n // with validateSchema() will produce more actionable results.\n const type = getWrappedType(arg.type);\n argConfigMap[arg.name.value] = {\n type,\n description:\n (_arg$description = arg.description) === null ||\n _arg$description === void 0\n ? void 0\n : _arg$description.value,\n defaultValue: (0, _valueFromAST.valueFromAST)(arg.defaultValue, type),\n deprecationReason: getDeprecationReason(arg),\n astNode: arg,\n };\n }\n\n return argConfigMap;\n }\n\n function buildInputFieldMap(nodes) {\n const inputFieldMap = Object.create(null);\n\n for (const node of nodes) {\n var _node$fields2;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n const fieldsNodes =\n /* c8 ignore next */\n (_node$fields2 = node.fields) !== null && _node$fields2 !== void 0\n ? _node$fields2\n : [];\n\n for (const field of fieldsNodes) {\n var _field$description2;\n\n // Note: While this could make assertions to get the correctly typed\n // value, that would throw immediately while type system validation\n // with validateSchema() will produce more actionable results.\n const type = getWrappedType(field.type);\n inputFieldMap[field.name.value] = {\n type,\n description:\n (_field$description2 = field.description) === null ||\n _field$description2 === void 0\n ? void 0\n : _field$description2.value,\n defaultValue: (0, _valueFromAST.valueFromAST)(\n field.defaultValue,\n type,\n ),\n deprecationReason: getDeprecationReason(field),\n astNode: field,\n };\n }\n }\n\n return inputFieldMap;\n }\n\n function buildEnumValueMap(nodes) {\n const enumValueMap = Object.create(null);\n\n for (const node of nodes) {\n var _node$values;\n\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n const valuesNodes =\n /* c8 ignore next */\n (_node$values = node.values) !== null && _node$values !== void 0\n ? _node$values\n : [];\n\n for (const value of valuesNodes) {\n var _value$description;\n\n enumValueMap[value.name.value] = {\n description:\n (_value$description = value.description) === null ||\n _value$description === void 0\n ? void 0\n : _value$description.value,\n deprecationReason: getDeprecationReason(value),\n astNode: value,\n };\n }\n }\n\n return enumValueMap;\n }\n\n function buildInterfaces(nodes) {\n // Note: While this could make assertions to get the correctly typed\n // values below, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n // @ts-expect-error\n return nodes.flatMap(\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n (node) => {\n var _node$interfaces$map, _node$interfaces;\n\n return (\n /* c8 ignore next */\n (_node$interfaces$map =\n (_node$interfaces = node.interfaces) === null ||\n _node$interfaces === void 0\n ? void 0\n : _node$interfaces.map(getNamedType)) !== null &&\n _node$interfaces$map !== void 0\n ? _node$interfaces$map\n : []\n );\n },\n );\n }\n\n function buildUnionTypes(nodes) {\n // Note: While this could make assertions to get the correctly typed\n // values below, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n // @ts-expect-error\n return nodes.flatMap(\n // FIXME: https://github.com/graphql/graphql-js/issues/2203\n (node) => {\n var _node$types$map, _node$types;\n\n return (\n /* c8 ignore next */\n (_node$types$map =\n (_node$types = node.types) === null || _node$types === void 0\n ? void 0\n : _node$types.map(getNamedType)) !== null &&\n _node$types$map !== void 0\n ? _node$types$map\n : []\n );\n },\n );\n }\n\n function buildType(astNode) {\n var _typeExtensionsMap$na;\n\n const name = astNode.name.value;\n const extensionASTNodes =\n (_typeExtensionsMap$na = typeExtensionsMap[name]) !== null &&\n _typeExtensionsMap$na !== void 0\n ? _typeExtensionsMap$na\n : [];\n\n switch (astNode.kind) {\n case _kinds.Kind.OBJECT_TYPE_DEFINITION: {\n var _astNode$description;\n\n const allNodes = [astNode, ...extensionASTNodes];\n return new _definition.GraphQLObjectType({\n name,\n description:\n (_astNode$description = astNode.description) === null ||\n _astNode$description === void 0\n ? void 0\n : _astNode$description.value,\n interfaces: () => buildInterfaces(allNodes),\n fields: () => buildFieldMap(allNodes),\n astNode,\n extensionASTNodes,\n });\n }\n\n case _kinds.Kind.INTERFACE_TYPE_DEFINITION: {\n var _astNode$description2;\n\n const allNodes = [astNode, ...extensionASTNodes];\n return new _definition.GraphQLInterfaceType({\n name,\n description:\n (_astNode$description2 = astNode.description) === null ||\n _astNode$description2 === void 0\n ? void 0\n : _astNode$description2.value,\n interfaces: () => buildInterfaces(allNodes),\n fields: () => buildFieldMap(allNodes),\n astNode,\n extensionASTNodes,\n });\n }\n\n case _kinds.Kind.ENUM_TYPE_DEFINITION: {\n var _astNode$description3;\n\n const allNodes = [astNode, ...extensionASTNodes];\n return new _definition.GraphQLEnumType({\n name,\n description:\n (_astNode$description3 = astNode.description) === null ||\n _astNode$description3 === void 0\n ? void 0\n : _astNode$description3.value,\n values: buildEnumValueMap(allNodes),\n astNode,\n extensionASTNodes,\n });\n }\n\n case _kinds.Kind.UNION_TYPE_DEFINITION: {\n var _astNode$description4;\n\n const allNodes = [astNode, ...extensionASTNodes];\n return new _definition.GraphQLUnionType({\n name,\n description:\n (_astNode$description4 = astNode.description) === null ||\n _astNode$description4 === void 0\n ? void 0\n : _astNode$description4.value,\n types: () => buildUnionTypes(allNodes),\n astNode,\n extensionASTNodes,\n });\n }\n\n case _kinds.Kind.SCALAR_TYPE_DEFINITION: {\n var _astNode$description5;\n\n return new _definition.GraphQLScalarType({\n name,\n description:\n (_astNode$description5 = astNode.description) === null ||\n _astNode$description5 === void 0\n ? void 0\n : _astNode$description5.value,\n specifiedByURL: getSpecifiedByURL(astNode),\n astNode,\n extensionASTNodes,\n });\n }\n\n case _kinds.Kind.INPUT_OBJECT_TYPE_DEFINITION: {\n var _astNode$description6;\n\n const allNodes = [astNode, ...extensionASTNodes];\n return new _definition.GraphQLInputObjectType({\n name,\n description:\n (_astNode$description6 = astNode.description) === null ||\n _astNode$description6 === void 0\n ? void 0\n : _astNode$description6.value,\n fields: () => buildInputFieldMap(allNodes),\n astNode,\n extensionASTNodes,\n isOneOf: isOneOf(astNode),\n });\n }\n }\n }\n}\n\nconst stdTypeMap = (0, _keyMap.keyMap)(\n [..._scalars.specifiedScalarTypes, ..._introspection.introspectionTypes],\n (type) => type.name,\n);\n/**\n * Given a field or enum value node, returns the string value for the\n * deprecation reason.\n */\n\nfunction getDeprecationReason(node) {\n const deprecated = (0, _values.getDirectiveValues)(\n _directives.GraphQLDeprecatedDirective,\n node,\n ); // @ts-expect-error validated by `getDirectiveValues`\n\n return deprecated === null || deprecated === void 0\n ? void 0\n : deprecated.reason;\n}\n/**\n * Given a scalar node, returns the string value for the specifiedByURL.\n */\n\nfunction getSpecifiedByURL(node) {\n const specifiedBy = (0, _values.getDirectiveValues)(\n _directives.GraphQLSpecifiedByDirective,\n node,\n ); // @ts-expect-error validated by `getDirectiveValues`\n\n return specifiedBy === null || specifiedBy === void 0\n ? void 0\n : specifiedBy.url;\n}\n/**\n * Given an input object node, returns if the node should be OneOf.\n */\n\nfunction isOneOf(node) {\n return Boolean(\n (0, _values.getDirectiveValues)(_directives.GraphQLOneOfDirective, node),\n );\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.buildASTSchema = buildASTSchema;\nexports.buildSchema = buildSchema;\n\nvar _devAssert = require('../jsutils/devAssert.js');\n\nvar _kinds = require('../language/kinds.js');\n\nvar _parser = require('../language/parser.js');\n\nvar _directives = require('../type/directives.js');\n\nvar _schema = require('../type/schema.js');\n\nvar _validate = require('../validation/validate.js');\n\nvar _extendSchema = require('./extendSchema.js');\n\n/**\n * This takes the ast of a schema document produced by the parse function in\n * src/language/parser.js.\n *\n * If no schema definition is provided, then it will look for types named Query,\n * Mutation and Subscription.\n *\n * Given that AST it constructs a GraphQLSchema. The resulting schema\n * has no resolve methods, so execution will use default resolvers.\n */\nfunction buildASTSchema(documentAST, options) {\n (documentAST != null && documentAST.kind === _kinds.Kind.DOCUMENT) ||\n (0, _devAssert.devAssert)(false, 'Must provide valid Document AST.');\n\n if (\n (options === null || options === void 0 ? void 0 : options.assumeValid) !==\n true &&\n (options === null || options === void 0\n ? void 0\n : options.assumeValidSDL) !== true\n ) {\n (0, _validate.assertValidSDL)(documentAST);\n }\n\n const emptySchemaConfig = {\n description: undefined,\n types: [],\n directives: [],\n extensions: Object.create(null),\n extensionASTNodes: [],\n assumeValid: false,\n };\n const config = (0, _extendSchema.extendSchemaImpl)(\n emptySchemaConfig,\n documentAST,\n options,\n );\n\n if (config.astNode == null) {\n for (const type of config.types) {\n switch (type.name) {\n // Note: While this could make early assertions to get the correctly\n // typed values below, that would throw immediately while type system\n // validation with validateSchema() will produce more actionable results.\n case 'Query':\n // @ts-expect-error validated in `validateSchema`\n config.query = type;\n break;\n\n case 'Mutation':\n // @ts-expect-error validated in `validateSchema`\n config.mutation = type;\n break;\n\n case 'Subscription':\n // @ts-expect-error validated in `validateSchema`\n config.subscription = type;\n break;\n }\n }\n }\n\n const directives = [\n ...config.directives, // If specified directives were not explicitly declared, add them.\n ..._directives.specifiedDirectives.filter((stdDirective) =>\n config.directives.every(\n (directive) => directive.name !== stdDirective.name,\n ),\n ),\n ];\n return new _schema.GraphQLSchema({ ...config, directives });\n}\n/**\n * A helper function to build a GraphQLSchema directly from a source\n * document.\n */\n\nfunction buildSchema(source, options) {\n const document = (0, _parser.parse)(source, {\n noLocation:\n options === null || options === void 0 ? void 0 : options.noLocation,\n allowLegacyFragmentVariables:\n options === null || options === void 0\n ? void 0\n : options.allowLegacyFragmentVariables,\n });\n return buildASTSchema(document, {\n assumeValidSDL:\n options === null || options === void 0 ? void 0 : options.assumeValidSDL,\n assumeValid:\n options === null || options === void 0 ? void 0 : options.assumeValid,\n });\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.lexicographicSortSchema = lexicographicSortSchema;\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _invariant = require('../jsutils/invariant.js');\n\nvar _keyValMap = require('../jsutils/keyValMap.js');\n\nvar _naturalCompare = require('../jsutils/naturalCompare.js');\n\nvar _definition = require('../type/definition.js');\n\nvar _directives = require('../type/directives.js');\n\nvar _introspection = require('../type/introspection.js');\n\nvar _schema = require('../type/schema.js');\n\n/**\n * Sort GraphQLSchema.\n *\n * This function returns a sorted copy of the given GraphQLSchema.\n */\nfunction lexicographicSortSchema(schema) {\n const schemaConfig = schema.toConfig();\n const typeMap = (0, _keyValMap.keyValMap)(\n sortByName(schemaConfig.types),\n (type) => type.name,\n sortNamedType,\n );\n return new _schema.GraphQLSchema({\n ...schemaConfig,\n types: Object.values(typeMap),\n directives: sortByName(schemaConfig.directives).map(sortDirective),\n query: replaceMaybeType(schemaConfig.query),\n mutation: replaceMaybeType(schemaConfig.mutation),\n subscription: replaceMaybeType(schemaConfig.subscription),\n });\n\n function replaceType(type) {\n if ((0, _definition.isListType)(type)) {\n // @ts-expect-error\n return new _definition.GraphQLList(replaceType(type.ofType));\n } else if ((0, _definition.isNonNullType)(type)) {\n // @ts-expect-error\n return new _definition.GraphQLNonNull(replaceType(type.ofType));\n } // @ts-expect-error FIXME: TS Conversion\n\n return replaceNamedType(type);\n }\n\n function replaceNamedType(type) {\n return typeMap[type.name];\n }\n\n function replaceMaybeType(maybeType) {\n return maybeType && replaceNamedType(maybeType);\n }\n\n function sortDirective(directive) {\n const config = directive.toConfig();\n return new _directives.GraphQLDirective({\n ...config,\n locations: sortBy(config.locations, (x) => x),\n args: sortArgs(config.args),\n });\n }\n\n function sortArgs(args) {\n return sortObjMap(args, (arg) => ({ ...arg, type: replaceType(arg.type) }));\n }\n\n function sortFields(fieldsMap) {\n return sortObjMap(fieldsMap, (field) => ({\n ...field,\n type: replaceType(field.type),\n args: field.args && sortArgs(field.args),\n }));\n }\n\n function sortInputFields(fieldsMap) {\n return sortObjMap(fieldsMap, (field) => ({\n ...field,\n type: replaceType(field.type),\n }));\n }\n\n function sortTypes(array) {\n return sortByName(array).map(replaceNamedType);\n }\n\n function sortNamedType(type) {\n if (\n (0, _definition.isScalarType)(type) ||\n (0, _introspection.isIntrospectionType)(type)\n ) {\n return type;\n }\n\n if ((0, _definition.isObjectType)(type)) {\n const config = type.toConfig();\n return new _definition.GraphQLObjectType({\n ...config,\n interfaces: () => sortTypes(config.interfaces),\n fields: () => sortFields(config.fields),\n });\n }\n\n if ((0, _definition.isInterfaceType)(type)) {\n const config = type.toConfig();\n return new _definition.GraphQLInterfaceType({\n ...config,\n interfaces: () => sortTypes(config.interfaces),\n fields: () => sortFields(config.fields),\n });\n }\n\n if ((0, _definition.isUnionType)(type)) {\n const config = type.toConfig();\n return new _definition.GraphQLUnionType({\n ...config,\n types: () => sortTypes(config.types),\n });\n }\n\n if ((0, _definition.isEnumType)(type)) {\n const config = type.toConfig();\n return new _definition.GraphQLEnumType({\n ...config,\n values: sortObjMap(config.values, (value) => value),\n });\n }\n\n if ((0, _definition.isInputObjectType)(type)) {\n const config = type.toConfig();\n return new _definition.GraphQLInputObjectType({\n ...config,\n fields: () => sortInputFields(config.fields),\n });\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible types have been considered.\n\n false ||\n (0, _invariant.invariant)(\n false,\n 'Unexpected type: ' + (0, _inspect.inspect)(type),\n );\n }\n}\n\nfunction sortObjMap(map, sortValueFn) {\n const sortedMap = Object.create(null);\n\n for (const key of Object.keys(map).sort(_naturalCompare.naturalCompare)) {\n sortedMap[key] = sortValueFn(map[key]);\n }\n\n return sortedMap;\n}\n\nfunction sortByName(array) {\n return sortBy(array, (obj) => obj.name);\n}\n\nfunction sortBy(array, mapToKey) {\n return array.slice().sort((obj1, obj2) => {\n const key1 = mapToKey(obj1);\n const key2 = mapToKey(obj2);\n return (0, _naturalCompare.naturalCompare)(key1, key2);\n });\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.printIntrospectionSchema = printIntrospectionSchema;\nexports.printSchema = printSchema;\nexports.printType = printType;\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _invariant = require('../jsutils/invariant.js');\n\nvar _blockString = require('../language/blockString.js');\n\nvar _kinds = require('../language/kinds.js');\n\nvar _printer = require('../language/printer.js');\n\nvar _definition = require('../type/definition.js');\n\nvar _directives = require('../type/directives.js');\n\nvar _introspection = require('../type/introspection.js');\n\nvar _scalars = require('../type/scalars.js');\n\nvar _astFromValue = require('./astFromValue.js');\n\nfunction printSchema(schema) {\n return printFilteredSchema(\n schema,\n (n) => !(0, _directives.isSpecifiedDirective)(n),\n isDefinedType,\n );\n}\n\nfunction printIntrospectionSchema(schema) {\n return printFilteredSchema(\n schema,\n _directives.isSpecifiedDirective,\n _introspection.isIntrospectionType,\n );\n}\n\nfunction isDefinedType(type) {\n return (\n !(0, _scalars.isSpecifiedScalarType)(type) &&\n !(0, _introspection.isIntrospectionType)(type)\n );\n}\n\nfunction printFilteredSchema(schema, directiveFilter, typeFilter) {\n const directives = schema.getDirectives().filter(directiveFilter);\n const types = Object.values(schema.getTypeMap()).filter(typeFilter);\n return [\n printSchemaDefinition(schema),\n ...directives.map((directive) => printDirective(directive)),\n ...types.map((type) => printType(type)),\n ]\n .filter(Boolean)\n .join('\\n\\n');\n}\n\nfunction printSchemaDefinition(schema) {\n if (schema.description == null && isSchemaOfCommonNames(schema)) {\n return;\n }\n\n const operationTypes = [];\n const queryType = schema.getQueryType();\n\n if (queryType) {\n operationTypes.push(` query: ${queryType.name}`);\n }\n\n const mutationType = schema.getMutationType();\n\n if (mutationType) {\n operationTypes.push(` mutation: ${mutationType.name}`);\n }\n\n const subscriptionType = schema.getSubscriptionType();\n\n if (subscriptionType) {\n operationTypes.push(` subscription: ${subscriptionType.name}`);\n }\n\n return printDescription(schema) + `schema {\\n${operationTypes.join('\\n')}\\n}`;\n}\n/**\n * GraphQL schema define root types for each type of operation. These types are\n * the same as any other type and can be named in any manner, however there is\n * a common naming convention:\n *\n * ```graphql\n * schema {\n * query: Query\n * mutation: Mutation\n * subscription: Subscription\n * }\n * ```\n *\n * When using this naming convention, the schema description can be omitted.\n */\n\nfunction isSchemaOfCommonNames(schema) {\n const queryType = schema.getQueryType();\n\n if (queryType && queryType.name !== 'Query') {\n return false;\n }\n\n const mutationType = schema.getMutationType();\n\n if (mutationType && mutationType.name !== 'Mutation') {\n return false;\n }\n\n const subscriptionType = schema.getSubscriptionType();\n\n if (subscriptionType && subscriptionType.name !== 'Subscription') {\n return false;\n }\n\n return true;\n}\n\nfunction printType(type) {\n if ((0, _definition.isScalarType)(type)) {\n return printScalar(type);\n }\n\n if ((0, _definition.isObjectType)(type)) {\n return printObject(type);\n }\n\n if ((0, _definition.isInterfaceType)(type)) {\n return printInterface(type);\n }\n\n if ((0, _definition.isUnionType)(type)) {\n return printUnion(type);\n }\n\n if ((0, _definition.isEnumType)(type)) {\n return printEnum(type);\n }\n\n if ((0, _definition.isInputObjectType)(type)) {\n return printInputObject(type);\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible types have been considered.\n\n false ||\n (0, _invariant.invariant)(\n false,\n 'Unexpected type: ' + (0, _inspect.inspect)(type),\n );\n}\n\nfunction printScalar(type) {\n return (\n printDescription(type) + `scalar ${type.name}` + printSpecifiedByURL(type)\n );\n}\n\nfunction printImplementedInterfaces(type) {\n const interfaces = type.getInterfaces();\n return interfaces.length\n ? ' implements ' + interfaces.map((i) => i.name).join(' & ')\n : '';\n}\n\nfunction printObject(type) {\n return (\n printDescription(type) +\n `type ${type.name}` +\n printImplementedInterfaces(type) +\n printFields(type)\n );\n}\n\nfunction printInterface(type) {\n return (\n printDescription(type) +\n `interface ${type.name}` +\n printImplementedInterfaces(type) +\n printFields(type)\n );\n}\n\nfunction printUnion(type) {\n const types = type.getTypes();\n const possibleTypes = types.length ? ' = ' + types.join(' | ') : '';\n return printDescription(type) + 'union ' + type.name + possibleTypes;\n}\n\nfunction printEnum(type) {\n const values = type\n .getValues()\n .map(\n (value, i) =>\n printDescription(value, ' ', !i) +\n ' ' +\n value.name +\n printDeprecated(value.deprecationReason),\n );\n return printDescription(type) + `enum ${type.name}` + printBlock(values);\n}\n\nfunction printInputObject(type) {\n const fields = Object.values(type.getFields()).map(\n (f, i) => printDescription(f, ' ', !i) + ' ' + printInputValue(f),\n );\n return (\n printDescription(type) +\n `input ${type.name}` +\n (type.isOneOf ? ' @oneOf' : '') +\n printBlock(fields)\n );\n}\n\nfunction printFields(type) {\n const fields = Object.values(type.getFields()).map(\n (f, i) =>\n printDescription(f, ' ', !i) +\n ' ' +\n f.name +\n printArgs(f.args, ' ') +\n ': ' +\n String(f.type) +\n printDeprecated(f.deprecationReason),\n );\n return printBlock(fields);\n}\n\nfunction printBlock(items) {\n return items.length !== 0 ? ' {\\n' + items.join('\\n') + '\\n}' : '';\n}\n\nfunction printArgs(args, indentation = '') {\n if (args.length === 0) {\n return '';\n } // If every arg does not have a description, print them on one line.\n\n if (args.every((arg) => !arg.description)) {\n return '(' + args.map(printInputValue).join(', ') + ')';\n }\n\n return (\n '(\\n' +\n args\n .map(\n (arg, i) =>\n printDescription(arg, ' ' + indentation, !i) +\n ' ' +\n indentation +\n printInputValue(arg),\n )\n .join('\\n') +\n '\\n' +\n indentation +\n ')'\n );\n}\n\nfunction printInputValue(arg) {\n const defaultAST = (0, _astFromValue.astFromValue)(\n arg.defaultValue,\n arg.type,\n );\n let argDecl = arg.name + ': ' + String(arg.type);\n\n if (defaultAST) {\n argDecl += ` = ${(0, _printer.print)(defaultAST)}`;\n }\n\n return argDecl + printDeprecated(arg.deprecationReason);\n}\n\nfunction printDirective(directive) {\n return (\n printDescription(directive) +\n 'directive @' +\n directive.name +\n printArgs(directive.args) +\n (directive.isRepeatable ? ' repeatable' : '') +\n ' on ' +\n directive.locations.join(' | ')\n );\n}\n\nfunction printDeprecated(reason) {\n if (reason == null) {\n return '';\n }\n\n if (reason !== _directives.DEFAULT_DEPRECATION_REASON) {\n const astValue = (0, _printer.print)({\n kind: _kinds.Kind.STRING,\n value: reason,\n });\n return ` @deprecated(reason: ${astValue})`;\n }\n\n return ' @deprecated';\n}\n\nfunction printSpecifiedByURL(scalar) {\n if (scalar.specifiedByURL == null) {\n return '';\n }\n\n const astValue = (0, _printer.print)({\n kind: _kinds.Kind.STRING,\n value: scalar.specifiedByURL,\n });\n return ` @specifiedBy(url: ${astValue})`;\n}\n\nfunction printDescription(def, indentation = '', firstInBlock = true) {\n const { description } = def;\n\n if (description == null) {\n return '';\n }\n\n const blockString = (0, _printer.print)({\n kind: _kinds.Kind.STRING,\n value: description,\n block: (0, _blockString.isPrintableAsBlockString)(description),\n });\n const prefix =\n indentation && !firstInBlock ? '\\n' + indentation : indentation;\n return prefix + blockString.replace(/\\n/g, '\\n' + indentation) + '\\n';\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.concatAST = concatAST;\n\nvar _kinds = require('../language/kinds.js');\n\n/**\n * Provided a collection of ASTs, presumably each from different files,\n * concatenate the ASTs together into batched AST, useful for validating many\n * GraphQL source files which together represent one conceptual application.\n */\nfunction concatAST(documents) {\n const definitions = [];\n\n for (const doc of documents) {\n definitions.push(...doc.definitions);\n }\n\n return {\n kind: _kinds.Kind.DOCUMENT,\n definitions,\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.separateOperations = separateOperations;\n\nvar _kinds = require('../language/kinds.js');\n\nvar _visitor = require('../language/visitor.js');\n\n/**\n * separateOperations accepts a single AST document which may contain many\n * operations and fragments and returns a collection of AST documents each of\n * which contains a single operation as well the fragment definitions it\n * refers to.\n */\nfunction separateOperations(documentAST) {\n const operations = [];\n const depGraph = Object.create(null); // Populate metadata and build a dependency graph.\n\n for (const definitionNode of documentAST.definitions) {\n switch (definitionNode.kind) {\n case _kinds.Kind.OPERATION_DEFINITION:\n operations.push(definitionNode);\n break;\n\n case _kinds.Kind.FRAGMENT_DEFINITION:\n depGraph[definitionNode.name.value] = collectDependencies(\n definitionNode.selectionSet,\n );\n break;\n\n default: // ignore non-executable definitions\n }\n } // For each operation, produce a new synthesized AST which includes only what\n // is necessary for completing that operation.\n\n const separatedDocumentASTs = Object.create(null);\n\n for (const operation of operations) {\n const dependencies = new Set();\n\n for (const fragmentName of collectDependencies(operation.selectionSet)) {\n collectTransitiveDependencies(dependencies, depGraph, fragmentName);\n } // Provides the empty string for anonymous operations.\n\n const operationName = operation.name ? operation.name.value : ''; // The list of definition nodes to be included for this operation, sorted\n // to retain the same order as the original document.\n\n separatedDocumentASTs[operationName] = {\n kind: _kinds.Kind.DOCUMENT,\n definitions: documentAST.definitions.filter(\n (node) =>\n node === operation ||\n (node.kind === _kinds.Kind.FRAGMENT_DEFINITION &&\n dependencies.has(node.name.value)),\n ),\n };\n }\n\n return separatedDocumentASTs;\n}\n\n// From a dependency graph, collects a list of transitive dependencies by\n// recursing through a dependency graph.\nfunction collectTransitiveDependencies(collected, depGraph, fromName) {\n if (!collected.has(fromName)) {\n collected.add(fromName);\n const immediateDeps = depGraph[fromName];\n\n if (immediateDeps !== undefined) {\n for (const toName of immediateDeps) {\n collectTransitiveDependencies(collected, depGraph, toName);\n }\n }\n }\n}\n\nfunction collectDependencies(selectionSet) {\n const dependencies = [];\n (0, _visitor.visit)(selectionSet, {\n FragmentSpread(node) {\n dependencies.push(node.name.value);\n },\n });\n return dependencies;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.stripIgnoredCharacters = stripIgnoredCharacters;\n\nvar _blockString = require('../language/blockString.js');\n\nvar _lexer = require('../language/lexer.js');\n\nvar _source = require('../language/source.js');\n\nvar _tokenKind = require('../language/tokenKind.js');\n\n/**\n * Strips characters that are not significant to the validity or execution\n * of a GraphQL document:\n * - UnicodeBOM\n * - WhiteSpace\n * - LineTerminator\n * - Comment\n * - Comma\n * - BlockString indentation\n *\n * Note: It is required to have a delimiter character between neighboring\n * non-punctuator tokens and this function always uses single space as delimiter.\n *\n * It is guaranteed that both input and output documents if parsed would result\n * in the exact same AST except for nodes location.\n *\n * Warning: It is guaranteed that this function will always produce stable results.\n * However, it's not guaranteed that it will stay the same between different\n * releases due to bugfixes or changes in the GraphQL specification.\n *\n * Query example:\n *\n * ```graphql\n * query SomeQuery($foo: String!, $bar: String) {\n * someField(foo: $foo, bar: $bar) {\n * a\n * b {\n * c\n * d\n * }\n * }\n * }\n * ```\n *\n * Becomes:\n *\n * ```graphql\n * query SomeQuery($foo:String!$bar:String){someField(foo:$foo bar:$bar){a b{c d}}}\n * ```\n *\n * SDL example:\n *\n * ```graphql\n * \"\"\"\n * Type description\n * \"\"\"\n * type Foo {\n * \"\"\"\n * Field description\n * \"\"\"\n * bar: String\n * }\n * ```\n *\n * Becomes:\n *\n * ```graphql\n * \"\"\"Type description\"\"\" type Foo{\"\"\"Field description\"\"\" bar:String}\n * ```\n */\nfunction stripIgnoredCharacters(source) {\n const sourceObj = (0, _source.isSource)(source)\n ? source\n : new _source.Source(source);\n const body = sourceObj.body;\n const lexer = new _lexer.Lexer(sourceObj);\n let strippedBody = '';\n let wasLastAddedTokenNonPunctuator = false;\n\n while (lexer.advance().kind !== _tokenKind.TokenKind.EOF) {\n const currentToken = lexer.token;\n const tokenKind = currentToken.kind;\n /**\n * Every two non-punctuator tokens should have space between them.\n * Also prevent case of non-punctuator token following by spread resulting\n * in invalid token (e.g. `1...` is invalid Float token).\n */\n\n const isNonPunctuator = !(0, _lexer.isPunctuatorTokenKind)(\n currentToken.kind,\n );\n\n if (wasLastAddedTokenNonPunctuator) {\n if (\n isNonPunctuator ||\n currentToken.kind === _tokenKind.TokenKind.SPREAD\n ) {\n strippedBody += ' ';\n }\n }\n\n const tokenBody = body.slice(currentToken.start, currentToken.end);\n\n if (tokenKind === _tokenKind.TokenKind.BLOCK_STRING) {\n strippedBody += (0, _blockString.printBlockString)(currentToken.value, {\n minimize: true,\n });\n } else {\n strippedBody += tokenBody;\n }\n\n wasLastAddedTokenNonPunctuator = isNonPunctuator;\n }\n\n return strippedBody;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.assertValidName = assertValidName;\nexports.isValidNameError = isValidNameError;\n\nvar _devAssert = require('../jsutils/devAssert.js');\n\nvar _GraphQLError = require('../error/GraphQLError.js');\n\nvar _assertName = require('../type/assertName.js');\n\n/* c8 ignore start */\n\n/**\n * Upholds the spec rules about naming.\n * @deprecated Please use `assertName` instead. Will be removed in v17\n */\nfunction assertValidName(name) {\n const error = isValidNameError(name);\n\n if (error) {\n throw error;\n }\n\n return name;\n}\n/**\n * Returns an Error if a name is invalid.\n * @deprecated Please use `assertName` instead. Will be removed in v17\n */\n\nfunction isValidNameError(name) {\n typeof name === 'string' ||\n (0, _devAssert.devAssert)(false, 'Expected name to be a string.');\n\n if (name.startsWith('__')) {\n return new _GraphQLError.GraphQLError(\n `Name \"${name}\" must not begin with \"__\", which is reserved by GraphQL introspection.`,\n );\n }\n\n try {\n (0, _assertName.assertName)(name);\n } catch (error) {\n return error;\n }\n}\n/* c8 ignore stop */\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.DangerousChangeType = exports.BreakingChangeType = void 0;\nexports.findBreakingChanges = findBreakingChanges;\nexports.findDangerousChanges = findDangerousChanges;\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _invariant = require('../jsutils/invariant.js');\n\nvar _keyMap = require('../jsutils/keyMap.js');\n\nvar _printer = require('../language/printer.js');\n\nvar _definition = require('../type/definition.js');\n\nvar _scalars = require('../type/scalars.js');\n\nvar _astFromValue = require('./astFromValue.js');\n\nvar _sortValueNode = require('./sortValueNode.js');\n\nvar BreakingChangeType;\nexports.BreakingChangeType = BreakingChangeType;\n\n(function (BreakingChangeType) {\n BreakingChangeType['TYPE_REMOVED'] = 'TYPE_REMOVED';\n BreakingChangeType['TYPE_CHANGED_KIND'] = 'TYPE_CHANGED_KIND';\n BreakingChangeType['TYPE_REMOVED_FROM_UNION'] = 'TYPE_REMOVED_FROM_UNION';\n BreakingChangeType['VALUE_REMOVED_FROM_ENUM'] = 'VALUE_REMOVED_FROM_ENUM';\n BreakingChangeType['REQUIRED_INPUT_FIELD_ADDED'] =\n 'REQUIRED_INPUT_FIELD_ADDED';\n BreakingChangeType['IMPLEMENTED_INTERFACE_REMOVED'] =\n 'IMPLEMENTED_INTERFACE_REMOVED';\n BreakingChangeType['FIELD_REMOVED'] = 'FIELD_REMOVED';\n BreakingChangeType['FIELD_CHANGED_KIND'] = 'FIELD_CHANGED_KIND';\n BreakingChangeType['REQUIRED_ARG_ADDED'] = 'REQUIRED_ARG_ADDED';\n BreakingChangeType['ARG_REMOVED'] = 'ARG_REMOVED';\n BreakingChangeType['ARG_CHANGED_KIND'] = 'ARG_CHANGED_KIND';\n BreakingChangeType['DIRECTIVE_REMOVED'] = 'DIRECTIVE_REMOVED';\n BreakingChangeType['DIRECTIVE_ARG_REMOVED'] = 'DIRECTIVE_ARG_REMOVED';\n BreakingChangeType['REQUIRED_DIRECTIVE_ARG_ADDED'] =\n 'REQUIRED_DIRECTIVE_ARG_ADDED';\n BreakingChangeType['DIRECTIVE_REPEATABLE_REMOVED'] =\n 'DIRECTIVE_REPEATABLE_REMOVED';\n BreakingChangeType['DIRECTIVE_LOCATION_REMOVED'] =\n 'DIRECTIVE_LOCATION_REMOVED';\n})(\n BreakingChangeType || (exports.BreakingChangeType = BreakingChangeType = {}),\n);\n\nvar DangerousChangeType;\nexports.DangerousChangeType = DangerousChangeType;\n\n(function (DangerousChangeType) {\n DangerousChangeType['VALUE_ADDED_TO_ENUM'] = 'VALUE_ADDED_TO_ENUM';\n DangerousChangeType['TYPE_ADDED_TO_UNION'] = 'TYPE_ADDED_TO_UNION';\n DangerousChangeType['OPTIONAL_INPUT_FIELD_ADDED'] =\n 'OPTIONAL_INPUT_FIELD_ADDED';\n DangerousChangeType['OPTIONAL_ARG_ADDED'] = 'OPTIONAL_ARG_ADDED';\n DangerousChangeType['IMPLEMENTED_INTERFACE_ADDED'] =\n 'IMPLEMENTED_INTERFACE_ADDED';\n DangerousChangeType['ARG_DEFAULT_VALUE_CHANGE'] = 'ARG_DEFAULT_VALUE_CHANGE';\n})(\n DangerousChangeType ||\n (exports.DangerousChangeType = DangerousChangeType = {}),\n);\n\n/**\n * Given two schemas, returns an Array containing descriptions of all the types\n * of breaking changes covered by the other functions down below.\n */\nfunction findBreakingChanges(oldSchema, newSchema) {\n // @ts-expect-error\n return findSchemaChanges(oldSchema, newSchema).filter(\n (change) => change.type in BreakingChangeType,\n );\n}\n/**\n * Given two schemas, returns an Array containing descriptions of all the types\n * of potentially dangerous changes covered by the other functions down below.\n */\n\nfunction findDangerousChanges(oldSchema, newSchema) {\n // @ts-expect-error\n return findSchemaChanges(oldSchema, newSchema).filter(\n (change) => change.type in DangerousChangeType,\n );\n}\n\nfunction findSchemaChanges(oldSchema, newSchema) {\n return [\n ...findTypeChanges(oldSchema, newSchema),\n ...findDirectiveChanges(oldSchema, newSchema),\n ];\n}\n\nfunction findDirectiveChanges(oldSchema, newSchema) {\n const schemaChanges = [];\n const directivesDiff = diff(\n oldSchema.getDirectives(),\n newSchema.getDirectives(),\n );\n\n for (const oldDirective of directivesDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.DIRECTIVE_REMOVED,\n description: `${oldDirective.name} was removed.`,\n });\n }\n\n for (const [oldDirective, newDirective] of directivesDiff.persisted) {\n const argsDiff = diff(oldDirective.args, newDirective.args);\n\n for (const newArg of argsDiff.added) {\n if ((0, _definition.isRequiredArgument)(newArg)) {\n schemaChanges.push({\n type: BreakingChangeType.REQUIRED_DIRECTIVE_ARG_ADDED,\n description: `A required arg ${newArg.name} on directive ${oldDirective.name} was added.`,\n });\n }\n }\n\n for (const oldArg of argsDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.DIRECTIVE_ARG_REMOVED,\n description: `${oldArg.name} was removed from ${oldDirective.name}.`,\n });\n }\n\n if (oldDirective.isRepeatable && !newDirective.isRepeatable) {\n schemaChanges.push({\n type: BreakingChangeType.DIRECTIVE_REPEATABLE_REMOVED,\n description: `Repeatable flag was removed from ${oldDirective.name}.`,\n });\n }\n\n for (const location of oldDirective.locations) {\n if (!newDirective.locations.includes(location)) {\n schemaChanges.push({\n type: BreakingChangeType.DIRECTIVE_LOCATION_REMOVED,\n description: `${location} was removed from ${oldDirective.name}.`,\n });\n }\n }\n }\n\n return schemaChanges;\n}\n\nfunction findTypeChanges(oldSchema, newSchema) {\n const schemaChanges = [];\n const typesDiff = diff(\n Object.values(oldSchema.getTypeMap()),\n Object.values(newSchema.getTypeMap()),\n );\n\n for (const oldType of typesDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.TYPE_REMOVED,\n description: (0, _scalars.isSpecifiedScalarType)(oldType)\n ? `Standard scalar ${oldType.name} was removed because it is not referenced anymore.`\n : `${oldType.name} was removed.`,\n });\n }\n\n for (const [oldType, newType] of typesDiff.persisted) {\n if (\n (0, _definition.isEnumType)(oldType) &&\n (0, _definition.isEnumType)(newType)\n ) {\n schemaChanges.push(...findEnumTypeChanges(oldType, newType));\n } else if (\n (0, _definition.isUnionType)(oldType) &&\n (0, _definition.isUnionType)(newType)\n ) {\n schemaChanges.push(...findUnionTypeChanges(oldType, newType));\n } else if (\n (0, _definition.isInputObjectType)(oldType) &&\n (0, _definition.isInputObjectType)(newType)\n ) {\n schemaChanges.push(...findInputObjectTypeChanges(oldType, newType));\n } else if (\n (0, _definition.isObjectType)(oldType) &&\n (0, _definition.isObjectType)(newType)\n ) {\n schemaChanges.push(\n ...findFieldChanges(oldType, newType),\n ...findImplementedInterfacesChanges(oldType, newType),\n );\n } else if (\n (0, _definition.isInterfaceType)(oldType) &&\n (0, _definition.isInterfaceType)(newType)\n ) {\n schemaChanges.push(\n ...findFieldChanges(oldType, newType),\n ...findImplementedInterfacesChanges(oldType, newType),\n );\n } else if (oldType.constructor !== newType.constructor) {\n schemaChanges.push({\n type: BreakingChangeType.TYPE_CHANGED_KIND,\n description:\n `${oldType.name} changed from ` +\n `${typeKindName(oldType)} to ${typeKindName(newType)}.`,\n });\n }\n }\n\n return schemaChanges;\n}\n\nfunction findInputObjectTypeChanges(oldType, newType) {\n const schemaChanges = [];\n const fieldsDiff = diff(\n Object.values(oldType.getFields()),\n Object.values(newType.getFields()),\n );\n\n for (const newField of fieldsDiff.added) {\n if ((0, _definition.isRequiredInputField)(newField)) {\n schemaChanges.push({\n type: BreakingChangeType.REQUIRED_INPUT_FIELD_ADDED,\n description: `A required field ${newField.name} on input type ${oldType.name} was added.`,\n });\n } else {\n schemaChanges.push({\n type: DangerousChangeType.OPTIONAL_INPUT_FIELD_ADDED,\n description: `An optional field ${newField.name} on input type ${oldType.name} was added.`,\n });\n }\n }\n\n for (const oldField of fieldsDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.FIELD_REMOVED,\n description: `${oldType.name}.${oldField.name} was removed.`,\n });\n }\n\n for (const [oldField, newField] of fieldsDiff.persisted) {\n const isSafe = isChangeSafeForInputObjectFieldOrFieldArg(\n oldField.type,\n newField.type,\n );\n\n if (!isSafe) {\n schemaChanges.push({\n type: BreakingChangeType.FIELD_CHANGED_KIND,\n description:\n `${oldType.name}.${oldField.name} changed type from ` +\n `${String(oldField.type)} to ${String(newField.type)}.`,\n });\n }\n }\n\n return schemaChanges;\n}\n\nfunction findUnionTypeChanges(oldType, newType) {\n const schemaChanges = [];\n const possibleTypesDiff = diff(oldType.getTypes(), newType.getTypes());\n\n for (const newPossibleType of possibleTypesDiff.added) {\n schemaChanges.push({\n type: DangerousChangeType.TYPE_ADDED_TO_UNION,\n description: `${newPossibleType.name} was added to union type ${oldType.name}.`,\n });\n }\n\n for (const oldPossibleType of possibleTypesDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.TYPE_REMOVED_FROM_UNION,\n description: `${oldPossibleType.name} was removed from union type ${oldType.name}.`,\n });\n }\n\n return schemaChanges;\n}\n\nfunction findEnumTypeChanges(oldType, newType) {\n const schemaChanges = [];\n const valuesDiff = diff(oldType.getValues(), newType.getValues());\n\n for (const newValue of valuesDiff.added) {\n schemaChanges.push({\n type: DangerousChangeType.VALUE_ADDED_TO_ENUM,\n description: `${newValue.name} was added to enum type ${oldType.name}.`,\n });\n }\n\n for (const oldValue of valuesDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.VALUE_REMOVED_FROM_ENUM,\n description: `${oldValue.name} was removed from enum type ${oldType.name}.`,\n });\n }\n\n return schemaChanges;\n}\n\nfunction findImplementedInterfacesChanges(oldType, newType) {\n const schemaChanges = [];\n const interfacesDiff = diff(oldType.getInterfaces(), newType.getInterfaces());\n\n for (const newInterface of interfacesDiff.added) {\n schemaChanges.push({\n type: DangerousChangeType.IMPLEMENTED_INTERFACE_ADDED,\n description: `${newInterface.name} added to interfaces implemented by ${oldType.name}.`,\n });\n }\n\n for (const oldInterface of interfacesDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.IMPLEMENTED_INTERFACE_REMOVED,\n description: `${oldType.name} no longer implements interface ${oldInterface.name}.`,\n });\n }\n\n return schemaChanges;\n}\n\nfunction findFieldChanges(oldType, newType) {\n const schemaChanges = [];\n const fieldsDiff = diff(\n Object.values(oldType.getFields()),\n Object.values(newType.getFields()),\n );\n\n for (const oldField of fieldsDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.FIELD_REMOVED,\n description: `${oldType.name}.${oldField.name} was removed.`,\n });\n }\n\n for (const [oldField, newField] of fieldsDiff.persisted) {\n schemaChanges.push(...findArgChanges(oldType, oldField, newField));\n const isSafe = isChangeSafeForObjectOrInterfaceField(\n oldField.type,\n newField.type,\n );\n\n if (!isSafe) {\n schemaChanges.push({\n type: BreakingChangeType.FIELD_CHANGED_KIND,\n description:\n `${oldType.name}.${oldField.name} changed type from ` +\n `${String(oldField.type)} to ${String(newField.type)}.`,\n });\n }\n }\n\n return schemaChanges;\n}\n\nfunction findArgChanges(oldType, oldField, newField) {\n const schemaChanges = [];\n const argsDiff = diff(oldField.args, newField.args);\n\n for (const oldArg of argsDiff.removed) {\n schemaChanges.push({\n type: BreakingChangeType.ARG_REMOVED,\n description: `${oldType.name}.${oldField.name} arg ${oldArg.name} was removed.`,\n });\n }\n\n for (const [oldArg, newArg] of argsDiff.persisted) {\n const isSafe = isChangeSafeForInputObjectFieldOrFieldArg(\n oldArg.type,\n newArg.type,\n );\n\n if (!isSafe) {\n schemaChanges.push({\n type: BreakingChangeType.ARG_CHANGED_KIND,\n description:\n `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed type from ` +\n `${String(oldArg.type)} to ${String(newArg.type)}.`,\n });\n } else if (oldArg.defaultValue !== undefined) {\n if (newArg.defaultValue === undefined) {\n schemaChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: `${oldType.name}.${oldField.name} arg ${oldArg.name} defaultValue was removed.`,\n });\n } else {\n // Since we looking only for client's observable changes we should\n // compare default values in the same representation as they are\n // represented inside introspection.\n const oldValueStr = stringifyValue(oldArg.defaultValue, oldArg.type);\n const newValueStr = stringifyValue(newArg.defaultValue, newArg.type);\n\n if (oldValueStr !== newValueStr) {\n schemaChanges.push({\n type: DangerousChangeType.ARG_DEFAULT_VALUE_CHANGE,\n description: `${oldType.name}.${oldField.name} arg ${oldArg.name} has changed defaultValue from ${oldValueStr} to ${newValueStr}.`,\n });\n }\n }\n }\n }\n\n for (const newArg of argsDiff.added) {\n if ((0, _definition.isRequiredArgument)(newArg)) {\n schemaChanges.push({\n type: BreakingChangeType.REQUIRED_ARG_ADDED,\n description: `A required arg ${newArg.name} on ${oldType.name}.${oldField.name} was added.`,\n });\n } else {\n schemaChanges.push({\n type: DangerousChangeType.OPTIONAL_ARG_ADDED,\n description: `An optional arg ${newArg.name} on ${oldType.name}.${oldField.name} was added.`,\n });\n }\n }\n\n return schemaChanges;\n}\n\nfunction isChangeSafeForObjectOrInterfaceField(oldType, newType) {\n if ((0, _definition.isListType)(oldType)) {\n return (\n // if they're both lists, make sure the underlying types are compatible\n ((0, _definition.isListType)(newType) &&\n isChangeSafeForObjectOrInterfaceField(\n oldType.ofType,\n newType.ofType,\n )) || // moving from nullable to non-null of the same underlying type is safe\n ((0, _definition.isNonNullType)(newType) &&\n isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType))\n );\n }\n\n if ((0, _definition.isNonNullType)(oldType)) {\n // if they're both non-null, make sure the underlying types are compatible\n return (\n (0, _definition.isNonNullType)(newType) &&\n isChangeSafeForObjectOrInterfaceField(oldType.ofType, newType.ofType)\n );\n }\n\n return (\n // if they're both named types, see if their names are equivalent\n ((0, _definition.isNamedType)(newType) && oldType.name === newType.name) || // moving from nullable to non-null of the same underlying type is safe\n ((0, _definition.isNonNullType)(newType) &&\n isChangeSafeForObjectOrInterfaceField(oldType, newType.ofType))\n );\n}\n\nfunction isChangeSafeForInputObjectFieldOrFieldArg(oldType, newType) {\n if ((0, _definition.isListType)(oldType)) {\n // if they're both lists, make sure the underlying types are compatible\n return (\n (0, _definition.isListType)(newType) &&\n isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType.ofType)\n );\n }\n\n if ((0, _definition.isNonNullType)(oldType)) {\n return (\n // if they're both non-null, make sure the underlying types are\n // compatible\n ((0, _definition.isNonNullType)(newType) &&\n isChangeSafeForInputObjectFieldOrFieldArg(\n oldType.ofType,\n newType.ofType,\n )) || // moving from non-null to nullable of the same underlying type is safe\n (!(0, _definition.isNonNullType)(newType) &&\n isChangeSafeForInputObjectFieldOrFieldArg(oldType.ofType, newType))\n );\n } // if they're both named types, see if their names are equivalent\n\n return (0, _definition.isNamedType)(newType) && oldType.name === newType.name;\n}\n\nfunction typeKindName(type) {\n if ((0, _definition.isScalarType)(type)) {\n return 'a Scalar type';\n }\n\n if ((0, _definition.isObjectType)(type)) {\n return 'an Object type';\n }\n\n if ((0, _definition.isInterfaceType)(type)) {\n return 'an Interface type';\n }\n\n if ((0, _definition.isUnionType)(type)) {\n return 'a Union type';\n }\n\n if ((0, _definition.isEnumType)(type)) {\n return 'an Enum type';\n }\n\n if ((0, _definition.isInputObjectType)(type)) {\n return 'an Input type';\n }\n /* c8 ignore next 3 */\n // Not reachable, all possible types have been considered.\n\n false ||\n (0, _invariant.invariant)(\n false,\n 'Unexpected type: ' + (0, _inspect.inspect)(type),\n );\n}\n\nfunction stringifyValue(value, type) {\n const ast = (0, _astFromValue.astFromValue)(value, type);\n ast != null || (0, _invariant.invariant)(false);\n return (0, _printer.print)((0, _sortValueNode.sortValueNode)(ast));\n}\n\nfunction diff(oldArray, newArray) {\n const added = [];\n const removed = [];\n const persisted = [];\n const oldMap = (0, _keyMap.keyMap)(oldArray, ({ name }) => name);\n const newMap = (0, _keyMap.keyMap)(newArray, ({ name }) => name);\n\n for (const oldItem of oldArray) {\n const newItem = newMap[oldItem.name];\n\n if (newItem === undefined) {\n removed.push(oldItem);\n } else {\n persisted.push([oldItem, newItem]);\n }\n }\n\n for (const newItem of newArray) {\n if (oldMap[newItem.name] === undefined) {\n added.push(newItem);\n }\n }\n\n return {\n added,\n persisted,\n removed,\n };\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nexports.resolveASTSchemaCoordinate = resolveASTSchemaCoordinate;\nexports.resolveSchemaCoordinate = resolveSchemaCoordinate;\n\nvar _inspect = require('../jsutils/inspect.js');\n\nvar _kinds = require('../language/kinds.js');\n\nvar _parser = require('../language/parser.js');\n\nvar _definition = require('../type/definition.js');\n\n/**\n * A schema coordinate is resolved in the context of a GraphQL schema to\n * uniquely identify a schema element. It returns undefined if the schema\n * coordinate does not resolve to a schema element, meta-field, or introspection\n * schema element. It will throw if the containing schema element (if\n * applicable) does not exist.\n *\n * https://spec.graphql.org/draft/#sec-Schema-Coordinates.Semantics\n */\nfunction resolveSchemaCoordinate(schema, schemaCoordinate) {\n return resolveASTSchemaCoordinate(\n schema,\n (0, _parser.parseSchemaCoordinate)(schemaCoordinate),\n );\n}\n/**\n * TypeCoordinate : Name\n */\n\nfunction resolveTypeCoordinate(schema, schemaCoordinate) {\n // 1. Let {typeName} be the value of {Name}.\n const typeName = schemaCoordinate.name.value;\n const type = schema.getType(typeName); // 2. Return the type in the {schema} named {typeName} if it exists.\n\n if (type == null) {\n return;\n }\n\n return {\n kind: 'NamedType',\n type,\n };\n}\n/**\n * MemberCoordinate : Name . Name\n */\n\nfunction resolveMemberCoordinate(schema, schemaCoordinate) {\n // 1. Let {typeName} be the value of the first {Name}.\n // 2. Let {type} be the type in the {schema} named {typeName}.\n const typeName = schemaCoordinate.name.value;\n const type = schema.getType(typeName); // 3. Assert: {type} must exist, and must be an Enum, Input Object, Object or Interface type.\n\n if (!type) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(\n typeName,\n )} to be defined as a type in the schema.`,\n );\n }\n\n if (\n !(0, _definition.isEnumType)(type) &&\n !(0, _definition.isInputObjectType)(type) &&\n !(0, _definition.isObjectType)(type) &&\n !(0, _definition.isInterfaceType)(type)\n ) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(\n typeName,\n )} to be an Enum, Input Object, Object or Interface type.`,\n );\n } // 4. If {type} is an Enum type:\n\n if ((0, _definition.isEnumType)(type)) {\n // 1. Let {enumValueName} be the value of the second {Name}.\n const enumValueName = schemaCoordinate.memberName.value;\n const enumValue = type.getValue(enumValueName); // 2. Return the enum value of {type} named {enumValueName} if it exists.\n\n if (enumValue == null) {\n return;\n }\n\n return {\n kind: 'EnumValue',\n type,\n enumValue,\n };\n } // 5. Otherwise, if {type} is an Input Object type:\n\n if ((0, _definition.isInputObjectType)(type)) {\n // 1. Let {inputFieldName} be the value of the second {Name}.\n const inputFieldName = schemaCoordinate.memberName.value;\n const inputField = type.getFields()[inputFieldName]; // 2. Return the input field of {type} named {inputFieldName} if it exists.\n\n if (inputField == null) {\n return;\n }\n\n return {\n kind: 'InputField',\n type,\n inputField,\n };\n } // 6. Otherwise:\n // 1. Let {fieldName} be the value of the second {Name}.\n\n const fieldName = schemaCoordinate.memberName.value;\n const field = type.getFields()[fieldName]; // 2. Return the field of {type} named {fieldName} if it exists.\n\n if (field == null) {\n return;\n }\n\n return {\n kind: 'Field',\n type,\n field,\n };\n}\n/**\n * ArgumentCoordinate : Name . Name ( Name : )\n */\n\nfunction resolveArgumentCoordinate(schema, schemaCoordinate) {\n // 1. Let {typeName} be the value of the first {Name}.\n // 2. Let {type} be the type in the {schema} named {typeName}.\n const typeName = schemaCoordinate.name.value;\n const type = schema.getType(typeName); // 3. Assert: {type} must exist, and be an Object or Interface type.\n\n if (type == null) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(\n typeName,\n )} to be defined as a type in the schema.`,\n );\n }\n\n if (\n !(0, _definition.isObjectType)(type) &&\n !(0, _definition.isInterfaceType)(type)\n ) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(\n typeName,\n )} to be an object type or interface type.`,\n );\n } // 4. Let {fieldName} be the value of the second {Name}.\n // 5. Let {field} be the field of {type} named {fieldName}.\n\n const fieldName = schemaCoordinate.fieldName.value;\n const field = type.getFields()[fieldName]; // 7. Assert: {field} must exist.\n\n if (field == null) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(\n fieldName,\n )} to exist as a field of type ${(0, _inspect.inspect)(\n typeName,\n )} in the schema.`,\n );\n } // 7. Let {fieldArgumentName} be the value of the third {Name}.\n\n const fieldArgumentName = schemaCoordinate.argumentName.value;\n const fieldArgument = field.args.find(\n (arg) => arg.name === fieldArgumentName,\n ); // 8. Return the argument of {field} named {fieldArgumentName} if it exists.\n\n if (fieldArgument == null) {\n return;\n }\n\n return {\n kind: 'FieldArgument',\n type,\n field,\n fieldArgument,\n };\n}\n/**\n * DirectiveCoordinate : \\@ Name\n */\n\nfunction resolveDirectiveCoordinate(schema, schemaCoordinate) {\n // 1. Let {directiveName} be the value of {Name}.\n const directiveName = schemaCoordinate.name.value;\n const directive = schema.getDirective(directiveName); // 2. Return the directive in the {schema} named {directiveName} if it exists.\n\n if (!directive) {\n return;\n }\n\n return {\n kind: 'Directive',\n directive,\n };\n}\n/**\n * DirectiveArgumentCoordinate : \\@ Name ( Name : )\n */\n\nfunction resolveDirectiveArgumentCoordinate(schema, schemaCoordinate) {\n // 1. Let {directiveName} be the value of the first {Name}.\n // 2. Let {directive} be the directive in the {schema} named {directiveName}.\n const directiveName = schemaCoordinate.name.value;\n const directive = schema.getDirective(directiveName); // 3. Assert {directive} must exist.\n\n if (!directive) {\n throw new Error(\n `Expected ${(0, _inspect.inspect)(\n directiveName,\n )} to be defined as a directive in the schema.`,\n );\n } // 4. Let {directiveArgumentName} be the value of the second {Name}.\n\n const {\n argumentName: { value: directiveArgumentName },\n } = schemaCoordinate;\n const directiveArgument = directive.args.find(\n (arg) => arg.name === directiveArgumentName,\n ); // 5. Return the argument of {directive} named {directiveArgumentName} if it exists.\n\n if (!directiveArgument) {\n return;\n }\n\n return {\n kind: 'DirectiveArgument',\n directive,\n directiveArgument,\n };\n}\n/**\n * Resolves schema coordinate from a parsed SchemaCoordinate node.\n */\n\nfunction resolveASTSchemaCoordinate(schema, schemaCoordinate) {\n switch (schemaCoordinate.kind) {\n case _kinds.Kind.TYPE_COORDINATE:\n return resolveTypeCoordinate(schema, schemaCoordinate);\n\n case _kinds.Kind.MEMBER_COORDINATE:\n return resolveMemberCoordinate(schema, schemaCoordinate);\n\n case _kinds.Kind.ARGUMENT_COORDINATE:\n return resolveArgumentCoordinate(schema, schemaCoordinate);\n\n case _kinds.Kind.DIRECTIVE_COORDINATE:\n return resolveDirectiveCoordinate(schema, schemaCoordinate);\n\n case _kinds.Kind.DIRECTIVE_ARGUMENT_COORDINATE:\n return resolveDirectiveArgumentCoordinate(schema, schemaCoordinate);\n }\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nObject.defineProperty(exports, 'BreakingChangeType', {\n enumerable: true,\n get: function () {\n return _findBreakingChanges.BreakingChangeType;\n },\n});\nObject.defineProperty(exports, 'DangerousChangeType', {\n enumerable: true,\n get: function () {\n return _findBreakingChanges.DangerousChangeType;\n },\n});\nObject.defineProperty(exports, 'TypeInfo', {\n enumerable: true,\n get: function () {\n return _TypeInfo.TypeInfo;\n },\n});\nObject.defineProperty(exports, 'assertValidName', {\n enumerable: true,\n get: function () {\n return _assertValidName.assertValidName;\n },\n});\nObject.defineProperty(exports, 'astFromValue', {\n enumerable: true,\n get: function () {\n return _astFromValue.astFromValue;\n },\n});\nObject.defineProperty(exports, 'buildASTSchema', {\n enumerable: true,\n get: function () {\n return _buildASTSchema.buildASTSchema;\n },\n});\nObject.defineProperty(exports, 'buildClientSchema', {\n enumerable: true,\n get: function () {\n return _buildClientSchema.buildClientSchema;\n },\n});\nObject.defineProperty(exports, 'buildSchema', {\n enumerable: true,\n get: function () {\n return _buildASTSchema.buildSchema;\n },\n});\nObject.defineProperty(exports, 'coerceInputValue', {\n enumerable: true,\n get: function () {\n return _coerceInputValue.coerceInputValue;\n },\n});\nObject.defineProperty(exports, 'concatAST', {\n enumerable: true,\n get: function () {\n return _concatAST.concatAST;\n },\n});\nObject.defineProperty(exports, 'doTypesOverlap', {\n enumerable: true,\n get: function () {\n return _typeComparators.doTypesOverlap;\n },\n});\nObject.defineProperty(exports, 'extendSchema', {\n enumerable: true,\n get: function () {\n return _extendSchema.extendSchema;\n },\n});\nObject.defineProperty(exports, 'findBreakingChanges', {\n enumerable: true,\n get: function () {\n return _findBreakingChanges.findBreakingChanges;\n },\n});\nObject.defineProperty(exports, 'findDangerousChanges', {\n enumerable: true,\n get: function () {\n return _findBreakingChanges.findDangerousChanges;\n },\n});\nObject.defineProperty(exports, 'getIntrospectionQuery', {\n enumerable: true,\n get: function () {\n return _getIntrospectionQuery.getIntrospectionQuery;\n },\n});\nObject.defineProperty(exports, 'getOperationAST', {\n enumerable: true,\n get: function () {\n return _getOperationAST.getOperationAST;\n },\n});\nObject.defineProperty(exports, 'getOperationRootType', {\n enumerable: true,\n get: function () {\n return _getOperationRootType.getOperationRootType;\n },\n});\nObject.defineProperty(exports, 'introspectionFromSchema', {\n enumerable: true,\n get: function () {\n return _introspectionFromSchema.introspectionFromSchema;\n },\n});\nObject.defineProperty(exports, 'isEqualType', {\n enumerable: true,\n get: function () {\n return _typeComparators.isEqualType;\n },\n});\nObject.defineProperty(exports, 'isTypeSubTypeOf', {\n enumerable: true,\n get: function () {\n return _typeComparators.isTypeSubTypeOf;\n },\n});\nObject.defineProperty(exports, 'isValidNameError', {\n enumerable: true,\n get: function () {\n return _assertValidName.isValidNameError;\n },\n});\nObject.defineProperty(exports, 'lexicographicSortSchema', {\n enumerable: true,\n get: function () {\n return _lexicographicSortSchema.lexicographicSortSchema;\n },\n});\nObject.defineProperty(exports, 'printIntrospectionSchema', {\n enumerable: true,\n get: function () {\n return _printSchema.printIntrospectionSchema;\n },\n});\nObject.defineProperty(exports, 'printSchema', {\n enumerable: true,\n get: function () {\n return _printSchema.printSchema;\n },\n});\nObject.defineProperty(exports, 'printType', {\n enumerable: true,\n get: function () {\n return _printSchema.printType;\n },\n});\nObject.defineProperty(exports, 'resolveASTSchemaCoordinate', {\n enumerable: true,\n get: function () {\n return _resolveSchemaCoordinate.resolveASTSchemaCoordinate;\n },\n});\nObject.defineProperty(exports, 'resolveSchemaCoordinate', {\n enumerable: true,\n get: function () {\n return _resolveSchemaCoordinate.resolveSchemaCoordinate;\n },\n});\nObject.defineProperty(exports, 'separateOperations', {\n enumerable: true,\n get: function () {\n return _separateOperations.separateOperations;\n },\n});\nObject.defineProperty(exports, 'stripIgnoredCharacters', {\n enumerable: true,\n get: function () {\n return _stripIgnoredCharacters.stripIgnoredCharacters;\n },\n});\nObject.defineProperty(exports, 'typeFromAST', {\n enumerable: true,\n get: function () {\n return _typeFromAST.typeFromAST;\n },\n});\nObject.defineProperty(exports, 'valueFromAST', {\n enumerable: true,\n get: function () {\n return _valueFromAST.valueFromAST;\n },\n});\nObject.defineProperty(exports, 'valueFromASTUntyped', {\n enumerable: true,\n get: function () {\n return _valueFromASTUntyped.valueFromASTUntyped;\n },\n});\nObject.defineProperty(exports, 'visitWithTypeInfo', {\n enumerable: true,\n get: function () {\n return _TypeInfo.visitWithTypeInfo;\n },\n});\n\nvar _getIntrospectionQuery = require('./getIntrospectionQuery.js');\n\nvar _getOperationAST = require('./getOperationAST.js');\n\nvar _getOperationRootType = require('./getOperationRootType.js');\n\nvar _introspectionFromSchema = require('./introspectionFromSchema.js');\n\nvar _buildClientSchema = require('./buildClientSchema.js');\n\nvar _buildASTSchema = require('./buildASTSchema.js');\n\nvar _extendSchema = require('./extendSchema.js');\n\nvar _lexicographicSortSchema = require('./lexicographicSortSchema.js');\n\nvar _printSchema = require('./printSchema.js');\n\nvar _typeFromAST = require('./typeFromAST.js');\n\nvar _valueFromAST = require('./valueFromAST.js');\n\nvar _valueFromASTUntyped = require('./valueFromASTUntyped.js');\n\nvar _astFromValue = require('./astFromValue.js');\n\nvar _TypeInfo = require('./TypeInfo.js');\n\nvar _coerceInputValue = require('./coerceInputValue.js');\n\nvar _concatAST = require('./concatAST.js');\n\nvar _separateOperations = require('./separateOperations.js');\n\nvar _stripIgnoredCharacters = require('./stripIgnoredCharacters.js');\n\nvar _typeComparators = require('./typeComparators.js');\n\nvar _assertValidName = require('./assertValidName.js');\n\nvar _findBreakingChanges = require('./findBreakingChanges.js');\n\nvar _resolveSchemaCoordinate = require('./resolveSchemaCoordinate.js');\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true,\n});\nObject.defineProperty(exports, 'BREAK', {\n enumerable: true,\n get: function () {\n return _index2.BREAK;\n },\n});\nObject.defineProperty(exports, 'BreakingChangeType', {\n enumerable: true,\n get: function () {\n return _index6.BreakingChangeType;\n },\n});\nObject.defineProperty(exports, 'DEFAULT_DEPRECATION_REASON', {\n enumerable: true,\n get: function () {\n return _index.DEFAULT_DEPRECATION_REASON;\n },\n});\nObject.defineProperty(exports, 'DangerousChangeType', {\n enumerable: true,\n get: function () {\n return _index6.DangerousChangeType;\n },\n});\nObject.defineProperty(exports, 'DirectiveLocation', {\n enumerable: true,\n get: function () {\n return _index2.DirectiveLocation;\n },\n});\nObject.defineProperty(exports, 'ExecutableDefinitionsRule', {\n enumerable: true,\n get: function () {\n return _index4.ExecutableDefinitionsRule;\n },\n});\nObject.defineProperty(exports, 'FieldsOnCorrectTypeRule', {\n enumerable: true,\n get: function () {\n return _index4.FieldsOnCorrectTypeRule;\n },\n});\nObject.defineProperty(exports, 'FragmentsOnCompositeTypesRule', {\n enumerable: true,\n get: function () {\n return _index4.FragmentsOnCompositeTypesRule;\n },\n});\nObject.defineProperty(exports, 'GRAPHQL_MAX_INT', {\n enumerable: true,\n get: function () {\n return _index.GRAPHQL_MAX_INT;\n },\n});\nObject.defineProperty(exports, 'GRAPHQL_MIN_INT', {\n enumerable: true,\n get: function () {\n return _index.GRAPHQL_MIN_INT;\n },\n});\nObject.defineProperty(exports, 'GraphQLBoolean', {\n enumerable: true,\n get: function () {\n return _index.GraphQLBoolean;\n },\n});\nObject.defineProperty(exports, 'GraphQLDeprecatedDirective', {\n enumerable: true,\n get: function () {\n return _index.GraphQLDeprecatedDirective;\n },\n});\nObject.defineProperty(exports, 'GraphQLDirective', {\n enumerable: true,\n get: function () {\n return _index.GraphQLDirective;\n },\n});\nObject.defineProperty(exports, 'GraphQLEnumType', {\n enumerable: true,\n get: function () {\n return _index.GraphQLEnumType;\n },\n});\nObject.defineProperty(exports, 'GraphQLError', {\n enumerable: true,\n get: function () {\n return _index5.GraphQLError;\n },\n});\nObject.defineProperty(exports, 'GraphQLFloat', {\n enumerable: true,\n get: function () {\n return _index.GraphQLFloat;\n },\n});\nObject.defineProperty(exports, 'GraphQLID', {\n enumerable: true,\n get: function () {\n return _index.GraphQLID;\n },\n});\nObject.defineProperty(exports, 'GraphQLIncludeDirective', {\n enumerable: true,\n get: function () {\n return _index.GraphQLIncludeDirective;\n },\n});\nObject.defineProperty(exports, 'GraphQLInputObjectType', {\n enumerable: true,\n get: function () {\n return _index.GraphQLInputObjectType;\n },\n});\nObject.defineProperty(exports, 'GraphQLInt', {\n enumerable: true,\n get: function () {\n return _index.GraphQLInt;\n },\n});\nObject.defineProperty(exports, 'GraphQLInterfaceType', {\n enumerable: true,\n get: function () {\n return _index.GraphQLInterfaceType;\n },\n});\nObject.defineProperty(exports, 'GraphQLList', {\n enumerable: true,\n get: function () {\n return _index.GraphQLList;\n },\n});\nObject.defineProperty(exports, 'GraphQLNonNull', {\n enumerable: true,\n get: function () {\n return _index.GraphQLNonNull;\n },\n});\nObject.defineProperty(exports, 'GraphQLObjectType', {\n enumerable: true,\n get: function () {\n return _index.GraphQLObjectType;\n },\n});\nObject.defineProperty(exports, 'GraphQLOneOfDirective', {\n enumerable: true,\n get: function () {\n return _index.GraphQLOneOfDirective;\n },\n});\nObject.defineProperty(exports, 'GraphQLScalarType', {\n enumerable: true,\n get: function () {\n return _index.GraphQLScalarType;\n },\n});\nObject.defineProperty(exports, 'GraphQLSchema', {\n enumerable: true,\n get: function () {\n return _index.GraphQLSchema;\n },\n});\nObject.defineProperty(exports, 'GraphQLSkipDirective', {\n enumerable: true,\n get: function () {\n return _index.GraphQLSkipDirective;\n },\n});\nObject.defineProperty(exports, 'GraphQLSpecifiedByDirective', {\n enumerable: true,\n get: function () {\n return _index.GraphQLSpecifiedByDirective;\n },\n});\nObject.defineProperty(exports, 'GraphQLString', {\n enumerable: true,\n get: function () {\n return _index.GraphQLString;\n },\n});\nObject.defineProperty(exports, 'GraphQLUnionType', {\n enumerable: true,\n get: function () {\n return _index.GraphQLUnionType;\n },\n});\nObject.defineProperty(exports, 'Kind', {\n enumerable: true,\n get: function () {\n return _index2.Kind;\n },\n});\nObject.defineProperty(exports, 'KnownArgumentNamesRule', {\n enumerable: true,\n get: function () {\n return _index4.KnownArgumentNamesRule;\n },\n});\nObject.defineProperty(exports, 'KnownDirectivesRule', {\n enumerable: true,\n get: function () {\n return _index4.KnownDirectivesRule;\n },\n});\nObject.defineProperty(exports, 'KnownFragmentNamesRule', {\n enumerable: true,\n get: function () {\n return _index4.KnownFragmentNamesRule;\n },\n});\nObject.defineProperty(exports, 'KnownTypeNamesRule', {\n enumerable: true,\n get: function () {\n return _index4.KnownTypeNamesRule;\n },\n});\nObject.defineProperty(exports, 'Lexer', {\n enumerable: true,\n get: function () {\n return _index2.Lexer;\n },\n});\nObject.defineProperty(exports, 'Location', {\n enumerable: true,\n get: function () {\n return _index2.Location;\n },\n});\nObject.defineProperty(exports, 'LoneAnonymousOperationRule', {\n enumerable: true,\n get: function () {\n return _index4.LoneAnonymousOperationRule;\n },\n});\nObject.defineProperty(exports, 'LoneSchemaDefinitionRule', {\n enumerable: true,\n get: function () {\n return _index4.LoneSchemaDefinitionRule;\n },\n});\nObject.defineProperty(exports, 'MaxIntrospectionDepthRule', {\n enumerable: true,\n get: function () {\n return _index4.MaxIntrospectionDepthRule;\n },\n});\nObject.defineProperty(exports, 'NoDeprecatedCustomRule', {\n enumerable: true,\n get: function () {\n return _index4.NoDeprecatedCustomRule;\n },\n});\nObject.defineProperty(exports, 'NoFragmentCyclesRule', {\n enumerable: true,\n get: function () {\n return _index4.NoFragmentCyclesRule;\n },\n});\nObject.defineProperty(exports, 'NoSchemaIntrospectionCustomRule', {\n enumerable: true,\n get: function () {\n return _index4.NoSchemaIntrospectionCustomRule;\n },\n});\nObject.defineProperty(exports, 'NoUndefinedVariablesRule', {\n enumerable: true,\n get: function () {\n return _index4.NoUndefinedVariablesRule;\n },\n});\nObject.defineProperty(exports, 'NoUnusedFragmentsRule', {\n enumerable: true,\n get: function () {\n return _index4.NoUnusedFragmentsRule;\n },\n});\nObject.defineProperty(exports, 'NoUnusedVariablesRule', {\n enumerable: true,\n get: function () {\n return _index4.NoUnusedVariablesRule;\n },\n});\nObject.defineProperty(exports, 'OperationTypeNode', {\n enumerable: true,\n get: function () {\n return _index2.OperationTypeNode;\n },\n});\nObject.defineProperty(exports, 'OverlappingFieldsCanBeMergedRule', {\n enumerable: true,\n get: function () {\n return _index4.OverlappingFieldsCanBeMergedRule;\n },\n});\nObject.defineProperty(exports, 'PossibleFragmentSpreadsRule', {\n enumerable: true,\n get: function () {\n return _index4.PossibleFragmentSpreadsRule;\n },\n});\nObject.defineProperty(exports, 'PossibleTypeExtensionsRule', {\n enumerable: true,\n get: function () {\n return _index4.PossibleTypeExtensionsRule;\n },\n});\nObject.defineProperty(exports, 'ProvidedRequiredArgumentsRule', {\n enumerable: true,\n get: function () {\n return _index4.ProvidedRequiredArgumentsRule;\n },\n});\nObject.defineProperty(exports, 'ScalarLeafsRule', {\n enumerable: true,\n get: function () {\n return _index4.ScalarLeafsRule;\n },\n});\nObject.defineProperty(exports, 'SchemaMetaFieldDef', {\n enumerable: true,\n get: function () {\n return _index.SchemaMetaFieldDef;\n },\n});\nObject.defineProperty(exports, 'SingleFieldSubscriptionsRule', {\n enumerable: true,\n get: function () {\n return _index4.SingleFieldSubscriptionsRule;\n },\n});\nObject.defineProperty(exports, 'Source', {\n enumerable: true,\n get: function () {\n return _index2.Source;\n },\n});\nObject.defineProperty(exports, 'Token', {\n enumerable: true,\n get: function () {\n return _index2.Token;\n },\n});\nObject.defineProperty(exports, 'TokenKind', {\n enumerable: true,\n get: function () {\n return _index2.TokenKind;\n },\n});\nObject.defineProperty(exports, 'TypeInfo', {\n enumerable: true,\n get: function () {\n return _index6.TypeInfo;\n },\n});\nObject.defineProperty(exports, 'TypeKind', {\n enumerable: true,\n get: function () {\n return _index.TypeKind;\n },\n});\nObject.defineProperty(exports, 'TypeMetaFieldDef', {\n enumerable: true,\n get: function () {\n return _index.TypeMetaFieldDef;\n },\n});\nObject.defineProperty(exports, 'TypeNameMetaFieldDef', {\n enumerable: true,\n get: function () {\n return _index.TypeNameMetaFieldDef;\n },\n});\nObject.defineProperty(exports, 'UniqueArgumentDefinitionNamesRule', {\n enumerable: true,\n get: function () {\n return _index4.UniqueArgumentDefinitionNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueArgumentNamesRule', {\n enumerable: true,\n get: function () {\n return _index4.UniqueArgumentNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueDirectiveNamesRule', {\n enumerable: true,\n get: function () {\n return _index4.UniqueDirectiveNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueDirectivesPerLocationRule', {\n enumerable: true,\n get: function () {\n return _index4.UniqueDirectivesPerLocationRule;\n },\n});\nObject.defineProperty(exports, 'UniqueEnumValueNamesRule', {\n enumerable: true,\n get: function () {\n return _index4.UniqueEnumValueNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueFieldDefinitionNamesRule', {\n enumerable: true,\n get: function () {\n return _index4.UniqueFieldDefinitionNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueFragmentNamesRule', {\n enumerable: true,\n get: function () {\n return _index4.UniqueFragmentNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueInputFieldNamesRule', {\n enumerable: true,\n get: function () {\n return _index4.UniqueInputFieldNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueOperationNamesRule', {\n enumerable: true,\n get: function () {\n return _index4.UniqueOperationNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueOperationTypesRule', {\n enumerable: true,\n get: function () {\n return _index4.UniqueOperationTypesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueTypeNamesRule', {\n enumerable: true,\n get: function () {\n return _index4.UniqueTypeNamesRule;\n },\n});\nObject.defineProperty(exports, 'UniqueVariableNamesRule', {\n enumerable: true,\n get: function () {\n return _index4.UniqueVariableNamesRule;\n },\n});\nObject.defineProperty(exports, 'ValidationContext', {\n enumerable: true,\n get: function () {\n return _index4.ValidationContext;\n },\n});\nObject.defineProperty(exports, 'ValuesOfCorrectTypeRule', {\n enumerable: true,\n get: function () {\n return _index4.ValuesOfCorrectTypeRule;\n },\n});\nObject.defineProperty(exports, 'VariablesAreInputTypesRule', {\n enumerable: true,\n get: function () {\n return _index4.VariablesAreInputTypesRule;\n },\n});\nObject.defineProperty(exports, 'VariablesInAllowedPositionRule', {\n enumerable: true,\n get: function () {\n return _index4.VariablesInAllowedPositionRule;\n },\n});\nObject.defineProperty(exports, '__Directive', {\n enumerable: true,\n get: function () {\n return _index.__Directive;\n },\n});\nObject.defineProperty(exports, '__DirectiveLocation', {\n enumerable: true,\n get: function () {\n return _index.__DirectiveLocation;\n },\n});\nObject.defineProperty(exports, '__EnumValue', {\n enumerable: true,\n get: function () {\n return _index.__EnumValue;\n },\n});\nObject.defineProperty(exports, '__Field', {\n enumerable: true,\n get: function () {\n return _index.__Field;\n },\n});\nObject.defineProperty(exports, '__InputValue', {\n enumerable: true,\n get: function () {\n return _index.__InputValue;\n },\n});\nObject.defineProperty(exports, '__Schema', {\n enumerable: true,\n get: function () {\n return _index.__Schema;\n },\n});\nObject.defineProperty(exports, '__Type', {\n enumerable: true,\n get: function () {\n return _index.__Type;\n },\n});\nObject.defineProperty(exports, '__TypeKind', {\n enumerable: true,\n get: function () {\n return _index.__TypeKind;\n },\n});\nObject.defineProperty(exports, 'assertAbstractType', {\n enumerable: true,\n get: function () {\n return _index.assertAbstractType;\n },\n});\nObject.defineProperty(exports, 'assertCompositeType', {\n enumerable: true,\n get: function () {\n return _index.assertCompositeType;\n },\n});\nObject.defineProperty(exports, 'assertDirective', {\n enumerable: true,\n get: function () {\n return _index.assertDirective;\n },\n});\nObject.defineProperty(exports, 'assertEnumType', {\n enumerable: true,\n get: function () {\n return _index.assertEnumType;\n },\n});\nObject.defineProperty(exports, 'assertEnumValueName', {\n enumerable: true,\n get: function () {\n return _index.assertEnumValueName;\n },\n});\nObject.defineProperty(exports, 'assertInputObjectType', {\n enumerable: true,\n get: function () {\n return _index.assertInputObjectType;\n },\n});\nObject.defineProperty(exports, 'assertInputType', {\n enumerable: true,\n get: function () {\n return _index.assertInputType;\n },\n});\nObject.defineProperty(exports, 'assertInterfaceType', {\n enumerable: true,\n get: function () {\n return _index.assertInterfaceType;\n },\n});\nObject.defineProperty(exports, 'assertLeafType', {\n enumerable: true,\n get: function () {\n return _index.assertLeafType;\n },\n});\nObject.defineProperty(exports, 'assertListType', {\n enumerable: true,\n get: function () {\n return _index.assertListType;\n },\n});\nObject.defineProperty(exports, 'assertName', {\n enumerable: true,\n get: function () {\n return _index.assertName;\n },\n});\nObject.defineProperty(exports, 'assertNamedType', {\n enumerable: true,\n get: function () {\n return _index.assertNamedType;\n },\n});\nObject.defineProperty(exports, 'assertNonNullType', {\n enumerable: true,\n get: function () {\n return _index.assertNonNullType;\n },\n});\nObject.defineProperty(exports, 'assertNullableType', {\n enumerable: true,\n get: function () {\n return _index.assertNullableType;\n },\n});\nObject.defineProperty(exports, 'assertObjectType', {\n enumerable: true,\n get: function () {\n return _index.assertObjectType;\n },\n});\nObject.defineProperty(exports, 'assertOutputType', {\n enumerable: true,\n get: function () {\n return _index.assertOutputType;\n },\n});\nObject.defineProperty(exports, 'assertScalarType', {\n enumerable: true,\n get: function () {\n return _index.assertScalarType;\n },\n});\nObject.defineProperty(exports, 'assertSchema', {\n enumerable: true,\n get: function () {\n return _index.assertSchema;\n },\n});\nObject.defineProperty(exports, 'assertType', {\n enumerable: true,\n get: function () {\n return _index.assertType;\n },\n});\nObject.defineProperty(exports, 'assertUnionType', {\n enumerable: true,\n get: function () {\n return _index.assertUnionType;\n },\n});\nObject.defineProperty(exports, 'assertValidName', {\n enumerable: true,\n get: function () {\n return _index6.assertValidName;\n },\n});\nObject.defineProperty(exports, 'assertValidSchema', {\n enumerable: true,\n get: function () {\n return _index.assertValidSchema;\n },\n});\nObject.defineProperty(exports, 'assertWrappingType', {\n enumerable: true,\n get: function () {\n return _index.assertWrappingType;\n },\n});\nObject.defineProperty(exports, 'astFromValue', {\n enumerable: true,\n get: function () {\n return _index6.astFromValue;\n },\n});\nObject.defineProperty(exports, 'buildASTSchema', {\n enumerable: true,\n get: function () {\n return _index6.buildASTSchema;\n },\n});\nObject.defineProperty(exports, 'buildClientSchema', {\n enumerable: true,\n get: function () {\n return _index6.buildClientSchema;\n },\n});\nObject.defineProperty(exports, 'buildSchema', {\n enumerable: true,\n get: function () {\n return _index6.buildSchema;\n },\n});\nObject.defineProperty(exports, 'coerceInputValue', {\n enumerable: true,\n get: function () {\n return _index6.coerceInputValue;\n },\n});\nObject.defineProperty(exports, 'concatAST', {\n enumerable: true,\n get: function () {\n return _index6.concatAST;\n },\n});\nObject.defineProperty(exports, 'createSourceEventStream', {\n enumerable: true,\n get: function () {\n return _index3.createSourceEventStream;\n },\n});\nObject.defineProperty(exports, 'defaultFieldResolver', {\n enumerable: true,\n get: function () {\n return _index3.defaultFieldResolver;\n },\n});\nObject.defineProperty(exports, 'defaultTypeResolver', {\n enumerable: true,\n get: function () {\n return _index3.defaultTypeResolver;\n },\n});\nObject.defineProperty(exports, 'doTypesOverlap', {\n enumerable: true,\n get: function () {\n return _index6.doTypesOverlap;\n },\n});\nObject.defineProperty(exports, 'execute', {\n enumerable: true,\n get: function () {\n return _index3.execute;\n },\n});\nObject.defineProperty(exports, 'executeSync', {\n enumerable: true,\n get: function () {\n return _index3.executeSync;\n },\n});\nObject.defineProperty(exports, 'extendSchema', {\n enumerable: true,\n get: function () {\n return _index6.extendSchema;\n },\n});\nObject.defineProperty(exports, 'findBreakingChanges', {\n enumerable: true,\n get: function () {\n return _index6.findBreakingChanges;\n },\n});\nObject.defineProperty(exports, 'findDangerousChanges', {\n enumerable: true,\n get: function () {\n return _index6.findDangerousChanges;\n },\n});\nObject.defineProperty(exports, 'formatError', {\n enumerable: true,\n get: function () {\n return _index5.formatError;\n },\n});\nObject.defineProperty(exports, 'getArgumentValues', {\n enumerable: true,\n get: function () {\n return _index3.getArgumentValues;\n },\n});\nObject.defineProperty(exports, 'getDirectiveValues', {\n enumerable: true,\n get: function () {\n return _index3.getDirectiveValues;\n },\n});\nObject.defineProperty(exports, 'getEnterLeaveForKind', {\n enumerable: true,\n get: function () {\n return _index2.getEnterLeaveForKind;\n },\n});\nObject.defineProperty(exports, 'getIntrospectionQuery', {\n enumerable: true,\n get: function () {\n return _index6.getIntrospectionQuery;\n },\n});\nObject.defineProperty(exports, 'getLocation', {\n enumerable: true,\n get: function () {\n return _index2.getLocation;\n },\n});\nObject.defineProperty(exports, 'getNamedType', {\n enumerable: true,\n get: function () {\n return _index.getNamedType;\n },\n});\nObject.defineProperty(exports, 'getNullableType', {\n enumerable: true,\n get: function () {\n return _index.getNullableType;\n },\n});\nObject.defineProperty(exports, 'getOperationAST', {\n enumerable: true,\n get: function () {\n return _index6.getOperationAST;\n },\n});\nObject.defineProperty(exports, 'getOperationRootType', {\n enumerable: true,\n get: function () {\n return _index6.getOperationRootType;\n },\n});\nObject.defineProperty(exports, 'getVariableValues', {\n enumerable: true,\n get: function () {\n return _index3.getVariableValues;\n },\n});\nObject.defineProperty(exports, 'getVisitFn', {\n enumerable: true,\n get: function () {\n return _index2.getVisitFn;\n },\n});\nObject.defineProperty(exports, 'graphql', {\n enumerable: true,\n get: function () {\n return _graphql.graphql;\n },\n});\nObject.defineProperty(exports, 'graphqlSync', {\n enumerable: true,\n get: function () {\n return _graphql.graphqlSync;\n },\n});\nObject.defineProperty(exports, 'introspectionFromSchema', {\n enumerable: true,\n get: function () {\n return _index6.introspectionFromSchema;\n },\n});\nObject.defineProperty(exports, 'introspectionTypes', {\n enumerable: true,\n get: function () {\n return _index.introspectionTypes;\n },\n});\nObject.defineProperty(exports, 'isAbstractType', {\n enumerable: true,\n get: function () {\n return _index.isAbstractType;\n },\n});\nObject.defineProperty(exports, 'isCompositeType', {\n enumerable: true,\n get: function () {\n return _index.isCompositeType;\n },\n});\nObject.defineProperty(exports, 'isConstValueNode', {\n enumerable: true,\n get: function () {\n return _index2.isConstValueNode;\n },\n});\nObject.defineProperty(exports, 'isDefinitionNode', {\n enumerable: true,\n get: function () {\n return _index2.isDefinitionNode;\n },\n});\nObject.defineProperty(exports, 'isDirective', {\n enumerable: true,\n get: function () {\n return _index.isDirective;\n },\n});\nObject.defineProperty(exports, 'isEnumType', {\n enumerable: true,\n get: function () {\n return _index.isEnumType;\n },\n});\nObject.defineProperty(exports, 'isEqualType', {\n enumerable: true,\n get: function () {\n return _index6.isEqualType;\n },\n});\nObject.defineProperty(exports, 'isExecutableDefinitionNode', {\n enumerable: true,\n get: function () {\n return _index2.isExecutableDefinitionNode;\n },\n});\nObject.defineProperty(exports, 'isInputObjectType', {\n enumerable: true,\n get: function () {\n return _index.isInputObjectType;\n },\n});\nObject.defineProperty(exports, 'isInputType', {\n enumerable: true,\n get: function () {\n return _index.isInputType;\n },\n});\nObject.defineProperty(exports, 'isInterfaceType', {\n enumerable: true,\n get: function () {\n return _index.isInterfaceType;\n },\n});\nObject.defineProperty(exports, 'isIntrospectionType', {\n enumerable: true,\n get: function () {\n return _index.isIntrospectionType;\n },\n});\nObject.defineProperty(exports, 'isLeafType', {\n enumerable: true,\n get: function () {\n return _index.isLeafType;\n },\n});\nObject.defineProperty(exports, 'isListType', {\n enumerable: true,\n get: function () {\n return _index.isListType;\n },\n});\nObject.defineProperty(exports, 'isNamedType', {\n enumerable: true,\n get: function () {\n return _index.isNamedType;\n },\n});\nObject.defineProperty(exports, 'isNonNullType', {\n enumerable: true,\n get: function () {\n return _index.isNonNullType;\n },\n});\nObject.defineProperty(exports, 'isNullableType', {\n enumerable: true,\n get: function () {\n return _index.isNullableType;\n },\n});\nObject.defineProperty(exports, 'isObjectType', {\n enumerable: true,\n get: function () {\n return _index.isObjectType;\n },\n});\nObject.defineProperty(exports, 'isOutputType', {\n enumerable: true,\n get: function () {\n return _index.isOutputType;\n },\n});\nObject.defineProperty(exports, 'isRequiredArgument', {\n enumerable: true,\n get: function () {\n return _index.isRequiredArgument;\n },\n});\nObject.defineProperty(exports, 'isRequiredInputField', {\n enumerable: true,\n get: function () {\n return _index.isRequiredInputField;\n },\n});\nObject.defineProperty(exports, 'isScalarType', {\n enumerable: true,\n get: function () {\n return _index.isScalarType;\n },\n});\nObject.defineProperty(exports, 'isSchema', {\n enumerable: true,\n get: function () {\n return _index.isSchema;\n },\n});\nObject.defineProperty(exports, 'isSchemaCoordinateNode', {\n enumerable: true,\n get: function () {\n return _index2.isSchemaCoordinateNode;\n },\n});\nObject.defineProperty(exports, 'isSelectionNode', {\n enumerable: true,\n get: function () {\n return _index2.isSelectionNode;\n },\n});\nObject.defineProperty(exports, 'isSpecifiedDirective', {\n enumerable: true,\n get: function () {\n return _index.isSpecifiedDirective;\n },\n});\nObject.defineProperty(exports, 'isSpecifiedScalarType', {\n enumerable: true,\n get: function () {\n return _index.isSpecifiedScalarType;\n },\n});\nObject.defineProperty(exports, 'isType', {\n enumerable: true,\n get: function () {\n return _index.isType;\n },\n});\nObject.defineProperty(exports, 'isTypeDefinitionNode', {\n enumerable: true,\n get: function () {\n return _index2.isTypeDefinitionNode;\n },\n});\nObject.defineProperty(exports, 'isTypeExtensionNode', {\n enumerable: true,\n get: function () {\n return _index2.isTypeExtensionNode;\n },\n});\nObject.defineProperty(exports, 'isTypeNode', {\n enumerable: true,\n get: function () {\n return _index2.isTypeNode;\n },\n});\nObject.defineProperty(exports, 'isTypeSubTypeOf', {\n enumerable: true,\n get: function () {\n return _index6.isTypeSubTypeOf;\n },\n});\nObject.defineProperty(exports, 'isTypeSystemDefinitionNode', {\n enumerable: true,\n get: function () {\n return _index2.isTypeSystemDefinitionNode;\n },\n});\nObject.defineProperty(exports, 'isTypeSystemExtensionNode', {\n enumerable: true,\n get: function () {\n return _index2.isTypeSystemExtensionNode;\n },\n});\nObject.defineProperty(exports, 'isUnionType', {\n enumerable: true,\n get: function () {\n return _index.isUnionType;\n },\n});\nObject.defineProperty(exports, 'isValidNameError', {\n enumerable: true,\n get: function () {\n return _index6.isValidNameError;\n },\n});\nObject.defineProperty(exports, 'isValueNode', {\n enumerable: true,\n get: function () {\n return _index2.isValueNode;\n },\n});\nObject.defineProperty(exports, 'isWrappingType', {\n enumerable: true,\n get: function () {\n return _index.isWrappingType;\n },\n});\nObject.defineProperty(exports, 'lexicographicSortSchema', {\n enumerable: true,\n get: function () {\n return _index6.lexicographicSortSchema;\n },\n});\nObject.defineProperty(exports, 'locatedError', {\n enumerable: true,\n get: function () {\n return _index5.locatedError;\n },\n});\nObject.defineProperty(exports, 'parse', {\n enumerable: true,\n get: function () {\n return _index2.parse;\n },\n});\nObject.defineProperty(exports, 'parseConstValue', {\n enumerable: true,\n get: function () {\n return _index2.parseConstValue;\n },\n});\nObject.defineProperty(exports, 'parseSchemaCoordinate', {\n enumerable: true,\n get: function () {\n return _index2.parseSchemaCoordinate;\n },\n});\nObject.defineProperty(exports, 'parseType', {\n enumerable: true,\n get: function () {\n return _index2.parseType;\n },\n});\nObject.defineProperty(exports, 'parseValue', {\n enumerable: true,\n get: function () {\n return _index2.parseValue;\n },\n});\nObject.defineProperty(exports, 'print', {\n enumerable: true,\n get: function () {\n return _index2.print;\n },\n});\nObject.defineProperty(exports, 'printError', {\n enumerable: true,\n get: function () {\n return _index5.printError;\n },\n});\nObject.defineProperty(exports, 'printIntrospectionSchema', {\n enumerable: true,\n get: function () {\n return _index6.printIntrospectionSchema;\n },\n});\nObject.defineProperty(exports, 'printLocation', {\n enumerable: true,\n get: function () {\n return _index2.printLocation;\n },\n});\nObject.defineProperty(exports, 'printSchema', {\n enumerable: true,\n get: function () {\n return _index6.printSchema;\n },\n});\nObject.defineProperty(exports, 'printSourceLocation', {\n enumerable: true,\n get: function () {\n return _index2.printSourceLocation;\n },\n});\nObject.defineProperty(exports, 'printType', {\n enumerable: true,\n get: function () {\n return _index6.printType;\n },\n});\nObject.defineProperty(exports, 'recommendedRules', {\n enumerable: true,\n get: function () {\n return _index4.recommendedRules;\n },\n});\nObject.defineProperty(exports, 'resolveASTSchemaCoordinate', {\n enumerable: true,\n get: function () {\n return _index6.resolveASTSchemaCoordinate;\n },\n});\nObject.defineProperty(exports, 'resolveObjMapThunk', {\n enumerable: true,\n get: function () {\n return _index.resolveObjMapThunk;\n },\n});\nObject.defineProperty(exports, 'resolveReadonlyArrayThunk', {\n enumerable: true,\n get: function () {\n return _index.resolveReadonlyArrayThunk;\n },\n});\nObject.defineProperty(exports, 'resolveSchemaCoordinate', {\n enumerable: true,\n get: function () {\n return _index6.resolveSchemaCoordinate;\n },\n});\nObject.defineProperty(exports, 'responsePathAsArray', {\n enumerable: true,\n get: function () {\n return _index3.responsePathAsArray;\n },\n});\nObject.defineProperty(exports, 'separateOperations', {\n enumerable: true,\n get: function () {\n return _index6.separateOperations;\n },\n});\nObject.defineProperty(exports, 'specifiedDirectives', {\n enumerable: true,\n get: function () {\n return _index.specifiedDirectives;\n },\n});\nObject.defineProperty(exports, 'specifiedRules', {\n enumerable: true,\n get: function () {\n return _index4.specifiedRules;\n },\n});\nObject.defineProperty(exports, 'specifiedScalarTypes', {\n enumerable: true,\n get: function () {\n return _index.specifiedScalarTypes;\n },\n});\nObject.defineProperty(exports, 'stripIgnoredCharacters', {\n enumerable: true,\n get: function () {\n return _index6.stripIgnoredCharacters;\n },\n});\nObject.defineProperty(exports, 'subscribe', {\n enumerable: true,\n get: function () {\n return _index3.subscribe;\n },\n});\nObject.defineProperty(exports, 'syntaxError', {\n enumerable: true,\n get: function () {\n return _index5.syntaxError;\n },\n});\nObject.defineProperty(exports, 'typeFromAST', {\n enumerable: true,\n get: function () {\n return _index6.typeFromAST;\n },\n});\nObject.defineProperty(exports, 'validate', {\n enumerable: true,\n get: function () {\n return _index4.validate;\n },\n});\nObject.defineProperty(exports, 'validateSchema', {\n enumerable: true,\n get: function () {\n return _index.validateSchema;\n },\n});\nObject.defineProperty(exports, 'valueFromAST', {\n enumerable: true,\n get: function () {\n return _index6.valueFromAST;\n },\n});\nObject.defineProperty(exports, 'valueFromASTUntyped', {\n enumerable: true,\n get: function () {\n return _index6.valueFromASTUntyped;\n },\n});\nObject.defineProperty(exports, 'version', {\n enumerable: true,\n get: function () {\n return _version.version;\n },\n});\nObject.defineProperty(exports, 'versionInfo', {\n enumerable: true,\n get: function () {\n return _version.versionInfo;\n },\n});\nObject.defineProperty(exports, 'visit', {\n enumerable: true,\n get: function () {\n return _index2.visit;\n },\n});\nObject.defineProperty(exports, 'visitInParallel', {\n enumerable: true,\n get: function () {\n return _index2.visitInParallel;\n },\n});\nObject.defineProperty(exports, 'visitWithTypeInfo', {\n enumerable: true,\n get: function () {\n return _index6.visitWithTypeInfo;\n },\n});\n\nvar _version = require('./version.js');\n\nvar _graphql = require('./graphql.js');\n\nvar _index = require('./type/index.js');\n\nvar _index2 = require('./language/index.js');\n\nvar _index3 = require('./execution/index.js');\n\nvar _index4 = require('./validation/index.js');\n\nvar _index5 = require('./error/index.js');\n\nvar _index6 = require('./utilities/index.js');\n","// An operation's input SDL as form fields: its root input, nested inputs and\n// enums, read with graphql's own parser.\nimport {\n GraphQLError,\n Kind,\n parse,\n type InputObjectTypeDefinitionNode,\n type TypeNode,\n} from \"graphql\";\n\nexport interface TypeRef {\n name: string;\n list: boolean;\n required: boolean;\n}\n\nexport interface InputField {\n name: string;\n type: TypeRef;\n description?: string;\n}\n\nexport interface ActionInputSchema {\n rootName: string;\n root: InputField[];\n inputs: Map<string, InputField[]>;\n enums: Map<string, string[]>;\n}\n\nexport type FieldKind =\n | \"text\"\n | \"number\"\n | \"integer\"\n | \"boolean\"\n | \"enum\"\n | \"object\"\n | \"json\"\n | \"unsupported\";\n\n// Every scalar a document model can declare, by the value it carries.\nconst SCALAR_KINDS: Record<string, FieldKind> = {\n String: \"text\",\n ID: \"text\",\n OID: \"text\",\n PHID: \"text\",\n OLabel: \"text\",\n URL: \"text\",\n Date: \"text\",\n DateTime: \"text\",\n EmailAddress: \"text\",\n EthereumAddress: \"text\",\n Currency: \"text\",\n Address: \"text\",\n AttachmentRef: \"text\",\n Int: \"integer\",\n Float: \"number\",\n Amount_Money: \"number\",\n Amount_Percentage: \"number\",\n Amount_Tokens: \"number\",\n Boolean: \"boolean\",\n // {unit, value} objects.\n Amount: \"object\",\n Amount_Crypto: \"object\",\n Amount_Currency: \"object\",\n Amount_Fiat: \"object\",\n Unknown: \"json\",\n};\n\nexport class SdlSyntaxError extends Error {\n constructor(message: string) {\n super(`Invalid input SDL: ${message}`);\n this.name = \"SdlSyntaxError\";\n }\n}\n\nfunction typeRef(node: TypeNode): TypeRef {\n if (node.kind === Kind.NON_NULL_TYPE) {\n return { ...typeRef(node.type), required: true };\n }\n if (node.kind === Kind.LIST_TYPE) {\n return { name: typeRef(node.type).name, list: true, required: false };\n }\n return { name: node.name.value, list: false, required: false };\n}\n\nfunction inputFields(node: InputObjectTypeDefinitionNode): InputField[] {\n return (node.fields ?? [])\n .filter((field) => field.name.value !== \"_\")\n .map((field) => {\n const description = field.description?.value.replace(/\\s+/g, \" \");\n return {\n name: field.name.value,\n type: typeRef(field.type),\n ...(description ? { description } : {}),\n };\n });\n}\n\nexport interface SdlDefinitions {\n inputs: Map<string, InputField[]>;\n enums: Map<string, string[]>;\n}\n\n// Throws SdlSyntaxError on text that is not SDL.\nexport function parseSdl(sdl: string): SdlDefinitions {\n let document;\n try {\n document = parse(sdl, { noLocation: true });\n } catch (error) {\n throw new SdlSyntaxError(\n error instanceof GraphQLError ? error.message : String(error),\n );\n }\n const inputs = new Map<string, InputField[]>();\n const enums = new Map<string, string[]>();\n for (const definition of document.definitions) {\n if (definition.kind === Kind.INPUT_OBJECT_TYPE_DEFINITION) {\n inputs.set(definition.name.value, inputFields(definition));\n } else if (definition.kind === Kind.ENUM_TYPE_DEFINITION) {\n enums.set(\n definition.name.value,\n (definition.values ?? []).map((value) => value.name.value),\n );\n }\n }\n return { inputs, enums };\n}\n\nconst bare = (name: string) => name.replace(/[^A-Za-z0-9]/g, \"\").toLowerCase();\n\n// The input the operation's SDL defines for it, compared without case or\n// separators: SET_URL finds SetUrlInput or SetURLInput. Ambiguous is none.\nexport function rootInputName(\n actionType: string,\n inputs: Iterable<string>,\n): string | undefined {\n const wanted = `${bare(actionType)}input`;\n const matches = [...inputs].filter((name) => bare(name) === wanted);\n return matches.length === 1 ? matches[0] : undefined;\n}\n\n// Null when the SDL defines no input for the operation.\nexport function parseActionInputSchema(\n sdl: string,\n actionType: string,\n): ActionInputSchema | null {\n const { inputs, enums } = parseSdl(sdl);\n const rootName = rootInputName(actionType, inputs.keys());\n const root = rootName ? inputs.get(rootName) : undefined;\n return rootName && root ? { rootName, root, inputs, enums } : null;\n}\n\nexport function fieldKind(type: TypeRef, schema: ActionInputSchema): FieldKind {\n if (schema.inputs.has(type.name)) return \"object\";\n if (schema.enums.has(type.name)) return \"enum\";\n return SCALAR_KINDS[type.name] ?? \"unsupported\";\n}\n\n// A starting value: required fields get an empty value of their kind, and\n// optional ones are left out rather than sent as null.\nexport function templateFor(\n fields: InputField[],\n schema: ActionInputSchema,\n depth = 0,\n): Record<string, unknown> {\n const template: Record<string, unknown> = {};\n for (const field of fields) {\n if (!field.type.required) continue;\n if (field.type.list) {\n template[field.name] = [];\n continue;\n }\n const kind = fieldKind(field.type, schema);\n const nested = schema.inputs.get(field.type.name);\n // Self-referencing inputs stop here rather than recurse forever.\n if (kind === \"object\" && nested && depth < 4) {\n template[field.name] = templateFor(nested, schema, depth + 1);\n } else if (kind === \"text\") template[field.name] = \"\";\n else if (kind === \"integer\" || kind === \"number\") template[field.name] = 0;\n else if (kind === \"boolean\") template[field.name] = false;\n else if (kind === \"enum\") {\n template[field.name] = schema.enums.get(field.type.name)?.[0] ?? \"\";\n }\n }\n return template;\n}\n\n// \"createdAt\" → \"Created at\", for labels.\nexport function humanize(name: string): string {\n const spaced = name\n .replace(/([a-z0-9])([A-Z])/g, \"$1 $2\")\n .replace(/[_-]+/g, \" \")\n .toLowerCase()\n .trim();\n return spaced.charAt(0).toUpperCase() + spaced.slice(1);\n}\n","// An action's input as the props any Activepieces host renders, and the values\n// those props produce turned back into the types the action's schema declares.\nimport {\n Property,\n type DynamicPropsValue,\n} from \"@powerhousedao/pieces-framework\";\nimport {\n fieldKind,\n humanize,\n type ActionInputSchema,\n type FieldKind,\n type InputField,\n} from \"./input-schema.js\";\n\n// DynamicProperties allows text, static dropdowns and JSON only, so numbers\n// are text and booleans a yes/no dropdown; coerceInput restores their types.\nfunction propFor(field: InputField, schema: ActionInputSchema) {\n const base = {\n displayName: humanize(field.name),\n required: field.type.required,\n ...(field.description ? { description: field.description } : {}),\n };\n if (field.type.list) {\n return Property.Json({\n ...base,\n description: field.description ?? \"A JSON list\",\n });\n }\n switch (fieldKind(field.type, schema)) {\n case \"text\":\n return Property.ShortText(base);\n case \"integer\":\n case \"number\":\n return Property.ShortText({\n ...base,\n description: field.description ?? \"A number\",\n });\n case \"boolean\":\n return Property.StaticDropdown({\n ...base,\n options: {\n options: [\n { label: \"Yes\", value: true },\n { label: \"No\", value: false },\n ],\n },\n });\n case \"enum\":\n return Property.StaticDropdown({\n ...base,\n options: {\n options: (schema.enums.get(field.type.name) ?? []).map((value) => ({\n label: humanize(value),\n value,\n })),\n },\n });\n case \"unsupported\":\n return Property.Json({\n ...base,\n description: `Type ${field.type.name} is not supported by this form`,\n });\n default:\n return Property.Json(base);\n }\n}\n\nexport function inputProps(schema: ActionInputSchema): DynamicPropsValue {\n const props: Record<string, unknown> = {};\n for (const field of schema.root) props[field.name] = propFor(field, schema);\n return props as DynamicPropsValue;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\n// JSON's number grammar, so \"\", \"0x10\" and \"1e\" are not numbers.\nconst NUMBER = /^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$/;\n\nfunction preview(value: unknown): string {\n const text = typeof value === \"string\" ? value : JSON.stringify(value);\n return text.length > 60 ? `${text.slice(0, 57)}...` : text;\n}\n\nfunction coerceField(\n field: InputField,\n kind: FieldKind,\n value: unknown,\n): unknown {\n const fail = (expected: string) =>\n new Error(\n `input \"${field.name}\" (${field.type.name}) expects ${expected}; got ${preview(value)}`,\n );\n if (field.type.list) {\n if (!Array.isArray(value)) throw fail(\"a list\");\n return value;\n }\n switch (kind) {\n case \"text\":\n case \"enum\":\n if (typeof value !== \"string\") throw fail(\"text\");\n return value;\n case \"integer\":\n case \"number\": {\n const number =\n typeof value === \"number\"\n ? value\n : typeof value === \"string\" && NUMBER.test(value.trim())\n ? Number(value.trim())\n : Number.NaN;\n if (!Number.isFinite(number)) throw fail(\"a number\");\n if (kind === \"integer\" && !Number.isInteger(number)) {\n throw fail(\"an integer\");\n }\n return number;\n }\n case \"boolean\":\n if (typeof value === \"boolean\") return value;\n if (value === \"true\" || value === \"false\") return value === \"true\";\n throw fail(\"true or false\");\n case \"object\":\n if (!isRecord(value)) throw fail(\"an object\");\n return value;\n case \"json\":\n return value;\n case \"unsupported\":\n throw new Error(\n `input \"${field.name}\" has type ${field.type.name}, which this piece cannot map`,\n );\n }\n}\n\n// Unset fields are left out; a value of the wrong shape is an error naming\n// the field, never a guess at what was meant.\nexport function coerceInput(\n schema: ActionInputSchema,\n raw: unknown,\n): Record<string, unknown> {\n const values = raw ?? {};\n if (!isRecord(values)) {\n throw new Error(`\"input\" must be an object; got ${preview(values)}`);\n }\n const input: Record<string, unknown> = {};\n for (const field of schema.root) {\n const value = values[field.name];\n if (value === undefined || value === null || value === \"\") continue;\n input[field.name] = coerceField(\n field,\n fieldKind(field.type, schema),\n value,\n );\n }\n return input;\n}\n","// Config parsing shared by the document actions. \"exact\" takes an id or JSON as\n// given; \"extract\" digs them out of model output and says what it read from.\n\nexport interface ActionInputConfig {\n type: string;\n input?: unknown;\n scope?: string;\n}\n\nexport interface DispatchPayload {\n // Present when the payload object named its own target document.\n documentId?: string;\n actions: ActionInputConfig[];\n}\n\nexport interface CreatePayload {\n documentType?: string;\n name?: string;\n actions?: unknown;\n}\n\nexport type ParseMode = \"exact\" | \"extract\";\n\nexport const PARSE_MODES: { label: string; value: ParseMode }[] = [\n { label: \"Exact\", value: \"exact\" },\n { label: \"Extract from AI output\", value: \"extract\" },\n];\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction preview(value: unknown): string {\n const text = typeof value === \"string\" ? value : JSON.stringify(value);\n return text.length > 60 ? `${text.slice(0, 57)}...` : text;\n}\n\nfunction unfence(text: string): string {\n return text\n .trim()\n .replace(/^```(?:json)?\\s*/i, \"\")\n .replace(/```$/, \"\")\n .trim();\n}\n\n// Every top-level {...} or [...] in a string, in order; scanned so a brace\n// inside a string literal is not read as one.\nfunction jsonSpans(text: string): string[] {\n const spans: string[] = [];\n let depth = 0;\n let start = -1;\n let inString = false;\n let escaped = false;\n for (let index = 0; index < text.length; index++) {\n const character = text[index];\n if (inString) {\n if (escaped) escaped = false;\n else if (character === \"\\\\\") escaped = true;\n else if (character === '\"') inString = false;\n continue;\n }\n if (character === '\"') {\n inString = true;\n continue;\n }\n if (character === \"{\" || character === \"[\") {\n if (depth === 0) start = index;\n depth++;\n continue;\n }\n if (character === \"}\" || character === \"]\") {\n if (depth === 0) continue;\n depth--;\n if (depth === 0 && start >= 0) {\n spans.push(text.slice(start, index + 1));\n start = -1;\n }\n }\n }\n return spans;\n}\n\n// JSON out of model prose: fenced, or the LAST top-level value, since models\n// deliberate first and answer last.\nexport function parseModelJson(text: string): unknown {\n const cleaned = unfence(text);\n try {\n return JSON.parse(cleaned);\n } catch {\n // Not JSON on its own; look for JSON inside it.\n }\n const spans = jsonSpans(cleaned);\n for (let index = spans.length - 1; index >= 0; index--) {\n try {\n return JSON.parse(spans[index]);\n } catch {\n // A span that does not parse is prose that happened to hold a brace.\n }\n }\n throw new SyntaxError(\"no JSON value found\");\n}\n\nconst UUID = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i;\n\n// The first uuid in the text, else the text without quotes.\nfunction extractDocumentId(text: string): string | undefined {\n const uuid = UUID.exec(text);\n if (uuid) return uuid[0];\n return (\n text\n .trim()\n .replace(/^[\"'`]+|[\"'`]+$/g, \"\")\n .trim() || undefined\n );\n}\n\nconst EXTRACT_HINT =\n 'set \"Parse\" to \"Extract from AI output\" to read one out of text';\n\n// Reads config values in one mode, recording what \"extract\" read from.\nexport class ConfigReader {\n readonly extractedFrom: Record<string, string> = {};\n\n constructor(\n readonly block: string,\n readonly mode: ParseMode,\n ) {}\n\n static of(block: string, value: unknown): ConfigReader {\n if (value === undefined || value === null || value === \"\") {\n return new ConfigReader(block, \"exact\");\n }\n if (value !== \"exact\" && value !== \"extract\") {\n throw new Error(`${block}: \"parse\" must be \"exact\" or \"extract\"`);\n }\n return new ConfigReader(block, value);\n }\n\n get extract(): boolean {\n return this.mode === \"extract\";\n }\n\n // Undefined when unset.\n documentId(value: unknown, field: string): string | undefined {\n if (value === undefined || value === null || value === \"\") return undefined;\n if (typeof value !== \"string\") {\n throw new Error(\n `${this.block}: \"${field}\" must be a document id; got ${preview(value)}`,\n );\n }\n if (this.extract) {\n const id = extractDocumentId(value);\n if (id !== undefined && id !== value) this.extractedFrom[field] = value;\n return id;\n }\n if (!/^[^\\s\"'`]+$/.test(value)) {\n throw new Error(\n `${this.block}: \"${field}\" is not a document id: ${preview(value)}; ${EXTRACT_HINT}`,\n );\n }\n return value;\n }\n\n // JSON text as a value; anything not text is already one.\n json(value: unknown, field: string): unknown {\n if (typeof value !== \"string\") return value;\n try {\n return JSON.parse(value);\n } catch (error) {\n if (!this.extract) {\n const reason = error instanceof Error ? error.message : String(error);\n throw new Error(\n `${this.block}: \"${field}\" is not valid JSON (${reason}); ${EXTRACT_HINT}`,\n { cause: error },\n );\n }\n }\n try {\n const parsed = parseModelJson(value);\n this.extractedFrom[field] = value;\n return parsed;\n } catch {\n throw new Error(`${this.block}: \"${field}\" holds no JSON value`);\n }\n }\n\n // The output's `extractedFrom`, present only when something was extracted.\n output(): { extractedFrom?: Record<string, string> } {\n return Object.keys(this.extractedFrom).length\n ? { extractedFrom: this.extractedFrom }\n : {};\n }\n}\n\nfunction actionEntries(\n list: unknown[],\n reader: ConfigReader,\n field: string,\n): ActionInputConfig[] {\n return list.map((entry, index) => {\n if (!isRecord(entry) || typeof entry.type !== \"string\") {\n throw new Error(\n `${reader.block}: ${field}[${index}] needs a string \"type\"`,\n );\n }\n if (entry.scope !== undefined && typeof entry.scope !== \"string\") {\n throw new Error(\n `${reader.block}: ${field}[${index}].scope must be a string`,\n );\n }\n return {\n type: entry.type,\n input: entry.input,\n scope: entry.scope,\n };\n });\n}\n\n// A list of actions, or {documentId?, actions: [...]}; \"extract\" also reads a\n// lone action object as a list of one.\nexport function parseDispatchPayload(\n raw: unknown,\n reader: ConfigReader,\n field = \"actions\",\n): DispatchPayload {\n if (raw === undefined || raw === null || raw === \"\") return { actions: [] };\n const value = reader.json(raw, field);\n if (Array.isArray(value)) {\n return { actions: actionEntries(value, reader, field) };\n }\n if (isRecord(value)) {\n if (Array.isArray(value.actions)) {\n return {\n documentId: reader.documentId(value.documentId, `${field}.documentId`),\n actions: actionEntries(value.actions, reader, field),\n };\n }\n if (reader.extract && typeof value.type === \"string\") {\n return { actions: actionEntries([value], reader, field) };\n }\n }\n throw new Error(\n `${reader.block}: \"${field}\" must be a list of actions or an object with an \"actions\" list; got ${preview(value)}`,\n );\n}\n\nexport function parseActions(\n raw: unknown,\n reader: ConfigReader,\n field = \"actions\",\n): ActionInputConfig[] {\n return parseDispatchPayload(raw, reader, field).actions;\n}\n\n// {documentType?, name?, actions?} as an object or JSON text.\nexport function parseCreatePayload(\n raw: unknown,\n reader: ConfigReader,\n): CreatePayload {\n if (raw === undefined || raw === null || raw === \"\") return {};\n const value = reader.json(raw, \"payload\");\n if (!isRecord(value)) {\n throw new Error(\n `${reader.block}: \"payload\" must be an object; got ${preview(value)}`,\n );\n }\n for (const key of [\"documentType\", \"name\"] as const) {\n if (value[key] !== undefined && typeof value[key] !== \"string\") {\n throw new Error(`${reader.block}: \"payload.${key}\" must be a string`);\n }\n }\n return {\n documentType: value.documentType as string | undefined,\n name: value.name as string | undefined,\n actions: value.actions,\n };\n}\n\n// An action's input: an object, or JSON text of one.\nexport function parseActionInput(\n raw: unknown,\n reader: ConfigReader,\n): Record<string, unknown> {\n if (raw === undefined || raw === null || raw === \"\") return {};\n const value = reader.json(raw, \"input\");\n if (!isRecord(value)) {\n throw new Error(\n `${reader.block}: \"input\" must be an object; got ${preview(value)}`,\n );\n }\n return value;\n}\n\n// Whitelist for the dispatch action: a comma-separated string, a list of\n// names, or a document-schema actions array.\nexport function allowedActionTypes(value: unknown): string[] {\n const raw = typeof value === \"string\" ? value.split(\",\") : value;\n if (!Array.isArray(raw)) return [];\n return raw\n .map((entry) => {\n if (typeof entry === \"string\") return entry;\n const record = entry as { type?: unknown } | null;\n return typeof record?.type === \"string\" ? record.type : \"\";\n })\n .map((entry) => entry.trim())\n .filter(Boolean);\n}\n\n// A design-time value that can actually be resolved: an expression cannot.\nexport function staticString(value: unknown): string | undefined {\n if (typeof value !== \"string\") return undefined;\n const trimmed = value.trim();\n if (!trimmed || trimmed.includes(\"{{\")) return undefined;\n return trimmed;\n}\n","// Pure helpers over what the reactor reports: a drive's folders, and the SDL\n// an action's input needs to be read on its own.\n\ninterface DriveNode {\n id: string;\n name?: string;\n kind?: string;\n parentFolder?: string | null;\n}\n\nexport interface FolderOption {\n label: string;\n value: string;\n}\n\nfunction driveNodes(state: unknown): DriveNode[] {\n const nodes = (state as { nodes?: unknown } | null)?.nodes;\n if (!Array.isArray(nodes)) return [];\n return nodes.filter(\n (node): node is DriveNode =>\n typeof node === \"object\" &&\n node !== null &&\n typeof (node as DriveNode).id === \"string\",\n );\n}\n\n// Every folder in a drive, labelled by its path so two \"2026\" folders under\n// different parents stay apart.\nexport function folderOptions(driveState: unknown): FolderOption[] {\n const folders = driveNodes(driveState).filter(\n (node) => node.kind === \"folder\",\n );\n const byId = new Map(folders.map((folder) => [folder.id, folder]));\n const pathOf = (folder: DriveNode): string => {\n const names: string[] = [];\n const seen = new Set<string>();\n let current: DriveNode | undefined = folder;\n // A cycle in corrupt state must not hang the options call.\n while (current && !seen.has(current.id)) {\n seen.add(current.id);\n names.unshift(current.name || \"(unnamed)\");\n current = current.parentFolder\n ? byId.get(current.parentFolder)\n : undefined;\n }\n return names.join(\" / \");\n };\n return folders\n .map((folder) => ({ label: pathOf(folder), value: folder.id }))\n .sort((a, b) => a.label.localeCompare(b.label));\n}\n\nconst DEFINITION = /\\b(?:input|enum|type)\\s+(\\w+)/g;\nconst SCALARS = new Set([\"String\", \"Int\", \"Float\", \"Boolean\", \"ID\"]);\n\nfunction blockOf(sdl: string, keyword: string, name: string): string | null {\n return (\n new RegExp(`${keyword}\\\\s+${name}\\\\s*\\\\{[^}]*\\\\}`).exec(sdl)?.[0] ?? null\n );\n}\n\n// An operation's SDL defines its input types but not the enums they use, which\n// live in the state schema; this appends the referenced ones.\nexport function withReferencedEnums(\n inputSchema: string,\n stateSchema: string | null | undefined,\n): string {\n if (!stateSchema) return inputSchema;\n const defined = new Set(\n [...inputSchema.matchAll(DEFINITION)].map((match) => match[1]),\n );\n const referenced = new Set(\n [...inputSchema.matchAll(/:\\s*\\[?\\s*(\\w+)/g)]\n .map((match) => match[1])\n .filter((name) => !defined.has(name) && !SCALARS.has(name)),\n );\n const enums = [...referenced]\n .map((name) => blockOf(stateSchema, \"enum\", name))\n .filter((block): block is string => block !== null);\n return enums.length ? `${inputSchema}\\n\\n${enums.join(\"\\n\\n\")}` : inputSchema;\n}\n","// Reaching the reactor from piece code, and the props whose choices come\n// from it.\n\n// `ctx.reactor` is served by the host over the worker's call channel and only\n// to a piece an installed reactor package ships. Absent, reactorOf throws by\n// name, so a piece that ends up somewhere else fails legibly.\nimport {\n Property,\n reactorOf,\n type ReactorService,\n} from \"@powerhousedao/pieces-framework\";\nimport { PARSE_MODES, staticString, type ParseMode } from \"./parse.js\";\nimport { inputProps } from \"./input-props.js\";\nimport {\n parseActionInputSchema,\n type ActionInputSchema,\n} from \"./input-schema.js\";\nimport { folderOptions, withReferencedEnums } from \"./schema-text.js\";\n\nconst DRIVE_DOCUMENT_TYPE = \"powerhouse/document-drive\";\n\ninterface OptionEntry {\n label: string;\n value: string;\n // actionType only: the input's SDL and the model it belongs to, which the\n // editor's action list builds a form from and validates against.\n inputSchema?: string;\n documentType?: string;\n}\n\ninterface OptionState {\n options: OptionEntry[];\n placeholder?: string;\n}\n\nconst SET_NAME: OptionEntry = {\n label: \"SET_NAME (base)\",\n value: \"SET_NAME\",\n inputSchema: \"input SetNameInput {\\n name: String!\\n}\",\n};\n\nasync function documentOptions(\n reactor: ReactorService,\n documentType: string | undefined,\n): Promise<OptionState> {\n const documents = await reactor.find(documentType ? { documentType } : {});\n const nameOf = (document: (typeof documents)[number]) =>\n document.name || document.slug || \"(unnamed)\";\n const seen = new Map<string, number>();\n for (const document of documents) {\n seen.set(nameOf(document), (seen.get(nameOf(document)) ?? 0) + 1);\n }\n return {\n options: documents.map((document) => {\n const name = nameOf(document);\n // Two documents of one name are told apart by slug, else a short id.\n const shown =\n (seen.get(name) ?? 0) > 1\n ? `${name} (${document.slug && document.slug !== name ? document.slug : document.documentId.slice(0, 8)})`\n : name;\n // The type is noise when every option shares it.\n return {\n label: documentType ? shown : `${shown} — ${document.documentType}`,\n value: document.documentId,\n };\n }),\n placeholder:\n documentType === DRIVE_DOCUMENT_TYPE\n ? \"Choose a drive\"\n : documentType\n ? `Documents of type ${documentType}`\n : \"All documents on this reactor\",\n };\n}\n\n// The installed document models. Free text stays possible in this editor,\n// which is what an expression-fed step needs.\nexport const documentTypeProp = (\n displayName = \"Document type\",\n required = false,\n description?: string,\n) =>\n Property.Dropdown<string>({\n auth: undefined,\n displayName,\n description,\n required,\n refreshers: [],\n options: async (_propsValue, ctx) => {\n const models = await reactorOf(ctx).models();\n return {\n options: models\n .map((model) => ({\n label: model.name\n ? `${model.name} (${model.documentType})`\n : model.documentType,\n value: model.documentType,\n }))\n .sort((a, b) => a.value.localeCompare(b.value)),\n };\n },\n });\n\nexport const documentIdProp = (\n displayName = \"Document id\",\n required = false,\n description?: string,\n) =>\n Property.Dropdown<string>({\n auth: undefined,\n displayName,\n description,\n required,\n // Narrowed by the sibling type when one is set, which is why it refreshes.\n refreshers: [\"documentType\"],\n options: (propsValue, ctx) =>\n documentOptions(reactorOf(ctx), staticString(propsValue.documentType)),\n });\n\nexport const driveProp = (displayName: string, description?: string) =>\n Property.Dropdown<string>({\n auth: undefined,\n displayName,\n description,\n required: false,\n refreshers: [],\n options: (_propsValue, ctx) =>\n documentOptions(reactorOf(ctx), DRIVE_DOCUMENT_TYPE),\n });\n\n// A folder inside the drive the `driveProp` sibling names, labelled by path;\n// the step files the document there instead of at the drive's root.\nexport const folderProp = (\n displayName: string,\n driveProp: string,\n description?: string,\n) =>\n Property.Dropdown<string>({\n auth: undefined,\n displayName,\n description,\n required: false,\n refreshers: [driveProp],\n options: async (propsValue, ctx) => {\n const driveId = staticString(propsValue[driveProp]);\n if (!driveId) {\n return {\n disabled: true,\n options: [],\n placeholder: \"Pick a drive first\",\n };\n }\n const drive = await reactorOf(ctx).get({ documentId: driveId });\n const options = folderOptions(drive.state);\n return {\n options,\n placeholder: options.length\n ? `Folders in ${drive.name || \"this drive\"}`\n : `${drive.name || \"This drive\"} has no folders`,\n };\n },\n });\n\n// JSON text of [{type, input, scope?}]: text, so model output reaches the\n// piece's own parsing. Advanced: the single action is the form.\n// `display: \"code\"` asks the editor for a monospace field; upstream has no such hint.\nexport const actionsProp = (displayName: string, description?: string) => ({\n ...Property.LongText({\n displayName,\n required: false,\n description,\n advanced: true,\n }),\n display: \"code\",\n});\n\n// How ids and JSON are read: as given, or dug out of model output.\nexport const parseProp = () =>\n Property.StaticDropdown<ParseMode>({\n displayName: \"Parse\",\n description:\n \"Exact takes ids and JSON as given. Extract reads them out of an AI step's prose, and reports what it read from in extractedFrom\",\n required: false,\n defaultValue: \"exact\",\n advanced: true,\n options: { options: PARSE_MODES },\n });\n\n// The target type's own actions, each carrying its input SDL, plus the base\n// actions every document accepts.\nexport const actionTypeProp = (\n displayName = \"Action type\",\n required = false,\n description?: string,\n) =>\n Property.Dropdown<string>({\n auth: undefined,\n displayName,\n description,\n required,\n refreshers: [\"documentType\", \"documentId\"],\n options: async (propsValue, ctx) => {\n const reactor = reactorOf(ctx);\n let documentType = staticString(propsValue.documentType);\n if (!documentType) {\n // A resolvable id names its own type, which is what a step that only\n // knows the document has to offer.\n const documentId = staticString(propsValue.documentId);\n if (documentId) {\n documentType = (await reactor.get({ documentId })).documentType;\n }\n }\n if (!documentType) {\n return {\n disabled: true,\n options: [SET_NAME],\n placeholder: \"Pick a document type first\",\n };\n }\n const model = await reactor.model(documentType);\n return {\n options: [\n ...model.actions.map((action) => ({\n label: `${action.type} (${action.module})`,\n value: action.type,\n documentType,\n ...(action.inputSchema\n ? {\n inputSchema: withReferencedEnums(\n action.inputSchema,\n model.stateSchema,\n ),\n }\n : {}),\n })),\n ],\n placeholder: `Actions of ${documentType}`,\n };\n },\n });\n\n// The model a step targets: named, or read off the document it names.\nasync function targetType(\n reactor: ReactorService,\n propsValue: Record<string, unknown>,\n): Promise<string | undefined> {\n const named = staticString(propsValue.documentType);\n if (named) return named;\n const documentId = staticString(propsValue.documentId);\n return documentId\n ? (await reactor.get({ documentId })).documentType\n : undefined;\n}\n\n// The chosen action's input schema, with the enums it uses; undefined when the\n// step doesn't yet say which model and action.\nexport async function actionInputSchema(\n reactor: ReactorService,\n propsValue: Record<string, unknown>,\n): Promise<ActionInputSchema | undefined> {\n const actionType = staticString(propsValue.actionType);\n if (!actionType) return undefined;\n const documentType = await targetType(reactor, propsValue);\n if (!documentType) return undefined;\n const model = await reactor.model(documentType);\n const action = model.actions.find((entry) => entry.type === actionType);\n if (!action?.inputSchema) return undefined;\n return (\n parseActionInputSchema(\n withReferencedEnums(action.inputSchema, model.stateSchema),\n actionType,\n ) ?? undefined\n );\n}\n\n// One field per input field of the chosen action, rebuilt when it changes.\nexport const actionInputProp = (displayName = \"Input\") =>\n Property.DynamicProperties({\n auth: undefined,\n displayName,\n required: false,\n refreshers: [\"documentType\", \"documentId\", \"actionType\"],\n props: async (propsValue, ctx) => {\n const schema = await actionInputSchema(\n reactorOf(ctx),\n propsValue as Record<string, unknown>,\n );\n return schema ? inputProps(schema) : {};\n },\n });\n\n// The action and its input, in one card: they only make sense together.\nexport const ACTION_GROUP = (when: string) => ({\n key: \"action\",\n display: \"section\" as const,\n label: \"Action\",\n description: `${when} Pick a type, then fill in its input: the action needs both.`,\n props: [\"actionType\", \"input\"],\n});\n","import {\n createAction,\n Property,\n reactorOf,\n} from \"@powerhousedao/pieces-framework\";\nimport { coerceInput } from \"../input-props.js\";\nimport {\n ConfigReader,\n parseActionInput,\n parseActions,\n parseCreatePayload,\n} from \"../parse.js\";\nimport {\n ACTION_GROUP,\n actionInputProp,\n actionInputSchema,\n actionsProp,\n actionTypeProp,\n documentTypeProp,\n driveProp,\n folderProp,\n parseProp,\n} from \"../reactor.js\";\n\nconst BLOCK = \"document-create\";\n\nexport const documentCreateAction = createAction({\n name: BLOCK,\n displayName: \"Create document\",\n description: \"Creates a Powerhouse document.\",\n requireAuth: false,\n propertyGroups: [ACTION_GROUP(\"Optional, sent right after the create.\")],\n props: {\n documentType: documentTypeProp(),\n name: Property.ShortText({ displayName: \"Document name\", required: false }),\n parentId: driveProp(\"Parent drive\"),\n folderId: folderProp(\"Folder\", \"parentId\", \"Omit for the drive's root\"),\n actionType: actionTypeProp(\"Type\", false),\n input: actionInputProp(\"Input\"),\n actions: actionsProp(\n \"Action list (JSON)\",\n 'Several actions after the create, or a payload from an earlier step: [{ \"type\": …, \"input\": … }]',\n ),\n payload: Property.ShortText({\n displayName: \"Payload\",\n description:\n \"JSON {documentType, name, actions?}, e.g. {{steps.draft.output}}\",\n required: false,\n advanced: true,\n }),\n parse: parseProp(),\n },\n run: async (ctx) => {\n const reactor = reactorOf(ctx);\n const config = ctx.propsValue;\n const reader = ConfigReader.of(BLOCK, config.parse);\n // A payload (typically model output) can name the type and the document.\n const payload = parseCreatePayload(config.payload, reader);\n const documentType =\n (typeof config.documentType === \"string\" && config.documentType) ||\n payload.documentType;\n if (!documentType) {\n throw new Error(\n `${BLOCK}: \"documentType\" is required, in the config or the payload`,\n );\n }\n const name =\n (typeof config.name === \"string\" && config.name) || payload.name;\n const created = await reactor.create({\n documentType,\n ...(name ? { name } : {}),\n // The host files into a folder by its id alone, finding its drive.\n ...(config.folderId || config.parentId\n ? { parentId: config.folderId || config.parentId }\n : {}),\n });\n\n // The name travelled with the create; only the author's own actions are\n // left to dispatch.\n const followUps =\n config.actions !== undefined\n ? parseActions(config.actions, reader)\n : parseActions(payload.actions, reader, \"payload.actions\");\n const actionType =\n typeof config.actionType === \"string\" ? config.actionType.trim() : \"\";\n if (actionType) {\n const schema = await actionInputSchema(reactor, {\n documentType,\n actionType,\n });\n const input = parseActionInput(config.input, reader);\n followUps.unshift({\n type: actionType,\n input: schema ? coerceInput(schema, input) : input,\n scope: undefined,\n });\n }\n const document = followUps.length\n ? await reactor.execute({\n documentId: created.documentId,\n actions: followUps,\n })\n : created;\n\n return {\n documentId: document.documentId,\n documentType: document.documentType,\n name: document.name,\n state: document.state,\n ...reader.output(),\n };\n },\n});\n","import {\n createAction,\n Property,\n reactorOf,\n} from \"@powerhousedao/pieces-framework\";\nimport {\n allowedActionTypes,\n ConfigReader,\n parseActionInput,\n parseDispatchPayload,\n} from \"../parse.js\";\nimport { coerceInput } from \"../input-props.js\";\nimport {\n ACTION_GROUP,\n actionInputProp,\n actionInputSchema,\n actionsProp,\n actionTypeProp,\n documentIdProp,\n documentTypeProp,\n parseProp,\n} from \"../reactor.js\";\n\nconst BLOCK = \"document-dispatch\";\n\nexport const documentDispatchAction = createAction({\n name: BLOCK,\n displayName: \"Dispatch actions\",\n description: \"Sends actions to a document.\",\n requireAuth: false,\n propertyGroups: [ACTION_GROUP(\"Sent to the document.\")],\n props: {\n documentId: documentIdProp(\n \"Document id\",\n true,\n \"e.g. {{steps.create.output.documentId}}\",\n ),\n documentType: documentTypeProp(\n \"Document type\",\n false,\n \"Design-time hint when the document id is an expression\",\n ),\n actionType: actionTypeProp(\"Type\", false),\n input: actionInputProp(\"Input\"),\n actions: actionsProp(\n \"Action list (JSON)\",\n 'Several actions at once, or a payload from an earlier step: [{ \"type\": …, \"input\": … }]',\n ),\n allowedActions: Property.ShortText({\n displayName: \"Allowed action types\",\n description: \"Comma-separated whitelist; enforced when set\",\n required: false,\n advanced: true,\n }),\n branch: Property.ShortText({\n displayName: \"Branch\",\n description: 'Defaults to \"main\"',\n required: false,\n advanced: true,\n }),\n parse: parseProp(),\n },\n run: async (ctx) => {\n const config = ctx.propsValue;\n const reader = ConfigReader.of(BLOCK, config.parse);\n const payload = parseDispatchPayload(config.actions, reader);\n const documentId =\n reader.documentId(config.documentId, \"documentId\") ?? payload.documentId;\n if (!documentId) {\n throw new Error(\n `${BLOCK}: \"documentId\" is required, in the config or the actions payload`,\n );\n }\n // The picked action goes first, its input typed by the model's schema.\n const actionType =\n typeof config.actionType === \"string\" ? config.actionType.trim() : \"\";\n if (actionType) {\n const schema = await actionInputSchema(reactorOf(ctx), {\n ...config,\n documentId,\n });\n const input = parseActionInput(config.input, reader);\n payload.actions.unshift({\n type: actionType,\n input: schema ? coerceInput(schema, input) : input,\n scope: undefined,\n });\n }\n // Enforced, not merely suggested: the payload may come from an LLM.\n const allowed = allowedActionTypes(config.allowedActions);\n const rejected = allowed.length\n ? payload.actions.filter((entry) => !allowed.includes(entry.type))\n : [];\n if (rejected.length > 0) {\n throw new Error(\n `${BLOCK}: action(s) not allowed here: ${[\n ...new Set(rejected.map((entry) => entry.type)),\n ].join(\", \")}`,\n );\n }\n if (payload.actions.length === 0) {\n throw new Error(\n `${BLOCK}: choose an Action, or give a non-empty \"Action list (JSON)\"`,\n );\n }\n const document = await reactorOf(ctx).execute({\n documentId,\n ...(config.branch ? { branch: config.branch } : {}),\n actions: payload.actions,\n });\n return {\n documentId: document.documentId,\n documentType: document.documentType,\n name: document.name,\n state: document.state,\n ...reader.output(),\n };\n },\n});\n","import {\n createAction,\n Property,\n reactorOf,\n} from \"@powerhousedao/pieces-framework\";\nimport { documentTypeProp, driveProp } from \"../reactor.js\";\n\nconst DEFAULT_LIMIT = 25;\nconst MAX_LIMIT = 100;\n\nexport const documentFindAction = createAction({\n name: \"document-find\",\n displayName: \"Find documents\",\n description: \"Lists documents by type and name.\",\n requireAuth: false,\n props: {\n documentType: documentTypeProp(\"Document type\", false, \"Omit for any type\"),\n parentId: driveProp(\"In drive\", \"Omit for the whole reactor\"),\n name: Property.ShortText({\n displayName: \"Name contains\",\n description: \"Case-insensitive match\",\n required: false,\n }),\n matchPath: Property.ShortText({\n displayName: \"State field\",\n description:\n 'Dotted path into the document\\'s state, e.g. \"orderId\" or \"settlement.status\". With a value below, only documents holding it are returned.',\n required: false,\n }),\n matchValue: Property.ShortText({\n displayName: \"State value\",\n description:\n \"Compared as text, e.g. {{trigger.payload.orderId}}. Documents missing the field never match.\",\n required: false,\n }),\n includeState: Property.Checkbox({\n displayName: \"Include state\",\n description:\n \"Returns each document's state as well as its id and name. Off by default: a page of documents carries a page of states.\",\n required: false,\n defaultValue: false,\n }),\n limit: Property.Number({\n displayName: \"Max results\",\n description: `Defaults to ${DEFAULT_LIMIT}`,\n required: false,\n }),\n },\n run: async (ctx) => {\n const {\n documentType,\n parentId,\n name,\n limit,\n matchPath,\n matchValue,\n includeState,\n } = ctx.propsValue;\n const capped = Math.min(\n Math.max(typeof limit === \"number\" ? limit : DEFAULT_LIMIT, 1),\n MAX_LIMIT,\n );\n // A state match names a field but not its value, or the other way round:\n // that is an unfinished step, and answering it as \"no filter\" would return\n // every document of the type to something that asked for one.\n const path = typeof matchPath === \"string\" ? matchPath.trim() : \"\";\n const wanted = typeof matchValue === \"string\" ? matchValue.trim() : \"\";\n if ((path === \"\") !== (wanted === \"\")) {\n throw new Error(\n 'document-find: \"State field\" and \"State value\" are set together or not at all',\n );\n }\n // Neither the name nor the state filter is an index query, so either one\n // has to see more rows than the step will keep; without one, ask for\n // exactly the page wanted rather than a default page per model.\n const needle = typeof name === \"string\" ? name.trim().toLowerCase() : \"\";\n const filtered = needle !== \"\" || path !== \"\";\n const found = await reactorOf(ctx).find({\n ...(documentType ? { documentType } : {}),\n ...(parentId ? { parentId } : {}),\n ...(filtered ? {} : { limit: capped }),\n ...(path ? { match: { path, value: wanted } } : {}),\n ...(includeState === true ? { withState: true } : {}),\n });\n const documents = found\n .filter(\n (document) => !needle || document.name.toLowerCase().includes(needle),\n )\n .slice(0, capped);\n return { count: documents.length, documents };\n },\n});\n","import { createAction, reactorOf } from \"@powerhousedao/pieces-framework\";\nimport { ConfigReader } from \"../parse.js\";\nimport { documentIdProp, documentTypeProp, parseProp } from \"../reactor.js\";\n\nconst BLOCK = \"document-get\";\n\nexport const documentGetAction = createAction({\n name: BLOCK,\n displayName: \"Get document\",\n description: \"Reads a document's current state.\",\n requireAuth: false,\n props: {\n documentId: documentIdProp(\n \"Document id\",\n true,\n \"e.g. {{steps.find.output.documents.0.documentId}}\",\n ),\n documentType: documentTypeProp(\n \"Document type\",\n false,\n \"Design-time hint when the document id is an expression\",\n ),\n parse: parseProp(),\n },\n run: async (ctx) => {\n const reader = ConfigReader.of(BLOCK, ctx.propsValue.parse);\n const documentId = reader.documentId(\n ctx.propsValue.documentId,\n \"documentId\",\n );\n if (!documentId) {\n throw new Error(`${BLOCK}: \"documentId\" is required`);\n }\n return {\n ...(await reactorOf(ctx).get({ documentId })),\n ...reader.output(),\n };\n },\n});\n","import { createAction, reactorOf } from \"@powerhousedao/pieces-framework\";\nimport { ConfigReader } from \"../parse.js\";\nimport {\n actionTypeProp,\n documentIdProp,\n documentTypeProp,\n parseProp,\n} from \"../reactor.js\";\n\nconst BLOCK = \"document-schema\";\n\nexport const documentSchemaAction = createAction({\n name: BLOCK,\n displayName: \"Get document schema\",\n description: \"Action and state schemas of a document type.\",\n requireAuth: false,\n props: {\n documentType: documentTypeProp(\n \"Document type\",\n false,\n \"Required unless a document id is given\",\n ),\n documentId: documentIdProp(\n \"Document id\",\n false,\n \"Resolves the type from this document instead\",\n ),\n actionType: actionTypeProp(\n \"Only this action\",\n false,\n \"Omit to list every action\",\n ),\n parse: parseProp(),\n },\n run: async (ctx) => {\n const reactor = reactorOf(ctx);\n const { actionType } = ctx.propsValue;\n const reader = ConfigReader.of(BLOCK, ctx.propsValue.parse);\n let documentType =\n typeof ctx.propsValue.documentType === \"string\"\n ? ctx.propsValue.documentType\n : \"\";\n // A document id is accepted in place of a type, for expression-fed steps.\n const fromId = documentType\n ? undefined\n : reader.documentId(ctx.propsValue.documentId, \"documentId\");\n if (fromId) {\n documentType = (await reactor.get({ documentId: fromId })).documentType;\n }\n if (!documentType) {\n throw new Error(`${BLOCK}: \"documentType\" is required`);\n }\n const model = await reactor.model(documentType);\n return {\n documentType: model.documentType,\n name: model.name,\n stateSchema: model.stateSchema,\n actions: actionType\n ? model.actions.filter((action) => action.type === actionType)\n : model.actions,\n ...reader.output(),\n };\n },\n});\n","import { createAction, reactorOf } from \"@powerhousedao/pieces-framework\";\n\nexport const documentTypesAction = createAction({\n name: \"document-types\",\n displayName: \"List document types\",\n description: \"Document models installed on this reactor.\",\n requireAuth: false,\n props: {},\n run: async (ctx) => {\n const types = await reactorOf(ctx).models();\n return { count: types.length, types };\n },\n});\n","// The three document triggers the reactor feeds.\n\n// Their hooks are never called: matching an operation against a filter is the\n// host's, because the processor sees every operation in the reactor and an IPC\n// round trip per operation would sit on that path. The piece declares them so\n// the editor reads their props and payload shape from the same place it reads\n// every other block's.\nimport {\n createTrigger,\n TriggerStrategy,\n} from \"@powerhousedao/pieces-framework\";\nimport {\n actionTypeProp,\n documentIdProp,\n documentTypeProp,\n driveProp,\n} from \"../reactor.js\";\n\n// A hook that runs would mean the host stopped feeding this trigger, which is\n// a bug in the host rather than something a piece can answer.\nfunction hostFed(name: string): () => Promise<never> {\n return () =>\n Promise.reject(\n new Error(`The \"${name}\" trigger is fired by the reactor, not polled`),\n );\n}\n\nconst OPERATION_SAMPLE = {\n documentId: \"01234567-89ab-cdef-0123-456789abcdef\",\n documentType: \"powerhouse/workflow\",\n branch: \"main\",\n scope: \"global\",\n action: { type: \"SET_NAME\", input: { name: \"Invoice\" } },\n operation: { index: 7, timestampUtcMs: \"1757500000000\" },\n};\n\nconst LIFECYCLE_SAMPLE = {\n documentId: \"01234567-89ab-cdef-0123-456789abcdef\",\n documentType: \"powerhouse/workflow\",\n name: \"Invoice\",\n driveId: \"fedcba98-7654-3210-fedc-ba9876543210\",\n parentId: null,\n operation: { index: 0, timestampUtcMs: \"1757500000000\" },\n};\n\nexport const documentEventTrigger = createTrigger({\n name: \"document-event\",\n displayName: \"Document event\",\n description: \"Fires when a matching document operation lands.\",\n type: TriggerStrategy.POLLING,\n requireAuth: false,\n props: {\n documentType: documentTypeProp(\n \"Document type\",\n false,\n \"e.g. powerhouse/connection\",\n ),\n documentId: documentIdProp(\n \"Document id\",\n false,\n \"Omit to match any document\",\n ),\n actionType: actionTypeProp(\n \"Action type\",\n false,\n \"Omit to match any action\",\n ),\n },\n sampleData: OPERATION_SAMPLE,\n onEnable: hostFed(\"document-event\"),\n onDisable: hostFed(\"document-event\"),\n run: hostFed(\"document-event\"),\n});\n\nexport const documentCreatedTrigger = createTrigger({\n name: \"document-created\",\n displayName: \"Document created\",\n description: \"Fires when a document is added to a drive.\",\n type: TriggerStrategy.POLLING,\n requireAuth: false,\n props: {\n documentType: documentTypeProp(\n \"Document type\",\n false,\n \"Type of the created document; omit to match any\",\n ),\n driveId: driveProp(\n \"Drive\",\n \"Omit to match documents outside every drive too\",\n ),\n },\n sampleData: LIFECYCLE_SAMPLE,\n onEnable: hostFed(\"document-created\"),\n onDisable: hostFed(\"document-created\"),\n run: hostFed(\"document-created\"),\n});\n\nexport const documentDeletedTrigger = createTrigger({\n name: \"document-deleted\",\n displayName: \"Document deleted\",\n description: \"Fires when a document is removed from a drive.\",\n type: TriggerStrategy.POLLING,\n requireAuth: false,\n props: {\n documentType: documentTypeProp(\n \"Document type\",\n false,\n \"Type of the deleted document; omit to match any\",\n ),\n driveId: driveProp(\n \"Drive\",\n \"Omit to match documents outside every drive too\",\n ),\n },\n sampleData: LIFECYCLE_SAMPLE,\n onEnable: hostFed(\"document-deleted\"),\n onDisable: hostFed(\"document-deleted\"),\n run: hostFed(\"document-deleted\"),\n});\n","// The Powerhouse reactor piece: documents and document models as workflow\n// blocks, for the reactor the workflow itself runs in.\n\n// It reaches the reactor through ctx.reactor, which the host serves over the\n// worker's call channel — piece code never holds a reactor client, and a copy\n// of this piece fetched from a registry would find the member throwing.\nimport { createPiece } from \"@powerhousedao/pieces-framework\";\nimport { POWERHOUSE_LOGO } from \"./lib/logo.js\";\nimport { documentCreateAction } from \"./lib/actions/document-create.js\";\nimport { documentDispatchAction } from \"./lib/actions/document-dispatch.js\";\nimport { documentFindAction } from \"./lib/actions/document-find.js\";\nimport { documentGetAction } from \"./lib/actions/document-get.js\";\nimport { documentSchemaAction } from \"./lib/actions/document-schema.js\";\nimport { documentTypesAction } from \"./lib/actions/document-types.js\";\nimport {\n documentCreatedTrigger,\n documentDeletedTrigger,\n documentEventTrigger,\n} from \"./lib/triggers/document-event.js\";\n\nexport const reactor = createPiece({\n displayName: \"Powerhouse Reactor\",\n description:\n \"Read and write Powerhouse documents on the reactor this workflow runs in: create documents, dispatch actions, read state and schemas, and fire on document events.\",\n logoUrl: POWERHOUSE_LOGO,\n authors: [\"powerhouse\"],\n // The reactor is reached through the host, not over a connection.\n auth: undefined,\n actions: [\n documentCreateAction,\n documentDispatchAction,\n documentGetAction,\n documentFindAction,\n documentSchemaAction,\n documentTypesAction,\n ],\n triggers: [\n documentEventTrigger,\n documentCreatedTrigger,\n documentDeletedTrigger,\n ],\n});\n\nexport default reactor;\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,14,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115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CACA,SAAS,SAAS;EACjB,OAAO;GACN,GAAG;GACH,aAAa,KAAK;GAClB,MAAM;EACP;CACD;CACA,SAAS,SAAS;EACjB,OAAO;GACN,GAAG;GACH,aAAa,KAAK;GAClB,MAAM;EACP;CACD;CACA,SAAS,SAAS;EACjB,OAAO;GACN,GAAG;GACH,aAAa,KAAK;GAClB,MAAM;EACP;CACD;CACA,SAAS,SAAS;EACjB,OAAO;GACN,aAAa;GACb,UAAU;GACV,aAAa,QAAQ;GACrB,MAAM;GACN,aAAa,KAAK;GAClB,SAAS,QAAQ,WAAW;EAC7B;CACD;CACA,OAAO,SAAS;EACf,OAAO;GACN,GAAG;GACH,aAAa,KAAK;GAClB,MAAM;EACP;CACD;CACA,KAAK,SAAS;EACb,OAAO;GACN,GAAG;GACH,aAAa,KAAK;GAClB,MAAM;EACP;CACD;CACA,MAAM,SAAS;EACd,OAAO;GACN,GAAG;GACH,aAAa,KAAK;GAClB,MAAM;EACP;CACD;CACA,OAAO,SAAS;EACf,OAAO;GACN,GAAG;GACH,aAAa,KAAK;GAClB,MAAM;EACP;CACD;CACA,SAAS,SAAS;EACjB,OAAO;GACN,GAAG;GACH,aAAa,KAAK;GAClB,MAAM;EACP;CACD;CACA,eAAe,SAAS;EACvB,OAAO;GACN,GAAG;GACH,aAAa,KAAK;GAClB,MAAM;EACP;CACD;CACA,oBAAoB,SAAS;EAC5B,OAAO;GACN,GAAG;GACH,aAAa,KAAK;GAClB,MAAM;EACP;CACD;CACA,kBAAkB,SAAS;EAC1B,OAAO;GACN,GAAG;GACH,aAAa,KAAK;GAClB,MAAM;EACP;CACD;CACA,0BAA0B,SAAS;EAClC,OAAO;GACN,GAAG;GACH,aAAa,KAAK;GAClB,MAAM;EACP;CACD;CACA,SAAS,SAAS;EACjB,OAAO;GACN,GAAG;GACH,aAAa,KAAK;GAClB,MAAM;EACP;CACD;CACA,UAAU,SAAS;EAClB,OAAO;GACN,GAAG;GACH,aAAa,KAAK;GAClB,MAAM;EACP;CAC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ACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;;;;;CCpLA,OAAO,eAAe,SAAS,cAAc,EAC3C,OAAO,KACT,CAAC;CACD,QAAQ,QAAQ,KAAK;CACrB,QAAQ,uBAAuB;CAC/B,QAAQ,aAAa;CACrB,QAAQ,QAAQ;CAChB,QAAQ,kBAAkB;CAE1B,IAAI,aAAA,kBAAA;CAEJ,IAAI,WAAA,gBAAA;CAEJ,IAAI,OAAA,YAAA;CAEJ,IAAI,SAAA,cAAA;CAEJ,MAAM,QAAQ,OAAO,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgF9B,QAAQ,QAAQ;CAEhB,SAAS,MAAM,MAAM,SAAS,cAAc,KAAK,mBAAmB;EAClE,MAAM,gCAAgB,IAAI,IAAI;EAE9B,KAAK,MAAM,QAAQ,OAAO,OAAO,OAAO,IAAI,GAC1C,cAAc,IAAI,MAAM,qBAAqB,SAAS,IAAI,CAAC;EAI7D,IAAI,QAAQ,KAAA;EACZ,IAAI,UAAU,MAAM,QAAQ,IAAI;EAChC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AM,YAAY,QAAQ,YAAY,aAAa;EAEnD,IAAI,CAAC,aAAa,CAAC,WACjB;EAGF,MAAM,CAAC,WAAW,4BAChB,oCACE,SACA,8BACA,SACF;EACF,MAAM,CAAC,WAAW,4BAChB,oCACE,SACA,8BACA,SACF;EAGF,wBACE,SACA,WACA,8BACA,gCACA,uBACA,sBACA,WACA,SACF;EAGA,KAAK,MAAM,2BAA2B,0BACpC,iCACE,SACA,WACA,8BACA,gCACA,uBACA,sBACA,eACA,uBACF;EAIF,KAAK,MAAM,2BAA2B,0BACpC,iCACE,SACA,WACA,8BACA,gCACA,uBACA,sBACA,yBACA,aACF;CAEJ;CAIA,SAAS,qCACP,SACA,8BACA,gCACA,uBACA,sBACA,aACA,eACA,aACA,eACA;EACA,MAAM,YAAY,CAAC;EACnB,MAAM,CAAC,WAAW,kBAAkB,0BAClC,SACA,8BACA,aACA,aACF;EACA,MAAM,CAAC,WAAW,kBAAkB,0BAClC,SACA,8BACA,aACA,aACF;EAEA,wBACE,SACA,WACA,8BACA,gCACA,uBACA,sBACA,WACA,SACF;EAGA,KAAK,MAAM,iBAAiB,gBAC1B,yCACE,SACA,WACA,8BACA,gCACA,uBACA,sBACA,WACA,aACF;EAIF,KAAK,MAAM,iBAAiB,gBAC1B,yCACE,SACA,WACA,8BACA,gCACA,uBACA,sBACA,WACA,aACF;EAKF,KAAK,MAAM,iBAAiB,gBAC1B,KAAK,MAAM,iBAAiB,gBAC1B,iCACE,SACA,WACA,8BACA,gCACA,uBACA,sBACA,eACA,aACF;EAIJ,OAAO;CACT;CAEA,SAAS,uBACP,SACA,WACA,8BACA,gCACA,uBACA,UACA;EAKA,KAAK,MAAM,CAAC,cAAc,WAAW,OAAO,QAAQ,QAAQ,GAI1D,IAAI,OAAO,SAAS,GAClB,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,QAAQ,KACjC,KAAK,IAAI,IAAI,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;GAC1C,MAAM,WAAW,aACf,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