1import{aK as A,g as S,ac as c,ad as o,a_ as y,b3 as z,z as t,b9 as k,b7 as n,j as G,r as K,bv as j,bc as H,d8 as W,ae as e,aU as d,aX as X,aV as v,d3 as Z,cZ as q,aR as I,aY as D,d9 as B,dl as J,dx as Q,d0 as ee,bs as L,dw as te,b4 as se,dU as ne,d2 as oe}from"./Cclm7nkv.js";import{s as ae,u as le}from"./2wZmUIWu.js";import{u as ce}from"./D3fW_Y6d.js";import"./nhyBWmRH.js";import"./BBt0YQDp.js";import"./BkIVB5jo.js";import"./6MrOc2Xo.js";const re=/\[\[(\w+):(.+?)\]\]|\*\*(.+?)\*\*/g;function ie(x){const _=[];if(!x)return _;let p=0;const m=new RegExp(re.source,"g");for(const s of x.matchAll(m)){const u=s.index??0;u>p&&_.push({type:"text",value:x.slice(p,u)}),s[1]!==void 0?_.push({type:"entity",kind:s[1],value:s[2]}):s[3]!==void 0&&_.push({type:"bold",value:s[3]}),p=u+s[0].length}return p<x.length&&_.push({type:"text",value:x.slice(p)}),_}const de={class:"nc-changelog-entry-text"},ge={key:1},pe=A({__name:"ChangelogEntryText",props:{description:{}},setup(x){const _=x,p=S(()=>ie(_.description??""));return(m,s)=>(o(),c("span",de,[(o(!0),c(y,null,z(t(p),(u,C)=>(o(),c(y,{key:C},[u.type==="text"?(o(),c(y,{key:0},[k(n(u.value),1)],64)):(o(),c("strong",ge,n(u.value),1))],64))),128))]))}}),ue=Object.assign(pe,{__name:"SandboxChangelogEntryText"}),he={class:"nc-sandbox-changelog-panel flex flex-col h-full"},_e={class:"h-[var(--topbar-height)] flex items-center justify-between gap-2 px-[18px] border-b-1 border-nc-border-gray-medium bg-nc-bg-default flex-none"},me={class:"flex items-center gap-2 min-w-0"},xe={class:"text-base font-bold text-nc-content-gray-emphasis truncate"},be={key:0,class:"nc-changelog-count-badge"},fe={class:"flex items-center gap-2.5 px-[18px] pt-4 pb-4"},ye={class:"nc-pub-check"},ve={class:"min-w-0"},we={class:"text-sm font-semibold text-nc-content-gray-emphasis"},ke={class:"text-[12.5px] leading-snug text-nc-content-gray-muted"},Ce={class:"flex items-center justify-between px-[18px] pt-2.5 pb-1 border-t-1 border-nc-border-gray-light flex-none"},Se={class:"text-[11px] font-semibold uppercase tracking-wider text-nc-content-gray-muted"},De={class:"text-xs text-nc-content-gray-muted"},Ee={class:"flex-1 min-h-0 overflow-y-auto nc-scrollbar-thin px-[18px]"},$e={class:"flex items-center h-[21px] flex-none"},Me={class:"flex-1 min-w-0 text-[13px] leading-relaxed text-nc-content-gray-subtle"},Te={key:1},je={class:"flex-none text-[11.5px] text-nc-content-gray-muted"},ze={class:"flex items-center gap-2.5 px-[18px] py-3 border-t-1 border-nc-border-gray-light flex-none"},Ne={class:"text-xs leading-snug text-nc-content-gray-muted"},Re={class:"nc-changelog-footer flex items-center gap-2.5"},Ae={key:0,class:"flex-1 flex items-center justify-center py-6"},Ue={key:1,class:"flex-1 flex flex-col items-center justify-center gap-3 py-12 px-6 text-center"},Ie={class:"w-12 h-12 rounded-xl bg-nc-bg-gray-light flex items-center justify-center"},Be={class:"text-sm font-medium text-nc-content-gray-subtle mb-0.5"},Le={class:"text-xs text-nc-content-gray-muted"},Oe={class:"nc-changelog-info-banner"},Pe={class:"font-semibold text-nc-content-gray"},Ye={class:"nc-changelog-toolbar"},Ve={class:"flex-1 overflow-y-auto nc-scrollbar-thin px-[18px] pb-2"},Fe={class:"nc-changelog-group-label"},Ge={class:"flex items-center h-[21px] flex-none"},Ke={class:"flex-1 min-w-0"},He={class:"text-[13px] leading-relaxed text-nc-content-gray-subtle"},We={key:1},Xe={class:"flex items-center gap-1.5 mt-1.5"},Ze={class:"text-[11.5px] text-nc-content-gray-muted truncate"},qe={class:"flex-none text-[11.5px] text-[#b3b8bd] dark:text-[#6f6f74]"},Je={class:"nc-changelog-footer"},Qe={key:0,class:"nc-changelog-footer-status"},et={class:"text-xs text-red-600 mb-2 px-1"},tt={class:"flex items-center justify-center gap-2"},st=A({__name:"ChangelogPanel",props:{isLoading:{type:Boolean,default:!1},changelog:{default:()=>[]},users:{default:()=>({})},isMerging:{type:Boolean,default:!1},mergeStatus:{default:"idle"},mergeError:{default:""},publishedEntries:{default:()=>[]}},emits:["apply","close","refresh","deleteSandbox"],setup(x,{emit:_}){const p=x,m=_,{t:s}=G(),u=K("newest"),C={added:"ncPlus",changed:"ncEdit",removed:"ncMinus"},w=S(()=>p.changelog.length>0),E=S(()=>p.mergeStatus==="success"),N=S(()=>{const a=[...p.changelog];return u.value==="newest"?a.reverse():a}),R=S(()=>{const a=[],l=new Map;for(const r of N.value){const i=j(r.created_at),b=j();let h;i.isSame(b,"day")?h=s("labels.today"):i.isSame(b.subtract(1,"day"),"day")?h=s("labels.yesterday"):i.isSame(b,"week")?h=i.format("dddd"):i.isSame(b,"year")?h=i.format("MMM D"):h=i.format("MMM D, YYYY"),l.has(h
1)||l.set(h,[]),l.get(h).push(r)}for(const[r,i]of l)a.push({label:r,entries:i});return a});function $(a){return p.users[a]??{display_name:s("labels.unknownUser"),email:"",avatar:null}}function M(a){return ae(a.event)}function T(a){const l=j(a),r=j(),i=r.diff(l,"minute");if(i<1)return s("labels.justNow");if(i<60)return`${i}m`;const b=r.diff(l,"hour");if(b<24)return`${b}h`;const h=r.diff(l,"day");return h<7?`${h}d`:l.format("MMM D")}function U(){u.value=u.value==="newest"?"oldest":"newest"}return(a,l)=>{const r=Z,i=q,b=ue,h=J,O=H("i18n-t"),P=Q,Y=ee,V=W("e");return o(),c("div",he,[e("div",_e,[e("div",me,[e("span",xe,n(t(s)("labels.sandboxChanges")),1),!t(E)&&t(w)?(o(),c("span",be,n(a.changelog.length),1)):X("",!0)]),d(i,{type:"text",size:"small",class:"nc-sandbox-header-btn",onClick:l[0]||(l[0]=g=>m("close"))},{default:v(()=>[d(r,{icon:"ncChevronsRight",class:"w-4 h-4 text-nc-content-gray-muted"})]),_:1})]),t(E)?(o(),c(y,{key:0},[e("div",fe,[e("span",ye,[l[6]||(l[6]=e("span",{class:"nc-pub-check-ring"},null,-1)),d(r,{icon:"ncCheck",class:"w-3.5 h-3.5 text-white relative z-1"})]),e("div",ve,[e("div",we,n(t(s)("labels.publishedToMaster")),1),e("div",ke,n(t(s)("labels.snapshotSavedRollback")),1)])]),e("div",Ce,[e("span",Se,n(t(s)("labels.whatShipped")),1),e("span",De,n(a.publishedEntries.length),1)]),e("div",Ee,[(o(!0),c(y,null,z(a.publishedEntries,(g,f)=>(o(),c("div",{key:g.id,class:I(["nc-change-row",{"border-b-0":f===a.publishedEntries.length-1}])},[e("span",$e,[d(r,{icon:C[M(g)],class:"w-3.5 h-3.5 text-nc-content-gray-muted"},null,8,["icon"])]),e("div",Me,[g.description?(o(),D(b,{key:0,description:g.description},null,8,["description"])):(o(),c("span",Te,n(g.event),1))]),e("span",je,n(T(g.created_at)),1)],2))),128))]),e("div",ze,[d(r,{icon:"ncLock",class:"w-3.5 h-3.5 flex-none text-nc-content-gray-muted"}),e("span",Ne,n(t(s)("labels.masterStaysLockedNote")),1)]),e("div",Re,[d(i,{size:"small",class:"flex-1",type:"secondary",onClick:l[1]||(l[1]=g=>m("close"))},{default:v(()=>[k(n(t(s)("labels.keepSandbox")),1)]),_:1}),B((o(),D(i,{size:"small",class:"flex-1",type:"secondary",onClick:l[2]||(l[2]=g=>m("deleteSandbox"))},{default:v(()=>[k(n(t(s)("labels.deleteAndUnlock")),1)]),_:1})),[[V,["c:sandbox:publish:delete-unlock"]]])])],64)):(o(),c(y,{key:1},[a.isLoading?(o(),c("div",Ae,[d(h,{size:"medium"})])):t(w)?(o(),c(y,{key:2},[e("div",Oe,[d(r,{icon:"ncInfo",class:"w-4 h-4 text-nc-content-gray-muted mt-px flex-none"}),d(O,{keypath:"labels.sandboxReviewBannerInfo",tag:"span",class:"text-xs leading-relaxed text-nc-content-gray-muted"},{master:v(()=>[e("strong",Pe,n(t(s)("labels.master")),1)]),_:1})]),e("div",Ye,[e("button",{type:"button",class:"nc-changelog-tool-btn",onClick:l[3]||(l[3]=g=>m("refresh"))},[d(r,{icon:"ncRotateCcw",class:"w-3.5 h-3.5"}),k(" "+n(t(s)("labels.refresh")),1)]),e("button",{type:"button",class:"nc-changelog-tool-btn",onClick:U},[k(n(t(u)==="newest"?t(s)("labels.newestFirst"):t(s)("labels.oldestFirst"))+" ",1),d(r,{icon:"ncArrowUpDown",class:"w-3.5 h-3.5"})])]),e("div",Ve,[(o(!0),c(y,null,z(t(R),g=>(o(),c("div",{key:g.label},[e("div",Fe,n(g.label),1),(o(!0),c(y,null,z(g.entries,(f,F)=>(o(),c("div",{key:f.id,class:I(["nc-change-row",{"border-b-0":F===g.entries.length-1}])},[e("span",Ge,[d(r,{icon:C[M(f)],class:"w-3.5 h-3.5 text-nc-content-gray-muted"},null,8,["icon"])]),e("div",Ke,[e("div",He,[f.description?(o(),D(b,{key:0,description:f.description},null,8,["description"])):(o(),c("span",We,n(f.event),1))]),e("div",Xe,[d(P,{user:$(f.created_by),size:"small",class:"flex-none nc-changelog-avatar"},null,8,["user"]),e("span",Ze,n($(f.created_by).display_name),1)])]),e("span",qe,n(T(f.created_at)),1)],2))),128))]))),128))])],64)):(o(),c("div",Ue,[e("div",Ie,[d(r,{icon:"ncSandbox",class:"w-6 h-6 text-nc-content-gray-muted"})]),e("div",null,[e("div",Be,n(t(s)("labels.noSandboxChanges")),1),e("div",Le,n(t(s)("labels.sandboxNoChangesHint")),1)])])),e("div",Je,[a.mergeStatus==="loading"?(o(),c("div",Qe,[d(h,{size:"small"}),e("span",null,n(t(s)("labels.publishing"))+"â¦",1)])):a.mergeStatus==="error"?(o(),c(y,{key:1},[e("div",et,n(a.mergeError),1),d(i,{size:"small",class:"w-full",type:"primary",theme:"orange",onClick:l[4]||(l[4]=g=>m("apply"))},{default:v(()=>
1[k(n(t(s)("labels.tryAgain")),1)]),_:1})],64)):(o(),D(Y,{key:2,disabled:t(w),placement:"top",class:"w-full"},{title:v(()=>[k(n(t(s)("tooltip.noSchemaChanges")),1)]),default:v(()=>[d(i,{size:"small",class:"w-full !h-[42px]",type:"primary",theme:"orange",disabled:!t(w)||a.isMerging,onClick:l[5]||(l[5]=g=>m("apply"))},{default:v(()=>[e("div",tt,[d(r,{icon:"ncArrowUp",class:"w-4 h-4"}),e("span",null,n(t(s)("labels.publishNChangesToMaster",{count:a.changelog.length},a.changelog.length)),1)])]),_:1},8,["disabled"])]),_:1},8,["disabled"]))])],64))])}}}),nt=Object.assign(L(st,[["__scopeId","data-v-3a168978"]]),{__name:"SmartsheetTopbarSandboxStatusChangelogPanel"}),ot=A({__name:"ChangelogDrawer",setup(x){const{isDrawerOpen:_,isLoading:p,data:m,mergeStatus:s,mergeError:u,publishedEntries:C,closeDrawer:w,mergeFromChangelog:E,deleteSandboxAndUnlock:N,loadChangelog:R,DRAWER_WIDTH:$}=le(),{confirmDelete:M}=ce();function T(){M(N)}return(U,a)=>{const l=nt;return o(),D(oe,{name:"nc-sandbox-drawer-slide"},{default:v(()=>[B(e("div",{class:"nc-sandbox-changelog-drawer",style:se({width:`${t($)}px`}),onKeydown:a[0]||(a[0]=te((...r)=>t(w)&&t(w)(...r),["esc"]))},[d(l,{"is-loading":t(p),changelog:t(m).changelog,users:t(m).users,"is-merging":t(s)==="loading","merge-status":t(s),"merge-error":t(u),"published-entries":t(C),onApply:t(E),onClose:t(w),onRefresh:t(R),onDeleteSandbox:T},null,8,["is-loading","changelog","users","is-merging","merge-status","merge-error","published-entries","onApply","onClose","onRefresh"])],36),[[ne,t(_)]])]),_:1})}}}),pt=Object.assign(L(ot,[["__scopeId","data-v-7af3bf67"]]),{__name:"SandboxChangelogDrawer"});export{pt as default};
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.