@profoundlogic/coderflow-server 0.9.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/dist/coder-server.js +1 -1
  2. package/dist/config/skill-catalog.json +9 -0
  3. package/dist/config.js +1 -1
  4. package/dist/lib/agent-keepalive.js +1 -1
  5. package/dist/lib/agent-models.js +1 -1
  6. package/dist/lib/api-keys.js +1 -1
  7. package/dist/lib/apiKeys.js +1 -1
  8. package/dist/lib/app-server-ports.js +1 -1
  9. package/dist/lib/auto-judge.js +1 -1
  10. package/dist/lib/automation-service.js +1 -1
  11. package/dist/lib/basic-auth.js +1 -1
  12. package/dist/lib/bindings.js +1 -1
  13. package/dist/lib/build-history.js +1 -1
  14. package/dist/lib/build-output-service.js +1 -1
  15. package/dist/lib/build-scheduler.js +1 -1
  16. package/dist/lib/build-service.js +1 -1
  17. package/dist/lib/ca-certificates.js +1 -1
  18. package/dist/lib/claude-oauth-refresh.js +1 -1
  19. package/dist/lib/cli/build.js +1 -1
  20. package/dist/lib/cli/cleanup-users.js +1 -1
  21. package/dist/lib/cli/config-command.js +1 -1
  22. package/dist/lib/cli/config.js +1 -1
  23. package/dist/lib/cli/create-user.js +1 -1
  24. package/dist/lib/cli/grant-admin.js +1 -1
  25. package/dist/lib/cli/init.js +1 -1
  26. package/dist/lib/cli/jira.js +1 -1
  27. package/dist/lib/cli/license.js +1 -1
  28. package/dist/lib/cli/list-roles.js +1 -1
  29. package/dist/lib/cli/list-users.js +1 -1
  30. package/dist/lib/cli/server-manager.js +1 -1
  31. package/dist/lib/cli/set-password.js +1 -1
  32. package/dist/lib/compression-filter.js +1 -1
  33. package/dist/lib/config-migration.js +1 -1
  34. package/dist/lib/container-credential-sync.js +1 -1
  35. package/dist/lib/container-tokens.js +1 -1
  36. package/dist/lib/data-dir.js +1 -1
  37. package/dist/lib/deployment-history.js +1 -1
  38. package/dist/lib/deployment-service.js +1 -1
  39. package/dist/lib/docker-utils.js +1 -1
  40. package/dist/lib/email.js +1 -1
  41. package/dist/lib/emailTemplates.js +1 -1
  42. package/dist/lib/entitlement.js +1 -1
  43. package/dist/lib/external-connections.js +1 -1
  44. package/dist/lib/fetch-utils.js +1 -1
  45. package/dist/lib/git-commit-details-route.js +1 -1
  46. package/dist/lib/git-history-diff-guardrails.js +1 -1
  47. package/dist/lib/git-provider-service.js +1 -1
  48. package/dist/lib/git-provider-setup/github-setup-handler.js +1 -1
  49. package/dist/lib/git-provider-setup/index.js +1 -1
  50. package/dist/lib/git-provider-setup/setup-factory.js +1 -1
  51. package/dist/lib/git-provider-setup/setup-interface.js +1 -1
  52. package/dist/lib/git-providers/azure-devops-provider.js +1 -1
  53. package/dist/lib/git-providers/github-app-provider.js +1 -1
  54. package/dist/lib/git-providers/index.js +1 -1
  55. package/dist/lib/git-providers/provider-factory.js +1 -1
  56. package/dist/lib/git-providers/provider-interface.js +1 -1
  57. package/dist/lib/github-urls.js +1 -1
  58. package/dist/lib/group-objective-linking.js +1 -1
  59. package/dist/lib/ibmi-sync.js +1 -1
  60. package/dist/lib/jira-client.js +1 -1
  61. package/dist/lib/judge-blinding.js +1 -1
  62. package/dist/lib/logger.js +1 -1
  63. package/dist/lib/memory-utils.js +1 -1
  64. package/dist/lib/migration-to-scoped-rbac.js +1 -1
  65. package/dist/lib/model-fetcher.js +1 -1
  66. package/dist/lib/notifications.js +1 -1
  67. package/dist/lib/objective-context.js +1 -1
  68. package/dist/lib/oidc-auth.js +1 -1
  69. package/dist/lib/oidc-device-flow.js +1 -1
  70. package/dist/lib/passwordTokens.js +1 -1
  71. package/dist/lib/permission-resolver.js +1 -1
  72. package/dist/lib/pin-cascade.js +1 -1
  73. package/dist/lib/provider-accounts.js +1 -1
  74. package/dist/lib/provider-oauth.js +1 -1
  75. package/dist/lib/provider-profile.js +1 -1
  76. package/dist/lib/provider-token-refresh.js +1 -1
  77. package/dist/lib/rbac-user-state.js +1 -1
  78. package/dist/lib/request-url.js +1 -1
  79. package/dist/lib/rewind.js +1 -1
  80. package/dist/lib/role-definitions.js +1 -1
  81. package/dist/lib/roles.js +1 -1
  82. package/dist/lib/secrets.js +1 -1
  83. package/dist/lib/setup-repo-git-auth.js +1 -1
  84. package/dist/lib/slack-service.js +1 -1
  85. package/dist/lib/state-capture.js +1 -1
  86. package/dist/lib/static-files.js +1 -1
  87. package/dist/lib/task-aliases.js +1 -1
  88. package/dist/lib/task-container-init.js +1 -1
  89. package/dist/lib/task-context-usage.js +1 -1
  90. package/dist/lib/task-git-auth-errors.js +1 -1
  91. package/dist/lib/task-name-format.js +1 -1
  92. package/dist/lib/task-name-generator.js +1 -1
  93. package/dist/lib/task-source-metadata.js +1 -1
  94. package/dist/lib/teams.js +1 -1
  95. package/dist/lib/user-git-oauth.js +1 -1
  96. package/dist/lib/user-git-tokens.js +1 -1
  97. package/dist/lib/users.js +1 -1
  98. package/dist/middleware/requireAuth.js +1 -1
  99. package/dist/middleware/requireInit.js +1 -1
  100. package/dist/middleware/requirePermission.js +1 -1
  101. package/dist/package.json +1 -1
  102. package/dist/playwright.config.js +1 -1
  103. package/dist/playwright.task-terminal.config.js +1 -1
  104. package/dist/routes/apiKeys.js +1 -1
  105. package/dist/routes/auth-oidc.js +1 -1
  106. package/dist/routes/auth.js +1 -1
  107. package/dist/routes/automations.js +1 -1
  108. package/dist/routes/bindings.js +1 -1
  109. package/dist/routes/build.js +1 -1
  110. package/dist/routes/containers.js +1 -1
  111. package/dist/routes/deploy-task.js +1 -1
  112. package/dist/routes/environment-management.js +1 -1
  113. package/dist/routes/environments.js +1 -1
  114. package/dist/routes/external-skills.js +1 -1
  115. package/dist/routes/git-credentials.js +1 -1
  116. package/dist/routes/git-oauth.js +1 -1
  117. package/dist/routes/git-provider-setup.js +1 -1
  118. package/dist/routes/health.js +1 -1
  119. package/dist/routes/jira.js +1 -1
  120. package/dist/routes/logs.js +1 -1
  121. package/dist/routes/objective-management.js +1 -1
  122. package/dist/routes/password.js +1 -1
  123. package/dist/routes/prompt.js +1 -1
  124. package/dist/routes/provider-auth.js +1 -1
  125. package/dist/routes/qa.js +1 -1
  126. package/dist/routes/roles.js +1 -1
  127. package/dist/routes/settings.js +1 -1
  128. package/dist/routes/skill-management.js +1 -1
  129. package/dist/routes/skills.js +1 -1
  130. package/dist/routes/slack.js +1 -1
  131. package/dist/routes/stats.js +1 -1
  132. package/dist/routes/tasks.js +1 -1
  133. package/dist/routes/teams.js +1 -1
  134. package/dist/routes/templates.js +1 -1
  135. package/dist/routes/test-task.js +1 -1
  136. package/dist/routes/test.js +1 -1
  137. package/dist/routes/users.js +1 -1
  138. package/dist/routes/visualizations.js +1 -1
  139. package/dist/scripts/create-user.js +1 -1
  140. package/dist/scripts/migrate-config-to-data-dir.js +1 -1
  141. package/dist/start.js +1 -1
  142. package/dist/web-ui/public/activity-detail-modal.js +1 -1
  143. package/dist/web-ui/public/activity-feed.js +1 -1
  144. package/dist/web-ui/public/activity-formatters.js +1 -1
  145. package/dist/web-ui/public/admin.js +1 -1
  146. package/dist/web-ui/public/agent-event-parser.js +1 -1
  147. package/dist/web-ui/public/app.js +1 -1
  148. package/dist/web-ui/public/approve-dialog.js +1 -1
  149. package/dist/web-ui/public/automation-links.js +1 -1
  150. package/dist/web-ui/public/automation-schedule.js +1 -1
  151. package/dist/web-ui/public/comments-widget.js +1 -1
  152. package/dist/web-ui/public/diff-utils.js +1 -1
  153. package/dist/web-ui/public/docs/admin/automations.md +2 -1
  154. package/dist/web-ui/public/docs/docsify-proxy-helper.js +1 -1
  155. package/dist/web-ui/public/environments.css +5 -0
  156. package/dist/web-ui/public/environments.html +4 -3
  157. package/dist/web-ui/public/environments.js +1 -1
  158. package/dist/web-ui/public/feedback-widget.js +1 -1
  159. package/dist/web-ui/public/file-selection-tree.js +1 -1
  160. package/dist/web-ui/public/git-history-lazy-utils.js +1 -1
  161. package/dist/web-ui/public/git-history.js +1 -1
  162. package/dist/web-ui/public/git-status.js +1 -1
  163. package/dist/web-ui/public/ibmi-file-filter.js +1 -1
  164. package/dist/web-ui/public/index.js +1 -1
  165. package/dist/web-ui/public/login.js +1 -1
  166. package/dist/web-ui/public/markdown-editor.js +1 -1
  167. package/dist/web-ui/public/markdown-file-editor.js +1 -1
  168. package/dist/web-ui/public/modal-maximize.js +1 -1
  169. package/dist/web-ui/public/notifications.js +1 -1
  170. package/dist/web-ui/public/permissions.js +1 -1
  171. package/dist/web-ui/public/pr-dialog.js +1 -1
  172. package/dist/web-ui/public/roles.js +1 -1
  173. package/dist/web-ui/public/settings.js +1 -1
  174. package/dist/web-ui/public/setup-password.js +1 -1
  175. package/dist/web-ui/public/skills.js +1 -1
  176. package/dist/web-ui/public/sse-client.js +1 -1
  177. package/dist/web-ui/public/sse-client.transport-warning.js +1 -1
  178. package/dist/web-ui/public/sse-shared-worker.js +1 -1
  179. package/dist/web-ui/public/styles.css +111 -0
  180. package/dist/web-ui/public/task-judging-helpers.js +1 -1
  181. package/dist/web-ui/public/task.html +1 -1
  182. package/dist/web-ui/public/task.js +1 -1
  183. package/dist/web-ui/public/teams.js +1 -1
  184. package/dist/web-ui/public/terminal.js +1 -1
  185. package/dist/web-ui/public/theme.js +1 -1
  186. package/dist/web-ui/public/users.js +1 -1
  187. package/dist/web-ui/public/variant-grouping.js +1 -1
  188. package/package.json +1 -1
@@ -1 +1 @@
1
- function isLogOnlyTaskType(_0x47288a){return _0x47288a==='test'||_0x47288a==='deploy';}export function createApproveDialogHTML(_0x49685a='',_0x3b987f={}){const _0x51d806=_0x49685a,_0x2b61c1=_0x3b987f['useTaskPageStyles']?'modal\x20profound-approve-modal':'profound-feedback-modal\x20profound-approve-modal',_0x2def62=_0x3b987f['useTaskPageStyles']?'modal-warning':'approve-modal-warning',_0x5e8de7=_0x3b987f['useTaskPageStyles']?'modal-error':'approve-modal-error';return'\x0a\x20\x20\x20\x20<div\x20id=\x22'+_0x51d806+'approve-modal\x22\x20class=\x22'+_0x2b61c1+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-overlay\x22></div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h2>Approve\x20Changes</h2>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22modal-close\x22\x20id=\x22'+_0x51d806+'close-approve-modal\x22>&times;</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-body\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x51d806+'approve-warning\x22\x20class=\x22'+_0x2def62+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22warning-icon\x22>!</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x51d806+'approve-warning-text\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x51d806+'approve-error\x22\x20class=\x22'+_0x5e8de7+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22error-icon\x22>!</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x51d806+'approve-error-text\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x51d806+'conflict-resolution\x22\x20class=\x22conflict-resolution-panel\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22conflict-resolution-message\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22warning-icon\x22>!</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Remote\x20has\x20conflicting\x20changes\x20that\x20couldn\x27t\x20be\x20merged\x20automatically.</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22conflict-resolution-options\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-primary\x20btn-small\x22\x20id=\x22'+_0x51d806+'conflict-agent-resolve\x22>Let\x20the\x20agent\x20resolve\x20conflicts</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22>The\x20agent\x20will\x20pull\x20remote\x20changes,\x20resolve\x20conflicts,\x20and\x20prepare\x20for\x20re-approval.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-secondary\x20btn-small\x22\x20id=\x22'+_0x51d806+'conflict-new-branch\x22>Create\x20a\x20new\x20branch\x20instead</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22>Avoids\x20the\x20conflict\x20by\x20committing\x20to\x20a\x20separate\x20branch.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-secondary\x20btn-small\x22\x20id=\x22'+_0x51d806+'conflict-cancel\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-info\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x51d806+'approve-repo-name\x22\x20class=\x22modal-repo\x22>Repository</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x51d806+'approve-stats\x22\x20class=\x22modal-stats\x22>0\x20files\x20changed</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x51d806+'approve-branches\x22\x20class=\x22modal-branches\x22\x20hidden></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x51d806+'commit-message-input\x22>Commit\x20message:</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<textarea\x20id=\x22'+_0x51d806+'commit-message-input\x22\x20class=\x22commit-message-input\x22\x20rows=\x226\x22\x20placeholder=\x22Enter\x20commit\x20message...\x22></textarea>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20id=\x22'+_0x51d806+'multi-repo-note\x22\x20class=\x22field-hint\x22\x20hidden>This\x20commit\x20message\x20will\x20be\x20used\x20for\x20all\x20repositories\x20listed\x20above.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x51d806+'pull-before-commit\x22\x20checked>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Pull\x20from\x20remote\x20after\x20commit</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x51d806+'push-after-commit\x22\x20checked>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Push\x20to\x20remote\x20after\x20commit</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x51d806+'create-new-branch\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Create\x20new\x20branch</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x51d806+'new-branch-input-container\x22\x20class=\x22new-branch-container\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x51d806+'new-branch-name\x22\x20class=\x22new-branch-input\x22\x20placeholder=\x22Enter\x20new\x20branch\x20name...\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22>A\x20new\x20branch\x20will\x20be\x20created\x20from\x20the\x20current\x20branch\x20before\x20committing.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x51d806+'pr-option-section\x22\x20class=\x22modal-section\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x51d806+'create-pull-request\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Create\x20pull\x20request</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22\x20id=\x22'+_0x51d806+'pr-hint\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20A\x20new\x20branch\x20will\x20be\x20created,\x20pushed,\x20and\x20a\x20pull\x20request\x20opened.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x51d806+'ibmi-sync-section\x22\x20class=\x22modal-section\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22approve-divider\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x51d806+'sync-to-ibmi\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Sync\x20to\x20IBM\x20i</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x51d806+'ibmi-sync-fields\x22\x20class=\x22new-branch-container\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x51d806+'ibmi-sync-library\x22>Library\x20name</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x51d806+'ibmi-sync-library\x22\x20class=\x22new-branch-input\x20code-font\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20maxlength=\x2210\x22\x20placeholder=\x22e.g.,\x20MYLIB\x22\x20style=\x22width:\x20160px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x51d806+'ibmi-sync-credentials-row\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x51d806+'ibmi-sync-user\x22\x20style=\x22margin-top:\x208px;\x20display:\x20block;\x22>User\x20profile</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x51d806+'ibmi-sync-user\x22\x20class=\x22new-branch-input\x20code-font\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20maxlength=\x2210\x22\x20placeholder=\x22e.g.,\x20MYUSER\x22\x20style=\x22width:\x20160px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x51d806+'ibmi-sync-password\x22\x20style=\x22margin-top:\x208px;\x20display:\x20block;\x22>Password</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22password\x22\x20id=\x22'+_0x51d806+'ibmi-sync-password\x22\x20class=\x22new-branch-input\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20placeholder=\x22Enter\x20password\x22\x20style=\x22width:\x20160px;\x22\x20autocomplete=\x22off\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x51d806+'ibmi-sync-files-section\x22\x20style=\x22margin-top:\x2010px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20style=\x22display:\x20block;\x20margin-bottom:\x204px;\x22>Files\x20to\x20sync</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x51d806+'ibmi-sync-file-tree\x22\x20class=\x22file-selection-tree-container\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22max-height:\x20250px;\x20overflow-y:\x20auto;\x20border:\x201px\x20solid\x20var(--border-color,\x20var(--color-border));\x20border-radius:\x204px;\x20padding:\x208px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-selection-summary\x22\x20id=\x22'+_0x51d806+'ibmi-sync-files-summary\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-footer\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-ghost\x22\x20id=\x22'+_0x51d806+'cancel-approve\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-primary\x22\x20id=\x22'+_0x51d806+'confirm-approve\x22>Commit\x20Changes</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20';}export class ApproveDialog{constructor(_0x3247a0={}){this['prefix']=_0x3247a0['prefix']||'',this['onApprove']=_0x3247a0['onApprove'],this['onSync']=_0x3247a0['onSync'],this['onSuccess']=_0x3247a0['onSuccess'],this['onError']=_0x3247a0['onError'],this['onCreatePR']=_0x3247a0['onCreatePR'],this['showToast']=_0x3247a0['showToast']||(()=>{}),this['container']=_0x3247a0['container']||document['body'],this['useTaskPageStyles']=_0x3247a0['useTaskPageStyles']||![],this['baseUrl']=_0x3247a0['baseUrl']||'',this['coderflowAttribution']=_0x3247a0['coderflowAttribution'],this['onConflictFollowUp']=_0x3247a0['onConflictFollowUp']||null,this['onSyncToIbmi']=_0x3247a0['onSyncToIbmi']||null,this['onGetSyncFiles']=_0x3247a0['onGetSyncFiles']||null,this['taskData']=null,this['initialized']=![],this['isSyncing']=![],this['_createPR']=![],this['_attributionRequestId']=0x0,this['_syncFileTree']=null,this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null,this['_transientWarning']='';}['init'](){if(this['initialized'])return;const _0x529af6=document['createElement']('div');_0x529af6['innerHTML']=createApproveDialogHTML(this['prefix'],{'useTaskPageStyles':this['useTaskPageStyles']}),this['container']['appendChild'](_0x529af6['firstElementChild']),this['_bindEvents'](),this['initialized']=!![];}['_el'](_0x14af3f){return document['getElementById'](''+this['prefix']+_0x14af3f);}['_bindEvents'](){const _0x1cbb89=this['_el']('approve-modal'),_0x35155c=this['_el']('close-approve-modal'),_0x56b3da=this['_el']('cancel-approve'),_0x56a7dc=this['_el']('confirm-approve'),_0x1330f3=_0x1cbb89?.['querySelector']('.modal-overlay'),_0x118074=this['_el']('pull-before-commit'),_0x45b833=this['_el']('create-new-branch'),_0x2106f6=this['_el']('new-branch-input-container'),_0x4b5009=this['_el']('new-branch-name'),_0x4b34a1=this['_el']('push-after-commit'),_0x9bccba=this['_el']('create-pull-request'),_0x15259c=this['_el']('pr-hint'),_0x1893f6=()=>{this['_refreshWarningBanner']();};_0x35155c?.['addEventListener']('click',()=>this['hide']()),_0x56b3da?.['addEventListener']('click',()=>this['hide']()),_0x1330f3?.['addEventListener']('click',()=>this['hide']()),_0x56a7dc?.['addEventListener']('click',()=>this['_handleApprove']());_0x45b833&&_0x45b833['addEventListener']('change',()=>{_0x2106f6&&(_0x2106f6['hidden']=!_0x45b833['checked']),_0x45b833['checked']&&_0x4b5009&&_0x4b5009['focus'](),_0x1893f6();});_0x118074?.['addEventListener']('change',()=>{_0x1893f6();});_0x9bccba&&_0x4b34a1&&_0x45b833&&(_0x9bccba['addEventListener']('change',()=>{this['_createPR']=_0x9bccba['checked'];if(_0x9bccba['checked']){_0x4b34a1['checked']=!![],_0x4b34a1['disabled']=!![],_0x45b833['checked']=!![],_0x45b833['disabled']=!![];_0x2106f6&&(_0x2106f6['hidden']=![]);if(_0x15259c)_0x15259c['hidden']=![];}else{_0x4b34a1['disabled']=![],_0x45b833['disabled']=![];if(_0x15259c)_0x15259c['hidden']=!![];}_0x1893f6();}),_0x4b34a1['addEventListener']('change',()=>{if(!_0x4b34a1['checked']&&_0x9bccba['checked']){_0x9bccba['checked']=![],this['_createPR']=![],_0x4b34a1['disabled']=![],_0x45b833['disabled']=![];if(_0x15259c)_0x15259c['hidden']=!![];}}));_0x1893f6();const _0x5bb341=this['_el']('sync-to-ibmi');_0x5bb341&&_0x5bb341['addEventListener']('change',async _0x2ea7dc=>{const _0x5cf11a=this['_el']('ibmi-sync-fields');if(_0x5cf11a)_0x5cf11a['hidden']=!_0x2ea7dc['target']['checked'];if(_0x2ea7dc['target']['checked']){const _0x15474c=this['_el']('ibmi-sync-library'),_0x54332f=localStorage['getItem']('coderflow_ibmi_sync_library');_0x54332f&&_0x15474c&&!_0x15474c['value']&&(_0x15474c['value']=_0x54332f);const _0x50d546=this['_el']('ibmi-sync-user');if(_0x50d546&&!_0x50d546['value']){const _0x4e78c7=localStorage['getItem']('coderflow_ibmi_sync_user');if(_0x4e78c7)_0x50d546['value']=_0x4e78c7;}const _0x160060=this['_el']('ibmi-sync-password');if(_0x160060)_0x160060['value']='';!this['_syncFileTree']&&this['onGetSyncFiles']&&this['taskData']?.['taskId']&&await this['_loadSyncFileTree']();}}),this['_el']('conflict-agent-resolve')?.['addEventListener']('click',()=>{this['onConflictFollowUp']&&this['onConflictFollowUp'](this['taskData']['taskId']),this['hide'](),this['showToast']('Agent\x20is\x20resolving\x20conflicts.\x20Re-approve\x20when\x20it\x20finishes.','info');}),this['_el']('conflict-new-branch')?.['addEventListener']('click',()=>{this['_hideConflictResolution']();const _0x2887f4=this['_el']('create-new-branch'),_0x2921f9=this['_el']('new-branch-input-container'),_0x1aeeef=this['_el']('new-branch-name');if(_0x2887f4)_0x2887f4['checked']=!![];if(_0x2921f9)_0x2921f9['hidden']=![];if(_0x1aeeef)_0x1aeeef['focus']();_0x1893f6();}),this['_el']('conflict-cancel')?.['addEventListener']('click',()=>this['hide']()),document['addEventListener']('keydown',_0x5ee605=>{_0x5ee605['key']==='Escape'&&_0x1cbb89&&!_0x1cbb89['hidden']&&this['hide']();});}async['_loadSyncFileTree'](){const _0x86761a=this['_el']('ibmi-sync-file-tree'),_0x50711c=this['_el']('ibmi-sync-files-summary');if(!_0x86761a)return;_0x86761a['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>Loading\x20files...</span>';if(_0x50711c)_0x50711c['textContent']='';try{const {files:_0x38ee0d,absolutePaths:_0x4d42a0}=await this['onGetSyncFiles'](this['taskData']['taskId']);this['_syncRelativeFiles']=_0x38ee0d,this['_syncAbsolutePaths']=_0x4d42a0;if(_0x38ee0d['length']===0x0){_0x86761a['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>No\x20changed\x20files\x20found.</span>';return;}const {FileSelectionTree:_0x2069a5}=await import('./file-selection-tree.js'),{validateIbmiFile:_0x2ba7ce,hasKnownIbmiExtension:_0x3e9219}=await import('./ibmi-file-filter.js');this['_syncFileTree']=new _0x2069a5({'container':_0x86761a,'files':_0x38ee0d,'isPreselected':_0x19e3f3=>{const {valid:_0x21648b}=_0x2ba7ce(_0x19e3f3);return _0x21648b&&_0x3e9219(_0x19e3f3);},'isDisabled':_0x4a7452=>{const {valid:_0x25dc02,reason:_0x17a6e9}=_0x2ba7ce(_0x4a7452);return{'disabled':!_0x25dc02,'reason':_0x17a6e9};},'isAutoCheckEligible':_0x4b98b4=>{const {valid:_0x123559}=_0x2ba7ce(_0x4b98b4);return _0x123559&&_0x3e9219(_0x4b98b4);},'onChange':_0x33fe58=>{_0x50711c&&(_0x50711c['textContent']=_0x33fe58['length']+'\x20of\x20'+_0x38ee0d['length']+'\x20file'+(_0x38ee0d['length']!==0x1?'s':'')+'\x20selected');}}),this['_syncFileTree']['render']();}catch(_0x2054d3){_0x86761a['innerHTML']='<span\x20style=\x22color:\x20var(--color-danger,\x20#e55368);\x20font-size:\x2013px;\x22>Failed\x20to\x20load\x20files</span>';}}['showError'](_0x1059b8){const _0x58d9db=this['_el']('approve-error'),_0xa5c63c=this['_el']('approve-error-text');_0x58d9db&&_0xa5c63c&&(_0xa5c63c['textContent']=_0x1059b8,_0x58d9db['hidden']=![],_0x58d9db['scrollIntoView']({'behavior':'smooth','block':'nearest'}));}['hideError'](){const _0x9fbdfd=this['_el']('approve-error'),_0x570115=this['_el']('approve-error-text');_0x9fbdfd&&_0x570115&&(_0x9fbdfd['hidden']=!![],_0x570115['textContent']='');}['_displayBranchInfo'](_0x29934a,_0x350ef7={}){const _0x5132b3=this['_el']('approve-branches');if(!_0x5132b3)return;const _0x119f32=[];for(const _0x4f16ec of _0x29934a){_0x350ef7[_0x4f16ec['name']]&&_0x119f32['push']({'repo':_0x4f16ec['name'],'branch':_0x350ef7[_0x4f16ec['name']]});}if(_0x119f32['length']>0x0){_0x5132b3['hidden']=![];if(_0x119f32['length']===0x1)_0x5132b3['innerHTML']='<div\x20class=\x22branch-info\x22>Branch:\x20<code>'+_0x119f32[0x0]['branch']+'</code></div>';else{const _0xa14222=_0x119f32['map'](_0x129918=>'<div\x20class=\x22branch-item\x22><strong>'+_0x129918['repo']+':</strong>\x20<code>'+_0x129918['branch']+'</code></div>')['join']('');_0x5132b3['innerHTML']='<div\x20class=\x22branch-info\x22>Branches:<div\x20class=\x22branch-list\x22>'+_0xa14222+'</div></div>';}}else _0x5132b3['hidden']=!![],_0x5132b3['innerHTML']='';}['showWarning'](_0x5a100a){const _0x249b11=this['_el']('approve-warning'),_0x58bad2=this['_el']('approve-warning-text');_0x249b11&&_0x58bad2&&(_0x58bad2['textContent']=_0x5a100a,_0x249b11['hidden']=![]);}['hideWarning'](){const _0x30e4b5=this['_el']('approve-warning'),_0x417a04=this['_el']('approve-warning-text');_0x30e4b5&&_0x417a04&&(_0x30e4b5['hidden']=!![],_0x417a04['textContent']='');}['_showConflictResolution'](){const _0x12e1f0=this['_el']('conflict-resolution'),_0x2115dc=this['_el']('confirm-approve'),_0x260e00=this['_el']('cancel-approve'),_0x16c4cb=this['_el']('conflict-agent-resolve');if(_0x12e1f0)_0x12e1f0['hidden']=![];if(_0x2115dc)_0x2115dc['hidden']=!![];if(_0x260e00)_0x260e00['hidden']=!![];const _0x55b914=this['_el']('approve-modal');if(_0x55b914){this['_sectionsHiddenBeforeConflict']=new Set();for(const _0x514421 of _0x55b914['querySelectorAll']('.modal-section')){_0x514421['hidden']&&this['_sectionsHiddenBeforeConflict']['add'](_0x514421),_0x514421['hidden']=!![];}}if(_0x16c4cb){const _0x451bb2=!!this['onConflictFollowUp'];_0x16c4cb['hidden']=!_0x451bb2,_0x16c4cb['nextElementSibling']?.['classList']['contains']('field-hint')&&(_0x16c4cb['nextElementSibling']['hidden']=!_0x451bb2);}}['_hideConflictResolution'](){const _0x9fae27=this['_el']('conflict-resolution'),_0x1d1e23=this['_el']('confirm-approve'),_0x223085=this['_el']('cancel-approve');if(_0x9fae27)_0x9fae27['hidden']=!![];if(_0x1d1e23)_0x1d1e23['hidden']=![];if(_0x223085)_0x223085['hidden']=![];const _0x3bfe97=this['_el']('approve-modal');if(_0x3bfe97){const _0x4e6589=this['_sectionsHiddenBeforeConflict']||new Set();for(const _0x2826ef of _0x3bfe97['querySelectorAll']('.modal-section')){!_0x4e6589['has'](_0x2826ef)&&(_0x2826ef['hidden']=![]);}this['_sectionsHiddenBeforeConflict']=null;}}['_getRemoteConflictWarning'](){const _0x1ad57b=this['taskData']?.['reposChanged']||[],_0x1ce0f0=this['_el']('pull-before-commit')?.['checked']??!![],_0x1ca80d=this['_el']('create-new-branch')?.['checked']||![];if(!_0x1ce0f0||_0x1ca80d||_0x1ad57b['length']===0x0)return'';const _0xf22bd6=_0x1ad57b['filter'](_0x27eedd=>_0x27eedd?.['upstream_status']==='behind'||_0x27eedd?.['upstream_status']==='diverged');if(_0xf22bd6['length']===0x0)return'';const _0x5198b6=_0xf22bd6['map'](_0x72f385=>{const _0x29be9d=Number(_0x72f385?.['upstream_behind'])||0x0,_0x23e5b1=_0x29be9d+'\x20commit'+(_0x29be9d===0x1?'':'s')+'\x20ahead';if(_0x72f385['upstream_status']==='diverged')return _0x72f385['name']+':\x20remote\x20is\x20'+_0x23e5b1+'\x20and\x20the\x20tracked\x20branch\x20has\x20local\x20commits';return _0x72f385['name']+':\x20remote\x20is\x20'+_0x23e5b1;})['join'](';\x20');return'Remote\x20has\x20new\x20changes\x20('+_0x5198b6+').\x20If\x20there\x20are\x20conflicts,\x20you\x27ll\x20be\x20given\x20options\x20to\x20resolve\x20them.';}['_refreshWarningBanner'](){const _0x4079c7=[this['taskData']?.['warning']||'',this['_getRemoteConflictWarning'](),this['_transientWarning']||'']['filter'](Boolean);if(_0x4079c7['length']>0x0){this['showWarning'](_0x4079c7['join']('\x20'));return;}this['hideWarning']();}['_stripCoAuthoredByLines'](_0x4f9a39){return _0x4f9a39['replace'](/^Co-Authored-By:.*$/gmi,'')['replace'](/^Learn more: https:\/\/coderflow\.ai\s*$/gm,'')['replace'](/\n{3,}/g,'\x0a\x0a')['trim']();}async['_addAttributionIfEnabled'](_0x228f34){try{let _0x35f148;try{const _0x3ab626=await fetch(this['baseUrl']+'/settings');if(_0x3ab626['ok']){const _0x253021=await _0x3ab626['json']();_0x35f148=_0x253021['coderflow_attribution']!==![];}}catch(_0x5c0fc2){}_0x35f148===undefined&&(this['coderflowAttribution']!==undefined?_0x35f148=this['coderflowAttribution']!==![]:_0x35f148=!![]);const _0x47a261=this['_stripCoAuthoredByLines'](_0x228f34);if(!_0x35f148)return _0x47a261;const _0x1f0779='\x0a\x0aCo-Authored-By:\x20CoderFlow\x20<ai@coderflow.ai>\x0aLearn\x20more:\x20https://coderflow.ai';return _0x47a261+_0x1f0779;}catch(_0x5e4639){return console['warn']('Failed\x20to\x20add\x20CoderFlow\x20attribution:',_0x5e4639),_0x228f34;}}['show'](_0x2b3a6a){!this['initialized']&&this['init']();this['taskData']=_0x2b3a6a;const _0x41a88a=this['_el']('approve-modal'),_0x2b3170=this['_el']('commit-message-input'),_0x5d399b=this['_el']('pull-before-commit'),_0x36b142=this['_el']('push-after-commit'),_0x10dcbb=this['_el']('create-new-branch'),_0x4277cb=this['_el']('new-branch-input-container'),_0x2b5f15=this['_el']('new-branch-name');if(!_0x41a88a)return;this['hideError'](),this['hideWarning'](),this['_hideConflictResolution'](),this['_transientWarning']='';const _0x43931c=_0x2b3a6a['reposChanged']||[];if(_0x43931c['length']===0x0&&!_0x2b3a6a['syncFirst']){this['showToast']('No\x20changes\x20to\x20approve','error');return;}this['_updateDisplay'](_0x43931c,_0x2b3a6a);const _0x32ba02=_0x2b3a6a['commitMessage']||'',_0x472a16=this['_stripCoAuthoredByLines'](_0x32ba02);_0x2b3170['value']=_0x472a16;if(_0x5d399b)_0x5d399b['checked']=!![];if(_0x36b142)_0x36b142['checked']=!![];_0x10dcbb&&(_0x10dcbb['checked']=![]);_0x4277cb&&(_0x4277cb['hidden']=!![]);_0x2b5f15&&(_0x2b5f15['value']='');if(_0x36b142)_0x36b142['disabled']=![];if(_0x10dcbb)_0x10dcbb['disabled']=![];this['_refreshWarningBanner'](),this['updatePRSupport'](_0x2b3a6a['prSupported']===!![]);const _0x3ccfb6=this['_el']('ibmi-sync-section');if(_0x3ccfb6){_0x3ccfb6['hidden']=!_0x2b3a6a['ibmiSyncAvailable'];const _0x17a055=this['_el']('sync-to-ibmi'),_0x280bf1=this['_el']('ibmi-sync-fields'),_0x468ea4=this['_el']('ibmi-sync-library');if(_0x17a055)_0x17a055['checked']=![];if(_0x280bf1)_0x280bf1['hidden']=!![];if(_0x468ea4)_0x468ea4['value']='';const _0x237c41=this['_el']('ibmi-sync-credentials-row');_0x237c41&&(_0x237c41['hidden']=!(_0x2b3a6a['ibmiSyncAvailable']&&_0x2b3a6a['syncCredentials']==='prompt'));}const _0x2629b5=this['_el']('confirm-approve');_0x2b3a6a['syncFirst']&&this['onSync']?(_0x2629b5&&(_0x2629b5['disabled']=!![],_0x2629b5['textContent']='Syncing...'),this['_performSync']()):_0x2629b5&&(_0x2629b5['disabled']=![],_0x2629b5['textContent']='Commit\x20Changes');_0x41a88a['hidden']=![];const _0x447bb4=++this['_attributionRequestId'];void this['_applyAttributionAsync']({'requestId':_0x447bb4,'taskId':_0x2b3a6a['taskId'],'originalCommitMessage':_0x472a16}),setTimeout(()=>{_0x2b3170['focus'](),_0x2b3170['setSelectionRange'](0x0,_0x2b3170['value']['length']);},0x64);}['updatePRSupport'](_0x11a819){const _0x27a1b1=this['_el']('pr-option-section'),_0x532872=this['_el']('create-pull-request'),_0x1b22c9=this['_el']('pr-hint'),_0x275221=this['_el']('push-after-commit'),_0x2a41e4=this['_el']('create-new-branch');if(!_0x27a1b1)return;if(_0x11a819){_0x27a1b1['hidden']=![];_0x532872&&!_0x532872['disabled']&&(_0x532872['checked']=![]);if(_0x1b22c9)_0x1b22c9['hidden']=!![];this['_createPR']=![];return;}_0x532872?.['checked']&&(_0x532872['checked']=![]);if(_0x1b22c9)_0x1b22c9['hidden']=!![];if(_0x275221)_0x275221['disabled']=![];if(_0x2a41e4)_0x2a41e4['disabled']=![];this['_createPR']=![],_0x27a1b1['hidden']=!![];}async['_applyAttributionAsync']({requestId:_0x2b11c9,taskId:_0x262260,originalCommitMessage:_0x9010a3}){const _0x4b63fb=this['_el']('commit-message-input');if(!_0x4b63fb)return;const _0x26a2a0=await this['_addAttributionIfEnabled'](_0x9010a3);if(_0x2b11c9!==this['_attributionRequestId'])return;if(!this['taskData']||this['taskData']['taskId']!==_0x262260)return;if(!this['isVisible']())return;const _0x222ac5=_0x392e56=>_0x392e56['replace'](/\r\n/g,'\x0a')['replace'](/\r/g,'\x0a');if(_0x222ac5(_0x4b63fb['value'])!==_0x222ac5(_0x9010a3))return;_0x4b63fb['value']=_0x26a2a0;}['_updateDisplay'](_0x1a5280,_0x3519b3){const _0x22d60c=this['_el']('approve-repo-name'),_0x162d2e=this['_el']('approve-stats'),_0x4d9073=this['_el']('multi-repo-note');if(_0x1a5280['length']===0x0){if(_0x22d60c)_0x22d60c['textContent']='Syncing...';if(_0x162d2e)_0x162d2e['textContent']='';if(_0x4d9073)_0x4d9073['hidden']=!![];return;}const _0x158dab=_0x1a5280['reduce']((_0x2b3139,_0x4e3900)=>_0x2b3139+(_0x4e3900['files_changed']||0x0),0x0),_0x494d5c=_0x1a5280['reduce']((_0x51c0f7,_0x4d2a17)=>_0x51c0f7+(_0x4d2a17['lines_added']||0x0),0x0),_0x144df6=_0x1a5280['reduce']((_0x32aeac,_0x303210)=>_0x32aeac+(_0x303210['lines_deleted']||0x0),0x0);if(_0x1a5280['length']===0x1){if(_0x22d60c)_0x22d60c['textContent']=_0x1a5280[0x0]?.['name']||'repository';if(_0x4d9073)_0x4d9073['hidden']=!![];}else{const _0x10524b=_0x1a5280['map'](_0x46e913=>_0x46e913['name'])['join'](',\x20');if(_0x22d60c)_0x22d60c['textContent']=_0x1a5280['length']+'\x20repositories:\x20'+_0x10524b;if(_0x4d9073)_0x4d9073['hidden']=![];}_0x162d2e&&(_0x162d2e['textContent']=_0x158dab+'\x20file'+(_0x158dab===0x1?'':'s')+'\x20changed\x20(+'+_0x494d5c+'\x20-'+_0x144df6+')'),this['_displayBranchInfo'](_0x1a5280,_0x3519b3?.['branches']||{});}async['_performSync'](){if(!this['onSync']||this['isSyncing'])return;this['isSyncing']=!![];const _0x98f92e=this['_el']('confirm-approve');try{const _0x2e1f6e=await this['onSync'](this['taskData']['taskId']);if(!this['isVisible']()){this['isSyncing']=![];return;}if(_0x2e1f6e['repos_changed']){const _0x5aa565=this['taskData']['reposChanged']?.['length']||0x0,_0x343b68=this['taskData']['reposChanged']?.['reduce']((_0x1ce097,_0x3dd80f)=>_0x1ce097+(_0x3dd80f['files_changed']||0x0),0x0)||0x0;this['taskData']['reposChanged']=_0x2e1f6e['repos_changed'];if(_0x2e1f6e['current_branches']){const _0x15f132={...this['taskData']['branches']||{}};for(const [_0x5ae422,_0x186463]of Object['entries'](_0x2e1f6e['current_branches'])){_0x186463?_0x15f132[_0x5ae422]=_0x186463:delete _0x15f132[_0x5ae422];}this['taskData']['branches']=_0x15f132;}this['_updateDisplay'](_0x2e1f6e['repos_changed'],this['taskData']);const _0x3bc998=_0x2e1f6e['repos_changed']['length'],_0x3c49e9=_0x2e1f6e['repos_changed']['reduce']((_0x47209e,_0x1b3937)=>_0x47209e+(_0x1b3937['files_changed']||0x0),0x0);(_0x3c49e9>_0x343b68||_0x3bc998>_0x5aa565)&&(this['_transientWarning']='Additional\x20changes\x20detected\x20since\x20last\x20sync.\x20Review\x20the\x20updated\x20file\x20list.'),this['_refreshWarningBanner']();}_0x98f92e&&(!this['taskData']['reposChanged']||this['taskData']['reposChanged']['length']===0x0?(_0x98f92e['disabled']=!![],_0x98f92e['textContent']='No\x20Changes',this['showError']('No\x20changes\x20to\x20approve\x20after\x20sync')):(_0x98f92e['disabled']=![],_0x98f92e['textContent']='Commit\x20Changes'));}catch(_0x5582f3){console['error']('Failed\x20to\x20sync\x20repos\x20before\x20approve:',_0x5582f3);if(!this['isVisible']()){this['isSyncing']=![];return;}this['showError']('Sync\x20failed:\x20'+_0x5582f3['message']+'.\x20You\x20can\x20still\x20commit\x20with\x20existing\x20staged\x20changes.'),_0x98f92e&&(this['taskData']['reposChanged']&&this['taskData']['reposChanged']['length']>0x0?(_0x98f92e['disabled']=![],_0x98f92e['textContent']='Commit\x20Changes'):(_0x98f92e['disabled']=!![],_0x98f92e['textContent']='No\x20Changes'));}finally{this['isSyncing']=![];}}['hide'](){const _0x14a298=this['_el']('approve-modal');_0x14a298&&(_0x14a298['hidden']=!![]),this['_syncFileTree']&&(this['_syncFileTree']['destroy'](),this['_syncFileTree']=null),this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}async['_handleApprove'](){const _0x34f83f=this['_el']('commit-message-input'),_0x30cc45=this['_el']('pull-before-commit'),_0x86986c=this['_el']('push-after-commit'),_0x5223a1=this['_el']('create-new-branch'),_0x3ad4a9=this['_el']('new-branch-name'),_0x81a90c=this['_el']('confirm-approve'),_0x3f2411=_0x34f83f['value']['trim'](),_0x2c2fe4=_0x30cc45?.['checked']??!![],_0x35b427=_0x86986c?.['checked']??!![],_0x2be791=_0x5223a1?.['checked']||![],_0x853dd5=_0x3ad4a9?.['value']['trim']()||'';this['hideError']();if(!_0x3f2411){this['showError']('Commit\x20message\x20is\x20required'),_0x34f83f['focus']();return;}if(_0x2be791&&!_0x853dd5){this['showError']('Branch\x20name\x20is\x20required\x20when\x20creating\x20a\x20new\x20branch'),_0x3ad4a9?.['focus']();return;}if(_0x2be791&&_0x853dd5){const _0x327888=/[\s~^:?*\[\\]/;if(_0x327888['test'](_0x853dd5)){this['showError']('Invalid\x20branch\x20name.\x20Avoid\x20spaces\x20and\x20special\x20characters\x20like\x20~\x20^\x20:\x20?\x20*\x20[\x20\x5c'),_0x3ad4a9?.['focus']();return;}}const _0x235867=this['_el']('sync-to-ibmi')?.['checked'];if(_0x235867){const _0x35e965=this['_el']('ibmi-sync-library')?.['value']?.['trim']();if(!_0x35e965){this['showError']('IBM\x20i\x20library\x20name\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-library')?.['focus']();return;}if(this['_syncFileTree']){const _0x2600e1=this['_syncFileTree']['getSelectedFiles']();if(_0x2600e1['length']===0x0){this['showError']('Select\x20at\x20least\x20one\x20file\x20to\x20sync');return;}}if(this['taskData']?.['syncCredentials']==='prompt'){const _0x1eba3e=this['_el']('ibmi-sync-user')?.['value']?.['trim']();if(!_0x1eba3e){this['showError']('User\x20profile\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-user')?.['focus']();return;}const _0x5735ac=this['_el']('ibmi-sync-password')?.['value'];if(!_0x5735ac){this['showError']('Password\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-password')?.['focus']();return;}}}const _0x1422e1=_0x81a90c?.['textContent']||'Commit\x20Changes';_0x81a90c&&(_0x81a90c['disabled']=!![],_0x2be791?_0x81a90c['textContent']='Creating\x20branch\x20&\x20committing...':_0x81a90c['textContent']=_0x2c2fe4?'Pulling\x20&\x20Committing...':'Committing...');try{const _0x1a8cfa={'commit_message':_0x3f2411,'pull':_0x2c2fe4,'push':_0x35b427,'conflict_strategy':'rebase'};_0x2be791&&_0x853dd5&&(_0x1a8cfa['new_branch']=_0x853dd5);let _0xe63a4f=null;this['onApprove']&&(_0xe63a4f=await this['onApprove'](this['taskData']['taskId'],_0x1a8cfa));let _0x133528='Changes\x20committed';if(_0x2be791)_0x133528='Changes\x20committed\x20to\x20new\x20branch\x20\x27'+_0x853dd5+'\x27',_0x35b427&&(_0x133528+='\x20and\x20pushed');else{if(_0x2c2fe4&&_0x35b427)_0x133528='Changes\x20pulled,\x20committed,\x20and\x20pushed';else{if(_0x2c2fe4)_0x133528='Changes\x20pulled\x20and\x20committed';else _0x35b427&&(_0x133528='Changes\x20committed\x20and\x20pushed');}}const _0x267ed1=this['_el']('sync-to-ibmi')?.['checked'];let _0x1f8635=null,_0xb4ff8f=null,_0x4c4922=null,_0x28270f=null;if(_0x267ed1&&this['onSyncToIbmi']){_0x1f8635=this['_el']('ibmi-sync-library')?.['value']?.['trim']()?.['toUpperCase'](),_0xb4ff8f=this['_el']('ibmi-sync-user')?.['value']?.['trim']()?.['toUpperCase']()||null,_0x4c4922=this['_el']('ibmi-sync-password')?.['value']||null;if(this['_syncFileTree']&&this['_syncRelativeFiles']&&this['_syncAbsolutePaths']){const _0x255ab7=this['_syncFileTree']['getSelectedFiles']();_0x28270f=_0x255ab7['map'](_0x162811=>{const _0x4c49b1=this['_syncRelativeFiles']['indexOf'](_0x162811);return _0x4c49b1>=0x0?this['_syncAbsolutePaths'][_0x4c49b1]:_0x162811;});}}this['showToast'](_0x133528,'success'),this['hide']();if(this['_createPR']&&this['onCreatePR'])try{await this['onCreatePR'](this['taskData']['taskId'],_0xe63a4f||{});}catch(_0x27ca7a){console['warn']('PR\x20creation\x20failed\x20or\x20cancelled:',_0x27ca7a);}if(_0x267ed1&&this['onSyncToIbmi']&&_0x1f8635){localStorage['setItem']('coderflow_ibmi_sync_library',_0x1f8635);if(_0xb4ff8f)localStorage['setItem']('coderflow_ibmi_sync_user',_0xb4ff8f);try{await this['onSyncToIbmi'](this['taskData']['taskId'],_0x1f8635,_0xb4ff8f,_0x4c4922,_0x28270f);}catch(_0x19a182){this['showToast']('Sync\x20failed:\x20'+_0x19a182['message'],'error');}}this['onSuccess']&&this['onSuccess'](this['taskData']);}catch(_0x14b1c4){console['error']('Failed\x20to\x20approve\x20changes',_0x14b1c4);if(_0x14b1c4['hasConflicts'])this['_showConflictResolution']();else _0x14b1c4['code']==='container_token_expired'?this['showError'](_0x14b1c4['message']||'This\x20task\x27s\x20Git\x20credentials\x20have\x20expired.\x20Start\x20a\x20new\x20task\x20to\x20continue\x20making\x20changes.'):this['showError']('Failed\x20to\x20commit:\x20'+_0x14b1c4['message']);_0x81a90c&&(_0x81a90c['disabled']=![],_0x81a90c['textContent']=_0x1422e1),this['onError']&&this['onError'](_0x14b1c4);}}['isVisible'](){const _0x2bc6bd=this['_el']('approve-modal');return _0x2bc6bd&&!_0x2bc6bd['hidden'];}['destroy'](){const _0x177333=this['_el']('approve-modal');_0x177333&&_0x177333['remove'](),this['initialized']=![];}}export function getApproveState(_0x3e00a5,_0x845af){if(!_0x3e00a5)return{'canApprove':![],'reason':'No\x20task\x20data'};if(isLogOnlyTaskType(_0x3e00a5['taskType']))return{'canApprove':![],'reason':(_0x3e00a5['taskType']==='test'?'Test':'Deploy')+'\x20tasks\x20cannot\x20be\x20approved'};const _0x5d6c24=_0x845af?.['repos_changed']?.['length']>0x0,_0x5698df=_0x3e00a5['status']==='completed'||_0x3e00a5['status']==='failed'||_0x3e00a5['status']==='interrupted',_0x53782b=_0x3e00a5['containerState']==='running',_0x848bdc=_0x3e00a5['approvedBy']!==undefined&&_0x3e00a5['approvedBy']!==null;if(_0x848bdc){const _0x397e8b=_0x3e00a5['approvedBy']['name']||_0x3e00a5['approvedBy']['username']||'user';return{'canApprove':![],'reason':'Already\x20approved\x20by\x20'+_0x397e8b};}if(!_0x5d6c24)return{'canApprove':![],'reason':'No\x20changes\x20to\x20approve'};if(!_0x5698df)return{'canApprove':![],'reason':'Task\x20must\x20complete\x20first'};if(!_0x3e00a5['containerId'])return{'canApprove':![],'reason':'Container\x20no\x20longer\x20available'};if(!_0x53782b)return{'canApprove':![],'reason':'Container\x20is\x20not\x20running'};return{'canApprove':!![],'reason':'Ready\x20to\x20approve'};}
1
+ function isLogOnlyTaskType(_0x2a307b){return _0x2a307b==='test'||_0x2a307b==='deploy';}export function createApproveDialogHTML(_0x2474be='',_0x20ec35={}){const _0x40cb1b=_0x2474be,_0x40f062=_0x20ec35['useTaskPageStyles']?'modal\x20profound-approve-modal':'profound-feedback-modal\x20profound-approve-modal',_0x23db7e=_0x20ec35['useTaskPageStyles']?'modal-warning':'approve-modal-warning',_0x5cea5a=_0x20ec35['useTaskPageStyles']?'modal-error':'approve-modal-error';return'\x0a\x20\x20\x20\x20<div\x20id=\x22'+_0x40cb1b+'approve-modal\x22\x20class=\x22'+_0x40f062+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-overlay\x22></div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-content\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h2>Approve\x20Changes</h2>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22modal-close\x22\x20id=\x22'+_0x40cb1b+'close-approve-modal\x22>&times;</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-body\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x40cb1b+'approve-warning\x22\x20class=\x22'+_0x23db7e+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22warning-icon\x22>!</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x40cb1b+'approve-warning-text\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x40cb1b+'approve-error\x22\x20class=\x22'+_0x5cea5a+'\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22error-icon\x22>!</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x40cb1b+'approve-error-text\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x40cb1b+'conflict-resolution\x22\x20class=\x22conflict-resolution-panel\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22conflict-resolution-message\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22warning-icon\x22>!</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Remote\x20has\x20conflicting\x20changes\x20that\x20couldn\x27t\x20be\x20merged\x20automatically.</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22conflict-resolution-options\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-primary\x20btn-small\x22\x20id=\x22'+_0x40cb1b+'conflict-agent-resolve\x22>Let\x20the\x20agent\x20resolve\x20conflicts</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22>The\x20agent\x20will\x20pull\x20remote\x20changes,\x20resolve\x20conflicts,\x20and\x20prepare\x20for\x20re-approval.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-secondary\x20btn-small\x22\x20id=\x22'+_0x40cb1b+'conflict-new-branch\x22>Create\x20a\x20new\x20branch\x20instead</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22>Avoids\x20the\x20conflict\x20by\x20committing\x20to\x20a\x20separate\x20branch.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-secondary\x20btn-small\x22\x20id=\x22'+_0x40cb1b+'conflict-cancel\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-info\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x40cb1b+'approve-repo-name\x22\x20class=\x22modal-repo\x22>Repository</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20id=\x22'+_0x40cb1b+'approve-stats\x22\x20class=\x22modal-stats\x22>0\x20files\x20changed</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x40cb1b+'approve-branches\x22\x20class=\x22modal-branches\x22\x20hidden></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x40cb1b+'commit-message-input\x22>Commit\x20message:</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<textarea\x20id=\x22'+_0x40cb1b+'commit-message-input\x22\x20class=\x22commit-message-input\x22\x20rows=\x226\x22\x20placeholder=\x22Enter\x20commit\x20message...\x22></textarea>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20id=\x22'+_0x40cb1b+'multi-repo-note\x22\x20class=\x22field-hint\x22\x20hidden>This\x20commit\x20message\x20will\x20be\x20used\x20for\x20all\x20repositories\x20listed\x20above.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x40cb1b+'pull-before-commit\x22\x20checked>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Pull\x20from\x20remote\x20after\x20commit</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x40cb1b+'push-after-commit\x22\x20checked>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Push\x20to\x20remote\x20after\x20commit</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-section\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x40cb1b+'create-new-branch\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Create\x20new\x20branch</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x40cb1b+'new-branch-input-container\x22\x20class=\x22new-branch-container\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x40cb1b+'new-branch-name\x22\x20class=\x22new-branch-input\x22\x20placeholder=\x22Enter\x20new\x20branch\x20name...\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22>A\x20new\x20branch\x20will\x20be\x20created\x20from\x20the\x20current\x20branch\x20before\x20committing.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x40cb1b+'pr-option-section\x22\x20class=\x22modal-section\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x40cb1b+'create-pull-request\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Create\x20pull\x20request</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p\x20class=\x22field-hint\x22\x20id=\x22'+_0x40cb1b+'pr-hint\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20A\x20new\x20branch\x20will\x20be\x20created,\x20pushed,\x20and\x20a\x20pull\x20request\x20opened.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x40cb1b+'ibmi-sync-section\x22\x20class=\x22modal-section\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22approve-divider\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20class=\x22checkbox-label\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22checkbox\x22\x20id=\x22'+_0x40cb1b+'sync-to-ibmi\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span>Sync\x20to\x20IBM\x20i</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x40cb1b+'ibmi-sync-fields\x22\x20class=\x22new-branch-container\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x40cb1b+'ibmi-sync-library\x22>Library\x20name</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x40cb1b+'ibmi-sync-library\x22\x20class=\x22new-branch-input\x20code-font\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20maxlength=\x2210\x22\x20placeholder=\x22e.g.,\x20MYLIB\x22\x20style=\x22width:\x20160px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x40cb1b+'ibmi-sync-credentials-row\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x40cb1b+'ibmi-sync-user\x22\x20style=\x22margin-top:\x208px;\x20display:\x20block;\x22>User\x20profile</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22text\x22\x20id=\x22'+_0x40cb1b+'ibmi-sync-user\x22\x20class=\x22new-branch-input\x20code-font\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20maxlength=\x2210\x22\x20placeholder=\x22e.g.,\x20MYUSER\x22\x20style=\x22width:\x20160px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20for=\x22'+_0x40cb1b+'ibmi-sync-password\x22\x20style=\x22margin-top:\x208px;\x20display:\x20block;\x22>Password</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<input\x20type=\x22password\x22\x20id=\x22'+_0x40cb1b+'ibmi-sync-password\x22\x20class=\x22new-branch-input\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20placeholder=\x22Enter\x20password\x22\x20style=\x22width:\x20160px;\x22\x20autocomplete=\x22off\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x40cb1b+'ibmi-sync-files-section\x22\x20style=\x22margin-top:\x2010px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<label\x20style=\x22display:\x20block;\x20margin-bottom:\x204px;\x22>Files\x20to\x20sync</label>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20id=\x22'+_0x40cb1b+'ibmi-sync-file-tree\x22\x20class=\x22file-selection-tree-container\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20style=\x22max-height:\x20250px;\x20overflow-y:\x20auto;\x20border:\x201px\x20solid\x20var(--border-color,\x20var(--color-border));\x20border-radius:\x204px;\x20padding:\x208px;\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-selection-summary\x22\x20id=\x22'+_0x40cb1b+'ibmi-sync-files-summary\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22modal-footer\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-ghost\x22\x20id=\x22'+_0x40cb1b+'cancel-approve\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22btn-primary\x22\x20id=\x22'+_0x40cb1b+'confirm-approve\x22>Commit\x20Changes</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20</div>\x0a\x20\x20';}export class ApproveDialog{constructor(_0x575e24={}){this['prefix']=_0x575e24['prefix']||'',this['onApprove']=_0x575e24['onApprove'],this['onSync']=_0x575e24['onSync'],this['onSuccess']=_0x575e24['onSuccess'],this['onError']=_0x575e24['onError'],this['onCreatePR']=_0x575e24['onCreatePR'],this['showToast']=_0x575e24['showToast']||(()=>{}),this['container']=_0x575e24['container']||document['body'],this['useTaskPageStyles']=_0x575e24['useTaskPageStyles']||![],this['baseUrl']=_0x575e24['baseUrl']||'',this['coderflowAttribution']=_0x575e24['coderflowAttribution'],this['onConflictFollowUp']=_0x575e24['onConflictFollowUp']||null,this['onSyncToIbmi']=_0x575e24['onSyncToIbmi']||null,this['onGetSyncFiles']=_0x575e24['onGetSyncFiles']||null,this['taskData']=null,this['initialized']=![],this['isSyncing']=![],this['_createPR']=![],this['_attributionRequestId']=0x0,this['_syncFileTree']=null,this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null,this['_transientWarning']='';}['init'](){if(this['initialized'])return;const _0x43a38a=document['createElement']('div');_0x43a38a['innerHTML']=createApproveDialogHTML(this['prefix'],{'useTaskPageStyles':this['useTaskPageStyles']}),this['container']['appendChild'](_0x43a38a['firstElementChild']),this['_bindEvents'](),this['initialized']=!![];}['_el'](_0x4f1206){return document['getElementById'](''+this['prefix']+_0x4f1206);}['_bindEvents'](){const _0x253dff=this['_el']('approve-modal'),_0x2a6391=this['_el']('close-approve-modal'),_0x2cb249=this['_el']('cancel-approve'),_0x75e719=this['_el']('confirm-approve'),_0x4cf7d5=_0x253dff?.['querySelector']('.modal-overlay'),_0x39bb30=this['_el']('pull-before-commit'),_0x28e79f=this['_el']('create-new-branch'),_0x2fc5af=this['_el']('new-branch-input-container'),_0x542fda=this['_el']('new-branch-name'),_0x200bb2=this['_el']('push-after-commit'),_0x475483=this['_el']('create-pull-request'),_0x22aef9=this['_el']('pr-hint'),_0x3fdacf=()=>{this['_refreshWarningBanner']();};_0x2a6391?.['addEventListener']('click',()=>this['hide']()),_0x2cb249?.['addEventListener']('click',()=>this['hide']()),_0x4cf7d5?.['addEventListener']('click',()=>this['hide']()),_0x75e719?.['addEventListener']('click',()=>this['_handleApprove']());_0x28e79f&&_0x28e79f['addEventListener']('change',()=>{_0x2fc5af&&(_0x2fc5af['hidden']=!_0x28e79f['checked']),_0x28e79f['checked']&&_0x542fda&&_0x542fda['focus'](),_0x3fdacf();});_0x39bb30?.['addEventListener']('change',()=>{_0x3fdacf();});_0x475483&&_0x200bb2&&_0x28e79f&&(_0x475483['addEventListener']('change',()=>{this['_createPR']=_0x475483['checked'];if(_0x475483['checked']){_0x200bb2['checked']=!![],_0x200bb2['disabled']=!![],_0x28e79f['checked']=!![],_0x28e79f['disabled']=!![];_0x2fc5af&&(_0x2fc5af['hidden']=![]);if(_0x22aef9)_0x22aef9['hidden']=![];}else{_0x200bb2['disabled']=![],_0x28e79f['disabled']=![];if(_0x22aef9)_0x22aef9['hidden']=!![];}_0x3fdacf();}),_0x200bb2['addEventListener']('change',()=>{if(!_0x200bb2['checked']&&_0x475483['checked']){_0x475483['checked']=![],this['_createPR']=![],_0x200bb2['disabled']=![],_0x28e79f['disabled']=![];if(_0x22aef9)_0x22aef9['hidden']=!![];}}));_0x3fdacf();const _0x2d2902=this['_el']('sync-to-ibmi');_0x2d2902&&_0x2d2902['addEventListener']('change',async _0x2b0779=>{const _0x2a4266=this['_el']('ibmi-sync-fields');if(_0x2a4266)_0x2a4266['hidden']=!_0x2b0779['target']['checked'];if(_0x2b0779['target']['checked']){const _0x2cd2dc=this['_el']('ibmi-sync-library'),_0x59df02=localStorage['getItem']('coderflow_ibmi_sync_library');_0x59df02&&_0x2cd2dc&&!_0x2cd2dc['value']&&(_0x2cd2dc['value']=_0x59df02);const _0x2bbbeb=this['_el']('ibmi-sync-user');if(_0x2bbbeb&&!_0x2bbbeb['value']){const _0x1d0db0=localStorage['getItem']('coderflow_ibmi_sync_user');if(_0x1d0db0)_0x2bbbeb['value']=_0x1d0db0;}const _0x1bc438=this['_el']('ibmi-sync-password');if(_0x1bc438)_0x1bc438['value']='';!this['_syncFileTree']&&this['onGetSyncFiles']&&this['taskData']?.['taskId']&&await this['_loadSyncFileTree']();}}),this['_el']('conflict-agent-resolve')?.['addEventListener']('click',()=>{this['onConflictFollowUp']&&this['onConflictFollowUp'](this['taskData']['taskId']),this['hide'](),this['showToast']('Agent\x20is\x20resolving\x20conflicts.\x20Re-approve\x20when\x20it\x20finishes.','info');}),this['_el']('conflict-new-branch')?.['addEventListener']('click',()=>{this['_hideConflictResolution']();const _0x184c17=this['_el']('create-new-branch'),_0x55469b=this['_el']('new-branch-input-container'),_0x1b26c4=this['_el']('new-branch-name');if(_0x184c17)_0x184c17['checked']=!![];if(_0x55469b)_0x55469b['hidden']=![];if(_0x1b26c4)_0x1b26c4['focus']();_0x3fdacf();}),this['_el']('conflict-cancel')?.['addEventListener']('click',()=>this['hide']()),document['addEventListener']('keydown',_0x116ef4=>{_0x116ef4['key']==='Escape'&&_0x253dff&&!_0x253dff['hidden']&&this['hide']();});}async['_loadSyncFileTree'](){const _0x221076=this['_el']('ibmi-sync-file-tree'),_0x4f4a1d=this['_el']('ibmi-sync-files-summary');if(!_0x221076)return;_0x221076['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>Loading\x20files...</span>';if(_0x4f4a1d)_0x4f4a1d['textContent']='';try{const {files:_0x47ac2a,absolutePaths:_0x3fedaf}=await this['onGetSyncFiles'](this['taskData']['taskId']);this['_syncRelativeFiles']=_0x47ac2a,this['_syncAbsolutePaths']=_0x3fedaf;if(_0x47ac2a['length']===0x0){_0x221076['innerHTML']='<span\x20style=\x22color:\x20var(--color-text-muted,\x20#888);\x20font-size:\x2013px;\x22>No\x20changed\x20files\x20found.</span>';return;}const {FileSelectionTree:_0x4a66c1}=await import('./file-selection-tree.js'),{validateIbmiFile:_0x117dcd,hasKnownIbmiExtension:_0x35a1fe}=await import('./ibmi-file-filter.js');this['_syncFileTree']=new _0x4a66c1({'container':_0x221076,'files':_0x47ac2a,'isPreselected':_0x8c110a=>{const {valid:_0x395529}=_0x117dcd(_0x8c110a);return _0x395529&&_0x35a1fe(_0x8c110a);},'isDisabled':_0x29302a=>{const {valid:_0x5b3592,reason:_0x5437b6}=_0x117dcd(_0x29302a);return{'disabled':!_0x5b3592,'reason':_0x5437b6};},'isAutoCheckEligible':_0x51871f=>{const {valid:_0x493e00}=_0x117dcd(_0x51871f);return _0x493e00&&_0x35a1fe(_0x51871f);},'onChange':_0x40a008=>{_0x4f4a1d&&(_0x4f4a1d['textContent']=_0x40a008['length']+'\x20of\x20'+_0x47ac2a['length']+'\x20file'+(_0x47ac2a['length']!==0x1?'s':'')+'\x20selected');}}),this['_syncFileTree']['render']();}catch(_0x2a802b){_0x221076['innerHTML']='<span\x20style=\x22color:\x20var(--color-danger,\x20#e55368);\x20font-size:\x2013px;\x22>Failed\x20to\x20load\x20files</span>';}}['showError'](_0x127c83){const _0x54c1be=this['_el']('approve-error'),_0x11da53=this['_el']('approve-error-text');_0x54c1be&&_0x11da53&&(_0x11da53['textContent']=_0x127c83,_0x54c1be['hidden']=![],_0x54c1be['scrollIntoView']({'behavior':'smooth','block':'nearest'}));}['hideError'](){const _0x5960c1=this['_el']('approve-error'),_0x39a0be=this['_el']('approve-error-text');_0x5960c1&&_0x39a0be&&(_0x5960c1['hidden']=!![],_0x39a0be['textContent']='');}['_displayBranchInfo'](_0x2a6a99,_0x513719={}){const _0x3b8ec3=this['_el']('approve-branches');if(!_0x3b8ec3)return;const _0x59612f=[];for(const _0x3a3a17 of _0x2a6a99){_0x513719[_0x3a3a17['name']]&&_0x59612f['push']({'repo':_0x3a3a17['name'],'branch':_0x513719[_0x3a3a17['name']]});}if(_0x59612f['length']>0x0){_0x3b8ec3['hidden']=![];if(_0x59612f['length']===0x1)_0x3b8ec3['innerHTML']='<div\x20class=\x22branch-info\x22>Branch:\x20<code>'+_0x59612f[0x0]['branch']+'</code></div>';else{const _0x2a7740=_0x59612f['map'](_0x535d2e=>'<div\x20class=\x22branch-item\x22><strong>'+_0x535d2e['repo']+':</strong>\x20<code>'+_0x535d2e['branch']+'</code></div>')['join']('');_0x3b8ec3['innerHTML']='<div\x20class=\x22branch-info\x22>Branches:<div\x20class=\x22branch-list\x22>'+_0x2a7740+'</div></div>';}}else _0x3b8ec3['hidden']=!![],_0x3b8ec3['innerHTML']='';}['showWarning'](_0x3e220f){const _0x91a066=this['_el']('approve-warning'),_0x359639=this['_el']('approve-warning-text');_0x91a066&&_0x359639&&(_0x359639['textContent']=_0x3e220f,_0x91a066['hidden']=![]);}['hideWarning'](){const _0x2b346a=this['_el']('approve-warning'),_0x52fa38=this['_el']('approve-warning-text');_0x2b346a&&_0x52fa38&&(_0x2b346a['hidden']=!![],_0x52fa38['textContent']='');}['_showConflictResolution'](){const _0x3877b1=this['_el']('conflict-resolution'),_0x4d4899=this['_el']('confirm-approve'),_0x211411=this['_el']('cancel-approve'),_0x14399c=this['_el']('conflict-agent-resolve');if(_0x3877b1)_0x3877b1['hidden']=![];if(_0x4d4899)_0x4d4899['hidden']=!![];if(_0x211411)_0x211411['hidden']=!![];const _0x34bd67=this['_el']('approve-modal');if(_0x34bd67){this['_sectionsHiddenBeforeConflict']=new Set();for(const _0x3cc5cb of _0x34bd67['querySelectorAll']('.modal-section')){_0x3cc5cb['hidden']&&this['_sectionsHiddenBeforeConflict']['add'](_0x3cc5cb),_0x3cc5cb['hidden']=!![];}}if(_0x14399c){const _0x2f528d=!!this['onConflictFollowUp'];_0x14399c['hidden']=!_0x2f528d,_0x14399c['nextElementSibling']?.['classList']['contains']('field-hint')&&(_0x14399c['nextElementSibling']['hidden']=!_0x2f528d);}}['_hideConflictResolution'](){const _0x3136bd=this['_el']('conflict-resolution'),_0x1bed5f=this['_el']('confirm-approve'),_0x1a0395=this['_el']('cancel-approve');if(_0x3136bd)_0x3136bd['hidden']=!![];if(_0x1bed5f)_0x1bed5f['hidden']=![];if(_0x1a0395)_0x1a0395['hidden']=![];const _0x57969e=this['_el']('approve-modal');if(_0x57969e){const _0x496634=this['_sectionsHiddenBeforeConflict']||new Set();for(const _0x185fd9 of _0x57969e['querySelectorAll']('.modal-section')){!_0x496634['has'](_0x185fd9)&&(_0x185fd9['hidden']=![]);}this['_sectionsHiddenBeforeConflict']=null;}}['_getRemoteConflictWarning'](){const _0x2f99cf=this['taskData']?.['reposChanged']||[],_0x5cebc0=this['_el']('pull-before-commit')?.['checked']??!![],_0x1f1033=this['_el']('create-new-branch')?.['checked']||![];if(!_0x5cebc0||_0x1f1033||_0x2f99cf['length']===0x0)return'';const _0x29a845=_0x2f99cf['filter'](_0x177da1=>_0x177da1?.['upstream_status']==='behind'||_0x177da1?.['upstream_status']==='diverged');if(_0x29a845['length']===0x0)return'';const _0x27adfb=_0x29a845['map'](_0x50e3d6=>{const _0x293e1e=Number(_0x50e3d6?.['upstream_behind'])||0x0,_0x3a4540=_0x293e1e+'\x20commit'+(_0x293e1e===0x1?'':'s')+'\x20ahead';if(_0x50e3d6['upstream_status']==='diverged')return _0x50e3d6['name']+':\x20remote\x20is\x20'+_0x3a4540+'\x20and\x20the\x20tracked\x20branch\x20has\x20local\x20commits';return _0x50e3d6['name']+':\x20remote\x20is\x20'+_0x3a4540;})['join'](';\x20');return'Remote\x20has\x20new\x20changes\x20('+_0x27adfb+').\x20If\x20there\x20are\x20conflicts,\x20you\x27ll\x20be\x20given\x20options\x20to\x20resolve\x20them.';}['_refreshWarningBanner'](){const _0x4b4388=[this['taskData']?.['warning']||'',this['_getRemoteConflictWarning'](),this['_transientWarning']||'']['filter'](Boolean);if(_0x4b4388['length']>0x0){this['showWarning'](_0x4b4388['join']('\x20'));return;}this['hideWarning']();}['_stripCoAuthoredByLines'](_0x21bd0a){return _0x21bd0a['replace'](/^Co-Authored-By:.*$/gmi,'')['replace'](/^Learn more: https:\/\/coderflow\.ai\s*$/gm,'')['replace'](/\n{3,}/g,'\x0a\x0a')['trim']();}async['_addAttributionIfEnabled'](_0x3ef47e){try{let _0x21a68a;try{const _0x221879=await fetch(this['baseUrl']+'/settings');if(_0x221879['ok']){const _0x5cf182=await _0x221879['json']();_0x21a68a=_0x5cf182['coderflow_attribution']!==![];}}catch(_0x1ebf82){}_0x21a68a===undefined&&(this['coderflowAttribution']!==undefined?_0x21a68a=this['coderflowAttribution']!==![]:_0x21a68a=!![]);const _0x27db48=this['_stripCoAuthoredByLines'](_0x3ef47e);if(!_0x21a68a)return _0x27db48;const _0x5214d5='\x0a\x0aCo-Authored-By:\x20CoderFlow\x20<ai@coderflow.ai>\x0aLearn\x20more:\x20https://coderflow.ai';return _0x27db48+_0x5214d5;}catch(_0x17e6f3){return console['warn']('Failed\x20to\x20add\x20CoderFlow\x20attribution:',_0x17e6f3),_0x3ef47e;}}['show'](_0x5909e5){!this['initialized']&&this['init']();this['taskData']=_0x5909e5;const _0x4a2c1f=this['_el']('approve-modal'),_0x544032=this['_el']('commit-message-input'),_0x5891a4=this['_el']('pull-before-commit'),_0x448dd1=this['_el']('push-after-commit'),_0x1dc8dd=this['_el']('create-new-branch'),_0x53b334=this['_el']('new-branch-input-container'),_0x493e0d=this['_el']('new-branch-name');if(!_0x4a2c1f)return;this['hideError'](),this['hideWarning'](),this['_hideConflictResolution'](),this['_transientWarning']='';const _0x1e85eb=_0x5909e5['reposChanged']||[];if(_0x1e85eb['length']===0x0&&!_0x5909e5['syncFirst']){this['showToast']('No\x20changes\x20to\x20approve','error');return;}this['_updateDisplay'](_0x1e85eb,_0x5909e5);const _0x2bf374=_0x5909e5['commitMessage']||'',_0x3548af=this['_stripCoAuthoredByLines'](_0x2bf374);_0x544032['value']=_0x3548af;if(_0x5891a4)_0x5891a4['checked']=!![];if(_0x448dd1)_0x448dd1['checked']=!![];_0x1dc8dd&&(_0x1dc8dd['checked']=![]);_0x53b334&&(_0x53b334['hidden']=!![]);_0x493e0d&&(_0x493e0d['value']='');if(_0x448dd1)_0x448dd1['disabled']=![];if(_0x1dc8dd)_0x1dc8dd['disabled']=![];this['_refreshWarningBanner'](),this['updatePRSupport'](_0x5909e5['prSupported']===!![]);const _0x9934bf=this['_el']('ibmi-sync-section');if(_0x9934bf){_0x9934bf['hidden']=!_0x5909e5['ibmiSyncAvailable'];const _0x489449=this['_el']('sync-to-ibmi'),_0x6d0f63=this['_el']('ibmi-sync-fields'),_0x14afbd=this['_el']('ibmi-sync-library');if(_0x489449)_0x489449['checked']=![];if(_0x6d0f63)_0x6d0f63['hidden']=!![];if(_0x14afbd)_0x14afbd['value']='';const _0x5e0f15=this['_el']('ibmi-sync-credentials-row');_0x5e0f15&&(_0x5e0f15['hidden']=!(_0x5909e5['ibmiSyncAvailable']&&_0x5909e5['syncCredentials']==='prompt'));}const _0x3a9e51=this['_el']('confirm-approve');_0x5909e5['syncFirst']&&this['onSync']?(_0x3a9e51&&(_0x3a9e51['disabled']=!![],_0x3a9e51['textContent']='Syncing...'),this['_performSync']()):_0x3a9e51&&(_0x3a9e51['disabled']=![],_0x3a9e51['textContent']='Commit\x20Changes');_0x4a2c1f['hidden']=![];const _0xb5f40e=++this['_attributionRequestId'];void this['_applyAttributionAsync']({'requestId':_0xb5f40e,'taskId':_0x5909e5['taskId'],'originalCommitMessage':_0x3548af}),setTimeout(()=>{_0x544032['focus'](),_0x544032['setSelectionRange'](0x0,_0x544032['value']['length']);},0x64);}['updatePRSupport'](_0x5d6703){const _0x5e5781=this['_el']('pr-option-section'),_0xdb6397=this['_el']('create-pull-request'),_0x309aa8=this['_el']('pr-hint'),_0x2bbac3=this['_el']('push-after-commit'),_0x4273c9=this['_el']('create-new-branch');if(!_0x5e5781)return;if(_0x5d6703){_0x5e5781['hidden']=![];_0xdb6397&&!_0xdb6397['disabled']&&(_0xdb6397['checked']=![]);if(_0x309aa8)_0x309aa8['hidden']=!![];this['_createPR']=![];return;}_0xdb6397?.['checked']&&(_0xdb6397['checked']=![]);if(_0x309aa8)_0x309aa8['hidden']=!![];if(_0x2bbac3)_0x2bbac3['disabled']=![];if(_0x4273c9)_0x4273c9['disabled']=![];this['_createPR']=![],_0x5e5781['hidden']=!![];}async['_applyAttributionAsync']({requestId:_0x3da69d,taskId:_0x3531d3,originalCommitMessage:_0x5bcd98}){const _0x27746a=this['_el']('commit-message-input');if(!_0x27746a)return;const _0x513ab8=await this['_addAttributionIfEnabled'](_0x5bcd98);if(_0x3da69d!==this['_attributionRequestId'])return;if(!this['taskData']||this['taskData']['taskId']!==_0x3531d3)return;if(!this['isVisible']())return;const _0x187c39=_0x40f25d=>_0x40f25d['replace'](/\r\n/g,'\x0a')['replace'](/\r/g,'\x0a');if(_0x187c39(_0x27746a['value'])!==_0x187c39(_0x5bcd98))return;_0x27746a['value']=_0x513ab8;}['_updateDisplay'](_0x25e975,_0x2e6fe0){const _0x4e1252=this['_el']('approve-repo-name'),_0x35ebbf=this['_el']('approve-stats'),_0x16fd73=this['_el']('multi-repo-note');if(_0x25e975['length']===0x0){if(_0x4e1252)_0x4e1252['textContent']='Syncing...';if(_0x35ebbf)_0x35ebbf['textContent']='';if(_0x16fd73)_0x16fd73['hidden']=!![];return;}const _0x1be1cf=_0x25e975['reduce']((_0x7a8d9b,_0xc5dfa4)=>_0x7a8d9b+(_0xc5dfa4['files_changed']||0x0),0x0),_0x9478dc=_0x25e975['reduce']((_0x29f3ac,_0x5319ef)=>_0x29f3ac+(_0x5319ef['lines_added']||0x0),0x0),_0x5f2c1b=_0x25e975['reduce']((_0x5aa46b,_0x3cf6bd)=>_0x5aa46b+(_0x3cf6bd['lines_deleted']||0x0),0x0);if(_0x25e975['length']===0x1){if(_0x4e1252)_0x4e1252['textContent']=_0x25e975[0x0]?.['name']||'repository';if(_0x16fd73)_0x16fd73['hidden']=!![];}else{const _0x30a516=_0x25e975['map'](_0x228fd1=>_0x228fd1['name'])['join'](',\x20');if(_0x4e1252)_0x4e1252['textContent']=_0x25e975['length']+'\x20repositories:\x20'+_0x30a516;if(_0x16fd73)_0x16fd73['hidden']=![];}_0x35ebbf&&(_0x35ebbf['textContent']=_0x1be1cf+'\x20file'+(_0x1be1cf===0x1?'':'s')+'\x20changed\x20(+'+_0x9478dc+'\x20-'+_0x5f2c1b+')'),this['_displayBranchInfo'](_0x25e975,_0x2e6fe0?.['branches']||{});}async['_performSync'](){if(!this['onSync']||this['isSyncing'])return;this['isSyncing']=!![];const _0x488a75=this['_el']('confirm-approve');try{const _0x5c7836=await this['onSync'](this['taskData']['taskId']);if(!this['isVisible']()){this['isSyncing']=![];return;}if(_0x5c7836['repos_changed']){const _0x1891fa=this['taskData']['reposChanged']?.['length']||0x0,_0x3d52c2=this['taskData']['reposChanged']?.['reduce']((_0x23ccde,_0x456d0c)=>_0x23ccde+(_0x456d0c['files_changed']||0x0),0x0)||0x0;this['taskData']['reposChanged']=_0x5c7836['repos_changed'];if(_0x5c7836['current_branches']){const _0x33048f={...this['taskData']['branches']||{}};for(const [_0x4a3dbb,_0x3499f9]of Object['entries'](_0x5c7836['current_branches'])){_0x3499f9?_0x33048f[_0x4a3dbb]=_0x3499f9:delete _0x33048f[_0x4a3dbb];}this['taskData']['branches']=_0x33048f;}this['_updateDisplay'](_0x5c7836['repos_changed'],this['taskData']);const _0x13fbb5=_0x5c7836['repos_changed']['length'],_0x52f3b9=_0x5c7836['repos_changed']['reduce']((_0x33eb8a,_0x2ebabd)=>_0x33eb8a+(_0x2ebabd['files_changed']||0x0),0x0);(_0x52f3b9>_0x3d52c2||_0x13fbb5>_0x1891fa)&&(this['_transientWarning']='Additional\x20changes\x20detected\x20since\x20last\x20sync.\x20Review\x20the\x20updated\x20file\x20list.'),this['_refreshWarningBanner']();}_0x488a75&&(!this['taskData']['reposChanged']||this['taskData']['reposChanged']['length']===0x0?(_0x488a75['disabled']=!![],_0x488a75['textContent']='No\x20Changes',this['showError']('No\x20changes\x20to\x20approve\x20after\x20sync')):(_0x488a75['disabled']=![],_0x488a75['textContent']='Commit\x20Changes'));}catch(_0x58df4c){console['error']('Failed\x20to\x20sync\x20repos\x20before\x20approve:',_0x58df4c);if(!this['isVisible']()){this['isSyncing']=![];return;}this['showError']('Sync\x20failed:\x20'+_0x58df4c['message']+'.\x20You\x20can\x20still\x20commit\x20with\x20existing\x20staged\x20changes.'),_0x488a75&&(this['taskData']['reposChanged']&&this['taskData']['reposChanged']['length']>0x0?(_0x488a75['disabled']=![],_0x488a75['textContent']='Commit\x20Changes'):(_0x488a75['disabled']=!![],_0x488a75['textContent']='No\x20Changes'));}finally{this['isSyncing']=![];}}['hide'](){const _0x256b62=this['_el']('approve-modal');_0x256b62&&(_0x256b62['hidden']=!![]),this['_syncFileTree']&&(this['_syncFileTree']['destroy'](),this['_syncFileTree']=null),this['_syncRelativeFiles']=null,this['_syncAbsolutePaths']=null;}async['_handleApprove'](){const _0x1fa10f=this['_el']('commit-message-input'),_0x4fe129=this['_el']('pull-before-commit'),_0x3d5bc2=this['_el']('push-after-commit'),_0x48208a=this['_el']('create-new-branch'),_0x1b6268=this['_el']('new-branch-name'),_0xc15d85=this['_el']('confirm-approve'),_0x3d15f9=_0x1fa10f['value']['trim'](),_0x4c84e1=_0x4fe129?.['checked']??!![],_0x26c916=_0x3d5bc2?.['checked']??!![],_0x278548=_0x48208a?.['checked']||![],_0x41a1d1=_0x1b6268?.['value']['trim']()||'';this['hideError']();if(!_0x3d15f9){this['showError']('Commit\x20message\x20is\x20required'),_0x1fa10f['focus']();return;}if(_0x278548&&!_0x41a1d1){this['showError']('Branch\x20name\x20is\x20required\x20when\x20creating\x20a\x20new\x20branch'),_0x1b6268?.['focus']();return;}if(_0x278548&&_0x41a1d1){const _0xc7b9c2=/[\s~^:?*\[\\]/;if(_0xc7b9c2['test'](_0x41a1d1)){this['showError']('Invalid\x20branch\x20name.\x20Avoid\x20spaces\x20and\x20special\x20characters\x20like\x20~\x20^\x20:\x20?\x20*\x20[\x20\x5c'),_0x1b6268?.['focus']();return;}}const _0x55ea2c=this['_el']('sync-to-ibmi')?.['checked'];if(_0x55ea2c){const _0x33a1f1=this['_el']('ibmi-sync-library')?.['value']?.['trim']();if(!_0x33a1f1){this['showError']('IBM\x20i\x20library\x20name\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-library')?.['focus']();return;}if(this['_syncFileTree']){const _0x5996ae=this['_syncFileTree']['getSelectedFiles']();if(_0x5996ae['length']===0x0){this['showError']('Select\x20at\x20least\x20one\x20file\x20to\x20sync');return;}}if(this['taskData']?.['syncCredentials']==='prompt'){const _0x4080ed=this['_el']('ibmi-sync-user')?.['value']?.['trim']();if(!_0x4080ed){this['showError']('User\x20profile\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-user')?.['focus']();return;}const _0x32e466=this['_el']('ibmi-sync-password')?.['value'];if(!_0x32e466){this['showError']('Password\x20is\x20required\x20for\x20sync'),this['_el']('ibmi-sync-password')?.['focus']();return;}}}const _0xe4fdc3=_0xc15d85?.['textContent']||'Commit\x20Changes';_0xc15d85&&(_0xc15d85['disabled']=!![],_0x278548?_0xc15d85['textContent']='Creating\x20branch\x20&\x20committing...':_0xc15d85['textContent']=_0x4c84e1?'Pulling\x20&\x20Committing...':'Committing...');try{const _0x5b6a54={'commit_message':_0x3d15f9,'pull':_0x4c84e1,'push':_0x26c916,'conflict_strategy':'rebase'};_0x278548&&_0x41a1d1&&(_0x5b6a54['new_branch']=_0x41a1d1);let _0x54032a=null;this['onApprove']&&(_0x54032a=await this['onApprove'](this['taskData']['taskId'],_0x5b6a54));let _0x51dd34='Changes\x20committed';if(_0x278548)_0x51dd34='Changes\x20committed\x20to\x20new\x20branch\x20\x27'+_0x41a1d1+'\x27',_0x26c916&&(_0x51dd34+='\x20and\x20pushed');else{if(_0x4c84e1&&_0x26c916)_0x51dd34='Changes\x20pulled,\x20committed,\x20and\x20pushed';else{if(_0x4c84e1)_0x51dd34='Changes\x20pulled\x20and\x20committed';else _0x26c916&&(_0x51dd34='Changes\x20committed\x20and\x20pushed');}}const _0x4a2fc3=this['_el']('sync-to-ibmi')?.['checked'];let _0x3534a1=null,_0x311990=null,_0x27fdce=null,_0x74dff3=null;if(_0x4a2fc3&&this['onSyncToIbmi']){_0x3534a1=this['_el']('ibmi-sync-library')?.['value']?.['trim']()?.['toUpperCase'](),_0x311990=this['_el']('ibmi-sync-user')?.['value']?.['trim']()?.['toUpperCase']()||null,_0x27fdce=this['_el']('ibmi-sync-password')?.['value']||null;if(this['_syncFileTree']&&this['_syncRelativeFiles']&&this['_syncAbsolutePaths']){const _0x541b1d=this['_syncFileTree']['getSelectedFiles']();_0x74dff3=_0x541b1d['map'](_0x5978e4=>{const _0x588b62=this['_syncRelativeFiles']['indexOf'](_0x5978e4);return _0x588b62>=0x0?this['_syncAbsolutePaths'][_0x588b62]:_0x5978e4;});}}this['showToast'](_0x51dd34,'success'),this['hide']();if(this['_createPR']&&this['onCreatePR'])try{await this['onCreatePR'](this['taskData']['taskId'],_0x54032a||{});}catch(_0x5c5e0a){console['warn']('PR\x20creation\x20failed\x20or\x20cancelled:',_0x5c5e0a);}if(_0x4a2fc3&&this['onSyncToIbmi']&&_0x3534a1){localStorage['setItem']('coderflow_ibmi_sync_library',_0x3534a1);if(_0x311990)localStorage['setItem']('coderflow_ibmi_sync_user',_0x311990);try{await this['onSyncToIbmi'](this['taskData']['taskId'],_0x3534a1,_0x311990,_0x27fdce,_0x74dff3);}catch(_0x1d418d){this['showToast']('Sync\x20failed:\x20'+_0x1d418d['message'],'error');}}this['onSuccess']&&this['onSuccess'](this['taskData']);}catch(_0x50fca8){console['error']('Failed\x20to\x20approve\x20changes',_0x50fca8);if(_0x50fca8['hasConflicts'])this['_showConflictResolution']();else _0x50fca8['code']==='container_token_expired'?this['showError'](_0x50fca8['message']||'This\x20task\x27s\x20Git\x20credentials\x20have\x20expired.\x20Start\x20a\x20new\x20task\x20to\x20continue\x20making\x20changes.'):this['showError']('Failed\x20to\x20commit:\x20'+_0x50fca8['message']);_0xc15d85&&(_0xc15d85['disabled']=![],_0xc15d85['textContent']=_0xe4fdc3),this['onError']&&this['onError'](_0x50fca8);}}['isVisible'](){const _0x11ea00=this['_el']('approve-modal');return _0x11ea00&&!_0x11ea00['hidden'];}['destroy'](){const _0x56e353=this['_el']('approve-modal');_0x56e353&&_0x56e353['remove'](),this['initialized']=![];}}export function getApproveState(_0x320352,_0x590458){if(!_0x320352)return{'canApprove':![],'reason':'No\x20task\x20data'};if(isLogOnlyTaskType(_0x320352['taskType']))return{'canApprove':![],'reason':(_0x320352['taskType']==='test'?'Test':'Deploy')+'\x20tasks\x20cannot\x20be\x20approved'};const _0x5e10eb=_0x590458?.['repos_changed']?.['length']>0x0,_0xead12c=_0x320352['status']==='completed'||_0x320352['status']==='failed'||_0x320352['status']==='interrupted',_0x311886=_0x320352['containerState']==='running',_0x35e16f=_0x320352['approvedBy']!==undefined&&_0x320352['approvedBy']!==null;if(_0x35e16f){const _0x5eefdd=_0x320352['approvedBy']['name']||_0x320352['approvedBy']['username']||'user';return{'canApprove':![],'reason':'Already\x20approved\x20by\x20'+_0x5eefdd};}if(!_0x5e10eb)return{'canApprove':![],'reason':'No\x20changes\x20to\x20approve'};if(!_0xead12c)return{'canApprove':![],'reason':'Task\x20must\x20complete\x20first'};if(!_0x320352['containerId'])return{'canApprove':![],'reason':'Container\x20no\x20longer\x20available'};if(!_0x311886)return{'canApprove':![],'reason':'Container\x20is\x20not\x20running'};return{'canApprove':!![],'reason':'Ready\x20to\x20approve'};}
@@ -1 +1 @@
1
- export function buildAutomationEnvironmentHref(_0x305f2e,_0x4e2882){const _0x35bdd5=new URLSearchParams();_0x305f2e&&_0x35bdd5['set']('env',String(_0x305f2e));_0x35bdd5['set']('tab','automations');_0x4e2882&&_0x35bdd5['set']('automation',String(_0x4e2882));const _0x45cb8a=_0x35bdd5['toString']();return'environments.html'+(_0x45cb8a?'?'+_0x45cb8a:'');}export function buildAutomationTaskFilterHref(_0x3f5843){const _0x58bec4=new URLSearchParams();_0x3f5843&&_0x58bec4['set']('automation',String(_0x3f5843));const _0x5af196=_0x58bec4['toString']();return'index.html'+(_0x5af196?'?'+_0x5af196:'');}export function buildAutomationDeploymentHistoryHref(_0x288102,_0x1c35e5,_0x32146e=null){const _0x1b239f=new URLSearchParams();_0x288102&&_0x1b239f['set']('env',String(_0x288102));_0x1b239f['set']('tab','deploy');_0x1c35e5&&_0x1b239f['set']('profile',String(_0x1c35e5));_0x32146e&&_0x1b239f['set']('deployment',String(_0x32146e));const _0x47a67a=_0x1b239f['toString']();return'environments.html'+(_0x47a67a?'?'+_0x47a67a:'');}export function parseAutomationDeepLinkParams(_0xb436a0=''){const _0xd20271=new URLSearchParams(_0xb436a0||''),_0x2d0818={'env':_0xd20271['get']('env'),'tab':_0xd20271['get']('tab'),'automation':_0xd20271['get']('automation')},_0x522d59=_0xd20271['get']('profile'),_0x406be8=_0xd20271['get']('deployment');return _0x522d59!==null&&(_0x2d0818['profile']=_0x522d59),_0x406be8!==null&&(_0x2d0818['deployment']=_0x406be8),_0x2d0818;}
1
+ export function buildAutomationEnvironmentHref(_0x1098fd,_0x17a518){const _0x48cc15=new URLSearchParams();_0x1098fd&&_0x48cc15['set']('env',String(_0x1098fd));_0x48cc15['set']('tab','automations');_0x17a518&&_0x48cc15['set']('automation',String(_0x17a518));const _0x50800e=_0x48cc15['toString']();return'environments.html'+(_0x50800e?'?'+_0x50800e:'');}export function buildAutomationTaskFilterHref(_0x11b898){const _0x328a8e=new URLSearchParams();_0x11b898&&_0x328a8e['set']('automation',String(_0x11b898));const _0x387661=_0x328a8e['toString']();return'index.html'+(_0x387661?'?'+_0x387661:'');}export function buildAutomationDeploymentHistoryHref(_0xa61cb4,_0x3da307,_0x329519=null){const _0x126cad=new URLSearchParams();_0xa61cb4&&_0x126cad['set']('env',String(_0xa61cb4));_0x126cad['set']('tab','deploy');_0x3da307&&_0x126cad['set']('profile',String(_0x3da307));_0x329519&&_0x126cad['set']('deployment',String(_0x329519));const _0x467b12=_0x126cad['toString']();return'environments.html'+(_0x467b12?'?'+_0x467b12:'');}export function parseAutomationDeepLinkParams(_0x222142=''){const _0x41a1cd=new URLSearchParams(_0x222142||''),_0x173fea={'env':_0x41a1cd['get']('env'),'tab':_0x41a1cd['get']('tab'),'automation':_0x41a1cd['get']('automation')},_0xaaff13=_0x41a1cd['get']('profile'),_0x42e2a7=_0x41a1cd['get']('deployment');return _0xaaff13!==null&&(_0x173fea['profile']=_0xaaff13),_0x42e2a7!==null&&(_0x173fea['deployment']=_0x42e2a7),_0x173fea;}
@@ -1 +1 @@
1
- export const AUTOMATION_MONTHLY_DAY_MIN=0x1;export const AUTOMATION_MONTHLY_DAY_MAX=0x1c;const DEFAULT_SCHEDULE_FORM_STATE=Object['freeze']({'frequency':'daily','dailyHour':'2','dailyMinute':'0','weeklyDay':'1','weeklyHour':'9','weeklyMinute':'0','monthlyDay':'1','monthlyHour':'0','monthlyMinute':'0','recurringInterval':'*/30\x20*\x20*\x20*\x20*','recurringStartHour':'','recurringEndHour':'','recurringDayToken':'*','customCron':''}),RECURRING_INTERVAL_STEPS=['2','4','6','8','12'];function createDefaultScheduleFormState(){return{...DEFAULT_SCHEDULE_FORM_STATE};}function parseBoundedInteger(_0x5499e3,_0x3769ca,_0x113ada){const _0x37220b=Number['parseInt'](_0x5499e3,0xa);if(!Number['isInteger'](_0x37220b)||_0x37220b<_0x3769ca||_0x37220b>_0x113ada)return null;return _0x37220b;}function inferRecurringInterval(_0x5506c1,_0x2c944e){if(_0x5506c1==='*/15')return'*/15\x20*\x20*\x20*\x20*';if(_0x5506c1==='*/30')return'*/30\x20*\x20*\x20*\x20*';if(_0x5506c1!=='0')return'*/30\x20*\x20*\x20*\x20*';if(_0x2c944e==='*'||/^\d{1,2}-\d{1,2}$/['test'](_0x2c944e))return'0\x20*\x20*\x20*\x20*';for(const _0x2ce16a of RECURRING_INTERVAL_STEPS){if(_0x2c944e['startsWith']('*/'+_0x2ce16a)||_0x2c944e['includes']('/'+_0x2ce16a))return'0\x20*/'+_0x2ce16a+'\x20*\x20*\x20*';}return'*/30\x20*\x20*\x20*\x20*';}function parseRecurringHourRange(_0xa0d926){const _0x4e03f0=String(_0xa0d926||'')['trim']()['match'](/^(\d{1,2})-(\d{1,2})(?:\/\d+)?$/);if(!_0x4e03f0)return{'start':'','end':''};const _0x5a6011=parseBoundedInteger(_0x4e03f0[0x1],0x0,0x17),_0xd8b060=parseBoundedInteger(_0x4e03f0[0x2],0x0,0x17);if(_0x5a6011===null||_0xd8b060===null||_0x5a6011>_0xd8b060)return{'start':'','end':''};return{'start':String(_0x5a6011),'end':String(_0xd8b060)};}export function parseAutomationScheduleToFormState(_0x3bec4d){const _0x516351=String(_0x3bec4d||'')['trim'](),_0x382309=createDefaultScheduleFormState(),_0x5128fd=_0x516351['match'](/^(\d{1,2}) (\d{1,2}) \* \* \*$/);if(_0x5128fd){const _0x57e5fe=parseBoundedInteger(_0x5128fd[0x1],0x0,0x3b),_0x5d611b=parseBoundedInteger(_0x5128fd[0x2],0x0,0x17);if(_0x57e5fe!==null&&_0x5d611b!==null)return _0x382309['frequency']='daily',_0x382309['dailyMinute']=String(_0x57e5fe),_0x382309['dailyHour']=String(_0x5d611b),_0x382309;}const _0x2b0116=_0x516351['match'](/^(\d{1,2}) (\d{1,2}) \* \* ([0-7])$/);if(_0x2b0116){const _0x4341cc=parseBoundedInteger(_0x2b0116[0x1],0x0,0x3b),_0x3e783c=parseBoundedInteger(_0x2b0116[0x2],0x0,0x17),_0x243bff=parseBoundedInteger(_0x2b0116[0x3],0x0,0x7);if(_0x4341cc!==null&&_0x3e783c!==null&&_0x243bff!==null)return _0x382309['frequency']='weekly',_0x382309['weeklyMinute']=String(_0x4341cc),_0x382309['weeklyHour']=String(_0x3e783c),_0x382309['weeklyDay']=String(_0x243bff===0x7?0x0:_0x243bff),_0x382309;}const _0x444f83=_0x516351['match'](/^(\d{1,2}) (\d{1,2}) (\d{1,2}) \* \*$/);if(_0x444f83){const _0x1cf1b5=parseBoundedInteger(_0x444f83[0x1],0x0,0x3b),_0x1118fe=parseBoundedInteger(_0x444f83[0x2],0x0,0x17),_0x2a4ab1=parseBoundedInteger(_0x444f83[0x3],AUTOMATION_MONTHLY_DAY_MIN,AUTOMATION_MONTHLY_DAY_MAX);if(_0x1cf1b5!==null&&_0x1118fe!==null&&_0x2a4ab1!==null)return _0x382309['frequency']='monthly',_0x382309['monthlyMinute']=String(_0x1cf1b5),_0x382309['monthlyHour']=String(_0x1118fe),_0x382309['monthlyDay']=String(_0x2a4ab1),_0x382309;}const _0x528044=_0x516351['match'](/^(\*\/15|\*\/30|0) ([^\s]+) \* \* ([^\s]+)$/);if(_0x528044){const [,_0x59383a,_0x2bfacc,_0x3f79f5]=_0x528044;_0x382309['frequency']='recurring',_0x382309['recurringInterval']=inferRecurringInterval(_0x59383a,_0x2bfacc),_0x382309['recurringDayToken']=String(_0x3f79f5||'')['trim']()||'*';const _0x5c53d7=parseRecurringHourRange(_0x2bfacc);return _0x382309['recurringStartHour']=_0x5c53d7['start'],_0x382309['recurringEndHour']=_0x5c53d7['end'],_0x382309;}return _0x382309['frequency']='custom',_0x382309['customCron']=_0x516351,_0x382309;}export function buildAutomationCronFromFormState(_0x558d02={}){const _0x1717f4=String(_0x558d02['frequency']||'daily');if(_0x1717f4==='custom')return String(_0x558d02['customCron']||'')['trim']();if(_0x1717f4==='daily'){const _0x359b8e=String(_0x558d02['dailyHour']??'2'),_0x285692=String(_0x558d02['dailyMinute']??'0');return _0x285692+'\x20'+_0x359b8e+'\x20*\x20*\x20*';}if(_0x1717f4==='weekly'){const _0x3e72f9=String(_0x558d02['weeklyDay']??'1'),_0x5e14f4=String(_0x558d02['weeklyHour']??'9'),_0x2322d7=String(_0x558d02['weeklyMinute']??'0');return _0x2322d7+'\x20'+_0x5e14f4+'\x20*\x20*\x20'+_0x3e72f9;}if(_0x1717f4==='monthly'){const _0x5d973f=String(_0x558d02['monthlyDay']??'1'),_0x1e474f=String(_0x558d02['monthlyHour']??'0'),_0x4b69f5=String(_0x558d02['monthlyMinute']??'0');return _0x4b69f5+'\x20'+_0x1e474f+'\x20'+_0x5d973f+'\x20*\x20*';}const _0x45f412=String(_0x558d02['recurringInterval']||'*/30\x20*\x20*\x20*\x20*')['trim'](),[_0x21bf23='*/30',_0x3d3145='*']=_0x45f412['split'](/\s+/);let _0x448e4a=_0x3d3145;const _0x3a9440=String(_0x558d02['recurringStartHour']??'')['trim'](),_0x498e17=String(_0x558d02['recurringEndHour']??'')['trim']();if(_0x3a9440!==''&&_0x498e17!==''){const _0x436ceb=Number['parseInt'](_0x3a9440,0xa),_0x36ca5d=Number['parseInt'](_0x498e17,0xa);if(Number['isInteger'](_0x436ceb)&&Number['isInteger'](_0x36ca5d)&&_0x436ceb<=_0x36ca5d){const _0x3635d0=_0x3d3145['match'](/^\*\/(\d+)$/);_0x3635d0?_0x448e4a=_0x436ceb+'-'+_0x36ca5d+'/'+_0x3635d0[0x1]:_0x448e4a=_0x436ceb+'-'+_0x36ca5d;}}const _0x293914=String(_0x558d02['recurringDayToken']??'*')['trim']()||'*';return _0x21bf23+'\x20'+_0x448e4a+'\x20*\x20*\x20'+_0x293914;}
1
+ export const AUTOMATION_MONTHLY_DAY_MIN=0x1;export const AUTOMATION_MONTHLY_DAY_MAX=0x1c;const DEFAULT_MONTHLY_DAY_TOKEN='1',DEFAULT_SCHEDULE_FORM_STATE=Object['freeze']({'frequency':'daily','dailyHour':'2','dailyMinute':'0','weeklyDay':'1','weeklyHour':'9','weeklyMinute':'0','monthlyDay':DEFAULT_MONTHLY_DAY_TOKEN,'monthlyDayToken':DEFAULT_MONTHLY_DAY_TOKEN,'monthlyHour':'0','monthlyMinute':'0','recurringInterval':'*/30\x20*\x20*\x20*\x20*','recurringStartHour':'','recurringEndHour':'','recurringDayToken':'*','customCron':''}),RECURRING_INTERVAL_STEPS=['2','4','6','8','12'];function createDefaultScheduleFormState(){return{...DEFAULT_SCHEDULE_FORM_STATE};}function parseBoundedInteger(_0x293379,_0x5337e2,_0x340d8a){const _0x928ddb=Number['parseInt'](_0x293379,0xa);if(!Number['isInteger'](_0x928ddb)||_0x928ddb<_0x5337e2||_0x928ddb>_0x340d8a)return null;return _0x928ddb;}export function parseAutomationMonthlyDayToken(_0x32c910){const _0x4c2360=Array['isArray'](_0x32c910)?_0x32c910['join'](','):String(_0x32c910??'')['trim']();if(!_0x4c2360)return null;const _0x452508=new Set();for(const _0x2de57a of _0x4c2360['split'](',')){const _0x587961=_0x2de57a['trim']();if(!_0x587961||!/^\d{1,2}$/['test'](_0x587961))return null;const _0xb25286=parseBoundedInteger(_0x587961,AUTOMATION_MONTHLY_DAY_MIN,AUTOMATION_MONTHLY_DAY_MAX);if(_0xb25286===null)return null;_0x452508['add'](_0xb25286);}if(_0x452508['size']===0x0)return null;return[..._0x452508]['sort']((_0x2cbb99,_0x3855cd)=>_0x2cbb99-_0x3855cd)['map'](String);}function normalizeAutomationMonthlyDayToken(_0x10b180,_0x2e0f32=DEFAULT_MONTHLY_DAY_TOKEN){const _0x18fe47=parseAutomationMonthlyDayToken(_0x10b180);return _0x18fe47?_0x18fe47['join'](','):_0x2e0f32;}function inferRecurringInterval(_0x5c27c1,_0x1e7eba){if(_0x5c27c1==='*/15')return'*/15\x20*\x20*\x20*\x20*';if(_0x5c27c1==='*/30')return'*/30\x20*\x20*\x20*\x20*';if(_0x5c27c1!=='0')return'*/30\x20*\x20*\x20*\x20*';if(_0x1e7eba==='*'||/^\d{1,2}-\d{1,2}$/['test'](_0x1e7eba))return'0\x20*\x20*\x20*\x20*';for(const _0x4a80bf of RECURRING_INTERVAL_STEPS){if(_0x1e7eba['startsWith']('*/'+_0x4a80bf)||_0x1e7eba['includes']('/'+_0x4a80bf))return'0\x20*/'+_0x4a80bf+'\x20*\x20*\x20*';}return'*/30\x20*\x20*\x20*\x20*';}function parseRecurringHourRange(_0x178b26){const _0x1b6445=String(_0x178b26||'')['trim']()['match'](/^(\d{1,2})-(\d{1,2})(?:\/\d+)?$/);if(!_0x1b6445)return{'start':'','end':''};const _0x3546f6=parseBoundedInteger(_0x1b6445[0x1],0x0,0x17),_0x355039=parseBoundedInteger(_0x1b6445[0x2],0x0,0x17);if(_0x3546f6===null||_0x355039===null||_0x3546f6>_0x355039)return{'start':'','end':''};return{'start':String(_0x3546f6),'end':String(_0x355039)};}export function parseAutomationScheduleToFormState(_0x2956eb){const _0x5ed34b=String(_0x2956eb||'')['trim'](),_0x561c73=createDefaultScheduleFormState(),_0x44b089=_0x5ed34b['match'](/^(\d{1,2}) (\d{1,2}) \* \* \*$/);if(_0x44b089){const _0x15c623=parseBoundedInteger(_0x44b089[0x1],0x0,0x3b),_0x350a27=parseBoundedInteger(_0x44b089[0x2],0x0,0x17);if(_0x15c623!==null&&_0x350a27!==null)return _0x561c73['frequency']='daily',_0x561c73['dailyMinute']=String(_0x15c623),_0x561c73['dailyHour']=String(_0x350a27),_0x561c73;}const _0x5f55ca=_0x5ed34b['match'](/^(\d{1,2}) (\d{1,2}) \* \* ([0-7])$/);if(_0x5f55ca){const _0x5a0767=parseBoundedInteger(_0x5f55ca[0x1],0x0,0x3b),_0x3589e6=parseBoundedInteger(_0x5f55ca[0x2],0x0,0x17),_0x27d3f3=parseBoundedInteger(_0x5f55ca[0x3],0x0,0x7);if(_0x5a0767!==null&&_0x3589e6!==null&&_0x27d3f3!==null)return _0x561c73['frequency']='weekly',_0x561c73['weeklyMinute']=String(_0x5a0767),_0x561c73['weeklyHour']=String(_0x3589e6),_0x561c73['weeklyDay']=String(_0x27d3f3===0x7?0x0:_0x27d3f3),_0x561c73;}const _0xef11b2=_0x5ed34b['match'](/^(\d{1,2}) (\d{1,2}) ([^\s]+) \* \*$/);if(_0xef11b2){const _0x1cfd0b=parseBoundedInteger(_0xef11b2[0x1],0x0,0x3b),_0x491098=parseBoundedInteger(_0xef11b2[0x2],0x0,0x17),_0x20036c=parseAutomationMonthlyDayToken(_0xef11b2[0x3]);if(_0x1cfd0b!==null&&_0x491098!==null&&_0x20036c)return _0x561c73['frequency']='monthly',_0x561c73['monthlyMinute']=String(_0x1cfd0b),_0x561c73['monthlyHour']=String(_0x491098),_0x561c73['monthlyDay']=_0x20036c[0x0],_0x561c73['monthlyDayToken']=_0x20036c['join'](','),_0x561c73;}const _0x2d44a2=_0x5ed34b['match'](/^(\*\/15|\*\/30|0) ([^\s]+) \* \* ([^\s]+)$/);if(_0x2d44a2){const [,_0xecd08a,_0x2c0b2f,_0x482726]=_0x2d44a2;_0x561c73['frequency']='recurring',_0x561c73['recurringInterval']=inferRecurringInterval(_0xecd08a,_0x2c0b2f),_0x561c73['recurringDayToken']=String(_0x482726||'')['trim']()||'*';const _0x1f3832=parseRecurringHourRange(_0x2c0b2f);return _0x561c73['recurringStartHour']=_0x1f3832['start'],_0x561c73['recurringEndHour']=_0x1f3832['end'],_0x561c73;}return _0x561c73['frequency']='custom',_0x561c73['customCron']=_0x5ed34b,_0x561c73;}export function buildAutomationCronFromFormState(_0x55fd2b={}){const _0x24b633=String(_0x55fd2b['frequency']||'daily');if(_0x24b633==='custom')return String(_0x55fd2b['customCron']||'')['trim']();if(_0x24b633==='daily'){const _0xfedf38=String(_0x55fd2b['dailyHour']??'2'),_0x378369=String(_0x55fd2b['dailyMinute']??'0');return _0x378369+'\x20'+_0xfedf38+'\x20*\x20*\x20*';}if(_0x24b633==='weekly'){const _0x572511=String(_0x55fd2b['weeklyDay']??'1'),_0x2b9a47=String(_0x55fd2b['weeklyHour']??'9'),_0xde0a89=String(_0x55fd2b['weeklyMinute']??'0');return _0xde0a89+'\x20'+_0x2b9a47+'\x20*\x20*\x20'+_0x572511;}if(_0x24b633==='monthly'){const _0x60ab85=normalizeAutomationMonthlyDayToken(_0x55fd2b['monthlyDayToken']??_0x55fd2b['monthlyDay'],DEFAULT_MONTHLY_DAY_TOKEN),_0x3bd217=String(_0x55fd2b['monthlyHour']??'0'),_0x327f9c=String(_0x55fd2b['monthlyMinute']??'0');return _0x327f9c+'\x20'+_0x3bd217+'\x20'+_0x60ab85+'\x20*\x20*';}const _0x5f2763=String(_0x55fd2b['recurringInterval']||'*/30\x20*\x20*\x20*\x20*')['trim'](),[_0x44932f='*/30',_0xae81b9='*']=_0x5f2763['split'](/\s+/);let _0x27d028=_0xae81b9;const _0x400d9f=String(_0x55fd2b['recurringStartHour']??'')['trim'](),_0x33ba44=String(_0x55fd2b['recurringEndHour']??'')['trim']();if(_0x400d9f!==''&&_0x33ba44!==''){const _0x1582cb=Number['parseInt'](_0x400d9f,0xa),_0x12cf14=Number['parseInt'](_0x33ba44,0xa);if(Number['isInteger'](_0x1582cb)&&Number['isInteger'](_0x12cf14)&&_0x1582cb<=_0x12cf14){const _0x1fa939=_0xae81b9['match'](/^\*\/(\d+)$/);_0x1fa939?_0x27d028=_0x1582cb+'-'+_0x12cf14+'/'+_0x1fa939[0x1]:_0x27d028=_0x1582cb+'-'+_0x12cf14;}}const _0x19057c=String(_0x55fd2b['recurringDayToken']??'*')['trim']()||'*';return _0x44932f+'\x20'+_0x27d028+'\x20*\x20*\x20'+_0x19057c;}
@@ -1 +1 @@
1
- export class CommentsWidget{constructor(_0x34d8be,_0x407ef4={}){this['container']=_0x34d8be,this['options']={'taskId':_0x407ef4['taskId']||null,'currentUserId':_0x407ef4['currentUserId']||null,'compact':_0x407ef4['compact']||![],'skipHeader':_0x407ef4['skipHeader']||![],'onCommentsLoaded':_0x407ef4['onCommentsLoaded']||null,'onCommentsChanged':_0x407ef4['onCommentsChanged']||null,'enableAttachments':_0x407ef4['enableAttachments']||![],'getAPI':_0x407ef4['getAPI']||(()=>window['API'])},this['comments']=[],this['editor']=null,this['editingCommentId']=null,this['isLoading']=![],this['pendingAttachments']=[],this['existingAttachments']=[],this['init']();}['init'](){this['container']['innerHTML']='',this['container']['className']='comments-widget\x20'+(this['options']['compact']?'comments-widget-compact':''),this['createHeader'](),this['createCommentsList'](),this['createInputSection'](),this['options']['taskId']&&(this['loadComments'](),this['options']['enableAttachments']&&this['loadExistingAttachments']());}async['loadExistingAttachments'](){try{const _0x2951c1=this['options']['getAPI'](),_0x439e6a=await _0x2951c1['getTaskAttachments'](this['options']['taskId']);this['existingAttachments']=_0x439e6a['attachments']||[];}catch(_0xf97167){console['warn']('Failed\x20to\x20load\x20existing\x20attachments:',_0xf97167),this['existingAttachments']=[];}}['createHeader'](){if(this['options']['skipHeader']){this['header']=null,this['isExpanded']=!![];return;}if(this['options']['compact']){this['header']=document['createElement']('div'),this['header']['className']='comments-header\x20comments-header-compact',this['header']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22comments-toggle-btn\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22comments-toggle-icon\x22\x20width=\x2214\x22\x20height=\x2214\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2015a2\x202\x200\x200\x201-2\x202H7l-4\x204V5a2\x202\x200\x200\x201\x202-2h14a2\x202\x200\x200\x201\x202\x202z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comments-count-label\x22>Comments</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comments-count-badge\x22\x20id=\x22comments-count-badge\x22>0</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22comments-chevron\x22\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polyline\x20points=\x226\x209\x2012\x2015\x2018\x209\x22></polyline>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20',this['container']['appendChild'](this['header']);const _0x29e2f2=this['header']['querySelector']('.comments-toggle-btn');_0x29e2f2['addEventListener']('click',()=>this['toggleExpanded']()),this['isExpanded']=![];}else this['header']=document['createElement']('div'),this['header']['className']='comments-header',this['header']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<h3\x20class=\x22comments-title\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2218\x22\x20height=\x2218\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2015a2\x202\x200\x200\x201-2\x202H7l-4\x204V5a2\x202\x200\x200\x201\x202-2h14a2\x202\x200\x200\x201\x202\x202z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Comments\x20<span\x20class=\x22comments-count\x22\x20id=\x22comments-count\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</h3>\x0a\x20\x20\x20\x20\x20\x20',this['container']['appendChild'](this['header']),this['isExpanded']=!![];}['createCommentsList'](){this['commentsListWrapper']=document['createElement']('div'),this['commentsListWrapper']['className']='comments-list-wrapper',this['options']['compact']&&!this['isExpanded']&&(this['commentsListWrapper']['hidden']=!![]),this['commentsList']=document['createElement']('div'),this['commentsList']['className']='comments-list',this['commentsListWrapper']['appendChild'](this['commentsList']),this['container']['appendChild'](this['commentsListWrapper']);}['createInputSection'](){this['inputSection']=document['createElement']('div'),this['inputSection']['className']='comments-input-section';this['options']['compact']&&!this['isExpanded']&&(this['inputSection']['hidden']=!![]);const _0x27c82f=document['createElement']('div');_0x27c82f['className']='comments-editor-wrapper',this['toolbar']=document['createElement']('div'),this['toolbar']['className']='comments-toolbar\x20comments-toolbar-hidden',_0x27c82f['appendChild'](this['toolbar']);const _0x2013b3=document['createElement']('div');_0x2013b3['className']='comments-editor-placeholder',_0x27c82f['appendChild'](_0x2013b3);const _0x4b02f5=document['createElement']('div');_0x4b02f5['className']='comments-input-actions',_0x4b02f5['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x20comments-cancel-btn\x22\x20hidden>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-primary\x20btn-small\x20comments-submit-btn\x22\x20disabled>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22btn-text\x22>Add\x20Comment</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22btn-loading\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22spinner\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20width=\x2214\x22\x20height=\x2214\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x2210\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x223\x22\x20stroke-dasharray=\x2231.4\x2031.4\x22\x20stroke-linecap=\x22round\x22/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20',this['inputSection']['appendChild'](_0x27c82f),this['inputSection']['appendChild'](_0x4b02f5),this['container']['appendChild'](this['inputSection']),this['initEditor'](_0x2013b3),this['submitBtn']=_0x4b02f5['querySelector']('.comments-submit-btn'),this['cancelBtn']=_0x4b02f5['querySelector']('.comments-cancel-btn'),this['submitBtn']['addEventListener']('click',()=>this['handleSubmit']()),this['cancelBtn']['addEventListener']('click',()=>this['cancelEdit']());}['initEditor'](_0x253128){const _0xba77e9=document['createElement']('textarea');_0xba77e9['placeholder']='Add\x20a\x20comment...',_0xba77e9['className']='comments-textarea',_0x253128['appendChild'](_0xba77e9);const _0x24065c=window['MarkdownEditor'];if(!_0x24065c){console['error']('MarkdownEditor\x20not\x20loaded');return;}const _0x16143d={'placeholder':'Add\x20a\x20comment...','editable':!![],'toolbar':!![],'minHeight':this['options']['compact']?'60px':'80px','onChange':_0x33d263=>{const _0xacda00=_0x33d263&&_0x33d263['trim']()['length']>0x0||this['pendingAttachments']['length']>0x0;this['submitBtn']['disabled']=!_0xacda00;},'fetchUsers':async()=>{const _0x4f8462=this['options']['getAPI']();return _0x4f8462['getUsers']();}};this['options']['enableAttachments']&&this['options']['taskId']&&(_0x16143d['onAddAttachments']=_0x54f558=>{this['pendingAttachments']['push'](..._0x54f558),this['submitBtn']['disabled']=![];},_0x16143d['resolveAttachmentUrl']=_0x255ae6=>{const _0x2d8833=this['options']['getAPI']();return _0x2d8833['getBaseUrl']()+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x255ae6);},_0x16143d['isAttachmentNameTaken']=_0x43c6e7=>{return this['pendingAttachments']['some'](_0x423d5e=>_0x423d5e['name']===_0x43c6e7)||this['existingAttachments']['some'](_0x3f5cfd=>_0x3f5cfd['name']===_0x43c6e7);});this['editor']=new _0x24065c(_0xba77e9,_0x16143d);const _0x43d210=this['editor']['editor'],_0x503431=this['editor']['toolbar'];_0x503431&&(_0x503431['classList']['add']('comments-toolbar-hidden'),_0x43d210['addEventListener']('focus',()=>{_0x503431['classList']['remove']('comments-toolbar-hidden');}),_0x43d210['addEventListener']('blur',_0x18a267=>{setTimeout(()=>{!this['editor']['container']?.['contains'](document['activeElement'])&&!_0x503431['contains'](document['activeElement'])&&(!this['editor']['getValue']()?.['trim']()&&!this['editingCommentId']&&_0x503431['classList']['add']('comments-toolbar-hidden'));},0x64);}));}['toggleExpanded'](){this['isExpanded']=!this['isExpanded'],this['commentsListWrapper']['hidden']=!this['isExpanded'],this['inputSection']['hidden']=!this['isExpanded'];const _0x16f37a=this['header']['querySelector']('.comments-chevron');_0x16f37a&&(_0x16f37a['style']['transform']=this['isExpanded']?'rotate(180deg)':''),this['isExpanded']&&this['comments']['length']===0x0&&this['options']['taskId']&&this['loadComments']();}['setTaskId'](_0x405f46){this['options']['taskId']=_0x405f46,this['comments']=[],this['renderComments'](),_0x405f46&&this['loadComments']();}async['loadComments'](){if(!this['options']['taskId']||this['isLoading'])return;this['isLoading']=!![],this['commentsList']['innerHTML']='<div\x20class=\x22comments-loading\x22>Loading\x20comments...</div>';try{const _0xa17653=this['options']['getAPI'](),_0x47f467=await _0xa17653['getComments'](this['options']['taskId']);this['comments']=_0x47f467['comments']||[],this['renderComments'](),this['updateCount'](),this['options']['onCommentsLoaded']&&this['options']['onCommentsLoaded'](this['comments']);}catch(_0x1feb27){console['error']('Failed\x20to\x20load\x20comments:',_0x1feb27),this['commentsList']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-error\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Failed\x20to\x20load\x20comments\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x22\x20onclick=\x22this.parentElement.parentElement.closest(\x27.comments-widget\x27).__widget.loadComments()\x22>Retry</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20';}finally{this['isLoading']=![];}}['renderComments'](){if(this['comments']['length']===0x0){this['commentsList']['innerHTML']='<div\x20class=\x22comments-empty\x22>No\x20comments\x20yet</div>';return;}this['commentsList']['innerHTML']='',this['comments']['forEach'](_0x45db22=>{const _0x42b251=this['createCommentElement'](_0x45db22);this['commentsList']['appendChild'](_0x42b251);});}['createCommentElement'](_0x20e5aa){const _0x571ec0=document['createElement']('div');_0x571ec0['className']='comment-item',_0x571ec0['dataset']['commentId']=_0x20e5aa['id'];const _0x40e585=this['options']['currentUserId']&&_0x20e5aa['author']?.['userId']===this['options']['currentUserId'],_0x5e7795=this['formatDate'](_0x20e5aa['createdAt']),_0x31b04b=_0x20e5aa['updatedAt']!==_0x20e5aa['createdAt'],_0x255c25=this['resolveAttachmentUrls'](_0x20e5aa['content']);let _0x40edfd=window['marked']?window['marked']['parse'](_0x255c25):_0x255c25;_0x40edfd=this['renderMentions'](_0x40edfd),_0x571ec0['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-author\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-author-name\x22>'+this['escapeHtml'](_0x20e5aa['author']?.['name']||'Anonymous')+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-timestamp\x22\x20title=\x22'+new Date(_0x20e5aa['createdAt'])['toLocaleString']()+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5e7795+(_0x31b04b?'\x20(edited)':'')+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x40e585?'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-actions\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon-mini\x20comment-edit-btn\x22\x20title=\x22Edit\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M11\x204H4a2\x202\x200\x200\x200-2\x202v14a2\x202\x200\x200\x200\x202\x202h14a2\x202\x200\x200\x200\x202-2v-7\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M18.5\x202.5a2.121\x202.121\x200\x200\x201\x203\x203L12\x2015l-4\x201\x201-4\x209.5-9.5z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon-mini\x20comment-delete-btn\x22\x20title=\x22Delete\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polyline\x20points=\x223\x206\x205\x206\x2021\x206\x22></polyline>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M19\x206v14a2\x202\x200\x200\x201-2\x202H7a2\x202\x200\x200\x201-2-2V6m3\x200V4a2\x202\x200\x200\x201\x202-2h4a2\x202\x200\x200\x201\x202\x202v2\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20':'')+'\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-content\x22>'+_0x40edfd+'</div>\x0a\x20\x20\x20\x20';if(_0x40e585){const _0x1870c4=_0x571ec0['querySelector']('.comment-edit-btn'),_0x46648b=_0x571ec0['querySelector']('.comment-delete-btn');_0x1870c4?.['addEventListener']('click',()=>this['startEdit'](_0x20e5aa)),_0x46648b?.['addEventListener']('click',()=>this['deleteComment'](_0x20e5aa['id']));}return _0x571ec0;}['formatDate'](_0xb3398){const _0x31e1e7=new Date(_0xb3398),_0x39e070=new Date(),_0x45b112=_0x39e070-_0x31e1e7,_0x1fa5a2=Math['floor'](_0x45b112/0xea60),_0x3fe231=Math['floor'](_0x45b112/0x36ee80),_0x29904f=Math['floor'](_0x45b112/0x5265c00);if(_0x1fa5a2<0x1)return'just\x20now';if(_0x1fa5a2<0x3c)return _0x1fa5a2+'m\x20ago';if(_0x3fe231<0x18)return _0x3fe231+'h\x20ago';if(_0x29904f<0x7)return _0x29904f+'d\x20ago';return _0x31e1e7['toLocaleDateString']();}['escapeHtml'](_0x46fec6){const _0x5d462e=document['createElement']('div');return _0x5d462e['textContent']=_0x46fec6,_0x5d462e['innerHTML'];}['resolveAttachmentUrls'](_0x597c9e){if(!_0x597c9e||!this['options']['taskId'])return _0x597c9e;const _0x58d2c4=this['options']['getAPI'](),_0xbcf906=_0x58d2c4['getBaseUrl']();let _0x3512f5=String(_0x597c9e)['replace'](/\]\(attachment:(?:\/\/)?([^)]+)\)/g,(_0x5aaaf5,_0x2a2f5d)=>{const _0x1ede84=String(_0x2a2f5d||'')['trim']();if(!_0x1ede84)return _0x5aaaf5;let _0x5b4c6a=_0x1ede84;try{_0x5b4c6a=decodeURIComponent(_0x1ede84);}catch{}return']('+_0xbcf906+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x5b4c6a)+')';});return _0x3512f5;}['renderMentions'](_0x4619cd){if(!_0x4619cd)return _0x4619cd;return String(_0x4619cd)['replace'](/@?<a\s+href="mention:([^"]+)"[^>]*>([^<]+)<\/a>/g,(_0x48dde6,_0x409eed,_0x4b7a36)=>{const _0x52eee4=this['escapeHtml'](_0x4b7a36),_0x36e4b2=this['escapeHtml'](_0x409eed);return'<span\x20class=\x22mention\x22\x20data-mention-user-id=\x22'+_0x36e4b2+'\x22>@'+_0x52eee4+'</span>';});}['startEdit'](_0x1f30f3){this['editingCommentId']=_0x1f30f3['id'],this['editor']['setValue'](_0x1f30f3['content']),this['editor']['focus'](),this['cancelBtn']['hidden']=![],this['submitBtn']['querySelector']('.btn-text')['textContent']='Save',this['editor']['toolbar']&&this['editor']['toolbar']['classList']['remove']('comments-toolbar-hidden'),this['inputSection']['scrollIntoView']({'behavior':'smooth','block':'nearest'});}['cancelEdit'](){this['editingCommentId']=null,this['editor']['clear'](),this['cancelBtn']['hidden']=!![],this['submitBtn']['querySelector']('.btn-text')['textContent']='Add\x20Comment',this['submitBtn']['disabled']=!![],this['editor']['toolbar']&&!this['editor']['getValue']()?.['trim']()&&this['editor']['toolbar']['classList']['add']('comments-toolbar-hidden');}async['handleSubmit'](){const _0x45cece=this['editor']['getValue']()?.['trim']();if(!_0x45cece&&this['pendingAttachments']['length']===0x0||!this['options']['taskId'])return;this['setLoading'](!![]);try{const _0x1e7438=this['options']['getAPI']();this['pendingAttachments']['length']>0x0&&this['options']['enableAttachments']&&(await _0x1e7438['uploadAttachments'](this['options']['taskId'],this['pendingAttachments']),this['existingAttachments']['push'](...this['pendingAttachments']['map'](_0x29a119=>({'name':_0x29a119['name']}))),this['pendingAttachments']=[]);if(this['editingCommentId']){const _0x268d53=await _0x1e7438['updateComment'](this['options']['taskId'],this['editingCommentId'],_0x45cece),_0x1d0eb2=this['comments']['findIndex'](_0x6fdcf9=>_0x6fdcf9['id']===this['editingCommentId']);_0x1d0eb2!==-0x1&&(this['comments'][_0x1d0eb2]=_0x268d53['comment']);}else{const _0x58dc91=await _0x1e7438['addComment'](this['options']['taskId'],_0x45cece);this['comments']['push'](_0x58dc91['comment']);}this['renderComments'](),this['updateCount'](),this['cancelEdit'](),this['editor']['clear']();}catch(_0x123209){console['error']('Failed\x20to\x20save\x20comment:',_0x123209),alert('Failed\x20to\x20save\x20comment:\x20'+_0x123209['message']);}finally{this['setLoading'](![]);}}async['deleteComment'](_0x3b4173){const _0x556cf4=await this['showDeleteConfirmModal']();if(!_0x556cf4)return;try{const _0xd74ae7=this['options']['getAPI']();await _0xd74ae7['deleteComment'](this['options']['taskId'],_0x3b4173),this['comments']=this['comments']['filter'](_0xe012e7=>_0xe012e7['id']!==_0x3b4173),this['renderComments'](),this['updateCount']();}catch(_0x50d4eb){console['error']('Failed\x20to\x20delete\x20comment:',_0x50d4eb),alert('Failed\x20to\x20delete\x20comment:\x20'+_0x50d4eb['message']);}}['showDeleteConfirmModal'](){return new Promise(_0x30b34a=>{const _0x40595d=document['createElement']('div');_0x40595d['className']='comments-confirm-modal',_0x40595d['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-backdrop\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-dialog\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h3>Delete\x20Comment</h3>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon\x20comments-confirm-close\x22\x20title=\x22Close\x22>×</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-body\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20this\x20comment?\x20This\x20action\x20cannot\x20be\x20undone.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-footer\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x20comments-confirm-cancel\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-danger\x20btn-small\x20comments-confirm-delete\x22>Delete</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20',document['body']['appendChild'](_0x40595d);const _0x33817c=_0xf50ba6=>{document['removeEventListener']('keydown',_0x4df1b9),_0x40595d['remove'](),_0x30b34a(_0xf50ba6);},_0x4df1b9=_0x3d14eb=>{if(_0x3d14eb['key']==='Escape')_0x33817c(![]);};document['addEventListener']('keydown',_0x4df1b9),_0x40595d['querySelector']('.comments-confirm-backdrop')['addEventListener']('click',()=>_0x33817c(![])),_0x40595d['querySelector']('.comments-confirm-close')['addEventListener']('click',()=>_0x33817c(![])),_0x40595d['querySelector']('.comments-confirm-cancel')['addEventListener']('click',()=>_0x33817c(![])),_0x40595d['querySelector']('.comments-confirm-delete')['addEventListener']('click',()=>_0x33817c(!![])),_0x40595d['querySelector']('.comments-confirm-cancel')['focus']();});}['setLoading'](_0x2a4e78){this['submitBtn']['disabled']=_0x2a4e78,this['submitBtn']['querySelector']('.btn-text')['hidden']=_0x2a4e78,this['submitBtn']['querySelector']('.btn-loading')['hidden']=!_0x2a4e78;}['updateCount'](){const _0x27064a=this['comments']['length'],_0x586002=this['container']['querySelector']('#comments-count-badge');_0x586002&&(_0x586002['textContent']=_0x27064a,_0x586002['hidden']=_0x27064a===0x0);const _0x1daffc=this['container']['querySelector']('#comments-count');_0x1daffc&&(_0x1daffc['textContent']=_0x27064a>0x0?'('+_0x27064a+')':''),this['options']['onCommentsChanged']&&this['options']['onCommentsChanged'](this['comments']);}['getCommentCount'](){return this['comments']['length'];}['destroy'](){this['editor']&&this['editor']['destroy'](),this['container']['innerHTML']='';}}CommentsWidget['prototype']['_attachToContainer']=function(){this['container']['__widget']=this;};typeof window!=='undefined'&&(window['CommentsWidget']=CommentsWidget);
1
+ export class CommentsWidget{constructor(_0x1e7ccd,_0x513fd7={}){this['container']=_0x1e7ccd,this['options']={'taskId':_0x513fd7['taskId']||null,'currentUserId':_0x513fd7['currentUserId']||null,'compact':_0x513fd7['compact']||![],'skipHeader':_0x513fd7['skipHeader']||![],'onCommentsLoaded':_0x513fd7['onCommentsLoaded']||null,'onCommentsChanged':_0x513fd7['onCommentsChanged']||null,'enableAttachments':_0x513fd7['enableAttachments']||![],'getAPI':_0x513fd7['getAPI']||(()=>window['API'])},this['comments']=[],this['editor']=null,this['editingCommentId']=null,this['isLoading']=![],this['pendingAttachments']=[],this['existingAttachments']=[],this['init']();}['init'](){this['container']['innerHTML']='',this['container']['className']='comments-widget\x20'+(this['options']['compact']?'comments-widget-compact':''),this['createHeader'](),this['createCommentsList'](),this['createInputSection'](),this['options']['taskId']&&(this['loadComments'](),this['options']['enableAttachments']&&this['loadExistingAttachments']());}async['loadExistingAttachments'](){try{const _0x261b0b=this['options']['getAPI'](),_0x191b88=await _0x261b0b['getTaskAttachments'](this['options']['taskId']);this['existingAttachments']=_0x191b88['attachments']||[];}catch(_0x271943){console['warn']('Failed\x20to\x20load\x20existing\x20attachments:',_0x271943),this['existingAttachments']=[];}}['createHeader'](){if(this['options']['skipHeader']){this['header']=null,this['isExpanded']=!![];return;}if(this['options']['compact']){this['header']=document['createElement']('div'),this['header']['className']='comments-header\x20comments-header-compact',this['header']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22comments-toggle-btn\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22comments-toggle-icon\x22\x20width=\x2214\x22\x20height=\x2214\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2015a2\x202\x200\x200\x201-2\x202H7l-4\x204V5a2\x202\x200\x200\x201\x202-2h14a2\x202\x200\x200\x201\x202\x202z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comments-count-label\x22>Comments</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comments-count-badge\x22\x20id=\x22comments-count-badge\x22>0</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22comments-chevron\x22\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polyline\x20points=\x226\x209\x2012\x2015\x2018\x209\x22></polyline>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20',this['container']['appendChild'](this['header']);const _0x5147cd=this['header']['querySelector']('.comments-toggle-btn');_0x5147cd['addEventListener']('click',()=>this['toggleExpanded']()),this['isExpanded']=![];}else this['header']=document['createElement']('div'),this['header']['className']='comments-header',this['header']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<h3\x20class=\x22comments-title\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2218\x22\x20height=\x2218\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M21\x2015a2\x202\x200\x200\x201-2\x202H7l-4\x204V5a2\x202\x200\x200\x201\x202-2h14a2\x202\x200\x200\x201\x202\x202z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Comments\x20<span\x20class=\x22comments-count\x22\x20id=\x22comments-count\x22></span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</h3>\x0a\x20\x20\x20\x20\x20\x20',this['container']['appendChild'](this['header']),this['isExpanded']=!![];}['createCommentsList'](){this['commentsListWrapper']=document['createElement']('div'),this['commentsListWrapper']['className']='comments-list-wrapper',this['options']['compact']&&!this['isExpanded']&&(this['commentsListWrapper']['hidden']=!![]),this['commentsList']=document['createElement']('div'),this['commentsList']['className']='comments-list',this['commentsListWrapper']['appendChild'](this['commentsList']),this['container']['appendChild'](this['commentsListWrapper']);}['createInputSection'](){this['inputSection']=document['createElement']('div'),this['inputSection']['className']='comments-input-section';this['options']['compact']&&!this['isExpanded']&&(this['inputSection']['hidden']=!![]);const _0x1d802c=document['createElement']('div');_0x1d802c['className']='comments-editor-wrapper',this['toolbar']=document['createElement']('div'),this['toolbar']['className']='comments-toolbar\x20comments-toolbar-hidden',_0x1d802c['appendChild'](this['toolbar']);const _0x1e1b08=document['createElement']('div');_0x1e1b08['className']='comments-editor-placeholder',_0x1d802c['appendChild'](_0x1e1b08);const _0x9ee26b=document['createElement']('div');_0x9ee26b['className']='comments-input-actions',_0x9ee26b['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x20comments-cancel-btn\x22\x20hidden>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-primary\x20btn-small\x20comments-submit-btn\x22\x20disabled>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22btn-text\x22>Add\x20Comment</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22btn-loading\x22\x20hidden>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20class=\x22spinner\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20width=\x2214\x22\x20height=\x2214\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<circle\x20cx=\x2212\x22\x20cy=\x2212\x22\x20r=\x2210\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x223\x22\x20stroke-dasharray=\x2231.4\x2031.4\x22\x20stroke-linecap=\x22round\x22/>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20',this['inputSection']['appendChild'](_0x1d802c),this['inputSection']['appendChild'](_0x9ee26b),this['container']['appendChild'](this['inputSection']),this['initEditor'](_0x1e1b08),this['submitBtn']=_0x9ee26b['querySelector']('.comments-submit-btn'),this['cancelBtn']=_0x9ee26b['querySelector']('.comments-cancel-btn'),this['submitBtn']['addEventListener']('click',()=>this['handleSubmit']()),this['cancelBtn']['addEventListener']('click',()=>this['cancelEdit']());}['initEditor'](_0x459085){const _0x219c08=document['createElement']('textarea');_0x219c08['placeholder']='Add\x20a\x20comment...',_0x219c08['className']='comments-textarea',_0x459085['appendChild'](_0x219c08);const _0x1bcaff=window['MarkdownEditor'];if(!_0x1bcaff){console['error']('MarkdownEditor\x20not\x20loaded');return;}const _0x24915a={'placeholder':'Add\x20a\x20comment...','editable':!![],'toolbar':!![],'minHeight':this['options']['compact']?'60px':'80px','onChange':_0x4776f3=>{const _0x427b1c=_0x4776f3&&_0x4776f3['trim']()['length']>0x0||this['pendingAttachments']['length']>0x0;this['submitBtn']['disabled']=!_0x427b1c;},'fetchUsers':async()=>{const _0x594c01=this['options']['getAPI']();return _0x594c01['getUsers']();}};this['options']['enableAttachments']&&this['options']['taskId']&&(_0x24915a['onAddAttachments']=_0x2e70aa=>{this['pendingAttachments']['push'](..._0x2e70aa),this['submitBtn']['disabled']=![];},_0x24915a['resolveAttachmentUrl']=_0x3528da=>{const _0x1253ab=this['options']['getAPI']();return _0x1253ab['getBaseUrl']()+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x3528da);},_0x24915a['isAttachmentNameTaken']=_0x4b69f2=>{return this['pendingAttachments']['some'](_0x3fec33=>_0x3fec33['name']===_0x4b69f2)||this['existingAttachments']['some'](_0x4fe709=>_0x4fe709['name']===_0x4b69f2);});this['editor']=new _0x1bcaff(_0x219c08,_0x24915a);const _0x24a1c7=this['editor']['editor'],_0x2455a4=this['editor']['toolbar'];_0x2455a4&&(_0x2455a4['classList']['add']('comments-toolbar-hidden'),_0x24a1c7['addEventListener']('focus',()=>{_0x2455a4['classList']['remove']('comments-toolbar-hidden');}),_0x24a1c7['addEventListener']('blur',_0x28788a=>{setTimeout(()=>{!this['editor']['container']?.['contains'](document['activeElement'])&&!_0x2455a4['contains'](document['activeElement'])&&(!this['editor']['getValue']()?.['trim']()&&!this['editingCommentId']&&_0x2455a4['classList']['add']('comments-toolbar-hidden'));},0x64);}));}['toggleExpanded'](){this['isExpanded']=!this['isExpanded'],this['commentsListWrapper']['hidden']=!this['isExpanded'],this['inputSection']['hidden']=!this['isExpanded'];const _0x2a70db=this['header']['querySelector']('.comments-chevron');_0x2a70db&&(_0x2a70db['style']['transform']=this['isExpanded']?'rotate(180deg)':''),this['isExpanded']&&this['comments']['length']===0x0&&this['options']['taskId']&&this['loadComments']();}['setTaskId'](_0x472279){this['options']['taskId']=_0x472279,this['comments']=[],this['renderComments'](),_0x472279&&this['loadComments']();}async['loadComments'](){if(!this['options']['taskId']||this['isLoading'])return;this['isLoading']=!![],this['commentsList']['innerHTML']='<div\x20class=\x22comments-loading\x22>Loading\x20comments...</div>';try{const _0x2f4475=this['options']['getAPI'](),_0x23c423=await _0x2f4475['getComments'](this['options']['taskId']);this['comments']=_0x23c423['comments']||[],this['renderComments'](),this['updateCount'](),this['options']['onCommentsLoaded']&&this['options']['onCommentsLoaded'](this['comments']);}catch(_0x54a24c){console['error']('Failed\x20to\x20load\x20comments:',_0x54a24c),this['commentsList']['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-error\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Failed\x20to\x20load\x20comments\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x22\x20onclick=\x22this.parentElement.parentElement.closest(\x27.comments-widget\x27).__widget.loadComments()\x22>Retry</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20';}finally{this['isLoading']=![];}}['renderComments'](){if(this['comments']['length']===0x0){this['commentsList']['innerHTML']='<div\x20class=\x22comments-empty\x22>No\x20comments\x20yet</div>';return;}this['commentsList']['innerHTML']='',this['comments']['forEach'](_0x2a8bb2=>{const _0x5b408b=this['createCommentElement'](_0x2a8bb2);this['commentsList']['appendChild'](_0x5b408b);});}['createCommentElement'](_0x5896fd){const _0x38b007=document['createElement']('div');_0x38b007['className']='comment-item',_0x38b007['dataset']['commentId']=_0x5896fd['id'];const _0x26bd5a=this['options']['currentUserId']&&_0x5896fd['author']?.['userId']===this['options']['currentUserId'],_0x3ad349=this['formatDate'](_0x5896fd['createdAt']),_0x46057f=_0x5896fd['updatedAt']!==_0x5896fd['createdAt'],_0x30c900=this['resolveAttachmentUrls'](_0x5896fd['content']);let _0x38ea4a=window['marked']?window['marked']['parse'](_0x30c900):_0x30c900;_0x38ea4a=this['renderMentions'](_0x38ea4a),_0x38b007['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-author\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-author-name\x22>'+this['escapeHtml'](_0x5896fd['author']?.['name']||'Anonymous')+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22comment-timestamp\x22\x20title=\x22'+new Date(_0x5896fd['createdAt'])['toLocaleString']()+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3ad349+(_0x46057f?'\x20(edited)':'')+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x26bd5a?'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-actions\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon-mini\x20comment-edit-btn\x22\x20title=\x22Edit\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M11\x204H4a2\x202\x200\x200\x200-2\x202v14a2\x202\x200\x200\x200\x202\x202h14a2\x202\x200\x200\x200\x202-2v-7\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M18.5\x202.5a2.121\x202.121\x200\x200\x201\x203\x203L12\x2015l-4\x201\x201-4\x209.5-9.5z\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon-mini\x20comment-delete-btn\x22\x20title=\x22Delete\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<svg\x20width=\x2212\x22\x20height=\x2212\x22\x20viewBox=\x220\x200\x2024\x2024\x22\x20fill=\x22none\x22\x20stroke=\x22currentColor\x22\x20stroke-width=\x222\x22\x20stroke-linecap=\x22round\x22\x20stroke-linejoin=\x22round\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<polyline\x20points=\x223\x206\x205\x206\x2021\x206\x22></polyline>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<path\x20d=\x22M19\x206v14a2\x202\x200\x200\x201-2\x202H7a2\x202\x200\x200\x201-2-2V6m3\x200V4a2\x202\x200\x200\x201\x202-2h4a2\x202\x200\x200\x201\x202\x202v2\x22></path>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</svg>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20':'')+'\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22comment-content\x22>'+_0x38ea4a+'</div>\x0a\x20\x20\x20\x20';if(_0x26bd5a){const _0x11a047=_0x38b007['querySelector']('.comment-edit-btn'),_0x481769=_0x38b007['querySelector']('.comment-delete-btn');_0x11a047?.['addEventListener']('click',()=>this['startEdit'](_0x5896fd)),_0x481769?.['addEventListener']('click',()=>this['deleteComment'](_0x5896fd['id']));}return _0x38b007;}['formatDate'](_0x1a9543){const _0x2a5dd6=new Date(_0x1a9543),_0x21a92f=new Date(),_0x23c5fd=_0x21a92f-_0x2a5dd6,_0x274dda=Math['floor'](_0x23c5fd/0xea60),_0x1de7d3=Math['floor'](_0x23c5fd/0x36ee80),_0x364ce9=Math['floor'](_0x23c5fd/0x5265c00);if(_0x274dda<0x1)return'just\x20now';if(_0x274dda<0x3c)return _0x274dda+'m\x20ago';if(_0x1de7d3<0x18)return _0x1de7d3+'h\x20ago';if(_0x364ce9<0x7)return _0x364ce9+'d\x20ago';return _0x2a5dd6['toLocaleDateString']();}['escapeHtml'](_0x1272e0){const _0x1b6d4c=document['createElement']('div');return _0x1b6d4c['textContent']=_0x1272e0,_0x1b6d4c['innerHTML'];}['resolveAttachmentUrls'](_0x3cd06c){if(!_0x3cd06c||!this['options']['taskId'])return _0x3cd06c;const _0x555d7a=this['options']['getAPI'](),_0x55191f=_0x555d7a['getBaseUrl']();let _0x529334=String(_0x3cd06c)['replace'](/\]\(attachment:(?:\/\/)?([^)]+)\)/g,(_0x2e9298,_0x871366)=>{const _0x11729d=String(_0x871366||'')['trim']();if(!_0x11729d)return _0x2e9298;let _0x465edd=_0x11729d;try{_0x465edd=decodeURIComponent(_0x11729d);}catch{}return']('+_0x55191f+'/tasks/'+this['options']['taskId']+'/attachments/'+encodeURIComponent(_0x465edd)+')';});return _0x529334;}['renderMentions'](_0x1f9bde){if(!_0x1f9bde)return _0x1f9bde;return String(_0x1f9bde)['replace'](/@?<a\s+href="mention:([^"]+)"[^>]*>([^<]+)<\/a>/g,(_0x51aab1,_0x5d37ae,_0xb9ca48)=>{const _0x343391=this['escapeHtml'](_0xb9ca48),_0xa33a1b=this['escapeHtml'](_0x5d37ae);return'<span\x20class=\x22mention\x22\x20data-mention-user-id=\x22'+_0xa33a1b+'\x22>@'+_0x343391+'</span>';});}['startEdit'](_0x16f2e2){this['editingCommentId']=_0x16f2e2['id'],this['editor']['setValue'](_0x16f2e2['content']),this['editor']['focus'](),this['cancelBtn']['hidden']=![],this['submitBtn']['querySelector']('.btn-text')['textContent']='Save',this['editor']['toolbar']&&this['editor']['toolbar']['classList']['remove']('comments-toolbar-hidden'),this['inputSection']['scrollIntoView']({'behavior':'smooth','block':'nearest'});}['cancelEdit'](){this['editingCommentId']=null,this['editor']['clear'](),this['cancelBtn']['hidden']=!![],this['submitBtn']['querySelector']('.btn-text')['textContent']='Add\x20Comment',this['submitBtn']['disabled']=!![],this['editor']['toolbar']&&!this['editor']['getValue']()?.['trim']()&&this['editor']['toolbar']['classList']['add']('comments-toolbar-hidden');}async['handleSubmit'](){const _0x11fbc3=this['editor']['getValue']()?.['trim']();if(!_0x11fbc3&&this['pendingAttachments']['length']===0x0||!this['options']['taskId'])return;this['setLoading'](!![]);try{const _0x418325=this['options']['getAPI']();this['pendingAttachments']['length']>0x0&&this['options']['enableAttachments']&&(await _0x418325['uploadAttachments'](this['options']['taskId'],this['pendingAttachments']),this['existingAttachments']['push'](...this['pendingAttachments']['map'](_0x28c49b=>({'name':_0x28c49b['name']}))),this['pendingAttachments']=[]);if(this['editingCommentId']){const _0x43d9fc=await _0x418325['updateComment'](this['options']['taskId'],this['editingCommentId'],_0x11fbc3),_0x245c05=this['comments']['findIndex'](_0x287c79=>_0x287c79['id']===this['editingCommentId']);_0x245c05!==-0x1&&(this['comments'][_0x245c05]=_0x43d9fc['comment']);}else{const _0x212a79=await _0x418325['addComment'](this['options']['taskId'],_0x11fbc3);this['comments']['push'](_0x212a79['comment']);}this['renderComments'](),this['updateCount'](),this['cancelEdit'](),this['editor']['clear']();}catch(_0x47cfe4){console['error']('Failed\x20to\x20save\x20comment:',_0x47cfe4),alert('Failed\x20to\x20save\x20comment:\x20'+_0x47cfe4['message']);}finally{this['setLoading'](![]);}}async['deleteComment'](_0x2bdf94){const _0x1b2773=await this['showDeleteConfirmModal']();if(!_0x1b2773)return;try{const _0x2474f5=this['options']['getAPI']();await _0x2474f5['deleteComment'](this['options']['taskId'],_0x2bdf94),this['comments']=this['comments']['filter'](_0x89b6b7=>_0x89b6b7['id']!==_0x2bdf94),this['renderComments'](),this['updateCount']();}catch(_0x13e9db){console['error']('Failed\x20to\x20delete\x20comment:',_0x13e9db),alert('Failed\x20to\x20delete\x20comment:\x20'+_0x13e9db['message']);}}['showDeleteConfirmModal'](){return new Promise(_0x9def0b=>{const _0x3a31d3=document['createElement']('div');_0x3a31d3['className']='comments-confirm-modal',_0x3a31d3['innerHTML']='\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-backdrop\x22></div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-dialog\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-header\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<h3>Delete\x20Comment</h3>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-icon\x20comments-confirm-close\x22\x20title=\x22Close\x22>×</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-body\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<p>Are\x20you\x20sure\x20you\x20want\x20to\x20delete\x20this\x20comment?\x20This\x20action\x20cannot\x20be\x20undone.</p>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22comments-confirm-footer\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-ghost\x20btn-small\x20comments-confirm-cancel\x22>Cancel</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20type=\x22button\x22\x20class=\x22btn-danger\x20btn-small\x20comments-confirm-delete\x22>Delete</button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20',document['body']['appendChild'](_0x3a31d3);const _0x4bb572=_0x3d5049=>{document['removeEventListener']('keydown',_0x3a05e2),_0x3a31d3['remove'](),_0x9def0b(_0x3d5049);},_0x3a05e2=_0x15f70b=>{if(_0x15f70b['key']==='Escape')_0x4bb572(![]);};document['addEventListener']('keydown',_0x3a05e2),_0x3a31d3['querySelector']('.comments-confirm-backdrop')['addEventListener']('click',()=>_0x4bb572(![])),_0x3a31d3['querySelector']('.comments-confirm-close')['addEventListener']('click',()=>_0x4bb572(![])),_0x3a31d3['querySelector']('.comments-confirm-cancel')['addEventListener']('click',()=>_0x4bb572(![])),_0x3a31d3['querySelector']('.comments-confirm-delete')['addEventListener']('click',()=>_0x4bb572(!![])),_0x3a31d3['querySelector']('.comments-confirm-cancel')['focus']();});}['setLoading'](_0x5c4620){this['submitBtn']['disabled']=_0x5c4620,this['submitBtn']['querySelector']('.btn-text')['hidden']=_0x5c4620,this['submitBtn']['querySelector']('.btn-loading')['hidden']=!_0x5c4620;}['updateCount'](){const _0x313e7b=this['comments']['length'],_0x4fa9f3=this['container']['querySelector']('#comments-count-badge');_0x4fa9f3&&(_0x4fa9f3['textContent']=_0x313e7b,_0x4fa9f3['hidden']=_0x313e7b===0x0);const _0x4bf9a4=this['container']['querySelector']('#comments-count');_0x4bf9a4&&(_0x4bf9a4['textContent']=_0x313e7b>0x0?'('+_0x313e7b+')':''),this['options']['onCommentsChanged']&&this['options']['onCommentsChanged'](this['comments']);}['getCommentCount'](){return this['comments']['length'];}['destroy'](){this['editor']&&this['editor']['destroy'](),this['container']['innerHTML']='';}}CommentsWidget['prototype']['_attachToContainer']=function(){this['container']['__widget']=this;};typeof window!=='undefined'&&(window['CommentsWidget']=CommentsWidget);
@@ -1 +1 @@
1
- import{Utils}from'./app.js';export function parsePatchContent(_0x4d262b){const _0x2465a7=[],_0x297017=_0x4d262b['split']('\x0a');let _0x3cf648=null,_0x2b7717=null;for(const _0x1efd9 of _0x297017){if(_0x1efd9['startsWith']('diff\x20--git')){_0x3cf648&&_0x2b7717&&_0x3cf648['hunks']['push'](_0x2b7717);_0x3cf648&&_0x2465a7['push'](_0x3cf648);const _0x3676b5=_0x1efd9['match'](/diff --git a\/(.+?) b\/(.+)/);_0x3cf648={'oldPath':_0x3676b5?_0x3676b5[0x1]:'','newPath':_0x3676b5?_0x3676b5[0x2]:'','hunks':[],'isDeleted':![]},_0x2b7717=null;}else{if(_0x1efd9['startsWith']('deleted\x20file\x20mode')&&_0x3cf648)_0x3cf648['isDeleted']=!![];else{if(_0x1efd9['startsWith']('@@'))_0x2b7717&&_0x3cf648&&_0x3cf648['hunks']['push'](_0x2b7717),_0x2b7717={'header':_0x1efd9,'lines':[]};else _0x2b7717&&_0x2b7717['lines']['push'](_0x1efd9);}}}return _0x3cf648&&_0x2b7717&&_0x3cf648['hunks']['push'](_0x2b7717),_0x3cf648&&_0x2465a7['push'](_0x3cf648),_0x2465a7;}export function parseHunkHeader(_0x2290da){const _0x5276f8=_0x2290da['match'](/@@ -(\d+),?\d* \+(\d+),?\d* @@/);if(_0x5276f8)return{'oldStart':parseInt(_0x5276f8[0x1],0xa),'newStart':parseInt(_0x5276f8[0x2],0xa)};return{'oldStart':0x1,'newStart':0x1};}export function highlightDiffLine(_0x29969a,_0x392224){const _0x59fabc=window['hljs']||(typeof hljs!=='undefined'?hljs:null);if(_0x59fabc&&_0x392224)try{const _0xa2eddd=_0x59fabc['getLanguage'](_0x392224)?_0x392224:null;if(_0xa2eddd)return _0x59fabc['highlight'](_0x29969a,{'language':_0xa2eddd})['value'];}catch(_0x3b720a){console['error']('Diff\x20syntax\x20highlighting\x20error:',_0x3b720a);}return Utils['escapeHtml'](_0x29969a);}export function getFileLanguage(_0x2b4f24){const _0xd08893=_0x2b4f24['split']('.')['pop']()['toLowerCase'](),_0x1ca943={'js':'javascript','jsx':'javascript','ts':'typescript','tsx':'typescript','py':'python','java':'java','c':'c','cpp':'cpp','cs':'csharp','go':'go','rs':'rust','php':'php','rb':'ruby','html':'xml','css':'css','json':'json','yml':'yaml','yaml':'yaml','md':'markdown','sh':'bash','bash':'bash'};return _0x1ca943[_0xd08893]||null;}export function computeWordDiff(_0x4af1c8,_0x1581d1){const _0x1d008c=_0xee1711=>{const _0x777878=[];let _0xc27c12='',_0x4f2ae4=![];for(let _0x21ae99=0x0;_0x21ae99<_0xee1711['length'];_0x21ae99++){const _0x6fa165=_0xee1711[_0x21ae99],_0x1d37b6=/\s/['test'](_0x6fa165);if(_0xc27c12==='')_0xc27c12=_0x6fa165,_0x4f2ae4=_0x1d37b6;else _0x1d37b6===_0x4f2ae4?_0xc27c12+=_0x6fa165:(_0x777878['push'](_0xc27c12),_0xc27c12=_0x6fa165,_0x4f2ae4=_0x1d37b6);}return _0xc27c12&&_0x777878['push'](_0xc27c12),_0x777878;},_0x4e7ba9=_0x1d008c(_0x4af1c8),_0x29eb9f=_0x1d008c(_0x1581d1),_0x316940=_0x4e7ba9['length'],_0x3b6006=_0x29eb9f['length'],_0x26a6d0=Array(_0x316940+0x1)['fill'](null)['map'](()=>Array(_0x3b6006+0x1)['fill'](0x0));for(let _0x4efa31=0x1;_0x4efa31<=_0x316940;_0x4efa31++){for(let _0x2b1a23=0x1;_0x2b1a23<=_0x3b6006;_0x2b1a23++){_0x4e7ba9[_0x4efa31-0x1]===_0x29eb9f[_0x2b1a23-0x1]?_0x26a6d0[_0x4efa31][_0x2b1a23]=_0x26a6d0[_0x4efa31-0x1][_0x2b1a23-0x1]+0x1:_0x26a6d0[_0x4efa31][_0x2b1a23]=Math['max'](_0x26a6d0[_0x4efa31-0x1][_0x2b1a23],_0x26a6d0[_0x4efa31][_0x2b1a23-0x1]);}}const _0x464b04={'old':[],'new':[]};let _0x1fd283=_0x316940,_0x516b2c=_0x3b6006;const _0x42cb1e=[],_0x31d412=[];while(_0x1fd283>0x0||_0x516b2c>0x0){if(_0x1fd283>0x0&&_0x516b2c>0x0&&_0x4e7ba9[_0x1fd283-0x1]===_0x29eb9f[_0x516b2c-0x1])_0x42cb1e['unshift']({'type':'equal','text':_0x4e7ba9[_0x1fd283-0x1]}),_0x31d412['unshift']({'type':'equal','text':_0x29eb9f[_0x516b2c-0x1]}),_0x1fd283--,_0x516b2c--;else{if(_0x516b2c>0x0&&(_0x1fd283===0x0||_0x26a6d0[_0x1fd283][_0x516b2c-0x1]>=_0x26a6d0[_0x1fd283-0x1][_0x516b2c]))_0x31d412['unshift']({'type':'insert','text':_0x29eb9f[_0x516b2c-0x1]}),_0x516b2c--;else _0x1fd283>0x0&&(_0x42cb1e['unshift']({'type':'delete','text':_0x4e7ba9[_0x1fd283-0x1]}),_0x1fd283--);}}return _0x464b04['old']=_0x42cb1e,_0x464b04['new']=_0x31d412,_0x464b04;}export function renderDiffLineWithWordHighlight(_0x425b2d,_0x4c4db3,_0x5ed8e0,_0x1c912d){if(!_0x4c4db3||_0x4c4db3['length']===0x0)return highlightDiffLine(_0x425b2d,_0x1c912d);let _0x3e456f='';const _0x229981=_0x5ed8e0==='add'?'diff-word-add':'diff-word-remove',_0x3ff42b=_0x5ed8e0==='add'?'insert':'delete';for(const _0x1f4601 of _0x4c4db3){const _0x3ad8d5=Utils['escapeHtml'](_0x1f4601['text']);_0x1f4601['type']===_0x3ff42b?_0x3e456f+='<span\x20class=\x22'+_0x229981+'\x22>'+_0x3ad8d5+'</span>':_0x3e456f+=_0x3ad8d5;}return _0x3e456f;}export function calculateDiffStats(_0xfc2b22){let _0x5c16f5=0x0,_0x25f67a=0x0,_0x299670=0x0;return _0xfc2b22['forEach'](_0x2625e8=>{let _0x377ece=0x0,_0x2511d6=0x0;_0x2625e8['hunks']['forEach'](_0xfaf0c2=>{_0xfaf0c2['lines']['forEach'](_0x2e01d5=>{if(_0x2e01d5['startsWith']('+'))_0x377ece+=0x1;else{if(_0x2e01d5['startsWith']('-'))_0x2511d6+=0x1;}});}),(_0x377ece+_0x2511d6>0x0||_0x2625e8['isDeleted'])&&(_0x299670+=0x1),_0x5c16f5+=_0x377ece,_0x25f67a+=_0x2511d6;}),{'additions':_0x5c16f5,'deletions':_0x25f67a,'files':_0x299670};}export function getFileStatus(_0x9be6d3,_0x250428,_0x536a8d){if(_0x9be6d3['isDeleted'])return'deleted';if(_0x250428>0x0&&_0x536a8d===0x0)return'added';return'modified';}export function safeBase64(_0x4561e6){try{return btoa(unescape(encodeURIComponent(_0x4561e6)));}catch(_0x56a0a2){return btoa(_0x4561e6);}}export function getStorageKey(_0x158898,_0x154512){return _0x158898+'-'+safeBase64(_0x154512);}export function getCollapsedState(_0x1ed49e,_0x5061ad){const _0x59efa1=localStorage['getItem'](getStorageKey(_0x1ed49e,_0x5061ad));return _0x59efa1==='true';}export function renderUnifiedDiff(_0x2671e2,_0x1f6d80){return _0x2671e2['map']((_0x160a9a,_0x392795)=>{const _0x5210a3=_0x160a9a['newPath']||_0x160a9a['oldPath']||'unknown',_0x5db1f2='diff-'+_0x1f6d80+'-'+_0x392795,_0x2b3a22=getFileLanguage(_0x5210a3),{additions:_0x4fe57f,deletions:_0x1b9bc7}=calculateDiffStats([_0x160a9a]),_0x3d7633=getCollapsedState(_0x1f6d80,_0x5210a3),_0x95541c=getFileStatus(_0x160a9a,_0x4fe57f,_0x1b9bc7),_0x37e274=_0x95541c==='added'?'A':_0x95541c==='deleted'?'D':'M',_0x539e3c=_0x160a9a['hunks']['map'](_0x11d470=>{const {oldStart:_0xe323c2,newStart:_0x3aa2a9}=parseHunkHeader(_0x11d470['header']);let _0x18f944=_0xe323c2,_0x4b6d64=_0x3aa2a9;const _0x2d59bf=_0x11d470['lines']['map'](_0xdf9f0f=>({'line':_0xdf9f0f,'type':_0xdf9f0f['startsWith']('+')?'add':_0xdf9f0f['startsWith']('-')?'remove':_0xdf9f0f['startsWith']('\x5c')?'meta':'context'}));let _0x5a4ecc=0x0;while(_0x5a4ecc<_0x2d59bf['length']){if(_0x2d59bf[_0x5a4ecc]['type']==='remove'){let _0x3a8645=_0x5a4ecc,_0x222351=_0x5a4ecc;while(_0x222351<_0x2d59bf['length']&&_0x2d59bf[_0x222351]['type']==='remove')_0x222351++;let _0x510111=_0x222351,_0x5bd395=_0x510111;while(_0x5bd395<_0x2d59bf['length']&&_0x2d59bf[_0x5bd395]['type']==='add')_0x5bd395++;const _0x2e2e62=_0x222351-_0x3a8645,_0x2a8a45=_0x5bd395-_0x510111,_0x2a1f56=Math['min'](_0x2e2e62,_0x2a8a45);for(let _0x5473fc=0x0;_0x5473fc<_0x2a1f56;_0x5473fc++){const _0x165eaf=_0x2d59bf[_0x3a8645+_0x5473fc]['line']['substring'](0x1),_0x3546e6=_0x2d59bf[_0x510111+_0x5473fc]['line']['substring'](0x1),_0x537357=computeWordDiff(_0x165eaf,_0x3546e6);_0x2d59bf[_0x3a8645+_0x5473fc]['wordDiff']=_0x537357['old'],_0x2d59bf[_0x510111+_0x5473fc]['wordDiff']=_0x537357['new'];}_0x5a4ecc=_0x5bd395;}else _0x5a4ecc++;}const _0x123d2f=_0x2d59bf['map'](_0x295b15=>{const _0x566c89=_0x295b15['line'];if(_0x566c89['startsWith']('+')){const _0x773cdf=_0x566c89['substring'](0x1),_0xc1b1ab=_0x295b15['wordDiff']?renderDiffLineWithWordHighlight(_0x773cdf,_0x295b15['wordDiff'],'add',_0x2b3a22):highlightDiffLine(_0x773cdf,_0x2b3a22),_0x372277='<div\x20class=\x22diff-line\x20diff-add\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22></span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x4b6d64+'</span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>+</span>'+_0xc1b1ab+'</span></div>';return _0x4b6d64+=0x1,_0x372277;}if(_0x566c89['startsWith']('-')){const _0x4f2e7d=_0x566c89['substring'](0x1),_0x1d65ee=_0x295b15['wordDiff']?renderDiffLineWithWordHighlight(_0x4f2e7d,_0x295b15['wordDiff'],'remove',_0x2b3a22):highlightDiffLine(_0x4f2e7d,_0x2b3a22),_0x293744='<div\x20class=\x22diff-line\x20diff-remove\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x18f944+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>-</span>'+_0x1d65ee+'</span></div>';return _0x18f944+=0x1,_0x293744;}if(_0x566c89['startsWith']('\x5c'))return'<div\x20class=\x22diff-line\x20diff-meta\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22></span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22>'+Utils['escapeHtml'](_0x566c89)+'</span></div>';const _0x5cb3b9=_0x566c89['startsWith']('\x20')?_0x566c89['substring'](0x1):_0x566c89,_0x13f860=highlightDiffLine(_0x5cb3b9,_0x2b3a22),_0x36dce5='<div\x20class=\x22diff-line\x20diff-context\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x18f944+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x4b6d64+'</span><span\x20class=\x22diff-line-content\x22>\x20'+_0x13f860+'</span></div>';return _0x18f944+=0x1,_0x4b6d64+=0x1,_0x36dce5;})['join']('');return'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>'+Utils['escapeHtml'](_0x11d470['header'])+'</div>'+_0x123d2f+'</div>';})['join'](''),_0x4736d5=_0x539e3c||'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>No\x20textual\x20diff\x20available</div></div>';return'\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff\x22\x20id=\x22file-'+_0x5db1f2+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-header\x22\x20data-diff-id=\x22'+_0x5db1f2+'\x22\x20data-file-name=\x22'+Utils['escapeHtml'](_0x5210a3)+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-title\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-status-badge\x20'+_0x95541c+'\x22>'+_0x37e274+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-name\x22>'+Utils['escapeHtml'](_0x5210a3)+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-stat\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-add\x22>+'+_0x4fe57f+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-del\x22>-'+_0x1b9bc7+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22file-diff-toggle-btn\x22\x20data-diff-id=\x22'+_0x5db1f2+'\x22\x20data-collapsed=\x22'+_0x3d7633+'\x22\x20type=\x22button\x22\x20aria-label=\x22'+(_0x3d7633?'Expand':'Collapse')+'\x22></button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-content\x20'+(_0x3d7633?'collapsed':'')+'\x22\x20id=\x22'+_0x5db1f2+'\x22>'+_0x4736d5+'</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20';})['join']('');}
1
+ import{Utils}from'./app.js';export function parsePatchContent(_0x2d1311){const _0x1ae4c9=[],_0x31b78d=_0x2d1311['split']('\x0a');let _0x51fec1=null,_0x1585b7=null;for(const _0x28bba9 of _0x31b78d){if(_0x28bba9['startsWith']('diff\x20--git')){_0x51fec1&&_0x1585b7&&_0x51fec1['hunks']['push'](_0x1585b7);_0x51fec1&&_0x1ae4c9['push'](_0x51fec1);const _0x30712e=_0x28bba9['match'](/diff --git a\/(.+?) b\/(.+)/);_0x51fec1={'oldPath':_0x30712e?_0x30712e[0x1]:'','newPath':_0x30712e?_0x30712e[0x2]:'','hunks':[],'isDeleted':![]},_0x1585b7=null;}else{if(_0x28bba9['startsWith']('deleted\x20file\x20mode')&&_0x51fec1)_0x51fec1['isDeleted']=!![];else{if(_0x28bba9['startsWith']('@@'))_0x1585b7&&_0x51fec1&&_0x51fec1['hunks']['push'](_0x1585b7),_0x1585b7={'header':_0x28bba9,'lines':[]};else _0x1585b7&&_0x1585b7['lines']['push'](_0x28bba9);}}}return _0x51fec1&&_0x1585b7&&_0x51fec1['hunks']['push'](_0x1585b7),_0x51fec1&&_0x1ae4c9['push'](_0x51fec1),_0x1ae4c9;}export function parseHunkHeader(_0x337e1c){const _0x141b81=_0x337e1c['match'](/@@ -(\d+),?\d* \+(\d+),?\d* @@/);if(_0x141b81)return{'oldStart':parseInt(_0x141b81[0x1],0xa),'newStart':parseInt(_0x141b81[0x2],0xa)};return{'oldStart':0x1,'newStart':0x1};}export function highlightDiffLine(_0x3593e5,_0x9946b2){const _0x19745c=window['hljs']||(typeof hljs!=='undefined'?hljs:null);if(_0x19745c&&_0x9946b2)try{const _0x5a0cef=_0x19745c['getLanguage'](_0x9946b2)?_0x9946b2:null;if(_0x5a0cef)return _0x19745c['highlight'](_0x3593e5,{'language':_0x5a0cef})['value'];}catch(_0x269f7c){console['error']('Diff\x20syntax\x20highlighting\x20error:',_0x269f7c);}return Utils['escapeHtml'](_0x3593e5);}export function getFileLanguage(_0xab1d09){const _0x5cb807=_0xab1d09['split']('.')['pop']()['toLowerCase'](),_0x5040f2={'js':'javascript','jsx':'javascript','ts':'typescript','tsx':'typescript','py':'python','java':'java','c':'c','cpp':'cpp','cs':'csharp','go':'go','rs':'rust','php':'php','rb':'ruby','html':'xml','css':'css','json':'json','yml':'yaml','yaml':'yaml','md':'markdown','sh':'bash','bash':'bash'};return _0x5040f2[_0x5cb807]||null;}export function computeWordDiff(_0x17046e,_0x455db6){const _0xd905d2=_0x13db37=>{const _0x200d48=[];let _0xfb7ac0='',_0x22179f=![];for(let _0x47c699=0x0;_0x47c699<_0x13db37['length'];_0x47c699++){const _0x437afa=_0x13db37[_0x47c699],_0x3d5a61=/\s/['test'](_0x437afa);if(_0xfb7ac0==='')_0xfb7ac0=_0x437afa,_0x22179f=_0x3d5a61;else _0x3d5a61===_0x22179f?_0xfb7ac0+=_0x437afa:(_0x200d48['push'](_0xfb7ac0),_0xfb7ac0=_0x437afa,_0x22179f=_0x3d5a61);}return _0xfb7ac0&&_0x200d48['push'](_0xfb7ac0),_0x200d48;},_0x53e102=_0xd905d2(_0x17046e),_0x5bc215=_0xd905d2(_0x455db6),_0x55f76e=_0x53e102['length'],_0x7bef26=_0x5bc215['length'],_0x3e2788=Array(_0x55f76e+0x1)['fill'](null)['map'](()=>Array(_0x7bef26+0x1)['fill'](0x0));for(let _0x6af0ea=0x1;_0x6af0ea<=_0x55f76e;_0x6af0ea++){for(let _0x3568e6=0x1;_0x3568e6<=_0x7bef26;_0x3568e6++){_0x53e102[_0x6af0ea-0x1]===_0x5bc215[_0x3568e6-0x1]?_0x3e2788[_0x6af0ea][_0x3568e6]=_0x3e2788[_0x6af0ea-0x1][_0x3568e6-0x1]+0x1:_0x3e2788[_0x6af0ea][_0x3568e6]=Math['max'](_0x3e2788[_0x6af0ea-0x1][_0x3568e6],_0x3e2788[_0x6af0ea][_0x3568e6-0x1]);}}const _0x2877b9={'old':[],'new':[]};let _0x316c23=_0x55f76e,_0x4905e1=_0x7bef26;const _0x3f8c11=[],_0xae1e56=[];while(_0x316c23>0x0||_0x4905e1>0x0){if(_0x316c23>0x0&&_0x4905e1>0x0&&_0x53e102[_0x316c23-0x1]===_0x5bc215[_0x4905e1-0x1])_0x3f8c11['unshift']({'type':'equal','text':_0x53e102[_0x316c23-0x1]}),_0xae1e56['unshift']({'type':'equal','text':_0x5bc215[_0x4905e1-0x1]}),_0x316c23--,_0x4905e1--;else{if(_0x4905e1>0x0&&(_0x316c23===0x0||_0x3e2788[_0x316c23][_0x4905e1-0x1]>=_0x3e2788[_0x316c23-0x1][_0x4905e1]))_0xae1e56['unshift']({'type':'insert','text':_0x5bc215[_0x4905e1-0x1]}),_0x4905e1--;else _0x316c23>0x0&&(_0x3f8c11['unshift']({'type':'delete','text':_0x53e102[_0x316c23-0x1]}),_0x316c23--);}}return _0x2877b9['old']=_0x3f8c11,_0x2877b9['new']=_0xae1e56,_0x2877b9;}export function renderDiffLineWithWordHighlight(_0xaae9aa,_0x1f20c3,_0x3f4090,_0x5d6f90){if(!_0x1f20c3||_0x1f20c3['length']===0x0)return highlightDiffLine(_0xaae9aa,_0x5d6f90);let _0x26f7fa='';const _0x292cc0=_0x3f4090==='add'?'diff-word-add':'diff-word-remove',_0x5ed4eb=_0x3f4090==='add'?'insert':'delete';for(const _0x3d8997 of _0x1f20c3){const _0x151ba6=Utils['escapeHtml'](_0x3d8997['text']);_0x3d8997['type']===_0x5ed4eb?_0x26f7fa+='<span\x20class=\x22'+_0x292cc0+'\x22>'+_0x151ba6+'</span>':_0x26f7fa+=_0x151ba6;}return _0x26f7fa;}export function calculateDiffStats(_0x40fc1c){let _0xfc4d34=0x0,_0x2eff93=0x0,_0x2a3cf2=0x0;return _0x40fc1c['forEach'](_0x5c2a15=>{let _0x45bc1a=0x0,_0x29df5a=0x0;_0x5c2a15['hunks']['forEach'](_0x4ca18b=>{_0x4ca18b['lines']['forEach'](_0x4c5459=>{if(_0x4c5459['startsWith']('+'))_0x45bc1a+=0x1;else{if(_0x4c5459['startsWith']('-'))_0x29df5a+=0x1;}});}),(_0x45bc1a+_0x29df5a>0x0||_0x5c2a15['isDeleted'])&&(_0x2a3cf2+=0x1),_0xfc4d34+=_0x45bc1a,_0x2eff93+=_0x29df5a;}),{'additions':_0xfc4d34,'deletions':_0x2eff93,'files':_0x2a3cf2};}export function getFileStatus(_0x4a23f9,_0x25c65c,_0x2155ac){if(_0x4a23f9['isDeleted'])return'deleted';if(_0x25c65c>0x0&&_0x2155ac===0x0)return'added';return'modified';}export function safeBase64(_0x2bdb85){try{return btoa(unescape(encodeURIComponent(_0x2bdb85)));}catch(_0x3de3fc){return btoa(_0x2bdb85);}}export function getStorageKey(_0x10e849,_0x46e3a8){return _0x10e849+'-'+safeBase64(_0x46e3a8);}export function getCollapsedState(_0x25b1a3,_0x10876e){const _0x1890a3=localStorage['getItem'](getStorageKey(_0x25b1a3,_0x10876e));return _0x1890a3==='true';}export function renderUnifiedDiff(_0x23e080,_0x56533a){return _0x23e080['map']((_0x1ce811,_0x1ebae1)=>{const _0x1b8260=_0x1ce811['newPath']||_0x1ce811['oldPath']||'unknown',_0x1ed369='diff-'+_0x56533a+'-'+_0x1ebae1,_0x458032=getFileLanguage(_0x1b8260),{additions:_0x36c1c3,deletions:_0x51e510}=calculateDiffStats([_0x1ce811]),_0x459534=getCollapsedState(_0x56533a,_0x1b8260),_0x141764=getFileStatus(_0x1ce811,_0x36c1c3,_0x51e510),_0x924662=_0x141764==='added'?'A':_0x141764==='deleted'?'D':'M',_0x1d4ab7=_0x1ce811['hunks']['map'](_0x36c513=>{const {oldStart:_0x1962bc,newStart:_0x13cbbc}=parseHunkHeader(_0x36c513['header']);let _0x1f6320=_0x1962bc,_0x4c5899=_0x13cbbc;const _0x48c713=_0x36c513['lines']['map'](_0x438254=>({'line':_0x438254,'type':_0x438254['startsWith']('+')?'add':_0x438254['startsWith']('-')?'remove':_0x438254['startsWith']('\x5c')?'meta':'context'}));let _0x5397e8=0x0;while(_0x5397e8<_0x48c713['length']){if(_0x48c713[_0x5397e8]['type']==='remove'){let _0x3acf9c=_0x5397e8,_0x2728cc=_0x5397e8;while(_0x2728cc<_0x48c713['length']&&_0x48c713[_0x2728cc]['type']==='remove')_0x2728cc++;let _0x1f36ca=_0x2728cc,_0xcf38a4=_0x1f36ca;while(_0xcf38a4<_0x48c713['length']&&_0x48c713[_0xcf38a4]['type']==='add')_0xcf38a4++;const _0x1d62a9=_0x2728cc-_0x3acf9c,_0x41fe93=_0xcf38a4-_0x1f36ca,_0x588904=Math['min'](_0x1d62a9,_0x41fe93);for(let _0x439836=0x0;_0x439836<_0x588904;_0x439836++){const _0x1e7203=_0x48c713[_0x3acf9c+_0x439836]['line']['substring'](0x1),_0x586c05=_0x48c713[_0x1f36ca+_0x439836]['line']['substring'](0x1),_0x39097a=computeWordDiff(_0x1e7203,_0x586c05);_0x48c713[_0x3acf9c+_0x439836]['wordDiff']=_0x39097a['old'],_0x48c713[_0x1f36ca+_0x439836]['wordDiff']=_0x39097a['new'];}_0x5397e8=_0xcf38a4;}else _0x5397e8++;}const _0x3a9182=_0x48c713['map'](_0x3af0a5=>{const _0x220e1b=_0x3af0a5['line'];if(_0x220e1b['startsWith']('+')){const _0x358a90=_0x220e1b['substring'](0x1),_0x5ad792=_0x3af0a5['wordDiff']?renderDiffLineWithWordHighlight(_0x358a90,_0x3af0a5['wordDiff'],'add',_0x458032):highlightDiffLine(_0x358a90,_0x458032),_0x51b098='<div\x20class=\x22diff-line\x20diff-add\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22></span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x4c5899+'</span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>+</span>'+_0x5ad792+'</span></div>';return _0x4c5899+=0x1,_0x51b098;}if(_0x220e1b['startsWith']('-')){const _0x3ca648=_0x220e1b['substring'](0x1),_0x17fbda=_0x3af0a5['wordDiff']?renderDiffLineWithWordHighlight(_0x3ca648,_0x3af0a5['wordDiff'],'remove',_0x458032):highlightDiffLine(_0x3ca648,_0x458032),_0x368391='<div\x20class=\x22diff-line\x20diff-remove\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x1f6320+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22><span\x20class=\x22diff-prefix\x22>-</span>'+_0x17fbda+'</span></div>';return _0x1f6320+=0x1,_0x368391;}if(_0x220e1b['startsWith']('\x5c'))return'<div\x20class=\x22diff-line\x20diff-meta\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22></span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22></span><span\x20class=\x22diff-line-content\x22>'+Utils['escapeHtml'](_0x220e1b)+'</span></div>';const _0x86cecb=_0x220e1b['startsWith']('\x20')?_0x220e1b['substring'](0x1):_0x220e1b,_0x447faa=highlightDiffLine(_0x86cecb,_0x458032),_0x31a335='<div\x20class=\x22diff-line\x20diff-context\x22><span\x20class=\x22diff-line-num\x20diff-line-num-old\x22>'+_0x1f6320+'</span><span\x20class=\x22diff-line-num\x20diff-line-num-new\x22>'+_0x4c5899+'</span><span\x20class=\x22diff-line-content\x22>\x20'+_0x447faa+'</span></div>';return _0x1f6320+=0x1,_0x4c5899+=0x1,_0x31a335;})['join']('');return'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>'+Utils['escapeHtml'](_0x36c513['header'])+'</div>'+_0x3a9182+'</div>';})['join'](''),_0x4f0ede=_0x1d4ab7||'<div\x20class=\x22diff-hunk\x22><div\x20class=\x22diff-hunk-header\x22>No\x20textual\x20diff\x20available</div></div>';return'\x0a\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff\x22\x20id=\x22file-'+_0x1ed369+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-header\x22\x20data-diff-id=\x22'+_0x1ed369+'\x22\x20data-file-name=\x22'+Utils['escapeHtml'](_0x1b8260)+'\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-title\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-status-badge\x20'+_0x141764+'\x22>'+_0x924662+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-name\x22>'+Utils['escapeHtml'](_0x1b8260)+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22file-diff-stat\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-add\x22>+'+_0x36c1c3+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<span\x20class=\x22diff-del\x22>-'+_0x51e510+'</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</span>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<button\x20class=\x22file-diff-toggle-btn\x22\x20data-diff-id=\x22'+_0x1ed369+'\x22\x20data-collapsed=\x22'+_0x459534+'\x22\x20type=\x22button\x22\x20aria-label=\x22'+(_0x459534?'Expand':'Collapse')+'\x22></button>\x0a\x20\x20\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<div\x20class=\x22file-diff-content\x20'+(_0x459534?'collapsed':'')+'\x22\x20id=\x22'+_0x1ed369+'\x22>'+_0x4f0ede+'</div>\x0a\x20\x20\x20\x20\x20\x20</div>\x0a\x20\x20\x20\x20';})['join']('');}
@@ -18,7 +18,7 @@ Click **Add Automation** and configure:
18
18
  - **Schedule** using the picker:
19
19
  - Daily
20
20
  - Weekly
21
- - Monthly
21
+ - Monthly (one or more days, 1-28)
22
22
  - Recurring (interval + optional time window + optional days)
23
23
  - Custom cron expression
24
24
  - **Run Target**:
@@ -43,6 +43,7 @@ Examples:
43
43
  - Daily at 2:00 AM -> `0 2 * * *`
44
44
  - Weekly Monday 9:00 AM -> `0 9 * * 1`
45
45
  - Monthly 1st at midnight -> `0 0 1 * *`
46
+ - Monthly 1st and 16th at midnight -> `0 0 1,16 * *`
46
47
  - Every 30 minutes -> `*/30 * * * *`
47
48
  - Every 30 minutes, 9 AM-5 PM, weekdays -> `*/30 9-17 * * 1,2,3,4,5`
48
49