1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6746],{85043:function(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"startQaDashboardRegeneration"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"confirmedRevision"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"startQaDashboardRegeneration"},arguments:[{kind:"Argument",name:{kind:"Name",value:"confirmedRevision"},value:{kind:"Variable",name:{kind:"Name",value:"confirmedRevision"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"outcome"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"confirmedRevision"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"run"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"runId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetRevision"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"recoverQaDashboardRegeneration"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"runId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"reason"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"recoverQaDashboardRegeneration"},arguments:[{kind:"Argument",name:{kind:"Name",value:"runId"},value:{kind:"Variable",name:{kind:"Name",value:"runId"}}},{kind:"Argument",name:{kind:"Name",value:"reason"},value:{kind:"Variable",name:{kind:"Name",value:"reason"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"runId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"finishedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"recovery"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"recoveredAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reason"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"observedRunnerState"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:520}};n.loc.source={body:"mutation startQaDashboardRegeneration($confirmedRevision: String!) {\n startQaDashboardRegeneration(confirmedRevision: $confirmedRevision) {\n outcome\n confirmedRevision\n run {\n runId\n state\n targetRevision\n }\n }\n}\n\nmutation recoverQaDashboardRegeneration($runId: String!, $reason: String!) {\n recoverQaDashboardRegeneration(runId: $runId, reason: $reason) {\n runId\n state\n finishedAt\n updatedAt\n recovery {\n recoveredAt\n reason\n observedRunnerState\n }\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var t={};function i(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}function a(e,n){var a={kind:e.kind,definitions:[i(e,n)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var r=t[n]||new Set,s=new Set,o=new Set;for(r.forEach(function(e){o.add(e)});o.size>0;){var l=o;o=new Set,l.forEach(function(e){s.has(e)||(s.add(e),(t[e]||new Set).forEach(function(e){o.add(e)}))})}return s.forEach(function(n){var t=i(e,n);t&&a.definitions.push(t)}),a}n.definitions.forEach(function(e){if(e.name){var n=new Set;(function e(n,t){if("FragmentSpread"===n.kind)t.add(n.name.value);
1else if("VariableDefinition"===n.kind){var i=n.type;"NamedType"===i.kind&&t.add(i.name.value)}n.selectionSet&&n.selectionSet.selections.forEach(function(n){e(n,t)}),n.variableDefinitions&&n.variableDefinitions.forEach(function(n){e(n,t)}),n.definitions&&n.definitions.forEach(function(n){e(n,t)})})(e,n),t[e.name.value]=n}}),e.exports=n,e.exports.startQaDashboardRegeneration=a(n,"startQaDashboardRegeneration"),e.exports.recoverQaDashboardRegeneration=a(n,"recoverQaDashboardRegeneration")},57307:function(e){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getTestRecordings"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"testRecordingsSnapshot"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"legacySource"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"schemaVersion"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"snapshotId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"generatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sourceRevision"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sourceDirty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"manifestError"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewBrief"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"presentation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"catalog"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"evidenceIdentities"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"requiredChecklist"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"plannedGaps"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"recordings"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testFilePath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"placement"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"videoUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sizeBytes"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"renderedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"durationMs"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"contentDigest"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"testResult"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"runHome"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"chapterMarkers"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getQaDashboardOperations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"manualRetry"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!1},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"qaDashboardOperations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"manualRetry"},value:{kind:"Variable",name:{kind:"Name",value:"manualRetry"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"environment"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"snapshotId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"generatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deployedRevision"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deployedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deployedSourceUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"freshness"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reasonCode"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reason"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"snapshotRevision"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deployedRevision"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"commitCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"snapshotUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deployedUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comparisonUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"regeneration"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"allowed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reason"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"refreshRun"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"schemaVersion"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"runId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"environment"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"requestedBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"requestedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"finishedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetRevision"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sourceDirty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"candidateSnapshotId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"catalogState"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"runner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"kind"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"runId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownerId"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"counts"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"total"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"queued"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"recording"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ready"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"failed"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"items"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"recordingId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"target"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"label"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"domain"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"placement"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ordinal"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"startedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"finishedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"previewAvailable"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"failureSummary"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"failure"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"summary"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"recordingId"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"recovery"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"recoveredBy"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"displayName"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"recoveredAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reason"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"observedRunnerState"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"refreshRunStalled"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"refreshProblem"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getQaCandidatePreview"}
1,variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"runId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"recordingId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"qaCandidatePreview"},arguments:[{kind:"Argument",name:{kind:"Name",value:"runId"},value:{kind:"Variable",name:{kind:"Name",value:"runId"}}},{kind:"Argument",name:{kind:"Name",value:"recordingId"},value:{kind:"Variable",name:{kind:"Name",value:"recordingId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"runId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"recordingId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetRevision"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sourceDirty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"source"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"presentation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mediaIdentity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"videoUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"expiresAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"durationMs"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getQaActiveRecordingAccess"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"snapshotId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"recordingId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"qaActiveRecordingAccess"},arguments:[{kind:"Argument",name:{kind:"Name",value:"snapshotId"},value:{kind:"Variable",name:{kind:"Name",value:"snapshotId"}}},{kind:"Argument",name:{kind:"Name",value:"recordingId"},value:{kind:"Variable",name:{kind:"Name",value:"recordingId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snapshotId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"recordingId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mediaIdentity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"videoUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"expiresAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"durationMs"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"width"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"height"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:2650}};n.loc.source={body:"query getTestRecordings {\n testRecordingsSnapshot {\n legacySource\n schemaVersion\n snapshotId\n generatedAt\n sourceRevision\n sourceDirty\n manifestError\n reviewBrief\n presentation\n catalog\n evidenceIdentities\n requiredChecklist\n plannedGaps\n recordings {\n id\n testFilePath\n title\n label\n placement\n domain\n videoUrl\n sizeBytes\n renderedAt\n thumbnailUrl\n durationMs\n width\n height\n contentDigest\n testResult\n runHome\n chapterMarkers\n }\n }\n}\n\nquery getQaDashboardOperations($manualRetry: Boolean = false) {\n qaDashboardOperations(manualRetry: $manualRetry) {\n environment\n snapshotId\n generatedAt\n deployedRevision\n deployedAt\n deployedSourceUrl\n freshness {\n state\n reasonCode\n reason\n snapshotRevision\n deployedRevision\n commitCount\n snapshotUrl\n deployedUrl\n comparisonUrl\n }\n regeneration {\n allowed\n reason\n }
1\n refreshRun {\n schemaVersion\n runId\n environment\n state\n requestedBy {\n userId\n displayName\n }\n requestedAt\n startedAt\n finishedAt\n updatedAt\n targetRevision\n sourceDirty\n candidateSnapshotId\n catalogState\n runner {\n kind\n runId\n url\n ownerId\n }\n counts {\n total\n queued\n recording\n ready\n failed\n }\n items {\n recordingId\n target {\n title\n label\n domain\n placement\n ordinal\n }\n state\n startedAt\n finishedAt\n previewAvailable\n failureSummary\n }\n failure {\n summary\n recordingId\n }\n recovery {\n recoveredBy {\n userId\n displayName\n }\n recoveredAt\n reason\n observedRunnerState\n }\n }\n refreshRunStalled\n refreshProblem\n }\n}\n\nquery getQaCandidatePreview($runId: String!, $recordingId: String!) {\n qaCandidatePreview(runId: $runId, recordingId: $recordingId) {\n runId\n recordingId\n targetRevision\n sourceDirty\n source\n presentation\n mediaIdentity\n videoUrl\n thumbnailUrl\n expiresAt\n durationMs\n width\n height\n }\n}\n\nquery getQaActiveRecordingAccess($snapshotId: String!, $recordingId: String!) {\n qaActiveRecordingAccess(snapshotId: $snapshotId, recordingId: $recordingId) {\n snapshotId\n recordingId\n mediaIdentity\n videoUrl\n thumbnailUrl\n expiresAt\n durationMs\n width\n height\n }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var t={};function i(e,n){for(var t=0;t<e.definitions.length;t++){var i=e.definitions[t];if(i.name&&i.name.value==n)return i}}function a(e,n){var a={kind:e.kind,definitions:[i(e,n)]};e.hasOwnProperty("loc")&&(a.loc=e.loc);var r=t[n]||new Set,s=new Set,o=new Set;for(r.forEach(function(e){o.add(e)});o.size>0;){var l=o;o=new Set,l.forEach(function(e){s.has(e)||(s.add(e),(t[e]||new Set).forEach(function(e){o.add(e)}))})}return s.forEach(function(n){var t=i(e,n);t&&a.definitions.push(t)}),a}n.definitions.forEach(function(e){if(e.name){var n=new Set;(function e(n,t){if("FragmentSpread"===n.kind)t.add(n.name.value);else if("VariableDefinition"===n.kind){var i=n.type;"NamedType"===i.kind&&t.add(i.name.value)}n.selectionSet&&n.selectionSet.selections.forEach(function(n){e(n,t)}),n.variableDefinitions&&n.variableDefinitions.forEach(function(n){e(n,t)}),n.definitions&&n.definitions.forEach(function(n){e(n,t)})})(e,n),t[e.name.value]=n}}),e.exports=n,e.exports.getTestRecordings=a(n,"getTestRecordings"),e.exports.getQaDashboardOperations=a(n,"getQaDashboardOperations"),e.exports.getQaCandidatePreview=a(n,"getQaCandidatePreview"),e.exports.getQaActiveRecordingAccess=a(n,"getQaActiveRecordingAccess")},87562:function(e,n,t){"use strict";t.d(n,{O:function(){return r},e:function(){return s}});var i={"no-video":"The test failed before it produced a video.","video-missing":"The test finished but produced no video file.",timeout:"The test ran out of time.",crashed:"The browser crashed during the capture."},a=function(e){if("string"!=typeof e||!e)return{file:null,line:null};var n=/^(.*?):(\d+)(?::\d+)?$/.exec(e);return n?{file:n[1],line:Number(n[2])}:{file:e,line:null}},r=function(e){if("string"!=typeof e||!e.trim())return null;var n,t=null;if(e.trim().startsWith("{"))try{t=JSON.parse(e)}catch(e){t=null}if(!t||"object"!=typeof t)return{file:null,line:null,message:e.trim(),reason:null};var r=a(t.failingStep);return{file:r.file,line:r.line,message:("string"==typeof t.message?t.message.replace(/^Error:\s*/,"").trim():null)||null,reason:null!==(n=i[t.reason])&&void 0!==n?n:null}},s=function(e){var n,t=r(e);if(!t)return null;if(!t.file)return null!==(n=t.message)&&void 0!==n?n:"The refresh could not finish.";var i=t.line?"".concat(t.file," line ").concat(t.line):t.file;return t.message?"".concat(i," failed: ").concat(t.message):"".concat(i," failed.")}},7550:function(e,n,t){"use strict";t.d(n,{AW:function(){return l},Gx:function(){return s},Li:function(){return o},jI:function(){return i},qT:function(){return r}});var i="Kickoff QA Dashboard",a=["development","staging","growth"],r=function(e){return a.includes(e)},s=function(e,n){var t;return r(n)&&(null==e?void 0:null===(t=e.coach)||void 0===t?void 0:t.isSuperAdmin)===!0},o=function(e){return r(e)?e.charAt(0).toUpperCase()+e.slice(1):"Unknown environment"},l=function(e){return"development"===e?"Local development":r(e)?"".concat(o(e)," environment"):"Unknown environment"}},96746:function(e,n,t){"use strict";t.d(n,{t3:function(){return ee},ZP:function(){return er}});var i=t(30137),a=t(76341),r=t(67462),s=t(32207),o=t(93128),l=t(53353),d=t(72348),c=t(97582),u=t
1(85893),h=t(67294),v=t(73359),m=t(66252),p=t(6812),g=t(50319),f=t(79514),y=t(57307),b=t(85043),k=t(97585),w=t(47099),x=t(45680),j=t(87562),S=t(44604),_="documentation/testing/product-coverage/inventory.md",R="documentation/testing/product-coverage/README.md",N={journeys:[{id:"coach-activation",title:"Coach activation",summary:"One insurance dietitian completes the required onboarding gates and reaches the coach Inbox.",outcome:"The activated coach can enter the dashboard and begin work.",actors:["Coach"],startState:"The coach has a disclosed existing account with repetitive application prerequisites planted.",endState:"The same coach has completed onboarding and sees the dashboard Inbox.",fidelity:{classification:"external-event-simulated",boundaries:["Contentful reads replay recorded responses and tutorial completion uses real first-party mutations.","The visible Cloudinary upload widget is deterministic; createFile and coach-model writes are real.","Google/Nylas authorization is simulated; the callback, signInNylas mutation, grant, and scheduler-configuration writes are real.","Earlier survey answers, unrelated tutorials, and Stripe readiness are planted before recording.","Candid synchronization is locally acknowledged and no vendor outcome is claimed."]},coverageAnchors:["".concat(_,"#coach-activation")],safeguards:["".concat(R,"#critical-safeguards")],coverageStatus:"required",chapters:[{id:"coach-activation-welcome",title:"Complete the welcome tutorial",summary:"The coach requests dashboard access and completes the required RD welcome gate.",outcome:"The welcome tutorial is persisted as complete.",actors:["Coach"],startState:"The RD welcome tutorial is incomplete and dashboard access is requested.",endState:"The same coach continues into the RD application.",fidelity:{classification:"external-event-simulated",boundaries:["Tutorial content is a recorded Contentful response; its completion mutation is real."]},coverageAnchors:["".concat(_,"#coach-activation")],safeguards:[],steps:[{id:"coach-open-welcome-gate",title:"Request dashboard access"},{id:"coach-complete-welcome-tutorial",title:"Complete the welcome tutorial"}],checkpoints:[{id:"coach-welcome-tutorial-complete",title:"Welcome tutorial persisted",kind:"database",evidence:"coach_tutorials records tutorial 428 completed for the journey coach."}],primaryRecordingId:"coach-activation",supportingRecordingIds:[]},{id:"coach-activation-profile",title:"Finish the profile and client preferences",summary:"The coach adds the final profile photo, confirms the profile, completes client preferences, and sees the bounded marketplace survey.",outcome:"The profile and required client-preferences tutorial are complete.",actors:["Coach"],startState:"Earlier survey and file prerequisites are planted; Humanizing picture remains unanswered.",endState:"Profile completion is persisted and marketplace survey 26 is visibly bounded.",fidelity:{classification:"external-event-simulated",boundaries:["Earlier survey/model/file state is planted before the first frame.","Contentful and the visible Cloudinary widget are deterministic adapters; the file and coach-model writes are real.","Candid synchronization is locally acknowledged and no vendor provider outcome is claimed."]},coverageAnchors:["".concat(_,"#coach-activation")],safeguards:[],steps:[{id:"coach-upload-final-profile-photo",title:"Upload the final profile photo"},{id:"coach-review-profile",title:"Review the profile"},{id:"coach-confirm-profile",title:"Confirm the profile"},{id:"coach-complete-client-preferences",title:"Complete client preferences"},{id:"coach-bound-marketplace-survey",title:"Bound the marketplace survey"}],checkpoints:[{id:"coach-profile-photo-saved",title:"Profile photo persisted",kind:"database",evidence:"A real files row is owned by the coach user and coaches.humanizing_image_file_id references it."},{id:"coach-profile-completed",title:"Profile completion persisted",kind:"database",evidence:"coach_onboarding_requirements.profile_completed_at is set for the same coach."},{id:"coach-preferences-tutorial-complete",title:"Client preferences persisted",kind:"database",evidence:"coach_tutorials records tutorial 501 completed for the journey coach."}],primaryRecordingId:"coach-activation",supportingRecordingIds:[]},{id:"coach-activation-agreement",title:"Accept the coach agreement",summary:"A dashboard attempt reveals the agreement gate and the coach accepts through its visible control.",outcome:"The coach agreement is persisted as accepted.",actors:["Coach"],startState:"Profile gates are clear and the agreement is pending.",endState:"The agreement gate clears and calendar connection is next.",fidelity:{classification:"external-event-simulated",boundaries:["Agreement content is a recorded Contentful response; acceptance is real."]},coverageAnchors:["".concat(_,"#coach-activation")],safeguards:[],steps:[{id:"coach-enter-agreement-gate",title:"Enter the agreement gate"},{id:"coach-accept-agreement",title:"Accept the agreement"}],checkpoints:[{id:"coach-agreement-completed",title:"Agreement persisted",kind:"database",evidence:"coach_agreement_agreed_to_at is set for the journey coach."}],primaryRecordingId:"coach-activation",supportingRecordingIds:[]},{id:"coach-activation-calendar",title:"Connect the required calendar",summary:"The coach starts from an unconnected state and returns through the real first-party Nylas callback.",outcome:"The coach has a Nylas grant and one Kickoff Call configuration.",actors:["Coach"],startState:"No Nylas grant or scheduler configuration exists.",endState:"The grant and scheduler configuration are persisted.",fidelity:{classification:"external-event-simulated",boundaries:["Google/Nylas authorization is simulated; Kickoff callback, mutation, and writes are real."]},coverageAnchors:["".concat(_,"#coach-activation")],safeguards:[],steps:[{id:"coach-open-calendar-gate",title:"Open the calendar gate"},{id:"coach-start-calendar-connect",title:"Start Google connection"},{id:"coach-return-from-nylas",title:"Return through the Nylas callback"}],checkpoints:[{id:"coach-calendar-grant-stored",title:"Calendar grant persisted",kind:"database",evidence:"coaches.nylas_grant_id contains the returned grant."},{id:"coach-calendar-config-stored",title:"Scheduler configuration persisted",kind:"database",evidence:"Exactly one Kickoff Call coach_scheduler_configurations row exists."}],primaryRecordingId:"coach-activation",supportingRecordingIds:[]},{id:"coach-activation-dashboard",title:"Reach the coach Inbox",summary:"The activated insurance coach requests todos and naturally settles on Inbox.",outcome:"The dashboard Inbox is visible without an onboarding bounce.",actors:["Coach"],startState:"All recorded onboarding gates are complete.",endState:"The same coach sees the Inbox empty state.",fidelity:{classification:"real-product-flow",boun
1daries:[]},coverageAnchors:["".concat(_,"#coach-activation")],safeguards:[],steps:[{id:"coach-request-dashboard",title:"Request the dashboard"},{id:"coach-land-in-inbox",title:"Land in Inbox"}],checkpoints:[{id:"coach-dashboard-visible",title:"Dashboard Inbox visible",kind:"browser",evidence:"The Inbox primary empty state is visible with no onboarding redirect."}],primaryRecordingId:"coach-activation",supportingRecordingIds:[]}]},{id:"insurance-client-activation",title:"Insurance client activation",summary:"One insurance client creates an account, establishes eligibility, chooses a matched coach, and confirms a first session.",outcome:"The client has selected a coach and confirmed a first session.",actors:["Insurance client","Coach"],startState:"The client account does not yet exist.",endState:"The selected coach is assigned to the clientâs visible first-session booking.",fidelity:{classification:"external-event-simulated",boundaries:["Contentful survey reads use deterministic recorded responses.","Bridge eligibility HTTP responses are simulated; the application runs the real eligibility state machine.","Nylas availability is a visible, clickable test adapter.","Stripe card handling is simulated by the browser SDK adapter; first-party checkout mutations are real."]},coverageAnchors:["".concat(_,"#insurance-onboarding")],safeguards:["".concat(R,"#critical-safeguards")],coverageStatus:"required",chapters:[{id:"insurance-sign-up-and-eligibility",title:"Create an account and establish eligibility",summary:"The client completes the insurance survey and reaches an eligible result.",outcome:"The new client is eligible and has a linked eligible coach.",actors:["Insurance client"],startState:"No client account or eligibility result exists.",endState:"The same client reaches coach matching as eligible.",fidelity:{classification:"external-event-simulated",boundaries:["Contentful survey reads and Bridge HTTP responses are deterministic external adapters."]},coverageAnchors:["".concat(_,"#insurance-onboarding")],safeguards:[],steps:[{id:"insurance-create-account",title:"Create the account"},{id:"insurance-complete-survey",title:"Complete sign-up"},{id:"insurance-confirm-eligibility",title:"Confirm coverage"}],checkpoints:[{id:"insurance-client-created",title:"Client account persisted",kind:"database",evidence:"The browser session resolves to the newly created client."},{id:"insurance-eligibility-written",title:"Eligibility persisted",kind:"database",evidence:"That client reaches SERVICE_ELIGIBILITY_ELIGIBLE and is linked to the candidate coach."}],primaryRecordingId:"insurance-onboarding",supportingRecordingIds:[]},{id:"insurance-choose-coach",title:"Review and choose a coach",summary:"The eligible client reviews and confirms a real match.",outcome:"The clientâs selected coach is persisted.",actors:["Insurance client"],startState:"The eligible client has no selected coach.",endState:"The chosen coach is stored as selected_coach_id.",fidelity:{classification:"real-product-flow",boundaries:[]},coverageAnchors:["".concat(_,"#insurance-onboarding")],safeguards:[],steps:[{id:"insurance-view-match",title:"View the matched coach"},{id:"insurance-select-match",title:"Confirm the coach"}],checkpoints:[{id:"insurance-selected-coach-written",title:"Selected coach persisted",kind:"database",evidence:"clients.selected_coach_id equals the chosen coach ID."}],primaryRecordingId:"insurance-onboarding",supportingRecordingIds:[]},{id:"insurance-book-first-session",title:"Book and confirm the first session",summary:"The client visibly chooses a time, confirms checkout, and sees the scheduled summary.",outcome:"A first kickoff call exists for the client and chosen coach.",actors:["Insurance client","Coach"],startState:"The coach is selected and no first call exists.",endState:"The booked time is visible in the product summary.",fidelity:{classification:"external-event-simulated",boundaries:["Nylas availability is a visible test adapter and Stripe card handling uses the browser SDK adapter."]},coverageAnchors:["".concat(_,"#insurance-onboarding")],safeguards:[],steps:[{id:"insurance-view-availability",title:"View availability"}
1,{id:"insurance-choose-timeslot",title:"Choose a time"},{id:"insurance-confirm-appointment",title:"Confirm checkout"},{id:"insurance-view-booking-summary",title:"View confirmation"}],checkpoints:[{id:"insurance-kickoff-call-written",title:"First session persisted",kind:"database",evidence:"Exactly this client and selected coach own the new kickoff_calls row."},{id:"insurance-booking-visible",title:"Confirmation visible",kind:"browser",evidence:"The confirmation names the selected coach and the initial meeting."}],primaryRecordingId:"insurance-onboarding",supportingRecordingIds:[]}]},{id:"coach-daily-loop",title:"Coach daily loop",summary:"One coach handles one client from todayâs work through reply, scheduling, session, and follow-up.",outcome:"The client is contacted, served in the linked room, and has a saved follow-up.",actors:["Coach","Client"],startState:"A newly paying client is waiting on the coachâs work list.",endState:"The linked room is ended and a follow-up note is saved.",fidelity:{classification:"external-event-simulated",boundaries:["The browser clock is fixed to a valid messaging window.","SMS delivery uses the server development seam.","Twilio media SDK behavior and status callbacks are deterministic adapters."]},coverageAnchors:["".concat(_,"#coach-daily-loop")],safeguards:[],coverageStatus:"required",chapters:[{id:"coach-start-work",title:"Start from todayâs work",summary:"The coach opens the client named by a real work-list item.",outcome:"The coach reaches that same clientâs workspace.",actors:["Coach"],startState:"The work item is pending.",endState:"The named client and conversation are visible.",fidelity:{classification:"seeded-ui-example",boundaries:["The newly-paying work item and inbound message exist before the scene begins."]},coverageAnchors:["".concat(_,"#coach-daily-loop")],safeguards:[],steps:[{id:"coach-view-work-item",title:"View todayâs work"},{id:"coach-open-work-client",title:"Open the named client"}],checkpoints:[{id:"coach-work-client-visible",title:"Work item continuity visible",kind:"browser",evidence:"The work item name, client header, and inbound thread identify the scenario client."}],primaryRecordingId:"coach-daily-loop",supportingRecordingIds:[]},{id:"coach-reply-client",title:"Reply to the client",summary:"The coach sends a reply from the visible conversation.",outcome:"The outbound message is visible and persisted.",actors:["Coach","Client"],startState:"The clientâs inbound message is visible.",endState:"The same conversation contains the coachâs reply.",fidelity:{classification:"external-event-simulated",boundaries:["SMS vendor delivery uses the development delivery seam."]},coverageAnchors:["".concat(_,"#coach-daily-loop")],safeguards:[],steps:[{id:"coach-compose-reply",title:"Compose the reply"},{id:"coach-send-reply",title:"Send the reply"}],checkpoints:[{id:"coach-reply-written",title:"Reply persisted",kind:"database",evidence:"The outbound SMS belongs to this clientâs conversation."}],primaryRecordingId:"coach-daily-loop",supportingRecordingIds:[]},{id:"coach-schedule-session",title:"Schedule the session",summary:"The coach books the next appointment in the client workspace.",outcome:"A kickoff call exists for this coach and client.",actors:["Coach","Client"],startState:"The client has no upcoming call.",endState:"The next call is booked.",fidelity:{classification:"real-product-flow",boundaries:[]},coverageAnchors:["".concat(_,"#coach-daily-loop")],safeguards:[],steps:[{id:"coach-open-scheduler",title:"Open scheduling"},{id:"coach-save-appointment",title:"Save the appointment"}],checkpoints:[{id:"coach-call-written",title:"Call persisted",kind:"database",evidence:"The new kickoff_calls row belongs to the journey coach and client."}],primaryRecordingId:"coach-daily-loop",supportingRecordingIds:[]},{id:"coach-run-session",title:"Run and end the linked session",summary:"After a labeled time handoff, both participants appear in the linked room and the session ends.",outcome:"The scheduled call and completed room form one traceable session.",actors:["Coach","Client"],startState:"The appointment is booked but has not begun.",endState:"The corresponding room is completed.",fidelity:{classification:"external-event-simulated",boundaries:["Twilio SDK media and remote participant presence are simulated in-browser.","Twilio participant and room status callbacks are posted deterministically to the real webhook server."]},coverageAnchors:["".concat(_,"#coach-daily-loop")],safeguards:[],steps:[{id:"coach-join-linked-room",title:"Join the linked room"},{id:"coach-show-participants",title:"Show both participants"},{id:"coach-end-room",title:"End the session"}],checkpoints:[{id:"coach-call-room-linked",title:"Call and room linked",kind:"database",evidence:"kickoff_calls.meeting_room_id and meeting_rooms.kickoff_call_id point to each other."},{id:"coach-room-completed",title:"Room completed",kind:"webhook",evidence:"The room-ended callback persists completed status."}],primaryRecordingId:"coach-daily-loop",supportingRecordingIds:[]},{id:"coach-follow-up-notes",title:"Record the follow-up",summary:"The coach saves a follow-up on the same client.",outcome:"The clientâs general notes contain the session follow-up.",actors:["Coach"],startState:"The session has ended.",endState:"The follow-up is saved.",fidelity:{classification:"real-product-flow",boun
1daries:[]},coverageAnchors:["".concat(_,"#coach-daily-loop")],safeguards:[],steps:[{id:"coach-open-follow-up",title:"Open client notes"},{id:"coach-save-follow-up",title:"Save the follow-up"}],checkpoints:[{id:"coach-follow-up-written",title:"Follow-up persisted",kind:"database",evidence:"clients.coach_notes contains the visible follow-up."}],primaryRecordingId:"coach-daily-loop",supportingRecordingIds:[]}]},{id:"insured-session-revenue",title:"Insured session becomes revenue",summary:"One insured service moves from disclosed readiness through session delivery, transcript handoff, locked SOAP note, and internal encounter.",outcome:"The signed service has exactly one internal billing encounter.",actors:["Coach","Insurance client","Kickoff system"],startState:"Eligibility, consent, service, and reviewable manual note content are prepared.",endState:"The note is locked and one internal encounter exists; Candid success is not claimed.",fidelity:{classification:"external-event-simulated",boundaries:["Eligibility, consent, service, and manual note content are planted prerequisites.","Twilio SDK, status, and composition events are simulated external boundaries.","The browser harness invokes the real delayed completion job through a development-only HTTP relay.","Candid encounter submission reaches a fail-closed external boundary and is not represented as successful."]},coverageAnchors:["".concat(_,"#insured-session-paper-trail")],safeguards:["".concat(R,"#critical-safeguards")],coverageStatus:"required",chapters:[{id:"insured-readiness-and-join",title:"Establish readiness and join",summary:"A starting-state handoff discloses prerequisites before both participants appear.",outcome:"The coach and client are visible in the recording-enabled room.",actors:["Coach","Insurance client"],startState:"The pre-session prerequisites are prepared.",endState:"Both participants are present in the linked room.",fidelity:{classification:"external-event-simulated",boundaries:["Eligibility, consent, and service state are planted before the scene.","Twilio media and remote participant presence use the browser SDK adapter."]},coverageAnchors:["".concat(_,"#insured-session-paper-trail")],safeguards:["".concat(R,"#critical-safeguards")],steps:[{id:"insured-disclose-readiness",title:"Disclose readiness"},{id:"insured-join-room",title:"Join the service room"},{id:"insured-show-participants",title:"Show both participants"}],checkpoints:[{id:"insured-readiness-proven",title:"Readiness persisted",kind:"database",evidence:"The client is eligible and has checked direct consents."},{id:"insured-room-linked",title:"Service call linked",kind:"database",evidence:"The room points to the service-linked journey kickoff call."}],primaryRecordingId:"insured-session-paper-trail",supportingRecordingIds:[]},{id:"insured-session-delivery",title:"Deliver and end the session",summary:"Participant and room events cross the real webhook boundary before the real completion job runs.",outcome:"The room and kickoff call are completed with measured overlap.",actors:["Coach","Insurance client","Kickoff system"],startState:"Both participants are present.",endState:"The room and call are completed.",fidelity:{classification:"external-event-simulated",boundaries:["Twilio status callbacks are deterministic external events.","A development-only HTTP relay invokes the real delayed completion job because the browser harness has no jobs process."]},coverageAnchors:["".concat(_,"#insured-session-paper-trail")],safeguards:[],steps:[{id:"insured-start-call",title:"Start the call"},{id:"insured-end-call-ui",title:"Leave the room"},{id:"insured-complete-call-job",title:"Complete the call"}],checkpoints:[{id:"insured-room-ended",title:"Room ended",kind:"webhook",evidence:"room-ended persists completed room status."},{id:"insured-call-completed",title:"Call completed",kind:"job",evidence:"The production completion job derives and persists a 30-minute call duration."}],primaryRecordingId:"insured-session-paper-trail",supportingRecordingIds:[]},{id:"insured-recording-transcript",title:"Process recording and transcript",summary:"After an explicit system/time handoff, the composition event creates the transcript chain.",outcome:"The recording file exists and transcript processing is queued.",actors:["Kickoff system"],startState:"The completed room has no composition file.",endState:"The recording and queued transcript are linked to that room.",fidelity:{classification:"external-event-simulated",boundaries:["Twilio composition-available is posted deterministically; downstream transcript workers are not run in this recording."]},coverageAnchors:["".concat(_,"#insured-session-paper-trail")],safeguards:["".concat(R,"#critical-safeguards")],steps:[{id:"insured-processing-handoff",title:"Advance system time"},{id:"insured-store-composition",title:"Store the recording"},{id:"insured-queue-transcript",title:"Queue the transcript"}],checkpoints:[{id:"insured-transcript-queued",title:"Transcript chain queued",kind:"webhook",evidence:"The room, file, and queued file_transcript share one relationship chain."}],primaryRecordingId:"insured-session-paper-trail",supportingRecordingIds:[]},{id:"insured-soap-and-encounter",title:"Review, lock, and bill",summary:"The prepared manual note is reviewed and signed, creating one internal encounter.",outcome:"The note is visibly submitted and exactly one internal encounter exists.",actors:["Coach","Kickoff system"],startState:"The prepared manual SOAP note is unsigned.",endState:"The note is locked;
1 Candid was attempted but no vendor success is claimed.",fidelity:{classification:"external-event-simulated",boundaries:["SOAP content is planted before review.","Candid submission reaches a fail-closed simulated HTTP boundary and records a failed attempt."]},coverageAnchors:["".concat(_,"#insured-session-paper-trail")],safeguards:["".concat(R,"#critical-safeguards")],steps:[{id:"insured-review-soap",title:"Review the prepared note"},{id:"insured-sign-soap",title:"Sign and lock the note"},{id:"insured-verify-encounter",title:"Verify internal billing"}],checkpoints:[{id:"insured-note-locked",title:"Note visibly locked",kind:"browser",evidence:"The editor shows Submitted and no longer offers Sign, Lock, & Submit."},{id:"insured-one-encounter",title:"Exactly one internal encounter",kind:"database",evidence:"One client_encounters row exists for this client, service, and payer."},{id:"insured-candid-not-proven",title:"Candid outcome bounded",kind:"integration",evidence:"The internal encounter has one failed attempt and no candid_encounter_id."}],primaryRecordingId:"insured-session-paper-trail",supportingRecordingIds:[]}]}]},C=t(80026),I=t.n(C),A=function(e){return e.width>0&&e.height>0?"".concat(e.width," / ").concat(e.height):"16 / 9"},T=function(e){var n,t=e.recording,i=e.label,a=e.playerRef,r=void 0===a?null:a,s=e.initialTimeMs,o=void 0===s?0:s,l=e.onPositionChange,d=void 0===l?null:l,c=e.onPlaybackError,v=void 0===c?null:c,m=e.recordingId,p=void 0===m?null:m,g=(0,h.useRef)(null),f=function(e){null==d||d(e.currentTarget.currentTime)};return t.previewUnavailable?(0,u.jsxs)("div",{className:"".concat(I().videoFrame," ").concat(I().videoUnavailable),style:{aspectRatio:A(t)},children:[(0,u.jsx)("strong",{children:"Recording unavailable in this local preview"}),(0,u.jsx)("p",{children:"The production browser will use this itemâs own signed capture."})]}):(0,u.jsx)("div",{className:I().videoFrame,style:{aspectRatio:A(t)},children:(0,u.jsx)("video",{ref:null!=r?r:g,className:I().video,src:t.videoUrl,poster:null!==(n=t.thumbnailUrl)&&void 0!==n?n:void 0,controls:!0,preload:"metadata","aria-label":i,"data-recording-id":null!=p?p:void 0,onLoadedMetadata:function(e){var n=e.currentTarget;o>0&&(n.currentTime=o/1e3),null==d||d(n.currentTime)},onSeeking:f,onSeeked:f,onTimeUpdate:f,onError:null!=v?v:void 0})})},F={failed:I().candidateStatusFailed,planned:I().candidateStatusPlanned},P=function(e){var n,t=e.status;return t?(0,u.jsx)("span",{className:"".concat(I().candidateStatus," ").concat(null!==(n=F[t.itemState])&&void 0!==n?n:""),children:t.label}):null},M=function(e){var n=e.summary,t=e.showsPreviousCapture,i=(0,j.O)(n);return i?(0,u.jsxs)("div",{className:I().captureFailure,role:"note",children:[(0,u.jsx)("strong",{children:"Why this capture failed"}),i.file?(0,u.jsxs)("p",{children:[(0,u.jsx)("span",{children:"Test"}),(0,u.jsxs)("code",{children:[i.file,i.line?" line ".concat(i.line):""]})]}):null,i.message?(0,u.jsxs)("p",{children:[(0,u.jsx)("span",{children:"Reported"}),(0,u.jsx)("code",{children:i.message})]}):null,i.reason?(0,u.jsx)("p",{children:i.reason}):null,void 0!==t&&t?(0,u.jsx)("p",{className:I().captureFailureNotice,children:"The video here is the previous capture, from the last complete set. It does not show this failure."}):null]}):null},E=function(e){var n=e.chapters,t=e.recording,i=e.selectedChapter,a=e.timelineRef,r=e.onSelectChapter,s=e.recordingStatusById;return(0,u.jsxs)("div",{className:I().timeline,children:[(0,u.jsxs)("div",{className:I().timelineLabels,children:[(0,u.jsx)("span",{children:"Full journey"}),(0,u.jsx)("strong",{children:(0,x.LU)(t.durationMs)}),(0,u.jsxs)("span",{children:[n.length," ",1===n.length?"chapter":"chapters"]})]}),(0,u.jsxs)("div",{ref:a,className:I().timelineTrack,role:"group","aria-label":"Journey chapters",children:[n.map(function(e,n){return(0,u.jsxs)("button",{type:"button",className:"".concat(I().timelineChapter," ").concat(e.id===i.id?I().timelineChapterActive:""),style:{left:"".concat(e.segment.startMs/t.durationMs*100,"%"),width:"".concat((e.segment.endMs-e.segment.startMs)/t.durationMs*100,"%")},"aria-pressed":e.id===i.id,"aria-label":"Chapter ".concat(n+1,": ").concat(e.title,", ").concat((0,x.LU)(e.segment.startMs)," to ").concat((0,x.LU)(e.segment.endMs)).concat(s.get(e.recording.id)?", refresh status: ".concat(s.get(e.recording.id).label):""),title:"".concat(e.title).concat(s.get(e.recording.id)?" \xb7 ".concat(s.get(e.recording.id).label):""),"data-recording-id":e.recording.id,onClick:function(){return r(e)},children:["Ch ",n+1]},e.id)}),(0,u.jsx)("span",{className:I().timelinePlayhead,"aria-hidden":"true"})]}),(0,u.jsxs)("div",{className:I().timelineEnds,"aria-hidden":"true",children:[(0,u.jsx)("span",{children:"0:00"}),(0,u.jsx)("span",{children:(0,x.LU)(t.durationMs)})]})]})},D=function(e){var n=e.fidelity;return n?(0,u.jsxs)("div",{className:I().fidelity,children:[(0,u.jsx)("strong",{children:(0,x.v4)(n.classification)}),n.boundaries.length>0?(0,u.jsx)("ul",{children:n.boundaries.map(function(e){return(0,u.jsx)("li",{children:e},e)})}):(0,u.jsx)("p",{children:"No simulated external boundary is used in this evidence."})]}):(0,u.jsx)("span",{className:I().unknown,children:"Not documented"})},L=function(e){var n,t=e.item;return(0,u.jsxs)("div",{className:I().evidenceDetails,children:[(0,u.jsxs)("section",{className:I().outcomeCard,children:[(0,u.jsx)("span",{children:"Business outcome"}),(0,u.jsx)("strong",{children:null!==(n=t.outcome)&&void 0!==n?n:t.businessOutcome}),t.actors.length>
10?(0,u.jsxs)("p",{children:["Actors: ",t.actors.join(", ")]}):null]}),(0,u.jsxs)("div",{className:I().detailsGrid,children:[(0,u.jsxs)("section",{children:[(0,u.jsx)("h3",{children:"Steps shown"}),(0,u.jsx)("ol",{className:I().steps,children:t.steps.map(function(e){return(0,u.jsx)("li",{children:e.title},e.id)})})]}),(0,u.jsxs)("section",{children:[(0,u.jsx)("h3",{children:"Start and end state"}),(0,u.jsxs)("dl",{className:I().stateList,children:[(0,u.jsxs)("div",{children:[(0,u.jsx)("dt",{children:"Starts"}),(0,u.jsx)("dd",{children:t.startState})]}),(0,u.jsxs)("div",{children:[(0,u.jsx)("dt",{children:"Ends"}),(0,u.jsx)("dd",{children:t.endState})]})]})]})]}),(0,u.jsxs)("div",{className:I().disclosures,children:[(0,u.jsxs)("details",{children:[(0,u.jsx)("summary",{children:"What is real, seeded, or simulated?"}),(0,u.jsx)(D,{fidelity:t.fidelity})]}),(0,u.jsxs)("details",{children:[(0,u.jsx)("summary",{children:"Expected checkpoints"}),t.checkpoints.length>0?(0,u.jsx)("ul",{className:I().checkpoints,children:t.checkpoints.map(function(e){return(0,u.jsxs)("li",{children:[(0,u.jsx)("span",{children:e.kind}),(0,u.jsxs)("div",{children:[(0,u.jsx)("strong",{children:e.title}),(0,u.jsx)("p",{children:e.evidence})]})]},e.id)})}):(0,u.jsx)("p",{children:"No nonvisual checkpoints are documented for this item."})]})]})]})},q=function(e){var n=e.catalogJourneys,t=e.selectedJourney,i=e.selectedChapter,a=e.onSelectJourney,r=e.onSelectChapter,s=e.recordingStatusById;return(0,u.jsxs)("nav",{className:I().journeyNavigation,"aria-label":"QA journeys",children:[(0,u.jsxs)("div",{className:I().panelHeading,children:[(0,u.jsx)("span",{children:"Journeys"}),(0,u.jsx)("strong",{children:"Browse key product flows"}),(0,u.jsx)("p",{children:"Choose a journey, then a chapter."})]}),n.map(function(e,n){if("planned-gap"===e.coverageStatus)return(0,u.jsx)("div",{className:I().gapJourneyNavItem,children:(0,u.jsxs)("details",{children:[(0,u.jsxs)("summary",{children:[(0,u.jsx)("span",{className:I().journeyNumber,children:String(n+1).padStart(2,"0")}),(0,u.jsxs)("span",{className:I().journeyNavCopy,children:[(0,u.jsx)("small",{children:"Planned coverage"}),(0,u.jsx)("strong",{children:e.title}),(0,u.jsxs)("span",{children:[e.chapters.length," planned"," ",1===e.chapters.length?"chapter":"chapters"]}),(0,u.jsx)(k.Ic,{highlights:e.highlights})]})]}),(0,u.jsxs)("div",{children:[(0,u.jsx)("p",{children:e.gapReason}),(0,u.jsx)("ul",{children:e.chapters.map(function(e){return(0,u.jsxs)("li",{children:[e.title,(0,u.jsx)(k.Ic,{highlights:e.highlights})]},e.id)})}),(0,u.jsx)("small",{children:"No recording is expected for this planned work."})]})]})},e.id);var o=e.id===(null==t?void 0:t.id),l=o?t:e;return(0,u.jsxs)("div",{className:I().journeyNavItem,children:[(0,u.jsxs)("button",{type:"button",className:o?I().selectedJourney:"","aria-expanded":o,onClick:function(){return a(e)},children:[(0,u.jsx)("span",{className:I().journeyNumber,children:String(n+1).padStart(2,"0")}),(0,u.jsxs)("span",{className:I().journeyNavCopy,children:[(0,u.jsx)("small",{children:e.actors.join(" \xb7 ")}),(0,u.jsx)("strong",{children:e.title}),(0,u.jsxs)("span",{children:[e.chapters.length," ",1===e.chapters.length?"chapter":"chapters"]}),(0,u.jsx)(k.Ic,{highlights:e.highlights})]})]}),o?(0,u.jsx)("div",{className:I().chapterNavigation,children:l.chapters.map(function(e,n){return(0,u.jsxs)("button",{type:"button","aria-current":e.id===(null==i?void 0:i.id)?"page":void 0,className:e.id===(null==i?void 0:i.id)?I().selectedChapter:"","data-recording-id":e.primaryRecordingId,onClick:function(){return r(e)},children:[(0,u.jsx)("span",{className:I().chapterNumber,children:String(n+1).padStart(2,"0")}),(0,u.jsxs)("span",{children:[(0,u.jsx)("strong",{children:e.title}),e.segment?(0,u.jsx)("small",{children:(0,x.LU)(e.segment.endMs-e.segment.startMs)}):null,(0,u.jsx)(k.Ic,{highlights:e.highlights}),(0,u.jsx)(P,{status:s.get(e.primaryRecordingId)})]})]},e.id)})}):null]},e.id)})]})},B=function(e){var n,t,i=e.chapter,a=e.candidateThumbnail,r=void 0===a?null:a,s=e.journey,o=e.onSelectChapter,l=e.onPlaybackPosition,d=e.playerRef,c=e.recordingStatus,v=e.recordingStatusById,m=e.onOpenCandidate,p=void 0===m?null:m,g=e.onCandidatePlaybackError,f=void 0===g?null:g,y=(0,h.useRef)(null),b=s.chapters.findIndex(function(e){return e.id===i.id}),w=(0,h.useCallback)(function(e){var n,t,a,r=Math.max(0,Math.min(100,1e5*e/(null!==(a=null===(n=i.recording)||void 0===n?void 0:n.durationMs)&&void 0!==a?a:1)));null===(t=y.current)||void 0===t||t.style.setProperty("--playhead-position","".concat(r,"%")),l(e)},[null===(n=i.recording)||void 0===n?void 0:n.durationMs,l]);return(0,u.jsxs)("article",{className:I().chapterBrowser,children:[(0,u.jsxs)("header",{className:I().chapterHeader,children:[(0,u.jsxs)("div",{children:[(0,u.jsxs)("span",{children:["Full journey recording \xb7 Chapter ",b+1," of"," ",s.chapters.length]}),(0,u.jsx)("h2",{children:i.title}),(0,u.jsx)("p",{children:i.summary}),(0,u.jsx)(k.Ic,{highlights:i.highlights}),(0,u.jsx)(P,{status:c})]}),(0,u.jsx)("span",{className:I().fidelityPill,children:(0,x.v4)(i.fidelity.classification)})]}),i.recording?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(T,{recording:i.recording,label:"".concat(s.title,": ").concat(i.title),playerRef:d,initialTimeMs:i.segment.startMs,onPositionChange:w,onPlaybackError:"candidate"===i.recording.source?function(){return null==f?void 0:f(i.recording.id)}:null,recordingId:i.recording.id}
1),(0,u.jsx)(E,{chapters:s.chapters,recording:i.recording,selectedChapter:i,timelineRef:y,onSelectChapter:o,recordingStatusById:v})]}):(null==c?void 0:c.itemState)==="ready"&&p?(0,u.jsxs)("button",{type:"button",className:"".concat(I().candidateCardTrigger," ").concat(I().chapterCandidatePreview),"data-candidate-recording-id":i.primaryRecordingId,"data-candidate-preview-id":i.primaryRecordingId,onClick:function(){return p(i.primaryRecordingId)},children:[(0,u.jsx)("span",{className:I().candidatePlaceholder,children:r?(0,u.jsx)("img",{src:r,alt:""}):(0,u.jsx)(P,{status:c})}),(0,u.jsx)("span",{className:I().visuallyHidden,children:"Watch this capture"})]}):(0,u.jsx)("p",{className:I().chapterPlaceholder,children:null!==(t=null==c?void 0:c.label)&&void 0!==t?t:"Not captured yet"}),i.recording&&"candidate"!==i.recording.source&&(null==c?void 0:c.itemState)==="ready"&&p?(0,u.jsx)("button",{type:"button",className:I().chapterCandidateButton,"data-candidate-recording-id":i.primaryRecordingId,"data-candidate-preview-id":i.primaryRecordingId,onClick:function(){return p(i.primaryRecordingId)},children:c.previewAvailable?i.recording?"Watch the new capture":"Watch this capture":c.label}):null,(0,u.jsx)(L,{item:i})]})},V=function(e){var n=e.journeys;return 0===n.length?null:(0,u.jsxs)("section",{className:I().plannedGaps,"aria-labelledby":"planned-gaps-title",children:[(0,u.jsxs)("div",{children:[(0,u.jsx)("p",{className:I().eyebrow,children:"Coverage roadmap"}),(0,u.jsx)("h2",{id:"planned-gaps-title",children:"Planned journeys"}),(0,u.jsx)("p",{children:"These journeys are documented but do not have a composed recording yet. Nothing failed to load."})]}),(0,u.jsx)("div",{className:I().gapList,children:n.map(function(e){return(0,u.jsxs)("details",{children:[(0,u.jsxs)("summary",{children:[(0,u.jsx)("span",{children:e.title}),(0,u.jsx)("small",{children:"Planned coverage"})]}),(0,u.jsx)("p",{children:e.summary}),(0,u.jsx)("strong",{children:"Why it is not recorded yet"}),(0,u.jsx)("p",{children:e.gapReason}),(0,u.jsx)("ul",{children:e.chapters.map(function(e){return(0,u.jsxs)("li",{children:[e.title,(0,u.jsx)(k.Ic,{highlights:e.highlights})]},e.id)})})]},e.id)})})]})},O=function(e){var n=e.item,t=e.onOpen,i=e.recordingStatus;return(0,u.jsx)("article",{className:I().libraryCard,children:(0,u.jsxs)("button",{type:"button",onClick:t,"data-recording-id":n.recording.id,"aria-label":"Watch ".concat(n.title).concat(n.recording.thumbnailUrl?"":". Thumbnail unavailable."),children:[(0,u.jsxs)("span",{className:I().thumbnail,style:{aspectRatio:A(n.recording)},children:[n.recording.thumbnailUrl?(0,u.jsx)("img",{src:n.recording.thumbnailUrl,alt:"",loading:"lazy"}):(0,u.jsxs)("span",{className:I().thumbnailPlaceholder,children:[(0,u.jsx)("strong",{children:"Thumbnail unavailable"}),(0,u.jsx)("small",{children:"Open to play the recording"})]}),(0,u.jsx)("span",{className:I().playBadge,"aria-hidden":"true",children:"â¶"})]}),(0,u.jsxs)("span",{className:I().libraryCardCopy,children:[(0,u.jsx)("strong",{children:n.title}),(0,u.jsx)("span",{children:n.summary}),(0,u.jsx)(k.Ic,{highlights:n.highlights}),(0,u.jsx)(P,{status:i}),(0,u.jsxs)("small",{children:[(0,x.LU)(n.recording.durationMs)," \xb7 ",n.domain]})]})]})})},U=function(e){var n=e.item,t=e.items,i=e.onSelect,a=e.onClose,r=e.recordingStatus,s=(0,h.useRef)(null),o=(0,h.useRef)(null),l=t.findIndex(function(e){return e.id===n.id}),d=l>0?t[l-1]:null,c=l>=0&&l<t.length-1?t[l+1]:null;return(0,h.useEffect)(function(){var e=s.current;return o.current=document.activeElement,e&&!e.open&&e.showModal(),function(){var n;(null==e?void 0:e.open)&&e.close(),null===(n=o.current)||void 0===n||n.focus()}},[]),(0,u.jsx)("dialog",{ref:s,className:I().libraryDialog,"aria-labelledby":"library-dialog-title",onCancel:function(e){e.preventDefault(),a()},onClick:function(e){e.target===e.currentTarget&&a()},children:(0,u.jsxs)("div",{className:I().dialogSurface,children:[(0,u.jsxs)("header",{className:I().dialogHeader,children:[(0,u.jsxs)("div",{children:[(0,u.jsx)("span",{children:n.domain}),(0,u.jsx)("h2",{id:"library-dialog-title",children:n.title}),(0,u.jsx)("p",{children:n.summary}),(0,u.jsx)(k.Ic,{highlights:n.highlights}),(0,u.jsx)(P,{status:r})]}),(0,u.jsx)("button",{type:"button",onClick:a,"aria-label":"Close recording",children:"Close"})]}
1),(0,u.jsxs)("div",{className:I().dialogBody,children:[(null==r?void 0:r.itemState)==="failed"?(0,u.jsx)(M,{summary:r.failureSummary,showsPreviousCapture:!0}):null,(0,u.jsx)(T,{recording:n.recording,recordingId:n.recording.id,label:n.title}),(0,u.jsxs)("div",{className:I().libraryFacts,children:[(0,u.jsx)("span",{children:(0,x.LU)(n.recording.durationMs)}),(0,u.jsx)("span",{children:n.domain}),n.fidelity?(0,u.jsx)("span",{children:(0,x.v4)(n.fidelity.classification)}):null]}),n.businessOutcome?(0,u.jsx)(L,{item:n}):null]}),(0,u.jsxs)("footer",{className:I().dialogNavigation,children:[(0,u.jsxs)("p",{children:[l+1," of ",t.length," in this view"]}),(0,u.jsxs)("div",{children:[(0,u.jsx)("button",{type:"button",disabled:!d,onClick:function(){return i(d)},children:"â Previous"}),(0,u.jsx)("button",{type:"button",disabled:!c,onClick:function(){return i(c)},children:"Next â"})]})]})]})})},J=function(e){var n=e.items,t=e.legacy,i=void 0!==t&&t,a=e.recordingStatusById,r=(0,o._)((0,h.useState)(""),2),s=r[0],l=r[1],d=(0,o._)((0,h.useState)(""),2),c=d[0],v=d[1],m=(0,o._)((0,h.useState)(null),2),p=m[0],g=m[1],f=(0,h.useMemo)(function(){return(0,x.ms)(n)},[n]),y=(0,h.useMemo)(function(){return n.reduce(function(e,n){var t;return e.set(n.domain,(null!==(t=e.get(n.domain))&&void 0!==t?t:0)+1),e},new Map)},[n]),b=(0,h.useMemo)(function(){return(0,x.jf)(n,s,c)},[c,n,s]),k=(0,h.useMemo)(function(){return(0,x.Pd)(b)},[b]),w=(0,h.useMemo)(function(){return k.flatMap(function(e){return e.items})},[k]),j=w.find(function(e){return e.id===p});return(0,u.jsxs)("section",{className:I().library,"aria-labelledby":"recording-library-title",children:[(0,u.jsxs)("div",{className:I().libraryHeading,children:[(0,u.jsxs)("div",{children:[(0,u.jsx)("p",{className:I().eyebrow,children:i?"Legacy snapshot":"All other evidence"}),(0,u.jsx)("h2",{id:"recording-library-title",children:i?"QA video library":"Standalone QA videos"}),(0,u.jsx)("p",{children:i?"This older snapshot has no journey catalog. Every published recording remains available here.":"Browse every published recording that is not part of a journey."})]}),(0,u.jsxs)("span",{className:I().libraryCount,children:[n.length," ",1===n.length?"video":"videos"]})]}),n.length>0?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:I().libraryControls,children:[(0,u.jsxs)("label",{children:[(0,u.jsx)("span",{children:"Search videos"}),(0,u.jsx)("input",{type:"search",value:s,placeholder:"Search title, summary, or test",onChange:function(e){return l(e.target.value)}})]}),(0,u.jsxs)("div",{className:I().categoryFilters,role:"group","aria-label":"Filter by product area",children:[(0,u.jsx)("span",{children:"Product area"}),(0,u.jsxs)("div",{children:[(0,u.jsxs)("button",{type:"button","aria-pressed":""===c,onClick:function(){return v("")},children:["All videos ",(0,u.jsx)("small",{children:n.length})]}),f.map(function(e){return(0,u.jsxs)("button",{type:"button","aria-pressed":c===e,onClick:function(){return v(e)},children:[e," ",(0,u.jsx)("small",{children:y.get(e)})]},e)})]})]}),(0,u.jsxs)("p",{"aria-live":"polite",children:[b.length," ",1===b.length?"result":"results"]})]}),k.length>0?(0,u.jsx)("div",{className:I().libraryGroups,children:k.map(function(e){return(0,u.jsxs)("section",{className:I().libraryGroup,children:[(0,u.jsx)("h3",{children:e.domain}),(0,u.jsx)("div",{className:I().libraryGrid,children:e.items.map(function(e){return(0,u.jsx)(O,{item:e,onOpen:function(){return g(e.id)},recordingStatus:a.get(e.recording.id)},e.id)})})]},e.domain)})}):(0,u.jsxs)("div",{className:I().noResults,children:[(0,u.jsx)("strong",{children:"No videos match these filters."}),(0,u.jsx)("button",{type:"button",onClick:function(){l(""),v("")},children:"Clear filters"})]})]}):(0,u.jsx)("p",{className:I().emptyLibrary,children:"No standalone videos are published."}),j?(0,u.jsx)(U,{item:j,items:w,onSelect:function(e){return g(e.id)},onClose:function(){return g(null)},recordingStatus:a.get(j.recording.id)}):null]})},H=function(e){return"journeyChapter"===e.kind?"chapter:".concat(e.chapter.id):"standalone:".concat(e.item.id)},Q=function(e,n){var t=null==e?void 0:e.catalog,i=Array.isArray(null==e?void 0:e.evidenceIdentities)?e.evidenceIdentities:[];if(!(null!==(h=null==e?void 0:e.recordings)&&void 0!==h?h:[]).some(function(e){return e.id===n}))return null;if(!t||!Array.isArray(t.journeys))return{recordingId:n,contexts:[],evidenceIdentities:[]};var a=[],r=[],o=0,l=!0,c=!1,u=void 0;try{for(var h,v,m=t.journeys[Symbol.iterator]();!(l=(v=m.next()).done);l=!0){var p=function(){var e=v.value;if("required"!==e.coverageStatus)return"continue";var t=e.chapters,l=(0,s._)(e,["chapters"]),c=!0,u=!1,h=void 0;try{for(var m,p=t[Symbol.iterator]();!(c=(m=p.next()).done);c=!0){var g=function(){var e=m.value;if(e.primaryRecordingId!==n)return o+=1,"continue";
1var t=i.find(function(t){return t.recordingId===n&&"chapter"===t.targetType&&t.targetId===e.id});if(!t)return{v:null};r.push(t),a.push({kind:"journeyChapter",recordingId:n,journey:l,chapter:e,authoredOrder:o,playableRange:t.playableSegment,evidenceIdentityIds:[t.evidenceId]}),o+=1}();if("object"===(0,d._)(g))return{v:g.v}}}catch(e){u=!0,h=e}finally{try{c||null==p.return||p.return()}finally{if(u)throw h}}}();if("object"===(0,d._)(p))return p.v}}catch(e){c=!0,u=e}finally{try{l||null==m.return||m.return()}finally{if(c)throw u}}var g=!0,f=!1,y=void 0;try{for(var b,k,w=(null!==(b=t.standaloneItems)&&void 0!==b?b:[])[Symbol.iterator]();!(g=(k=w.next()).done);g=!0){var x=function(){var e=k.value;if(e.recordingId!==n)return o+=1,"continue";var t=i.find(function(t){return t.recordingId===n&&"standalone"===t.targetType&&t.targetId===e.id});if(!t)return{v:null};r.push(t),a.push({kind:"standalone",recordingId:n,item:e,authoredOrder:o,playableRange:t.playableSegment,evidenceIdentityIds:[t.evidenceId]}),o+=1}();if("object"===(0,d._)(x))return x.v}}catch(e){f=!0,y=e}finally{try{g||null==w.return||w.return()}finally{if(f)throw y}}return{recordingId:n,contexts:a,evidenceIdentities:r}},G=function(e,n){return["failed","cancelled"].includes(null==e?void 0:e.state)?"notActivated":(null==e?void 0:e.state)==="succeeded"&&e.candidateSnapshotId?e.candidateSnapshotId===(null==n?void 0:n.snapshotId)?"activated":"handoff":"candidate"},z={candidate:{title:"Candidate preview",status:"Not active yet"},handoff:{title:"New recording set active",status:"Library loading"},activated:{title:"Current active capture",status:null},notActivated:{title:"Candidate preview",status:"Captured, set not activated"},superseded:{title:"Candidate preview",status:null}},W=function(e){var n,t,s,l,d,m,p,g,f=e.item,b=e.run,k=e.snapshot,w=e.onClose,j=e.onPreviewFailure,S=(0,h.useRef)(null),_=(0,h.useRef)(null),R=(0,h.useRef)(null),N=(0,o._)((0,h.useState)("candidate"),2),C=N[0],A=N[1],F=(0,o._)((0,h.useState)(null),2),P=F[0],M=F[1],E=(0,o._)((0,h.useState)(null),2),q=E[0],B=E[1],V=(0,o._)((0,h.useState)(!1),2),O=V[0],U=V[1],J=(0,o._)((0,h.useState)(null),2),W=J[0],$=J[1],Y=(0,o._)((0,h.useState)(null),2),Z=Y[0],X=Y[1],ee=(0,o._)((0,h.useState)(0),2),en=ee[0],et=ee[1],ei=(0,o._)((0,h.useState)(""),2),ea=ei[0],er=ei[1],es=(0,o._)((0,h.useState)({candidate:null,active:null}),2),eo=es[0],el=es[1],ed=(0,o._)((0,v.t)(y.getQaCandidatePreview,{fetchPolicy:"network-only"}),2),ec=ed[0],eu=ed[1],eh=(0,o._)((0,v.t)(y.getQaActiveRecordingAccess,{fetchPolicy:"network-only"}),2),ev=eh[0],em=eh[1],ep=f.recordingId,eg=null!==(s=null==k?void 0:k.snapshotId)&&void 0!==s?s:null,ef=(0,h.useRef)(null!==(l=null==b?void 0:b.runId)&&void 0!==l?l:null),ey=(null==b?void 0:b.runId)===ef.current?b:null,eb=(0,h.useRef)(b);ey&&(eb.current=ey);var ek=ey?G(ey,k):"superseded",ew=(0,h.useMemo)(function(){return Q(k,ep)},[ep,k]),ex=!!ey&&("candidate"===ek||"handoff"===ek),ej=!!ey&&!!eg&&("candidate"===ek||"activated"===ek||"notActivated"===ek),eS=(0,h.useCallback)((0,i._)(function(){var e,n,t,i,s;return(0,c.Jh)(this,function(o){switch(o.label){case 0:if(!ex)return[2,!1];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,ec({variables:{runId:ef.current,recordingId:ep}})];case 2:if(!(i=null===(e=o.sent().data)||void 0===e?void 0:e.qaCandidatePreview))throw Error("Candidate preview is unavailable");return M(function(e){return(null==e?void 0:e.mediaIdentity)===i.mediaIdentity&&Date.parse(e.expiresAt)>Date.now()+3e5?e:i}),s=null===(t=i.presentation)||void 0===t?void 0:null===(n=t.contexts)||void 0===n?void 0:n[0],X(function(e){return null!=e?e:s?H(s):null}),el(function(e){return(0,r._)((0,a._)({},e),{candidate:null})}),null==j||j(ep,!1),[2,i];case 3:return o.sent(),el(function(e){return(0,r._)((0,a._)({},e),{candidate:"Candidate preview unavailable"})}),null==j||j(ep,!0),[2,!1];case 4:return[2]}})}),[ex,ec,j,ep]),e_=(0,h.useCallback)((0,i._)(function(){var e,n;return(0,c.Jh)(this,function(t){switch(t.label){case 0:if(!ej)return U(!0),[2,!1];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,ev({variables:{snapshotId:eg,recordingId:ep}})];case 2:if(!(n=null===(e=t.sent().data)||void 0===e?void 0:e.qaActiveRecordingAccess))throw Error("Current active capture is unavailable");return B(function(e){return(null==e?void 0:e.mediaIdentity)===n.mediaIdentity&&Date.parse(e.expiresAt)>Date.now()+3e5?e:n}),$(ew),U(!1),el(function(e){return(0,r._)((0,a._)({},e),{active:null})}),[2,!0];case 3:return t.sent(),el(function(e){return(0,r._)((0,a._)({},e),{active:"Current active capture unavailable"})}),[2,!1];case 4:return[2]}})}),[ej,ew,ev,ep,eg]),eR=(0,h.useCallback)((0,i._)(function(){var e,n;return(0,c.Jh)(this,function(t){switch(t.label){case 0:if("activated"!==ek||!ej)return[2,!1];t.label=1;case 1:return t.trys.push([1,3,,4]),[4,ev({variables:{snapshotId:eg,recordingId:ep}})];case 2:if(!(n=null===(e=t.sent().data)||void 0===e?void 0:e.qaActiveRecordingAccess))throw Error("Active recording access is unavailable");return M(function(e){return(0,a._)({},e,n)}),el(function(e){return(0,r._)((0,a._)({},e),{candidate:null})}),[2,!0];case 3:return t.sent(),el(function(e){return(0,r._)((0,a._)({},e),{candidate:"Candidate preview unavailable"})}),[2,!1];case 4:return[2]}})}),[ej,ev,ek,ep,eg]);(0,h.useEffect)(function(){_.current=document.activeElement;var e=S.current;return e&&!e.open&&e.showModal(),function(){var n;(null==e?void 0:e.open)&&e.close(),null===(n=_.current)||void 0===n||n.focus()}},[]),(0,h.useEffect)(function(){eS()},[ep]),(0,h.useEffect)(function(){"handoff"===ek&&"active"===C&&U(!0)},[ek,C]);var eN="candidate"===C?null==P?void 0:P.presentation:null!=W?W:ew,eC=null!==(d=null==eN?void 0:eN.contexts)&&void 0!==d?d:[],eI=null!==(p=null!==(m=eC.find(function(e){return H(e)===Z}))&&void 0!==m?m:eC[0])&&void 0!==p?p:null,eA="candidate"===C?P:q,eT=(null==eI?void 0:eI.kind)==="journeyChapter"?eI.chapter:null==eI?void 0:eI.item,eF=O?"Previous active capture":"Current active capture",eP="candidate"===C?"activated"===ek?"current active capture":"new capture":eF.toLowerCase(),eM=(n=(0,i._)(function(e){var n,t,i,a,r,s,o,l,d,u,h,v,m,p,g,f;return(0,c.Jh)(this,function(c){switch(c.label){case 0:if(e===C)return[2];if(t=null==eI?void 0:eI.playableRange,a=(null!==(i=null===(n=R.current)||void 0===n?void 0:n.currentTime)&&void 0!==i?i:0)*1e3,r="active"===e?ew:null==P?void 0:P.presentation,"active"!==e)return[3,3];if(s=!ew)return[3,2];return[4,e_()];case 1:s=!c.sent(),c.label=2;case 2:if(s)return[2];return r=ew,[3,5];case 3:if(P)return[3,5];return[4,eS()];case 4:if(!(o=c.sent()))return[2];r=o.presentation,c.label=5;case 5:return v=null!==(h=null!=(u=(d=null!==(l=null==r?void 0:r.contexts)&&void 0!==l?l:[]).find(function(e){return H(e)===Z}))?u:d[0])&&void 0!==h?h:null,u?(p=(m=t?t.endMs-t.startMs:0)?Math.min(1,Math.max(0,(a-t.startMs)/m)):0,g=v.playableRange.endMs-v.playableRange.startMs,et(v.playableRange.startMs+p*g),er("")):(et(null!==(f=null==v?void 0:v.playableRange.startMs)&&void 0!==f?f:0),er(v?"The matching section is not in this capture. Showing the first section.":"This capture has no authored sections.")),X(v?H(v):null),A(e),[2]}})}),function(e){return n.apply(this,arguments)});(0,h.useEffect)(function(){if((null==eA?void 0:eA.expiresAt)&&("active"!==C||!O&&ej)&&("candidate"!==C||ex||"activated"===ek)){var e=Math.max(3e4,Date.parse(eA.expiresAt)-Date.now()-3e5),n=window.setTimeout(function(){var e,n;et((null!==(n=null===(e=R.current)||void 0===e?void 0:e.currentTime)&&void 0!==n?n:0)*1e3),"candidate"===C&&ex?eS():"candidate"===C&&"activated"===ek?eR():"active"===C&&e_()},e);return function(){return window.clearTimeout(n)}}},[null==eA?void 0:eA.expiresAt,ej,O,ex,ek,ep,eR,e_,eS,eg,C]);var eE="candidate"===C?eu.loading:em.loading;return(0,u.jsx)("dialog",{ref:S,className:I().libraryDialog,"aria-labelledby":"
1candidate-preview-title",onCancel:function(e){e.preventDefault(),w()},onClick:function(e){e.target===e.currentTarget&&w()},children:(0,u.jsxs)("div",{className:I().dialogSurface,children:[(0,u.jsxs)("header",{className:I().dialogHeader,children:[(0,u.jsxs)("div",{children:[(0,u.jsx)("span",{children:f.target.domain}),(0,u.jsx)("h2",{id:"candidate-preview-title",children:f.target.label}),(0,u.jsx)("p",{children:f.target.title}),(0,u.jsx)("strong",{children:"activated"===ek&&"active"===C&&O?"Previous active capture":z[ek].title}),"superseded"===ek?(0,u.jsx)("p",{children:(null==(t=eb.current)?void 0:t.state)==="succeeded"?"This capture belongs to an earlier refresh that finished":"Captured, set not activated"}):z[ek].status?(0,u.jsx)("p",{children:z[ek].status}):null,(null==P?void 0:P.targetRevision)?(0,u.jsxs)("p",{className:I().candidateRevision,children:["Target revision ",P.targetRevision.slice(0,7),P.sourceDirty?" \xb7 includes uncommitted local source changes":" \xb7 no uncommitted local source changes"]}):null]}),(0,u.jsx)("button",{type:"button",onClick:w,"aria-label":"Close candidate preview",children:"Close"})]}),(0,u.jsxs)("div",{className:I().dialogBody,children:[("activated"!==ek||O)&&ew?(0,u.jsxs)("div",{role:"group","aria-label":"Recording source",className:I().sourceSwitch,children:[(0,u.jsx)("button",{type:"button","aria-pressed":"candidate"===C,onClick:function(){eM("candidate")},children:"activated"===ek?"Current active capture":"New capture"}),(0,u.jsx)("button",{type:"button","aria-pressed":"active"===C,disabled:"active"!==C&&!ej,onClick:function(){eM("active")},children:eF})]}):null,[{key:"candidate",message:eo.candidate,retryable:ex||ej,retryLabel:"Retry new capture",retry:function(){return"candidate"!==C?eM("candidate"):ex?eS():eR()}},{key:"active",message:eo.active,retryable:ej&&!O,retryLabel:"Retry ".concat(eF.toLowerCase()),retry:function(){return"active"===C?e_():eM("active")}}].filter(function(e){return e.message}).map(function(e){return(0,u.jsxs)("div",{role:"alert",className:I().candidatePreviewError,children:[(0,u.jsx)("strong",{children:e.message}),e.retryable?(0,u.jsx)("button",{type:"button",onClick:function(){e.retry()},children:e.retryLabel}):null]},e.key)}),!eA&&eE?(0,u.jsxs)("p",{role:"status",children:["Loading ",eP,"â¦"]}):null,eA?(0,u.jsx)(T,{recording:eA,recordingId:ep,label:"".concat(f.target.label,", ").concat(eP),playerRef:R,initialTimeMs:en}):null,(0,u.jsxs)("p",{className:I().candidateSourceCaption,children:["Playing:"," ","candidate"===C?"New capture":eF]}),eC.length>1?(0,u.jsxs)("label",{children:[(0,u.jsx)("span",{children:"Section in this recording"}
1),(0,u.jsx)("select",{value:eI?H(eI):"",onChange:function(e){var n=eC.find(function(n){return H(n)===e.target.value});n&&(X(e.target.value),et(n.playableRange.startMs),R.current&&(R.current.currentTime=n.playableRange.startMs/1e3))},children:eC.map(function(e){return(0,u.jsx)("option",{value:H(e),children:"journeyChapter"===e.kind?"".concat(e.journey.title,": ").concat(e.chapter.title):e.item.title},H(e))})})]}):null,(null==eI?void 0:eI.kind)==="journeyChapter"?(0,u.jsxs)("div",{className:I().candidateJourneyContext,children:[(0,u.jsxs)("p",{children:[eI.journey.title,": ",eI.chapter.title]}),(0,u.jsx)("p",{children:eI.journey.summary}),(0,u.jsxs)("p",{children:["Journey outcome: ",eI.journey.outcome]}),(0,u.jsxs)("p",{children:["Journey actors: ",eI.journey.actors.join(", ")]}),(0,u.jsxs)("p",{children:["Journey starts: ",eI.journey.startState]}),(0,u.jsxs)("p",{children:["Journey ends: ",eI.journey.endState]}),(0,u.jsx)(D,{fidelity:eI.journey.fidelity}),(0,u.jsx)(K,{item:eI.journey})]}):null,eI?(0,u.jsxs)("p",{className:I().candidateRange,children:["Plays ",(0,x.LU)(eI.playableRange.startMs)," to"," ",(0,x.LU)(eI.playableRange.endMs)]}):null,eT?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("p",{children:eT.summary}),(0,u.jsx)(L,{item:eT}),(0,u.jsx)(K,{item:eT,evidenceIds:null!==(g=null==eI?void 0:eI.evidenceIdentityIds)&&void 0!==g?g:[]})]}):null,(0,u.jsx)("p",{className:I().visuallyHidden,"aria-live":"polite",children:ea})]})]})})},K=function(e){var n,t,i=e.item,a=e.evidenceIds,r=void 0===a?[]:a;return(0,u.jsxs)("dl",{className:I().candidateAssurances,children:[(null===(n=i.safeguards)||void 0===n?void 0:n.length)>0?(0,u.jsxs)("div",{children:[(0,u.jsx)("dt",{children:"Safeguards"}),(0,u.jsx)("dd",{children:(0,u.jsx)("ul",{children:i.safeguards.map(function(e){return(0,u.jsx)("li",{children:e},e)})})})]}):null,(null===(t=i.coverageAnchors)||void 0===t?void 0:t.length)>0?(0,u.jsxs)("div",{children:[(0,u.jsx)("dt",{children:"Coverage anchors"}),(0,u.jsx)("dd",{children:i.coverageAnchors.join(", ")})]}):null,r.length>0?(0,u.jsxs)("div",{children:[(0,u.jsx)("dt",{children:"Evidence identity"}),(0,u.jsx)("dd",{children:(0,u.jsx)("ul",{children:r.map(function(e){return(0,u.jsx)("li",{children:(0,u.jsx)("code",{children:e})},e)})})})]}):null]})},$=function(e){var n=e.hasActiveSnapshot,t=e.items,i=e.planned,s=void 0!==i&&i,l=e.thumbnails,d=void 0===l?new Map:l,c=e.previewItems,v=e.previewFailedIds,m=e.onOpenPreview,p=e.onCandidateBlur,g=e.onCandidateFocus,f=(0,o._)((0,h.useState)(""),2),y=f[0],b=f[1],k=(0,o._)((0,h.useState)(""),2),x=k[0],j=k[1],S=(0,h.useMemo)(function(){return(0,w.u7)(t)},[t]),_=(0,h.useMemo)(function(){return t.reduce(function(e,n){var t;return e.set(n.target.domain,(null!==(t=e.get(n.target.domain))&&void 0!==t?t:0)+1),e},new Map)},[t]),R=(0,h.useMemo)(function(){return(0,w.Te)(t,y,x)},[x,t,y]),N=(0,h.useMemo)(function(){return(0,w.k6)(R)},[R]);return 0===t.length&&0===c.length?null:(0,u.jsxs)("section",{className:I().candidateLibrary,"aria-labelledby":"candidate-recordings-title",children:[(0,u.jsxs)("div",{className:I().libraryHeading,children:[(0,u.jsxs)("div",{children:[(0,u.jsx)("p",{className:I().eyebrow,children:s?"Planned recording set":"Candidate recording set"}),(0,u.jsx)("h2",{id:"candidate-recordings-title",children:s?"Focused recordings this environment will capture":n?"New recordings in this refresh":"Recordings in this refresh"}),(0,u.jsx)("p",{children:s?"Nothing is captured yet. Start the first set and each recording becomes watchable here as it finishes.":n?"Watch each new capture as it becomes available. The current complete set stays active until every recording finishes.":"Watch each capture as it becomes available. These become the library once every recording finishes."})]}),(0,u.jsx)("span",{className:I().libraryCount,children:s?"".concat(t.length," planned"):"".concat(c.length," ready to preview")})]}),(0,u.jsxs)("div",{className:I().candidateControls,children:[(0,u.jsxs)("label",{children:[(0,u.jsx)("span",{children:"Search recordings"}),(0,u.jsx)("input",{type:"search",value:y,placeholder:s?"Search planned recordings":"Search this refresh",onChange:function(e){return b(e.target.value)}})]}),(0,u.jsxs)("div",{className:I().categoryFilters,role:"group","aria-label":"Filter by product area",children:[(0,u.jsx)("span",{children:"Product area"}),(0,u.jsxs)("div",{children:[(0,u.jsxs)("button",{type:"button","aria-pressed":""===x,onClick:function(){return j("")},children:["All recordings ",(0,u.jsx)("small",{children:t.length})]}),S.map(function(e){return(0,u.jsxs)("button",{type:"button","aria-pressed":x===e,onClick:function(){return j(e)},children:[e," ",(0,u.jsx)("small",{children:_.get(e)})]},e)})]})]}),(0,u.jsxs)("p",{"aria-live":"polite",children:[R.length," ",1===R.length?"result":"results"]})]}),R.length>0?N.map(function(e){return(0,u.jsxs)("section",{className:I().candidateGroup,children:[(0,u.jsxs)("h3",{children:[e.title,(0,u.jsx)("span",{children:e.items.length})]}),(0,u.jsx)("ul",{className:I().candidateGrid,children:e.items.map(function(e){var n=!0===e.previewAvailable;return(0,u.jsx)("li",{children:(0,u.jsxs)("article",{className:I().candidateCard,children:[(0,u.jsxs)("button",{type:"button",className:I().candidateCardTrigger,"data-candidate-recording-id":e.recordingId,"data-candidate-preview-id":n?e.recordingId:void 0,disabled:!n,onBlur:p,onFocus:function(){return g(e.recordingId)},onClick:function(){return m(e)},children:[(0,u.jsx)("span",{className:"".concat(I().candidatePlaceholder," ").concat("planned"===e.status.itemState?I().candidatePlaceholderPlanned:""),style:{aspectRatio:"16 / 9"},children:d.get(e.recordingId)?(0,u.jsx)("img",{src:d.get(e.recordingId),alt:"",loading:"lazy"}):(0,u.jsx)(P,{status:(0,r._)((0,a._)({},e.status),{label:v.has(e.recordingId)?"Candidate preview unavailable":e.status.label})})}),(0,u.jsxs)("span",{className:I().candidateCardCopy,children:[(0,u.jsx)("strong",{children:e.target.label}),(0,u.jsx)("span",{children:e.target.title}),(0,u.jsx)("span",{className:I().candidateDomain,children:e.target.domain})]})]}),e.failureSummary?(0,u.jsx)(M,{summary:e.failureSummary,showsPreviousCapture:e.status.activeEvidence}):null]})},e.recordingId)})})]},e.key)}):(0,u.jsxs)("div",{className:I().candidateEmpty,children:[(0,u.jsx)("p",{children:"No recordings match this search."}),(0,u.jsx)("button",{type:"button",onClick:function(){b(""),j("")},children:"Clear filters"})]})]})},Y=function(e){var n=e.environment,t=e.message;return(0,u.jsxs)(k.Rc,{environment:n,eyebrow:"Dashboard update required",status:"This QA snapshot cannot be displayed safely.",children:[(0,u.jsx)("p",{children:t}),(0,u.jsx)("p",{children:"Update the dashboard reader before reviewing this snapshot. No partial journey view has been rendered."})]})},Z=function(e){var n,t,i,s,l=e.candidatePreviews,d=void 0===l?null:l,c=e.candidateThumbnails,v=void 0===c?null:c,m=e.catalogJourneys,p=e.journeys,g=e.recordingStatusById,f=e.onOpenCandidate,y=e.onCandidatePlaybackError,b=(0,h.useRef)(null),k=(0,o._)((0,h.useState)(null),2),w=k[0],j=k[1],S=(0,o._)((0,h.useState)(null),2),_=S[0],R=S[1],N=(0,h.useMemo)(function(){return p.map(function(e){var n,t,i=new Set(e.chapters.map(function(e){return e.primaryRecordingId}));if(1!==i.size)return e;
1var s=(0,o._)(i,1)[0],l=null==d?void 0:d.get(s),c=null==l?void 0:null===(t=l.presentation)||void 0===t?void 0:null===(n=t.contexts)||void 0===n?void 0:n.filter(function(e){return"journeyChapter"===e.kind&&e.recordingId===s});if(!(null==l?void 0:l.videoUrl)||!Array.isArray(c))return e;var u=new Map(c.map(function(e){return[e.chapter.id,e]}));if(!e.chapters.every(function(e){return u.has(e.id)}))return e;var h=u.get(e.chapters[0].id),v=(0,r._)((0,a._)({},l),{id:s});return(0,r._)((0,a._)({},e,h.journey),{highlights:e.highlights,chapters:e.chapters.map(function(e){var n=u.get(e.id);return(0,r._)((0,a._)({},e,n.chapter),{highlights:e.highlights,recording:v,segment:n.playableRange})})})})},[d,p]),C=null!==(t=null!==(n=N.find(function(e){return e.id===w}))&&void 0!==n?n:N[0])&&void 0!==t?t:null,A=null!==(s=null!==(i=null==C?void 0:C.chapters.find(function(e){return e.id===_}))&&void 0!==i?i:null==C?void 0:C.chapters[0])&&void 0!==s?s:null,T=(0,h.useCallback)(function(e){R(e.id);var n=b.current;e.segment&&(null==n?void 0:n.readyState)>=1&&(n.currentTime=e.segment.startMs/1e3)},[]),F=(0,h.useCallback)(function(e){if(C){var n=(0,x.lf)(C.chapters,1e3*e);n&&R(function(e){return e===n.id?e:n.id})}},[C]);return C&&A?(0,u.jsxs)("main",{className:I().journeyWorkspace,children:[(0,u.jsx)(q,{catalogJourneys:m,selectedJourney:C,selectedChapter:A,onSelectJourney:function(e){var n,t;j(e.id),R(null!==(t=null===(n=e.chapters[0])||void 0===n?void 0:n.id)&&void 0!==t?t:null)},onSelectChapter:T,recordingStatusById:g}),(0,u.jsx)(B,{chapter:A,candidateThumbnail:null==v?void 0:v.get(A.primaryRecordingId),journey:C,onSelectChapter:T,onPlaybackPosition:F,playerRef:b,recordingStatus:g.get(A.primaryRecordingId),recordingStatusById:g,onOpenCandidate:void 0===f?null:f,onCandidatePlaybackError:void 0===y?null:y})]}):null},X=function(e){var n=e.environment,t=e.legacySource,i=e.operationsState,a=e.snapshotId,r=e.view,s=e.headingRef,o=e.refreshProgress,l=e.onOpenCandidate,d=(0,u.jsx)(Z,{catalogJourneys:r.catalogJourneys,journeys:r.journeys,recordingStatusById:o.statusByRecordingId,onOpenCandidate:l});return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(k.Rq,{environment:n,header:r.header,snapshotId:a,legacy:void 0!==t&&t,operationsState:i,headingRef:s}),d,0===r.journeys.length?(0,u.jsxs)("section",{className:I().noJourneys,children:[(0,u.jsx)("h2",{children:"No recorded journeys are in this snapshot."}),(0,u.jsx)("p",{children:"Standalone recordings and planned coverage remain available below."})]}):null,(0,u.jsx)(V,{journeys:r.plannedGaps}),(0,u.jsx)(J,{items:r.libraryItems,recordingStatusById:o.statusByRecordingId})]})},ee=function(e){var n,t,i,s,d,c,m,p,g,f,b=e.environment,j=e.operationsState,_=e.snapshot,R=(0,h.useMemo)(function(){return(0,x.i6)(_)},[_]),C=(0,k.Qo)(_),A=(0,h.useRef)(null),T=(0,h.useRef)(null),F=(0,h.useMemo)(function(){return Array.isArray(_.recordings)?_.recordings.map(function(e){return e.id}):[]},[_.recordings]),P=(0,o._)((0,h.useState)(null),2),M=P[0],E=P[1],D=(0,o._)((0,h.useState)(function(){return new Set}),2),L=D[0],q=D[1],B=(0,h.useRef)(null),V=null!==(g=null==j?void 0:null===(t=j.data)||void 0===t?void 0:null===(n=t.refreshRun)||void 0===n?void 0:n.runId)&&void 0!==g?g:null;V&&B.current!==V&&(B.current=V,L.size>0&&q(new Set));var O=(0,h.useCallback)(function(e,n){q(function(t){if(t.has(e)===n)return t;var i=new Set(t);return n?i.add(e):i.delete(e),i})},[]),U=(0,h.useMemo)(function(){var e,n;return(0,w.VQ)({activeRecordingIds:F,displayedSnapshotId:null!==(n=_.snapshotId)&&void 0!==n?n:null,hasActiveSet:!C,previewFailedIds:L,run:null==j?void 0:null===(e=j.data)||void 0===e?void 0:e.refreshRun})},[F,C,null==j?void 0:null===(i=j.data)||void 0===i?void 0:i.refreshRun,L,_.snapshotId]),H=(0,h.useRef)(!1);(0,h.useEffect)(function(){if(U.handoffComplete&&!H.current){var e=T.current;if(e){var n,t=(0,l._)(document.querySelectorAll("[data-recording-id]")).find(function(n){return n.dataset.recordingId===e});null===(n=null!=t?t:A.current)||void 0===n||n.focus(),T.current=null}}H.current=U.handoffComplete},[U.handoffComplete,_.snapshotId]);var Q=j?(0,r._)((0,a._)({},j),{refreshProgress:U}):j,z=C&&0===U.candidateItems.length,K=(0,h.useMemo)(function(){return N.journeys.filter(function(e){return"required"===e.coverageStatus}).map(function(e){return(0,r._)((0,a._)({},e),{highlights:[],chapters:e.chapters.map(function(e){return(0,r._)((0,a._)({},e),{highlights:[],recording:null,segment:null})})})})},[]),ee=C?K:R.journeys,en=(0,h.useMemo)(function(){return new Set(ee.flatMap(function(e){return e.chapters.map(function(e){return e.primaryRecordingId})}))},[ee]),et=(0,h.useMemo)(function(){var e=new Map(U.statusByRecordingId),n=!0,t=!1,i=void 0;try{for(var a,r=en[Symbol.iterator]();!(n=(a=r.next()).done);
1n=!0){var s=a.value;!e.has(s)&&C&&e.set(s,{activeEvidence:!1,failureSummary:null,itemState:"planned",label:"Not captured yet",previewAvailable:!1,recordingId:s,runState:null})}}catch(e){t=!0,i=e}finally{try{n||null==r.return||r.return()}finally{if(t)throw i}}return e},[C,U.statusByRecordingId,en]),ei=(0,h.useMemo)(function(){return new Map(U.candidateItems.map(function(e){return[e.recordingId,e]}))},[U.candidateItems]),ea=(0,h.useCallback)(function(e){var n=ei.get(e);n&&E(n)},[ei]),er=(0,h.useMemo)(function(){return(0,S.Z)()},[]),es=(z?er:U.candidateItems).filter(function(e){return!en.has(e.recordingId)}),eo=(0,o._)((0,v.t)(y.getQaCandidatePreview,{fetchPolicy:"network-only"}),1)[0],el=(0,o._)((0,h.useState)(function(){return new Map}),2),ed=el[0],ec=el[1],eu=(0,o._)((0,h.useState)(function(){return new Map}),2),eh=eu[0],ev=eu[1],em=(0,h.useRef)(null),ep=(0,h.useRef)(new Set),eg=(0,h.useRef)(new Set),ef=(0,h.useRef)(!1);(0,h.useEffect)(function(){return ef.current=!0,function(){ef.current=!1}},[]),V&&em.current!==V&&(em.current=V,ep.current=new Set,eg.current=new Set,ed.size>0&&ec(new Map),eh.size>0&&ev(new Map));var ey="notActivated"!==G(null==j?void 0:null===(s=j.data)||void 0===s?void 0:s.refreshRun,_),eb=(C?U.candidateItems:es).filter(function(e){return!0===e.previewAvailable}).map(function(e){return e.recordingId}).join("|"),ek=(0,h.useCallback)(function(e,n){var t=n.thumbnailUrl;t&&ev(function(n){if(n.get(e)===t)return n;var i=new Map(n);return i.set(e,t),i}),ec(function(t){if(t.get(e)===n)return t;var i=new Map(t);return i.set(e,n),i}),O(e,!1)},[O]);(0,h.useEffect)(function(){if(V&&eb&&ey){var e=function(e){return eo({variables:{runId:V,recordingId:e}}).then(function(n){var t,i=null==n?void 0:null===(t=n.data)||void 0===t?void 0:t.qaCandidatePreview;ef.current&&em.current===V&&i&&ek(e,i)}).catch(function(){})},n=!0,t=!1,i=void 0;try{for(var a,r=eb.split("|")[Symbol.iterator]();!(n=(a=r.next()).done);n=!0){var s=a.value;ep.current.has(s)||(ep.current.add(s),e(s))}}catch(e){t=!0,i=e}finally{try{n||null==r.return||r.return()}finally{if(t)throw i}}}},[V,eo,eb,ek,ey]);var ew=(0,h.useCallback)(function(e){if(O(e,!0),V&&ey){if(eg.current.has(e)){ec(function(n){if(!n.has(e))return n;var t=new Map(n);return t.delete(e),t}),ev(function(n){if(!n.has(e))return n;var t=new Map(n);return t.delete(e),t});return}eg.current.add(e),ec(function(n){if(!n.has(e))return n;var t=new Map(n);return t.delete(e),t}),ev(function(n){if(!n.has(e))return n;var t=new Map(n);return t.delete(e),t}),eo({variables:{runId:V,recordingId:e}}).then(function(n){var t,i=null==n?void 0:null===(t=n.data)||void 0===t?void 0:t.qaCandidatePreview;ef.current&&em.current===V&&i&&ek(e,i)}).catch(function(){})}},[V,eo,O,ek,ey]),ex=(0,u.jsx)($,{hasActiveSnapshot:!C,items:es,planned:z,thumbnails:eh,previewItems:U.previewItems,previewFailedIds:L,onOpenPreview:E,onCandidateBlur:function(e){e.currentTarget.isConnected&&(T.current=null)},onCandidateFocus:function(e){T.current=e}}),ej=(0,h.useRef)(null);(null==j?void 0:null===(d=j.data)||void 0===d?void 0:d.refreshRun)&&(ej.current=j.data.refreshRun);var eS=M&&ej.current?(0,u.jsx)(W,{item:M,run:null!==(f=null==j?void 0:null===(c=j.data)||void 0===c?void 0:c.refreshRun)&&void 0!==f?f:ej.current,snapshot:_,onPreviewFailure:O,onClose:function(){return E(null)}}):null;return(0,u.jsx)("div",{className:I().scroll,children:(0,u.jsxs)("div",{className:I().container,children:[C?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(k.WD,{environment:b,headingRef:A,captureInProgress:["queued","running"].includes(null==j?void 0:null===(p=j.data)||void 0===p?void 0:null===(m=p.refreshRun)||void 0===m?void 0:m.state),showPlanned:z}),(0,u.jsx)(k.Xw,{environment:b,snapshotId:null,hasSnapshot:!1,sourceRevision:null,generatedAt:null,operations:null==Q?void 0:Q.data,operationsError:null==Q?void 0:Q.error,operationsLoading:null==Q?void 0:Q.loading,actionError:null==Q?void 0:Q.actionError,actionLoading:null==Q?void 0:Q.actionLoading,onRetry:null==Q?void 0:Q.onRetry,onPollStatus:null==Q?void 0:Q.onPollStatus,onLoadLatestSnapshot:null==Q?void 0:Q.onLoadLatestSnapshot,onStartRegeneration:null==Q?void 0:Q.onStartRegeneration,onRecoverRegeneration:null==Q?void 0:Q.onRecoverRegeneration,onClearActionError:null==Q?void 0:Q.onClearActionError,dismissedRefreshRunId:null==Q?void 0:Q.dism
1issedRefreshRunId,onDismissRefreshRun:null==Q?void 0:Q.onDismissRefreshRun,onRestoreRefreshRun:null==Q?void 0:Q.onRestoreRefreshRun,snapshotReloadFailed:null==Q?void 0:Q.snapshotReloadFailed,refreshProgress:U}),(0,u.jsx)(Z,{candidatePreviews:ed,candidateThumbnails:eh,catalogJourneys:ee,journeys:ee,recordingStatusById:et,onOpenCandidate:ea,onCandidatePlaybackError:ew}),ex]}):null,C||"upgrade"!==R.kind?null:(0,u.jsx)(Y,{environment:b,message:R.message}),C||"legacy"!==R.kind?null:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(k.Rq,{environment:b,header:R.header,snapshotId:_.snapshotId,legacy:!0,operationsState:Q,headingRef:A}),(0,u.jsx)(J,{items:R.libraryItems,legacy:!0,recordingStatusById:U.statusByRecordingId}),ex]}),C||"current"!==R.kind?null:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(X,{environment:b,legacySource:_.legacySource,operationsState:Q,snapshotId:_.snapshotId,view:R,headingRef:A,refreshProgress:U,onOpenCandidate:ea}),ex]}),eS]})})},en=function(e){return"kickoff.qa-dashboard.dismissed-refresh.v1.".concat(e)},et=function(e){try{return window.localStorage.getItem(en(e))}catch(e){return null}},ei=function(e,n){try{return window.localStorage.setItem(en(e),n),!0}catch(e){return!1}},ea=function(e){try{return window.localStorage.removeItem(en(e)),!0}catch(e){return!1}},er=function(e){var n,t,a,r,s,l,d,v,w,x=e.environment,j=(0,m.x)(),S=(0,o._)((0,h.useState)(null),2),_=S[0],R=S[1],N=(0,o._)((0,h.useState)(function(){return et(x)}),2),C=N[0],A=N[1],T=(0,o._)((0,h.useState)(void 0),2),F=T[0],P=T[1],M=(0,h.useRef)(void 0),E=(0,h.useRef)(null),D=(0,p.a)(y.getTestRecordings,{ssr:!1,fetchPolicy:"network-only"}),L=(0,p.a)(y.getQaDashboardOperations,{ssr:!1,fetchPolicy:"network-only",variables:{manualRetry:!1}}),q=(0,o._)((0,g.D)(b.startQaDashboardRegeneration),2),B=q[0],V=q[1],O=(0,o._)((0,g.D)(b.recoverQaDashboardRegeneration),2),U=O[0],J=O[1],H=L.refetch,Q=L.updateQuery,G=L.startPolling,z=L.stopPolling,W=null!==(l=null===(n=L.data)||void 0===n?void 0:n.qaDashboardOperations)&&void 0!==l?l:null,K=null==W?void 0:W.refreshRun,$=(null==K?void 0:K.state)==="queued"||(null==K?void 0:K.state)==="running",Y=W?null!==(d=W.snapshotId)&&void 0!==d?d:null:void 0,Z=null!==(v=null===(a=D.data)||void 0===a?void 0:null===(t=a.testRecordingsSnapshot)||void 0===t?void 0:t.snapshotId)&&void 0!==v?v:null,X=!!(null===(r=D.data)||void 0===r?void 0:r.testRecordingsSnapshot);(0,h.useEffect)(function(){var e=function(e){$&&"visible"===document.visibilityState?(e&&H({manualRetry:!1}),G(5e3)):z()};return e(),document.addEventListener("visibilitychange",e),function(){document.removeEventListener("visibilitychange",e),z()}},[H,$,G,z]),(0,h.useEffect)(function(){(0,k.e4)({snapshotLoaded:X,displayedSnapshotId:Z,activeSnapshotId:Y,lastAttemptedSnapshotId:M.current})&&(M.current=Y,P(void 0),(0,k._s)({refetchSnapshot:D.refetch,refetchOperations:H}).catch(function(){P(Y)}))},[Y,Z,H,X,D.refetch]);var en=(0,h.useCallback)((0,i._)(function(){return(0,c.Jh)(this,function(e){switch(e.label){case 0:M.current=Y,P(void 0),e.label=1;case 1:return e.trys.push([1,3,,4]),[4,(0,k._s)({refetchSnapshot:D.refetch,refetchOperations:H})];case 2:return e.sent(),[3,4];case 3:return e.sent(),P(Y),[3,4];case 4:return[2]}})}),[Y,H,D.refetch]),er=(0,h.useCallback)((0,i._)(function(){var e;return(0,c.Jh)(this,function(n){switch(n.label){case 0:return[4,j.query({query:y.getQaDashboardOperations,variables:{manualRetry:!0},fetchPolicy:"network-only"})];case 1:return e=n.sent(),Q(function(){return e.data}),[4,H({manualRetry:!1}).catch(function(){})];case 2:return n.sent(),[2,e]}})}),[j,H,Q]),es=(0,h.useCallback)((0,i._)(function(){var e,n,t,i;return(0,c.Jh)(this,function(a){switch(a.label){case 0:if(R(null),!(e=null==W?void 0:W.deployedRevision))return R("The exact environment revision is unavailable. Refresh and try again."),[2,"unavailable"];a.label=1;case 1:return a.trys.push([1,7,,8]),[4,B({variables:{confirmedRevision:e}})];case 2:if((null==(t=null===(n=a.sent().data)||void 0===n?void 0:n.startQaDashboardRegeneration)?void 0:t.outcome)!=="revision_changed")return[3,4];return[4,er()];case 3:return a.sent(),[3,6];case 4:return[4,H({manualRetry:!1})];case 5:a.sent(),a.label=6;case 6:return[2,null!==(i=null==t?void 0:t.outcome)&&void 0!==i?i:"unavailable"];case 7:return R(a.sent().message),[2,"failed"];case 8:return[2]}})}),[er,null==W?void 0:W.deployedRevision,H,B]),eo=(0,h.useCallback)((0,i._)(function(){var e;return(0,c.Jh)(this,function(n){switch(n.label){case 0:if(R(null),!K||!(null==(e=window.prompt("Why should this stalled refresh be closed so a new one can start?"))?void 0:e.trim()))return[2];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,U({variables:{runId:K.runId,reason:e.trim()}})];case 2:return n.sent(),[4,H({manualRetry:!1})];case 3:return n.sent(),[3,5];case 4:return R(n.sent().message),[3,5];case 5:return[2]}})}),[U,H,K]),el=(0,h.useCallback)(function(){var e=null==K?void 0:K.runId;e&&(ei(x,e),A(e))},[x,null==K?void 0:K.runId]),ed=(0,h.useCallback)(function(){ea(x),A(null)},[x]),ec=(0,h.useCallback)(function(){return R(null)},[]),eu=(0,f.N)(D),eh={data:W,error:null!==(w=L.error)&&void 0!==w?w:null,loading:L.loading,actionError:_,actionLoading:V.loading||J.loading,onRetry:er,onPollStatus:function(){return H({manualRetry:!1})},onStartRegeneration:es,onRecoverRegeneration:eo,onClearActionError:ec,dism
1issedRefreshRunId:C,onDismissRefreshRun:el,onRestoreRefreshRun:ed,onLoadLatestSnapshot:en,snapshotReloadFailed:void 0!==Y&&F===Y};return((null===(s=eu.data)||void 0===s?void 0:s.testRecordingsSnapshot)&&(E.current=eu.data.testRecordingsSnapshot),!eu.loading&&E.current)?(0,u.jsx)(ee,{environment:x,operationsState:eh,snapshot:E.current}):(0,u.jsx)("div",{className:I().scroll,children:(0,u.jsxs)("div",{className:I().container,children:[eu.loading?(0,u.jsx)(k.Rc,{environment:x,eyebrow:"QA video browser",status:"Loading the latest snapshotâ¦",ariaLive:"polite"}):null,eu.error?(0,u.jsx)(k.Rc,{environment:x,eyebrow:"Couldnât load recordings",status:"The latest QA snapshot is unavailable.",role:"alert",children:(0,u.jsx)("p",{children:eu.error.message})}):null]})})}},44604:function(e,n,t){"use strict";t.d(n,{Z:function(){return u},a:function(){return c}});var i=t(76341),a=t(67462),r=t(53353),s={"test/e2e/tests/admin-coaches-list.browser.test.ts":"Administration","test/e2e/tests/admin-payroll.browser.test.ts":"Administration","test/e2e/tests/agreement-to-coach.browser.test.ts":"Onboarding","test/e2e/tests/change-plan.browser.test.ts":"Billing","test/e2e/tests/checkout-payment.browser.test.ts":"Billing","test/e2e/tests/client-billing-view.browser.test.ts":"Billing","test/e2e/tests/client-sign-up.browser.test.ts":"Onboarding","test/e2e/tests/client-welcome.browser.test.ts":"Onboarding","test/e2e/tests/coach-account.browser.test.ts":"Coach workflow","test/e2e/tests/coach-activation-journey.browser.test.ts":"Onboarding","test/e2e/tests/coach-auto-schedule-preview-weeks.browser.test.ts":"Coach workflow","test/e2e/tests/coach-client-invoices.browser.test.ts":"Billing","test/e2e/tests/coach-client-nutrition-injuries.browser.test.ts":"Clinical care","test/e2e/tests/coach-daily-loop.browser.test.ts":"Coach workflow","test/e2e/tests/coach-dashboard-todos.browser.test.ts":"Coach workflow","test/e2e/tests/coach-general-notes.browser.test.ts":"Clinical care","test/e2e/tests/coach-note-addendums.browser.test.ts":"Clinical care","test/e2e/tests/coach-service-notes.browser.test.ts":"Clinical care","test/e2e/tests/coach-sign-up.browser.test.ts":"Onboarding","test/e2e/tests/coach-sms-conversation.browser.test.ts":"Messaging","test/e2e/tests/coach-views-client.browser.test.ts":"Coach workflow","test/e2e/tests/coach-welcome.browser.test.ts":"Onboarding","test/e2e/tests/coach-work-time-indicator.browser.test.ts":"Coach workflow","test/e2e/tests/connect-calendar.browser.test.ts":"Onboarding","test/e2e/tests/insurance-consent.browser.test.ts":"Insurance","test/e2e/tests/insurance-credentialing.browser.test.ts":"Credentialing","test/e2e/tests/insurance-eligibility-rerun.browser.test.ts":"Insurance","test/e2e/tests/insurance-onboarding-journey.browser.test.ts":"Insurance","test/e2e/tests/insurance-session-paper-trail-journey.browser.test.ts":"Clinical care","test/e2e/tests/merge-clients.browser.test.ts":"Onboarding","test/e2e/tests/stale-client-warning.browser.test.ts":"Coach workflow","test/e2e/tests/subscribe.browser.test.ts":"Billing","test/e2e/tests/two-coach-inbox.browser.test.ts":"Messaging","test/e2e/tests/verify-coverage.browser.test.ts":"Insurance","test/e2e/tests/video-call-ui.browser.test.ts":"Video calls","test/e2e/tests/video-client-perspective.browser.test.ts":"Video calls","test/e2e/tests/video-insurance-in-call.browser.test.ts":"Video calls","test/e2e/tests/video-room-creation.browser.test.ts":"Video calls","test/e2e/tests/video-slides.browser.test.ts":"Video calls","test/e2e/tests/video-voice-to-video.browser.test.ts":"Video calls"},o=new Set(["coach-activation","insurance-onboarding","coach-daily-loop","insured-session-paper-trail"]);function l(e){return e.toLowerCase().replace(/\.browser\.test\.ts$/,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"untitled"}var d=[{file:"test/e2e/tests/coach-work-time-indicator.browser.test.ts",title:"green â idle-grey â green â hidden-grey â green â in-call-grey â amber",label:"Coach work-time indicator â full state machine"},{file:"test/e2e/tests/coach-dashboard-todos.browser.test.ts",title:"coach lands on /dashboard/todos and completes the new-lead todo",label:"Coach dashboard â new-lead todo, completed end-to-e
1nd"},{file:"test/e2e/tests/coach-sms-conversation.browser.test.ts",title:"coach reads the SMS thread and sends a reply",label:"SMS conversation â read the thread, send a real reply"},{file:"test/e2e/tests/coach-general-notes.browser.test.ts",title:"coach reads and edits the client general notes",label:"Client notes â general notes render and autosave"},{file:"test/e2e/tests/coach-client-nutrition-injuries.browser.test.ts",title:"coach reviews and edits nutrition targets and injuries",label:"Nutrition targets + injuries â review and edit"},{file:"test/e2e/tests/two-coach-inbox.browser.test.ts",title:"@out-of-gate coach A sends a reply and coach Bâs open inbox shows it arrive",label:"Two coaches, one inbox â real-time arrival (multi-actor)"},{file:"test/e2e/tests/coach-views-client.browser.test.ts",title:"coach opens a client and sees the client identity header",label:"Coach views a client â identity header shows the planted name"},{file:"test/e2e/tests/stale-client-warning.browser.test.ts",title:"shows warning banner for client with stale warning",label:"Stale-client warning banner â planted stale action renders"},{file:"test/e2e/tests/coach-account.browser.test.ts",title:"can set target client count and it persists",label:"Coach account â target client count set and persisted"},{file:"test/e2e/tests/coach-auto-schedule-preview-weeks.browser.test.ts",title:"toggling preview weeks persists to 2 in the DB",label:"Coach account â auto-schedule preview weeks toggle"},{file:"test/e2e/tests/video-room-creation.browser.test.ts",title:"coach joins /meet and the real joinMeeting mutation links the room to the kickoff call",label:"Video call â coach joins, room created and linked (seam 1)"},{file:"test/e2e/tests/video-call-ui.browser.test.ts",title:"@out-of-gate coach joins /meet through the SDK stub; tiles, mute, local video toggle, screen share, disconnect and room drop all track injected events",label:"Video call â in-call UI: tiles, mute, camera, screen share, drop"},{file:"test/e2e/tests/video-client-perspective.browser.test.ts",title:"@out-of-gate anonymous insurance client is blocked by the consent gate, unlocks after the real consent flip + injected Pusher frame, then joins to the waiting tile",label:"Video call â client consent gate unlocks, then the waiting tile"},{file:"test/e2e/tests/video-client-perspective.browser.test.ts",title:'@out-of-gate the lobby shows "<coach> is in the meeting" from a planted meeting_room_logs row',label:'Video call â lobby "coach is in the meeting" pre-join message'},{file:"test/e2e/tests/video-slides.browser.test.ts",title:"@out-of-gate coach drives the real slides mutation (seen-first / seen-last written), client renders the injected index-updated frames",label:"Video call â coach presents slides, client follows along"},{file:"test/e2e/tests/video-insurance-in-call.browser.test.ts",title:"@out-of-gate insurance in-call: the RecordingSwitch drives the real Twilio RecordingRules mutation and the side-notes chief complaint autosaves",label:"Video call â insurance in-call: recording toggle + notes autosave"},{file:"test/e2e/tests/video-voice-to-video.browser.test.ts",title:"@out-of-gate coach phones the client: callClientPhone writes video_room_calls, injected status frames walk ringing â voicemail â AMD takeover, confirm + hang up",label:"Video call â voice-to-video: call, voicemail takeover, hang up"},{file:"test/e2e/tests/client-sign-up.browser.test.ts",title:"self-seeds the client and persists real survey answers",label:"Client sign-up â funnel self-seeds and persists real answers"},{file:"test/e2e/tests/coach-sign-up.browser.test.ts",title:"drives the coach survey â real coach-keyed response writes",label:"Coach sign-up â funnel survey, coach-keyed response writes"},{file:"test/e2e/tests/verify-coverage.browser.test.ts",title:"client verifies coverage â real checkEligibility reaches SERVICE_ELIGIBILITY_ELIGIBLE",label:"Insurance â verify coverage: real eligibility to SERVICE_ELIGIBLE"},{file:"test/e2e/tests/insurance-consent.browser.test.ts",title:"client submits direct-billing consent â real createClientConsents plants the rows",label:"Insurance â direct-billing consent: real consent write, off Bridge"},{file:"test/e2e/tests/insurance-eligibility-rerun.browser.test.ts",title:"admin re-runs provider eligibility â real soft check plants an ELIGIBLE status + provider + log",label:"Insurance â admin re-run provider eligibility (soft check)"},{id:"insurance-credentialing",file:"test/e2e/tests/insurance-credentialing.browser.test.ts",title:"admin credentials a provider â real createCredentialingSpans writes through Candid",label:"Credentialing â admin credentials a provider through Candid"},{file:"test/e2e/tests/coach-service-notes.browser.test.ts",title:"coach opens a service note card and the per-section autosave persists to the DB",label:"Service notes â open the SOAP card, edit a section, autosave"},{file:"test/e2e/tests/coach-service-notes.browser.test.ts",title:"the auto/manual toggle renders the planted AI note",label:"Service notes â AI-enhanced notes toggle renders the auto note"},{file:"test/e2e/tests/coach-note-addendums.browser.test.ts",title:"coach edits and signs a drafted note addendum",label:"Note addendums â edit a drafted addendum, attest, sign & submit"},{file:"test/e2e/tests/admin-coaches-list.browser.test.ts",title:"admin sees a planted coach under its level section and updates its target client count",label:"Admin coaches list â planted coach renders, target count updated"},{file:"test/e2e/tests/admin-payroll.browser.test.ts",title:"super-admin sees the computed upcoming invoice total for a planted coach",label:"Admin payroll â computed upcoming invoice total (clients \xd7 pay rate)"},{file:"test/e2e/tests/subscribe.browser.test.ts",title:"client subscribes â real subscribeClientV2 stamps firstPaidAt and paidThroughDate",label:"Billing â subscribe: real subscribeClientV2 stamps payment dates"},{file:"test/e2e/tests/change-plan.browser.test.ts",title:"client changes plan â real updateClientPlan writes a client_product_changes row",label:"Billing â change plan: real updateClientPlan writes the change row"},{file:"test/e2e/tests/checkout-payment.browser.test.ts",title:"client completes checkout â the real payment mutation creates the Stripe customer and paying state",label:"Checkout â card entered, real payment mutation writes paying state"},{file:"test/e2e/tests/coach-client-invoices.browser.test.ts",title:"coach opens the Client Info invoices section and the planted invoice history renders",label:"Client invoices â
1coach opens Client Info, planted history renders"},{file:"test/e2e/tests/client-billing-view.browser.test.ts",title:"client loads /change-plan and the subscription + upcoming-invoice reads render on the confirm screen",label:"Client billing â subscription + upcoming-invoice reads render"},{file:"test/e2e/tests/agreement-to-coach.browser.test.ts",title:"agreement-pending coach is gated, accepts, and the gate clears",label:"Coach agreement â gated, accept flips the dashboard-access gate"},{file:"test/e2e/tests/coach-welcome.browser.test.ts",title:"seeded active coach sees the welcome splash and the survey CTA",label:"Coach welcome â splash renders the planted name + survey CTA"},{file:"test/e2e/tests/client-welcome.browser.test.ts",title:"seeded client sees the welcome intro with their planted name",label:"Client welcome â intro renders the planted client name"},{file:"test/e2e/tests/connect-calendar.browser.test.ts",title:"completing the Nylas OAuth callback connects the calendar and lands on the scheduler",label:"Connect calendar â Nylas OAuth callback, grant + config saved"},{file:"test/e2e/tests/merge-clients.browser.test.ts",title:"non-insurance source redirects to /client-sign-up",label:"Merge-clients â reengagement link, default â client-sign-up"},{file:"test/e2e/tests/merge-clients.browser.test.ts",title:"insurance, non-referred source redirects to /coach-matches",label:"Merge-clients â reengagement link, insurance â coach-matches"},{file:"test/e2e/tests/merge-clients.browser.test.ts",title:"insurance + coach-referred source redirects to /verify-coverage",label:"Merge-clients â reengagement link, referred â verify-coverage"},{id:"coach-activation",file:"test/e2e/tests/coach-activation-journey.browser.test.ts",title:"coach completes activation and reaches the insurance inbox",label:"Journey â
1coach activation (welcome â profile â agreement â calendar â inbox)"},{id:"insurance-onboarding",file:"test/e2e/tests/insurance-onboarding-journey.browser.test.ts",title:"insurance client signs up, chooses a matched coach, and books their first session",label:"Journey â insurance activation (sign-up â eligibility â match â book)"},{id:"coach-daily-loop",file:"test/e2e/tests/coach-daily-loop.browser.test.ts",title:"@out-of-gate coach runs their daily loop: work â reply â schedule â session â follow-up",label:"Journey â coach daily loop (work â reply â session â follow-up)"},{id:"insured-session-paper-trail",file:"test/e2e/tests/insurance-session-paper-trail-journey.browser.test.ts",title:"@out-of-gate insurance session becomes a transcript, signed SOAP note, and billing encounter",label:"Journey â insurance session (recording â transcript â note â encounter)"}].map(function(e){var n,t=e.id?e.id:"".concat(l(null!==(n=e.file.split("/").pop())&&void 0!==n?n:e.file),"--").concat(l(e.title)),r=s[e.file];if(!r)throw Error("RENDER_SET target has no domain: ".concat(e.file));return(0,a._)((0,i._)({},e),{id:t,idSource:e.id?"explicit":"legacy-derived",placement:o.has(t)?"key-journey":"focused",domain:r})});(0,r._)(d.filter(function(e){return"key-journey"===e.placement})).concat((0,r._)(d.filter(function(e){return"key-journey"!==e.placement})));var c=function(){return{keyJourneyCount:d.filter(function(e){return"key-journey"===e.placement}).length,focusedCount:d.filter(function(e){return"key-journey"!==e.placement}).length}},u=function(){return d.map(function(e,n){return{recordingId:e.id,previewAvailable:!1,failureSummary:null,state:"planned",target:{domain:e.domain,label:e.label,ordinal:n,placement:e.placement,title:e.title},status:{activeEvidence:!1,failureSummary:null,itemState:"planned",label:"Not captured yet",previewAvailable:!1,recordingId:e.id,runState:null}}})}},97585:function(e,n,t){"use strict";t.d(n,{Ic:function(){return A},Qo:function(){return I},Rc:function(){return T},Rq:function(){return E},WD:function(){return M},Xw:function(){return C},_s:function(){return R},e4:function(){return N}});var i,a=t(30137),r=t(93128),s=t(97582),o=t(85893),l=t(67294),d=t(7550),c=t(47099),u=t(45680),h=t(87562),v=t(44604),m=t(80026),p=t.n(m),g=function(e){if(!e)return null;var n=new Date(e);return Number.isNaN(n.getTime())?null:n.toLocaleString()},f=function(e){switch(null==e?void 0:e.state){case"current":return"Current";case"behind":return"Behind by ".concat(e.commitCount," ").concat(1===e.commitCount?"commit":"commits");case"ahead":return"Ahead by ".concat(e.commitCount," ").concat(1===e.commitCount?"commit":"commits");case"diverged":return"Different history";case"dirty":return"Uncommitted changes captured";default:return"Freshness unavailable"}},y=function(e){return"string"==typeof e?e.slice(0,12):"Unavailable"},b=function(e){var n=Date.parse(e);if(!Number.isFinite(n))return"Elapsed time unavailable";var t=Math.max(0,Math.floor((Date.now()-n)/6e4));return t<1?"Started less than a minute ago":"".concat(t," ").concat(1===t?"minute":"minutes"," elapsed")},k=function(e){var n=e.hasActiveSet,t=void 0===n||n,i=(0,r._)((0,l.useState)(!1),2),a=i[0],s=i[1],d=(0,l.useRef)(null),c=(0,l.useRef)(null),u=(0,l.useId)();return(0,l.useEffect)(function(){if(a){var e=function(e){var n;(null===(n=d.current)||void 0===n?void 0:n.contains(e.target))||s(!1)},n=function(e){var n;"Escape"===e.key&&(s(!1),null===(n=c.current)||void 0===n||n.focus())};return document.addEventListener("pointerdown",e),document.addEventListener("keydown",n),function(){document.removeEventListener("pointerdown",e),document.removeEventListener("keydown",n)}}},[a]),(0,o.jsxs)("div",{ref:d,className:p().regenerationHelp,children:[(0,o.jsx)("button",{ref:c,type:"button",className:p().regenerationHelpTrigger,"aria-expanded":a,"aria-controls":u,"aria-describedby":a?u:void 0,onClick:function(){return s(function(e){return!e})},children:"How it works"}),a?(0,o.jsxs)("div",{id:u,className:p().regenerationHelpPopover,role:"tooltip",children:[(0,o.jsx)("strong",{children:t?"Regeneration replaces the complete video set.":"A capture publishes the complete video set at once."}),(0,o.jsxs)("p",{children:["Kickoff runs the Playwright capture suite against isolated test data."," ",t?"The current library stays playable while this page reports progress. Only a complete, validated set replaces it; failed partial captures never do.":"This page reports progress, and each capture becomes watchable as it finishes. Only a complete, validated set becomes the library; failed partial captures never do."]})]}):null]})},w=function(e){var n=e.environment,t=e.recordingCount,i=e.revision,a=e.phase,r=void 0===a?"confirming":a,s=e.message,c=void 0===s?null:s,h=e.detail,v=void 0===h?null:h,m=e.detailTone,g=e.errorTitle,f=e.retryLabel,b=e.hasActiveSet,k=void 0===b||b,w=e.onCancel,x=e.onConfirm,j=e.onRefreshStatus,S=(0,l.useRef)(null),_=(0,l.useId)(),R="".concat(_,"-title"),N="".concat(_,"-description"),C=(0,d.Li)(n),I="submitting"===r,A="accepted"===r,T="error"===r;(0,l.useEffect)(function(){var e,n,t=document.activeElement;t&&t!==document.body&&(null===(e=S.current)||void 0===e?void 0:e.contains(t))||null===(n=S.current)||void 0===n||n.focus()},[r]);var F=I?"Starting regenerationâ¦":A?"Regeneration accepted":T?void 0===g?"Regeneration did not start":g:k?"Start a new recording set?":"Create the first recording set?",P=I?"Starting regeneration. Checking the deployed revision and asking the capture runner to start.":"".concat(F,". ").concat(null!=c?c:""," ").concat(null!=v?v:"").trim();
1return(0,o.jsxs)("section",{ref:S,tabIndex:-1,className:"".concat(p().regenerationConfirmation," ").concat(T||A?p().regenerationConfirmationCompact:""),"aria-labelledby":R,"aria-describedby":N,onKeyDown:function(e){"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),A||w())},children:["confirming"!==r?(0,o.jsx)("p",{className:p().visuallyHidden,role:T?"alert":"status","aria-live":T?"assertive":"polite","aria-atomic":"true",children:P},r):null,(0,o.jsxs)("div",{children:[(0,o.jsxs)("span",{className:p().regenerationEyebrow,children:[C," capture"]}),(0,o.jsx)("h2",{id:R,children:F}),"confirming"===r&&c?(0,o.jsx)("p",{className:p().regenerationConfirmationNotice,children:c}):null,(0,o.jsx)("p",{id:N,children:T||A?c:I?"Checking the deployed revision and asking the capture runner to start.":(0,o.jsxs)(o.Fragment,{children:["This will capture"," ",t?(0,u.CZ)(t,"video"):"the complete video set"," ","for revision ",(0,o.jsx)("code",{children:y(i)}),". It usually takes tens of minutes."]})}),T&&v?(0,o.jsx)("p",{className:"danger"===(void 0===m?"danger":m)?p().regenerationFailureDetail:p().regenerationStatusDetail,children:v}):null]}),T||A?null:(0,o.jsx)("strong",{children:k?"Your current videos stay available while replacements are recorded. Each new video becomes previewable when ready, and the full set becomes current after every capture succeeds.":"Each video becomes watchable as it finishes. The set activates only when every capture succeeds."}),(0,o.jsxs)("div",{className:p().regenerationConfirmationActions,children:[A?null:(0,o.jsx)("button",{type:"button",onClick:w,children:T?"Back":"confirming"===r?"Cancel":"Close"}),(0,o.jsx)("button",{type:"button",disabled:I,className:p().confirmRegenerationButton,onClick:A?j:x,children:I?"Starting capture runnerâ¦":A?"Refresh status":T?void 0===f?"Try again":f:k?"Start ".concat(t||"full","-video regeneration"):"Start first capture"})]})]})},x=function(e){var n,t,i,a,r,s,l=e.operations,d=e.actionError,c=e.actionLoading,u=e.environment,v=e.onRecoverRegeneration,m=e.dismissedRefreshRunId,f=e.onDismissRefreshRun,k=e.onRestoreRefreshRun,w=e.refreshProgress,x=e.statusHeadingRef,j=e.hidden;if(void 0!==j&&j)return null;var S=null==l?void 0:l.refreshRun,_=S&&!["queued","running"].includes(S.state)&&m===S.runId;if(!S&&!(null==l?void 0:l.refreshProblem)&&!d)return null;var R=(null==S?void 0:S.state)==="queued"||(null==S?void 0:S.state)==="running",N="development"!==u&&R&&(null==S?void 0:S.catalogState)==="pending",C=N&&(null==S?void 0:null===(n=S.runner)||void 0===n?void 0:n.kind)==="github",I=S?l.refreshRunStalled?"Refresh appears stalled":C?"Hosted runner is preparing captures":N?"Waiting for hosted runner":R&&"pending"===S.catalogState?"Preparing recording list":"running"===S.state?"".concat(S.counts.ready," of ").concat(S.counts.total," recordings captured"):"queued"===S.state?"Refresh queued \xb7 ".concat(S.counts.ready," of ").concat(S.counts.total," recordings captured"):"succeeded"===S.state?(null==w?void 0:w.handoffComplete)?"New recording set is active":"New recording set is active. Loading itâ¦":"cancelled"===S.state?"Refresh cancelled":"Refresh failed":null;return(0,o.jsxs)("section",{className:p().refreshRunPanel,"aria-label":"Video regeneration status",children:[_?(0,o.jsxs)("div",{className:p().lastRefreshSummary,children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{children:"Last regeneration"}),(0,o.jsxs)("strong",{children:["succeeded"===S.state?"Completed":"cancelled"===S.state?"Cancelled":"Failed"," ","\xb7 ",g(null!==(r=S.finishedAt)&&void 0!==r?r:S.requestedAt)]})]}),(0,o.jsx)("button",{type:"button",onClick:k,children:"Show details"})]}):S?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:p().refreshRunHeading,children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{children:"Video regeneration"}),(0,o.jsx)("strong",{ref:x,tabIndex:-1,children:I})]}),(0,o.jsx)("span",{className:p().refreshState,children:S.state})]}),(0,o.jsxs)("p",{children:["Revision ",(0,o.jsx)("code",{children:y(S.targetRevision)})," \xb7"," ","requested by ",S.requestedBy.displayName," \xb7"," ",b(null!==(s=S.startedAt)&&void 0!==s?s:S.requestedAt)]}),R?(0,o.jsx)("p",{children:null==w?void 0:w.liveSummary}):null,(null===(t=S.failure)||void 0===t?void 0:t.summary)?(0,o.jsx)("p",{className:p().refreshFailure,children:(0,h.e)(S.failure.summary)}):null,(0,o.jsxs)("div",{className:p().refreshRunActions,children:[(null===(i=S.runner)||void 0===i?void 0:i.url)?(0,o.jsx)("a",{className:C?p().refreshRunPrimaryAction:void 0,href:S.runner.url,target:"_blank",rel:"noreferrer",children:C?"View live setup progress â":"View run details â"}):null,(null===(a=S.runner)||void 0===a?void 0:a.kind)==="local"?(0,o.jsxs)("span",{children:["Local run ",S.runI
1d.slice(0,8)]}):null,l.refreshRunStalled?(0,o.jsx)("button",{type:"button",disabled:c,onClick:v,children:"Recover stale run"}):null,R?null:(0,o.jsx)("button",{type:"button",onClick:f,children:"Dismiss"})]})]}):null,(null==l?void 0:l.refreshProblem)?(0,o.jsx)("p",{className:p().refreshFailure,children:l.refreshProblem}):null,(null==w?void 0:w.issue)?(0,o.jsx)("p",{className:p().refreshFailure,children:w.issue}):null,d?(0,o.jsx)("p",{className:p().refreshFailure,role:"alert",children:d}):null]})},j=function(e){var n=e.signature,t=e.summary,i=(0,r._)((0,l.useState)(""),2),a=i[0],s=i[1],d=(0,l.useRef)(null);return((0,l.useEffect)(function(){if(!n){d.current=null,s("");return}n!==d.current&&(d.current=n,s(null!=t?t:""))},[n,t]),n)?(0,o.jsx)("p",{className:p().visuallyHidden,role:"status","aria-live":"polite","aria-atomic":"true",children:a}):null},S=function(e){var n=e.label,t=e.revision,i=e.url,a=y(t);return t?i?(0,o.jsxs)("a",{href:i,target:"_blank",rel:"noreferrer","aria-label":"".concat(n," ").concat(t),children:[a," â"]}):(0,o.jsx)("span",{"aria-label":"".concat(n," ").concat(t),children:a}):(0,o.jsx)("span",{children:a})},_=function(e){var n,t=e.snapshotId,i=e.hasSnapshot,a=e.operations;return a?i&&!t?{kind:"unavailable",message:"This legacy snapshot has no stable identity."}:(null!=t?t:null)!==(null!==(n=a.snapshotId)&&void 0!==n?n:null)?{kind:"changed",message:"Freshness unavailable â the active snapshot changed"}:{kind:"ready",freshness:a.freshness}:{kind:"loading"}},R=(i=(0,a._)(function(e){var n,t;return(0,s.Jh)(this,function(i){switch(i.label){case 0:return n=e.refetchSnapshot,t=e.refetchOperations,[4,n()];case 1:return i.sent(),[2,t({manualRetry:!1})]}})}),function(e){return i.apply(this,arguments)}),N=function(e){var n=e.snapshotLoaded,t=e.displayedSnapshotId,i=e.activeSnapshotId,a=e.lastAttemptedSnapshotId;return!!(n&&void 0!==i&&i!==t&&i!==a)},C=function(e){var n,t,i,h,v,m,y=e.environment,b=e.snapshotId,R=e.hasSnapshot,N=e.sourceRevision,C=e.generatedAt,I=e.totalDurationMs,A=e.recordingCount,T=e.operations,F=e.operationsError,P=e.operationsLoading,M=e.actionError,E=e.actionLoading,D=e.onRetry,L=e.onLoadLatestSnapshot,q=e.onStartRegeneration,B=e.onPollStatus,V=e.onRecoverRegeneration,O=e.onClearActionError,U=e.dismissedRefreshRunId,J=e.onDismissRefreshRun,H=e.onRestoreRefreshRun,Q=e.snapshotReloadFailed,G=void 0!==Q&&Q,z=e.refreshProgress,W=e.initialRegenerationPhase,K=e.initialRegenerationMessage,$=e.initialRegenerationDetail,Y=e.initialRegenerationRetryMode,Z=e.acceptedStatusPollingDisabled,X=void 0!==Z&&Z,ee=F?{kind:"unavailable",message:"The freshness check failed."}:P&&!T?{kind:"loading"}:_({snapshotId:b,hasSnapshot:R,operations:T}),en="ready"===ee.kind?ee.freshness:null,et="changed"===ee.kind&&G?"The dashboard could not load it automatically.":"unavailable"===ee.kind?ee.message:(null==en?void 0:en.state)==="unavailable"?en.reason:null,ei="string"==typeof N&&/^[a-f0-9]{40}$/i.test(N)?N:null,ea="ready"!==ee.kind?ei:(null==en?void 0:en.state)==="dirty"?null!==(t=en.snapshotRevision)&&void 0!==t?t:null:null!==(i=null==en?void 0:en.snapshotRevision)&&void 0!==i?i:ei,er=null==T?void 0:T.regeneration,es=null==T?void 0:T.refreshRun,eo=["queued","running"].includes(null==es?void 0:es.state),el=(null==er?void 0:er.allowed)||(null==er?void 0:er.reason),ed=(0,r._)((0,l.useState)(void 0===W?"idle":W),2),ec=ed[0],eu=ed[1],eh=(0,r._)((0,l.useState)(void 0===K?null:K),2),ev=eh[0],em=eh[1],ep=(0,r._)((0,l.useState)(void 0===$?null:$),2),eg=ep[0],ef=ep[1],ey=(0,r._)((0,l.useState)(void 0===Y?"start":Y),2),eb=ey[0],ek=ey[1],ew=(0,l.useRef)(null),ex=(0,l.useRef)(null),ej=(0,l.useRef)(!1),eS=(0,l.useRef)(null),e_=(0,l.useRef)(!1),eR=(0,l.useRef)(0),eN=(0,l.useRef)(null),eC=(0,l.useRef)(D),eI=(0,l.useRef)(null!=B?B:D);eC.current=D,eI.current=null!=B?B:D;var eA=(0,d.Li)(y),eT=null!=z?z:(0,c.VQ)({displayedSnapshotId:b,hasActiveSet:R,run:null==T?void 0:T.refreshRun}),eF="accepted"===ec||"error"===ec&&"status"===eb,eP=!!(eF&&(null==es?void 0:es.runId)&&es.runId!==eN.current),eM=eF&&!eo&&!eP&&!!es;(0,l.useEffect)(function(){"idle"!==ec&&(eo||eP)&&(e_.current=!0,eR.current+=1,eu("idle"),em(null),ef(null),ek("start"),null==O||O())},[eo,eP,O,ec]),(0,l.useEffect)(function(){if("idle"===ec&&ej.current){ej.current=!1;var e,n=ew.current;if(n&&!n.disabled){n.focus();return}null===(e=ex.current)||void 0===e||e.focus()}},[ec]),(0,l.useEffect)(function(){var e;"idle"===ec&&es&&e_.current&&(e_.current=!1,null===(e=eS.current)||void 0===e||e.focus())},[es,ec]),(0,l.useEffect)(function(){if("accepted"===ec&&!X){var e=0,n=window.setInterval(function(){var t;e+=1,Promise.resolve(null===(t=eI.current)||void 0===t?void 0:t.call(eI)).catch(function(){}),e<6||(window.clearInterval(n),ek("status"),eu("error"),em("The request was accepted, but its progress has not appeared yet."),ef("Refresh the status before deciding whether to start another capture."))},5e3);return function(){return window.clearInterval(n)}}},[X,ec]);var eE=(n=(0,a._)(function(){var e,n,t,i,a;return(0,s.Jh)(this,function(r){switch(r.label){case 0:if(!q)return[2];e=eR.current+1,eR.current=e,eN.current=null!==(n=null==es?void 0:es.runI
1d)&&void 0!==n?n:null,ek("start"),eu("submitting"),em(null),ef(null),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,q()];case 2:return t=r.sent(),[3,4];case 3:if(i=r.sent(),e!==eR.current)return[2];return eu("error"),em("The regeneration request failed."),ef(null!==(a=null==i?void 0:i.message)&&void 0!==a?a:"An unexpected error occurred."),[2];case 4:if(e!==eR.current)return[2];if("started"===t||"already_running"===t)return eu("accepted"),em("already_running"===t?"A regeneration is already underway. Loading its current progress.":"The capture runner accepted this regeneration. Loading its current progress."),[2];if("revision_changed"===t)return eu("confirming"),em("The deployed revision changed. Review the new revision before starting."),[2];return eu("error"),em("launch_failed"===t?"The capture runner could not start. You can try again.":"unavailable"===t?"The deployed revision is unavailable. Refresh the status and try again.":"The regeneration request failed. You can try again."),[2]}})}),function(){return n.apply(this,arguments)}),eD=!!(es&&!["queued","running"].includes(es.state)&&U===es.runId);return(0,o.jsxs)("section",{ref:ex,tabIndex:-1,className:p().freshnessPanel,"aria-label":"Recording freshness",children:[(0,o.jsx)(j,{signature:eD||eM?null:eT.liveSignature,summary:eD||eM?null:eT.liveSummary}),(0,o.jsxs)("div",{className:p().freshnessHeading,children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{children:R?"Latest ".concat(eA," capture"):"".concat(eA," capture")}),(0,o.jsxs)("div",{className:p().freshnessStatusRow,children:[(0,o.jsx)("strong",{children:"loading"===ee.kind?"Checking freshnessâ¦":"changed"===ee.kind?G?"New capture ready":"Loading latest captureâ¦":R?f(en):eo?"Capturing the first set":"No capture yet"}),(null==en?void 0:en.comparisonUrl)?(0,o.jsx)("a",{href:en.comparisonUrl,target:"_blank",rel:"noreferrer",children:"Compare revisions â"}):null]}),R?et?(0,o.jsx)("p",{children:et}):null:eo?null:(0,o.jsx)("p",{children:"Start a capture to build the first local recording set. It usually takes tens of minutes."})]}),(0,o.jsxs)("div",{className:p().freshnessActions,children:["changed"===ee.kind&&G?(0,o.jsx)("button",{type:"button",onClick:L,children:"Retry loading latest capture"}):null,(F||(null==en?void 0:en.state)==="unavailable")&&"changed"!==ee.kind&&R?(0,o.jsx)("button",{type:"button",onClick:D,children:"Retry freshness"}):null,el?(0,o.jsxs)("div",{className:p().regenerationAction,children:[(0,o.jsx)("button",{ref:ew,type:"button",disabled:E||eo||"idle"!==ec||!er.allowed||!(null==T?void 0:T.deployedRevision),title:er.reason||((null==T?void 0:T.deployedRevision)?void 0:"The exact environment revision is unavailable."),className:p().regenerationButton,onClick:function(){em(null),ef(null),ek("start"),eu("confirming")},children:eo?R?"Regenerating all videosâ¦":"Capturing first setâ¦":"submitting"===ec?"Starting regenerationâ¦":"accepted"===ec?"Loading regenerationâ¦":"idle"!==ec?"Regeneration details below":R?"Regenerate all videos":"Create first recording set"}),!er.allowed&&er.reason?(0,o.jsx)("p",{className:p().regenerationUnavailableReason,children:er.reason}):null,(0,o.jsx)(k,{hasActiveSet:R})]}):null]})]}),"idle"===ec||eo||eP?null:(0,o.jsx)(w,{environment:y,recordingCount:A,revision:null==T?void 0:T.deployedRevision,phase:ec,message:ev,detail:null!=eg?eg:M,detailTone:"status"===eb?"neutral":"danger",errorTitle:"status"===eb?"Regeneration status is delayed":"Regeneration did not start",retryLabel:"status"===eb?"Refresh status":"Try again",hasActiveSet:R,onCancel:function(){eR.current+=1,ej.current=!0,eu("idle"),em(null),ef(null),ek("start"),null==O||O()},onConfirm:function(){if("status"===eb){var e;eu("accepted"),em("Checking whether the accepted regeneration has appeared."),ef(null),Promise.resolve(null===(e=eC.current)||void 0===e?void 0:e.call(eC)).catch(function(){});return}eE()},onRefreshStatus:D}),(0,o.jsx)(x,{operations:T,actionError:"idle"===ec?M:null,actionLoading:E,environment:y,onRecoverRegeneration:V,dismissedRefreshRunId:U,onDismissRefreshRun:J,onRestoreRefreshRun:function(){return null==H?void 0:H()},refreshProgress:eT,statusHeadingRef:eS,hidden:eM}),(0,o.jsxs)("dl",{className:p().freshnessFacts,children:[R?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("dt",{children:"Generated"}),(0,o.jsx)("dd",{children:null!==(h=g(C))&&void 0!==h?h:"Date unavailable"})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("dt",{children:"Snapshot revision"}),(0,o.jsx)("dd",{children:(0,o.jsx)(S,{label:"Snapshot revision",revision:ea,url:"ready"===ee.kind?null==en?void 0:en.snapshotUrl:null})})]})]}):null,(0,o.jsxs)("div",{children:[(0,o.jsxs)("dt",{children:[(0,d.Li)(y)," revision"]}),(0,o.jsx)("dd",{children:(0,o.jsx)(S,{label:"".concat((0,d.Li)(y)," revision"),revision:null==T?void 0:T.deployedRevision,url:"ready"===ee.kind&&null!==(m=null!==(v=null==en?void 0:en.deployedUrl)&&void 0!==v?v:null==T?void 0:T.deployedSourceUrl)&&void 0!==m?m:null})})]}),null!=I?(0,o.jsxs)("div",{children:[(0,o.jsx)("dt",{children:"Total video"}),(0,o.jsx)("dd",{children:(0,u.LU)(I)})]}):null]}),"development"===y&&R?(0,o.jsx)("p",{className:p().developmentFreshnessNote,children:"This compares committed revisions only. Uncommitted changes in the currently served working tree are not represented."}):null]})},I=function(e){return!(null==e?void 0:e.manifestError)&&!(null==e?void 0:e.sc
1hemaVersion)&&!(null==e?void 0:e.generatedAt)&&(!Array.isArray(null==e?void 0:e.recordings)||0===e.recordings.length)},A=function(e){var n=e.highlights;return(null==n?void 0:n.length)>0?(0,o.jsx)("span",{className:p().highlightBadges,"aria-label":"Changeset highlights",children:n.map(function(e,n){return(0,o.jsxs)("span",{children:[(0,o.jsx)("strong",{children:"Highlight"}),e.reason]},"".concat(e.targetId,"-").concat(n))})}):null},T=function(e){var n=e.environment,t=e.eyebrow,i=e.status,a=e.children,r=e.role,s=e.ariaLive,l=e.headingRef;return(0,o.jsx)(F,{environment:n,eyebrow:t,headingRef:l,summary:i,summaryHeading:!0,role:r,ariaLive:s,children:void 0===a?null:a})},F=function(e){var n=e.environment,t=e.eyebrow,i=e.headingRef,a=e.summary,r=e.summaryHeading,s=e.scope,l=void 0===s?null:s,c=e.role,u=e.ariaLive,h=e.children;return(0,o.jsxs)("header",{className:p().header,role:c,"aria-live":u,children:[(0,o.jsxs)("div",{className:p().headerTopline,children:[(0,o.jsx)("span",{children:t}),(0,o.jsx)("strong",{className:p().environmentBadge,children:(0,d.AW)(n)})]}),(0,o.jsx)("h1",{ref:i,tabIndex:i?-1:void 0,children:d.jI}),(0,o.jsx)(void 0!==r&&r?"h2":"p",{className:p().librarySummary,children:a}),l?(0,o.jsx)("p",{className:p().captureScope,children:l}):null,void 0===h?null:h]})},P=function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"".concat(n?"Retained legacy ".concat((0,d.Li)(e)," evidence. Its source revision is shown when available."):"development"===e?"Isolated test captures of the selected local Development revision.":"Isolated test captures of the ".concat((0,d.Li)(e)," revision selected when generation began.")," These recordings do not run against the live deployment or its shared data.")},M=function(e){var n=e.environment,t=e.headingRef,i=e.captureInProgress,a=void 0!==i&&i,r=e.showPlanned,s=(0,v.a)(),l=s.keyJourneyCount,c=s.focusedCount;return(0,o.jsx)(F,{environment:n,headingRef:t,eyebrow:"QA video library",summary:a?"Capturing the first set":"No ".concat((0,d.Li)(n)," capture yet"),scope:P(n),children:(0,o.jsx)("p",{className:p().captureScope,children:a?"Each capture becomes watchable as it finishes. The set becomes the library once every recording succeeds.":void 0===r||r?"No complete capture has been published for this environment. The planned set below is what the first successful capture will replace. It includes ".concat((0,u.CZ)(l,"key journey")," and ").concat((0,u.CZ)(c,"focused recording"),"."):"No complete capture has been published for this environment. The candidate set below shows what the latest attempt captured."})})},E=function(e){var n,t,i,a,r,s,l=e.environment,d=e.header,c=e.snapshotId,h=e.legacy,v=void 0!==h&&h,m=e.operationsState,g=e.headingRef;return(0,o.jsxs)(F,{environment:l,headingRef:g,eyebrow:v?"QA video archive":"QA video library",summary:(0,o.jsxs)(o.Fragment,{children:[(0,u.CZ)(d.coreJourneyCount,"core journey")," and"," ",(0,u.CZ)(d.focusedRecordingCount,"focused product recording")]}),scope:P(l,v),children:[(null===(n=d.presentation)||void 0===n?void 0:n.kind)==="changeset"?(0,o.jsxs)("section",{className:p().changesetContext,"aria-labelledby":"changeset-context-title",children:[(0,o.jsxs)("div",{className:p().changesetTitleRow,children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{children:"Changeset context"}),(0,o.jsx)("h2",{id:"changeset-context-title",children:d.presentation.title})]}),d.presentation.pullRequestUrl?(0,o.jsx)("a",{href:d.presentation.pullRequestUrl,target:"_blank",rel:"noreferrer",children:"View pull request â"}):null]}),d.presentation.explanation?(0,o.jsxs)("blockquote",{children:[(0,o.jsxs)("p",{children:["â",d.presentation.explanation.text,"â"]}),(0,o.jsxs)("footer",{children:["â ",d.presentation.explanation.attribution.name," \xb7"," ","ai"===d.presentation.explanation.attribution.kind?"AI":"Human"]})]}):null]}):null,(0,o.jsx)(C,{environment:l,snapshotId:c,hasSnapshot:!0,sourceRevision:d.sourceRevision,generatedAt:d.generatedAt,totalDurationMs:d.totalDurationMs,recordingCount:d.coreJourneyCount+d.focusedRecordingCount,operations:null==m?void 0:m.data,operationsError:null==m?void 0:m.error,operationsLoading:null==m?void 0:m.loading,onRetry:null==m?void 0:m.onRetry,onLoadLatestSnapshot:null==m?void 0:m.onLoadLatestSnapshot,actionError:null==m?void 0:m.actionError,actionLoading:null==m?void 0:m.actionLoading,onStartRegeneration:null==m?void 0:m.onStartRegeneration,onPollStatus:null==m?void 0:m.onPollStatus,onRecoverRegeneration:null==m?void 0:m.onRecoverRegeneration,onClearActionError:null==m?void 0:m.onClearActionError,dismissedRefreshRunId:null==m?void 0:m.dismissedRefreshRunId,onDismissRefreshRun:null==m?void 0:m.onDismissRefreshRun,onRestoreRefreshRun:null==m?void 0:m.onRestoreRefreshRun,snapshotReloadFailed:null==m?void 0:m.snapshotReloadFailed,refreshProgress:null==m?void 0:m.refreshProgress,initialRegenerationPhase:null==m?void 0:null===(t=m.previewRegeneration)||void 0===t?void 0:t.initialPhase,initialRegenerationMessage:null==m?void 0:null===(i=m.previewRegeneration)||void 0===i?void 0:i.message,initialRegenerationDetail:null==m?void 0:null===(a=m.previewRegeneration)||void 0===a?void 0:a.detail,initialRegenerationRetryMode:null==m?void 0:null===(r=m.previewRegeneration)||void 0===r?void 0:r.retryMode,acceptedStatusPollingDisabled:null==m?void 0:null===(s=m.previewRegeneration)||void 0===s?void 0:s.acceptedStatusPollingDisabled})]})}},47099:function(e,n,t){"use strict";t.d(n,{Te:function(){return u},VQ:function(){return c},k6:function(){return h},u7:function(){return v}});var i=t(76341),a=t(67462),r=t(53353),s=new Set(["queued","running"]),o=new Set(["failed","cancelled"]),l=function(e){var n=e.activeEvidence,t=e.itemState,i=e.previewAvailable,a=e.runState,r=e.schemaVersion;if(o.has(a)){if("queued"===t)return"Not started";if("recording"===t)return"Interrupted";if("ready"===t)return"Captured, set not activated"}return"queued"===t?n?"Replacement queued":"Waiting to capture":"recording"===t?n?"Generating replacement":"Generating capture":"ready"===t?i?"New capture available":2===r?"Candidate preview unavailable":"Captured for next set":"failed"===t?"Capture failed":null},d=function(e){var n,t,i,a,r,l=e.handoffComplete,d=e.hasActiveSet,c=e.run;if(!c)return null;if(l)return"The new recording set is active.";if("pending"===c.catalogState&&s.has(c.state))return c.environment&&"development"!==c.environment?(null===(n=c.runner)||void 0===n?void 0:n.kind)==="github"?"Setup usually takes several minutes before recording progress appears. GitHub Actions shows detailed live output.":"Waiting for the hosted runner to start. Live setup progress will appear here when it begins.":"Preparing recording list.";var u=null!==(t=c.counts)&&void 0!==t?t:{},h=null!==(i=u.total)&&void 0!==i?i:0,v="".concat(null!==(a=u.ready)&&void 0!==a?a:0," of ").concat(h," captured.");
1if(o.has(c.state)){var m="cancelled"===c.state?"Refresh cancelled.":"Refresh failed.";return d?"".concat(m," ").concat(v," The current set is unchanged."):"".concat(m," ").concat(v," No recording set was activated.")}var p=(null!==(r=c.items)&&void 0!==r?r:[]).filter(function(e){return!0===e.previewAvailable}).length,g="".concat(p," new ").concat(1===p?"capture":"captures"," available to preview."),f="".concat(v," ").concat(g," ").concat(d?"Current set stays active until all ".concat(h," finish."):"The first set activates once all ".concat(h," finish."));return"queued"===c.state?"Refresh queued. ".concat(f):"running"===c.state?"Refresh running. ".concat(f):"Refresh succeeded. ".concat(f," Loading the new recording set.")},c=function(e){var n=e.activeRecordingIds,t=e.displayedSnapshotId,r=e.hasActiveSet,s=e.previewFailedIds,o=void 0===s?new Set:s,c=e.run,u=void 0===c?null:c,h={candidateItems:[],previewItems:[],handoffComplete:!1,issue:null,liveSignature:null,liveSummary:null,statusByRecordingId:new Map,visible:!1};if(!u)return h;var v=Array.isArray(u.items)?u.items:[],m=v.map(function(e){return null==e?void 0:e.recordingId}),p=m.some(function(e){return!e})||new Set(m).size!==m.length,g="succeeded"===u.state&&("ready"!==u.catalogState||!u.candidateSnapshotId||v.some(function(e){return"ready"!==e.state})),f="succeeded"===u.state&&!p&&!g&&!!u.candidateSnapshotId&&(void 0===t?null:t)===u.candidateSnapshotId,y=[u.runId,u.state,u.catalogState,(N=u.counts,["total","queued","recording","ready","failed"].map(function(e){var n;return"".concat(e,":").concat(null!==(n=null==N?void 0:N[e])&&void 0!==n?n:"unknown")}).join("|")),null!==(I=u.candidateSnapshotId)&&void 0!==I?I:"",null!==(A=null===(C=u.failure)||void 0===C?void 0:C.summary)&&void 0!==A?A:"",f?"active":"candidate"].join("|"),b=d({handoffComplete:f,hasActiveSet:void 0===r||r,run:u});if(g)return(0,a._)((0,i._)({},h),{issue:"The completed refresh status is malformed. Candidate recording state is hidden.",liveSignature:y,liveSummary:b,visible:!0});if("pending"===u.catalogState)return(0,a._)((0,i._)({},h),{liveSignature:y,liveSummary:b,visible:!0});if(p)return(0,a._)((0,i._)({},h),{issue:"The refresh recording list is malformed. Candidate recording state is hidden.",liveSignature:y,liveSummary:b,visible:!0});if(f)return(0,a._)((0,i._)({},h),{handoffComplete:!0,liveSignature:y,liveSummary:b});var k=new Set(void 0===n?[]:n),w=new Map,x=[],j=[],S=!0,_=!1,R=void 0;try{for(var N,C,I,A,T,F=v[Symbol.iterator]();!(S=(T=F.next()).done);S=!0){var P,M=T.value,E=k.has(M.recordingId),D=l({activeEvidence:E,itemState:M.state,previewAvailable:!0===M.previewAvailable,runState:u.state,schemaVersion:u.schemaVersion});if(!D)return(0,a._)((0,i._)({},h),{issue:"The refresh item state is not supported. Candidate recording state is hidden.",liveSignature:y,liveSummary:b,visible:!0});var L=o.has(M.recordingId),q={activeEvidence:E,failureSummary:null!==(P=M.failureSummary)&&void 0!==P?P:null,itemState:M.state,label:L?"Candidate preview unavailable":D,previewAvailable:!0===M.previewAvailable&&!L,recordingId:M.recordingId,runState:u.state};w.set(M.recordingId,q),x.push((0,a._)((0,i._)({},M),{status:q})),"ready"===M.state&&!0===M.previewAvailable&&j.push((0,a._)((0,i._)({},M),{status:q}))}}catch(e){_=!0,R=e}finally{try{S||null==F.return||F.return()}finally{if(_)throw R}}if("ready"===u.catalogState){var B=!0,V=!1,O=void 0;try{for(var U,J=k[Symbol.iterator]();!(B=(U=J.next()).done);B=!0){var H=U.value;w.has(H)||w.set(H,{activeEvidence:!0,failureSummary:null,itemState:"absent",label:"Not in next set",previewAvailable:!1,recordingId:H,runState:u.state})}}catch(e){V=!0,O=e}finally{try{B||null==J.return||J.return()}finally{if(V)throw O}}}return x.sort(function(e,n){return e.target.ordinal-n.target.ordinal}),j.sort(function(e,n){return e.target.ordinal-n.target.ordinal}),{candidateItems:x,previewItems:j,handoffComplete:f,issue:null,liveSignature:y,liveSummary:b,statusByRecordingId:w,visible:!0}},u=function(e,n,t){var i=n.trim().toLocaleLowerCase();return e.filter(function(e){return(!t||e.target.domain===t)&&(!i||[e.target.label,e.target.title,e.target.domain].join(" ").toLocaleLowerCase().includes(i))})},h=function(e){return[{key:"key-journey",title:"Key journeys",items:e.filter(function(e){return"key-journey"===e.target.placement})},{key:"focused",title:"Focused recordings",items:e.filter(function(e){return"key-journey"!==e.target.placement})}].filter(function(e){return e.items.length>0})},v=function(e){return(0,r._)(new Set(e.map(function(e){return e.target.domain}))).sort(function(e,n){return e.localeCompare(n)})}},45680:function(e,n,t){"use strict";t.d(n,{CZ:function(){return L},LU:function(){return D},Pd:function(){return P},i6:function(){return T},jf:function(){return F},lf:function(){return E},ms:function(){return M},v4:function(){return q}});var i=t(76341),a=t(67462),r=t(93128),s=t(53353),o=t(72348),l=function(e){return!!e&&"object"==typeof e&&!Array.isArray(e)},d=function(e,n){return Object.keys(e).every(function(e){return n.includes(e)})},c=function(e){return"string"==typeof e&&e.trim().length>0},u=function(e){return Array.isArray(e)&&e.every(c)},h=function(e){return"number"==typeof e&&Number.isFinite(e)&&e>0},v=function(e){return c(e)&&!Number.isNaN(Date.parse(e))},m=function(e){if(!c(e))return!1;try{var n=new URL(e);return"http:"===n.protocol||"https:"===n.protocol}catch(e){return!1}},p=new Set(["real-product-flow","external-event-simulated","seeded-ui-example"]),g=new Set(["browser","database","webhook","job","integration"]),f=function(e){return l(e)&&c(e.id)&&c(e.title)},y=function(e){return l(e)&&c(e.id)&&c(e.title)&&g.has(e.kind)&&c(e.evidence)},b=function(e){var n;
1return l(e)&&c(e.id)&&c(e.title)&&c(e.summary)&&c(e.outcome)&&u(e.actors)&&e.actors.length>0&&c(e.startState)&&c(e.endState)&&l(n=e.fidelity)&&p.has(n.classification)&&u(n.boundaries)&&("external-event-simulated"!==n.classification||n.boundaries.length>0)&&u(e.coverageAnchors)&&u(e.safeguards)},k=function(e){return b(e)&&("required"===e.coverageStatus||"planned-gap"===e.coverageStatus)&&("planned-gap"===e.coverageStatus?c(e.gapReason):null==e.gapReason)&&Array.isArray(e.chapters)&&e.chapters.length>0&&e.chapters.every(function(n){var t;return t=e.coverageStatus,b(n)&&Array.isArray(n.steps)&&n.steps.length>0&&n.steps.every(f)&&Array.isArray(n.checkpoints)&&n.checkpoints.every(y)&&Array.isArray(n.supportingRecordingIds)&&n.supportingRecordingIds.every(c)&&("required"===t?c(n.primaryRecordingId):null==n.primaryRecordingId&&0===n.supportingRecordingIds.length)})},w=function(e){return b(e)&&c(e.recordingId)&&Array.isArray(e.steps)&&e.steps.length>0&&e.steps.every(f)&&Array.isArray(e.checkpoints)&&e.checkpoints.every(y)},x=function(e){if(1===e.schemaVersion){if(null!=e.presentation)return{issue:"A schema version 1 snapshot cannot contain presentation metadata."};var n,t=l(n=e.reviewBrief)&&1===n.schemaVersion&&c(n.releaseTitle)&&m(n.pullRequestUrl)&&c(n.explanationQuote)&&l(n.attribution)&&["human","ai"].includes(n.attribution.kind)&&c(n.attribution.name)&&Array.isArray(n.priorities)?n.priorities.every(function(e){return l(e)&&["journey","chapter","standalone"].includes(e.targetType)&&c(e.targetId)&&c(e.reason)})?null:"The release brief contains an invalid priority reference.":"The release brief does not match the supported schema.";return t?{issue:t}:{presentation:{schemaVersion:1,kind:"changeset",title:e.reviewBrief.releaseTitle,pullRequestUrl:e.reviewBrief.pullRequestUrl,explanation:{text:e.reviewBrief.explanationQuote,attribution:e.reviewBrief.attribution},highlights:e.reviewBrief.priorities}}}if(2===e.schemaVersion){if(null!=e.reviewBrief)return{issue:"A schema version 2 snapshot cannot contain a review brief."};var i,a=l(i=e.presentation)&&1===i.schemaVersion&&["library","changeset"].includes(i.kind)?"library"===i.kind?Object.keys(i).every(function(e){return["schemaVersion","kind"].includes(e)})?null:"The library presentation contains unsupported changeset metadata.":c(i.title)&&d(i,["schemaVersion","kind","title","pullRequestUrl","explanation","highlights"])&&(null==i.pullRequestUrl||m(i.pullRequestUrl))&&(null==i.explanation||l(i.explanation)&&d(i.explanation,["text","attribution"])&&c(i.explanation.text)&&l(i.explanation.attribution)&&d(i.explanation.attribution,["kind","name"])&&["human","ai"].includes(i.explanation.attribution.kind)&&c(i.explanation.attribution.name))&&Array.isArray(i.highlights)?i.highlights.every(function(e){return l(e)&&d(e,["targetType","targetId","reason"])&&["journey","chapter","standalone"].includes(e.targetType)&&c(e.targetId)&&c(e.reason)})?null:"The changeset presentation contains an invalid highlight reference.":"The changeset presentation does not match the supported schema.":"The snapshot presentation does not match the supported schema.";return a?{issue:a}:{presentation:e.presentation}}return{issue:"This snapshot uses schema version ".concat(e.schemaVersion,", but this dashboard supports versions ").concat(1," and ").concat(2,".")}},j=function(e){if(!l(e)||1!==e.schemaVersion||!Array.isArray(e.journeys)||!e.journeys.every(k)||!Array.isArray(e.standaloneItems)||!e.standaloneItems.every(w))return"The journey catalog does not match the supported schema.";var n=(0,s._)(e.journeys.flatMap(function(e){return[e.id].concat((0,s._)(e.chapters.flatMap(function(e){return[e.id].concat((0,s._)(e.steps.map(function(e){return e.id})),(0,s._)(e.checkpoints.map(function(e){return e.id})))})))})).concat((0,s._)(e.standaloneItems.flatMap(function(e){return[e.id].concat((0,s._)(e.steps.map(function(e){return e.id})),(0,s._)(e.checkpoints.map(function(e){return e.id})))})));return new Set(n).size===n.length?null:"The journey catalog contains duplicate identifiers."},S=function(e){return l(e)&&c(e.id)&&c(e.testFilePath)&&c(e.videoUrl)&&c(e.label)&&c(e.title)&&
1c(e.domain)&&h(e.durationMs)&&h(e.width)&&h(e.height)&&h(e.sizeBytes)&&v(e.renderedAt)&&"string"==typeof e.contentDigest&&/^[a-f0-9]{64}$/.test(e.contentDigest)&&"passed"===e.testResult&&["every-PR","out-of-gate"].includes(e.runHome)&&Array.isArray(e.chapterMarkers)&&e.chapterMarkers.every(function(n){return l(n)&&c(n.chapterId)&&"number"==typeof n.startMs&&Number.isFinite(n.startMs)&&"number"==typeof n.endMs&&Number.isFinite(n.endMs)&&n.startMs>=0&&n.endMs>n.startMs&&n.endMs<=e.durationMs})},_=function(e){return l(e)&&1===e.schemaVersion&&"string"==typeof e.evidenceId&&/^evidence-v1-[a-f0-9]{64}$/.test(e.evidenceId)&&["chapter","standalone"].includes(e.targetType)&&c(e.targetId)&&c(e.recordingId)&&l(e.playableSegment)&&"number"==typeof e.playableSegment.startMs&&Number.isFinite(e.playableSegment.startMs)&&"number"==typeof e.playableSegment.endMs&&Number.isFinite(e.playableSegment.endMs)},R=function(e,n,t,i){var a=e.filter(function(e){return l(e)&&1===e.schemaVersion&&e.targetType===n&&e.targetId===t&&e.recordingId===i.id});if(1!==a.length||!l(a[0].playableSegment))return null;var r=a[0].playableSegment,s=r.startMs,o=r.endMs;return"number"!=typeof s||"number"!=typeof o||!Number.isFinite(s)||!Number.isFinite(o)||s<0||o<=s||o>i.durationMs?null:{startMs:s,endMs:o}},N=function(e){return{kind:"upgrade",message:e,recordings:[],journeys:[],plannedGaps:[],libraryItems:[]}},C=function(e){var n,t,i,a,r,s,o,l,d,c,u,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return{id:null!==(n=null==h?void 0:h.id)&&void 0!==n?n:e.id,title:null!==(t=null==h?void 0:h.title)&&void 0!==t?t:e.label,summary:null!==(i=null==h?void 0:h.summary)&&void 0!==i?i:e.title.replace("@out-of-gate","").trim(),businessOutcome:null!==(a=null==h?void 0:h.outcome)&&void 0!==a?a:null,actors:null!==(r=null==h?void 0:h.actors)&&void 0!==r?r:[],startState:null!==(s=null==h?void 0:h.startState)&&void 0!==s?s:null,endState:null!==(o=null==h?void 0:h.endState)&&void 0!==o?o:null,fidelity:null!==(l=null==h?void 0:h.fidelity)&&void 0!==l?l:null,steps:null!==(d=null==h?void 0:h.steps)&&void 0!==d?d:[],checkpoints:null!==(c=null==h?void 0:h.checkpoints)&&void 0!==c?c:[],highlights:null!==(u=null==h?void 0:h.highlights)&&void 0!==u?u:[],domain:e.domain||"Other",recording:e}},I=function(e){return e.some(function(e){return"number"!=typeof e.durationMs||e.durationMs<=0})?null:e.reduce(function(e,n){return e+n.durationMs},0)},A=function(e){if((null==e?void 0:e.recordings)!=null&&!Array.isArray(e.recordings))return N("The older flat snapshot has an invalid recordings collection.");var n,t,i,a,r=null!==(n=null==e?void 0:e.recordings)&&void 0!==n?n:[];return r.every(function(e){return l(e)&&c(e.id)&&c(e.testFilePath)&&c(e.title)&&c(e.label)&&c(e.domain)&&c(e.videoUrl)})?{kind:"legacy",header:{presentation:{schemaVersion:1,kind:"library"},coreJourneyCount:null,focusedRecordingCount:new Set(r.filter(function(e){return"focused"===e.placement}).map(function(e){return e.id})).size,sourceRevision:null!==(t=null==e?void 0:e.sourceRevision)&&void 0!==t?t:null,sourceDirty:null!==(i=null==e?void 0:e.sourceDirty)&&void 0!==i?i:null,generatedAt:null!==(a=null==e?void 0:e.generatedAt)&&void 0!==a?a:null,totalDurationMs:I(r)},recordings:r,journeys:[],plannedGaps:[],libraryItems:r.map(function(e){return C(e)})}:N("The older flat snapshot contains malformed recording metadata.")},T=function(e){if(c(null==e?void 0:e.manifestError))return N(e.manifestError);if(!l(e)||null==e.schemaVersion)return A(e);var n,t,r=x(e);if(r.issue)return N(r.issue);var s=r.presentation,d=j(e.catalog);if(d)return N(d);if(!Array.isArray(e.recordings)||!e.recordings.every(S))return N("The snapshot recording facts do not match the supported schema.");if(!Array.isArray(e.evidenceIdentities)||!e.evidenceIdentities.every(_))return N("The snapshot is missing playable evidence ranges.");if(null!==e.sourceRevision&&!c(e.sourceRevision)||"boolean"!=typeof e.sourceDirty||!v(e.generatedAt))return N("The snapshot source metadata does not match the supported schema.");var u=e.recordings.map(function(e){return e.id});if(new Set(u).size!==u.length)return N("The snapshot contains duplicate recording IDs.");var h=new Map(e.recordings.map(function(e){return[e.id,e]})),m=new Map;e.catalog.journeys.forEach(function(e){m.set(e.id,"journey"),e.chapters.forEac
1h(function(e){return m.set(e.id,"chapter")})}),e.catalog.standaloneItems.forEach(function(e){return m.set(e.id,"standalone")});var p="changeset"===s.kind?s.highlights:[];if(p.find(function(e){return m.get(e.targetId)!==e.targetType}))return N("The changeset presentation points to catalog content that is not present.");var g=new Map;p.forEach(function(e){var n,t=null!==(n=g.get(e.targetId))&&void 0!==n?n:[];t.push(e),g.set(e.targetId,t)});var f=new Set,y=[],b=[],k=[],w=!0,T=!1,F=void 0;try{for(var P,M=e.catalog.journeys[Symbol.iterator]();!(w=(P=M.next()).done);w=!0){var E=function(){var n,t=P.value;if("planned-gap"===t.coverageStatus){var r,s=(0,a._)((0,i._)({},t),{chapters:t.chapters.map(function(e){var n;return(0,a._)((0,i._)({},e),{highlights:null!==(n=g.get(e.id))&&void 0!==n?n:[]})}),highlights:null!==(r=g.get(t.id))&&void 0!==r?r:[]});return b.push(s),k.push(s),"continue"}var l=[],d=!0,c=!1,u=void 0;try{for(var v,m=t.chapters[Symbol.iterator]();!(d=(v=m.next()).done);d=!0){var p=function(){var n,t=v.value,r=h.get(t.primaryRecordingId);if(!r)return{v:N("Chapter â".concat(t.title,"â references a recording that is not published."))};var s=R(e.evidenceIdentities,"chapter",t.id,r);if(!s)return{v:N("Chapter â".concat(t.title,"â does not have one valid playable range."))};var o=r.chapterMarkers.filter(function(e){return e.chapterId===t.id});if(1!==o.length||o[0].startMs!==s.startMs||o[0].endMs!==s.endMs)return{v:N("Chapter â".concat(t.title,"â has inconsistent generated timeline markers."))};f.add(r.id);var d=!0,c=!1,u=void 0;try{for(var m,p=t.supportingRecordingIds[Symbol.iterator]();!(d=(m=p.next()).done);d=!0){var y=m.value;if(!h.has(y))return{v:N("Chapter â".concat(t.title,"â references supporting evidence that is not published."))};f.add(y)}}catch(e){c=!0,u=e}finally{try{d||null==p.return||p.return()}finally{if(c)throw u}}l.push((0,a._)((0,i._)({},t),{recording:r,segment:s,highlights:null!==(n=g.get(t.id))&&void 0!==n?n:[]}))}();if("object"===(0,o._)(p))return{v:p.v}}}catch(e){c=!0,u=e}finally{try{d||null==m.return||m.return()}finally{if(c)throw u}}var w=(0,a._)((0,i._)({},t),{chapters:l,highlights:null!==(n=g.get(t.id))&&void 0!==n?n:[]});y.push(w),k.push(w)}();if("object"===(0,o._)(E))return E.v}}catch(e){T=!0,F=e}finally{try{w||null==M.return||M.return()}finally{if(T)throw F}}var D=new Map,L=!0,q=!1,B=void 0;try{for(var V,O=e.catalog.standaloneItems[Symbol.iterator]();!(L=(V=O.next()).done);L=!0){var U,J,H=V.value,Q=h.get(H.recordingId);if(!Q)return N("Standalone item â".concat(H.title,"â references a recording that is not published."));if(!R(e.evidenceIdentities,"standalone",H.id,Q))return N("Standalone item â".concat(H.title,"â does not have one valid playable range."));var G=null!==(U=D.get(Q.id))&&void 0!==U?U:[];G.push((0,a._)((0,i._)({},H),{highlights:null!==(J=g.get(H.id))&&void 0!==J?J:[]})),D.set(Q.id,G)}}catch(e){q=!0,B=e}finally{try{L||null==O.return||O.return()}finally{if(q)throw B}}var z=new Map;e.catalog.journeys.forEach(function(e){"required"===e.coverageStatus&&e.chapters.forEach(function(e){var n,t=null!==(n=z.get(e.primaryRecordingId))&&void 0!==n?n:[];t.push(e.id),z.set(e.primaryRecordingId,t)})});var W=e.recordings.find(function(e){var n,t=null!==(n=z.get(e.id))&&void 0!==n?n:[],i=e.chapterMarkers.map(function(e){return e.chapterId});return t.length!==i.length||t.some(function(e,n){return e!==i[n]})});if(W)return N("Recording â".concat(W.label,"â has timeline markers that do not match catalog order."));var K=e.catalog.journeys.filter(function(e){return"required"===e.coverageStatus}).map(function(e){return{journeyId:e.id,chapterIds:e.chapters.map(function(e){return e.id})}}),$=e.catalog.journeys.filter(function(e){return"planned-gap"===e.coverageStatus}).map(function(e){return e.id});if(JSON.stringify(e.requiredChecklist)!==JSON.stringify(K)||JSON.stringify(e.plannedGaps)!==JSON.stringify($))return N("The snapshot coverage indexes do not match its journey catalog.");var Y=e.recordings.flatMap(function(e){var n,t=null!==(n=D.get(e.id))&&void 0!==n?n:[];return t.length>0?t.map(function(n){return C(e,n)}):f.has(e.id)?[]:[C(e)]});return{kind:"current",header:{presentation:s,coreJourneyCount:y.length,focusedRecordingCount:new Set(e.recordings.filter(function(e){return"focused"===e.placement}).map(function(e){return e.id})).size,sourceRevision:null!==(n=e.sourceRevision)&&void 0!==n?n:null,
1sourceDirty:e.sourceDirty,generatedAt:null!==(t=e.generatedAt)&&void 0!==t?t:null,totalDurationMs:I(e.recordings)},recordings:e.recordings,journeys:y,catalogJourneys:k,plannedGaps:b,libraryItems:Y}},F=function(e,n,t){var i=n.trim().toLocaleLowerCase();return e.filter(function(e){return(!t||e.domain===t)&&(!i||[e.title,e.summary,e.businessOutcome,e.domain,e.recording.testFilePath].filter(Boolean).join(" ").toLocaleLowerCase().includes(i))})},P=function(e){var n=new Map;return e.forEach(function(e){var t,i=null!==(t=n.get(e.domain))&&void 0!==t?t:[];i.push(e),n.set(e.domain,i)}),(0,s._)(n.entries()).sort(function(e,n){var t=(0,r._)(e,1)[0],i=(0,r._)(n,1)[0];return t.localeCompare(i)}).map(function(e){var n=(0,r._)(e,2);return{domain:n[0],items:n[1]}})},M=function(e){return(0,s._)(new Set(e.map(function(e){return e.domain}))).sort(function(e,n){return e.localeCompare(n)})},E=function(e,n){if(0===e.length||!Number.isFinite(n))return null;if(n<=e[0].segment.startMs)return e[0];var t=e.find(function(t,i){return n>=t.segment.startMs&&(n<t.segment.endMs||i===e.length-1&&n<=t.segment.endMs)});return null!=t?t:e[e.length-1]},D=function(e){if("number"!=typeof e||e<0)return"Unknown length";var n=Math.round(e/1e3),t=Math.floor(n/3600),i=Math.floor(n%3600/60),a=n%60;return t>0?"".concat(t,":").concat(String(i).padStart(2,"0"),":").concat(String(a).padStart(2,"0")):"".concat(i,":").concat(String(a).padStart(2,"0"))},L=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"".concat(n,"s");return"number"==typeof e?"".concat(e," ").concat(1===e?n:t):"".concat(n[0].toUpperCase()).concat(n.slice(1)," count unavailable")},q=function(e){var n;return null!==(n=({"real-product-flow":"Real product flow","external-event-simulated":"External service simulated","seeded-ui-example":"Seeded UI example"})[e])&&void 0!==n?n:"Fidelity not documented"}},80026:function(e){e.exports={paletteSurface:"styles_paletteSurface__ows7s",scroll:"styles_scroll__myPoA",container:"styles_container__L9M8t",eyebrow:"styles_eyebrow__Ag83p",headerTopline:"styles_headerTopline__5gTww",panelHeading:"styles_panelHeading__Azuok",header:"styles_header__BV97a",environmentBadge:"styles_environmentBadge__lwAt6",librarySummary:"styles_librarySummary__k1qZc",captureScope:"styles_captureScope__9RREO",changesetContext:"styles_changesetContext__o_ITm",changesetTitleRow:"styles_changesetTitleRow__99yLj",highlightBadges:"styles_highlightBadges__gq409",freshnessPanel:"styles_freshnessPanel__aw6FR",freshnessHeading:"styles_freshnessHeading__pktfr",freshnessStatusRow:"styles_freshnessStatusRow__daYxz",developmentFreshnessNote:"styles_developmentFreshnessNote__gP9lP",freshnessActions:"styles_freshnessActions___fCMm",regenerationAction:"styles_regenerationAction__YlMO7",regenerationUnavailableReason:"styles_regenerationUnavailableReason__Eberk",regenerationButton:"styles_regenerationButton__a7VNV",freshnessFacts:"styles_freshnessFacts__jc1Qm",regenerationHelp:"styles_regenerationHelp__luFcg",regenerationHelpTrigger:"styles_regenerationHelpTrigger__nGje5",regenerationHelpPopover:"styles_regenerationHelpPopover__hycjk",regenerationConfirmation:"styles_regenerationConfirmation__tBMwC",regenerationConfirmationCompact:"styles_regenerationConfirmationCompact__MnG9O",regenerationConfirmationActions:"styles_regenerationConfirmationActions__MfOFn",regenerationEyebrow:"styles_regenerationEyebrow__wUSMt",regenerationConfirmationNotice:"styles_regenerationConfirmationNotice__3p9sA",regenerationFailureDetail:"styles_regenerationFailureDetail__qPau_",regenerationStatusDetail:"styles_regenerationStatusDetail__UW1H9",confirmRegenerationButton:"styles_confirmRegenerationButton__Gt8Z7",refreshRunPanel:"styles_refreshRunPanel__x7Mrd",refreshRunHeading:"styles_refreshRunHeading__Yaql1",refreshState:"styles_refreshState__Rwz5R",lastRefreshSummary:"styles_lastRefreshSummary__bHAiC",refreshFailure:"styles_refreshFailure__AvRn7",refreshRunActions:"styles_refreshRunActions__ofYJj",refreshRunPrimaryAction:"styles_refreshRunPrimaryAction__TwALb",visuallyHidden:"styles_visuallyHidden__mf1nw",candidateStatus:"styles_candidateStatus__lTfsi",candidateStatusFailed:"styles_candidateStatusFailed__LJATn",candidateStatusPlanned:"styles_candidateStatusPlanned__xUwan",
1journeyWorkspace:"styles_journeyWorkspace__q6zzO",journeyNavigation:"styles_journeyNavigation__bSgbL",chapterBrowser:"styles_chapterBrowser__WjvgO",journeyNavItem:"styles_journeyNavItem__C8vfH",gapJourneyNavItem:"styles_gapJourneyNavItem__Tgg7I",selectedJourney:"styles_selectedJourney__fKPmx",journeyNumber:"styles_journeyNumber__RSfRS",journeyNavCopy:"styles_journeyNavCopy__IJyo0",chapterNavigation:"styles_chapterNavigation__w5orZ",selectedChapter:"styles_selectedChapter__y1KNF",chapterNumber:"styles_chapterNumber__fF12h",chapterHeader:"styles_chapterHeader__anty1",fidelityPill:"styles_fidelityPill__P4xsb",videoFrame:"styles_videoFrame__BIVDw",video:"styles_video__PMe9p",videoUnavailable:"styles_videoUnavailable__bEkT2",timeline:"styles_timeline__AeKVJ",timelineLabels:"styles_timelineLabels__L_Nho",timelineEnds:"styles_timelineEnds__G_9mb",timelineTrack:"styles_timelineTrack__zxJIt",timelineChapter:"styles_timelineChapter__ZB3sS",timelineChapterActive:"styles_timelineChapterActive__Dukyj",timelinePlayhead:"styles_timelinePlayhead__CjQV8",outcomeCard:"styles_outcomeCard__p_eCM",detailsGrid:"styles_detailsGrid__nnpw_",steps:"styles_steps__jf4t5",stateList:"styles_stateList__Bftyv",disclosures:"styles_disclosures__pplpc",fidelity:"styles_fidelity__AV40s",unknown:"styles_unknown__BV1Ar",checkpoints:"styles_checkpoints__y_AOY",plannedGaps:"styles_plannedGaps__URx0_",library:"styles_library__yoVo2",noJourneys:"styles_noJourneys__y7MtU",candidateLibrary:"styles_candidateLibrary__dScZa",libraryHeading:"styles_libraryHeading__Pie4F",candidateControls:"styles_candidateControls__n_Awt",candidatePreviewActions:"styles_candidatePreviewActions__9gGMv",sourceSwitch:"styles_sourceSwitch__J6Ypi",candidateGrid:"styles_candidateGrid__lFr04",candidateGroup:"styles_candidateGroup__4PhsV",candidateCard:"styles_candidateCard__92jui",candidateCardTrigger:"styles_candidateCardTrigger__jOmsi",candidatePlaceholder:"styles_candidatePlaceholder__2zO0E",chapterCandidatePreview:"styles_chapterCandidatePreview__WPYm6",chapterCandidateButton:"styles_chapterCandidateButton__QklIt",chapterPlaceholder:"styles_chapterPlaceholder__lIEiU",candidatePlaceholderPlanned:"styles_candidatePlaceholderPlanned___87Ts",candidateCardCopy:"styles_candidateCardCopy__2voLr",gapList:"styles_gapList__gW8kW",libraryCount:"styles_libraryCount__dQ8OC",libraryControls:"styles_libraryControls__n_pHW",categoryFilters:"styles_categoryFilters__Bed_x",libraryGroups:"styles_libraryGroups__HJesK",libraryGroup:"styles_libraryGroup__Y5DAh",libraryGrid:"styles_libraryGrid__N6ncc",libraryCard:"styles_libraryCard__tWMZ9",libraryCardCopy:"styles_libraryCardCopy___D0ud",thumbnail:"styles_thumbnail__NTyQ5",thumbnailPlaceholder:"styles_thumbnailPlaceholder__v1sKN",playBadge:"styles_playBadge__GLmO_",libraryDialog:"styles_libraryDialog__Ccg_2",dialogSurface:"styles_dialogSurface__PA5pX",dialogHeader:"styles_dialogHeader__Hapqx",dialogNavigation:"styles_dialogNavigation__gYUBj",noResults:"styles_noResults__mBI03",dialogBody:"styles_dialogBody___nbCz",libraryFacts:"styles_libraryFacts__EV_cP",emptyLibrary:"styles_emptyLibrary__58tEM",statePage:"styles_statePage__hM2pF",candidatePreviewList:"styles_candidatePreviewList__YUvCP",candidateRevision:"styles_candidateRevision__F6nHA",candidateRange:"styles_candidateRange__iKTU1",candidateSourceCaption:"styles_candidateSourceCaption__63xWC",candidatePreviewError:"styles_candidatePreviewError__HPPRY",candidateJourneyContext:"styles_candidateJourneyContext__clCiI",candidateAssurances:"styles_candidateAssurances__zVdZm",captureFailure:"styles_captureFailure__cw_Cd",captureFailureNotice:"styles_captureFailureNotice__9cLiQ"}}}]); 2//# sourceMappingURL=6746-3424144b6075725a.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.