@memberjunction/ng-explorer-core 5.22.0 → 5.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/app-routing.module.d.ts.map +1 -1
  2. package/dist/app-routing.module.js +1 -3
  3. package/dist/app-routing.module.js.map +1 -1
  4. package/dist/generated/lazy-feature-config.d.ts +1 -1
  5. package/dist/generated/lazy-feature-config.d.ts.map +1 -1
  6. package/dist/generated/lazy-feature-config.js +5 -2
  7. package/dist/generated/lazy-feature-config.js.map +1 -1
  8. package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js +49 -49
  9. package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js.map +1 -1
  10. package/dist/lib/oauth/oauth-callback.component.js +6 -6
  11. package/dist/lib/oauth/oauth-callback.component.js.map +1 -1
  12. package/dist/lib/oauth/oauth.module.d.ts +2 -3
  13. package/dist/lib/oauth/oauth.module.d.ts.map +1 -1
  14. package/dist/lib/oauth/oauth.module.js +0 -4
  15. package/dist/lib/oauth/oauth.module.js.map +1 -1
  16. package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts +6 -25
  17. package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts.map +1 -1
  18. package/dist/lib/resource-wrappers/chat-collections-resource.component.js +30 -124
  19. package/dist/lib/resource-wrappers/chat-collections-resource.component.js.map +1 -1
  20. package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts +7 -23
  21. package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts.map +1 -1
  22. package/dist/lib/resource-wrappers/chat-conversations-resource.component.js +50 -142
  23. package/dist/lib/resource-wrappers/chat-conversations-resource.component.js.map +1 -1
  24. package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts +3 -19
  25. package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts.map +1 -1
  26. package/dist/lib/resource-wrappers/chat-tasks-resource.component.js +16 -98
  27. package/dist/lib/resource-wrappers/chat-tasks-resource.component.js.map +1 -1
  28. package/dist/lib/resource-wrappers/list-detail-resource.component.d.ts +3 -1
  29. package/dist/lib/resource-wrappers/list-detail-resource.component.d.ts.map +1 -1
  30. package/dist/lib/resource-wrappers/list-detail-resource.component.js +3 -0
  31. package/dist/lib/resource-wrappers/list-detail-resource.component.js.map +1 -1
  32. package/dist/lib/resource-wrappers/notifications-resource.component.js +1 -0
  33. package/dist/lib/resource-wrappers/notifications-resource.component.js.map +1 -1
  34. package/dist/lib/resource-wrappers/view-resource.component.d.ts +13 -11
  35. package/dist/lib/resource-wrappers/view-resource.component.d.ts.map +1 -1
  36. package/dist/lib/resource-wrappers/view-resource.component.js +80 -89
  37. package/dist/lib/resource-wrappers/view-resource.component.js.map +1 -1
  38. package/dist/lib/services/startup-validation.service.d.ts.map +1 -1
  39. package/dist/lib/services/startup-validation.service.js +0 -3
  40. package/dist/lib/services/startup-validation.service.js.map +1 -1
  41. package/dist/lib/shell/components/header/app-nav.component.d.ts.map +1 -1
  42. package/dist/lib/shell/components/header/app-nav.component.js +18 -3
  43. package/dist/lib/shell/components/header/app-nav.component.js.map +1 -1
  44. package/dist/lib/shell/components/tabs/component-cache-manager.d.ts +45 -16
  45. package/dist/lib/shell/components/tabs/component-cache-manager.d.ts.map +1 -1
  46. package/dist/lib/shell/components/tabs/component-cache-manager.js +57 -35
  47. package/dist/lib/shell/components/tabs/component-cache-manager.js.map +1 -1
  48. package/dist/lib/shell/components/tabs/tab-container.component.d.ts +33 -0
  49. package/dist/lib/shell/components/tabs/tab-container.component.d.ts.map +1 -1
  50. package/dist/lib/shell/components/tabs/tab-container.component.js +99 -17
  51. package/dist/lib/shell/components/tabs/tab-container.component.js.map +1 -1
  52. package/dist/lib/shell/services/settings-dialog.service.d.ts +8 -8
  53. package/dist/lib/shell/services/settings-dialog.service.d.ts.map +1 -1
  54. package/dist/lib/shell/services/settings-dialog.service.js +20 -26
  55. package/dist/lib/shell/services/settings-dialog.service.js.map +1 -1
  56. package/dist/lib/shell/shell.component.d.ts.map +1 -1
  57. package/dist/lib/shell/shell.component.js +17 -17
  58. package/dist/lib/shell/shell.component.js.map +1 -1
  59. package/dist/lib/shell/shell.module.d.ts +4 -5
  60. package/dist/lib/shell/shell.module.d.ts.map +1 -1
  61. package/dist/lib/shell/shell.module.js +4 -8
  62. package/dist/lib/shell/shell.module.js.map +1 -1
  63. package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +72 -71
  64. package/dist/lib/single-dashboard/Components/add-item/add-item.component.js.map +1 -1
  65. package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js +11 -11
  66. package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js.map +1 -1
  67. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts +36 -12
  68. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts.map +1 -1
  69. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js +78 -50
  70. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js.map +1 -1
  71. package/dist/lib/single-dashboard/single-dashboard.component.d.ts +12 -5
  72. package/dist/lib/single-dashboard/single-dashboard.component.d.ts.map +1 -1
  73. package/dist/lib/single-dashboard/single-dashboard.component.js +44 -55
  74. package/dist/lib/single-dashboard/single-dashboard.component.js.map +1 -1
  75. package/dist/lib/single-list-detail/single-list-detail.component.d.ts +10 -2
  76. package/dist/lib/single-list-detail/single-list-detail.component.d.ts.map +1 -1
  77. package/dist/lib/single-list-detail/single-list-detail.component.js +313 -243
  78. package/dist/lib/single-list-detail/single-list-detail.component.js.map +1 -1
  79. package/dist/module.d.ts +51 -63
  80. package/dist/module.d.ts.map +1 -1
  81. package/dist/module.js +35 -80
  82. package/dist/module.js.map +1 -1
  83. package/dist/public-api.d.ts +0 -1
  84. package/dist/public-api.d.ts.map +1 -1
  85. package/dist/public-api.js +0 -1
  86. package/dist/public-api.js.map +1 -1
  87. package/package.json +38 -47
  88. package/dist/lib/generic/form-toolbar.d.ts +0 -8
  89. package/dist/lib/generic/form-toolbar.d.ts.map +0 -1
  90. package/dist/lib/generic/form-toolbar.js +0 -114
  91. package/dist/lib/generic/form-toolbar.js.map +0 -1
@@ -14,8 +14,8 @@ import { Component } from '@angular/core';
14
14
  import { Metadata } from '@memberjunction/core';
15
15
  import * as i0 from "@angular/core";
16
16
  import * as i1 from "@angular/router";
17
- import * as i2 from "@progress/kendo-angular-buttons";
18
- import * as i3 from "@memberjunction/ng-shared-generic";
17
+ import * as i2 from "@memberjunction/ng-shared-generic";
18
+ import * as i3 from "@memberjunction/ng-ui-components";
19
19
  function OAuthCallbackComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
20
20
  i0.ɵɵelementStart(0, "div", 2);
21
21
  i0.ɵɵelement(1, "mj-loading", 5);
@@ -70,7 +70,7 @@ function OAuthCallbackComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
70
70
  i0.ɵɵadvance(2);
71
71
  i0.ɵɵconditional(ctx_r0.IsRetryable ? 9 : -1);
72
72
  i0.ɵɵadvance();
73
- i0.ɵɵproperty("look", ctx_r0.IsRetryable ? "outline" : "default");
73
+ i0.ɵɵproperty("variant", ctx_r0.IsRetryable ? "outline" : "secondary");
74
74
  } }
75
75
  function OAuthCallbackComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
76
76
  i0.ɵɵelementStart(0, "div", 4)(1, "div", 16);
@@ -385,7 +385,7 @@ export class OAuthCallbackComponent {
385
385
  this.router.navigate(['/app/admin/MCP']);
386
386
  }
387
387
  static ɵfac = function OAuthCallbackComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || OAuthCallbackComponent)(i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i1.Router), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
388
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: OAuthCallbackComponent, selectors: [["mj-oauth-callback"]], standalone: false, decls: 5, vars: 3, consts: [[1, "oauth-callback-container"], [1, "oauth-callback-card"], [1, "oauth-status", "loading"], [1, "oauth-status", "error"], [1, "oauth-status", "success"], [3, "text"], [1, "icon-container", "error-icon"], [1, "fa-solid", "fa-circle-exclamation"], [1, "error-code"], [1, "error-message"], [1, "button-group"], ["kendoButton", ""], ["kendoButton", "", 3, "click", "look"], [1, "fa-solid", "fa-arrow-left"], ["kendoButton", "", 3, "click"], [1, "fa-solid", "fa-rotate-right"], [1, "icon-container", "success-icon"], [1, "fa-solid", "fa-circle-check"]], template: function OAuthCallbackComponent_Template(rf, ctx) { if (rf & 1) {
388
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: OAuthCallbackComponent, selectors: [["mj-oauth-callback"]], standalone: false, decls: 5, vars: 3, consts: [[1, "oauth-callback-container"], [1, "oauth-callback-card"], [1, "oauth-status", "loading"], [1, "oauth-status", "error"], [1, "oauth-status", "success"], [3, "text"], [1, "icon-container", "error-icon"], [1, "fa-solid", "fa-circle-exclamation"], [1, "error-code"], [1, "error-message"], [1, "button-group"], ["mjButton", "", "variant", "secondary"], ["mjButton", "", 3, "click", "variant"], [1, "fa-solid", "fa-arrow-left"], ["mjButton", "", "variant", "secondary", 3, "click"], [1, "fa-solid", "fa-rotate-right"], [1, "icon-container", "success-icon"], [1, "fa-solid", "fa-circle-check"]], template: function OAuthCallbackComponent_Template(rf, ctx) { if (rf & 1) {
389
389
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
390
390
  i0.ɵɵconditionalCreate(2, OAuthCallbackComponent_Conditional_2_Template, 2, 2, "div", 2);
391
391
  i0.ɵɵconditionalCreate(3, OAuthCallbackComponent_Conditional_3_Template, 13, 4, "div", 3);
@@ -398,11 +398,11 @@ export class OAuthCallbackComponent {
398
398
  i0.ɵɵconditional(ctx.HasError ? 3 : -1);
399
399
  i0.ɵɵadvance();
400
400
  i0.ɵɵconditional(!ctx.IsLoading && !ctx.HasError ? 4 : -1);
401
- } }, dependencies: [i2.ButtonComponent, i3.LoadingComponent], styles: [".oauth-callback-container[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 100vh;\n background: var(--mj-brand-primary);\n padding: 1rem;\n}\n\n.oauth-callback-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n padding: 3rem;\n border-radius: 1rem;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);\n text-align: center;\n max-width: 450px;\n width: 100%;\n}\n\n.oauth-status[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n}\n\n.oauth-status[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 1.5rem;\n font-weight: 600;\n}\n\n.oauth-status[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n color: var(--mj-text-muted);\n line-height: 1.6;\n}\n\n\n\n.icon-container[_ngcontent-%COMP%] {\n width: 80px;\n height: 80px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 0.5rem;\n}\n\n.icon-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 3rem;\n}\n\n.success-icon[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n}\n\n.success-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-status-success);\n}\n\n.error-icon[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n}\n\n.error-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-status-error);\n}\n\n\n\n.oauth-status.success[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n color: var(--mj-status-success);\n}\n\n\n\n.oauth-status.error[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n color: var(--mj-status-error);\n}\n\n.error-code[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-status-error) 5%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n padding: 0.5rem 1rem;\n border-radius: 0.5rem;\n font-family: monospace;\n font-size: 0.875rem;\n}\n\n.error-message[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n padding: 1rem;\n border-radius: 0.5rem;\n font-size: 0.9rem;\n color: var(--mj-text-secondary);\n width: 100%;\n}\n\n\n\n.button-group[_ngcontent-%COMP%] {\n display: flex;\n gap: 0.75rem;\n margin-top: 1rem;\n}\n\n.button-group[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n\n\n.oauth-status.loading[_ngcontent-%COMP%] {\n padding: 2rem 0;\n}\n\n\n\n@media (max-width: 480px) {\n .oauth-callback-card[_ngcontent-%COMP%] {\n padding: 2rem 1.5rem;\n }\n\n .button-group[_ngcontent-%COMP%] {\n flex-direction: column;\n width: 100%;\n }\n\n .button-group[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n width: 100%;\n justify-content: center;\n }\n}"] });
401
+ } }, dependencies: [i2.LoadingComponent, i3.MJButtonDirective], styles: [".oauth-callback-container[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 100vh;\n background: var(--mj-brand-primary);\n padding: 1rem;\n}\n\n.oauth-callback-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n padding: 3rem;\n border-radius: 1rem;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);\n text-align: center;\n max-width: 450px;\n width: 100%;\n}\n\n.oauth-status[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n}\n\n.oauth-status[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 1.5rem;\n font-weight: 600;\n}\n\n.oauth-status[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n color: var(--mj-text-muted);\n line-height: 1.6;\n}\n\n\n\n.icon-container[_ngcontent-%COMP%] {\n width: 80px;\n height: 80px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 0.5rem;\n}\n\n.icon-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 3rem;\n}\n\n.success-icon[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n}\n\n.success-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-status-success);\n}\n\n.error-icon[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n}\n\n.error-icon[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-status-error);\n}\n\n\n\n.oauth-status.success[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n color: var(--mj-status-success);\n}\n\n\n\n.oauth-status.error[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n color: var(--mj-status-error);\n}\n\n.error-code[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-status-error) 5%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n padding: 0.5rem 1rem;\n border-radius: 0.5rem;\n font-family: monospace;\n font-size: 0.875rem;\n}\n\n.error-message[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n padding: 1rem;\n border-radius: 0.5rem;\n font-size: 0.9rem;\n color: var(--mj-text-secondary);\n width: 100%;\n}\n\n\n\n.button-group[_ngcontent-%COMP%] {\n display: flex;\n gap: 0.75rem;\n margin-top: 1rem;\n}\n\n.button-group[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n\n\n.oauth-status.loading[_ngcontent-%COMP%] {\n padding: 2rem 0;\n}\n\n\n\n@media (max-width: 480px) {\n .oauth-callback-card[_ngcontent-%COMP%] {\n padding: 2rem 1.5rem;\n }\n\n .button-group[_ngcontent-%COMP%] {\n flex-direction: column;\n width: 100%;\n }\n\n .button-group[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n width: 100%;\n justify-content: center;\n }\n}"] });
402
402
  }
403
403
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OAuthCallbackComponent, [{
404
404
  type: Component,
405
- args: [{ standalone: false, selector: 'mj-oauth-callback', template: "<div class=\"oauth-callback-container\">\n <div class=\"oauth-callback-card\">\n <!-- Loading State -->\n @if (IsLoading) {\n <div class=\"oauth-status loading\">\n <mj-loading text=\"{{ StatusMessage }}\"></mj-loading>\n </div>\n }\n\n <!-- Error State -->\n @if (HasError) {\n <div class=\"oauth-status error\">\n <div class=\"icon-container error-icon\">\n <i class=\"fa-solid fa-circle-exclamation\"></i>\n </div>\n <h2>Authorization Failed</h2>\n @if (ErrorCode) {\n <div class=\"error-code\">{{ ErrorCode }}</div>\n }\n <p class=\"error-message\">{{ ErrorMessage }}</p>\n <div class=\"button-group\">\n @if (IsRetryable) {\n <button kendoButton (click)=\"onRetry()\">\n <i class=\"fa-solid fa-rotate-right\"></i>\n Try Again\n </button>\n }\n <button kendoButton [look]=\"IsRetryable ? 'outline' : 'default'\" (click)=\"onClose()\">\n <i class=\"fa-solid fa-arrow-left\"></i>\n Return to Dashboard\n </button>\n </div>\n </div>\n }\n\n <!-- Success State (brief - redirects quickly) -->\n @if (!IsLoading && !HasError) {\n <div class=\"oauth-status success\">\n <div class=\"icon-container success-icon\">\n <i class=\"fa-solid fa-circle-check\"></i>\n </div>\n <h2>Authorization Successful</h2>\n <p>{{ StatusMessage }}</p>\n </div>\n }\n </div>\n</div>\n", styles: [".oauth-callback-container {\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 100vh;\n background: var(--mj-brand-primary);\n padding: 1rem;\n}\n\n.oauth-callback-card {\n background: var(--mj-bg-surface);\n padding: 3rem;\n border-radius: 1rem;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);\n text-align: center;\n max-width: 450px;\n width: 100%;\n}\n\n.oauth-status {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n}\n\n.oauth-status h2 {\n margin: 0;\n font-size: 1.5rem;\n font-weight: 600;\n}\n\n.oauth-status p {\n margin: 0;\n color: var(--mj-text-muted);\n line-height: 1.6;\n}\n\n/* Icon containers */\n.icon-container {\n width: 80px;\n height: 80px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 0.5rem;\n}\n\n.icon-container i {\n font-size: 3rem;\n}\n\n.success-icon {\n background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n}\n\n.success-icon i {\n color: var(--mj-status-success);\n}\n\n.error-icon {\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n}\n\n.error-icon i {\n color: var(--mj-status-error);\n}\n\n/* Success state */\n.oauth-status.success h2 {\n color: var(--mj-status-success);\n}\n\n/* Error state */\n.oauth-status.error h2 {\n color: var(--mj-status-error);\n}\n\n.error-code {\n background: color-mix(in srgb, var(--mj-status-error) 5%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n padding: 0.5rem 1rem;\n border-radius: 0.5rem;\n font-family: monospace;\n font-size: 0.875rem;\n}\n\n.error-message {\n background: var(--mj-bg-surface-sunken);\n padding: 1rem;\n border-radius: 0.5rem;\n font-size: 0.9rem;\n color: var(--mj-text-secondary);\n width: 100%;\n}\n\n/* Buttons */\n.button-group {\n display: flex;\n gap: 0.75rem;\n margin-top: 1rem;\n}\n\n.button-group button {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n/* Loading state */\n.oauth-status.loading {\n padding: 2rem 0;\n}\n\n/* Responsive */\n@media (max-width: 480px) {\n .oauth-callback-card {\n padding: 2rem 1.5rem;\n }\n\n .button-group {\n flex-direction: column;\n width: 100%;\n }\n\n .button-group button {\n width: 100%;\n justify-content: center;\n }\n}\n"] }]
405
+ args: [{ standalone: false, selector: 'mj-oauth-callback', template: "<div class=\"oauth-callback-container\">\n <div class=\"oauth-callback-card\">\n <!-- Loading State -->\n @if (IsLoading) {\n <div class=\"oauth-status loading\">\n <mj-loading text=\"{{ StatusMessage }}\"></mj-loading>\n </div>\n }\n\n <!-- Error State -->\n @if (HasError) {\n <div class=\"oauth-status error\">\n <div class=\"icon-container error-icon\">\n <i class=\"fa-solid fa-circle-exclamation\"></i>\n </div>\n <h2>Authorization Failed</h2>\n @if (ErrorCode) {\n <div class=\"error-code\">{{ ErrorCode }}</div>\n }\n <p class=\"error-message\">{{ ErrorMessage }}</p>\n <div class=\"button-group\">\n @if (IsRetryable) {\n <button mjButton variant=\"secondary\" (click)=\"onRetry()\">\n <i class=\"fa-solid fa-rotate-right\"></i>\n Try Again\n </button>\n }\n <button mjButton [variant]=\"IsRetryable ? 'outline' : 'secondary'\" (click)=\"onClose()\">\n <i class=\"fa-solid fa-arrow-left\"></i>\n Return to Dashboard\n </button>\n </div>\n </div>\n }\n\n <!-- Success State (brief - redirects quickly) -->\n @if (!IsLoading && !HasError) {\n <div class=\"oauth-status success\">\n <div class=\"icon-container success-icon\">\n <i class=\"fa-solid fa-circle-check\"></i>\n </div>\n <h2>Authorization Successful</h2>\n <p>{{ StatusMessage }}</p>\n </div>\n }\n </div>\n</div>\n", styles: [".oauth-callback-container {\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 100vh;\n background: var(--mj-brand-primary);\n padding: 1rem;\n}\n\n.oauth-callback-card {\n background: var(--mj-bg-surface);\n padding: 3rem;\n border-radius: 1rem;\n box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);\n text-align: center;\n max-width: 450px;\n width: 100%;\n}\n\n.oauth-status {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n}\n\n.oauth-status h2 {\n margin: 0;\n font-size: 1.5rem;\n font-weight: 600;\n}\n\n.oauth-status p {\n margin: 0;\n color: var(--mj-text-muted);\n line-height: 1.6;\n}\n\n/* Icon containers */\n.icon-container {\n width: 80px;\n height: 80px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 0.5rem;\n}\n\n.icon-container i {\n font-size: 3rem;\n}\n\n.success-icon {\n background: color-mix(in srgb, var(--mj-status-success) 15%, var(--mj-bg-surface));\n}\n\n.success-icon i {\n color: var(--mj-status-success);\n}\n\n.error-icon {\n background: color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface));\n}\n\n.error-icon i {\n color: var(--mj-status-error);\n}\n\n/* Success state */\n.oauth-status.success h2 {\n color: var(--mj-status-success);\n}\n\n/* Error state */\n.oauth-status.error h2 {\n color: var(--mj-status-error);\n}\n\n.error-code {\n background: color-mix(in srgb, var(--mj-status-error) 5%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n padding: 0.5rem 1rem;\n border-radius: 0.5rem;\n font-family: monospace;\n font-size: 0.875rem;\n}\n\n.error-message {\n background: var(--mj-bg-surface-sunken);\n padding: 1rem;\n border-radius: 0.5rem;\n font-size: 0.9rem;\n color: var(--mj-text-secondary);\n width: 100%;\n}\n\n/* Buttons */\n.button-group {\n display: flex;\n gap: 0.75rem;\n margin-top: 1rem;\n}\n\n.button-group button {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n/* Loading state */\n.oauth-status.loading {\n padding: 2rem 0;\n}\n\n/* Responsive */\n@media (max-width: 480px) {\n .oauth-callback-card {\n padding: 2rem 1.5rem;\n }\n\n .button-group {\n flex-direction: column;\n width: 100%;\n }\n\n .button-group button {\n width: 100%;\n justify-content: center;\n }\n}\n"] }]
406
406
  }], () => [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i0.ChangeDetectorRef }], null); })();
407
407
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(OAuthCallbackComponent, { className: "OAuthCallbackComponent", filePath: "src/lib/oauth/oauth-callback.component.ts", lineNumber: 51 }); })();
408
408
  //# sourceMappingURL=oauth-callback.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth-callback.component.js","sourceRoot":"","sources":["../../../src/lib/oauth/oauth-callback.component.ts","../../../src/lib/oauth/oauth-callback.component.html"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,SAAS,EAAwC,MAAM,eAAe,CAAC;AAEhF,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;;;;;;ICXpC,8BAAkC;IAC9B,gCAAoD;IACxD,iBAAM;;;IADU,cAA0B;IAA1B,sBAAA,sCAA0B,CAAA;;;IAYlC,8BAAwB;IAAA,YAAe;IAAA,iBAAM;;;IAArB,cAAe;IAAf,sCAAe;;;;IAKnC,kCAAwC;IAApB,yMAAS,gBAAS,KAAC;IACnC,wBAAwC;IACxC,2BACJ;IAAA,iBAAS;;;;IAbjB,AADJ,8BAAgC,aACW;IACnC,uBAA8C;IAClD,iBAAM;IACN,0BAAI;IAAA,oCAAoB;IAAA,iBAAK;IAC7B,sGAAiB;IAGjB,4BAAyB;IAAA,YAAkB;IAAA,iBAAI;IAC/C,+BAA0B;IACtB,0GAAmB;IAMnB,mCAAqF;IAApB,2LAAS,gBAAS,KAAC;IAChF,yBAAsC;IACtC,sCACJ;IAER,AADI,AADI,iBAAS,EACP,EACJ;;;IAhBF,eAEC;IAFD,2CAEC;IACwB,eAAkB;IAAlB,yCAAkB;IAEvC,eAKC;IALD,6CAKC;IACmB,cAA4C;IAA5C,iEAA4C;;;IAWpE,AADJ,8BAAkC,cACW;IACrC,wBAAwC;IAC5C,iBAAM;IACN,0BAAI;IAAA,wCAAwB;IAAA,iBAAK;IACjC,yBAAG;IAAA,YAAmB;IAC1B,AAD0B,iBAAI,EACxB;;;IADC,eAAmB;IAAnB,0CAAmB;;ADbtC,oEAAoE;AACpE,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,+DAA+D;AAC/D,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B;;;;;;;;;GASG;AAOH,MAA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,CAAC,kBAAkB,CAAC,IAAI,gBAAgB,CAAC;QAC/E,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC7B,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACI,OAAO;QACV,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC7B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC7C,CAAC;gHA1UQ,sBAAsB;6DAAtB,sBAAsB;YCjD/B,AADJ,8BAAsC,aACD;YAE7B,wFAAiB;YAOjB,yFAAgB;YA0BhB,wFAA+B;YAUvC,AADI,iBAAM,EACJ;;YA3CE,eAIC;YAJD,wCAIC;YAGD,cAuBC;YAvBD,uCAuBC;YAGD,cAQC;YARD,0DAQC;;;iFDMI,sBAAsB;cANlC,SAAS;6BACI,KAAK,YACL,mBAAmB;;kFAIpB,sBAAsB","sourcesContent":["/**\n * @fileoverview OAuth Callback Component\n *\n * Handles OAuth provider redirects in the frontend. When an OAuth provider\n * redirects back to the application after user authorization, this component:\n * 1. Waits for the user's session to be restored (authentication)\n * 2. Extracts the code and state from URL query parameters\n * 3. Calls the backend /oauth/exchange endpoint to complete the token exchange\n * 4. Redirects to the original page with success/error notification\n *\n * @module OAuth Callback\n */\n\nimport { Component, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Metadata } from '@memberjunction/core';\nimport { GraphQLDataProvider } from '@memberjunction/graphql-dataprovider';\n\n/**\n * Response from the OAuth exchange endpoint\n */\ninterface OAuthExchangeResponse {\n success: boolean;\n connectionId?: string;\n errorCode?: string;\n errorMessage?: string;\n isRetryable?: boolean;\n}\n\n/** Maximum time to wait for provider initialization (30 seconds) */\nconst MAX_WAIT_TIME_MS = 30000;\n/** Polling interval for checking provider readiness (500ms) */\nconst POLL_INTERVAL_MS = 500;\n\n/**\n * OAuth Callback Component\n *\n * Handles the redirect from OAuth providers after user authorization.\n * This component is loaded at /oauth/callback and processes the\n * authorization code to complete the OAuth flow.\n *\n * The component waits for authentication to complete before attempting\n * the code exchange, since the user's session needs to be restored first.\n */\n@Component({\n standalone: false,\n selector: 'mj-oauth-callback',\n templateUrl: './oauth-callback.component.html',\n styleUrls: ['./oauth-callback.component.css']\n})\nexport class OAuthCallbackComponent implements OnInit, OnDestroy {\n /** Loading state while processing OAuth callback */\n public IsLoading = true;\n\n /** Error state */\n public HasError = false;\n\n /** Error message to display */\n public ErrorMessage = '';\n\n /** Error code from OAuth provider or exchange */\n public ErrorCode = '';\n\n /** Whether the error is retryable */\n public IsRetryable = false;\n\n /** Status message shown during processing */\n public StatusMessage = 'Restoring session...';\n\n /** Timer for polling provider readiness */\n private pollTimer: ReturnType<typeof setInterval> | null = null;\n\n /** Flag to prevent double processing */\n private isProcessing = false;\n\n constructor(\n private route: ActivatedRoute,\n private router: Router,\n private cdr: ChangeDetectorRef\n ) {}\n\n async ngOnInit(): Promise<void> {\n // Wait for the GraphQL provider to be ready, then process the callback\n await this.waitForProviderAndProcess();\n }\n\n ngOnDestroy(): void {\n // Clean up the polling timer\n if (this.pollTimer) {\n clearInterval(this.pollTimer);\n this.pollTimer = null;\n }\n }\n\n /**\n * Waits for the GraphQL provider to be initialized (indicating auth is complete)\n * then processes the OAuth callback.\n */\n private async waitForProviderAndProcess(): Promise<void> {\n const startTime = Date.now();\n\n // Check if provider is already ready\n if (this.isProviderReady()) {\n await this.safeProcessCallback();\n return;\n }\n\n // Poll for provider readiness\n this.StatusMessage = 'Waiting for authentication...';\n this.cdr.detectChanges();\n\n return new Promise<void>((resolve) => {\n this.pollTimer = setInterval(async () => {\n const elapsed = Date.now() - startTime;\n\n if (this.isProviderReady()) {\n if (this.pollTimer) {\n clearInterval(this.pollTimer);\n this.pollTimer = null;\n }\n await this.safeProcessCallback();\n resolve();\n return;\n }\n\n if (elapsed >= MAX_WAIT_TIME_MS) {\n if (this.pollTimer) {\n clearInterval(this.pollTimer);\n this.pollTimer = null;\n }\n this.showError(\n 'timeout',\n 'Timed out waiting for authentication. Please try logging in again.',\n true\n );\n resolve();\n return;\n }\n\n // Update status message with progress\n const secondsRemaining = Math.ceil((MAX_WAIT_TIME_MS - elapsed) / 1000);\n this.StatusMessage = `Waiting for authentication... (${secondsRemaining}s)`;\n this.cdr.detectChanges();\n }, POLL_INTERVAL_MS);\n });\n }\n\n /**\n * Checks if the GraphQL provider is initialized and has a valid token\n */\n private isProviderReady(): boolean {\n try {\n const provider = Metadata.Provider as GraphQLDataProvider;\n if (!provider) {\n return false;\n }\n const configData = provider.ConfigData;\n if (!configData || !configData.Token || !configData.URL) {\n return false;\n }\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Safely processes the callback, preventing double execution\n */\n private async safeProcessCallback(): Promise<void> {\n if (this.isProcessing) {\n return;\n }\n this.isProcessing = true;\n\n try {\n await this.processOAuthCallback();\n } catch (error) {\n console.error('[OAuth Callback] Error in processOAuthCallback:', error);\n this.showError('component_error', error instanceof Error ? error.message : String(error), true);\n }\n }\n\n /**\n * Process the OAuth callback by extracting params and exchanging the code\n */\n private async processOAuthCallback(): Promise<void> {\n const params = this.route.snapshot.queryParams;\n\n // Check for error from OAuth provider\n if (params['error']) {\n this.showError(\n params['error'] as string,\n params['error_description'] as string || 'Authorization was denied or failed'\n );\n return;\n }\n\n const code = params['code'] as string;\n const state = params['state'] as string;\n\n // Validate required parameters\n if (!code) {\n this.showError('missing_code', 'No authorization code received from the OAuth provider');\n return;\n }\n\n if (!state) {\n this.showError('missing_state', 'No state parameter received from the OAuth provider');\n return;\n }\n\n // Exchange the code for tokens\n this.StatusMessage = 'Exchanging authorization code...';\n this.cdr.detectChanges();\n\n try {\n const result = await this.exchangeCode(code, state);\n\n if (result.success) {\n this.handleSuccess(result.connectionId);\n } else {\n this.showError(\n result.errorCode || 'exchange_failed',\n result.errorMessage || 'Failed to complete authorization',\n result.isRetryable\n );\n }\n } catch (error) {\n const message = error instanceof Error ? error.message : 'An unexpected error occurred';\n this.showError('network_error', message, true);\n }\n }\n\n /**\n * Call the backend to exchange the authorization code for tokens\n */\n private async exchangeCode(code: string, state: string): Promise<OAuthExchangeResponse> {\n // Get the GraphQL provider - we know it's ready at this point\n const gqlProvider = Metadata.Provider as GraphQLDataProvider;\n const configData = gqlProvider.ConfigData;\n\n // Build the exchange endpoint URL from the GraphQL URL\n // Handle both cases: URL with /graphql suffix and URL without\n let apiUrl = configData.URL;\n if (apiUrl.includes('/graphql')) {\n apiUrl = apiUrl.replace('/graphql', '/oauth/exchange');\n } else {\n // URL doesn't have /graphql, append /oauth/exchange\n apiUrl = apiUrl.replace(/\\/$/, '') + '/oauth/exchange';\n }\n\n try {\n const response = await fetch(apiUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${configData.Token}`\n },\n body: JSON.stringify({ code, state })\n });\n\n // Parse response regardless of status code\n const data = await response.json();\n return data as OAuthExchangeResponse;\n } catch (fetchError) {\n return {\n success: false,\n errorCode: 'fetch_error',\n errorMessage: fetchError instanceof Error ? fetchError.message : 'Network error during token exchange'\n };\n }\n }\n\n /**\n * Handle successful OAuth completion\n */\n private handleSuccess(connectionId?: string): void {\n this.IsLoading = false;\n this.StatusMessage = 'Authorization successful! Redirecting...';\n this.cdr.detectChanges();\n\n // Get the stored return URL - try both localStorage and sessionStorage\n const storedUrl = localStorage.getItem('oauth_return_url');\n const storedPath = localStorage.getItem('oauth_return_path');\n const sessionUrl = sessionStorage.getItem('oauth_return_url');\n const sessionPath = sessionStorage.getItem('oauth_return_path');\n\n let returnUrl = storedUrl || sessionUrl || storedPath || sessionPath;\n\n // Clean up all possible storage locations\n this.clearStoredReturnUrls();\n\n // Default to MCP dashboard if no return URL found\n const defaultPath = '/app/admin/MCP';\n if (!returnUrl || returnUrl.trim() === '' || returnUrl === '/') {\n returnUrl = defaultPath;\n }\n\n // Build the final navigation path\n const finalPath = this.buildFinalPath(returnUrl, connectionId, defaultPath);\n\n // Use window.location for reliable navigation after OAuth\n setTimeout(() => {\n window.location.href = finalPath;\n }, 500);\n }\n\n /**\n * Builds the final navigation path with success query params\n */\n private buildFinalPath(returnUrl: string, connectionId: string | undefined, defaultPath: string): string {\n try {\n let finalPath: string;\n\n // If it's a full URL, extract just the path and search\n if (returnUrl.startsWith('http://') || returnUrl.startsWith('https://')) {\n const url = new URL(returnUrl);\n finalPath = url.pathname + url.search;\n } else {\n finalPath = returnUrl;\n }\n\n // Ensure we have a valid path (not empty or just \"/\")\n if (!finalPath || finalPath.trim() === '' || finalPath === '/') {\n finalPath = defaultPath;\n }\n\n // Add success query params\n const separator = finalPath.includes('?') ? '&' : '?';\n finalPath = `${finalPath}${separator}oauth=success`;\n if (connectionId) {\n finalPath += `&connectionId=${connectionId}`;\n }\n\n return finalPath;\n } catch (e) {\n console.error('[OAuth Callback] Error parsing return URL:', e);\n return `${defaultPath}?oauth=success${connectionId ? `&connectionId=${connectionId}` : ''}`;\n }\n }\n\n /**\n * Clears all stored return URLs from storage\n */\n private clearStoredReturnUrls(): void {\n localStorage.removeItem('oauth_return_url');\n localStorage.removeItem('oauth_return_path');\n sessionStorage.removeItem('oauth_return_url');\n sessionStorage.removeItem('oauth_return_path');\n }\n\n /**\n * Show error state\n */\n private showError(errorCode: string, message: string, isRetryable = false): void {\n this.IsLoading = false;\n this.HasError = true;\n this.ErrorCode = errorCode;\n this.ErrorMessage = message;\n this.IsRetryable = isRetryable;\n this.cdr.detectChanges();\n }\n\n /**\n * Handle retry button click\n */\n public onRetry(): void {\n // Get the stored return URL and redirect there to start fresh\n const returnUrl = localStorage.getItem('oauth_return_url') || '/app/admin/MCP';\n this.clearStoredReturnUrls();\n this.router.navigateByUrl(returnUrl);\n }\n\n /**\n * Handle close button click (return to MCP dashboard)\n */\n public onClose(): void {\n this.clearStoredReturnUrls();\n this.router.navigate(['/app/admin/MCP']);\n }\n}\n","<div class=\"oauth-callback-container\">\n <div class=\"oauth-callback-card\">\n <!-- Loading State -->\n @if (IsLoading) {\n <div class=\"oauth-status loading\">\n <mj-loading text=\"{{ StatusMessage }}\"></mj-loading>\n </div>\n }\n\n <!-- Error State -->\n @if (HasError) {\n <div class=\"oauth-status error\">\n <div class=\"icon-container error-icon\">\n <i class=\"fa-solid fa-circle-exclamation\"></i>\n </div>\n <h2>Authorization Failed</h2>\n @if (ErrorCode) {\n <div class=\"error-code\">{{ ErrorCode }}</div>\n }\n <p class=\"error-message\">{{ ErrorMessage }}</p>\n <div class=\"button-group\">\n @if (IsRetryable) {\n <button kendoButton (click)=\"onRetry()\">\n <i class=\"fa-solid fa-rotate-right\"></i>\n Try Again\n </button>\n }\n <button kendoButton [look]=\"IsRetryable ? 'outline' : 'default'\" (click)=\"onClose()\">\n <i class=\"fa-solid fa-arrow-left\"></i>\n Return to Dashboard\n </button>\n </div>\n </div>\n }\n\n <!-- Success State (brief - redirects quickly) -->\n @if (!IsLoading && !HasError) {\n <div class=\"oauth-status success\">\n <div class=\"icon-container success-icon\">\n <i class=\"fa-solid fa-circle-check\"></i>\n </div>\n <h2>Authorization Successful</h2>\n <p>{{ StatusMessage }}</p>\n </div>\n }\n </div>\n</div>\n"]}
1
+ {"version":3,"file":"oauth-callback.component.js","sourceRoot":"","sources":["../../../src/lib/oauth/oauth-callback.component.ts","../../../src/lib/oauth/oauth-callback.component.html"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,SAAS,EAAwC,MAAM,eAAe,CAAC;AAEhF,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;;;;;;ICXpC,8BAAkC;IAC9B,gCAAoD;IACxD,iBAAM;;;IADU,cAA0B;IAA1B,sBAAA,sCAA0B,CAAA;;;IAYlC,8BAAwB;IAAA,YAAe;IAAA,iBAAM;;;IAArB,cAAe;IAAf,sCAAe;;;;IAKnC,kCAAyD;IAApB,yMAAS,gBAAS,KAAC;IACpD,wBAAwC;IACxC,2BACJ;IAAA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GD,cAQC;YARD,0DAQC;;;iFDMI,sBAAsB;cANlC,SAAS;6BACI,KAAK,YACL,mBAAmB;;kFAIpB,sBAAsB","sourcesContent":["/**\n * @fileoverview OAuth Callback Component\n *\n * Handles OAuth provider redirects in the frontend. When an OAuth provider\n * redirects back to the application after user authorization, this component:\n * 1. Waits for the user's session to be restored (authentication)\n * 2. Extracts the code and state from URL query parameters\n * 3. Calls the backend /oauth/exchange endpoint to complete the token exchange\n * 4. Redirects to the original page with success/error notification\n *\n * @module OAuth Callback\n */\n\nimport { Component, OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Metadata } from '@memberjunction/core';\nimport { GraphQLDataProvider } from '@memberjunction/graphql-dataprovider';\n\n/**\n * Response from the OAuth exchange endpoint\n */\ninterface OAuthExchangeResponse {\n success: boolean;\n connectionId?: string;\n errorCode?: string;\n errorMessage?: string;\n isRetryable?: boolean;\n}\n\n/** Maximum time to wait for provider initialization (30 seconds) */\nconst MAX_WAIT_TIME_MS = 30000;\n/** Polling interval for checking provider readiness (500ms) */\nconst POLL_INTERVAL_MS = 500;\n\n/**\n * OAuth Callback Component\n *\n * Handles the redirect from OAuth providers after user authorization.\n * This component is loaded at /oauth/callback and processes the\n * authorization code to complete the OAuth flow.\n *\n * The component waits for authentication to complete before attempting\n * the code exchange, since the user's session needs to be restored first.\n */\n@Component({\n standalone: false,\n selector: 'mj-oauth-callback',\n templateUrl: './oauth-callback.component.html',\n styleUrls: ['./oauth-callback.component.css']\n})\nexport class OAuthCallbackComponent implements OnInit, OnDestroy {\n /** Loading state while processing OAuth callback */\n public IsLoading = true;\n\n /** Error state */\n public HasError = false;\n\n /** Error message to display */\n public ErrorMessage = '';\n\n /** Error code from OAuth provider or exchange */\n public ErrorCode = '';\n\n /** Whether the error is retryable */\n public IsRetryable = false;\n\n /** Status message shown during processing */\n public StatusMessage = 'Restoring session...';\n\n /** Timer for polling provider readiness */\n private pollTimer: ReturnType<typeof setInterval> | null = null;\n\n /** Flag to prevent double processing */\n private isProcessing = false;\n\n constructor(\n private route: ActivatedRoute,\n private router: Router,\n private cdr: ChangeDetectorRef\n ) {}\n\n async ngOnInit(): Promise<void> {\n // Wait for the GraphQL provider to be ready, then process the callback\n await this.waitForProviderAndProcess();\n }\n\n ngOnDestroy(): void {\n // Clean up the polling timer\n if (this.pollTimer) {\n clearInterval(this.pollTimer);\n this.pollTimer = null;\n }\n }\n\n /**\n * Waits for the GraphQL provider to be initialized (indicating auth is complete)\n * then processes the OAuth callback.\n */\n private async waitForProviderAndProcess(): Promise<void> {\n const startTime = Date.now();\n\n // Check if provider is already ready\n if (this.isProviderReady()) {\n await this.safeProcessCallback();\n return;\n }\n\n // Poll for provider readiness\n this.StatusMessage = 'Waiting for authentication...';\n this.cdr.detectChanges();\n\n return new Promise<void>((resolve) => {\n this.pollTimer = setInterval(async () => {\n const elapsed = Date.now() - startTime;\n\n if (this.isProviderReady()) {\n if (this.pollTimer) {\n clearInterval(this.pollTimer);\n this.pollTimer = null;\n }\n await this.safeProcessCallback();\n resolve();\n return;\n }\n\n if (elapsed >= MAX_WAIT_TIME_MS) {\n if (this.pollTimer) {\n clearInterval(this.pollTimer);\n this.pollTimer = null;\n }\n this.showError(\n 'timeout',\n 'Timed out waiting for authentication. Please try logging in again.',\n true\n );\n resolve();\n return;\n }\n\n // Update status message with progress\n const secondsRemaining = Math.ceil((MAX_WAIT_TIME_MS - elapsed) / 1000);\n this.StatusMessage = `Waiting for authentication... (${secondsRemaining}s)`;\n this.cdr.detectChanges();\n }, POLL_INTERVAL_MS);\n });\n }\n\n /**\n * Checks if the GraphQL provider is initialized and has a valid token\n */\n private isProviderReady(): boolean {\n try {\n const provider = Metadata.Provider as GraphQLDataProvider;\n if (!provider) {\n return false;\n }\n const configData = provider.ConfigData;\n if (!configData || !configData.Token || !configData.URL) {\n return false;\n }\n return true;\n } catch {\n return false;\n }\n }\n\n /**\n * Safely processes the callback, preventing double execution\n */\n private async safeProcessCallback(): Promise<void> {\n if (this.isProcessing) {\n return;\n }\n this.isProcessing = true;\n\n try {\n await this.processOAuthCallback();\n } catch (error) {\n console.error('[OAuth Callback] Error in processOAuthCallback:', error);\n this.showError('component_error', error instanceof Error ? error.message : String(error), true);\n }\n }\n\n /**\n * Process the OAuth callback by extracting params and exchanging the code\n */\n private async processOAuthCallback(): Promise<void> {\n const params = this.route.snapshot.queryParams;\n\n // Check for error from OAuth provider\n if (params['error']) {\n this.showError(\n params['error'] as string,\n params['error_description'] as string || 'Authorization was denied or failed'\n );\n return;\n }\n\n const code = params['code'] as string;\n const state = params['state'] as string;\n\n // Validate required parameters\n if (!code) {\n this.showError('missing_code', 'No authorization code received from the OAuth provider');\n return;\n }\n\n if (!state) {\n this.showError('missing_state', 'No state parameter received from the OAuth provider');\n return;\n }\n\n // Exchange the code for tokens\n this.StatusMessage = 'Exchanging authorization code...';\n this.cdr.detectChanges();\n\n try {\n const result = await this.exchangeCode(code, state);\n\n if (result.success) {\n this.handleSuccess(result.connectionId);\n } else {\n this.showError(\n result.errorCode || 'exchange_failed',\n result.errorMessage || 'Failed to complete authorization',\n result.isRetryable\n );\n }\n } catch (error) {\n const message = error instanceof Error ? error.message : 'An unexpected error occurred';\n this.showError('network_error', message, true);\n }\n }\n\n /**\n * Call the backend to exchange the authorization code for tokens\n */\n private async exchangeCode(code: string, state: string): Promise<OAuthExchangeResponse> {\n // Get the GraphQL provider - we know it's ready at this point\n const gqlProvider = Metadata.Provider as GraphQLDataProvider;\n const configData = gqlProvider.ConfigData;\n\n // Build the exchange endpoint URL from the GraphQL URL\n // Handle both cases: URL with /graphql suffix and URL without\n let apiUrl = configData.URL;\n if (apiUrl.includes('/graphql')) {\n apiUrl = apiUrl.replace('/graphql', '/oauth/exchange');\n } else {\n // URL doesn't have /graphql, append /oauth/exchange\n apiUrl = apiUrl.replace(/\\/$/, '') + '/oauth/exchange';\n }\n\n try {\n const response = await fetch(apiUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${configData.Token}`\n },\n body: JSON.stringify({ code, state })\n });\n\n // Parse response regardless of status code\n const data = await response.json();\n return data as OAuthExchangeResponse;\n } catch (fetchError) {\n return {\n success: false,\n errorCode: 'fetch_error',\n errorMessage: fetchError instanceof Error ? fetchError.message : 'Network error during token exchange'\n };\n }\n }\n\n /**\n * Handle successful OAuth completion\n */\n private handleSuccess(connectionId?: string): void {\n this.IsLoading = false;\n this.StatusMessage = 'Authorization successful! Redirecting...';\n this.cdr.detectChanges();\n\n // Get the stored return URL - try both localStorage and sessionStorage\n const storedUrl = localStorage.getItem('oauth_return_url');\n const storedPath = localStorage.getItem('oauth_return_path');\n const sessionUrl = sessionStorage.getItem('oauth_return_url');\n const sessionPath = sessionStorage.getItem('oauth_return_path');\n\n let returnUrl = storedUrl || sessionUrl || storedPath || sessionPath;\n\n // Clean up all possible storage locations\n this.clearStoredReturnUrls();\n\n // Default to MCP dashboard if no return URL found\n const defaultPath = '/app/admin/MCP';\n if (!returnUrl || returnUrl.trim() === '' || returnUrl === '/') {\n returnUrl = defaultPath;\n }\n\n // Build the final navigation path\n const finalPath = this.buildFinalPath(returnUrl, connectionId, defaultPath);\n\n // Use window.location for reliable navigation after OAuth\n setTimeout(() => {\n window.location.href = finalPath;\n }, 500);\n }\n\n /**\n * Builds the final navigation path with success query params\n */\n private buildFinalPath(returnUrl: string, connectionId: string | undefined, defaultPath: string): string {\n try {\n let finalPath: string;\n\n // If it's a full URL, extract just the path and search\n if (returnUrl.startsWith('http://') || returnUrl.startsWith('https://')) {\n const url = new URL(returnUrl);\n finalPath = url.pathname + url.search;\n } else {\n finalPath = returnUrl;\n }\n\n // Ensure we have a valid path (not empty or just \"/\")\n if (!finalPath || finalPath.trim() === '' || finalPath === '/') {\n finalPath = defaultPath;\n }\n\n // Add success query params\n const separator = finalPath.includes('?') ? '&' : '?';\n finalPath = `${finalPath}${separator}oauth=success`;\n if (connectionId) {\n finalPath += `&connectionId=${connectionId}`;\n }\n\n return finalPath;\n } catch (e) {\n console.error('[OAuth Callback] Error parsing return URL:', e);\n return `${defaultPath}?oauth=success${connectionId ? `&connectionId=${connectionId}` : ''}`;\n }\n }\n\n /**\n * Clears all stored return URLs from storage\n */\n private clearStoredReturnUrls(): void {\n localStorage.removeItem('oauth_return_url');\n localStorage.removeItem('oauth_return_path');\n sessionStorage.removeItem('oauth_return_url');\n sessionStorage.removeItem('oauth_return_path');\n }\n\n /**\n * Show error state\n */\n private showError(errorCode: string, message: string, isRetryable = false): void {\n this.IsLoading = false;\n this.HasError = true;\n this.ErrorCode = errorCode;\n this.ErrorMessage = message;\n this.IsRetryable = isRetryable;\n this.cdr.detectChanges();\n }\n\n /**\n * Handle retry button click\n */\n public onRetry(): void {\n // Get the stored return URL and redirect there to start fresh\n const returnUrl = localStorage.getItem('oauth_return_url') || '/app/admin/MCP';\n this.clearStoredReturnUrls();\n this.router.navigateByUrl(returnUrl);\n }\n\n /**\n * Handle close button click (return to MCP dashboard)\n */\n public onClose(): void {\n this.clearStoredReturnUrls();\n this.router.navigate(['/app/admin/MCP']);\n }\n}\n","<div class=\"oauth-callback-container\">\n <div class=\"oauth-callback-card\">\n <!-- Loading State -->\n @if (IsLoading) {\n <div class=\"oauth-status loading\">\n <mj-loading text=\"{{ StatusMessage }}\"></mj-loading>\n </div>\n }\n\n <!-- Error State -->\n @if (HasError) {\n <div class=\"oauth-status error\">\n <div class=\"icon-container error-icon\">\n <i class=\"fa-solid fa-circle-exclamation\"></i>\n </div>\n <h2>Authorization Failed</h2>\n @if (ErrorCode) {\n <div class=\"error-code\">{{ ErrorCode }}</div>\n }\n <p class=\"error-message\">{{ ErrorMessage }}</p>\n <div class=\"button-group\">\n @if (IsRetryable) {\n <button mjButton variant=\"secondary\" (click)=\"onRetry()\">\n <i class=\"fa-solid fa-rotate-right\"></i>\n Try Again\n </button>\n }\n <button mjButton [variant]=\"IsRetryable ? 'outline' : 'secondary'\" (click)=\"onClose()\">\n <i class=\"fa-solid fa-arrow-left\"></i>\n Return to Dashboard\n </button>\n </div>\n </div>\n }\n\n <!-- Success State (brief - redirects quickly) -->\n @if (!IsLoading && !HasError) {\n <div class=\"oauth-status success\">\n <div class=\"icon-container success-icon\">\n <i class=\"fa-solid fa-circle-check\"></i>\n </div>\n <h2>Authorization Successful</h2>\n <p>{{ StatusMessage }}</p>\n </div>\n }\n </div>\n</div>\n"]}
@@ -1,14 +1,13 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "@angular/common";
3
- import * as i2 from "@progress/kendo-angular-buttons";
4
- import * as i3 from "@memberjunction/ng-shared-generic";
3
+ import * as i2 from "@memberjunction/ng-shared-generic";
5
4
  /**
6
5
  * OAuth Module - provides dependencies for OAuth callback handling.
7
6
  * The OAuthCallbackComponent itself is declared in ExplorerCoreModule.
8
7
  */
9
8
  export declare class OAuthModule {
10
9
  static ɵfac: i0.ɵɵFactoryDeclaration<OAuthModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<OAuthModule, never, [typeof i1.CommonModule, typeof i2.ButtonsModule, typeof i3.SharedGenericModule], never>;
10
+ static ɵmod: i0.ɵɵNgModuleDeclaration<OAuthModule, never, [typeof i1.CommonModule, typeof i2.SharedGenericModule], never>;
12
11
  static ɵinj: i0.ɵɵInjectorDeclaration<OAuthModule>;
13
12
  }
14
13
  //# sourceMappingURL=oauth.module.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth.module.d.ts","sourceRoot":"","sources":["../../../src/lib/oauth/oauth.module.ts"],"names":[],"mappings":";;;;AAmBA;;;GAGG;AACH,qBAOa,WAAW;yCAAX,WAAW;0CAAX,WAAW;0CAAX,WAAW;CAAI"}
1
+ {"version":3,"file":"oauth.module.d.ts","sourceRoot":"","sources":["../../../src/lib/oauth/oauth.module.ts"],"names":[],"mappings":";;;AAkBA;;;GAGG;AACH,qBAMa,WAAW;yCAAX,WAAW;0CAAX,WAAW;0CAAX,WAAW;CAAI"}
@@ -13,7 +13,6 @@
13
13
  */
14
14
  import { NgModule } from '@angular/core';
15
15
  import { CommonModule } from '@angular/common';
16
- import { ButtonsModule } from '@progress/kendo-angular-buttons';
17
16
  import { SharedGenericModule } from '@memberjunction/ng-shared-generic';
18
17
  import * as i0 from "@angular/core";
19
18
  /**
@@ -24,7 +23,6 @@ export class OAuthModule {
24
23
  static ɵfac = function OAuthModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || OAuthModule)(); };
25
24
  static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: OAuthModule });
26
25
  static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
27
- ButtonsModule,
28
26
  SharedGenericModule] });
29
27
  }
30
28
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OAuthModule, [{
@@ -32,12 +30,10 @@ export class OAuthModule {
32
30
  args: [{
33
31
  imports: [
34
32
  CommonModule,
35
- ButtonsModule,
36
33
  SharedGenericModule
37
34
  ]
38
35
  }]
39
36
  }], null, null); })();
40
37
  (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(OAuthModule, { imports: [CommonModule,
41
- ButtonsModule,
42
38
  SharedGenericModule] }); })();
43
39
  //# sourceMappingURL=oauth.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"oauth.module.js","sourceRoot":"","sources":["../../../src/lib/oauth/oauth.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;;AAExE;;;GAGG;AAQH,MAAM,OAAO,WAAW;qGAAX,WAAW;4DAAX,WAAW;gEALhB,YAAY;YACZ,aAAa;YACb,mBAAmB;;iFAGd,WAAW;cAPvB,QAAQ;eAAC;gBACN,OAAO,EAAE;oBACL,YAAY;oBACZ,aAAa;oBACb,mBAAmB;iBACtB;aACJ;;wFACY,WAAW,cALhB,YAAY;QACZ,aAAa;QACb,mBAAmB","sourcesContent":["/**\n * @fileoverview OAuth Module\n *\n * Provides the OAuth callback handling functionality for MJExplorer.\n * This module handles OAuth provider redirects and completes the\n * authorization flow by exchanging codes for tokens.\n *\n * NOTE: The OAuthCallbackComponent is declared in ExplorerCoreModule and\n * routed directly (not lazy-loaded) because lazy loading doesn't work\n * correctly when routes are defined in a library rather than the main app.\n *\n * @module OAuth Module\n */\n\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ButtonsModule } from '@progress/kendo-angular-buttons';\nimport { SharedGenericModule } from '@memberjunction/ng-shared-generic';\n\n/**\n * OAuth Module - provides dependencies for OAuth callback handling.\n * The OAuthCallbackComponent itself is declared in ExplorerCoreModule.\n */\n@NgModule({\n imports: [\n CommonModule,\n ButtonsModule,\n SharedGenericModule\n ]\n})\nexport class OAuthModule { }\n"]}
1
+ {"version":3,"file":"oauth.module.js","sourceRoot":"","sources":["../../../src/lib/oauth/oauth.module.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;;AAExE;;;GAGG;AAOH,MAAM,OAAO,WAAW;qGAAX,WAAW;4DAAX,WAAW;gEAJhB,YAAY;YACZ,mBAAmB;;iFAGd,WAAW;cANvB,QAAQ;eAAC;gBACN,OAAO,EAAE;oBACL,YAAY;oBACZ,mBAAmB;iBACtB;aACJ;;wFACY,WAAW,cAJhB,YAAY;QACZ,mBAAmB","sourcesContent":["/**\n * @fileoverview OAuth Module\n *\n * Provides the OAuth callback handling functionality for MJExplorer.\n * This module handles OAuth provider redirects and completes the\n * authorization flow by exchanging codes for tokens.\n *\n * NOTE: The OAuthCallbackComponent is declared in ExplorerCoreModule and\n * routed directly (not lazy-loaded) because lazy loading doesn't work\n * correctly when routes are defined in a library rather than the main app.\n *\n * @module OAuth Module\n */\n\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SharedGenericModule } from '@memberjunction/ng-shared-generic';\n\n/**\n * OAuth Module - provides dependencies for OAuth callback handling.\n * The OAuthCallbackComponent itself is declared in ExplorerCoreModule.\n */\n@NgModule({\n imports: [\n CommonModule,\n SharedGenericModule\n ]\n})\nexport class OAuthModule { }\n"]}
@@ -1,5 +1,4 @@
1
- import { OnInit, OnDestroy } from '@angular/core';
2
- import { Router } from '@angular/router';
1
+ import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
3
2
  import { CompositeKey } from '@memberjunction/core';
4
3
  import { BaseResourceComponent, NavigationService } from '@memberjunction/ng-shared';
5
4
  import { ResourceData } from '@memberjunction/core-entities';
@@ -16,9 +15,10 @@ export declare class ChatCollectionsResource extends BaseResourceComponent imple
16
15
  private artifactPermissionService;
17
16
  collectionState: CollectionStateService;
18
17
  private navigationService;
19
- private router;
18
+ private cdr;
20
19
  currentUser: any;
21
20
  isArtifactPanelOpen: boolean;
21
+ activeCollectionId: string | null;
22
22
  activeArtifactId: string | null;
23
23
  activeVersionNumber: number | null;
24
24
  canShareActiveArtifact: boolean;
@@ -31,21 +31,11 @@ export declare class ChatCollectionsResource extends BaseResourceComponent imple
31
31
  private resizeStartWidth;
32
32
  private destroy$;
33
33
  private skipUrlUpdate;
34
- private lastNavigatedUrl;
35
- constructor(artifactState: ArtifactStateService, artifactPermissionService: ArtifactPermissionService, collectionState: CollectionStateService, navigationService: NavigationService, router: Router);
34
+ constructor(artifactState: ArtifactStateService, artifactPermissionService: ArtifactPermissionService, collectionState: CollectionStateService, navigationService: NavigationService, cdr: ChangeDetectorRef);
36
35
  ngOnInit(): void;
37
36
  /**
38
- * Parse URL query string for collection state.
39
- * Query params: collectionId, artifactId, versionNumber
40
- */
41
- private parseUrlState;
42
- /**
43
- * Apply URL state to collection services.
44
- */
45
- private applyUrlState;
46
- /**
47
- * Apply navigation parameters from configuration.
48
- * This handles deep-linking from other resources (e.g., clicking a link in Conversations).
37
+ * Apply initial state from tab configuration.
38
+ * The shell populates queryParams from the URL, and nav params come from cross-resource linking.
49
39
  */
50
40
  private applyNavigationParams;
51
41
  /**
@@ -57,15 +47,6 @@ export declare class ChatCollectionsResource extends BaseResourceComponent imple
57
47
  * Uses NavigationService for proper URL management that respects app-scoped routes.
58
48
  */
59
49
  private updateUrl;
60
- /**
61
- * Handle external navigation (back/forward buttons).
62
- * Parses the URL and applies the state without triggering a new navigation.
63
- */
64
- private onExternalNavigation;
65
- /**
66
- * Parse URL state from a URL string (used for external navigation).
67
- */
68
- private parseUrlFromString;
69
50
  /**
70
51
  * Update the tab/browser title based on the active collection.
71
52
  */
@@ -1 +1 @@
1
- {"version":3,"file":"chat-collections-resource.component.d.ts","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/chat-collections-resource.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,MAAM,EAAiB,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAY,YAAY,EAAW,MAAM,sBAAsB,CAAC;AAEvE,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,YAAY,EAA+B,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;;AAE3H;;;;;GAKG;AACH,qBA2Ga,uBAAwB,SAAQ,qBAAsB,YAAW,MAAM,EAAE,SAAS;IAuB3F,OAAO,CAAC,aAAa;IACrB,OAAO,CAAC,yBAAyB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H,gBAAgB,CAAC,KAAK,EAAE;QACtB,IAAI,EAAE,cAAc,GAAG,YAAY,CAAC;QACpC,EAAE,EAAE,MAAM,CAAC;QACX,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,IAAI;IAwBR;;;OAGG;IACH,kBAAkB,CAAC,KAAK,EAAE;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,YAAY,CAAA;KAAC,GAAG,IAAI;IAIjF;;OAEG;IACH,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED;;OAEG;IACG,sBAAsB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAIjE;;OAEG;IACG,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAK/D,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,qBAAqB;IAK7B,OAAO,CAAC,iBAAiB,CAAqC;IAC9D,OAAO,CAAC,gBAAgB,CAAqC;IAE7D,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAWtC,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,WAAW;yCAxdR,uBAAuB;2CAAvB,uBAAuB;CA+dnC"}
1
+ {"version":3,"file":"chat-collections-resource.component.d.ts","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/chat-collections-resource.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAY,YAAY,EAAW,MAAM,sBAAsB,CAAC;AAEvE,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACrF,OAAO,EAAE,YAAY,EAA+B,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,s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