`}}childRowClicked(e,t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(Mn,{bubbles:!0,composed:!0,detail:{nodeId:e}}))}getOwnChanges(e){if(!e.timeline?.length)return[];let t=e.childChanges;if(!t?.length)return e.timeline;let n=new Set;for(let e of t){let t=this.nodeMap?.get(e.nodeId);if(t?.timeline)for(let e of t.timeline)n.add(`${e.path}:${e.property}:${e.change}:${e.context?.newLine}:${e.context?.originalLine}`)}return e.timeline.filter(e=>!n.has(`${e.path}:${e.property}:${e.change}:${e.context?.newLine}:${e.context?.originalLine}`))}renderChildRows(){let e=this.node?.childChanges;return!e||e.length===0?P:N`${e.map(e=>N`
- `}};fx.styles=[wn,en,dx],D([M(`input[type="checkbox"]`)],fx.prototype,`input`,2),D([j()],fx.prototype,`hasFocus`,2),D([A()],fx.prototype,`title`,2),D([A()],fx.prototype,`name`,2),D([A()],fx.prototype,`value`,2),D([A({reflect:!0})],fx.prototype,`size`,2),D([A({type:Boolean,reflect:!0})],fx.prototype,`disabled`,2),D([A({type:Boolean,reflect:!0})],fx.prototype,`checked`,2),D([$t(`checked`)],fx.prototype,`defaultChecked`,2),D([A({reflect:!0})],fx.prototype,`form`,2),D([A({type:Boolean,reflect:!0})],fx.prototype,`required`,2),D([A({attribute:`help-text`})],fx.prototype,`helpText`,2),D([I(`checked`,{waitUntilFirstUpdate:!0})],fx.prototype,`handleCheckedChange`,1),D([I(`disabled`,{waitUntilFirstUpdate:!0})],fx.prototype,`handleDisabledChange`,1),fx.define(`sl-switch`);var px=[`MODIFIED`,`ADDED`,`REMOVED`],mx=[`BREAKING`,`NON-BREAKING`],hx={Additions:`ok`,Modifications:`tertiary`,Removals:`error`};function gx(e){try{return new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}catch{return e}}function _x(e,t,n,r){return{pointRadius:Array.from({length:e},(e,n)=>n===t?12:4),pointBackgroundColor:Array.from({length:e},(e,i)=>i===t?n:r),pointBorderColor:Array(e).fill(r),pointBorderWidth:Array.from({length:e},(e,n)=>n===t?3:1)}}var vx=class extends F{constructor(...e){super(...e),this.data=null,this.activeItemIndex=0,this.error=``,this.activeMainTab=`overview`,this.selectedDiffChanges=[],this.selectedNodeId=null,this.selectedNodeChanges=[],this._graphNodeMap=new Map,this._cachedChartIndex=-1,this._cachedData=null,this._changeDataset=[],this._breakingDataset=[],this._overviewResizeObserver=null,this._chartsInitialized=!1,this._onThemeChange=()=>{requestAnimationFrame(()=>{this.updateBeefyChart(),this.resizeDoughnutCharts()})},this.handleTabShow=e=>{this.onTabShow(e)},this._onTreeNodeClicked=e=>{this.handleTreeNodeClicked(e)}}static{this.styles=Lb}get _chartPointIndex(){let e=this.data?.history?.changeData?.labels?.length??0;return e>0?e-1-this.activeItemIndex:0}connectedCallback(){super.connectedCallback(),this.loadData(),this.addEventListener(An,this._onTreeNodeClicked),window.addEventListener(`pb33f-theme-change`,this._onThemeChange)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(An,this._onTreeNodeClicked),window.removeEventListener(`pb33f-theme-change`,this._onThemeChange),this._overviewResizeObserver?.disconnect()}loadData(){try{let e=document.getElementById(`report-data`);if(e?.textContent){this.data=JSON.parse(e.textContent);return}if(window.__REPORT_DATA__){this.data=window.__REPORT_DATA__;return}this.error=`No report data found`}catch(e){this.error=`Failed to parse report data: ${e}`}}get activeItem(){return this.data?.items?.length&&this.data.items[this.activeItemIndex]||null}get isMultiCommit(){return(this.data?.items?.length??0)>1}selectItem(e){this.activeItemIndex=e,this.selectedDiffChanges=[],this.selectedNodeId=null,this.selectedNodeChanges=[]}selectNode(e){this.selectedNodeId=e;let t=this._graphNodeMap.get(e);t?(this.selectedNodeChanges=t.timeline||[],this.selectedDiffChanges=t.timeline||[]):(this.selectedNodeChanges=[],this.selectedDiffChanges=[])}updateModelTree(){let e=this.activeItem;if(!this.modelTree||!e?.graph?.nodes)return;let t=new Map;for(let n of e.graph.nodes)t.set(n.id,n);this._graphNodeMap=t,this.modelTree.nodeMap=t,this.modelTree.node=t.get(`root`)||null,this.modelTree.changesEnabled=!0,this.modelTree.violationMap=new Map}updateBeefyChart(){if(!this.beefyChart||!this.data?.history?.changeData)return;let e=this.data.history.changeData,t=e.labels.length,n=this._chartPointIndex,r=this.beefyChart.background||`#1a1e2e`,i=document.documentElement.getAttribute(`theme`)===`light`,a={ok:`#000`,tertiary:`#999`,error:`#555`};this.beefyChart.datasets=e.datasets.map(e=>{let o=hx[e.label]||``,s=i?a[o]||`#666`:e.borderColor||o&&this.beefyChart[o]||`#888`;return{...e,borderColor:s,borderWidth:3,tension:0,fill:!1,pointStyle:`rect`,..._x(t,n,r,s)}}),this.beefyChart.labels=e.labels.map(e=>gx(e)),this.beefyChart.buildChart(),requestAnimationFrame(()=>this._drawActiveGlow())}_drawActiveGlow(){let e=this.beefyChart?.chart;if(!e)return;let t=this._chartPointIndex,n=e.ctx;for(let r of e.getSortedVisibleDatasetMetas()){let i=r.data[t];if(!i)continue;let a=e.data.datasets[r.index]?.borderColor||`#fff`;for(let e=0;e<5;e++)n.save(),n.shadowColor=a,n.shadowBlur=25+e*12,n.strokeStyle=a,n.lineWidth=2,n.globalAlpha=.9,n.strokeRect(i.x-12,i.y-12,24,24),n.restore()}}updateBeefyChartHighlight(){let e=this.beefyChart?.chart;if(!e)return;let t=this._chartPointIndex,n=this.beefyChart.background||`#1a1e2e`;for(let r of e.data.datasets){let e=r.data.length;Object.assign(r,_x(e,t,n,r.borderColor))}e.update(`none`),requestAnimationFrame(()=>this._drawActiveGlow())}willUpdate(e){(e.has(`activeItemIndex`)||e.has(`data`))&&this.updateChartData()}updated(e){super.updated(e),(e.has(`activeItemIndex`)||e.has(`data`))&&this.updateComplete.then(()=>{this.onDataOrIndexChanged(e),this._upgradeReportIcons()})}_upgradeReportIcons(){let e=this.renderRoot.querySelectorAll(`.change-report pb33f-model-icon`);for(let t of e)t.getAttribute(`size`)!==`medium`&&t.setAttribute(`size`,`medium`)}onDataOrIndexChanged(e){this.updateModelTree(),e.has(`data`)&&requestAnimationFrame(()=>{this.mainTabGroup&&this.mainTabGroup.show(`overview`),this._observeOverviewPanel()}),e.has(`activeItemIndex`)&&this._chartsInitialized&&this.updateBeefyChartHighlight()}_observeOverviewPanel(){if(this._overviewResizeObserver)return;let e=this.renderRoot.querySelector(`.overview-content`);e&&(this._overviewResizeObserver=new ResizeObserver(e=>{for(let t of e)t.contentRect.width>0&&t.contentRect.height>0&&!this._chartsInitialized&&(this._chartsInitialized=!0,this.updateBeefyChart(),this.resizeDoughnutCharts())}),this._overviewResizeObserver.observe(e))}onTabShow(e){this.activeMainTab=e.detail.name,e.detail.name===`overview`&&this.updateComplete.then(()=>{this.updateBeefyChart(),this.resizeDoughnutCharts()})}resizeDoughnutCharts(){let e=this.renderRoot.querySelectorAll(`pb33f-doughnut-chart`);for(let t of e)t.chart?.resize()}updateChartData(){if(this._cachedChartIndex===this.activeItemIndex&&this._cachedData===this.data)return;this._cachedChartIndex=this.activeItemIndex,this._cachedData=this.data;let e=this.activeItem;e&&(this._changeDataset=[{labels:px,data:[e.summary.modifications||0,e.summary.additions||0,e.summary.removals||0]}],this._breakingDataset=[{labels:mx,data:[e.summary.breakingChanges||0,(e.summary.totalChanges||0)-(e.summary.breakingChanges||0)]}])}handleTreeNodeClicked(e){let{changes:t}=e.detail;t&&t.length>0&&this.navigateToDiffForChanges(t)}navigateToDiffForChanges(e){e&&e.length!==0&&(this.selectedDiffChanges=[...e],this.mainTabGroup&&this.mainTabGroup.show(`diff`))}renderNavigator(){return N`
+ `}};gx.styles=[wn,en,hx],D([M(`input[type="checkbox"]`)],gx.prototype,`input`,2),D([j()],gx.prototype,`hasFocus`,2),D([A()],gx.prototype,`title`,2),D([A()],gx.prototype,`name`,2),D([A()],gx.prototype,`value`,2),D([A({reflect:!0})],gx.prototype,`size`,2),D([A({type:Boolean,reflect:!0})],gx.prototype,`disabled`,2),D([A({type:Boolean,reflect:!0})],gx.prototype,`checked`,2),D([$t(`checked`)],gx.prototype,`defaultChecked`,2),D([A({reflect:!0})],gx.prototype,`form`,2),D([A({type:Boolean,reflect:!0})],gx.prototype,`required`,2),D([A({attribute:`help-text`})],gx.prototype,`helpText`,2),D([I(`checked`,{waitUntilFirstUpdate:!0})],gx.prototype,`handleCheckedChange`,1),D([I(`disabled`,{waitUntilFirstUpdate:!0})],gx.prototype,`handleDisabledChange`,1),gx.define(`sl-switch`);var _x=[`MODIFIED`,`ADDED`,`REMOVED`],vx=[`BREAKING`,`NON-BREAKING`],yx={Additions:`ok`,Modifications:`tertiary`,Removals:`error`};function bx(e){try{return new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}catch{return e}}function xx(e,t,n,r){return{pointRadius:Array.from({length:e},(e,n)=>n===t?12:4),pointBackgroundColor:Array.from({length:e},(e,i)=>i===t?n:r),pointBorderColor:Array(e).fill(r),pointBorderWidth:Array.from({length:e},(e,n)=>n===t?3:1)}}var Sx=class extends F{constructor(...e){super(...e),this.data=null,this.activeItemIndex=0,this.error=``,this.activeMainTab=`overview`,this.selectedDiffChanges=[],this.selectedNodeId=null,this.selectedNodeChanges=[],this._graphNodeMap=new Map,this._cachedChartIndex=-1,this._cachedData=null,this._changeDataset=[],this._breakingDataset=[],this._overviewResizeObserver=null,this._chartsInitialized=!1,this._onThemeChange=()=>{requestAnimationFrame(()=>{this.updateBeefyChart(),this.resizeDoughnutCharts()})},this.handleTabShow=e=>{this.onTabShow(e)},this._onTreeNodeClicked=e=>{this.handleTreeNodeClicked(e)}}static{this.styles=Vb}get _chartPointIndex(){let e=this.data?.history?.changeData?.labels?.length??0;return e>0?e-1-this.activeItemIndex:0}connectedCallback(){super.connectedCallback(),this.loadData(),this.addEventListener(An,this._onTreeNodeClicked),window.addEventListener(`pb33f-theme-change`,this._onThemeChange)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(An,this._onTreeNodeClicked),window.removeEventListener(`pb33f-theme-change`,this._onThemeChange),this._overviewResizeObserver?.disconnect()}loadData(){try{let e=document.getElementById(`report-data`);if(e?.textContent){this.data=JSON.parse(e.textContent);return}if(window.__REPORT_DATA__){this.data=window.__REPORT_DATA__;return}this.error=`No report data found`}catch(e){this.error=`Failed to parse report data: ${e}`}}get activeItem(){return this.data?.items?.length&&this.data.items[this.activeItemIndex]||null}get isMultiCommit(){return(this.data?.items?.length??0)>1}selectItem(e){this.activeItemIndex=e,this.selectedDiffChanges=[],this.selectedNodeId=null,this.selectedNodeChanges=[]}selectNode(e){this.selectedNodeId=e;let t=this._graphNodeMap.get(e);t?(this.selectedNodeChanges=t.timeline||[],this.selectedDiffChanges=t.timeline||[]):(this.selectedNodeChanges=[],this.selectedDiffChanges=[])}updateModelTree(){let e=this.activeItem;if(!this.modelTree||!e?.graph?.nodes)return;let t=new Map;for(let n of e.graph.nodes)t.set(n.id,n);this._graphNodeMap=t,this.modelTree.nodeMap=t,this.modelTree.node=t.get(`root`)||null,this.modelTree.changesEnabled=!0,this.modelTree.violationMap=new Map}updateBeefyChart(){if(!this.beefyChart||!this.data?.history?.changeData)return;let e=this.data.history.changeData,t=e.labels.length,n=this._chartPointIndex,r=this.beefyChart.background||`#1a1e2e`,i=document.documentElement.getAttribute(`theme`)===`light`,a={ok:`#000`,tertiary:`#999`,error:`#555`};this.beefyChart.datasets=e.datasets.map(e=>{let o=yx[e.label]||``,s=i?a[o]||`#666`:e.borderColor||o&&this.beefyChart[o]||`#888`;return{...e,borderColor:s,borderWidth:3,tension:0,fill:!1,pointStyle:`rect`,...xx(t,n,r,s)}}),this.beefyChart.labels=e.labels.map(e=>bx(e)),this.beefyChart.buildChart(),requestAnimationFrame(()=>this._drawActiveGlow())}_drawActiveGlow(){let e=this.beefyChart?.chart;if(!e)return;let t=this._chartPointIndex,n=e.ctx;for(let r of e.getSortedVisibleDatasetMetas()){let i=r.data[t];if(!i)continue;let a=e.data.datasets[r.index]?.borderColor||`#fff`;for(let e=0;e<5;e++)n.save(),n.shadowColor=a,n.shadowBlur=25+e*12,n.strokeStyle=a,n.lineWidth=2,n.globalAlpha=.9,n.strokeRect(i.x-12,i.y-12,24,24),n.restore()}}updateBeefyChartHighlight(){let e=this.beefyChart?.chart;if(!e)return;let t=this._chartPointIndex,n=this.beefyChart.background||`#1a1e2e`;for(let r of e.data.datasets){let e=r.data.length;Object.assign(r,xx(e,t,n,r.borderColor))}e.update(`none`),requestAnimationFrame(()=>this._drawActiveGlow())}willUpdate(e){(e.has(`activeItemIndex`)||e.has(`data`))&&this.updateChartData()}updated(e){super.updated(e),(e.has(`activeItemIndex`)||e.has(`data`))&&this.updateComplete.then(()=>{this.onDataOrIndexChanged(e),this._upgradeReportIcons()})}_upgradeReportIcons(){let e=this.renderRoot.querySelectorAll(`.change-report pb33f-model-icon`);for(let t of e)t.getAttribute(`size`)!==`medium`&&t.setAttribute(`size`,`medium`)}onDataOrIndexChanged(e){this.updateModelTree(),e.has(`data`)&&requestAnimationFrame(()=>{this.mainTabGroup&&this.mainTabGroup.show(`overview`),this._observeOverviewPanel()}),e.has(`activeItemIndex`)&&this._chartsInitialized&&this.updateBeefyChartHighlight()}_observeOverviewPanel(){if(this._overviewResizeObserver)return;let e=this.renderRoot.querySelector(`.overview-content`);e&&(this._overviewResizeObserver=new ResizeObserver(e=>{for(let t of e)t.contentRect.width>0&&t.contentRect.height>0&&!this._chartsInitialized&&(this._chartsInitialized=!0,this.updateBeefyChart(),this.resizeDoughnutCharts())}),this._overviewResizeObserver.observe(e))}onTabShow(e){this.activeMainTab=e.detail.name,e.detail.name===`overview`&&this.updateComplete.then(()=>{this.updateBeefyChart(),this.resizeDoughnutCharts()})}resizeDoughnutCharts(){let e=this.renderRoot.querySelectorAll(`pb33f-doughnut-chart`);for(let t of e)t.chart?.resize()}updateChartData(){if(this._cachedChartIndex===this.activeItemIndex&&this._cachedData===this.data)return;this._cachedChartIndex=this.activeItemIndex,this._cachedData=this.data;let e=this.activeItem;e&&(this._changeDataset=[{labels:_x,data:[e.summary.modifications||0,e.summary.additions||0,e.summary.removals||0]}],this._breakingDataset=[{labels:vx,data:[e.summary.breakingChanges||0,(e.summary.totalChanges||0)-(e.summary.breakingChanges||0)]}])}handleTreeNodeClicked(e){let{changes:t}=e.detail;t&&t.length>0&&this.navigateToDiffForChanges(t)}navigateToDiffForChanges(e){e&&e.length!==0&&(this.selectedDiffChanges=[...e],this.mainTabGroup&&this.mainTabGroup.show(`diff`))}renderNavigator(){return N`
`}}childRowClicked(e,t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(Cn,{bubbles:!0,composed:!0,detail:{nodeId:e}}))}getOwnChanges(e){if(!e.timeline?.length)return[];let t=e.childChanges;if(!t?.length)return e.timeline;let n=new Set;for(let e of t){let t=this.nodeMap?.get(e.nodeId);if(t?.timeline)for(let e of t.timeline)n.add(`${e.path}:${e.property}:${e.change}:${e.context?.newLine}:${e.context?.originalLine}`)}return e.timeline.filter(e=>!n.has(`${e.path}:${e.property}:${e.change}:${e.context?.newLine}:${e.context?.originalLine}`))}renderChildRows(){let e=this.node?.childChanges;return!e||e.length===0?ct:T`${e.map(e=>T`
+
`}}childRowClicked(e,t){t.stopPropagation(),this.dispatchEvent(new CustomEvent(wn,{bubbles:!0,composed:!0,detail:{nodeId:e}}))}getOwnChanges(e){if(!e.timeline?.length)return[];let t=e.childChanges;if(!t?.length)return e.timeline;let n=new Set;for(let e of t){let t=this.nodeMap?.get(e.nodeId);if(t?.timeline)for(let e of t.timeline)n.add(`${e.path}:${e.property}:${e.change}:${e.context?.newLine}:${e.context?.originalLine}`)}return e.timeline.filter(e=>!n.has(`${e.path}:${e.property}:${e.change}:${e.context?.newLine}:${e.context?.originalLine}`))}renderChildRows(){let e=this.node?.childChanges;return!e||e.length===0?st:T`${e.map(e=>T`
- `}};Xf.styles=[mn,qt,qse],Xf.dependencies={"sl-button-group":Jf},w([Ot(`slot:not([name])`)],Xf.prototype,`defaultSlot`,2),w([Ot(`.radio-group__validation-input`)],Xf.prototype,`validationInput`,2),w([Tt()],Xf.prototype,`hasButtonGroup`,2),w([Tt()],Xf.prototype,`errorMessage`,2),w([Tt()],Xf.prototype,`defaultValue`,2),w([wt()],Xf.prototype,`label`,2),w([wt({attribute:`help-text`})],Xf.prototype,`helpText`,2),w([wt()],Xf.prototype,`name`,2),w([wt({reflect:!0})],Xf.prototype,`value`,2),w([wt({reflect:!0})],Xf.prototype,`size`,2),w([wt({reflect:!0})],Xf.prototype,`form`,2),w([wt({type:Boolean,reflect:!0})],Xf.prototype,`required`,2),w([pn(`size`,{waitUntilFirstUpdate:!0})],Xf.prototype,`handleSizeChange`,1),w([pn(`value`)],Xf.prototype,`handleValueChange`,1),Xf.define(`sl-radio-group`);var Zf=xe`
+ `}};ep.styles=[hn,Jt,Xf],ep.dependencies={"sl-button-group":Qf},w([Ot(`slot:not([name])`)],ep.prototype,`defaultSlot`,2),w([Ot(`.radio-group__validation-input`)],ep.prototype,`validationInput`,2),w([Tt()],ep.prototype,`hasButtonGroup`,2),w([Tt()],ep.prototype,`errorMessage`,2),w([Tt()],ep.prototype,`defaultValue`,2),w([wt()],ep.prototype,`label`,2),w([wt({attribute:`help-text`})],ep.prototype,`helpText`,2),w([wt()],ep.prototype,`name`,2),w([wt({reflect:!0})],ep.prototype,`value`,2),w([wt({reflect:!0})],ep.prototype,`size`,2),w([wt({reflect:!0})],ep.prototype,`form`,2),w([wt({type:Boolean,reflect:!0})],ep.prototype,`required`,2),w([mn(`size`,{waitUntilFirstUpdate:!0})],ep.prototype,`handleSizeChange`,1),w([mn(`value`)],ep.prototype,`handleValueChange`,1),ep.define(`sl-radio-group`);var tp=xe`
:host {
display: inline-block;
position: relative;
@@ -6911,7 +6983,7 @@
z-index: 2;
}
`,Yse=xe`
- ${Zf}
+ ${tp}
.button__prefix,
.button__suffix,
@@ -6934,16 +7006,16 @@
opacity: 0;
z-index: -1;
}
-`,Qf=Symbol.for(``),Xse=e=>{if(e?.r===Qf)return e?._$litStatic$},$f=(e,...t)=>({_$litStatic$:t.reduce((t,n,r)=>t+(e=>{if(e._$litStatic$!==void 0)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(n)+e[r+1],e[0]),r:Qf}),ep=new Map,tp=(e=>(t,...n)=>{let r=n.length,i,a,o=[],s=[],c,l=0,u=!1;for(;l{if(e?.r===np)return e?._$litStatic$},rp=(e,...t)=>({_$litStatic$:t.reduce((t,n,r)=>t+(e=>{if(e._$litStatic$!==void 0)return e._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${e}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(n)+e[r+1],e[0]),r:np}),ip=new Map,ap=(e=>(t,...n)=>{let r=n.length,i,a,o=[],s=[],c,l=0,u=!1;for(;l
- `}};np.styles=[mn,Yse],w([Ot(`.button`)],np.prototype,`input`,2),w([Ot(`.hidden-input`)],np.prototype,`hiddenInput`,2),w([Tt()],np.prototype,`hasFocus`,2),w([wt({type:Boolean,reflect:!0})],np.prototype,`checked`,2),w([wt()],np.prototype,`value`,2),w([wt({type:Boolean,reflect:!0})],np.prototype,`disabled`,2),w([wt({reflect:!0})],np.prototype,`size`,2),w([wt({type:Boolean,reflect:!0})],np.prototype,`pill`,2),w([pn(`disabled`,{waitUntilFirstUpdate:!0})],np.prototype,`handleDisabledChange`,1),np.define(`sl-radio-button`);var rp=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},ip=Object.freeze({type:`spacer`,content:``}),ap=20,op=20,sp=`pb33f-diff-view-mode`;function cp(e){return e===`side-by-side`||e===`unified`}var lp=class extends St{constructor(){super(...arguments),this.originalSpec=``,this.modifiedSpec=``,this.originalHighlighted={},this.modifiedHighlighted={},this.selectedChanges=[],this.contentMode=`file`,this.viewMode=`side-by-side`,this._cachedFocusedSections=[],this.cachedLeft=[],this.cachedRight=[],this.cachedUnified=[],this.originalLineToIndex=new Map,this.modifiedLineToIndex=new Map,this.dmp=(()=>{let e=new ca.default;return e.Diff_Timeout=5,e})(),this._highlightTimer=0,this._highlightedElement=null,this._panels=[],this._scrollListeners=[],this._resizeObserver=null,this._rafId=0,this._scrollDirty=!1,this._syncing=!1,this._rendering=!1,this._renderStart=[0,0],this._renderEnd=[0,0],this._viewportHeight=[0,0],this._lastScrollTop=0,this._pendingJump=[0,0]}connectedCallback(){super.connectedCallback(),this.restoreStoredViewMode()}willUpdate(e){e.has(`selectedChanges`)&&(this.contentMode=this.hasSelection?`change`:`file`);let t=e.has(`originalSpec`)||e.has(`modifiedSpec`);t?this.recomputeDiffs():(e.has(`originalHighlighted`)||e.has(`modifiedHighlighted`))&&this._applyHighlights(),(t||e.has(`selectedChanges`)||e.has(`originalHighlighted`)||e.has(`modifiedHighlighted`))&&(this._cachedFocusedSections=[])}updated(e){super.updated(e);let t=e.has(`originalHighlighted`)||e.has(`modifiedHighlighted`);if(e.has(`contentMode`)&&this.contentMode===`change`&&this._teardownScrolling(),this.contentMode===`file`&&(e.has(`contentMode`)||e.has(`viewMode`)||e.has(`originalSpec`)||e.has(`modifiedSpec`))){let t=e.has(`contentMode`)&&e.get(`contentMode`)===`change`;this.updateComplete.then(()=>{requestAnimationFrame(()=>{let e=0,n=0;if(t&&this.selectedChanges.length>0){let t=this.selectedChanges.find(e=>e.context?.originalLine>0||e.context?.newLine>0);t&&(e=t.context?.originalLine||0,n=t.context?.newLine||0)}this._setupScrolling(e,n)})})}else this.contentMode===`file`&&t&&this.updateComplete.then(()=>{requestAnimationFrame(()=>{this._panels.length>0&&this._markDirty()})})}disconnectedCallback(){super.disconnectedCallback(),this._teardownScrolling(),this._highlightTimer&&=(clearTimeout(this._highlightTimer),0)}restoreStoredViewMode(){try{let e=localStorage.getItem(sp);cp(e)&&(this.viewMode=e)}catch{}}setViewMode(e){this.viewMode=e;try{localStorage.setItem(sp,e)}catch{}}get hasSelection(){return Array.isArray(this.selectedChanges)&&this.selectedChanges.length>0}recomputeDiffs(){let e=this.dmp.diff_linesToChars_(this.originalSpec,this.modifiedSpec),t=this.dmp.diff_main(e.chars1,e.chars2,!1);this.dmp.diff_charsToLines_(t,e.lineArray);let n=[],r=[],i=[],a=this.originalHighlighted||{},o=this.modifiedHighlighted||{},s=new Map,c=new Map,l=1,u=1;for(let[e,d]of t){let t=d.split(`
-`);t[t.length-1]===``&&t.pop();for(let d of t)if(e===0){let e=n.length,t={type:`equal`,content:d,highlightedContent:a[l]||o[u],originalLineNum:l,modifiedLineNum:u};n.push(t),r.push(t),i.push(t),s.set(l,e),c.set(u,e),l++,u++}else if(e===-1){let e=n.length,t={type:`removed`,content:d,highlightedContent:a[l],originalLineNum:l};n.push(t),r.push(ip),i.push(t),s.set(l,e),l++}else if(e===1){let e=r.length,t={type:`added`,content:d,highlightedContent:o[u],modifiedLineNum:u};r.push(t),n.push(ip),i.push(t),c.set(u,e),u++}}this.cachedLeft=n,this.cachedRight=r,this.cachedUnified=i,this.originalLineToIndex=s,this.modifiedLineToIndex=c,this._renderStart=[-1,-1],this._renderEnd=[-1,-1]}_applyHighlights(){let e=this.originalHighlighted||{},t=this.modifiedHighlighted||{};for(let n of this.cachedLeft)n.type!==`spacer`&&(n.originalLineNum?n.highlightedContent=e[n.originalLineNum]:n.modifiedLineNum&&(n.highlightedContent=t[n.modifiedLineNum]));for(let n of this.cachedRight)n.type!==`spacer`&&(n.modifiedLineNum?n.highlightedContent=t[n.modifiedLineNum]:n.originalLineNum&&(n.highlightedContent=e[n.originalLineNum]));for(let n of this.cachedUnified)n.type!==`spacer`&&(n.originalLineNum&&n.modifiedLineNum?n.highlightedContent=e[n.originalLineNum]||t[n.modifiedLineNum]:n.originalLineNum?n.highlightedContent=e[n.originalLineNum]:n.modifiedLineNum&&(n.highlightedContent=t[n.modifiedLineNum]));this._renderStart=[-1,-1],this._renderEnd=[-1,-1]}_setupScrolling(e=0,t=0){this._teardownScrolling(),this._renderStart=[-1,-1],this._renderEnd=[-1,-1],this._lastScrollTop=0,this._pendingJump=[e,t];let n=Array.from(this.renderRoot.querySelectorAll(`.diff-panel`));if(this._panels=n,n.length){for(let e of n)e.scrollTop=0;this._resizeObserver=new ResizeObserver(()=>{this._markDirty()});for(let e=0;e{this._rendering||this._syncing||(this._lastScrollTop=t.scrollTop,this.viewMode===`side-by-side`&&n.length===2&&(this._syncing=!0,n[1-e].scrollTop=this._lastScrollTop,this._syncing=!1),this._markDirty())};t.addEventListener(`scroll`,r,{passive:!0}),this._scrollListeners.push(()=>t.removeEventListener(`scroll`,r))}this._markDirty()}}_teardownScrolling(){for(let e of this._scrollListeners)e();this._scrollListeners=[],this._resizeObserver?.disconnect(),this._resizeObserver=null,this._rafId&&=(cancelAnimationFrame(this._rafId),0),this._scrollDirty=!1,this._panels=[]}_markDirty(){this._scrollDirty||(this._scrollDirty=!0,this._rafId=requestAnimationFrame(()=>{this._scrollDirty=!1,this._rafId=0,this._updateAllPanels()}))}_updateAllPanels(){let e=this._lastScrollTop;for(let t=0;t0||this._pendingJump[1]>0){let[e,t]=this._pendingJump;this._pendingJump=[0,0],requestAnimationFrame(()=>this.scrollToLine(e,t))}}_getLinesForPanel(e){return this.viewMode===`unified`?this.cachedUnified:e===0?this.cachedLeft:this.cachedRight}_getSideForPanel(e){return this.viewMode===`unified`?`unified`:e===0?`left`:`right`}_renderRange(e,t,n,r,i,a){let o=e.querySelector(`.scroll-pad-top`),s=e.querySelector(`.visible-lines`),c=e.querySelector(`.scroll-pad-bottom`);if(!o||!s||!c)return;this._highlightedElement&&=null,this._rendering=!0;let l=e.scrollTop;o.style.height=`${n*ap}px`,c.style.height=`${(i-r)*ap}px`;let u=document.createDocumentFragment();for(let e=n;e0&&(n=this.originalLineToIndex.get(e)??-1),n<0&&t&&t>0&&(n=this.modifiedLineToIndex.get(t)??-1),n<0)return;let r=this._panels[0];if(!r)return;let i=this._viewportHeight[0]||r.clientHeight,a=Math.max(0,n*ap-i/2+ap/2);r.scrollTop=a,this._panels.length>1&&(this._panels[1].scrollTop=a),await new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(e)));let o=this._findScrollTarget(e,t);o&&(this._highlightTimer&&=(clearTimeout(this._highlightTimer),0),this._highlightedElement&&=(this._highlightedElement.classList.remove(`highlight`),null),o.classList.add(`highlight`),this._highlightedElement=o,this._highlightTimer=window.setTimeout(()=>{o?.classList.remove(`highlight`),this._highlightedElement=null,this._highlightTimer=0},2e3))}_findScrollTarget(e,t){if(this.viewMode===`side-by-side`&&this._panels.length>1){if(e>0){let t=this._panels[0].querySelector(`[data-original-line="${e}"]`);if(t)return t}if(t&&t>0){let e=this._panels[1].querySelector(`[data-modified-line="${t}"]`);if(e)return e}if(t&&t>0){let e=this._panels[0].querySelector(`[data-modified-line="${t}"]`);if(e)return e}if(e>0){let t=this._panels[1].querySelector(`[data-original-line="${e}"]`);if(t)return t}return null}let n=this._panels[0];if(!n)return null;if(e>0){let t=n.querySelector(`[data-original-line="${e}"]`);if(t)return t}return t&&t>0?n.querySelector(`[data-modified-line="${t}"]`):null}renderControls(){return T`
+ `}};op.styles=[hn,Yse],w([Ot(`.button`)],op.prototype,`input`,2),w([Ot(`.hidden-input`)],op.prototype,`hiddenInput`,2),w([Tt()],op.prototype,`hasFocus`,2),w([wt({type:Boolean,reflect:!0})],op.prototype,`checked`,2),w([wt()],op.prototype,`value`,2),w([wt({type:Boolean,reflect:!0})],op.prototype,`disabled`,2),w([wt({reflect:!0})],op.prototype,`size`,2),w([wt({type:Boolean,reflect:!0})],op.prototype,`pill`,2),w([mn(`disabled`,{waitUntilFirstUpdate:!0})],op.prototype,`handleDisabledChange`,1),op.define(`sl-radio-button`);var sp=function(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},cp=Object.freeze({type:`spacer`,content:``}),lp=20,up=20,dp=`pb33f-diff-view-mode`;function fp(e){return e===`side-by-side`||e===`unified`}var pp=class extends St{constructor(){super(...arguments),this.originalSpec=``,this.modifiedSpec=``,this.originalHighlighted={},this.modifiedHighlighted={},this.selectedChanges=[],this.contentMode=`file`,this.viewMode=`side-by-side`,this._cachedFocusedSections=[],this.cachedLeft=[],this.cachedRight=[],this.cachedUnified=[],this.originalLineToIndex=new Map,this.modifiedLineToIndex=new Map,this.dmp=(()=>{let e=new Sne.default;return e.Diff_Timeout=5,e})(),this._highlightTimer=0,this._highlightedElement=null,this._panels=[],this._scrollListeners=[],this._resizeObserver=null,this._rafId=0,this._scrollDirty=!1,this._syncing=!1,this._rendering=!1,this._renderStart=[0,0],this._renderEnd=[0,0],this._viewportHeight=[0,0],this._lastScrollTop=0,this._pendingJump=[0,0]}connectedCallback(){super.connectedCallback(),this.restoreStoredViewMode()}willUpdate(e){e.has(`selectedChanges`)&&(this.contentMode=this.hasSelection?`change`:`file`);let t=e.has(`originalSpec`)||e.has(`modifiedSpec`);t?this.recomputeDiffs():(e.has(`originalHighlighted`)||e.has(`modifiedHighlighted`))&&this._applyHighlights(),(t||e.has(`selectedChanges`)||e.has(`originalHighlighted`)||e.has(`modifiedHighlighted`))&&(this._cachedFocusedSections=[])}updated(e){super.updated(e);let t=e.has(`originalHighlighted`)||e.has(`modifiedHighlighted`);if(e.has(`contentMode`)&&this.contentMode===`change`&&this._teardownScrolling(),this.contentMode===`file`&&(e.has(`contentMode`)||e.has(`viewMode`)||e.has(`originalSpec`)||e.has(`modifiedSpec`))){let t=e.has(`contentMode`)&&e.get(`contentMode`)===`change`;this.updateComplete.then(()=>{requestAnimationFrame(()=>{let e=0,n=0;if(t&&this.selectedChanges.length>0){let t=this.selectedChanges.find(e=>e.context?.originalLine>0||e.context?.newLine>0);t&&(e=t.context?.originalLine||0,n=t.context?.newLine||0)}this._setupScrolling(e,n)})})}else this.contentMode===`file`&&t&&this.updateComplete.then(()=>{requestAnimationFrame(()=>{this._panels.length>0&&this._markDirty()})})}disconnectedCallback(){super.disconnectedCallback(),this._teardownScrolling(),this._highlightTimer&&=(clearTimeout(this._highlightTimer),0)}restoreStoredViewMode(){try{let e=localStorage.getItem(dp);fp(e)&&(this.viewMode=e)}catch{}}setViewMode(e){this.viewMode=e;try{localStorage.setItem(dp,e)}catch{}}get hasSelection(){return Array.isArray(this.selectedChanges)&&this.selectedChanges.length>0}recomputeDiffs(){let e=this.dmp.diff_linesToChars_(this.originalSpec,this.modifiedSpec),t=this.dmp.diff_main(e.chars1,e.chars2,!1);this.dmp.diff_charsToLines_(t,e.lineArray);let n=[],r=[],i=[],a=this.originalHighlighted||{},o=this.modifiedHighlighted||{},s=new Map,c=new Map,l=1,u=1;for(let[e,d]of t){let t=d.split(`
+`);t[t.length-1]===``&&t.pop();for(let d of t)if(e===0){let e=n.length,t={type:`equal`,content:d,highlightedContent:a[l]||o[u],originalLineNum:l,modifiedLineNum:u};n.push(t),r.push(t),i.push(t),s.set(l,e),c.set(u,e),l++,u++}else if(e===-1){let e=n.length,t={type:`removed`,content:d,highlightedContent:a[l],originalLineNum:l};n.push(t),r.push(cp),i.push(t),s.set(l,e),l++}else if(e===1){let e=r.length,t={type:`added`,content:d,highlightedContent:o[u],modifiedLineNum:u};r.push(t),n.push(cp),i.push(t),c.set(u,e),u++}}this.cachedLeft=n,this.cachedRight=r,this.cachedUnified=i,this.originalLineToIndex=s,this.modifiedLineToIndex=c,this._renderStart=[-1,-1],this._renderEnd=[-1,-1]}_applyHighlights(){let e=this.originalHighlighted||{},t=this.modifiedHighlighted||{};for(let n of this.cachedLeft)n.type!==`spacer`&&(n.originalLineNum?n.highlightedContent=e[n.originalLineNum]:n.modifiedLineNum&&(n.highlightedContent=t[n.modifiedLineNum]));for(let n of this.cachedRight)n.type!==`spacer`&&(n.modifiedLineNum?n.highlightedContent=t[n.modifiedLineNum]:n.originalLineNum&&(n.highlightedContent=e[n.originalLineNum]));for(let n of this.cachedUnified)n.type!==`spacer`&&(n.originalLineNum&&n.modifiedLineNum?n.highlightedContent=e[n.originalLineNum]||t[n.modifiedLineNum]:n.originalLineNum?n.highlightedContent=e[n.originalLineNum]:n.modifiedLineNum&&(n.highlightedContent=t[n.modifiedLineNum]));this._renderStart=[-1,-1],this._renderEnd=[-1,-1]}_setupScrolling(e=0,t=0){this._teardownScrolling(),this._renderStart=[-1,-1],this._renderEnd=[-1,-1],this._lastScrollTop=0,this._pendingJump=[e,t];let n=Array.from(this.renderRoot.querySelectorAll(`.diff-panel`));if(this._panels=n,n.length){for(let e of n)e.scrollTop=0;this._resizeObserver=new ResizeObserver(()=>{this._markDirty()});for(let e=0;e{this._rendering||this._syncing||(this._lastScrollTop=t.scrollTop,this.viewMode===`side-by-side`&&n.length===2&&(this._syncing=!0,n[1-e].scrollTop=this._lastScrollTop,this._syncing=!1),this._markDirty())};t.addEventListener(`scroll`,r,{passive:!0}),this._scrollListeners.push(()=>t.removeEventListener(`scroll`,r))}this._markDirty()}}_teardownScrolling(){for(let e of this._scrollListeners)e();this._scrollListeners=[],this._resizeObserver?.disconnect(),this._resizeObserver=null,this._rafId&&=(cancelAnimationFrame(this._rafId),0),this._scrollDirty=!1,this._panels=[]}_markDirty(){this._scrollDirty||(this._scrollDirty=!0,this._rafId=requestAnimationFrame(()=>{this._scrollDirty=!1,this._rafId=0,this._updateAllPanels()}))}_updateAllPanels(){let e=this._lastScrollTop;for(let t=0;t0||this._pendingJump[1]>0){let[e,t]=this._pendingJump;this._pendingJump=[0,0],requestAnimationFrame(()=>this.scrollToLine(e,t))}}_getLinesForPanel(e){return this.viewMode===`unified`?this.cachedUnified:e===0?this.cachedLeft:this.cachedRight}_getSideForPanel(e){return this.viewMode===`unified`?`unified`:e===0?`left`:`right`}_renderRange(e,t,n,r,i,a){let o=e.querySelector(`.scroll-pad-top`),s=e.querySelector(`.visible-lines`),c=e.querySelector(`.scroll-pad-bottom`);if(!o||!s||!c)return;this._highlightedElement&&=null,this._rendering=!0;let l=e.scrollTop;o.style.height=`${n*lp}px`,c.style.height=`${(i-r)*lp}px`;let u=document.createDocumentFragment();for(let e=n;e0&&(n=this.originalLineToIndex.get(e)??-1),n<0&&t&&t>0&&(n=this.modifiedLineToIndex.get(t)??-1),n<0)return;let r=this._panels[0];if(!r)return;let i=this._viewportHeight[0]||r.clientHeight,a=Math.max(0,n*lp-i/2+lp/2);r.scrollTop=a,this._panels.length>1&&(this._panels[1].scrollTop=a),await new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(e)));let o=this._findScrollTarget(e,t);o&&(this._highlightTimer&&=(clearTimeout(this._highlightTimer),0),this._highlightedElement&&=(this._highlightedElement.classList.remove(`highlight`),null),o.classList.add(`highlight`),this._highlightedElement=o,this._highlightTimer=window.setTimeout(()=>{o?.classList.remove(`highlight`),this._highlightedElement=null,this._highlightTimer=0},2e3))}_findScrollTarget(e,t){if(this.viewMode===`side-by-side`&&this._panels.length>1){if(e>0){let t=this._panels[0].querySelector(`[data-original-line="${e}"]`);if(t)return t}if(t&&t>0){let e=this._panels[1].querySelector(`[data-modified-line="${t}"]`);if(e)return e}if(t&&t>0){let e=this._panels[0].querySelector(`[data-modified-line="${t}"]`);if(e)return e}if(e>0){let t=this._panels[1].querySelector(`[data-original-line="${e}"]`);if(t)return t}return null}let n=this._panels[0];if(!n)return null;if(e>0){let t=n.querySelector(`[data-original-line="${e}"]`);if(t)return t}return t&&t>0?n.querySelector(`[data-modified-line="${t}"]`):null}renderControls(){return T`
${this.hasSelection?T`
Focused
File Diff
- `:ct}
+ `:st}
${this.contentMode===`file`?T`
Side by Side
Unified
- `:ct}
+ `:st}
- `}};kp.styles=[mn,qt,dce],w([Ot(`input[type="checkbox"]`)],kp.prototype,`input`,2),w([Tt()],kp.prototype,`hasFocus`,2),w([wt()],kp.prototype,`title`,2),w([wt()],kp.prototype,`name`,2),w([wt()],kp.prototype,`value`,2),w([wt({reflect:!0})],kp.prototype,`size`,2),w([wt({type:Boolean,reflect:!0})],kp.prototype,`disabled`,2),w([wt({type:Boolean,reflect:!0})],kp.prototype,`checked`,2),w([Kt(`checked`)],kp.prototype,`defaultChecked`,2),w([wt({reflect:!0})],kp.prototype,`form`,2),w([wt({type:Boolean,reflect:!0})],kp.prototype,`required`,2),w([wt({attribute:`help-text`})],kp.prototype,`helpText`,2),w([pn(`checked`,{waitUntilFirstUpdate:!0})],kp.prototype,`handleCheckedChange`,1),w([pn(`disabled`,{waitUntilFirstUpdate:!0})],kp.prototype,`handleDisabledChange`,1),kp.define(`sl-switch`);var fce=[`MODIFIED`,`ADDED`,`REMOVED`],Ap=[`BREAKING`,`NON-BREAKING`],jp={Additions:`ok`,Modifications:`tertiary`,Removals:`error`};function Mp(e){try{return new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}catch{return e}}function Np(e,t,n,r){return{pointRadius:Array.from({length:e},(e,n)=>n===t?12:4),pointBackgroundColor:Array.from({length:e},(e,i)=>i===t?n:r),pointBorderColor:Array(e).fill(r),pointBorderWidth:Array.from({length:e},(e,n)=>n===t?3:1)}}var Pp=class extends St{constructor(...e){super(...e),this.data=null,this.activeItemIndex=0,this.error=``,this.activeMainTab=`overview`,this.selectedDiffChanges=[],this.selectedNodeId=null,this.selectedNodeChanges=[],this._graphNodeMap=new Map,this._cachedChartIndex=-1,this._cachedData=null,this._changeDataset=[],this._breakingDataset=[],this._overviewResizeObserver=null,this._chartsInitialized=!1,this._onThemeChange=()=>{requestAnimationFrame(()=>{this.updateBeefyChart(),this.resizeDoughnutCharts()})},this.handleTabShow=e=>{this.onTabShow(e)},this._onTreeNodeClicked=e=>{this.handleTreeNodeClicked(e)}}static{this.styles=Zse}get _chartPointIndex(){let e=this.data?.history?.changeData?.labels?.length??0;return e>0?e-1-this.activeItemIndex:0}connectedCallback(){super.connectedCallback(),this.loadData(),this.addEventListener(Sn,this._onTreeNodeClicked),window.addEventListener(`pb33f-theme-change`,this._onThemeChange)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Sn,this._onTreeNodeClicked),window.removeEventListener(`pb33f-theme-change`,this._onThemeChange),this._overviewResizeObserver?.disconnect()}loadData(){try{let e=document.getElementById(`report-data`);if(e?.textContent){this.data=JSON.parse(e.textContent);return}if(window.__REPORT_DATA__){this.data=window.__REPORT_DATA__;return}this.error=`No report data found`}catch(e){this.error=`Failed to parse report data: ${e}`}}get activeItem(){return this.data?.items?.length&&this.data.items[this.activeItemIndex]||null}get isMultiCommit(){return(this.data?.items?.length??0)>1}selectItem(e){this.activeItemIndex=e,this.selectedDiffChanges=[],this.selectedNodeId=null,this.selectedNodeChanges=[]}selectNode(e){this.selectedNodeId=e;let t=this._graphNodeMap.get(e);t?(this.selectedNodeChanges=t.timeline||[],this.selectedDiffChanges=t.timeline||[]):(this.selectedNodeChanges=[],this.selectedDiffChanges=[])}updateModelTree(){let e=this.activeItem;if(!this.modelTree||!e?.graph?.nodes)return;let t=new Map;for(let n of e.graph.nodes)t.set(n.id,n);this._graphNodeMap=t,this.modelTree.nodeMap=t,this.modelTree.node=t.get(`root`)||null,this.modelTree.changesEnabled=!0,this.modelTree.violationMap=new Map}updateBeefyChart(){if(!this.beefyChart||!this.data?.history?.changeData)return;let e=this.data.history.changeData,t=e.labels.length,n=this._chartPointIndex,r=this.beefyChart.background||`#1a1e2e`,i=document.documentElement.getAttribute(`theme`)===`light`,a={ok:`#000`,tertiary:`#999`,error:`#555`};this.beefyChart.datasets=e.datasets.map(e=>{let o=jp[e.label]||``,s=i?a[o]||`#666`:e.borderColor||o&&this.beefyChart[o]||`#888`;return{...e,borderColor:s,borderWidth:3,tension:0,fill:!1,pointStyle:`rect`,...Np(t,n,r,s)}}),this.beefyChart.labels=e.labels.map(e=>Mp(e)),this.beefyChart.buildChart(),requestAnimationFrame(()=>this._drawActiveGlow())}_drawActiveGlow(){let e=this.beefyChart?.chart;if(!e)return;let t=this._chartPointIndex,n=e.ctx;for(let r of e.getSortedVisibleDatasetMetas()){let i=r.data[t];if(!i)continue;let a=e.data.datasets[r.index]?.borderColor||`#fff`;for(let e=0;e<5;e++)n.save(),n.shadowColor=a,n.shadowBlur=25+e*12,n.strokeStyle=a,n.lineWidth=2,n.globalAlpha=.9,n.strokeRect(i.x-12,i.y-12,24,24),n.restore()}}updateBeefyChartHighlight(){let e=this.beefyChart?.chart;if(!e)return;let t=this._chartPointIndex,n=this.beefyChart.background||`#1a1e2e`;for(let r of e.data.datasets){let e=r.data.length;Object.assign(r,Np(e,t,n,r.borderColor))}e.update(`none`),requestAnimationFrame(()=>this._drawActiveGlow())}willUpdate(e){(e.has(`activeItemIndex`)||e.has(`data`))&&this.updateChartData()}updated(e){super.updated(e),(e.has(`activeItemIndex`)||e.has(`data`))&&this.updateComplete.then(()=>{this.onDataOrIndexChanged(e),this._upgradeReportIcons()})}_upgradeReportIcons(){let e=this.renderRoot.querySelectorAll(`.change-report pb33f-model-icon`);for(let t of e)t.getAttribute(`size`)!==`medium`&&t.setAttribute(`size`,`medium`)}onDataOrIndexChanged(e){this.updateModelTree(),e.has(`data`)&&requestAnimationFrame(()=>{this.mainTabGroup&&this.mainTabGroup.show(`overview`),this._observeOverviewPanel()}),e.has(`activeItemIndex`)&&this._chartsInitialized&&this.updateBeefyChartHighlight()}_observeOverviewPanel(){if(this._overviewResizeObserver)return;let e=this.renderRoot.querySelector(`.overview-content`);e&&(this._overviewResizeObserver=new ResizeObserver(e=>{for(let t of e)t.contentRect.width>0&&t.contentRect.height>0&&!this._chartsInitialized&&(this._chartsInitialized=!0,this.updateBeefyChart(),this.resizeDoughnutCharts())}),this._overviewResizeObserver.observe(e))}onTabShow(e){this.activeMainTab=e.detail.name,e.detail.name===`overview`&&this.updateComplete.then(()=>{this.updateBeefyChart(),this.resizeDoughnutCharts()})}resizeDoughnutCharts(){let e=this.renderRoot.querySelectorAll(`pb33f-doughnut-chart`);for(let t of e)t.chart?.resize()}updateChartData(){if(this._cachedChartIndex===this.activeItemIndex&&this._cachedData===this.data)return;this._cachedChartIndex=this.activeItemIndex,this._cachedData=this.data;let e=this.activeItem;e&&(this._changeDataset=[{labels:fce,data:[e.summary.modifications||0,e.summary.additions||0,e.summary.removals||0]}],this._breakingDataset=[{labels:Ap,data:[e.summary.breakingChanges||0,(e.summary.totalChanges||0)-(e.summary.breakingChanges||0)]}])}handleTreeNodeClicked(e){let{changes:t}=e.detail;t&&t.length>0&&this.navigateToDiffForChanges(t)}navigateToDiffForChanges(e){e&&e.length!==0&&(this.selectedDiffChanges=[...e],this.mainTabGroup&&this.mainTabGroup.show(`diff`))}renderNavigator(){return T`
+ `}};Ip.styles=[hn,Jt,Fp],w([Ot(`input[type="checkbox"]`)],Ip.prototype,`input`,2),w([Tt()],Ip.prototype,`hasFocus`,2),w([wt()],Ip.prototype,`title`,2),w([wt()],Ip.prototype,`name`,2),w([wt()],Ip.prototype,`value`,2),w([wt({reflect:!0})],Ip.prototype,`size`,2),w([wt({type:Boolean,reflect:!0})],Ip.prototype,`disabled`,2),w([wt({type:Boolean,reflect:!0})],Ip.prototype,`checked`,2),w([qt(`checked`)],Ip.prototype,`defaultChecked`,2),w([wt({reflect:!0})],Ip.prototype,`form`,2),w([wt({type:Boolean,reflect:!0})],Ip.prototype,`required`,2),w([wt({attribute:`help-text`})],Ip.prototype,`helpText`,2),w([mn(`checked`,{waitUntilFirstUpdate:!0})],Ip.prototype,`handleCheckedChange`,1),w([mn(`disabled`,{waitUntilFirstUpdate:!0})],Ip.prototype,`handleDisabledChange`,1),Ip.define(`sl-switch`);var Lp=[`MODIFIED`,`ADDED`,`REMOVED`],Rp=[`BREAKING`,`NON-BREAKING`],zp={Additions:`ok`,Modifications:`tertiary`,Removals:`error`};function Bp(e){try{return new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}catch{return e}}function lce(e,t,n,r){return{pointRadius:Array.from({length:e},(e,n)=>n===t?12:4),pointBackgroundColor:Array.from({length:e},(e,i)=>i===t?n:r),pointBorderColor:Array(e).fill(r),pointBorderWidth:Array.from({length:e},(e,n)=>n===t?3:1)}}var Vp=class extends St{constructor(...e){super(...e),this.data=null,this.activeItemIndex=0,this.error=``,this.activeMainTab=`overview`,this.selectedDiffChanges=[],this.selectedNodeId=null,this.selectedNodeChanges=[],this._graphNodeMap=new Map,this._cachedChartIndex=-1,this._cachedData=null,this._changeDataset=[],this._breakingDataset=[],this._overviewResizeObserver=null,this._chartsInitialized=!1,this._onThemeChange=()=>{requestAnimationFrame(()=>{this.updateBeefyChart(),this.resizeDoughnutCharts()})},this.handleTabShow=e=>{this.onTabShow(e)},this._onTreeNodeClicked=e=>{this.handleTreeNodeClicked(e)}}static{this.styles=gp}get _chartPointIndex(){let e=this.data?.history?.changeData?.labels?.length??0;return e>0?e-1-this.activeItemIndex:0}connectedCallback(){super.connectedCallback(),this.loadData(),this.addEventListener(Cn,this._onTreeNodeClicked),window.addEventListener(`pb33f-theme-change`,this._onThemeChange)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(Cn,this._onTreeNodeClicked),window.removeEventListener(`pb33f-theme-change`,this._onThemeChange),this._overviewResizeObserver?.disconnect()}loadData(){try{let e=document.getElementById(`report-data`);if(e?.textContent){this.data=JSON.parse(e.textContent);return}if(window.__REPORT_DATA__){this.data=window.__REPORT_DATA__;return}this.error=`No report data found`}catch(e){this.error=`Failed to parse report data: ${e}`}}get activeItem(){return this.data?.items?.length&&this.data.items[this.activeItemIndex]||null}get isMultiCommit(){return(this.data?.items?.length??0)>1}selectItem(e){this.activeItemIndex=e,this.selectedDiffChanges=[],this.selectedNodeId=null,this.selectedNodeChanges=[]}selectNode(e){this.selectedNodeId=e;let t=this._graphNodeMap.get(e);t?(this.selectedNodeChanges=t.timeline||[],this.selectedDiffChanges=t.timeline||[]):(this.selectedNodeChanges=[],this.selectedDiffChanges=[])}updateModelTree(){let e=this.activeItem;if(!this.modelTree||!e?.graph?.nodes)return;let t=new Map;for(let n of e.graph.nodes)t.set(n.id,n);this._graphNodeMap=t,this.modelTree.nodeMap=t,this.modelTree.node=t.get(`root`)||null,this.modelTree.changesEnabled=!0,this.modelTree.violationMap=new Map}updateBeefyChart(){if(!this.beefyChart||!this.data?.history?.changeData)return;let e=this.data.history.changeData,t=e.labels.length,n=this._chartPointIndex,r=this.beefyChart.background||`#1a1e2e`,i=document.documentElement.getAttribute(`theme`)===`light`,a={ok:`#000`,tertiary:`#999`,error:`#555`};this.beefyChart.datasets=e.datasets.map(e=>{let o=zp[e.label]||``,s=i?a[o]||`#666`:e.borderColor||o&&this.beefyChart[o]||`#888`;return{...e,borderColor:s,borderWidth:3,tension:0,fill:!1,pointStyle:`rect`,...lce(t,n,r,s)}}),this.beefyChart.labels=e.labels.map(e=>Bp(e)),this.beefyChart.buildChart(),requestAnimationFrame(()=>this._drawActiveGlow())}_drawActiveGlow(){let e=this.beefyChart?.chart;if(!e)return;let t=this._chartPointIndex,n=e.ctx;for(let r of e.getSortedVisibleDatasetMetas()){let i=r.data[t];if(!i)continue;let a=e.data.datasets[r.index]?.borderColor||`#fff`;for(let e=0;e<5;e++)n.save(),n.shadowColor=a,n.shadowBlur=25+e*12,n.strokeStyle=a,n.lineWidth=2,n.globalAlpha=.9,n.strokeRect(i.x-12,i.y-12,24,24),n.restore()}}updateBeefyChartHighlight(){let e=this.beefyChart?.chart;if(!e)return;let t=this._chartPointIndex,n=this.beefyChart.background||`#1a1e2e`;for(let r of e.data.datasets){let e=r.data.length;Object.assign(r,lce(e,t,n,r.borderColor))}e.update(`none`),requestAnimationFrame(()=>this._drawActiveGlow())}willUpdate(e){(e.has(`activeItemIndex`)||e.has(`data`))&&this.updateChartData()}updated(e){super.updated(e),(e.has(`activeItemIndex`)||e.has(`data`))&&this.updateComplete.then(()=>{this.onDataOrIndexChanged(e),this._upgradeReportIcons()})}_upgradeReportIcons(){let e=this.renderRoot.querySelectorAll(`.change-report pb33f-model-icon`);for(let t of e)t.getAttribute(`size`)!==`medium`&&t.setAttribute(`size`,`medium`)}onDataOrIndexChanged(e){this.updateModelTree(),e.has(`data`)&&requestAnimationFrame(()=>{this.mainTabGroup&&this.mainTabGroup.show(`overview`),this._observeOverviewPanel()}),e.has(`activeItemIndex`)&&this._chartsInitialized&&this.updateBeefyChartHighlight()}_observeOverviewPanel(){if(this._overviewResizeObserver)return;let e=this.renderRoot.querySelector(`.overview-content`);e&&(this._overviewResizeObserver=new ResizeObserver(e=>{for(let t of e)t.contentRect.width>0&&t.contentRect.height>0&&!this._chartsInitialized&&(this._chartsInitialized=!0,this.updateBeefyChart(),this.resizeDoughnutCharts())}),this._overviewResizeObserver.observe(e))}onTabShow(e){this.activeMainTab=e.detail.name,e.detail.name===`overview`&&this.updateComplete.then(()=>{this.updateBeefyChart(),this.resizeDoughnutCharts()})}resizeDoughnutCharts(){let e=this.renderRoot.querySelectorAll(`pb33f-doughnut-chart`);for(let t of e)t.chart?.resize()}updateChartData(){if(this._cachedChartIndex===this.activeItemIndex&&this._cachedData===this.data)return;this._cachedChartIndex=this.activeItemIndex,this._cachedData=this.data;let e=this.activeItem;e&&(this._changeDataset=[{labels:Lp,data:[e.summary.modifications||0,e.summary.additions||0,e.summary.removals||0]}],this._breakingDataset=[{labels:Rp,data:[e.summary.breakingChanges||0,(e.summary.totalChanges||0)-(e.summary.breakingChanges||0)]}])}handleTreeNodeClicked(e){let{changes:t}=e.detail;t&&t.length>0&&this.navigateToDiffForChanges(t)}navigateToDiffForChanges(e){e&&e.length!==0&&(this.selectedDiffChanges=[...e],this.mainTabGroup&&this.mainTabGroup.show(`diff`))}renderNavigator(){return T`