abstra 3.23.8__py3-none-any.whl → 3.23.9__py3-none-any.whl

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 (222) hide show
  1. {abstra-3.23.8.dist-info → abstra-3.23.9.dist-info}/METADATA +1 -1
  2. {abstra-3.23.8.dist-info → abstra-3.23.9.dist-info}/RECORD +168 -165
  3. abstra_internals/entities/forms/template.py +84 -5
  4. abstra_internals/modules_test.py +2 -2
  5. abstra_internals/services/file_watcher.py +17 -14
  6. abstra_internals/utils/file.py +62 -0
  7. abstra_internals/utils/platform.py +5 -0
  8. abstra_statics/dist/assets/AbstraButton.vue_vue_type_script_setup_true_lang.e74c1d9b.js +2 -0
  9. abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.f9d9018b.js +2 -0
  10. abstra_statics/dist/assets/ApiKeys.1d2b9051.js +2 -0
  11. abstra_statics/dist/assets/App.24328bec.js +2 -0
  12. abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.13b52476.js +2 -0
  13. abstra_statics/dist/assets/BaseLayout.e2546be2.js +2 -0
  14. abstra_statics/dist/assets/{Billing.b9f77b65.js → Billing.ed96ff6d.js} +2 -2
  15. abstra_statics/dist/assets/{Breadcrumb.d0cc2c91.js → Breadcrumb.21c760be.js} +2 -2
  16. abstra_statics/dist/assets/{Builds.18e4ba1a.js → Builds.e0882931.js} +2 -2
  17. abstra_statics/dist/assets/{Card.957a87b2.js → Card.714646f7.js} +5 -5
  18. abstra_statics/dist/assets/{CircularLoading.3e4ddd6d.js → CircularLoading.5ac43298.js} +2 -2
  19. abstra_statics/dist/assets/CloseCircleOutlined.04918c3d.js +2 -0
  20. abstra_statics/dist/assets/ConnectorsView.78da900d.js +2 -0
  21. abstra_statics/dist/assets/{ConnectorsView.17764dde.css → ConnectorsView.aeb00ce8.css} +1 -1
  22. abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.d7b17e09.js +2 -0
  23. abstra_statics/dist/assets/ContentLayout.3a69fd49.js +2 -0
  24. abstra_statics/dist/assets/{CrudView.8fb84eac.js → CrudView.77b58a5a.js} +2 -2
  25. abstra_statics/dist/assets/{DocsButton.vue_vue_type_script_setup_true_lang.0555d923.js → DocsButton.vue_vue_type_script_setup_true_lang.836e8f5e.js} +2 -2
  26. abstra_statics/dist/assets/{EditorLogin.02eb6050.js → EditorLogin.4d61e44f.js} +2 -2
  27. abstra_statics/dist/assets/{EditorsView.f0ea00fc.js → EditorsView.08a5cd3a.js} +2 -2
  28. abstra_statics/dist/assets/EnvVars.2f33a113.js +2 -0
  29. abstra_statics/dist/assets/{Error.a81122c4.js → Error.8a6cfa01.js} +2 -2
  30. abstra_statics/dist/assets/ExclamationCircleOutlined.93703670.js +2 -0
  31. abstra_statics/dist/assets/{Files.f23b9c53.js → Files.6d07f9be.js} +2 -2
  32. abstra_statics/dist/assets/Form.c1a08fa6.js +2 -0
  33. abstra_statics/dist/assets/{FormRunner.8bbe841e.js → FormRunner.a00b296a.js} +2 -2
  34. abstra_statics/dist/assets/Home.332f8b44.js +2 -0
  35. abstra_statics/dist/assets/Home.964d824d.js +2 -0
  36. abstra_statics/dist/assets/{Live.5dc821b6.js → Live.ee0e73dd.js} +2 -2
  37. abstra_statics/dist/assets/LoadingContainer.cbb8e068.js +2 -0
  38. abstra_statics/dist/assets/LoadingOutlined.644899c2.js +2 -0
  39. abstra_statics/dist/assets/{Login.c702642b.js → Login.0182140b.js} +2 -2
  40. abstra_statics/dist/assets/Login.ebf77147.js +2 -0
  41. abstra_statics/dist/assets/{Login.vue_vue_type_script_setup_true_lang.a92a80d0.js → Login.vue_vue_type_script_setup_true_lang.721bd893.js} +2 -2
  42. abstra_statics/dist/assets/Logo.c74119c7.js +2 -0
  43. abstra_statics/dist/assets/{Logs.eebc0504.js → Logs.7a458aba.js} +2 -2
  44. abstra_statics/dist/assets/{LogsController.eb1b811d.js → LogsController.e7ad74db.js} +2 -2
  45. abstra_statics/dist/assets/Main.a2c84f7b.js +2 -0
  46. abstra_statics/dist/assets/{MockForm.c3318be9.js → MockForm.50f237ad.js} +2 -2
  47. abstra_statics/dist/assets/Navbar.0cf9e650.js +2 -0
  48. abstra_statics/dist/assets/NewEditor.4519d8ac.js +8 -0
  49. abstra_statics/dist/assets/OidcLoginCallback.073de6bd.js +2 -0
  50. abstra_statics/dist/assets/OidcLogoutCallback.e474320b.js +2 -0
  51. abstra_statics/dist/assets/{OmniChat.de828c54.js → OmniChat.1a6ad90c.js} +4 -4
  52. abstra_statics/dist/assets/{OnboardingView.1c034f0d.js → OnboardingView.c4e859f1.js} +2 -2
  53. abstra_statics/dist/assets/{Organization.855f95a9.js → Organization.432776d6.js} +2 -2
  54. abstra_statics/dist/assets/{Organizations.3db82ab2.js → Organizations.cd6f9f61.js} +2 -2
  55. abstra_statics/dist/assets/{PhArrowCounterClockwise.vue.76c9e146.js → PhArrowCounterClockwise.vue.72ed46a0.js} +2 -2
  56. abstra_statics/dist/assets/{PhArrowSquareOut.vue.ecfa9cb2.js → PhArrowSquareOut.vue.ddb450f1.js} +2 -2
  57. abstra_statics/dist/assets/{PhBookBookmark.vue.f8f803d9.js → PhBookBookmark.vue.4a6ba053.js} +2 -2
  58. abstra_statics/dist/assets/{PhChats.vue.dfda946c.js → PhChats.vue.870bbba9.js} +2 -2
  59. abstra_statics/dist/assets/{PhClockCounterClockwise.vue.cd77fd26.js → PhClockCounterClockwise.vue.123f0e9b.js} +2 -2
  60. abstra_statics/dist/assets/{PhCopy.vue.a63b48dd.js → PhCopy.vue.70df4792.js} +2 -2
  61. abstra_statics/dist/assets/{PhCopySimple.vue.ecffb042.js → PhCopySimple.vue.f5246c24.js} +2 -2
  62. abstra_statics/dist/assets/{PhCube.vue.b5b96a33.js → PhCube.vue.8900248a.js} +2 -2
  63. abstra_statics/dist/assets/{PhDotsThreeVertical.vue.2db678ef.js → PhDotsThreeVertical.vue.14516e2e.js} +2 -2
  64. abstra_statics/dist/assets/PhDownloadSimple.vue.f8dc6a01.js +2 -0
  65. abstra_statics/dist/assets/{PhFolderPlus.vue.dfb9b117.js → PhFolderPlus.vue.65855487.js} +2 -2
  66. abstra_statics/dist/assets/{PhGear.vue.6e1aeed0.js → PhGear.vue.172823d3.js} +2 -2
  67. abstra_statics/dist/assets/{PhKey.vue.50d82bb5.js → PhKey.vue.9d78ceda.js} +2 -2
  68. abstra_statics/dist/assets/{PhPencil.vue.ae2943da.js → PhPencil.vue.f326c6d0.js} +2 -2
  69. abstra_statics/dist/assets/{PhPencilSimple.vue.9042e169.js → PhPencilSimple.vue.31afd9b3.js} +2 -2
  70. abstra_statics/dist/assets/{PhPencilSimpleLine.vue.f840cf0d.js → PhPencilSimpleLine.vue.394969fe.js} +2 -2
  71. abstra_statics/dist/assets/{PhRocket.vue.3b5927aa.js → PhRocket.vue.b69be43b.js} +2 -2
  72. abstra_statics/dist/assets/{PhSignOut.vue.d00d3657.js → PhSignOut.vue.6be07f90.js} +2 -2
  73. abstra_statics/dist/assets/{PhSparkle.vue.8a94f3a0.js → PhSparkle.vue.ca8d1014.js} +2 -2
  74. abstra_statics/dist/assets/{PhUserList.vue.3791cb59.js → PhUserList.vue.43e7a38a.js} +2 -2
  75. abstra_statics/dist/assets/{PhUsersThree.vue.ef0376b6.js → PhUsersThree.vue.fb26521a.js} +2 -2
  76. abstra_statics/dist/assets/{PhWebhooksLogo.vue.fe81fb65.js → PhWebhooksLogo.vue.ea667ed2.js} +2 -2
  77. abstra_statics/dist/assets/{PlayerConfigProvider.2acd3a77.js → PlayerConfigProvider.5aec8c16.js} +2 -2
  78. abstra_statics/dist/assets/{PlayerNavbar.13876ce7.js → PlayerNavbar.21883569.js} +2 -2
  79. abstra_statics/dist/assets/{Project.0277535f.js → Project.a987ec46.js} +2 -2
  80. abstra_statics/dist/assets/ProjectLogin.583ce83f.js +2 -0
  81. abstra_statics/dist/assets/{ProjectSettings.652a838b.js → ProjectSettings.b949f40f.js} +2 -2
  82. abstra_statics/dist/assets/{ProjectsView.c5ec993b.js → ProjectsView.7de28b8a.js} +2 -2
  83. abstra_statics/dist/assets/{SaveButton.ac38b361.js → SaveButton.f6870993.js} +2 -2
  84. abstra_statics/dist/assets/{ScrollArea.vue_vue_type_script_setup_true_lang.a58564d3.js → ScrollArea.vue_vue_type_script_setup_true_lang.21ea9f38.js} +2 -2
  85. abstra_statics/dist/assets/{Sidebar.56e51ab5.js → Sidebar.1250b960.js} +2 -2
  86. abstra_statics/dist/assets/Sql.a8abfb57.js +5 -0
  87. abstra_statics/dist/assets/Steps.2f177a1f.js +2 -0
  88. abstra_statics/dist/assets/{TableEditor.df6a4852.js → TableEditor.25046840.js} +2 -2
  89. abstra_statics/dist/assets/Tables.f0ea43f5.js +2 -0
  90. abstra_statics/dist/assets/{TablesDiagram.811d464d.js → TablesDiagram.eb43ee41.js} +2 -2
  91. abstra_statics/dist/assets/TablesTabs.vue_vue_type_script_setup_true_lang.a35b4471.js +2 -0
  92. abstra_statics/dist/assets/Tasks.5fde94ea.js +2 -0
  93. abstra_statics/dist/assets/{UploadOutlined.b601a592.js → UploadOutlined.3828d031.js} +2 -2
  94. abstra_statics/dist/assets/{View.7a2ccc33.js → View.f0be1038.js} +2 -2
  95. abstra_statics/dist/assets/View.vue_vue_type_script_setup_true_lang.bddece9c.js +2 -0
  96. abstra_statics/dist/assets/{Watermark.40c8c47e.js → Watermark.1655dad8.js} +2 -2
  97. abstra_statics/dist/assets/{WebEditor.82a3accf.js → WebEditor.f6ba39c6.js} +2 -2
  98. abstra_statics/dist/assets/WidgetPreview.70e3ecb3.js +2 -0
  99. abstra_statics/dist/assets/ant-design.1cc60cde.js +2 -0
  100. abstra_statics/dist/assets/{apiKey.95126643.js → apiKey.49b8decf.js} +2 -2
  101. abstra_statics/dist/assets/asyncComputed.92146382.js +2 -0
  102. abstra_statics/dist/assets/{build.997fec15.js → build.261de82e.js} +2 -2
  103. abstra_statics/dist/assets/colorHelpers.59e5ee56.js +2 -0
  104. abstra_statics/dist/assets/{console.54ab975c.js → console.0548c6a0.js} +4 -4
  105. abstra_statics/dist/assets/constants.f352d89b.js +2 -0
  106. abstra_statics/dist/assets/contracts.generated.ac0bb8ea.js +2 -0
  107. abstra_statics/dist/assets/{cssMode.c1aa21d7.js → cssMode.c55f29d9.js} +2 -2
  108. abstra_statics/dist/assets/datetime.780c5d6b.js +2 -0
  109. abstra_statics/dist/assets/{dayjs.a6bd0ee0.js → dayjs.b139fc88.js} +2 -2
  110. abstra_statics/dist/assets/editor.f7e5ca32.js +2 -0
  111. abstra_statics/dist/assets/editor.main.eea24677.js +2 -0
  112. abstra_statics/dist/assets/fetch.e3c8dd68.js +2 -0
  113. abstra_statics/dist/assets/{folder.41d37eb7.js → folder.934b13ce.js} +2 -2
  114. abstra_statics/dist/assets/{freemarker2.40778f3f.js → freemarker2.72aea997.js} +2 -2
  115. abstra_statics/dist/assets/{handlebars.92d4ff2a.js → handlebars.607ed329.js} +2 -2
  116. abstra_statics/dist/assets/{html.b3c0c53a.js → html.1cebc021.js} +3 -3
  117. abstra_statics/dist/assets/{htmlMode.1212da49.js → htmlMode.b3ab207b.js} +2 -2
  118. abstra_statics/dist/assets/{index.9e0166fe.js → index.2efe5ae2.js} +2 -2
  119. abstra_statics/dist/assets/{index.37c46161.js → index.424d5056.js} +2 -2
  120. abstra_statics/dist/assets/{index.a7b8e25e.js → index.61710ff9.js} +2 -2
  121. abstra_statics/dist/assets/{index.d181a22c.js → index.8ea8b90b.js} +2 -2
  122. abstra_statics/dist/assets/{index.3ff1c0be.js → index.a5ddebc4.js} +3 -3
  123. abstra_statics/dist/assets/{index.36d8b30a.js → index.cef986ac.js} +3 -3
  124. abstra_statics/dist/assets/{index.3e7471f4.js → index.d73f307c.js} +2 -2
  125. abstra_statics/dist/assets/{index.5e22e010.js → index.ded0f9ab.js} +2 -2
  126. abstra_statics/dist/assets/index.e189c6ed.js +2 -0
  127. abstra_statics/dist/assets/{javascript.f9710043.js → javascript.595850d9.js} +2 -2
  128. abstra_statics/dist/assets/{jsonMode.16d00c0d.js → jsonMode.e3ed1113.js} +2 -2
  129. abstra_statics/dist/assets/{jwt-decode.esm.992666e9.js → jwt-decode.esm.1b301f74.js} +8 -8
  130. abstra_statics/dist/assets/linters.0018d44c.js +2 -0
  131. abstra_statics/dist/assets/{liquid.9a777e1a.js → liquid.3ef83be8.js} +3 -3
  132. abstra_statics/dist/assets/member.3c3a769a.js +2 -0
  133. abstra_statics/dist/assets/{metadata.cfad5458.js → metadata.e6e62729.js} +2 -2
  134. abstra_statics/dist/assets/{omniChatStore.2b85c342.js → omniChatStore.8902e4de.js} +2 -2
  135. abstra_statics/dist/assets/{organization.53636095.js → organization.c92a9190.js} +2 -2
  136. abstra_statics/dist/assets/player.82dc9e2f.js +2 -0
  137. abstra_statics/dist/assets/{plotly.min.9b8bef5c.js → plotly.min.ac699f04.js} +2 -2
  138. abstra_statics/dist/assets/polling.a3bae209.js +2 -0
  139. abstra_statics/dist/assets/{project.76f0af14.js → project.48a235c1.js} +2 -2
  140. abstra_statics/dist/assets/{python.ae8270c8.js → python.b69cfb2a.js} +3 -3
  141. abstra_statics/dist/assets/{razor.4f24e19e.js → razor.0f42fef9.js} +3 -3
  142. abstra_statics/dist/assets/{record.87ef3b68.js → record.b96b0275.js} +2 -2
  143. abstra_statics/dist/assets/redirect.ebab71ed.js +2 -0
  144. abstra_statics/dist/assets/repository.4920fb3b.js +2 -0
  145. abstra_statics/dist/assets/{repository.af418855.js → repository.c0dc4e22.js} +2 -2
  146. abstra_statics/dist/assets/router.8882099a.js +2 -0
  147. abstra_statics/dist/assets/{router.1324a1a9.js → router.99a53337.js} +3 -3
  148. abstra_statics/dist/assets/string.4796d44a.js +2 -0
  149. abstra_statics/dist/assets/{tables.c26107a1.js → tables.13d62f0c.js} +2 -2
  150. abstra_statics/dist/assets/tasksController.3255c760.js +4 -0
  151. abstra_statics/dist/assets/{toggleHighContrast.fc60753d.js → toggleHighContrast.cb5e834a.js} +49 -49
  152. abstra_statics/dist/assets/{tsMode.a4b9b524.js → tsMode.95528ab9.js} +2 -2
  153. abstra_statics/dist/assets/{typescript.ab90fd1d.js → typescript.b90bd43d.js} +3 -3
  154. abstra_statics/dist/assets/url.84e62ca8.js +2 -0
  155. abstra_statics/dist/assets/useCodebaseEvents.c47ad36d.js +2 -0
  156. abstra_statics/dist/assets/userStore.843da693.js +2 -0
  157. abstra_statics/dist/assets/uuid.58d26ff2.js +2 -0
  158. abstra_statics/dist/assets/{vue-flow-background.8e4c22c3.js → vue-flow-background.6b5566a8.js} +2 -2
  159. abstra_statics/dist/assets/{vue-quill.esm-bundler.64c5837f.js → vue-quill.esm-bundler.3c4b0230.js} +2 -2
  160. abstra_statics/dist/assets/{workspaceStore.4f0c433f.js → workspaceStore.6a20c00d.js} +2 -2
  161. abstra_statics/dist/assets/{xml.3541c340.js → xml.070d3630.js} +3 -3
  162. abstra_statics/dist/assets/{yaml.314312d8.js → yaml.2a862691.js} +3 -3
  163. abstra_statics/dist/console.html +15 -15
  164. abstra_statics/dist/editor.html +13 -11
  165. abstra_statics/dist/player.html +9 -9
  166. abstra_statics/dist/assets/AbstraButton.vue_vue_type_script_setup_true_lang.205eb76e.js +0 -2
  167. abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.32a17b0c.js +0 -2
  168. abstra_statics/dist/assets/ApiKeys.7fefafb4.js +0 -2
  169. abstra_statics/dist/assets/App.c29df54f.js +0 -2
  170. abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.efd9d3fa.js +0 -2
  171. abstra_statics/dist/assets/BaseLayout.b60c33b8.js +0 -2
  172. abstra_statics/dist/assets/CloseCircleOutlined.4e05b917.js +0 -2
  173. abstra_statics/dist/assets/ConnectorsView.562a5007.js +0 -2
  174. abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.1d09cfdd.js +0 -2
  175. abstra_statics/dist/assets/ContentLayout.7d5c9f09.js +0 -2
  176. abstra_statics/dist/assets/EnvVars.063644bb.js +0 -2
  177. abstra_statics/dist/assets/ExclamationCircleOutlined.d410fb9a.js +0 -2
  178. abstra_statics/dist/assets/Form.bfea5673.js +0 -2
  179. abstra_statics/dist/assets/Home.3bf2f131.js +0 -2
  180. abstra_statics/dist/assets/Home.42964d5b.js +0 -2
  181. abstra_statics/dist/assets/LoadingContainer.6e72d482.js +0 -2
  182. abstra_statics/dist/assets/LoadingOutlined.ee72932a.js +0 -2
  183. abstra_statics/dist/assets/Login.0b618d09.js +0 -2
  184. abstra_statics/dist/assets/Logo.83b476a4.js +0 -2
  185. abstra_statics/dist/assets/Main.88719eb3.js +0 -2
  186. abstra_statics/dist/assets/Navbar.abf206e9.js +0 -2
  187. abstra_statics/dist/assets/NewEditor.5650f697.js +0 -8
  188. abstra_statics/dist/assets/OidcLoginCallback.df2bdeb0.js +0 -2
  189. abstra_statics/dist/assets/OidcLogoutCallback.2ba5316d.js +0 -2
  190. abstra_statics/dist/assets/PhDownloadSimple.vue.cbca4f9b.js +0 -2
  191. abstra_statics/dist/assets/ProjectLogin.46d5036b.js +0 -2
  192. abstra_statics/dist/assets/Sql.6961306b.js +0 -5
  193. abstra_statics/dist/assets/Steps.f820fb18.js +0 -2
  194. abstra_statics/dist/assets/Tables.198b84c5.js +0 -2
  195. abstra_statics/dist/assets/TablesTabs.vue_vue_type_script_setup_true_lang.e6074880.js +0 -2
  196. abstra_statics/dist/assets/Tasks.df69d20e.js +0 -2
  197. abstra_statics/dist/assets/View.vue_vue_type_script_setup_true_lang.424410a2.js +0 -2
  198. abstra_statics/dist/assets/WidgetPreview.0f938200.js +0 -2
  199. abstra_statics/dist/assets/ant-design.544de4a0.js +0 -2
  200. abstra_statics/dist/assets/asyncComputed.1b787534.js +0 -2
  201. abstra_statics/dist/assets/colorHelpers.d4f3f275.js +0 -2
  202. abstra_statics/dist/assets/constants.36bf7d70.js +0 -2
  203. abstra_statics/dist/assets/datetime.adc0acc4.js +0 -2
  204. abstra_statics/dist/assets/editor.0ce52658.js +0 -2
  205. abstra_statics/dist/assets/editor.main.353e9a8f.js +0 -2
  206. abstra_statics/dist/assets/fetch.83d89bdc.js +0 -2
  207. abstra_statics/dist/assets/index.3d2a7b6d.js +0 -2
  208. abstra_statics/dist/assets/linters.3c5f0c83.js +0 -2
  209. abstra_statics/dist/assets/member.6b2b3438.js +0 -2
  210. abstra_statics/dist/assets/player.5b7eaa25.js +0 -2
  211. abstra_statics/dist/assets/polling.88a266b3.js +0 -2
  212. abstra_statics/dist/assets/redirect.2fa4f8cf.js +0 -2
  213. abstra_statics/dist/assets/repository.9d5310b6.js +0 -2
  214. abstra_statics/dist/assets/router.55c0ff56.js +0 -2
  215. abstra_statics/dist/assets/string.f6a7565f.js +0 -2
  216. abstra_statics/dist/assets/tasksController.22584849.js +0 -4
  217. abstra_statics/dist/assets/url.f490879d.js +0 -2
  218. abstra_statics/dist/assets/userStore.9e7a540a.js +0 -2
  219. abstra_statics/dist/assets/uuid.9161765c.js +0 -2
  220. {abstra-3.23.8.dist-info → abstra-3.23.9.dist-info}/WHEEL +0 -0
  221. {abstra-3.23.8.dist-info → abstra-3.23.9.dist-info}/entry_points.txt +0 -0
  222. {abstra-3.23.8.dist-info → abstra-3.23.9.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- import{e_ as tr,R as Tt,d as er,k as nr,aq as rr,r as Fn,w as Ln,H as ir,at as Un}from"./jwt-decode.esm.992666e9.js";(function(){try{var R=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},U=new Error().stack;U&&(R._sentryDebugIds=R._sentryDebugIds||{},R._sentryDebugIds[U]="87155af1-a822-42c9-a928-b81380ae49bb",R._sentryDebugIdIdentifier="sentry-dbid-87155af1-a822-42c9-a928-b81380ae49bb")}catch{}})();var Gn={exports:{}};/*!
1
+ import{e_ as tr,R as Tt,d as er,J as nr,aq as rr,r as Fn,w as Ln,D as ir,at as Un}from"./jwt-decode.esm.1b301f74.js";(function(){try{var R=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},U=new Error().stack;U&&(R._sentryDebugIds=R._sentryDebugIds||{},R._sentryDebugIds[U]="363148e1-7ae9-4e9e-a65d-b4c9e5bb4763",R._sentryDebugIdIdentifier="sentry-dbid-363148e1-7ae9-4e9e-a65d-b4c9e5bb4763")}catch{}})();var Gn={exports:{}};/*!
2
2
  * Quill Editor v1.3.7
3
3
  * https://quilljs.com/
4
4
  * Copyright (c) 2014, Jason Chen
@@ -52,4 +52,4 @@ import{e_ as tr,R as Tt,d as er,k as nr,aq as rr,r as Fn,w as Ln,H as ir,at as U
52
52
  */const $n={essential:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}],["blockquote","code-block","link"],[{color:[]},"clean"]],minimal:[[{header:1},{header:2}],["bold","italic","underline"],[{list:"ordered"},{list:"bullet"},{align:[]}]],full:[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{direction:"rtl"}],[{size:["small",!1,"large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["link","video","image"],["clean"]]},_r=er({name:"QuillEditor",inheritAttrs:!1,props:{content:{type:[String,Object]},contentType:{type:String,default:"delta",validator:R=>["delta","html","text"].includes(R)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:R=>["snow","bubble",""].includes(R)},toolbar:{type:[String,Array,Object],required:!1,validator:R=>typeof R=="string"&&R!==""?R.charAt(0)==="#"?!0:Object.keys($n).indexOf(R)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(R,U)=>{nr(()=>{E()}),rr(()=>{m=null});let m,p;const c=Fn(),E=()=>{var v;if(!!c.value){if(p=b(),R.modules)if(Array.isArray(R.modules))for(const O of R.modules)qn.register(`modules/${O.name}`,O.module);else qn.register(`modules/${R.modules.name}`,R.modules.module);m=new qn(c.value,p),f(R.content),m.on("text-change",o),m.on("selection-change",e),m.on("editor-change",s),R.theme!=="bubble"&&c.value.classList.remove("ql-bubble"),R.theme!=="snow"&&c.value.classList.remove("ql-snow"),(v=m.getModule("toolbar"))===null||v===void 0||v.container.addEventListener("mousedown",O=>{O.preventDefault()}),U.emit("ready",m)}},b=()=>{const v={};if(R.theme!==""&&(v.theme=R.theme),R.readOnly&&(v.readOnly=R.readOnly),R.placeholder&&(v.placeholder=R.placeholder),R.toolbar&&R.toolbar!==""&&(v.modules={toolbar:(()=>{if(typeof R.toolbar=="object")return R.toolbar;if(typeof R.toolbar=="string")return R.toolbar.charAt(0)==="#"?R.toolbar:$n[R.toolbar]})()}),R.modules){const O=(()=>{var k,L;const D={};if(Array.isArray(R.modules))for(const z of R.modules)D[z.name]=(k=z.options)!==null&&k!==void 0?k:{};else D[R.modules.name]=(L=R.modules.options)!==null&&L!==void 0?L:{};return D})();v.modules=Object.assign({},v.modules,O)}return Object.assign({},R.globalOptions,R.options,v)},_=v=>typeof v=="object"&&v?v.slice():v,y=v=>Object.values(v.ops).some(O=>!O.retain||Object.keys(O).length!==1);let g;const h=v=>{if(typeof g==typeof v){if(v===g)return!0;if(typeof v=="object"&&v&&typeof g=="object"&&g)return!y(g.diff(v))}return!1},o=(v,O,k)=>{g=_(i()),h(R.content)||U.emit("update:content",g),U.emit("textChange",{delta:v,oldContents:O,source:k})},t=Fn(),e=(v,O,k)=>{t.value=!!(m!=null&&m.hasFocus()),U.emit("selectionChange",{range:v,oldRange:O,source:k})};Ln(t,v=>{v?U.emit("focus",c):U.emit("blur",c)});const s=(...v)=>{v[0]==="text-change"&&U.emit("editorChange",{name:v[0],delta:v[1],oldContents:v[2],source:v[3]}),v[0]==="selection-change"&&U.emit("editorChange",{name:v[0],range:v[1],oldRange:v[2],source:v[3]})},l=()=>c.value,u=()=>{var v;return(v=m==null?void 0:m.getModule("toolbar"))===null||v===void 0?void 0:v.container},r=()=>{if(m)return m;throw`The quill editor hasn't been instantiated yet,
53
53
  make sure to call this method when the editor ready
54
54
  or use v-on:ready="onReady(quill)" event instead.`},i=(v,O)=>R.contentType==="html"?N():R.contentType==="text"?n(v,O):m==null?void 0:m.getContents(v,O),f=(v,O="api")=>{const k=v||(R.contentType==="delta"?new mr:"");R.contentType==="html"?w(k):R.contentType==="text"?d(k,O):m==null||m.setContents(k,O),g=_(k)},n=(v,O)=>{var k;return(k=m==null?void 0:m.getText(v,O))!==null&&k!==void 0?k:""},d=(v,O="api")=>{m==null||m.setText(v,O)},N=()=>{var v;return(v=m==null?void 0:m.root.innerHTML)!==null&&v!==void 0?v:""},w=v=>{m&&(m.root.innerHTML=v)},T=(v,O="api")=>{const k=m==null?void 0:m.clipboard.convert(v);k&&(m==null||m.setContents(k,O))},P=()=>{m==null||m.focus()},A=()=>{Un(()=>{var v;!U.slots.toolbar&&m&&((v=m.getModule("toolbar"))===null||v===void 0||v.container.remove()),E()})};return Ln(()=>R.content,v=>{if(!m||!v||h(v))return;const O=m.getSelection();O&&Un(()=>m==null?void 0:m.setSelection(O)),f(v)},{deep:!0}),Ln(()=>R.enable,v=>{m&&m.enable(v)}),{editor:c,getEditor:l,getToolbar:u,getQuill:r,getContents:i,setContents:f,getHTML:N,setHTML:w,pasteHTML:T,focus:P,getText:n,setText:d,reinit:A}},render(){var R,U;return[(U=(R=this.$slots).toolbar)===null||U===void 0?void 0:U.call(R),ir("div",{ref:"editor",...this.$attrs})]}});export{mr as Delta,qn as Quill,_r as QuillEditor};
55
- //# sourceMappingURL=vue-quill.esm-bundler.64c5837f.js.map
55
+ //# sourceMappingURL=vue-quill.esm-bundler.3c4b0230.js.map
@@ -1,2 +1,2 @@
1
- var Ce=Object.defineProperty;var Pe=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var N=(e,t,s)=>(Pe(e,typeof t!="symbol"?t+"":t,s),s);import{i as Ae,q as Oe,r as Ne}from"./jwt-decode.esm.992666e9.js";import{u as Y}from"./userStore.9e7a540a.js";import{i as qe}from"./url.f490879d.js";import{i as Me}from"./colorHelpers.d4f3f275.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="7b8fb58c-33e6-499e-8344-d23796abe6bc",e._sentryDebugIdIdentifier="sentry-dbid-7b8fb58c-33e6-499e-8344-d23796abe6bc")}catch{}})();class q extends Error{}q.prototype.name="InvalidTokenError";function je(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,s)=>{let i=s.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}function He(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return je(t)}catch{return atob(t)}}function Fe(e,t){if(typeof e!="string")throw new q("Invalid token specified: must be a string");t||(t={});const s=t.header===!0?0:1,i=e.split(".")[s];if(typeof i!="string")throw new q(`Invalid token specified: missing part #${s+1}`);let r;try{r=He(i)}catch(n){throw new q(`Invalid token specified: invalid base64 for part #${s+1} (${n.message})`)}try{return JSON.parse(r)}catch(n){throw new q(`Invalid token specified: invalid json for part #${s+1} (${n.message})`)}}var De={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}},b,k,D=(e=>(e[e.NONE=0]="NONE",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e))(D||{});(e=>{function t(){b=3,k=De}e.reset=t;function s(r){if(!(0<=r&&r<=4))throw new Error("Invalid log level");b=r}e.setLevel=s;function i(r){k=r}e.setLogger=i})(D||(D={}));var g=class y{constructor(t){this._name=t}debug(...t){b>=4&&k.debug(y._format(this._name,this._method),...t)}info(...t){b>=3&&k.info(y._format(this._name,this._method),...t)}warn(...t){b>=2&&k.warn(y._format(this._name,this._method),...t)}error(...t){b>=1&&k.error(y._format(this._name,this._method),...t)}throw(t){throw this.error(t),t}create(t){const s=Object.create(this);return s._method=t,s.debug("begin"),s}static createStatic(t,s){const i=new y(`${t}.${s}`);return i.debug("begin"),i}static _format(t,s){const i=`[${t}]`;return s?`${i} ${s}:`:i}static debug(t,...s){b>=4&&k.debug(y._format(t),...s)}static info(t,...s){b>=3&&k.info(y._format(t),...s)}static warn(t,...s){b>=2&&k.warn(y._format(t),...s)}static error(t,...s){b>=1&&k.error(y._format(t),...s)}};D.reset();var We="10000000-1000-4000-8000-100000000000",te=e=>btoa([...new Uint8Array(e)].map(t=>String.fromCharCode(t)).join("")),O=class M{static _randomWord(){const t=new Uint32Array(1);return crypto.getRandomValues(t),t[0]}static generateUUIDv4(){return We.replace(/[018]/g,s=>(+s^M._randomWord()&15>>+s/4).toString(16)).replace(/-/g,"")}static generateCodeVerifier(){return M.generateUUIDv4()+M.generateUUIDv4()+M.generateUUIDv4()}static async generateCodeChallenge(t){if(!crypto.subtle)throw new Error("Crypto.subtle is available only in secure contexts (HTTPS).");try{const i=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",i);return te(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(s){throw g.error("CryptoUtils.generateCodeChallenge",s),s}}static generateBasicAuth(t,s){const r=new TextEncoder().encode([t,s].join(":"));return te(r)}},R=class{constructor(e){this._name=e,this._logger=new g(`Event('${this._name}')`),this._callbacks=[]}addHandler(e){return this._callbacks.push(e),()=>this.removeHandler(e)}removeHandler(e){const t=this._callbacks.lastIndexOf(e);t>=0&&this._callbacks.splice(t,1)}async raise(...e){this._logger.debug("raise:",...e);for(const t of this._callbacks)await t(...e)}},K=class{static decode(e){try{return Fe(e)}catch(t){throw g.error("JwtUtils.decode",t),t}}},se=class{static center({...e}){var t,s,i;return e.width==null&&(e.width=(t=[800,720,600,480].find(r=>r<=window.outerWidth/1.618))!=null?t:360),(s=e.left)!=null||(e.left=Math.max(0,Math.round(window.screenX+(window.outerWidth-e.width)/2))),e.height!=null&&((i=e.top)!=null||(e.top=Math.max(0,Math.round(window.screenY+(window.outerHeight-e.height)/2)))),e}static serialize(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,s])=>`${t}=${typeof s!="boolean"?s:s?"yes":"no"}`).join(",")}},I=class H extends R{constructor(){super(...arguments),this._logger=new g(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{const t=this._expiration-H.getEpochTime();this._logger.debug("timer completes in",t),this._expiration<=H.getEpochTime()&&(this.cancel(),super.raise())}}static getEpochTime(){return Math.floor(Date.now()/1e3)}init(t){const s=this._logger.create("init");t=Math.max(Math.floor(t),1);const i=H.getEpochTime()+t;if(this.expiration===i&&this._timerHandle){s.debug("skipping since already initialized for expiration at",this.expiration);return}this.cancel(),s.debug("using duration",t),this._expiration=i;const r=Math.min(t,5);this._timerHandle=setInterval(this._callback,r*1e3)}get expiration(){return this._expiration}cancel(){this._logger.create("cancel"),this._timerHandle&&(clearInterval(this._timerHandle),this._timerHandle=null)}},z=class{static readParams(e,t="query"){if(!e)throw new TypeError("Invalid URL");const i=new URL(e,"http://127.0.0.1")[t==="fragment"?"hash":"search"];return new URLSearchParams(i.slice(1))}},B=";",A=class extends Error{constructor(e,t){var s,i,r;if(super(e.error_description||e.error||""),this.form=t,this.name="ErrorResponse",!e.error)throw g.error("ErrorResponse","No error passed"),new Error("No error passed");this.error=e.error,this.error_description=(s=e.error_description)!=null?s:null,this.error_uri=(i=e.error_uri)!=null?i:null,this.state=e.userState,this.session_state=(r=e.session_state)!=null?r:null,this.url_state=e.url_state}},X=class extends Error{constructor(e){super(e),this.name="ErrorTimeout"}},$e=class{constructor(e){this._logger=new g("AccessTokenEvents"),this._expiringTimer=new I("Access token expiring"),this._expiredTimer=new I("Access token expired"),this._expiringNotificationTimeInSeconds=e.expiringNotificationTimeInSeconds}load(e){const t=this._logger.create("load");if(e.access_token&&e.expires_in!==void 0){const s=e.expires_in;if(t.debug("access token present, remaining duration:",s),s>0){let r=s-this._expiringNotificationTimeInSeconds;r<=0&&(r=1),t.debug("registering expiring timer, raising in",r,"seconds"),this._expiringTimer.init(r)}else t.debug("canceling existing expiring timer because we're past expiration."),this._expiringTimer.cancel();const i=s+1;t.debug("registering expired timer, raising in",i,"seconds"),this._expiredTimer.init(i)}else this._expiringTimer.cancel(),this._expiredTimer.cancel()}unload(){this._logger.debug("unload: canceling existing access token timers"),this._expiringTimer.cancel(),this._expiredTimer.cancel()}addAccessTokenExpiring(e){return this._expiringTimer.addHandler(e)}removeAccessTokenExpiring(e){this._expiringTimer.removeHandler(e)}addAccessTokenExpired(e){return this._expiredTimer.addHandler(e)}removeAccessTokenExpired(e){this._expiredTimer.removeHandler(e)}},Le=class{constructor(e,t,s,i,r){this._callback=e,this._client_id=t,this._intervalInSeconds=i,this._stopOnError=r,this._logger=new g("CheckSessionIFrame"),this._timer=null,this._session_state=null,this._message=o=>{o.origin===this._frame_origin&&o.source===this._frame.contentWindow&&(o.data==="error"?(this._logger.error("error message from check session op iframe"),this._stopOnError&&this.stop()):o.data==="changed"?(this._logger.debug("changed message from check session op iframe"),this.stop(),this._callback()):this._logger.debug(o.data+" message from check session op iframe"))};const n=new URL(s);this._frame_origin=n.origin,this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="fixed",this._frame.style.left="-1000px",this._frame.style.top="0",this._frame.width="0",this._frame.height="0",this._frame.src=n.href}load(){return new Promise(e=>{this._frame.onload=()=>{e()},window.document.body.appendChild(this._frame),window.addEventListener("message",this._message,!1)})}start(e){if(this._session_state===e)return;this._logger.create("start"),this.stop(),this._session_state=e;const t=()=>{!this._frame.contentWindow||!this._session_state||this._frame.contentWindow.postMessage(this._client_id+" "+this._session_state,this._frame_origin)};t(),this._timer=setInterval(t,this._intervalInSeconds*1e3)}stop(){this._logger.create("stop"),this._session_state=null,this._timer&&(clearInterval(this._timer),this._timer=null)}},ce=class{constructor(){this._logger=new g("InMemoryWebStorage"),this._data={}}clear(){this._logger.create("clear"),this._data={}}getItem(e){return this._logger.create(`getItem('${e}')`),this._data[e]}setItem(e,t){this._logger.create(`setItem('${e}')`),this._data[e]=t}removeItem(e){this._logger.create(`removeItem('${e}')`),delete this._data[e]}get length(){return Object.getOwnPropertyNames(this._data).length}key(e){return Object.getOwnPropertyNames(this._data)[e]}},Z=class{constructor(e=[],t=null,s={}){this._jwtHandler=t,this._extraHeaders=s,this._logger=new g("JsonService"),this._contentTypes=[],this._contentTypes.push(...e,"application/json"),t&&this._contentTypes.push("application/jwt")}async fetchWithTimeout(e,t={}){const{timeoutInSeconds:s,...i}=t;if(!s)return await fetch(e,i);const r=new AbortController,n=setTimeout(()=>r.abort(),s*1e3);try{return await fetch(e,{...t,signal:r.signal})}catch(o){throw o instanceof DOMException&&o.name==="AbortError"?new X("Network timed out"):o}finally{clearTimeout(n)}}async getJson(e,{token:t,credentials:s}={}){const i=this._logger.create("getJson"),r={Accept:this._contentTypes.join(", ")};t&&(i.debug("token passed, setting Authorization header"),r.Authorization="Bearer "+t),this.appendExtraHeaders(r);let n;try{i.debug("url:",e),n=await this.fetchWithTimeout(e,{method:"GET",headers:r,credentials:s})}catch(c){throw i.error("Network Error"),c}i.debug("HTTP response received, status",n.status);const o=n.headers.get("Content-Type");if(o&&!this._contentTypes.find(c=>o.startsWith(c))&&i.throw(new Error(`Invalid response Content-Type: ${o!=null?o:"undefined"}, from URL: ${e}`)),n.ok&&this._jwtHandler&&(o==null?void 0:o.startsWith("application/jwt")))return await this._jwtHandler(await n.text());let a;try{a=await n.json()}catch(c){throw i.error("Error parsing JSON response",c),n.ok?c:new Error(`${n.statusText} (${n.status})`)}if(!n.ok)throw i.error("Error from server:",a),a.error?new A(a):new Error(`${n.statusText} (${n.status}): ${JSON.stringify(a)}`);return a}async postForm(e,{body:t,basicAuth:s,timeoutInSeconds:i,initCredentials:r}){const n=this._logger.create("postForm"),o={Accept:this._contentTypes.join(", "),"Content-Type":"application/x-www-form-urlencoded"};s!==void 0&&(o.Authorization="Basic "+s),this.appendExtraHeaders(o);let a;try{n.debug("url:",e),a=await this.fetchWithTimeout(e,{method:"POST",headers:o,body:t,timeoutInSeconds:i,credentials:r})}catch(d){throw n.error("Network error"),d}n.debug("HTTP response received, status",a.status);const c=a.headers.get("Content-Type");if(c&&!this._contentTypes.find(d=>c.startsWith(d)))throw new Error(`Invalid response Content-Type: ${c!=null?c:"undefined"}, from URL: ${e}`);const l=await a.text();let h={};if(l)try{h=JSON.parse(l)}catch(d){throw n.error("Error parsing JSON response",d),a.ok?d:new Error(`${a.statusText} (${a.status})`)}if(!a.ok)throw n.error("Error from server:",h),h.error?new A(h,t):new Error(`${a.statusText} (${a.status}): ${JSON.stringify(h)}`);return h}appendExtraHeaders(e){const t=this._logger.create("appendExtraHeaders"),s=Object.keys(this._extraHeaders),i=["authorization","accept","content-type"];s.length!==0&&s.forEach(r=>{if(i.includes(r.toLocaleLowerCase())){t.warn("Protected header could not be overridden",r,i);return}const n=typeof this._extraHeaders[r]=="function"?this._extraHeaders[r]():this._extraHeaders[r];n&&n!==""&&(e[r]=n)})}},Je=class{constructor(e){this._settings=e,this._logger=new g("MetadataService"),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new Z(["application/jwk-set+json"],null,this._settings.extraHeaders),this._settings.signingKeys&&(this._logger.debug("using signingKeys from settings"),this._signingKeys=this._settings.signingKeys),this._settings.metadata&&(this._logger.debug("using metadata from settings"),this._metadata=this._settings.metadata),this._settings.fetchRequestCredentials&&(this._logger.debug("using fetchRequestCredentials from settings"),this._fetchRequestCredentials=this._settings.fetchRequestCredentials)}resetSigningKeys(){this._signingKeys=null}async getMetadata(){const e=this._logger.create("getMetadata");if(this._metadata)return e.debug("using cached values"),this._metadata;if(!this._metadataUrl)throw e.throw(new Error("No authority or metadataUrl configured on settings")),null;e.debug("getting metadata from",this._metadataUrl);const t=await this._jsonService.getJson(this._metadataUrl,{credentials:this._fetchRequestCredentials});return e.debug("merging remote JSON with seed metadata"),this._metadata=Object.assign({},this._settings.metadataSeed,t),this._metadata}getIssuer(){return this._getMetadataProperty("issuer")}getAuthorizationEndpoint(){return this._getMetadataProperty("authorization_endpoint")}getUserInfoEndpoint(){return this._getMetadataProperty("userinfo_endpoint")}getTokenEndpoint(e=!0){return this._getMetadataProperty("token_endpoint",e)}getCheckSessionIframe(){return this._getMetadataProperty("check_session_iframe",!0)}getEndSessionEndpoint(){return this._getMetadataProperty("end_session_endpoint",!0)}getRevocationEndpoint(e=!0){return this._getMetadataProperty("revocation_endpoint",e)}getKeysEndpoint(e=!0){return this._getMetadataProperty("jwks_uri",e)}async _getMetadataProperty(e,t=!1){const s=this._logger.create(`_getMetadataProperty('${e}')`),i=await this.getMetadata();if(s.debug("resolved"),i[e]===void 0){if(t===!0){s.warn("Metadata does not contain optional property");return}s.throw(new Error("Metadata does not contain property "+e))}return i[e]}async getSigningKeys(){const e=this._logger.create("getSigningKeys");if(this._signingKeys)return e.debug("returning signingKeys from cache"),this._signingKeys;const t=await this.getKeysEndpoint(!1);e.debug("got jwks_uri",t);const s=await this._jsonService.getJson(t);if(e.debug("got key set",s),!Array.isArray(s.keys))throw e.throw(new Error("Missing keys on keyset")),null;return this._signingKeys=s.keys,this._signingKeys}},le=class{constructor({prefix:e="oidc.",store:t=localStorage}={}){this._logger=new g("WebStorageStateStore"),this._store=t,this._prefix=e}async set(e,t){this._logger.create(`set('${e}')`),e=this._prefix+e,await this._store.setItem(e,t)}async get(e){return this._logger.create(`get('${e}')`),e=this._prefix+e,await this._store.getItem(e)}async remove(e){this._logger.create(`remove('${e}')`),e=this._prefix+e;const t=await this._store.getItem(e);return await this._store.removeItem(e),t}async getAllKeys(){this._logger.create("getAllKeys");const e=await this._store.length,t=[];for(let s=0;s<e;s++){const i=await this._store.key(s);i&&i.indexOf(this._prefix)===0&&t.push(i.substr(this._prefix.length))}return t}},Ke="code",ze="openid",Be="client_secret_post",Ve=60*15,V=class{constructor({authority:e,metadataUrl:t,metadata:s,signingKeys:i,metadataSeed:r,client_id:n,client_secret:o,response_type:a=Ke,scope:c=ze,redirect_uri:l,post_logout_redirect_uri:h,client_authentication:d=Be,prompt:_,display:p,max_age:m,ui_locales:S,acr_values:v,resource:x,response_mode:U,filterProtocolClaims:w=!0,loadUserInfo:u=!1,staleStateAgeInSeconds:E=Ve,mergeClaimsStrategy:T={array:"replace"},disablePKCE:f=!1,stateStore:C,revokeTokenAdditionalContentTypes:Ee,fetchRequestCredentials:ee,refreshTokenAllowedScope:Te,extraQueryParams:Ie={},extraTokenParams:Re={},extraHeaders:xe={}}){if(this.authority=e,t?this.metadataUrl=t:(this.metadataUrl=e,e&&(this.metadataUrl.endsWith("/")||(this.metadataUrl+="/"),this.metadataUrl+=".well-known/openid-configuration")),this.metadata=s,this.metadataSeed=r,this.signingKeys=i,this.client_id=n,this.client_secret=o,this.response_type=a,this.scope=c,this.redirect_uri=l,this.post_logout_redirect_uri=h,this.client_authentication=d,this.prompt=_,this.display=p,this.max_age=m,this.ui_locales=S,this.acr_values=v,this.resource=x,this.response_mode=U,this.filterProtocolClaims=w!=null?w:!0,this.loadUserInfo=!!u,this.staleStateAgeInSeconds=E,this.mergeClaimsStrategy=T,this.disablePKCE=!!f,this.revokeTokenAdditionalContentTypes=Ee,this.fetchRequestCredentials=ee||"same-origin",C)this.stateStore=C;else{const Ue=typeof window<"u"?window.localStorage:new ce;this.stateStore=new le({store:Ue})}this.refreshTokenAllowedScope=Te,this.extraQueryParams=Ie,this.extraTokenParams=Re,this.extraHeaders=xe}},Ge=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new g("UserInfoService"),this._getClaimsFromJwt=async s=>{const i=this._logger.create("_getClaimsFromJwt");try{const r=K.decode(s);return i.debug("JWT decoding successful"),r}catch(r){throw i.error("Error parsing JWT response"),r}},this._jsonService=new Z(void 0,this._getClaimsFromJwt,this._settings.extraHeaders)}async getClaims(e){const t=this._logger.create("getClaims");e||this._logger.throw(new Error("No token passed"));const s=await this._metadataService.getUserInfoEndpoint();t.debug("got userinfo url",s);const i=await this._jsonService.getJson(s,{token:e,credentials:this._settings.fetchRequestCredentials});return t.debug("got claims",i),i}},de=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new g("TokenClient"),this._jsonService=new Z(this._settings.revokeTokenAdditionalContentTypes,null,this._settings.extraHeaders)}async exchangeCode({grant_type:e="authorization_code",redirect_uri:t=this._settings.redirect_uri,client_id:s=this._settings.client_id,client_secret:i=this._settings.client_secret,...r}){const n=this._logger.create("exchangeCode");s||n.throw(new Error("A client_id is required")),t||n.throw(new Error("A redirect_uri is required")),r.code||n.throw(new Error("A code is required"));const o=new URLSearchParams({grant_type:e,redirect_uri:t});for(const[h,d]of Object.entries(r))d!=null&&o.set(h,d);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!i)throw n.throw(new Error("A client_secret is required")),null;a=O.generateBasicAuth(s,i);break;case"client_secret_post":o.append("client_id",s),i&&o.append("client_secret",i);break}const c=await this._metadataService.getTokenEndpoint(!1);n.debug("got token endpoint");const l=await this._jsonService.postForm(c,{body:o,basicAuth:a,initCredentials:this._settings.fetchRequestCredentials});return n.debug("got response"),l}async exchangeCredentials({grant_type:e="password",client_id:t=this._settings.client_id,client_secret:s=this._settings.client_secret,scope:i=this._settings.scope,...r}){const n=this._logger.create("exchangeCredentials");t||n.throw(new Error("A client_id is required"));const o=new URLSearchParams({grant_type:e,scope:i});for(const[h,d]of Object.entries(r))d!=null&&o.set(h,d);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!s)throw n.throw(new Error("A client_secret is required")),null;a=O.generateBasicAuth(t,s);break;case"client_secret_post":o.append("client_id",t),s&&o.append("client_secret",s);break}const c=await this._metadataService.getTokenEndpoint(!1);n.debug("got token endpoint");const l=await this._jsonService.postForm(c,{body:o,basicAuth:a,initCredentials:this._settings.fetchRequestCredentials});return n.debug("got response"),l}async exchangeRefreshToken({grant_type:e="refresh_token",client_id:t=this._settings.client_id,client_secret:s=this._settings.client_secret,timeoutInSeconds:i,...r}){const n=this._logger.create("exchangeRefreshToken");t||n.throw(new Error("A client_id is required")),r.refresh_token||n.throw(new Error("A refresh_token is required"));const o=new URLSearchParams({grant_type:e});for(const[h,d]of Object.entries(r))Array.isArray(d)?d.forEach(_=>o.append(h,_)):d!=null&&o.set(h,d);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!s)throw n.throw(new Error("A client_secret is required")),null;a=O.generateBasicAuth(t,s);break;case"client_secret_post":o.append("client_id",t),s&&o.append("client_secret",s);break}const c=await this._metadataService.getTokenEndpoint(!1);n.debug("got token endpoint");const l=await this._jsonService.postForm(c,{body:o,basicAuth:a,timeoutInSeconds:i,initCredentials:this._settings.fetchRequestCredentials});return n.debug("got response"),l}async revoke(e){var t;const s=this._logger.create("revoke");e.token||s.throw(new Error("A token is required"));const i=await this._metadataService.getRevocationEndpoint(!1);s.debug(`got revocation endpoint, revoking ${(t=e.token_type_hint)!=null?t:"default token type"}`);const r=new URLSearchParams;for(const[n,o]of Object.entries(e))o!=null&&r.set(n,o);r.set("client_id",this._settings.client_id),this._settings.client_secret&&r.set("client_secret",this._settings.client_secret),await this._jsonService.postForm(i,{body:r}),s.debug("got response")}},Qe=class{constructor(e,t,s){this._settings=e,this._metadataService=t,this._claimsService=s,this._logger=new g("ResponseValidator"),this._userInfoService=new Ge(this._settings,this._metadataService),this._tokenClient=new de(this._settings,this._metadataService)}async validateSigninResponse(e,t){const s=this._logger.create("validateSigninResponse");this._processSigninState(e,t),s.debug("state processed"),await this._processCode(e,t),s.debug("code processed"),e.isOpenId&&this._validateIdTokenAttributes(e),s.debug("tokens validated"),await this._processClaims(e,t==null?void 0:t.skipUserInfo,e.isOpenId),s.debug("claims processed")}async validateCredentialsResponse(e,t){const s=this._logger.create("validateCredentialsResponse");e.isOpenId&&!!e.id_token&&this._validateIdTokenAttributes(e),s.debug("tokens validated"),await this._processClaims(e,t,e.isOpenId),s.debug("claims processed")}async validateRefreshResponse(e,t){var s,i;const r=this._logger.create("validateRefreshResponse");e.userState=t.data,(s=e.session_state)!=null||(e.session_state=t.session_state),(i=e.scope)!=null||(e.scope=t.scope),e.isOpenId&&!!e.id_token&&(this._validateIdTokenAttributes(e,t.id_token),r.debug("ID Token validated")),e.id_token||(e.id_token=t.id_token,e.profile=t.profile);const n=e.isOpenId&&!!e.id_token;await this._processClaims(e,!1,n),r.debug("claims processed")}validateSignoutResponse(e,t){const s=this._logger.create("validateSignoutResponse");if(t.id!==e.state&&s.throw(new Error("State does not match")),s.debug("state validated"),e.userState=t.data,e.error)throw s.warn("Response was error",e.error),new A(e)}_processSigninState(e,t){var s;const i=this._logger.create("_processSigninState");if(t.id!==e.state&&i.throw(new Error("State does not match")),t.client_id||i.throw(new Error("No client_id on state")),t.authority||i.throw(new Error("No authority on state")),this._settings.authority!==t.authority&&i.throw(new Error("authority mismatch on settings vs. signin state")),this._settings.client_id&&this._settings.client_id!==t.client_id&&i.throw(new Error("client_id mismatch on settings vs. signin state")),i.debug("state validated"),e.userState=t.data,e.url_state=t.url_state,(s=e.scope)!=null||(e.scope=t.scope),e.error)throw i.warn("Response was error",e.error),new A(e);t.code_verifier&&!e.code&&i.throw(new Error("Expected code in response"))}async _processClaims(e,t=!1,s=!0){const i=this._logger.create("_processClaims");if(e.profile=this._claimsService.filterProtocolClaims(e.profile),t||!this._settings.loadUserInfo||!e.access_token){i.debug("not loading user info");return}i.debug("loading user info");const r=await this._userInfoService.getClaims(e.access_token);i.debug("user info claims received from user info endpoint"),s&&r.sub!==e.profile.sub&&i.throw(new Error("subject from UserInfo response does not match subject in ID Token")),e.profile=this._claimsService.mergeClaims(e.profile,this._claimsService.filterProtocolClaims(r)),i.debug("user info claims received, updated profile:",e.profile)}async _processCode(e,t){const s=this._logger.create("_processCode");if(e.code){s.debug("Validating code");const i=await this._tokenClient.exchangeCode({client_id:t.client_id,client_secret:t.client_secret,code:e.code,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier,...t.extraTokenParams});Object.assign(e,i)}else s.debug("No code to process")}_validateIdTokenAttributes(e,t){var s;const i=this._logger.create("_validateIdTokenAttributes");i.debug("decoding ID Token JWT");const r=K.decode((s=e.id_token)!=null?s:"");if(r.sub||i.throw(new Error("ID Token is missing a subject claim")),t){const n=K.decode(t);r.sub!==n.sub&&i.throw(new Error("sub in id_token does not match current sub")),r.auth_time&&r.auth_time!==n.auth_time&&i.throw(new Error("auth_time in id_token does not match original auth_time")),r.azp&&r.azp!==n.azp&&i.throw(new Error("azp in id_token does not match original azp")),!r.azp&&n.azp&&i.throw(new Error("azp not in id_token, but present in original id_token"))}e.profile=r}},W=class G{constructor(t){this.id=t.id||O.generateUUIDv4(),this.data=t.data,t.created&&t.created>0?this.created=t.created:this.created=I.getEpochTime(),this.request_type=t.request_type,this.url_state=t.url_state}toStorageString(){return new g("State").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state})}static fromStorageString(t){return g.createStatic("State","fromStorageString"),Promise.resolve(new G(JSON.parse(t)))}static async clearStaleState(t,s){const i=g.createStatic("State","clearStaleState"),r=I.getEpochTime()-s,n=await t.getAllKeys();i.debug("got keys",n);for(let o=0;o<n.length;o++){const a=n[o],c=await t.get(a);let l=!1;if(c)try{const h=await G.fromStorageString(c);i.debug("got item from key:",a,h.created),h.created<=r&&(l=!0)}catch(h){i.error("Error parsing state for key:",a,h),l=!0}else i.debug("no item in storage for key:",a),l=!0;l&&(i.debug("removed item for key:",a),t.remove(a))}}},ge=class Q extends W{constructor(t){super(t),this.code_verifier=t.code_verifier,this.code_challenge=t.code_challenge,this.authority=t.authority,this.client_id=t.client_id,this.redirect_uri=t.redirect_uri,this.scope=t.scope,this.client_secret=t.client_secret,this.extraTokenParams=t.extraTokenParams,this.response_mode=t.response_mode,this.skipUserInfo=t.skipUserInfo}static async create(t){const s=t.code_verifier===!0?O.generateCodeVerifier():t.code_verifier||void 0,i=s?await O.generateCodeChallenge(s):void 0;return new Q({...t,code_verifier:s,code_challenge:i})}toStorageString(){return new g("SigninState").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state,code_verifier:this.code_verifier,authority:this.authority,client_id:this.client_id,redirect_uri:this.redirect_uri,scope:this.scope,client_secret:this.client_secret,extraTokenParams:this.extraTokenParams,response_mode:this.response_mode,skipUserInfo:this.skipUserInfo})}static fromStorageString(t){g.createStatic("SigninState","fromStorageString");const s=JSON.parse(t);return Q.create(s)}},he=class ue{constructor(t){this.url=t.url,this.state=t.state}static async create({url:t,authority:s,client_id:i,redirect_uri:r,response_type:n,scope:o,state_data:a,response_mode:c,request_type:l,client_secret:h,nonce:d,url_state:_,resource:p,skipUserInfo:m,extraQueryParams:S,extraTokenParams:v,disablePKCE:x,...U}){if(!t)throw this._logger.error("create: No url passed"),new Error("url");if(!i)throw this._logger.error("create: No client_id passed"),new Error("client_id");if(!r)throw this._logger.error("create: No redirect_uri passed"),new Error("redirect_uri");if(!n)throw this._logger.error("create: No response_type passed"),new Error("response_type");if(!o)throw this._logger.error("create: No scope passed"),new Error("scope");if(!s)throw this._logger.error("create: No authority passed"),new Error("authority");const w=await ge.create({data:a,request_type:l,url_state:_,code_verifier:!x,client_id:i,authority:s,redirect_uri:r,response_mode:c,client_secret:h,scope:o,extraTokenParams:v,skipUserInfo:m}),u=new URL(t);u.searchParams.append("client_id",i),u.searchParams.append("redirect_uri",r),u.searchParams.append("response_type",n),u.searchParams.append("scope",o),d&&u.searchParams.append("nonce",d);let E=w.id;_&&(E=`${E}${B}${_}`),u.searchParams.append("state",E),w.code_challenge&&(u.searchParams.append("code_challenge",w.code_challenge),u.searchParams.append("code_challenge_method","S256")),p&&(Array.isArray(p)?p:[p]).forEach(f=>u.searchParams.append("resource",f));for(const[T,f]of Object.entries({response_mode:c,...U,...S}))f!=null&&u.searchParams.append(T,f.toString());return new ue({url:u.href,state:w})}};he._logger=new g("SigninRequest");var Ye=he,Xe="openid",L=class{constructor(e){if(this.access_token="",this.token_type="",this.profile={},this.state=e.get("state"),this.session_state=e.get("session_state"),this.state){const t=decodeURIComponent(this.state).split(B);this.state=t[0],t.length>1&&(this.url_state=t.slice(1).join(B))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri"),this.code=e.get("code")}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-I.getEpochTime()}set expires_in(e){typeof e=="string"&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+I.getEpochTime())}get isOpenId(){var e;return((e=this.scope)==null?void 0:e.split(" ").includes(Xe))||!!this.id_token}},Ze=class{constructor({url:e,state_data:t,id_token_hint:s,post_logout_redirect_uri:i,extraQueryParams:r,request_type:n,client_id:o}){if(this._logger=new g("SignoutRequest"),!e)throw this._logger.error("ctor: No url passed"),new Error("url");const a=new URL(e);s&&a.searchParams.append("id_token_hint",s),o&&a.searchParams.append("client_id",o),i&&(a.searchParams.append("post_logout_redirect_uri",i),t&&(this.state=new W({data:t,request_type:n}),a.searchParams.append("state",this.state.id)));for(const[c,l]of Object.entries({...r}))l!=null&&a.searchParams.append(c,l.toString());this.url=a.href}},et=class{constructor(e){this.state=e.get("state"),this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri")}},tt=["nbf","jti","auth_time","nonce","acr","amr","azp","at_hash"],st=["sub","iss","aud","exp","iat"],it=class{constructor(e){this._settings=e,this._logger=new g("ClaimsService")}filterProtocolClaims(e){const t={...e};if(this._settings.filterProtocolClaims){let s;Array.isArray(this._settings.filterProtocolClaims)?s=this._settings.filterProtocolClaims:s=tt;for(const i of s)st.includes(i)||delete t[i]}return t}mergeClaims(e,t){const s={...e};for(const[i,r]of Object.entries(t))if(s[i]!==r)if(Array.isArray(s[i])||Array.isArray(r))if(this._settings.mergeClaimsStrategy.array=="replace")s[i]=r;else{const n=Array.isArray(s[i])?s[i]:[s[i]];for(const o of Array.isArray(r)?r:[r])n.includes(o)||n.push(o);s[i]=n}else typeof s[i]=="object"&&typeof r=="object"?s[i]=this.mergeClaims(s[i],r):s[i]=r;return s}},rt=class{constructor(e,t){this._logger=new g("OidcClient"),this.settings=e instanceof V?e:new V(e),this.metadataService=t!=null?t:new Je(this.settings),this._claimsService=new it(this.settings),this._validator=new Qe(this.settings,this.metadataService,this._claimsService),this._tokenClient=new de(this.settings,this.metadataService)}async createSigninRequest({state:e,request:t,request_uri:s,request_type:i,id_token_hint:r,login_hint:n,skipUserInfo:o,nonce:a,url_state:c,response_type:l=this.settings.response_type,scope:h=this.settings.scope,redirect_uri:d=this.settings.redirect_uri,prompt:_=this.settings.prompt,display:p=this.settings.display,max_age:m=this.settings.max_age,ui_locales:S=this.settings.ui_locales,acr_values:v=this.settings.acr_values,resource:x=this.settings.resource,response_mode:U=this.settings.response_mode,extraQueryParams:w=this.settings.extraQueryParams,extraTokenParams:u=this.settings.extraTokenParams}){const E=this._logger.create("createSigninRequest");if(l!=="code")throw new Error("Only the Authorization Code flow (with PKCE) is supported");const T=await this.metadataService.getAuthorizationEndpoint();E.debug("Received authorization endpoint",T);const f=await Ye.create({url:T,authority:this.settings.authority,client_id:this.settings.client_id,redirect_uri:d,response_type:l,scope:h,state_data:e,url_state:c,prompt:_,display:p,max_age:m,ui_locales:S,id_token_hint:r,login_hint:n,acr_values:v,resource:x,request:t,request_uri:s,extraQueryParams:w,extraTokenParams:u,request_type:i,response_mode:U,client_secret:this.settings.client_secret,skipUserInfo:o,nonce:a,disablePKCE:this.settings.disablePKCE});await this.clearStaleState();const C=f.state;return await this.settings.stateStore.set(C.id,C.toStorageString()),f}async readSigninResponseState(e,t=!1){const s=this._logger.create("readSigninResponseState"),i=new L(z.readParams(e,this.settings.response_mode));if(!i.state)throw s.throw(new Error("No state in response")),null;const r=await this.settings.stateStore[t?"remove":"get"](i.state);if(!r)throw s.throw(new Error("No matching state found in storage")),null;return{state:await ge.fromStorageString(r),response:i}}async processSigninResponse(e){const t=this._logger.create("processSigninResponse"),{state:s,response:i}=await this.readSigninResponseState(e,!0);return t.debug("received state from storage; validating response"),await this._validator.validateSigninResponse(i,s),i}async processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:s=!1,extraTokenParams:i={}}){const r=await this._tokenClient.exchangeCredentials({username:e,password:t,...i}),n=new L(new URLSearchParams);return Object.assign(n,r),await this._validator.validateCredentialsResponse(n,s),n}async useRefreshToken({state:e,redirect_uri:t,resource:s,timeoutInSeconds:i,extraTokenParams:r}){var n;const o=this._logger.create("useRefreshToken");let a;if(this.settings.refreshTokenAllowedScope===void 0)a=e.scope;else{const h=this.settings.refreshTokenAllowedScope.split(" ");a=(((n=e.scope)==null?void 0:n.split(" "))||[]).filter(_=>h.includes(_)).join(" ")}const c=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:a,redirect_uri:t,resource:s,timeoutInSeconds:i,...r}),l=new L(new URLSearchParams);return Object.assign(l,c),o.debug("validating response",l),await this._validator.validateRefreshResponse(l,{...e,scope:a}),l}async createSignoutRequest({state:e,id_token_hint:t,client_id:s,request_type:i,post_logout_redirect_uri:r=this.settings.post_logout_redirect_uri,extraQueryParams:n=this.settings.extraQueryParams}={}){const o=this._logger.create("createSignoutRequest"),a=await this.metadataService.getEndSessionEndpoint();if(!a)throw o.throw(new Error("No end session endpoint")),null;o.debug("Received end session endpoint",a),!s&&r&&!t&&(s=this.settings.client_id);const c=new Ze({url:a,id_token_hint:t,client_id:s,post_logout_redirect_uri:r,state_data:e,extraQueryParams:n,request_type:i});await this.clearStaleState();const l=c.state;return l&&(o.debug("Signout request has state to persist"),await this.settings.stateStore.set(l.id,l.toStorageString())),c}async readSignoutResponseState(e,t=!1){const s=this._logger.create("readSignoutResponseState"),i=new et(z.readParams(e,this.settings.response_mode));if(!i.state){if(s.debug("No state in response"),i.error)throw s.warn("Response was error:",i.error),new A(i);return{state:void 0,response:i}}const r=await this.settings.stateStore[t?"remove":"get"](i.state);if(!r)throw s.throw(new Error("No matching state found in storage")),null;return{state:await W.fromStorageString(r),response:i}}async processSignoutResponse(e){const t=this._logger.create("processSignoutResponse"),{state:s,response:i}=await this.readSignoutResponseState(e,!0);return s?(t.debug("Received state from storage; validating response"),this._validator.validateSignoutResponse(i,s)):t.debug("No state from storage; skipping response validation"),i}clearStaleState(){return this._logger.create("clearStaleState"),W.clearStaleState(this.settings.stateStore,this.settings.staleStateAgeInSeconds)}async revokeToken(e,t){return this._logger.create("revokeToken"),await this._tokenClient.revoke({token:e,token_type_hint:t})}},nt=class{constructor(e){this._userManager=e,this._logger=new g("SessionMonitor"),this._start=async t=>{const s=t.session_state;if(!s)return;const i=this._logger.create("_start");if(t.profile?(this._sub=t.profile.sub,i.debug("session_state",s,", sub",this._sub)):(this._sub=void 0,i.debug("session_state",s,", anonymous user")),this._checkSessionIFrame){this._checkSessionIFrame.start(s);return}try{const r=await this._userManager.metadataService.getCheckSessionIframe();if(r){i.debug("initializing check session iframe");const n=this._userManager.settings.client_id,o=this._userManager.settings.checkSessionIntervalInSeconds,a=this._userManager.settings.stopCheckSessionOnError,c=new Le(this._callback,n,r,o,a);await c.load(),this._checkSessionIFrame=c,c.start(s)}else i.warn("no check session iframe found in the metadata")}catch(r){i.error("Error from getCheckSessionIframe:",r instanceof Error?r.message:r)}},this._stop=()=>{const t=this._logger.create("_stop");if(this._sub=void 0,this._checkSessionIFrame&&this._checkSessionIFrame.stop(),this._userManager.settings.monitorAnonymousSession){const s=setInterval(async()=>{clearInterval(s);try{const i=await this._userManager.querySessionStatus();if(i){const r={session_state:i.session_state,profile:i.sub?{sub:i.sub}:null};this._start(r)}}catch(i){t.error("error from querySessionStatus",i instanceof Error?i.message:i)}},1e3)}},this._callback=async()=>{const t=this._logger.create("_callback");try{const s=await this._userManager.querySessionStatus();let i=!0;s&&this._checkSessionIFrame?s.sub===this._sub?(i=!1,this._checkSessionIFrame.start(s.session_state),t.debug("same sub still logged in at OP, session state has changed, restarting check session iframe; session_state",s.session_state),await this._userManager.events._raiseUserSessionChanged()):t.debug("different subject signed into OP",s.sub):t.debug("subject no longer signed into OP"),i?this._sub?await this._userManager.events._raiseUserSignedOut():await this._userManager.events._raiseUserSignedIn():t.debug("no change in session detected, no event to raise")}catch(s){this._sub&&(t.debug("Error calling queryCurrentSigninSession; raising signed out event",s),await this._userManager.events._raiseUserSignedOut())}},e||this._logger.throw(new Error("No user manager passed")),this._userManager.events.addUserLoaded(this._start),this._userManager.events.addUserUnloaded(this._stop),this._init().catch(t=>{this._logger.error(t)})}async _init(){this._logger.create("_init");const e=await this._userManager.getUser();if(e)this._start(e);else if(this._userManager.settings.monitorAnonymousSession){const t=await this._userManager.querySessionStatus();if(t){const s={session_state:t.session_state,profile:t.sub?{sub:t.sub}:null};this._start(s)}}}},J=class _e{constructor(t){var s;this.id_token=t.id_token,this.session_state=(s=t.session_state)!=null?s:null,this.access_token=t.access_token,this.refresh_token=t.refresh_token,this.token_type=t.token_type,this.scope=t.scope,this.profile=t.profile,this.expires_at=t.expires_at,this.state=t.userState,this.url_state=t.url_state}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-I.getEpochTime()}set expires_in(t){t!==void 0&&(this.expires_at=Math.floor(t)+I.getEpochTime())}get expired(){const t=this.expires_in;if(t!==void 0)return t<=0}get scopes(){var t,s;return(s=(t=this.scope)==null?void 0:t.split(" "))!=null?s:[]}toStorageString(){return new g("User").create("toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(t){return g.createStatic("User","fromStorageString"),new _e(JSON.parse(t))}},ie="oidc-client",pe=class{constructor(){this._abort=new R("Window navigation aborted"),this._disposeHandlers=new Set,this._window=null}async navigate(e){const t=this._logger.create("navigate");if(!this._window)throw new Error("Attempted to navigate on a disposed window");t.debug("setting URL in window"),this._window.location.replace(e.url);const{url:s,keepOpen:i}=await new Promise((r,n)=>{const o=a=>{var c;const l=a.data,h=(c=e.scriptOrigin)!=null?c:window.location.origin;if(!(a.origin!==h||(l==null?void 0:l.source)!==ie)){try{const d=z.readParams(l.url,e.response_mode).get("state");if(d||t.warn("no state found in response url"),a.source!==this._window&&d!==e.state)return}catch{this._dispose(),n(new Error("Invalid response from window"))}r(l)}};window.addEventListener("message",o,!1),this._disposeHandlers.add(()=>window.removeEventListener("message",o,!1)),this._disposeHandlers.add(this._abort.addHandler(a=>{this._dispose(),n(a)}))});return t.debug("got response from window"),this._dispose(),i||this.close(),{url:s}}_dispose(){this._logger.create("_dispose");for(const e of this._disposeHandlers)e();this._disposeHandlers.clear()}static _notifyParent(e,t,s=!1,i=window.location.origin){e.postMessage({source:ie,url:t,keepOpen:s},i)}},fe={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},we="_blank",ot=60,at=2,me=10,ct=class extends V{constructor(e){const{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:s=e.post_logout_redirect_uri,popupWindowFeatures:i=fe,popupWindowTarget:r=we,redirectMethod:n="assign",redirectTarget:o="self",iframeNotifyParentOrigin:a=e.iframeNotifyParentOrigin,iframeScriptOrigin:c=e.iframeScriptOrigin,silent_redirect_uri:l=e.redirect_uri,silentRequestTimeoutInSeconds:h=me,automaticSilentRenew:d=!0,validateSubOnSilentRenew:_=!0,includeIdTokenInSilentRenew:p=!1,monitorSession:m=!1,monitorAnonymousSession:S=!1,checkSessionIntervalInSeconds:v=at,query_status_response_type:x="code",stopCheckSessionOnError:U=!0,revokeTokenTypes:w=["access_token","refresh_token"],revokeTokensOnSignout:u=!1,includeIdTokenInSilentSignout:E=!1,accessTokenExpiringNotificationTimeInSeconds:T=ot,userStore:f}=e;if(super(e),this.popup_redirect_uri=t,this.popup_post_logout_redirect_uri=s,this.popupWindowFeatures=i,this.popupWindowTarget=r,this.redirectMethod=n,this.redirectTarget=o,this.iframeNotifyParentOrigin=a,this.iframeScriptOrigin=c,this.silent_redirect_uri=l,this.silentRequestTimeoutInSeconds=h,this.automaticSilentRenew=d,this.validateSubOnSilentRenew=_,this.includeIdTokenInSilentRenew=p,this.monitorSession=m,this.monitorAnonymousSession=S,this.checkSessionIntervalInSeconds=v,this.stopCheckSessionOnError=U,this.query_status_response_type=x,this.revokeTokenTypes=w,this.revokeTokensOnSignout=u,this.includeIdTokenInSilentSignout=E,this.accessTokenExpiringNotificationTimeInSeconds=T,f)this.userStore=f;else{const C=typeof window<"u"?window.sessionStorage:new ce;this.userStore=new le({store:C})}}},re=class Se extends pe{constructor({silentRequestTimeoutInSeconds:t=me}){super(),this._logger=new g("IFrameWindow"),this._timeoutInSeconds=t,this._frame=Se.createHiddenIframe(),this._window=this._frame.contentWindow}static createHiddenIframe(){const t=window.document.createElement("iframe");return t.style.visibility="hidden",t.style.position="fixed",t.style.left="-1000px",t.style.top="0",t.width="0",t.height="0",window.document.body.appendChild(t),t}async navigate(t){this._logger.debug("navigate: Using timeout of:",this._timeoutInSeconds);const s=setTimeout(()=>void this._abort.raise(new X("IFrame timed out without a response")),this._timeoutInSeconds*1e3);return this._disposeHandlers.add(()=>clearTimeout(s)),await super.navigate(t)}close(){var t;this._frame&&(this._frame.parentNode&&(this._frame.addEventListener("load",s=>{var i;const r=s.target;(i=r.parentNode)==null||i.removeChild(r),this._abort.raise(new Error("IFrame removed from DOM"))},!0),(t=this._frame.contentWindow)==null||t.location.replace("about:blank")),this._frame=null),this._window=null}static notifyParent(t,s){return super._notifyParent(window.parent,t,!1,s)}},lt=class{constructor(e){this._settings=e,this._logger=new g("IFrameNavigator")}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new re({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create("callback"),re.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},dt=500,gt=1e3,ne=class extends pe{constructor({popupWindowTarget:e=we,popupWindowFeatures:t={}}){super(),this._logger=new g("PopupWindow");const s=se.center({...fe,...t});this._window=window.open(void 0,e,se.serialize(s)),t.closePopupWindowAfterInSeconds&&t.closePopupWindowAfterInSeconds>0&&setTimeout(()=>{if(!this._window||typeof this._window.closed!="boolean"||this._window.closed){this._abort.raise(new Error("Popup blocked by user"));return}this.close()},t.closePopupWindowAfterInSeconds*gt)}async navigate(e){var t;(t=this._window)==null||t.focus();const s=setInterval(()=>{(!this._window||this._window.closed)&&this._abort.raise(new Error("Popup closed by user"))},dt);return this._disposeHandlers.add(()=>clearInterval(s)),await super.navigate(e)}close(){this._window&&(this._window.closed||(this._window.close(),this._abort.raise(new Error("Popup closed")))),this._window=null}static notifyOpener(e,t){if(!window.opener)throw new Error("No window.opener. Can't complete notification.");return super._notifyParent(window.opener,e,t)}},ht=class{constructor(e){this._settings=e,this._logger=new g("PopupNavigator")}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:t=this._settings.popupWindowTarget}){return new ne({popupWindowFeatures:e,popupWindowTarget:t})}async callback(e,{keepOpen:t=!1}){this._logger.create("callback"),ne.notifyOpener(e,t)}},ut=class{constructor(e){this._settings=e,this._logger=new g("RedirectNavigator")}async prepare({redirectMethod:e=this._settings.redirectMethod,redirectTarget:t=this._settings.redirectTarget}){var s;this._logger.create("prepare");let i=window.self;t==="top"&&(i=(s=window.top)!=null?s:window.self);const r=i.location[e].bind(i.location);let n;return{navigate:async o=>{this._logger.create("navigate");const a=new Promise((c,l)=>{n=l});return r(o.url),await a},close:()=>{this._logger.create("close"),n==null||n(new Error("Redirect aborted")),i.stop()}}}async callback(){}},_t=class extends $e{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new g("UserManagerEvents"),this._userLoaded=new R("User loaded"),this._userUnloaded=new R("User unloaded"),this._silentRenewError=new R("Silent renew error"),this._userSignedIn=new R("User signed in"),this._userSignedOut=new R("User signed out"),this._userSessionChanged=new R("User session changed")}async load(e,t=!0){super.load(e),t&&await this._userLoaded.raise(e)}async unload(){super.unload(),await this._userUnloaded.raise()}addUserLoaded(e){return this._userLoaded.addHandler(e)}removeUserLoaded(e){return this._userLoaded.removeHandler(e)}addUserUnloaded(e){return this._userUnloaded.addHandler(e)}removeUserUnloaded(e){return this._userUnloaded.removeHandler(e)}addSilentRenewError(e){return this._silentRenewError.addHandler(e)}removeSilentRenewError(e){return this._silentRenewError.removeHandler(e)}async _raiseSilentRenewError(e){await this._silentRenewError.raise(e)}addUserSignedIn(e){return this._userSignedIn.addHandler(e)}removeUserSignedIn(e){this._userSignedIn.removeHandler(e)}async _raiseUserSignedIn(){await this._userSignedIn.raise()}addUserSignedOut(e){return this._userSignedOut.addHandler(e)}removeUserSignedOut(e){this._userSignedOut.removeHandler(e)}async _raiseUserSignedOut(){await this._userSignedOut.raise()}addUserSessionChanged(e){return this._userSessionChanged.addHandler(e)}removeUserSessionChanged(e){this._userSessionChanged.removeHandler(e)}async _raiseUserSessionChanged(){await this._userSessionChanged.raise()}},pt=class{constructor(e){this._userManager=e,this._logger=new g("SilentRenewService"),this._isStarted=!1,this._retryTimer=new I("Retry Silent Renew"),this._tokenExpiring=async()=>{const t=this._logger.create("_tokenExpiring");try{await this._userManager.signinSilent(),t.debug("silent token renewal successful")}catch(s){if(s instanceof X){t.warn("ErrorTimeout from signinSilent:",s,"retry in 5s"),this._retryTimer.init(5);return}t.error("Error from signinSilent:",s),await this._userManager.events._raiseSilentRenewError(s)}}}async start(){const e=this._logger.create("start");if(!this._isStarted){this._isStarted=!0,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring),this._retryTimer.addHandler(this._tokenExpiring);try{await this._userManager.getUser()}catch(t){e.error("getUser error",t)}}}stop(){this._isStarted&&(this._retryTimer.cancel(),this._retryTimer.removeHandler(this._tokenExpiring),this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring),this._isStarted=!1)}},ft=class{constructor(e){this.refresh_token=e.refresh_token,this.id_token=e.id_token,this.session_state=e.session_state,this.scope=e.scope,this.profile=e.profile,this.data=e.state}},wt=class{constructor(e,t,s,i){this._logger=new g("UserManager"),this.settings=new ct(e),this._client=new rt(e),this._redirectNavigator=t!=null?t:new ut(this.settings),this._popupNavigator=s!=null?s:new ht(this.settings),this._iframeNavigator=i!=null?i:new lt(this.settings),this._events=new _t(this.settings),this._silentRenewService=new pt(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new nt(this))}get events(){return this._events}get metadataService(){return this._client.metadataService}async getUser(){const e=this._logger.create("getUser"),t=await this._loadUser();return t?(e.info("user loaded"),await this._events.load(t,!1),t):(e.info("user not found in storage"),null)}async removeUser(){const e=this._logger.create("removeUser");await this.storeUser(null),e.info("user removed from storage"),await this._events.unload()}async signinRedirect(e={}){this._logger.create("signinRedirect");const{redirectMethod:t,...s}=e,i=await this._redirectNavigator.prepare({redirectMethod:t});await this._signinStart({request_type:"si:r",...s},i)}async signinRedirectCallback(e=window.location.href){const t=this._logger.create("signinRedirectCallback"),s=await this._signinEnd(e);return s.profile&&s.profile.sub?t.info("success, signed in subject",s.profile.sub):t.info("no subject"),s}async signinResourceOwnerCredentials({username:e,password:t,skipUserInfo:s=!1}){const i=this._logger.create("signinResourceOwnerCredential"),r=await this._client.processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:s,extraTokenParams:this.settings.extraTokenParams});i.debug("got signin response");const n=await this._buildUser(r);return n.profile&&n.profile.sub?i.info("success, signed in subject",n.profile.sub):i.info("no subject"),n}async signinPopup(e={}){const t=this._logger.create("signinPopup"),{popupWindowFeatures:s,popupWindowTarget:i,...r}=e,n=this.settings.popup_redirect_uri;n||t.throw(new Error("No popup_redirect_uri configured"));const o=await this._popupNavigator.prepare({popupWindowFeatures:s,popupWindowTarget:i}),a=await this._signin({request_type:"si:p",redirect_uri:n,display:"popup",...r},o);return a&&(a.profile&&a.profile.sub?t.info("success, signed in subject",a.profile.sub):t.info("no subject")),a}async signinPopupCallback(e=window.location.href,t=!1){const s=this._logger.create("signinPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),s.info("success")}async signinSilent(e={}){var t;const s=this._logger.create("signinSilent"),{silentRequestTimeoutInSeconds:i,...r}=e;let n=await this._loadUser();if(n!=null&&n.refresh_token){s.debug("using refresh token");const l=new ft(n);return await this._useRefreshToken({state:l,redirect_uri:r.redirect_uri,resource:r.resource,extraTokenParams:r.extraTokenParams,timeoutInSeconds:i})}const o=this.settings.silent_redirect_uri;o||s.throw(new Error("No silent_redirect_uri configured"));let a;n&&this.settings.validateSubOnSilentRenew&&(s.debug("subject prior to silent renew:",n.profile.sub),a=n.profile.sub);const c=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:i});return n=await this._signin({request_type:"si:s",redirect_uri:o,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?n==null?void 0:n.id_token:void 0,...r},c,a),n&&((t=n.profile)!=null&&t.sub?s.info("success, signed in subject",n.profile.sub):s.info("no subject")),n}async _useRefreshToken(e){const t=await this._client.useRefreshToken({...e,timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds}),s=new J({...e.state,...t});return await this.storeUser(s),await this._events.load(s),s}async signinSilentCallback(e=window.location.href){const t=this._logger.create("signinSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async signinCallback(e=window.location.href){const{state:t}=await this._client.readSigninResponseState(e);switch(t.request_type){case"si:r":return await this.signinRedirectCallback(e);case"si:p":return await this.signinPopupCallback(e);case"si:s":return await this.signinSilentCallback(e);default:throw new Error("invalid response_type in state")}}async signoutCallback(e=window.location.href,t=!1){const{state:s}=await this._client.readSignoutResponseState(e);if(!!s)switch(s.request_type){case"so:r":await this.signoutRedirectCallback(e);break;case"so:p":await this.signoutPopupCallback(e,t);break;case"so:s":await this.signoutSilentCallback(e);break;default:throw new Error("invalid response_type in state")}}async querySessionStatus(e={}){const t=this._logger.create("querySessionStatus"),{silentRequestTimeoutInSeconds:s,...i}=e,r=this.settings.silent_redirect_uri;r||t.throw(new Error("No silent_redirect_uri configured"));const n=await this._loadUser(),o=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:s}),a=await this._signinStart({request_type:"si:s",redirect_uri:r,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?n==null?void 0:n.id_token:void 0,response_type:this.settings.query_status_response_type,scope:"openid",skipUserInfo:!0,...i},o);try{const c=await this._client.processSigninResponse(a.url);return t.debug("got signin response"),c.session_state&&c.profile.sub?(t.info("success for subject",c.profile.sub),{session_state:c.session_state,sub:c.profile.sub}):(t.info("success, user not authenticated"),null)}catch(c){if(this.settings.monitorAnonymousSession&&c instanceof A)switch(c.error){case"login_required":case"consent_required":case"interaction_required":case"account_selection_required":return t.info("success for anonymous user"),{session_state:c.session_state}}throw c}}async _signin(e,t,s){const i=await this._signinStart(e,t);return await this._signinEnd(i.url,s)}async _signinStart(e,t){const s=this._logger.create("_signinStart");try{const i=await this._client.createSigninRequest(e);return s.debug("got signin request"),await t.navigate({url:i.url,state:i.state.id,response_mode:i.state.response_mode,scriptOrigin:this.settings.iframeScriptOrigin})}catch(i){throw s.debug("error after preparing navigator, closing navigator window"),t.close(),i}}async _signinEnd(e,t){const s=this._logger.create("_signinEnd"),i=await this._client.processSigninResponse(e);return s.debug("got signin response"),await this._buildUser(i,t)}async _buildUser(e,t){const s=this._logger.create("_buildUser"),i=new J(e);if(t){if(t!==i.profile.sub)throw s.debug("current user does not match user returned from signin. sub from signin:",i.profile.sub),new A({...e,error:"login_required"});s.debug("current user matches user returned from signin")}return await this.storeUser(i),s.debug("user stored"),await this._events.load(i),i}async signoutRedirect(e={}){const t=this._logger.create("signoutRedirect"),{redirectMethod:s,...i}=e,r=await this._redirectNavigator.prepare({redirectMethod:s});await this._signoutStart({request_type:"so:r",post_logout_redirect_uri:this.settings.post_logout_redirect_uri,...i},r),t.info("success")}async signoutRedirectCallback(e=window.location.href){const t=this._logger.create("signoutRedirectCallback"),s=await this._signoutEnd(e);return t.info("success"),s}async signoutPopup(e={}){const t=this._logger.create("signoutPopup"),{popupWindowFeatures:s,popupWindowTarget:i,...r}=e,n=this.settings.popup_post_logout_redirect_uri,o=await this._popupNavigator.prepare({popupWindowFeatures:s,popupWindowTarget:i});await this._signout({request_type:"so:p",post_logout_redirect_uri:n,state:n==null?void 0:{},...r},o),t.info("success")}async signoutPopupCallback(e=window.location.href,t=!1){const s=this._logger.create("signoutPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),s.info("success")}async _signout(e,t){const s=await this._signoutStart(e,t);return await this._signoutEnd(s.url)}async _signoutStart(e={},t){var s;const i=this._logger.create("_signoutStart");try{const r=await this._loadUser();i.debug("loaded current user from storage"),this.settings.revokeTokensOnSignout&&await this._revokeInternal(r);const n=e.id_token_hint||r&&r.id_token;n&&(i.debug("setting id_token_hint in signout request"),e.id_token_hint=n),await this.removeUser(),i.debug("user removed, creating signout request");const o=await this._client.createSignoutRequest(e);return i.debug("got signout request"),await t.navigate({url:o.url,state:(s=o.state)==null?void 0:s.id,scriptOrigin:this.settings.iframeScriptOrigin})}catch(r){throw i.debug("error after preparing navigator, closing navigator window"),t.close(),r}}async _signoutEnd(e){const t=this._logger.create("_signoutEnd"),s=await this._client.processSignoutResponse(e);return t.debug("got signout response"),s}async signoutSilent(e={}){var t;const s=this._logger.create("signoutSilent"),{silentRequestTimeoutInSeconds:i,...r}=e,n=this.settings.includeIdTokenInSilentSignout?(t=await this._loadUser())==null?void 0:t.id_token:void 0,o=this.settings.popup_post_logout_redirect_uri,a=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:i});await this._signout({request_type:"so:s",post_logout_redirect_uri:o,id_token_hint:n,...r},a),s.info("success")}async signoutSilentCallback(e=window.location.href){const t=this._logger.create("signoutSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async revokeTokens(e){const t=await this._loadUser();await this._revokeInternal(t,e)}async _revokeInternal(e,t=this.settings.revokeTokenTypes){const s=this._logger.create("_revokeInternal");if(!e)return;const i=t.filter(r=>typeof e[r]=="string");if(!i.length){s.debug("no need to revoke due to no token(s)");return}for(const r of i)await this._client.revokeToken(e[r],r),s.info(`${r} revoked successfully`),r!=="access_token"&&(e[r]=null);await this.storeUser(e),s.debug("user stored"),await this._events.load(e)}startSilentRenew(){this._logger.create("startSilentRenew"),this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}async _loadUser(){const e=this._logger.create("_loadUser"),t=await this.settings.userStore.get(this._userStoreKey);return t?(e.debug("user storageString loaded"),J.fromStorageString(t)):(e.debug("no user storageString"),null)}async storeUser(e){const t=this._logger.create("storeUser");if(e){t.debug("storing user");const s=e.toStorageString();await this.settings.userStore.set(this._userStoreKey,s)}else this._logger.debug("removing user"),await this.settings.userStore.remove(this._userStoreKey)}async clearStaleState(){await this._client.clearStaleState()}};class Rt{async authenticate(t,s){try{const i=await fetch("/_auth/authenticate",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:t,isResend:s})});if(!i.ok)throw new Error(await i.text());return null}catch(i){return i instanceof Error?i.message:"Error authenticating user"}}async verify(t,s){const i=await fetch("/_auth/verify",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:t,token:s})});if(!i.ok){if(i.status==410)throw new Error("expired");return null}return(await i.json()).jwt}}const j=class{constructor(){N(this,"oidcUserManager");if(!j.isConfigured())throw new Error("OIDCUserProvider is not configured");const t={authority:j.authority,client_id:j.clientID,redirect_uri:window.location.origin+"/oidc-login-callback"};this.oidcUserManager=new wt(t)}static init(t,s){this.clientID=t,this.authority=s}static isConfigured(){return!!this.clientID&&!!this.authority}async login(){const t=await this.oidcUserManager.signinPopup({scope:"openid profile email"}),s=await fetch("/_auth/oidc-verify",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({access_token:t.access_token})});return s.ok?(await s.json()).jwt:null}async loginCallback(){await this.oidcUserManager.signinPopupCallback()}async logout(){await this.oidcUserManager.signoutPopup({post_logout_redirect_uri:window.location.origin+"/oidc-logout-callback"})}async logoutCallback(){await this.oidcUserManager.signoutPopupCallback()}};let P=j;N(P,"clientID",null),N(P,"authority",null);const xt=async()=>{P.isConfigured()&&new P().logout().catch(Ae)};async function Ut(){const e=await fetch("/_settings");if(!e.ok)throw new Error(await e.text());const t=await e.json();F.init(t)}const $=class{constructor(t){this.config=t}static init(t){P.init(t.oidc_client_id,t.oidc_authority),$.instance=new $(t)}get showWatermark(){return this.config.show_watermark}get isStagingRelease(){return{}.VITE_ABSTRA_RELEASE==="staging"}get isLocal(){return location.origin.match(/http:\/\/localhost:\d+/)}get showLogout(){return this.config.editor_mode==="local"}};let F=$;N(F,"instance",null);function oe(e,t,s){return qe(t)?t:s==="player"?`/_assets/${e}`:`/_editor/api/assets/${t}`}const ve="#414a58",ye="#FFFFFF",mt="#000000",be="DM Sans",St="Untitled Project",ke={value:"en",label:"English"};function vt(e){var t,s,i,r,n,o,a,c,l,h,d,_,p,m,S,v;return{id:e.id,path:e.path,theme:(t=e.workspace.theme)!=null?t:ye,brandName:(s=e.workspace.brand_name)!=null?s:null,title:e.title,isInitial:e.is_initial,isLocal:(i=e.is_local)!=null?i:!1,startMessage:(r=e.start_message)!=null?r:null,endMessage:(n=e.end_message)!=null?n:null,errorMessage:(o=e.error_message)!=null?o:null,timeoutMessage:(a=e.timeout_message)!=null?a:null,startButtonText:(c=e.start_button_text)!=null?c:null,restartButtonText:(l=e.restart_button_text)!=null?l:null,logoUrl:e.workspace.logo_url,mainColor:(h=e.workspace.main_color)!=null?h:ve,fontFamily:(d=e.workspace.font_family)!=null?d:be,autoStart:(_=e.auto_start)!=null?_:!1,allowRestart:e.allow_restart,welcomeTitle:(p=e.welcome_title)!=null?p:null,runtimeType:"form",language:(m=e.workspace.language)!=null?m:ke.value,sidebar:(v=(S=e.workspace)==null?void 0:S.sidebar)!=null?v:[]}}function ae(e){var s;const t=(s=e.theme)!=null?s:ye;return{name:e.name||St,fontColor:e.font_color||mt,sidebar:e.sidebar||[],brandName:e.brand_name||"",fontFamily:e.font_family||be,logoUrl:e.logo_url?oe("logo",e.logo_url,"player"):null,mainColor:e.main_color||ve,theme:Me(t)?t:oe("background",t,"player"),language:e.language||ke.value}}async function Ct(e){const t=Y(),s=await fetch(`/_pages/${e}`,{headers:t.authHeaders});if(s.status===404)return null;if(!s.ok)throw new Error(await s.text());const{form:i}=await s.json();return i?vt(i):null}async function yt(){const e=Y(),t=await fetch("/_workspace",{headers:e.authHeaders});if(t.status!=200)return ae({});const s=await t.json();return ae(s)}async function Pt(e){const t=Y();return(await fetch(`/_access-control/allow${e}`,{headers:t.authHeaders})).json()}const At=Oe("workspace",()=>{const e=Ne({workspace:null,loading:!1});return{state:e,actions:{async fetch(){e.value.loading=!0,e.value.workspace=await yt(),e.value.loading=!1}}}});export{Rt as A,ve as D,P as O,F as S,Pt as a,be as b,ke as c,ye as d,Ct as f,xt as l,oe as m,Ut as s,At as u};
2
- //# sourceMappingURL=workspaceStore.4f0c433f.js.map
1
+ var Ce=Object.defineProperty;var Pe=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var N=(e,t,s)=>(Pe(e,typeof t!="symbol"?t+"":t,s),s);import{H as Ae,k as Oe,r as Ne}from"./jwt-decode.esm.1b301f74.js";import{u as Y}from"./userStore.843da693.js";import{i as Me}from"./url.84e62ca8.js";import{i as qe}from"./colorHelpers.59e5ee56.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="63ecbee5-3430-47b1-badf-4af3b8b7f63b",e._sentryDebugIdIdentifier="sentry-dbid-63ecbee5-3430-47b1-badf-4af3b8b7f63b")}catch{}})();class M extends Error{}M.prototype.name="InvalidTokenError";function je(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,s)=>{let i=s.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}function He(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return je(t)}catch{return atob(t)}}function Fe(e,t){if(typeof e!="string")throw new M("Invalid token specified: must be a string");t||(t={});const s=t.header===!0?0:1,i=e.split(".")[s];if(typeof i!="string")throw new M(`Invalid token specified: missing part #${s+1}`);let r;try{r=He(i)}catch(n){throw new M(`Invalid token specified: invalid base64 for part #${s+1} (${n.message})`)}try{return JSON.parse(r)}catch(n){throw new M(`Invalid token specified: invalid json for part #${s+1} (${n.message})`)}}var De={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}},b,k,D=(e=>(e[e.NONE=0]="NONE",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e))(D||{});(e=>{function t(){b=3,k=De}e.reset=t;function s(r){if(!(0<=r&&r<=4))throw new Error("Invalid log level");b=r}e.setLevel=s;function i(r){k=r}e.setLogger=i})(D||(D={}));var g=class y{constructor(t){this._name=t}debug(...t){b>=4&&k.debug(y._format(this._name,this._method),...t)}info(...t){b>=3&&k.info(y._format(this._name,this._method),...t)}warn(...t){b>=2&&k.warn(y._format(this._name,this._method),...t)}error(...t){b>=1&&k.error(y._format(this._name,this._method),...t)}throw(t){throw this.error(t),t}create(t){const s=Object.create(this);return s._method=t,s.debug("begin"),s}static createStatic(t,s){const i=new y(`${t}.${s}`);return i.debug("begin"),i}static _format(t,s){const i=`[${t}]`;return s?`${i} ${s}:`:i}static debug(t,...s){b>=4&&k.debug(y._format(t),...s)}static info(t,...s){b>=3&&k.info(y._format(t),...s)}static warn(t,...s){b>=2&&k.warn(y._format(t),...s)}static error(t,...s){b>=1&&k.error(y._format(t),...s)}};D.reset();var We="10000000-1000-4000-8000-100000000000",te=e=>btoa([...new Uint8Array(e)].map(t=>String.fromCharCode(t)).join("")),O=class q{static _randomWord(){const t=new Uint32Array(1);return crypto.getRandomValues(t),t[0]}static generateUUIDv4(){return We.replace(/[018]/g,s=>(+s^q._randomWord()&15>>+s/4).toString(16)).replace(/-/g,"")}static generateCodeVerifier(){return q.generateUUIDv4()+q.generateUUIDv4()+q.generateUUIDv4()}static async generateCodeChallenge(t){if(!crypto.subtle)throw new Error("Crypto.subtle is available only in secure contexts (HTTPS).");try{const i=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",i);return te(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(s){throw g.error("CryptoUtils.generateCodeChallenge",s),s}}static generateBasicAuth(t,s){const r=new TextEncoder().encode([t,s].join(":"));return te(r)}},R=class{constructor(e){this._name=e,this._logger=new g(`Event('${this._name}')`),this._callbacks=[]}addHandler(e){return this._callbacks.push(e),()=>this.removeHandler(e)}removeHandler(e){const t=this._callbacks.lastIndexOf(e);t>=0&&this._callbacks.splice(t,1)}async raise(...e){this._logger.debug("raise:",...e);for(const t of this._callbacks)await t(...e)}},K=class{static decode(e){try{return Fe(e)}catch(t){throw g.error("JwtUtils.decode",t),t}}},se=class{static center({...e}){var t,s,i;return e.width==null&&(e.width=(t=[800,720,600,480].find(r=>r<=window.outerWidth/1.618))!=null?t:360),(s=e.left)!=null||(e.left=Math.max(0,Math.round(window.screenX+(window.outerWidth-e.width)/2))),e.height!=null&&((i=e.top)!=null||(e.top=Math.max(0,Math.round(window.screenY+(window.outerHeight-e.height)/2)))),e}static serialize(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,s])=>`${t}=${typeof s!="boolean"?s:s?"yes":"no"}`).join(",")}},I=class H extends R{constructor(){super(...arguments),this._logger=new g(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{const t=this._expiration-H.getEpochTime();this._logger.debug("timer completes in",t),this._expiration<=H.getEpochTime()&&(this.cancel(),super.raise())}}static getEpochTime(){return Math.floor(Date.now()/1e3)}init(t){const s=this._logger.create("init");t=Math.max(Math.floor(t),1);const i=H.getEpochTime()+t;if(this.expiration===i&&this._timerHandle){s.debug("skipping since already initialized for expiration at",this.expiration);return}this.cancel(),s.debug("using duration",t),this._expiration=i;const r=Math.min(t,5);this._timerHandle=setInterval(this._callback,r*1e3)}get expiration(){return this._expiration}cancel(){this._logger.create("cancel"),this._timerHandle&&(clearInterval(this._timerHandle),this._timerHandle=null)}},z=class{static readParams(e,t="query"){if(!e)throw new TypeError("Invalid URL");const i=new URL(e,"http://127.0.0.1")[t==="fragment"?"hash":"search"];return new URLSearchParams(i.slice(1))}},B=";",A=class extends Error{constructor(e,t){var s,i,r;if(super(e.error_description||e.error||""),this.form=t,this.name="ErrorResponse",!e.error)throw g.error("ErrorResponse","No error passed"),new Error("No error passed");this.error=e.error,this.error_description=(s=e.error_description)!=null?s:null,this.error_uri=(i=e.error_uri)!=null?i:null,this.state=e.userState,this.session_state=(r=e.session_state)!=null?r:null,this.url_state=e.url_state}},X=class extends Error{constructor(e){super(e),this.name="ErrorTimeout"}},$e=class{constructor(e){this._logger=new g("AccessTokenEvents"),this._expiringTimer=new I("Access token expiring"),this._expiredTimer=new I("Access token expired"),this._expiringNotificationTimeInSeconds=e.expiringNotificationTimeInSeconds}load(e){const t=this._logger.create("load");if(e.access_token&&e.expires_in!==void 0){const s=e.expires_in;if(t.debug("access token present, remaining duration:",s),s>0){let r=s-this._expiringNotificationTimeInSeconds;r<=0&&(r=1),t.debug("registering expiring timer, raising in",r,"seconds"),this._expiringTimer.init(r)}else t.debug("canceling existing expiring timer because we're past expiration."),this._expiringTimer.cancel();const i=s+1;t.debug("registering expired timer, raising in",i,"seconds"),this._expiredTimer.init(i)}else this._expiringTimer.cancel(),this._expiredTimer.cancel()}unload(){this._logger.debug("unload: canceling existing access token timers"),this._expiringTimer.cancel(),this._expiredTimer.cancel()}addAccessTokenExpiring(e){return this._expiringTimer.addHandler(e)}removeAccessTokenExpiring(e){this._expiringTimer.removeHandler(e)}addAccessTokenExpired(e){return this._expiredTimer.addHandler(e)}removeAccessTokenExpired(e){this._expiredTimer.removeHandler(e)}},Le=class{constructor(e,t,s,i,r){this._callback=e,this._client_id=t,this._intervalInSeconds=i,this._stopOnError=r,this._logger=new g("CheckSessionIFrame"),this._timer=null,this._session_state=null,this._message=o=>{o.origin===this._frame_origin&&o.source===this._frame.contentWindow&&(o.data==="error"?(this._logger.error("error message from check session op iframe"),this._stopOnError&&this.stop()):o.data==="changed"?(this._logger.debug("changed message from check session op iframe"),this.stop(),this._callback()):this._logger.debug(o.data+" message from check session op iframe"))};const n=new URL(s);this._frame_origin=n.origin,this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="fixed",this._frame.style.left="-1000px",this._frame.style.top="0",this._frame.width="0",this._frame.height="0",this._frame.src=n.href}load(){return new Promise(e=>{this._frame.onload=()=>{e()},window.document.body.appendChild(this._frame),window.addEventListener("message",this._message,!1)})}start(e){if(this._session_state===e)return;this._logger.create("start"),this.stop(),this._session_state=e;const t=()=>{!this._frame.contentWindow||!this._session_state||this._frame.contentWindow.postMessage(this._client_id+" "+this._session_state,this._frame_origin)};t(),this._timer=setInterval(t,this._intervalInSeconds*1e3)}stop(){this._logger.create("stop"),this._session_state=null,this._timer&&(clearInterval(this._timer),this._timer=null)}},ce=class{constructor(){this._logger=new g("InMemoryWebStorage"),this._data={}}clear(){this._logger.create("clear"),this._data={}}getItem(e){return this._logger.create(`getItem('${e}')`),this._data[e]}setItem(e,t){this._logger.create(`setItem('${e}')`),this._data[e]=t}removeItem(e){this._logger.create(`removeItem('${e}')`),delete this._data[e]}get length(){return Object.getOwnPropertyNames(this._data).length}key(e){return Object.getOwnPropertyNames(this._data)[e]}},Z=class{constructor(e=[],t=null,s={}){this._jwtHandler=t,this._extraHeaders=s,this._logger=new g("JsonService"),this._contentTypes=[],this._contentTypes.push(...e,"application/json"),t&&this._contentTypes.push("application/jwt")}async fetchWithTimeout(e,t={}){const{timeoutInSeconds:s,...i}=t;if(!s)return await fetch(e,i);const r=new AbortController,n=setTimeout(()=>r.abort(),s*1e3);try{return await fetch(e,{...t,signal:r.signal})}catch(o){throw o instanceof DOMException&&o.name==="AbortError"?new X("Network timed out"):o}finally{clearTimeout(n)}}async getJson(e,{token:t,credentials:s}={}){const i=this._logger.create("getJson"),r={Accept:this._contentTypes.join(", ")};t&&(i.debug("token passed, setting Authorization header"),r.Authorization="Bearer "+t),this.appendExtraHeaders(r);let n;try{i.debug("url:",e),n=await this.fetchWithTimeout(e,{method:"GET",headers:r,credentials:s})}catch(c){throw i.error("Network Error"),c}i.debug("HTTP response received, status",n.status);const o=n.headers.get("Content-Type");if(o&&!this._contentTypes.find(c=>o.startsWith(c))&&i.throw(new Error(`Invalid response Content-Type: ${o!=null?o:"undefined"}, from URL: ${e}`)),n.ok&&this._jwtHandler&&(o==null?void 0:o.startsWith("application/jwt")))return await this._jwtHandler(await n.text());let a;try{a=await n.json()}catch(c){throw i.error("Error parsing JSON response",c),n.ok?c:new Error(`${n.statusText} (${n.status})`)}if(!n.ok)throw i.error("Error from server:",a),a.error?new A(a):new Error(`${n.statusText} (${n.status}): ${JSON.stringify(a)}`);return a}async postForm(e,{body:t,basicAuth:s,timeoutInSeconds:i,initCredentials:r}){const n=this._logger.create("postForm"),o={Accept:this._contentTypes.join(", "),"Content-Type":"application/x-www-form-urlencoded"};s!==void 0&&(o.Authorization="Basic "+s),this.appendExtraHeaders(o);let a;try{n.debug("url:",e),a=await this.fetchWithTimeout(e,{method:"POST",headers:o,body:t,timeoutInSeconds:i,credentials:r})}catch(d){throw n.error("Network error"),d}n.debug("HTTP response received, status",a.status);const c=a.headers.get("Content-Type");if(c&&!this._contentTypes.find(d=>c.startsWith(d)))throw new Error(`Invalid response Content-Type: ${c!=null?c:"undefined"}, from URL: ${e}`);const l=await a.text();let h={};if(l)try{h=JSON.parse(l)}catch(d){throw n.error("Error parsing JSON response",d),a.ok?d:new Error(`${a.statusText} (${a.status})`)}if(!a.ok)throw n.error("Error from server:",h),h.error?new A(h,t):new Error(`${a.statusText} (${a.status}): ${JSON.stringify(h)}`);return h}appendExtraHeaders(e){const t=this._logger.create("appendExtraHeaders"),s=Object.keys(this._extraHeaders),i=["authorization","accept","content-type"];s.length!==0&&s.forEach(r=>{if(i.includes(r.toLocaleLowerCase())){t.warn("Protected header could not be overridden",r,i);return}const n=typeof this._extraHeaders[r]=="function"?this._extraHeaders[r]():this._extraHeaders[r];n&&n!==""&&(e[r]=n)})}},Je=class{constructor(e){this._settings=e,this._logger=new g("MetadataService"),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new Z(["application/jwk-set+json"],null,this._settings.extraHeaders),this._settings.signingKeys&&(this._logger.debug("using signingKeys from settings"),this._signingKeys=this._settings.signingKeys),this._settings.metadata&&(this._logger.debug("using metadata from settings"),this._metadata=this._settings.metadata),this._settings.fetchRequestCredentials&&(this._logger.debug("using fetchRequestCredentials from settings"),this._fetchRequestCredentials=this._settings.fetchRequestCredentials)}resetSigningKeys(){this._signingKeys=null}async getMetadata(){const e=this._logger.create("getMetadata");if(this._metadata)return e.debug("using cached values"),this._metadata;if(!this._metadataUrl)throw e.throw(new Error("No authority or metadataUrl configured on settings")),null;e.debug("getting metadata from",this._metadataUrl);const t=await this._jsonService.getJson(this._metadataUrl,{credentials:this._fetchRequestCredentials});return e.debug("merging remote JSON with seed metadata"),this._metadata=Object.assign({},this._settings.metadataSeed,t),this._metadata}getIssuer(){return this._getMetadataProperty("issuer")}getAuthorizationEndpoint(){return this._getMetadataProperty("authorization_endpoint")}getUserInfoEndpoint(){return this._getMetadataProperty("userinfo_endpoint")}getTokenEndpoint(e=!0){return this._getMetadataProperty("token_endpoint",e)}getCheckSessionIframe(){return this._getMetadataProperty("check_session_iframe",!0)}getEndSessionEndpoint(){return this._getMetadataProperty("end_session_endpoint",!0)}getRevocationEndpoint(e=!0){return this._getMetadataProperty("revocation_endpoint",e)}getKeysEndpoint(e=!0){return this._getMetadataProperty("jwks_uri",e)}async _getMetadataProperty(e,t=!1){const s=this._logger.create(`_getMetadataProperty('${e}')`),i=await this.getMetadata();if(s.debug("resolved"),i[e]===void 0){if(t===!0){s.warn("Metadata does not contain optional property");return}s.throw(new Error("Metadata does not contain property "+e))}return i[e]}async getSigningKeys(){const e=this._logger.create("getSigningKeys");if(this._signingKeys)return e.debug("returning signingKeys from cache"),this._signingKeys;const t=await this.getKeysEndpoint(!1);e.debug("got jwks_uri",t);const s=await this._jsonService.getJson(t);if(e.debug("got key set",s),!Array.isArray(s.keys))throw e.throw(new Error("Missing keys on keyset")),null;return this._signingKeys=s.keys,this._signingKeys}},le=class{constructor({prefix:e="oidc.",store:t=localStorage}={}){this._logger=new g("WebStorageStateStore"),this._store=t,this._prefix=e}async set(e,t){this._logger.create(`set('${e}')`),e=this._prefix+e,await this._store.setItem(e,t)}async get(e){return this._logger.create(`get('${e}')`),e=this._prefix+e,await this._store.getItem(e)}async remove(e){this._logger.create(`remove('${e}')`),e=this._prefix+e;const t=await this._store.getItem(e);return await this._store.removeItem(e),t}async getAllKeys(){this._logger.create("getAllKeys");const e=await this._store.length,t=[];for(let s=0;s<e;s++){const i=await this._store.key(s);i&&i.indexOf(this._prefix)===0&&t.push(i.substr(this._prefix.length))}return t}},Ke="code",ze="openid",Be="client_secret_post",Ve=60*15,V=class{constructor({authority:e,metadataUrl:t,metadata:s,signingKeys:i,metadataSeed:r,client_id:n,client_secret:o,response_type:a=Ke,scope:c=ze,redirect_uri:l,post_logout_redirect_uri:h,client_authentication:d=Be,prompt:_,display:p,max_age:m,ui_locales:S,acr_values:v,resource:x,response_mode:U,filterProtocolClaims:w=!0,loadUserInfo:u=!1,staleStateAgeInSeconds:E=Ve,mergeClaimsStrategy:T={array:"replace"},disablePKCE:f=!1,stateStore:C,revokeTokenAdditionalContentTypes:Ee,fetchRequestCredentials:ee,refreshTokenAllowedScope:Te,extraQueryParams:Ie={},extraTokenParams:Re={},extraHeaders:xe={}}){if(this.authority=e,t?this.metadataUrl=t:(this.metadataUrl=e,e&&(this.metadataUrl.endsWith("/")||(this.metadataUrl+="/"),this.metadataUrl+=".well-known/openid-configuration")),this.metadata=s,this.metadataSeed=r,this.signingKeys=i,this.client_id=n,this.client_secret=o,this.response_type=a,this.scope=c,this.redirect_uri=l,this.post_logout_redirect_uri=h,this.client_authentication=d,this.prompt=_,this.display=p,this.max_age=m,this.ui_locales=S,this.acr_values=v,this.resource=x,this.response_mode=U,this.filterProtocolClaims=w!=null?w:!0,this.loadUserInfo=!!u,this.staleStateAgeInSeconds=E,this.mergeClaimsStrategy=T,this.disablePKCE=!!f,this.revokeTokenAdditionalContentTypes=Ee,this.fetchRequestCredentials=ee||"same-origin",C)this.stateStore=C;else{const Ue=typeof window<"u"?window.localStorage:new ce;this.stateStore=new le({store:Ue})}this.refreshTokenAllowedScope=Te,this.extraQueryParams=Ie,this.extraTokenParams=Re,this.extraHeaders=xe}},Ge=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new g("UserInfoService"),this._getClaimsFromJwt=async s=>{const i=this._logger.create("_getClaimsFromJwt");try{const r=K.decode(s);return i.debug("JWT decoding successful"),r}catch(r){throw i.error("Error parsing JWT response"),r}},this._jsonService=new Z(void 0,this._getClaimsFromJwt,this._settings.extraHeaders)}async getClaims(e){const t=this._logger.create("getClaims");e||this._logger.throw(new Error("No token passed"));const s=await this._metadataService.getUserInfoEndpoint();t.debug("got userinfo url",s);const i=await this._jsonService.getJson(s,{token:e,credentials:this._settings.fetchRequestCredentials});return t.debug("got claims",i),i}},de=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new g("TokenClient"),this._jsonService=new Z(this._settings.revokeTokenAdditionalContentTypes,null,this._settings.extraHeaders)}async exchangeCode({grant_type:e="authorization_code",redirect_uri:t=this._settings.redirect_uri,client_id:s=this._settings.client_id,client_secret:i=this._settings.client_secret,...r}){const n=this._logger.create("exchangeCode");s||n.throw(new Error("A client_id is required")),t||n.throw(new Error("A redirect_uri is required")),r.code||n.throw(new Error("A code is required"));const o=new URLSearchParams({grant_type:e,redirect_uri:t});for(const[h,d]of Object.entries(r))d!=null&&o.set(h,d);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!i)throw n.throw(new Error("A client_secret is required")),null;a=O.generateBasicAuth(s,i);break;case"client_secret_post":o.append("client_id",s),i&&o.append("client_secret",i);break}const c=await this._metadataService.getTokenEndpoint(!1);n.debug("got token endpoint");const l=await this._jsonService.postForm(c,{body:o,basicAuth:a,initCredentials:this._settings.fetchRequestCredentials});return n.debug("got response"),l}async exchangeCredentials({grant_type:e="password",client_id:t=this._settings.client_id,client_secret:s=this._settings.client_secret,scope:i=this._settings.scope,...r}){const n=this._logger.create("exchangeCredentials");t||n.throw(new Error("A client_id is required"));const o=new URLSearchParams({grant_type:e,scope:i});for(const[h,d]of Object.entries(r))d!=null&&o.set(h,d);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!s)throw n.throw(new Error("A client_secret is required")),null;a=O.generateBasicAuth(t,s);break;case"client_secret_post":o.append("client_id",t),s&&o.append("client_secret",s);break}const c=await this._metadataService.getTokenEndpoint(!1);n.debug("got token endpoint");const l=await this._jsonService.postForm(c,{body:o,basicAuth:a,initCredentials:this._settings.fetchRequestCredentials});return n.debug("got response"),l}async exchangeRefreshToken({grant_type:e="refresh_token",client_id:t=this._settings.client_id,client_secret:s=this._settings.client_secret,timeoutInSeconds:i,...r}){const n=this._logger.create("exchangeRefreshToken");t||n.throw(new Error("A client_id is required")),r.refresh_token||n.throw(new Error("A refresh_token is required"));const o=new URLSearchParams({grant_type:e});for(const[h,d]of Object.entries(r))Array.isArray(d)?d.forEach(_=>o.append(h,_)):d!=null&&o.set(h,d);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!s)throw n.throw(new Error("A client_secret is required")),null;a=O.generateBasicAuth(t,s);break;case"client_secret_post":o.append("client_id",t),s&&o.append("client_secret",s);break}const c=await this._metadataService.getTokenEndpoint(!1);n.debug("got token endpoint");const l=await this._jsonService.postForm(c,{body:o,basicAuth:a,timeoutInSeconds:i,initCredentials:this._settings.fetchRequestCredentials});return n.debug("got response"),l}async revoke(e){var t;const s=this._logger.create("revoke");e.token||s.throw(new Error("A token is required"));const i=await this._metadataService.getRevocationEndpoint(!1);s.debug(`got revocation endpoint, revoking ${(t=e.token_type_hint)!=null?t:"default token type"}`);const r=new URLSearchParams;for(const[n,o]of Object.entries(e))o!=null&&r.set(n,o);r.set("client_id",this._settings.client_id),this._settings.client_secret&&r.set("client_secret",this._settings.client_secret),await this._jsonService.postForm(i,{body:r}),s.debug("got response")}},Qe=class{constructor(e,t,s){this._settings=e,this._metadataService=t,this._claimsService=s,this._logger=new g("ResponseValidator"),this._userInfoService=new Ge(this._settings,this._metadataService),this._tokenClient=new de(this._settings,this._metadataService)}async validateSigninResponse(e,t){const s=this._logger.create("validateSigninResponse");this._processSigninState(e,t),s.debug("state processed"),await this._processCode(e,t),s.debug("code processed"),e.isOpenId&&this._validateIdTokenAttributes(e),s.debug("tokens validated"),await this._processClaims(e,t==null?void 0:t.skipUserInfo,e.isOpenId),s.debug("claims processed")}async validateCredentialsResponse(e,t){const s=this._logger.create("validateCredentialsResponse");e.isOpenId&&!!e.id_token&&this._validateIdTokenAttributes(e),s.debug("tokens validated"),await this._processClaims(e,t,e.isOpenId),s.debug("claims processed")}async validateRefreshResponse(e,t){var s,i;const r=this._logger.create("validateRefreshResponse");e.userState=t.data,(s=e.session_state)!=null||(e.session_state=t.session_state),(i=e.scope)!=null||(e.scope=t.scope),e.isOpenId&&!!e.id_token&&(this._validateIdTokenAttributes(e,t.id_token),r.debug("ID Token validated")),e.id_token||(e.id_token=t.id_token,e.profile=t.profile);const n=e.isOpenId&&!!e.id_token;await this._processClaims(e,!1,n),r.debug("claims processed")}validateSignoutResponse(e,t){const s=this._logger.create("validateSignoutResponse");if(t.id!==e.state&&s.throw(new Error("State does not match")),s.debug("state validated"),e.userState=t.data,e.error)throw s.warn("Response was error",e.error),new A(e)}_processSigninState(e,t){var s;const i=this._logger.create("_processSigninState");if(t.id!==e.state&&i.throw(new Error("State does not match")),t.client_id||i.throw(new Error("No client_id on state")),t.authority||i.throw(new Error("No authority on state")),this._settings.authority!==t.authority&&i.throw(new Error("authority mismatch on settings vs. signin state")),this._settings.client_id&&this._settings.client_id!==t.client_id&&i.throw(new Error("client_id mismatch on settings vs. signin state")),i.debug("state validated"),e.userState=t.data,e.url_state=t.url_state,(s=e.scope)!=null||(e.scope=t.scope),e.error)throw i.warn("Response was error",e.error),new A(e);t.code_verifier&&!e.code&&i.throw(new Error("Expected code in response"))}async _processClaims(e,t=!1,s=!0){const i=this._logger.create("_processClaims");if(e.profile=this._claimsService.filterProtocolClaims(e.profile),t||!this._settings.loadUserInfo||!e.access_token){i.debug("not loading user info");return}i.debug("loading user info");const r=await this._userInfoService.getClaims(e.access_token);i.debug("user info claims received from user info endpoint"),s&&r.sub!==e.profile.sub&&i.throw(new Error("subject from UserInfo response does not match subject in ID Token")),e.profile=this._claimsService.mergeClaims(e.profile,this._claimsService.filterProtocolClaims(r)),i.debug("user info claims received, updated profile:",e.profile)}async _processCode(e,t){const s=this._logger.create("_processCode");if(e.code){s.debug("Validating code");const i=await this._tokenClient.exchangeCode({client_id:t.client_id,client_secret:t.client_secret,code:e.code,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier,...t.extraTokenParams});Object.assign(e,i)}else s.debug("No code to process")}_validateIdTokenAttributes(e,t){var s;const i=this._logger.create("_validateIdTokenAttributes");i.debug("decoding ID Token JWT");const r=K.decode((s=e.id_token)!=null?s:"");if(r.sub||i.throw(new Error("ID Token is missing a subject claim")),t){const n=K.decode(t);r.sub!==n.sub&&i.throw(new Error("sub in id_token does not match current sub")),r.auth_time&&r.auth_time!==n.auth_time&&i.throw(new Error("auth_time in id_token does not match original auth_time")),r.azp&&r.azp!==n.azp&&i.throw(new Error("azp in id_token does not match original azp")),!r.azp&&n.azp&&i.throw(new Error("azp not in id_token, but present in original id_token"))}e.profile=r}},W=class G{constructor(t){this.id=t.id||O.generateUUIDv4(),this.data=t.data,t.created&&t.created>0?this.created=t.created:this.created=I.getEpochTime(),this.request_type=t.request_type,this.url_state=t.url_state}toStorageString(){return new g("State").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state})}static fromStorageString(t){return g.createStatic("State","fromStorageString"),Promise.resolve(new G(JSON.parse(t)))}static async clearStaleState(t,s){const i=g.createStatic("State","clearStaleState"),r=I.getEpochTime()-s,n=await t.getAllKeys();i.debug("got keys",n);for(let o=0;o<n.length;o++){const a=n[o],c=await t.get(a);let l=!1;if(c)try{const h=await G.fromStorageString(c);i.debug("got item from key:",a,h.created),h.created<=r&&(l=!0)}catch(h){i.error("Error parsing state for key:",a,h),l=!0}else i.debug("no item in storage for key:",a),l=!0;l&&(i.debug("removed item for key:",a),t.remove(a))}}},ge=class Q extends W{constructor(t){super(t),this.code_verifier=t.code_verifier,this.code_challenge=t.code_challenge,this.authority=t.authority,this.client_id=t.client_id,this.redirect_uri=t.redirect_uri,this.scope=t.scope,this.client_secret=t.client_secret,this.extraTokenParams=t.extraTokenParams,this.response_mode=t.response_mode,this.skipUserInfo=t.skipUserInfo}static async create(t){const s=t.code_verifier===!0?O.generateCodeVerifier():t.code_verifier||void 0,i=s?await O.generateCodeChallenge(s):void 0;return new Q({...t,code_verifier:s,code_challenge:i})}toStorageString(){return new g("SigninState").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state,code_verifier:this.code_verifier,authority:this.authority,client_id:this.client_id,redirect_uri:this.redirect_uri,scope:this.scope,client_secret:this.client_secret,extraTokenParams:this.extraTokenParams,response_mode:this.response_mode,skipUserInfo:this.skipUserInfo})}static fromStorageString(t){g.createStatic("SigninState","fromStorageString");const s=JSON.parse(t);return Q.create(s)}},he=class ue{constructor(t){this.url=t.url,this.state=t.state}static async create({url:t,authority:s,client_id:i,redirect_uri:r,response_type:n,scope:o,state_data:a,response_mode:c,request_type:l,client_secret:h,nonce:d,url_state:_,resource:p,skipUserInfo:m,extraQueryParams:S,extraTokenParams:v,disablePKCE:x,...U}){if(!t)throw this._logger.error("create: No url passed"),new Error("url");if(!i)throw this._logger.error("create: No client_id passed"),new Error("client_id");if(!r)throw this._logger.error("create: No redirect_uri passed"),new Error("redirect_uri");if(!n)throw this._logger.error("create: No response_type passed"),new Error("response_type");if(!o)throw this._logger.error("create: No scope passed"),new Error("scope");if(!s)throw this._logger.error("create: No authority passed"),new Error("authority");const w=await ge.create({data:a,request_type:l,url_state:_,code_verifier:!x,client_id:i,authority:s,redirect_uri:r,response_mode:c,client_secret:h,scope:o,extraTokenParams:v,skipUserInfo:m}),u=new URL(t);u.searchParams.append("client_id",i),u.searchParams.append("redirect_uri",r),u.searchParams.append("response_type",n),u.searchParams.append("scope",o),d&&u.searchParams.append("nonce",d);let E=w.id;_&&(E=`${E}${B}${_}`),u.searchParams.append("state",E),w.code_challenge&&(u.searchParams.append("code_challenge",w.code_challenge),u.searchParams.append("code_challenge_method","S256")),p&&(Array.isArray(p)?p:[p]).forEach(f=>u.searchParams.append("resource",f));for(const[T,f]of Object.entries({response_mode:c,...U,...S}))f!=null&&u.searchParams.append(T,f.toString());return new ue({url:u.href,state:w})}};he._logger=new g("SigninRequest");var Ye=he,Xe="openid",L=class{constructor(e){if(this.access_token="",this.token_type="",this.profile={},this.state=e.get("state"),this.session_state=e.get("session_state"),this.state){const t=decodeURIComponent(this.state).split(B);this.state=t[0],t.length>1&&(this.url_state=t.slice(1).join(B))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri"),this.code=e.get("code")}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-I.getEpochTime()}set expires_in(e){typeof e=="string"&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+I.getEpochTime())}get isOpenId(){var e;return((e=this.scope)==null?void 0:e.split(" ").includes(Xe))||!!this.id_token}},Ze=class{constructor({url:e,state_data:t,id_token_hint:s,post_logout_redirect_uri:i,extraQueryParams:r,request_type:n,client_id:o}){if(this._logger=new g("SignoutRequest"),!e)throw this._logger.error("ctor: No url passed"),new Error("url");const a=new URL(e);s&&a.searchParams.append("id_token_hint",s),o&&a.searchParams.append("client_id",o),i&&(a.searchParams.append("post_logout_redirect_uri",i),t&&(this.state=new W({data:t,request_type:n}),a.searchParams.append("state",this.state.id)));for(const[c,l]of Object.entries({...r}))l!=null&&a.searchParams.append(c,l.toString());this.url=a.href}},et=class{constructor(e){this.state=e.get("state"),this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri")}},tt=["nbf","jti","auth_time","nonce","acr","amr","azp","at_hash"],st=["sub","iss","aud","exp","iat"],it=class{constructor(e){this._settings=e,this._logger=new g("ClaimsService")}filterProtocolClaims(e){const t={...e};if(this._settings.filterProtocolClaims){let s;Array.isArray(this._settings.filterProtocolClaims)?s=this._settings.filterProtocolClaims:s=tt;for(const i of s)st.includes(i)||delete t[i]}return t}mergeClaims(e,t){const s={...e};for(const[i,r]of Object.entries(t))if(s[i]!==r)if(Array.isArray(s[i])||Array.isArray(r))if(this._settings.mergeClaimsStrategy.array=="replace")s[i]=r;else{const n=Array.isArray(s[i])?s[i]:[s[i]];for(const o of Array.isArray(r)?r:[r])n.includes(o)||n.push(o);s[i]=n}else typeof s[i]=="object"&&typeof r=="object"?s[i]=this.mergeClaims(s[i],r):s[i]=r;return s}},rt=class{constructor(e,t){this._logger=new g("OidcClient"),this.settings=e instanceof V?e:new V(e),this.metadataService=t!=null?t:new Je(this.settings),this._claimsService=new it(this.settings),this._validator=new Qe(this.settings,this.metadataService,this._claimsService),this._tokenClient=new de(this.settings,this.metadataService)}async createSigninRequest({state:e,request:t,request_uri:s,request_type:i,id_token_hint:r,login_hint:n,skipUserInfo:o,nonce:a,url_state:c,response_type:l=this.settings.response_type,scope:h=this.settings.scope,redirect_uri:d=this.settings.redirect_uri,prompt:_=this.settings.prompt,display:p=this.settings.display,max_age:m=this.settings.max_age,ui_locales:S=this.settings.ui_locales,acr_values:v=this.settings.acr_values,resource:x=this.settings.resource,response_mode:U=this.settings.response_mode,extraQueryParams:w=this.settings.extraQueryParams,extraTokenParams:u=this.settings.extraTokenParams}){const E=this._logger.create("createSigninRequest");if(l!=="code")throw new Error("Only the Authorization Code flow (with PKCE) is supported");const T=await this.metadataService.getAuthorizationEndpoint();E.debug("Received authorization endpoint",T);const f=await Ye.create({url:T,authority:this.settings.authority,client_id:this.settings.client_id,redirect_uri:d,response_type:l,scope:h,state_data:e,url_state:c,prompt:_,display:p,max_age:m,ui_locales:S,id_token_hint:r,login_hint:n,acr_values:v,resource:x,request:t,request_uri:s,extraQueryParams:w,extraTokenParams:u,request_type:i,response_mode:U,client_secret:this.settings.client_secret,skipUserInfo:o,nonce:a,disablePKCE:this.settings.disablePKCE});await this.clearStaleState();const C=f.state;return await this.settings.stateStore.set(C.id,C.toStorageString()),f}async readSigninResponseState(e,t=!1){const s=this._logger.create("readSigninResponseState"),i=new L(z.readParams(e,this.settings.response_mode));if(!i.state)throw s.throw(new Error("No state in response")),null;const r=await this.settings.stateStore[t?"remove":"get"](i.state);if(!r)throw s.throw(new Error("No matching state found in storage")),null;return{state:await ge.fromStorageString(r),response:i}}async processSigninResponse(e){const t=this._logger.create("processSigninResponse"),{state:s,response:i}=await this.readSigninResponseState(e,!0);return t.debug("received state from storage; validating response"),await this._validator.validateSigninResponse(i,s),i}async processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:s=!1,extraTokenParams:i={}}){const r=await this._tokenClient.exchangeCredentials({username:e,password:t,...i}),n=new L(new URLSearchParams);return Object.assign(n,r),await this._validator.validateCredentialsResponse(n,s),n}async useRefreshToken({state:e,redirect_uri:t,resource:s,timeoutInSeconds:i,extraTokenParams:r}){var n;const o=this._logger.create("useRefreshToken");let a;if(this.settings.refreshTokenAllowedScope===void 0)a=e.scope;else{const h=this.settings.refreshTokenAllowedScope.split(" ");a=(((n=e.scope)==null?void 0:n.split(" "))||[]).filter(_=>h.includes(_)).join(" ")}const c=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:a,redirect_uri:t,resource:s,timeoutInSeconds:i,...r}),l=new L(new URLSearchParams);return Object.assign(l,c),o.debug("validating response",l),await this._validator.validateRefreshResponse(l,{...e,scope:a}),l}async createSignoutRequest({state:e,id_token_hint:t,client_id:s,request_type:i,post_logout_redirect_uri:r=this.settings.post_logout_redirect_uri,extraQueryParams:n=this.settings.extraQueryParams}={}){const o=this._logger.create("createSignoutRequest"),a=await this.metadataService.getEndSessionEndpoint();if(!a)throw o.throw(new Error("No end session endpoint")),null;o.debug("Received end session endpoint",a),!s&&r&&!t&&(s=this.settings.client_id);const c=new Ze({url:a,id_token_hint:t,client_id:s,post_logout_redirect_uri:r,state_data:e,extraQueryParams:n,request_type:i});await this.clearStaleState();const l=c.state;return l&&(o.debug("Signout request has state to persist"),await this.settings.stateStore.set(l.id,l.toStorageString())),c}async readSignoutResponseState(e,t=!1){const s=this._logger.create("readSignoutResponseState"),i=new et(z.readParams(e,this.settings.response_mode));if(!i.state){if(s.debug("No state in response"),i.error)throw s.warn("Response was error:",i.error),new A(i);return{state:void 0,response:i}}const r=await this.settings.stateStore[t?"remove":"get"](i.state);if(!r)throw s.throw(new Error("No matching state found in storage")),null;return{state:await W.fromStorageString(r),response:i}}async processSignoutResponse(e){const t=this._logger.create("processSignoutResponse"),{state:s,response:i}=await this.readSignoutResponseState(e,!0);return s?(t.debug("Received state from storage; validating response"),this._validator.validateSignoutResponse(i,s)):t.debug("No state from storage; skipping response validation"),i}clearStaleState(){return this._logger.create("clearStaleState"),W.clearStaleState(this.settings.stateStore,this.settings.staleStateAgeInSeconds)}async revokeToken(e,t){return this._logger.create("revokeToken"),await this._tokenClient.revoke({token:e,token_type_hint:t})}},nt=class{constructor(e){this._userManager=e,this._logger=new g("SessionMonitor"),this._start=async t=>{const s=t.session_state;if(!s)return;const i=this._logger.create("_start");if(t.profile?(this._sub=t.profile.sub,i.debug("session_state",s,", sub",this._sub)):(this._sub=void 0,i.debug("session_state",s,", anonymous user")),this._checkSessionIFrame){this._checkSessionIFrame.start(s);return}try{const r=await this._userManager.metadataService.getCheckSessionIframe();if(r){i.debug("initializing check session iframe");const n=this._userManager.settings.client_id,o=this._userManager.settings.checkSessionIntervalInSeconds,a=this._userManager.settings.stopCheckSessionOnError,c=new Le(this._callback,n,r,o,a);await c.load(),this._checkSessionIFrame=c,c.start(s)}else i.warn("no check session iframe found in the metadata")}catch(r){i.error("Error from getCheckSessionIframe:",r instanceof Error?r.message:r)}},this._stop=()=>{const t=this._logger.create("_stop");if(this._sub=void 0,this._checkSessionIFrame&&this._checkSessionIFrame.stop(),this._userManager.settings.monitorAnonymousSession){const s=setInterval(async()=>{clearInterval(s);try{const i=await this._userManager.querySessionStatus();if(i){const r={session_state:i.session_state,profile:i.sub?{sub:i.sub}:null};this._start(r)}}catch(i){t.error("error from querySessionStatus",i instanceof Error?i.message:i)}},1e3)}},this._callback=async()=>{const t=this._logger.create("_callback");try{const s=await this._userManager.querySessionStatus();let i=!0;s&&this._checkSessionIFrame?s.sub===this._sub?(i=!1,this._checkSessionIFrame.start(s.session_state),t.debug("same sub still logged in at OP, session state has changed, restarting check session iframe; session_state",s.session_state),await this._userManager.events._raiseUserSessionChanged()):t.debug("different subject signed into OP",s.sub):t.debug("subject no longer signed into OP"),i?this._sub?await this._userManager.events._raiseUserSignedOut():await this._userManager.events._raiseUserSignedIn():t.debug("no change in session detected, no event to raise")}catch(s){this._sub&&(t.debug("Error calling queryCurrentSigninSession; raising signed out event",s),await this._userManager.events._raiseUserSignedOut())}},e||this._logger.throw(new Error("No user manager passed")),this._userManager.events.addUserLoaded(this._start),this._userManager.events.addUserUnloaded(this._stop),this._init().catch(t=>{this._logger.error(t)})}async _init(){this._logger.create("_init");const e=await this._userManager.getUser();if(e)this._start(e);else if(this._userManager.settings.monitorAnonymousSession){const t=await this._userManager.querySessionStatus();if(t){const s={session_state:t.session_state,profile:t.sub?{sub:t.sub}:null};this._start(s)}}}},J=class _e{constructor(t){var s;this.id_token=t.id_token,this.session_state=(s=t.session_state)!=null?s:null,this.access_token=t.access_token,this.refresh_token=t.refresh_token,this.token_type=t.token_type,this.scope=t.scope,this.profile=t.profile,this.expires_at=t.expires_at,this.state=t.userState,this.url_state=t.url_state}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-I.getEpochTime()}set expires_in(t){t!==void 0&&(this.expires_at=Math.floor(t)+I.getEpochTime())}get expired(){const t=this.expires_in;if(t!==void 0)return t<=0}get scopes(){var t,s;return(s=(t=this.scope)==null?void 0:t.split(" "))!=null?s:[]}toStorageString(){return new g("User").create("toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(t){return g.createStatic("User","fromStorageString"),new _e(JSON.parse(t))}},ie="oidc-client",pe=class{constructor(){this._abort=new R("Window navigation aborted"),this._disposeHandlers=new Set,this._window=null}async navigate(e){const t=this._logger.create("navigate");if(!this._window)throw new Error("Attempted to navigate on a disposed window");t.debug("setting URL in window"),this._window.location.replace(e.url);const{url:s,keepOpen:i}=await new Promise((r,n)=>{const o=a=>{var c;const l=a.data,h=(c=e.scriptOrigin)!=null?c:window.location.origin;if(!(a.origin!==h||(l==null?void 0:l.source)!==ie)){try{const d=z.readParams(l.url,e.response_mode).get("state");if(d||t.warn("no state found in response url"),a.source!==this._window&&d!==e.state)return}catch{this._dispose(),n(new Error("Invalid response from window"))}r(l)}};window.addEventListener("message",o,!1),this._disposeHandlers.add(()=>window.removeEventListener("message",o,!1)),this._disposeHandlers.add(this._abort.addHandler(a=>{this._dispose(),n(a)}))});return t.debug("got response from window"),this._dispose(),i||this.close(),{url:s}}_dispose(){this._logger.create("_dispose");for(const e of this._disposeHandlers)e();this._disposeHandlers.clear()}static _notifyParent(e,t,s=!1,i=window.location.origin){e.postMessage({source:ie,url:t,keepOpen:s},i)}},fe={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},we="_blank",ot=60,at=2,me=10,ct=class extends V{constructor(e){const{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:s=e.post_logout_redirect_uri,popupWindowFeatures:i=fe,popupWindowTarget:r=we,redirectMethod:n="assign",redirectTarget:o="self",iframeNotifyParentOrigin:a=e.iframeNotifyParentOrigin,iframeScriptOrigin:c=e.iframeScriptOrigin,silent_redirect_uri:l=e.redirect_uri,silentRequestTimeoutInSeconds:h=me,automaticSilentRenew:d=!0,validateSubOnSilentRenew:_=!0,includeIdTokenInSilentRenew:p=!1,monitorSession:m=!1,monitorAnonymousSession:S=!1,checkSessionIntervalInSeconds:v=at,query_status_response_type:x="code",stopCheckSessionOnError:U=!0,revokeTokenTypes:w=["access_token","refresh_token"],revokeTokensOnSignout:u=!1,includeIdTokenInSilentSignout:E=!1,accessTokenExpiringNotificationTimeInSeconds:T=ot,userStore:f}=e;if(super(e),this.popup_redirect_uri=t,this.popup_post_logout_redirect_uri=s,this.popupWindowFeatures=i,this.popupWindowTarget=r,this.redirectMethod=n,this.redirectTarget=o,this.iframeNotifyParentOrigin=a,this.iframeScriptOrigin=c,this.silent_redirect_uri=l,this.silentRequestTimeoutInSeconds=h,this.automaticSilentRenew=d,this.validateSubOnSilentRenew=_,this.includeIdTokenInSilentRenew=p,this.monitorSession=m,this.monitorAnonymousSession=S,this.checkSessionIntervalInSeconds=v,this.stopCheckSessionOnError=U,this.query_status_response_type=x,this.revokeTokenTypes=w,this.revokeTokensOnSignout=u,this.includeIdTokenInSilentSignout=E,this.accessTokenExpiringNotificationTimeInSeconds=T,f)this.userStore=f;else{const C=typeof window<"u"?window.sessionStorage:new ce;this.userStore=new le({store:C})}}},re=class Se extends pe{constructor({silentRequestTimeoutInSeconds:t=me}){super(),this._logger=new g("IFrameWindow"),this._timeoutInSeconds=t,this._frame=Se.createHiddenIframe(),this._window=this._frame.contentWindow}static createHiddenIframe(){const t=window.document.createElement("iframe");return t.style.visibility="hidden",t.style.position="fixed",t.style.left="-1000px",t.style.top="0",t.width="0",t.height="0",window.document.body.appendChild(t),t}async navigate(t){this._logger.debug("navigate: Using timeout of:",this._timeoutInSeconds);const s=setTimeout(()=>void this._abort.raise(new X("IFrame timed out without a response")),this._timeoutInSeconds*1e3);return this._disposeHandlers.add(()=>clearTimeout(s)),await super.navigate(t)}close(){var t;this._frame&&(this._frame.parentNode&&(this._frame.addEventListener("load",s=>{var i;const r=s.target;(i=r.parentNode)==null||i.removeChild(r),this._abort.raise(new Error("IFrame removed from DOM"))},!0),(t=this._frame.contentWindow)==null||t.location.replace("about:blank")),this._frame=null),this._window=null}static notifyParent(t,s){return super._notifyParent(window.parent,t,!1,s)}},lt=class{constructor(e){this._settings=e,this._logger=new g("IFrameNavigator")}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new re({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create("callback"),re.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},dt=500,gt=1e3,ne=class extends pe{constructor({popupWindowTarget:e=we,popupWindowFeatures:t={}}){super(),this._logger=new g("PopupWindow");const s=se.center({...fe,...t});this._window=window.open(void 0,e,se.serialize(s)),t.closePopupWindowAfterInSeconds&&t.closePopupWindowAfterInSeconds>0&&setTimeout(()=>{if(!this._window||typeof this._window.closed!="boolean"||this._window.closed){this._abort.raise(new Error("Popup blocked by user"));return}this.close()},t.closePopupWindowAfterInSeconds*gt)}async navigate(e){var t;(t=this._window)==null||t.focus();const s=setInterval(()=>{(!this._window||this._window.closed)&&this._abort.raise(new Error("Popup closed by user"))},dt);return this._disposeHandlers.add(()=>clearInterval(s)),await super.navigate(e)}close(){this._window&&(this._window.closed||(this._window.close(),this._abort.raise(new Error("Popup closed")))),this._window=null}static notifyOpener(e,t){if(!window.opener)throw new Error("No window.opener. Can't complete notification.");return super._notifyParent(window.opener,e,t)}},ht=class{constructor(e){this._settings=e,this._logger=new g("PopupNavigator")}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:t=this._settings.popupWindowTarget}){return new ne({popupWindowFeatures:e,popupWindowTarget:t})}async callback(e,{keepOpen:t=!1}){this._logger.create("callback"),ne.notifyOpener(e,t)}},ut=class{constructor(e){this._settings=e,this._logger=new g("RedirectNavigator")}async prepare({redirectMethod:e=this._settings.redirectMethod,redirectTarget:t=this._settings.redirectTarget}){var s;this._logger.create("prepare");let i=window.self;t==="top"&&(i=(s=window.top)!=null?s:window.self);const r=i.location[e].bind(i.location);let n;return{navigate:async o=>{this._logger.create("navigate");const a=new Promise((c,l)=>{n=l});return r(o.url),await a},close:()=>{this._logger.create("close"),n==null||n(new Error("Redirect aborted")),i.stop()}}}async callback(){}},_t=class extends $e{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new g("UserManagerEvents"),this._userLoaded=new R("User loaded"),this._userUnloaded=new R("User unloaded"),this._silentRenewError=new R("Silent renew error"),this._userSignedIn=new R("User signed in"),this._userSignedOut=new R("User signed out"),this._userSessionChanged=new R("User session changed")}async load(e,t=!0){super.load(e),t&&await this._userLoaded.raise(e)}async unload(){super.unload(),await this._userUnloaded.raise()}addUserLoaded(e){return this._userLoaded.addHandler(e)}removeUserLoaded(e){return this._userLoaded.removeHandler(e)}addUserUnloaded(e){return this._userUnloaded.addHandler(e)}removeUserUnloaded(e){return this._userUnloaded.removeHandler(e)}addSilentRenewError(e){return this._silentRenewError.addHandler(e)}removeSilentRenewError(e){return this._silentRenewError.removeHandler(e)}async _raiseSilentRenewError(e){await this._silentRenewError.raise(e)}addUserSignedIn(e){return this._userSignedIn.addHandler(e)}removeUserSignedIn(e){this._userSignedIn.removeHandler(e)}async _raiseUserSignedIn(){await this._userSignedIn.raise()}addUserSignedOut(e){return this._userSignedOut.addHandler(e)}removeUserSignedOut(e){this._userSignedOut.removeHandler(e)}async _raiseUserSignedOut(){await this._userSignedOut.raise()}addUserSessionChanged(e){return this._userSessionChanged.addHandler(e)}removeUserSessionChanged(e){this._userSessionChanged.removeHandler(e)}async _raiseUserSessionChanged(){await this._userSessionChanged.raise()}},pt=class{constructor(e){this._userManager=e,this._logger=new g("SilentRenewService"),this._isStarted=!1,this._retryTimer=new I("Retry Silent Renew"),this._tokenExpiring=async()=>{const t=this._logger.create("_tokenExpiring");try{await this._userManager.signinSilent(),t.debug("silent token renewal successful")}catch(s){if(s instanceof X){t.warn("ErrorTimeout from signinSilent:",s,"retry in 5s"),this._retryTimer.init(5);return}t.error("Error from signinSilent:",s),await this._userManager.events._raiseSilentRenewError(s)}}}async start(){const e=this._logger.create("start");if(!this._isStarted){this._isStarted=!0,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring),this._retryTimer.addHandler(this._tokenExpiring);try{await this._userManager.getUser()}catch(t){e.error("getUser error",t)}}}stop(){this._isStarted&&(this._retryTimer.cancel(),this._retryTimer.removeHandler(this._tokenExpiring),this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring),this._isStarted=!1)}},ft=class{constructor(e){this.refresh_token=e.refresh_token,this.id_token=e.id_token,this.session_state=e.session_state,this.scope=e.scope,this.profile=e.profile,this.data=e.state}},wt=class{constructor(e,t,s,i){this._logger=new g("UserManager"),this.settings=new ct(e),this._client=new rt(e),this._redirectNavigator=t!=null?t:new ut(this.settings),this._popupNavigator=s!=null?s:new ht(this.settings),this._iframeNavigator=i!=null?i:new lt(this.settings),this._events=new _t(this.settings),this._silentRenewService=new pt(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new nt(this))}get events(){return this._events}get metadataService(){return this._client.metadataService}async getUser(){const e=this._logger.create("getUser"),t=await this._loadUser();return t?(e.info("user loaded"),await this._events.load(t,!1),t):(e.info("user not found in storage"),null)}async removeUser(){const e=this._logger.create("removeUser");await this.storeUser(null),e.info("user removed from storage"),await this._events.unload()}async signinRedirect(e={}){this._logger.create("signinRedirect");const{redirectMethod:t,...s}=e,i=await this._redirectNavigator.prepare({redirectMethod:t});await this._signinStart({request_type:"si:r",...s},i)}async signinRedirectCallback(e=window.location.href){const t=this._logger.create("signinRedirectCallback"),s=await this._signinEnd(e);return s.profile&&s.profile.sub?t.info("success, signed in subject",s.profile.sub):t.info("no subject"),s}async signinResourceOwnerCredentials({username:e,password:t,skipUserInfo:s=!1}){const i=this._logger.create("signinResourceOwnerCredential"),r=await this._client.processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:s,extraTokenParams:this.settings.extraTokenParams});i.debug("got signin response");const n=await this._buildUser(r);return n.profile&&n.profile.sub?i.info("success, signed in subject",n.profile.sub):i.info("no subject"),n}async signinPopup(e={}){const t=this._logger.create("signinPopup"),{popupWindowFeatures:s,popupWindowTarget:i,...r}=e,n=this.settings.popup_redirect_uri;n||t.throw(new Error("No popup_redirect_uri configured"));const o=await this._popupNavigator.prepare({popupWindowFeatures:s,popupWindowTarget:i}),a=await this._signin({request_type:"si:p",redirect_uri:n,display:"popup",...r},o);return a&&(a.profile&&a.profile.sub?t.info("success, signed in subject",a.profile.sub):t.info("no subject")),a}async signinPopupCallback(e=window.location.href,t=!1){const s=this._logger.create("signinPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),s.info("success")}async signinSilent(e={}){var t;const s=this._logger.create("signinSilent"),{silentRequestTimeoutInSeconds:i,...r}=e;let n=await this._loadUser();if(n!=null&&n.refresh_token){s.debug("using refresh token");const l=new ft(n);return await this._useRefreshToken({state:l,redirect_uri:r.redirect_uri,resource:r.resource,extraTokenParams:r.extraTokenParams,timeoutInSeconds:i})}const o=this.settings.silent_redirect_uri;o||s.throw(new Error("No silent_redirect_uri configured"));let a;n&&this.settings.validateSubOnSilentRenew&&(s.debug("subject prior to silent renew:",n.profile.sub),a=n.profile.sub);const c=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:i});return n=await this._signin({request_type:"si:s",redirect_uri:o,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?n==null?void 0:n.id_token:void 0,...r},c,a),n&&((t=n.profile)!=null&&t.sub?s.info("success, signed in subject",n.profile.sub):s.info("no subject")),n}async _useRefreshToken(e){const t=await this._client.useRefreshToken({...e,timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds}),s=new J({...e.state,...t});return await this.storeUser(s),await this._events.load(s),s}async signinSilentCallback(e=window.location.href){const t=this._logger.create("signinSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async signinCallback(e=window.location.href){const{state:t}=await this._client.readSigninResponseState(e);switch(t.request_type){case"si:r":return await this.signinRedirectCallback(e);case"si:p":return await this.signinPopupCallback(e);case"si:s":return await this.signinSilentCallback(e);default:throw new Error("invalid response_type in state")}}async signoutCallback(e=window.location.href,t=!1){const{state:s}=await this._client.readSignoutResponseState(e);if(!!s)switch(s.request_type){case"so:r":await this.signoutRedirectCallback(e);break;case"so:p":await this.signoutPopupCallback(e,t);break;case"so:s":await this.signoutSilentCallback(e);break;default:throw new Error("invalid response_type in state")}}async querySessionStatus(e={}){const t=this._logger.create("querySessionStatus"),{silentRequestTimeoutInSeconds:s,...i}=e,r=this.settings.silent_redirect_uri;r||t.throw(new Error("No silent_redirect_uri configured"));const n=await this._loadUser(),o=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:s}),a=await this._signinStart({request_type:"si:s",redirect_uri:r,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?n==null?void 0:n.id_token:void 0,response_type:this.settings.query_status_response_type,scope:"openid",skipUserInfo:!0,...i},o);try{const c=await this._client.processSigninResponse(a.url);return t.debug("got signin response"),c.session_state&&c.profile.sub?(t.info("success for subject",c.profile.sub),{session_state:c.session_state,sub:c.profile.sub}):(t.info("success, user not authenticated"),null)}catch(c){if(this.settings.monitorAnonymousSession&&c instanceof A)switch(c.error){case"login_required":case"consent_required":case"interaction_required":case"account_selection_required":return t.info("success for anonymous user"),{session_state:c.session_state}}throw c}}async _signin(e,t,s){const i=await this._signinStart(e,t);return await this._signinEnd(i.url,s)}async _signinStart(e,t){const s=this._logger.create("_signinStart");try{const i=await this._client.createSigninRequest(e);return s.debug("got signin request"),await t.navigate({url:i.url,state:i.state.id,response_mode:i.state.response_mode,scriptOrigin:this.settings.iframeScriptOrigin})}catch(i){throw s.debug("error after preparing navigator, closing navigator window"),t.close(),i}}async _signinEnd(e,t){const s=this._logger.create("_signinEnd"),i=await this._client.processSigninResponse(e);return s.debug("got signin response"),await this._buildUser(i,t)}async _buildUser(e,t){const s=this._logger.create("_buildUser"),i=new J(e);if(t){if(t!==i.profile.sub)throw s.debug("current user does not match user returned from signin. sub from signin:",i.profile.sub),new A({...e,error:"login_required"});s.debug("current user matches user returned from signin")}return await this.storeUser(i),s.debug("user stored"),await this._events.load(i),i}async signoutRedirect(e={}){const t=this._logger.create("signoutRedirect"),{redirectMethod:s,...i}=e,r=await this._redirectNavigator.prepare({redirectMethod:s});await this._signoutStart({request_type:"so:r",post_logout_redirect_uri:this.settings.post_logout_redirect_uri,...i},r),t.info("success")}async signoutRedirectCallback(e=window.location.href){const t=this._logger.create("signoutRedirectCallback"),s=await this._signoutEnd(e);return t.info("success"),s}async signoutPopup(e={}){const t=this._logger.create("signoutPopup"),{popupWindowFeatures:s,popupWindowTarget:i,...r}=e,n=this.settings.popup_post_logout_redirect_uri,o=await this._popupNavigator.prepare({popupWindowFeatures:s,popupWindowTarget:i});await this._signout({request_type:"so:p",post_logout_redirect_uri:n,state:n==null?void 0:{},...r},o),t.info("success")}async signoutPopupCallback(e=window.location.href,t=!1){const s=this._logger.create("signoutPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),s.info("success")}async _signout(e,t){const s=await this._signoutStart(e,t);return await this._signoutEnd(s.url)}async _signoutStart(e={},t){var s;const i=this._logger.create("_signoutStart");try{const r=await this._loadUser();i.debug("loaded current user from storage"),this.settings.revokeTokensOnSignout&&await this._revokeInternal(r);const n=e.id_token_hint||r&&r.id_token;n&&(i.debug("setting id_token_hint in signout request"),e.id_token_hint=n),await this.removeUser(),i.debug("user removed, creating signout request");const o=await this._client.createSignoutRequest(e);return i.debug("got signout request"),await t.navigate({url:o.url,state:(s=o.state)==null?void 0:s.id,scriptOrigin:this.settings.iframeScriptOrigin})}catch(r){throw i.debug("error after preparing navigator, closing navigator window"),t.close(),r}}async _signoutEnd(e){const t=this._logger.create("_signoutEnd"),s=await this._client.processSignoutResponse(e);return t.debug("got signout response"),s}async signoutSilent(e={}){var t;const s=this._logger.create("signoutSilent"),{silentRequestTimeoutInSeconds:i,...r}=e,n=this.settings.includeIdTokenInSilentSignout?(t=await this._loadUser())==null?void 0:t.id_token:void 0,o=this.settings.popup_post_logout_redirect_uri,a=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:i});await this._signout({request_type:"so:s",post_logout_redirect_uri:o,id_token_hint:n,...r},a),s.info("success")}async signoutSilentCallback(e=window.location.href){const t=this._logger.create("signoutSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async revokeTokens(e){const t=await this._loadUser();await this._revokeInternal(t,e)}async _revokeInternal(e,t=this.settings.revokeTokenTypes){const s=this._logger.create("_revokeInternal");if(!e)return;const i=t.filter(r=>typeof e[r]=="string");if(!i.length){s.debug("no need to revoke due to no token(s)");return}for(const r of i)await this._client.revokeToken(e[r],r),s.info(`${r} revoked successfully`),r!=="access_token"&&(e[r]=null);await this.storeUser(e),s.debug("user stored"),await this._events.load(e)}startSilentRenew(){this._logger.create("startSilentRenew"),this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}async _loadUser(){const e=this._logger.create("_loadUser"),t=await this.settings.userStore.get(this._userStoreKey);return t?(e.debug("user storageString loaded"),J.fromStorageString(t)):(e.debug("no user storageString"),null)}async storeUser(e){const t=this._logger.create("storeUser");if(e){t.debug("storing user");const s=e.toStorageString();await this.settings.userStore.set(this._userStoreKey,s)}else this._logger.debug("removing user"),await this.settings.userStore.remove(this._userStoreKey)}async clearStaleState(){await this._client.clearStaleState()}};class Rt{async authenticate(t,s){try{const i=await fetch("/_auth/authenticate",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:t,isResend:s})});if(!i.ok)throw new Error(await i.text());return null}catch(i){return i instanceof Error?i.message:"Error authenticating user"}}async verify(t,s){const i=await fetch("/_auth/verify",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({email:t,token:s})});if(!i.ok){if(i.status==410)throw new Error("expired");return null}return(await i.json()).jwt}}const j=class{constructor(){N(this,"oidcUserManager");if(!j.isConfigured())throw new Error("OIDCUserProvider is not configured");const t={authority:j.authority,client_id:j.clientID,redirect_uri:window.location.origin+"/oidc-login-callback"};this.oidcUserManager=new wt(t)}static init(t,s){this.clientID=t,this.authority=s}static isConfigured(){return!!this.clientID&&!!this.authority}async login(){const t=await this.oidcUserManager.signinPopup({scope:"openid profile email"}),s=await fetch("/_auth/oidc-verify",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({access_token:t.access_token})});return s.ok?(await s.json()).jwt:null}async loginCallback(){await this.oidcUserManager.signinPopupCallback()}async logout(){await this.oidcUserManager.signoutPopup({post_logout_redirect_uri:window.location.origin+"/oidc-logout-callback"})}async logoutCallback(){await this.oidcUserManager.signoutPopupCallback()}};let P=j;N(P,"clientID",null),N(P,"authority",null);const xt=async()=>{P.isConfigured()&&new P().logout().catch(Ae)};async function Ut(){const e=await fetch("/_settings");if(!e.ok)throw new Error(await e.text());const t=await e.json();F.init(t)}const $=class{constructor(t){this.config=t}static init(t){P.init(t.oidc_client_id,t.oidc_authority),$.instance=new $(t)}get showWatermark(){return this.config.show_watermark}get isStagingRelease(){return{}.VITE_ABSTRA_RELEASE==="staging"}get isLocal(){return location.origin.match(/http:\/\/localhost:\d+/)}get showLogout(){return this.config.editor_mode==="local"}};let F=$;N(F,"instance",null);function oe(e,t,s){return Me(t)?t:s==="player"?`/_assets/${e}`:`/_editor/api/assets/${t}`}const ve="#414a58",ye="#FFFFFF",mt="#000000",be="DM Sans",St="Untitled Project",ke={value:"en",label:"English"};function vt(e){var t,s,i,r,n,o,a,c,l,h,d,_,p,m,S,v;return{id:e.id,path:e.path,theme:(t=e.workspace.theme)!=null?t:ye,brandName:(s=e.workspace.brand_name)!=null?s:null,title:e.title,isInitial:e.is_initial,isLocal:(i=e.is_local)!=null?i:!1,startMessage:(r=e.start_message)!=null?r:null,endMessage:(n=e.end_message)!=null?n:null,errorMessage:(o=e.error_message)!=null?o:null,timeoutMessage:(a=e.timeout_message)!=null?a:null,startButtonText:(c=e.start_button_text)!=null?c:null,restartButtonText:(l=e.restart_button_text)!=null?l:null,logoUrl:e.workspace.logo_url,mainColor:(h=e.workspace.main_color)!=null?h:ve,fontFamily:(d=e.workspace.font_family)!=null?d:be,autoStart:(_=e.auto_start)!=null?_:!1,allowRestart:e.allow_restart,welcomeTitle:(p=e.welcome_title)!=null?p:null,runtimeType:"form",language:(m=e.workspace.language)!=null?m:ke.value,sidebar:(v=(S=e.workspace)==null?void 0:S.sidebar)!=null?v:[]}}function ae(e){var s;const t=(s=e.theme)!=null?s:ye;return{name:e.name||St,fontColor:e.font_color||mt,sidebar:e.sidebar||[],brandName:e.brand_name||"",fontFamily:e.font_family||be,logoUrl:e.logo_url?oe("logo",e.logo_url,"player"):null,mainColor:e.main_color||ve,theme:qe(t)?t:oe("background",t,"player"),language:e.language||ke.value}}async function Ct(e){const t=Y(),s=await fetch(`/_pages/${e}`,{headers:t.authHeaders});if(s.status===404)return null;if(!s.ok)throw new Error(await s.text());const{form:i}=await s.json();return i?vt(i):null}async function yt(){const e=Y(),t=await fetch("/_workspace",{headers:e.authHeaders});if(t.status!=200)return ae({});const s=await t.json();return ae(s)}async function Pt(e){const t=Y();return(await fetch(`/_access-control/allow${e}`,{headers:t.authHeaders})).json()}const At=Oe("workspace",()=>{const e=Ne({workspace:null,loading:!1});return{state:e,actions:{async fetch(){e.value.loading=!0,e.value.workspace=await yt(),e.value.loading=!1}}}});export{Rt as A,ve as D,P as O,F as S,Pt as a,be as b,ke as c,ye as d,Ct as f,xt as l,oe as m,Ut as s,At as u};
2
+ //# sourceMappingURL=workspaceStore.6a20c00d.js.map
@@ -1,7 +1,7 @@
1
- import{m as d}from"./toggleHighContrast.fc60753d.js";import"./jwt-decode.esm.992666e9.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="a86d3fd3-fe0d-41ac-bb14-33162e81484e",t._sentryDebugIdIdentifier="sentry-dbid-a86d3fd3-fe0d-41ac-bb14-33162e81484e")}catch{}})();/*!-----------------------------------------------------------------------------
1
+ import{m as d}from"./toggleHighContrast.cb5e834a.js";import"./jwt-decode.esm.1b301f74.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="88ef369f-851a-42f2-9736-bed89c1c6920",t._sentryDebugIdIdentifier="sentry-dbid-88ef369f-851a-42f2-9736-bed89c1c6920")}catch{}})();/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f)
4
4
  * Released under the MIT license
5
5
  * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
6
- *-----------------------------------------------------------------------------*/var c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,r=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of m(e))!s.call(t,a)&&a!==n&&c(t,a,{get:()=>e[a],enumerable:!(i=l(e,a))||i.enumerable});return t},p=(t,e,n)=>(r(t,e,"default"),n&&r(n,e,"default")),o={};p(o,d);var g={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:o.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:o.languages.IndentAction.Indent}}]},b={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};export{g as conf,b as language};
7
- //# sourceMappingURL=xml.3541c340.js.map
6
+ *-----------------------------------------------------------------------------*/var c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,r=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of m(e))!s.call(t,o)&&o!==n&&c(t,o,{get:()=>e[o],enumerable:!(i=l(e,o))||i.enumerable});return t},p=(t,e,n)=>(r(t,e,"default"),n&&r(n,e,"default")),a={};p(a,d);var g={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:a.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:a.languages.IndentAction.Indent}}]},b={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};export{g as conf,b as language};
7
+ //# sourceMappingURL=xml.070d3630.js.map
@@ -1,7 +1,7 @@
1
- import{m as i}from"./toggleHighContrast.fc60753d.js";import"./jwt-decode.esm.992666e9.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="8b03b412-cb4b-46c5-9fd3-20f2860da851",n._sentryDebugIdIdentifier="sentry-dbid-8b03b412-cb4b-46c5-9fd3-20f2860da851")}catch{}})();/*!-----------------------------------------------------------------------------
1
+ import{m as i}from"./toggleHighContrast.cb5e834a.js";import"./jwt-decode.esm.1b301f74.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[e]="cef566e6-9a97-4dc3-9bea-2f6a7170a5fd",n._sentryDebugIdIdentifier="sentry-dbid-cef566e6-9a97-4dc3-9bea-2f6a7170a5fd")}catch{}})();/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.34.1(547870b6881302c5b4ff32173c16d06009e3588f)
4
4
  * Released under the MIT license
5
5
  * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
6
- *-----------------------------------------------------------------------------*/var c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,a=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of d(e))!s.call(n,r)&&r!==t&&c(n,r,{get:()=>e[r],enumerable:!(o=u(e,r))||o.enumerable});return n},b=(n,e,t)=>(a(n,e,"default"),t&&a(t,e,"default")),l={};b(l,i);var f={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:l.languages.IndentAction.Indent}}]},g={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|.*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/[^#]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{f as conf,g as language};
7
- //# sourceMappingURL=yaml.314312d8.js.map
6
+ *-----------------------------------------------------------------------------*/var c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,a=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of d(e))!s.call(n,r)&&r!==t&&c(n,r,{get:()=>e[r],enumerable:!(o=u(e,r))||o.enumerable});return n},m=(n,e,t)=>(a(n,e,"default"),t&&a(t,e,"default")),l={};m(l,i);var f={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:l.languages.IndentAction.Indent}}]},g={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|.*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/[^#]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{f as conf,g as language};
7
+ //# sourceMappingURL=yaml.2a862691.js.map
@@ -11,21 +11,21 @@
11
11
  name="description"
12
12
  content="Log in to Abstra’s Cloud Console to deploy and manage your Python workflows and scripts, user access, logs and more."
13
13
  />
14
- <script type="module" crossorigin src="/assets/console.54ab975c.js"></script>
15
- <link rel="modulepreload" crossorigin href="/assets/jwt-decode.esm.992666e9.js">
16
- <link rel="modulepreload" crossorigin href="/assets/index.3ff1c0be.js">
17
- <link rel="modulepreload" crossorigin href="/assets/index.9e0166fe.js">
18
- <link rel="modulepreload" crossorigin href="/assets/index.d181a22c.js">
19
- <link rel="modulepreload" crossorigin href="/assets/router.1324a1a9.js">
20
- <link rel="modulepreload" crossorigin href="/assets/Breadcrumb.d0cc2c91.js">
21
- <link rel="modulepreload" crossorigin href="/assets/index.3d2a7b6d.js">
22
- <link rel="modulepreload" crossorigin href="/assets/index.5e22e010.js">
23
- <link rel="modulepreload" crossorigin href="/assets/Card.957a87b2.js">
24
- <link rel="modulepreload" crossorigin href="/assets/index.3e7471f4.js">
25
- <link rel="modulepreload" crossorigin href="/assets/index.36d8b30a.js">
26
- <link rel="modulepreload" crossorigin href="/assets/dayjs.a6bd0ee0.js">
27
- <link rel="modulepreload" crossorigin href="/assets/index.37c46161.js">
28
- <link rel="modulepreload" crossorigin href="/assets/index.a7b8e25e.js">
14
+ <script type="module" crossorigin src="/assets/console.0548c6a0.js"></script>
15
+ <link rel="modulepreload" crossorigin href="/assets/jwt-decode.esm.1b301f74.js">
16
+ <link rel="modulepreload" crossorigin href="/assets/index.a5ddebc4.js">
17
+ <link rel="modulepreload" crossorigin href="/assets/index.2efe5ae2.js">
18
+ <link rel="modulepreload" crossorigin href="/assets/index.8ea8b90b.js">
19
+ <link rel="modulepreload" crossorigin href="/assets/router.99a53337.js">
20
+ <link rel="modulepreload" crossorigin href="/assets/Breadcrumb.21c760be.js">
21
+ <link rel="modulepreload" crossorigin href="/assets/index.e189c6ed.js">
22
+ <link rel="modulepreload" crossorigin href="/assets/index.ded0f9ab.js">
23
+ <link rel="modulepreload" crossorigin href="/assets/Card.714646f7.js">
24
+ <link rel="modulepreload" crossorigin href="/assets/index.d73f307c.js">
25
+ <link rel="modulepreload" crossorigin href="/assets/index.cef986ac.js">
26
+ <link rel="modulepreload" crossorigin href="/assets/dayjs.b139fc88.js">
27
+ <link rel="modulepreload" crossorigin href="/assets/index.424d5056.js">
28
+ <link rel="modulepreload" crossorigin href="/assets/index.61710ff9.js">
29
29
  <link rel="stylesheet" href="/assets/jwt-decode.9f7a5511.css">
30
30
  <link rel="stylesheet" href="/assets/index.32bec70b.css">
31
31
  </head>
@@ -7,17 +7,19 @@
7
7
  <!-- Primary Meta Tags -->
8
8
  <title>Abstra Editor</title>
9
9
  <meta name="title" content="Abstra Editor" />
10
- <script type="module" crossorigin src="/assets/editor.0ce52658.js"></script>
11
- <link rel="modulepreload" crossorigin href="/assets/jwt-decode.esm.992666e9.js">
12
- <link rel="modulepreload" crossorigin href="/assets/userStore.9e7a540a.js">
13
- <link rel="modulepreload" crossorigin href="/assets/url.f490879d.js">
14
- <link rel="modulepreload" crossorigin href="/assets/colorHelpers.d4f3f275.js">
15
- <link rel="modulepreload" crossorigin href="/assets/workspaceStore.4f0c433f.js">
16
- <link rel="modulepreload" crossorigin href="/assets/router.55c0ff56.js">
17
- <link rel="modulepreload" crossorigin href="/assets/asyncComputed.1b787534.js">
18
- <link rel="modulepreload" crossorigin href="/assets/linters.3c5f0c83.js">
19
- <link rel="modulepreload" crossorigin href="/assets/constants.36bf7d70.js">
20
- <link rel="modulepreload" crossorigin href="/assets/index.d181a22c.js">
10
+ <script type="module" crossorigin src="/assets/editor.f7e5ca32.js"></script>
11
+ <link rel="modulepreload" crossorigin href="/assets/jwt-decode.esm.1b301f74.js">
12
+ <link rel="modulepreload" crossorigin href="/assets/userStore.843da693.js">
13
+ <link rel="modulepreload" crossorigin href="/assets/url.84e62ca8.js">
14
+ <link rel="modulepreload" crossorigin href="/assets/colorHelpers.59e5ee56.js">
15
+ <link rel="modulepreload" crossorigin href="/assets/workspaceStore.6a20c00d.js">
16
+ <link rel="modulepreload" crossorigin href="/assets/router.8882099a.js">
17
+ <link rel="modulepreload" crossorigin href="/assets/contracts.generated.ac0bb8ea.js">
18
+ <link rel="modulepreload" crossorigin href="/assets/useCodebaseEvents.c47ad36d.js">
19
+ <link rel="modulepreload" crossorigin href="/assets/constants.f352d89b.js">
20
+ <link rel="modulepreload" crossorigin href="/assets/asyncComputed.92146382.js">
21
+ <link rel="modulepreload" crossorigin href="/assets/linters.0018d44c.js">
22
+ <link rel="modulepreload" crossorigin href="/assets/index.8ea8b90b.js">
21
23
  <link rel="stylesheet" href="/assets/jwt-decode.9f7a5511.css">
22
24
  <link rel="stylesheet" href="/assets/index.57042181.css">
23
25
  </head>
@@ -14,15 +14,15 @@
14
14
  },
15
15
  };
16
16
  </script>
17
- <script type="module" crossorigin src="/assets/player.5b7eaa25.js"></script>
18
- <link rel="modulepreload" crossorigin href="/assets/jwt-decode.esm.992666e9.js">
19
- <link rel="modulepreload" crossorigin href="/assets/userStore.9e7a540a.js">
20
- <link rel="modulepreload" crossorigin href="/assets/url.f490879d.js">
21
- <link rel="modulepreload" crossorigin href="/assets/colorHelpers.d4f3f275.js">
22
- <link rel="modulepreload" crossorigin href="/assets/workspaceStore.4f0c433f.js">
23
- <link rel="modulepreload" crossorigin href="/assets/router.55c0ff56.js">
24
- <link rel="modulepreload" crossorigin href="/assets/PlayerConfigProvider.2acd3a77.js">
25
- <link rel="modulepreload" crossorigin href="/assets/App.vue_vue_type_style_index_0_lang.efd9d3fa.js">
17
+ <script type="module" crossorigin src="/assets/player.82dc9e2f.js"></script>
18
+ <link rel="modulepreload" crossorigin href="/assets/jwt-decode.esm.1b301f74.js">
19
+ <link rel="modulepreload" crossorigin href="/assets/userStore.843da693.js">
20
+ <link rel="modulepreload" crossorigin href="/assets/url.84e62ca8.js">
21
+ <link rel="modulepreload" crossorigin href="/assets/colorHelpers.59e5ee56.js">
22
+ <link rel="modulepreload" crossorigin href="/assets/workspaceStore.6a20c00d.js">
23
+ <link rel="modulepreload" crossorigin href="/assets/router.8882099a.js">
24
+ <link rel="modulepreload" crossorigin href="/assets/PlayerConfigProvider.5aec8c16.js">
25
+ <link rel="modulepreload" crossorigin href="/assets/App.vue_vue_type_style_index_0_lang.13b52476.js">
26
26
  <link rel="stylesheet" href="/assets/jwt-decode.9f7a5511.css">
27
27
  <link rel="stylesheet" href="/assets/PlayerConfigProvider.1ce9d3b1.css">
28
28
  <link rel="stylesheet" href="/assets/App.0c2736ee.css">
@@ -1,2 +0,0 @@
1
- import{d as y,c as b,o as r,a as d,b as o,f as l,u as n,de as i,a7 as p,h as c,ez as u,eA as g,bR as f,aV as m,e6 as _}from"./jwt-decode.esm.992666e9.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="5ba6a1c7-3caa-4c3d-bc63-a0b9b7f4bafc",t._sentryDebugIdIdentifier="sentry-dbid-5ba6a1c7-3caa-4c3d-bc63-a0b9b7f4bafc")}catch{}})();const h=y({__name:"AbstraButton",props:{disabledTooltip:{},tooltip:{},prefixCls:{},type:{},htmlType:{},shape:{},size:{},loading:{type:[Boolean,Object]},disabled:{type:Boolean},ghost:{type:Boolean},block:{type:Boolean},danger:{type:Boolean},icon:{},href:{},target:{},title:{},onClick:{type:[Function,Array]},onMousedown:{type:[Function,Array]}},setup(t){const e=t,s=b(()=>e.disabledTooltip&&e.disabled?e.disabledTooltip:e.tooltip);return(a,k)=>s.value?(r(),d(n(m),{key:0,title:s.value},{default:o(()=>[l(n(f),u(g(a.$props)),{default:o(()=>[l(n(i),{style:{display:"flex","align-items":"center","justify-content":"center",gap:"5px"}},{default:o(()=>[a.loading?c("",!0):p(a.$slots,"default",{key:0})]),_:3})]),_:3},16)]),_:3},8,["title"])):(r(),d(n(f),u(_({key:1},a.$props)),{default:o(()=>[l(n(i),{style:{display:"flex","align-items":"center","justify-content":"center",gap:"5px"}},{default:o(()=>[a.loading?c("",!0):p(a.$slots,"default",{key:0})]),_:3})]),_:3},16))}});export{h as _};
2
- //# sourceMappingURL=AbstraButton.vue_vue_type_script_setup_true_lang.205eb76e.js.map
@@ -1,2 +0,0 @@
1
- import{L as t}from"./Logo.83b476a4.js";import{d as n,o as r,a as d,u as f}from"./jwt-decode.esm.992666e9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="97ffc618-bc16-4f22-a0b7-6a629b386d0b",e._sentryDebugIdIdentifier="sentry-dbid-97ffc618-bc16-4f22-a0b7-6a629b386d0b")}catch{}})();const i="/assets/logo.0faadfa2.svg",u=n({__name:"AbstraLogo",props:{hideText:{type:Boolean},size:{}},setup(e){return(s,a)=>{var o;return r(),d(t,{"image-url":f(i),"brand-name":"Abstra","hide-text":s.hideText,size:(o=s.size)!=null?o:"small"},null,8,["image-url","hide-text","size"])}}});export{u as _};
2
- //# sourceMappingURL=AbstraLogo.vue_vue_type_script_setup_true_lang.32a17b0c.js.map
@@ -1,2 +0,0 @@
1
- import{C as w}from"./CrudView.8fb84eac.js";import{d as _,r as k,eb as x,c as v,a5 as C,f as l,u as i,b as d,aR as P,o as h,d9 as D,g as y,da as M,ed as j,M as N,ee as K,eq as T}from"./jwt-decode.esm.992666e9.js";import{a as V}from"./asyncComputed.1b787534.js";import{A as c}from"./apiKey.95126643.js";import"./router.1324a1a9.js";import{M as B}from"./member.6b2b3438.js";import{a as E}from"./project.76f0af14.js";import"./tables.c26107a1.js";import"./DocsButton.vue_vue_type_script_setup_true_lang.0555d923.js";import"./constants.36bf7d70.js";import"./url.f490879d.js";import"./PhDotsThreeVertical.vue.2db678ef.js";import"./index.3d2a7b6d.js";import"./index.d181a22c.js";import"./record.87ef3b68.js";import"./string.f6a7565f.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="4854995d-50bf-47dd-9712-b46885894482",n._sentryDebugIdIdentifier="sentry-dbid-4854995d-50bf-47dd-9712-b46885894482")}catch{}})();const ee=_({__name:"ApiKeys",setup(n){const a=k(null),p=[{key:"name",label:"API key name"}],s=x().params.projectId,f=new B,{loading:g,result:b,refetch:u}=V(async()=>Promise.all([c.list(s),E.get(s).then(e=>f.list(e.organizationId))]).then(([e,t])=>e.map(o=>({apiKey:o,member:t.find(r=>r.authorId===o.ownerId)})))),I=async e=>{const t=await c.create({projectId:s,name:e.name});u(),a.value=t.value},A=v(()=>{var e,t;return{columns:[{title:"Name"},{title:"Creation date"},{title:"Owner"},{title:"",align:"right"}],rows:(t=(e=b.value)==null?void 0:e.map(({apiKey:o,member:r})=>{var m;return{key:o.id,cells:[{type:"text",text:o.name},{type:"text",text:K(o.createdAt)},{type:"text",text:(m=r==null?void 0:r.email)!=null?m:"Unknown"},{type:"actions",actions:[{label:"Delete",icon:T,dangerous:!0,onClick:async()=>{await c.delete(s,o.id),u()}}]}]}}))!=null?t:[]}});return(e,t)=>(h(),C(P,null,[l(w,{"entity-name":"API key","create-button-text":"Create API Key",loading:i(g),title:"API Keys",description:"API Keys are used to deploy your project from the local editor.","empty-title":"No API keys here yet",table:A.value,fields:p,create:I},null,8,["loading","table"]),l(i(N),{open:!!a.value,title:"Api key generated",onCancel:t[0]||(t[0]=o=>a.value=null)},{footer:d(()=>[]),default:d(()=>[l(i(D),null,{default:d(()=>[y("Your API key was successfully generated. Use this code to login on your local development environment or deploy using CI")]),_:1}),l(i(M),{code:"",copyable:""},{default:d(()=>[y(j(a.value),1)]),_:1})]),_:1},8,["open"])],64))}});export{ee as default};
2
- //# sourceMappingURL=ApiKeys.7fefafb4.js.map
@@ -1,2 +0,0 @@
1
- import"./App.vue_vue_type_style_index_0_lang.efd9d3fa.js";import{_ as a}from"./App.vue_vue_type_style_index_0_lang.efd9d3fa.js";import"./userStore.9e7a540a.js";import"./jwt-decode.esm.992666e9.js";import"./PlayerConfigProvider.2acd3a77.js";import"./colorHelpers.d4f3f275.js";import"./workspaceStore.4f0c433f.js";import"./url.f490879d.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cb98c074-0f0c-4505-9c3c-0de94bb463cd",e._sentryDebugIdIdentifier="sentry-dbid-cb98c074-0f0c-4505-9c3c-0de94bb463cd")}catch{}})();export{a as default};
2
- //# sourceMappingURL=App.c29df54f.js.map
@@ -1,2 +0,0 @@
1
- import{u as r}from"./userStore.9e7a540a.js";import{W as n}from"./PlayerConfigProvider.2acd3a77.js";import{u as c}from"./workspaceStore.4f0c433f.js";import{d as f,w as i,m as d,u as o,a as p,b as u,h as l,o as m,f as _}from"./jwt-decode.esm.992666e9.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="6a2aa7f6-434b-4b9c-8bf0-0e2440d7be1d",t._sentryDebugIdIdentifier="sentry-dbid-6a2aa7f6-434b-4b9c-8bf0-0e2440d7be1d")}catch{}})();const v=f({__name:"App",setup(t){const a=r(),e=c();return e.actions.fetch(),i(()=>a.jwt,e.actions.fetch),(b,w)=>{const s=d("RouterView");return o(e).state.workspace?(m(),p(n,{key:0,"main-color":o(e).state.workspace.mainColor,background:o(e).state.workspace.theme,"font-family":o(e).state.workspace.fontFamily,locale:o(e).state.workspace.language},{default:u(()=>[_(s,{style:{height:"100vh",width:"100%"}})]),_:1},8,["main-color","background","font-family","locale"])):l("",!0)}}});export{v as _};
2
- //# sourceMappingURL=App.vue_vue_type_style_index_0_lang.efd9d3fa.js.map
@@ -1,2 +0,0 @@
1
- import{_ as c,o,a5 as n,a7 as s,e as d,h as a}from"./jwt-decode.esm.992666e9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b8176822-53dc-40ad-84f2-dfa17ef23b91",e._sentryDebugIdIdentifier="sentry-dbid-b8176822-53dc-40ad-84f2-dfa17ef23b91")}catch{}})();const r={},i={class:"base-layout"},f={class:"base-middle"},_={class:"content"},l={class:"left"},u={key:0,class:"base-footer"},b={key:0};function y(e,t){return o(),n("div",i,[s(e.$slots,"sidebar",{},void 0,!0),d("section",f,[s(e.$slots,"navbar",{},void 0,!0),d("section",_,[d("section",l,[s(e.$slots,"content",{},void 0,!0),e.$slots.footer?(o(),n("section",u,[s(e.$slots,"footer",{},void 0,!0)])):a("",!0)]),e.$slots.chat?(o(),n("section",b,[s(e.$slots,"chat",{},void 0,!0)])):a("",!0)])])])}const g=c(r,[["render",y],["__scopeId","data-v-da85ecdc"]]);export{g as B};
2
- //# sourceMappingURL=BaseLayout.b60c33b8.js.map
@@ -1,2 +0,0 @@
1
- import{f as c,e7 as d,eY as o}from"./jwt-decode.esm.992666e9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d03a1514-6ed0-4b9d-a1c1-8caf35c4e7ad",e._sentryDebugIdIdentifier="sentry-dbid-d03a1514-6ed0-4b9d-a1c1-8caf35c4e7ad")}catch{}})();function l(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?Object(arguments[t]):{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable}))),n.forEach(function(a){u(e,a,r[a])})}return e}function u(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=function(t,r){var n=l({},t,r.attrs);return c(d,l({},n,{icon:o}),null)};i.displayName="CloseCircleOutlined";i.inheritAttrs=!1;const s=i;export{s as C};
2
- //# sourceMappingURL=CloseCircleOutlined.4e05b917.js.map