@protobase/ui 0.113.1 → 0.114.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account/messages.d.ts +2 -2
- package/dist/app/app.d.ts +4 -1
- package/dist/app/app.js +9 -7
- package/dist/app/charts/messages.d.ts +2 -2
- package/dist/app/comments/messages.d.ts +2 -2
- package/dist/app/confirm-sign-in-messages.d.ts +2 -2
- package/dist/app/create/messages.d.ts +2 -2
- package/dist/app/delete/messages.d.ts +2 -2
- package/dist/app/displays/messages.d.ts +2 -2
- package/dist/app/displays/virtual-cards.js +1 -0
- package/dist/app/embedded-list/messages.d.ts +2 -2
- package/dist/app/export/messages.d.ts +2 -2
- package/dist/app/field-messages.d.ts +2 -2
- package/dist/app/field-types/workflow/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-page/messages.d.ts +2 -2
- package/dist/app/field-types/workflow-run/messages.d.ts +2 -2
- package/dist/app/first-frame.d.ts +13 -0
- package/dist/app/first-frame.js +23 -0
- package/dist/app/focus/messages.d.ts +2 -2
- package/dist/app/gallery/gallery-layout.d.ts +2 -2
- package/dist/app/gallery/messages.d.ts +2 -2
- package/dist/app/hand-order/messages.d.ts +2 -2
- package/dist/app/import/messages.d.ts +2 -2
- package/dist/app/index.html +0 -17
- package/dist/app/list-messages.d.ts +2 -2
- package/dist/app/main.js +19 -7
- package/dist/app/messages.d.ts +2 -2
- package/dist/app/pages/messages.d.ts +2 -2
- package/dist/app/record-chart/messages.d.ts +2 -2
- package/dist/app/record-messages.d.ts +2 -2
- package/dist/app/record-mode/shown-layout.d.ts +1 -1
- package/dist/app/record-row/messages.d.ts +2 -2
- package/dist/app/record-row/record-row.js +1 -0
- package/dist/app/refresh-mark.d.ts +2 -1
- package/dist/app/refresh-mark.js +3 -1
- package/dist/app/reveal-when-loaded.d.ts +8 -2
- package/dist/app/reveal-when-loaded.js +12 -5
- package/dist/app/runtime/messages.d.ts +2 -2
- package/dist/app/saved/messages.d.ts +2 -2
- package/dist/app/searches/messages.d.ts +2 -2
- package/dist/app/splash-hold.d.ts +0 -1
- package/dist/app/splash-hold.js +1 -1
- package/dist/app/start-screen.d.ts +0 -9
- package/dist/app/start-screen.js +1 -10
- package/dist/app/ui-ready.d.ts +11 -0
- package/dist/app/ui-ready.js +12 -0
- package/dist/app-shell/app-shell.js +3 -1
- package/dist/app-shell/close-sidebar.d.ts +10 -0
- package/dist/app-shell/close-sidebar.js +17 -0
- package/dist/app-shell/drawer.d.ts +7 -1
- package/dist/app-shell/drawer.js +26 -7
- package/dist/app-shell/index.d.ts +2 -1
- package/dist/app-shell/index.js +2 -1
- package/dist/app-shell/messages.d.ts +2 -2
- package/dist/app-shell/top-bar.js +4 -4
- package/dist/assistant-dock/messages.d.ts +2 -2
- package/dist/auth/messages.d.ts +2 -2
- package/dist/calls/messages.d.ts +2 -2
- package/dist/chat/messages.d.ts +2 -2
- package/dist/data/query-keys.d.ts +6 -0
- package/dist/data/query-keys.js +10 -0
- package/dist/data/start-cache/cached-plugins.d.ts +6 -0
- package/dist/data/start-cache/cached-plugins.js +10 -0
- package/dist/data-grid/data-grid.js +1 -0
- package/dist/data-grid/messages.d.ts +2 -2
- package/dist/data-grid/row-source.d.ts +5 -0
- package/dist/data-grid/use-paged-rows.d.ts +5 -3
- package/dist/data-grid/use-paged-rows.js +21 -6
- package/dist/filter-panel/messages.d.ts +2 -2
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4 -1
- package/dist/inline-child-table/messages.d.ts +2 -2
- package/dist/live/grid-loader.d.ts +1 -0
- package/dist/live/grid-loader.js +3 -1
- package/dist/live/use-live-rows.js +1 -0
- package/dist/mocks/orders.d.ts +1 -1
- package/dist/notifications/bell/messages.d.ts +2 -2
- package/dist/organizations/members-page.js +13 -7
- package/dist/organizations/messages.d.ts +2 -2
- package/dist/organizations/use-organizations.d.ts +4 -1
- package/dist/organizations/use-organizations.js +25 -19
- package/dist/package.js +1 -1
- package/dist/plugins/plugin-source.d.ts +24 -4
- package/dist/plugins/plugin-source.js +48 -14
- package/dist/plugins/use-plugin-loads.d.ts +3 -1
- package/dist/plugins/use-plugin-loads.js +24 -7
- package/dist/primitives/skeleton.js +1 -0
- package/dist/roles/use-active-role.d.ts +4 -1
- package/dist/roles/use-active-role.js +18 -13
- package/dist/shell/assets/api-provider-BJJrOoO4.js +2 -0
- package/dist/shell/assets/app-VoTi41IN.js +16 -0
- package/dist/shell/assets/badge-OU9hb6yQ.js +2 -0
- package/dist/shell/assets/checkbox-DFfK432Y.js +2 -0
- package/dist/shell/assets/createLucideIcon-DGm8SdFI.js +2 -0
- package/dist/shell/assets/display-value-CIH2qfgQ.js +2 -0
- package/dist/shell/assets/{field-badge-3QmjR1r3.js → field-badge-DX2Mc_fH.js} +2 -2
- package/dist/shell/assets/{graph-view-CIk96BRv.js → graph-view-CY9LPr0B.js} +2 -2
- package/dist/shell/assets/{html-viewer-ATz2AVBi.js → html-viewer-BPGMH_GA.js} +2 -2
- package/dist/shell/assets/{in-place-form-frfvnKaj.js → in-place-form-RWSQGEg4.js} +2 -2
- package/dist/shell/assets/index-Bzb-O7ER.js +2 -0
- package/dist/shell/assets/index-HnFovy2Q.css +2 -0
- package/dist/shell/assets/{intl-cache-bXVNV0Yq.js → intl-cache-D4doUjK1.js} +2 -2
- package/dist/shell/assets/{lib-d3-interpolate-Cl0dHO4f.js → lib-d3-interpolate-D3u38iyJ.js} +2 -2
- package/dist/shell/assets/{lib-d3-transition-DUHAGQ8z.js → lib-d3-transition-BUpPvFvt.js} +2 -2
- package/dist/shell/assets/{lib-d3-zoom-gQh2osrj.js → lib-d3-zoom-BF7SPKNh.js} +2 -2
- package/dist/shell/assets/{lib-vis.gl-react-maplibre-CU7gWYjg.js → lib-vis.gl-react-maplibre-C7-0xNFC.js} +2 -2
- package/dist/shell/assets/{lib-xyflow-react-DGg_5r7u.js → lib-xyflow-react-CKyW7szC.js} +2 -2
- package/dist/shell/assets/maplibre-9ViQO48S.js +2 -0
- package/dist/shell/assets/{markdown-content-mNJHzGOa.js → markdown-content-DTB9RQDs.js} +2 -2
- package/dist/shell/assets/{record-map-BsXXSshB.js → record-map-CVqCWtfe.js} +2 -2
- package/dist/shell/assets/{records-map-D8EBzOu8.js → records-map-ClYSxrVR.js} +2 -2
- package/dist/shell/assets/{run-trace-view-Tf6Jwd46.js → run-trace-view-CN16MiXg.js} +2 -2
- package/dist/shell/assets/search-picker-BGpvJQRD.js +2 -0
- package/dist/shell/assets/shared-protobase-ui-BC8LqGQB.js +2 -0
- package/dist/shell/assets/step-catalog-CZY0ZpCC.js +2 -0
- package/dist/shell/assets/step-panel-DhD80lsJ.js +2 -0
- package/dist/shell/assets/use-app-address-B4Uk3nWy.js +2 -0
- package/dist/shell/assets/{use-meta-BqEqOLNe.js → use-meta-D5kYywHm.js} +2 -2
- package/dist/shell/assets/{use-sibling-page-Dm7aUfaa.js → use-sibling-page-BJ81HcOP.js} +3 -3
- package/dist/shell/assets/value-badge-Dpd8dRqq.js +2 -0
- package/dist/shell/assets/{vendor-WWp_xlp2.js → vendor-3etemhgS.js} +4 -4
- package/dist/shell/assets/{workflow-canvas-B8ciy9xI.js → workflow-canvas-C1nGpi5w.js} +2 -2
- package/dist/shell/assets/{workflow-graph-editor-QT-3e-M9.js → workflow-graph-editor-DAJa4lq6.js} +2 -2
- package/dist/shell/assets/workflow-workbench-HramVZEJ.js +4 -0
- package/dist/shell/assets/{workflows-Bku4o2su.js → workflows-DlvOln9v.js} +2 -2
- package/dist/shell/assets/{workflows-start-kl7rSSay.js → workflows-start-QUKfwFqf.js} +2 -2
- package/dist/shell/index.html +16 -19
- package/dist/shell/protobase.shell.json +2 -2
- package/dist/shell/protobase.sw.js +2 -2
- package/dist/shell-source-maps/assets/api-provider-BJJrOoO4.js.map +1 -0
- package/dist/shell-source-maps/assets/app-VoTi41IN.js.map +1 -0
- package/dist/shell-source-maps/assets/{badge-ChHXC28D.js.map → badge-OU9hb6yQ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{checkbox-COOOlJPG.js.map → checkbox-DFfK432Y.js.map} +1 -1
- package/dist/shell-source-maps/assets/createLucideIcon-DGm8SdFI.js.map +1 -0
- package/dist/shell-source-maps/assets/display-value-CIH2qfgQ.js.map +1 -0
- package/dist/shell-source-maps/assets/{field-badge-3QmjR1r3.js.map → field-badge-DX2Mc_fH.js.map} +1 -1
- package/dist/shell-source-maps/assets/{graph-view-CIk96BRv.js.map → graph-view-CY9LPr0B.js.map} +1 -1
- package/dist/shell-source-maps/assets/{html-viewer-ATz2AVBi.js.map → html-viewer-BPGMH_GA.js.map} +1 -1
- package/dist/shell-source-maps/assets/{in-place-form-frfvnKaj.js.map → in-place-form-RWSQGEg4.js.map} +1 -1
- package/dist/shell-source-maps/assets/index-Bzb-O7ER.js.map +1 -0
- package/dist/shell-source-maps/assets/{intl-cache-bXVNV0Yq.js.map → intl-cache-D4doUjK1.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-d3-interpolate-Cl0dHO4f.js.map → lib-d3-interpolate-D3u38iyJ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-d3-transition-DUHAGQ8z.js.map → lib-d3-transition-BUpPvFvt.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-d3-zoom-gQh2osrj.js.map → lib-d3-zoom-BF7SPKNh.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-vis.gl-react-maplibre-CU7gWYjg.js.map → lib-vis.gl-react-maplibre-C7-0xNFC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{lib-xyflow-react-DGg_5r7u.js.map → lib-xyflow-react-CKyW7szC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{maplibre-BufRSV4y.js.map → maplibre-9ViQO48S.js.map} +1 -1
- package/dist/shell-source-maps/assets/{markdown-content-mNJHzGOa.js.map → markdown-content-DTB9RQDs.js.map} +1 -1
- package/dist/shell-source-maps/assets/{record-map-BsXXSshB.js.map → record-map-CVqCWtfe.js.map} +1 -1
- package/dist/shell-source-maps/assets/{records-map-D8EBzOu8.js.map → records-map-ClYSxrVR.js.map} +1 -1
- package/dist/shell-source-maps/assets/{run-trace-view-Tf6Jwd46.js.map → run-trace-view-CN16MiXg.js.map} +1 -1
- package/dist/shell-source-maps/assets/{search-picker-BHmYOFF8.js.map → search-picker-BGpvJQRD.js.map} +1 -1
- package/dist/shell-source-maps/assets/shared-protobase-ui-BC8LqGQB.js.map +1 -0
- package/dist/shell-source-maps/assets/{step-catalog-DZNovnPL.js.map → step-catalog-CZY0ZpCC.js.map} +1 -1
- package/dist/shell-source-maps/assets/{step-panel-3aRZ2Dlj.js.map → step-panel-DhD80lsJ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-app-address-B6k3dkV0.js.map → use-app-address-B4Uk3nWy.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-meta-BqEqOLNe.js.map → use-meta-D5kYywHm.js.map} +1 -1
- package/dist/shell-source-maps/assets/{use-sibling-page-Dm7aUfaa.js.map → use-sibling-page-BJ81HcOP.js.map} +1 -1
- package/dist/shell-source-maps/assets/{value-badge-BKLV4otJ.js.map → value-badge-Dpd8dRqq.js.map} +1 -1
- package/dist/shell-source-maps/assets/{vendor-WWp_xlp2.js.map → vendor-3etemhgS.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-canvas-B8ciy9xI.js.map → workflow-canvas-C1nGpi5w.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-graph-editor-QT-3e-M9.js.map → workflow-graph-editor-DAJa4lq6.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflow-workbench-C5eHhxQh.js.map → workflow-workbench-HramVZEJ.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflows-Bku4o2su.js.map → workflows-DlvOln9v.js.map} +1 -1
- package/dist/shell-source-maps/assets/{workflows-start-kl7rSSay.js.map → workflows-start-QUKfwFqf.js.map} +1 -1
- package/dist/status/messages.d.ts +2 -2
- package/dist/styles.css +14 -0
- package/package.json +5 -5
- package/dist/app/hold-start-for-first-loads.d.ts +0 -12
- package/dist/app/hold-start-for-first-loads.js +0 -43
- package/dist/shell/assets/api-provider-CcDtTh0D.js +0 -2
- package/dist/shell/assets/app-C1xWr51x.js +0 -16
- package/dist/shell/assets/badge-ChHXC28D.js +0 -2
- package/dist/shell/assets/checkbox-COOOlJPG.js +0 -2
- package/dist/shell/assets/display-value-fDiKbfJO.js +0 -2
- package/dist/shell/assets/index-BkCaPeOq.css +0 -2
- package/dist/shell/assets/index-C4cMQVG2.js +0 -2
- package/dist/shell/assets/maplibre-BufRSV4y.js +0 -2
- package/dist/shell/assets/messages-ClKBpZlk.js +0 -2
- package/dist/shell/assets/search-picker-BHmYOFF8.js +0 -2
- package/dist/shell/assets/shared-protobase-ui-C1jBhoci.js +0 -2
- package/dist/shell/assets/step-catalog-DZNovnPL.js +0 -2
- package/dist/shell/assets/step-panel-3aRZ2Dlj.js +0 -2
- package/dist/shell/assets/use-app-address-B6k3dkV0.js +0 -2
- package/dist/shell/assets/value-badge-BKLV4otJ.js +0 -2
- package/dist/shell/assets/workflow-workbench-C5eHhxQh.js +0 -4
- package/dist/shell-source-maps/assets/api-provider-CcDtTh0D.js.map +0 -1
- package/dist/shell-source-maps/assets/app-C1xWr51x.js.map +0 -1
- package/dist/shell-source-maps/assets/display-value-fDiKbfJO.js.map +0 -1
- package/dist/shell-source-maps/assets/index-C4cMQVG2.js.map +0 -1
- package/dist/shell-source-maps/assets/messages-ClKBpZlk.js.map +0 -1
- package/dist/shell-source-maps/assets/shared-protobase-ui-C1jBhoci.js.map +0 -1
package/dist/shell-source-maps/assets/{step-panel-3aRZ2Dlj.js.map → step-panel-DhD80lsJ.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-panel-3aRZ2Dlj.js","names":["useState","_Fragment","n","a","t","__toESM","require_react","require_jsx_runtime","useAdminMeta","AppLink","Button","buttonClass","JsonBlock","useRunSteps","formatDateTime","messages","formatTag","cn","stateAt","splitPath","nodeStatusLabel","triggerLabel","nodeTones","stateLabel","Badge","customStepOf","import_react","scopeItems","scope","match","part","statePath","item","state","weight","nodeTraces","placed","within","counts","lastOfState","lastOfScope","step","steps","path","statuses","mark","known","status","inProgress","startAt","text","import_jsx_runtime","Part","title","children","logTime","at","Logs","logs","line","index","StepCard","meta","jobs","\"workflow_custom_step_jobs\"","heldBack","items","output","valueActions","runId","Heading","kind","name","StateSteps","trace","run","shown","setShown","blockRun","block","StepPanel","selected","definition","types"],"sources":["../../../src/app/field-types/workflow-run/run-trace.ts","../../../src/app/field-types/workflow-run/messages.ts","../../../src/app/field-types/workflow-run/step-card.tsx","../../../src/app/field-types/workflow-run/step-panel.tsx"],"sourcesContent":["import type { NodeStatus, NodeTrace } from '../workflow/node-trace'\n\n/** What the graph reads of a run's step. */\nexport type TraceStep = { scope: string; state: string; status: Exclude<NodeStatus, 'current'>; next: string | null }\n\n/** A Map item a step ran in: the Map's name and the item's index from 0. */\nexport type ScopeItem = { map: string; index: number }\n\n/** The Map items of a step's scope, outermost first: `Each.3[0]` is item 0 of the Map `Each`. */\nexport const scopeItems = (scope: string): ScopeItem[] =>\n scope === ''\n ? []\n : scope.split('/').map((part) => {\n const match = /^(.*)\\.\\d+\\[(\\d+)\\]$/.exec(part)\n if (!match) throw new Error(`\"${scope}\" is not a step's scope`)\n return { map: decodeURIComponent(match[1]!), index: Number(match[2]) }\n })\n\n/** The graph's path of the state a step ran in its scope: the Maps it is inside, then its name. */\nexport const statePath = (scope: string, state: string) => [...scopeItems(scope).map((item) => item.map), state].join('/')\n\n// When a state's scopes disagree, such as a Map's items, the mark that most needs a look wins.\nconst weight: Record<NodeStatus, number> = { succeeded: 0, caught: 1, retrying: 2, failed: 3, current: 4 }\n\n/**\n * Each state's mark from the run's steps in the order they ran: how its last step in each scope ended, the worst of them\n * for a Map's items, and while the run goes on, `current` on the state each scope goes on to, or on the first state when\n * nothing ran yet. A block's run marks the states inside its Block, whose path is `within`.\n */\nexport const nodeTraces = (steps: readonly TraceStep[], { inProgress, startAt, within = [] }: { inProgress: boolean; startAt?: string | undefined; within?: readonly string[] }) => {\n const placed = (scope: string, state: string) => [...within, statePath(scope, state)].join('/')\n const counts = new Map<string, number>()\n const lastOfState = new Map<string, TraceStep>()\n const lastOfScope = new Map<string, TraceStep>()\n for (const step of steps) {\n const path = placed(step.scope, step.state)\n counts.set(path, (counts.get(path) ?? 0) + 1)\n lastOfState.set(`${step.scope}\\n${step.state}`, step)\n lastOfScope.set(step.scope, step)\n }\n const statuses = new Map<string, NodeStatus>()\n const mark = (path: string, status: NodeStatus) => {\n const known = statuses.get(path)\n if (known === undefined || weight[status] > weight[known]) statuses.set(path, status)\n }\n for (const step of lastOfState.values()) mark(placed(step.scope, step.state), step.status)\n if (inProgress) {\n if (!lastOfScope.has('') && startAt) mark([...within, startAt].join('/'), 'current')\n for (const step of lastOfScope.values()) if (step.status !== 'retrying' && step.next !== null) mark(placed(step.scope, step.next), 'current')\n }\n return new Map<string, NodeTrace>([...statuses].map(([path, status]) => [path, { status, steps: counts.get(path) ?? 0 }]))\n}\n","import { messages } from '../../../locale/messages'\n\nexport const text = messages('app/field-types/workflow-run')\n","import type { ReactNode } from 'react'\nimport { customStepOf, heldBackLog } from '@protobase/workflows'\nimport { formatDateTime } from '../../../format/date'\nimport { formatTag } from '../../../locale/active-locale'\nimport { cn } from '../../../lib/cn'\nimport { Badge } from '../../../primitives/badge'\nimport { buttonClass } from '../../../primitives/button'\nimport { useAdminMeta } from '../../meta-gate'\nimport { AppLink } from '../../use-app-address'\nimport { JsonBlock } from '../json/json-block'\nimport { nodeStatusLabel } from '../workflow/labels'\nimport { nodeTones, type NodeStatus } from '../workflow/node-trace'\nimport { scopeItems } from './run-trace'\nimport { text } from './messages'\n\n/** A step as the run's page shows it from the run's trace, keyed by its scope and number. */\nexport type StepRow = Record<string, unknown> & { id: string; scope: string; state: string; next: string | null; attempt: number; status: Exclude<NodeStatus, 'current'>; started_at: string; finished_at: string; logs: { at: string; message: string }[] | null }\n\n/** What can be done with a step's input or output where it shows, such as using it as a new run's input. */\nexport type ValueActions = (value: unknown, part: 'input' | 'output') => ReactNode\n\nexport const Part = ({ title, children }: { title: string; children: ReactNode }) => (\n <div className=\"grid gap-1\">\n <h5 className=\"text-xs font-medium text-muted-foreground\">{title}</h5>\n {children}\n </div>\n)\n\n\n// A log line's time to the second, on the viewer's clock: a step's lines are often within the same minute\nconst logTime = (at: string) => new Intl.DateTimeFormat(formatTag(), { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }).format(Date.parse(at))\n\nconst Logs = ({ logs }: { logs: NonNullable<StepRow['logs']> }) => (\n <ol className=\"grid gap-0.5 rounded-md bg-muted/60 px-3 py-2 font-mono text-xs\">\n {logs.map((line, index) => (\n <li key={index} className=\"whitespace-pre-wrap break-words\">\n <time dateTime={line.at} className=\"text-muted-foreground\">{logTime(line.at)}</time> {line.message}\n </li>\n ))}\n </ol>\n)\n\n/** The resource of custom steps' jobs, which a custom step's step links to. */\nexport const jobsResource = 'workflow_custom_step_jobs'\n\n/**\n * One step of a run: its try, item, status and timing, then its error, input, output, variables and logs, as the run's\n * trace keeps them, secrets blanked out. A step a replay did not send says so, a Block's step links to the block's\n * own run, which gave its result, and a custom step's step to the run's jobs, with the logs its container wrote, for\n * whoever may read them.\n */\nexport const StepCard = ({ step, runId, valueActions }: { step: StepRow; runId: string; valueActions?: ValueActions }) => {\n const meta = useAdminMeta()\n const jobs = typeof step.type === 'string' && customStepOf(step.type) !== undefined && meta.resources[jobsResource] !== undefined && meta.permissions[jobsResource]?.read !== false\n const heldBack = step.logs?.some((line) => line.message === heldBackLog) ?? false\n const items = scopeItems(step.scope)\n const output = step.output !== undefined && step.output !== null && <Part title={text('output')}><JsonBlock value={step.output} />{valueActions?.(step.output, 'output')}</Part>\n return (\n <article aria-label={text('stepTry', { attempt: step.attempt })} className=\"grid gap-3 rounded-lg border bg-background p-3\">\n <header className=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-body\">\n <span className=\"font-medium text-foreground\">{text('stepTry', { attempt: step.attempt })}</span>\n {items.map((item, index) => (\n <span key={index} className=\"text-muted-foreground\">\n {text('itemOf', { index: item.index + 1, map: item.map })}\n </span>\n ))}\n <Badge tone={nodeTones[step.status]}>{nodeStatusLabel(step.status)}</Badge>\n {heldBack && <Badge tone=\"violet\">{text('notSent')}</Badge>}\n {step.reused === true && <Badge tone=\"blue\">{text('reused')}</Badge>}\n {step.joined === true && <Badge tone=\"blue\">{text('joined')}</Badge>}\n <time dateTime={step.started_at} className=\"text-muted-foreground\">{formatDateTime(Date.parse(step.started_at))}</time>\n <span className=\"tabular-nums text-muted-foreground\">{text('duration', { ms: Number(step.duration_ms ?? 0) })}</span>\n </header>\n {step.error != null && (\n <Part title={text('error')}>\n <p className=\"text-body text-danger-text\">\n <span className=\"font-mono\">{String(step.error)}</span>\n {step.cause != null && <span>: {String(step.cause)}</span>}\n </p>\n </Part>\n )}\n {typeof step.run === 'string' && (\n <div className=\"grid gap-1\">\n {step.reused === true && <p className=\"text-body text-muted-foreground\">{text('reusedResult')}</p>}\n {step.joined === true && <p className=\"text-body text-muted-foreground\">{text('joinedResult')}</p>}\n <AppLink to={{ kind: 'record', resource: 'workflow_runs', key: step.run }} className={cn(buttonClass({ size: 'sm' }), 'justify-self-start')}>\n {step.reused === true ? text('openEarlierBlockRun') : text('openBlockRun')}\n </AppLink>\n </div>\n )}\n {jobs && (\n <AppLink to={{ kind: 'list', resource: jobsResource, filter: `run_id = \"${runId}\"` }} className={cn(buttonClass({ size: 'sm' }), 'justify-self-start')}>\n {text('openJobs')}\n </AppLink>\n )}\n {step.status !== 'failed' && output}\n {step.input !== undefined && step.input !== null && <Part title={text('input')}><JsonBlock value={step.input} />{valueActions?.(step.input, 'input')}</Part>}\n {step.status === 'failed' && output}\n {step.assigned != null && <Part title={text('variables')}><JsonBlock value={step.assigned} /></Part>}\n {step.logs && step.logs.length > 0 && <Part title={text('logs')}><Logs logs={step.logs} /></Part>}\n </article>\n )\n}\n","import type { WorkflowTypeList } from '@protobase/client'\nimport type { Definition } from '@protobase/workflows'\nimport { useState } from 'react'\nimport { Button, buttonClass } from '../../../primitives/button'\nimport { AppLink } from '../../use-app-address'\nimport { splitPath, stateAt, triggerId } from '../workflow/definition'\nimport { stateLabel, triggerLabel } from '../workflow/labels'\nimport { JsonBlock } from '../json/json-block'\nimport { Part, StepCard, type ValueActions } from './step-card'\nimport { text } from './messages'\nimport { useRunSteps } from './use-run-steps'\n\n/** How many of a state's steps show at first, and with each Show more. */\nexport const stepPageSize = 20\n\n/** The run whose steps a panel shows. */\nexport type StepsRun = Record<string, unknown> & { id: string; created_at: string }\n\nconst Heading = ({ kind, name }: { kind: string; name: string }) => (\n <div>\n <div className=\"text-xs text-muted-foreground\">{kind}</div>\n <h4 className=\"truncate font-semibold text-foreground\">{name}</h4>\n </div>\n)\n\n/**\n * The steps a state took in the run, every try and item, in the order they ran: the trace the graph read, so no second\n * read. A state inside a Block, which `block` names, ran in the block's own run: the way there instead.\n */\nexport const StateSteps = ({ run, name, block, valueActions }: { run: StepsRun; name: string; block?: string; valueActions?: ValueActions }) => {\n const trace = useRunSteps(run.id, false)\n const [shown, setShown] = useState(stepPageSize)\n if (trace.isPending) return null\n const steps = (trace.data ?? []).filter((step) => step.state === name)\n const blockRun = block === undefined ? undefined : (trace.data ?? []).filter((step) => step.state === block && typeof step.run === 'string').at(-1)?.run\n if (steps.length === 0 && typeof blockRun === 'string') {\n return (\n <div className=\"grid gap-2 text-body text-muted-foreground\">\n <p>{text('ranInBlockRun', { block: block! })}</p>\n <AppLink to={{ kind: 'record', resource: 'workflow_runs', key: blockRun }} className={buttonClass({ size: 'sm' }) + ' justify-self-start'}>\n {text('openBlockRun')}\n </AppLink>\n </div>\n )\n }\n if (steps.length === 0) return <p className=\"text-body text-muted-foreground\">{text('notRun')}</p>\n return (\n <div className=\"grid gap-3\">\n {steps.slice(0, shown).map((step) => (\n <StepCard key={String(step.id)} step={step} runId={run.id} {...(valueActions && { valueActions })} />\n ))}\n {steps.length > shown && (\n <Button size=\"sm\" className=\"justify-self-start\" onClick={() => setShown(shown + stepPageSize)}>\n {text('showMore')}\n </Button>\n )}\n </div>\n )\n}\n\n/**\n * What the chosen node did in the run, in the side panel: the trigger's input, or each step of the state with its input,\n * output, logs, timing, try and error.\n */\nexport const StepPanel = ({ definition, run, selected, types }: { definition: Definition; run: StepsRun; selected: string; types?: WorkflowTypeList }) => {\n const state = selected === triggerId ? undefined : stateAt(definition, selected)\n return (\n <section aria-label={text('chosenStep')} className=\"grid gap-3 rounded-lg border bg-surface p-4\">\n {state ? (\n <>\n <Heading kind={stateLabel(state, types)} name={splitPath(selected).name} />\n <StateSteps run={run} name={splitPath(selected).name} />\n </>\n ) : (\n <>\n <Heading kind={text('trigger')} name={triggerLabel(definition.trigger, types)} />\n <Part title={text('runInput')}>\n <JsonBlock value={run.input ?? null} />\n </Part>\n </>\n )}\n </section>\n )\n}\n"],"mappings":"gmCASa2B,EAAc,GACzBC,IAAU,GACN,CAAC,EACDA,EAAM,MAAM,GAAG,CAAC,CAAC,IAAK,GAAS,CAC7B,IAAMC,EAAQ,uBAAuB,KAAKC,CAAI,EAC9C,GAAI,CAACD,EAAO,MAAU,MAAM,IAAID,EAAM,wBAAwB,EAC9D,MAAO,CAAE,IAAK,mBAAmBC,EAAM,EAAG,EAAG,MAAO,OAAOA,EAAM,EAAE,CAAE,CACvE,CAAC,EAGME,GAAa,EAAe,IAAkB,CAAC,GAAGJ,EAAWC,CAAK,CAAC,CAAC,IAAK,GAASI,EAAK,GAAG,EAAGC,CAAK,CAAC,CAAC,KAAK,GAAG,EAGnHC,EAAqC,CAAE,UAAW,EAAG,OAAQ,EAAG,SAAU,EAAG,OAAQ,EAAG,QAAS,CAAE,EAO5FC,GAAc,EAA6B,CAAE,aAAY,UAAS,SAAS,CAAC,KAA2F,CAClL,IAAMC,GAAU,EAAe,IAAkB,CAAC,GAAGC,EAAQN,EAAUH,EAAOK,CAAK,CAAC,CAAC,C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K,EAAG,KAAMhE,EAAU8D,CAAQ,CAAC,CAAC,IAAO,CAAA,GAC1E,EAAA9B,EAAA,IAAA,CAACsB,EAAD,CAAiB,MAAK,KAAMtD,EAAU8D,CAAQ,CAAC,CAAC,IAAO,CAAA,CACvD,CAAA,CAAA,GAEF,EAAA9B,EAAA,KAAA,CAAAlD,EAAAA,SAAA,CAAA,SAAA,EACE,EAAAkD,EAAA,IAAA,CAACmB,EAAD,CAAS,KAAMpB,EAAK,SAAS,EAAG,KAAM7B,EAAa6D,EAAW,QAASC,CAAK,CAAI,CAAA,GAChF,EAAAhC,EAAA,IAAA,CAACC,EAAD,CAAM,MAAOF,EAAK,UAAU,EAC1B,UAAA,EAAAC,EAAA,IAAA,CAACvC,EAAD,CAAW,MAAO+D,EAAI,OAAS,IAAO,CAAA,CAClC,CAAA,CACN,CAAA,CAAA,CAEG,CAAA,CAEb","debugId":"37691676-0e58-47b2-8db9-b370ba04062a"}
|
|
1
|
+
{"version":3,"file":"step-panel-DhD80lsJ.js","names":["useState","_Fragment","n","a","t","__toESM","require_react","require_jsx_runtime","useAdminMeta","AppLink","Button","buttonClass","useRunSteps","JsonBlock","formatDateTime","formatTag","messages","cn","stateAt","splitPath","nodeStatusLabel","triggerLabel","nodeTones","stateLabel","Badge","customStepOf","import_react","scopeItems","scope","match","part","statePath","item","state","weight","nodeTraces","placed","within","counts","lastOfState","lastOfScope","step","steps","path","statuses","mark","known","status","inProgress","startAt","text","import_jsx_runtime","Part","title","children","logTime","at","Logs","logs","line","index","StepCard","meta","jobs","\"workflow_custom_step_jobs\"","heldBack","items","output","valueActions","runId","Heading","kind","name","StateSteps","trace","run","shown","setShown","blockRun","block","StepPanel","selected","definition","types"],"sources":["../../../src/app/field-types/workflow-run/run-trace.ts","../../../src/app/field-types/workflow-run/messages.ts","../../../src/app/field-types/workflow-run/step-card.tsx","../../../src/app/field-types/workflow-run/step-panel.tsx"],"sourcesContent":["import type { NodeStatus, NodeTrace } from '../workflow/node-trace'\n\n/** What the graph reads of a run's step. */\nexport type TraceStep = { scope: string; state: string; status: Exclude<NodeStatus, 'current'>; next: string | null }\n\n/** A Map item a step ran in: the Map's name and the item's index from 0. */\nexport type ScopeItem = { map: string; index: number }\n\n/** The Map items of a step's scope, outermost first: `Each.3[0]` is item 0 of the Map `Each`. */\nexport const scopeItems = (scope: string): ScopeItem[] =>\n scope === ''\n ? []\n : scope.split('/').map((part) => {\n const match = /^(.*)\\.\\d+\\[(\\d+)\\]$/.exec(part)\n if (!match) throw new Error(`\"${scope}\" is not a step's scope`)\n return { map: decodeURIComponent(match[1]!), index: Number(match[2]) }\n })\n\n/** The graph's path of the state a step ran in its scope: the Maps it is inside, then its name. */\nexport const statePath = (scope: string, state: string) => [...scopeItems(scope).map((item) => item.map), state].join('/')\n\n// When a state's scopes disagree, such as a Map's items, the mark that most needs a look wins.\nconst weight: Record<NodeStatus, number> = { succeeded: 0, caught: 1, retrying: 2, failed: 3, current: 4 }\n\n/**\n * Each state's mark from the run's steps in the order they ran: how its last step in each scope ended, the worst of them\n * for a Map's items, and while the run goes on, `current` on the state each scope goes on to, or on the first state when\n * nothing ran yet. A block's run marks the states inside its Block, whose path is `within`.\n */\nexport const nodeTraces = (steps: readonly TraceStep[], { inProgress, startAt, within = [] }: { inProgress: boolean; startAt?: string | undefined; within?: readonly string[] }) => {\n const placed = (scope: string, state: string) => [...within, statePath(scope, state)].join('/')\n const counts = new Map<string, number>()\n const lastOfState = new Map<string, TraceStep>()\n const lastOfScope = new Map<string, TraceStep>()\n for (const step of steps) {\n const path = placed(step.scope, step.state)\n counts.set(path, (counts.get(path) ?? 0) + 1)\n lastOfState.set(`${step.scope}\\n${step.state}`, step)\n lastOfScope.set(step.scope, step)\n }\n const statuses = new Map<string, NodeStatus>()\n const mark = (path: string, status: NodeStatus) => {\n const known = statuses.get(path)\n if (known === undefined || weight[status] > weight[known]) statuses.set(path, status)\n }\n for (const step of lastOfState.values()) mark(placed(step.scope, step.state), step.status)\n if (inProgress) {\n if (!lastOfScope.has('') && startAt) mark([...within, startAt].join('/'), 'current')\n for (const step of lastOfScope.values()) if (step.status !== 'retrying' && step.next !== null) mark(placed(step.scope, step.next), 'current')\n }\n return new Map<string, NodeTrace>([...statuses].map(([path, status]) => [path, { status, steps: counts.get(path) ?? 0 }]))\n}\n","import { messages } from '../../../locale/messages'\n\nexport const text = messages('app/field-types/workflow-run')\n","import type { ReactNode } from 'react'\nimport { customStepOf, heldBackLog } from '@protobase/workflows'\nimport { formatDateTime } from '../../../format/date'\nimport { formatTag } from '../../../locale/active-locale'\nimport { cn } from '../../../lib/cn'\nimport { Badge } from '../../../primitives/badge'\nimport { buttonClass } from '../../../primitives/button'\nimport { useAdminMeta } from '../../meta-gate'\nimport { AppLink } from '../../use-app-address'\nimport { JsonBlock } from '../json/json-block'\nimport { nodeStatusLabel } from '../workflow/labels'\nimport { nodeTones, type NodeStatus } from '../workflow/node-trace'\nimport { scopeItems } from './run-trace'\nimport { text } from './messages'\n\n/** A step as the run's page shows it from the run's trace, keyed by its scope and number. */\nexport type StepRow = Record<string, unknown> & { id: string; scope: string; state: string; next: string | null; attempt: number; status: Exclude<NodeStatus, 'current'>; started_at: string; finished_at: string; logs: { at: string; message: string }[] | null }\n\n/** What can be done with a step's input or output where it shows, such as using it as a new run's input. */\nexport type ValueActions = (value: unknown, part: 'input' | 'output') => ReactNode\n\nexport const Part = ({ title, children }: { title: string; children: ReactNode }) => (\n <div className=\"grid gap-1\">\n <h5 className=\"text-xs font-medium text-muted-foreground\">{title}</h5>\n {children}\n </div>\n)\n\n\n// A log line's time to the second, on the viewer's clock: a step's lines are often within the same minute\nconst logTime = (at: string) => new Intl.DateTimeFormat(formatTag(), { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }).format(Date.parse(at))\n\nconst Logs = ({ logs }: { logs: NonNullable<StepRow['logs']> }) => (\n <ol className=\"grid gap-0.5 rounded-md bg-muted/60 px-3 py-2 font-mono text-xs\">\n {logs.map((line, index) => (\n <li key={index} className=\"whitespace-pre-wrap break-words\">\n <time dateTime={line.at} className=\"text-muted-foreground\">{logTime(line.at)}</time> {line.message}\n </li>\n ))}\n </ol>\n)\n\n/** The resource of custom steps' jobs, which a custom step's step links to. */\nexport const jobsResource = 'workflow_custom_step_jobs'\n\n/**\n * One step of a run: its try, item, status and timing, then its error, input, output, variables and logs, as the run's\n * trace keeps them, secrets blanked out. A step a replay did not send says so, a Block's step links to the block's\n * own run, which gave its result, and a custom step's step to the run's jobs, with the logs its container wrote, for\n * whoever may read them.\n */\nexport const StepCard = ({ step, runId, valueActions }: { step: StepRow; runId: string; valueActions?: ValueActions }) => {\n const meta = useAdminMeta()\n const jobs = typeof step.type === 'string' && customStepOf(step.type) !== undefined && meta.resources[jobsResource] !== undefined && meta.permissions[jobsResource]?.read !== false\n const heldBack = step.logs?.some((line) => line.message === heldBackLog) ?? false\n const items = scopeItems(step.scope)\n const output = step.output !== undefined && step.output !== null && <Part title={text('output')}><JsonBlock value={step.output} />{valueActions?.(step.output, 'output')}</Part>\n return (\n <article aria-label={text('stepTry', { attempt: step.attempt })} className=\"grid gap-3 rounded-lg border bg-background p-3\">\n <header className=\"flex flex-wrap items-center gap-x-3 gap-y-1 text-body\">\n <span className=\"font-medium text-foreground\">{text('stepTry', { attempt: step.attempt })}</span>\n {items.map((item, index) => (\n <span key={index} className=\"text-muted-foreground\">\n {text('itemOf', { index: item.index + 1, map: item.map })}\n </span>\n ))}\n <Badge tone={nodeTones[step.status]}>{nodeStatusLabel(step.status)}</Badge>\n {heldBack && <Badge tone=\"violet\">{text('notSent')}</Badge>}\n {step.reused === true && <Badge tone=\"blue\">{text('reused')}</Badge>}\n {step.joined === true && <Badge tone=\"blue\">{text('joined')}</Badge>}\n <time dateTime={step.started_at} className=\"text-muted-foreground\">{formatDateTime(Date.parse(step.started_at))}</time>\n <span className=\"tabular-nums text-muted-foreground\">{text('duration', { ms: Number(step.duration_ms ?? 0) })}</span>\n </header>\n {step.error != null && (\n <Part title={text('error')}>\n <p className=\"text-body text-danger-text\">\n <span className=\"font-mono\">{String(step.error)}</span>\n {step.cause != null && <span>: {String(step.cause)}</span>}\n </p>\n </Part>\n )}\n {typeof step.run === 'string' && (\n <div className=\"grid gap-1\">\n {step.reused === true && <p className=\"text-body text-muted-foreground\">{text('reusedResult')}</p>}\n {step.joined === true && <p className=\"text-body text-muted-foreground\">{text('joinedResult')}</p>}\n <AppLink to={{ kind: 'record', resource: 'workflow_runs', key: step.run }} className={cn(buttonClass({ size: 'sm' }), 'justify-self-start')}>\n {step.reused === true ? text('openEarlierBlockRun') : text('openBlockRun')}\n </AppLink>\n </div>\n )}\n {jobs && (\n <AppLink to={{ kind: 'list', resource: jobsResource, filter: `run_id = \"${runId}\"` }} className={cn(buttonClass({ size: 'sm' }), 'justify-self-start')}>\n {text('openJobs')}\n </AppLink>\n )}\n {step.status !== 'failed' && output}\n {step.input !== undefined && step.input !== null && <Part title={text('input')}><JsonBlock value={step.input} />{valueActions?.(step.input, 'input')}</Part>}\n {step.status === 'failed' && output}\n {step.assigned != null && <Part title={text('variables')}><JsonBlock value={step.assigned} /></Part>}\n {step.logs && step.logs.length > 0 && <Part title={text('logs')}><Logs logs={step.logs} /></Part>}\n </article>\n )\n}\n","import type { WorkflowTypeList } from '@protobase/client'\nimport type { Definition } from '@protobase/workflows'\nimport { useState } from 'react'\nimport { Button, buttonClass } from '../../../primitives/button'\nimport { AppLink } from '../../use-app-address'\nimport { splitPath, stateAt, triggerId } from '../workflow/definition'\nimport { stateLabel, triggerLabel } from '../workflow/labels'\nimport { JsonBlock } from '../json/json-block'\nimport { Part, StepCard, type ValueActions } from './step-card'\nimport { text } from './messages'\nimport { useRunSteps } from './use-run-steps'\n\n/** How many of a state's steps show at first, and with each Show more. */\nexport const stepPageSize = 20\n\n/** The run whose steps a panel shows. */\nexport type StepsRun = Record<string, unknown> & { id: string; created_at: string }\n\nconst Heading = ({ kind, name }: { kind: string; name: string }) => (\n <div>\n <div className=\"text-xs text-muted-foreground\">{kind}</div>\n <h4 className=\"truncate font-semibold text-foreground\">{name}</h4>\n </div>\n)\n\n/**\n * The steps a state took in the run, every try and item, in the order they ran: the trace the graph read, so no second\n * read. A state inside a Block, which `block` names, ran in the block's own run: the way there instead.\n */\nexport const StateSteps = ({ run, name, block, valueActions }: { run: StepsRun; name: string; block?: string; valueActions?: ValueActions }) => {\n const trace = useRunSteps(run.id, false)\n const [shown, setShown] = useState(stepPageSize)\n if (trace.isPending) return null\n const steps = (trace.data ?? []).filter((step) => step.state === name)\n const blockRun = block === undefined ? undefined : (trace.data ?? []).filter((step) => step.state === block && typeof step.run === 'string').at(-1)?.run\n if (steps.length === 0 && typeof blockRun === 'string') {\n return (\n <div className=\"grid gap-2 text-body text-muted-foreground\">\n <p>{text('ranInBlockRun', { block: block! })}</p>\n <AppLink to={{ kind: 'record', resource: 'workflow_runs', key: blockRun }} className={buttonClass({ size: 'sm' }) + ' justify-self-start'}>\n {text('openBlockRun')}\n </AppLink>\n </div>\n )\n }\n if (steps.length === 0) return <p className=\"text-body text-muted-foreground\">{text('notRun')}</p>\n return (\n <div className=\"grid gap-3\">\n {steps.slice(0, shown).map((step) => (\n <StepCard key={String(step.id)} step={step} runId={run.id} {...(valueActions && { valueActions })} />\n ))}\n {steps.length > shown && (\n <Button size=\"sm\" className=\"justify-self-start\" onClick={() => setShown(shown + stepPageSize)}>\n {text('showMore')}\n </Button>\n )}\n </div>\n )\n}\n\n/**\n * What the chosen node did in the run, in the side panel: the trigger's input, or each step of the state with its input,\n * output, logs, timing, try and error.\n */\nexport const StepPanel = ({ definition, run, selected, types }: { definition: Definition; run: StepsRun; selected: string; types?: WorkflowTypeList }) => {\n const state = selected === triggerId ? undefined : stateAt(definition, selected)\n return (\n <section aria-label={text('chosenStep')} className=\"grid gap-3 rounded-lg border bg-surface p-4\">\n {state ? (\n <>\n <Heading kind={stateLabel(state, types)} name={splitPath(selected).name} />\n <StateSteps run={run} name={splitPath(selected).name} />\n </>\n ) : (\n <>\n <Heading kind={text('trigger')} name={triggerLabel(definition.trigger, types)} />\n <Part title={text('runInput')}>\n <JsonBlock value={run.input ?? null} />\n </Part>\n </>\n )}\n </section>\n )\n}\n"],"mappings":"wmCASa2B,EAAc,GACzBC,IAAU,GACN,CAAC,EACDA,EAAM,MAAM,GAAG,CAAC,CAAC,IAAK,GAAS,CAC7B,IAAMC,EAAQ,uBAAuB,KAAKC,CAAI,EAC9C,GAAI,CAACD,EAAO,MAAU,MAAM,IAAID,EAAM,wBAAwB,EAC9D,MAAO,CAAE,IAAK,mBAAmBC,EAAM,EAAG,EAAG,MAAO,OAAOA,EAAM,EAAE,CAAE,CACvE,CAAC,EAGME,GAAa,EAAe,IAAkB,CAAC,GAAGJ,EAAWC,CAAK,CAAC,CAAC,IAAK,GAASI,EAAK,GAAG,EAAGC,CAAK,CAAC,CAAC,KAAK,GAAG,EAGnHC,EAAqC,CAAE,UAAW,EAAG,OAAQ,EAAG,SAAU,EAAG,OAAQ,EAAG,QAAS,CAAE,EAO5FC,GAAc,EAA6B,CAAE,aAAY,UAAS,SAAS,CAAC,KAA2F,CAClL,IAAMC,GAAU,EAAe,IAAkB,CAAC,GAAGC,EAAQN,EAAUH,EAAOK,CAAK,CAAC,CAAC,CAAC,KAAK,GAAG,EACxFK,EAAS,IAAI,IACbC,EAAc,IAAI,IAClBC,EAAc,IAAI,IACxB,IAAK,IAAMC,KAAQC,EAAO,CACxB,IAAMC,EAAOP,EAAOK,EAAK,MAAOA,EAAK,KAAK,EAC1CH,EAAO,IAAIK,GAAOL,EAAO,IAAIK,CAAI,GAAK,GAAK,CAAC,EAC5CJ,EAAY,IAAI,GAAGE,EAAK,MAAM,IAAIA,EAAK,QAASA,CAAI,EACpDD,EAAY,IAAIC,EAAK,MAAOA,CAAI,CAClC,CACA,IAAMG,EAAW,IAAI,IACfC,GAAQ,EAAc,IAAuB,CACjD,IAAMC,EAAQF,EAAS,IAAID,CAAI,GAC3BG,IAAU,IAAA,IAAaZ,EAAOa,GAAUb,E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