TvBox/jav/lib/ui_packages_diffs_diff-parts_ts-d15c96aca8c4.js

2 lines
17 KiB
JavaScript
Raw Normal View History

2025-07-03 20:15:22 +08:00
"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["ui_packages_diffs_diff-parts_ts"],{87591:(e,i,t)=>{function l(e){return`line-${e}`}function n(e,i,t){return`${e}${"left"===i?"L":"R"}${t}`}function r(e){return"DELETION"===e?"left":"right"}function a(e,i=!1,t=!1){if(t)return"var(--bgColor-attention-muted, var(--color-attention-subtle))";switch(e){case"ADDITION":return i?"var(--diffBlob-additionNum-bgColor, var(--diffBlob-addition-bgColor-num))":"var(--diffBlob-additionLine-bgColor, var(--diffBlob-addition-bgColor-line))";case"DELETION":return i?"var(--diffBlob-deletionNum-bgColor, var(--diffBlob-deletion-bgColor-num))":"var(--diffBlob-deletionLine-bgColor, var(--diffBlob-deletion-bgColor-line))";case"HUNK":return i?"var(--diffBlob-hunkNum-bgColor, var(--diffBlob-hunk-bgColor-num))":"var(--diffBlob-hunkLine-bgColor, var(--bgColor-accent-muted))";case"EMPTY":return i?"var(--diffBlob-emptyNum-bgColor, var(--diffBlob-hunk-bgColor-num))":"var(--diffBlob-emptyLine-bgColor, var(--bgColor-accent-muted))";default:return}}function d(e){let i=0;if(e)for(let t of e)i=Math.max(i,t?.left??0,t?.right??0);return Math.max(8*i.toString().length+20,40).toString()}t.d(i,{IQ:()=>n,Sq:()=>l,XU:()=>r,c7:()=>d,gK:()=>a})},91215:(e,i,t)=>{t.d(i,{Jg:()=>c,nq:()=>h,uP:()=>u.u,$e:()=>y,P3:()=>x,wj:()=>g,l4:()=>C,Qe:()=>b,Ah:()=>L});var l=t(74848),n=t(21728),r=t(34164),a=t(45968),d=t(87591);let s=e=>{let i,t,s,o,c,f,h,u,m,x,p=(0,n.c)(34),{dragging:y,isHighlighted:g,isLeftColumn:b,colSpan:j,line:N,lineAnchor:D}=e,_=N.html,C="";if(["ADDITION","DELETION"].includes(N.type)&&["+","-"].includes(_[0])){let e;C=_[0],p[0]!==_?(e=_.slice(1),p[0]=_,p[1]=e):e=p[1],_=e}let T=y&&g,L=b&&"HUNK"!==N.type;p[2]!==T||p[3]!==L?(i=(0,r.$)("diff-text-cell",{"border-left color-border-accent-emphasis":T,"border-right":L}),p[2]=T,p[3]=L,p[4]=i):i=p[4],p[5]!==D?(t=D?(0,d.Sq)(D):void 0,p[5]=D,p[6]=t):t=p[6],p[7]!==g||p[8]!==N.type?(s=(0,d.gK)(N.type,!1,g),p[7]=g,p[8]=N.type,p[9]=s):s=p[9],p[10]!==s?(o={backgroundColor:s},p[10]=s,p[11]=o):o=p[11];let v=C,S="ADDITION"===N.type,I="DELETION"===N.type;p[12]!==S||p[13]!==I?(c=(0,r.$)("diff-text syntax-highlighted-line",{addition:S,deletion:I}),p[12]=S,p[13]=I,p[14]=c):c=p[14];let k=e.lineChild,$="HUNK"===N.type;p[15]!==$?(f=(0,r.$)("diff-text-inner",{"color-fg-muted":$}),p[15]=$,p[16]=f):f=p[16];let H="CONTEXT"===N.type?"-7px":void 0;return p[17]!==H?(h={marginLeft:H},p[17]=H,p[18]=h):h=p[18],p[19]!==_||p[20]!==f||p[21]!==h?(u=(0,l.jsx)(a.$6,{className:f,html:_,style:h}),p[19]=_,p[20]=f,p[21]=h,p[22]=u):u=p[22],p[23]!==C||p[24]!==e.lineChild||p[25]!==u||p[26]!==c?(m=(0,l.jsxs)("code",{"data-code-marker":v,className:c,children:[k,u]}),p[23]=C,p[24]=e.lineChild,p[25]=u,p[26]=c,p[27]=m):m=p[27],p[28]!==j||p[29]!==m||p[30]!==i||p[31]!==t||p[32]!==o?(x=(0,l.jsx)("td",{className:i,colSpan:j,id:t,style:o,children:m}),p[28]=j,p[29]=m,p[30]=i,p[31]=t,p[32]=o,p[33]=x):x=p[33],x};try{s.displayName||(s.displayName="DiffText")}catch{}let o=e=>{let i,t,a,s,o,c,f,h,u,m,x,p,y,g=(0,n.c)(30);g[0]!==e?({ariaLabel:i,children:t,hasExpanderButton:s,lineType:f,colSpan:a,interactiveProps:o,isHighlighted:c,...h}=e,g[0]=e,g[1]=i,g[2]=t,g[3]=a,g[4]=s,g[5]=o,g[6]=c,g[7]=f,g[8]=h):(i=g[1],t=g[2],a=g[3],s=g[4],o=g[5],c=g[6],f=g[7],h=g[8]),g[9]!==t?(u=(0,l.jsx)("code",{className:"pr-2",children:t}),g[9]=t,g[10]=u):u=g[10];let b=u;if(o){let e;g[11]!==i||g[12]!==o||g[13]!==b?(e=(0,l.jsx)("button",{className:"diff-line-number-button",...o,"aria-label":i,children:b}),g[11]=i,g[12]=o,g[13]=b,g[14]=e):e=g[14],b=e}let j=o?void 0:i,N=!!o;g[15]!==s||g[16]!==N?(m=(0,r.$)("diff-line-number",{"has-expander":s,clickable:N}),g[15]=s,g[16]=N,g[17]=m):m=g[17];let D=a||1;return g[18]!==c||g[19]!==f?(x=(0,d.gK)(f,!0,c),g[18]=c,g[19]=f,g[20]=x):x=g[20],g[21]!==x?(p={backgroundColor:x},g[21]=x,g[22]=p):p=g[22],g[23]!==h||g[24]!==j||g[25]!==m||g[26]!==D||g[27]!==p||g[28]!==b?(y=(0,l.jsx)("td",{"aria-label":j,"data-line-number":!0,className:m,colSpan:D,style:p,...h,children:b}),g[23]=h,g[24]=j,g[25]=m,g[26]=D,g[27]=p,g[28]=b,g[29]=y):y=g[29],y};try{o.displayNa
//# sourceMappingURL=ui_packages_diffs_diff-parts_ts-ceee561bf244.js.map