vibe64 0.1.48 → 0.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/run.js +1746 -1725
- package/bin/server.js +75 -75
- package/bin/upgrade-state.js +4275 -4254
- package/dist/assets/GithubBrowserTabs-BwpiRS2u.js +1 -0
- package/dist/assets/{LocalDatabaseServer-ih_gadbx.js → LocalDatabaseServer-u_Ky7bNS.js} +1 -1
- package/dist/assets/{Vibe64AuthSettingsButton-BZsCIA2Z.js → Vibe64AuthSettingsButton-BCwswT1G.js} +1 -1
- package/dist/assets/{Vibe64DashboardShell-DFE-2tFZ.js → Vibe64DashboardShell-CWlgrR2B.js} +1 -1
- package/dist/assets/{Vibe64DatabaseWorkspace-BdvxuFPT.js → Vibe64DatabaseWorkspace-Dhs8_H0P.js} +1 -1
- package/dist/assets/Vibe64OutputControls-Dn548CZa.js +8 -0
- package/dist/assets/{Vibe64RepositoryWorkspace-CVN2HKCB.js → Vibe64RepositoryWorkspace-C-8S4JUF.js} +1 -1
- package/dist/assets/{Vibe64SessionFiles-DKo5wd8-.js → Vibe64SessionFiles-Cx6J7DDN.js} +1 -1
- package/dist/assets/{Vibe64UiStoryboardView-BYqVdBAt.js → Vibe64UiStoryboardView-DHyhJiWS.js} +1 -1
- package/dist/assets/{Vibe64UnavailableSessions-CQjgoaS0.js → Vibe64UnavailableSessions-Da4RxIhA.js} +1 -1
- package/dist/assets/{_sessionId_-ByUkrRd7.js → _sessionId_-DCpgDPSI.js} +1 -1
- package/dist/assets/_slug_-BbEWp01a.js +25 -0
- package/dist/assets/{_slug_-B16mTWjj.css → _slug_-DerKOisL.css} +1 -1
- package/dist/assets/{access-CWZMu-ND.js → access-D4di2sCr.js} +1 -1
- package/dist/assets/{app-D_itm2S5.js → app-Adr9Iz8p.js} +1 -1
- package/dist/assets/{changes-BYuFfnEm.js → changes-3Dd1O8Lu.js} +1 -1
- package/dist/assets/{client-CP2EwnrY.js → client-BAXHGUOC.js} +1 -1
- package/dist/assets/{client-B88Jggew.js → client-CCZIu6yc.js} +1 -1
- package/dist/assets/{conversation-DL4AODd9.js → conversation-ErAO1CmH.js} +1 -1
- package/dist/assets/{dashboard-R4qgYv8O.js → dashboard-0tCzDYCX.js} +1 -1
- package/dist/assets/{english-definitions-CdIGswXU.js → english-definitions-DeiQ-jTT.js} +1 -1
- package/dist/assets/env-DsyQ2MFX.js +1 -0
- package/dist/assets/{health-Ut9eZrbK.js → health-DyTXU-nb.js} +1 -1
- package/dist/assets/{history-BrmvkGgi.js → history-BXGAdPMI.js} +1 -1
- package/dist/assets/{incoming-CicEs40v.js → incoming-yajkdGBY.js} +1 -1
- package/dist/assets/{index-DZgCwvFD.js → index-CGz4Yow6.js} +4 -4
- package/dist/assets/{integrations-QHeHC-C9.js → integrations-BMrXET36.js} +1 -1
- package/dist/assets/{issues-Ds7iAQFQ.js → issues-kc1XBZCK.js} +1 -1
- package/dist/assets/{learning-Dq0xbg3x.js → learning-CIE5ghYv.js} +1 -1
- package/dist/assets/publish-DTh6amqi.js +3 -0
- package/dist/assets/{pull-requests-DHLK83qZ.js → pull-requests-CbfGSSIh.js} +1 -1
- package/dist/assets/{repository-DWw1VFIQ.js → repository-BstMh-bG.js} +1 -1
- package/dist/assets/settings-Bf8C6dls.js +1 -0
- package/dist/assets/useArchivedVibe64Sessions-DIOpfUxD.js +1 -0
- package/dist/assets/{useCommand-DhwB5k1w.js → useCommand-CVuya6vG.js} +1 -1
- package/dist/assets/{useEndpointResource-tVvsJvd4.js → useEndpointResource-7-YDfAxX.js} +1 -1
- package/dist/assets/{useUiFeedback-DLUToc5y.js → useUiFeedback-Bd3rao6E.js} +1 -1
- package/dist/assets/useVibe64ConversationLog-ChJOU2SD.js +1 -0
- package/dist/assets/{useVibe64DatabaseTools-Cac_aZnv.js → useVibe64DatabaseTools-DKV-TeNJ.js} +1 -1
- package/dist/assets/useVibe64SessionData-BkIHUrP5.js +1 -0
- package/dist/assets/useVibe64SessionSelection-N8wX5oqo.js +1 -0
- package/dist/assets/{useVibe64SystemGraph-idV9zXa9.js → useVibe64SystemGraph-Db_eD-X8.js} +1 -1
- package/dist/assets/vibe64RepositoryRealtime-CHT4-6VN.js +1 -0
- package/dist/assets/vibe64SessionFocus-CS6Ex53G.js +1 -0
- package/dist/assets/vibe64SessionFocus-CSm4YJQD.css +1 -0
- package/dist/assets/vibe64SessionRequestConfig-xIx-5jxQ.js +1 -0
- package/dist/index.html +10 -9
- package/docs/colleague-usage/ai-accounts.md +6 -2
- package/docs/colleague-usage/ai-balance-and-allowance.md +15 -2
- package/docs/colleague-usage/coding-agent-failures.md +2 -1
- package/docs/colleague-usage/coding-agent-goals.md +8 -3
- package/docs/colleague-usage/coding-agents.md +16 -0
- package/docs/colleague-usage/github-work.md +14 -0
- package/docs/colleague-usage/project-setup.md +6 -3
- package/docs/colleague-usage/running-vibe64-on-your-computer.md +3 -1
- package/docs/colleague-usage/sessions.md +35 -7
- package/docs/colleague-usage/starter-apps.md +3 -0
- package/docs/colleague-usage/temporary-chat-context.md +2 -1
- package/docs/colleague-usage/temporary-chats.md +17 -5
- package/node_modules/@jskit-ai/assistant-core/package.json +1 -1
- package/node_modules/@jskit-ai/assistant-runtime/README.md +2 -1
- package/node_modules/@jskit-ai/assistant-runtime/locales/en.json +2 -1
- package/node_modules/@jskit-ai/assistant-runtime/package.json +1 -1
- package/node_modules/@jskit-ai/assistant-voice/package.json +1 -1
- package/node_modules/@local/vibe64-execution/src/host/execHelper.js +34 -34
- package/node_modules/@local/vibe64-execution/src/server/gitTurnCheckpointCommand.js +1327 -0
- package/node_modules/@local/vibe64-genesis/bin/vibe64-genesis-host-context +120 -120
- package/node_modules/@local/vibe64-runtime/src/server/codexAppServerProcess.js +143 -143
- package/node_modules/@local/vibe64-sessions/package.json +2 -1
- package/node_modules/@local/vibe64-terminals/src/server/sessionWorkOperationCommand.js +1385 -1362
- package/package.json +5 -5
- package/server.bundle.mjs +38576 -38459
- package/dist/assets/GithubBrowserTabs-_l6htLOV.js +0 -1
- package/dist/assets/Vibe64OutputControls-DsCbasR0.js +0 -8
- package/dist/assets/_slug_-hep_be7Z.js +0 -24
- package/dist/assets/env-DtkytCtq.js +0 -1
- package/dist/assets/publish-eErG67LW.js +0 -3
- package/dist/assets/settings-QkwnoNn3.js +0 -1
- package/dist/assets/useArchivedVibe64Sessions-Biy_4sxD.js +0 -1
- package/dist/assets/useVibe64ConversationLog-jM3KOvN7.js +0 -1
- package/dist/assets/useVibe64SessionData-FGnNvFfK.js +0 -1
- package/dist/assets/useVibe64SessionSelection-Bgsif-tm.js +0 -1
- package/dist/assets/vibe64RepositoryRealtime-C-J0I5jY.js +0 -1
- package/dist/assets/vibe64SessionFocus-CDIB5Gpr.js +0 -1
- package/dist/assets/vibe64SessionFocus-DSW5Irm6.css +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{D as createVNode,E as createTextVNode,Ht as watch,On as unref,Zn as normalizeClass,_ as createBaseVNode,b as createElementBlock,bt as renderList,et as mergeProps,g as computed,it as onBeforeUnmount,mt as openBlock,o as Fragment,qt as withCtx,tr as toDisplayString,tt as nextTick,v as createBlock,vn as ref,w as createSlots,wn as toRef,wt as resolveDynamicComponent,xn as shallowRef,xt as renderSlot,y as createCommentVNode}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{An as wrapInArray,Cn as omit,Dt as genericComponent,It as propsFactory,Kn as isObject,Vn as isBoolean,Yt as callEvent,_ as VIcon,bt as useRender,cr as withKeys,dn as getActiveElement,ft as useLocale,jt as injectNestedDefaults,mn as humanReadableFileSize,mt as useProxiedModel,p as VProgressLinear,sn as filterInputAttrs}from"./VAvatar-H2hyOWlB.js";import{d as getHttpWebClient}from"./vibe64ProjectScope.local-l5_-E6pq.js";import{t as VSelect}from"./VSelect-Dqnp_CFi.js";import{l as forwardRefs}from"./VOverlay-Bi97WKy3.js";import{n as VList,s as VListItem,t as VMenu}from"./VMenu-DnhVIMrr.js";import{n as VChipGroup,t as VChip}from"./VChip-Uixfx461.js";import{c as VCounter,l as VInput,m as useFocus,o as VField,s as makeVFieldProps,t as VTextField,u as makeVInputProps}from"./VTextField-CnkGeXaT.js";import{t as resolveStudioRequestUrl}from"./studioUrls-B0-GdWh8.js";import{B as mdiCheckDecagram,C as mdiArrowRight,Ct as mdiDotsVertical,En as mdiLockOutline,Fn as mdiMinusCircleOutline,I as mdiCellphoneArrowDown,Jn as mdiPlus,Jr as mdiWifi,K as mdiCircleOutline,Kn as mdiPlay,Kt as mdiGithub,Ln as mdiNpm,Mr as mdiTestTube,Nr as mdiTrashCanOutline,R as mdiCheckCircle,Rn as mdiOpenInNew,S as mdiArrowLeft,Tn as mdiLockOpenVariantOutline,Un as mdiPencilOutline,V as mdiChevronDown,Xn as mdiQrcode,Y as mdiClockOutline,Yn as mdiProgressClock,Yr as mdiWrenchOutline,Z as mdiCloseCircle,_t as mdiCurrencyUsd,a as mdiAccountKeyOutline,ar as mdiRobotOutline,d as mdiAlertCircle,er as mdiRefresh,f as mdiAlertCircleOutline,ft as mdiContentSaveOutline,gn as mdiLanguagePython,gr as mdiSourceBranch,in as mdiKeyChange,jr as mdiTagOutline,m as mdiAndroid,or as mdiRocketLaunchOutline,p as mdiAlertOutline,pr as mdiShieldKeyOutline,rn as mdiInformationOutline,tr as mdiReplay,wt as mdiDownload,xn as mdiLifebuoy,yr as mdiSourceCommit,zn as mdiPackageVariantClosed,zr as mdiUpload}from"./mdi-X9prU-DG.js";import{i as VBtnToggle,r as VProgressCircular,t as VBtn}from"./VBtn-Sj5jAuOx.js";import{t as VAlert}from"./VAlert-7_VM9EUm.js";import{t as VCheckbox}from"./VCheckbox-CHFec5Bg.js";import{t as VDialog}from"./VDialog-Drp3yzSH.js";import{i as VCardTitle,n as VCardText,o as VCardActions,t as VCard}from"./VCard-DExT9Cji.js";import{t as VSpacer}from"./VSpacer-BSTt0_VA.js";import{n as VRadio,t as VRadioGroup}from"./VRadioGroup-OHg3N6_i.js";import{t as VSkeletonLoader}from"./VSkeletonLoader-pc4bBTxv.js";import{t as VTextarea}from"./VTextarea-wqoRFl1K.js";import{t as _plugin_vue_export_helper_default}from"./_plugin-vue_export-helper-DNW4j-dv.js";import{H as VTabs,U as VTab,W as VSnackbar}from"./index-CGz4Yow6.js";import{t as Vibe64DashboardPageHeader_default}from"./Vibe64DashboardPageHeader-BhPHQu6p.js";function useFileDrop(){function getTransfer(e){return e.dataTransfer??e.clipboardData??null}function hasFilesOrFolders(e){const transfer=getTransfer(e);return[...transfer?.items??[]].filter(x=>x.kind===`file`).map(x=>x.webkitGetAsEntry()).filter(Boolean).length>0||[...transfer?.files??[]].length>0}function isDraggingFiles(e){return e.dataTransfer?.types.includes(`Files`)??false}async function handleDrop(e){const transfer=getTransfer(e);const result=[];const entries=[...transfer?.items??[]].filter(x=>x.kind===`file`).map(x=>x.webkitGetAsEntry()).filter(Boolean);if(entries.length)for(const entry of entries){const files=await traverseFileTree(entry,appendIfDirectory(`.`,entry));result.push(...files.map(x=>x.file))}else result.push(...[...transfer?.files??[]]);return result}return{handleDrop,hasFilesOrFolders,isDraggingFiles}}function traverseFileTree(item,path=``){return new Promise((resolve,reject)=>{if(item.isFile)item.file(file=>resolve([{file,path}]),reject);else if(item.isDirectory)item.createReader().readEntries(async entries=>{const files=[];for(const entry of entries)files.push(...await traverseFileTree(entry,appendIfDirectory(path,entry)));resolve(files)})})}function appendIfDirectory(path,item){return item.isDirectory?`${path}/${item.name}`:path}var makeFileFilterProps=propsFactory({filterByType:String},`file-accept`);function useFileFilter(props){const fileFilter=computed(()=>props.filterByType?createFilter(props.filterByType):null);function filterAccepted(files){if(fileFilter.value){const accepted=files.filter(fileFilter.value);return{accepted,rejected:files.filter(f=>!accepted.includes(f))}}return{accepted:files,rejected:[]}}return{filterAccepted}}function createFilter(v){const types=v.split(`,`).map(x=>x.trim().toLowerCase());const extensionsToMatch=types.filter(x=>x.startsWith(`.`));const wildcards=types.filter(x=>x.endsWith(`/*`));const typesToMatch=types.filter(x=>!extensionsToMatch.includes(x)&&!wildcards.includes(x));return file=>{const extension=file.name.split(`.`).at(-1)?.toLowerCase()??``;const typeGroup=file.type.split(`/`).at(0)?.toLowerCase()??``;return typesToMatch.includes(file.type)||extensionsToMatch.includes(`.${extension}`)||wildcards.includes(`${typeGroup}/*`)}}var makeVFileInputProps=propsFactory({chips:Boolean,counter:{type:Boolean,default:void 0},counterSizeString:{type:String,default:`$vuetify.fileInput.counterSize`},counterString:{type:String,default:`$vuetify.fileInput.counter`},hideInput:Boolean,multiple:Boolean,placeholder:String,persistentPlaceholder:Boolean,showSize:{type:[Boolean,Number,String],default:false,validator:v=>{return isBoolean(v)||[1e3,1024].includes(Number(v))}},truncateLength:{type:[Number,String],default:22},...omit(makeVInputProps({prependIcon:`$file`}),[`direction`]),modelValue:{type:[Array,Object],default:props=>props.multiple?[]:null,validator:val=>wrapInArray(val).every(isObject)},...makeFileFilterProps(),...makeVFieldProps({clearable:true})},`VFileInput`);var VFileInput=genericComponent()({name:`VFileInput`,inheritAttrs:false,props:makeVFileInputProps(),emits:{"click:control":e=>true,"mousedown:control":e=>true,"update:focused":focused=>true,"update:modelValue":files=>true,rejected:files=>true},setup(props,{attrs,emit,slots}){const{t}=useLocale();const{filterAccepted}=useFileFilter(props);const model=useProxiedModel(props,`modelValue`,props.modelValue,val=>wrapInArray(val),val=>!props.multiple&&Array.isArray(val)?val[0]:val);const{isFocused,focus,blur}=useFocus(props);const chipDefaults=injectNestedDefaults(`VChip`);const base=computed(()=>!isBoolean(props.showSize)?props.showSize:void 0);const totalBytes=computed(()=>(model.value??[]).reduce((bytes,{size=0})=>bytes+size,0));const totalBytesReadable=computed(()=>humanReadableFileSize(totalBytes.value,base.value));const fileNames=computed(()=>(model.value??[]).map(file=>{const{name=``,size=0}=file;const truncatedText=truncateText(name);return!props.showSize?truncatedText:`${truncatedText} (${humanReadableFileSize(size,base.value)})`}));const counterValue=computed(()=>{const fileCount=model.value?.length??0;if(props.showSize)return t(props.counterSizeString,fileCount,totalBytesReadable.value);else return t(props.counterString,fileCount)});const vInputRef=ref();const vFieldRef=ref();const inputRef=ref();const isActive=toRef(()=>props.persistentPlaceholder||isFocused.value||props.active);const isPlainOrUnderlined=computed(()=>[`plain`,`underlined`].includes(props.variant));const isDragging=shallowRef(false);const{handleDrop,hasFilesOrFolders,isDraggingFiles}=useFileDrop();function onFocus(){if(inputRef.value!==getActiveElement())inputRef.value?.focus();if(!isFocused.value)focus()}function onClickPrepend(e){inputRef.value?.click()}function onControlMousedown(e){emit(`mousedown:control`,e)}function onControlClick(e){inputRef.value?.click();emit(`click:control`,e)}function onClear(e){e.stopPropagation();onFocus();nextTick(()=>{model.value=[];callEvent(props[`onClick:clear`],e)})}function truncateText(str){if(str.length<Number(props.truncateLength))return str;const charsKeepOneSide=Math.floor((Number(props.truncateLength)-1)/2);return`${str.slice(0,charsKeepOneSide)}…${str.slice(str.length-charsKeepOneSide)}`}function onDragover(e){if(props.disabled||props.readonly)return;e.preventDefault();e.stopImmediatePropagation();if(isDraggingFiles(e))isDragging.value=true}function onDragleave(e){e.preventDefault();if(!e.currentTarget.contains(e.relatedTarget))isDragging.value=false}async function onDrop(e){e.preventDefault();e.stopImmediatePropagation();isDragging.value=false;if(!inputRef.value||props.disabled||props.readonly||!hasFilesOrFolders(e))return;selectAccepted(await handleDrop(e))}async function onPaste(e){if(!inputRef.value||props.disabled||props.readonly||!hasFilesOrFolders(e))return;e.preventDefault();const files=await handleDrop(e);if(files.length)selectAccepted(files)}function onFileSelection(e){if(!e.target||e.repack)return;if(!props.filterByType){const target=e.target;model.value=[...target.files??[]]}else selectAccepted([...e.target.files])}function selectAccepted(files){const dataTransfer=new DataTransfer;const{accepted,rejected}=filterAccepted(files);if(rejected.length)emit(`rejected`,rejected);for(const file of accepted)dataTransfer.items.add(file);inputRef.value.files=dataTransfer.files;model.value=[...dataTransfer.files];const event=new Event(`change`,{bubbles:true});event.repack=true;inputRef.value.dispatchEvent(event)}watch(model,newValue=>{if((!Array.isArray(newValue)||!newValue.length)&&inputRef.value)inputRef.value.value=``});useRender(()=>{const hasCounter=!!(slots.counter||props.counter!==void 0);const counterActive=props.counter!==false&&props.counter!==null&&!!model.value?.length;const hasDetails=props.hideDetails!==true&&!!(slots.details||hasCounter);const detailsActive=!!(slots.details||hasCounter&&counterActive);const[rootAttrs,inputAttrs]=filterInputAttrs(attrs);const{modelValue:_,...inputProps}=VInput.filterProps(props);const fieldProps={...VField.filterProps(props),"onClick:clear":onClear};const expectsDirectory=attrs.webkitdirectory!==void 0&&attrs.webkitdirectory!==false;const acceptFallback=attrs.accept?String(attrs.accept):void 0;const inputAccept=expectsDirectory?void 0:props.filterByType??acceptFallback;const showPlaceholder=!!props.placeholder&&!model.value?.length&&(isFocused.value||props.persistentPlaceholder||!props.label);return createVNode(VInput,mergeProps({"ref":vInputRef,"modelValue":props.multiple?model.value:model.value[0],"class":[`v-file-input`,{"v-file-input--chips":!!props.chips,"v-file-input--dragging":isDragging.value,"v-file-input--hide":props.hideInput,"v-input--plain-underlined":isPlainOrUnderlined.value},props.class],"style":props.style,"onClick:prepend":onClickPrepend},rootAttrs,inputProps,{"centerAffix":!isPlainOrUnderlined.value,"focused":isFocused.value,"detailsActive":detailsActive,"indentDetails":props.indentDetails??!isPlainOrUnderlined.value}),{...slots,default:({id,isDisabled,isDirty,isReadonly,isValid,hasDetails})=>createVNode(VField,mergeProps({"ref":vFieldRef,"prependIcon":props.prependIcon,"onMousedown":onControlMousedown,"onClick":onControlClick,"onClick:prependInner":props[`onClick:prependInner`],"onClick:appendInner":props[`onClick:appendInner`]},fieldProps,{"id":id.value,"active":isActive.value||isDirty.value,"dirty":isDirty.value||props.dirty,"disabled":isDisabled.value,"focused":isFocused.value,"details":hasDetails.value,"error":isValid.value===false,"onDragleave":onDragleave,"onDragover":onDragover,"onDrop":onDrop}),{...slots,default:({props:{class:fieldClass,...slotProps},controlRef})=>createBaseVNode(Fragment,null,[createBaseVNode(`input`,mergeProps({"ref":val=>inputRef.value=controlRef.value=val,"type":`file`,"accept":inputAccept,"readonly":isReadonly.value,"disabled":isDisabled.value,"multiple":props.multiple,"name":props.name,"onClick":e=>{e.stopPropagation();if(isReadonly.value)e.preventDefault();onFocus()},"onChange":onFileSelection,"onFocus":onFocus,"onBlur":blur,"onPaste":onPaste},slotProps,inputAttrs),null),showPlaceholder?createBaseVNode(`input`,{"class":normalizeClass(fieldClass),"inert":true,"placeholder":props.placeholder,"readonly":true,"form":``,"type":`text`},null):createBaseVNode(`div`,{"class":normalizeClass(fieldClass)},[!!model.value?.length&&!props.hideInput&&(slots.selection?slots.selection({fileNames:fileNames.value,totalBytes:totalBytes.value,totalBytesReadable:totalBytesReadable.value}):props.chips?fileNames.value.map(text=>createVNode(VChip,{"key":text,"size":chipDefaults.value?.size??`small`,"text":text},null)):fileNames.value.join(`, `))])])}),details:hasDetails?slotProps=>createBaseVNode(Fragment,null,[slots.details?.(slotProps),hasCounter&&createBaseVNode(Fragment,null,[createBaseVNode(`span`,null,null),createVNode(VCounter,{"active":counterActive,"value":counterValue.value,"disabled":props.disabled},slots.counter)])]):void 0})});return forwardRefs({},vInputRef,vFieldRef,inputRef)}});var DESTINATION_ICONS=Object.freeze({"android-sideload":mdiCellphoneArrowDown,"github-releases":mdiGithub,npm:mdiNpm,pypi:mdiLanguagePython});var DESTINATION_ACCENTS=Object.freeze({"android-sideload":`success`,"github-releases":`primary`,npm:`error`,pypi:`info`});var STATUS=Object.freeze({succeeded:{label:`Published`,color:`success`,icon:mdiCheckCircle},proven:{label:`Published`,color:`success`,icon:mdiCheckCircle},checked:{label:`Would publish`,color:`success`,icon:mdiCheckCircle},done:{label:`Done`,color:`success`,icon:mdiCheckCircle},passed:{label:`Checks passed`,color:`success`,icon:mdiCheckCircle},partial:{label:`Partly published`,color:`warning`,icon:mdiAlertCircle},interrupted:{label:`Interrupted`,color:`warning`,icon:mdiAlertCircle},unconfigured:{label:`No checks`,color:`warning`,icon:mdiAlertCircle},failed:{label:`Failed`,color:`error`,icon:mdiCloseCircle},running:{label:`Running`,color:`primary`,icon:mdiProgressClock},pending:{label:`Waiting`,color:`default`,icon:mdiCircleOutline},skipped:{label:`Skipped`,color:`default`,icon:mdiMinusCircleOutline}});function statusInfo(status){return STATUS[status]||{label:String(status||`Unknown`),color:`default`,icon:`M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z`}}function destinationIcon(id){return DESTINATION_ICONS[id]||`M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z`}function destinationAccent(id){return DESTINATION_ACCENTS[id]||`primary`}function shortCommit(commit){return String(commit||``).slice(0,7)}function relativeTime(value,now=Date.now()){const at=Date.parse(value||``);if(Number.isNaN(at))return``;const seconds=Math.round((now-at)/1e3);if(seconds<45)return`just now`;const minutes=Math.round(seconds/60);if(minutes<60)return`${minutes} min ago`;const hours=Math.round(minutes/60);if(hours<24)return`${hours} h ago`;const days=Math.round(hours/24);if(days<30)return`${days} d ago`;return new Date(at).toLocaleDateString()}function proofLine(proof={}){if(!proof||typeof proof!==`object`)return``;if(proof.url)return proof.url;if(proof.integrity)return`${String(proof.integrity).slice(0,19)}…`;const hash=proof.sha256||proof.checksum;if(hash)return`${String(hash).replace(/^sha256:/u,`sha256 `).slice(0,19)}…`;return``}function hostOf(address){try{const url=new URL(String(address||``));return`${url.host}${url.pathname.replace(/\/+$/u,``)}`}catch{return String(address||``)}}function publicPageUrl(destination,{package:name,version,settings={}}={}){if(!name)return``;if(destination===`npm`&&/(^|\.)npmjs\.org$/u.test(hostOf(settings.registry||`https://registry.npmjs.org/`).split(`/`)[0]))return`https://www.npmjs.com/package/${name}${version?`/v/${version}`:``}`;if(destination===`pypi`&&[`pypi`,`testpypi`].includes(settings.instance))return`https://${settings.instance===`testpypi`?`test.`:``}pypi.org/project/${name}/${version?`${version}/`:``}`;return``}function destinationGap(entry,{packages=[],baseline={}}={}){if(!packages.some(candidate=>entry.packers.includes(candidate.packer))){if(entry.id===`android-sideload`)return`Needs an app package in Packaging`;if(entry.id===`npm`)return`Needs a JavaScript package in Packaging`;if(entry.id===`pypi`)return`Needs a Python package in Packaging`;return`Needs a package in Packaging`}if(entry.id===`github-releases`&&!baseline.remote?.githubRepository)return`Needs this project's repository on GitHub`;return``}function lastFailure(target,releases=[]){const since=Date.parse(target?.latest?.at||``)||0;for(const release of releases){if(release.kind!==`release`||release.status===`running`)continue;if((Date.parse(release.finishedAt||release.createdAt)||0)<=since)return null;const outcome=release.targets?.[target.id];const step=(release.steps||[]).find(entry=>entry.id===`publish:${target.id}`);if(outcome?.status===`proven`||outcome?.status===`succeeded`)return null;if(!outcome&&!step)continue;if(outcome?.error||[`failed`,`partial`,`interrupted`].includes(release.status))return{release,message:outcome?.error?.message||release.error?.message||statusInfo(release.status).label}}return null}function packageLabeller(packages=[]){const labels=Object.fromEntries(packages.map(entry=>[entry.id,entry.label||entry.id]));return id=>labels[id]||id}function stepLabel(stepId,targetsById={},label=id=>id){const[kind,...rest]=String(stepId||``).split(`:`);const subject=rest.join(`:`);if(kind===`tag`)return`Tag ${subject}`;if(kind===`build`)return`Build ${label(subject)}`;const target=targetsById[subject];const name=target?`${label(target.package)} → ${target.destinationLabel||target.destination}`:subject;return kind===`dry-run`?`Dry run ${name}`:`Publish ${name}`}var _hoisted_1$13={key:0,class:`publish-destinations`,role:`list`};var _hoisted_2$11=[`disabled`,`onClick`];var _hoisted_3$9={class:`publish-destination__icon`};var _hoisted_4$9={class:`publish-destination__copy`};var _hoisted_5$7={class:`publish-destination__meta`};var _hoisted_6$7={key:0,class:`publish-destination__missing`};var _hoisted_7$7={key:1,class:`publish-add-form`};var _hoisted_8$6={class:`publish-add-needs`,"aria-label":`What it needs`};var _sfc_main$14={__name:`AddTargetDialog`,props:{modelValue:{type:Boolean,default:false},state:{type:Object,default:null},preset:{type:String,default:``},call:{type:Function,required:true}},emits:[`update:modelValue`,`add-account`,`added`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const destinationId=ref(``);const packageId=ref(``);const accountId=ref(``);const channel=ref(``);const error=ref(``);const saving=ref(false);const destinations=computed(()=>(props.state?.destinations||[]).map(entry=>({...entry,accountKind:(props.state?.accountKinds||[]).find(kind=>kind.destination===entry.id)||null})));const chosen=computed(()=>destinations.value.find(entry=>entry.id===destinationId.value)||null);const packages=computed(()=>(props.state?.packaging?.packages||[]).filter(entry=>chosen.value?.packers.includes(entry.packer)));const accounts=computed(()=>(props.state?.accounts||[]).filter(entry=>entry.kind===chosen.value?.accountKind?.id));const needsAccount=computed(()=>Boolean(chosen.value?.accountKind));const canAdd=computed(()=>Boolean(chosen.value&&packageId.value&&(!needsAccount.value||accountId.value)));const packageLine=entry=>`${entry.packer}${entry.version?` · ${entry.version}`:``}`;const missing=entry=>destinationGap(entry,{packages:props.state?.packaging?.packages||[],baseline:props.state?.baseline||{}});const ordered=computed(()=>[...destinations.value].sort((left,right)=>Number(Boolean(missing(left)))-Number(Boolean(missing(right)))));const needs=computed(()=>(chosen.value?.needs||[]).map((text,index)=>{let done=false;if(index===0)done=packages.value.length>0;else if(/account|sign-in/iu.test(text))done=!needsAccount.value||accounts.value.length>0;return{text,done}}));watch(()=>props.modelValue,open=>{if(!open)return;error.value=``;pick(props.preset||``)});watch(accounts,list=>{if(!list.some(entry=>entry.id===accountId.value))accountId.value=list[0]?.id||``});function pick(id){destinationId.value=id;packageId.value=packages.value.length===1?packages.value[0].id:``;accountId.value=accounts.value[0]?.id||``;channel.value=``}async function add(){if(!canAdd.value||saving.value)return;saving.value=true;error.value=``;try{const body={destination:destinationId.value,package:packageId.value,...accountId.value?{account:accountId.value}:{},...channel.value.trim()?{channel:channel.value.trim()}:{}};const answer=await props.call(`/targets`,{body});emit(`added`,answer.target);emit(`update:modelValue`,false)}catch(failure){error.value=failure.message}finally{saving.value=false}}return(_ctx,_cache)=>{return openBlock(),createBlock(VDialog,{"model-value":__props.modelValue,"max-width":`760`,scrollable:``,"onUpdate:modelValue":_cache[6]||(_cache[6]=$event=>emit(`update:modelValue`,$event))},{default:withCtx(()=>[createVNode(VCard,{class:`publish-dialog`,rounded:`xl`},{default:withCtx(()=>[createVNode(VCardTitle,{class:`publish-dialog__title`},{default:withCtx(()=>[chosen.value?(openBlock(),createBlock(VBtn,{key:0,icon:unref(mdiArrowLeft),"aria-label":`Choose another destination`,size:`small`,variant:`text`,onClick:_cache[0]||(_cache[0]=$event=>pick(``))},null,8,[`icon`])):createCommentVNode(``,true),createTextVNode(` `+toDisplayString(chosen.value?`Add ${chosen.value.label}`:`Where should it go?`),1)]),_:1}),createVNode(VCardText,null,{default:withCtx(()=>[!chosen.value?(openBlock(),createElementBlock(`div`,_hoisted_1$13,[(openBlock(true),createElementBlock(Fragment,null,renderList(ordered.value,entry=>{return openBlock(),createElementBlock(`button`,{key:entry.id,class:normalizeClass([`publish-destination--${unref(destinationAccent)(entry.id)}`,`publish-destination`]),disabled:Boolean(missing(entry)),role:`listitem`,type:`button`,onClick:$event=>pick(entry.id)},[createBaseVNode(`span`,_hoisted_3$9,[createVNode(VIcon,{icon:unref(destinationIcon)(entry.id),size:`24`},null,8,[`icon`])]),createBaseVNode(`span`,_hoisted_4$9,[createBaseVNode(`strong`,null,[createTextVNode(toDisplayString(entry.label)+` `,1),entry.zeroAccount&&entry.id!==`github-releases`?(openBlock(),createBlock(VChip,{key:0,class:`ml-1`,color:`success`,size:`x-small`,variant:`tonal`},{default:withCtx(()=>[..._cache[7]||(_cache[7]=[createTextVNode(`No account`,-1)])]),_:1})):createCommentVNode(``,true)]),createBaseVNode(`span`,null,toDisplayString(entry.summary),1),createBaseVNode(`span`,_hoisted_5$7,[createBaseVNode(`span`,null,[createVNode(VIcon,{icon:unref(mdiClockOutline),size:`14`},null,8,[`icon`]),createTextVNode(` `+toDisplayString(entry.repeat)+` after setup`,1)]),createBaseVNode(`span`,null,[createVNode(VIcon,{icon:unref(mdiCurrencyUsd),size:`14`},null,8,[`icon`]),createTextVNode(` `+toDisplayString(entry.cost),1)])]),missing(entry)?(openBlock(),createElementBlock(`span`,_hoisted_6$7,[createVNode(VIcon,{icon:unref(mdiAlertOutline),size:`14`},null,8,[`icon`]),createTextVNode(` `+toDisplayString(missing(entry))+`.`,1)])):createCommentVNode(``,true)])],10,_hoisted_2$11)}),128))])):(openBlock(),createElementBlock(`div`,_hoisted_7$7,[createBaseVNode(`section`,_hoisted_8$6,[_cache[8]||(_cache[8]=createBaseVNode(`h3`,null,`What it needs`,-1)),createBaseVNode(`ul`,null,[(openBlock(true),createElementBlock(Fragment,null,renderList(needs.value,need=>{return openBlock(),createElementBlock(`li`,{key:need.text,class:normalizeClass({"is-done":need.done})},[createVNode(VIcon,{icon:need.done?unref(mdiCheckCircle):unref(mdiCircleOutline),size:`16`},null,8,[`icon`]),createTextVNode(` `+toDisplayString(need.text),1)],2)}),128))]),createBaseVNode(`p`,null,`First time: `+toDisplayString(chosen.value.firstTime)+`. Later: `+toDisplayString(chosen.value.repeat)+`. `+toDisplayString(chosen.value.cost)+`.`,1)]),createVNode(VSelect,{modelValue:packageId.value,"onUpdate:modelValue":_cache[1]||(_cache[1]=$event=>packageId.value=$event),items:packages.value,"item-title":`label`,"item-value":`id`,label:`Package`,variant:`outlined`},{item:withCtx(({props:item,item:entry})=>[createVNode(VListItem,mergeProps(item,{subtitle:packageLine(entry.raw||entry)}),null,16,[`subtitle`])]),_:1},8,[`modelValue`,`items`]),needsAccount.value?(openBlock(),createElementBlock(Fragment,{key:0},[accounts.value.length?(openBlock(),createBlock(VSelect,{key:0,modelValue:accountId.value,"onUpdate:modelValue":_cache[2]||(_cache[2]=$event=>accountId.value=$event),items:accounts.value,"item-title":`label`,"item-value":`id`,label:`${chosen.value.accountKind.label} account`,variant:`outlined`},null,8,[`modelValue`,`items`,`label`])):(openBlock(),createBlock(VAlert,{key:1,class:`mb-4`,type:`info`,variant:`tonal`},{append:withCtx(()=>[createVNode(VBtn,{"prepend-icon":unref(mdiPlus),rounded:`pill`,size:`small`,variant:`flat`,color:`primary`,onClick:_cache[3]||(_cache[3]=$event=>emit(`add-account`,chosen.value.accountKind.id))},{default:withCtx(()=>[..._cache[9]||(_cache[9]=[createTextVNode(`Add account`,-1)])]),_:1},8,[`prepend-icon`])]),default:withCtx(()=>[createTextVNode(` Add your `+toDisplayString(chosen.value.accountKind.label)+` account to your publishing keys first. `,1)]),_:1}))],64)):createCommentVNode(``,true),chosen.value.id===`npm`?(openBlock(),createBlock(VTextField,{key:1,modelValue:channel.value,"onUpdate:modelValue":_cache[4]||(_cache[4]=$event=>channel.value=$event),hint:`Leave empty for latest. Use next or beta for previews.`,label:`Tag (optional)`,"persistent-hint":``,placeholder:`latest`,variant:`outlined`},null,8,[`modelValue`])):createCommentVNode(``,true),error.value?(openBlock(),createBlock(VAlert,{key:2,class:`mt-3`,type:`error`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(error.value),1)]),_:1})):createCommentVNode(``,true)]))]),_:1}),createVNode(VCardActions,{class:`publish-dialog__actions`},{default:withCtx(()=>[createVNode(VSpacer),createVNode(VBtn,{rounded:`pill`,variant:`text`,onClick:_cache[5]||(_cache[5]=$event=>emit(`update:modelValue`,false))},{default:withCtx(()=>[..._cache[10]||(_cache[10]=[createTextVNode(`Cancel`,-1)])]),_:1}),chosen.value?(openBlock(),createBlock(VBtn,{key:0,disabled:!canAdd.value,loading:saving.value,color:`primary`,rounded:`pill`,variant:`flat`,onClick:add},{default:withCtx(()=>[..._cache[11]||(_cache[11]=[createTextVNode(`Add target`,-1)])]),_:1},8,[`disabled`,`loading`])):createCommentVNode(``,true)]),_:1})]),_:1})]),_:1},8,[`model-value`])}}};var AddTargetDialog_default=_plugin_vue_export_helper_default(_sfc_main$14,[[`__scopeId`,`data-v-d387eb0c`]]);var _hoisted_1$12={class:`publish-licence__meta`};var _hoisted_2$10=[`href`];var _hoisted_3$8={class:`publish-licence__text`,tabindex:`0`};var _hoisted_4$8={class:`publish-licence__packages`};var _sfc_main$13={__name:`AndroidSdkLicenceDialog`,props:{modelValue:{type:Boolean,default:false},state:{type:Object,default:null},call:{type:Function,required:true}},emits:[`update:modelValue`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const licence=ref(null);const agreed=ref(false);const busy=ref(false);const error=ref(``);const accepted=computed(()=>{const record=props.state?.toolchains?.androidLicence;return Boolean(record&&licence.value&&record.hash===licence.value.hash)});watch(()=>props.modelValue,async open=>{if(!open)return;agreed.value=false;error.value=``;if(licence.value)return;busy.value=true;try{licence.value=(await props.call(`/toolchains/android/licence`,{method:`GET`,refreshAfter:false})).licence}catch(failure){error.value=failure.message}finally{busy.value=false}});async function install(){busy.value=true;error.value=``;try{if(!accepted.value)await props.call(`/toolchains/android/licence`,{body:{id:licence.value.id,hash:licence.value.hash},refreshAfter:false});await props.call(`/toolchains/android`);emit(`update:modelValue`,false)}catch(failure){error.value=failure.message}finally{busy.value=false}}return(_ctx,_cache)=>{return openBlock(),createBlock(VDialog,{"model-value":__props.modelValue,"max-width":`680`,scrollable:``,"onUpdate:modelValue":_cache[2]||(_cache[2]=$event=>emit(`update:modelValue`,$event))},{default:withCtx(()=>[createVNode(VCard,{rounded:`xl`},{default:withCtx(()=>[createVNode(VCardTitle,{class:`publish-dialog__title`},{default:withCtx(()=>[createVNode(VIcon,{icon:unref(mdiAndroid),class:`mr-2`,color:`success`},null,8,[`icon`]),_cache[3]||(_cache[3]=createTextVNode(`Android build tools`,-1))]),_:1}),createVNode(VCardText,{class:`publish-licence`},{default:withCtx(()=>[_cache[6]||(_cache[6]=createBaseVNode(`p`,{class:`publish-licence__lead`},` Vibe64 downloads Java 21 and Google's Android SDK (about 1.9 GB, once) into your user cache. Google requires you to accept its licence first. `,-1)),busy.value&&!licence.value?(openBlock(),createBlock(VSkeletonLoader,{key:0,type:`paragraph, paragraph`})):licence.value?(openBlock(),createElementBlock(Fragment,{key:1},[createBaseVNode(`div`,_hoisted_1$12,[createBaseVNode(`span`,null,toDisplayString(licence.value.id),1),createBaseVNode(`a`,{href:licence.value.termsUrl,rel:`noopener`,target:`_blank`},[_cache[4]||(_cache[4]=createTextVNode(`Google's terms `,-1)),createVNode(VIcon,{icon:unref(mdiOpenInNew),size:`14`},null,8,[`icon`])],8,_hoisted_2$10)]),createBaseVNode(`pre`,_hoisted_3$8,toDisplayString(licence.value.text),1),createBaseVNode(`p`,_hoisted_4$8,`Downloads: `+toDisplayString(licence.value.packages.join(`, `)),1),!accepted.value?(openBlock(),createBlock(VCheckbox,{key:0,modelValue:agreed.value,"onUpdate:modelValue":_cache[0]||(_cache[0]=$event=>agreed.value=$event),density:`compact`,"hide-details":``,label:`I have read and accept the Android Software Development Kit License Agreement.`},null,8,[`modelValue`])):(openBlock(),createBlock(VAlert,{key:1,color:`success`,density:`compact`,variant:`tonal`},{default:withCtx(()=>[..._cache[5]||(_cache[5]=[createTextVNode(`You accepted this licence on this computer.`,-1)])]),_:1}))],64)):createCommentVNode(``,true),error.value?(openBlock(),createBlock(VAlert,{key:2,class:`mt-3`,type:`error`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(error.value),1)]),_:1})):createCommentVNode(``,true)]),_:1}),createVNode(VCardActions,{class:`publish-dialog__actions`},{default:withCtx(()=>[createVNode(VSpacer),createVNode(VBtn,{rounded:`pill`,variant:`text`,onClick:_cache[1]||(_cache[1]=$event=>emit(`update:modelValue`,false))},{default:withCtx(()=>[..._cache[7]||(_cache[7]=[createTextVNode(`Cancel`,-1)])]),_:1}),createVNode(VBtn,{disabled:!licence.value||!(accepted.value||agreed.value),loading:busy.value&&Boolean(licence.value),"prepend-icon":unref(mdiDownload),color:`primary`,rounded:`pill`,variant:`flat`,onClick:install},{default:withCtx(()=>[createTextVNode(toDisplayString(accepted.value?`Download tools`:`Accept and download`),1)]),_:1},8,[`disabled`,`loading`,`prepend-icon`])]),_:1})]),_:1})]),_:1},8,[`model-value`])}}};var AndroidSdkLicenceDialog_default=_plugin_vue_export_helper_default(_sfc_main$13,[[`__scopeId`,`data-v-a2740dee`]]);var _hoisted_1$11={class:`publish-confirm__hero`};var _hoisted_2$9={class:`publish-confirm__badge`};var _hoisted_3$7={key:0};var _hoisted_4$7={key:1};var _hoisted_5$6={class:`publish-confirm__meta`};var _hoisted_6$6={class:`publish-confirm__plan`};var _hoisted_7$6={class:`publish-confirm__targets`};var _hoisted_8$5={class:`publish-confirm__where`};var _hoisted_9$5={class:`publish-confirm__version`};var _sfc_main$12={__name:`ConfirmPublishDialog`,props:{modelValue:{type:Boolean,default:false},plan:{type:Object,default:null},targetIds:{type:Array,default:()=>[]},acknowledged:{type:Array,default:()=>[]},state:{type:Object,default:null},requestedBy:{type:String,default:``},call:{type:Function,required:true}},emits:[`update:modelValue`,`started`,`plan-changed`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const passphrase=ref(``);const working=ref(false);const error=ref(``);const locked=computed(()=>!props.state?.keys?.unlocked);const needsKeys=computed(()=>Boolean(props.state?.keys?.exists));const labels=computed(()=>Object.fromEntries((props.state?.destinations||[]).map(entry=>[entry.id,entry.label])));const packageLabel=computed(()=>packageLabeller(props.state?.packaging?.packages||[]));const versionOf=packageId=>props.plan?.packages?.find(entry=>entry.id===packageId)?.version||shortCommit(props.plan?.savedCommit);const count=computed(()=>props.plan?.targets?.length||0);watch(()=>props.modelValue,open=>{if(open){passphrase.value=``;error.value=``}});async function publish(){if(!props.plan||working.value)return;working.value=true;error.value=``;try{if(needsKeys.value&&locked.value){await props.call(`/keys/unlock`,{body:{passphrase:passphrase.value},refreshAfter:false});passphrase.value=``}const body={planHash:props.plan.planHash,targetIds:props.targetIds,acknowledged:props.acknowledged};const{token}=await props.call(`/confirmation`,{body,refreshAfter:false});const started=await props.call(`/releases`,{body:{...body,token}});emit(`started`,started.releaseId);emit(`update:modelValue`,false)}catch(failure){error.value=failure.message;if(failure.code===`VIBE64_PUBLISH_CONFIRMATION_PLAN_CHANGED`)emit(`plan-changed`)}finally{working.value=false}}return(_ctx,_cache)=>{return openBlock(),createBlock(VDialog,{"model-value":__props.modelValue,"max-width":`560`,persistent:``,"onUpdate:modelValue":_cache[2]||(_cache[2]=$event=>emit(`update:modelValue`,$event))},{default:withCtx(()=>[__props.plan?(openBlock(),createBlock(VCard,{key:0,class:`publish-confirm`,rounded:`xl`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$11,[createBaseVNode(`span`,_hoisted_2$9,[createVNode(VIcon,{icon:unref(mdiRocketLaunchOutline),size:`28`},null,8,[`icon`])]),createBaseVNode(`h2`,null,`Publish to `+toDisplayString(count.value)+` `+toDisplayString(count.value===1?`place`:`places`)+`?`,1),__props.requestedBy===`assistant`?(openBlock(),createElementBlock(`p`,_hoisted_3$7,`Your Colleague asked for this release. Nothing goes out until you press Publish.`)):(openBlock(),createElementBlock(`p`,_hoisted_4$7,`People will be able to install these versions. Published versions cannot be taken back.`))]),createVNode(VCardText,{class:`publish-confirm__body`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_5$6,[createBaseVNode(`span`,null,[createVNode(VIcon,{icon:unref(mdiSourceCommit),size:`16`},null,8,[`icon`]),createTextVNode(` `+toDisplayString(unref(shortCommit)(__props.plan.savedCommit)),1)]),(openBlock(true),createElementBlock(Fragment,null,renderList(__props.plan.tags,tag=>{return openBlock(),createElementBlock(`span`,{key:tag},[createVNode(VIcon,{icon:unref(mdiTagOutline),size:`16`},null,8,[`icon`]),createTextVNode(` `+toDisplayString(tag),1)])}),128)),createBaseVNode(`span`,_hoisted_6$6,`Plan `+toDisplayString(__props.plan.planId),1)]),createBaseVNode(`ul`,_hoisted_7$6,[(openBlock(true),createElementBlock(Fragment,null,renderList(__props.plan.targets,target=>{return openBlock(),createElementBlock(`li`,{key:target.id,class:normalizeClass(`is-${unref(destinationAccent)(target.destination)}`)},[createVNode(VIcon,{icon:unref(destinationIcon)(target.destination),size:`20`},null,8,[`icon`]),createBaseVNode(`span`,_hoisted_8$5,[createBaseVNode(`strong`,null,toDisplayString(labels.value[target.destination]||target.destination),1),createBaseVNode(`span`,null,[createTextVNode(toDisplayString(packageLabel.value(target.package)),1),target.channel?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(` · `+toDisplayString(target.channel),1)],64)):createCommentVNode(``,true)])]),createBaseVNode(`span`,_hoisted_9$5,toDisplayString(versionOf(target.package)),1)],2)}),128))]),needsKeys.value&&locked.value?(openBlock(),createBlock(VTextField,{key:0,modelValue:passphrase.value,"onUpdate:modelValue":_cache[0]||(_cache[0]=$event=>passphrase.value=$event),"prepend-inner-icon":unref(mdiLockOutline),autocomplete:`current-password`,class:`mt-4`,"hide-details":`auto`,hint:`Your keys stay unlocked for 15 minutes.`,label:`Publishing keys passphrase`,"persistent-hint":``,type:`password`,variant:`outlined`,onKeydown:withKeys(publish,[`enter`])},null,8,[`modelValue`,`prepend-inner-icon`])):createCommentVNode(``,true),error.value?(openBlock(),createBlock(VAlert,{key:1,class:`mt-4`,type:`error`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(error.value),1)]),_:1})):createCommentVNode(``,true)]),_:1}),createVNode(VCardActions,{class:`publish-dialog__actions`},{default:withCtx(()=>[createVNode(VSpacer),createVNode(VBtn,{disabled:working.value,rounded:`pill`,variant:`text`,onClick:_cache[1]||(_cache[1]=$event=>emit(`update:modelValue`,false))},{default:withCtx(()=>[..._cache[3]||(_cache[3]=[createTextVNode(`Not now`,-1)])]),_:1},8,[`disabled`]),createVNode(VBtn,{disabled:needsKeys.value&&locked.value&&passphrase.value.length<12,loading:working.value,"prepend-icon":unref(mdiRocketLaunchOutline),color:`primary`,"data-test":`confirm-publish`,rounded:`pill`,size:`large`,variant:`flat`,onClick:publish},{default:withCtx(()=>[..._cache[4]||(_cache[4]=[createTextVNode(` Publish `,-1)])]),_:1},8,[`disabled`,`loading`,`prepend-icon`])]),_:1})]),_:1})):createCommentVNode(``,true)]),_:1},8,[`model-value`])}}};var ConfirmPublishDialog_default=_plugin_vue_export_helper_default(_sfc_main$12,[[`__scopeId`,`data-v-5c444628`]]);var LEVELS=Object.freeze({L:Object.freeze({ordinal:0,formatBits:1}),M:Object.freeze({ordinal:1,formatBits:0}),Q:Object.freeze({ordinal:2,formatBits:3}),H:Object.freeze({ordinal:3,formatBits:2})});var ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]];var NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];var PENALTY_N1=3;var PENALTY_N2=3;var PENALTY_N3=40;var PENALTY_N4=10;function bit(value,index){return(value>>>index&1)!==0}function numRawDataModules(version){let result=(16*version+128)*version+64;if(version>=2){const alignments=Math.floor(version/7)+2;result-=(25*alignments-10)*alignments-55;if(version>=7)result-=36}return result}function numDataCodewords(version,level){return Math.floor(numRawDataModules(version)/8)-ECC_CODEWORDS_PER_BLOCK[level.ordinal][version]*NUM_ERROR_CORRECTION_BLOCKS[level.ordinal][version]}function multiply(x,y){let z=0;for(let index=7;index>=0;index-=1){z=z<<1^(z>>>7)*285;z^=(y>>>index&1)*x}return z}function reedSolomonDivisor(degree){const result=new Array(degree).fill(0);result[degree-1]=1;let root=1;for(let index=0;index<degree;index+=1){for(let position=0;position<result.length;position+=1){result[position]=multiply(result[position],root);if(position+1<result.length)result[position]^=result[position+1]}root=multiply(root,2)}return result}function reedSolomonRemainder(data,divisor){const result=divisor.map(()=>0);for(const byte of data){const factor=byte^result.shift();result.push(0);divisor.forEach((coefficient,index)=>{result[index]^=multiply(coefficient,factor)})}return result}function alignmentPositions(version){if(version===1)return[];const count=Math.floor(version/7)+2;const step=Math.floor((version*8+count*3+5)/(count*4-4))*2;const result=[6];for(let position=version*4+10;result.length<count;position-=step)result.splice(1,0,position);return result}function encodeSegments(bytes,level){for(let version=1;version<=40;version+=1){const capacityBits=numDataCodewords(version,level)*8;const countBits=version<10?8:16;if(4+countBits+bytes.length*8>capacityBits)continue;const bits=[];const append=(value,length)=>{for(let index=length-1;index>=0;index-=1)bits.push(value>>>index&1)};append(4,4);append(bytes.length,countBits);for(const byte of bytes)append(byte,8);append(0,Math.min(4,capacityBits-bits.length));append(0,(8-bits.length%8)%8);for(let pad=236;bits.length<capacityBits;pad^=253)append(pad,8);const codewords=[];for(let index=0;index<bits.length;index+=8)codewords.push(bits.slice(index,index+8).reduce((value,current)=>value<<1|current,0));return{version,codewords}}throw new RangeError(`The text is too long for a QR code.`)}function interleave(data,version,level){const blockCount=NUM_ERROR_CORRECTION_BLOCKS[level.ordinal][version];const eccLength=ECC_CODEWORDS_PER_BLOCK[level.ordinal][version];const rawCodewords=Math.floor(numRawDataModules(version)/8);const shortBlocks=blockCount-rawCodewords%blockCount;const shortLength=Math.floor(rawCodewords/blockCount);const divisor=reedSolomonDivisor(eccLength);const blocks=[];for(let index=0,offset=0;index<blockCount;index+=1){const dataLength=shortLength-eccLength+(index<shortBlocks?0:1);const block=data.slice(offset,offset+dataLength);offset+=dataLength;const ecc=reedSolomonRemainder(block,divisor);if(index<shortBlocks)block.push(0);blocks.push(block.concat(ecc))}const result=[];for(let column=0;column<blocks[0].length;column+=1)blocks.forEach((block,index)=>{if(column!==shortLength-eccLength||index>=shortBlocks)result.push(block[column])});return result}var Matrix=class{constructor(version){this.size=version*4+17;this.modules=Array.from({length:this.size},()=>new Array(this.size).fill(false));this.reserved=Array.from({length:this.size},()=>new Array(this.size).fill(false))}set(x,y,dark){this.modules[y][x]=dark;this.reserved[y][x]=true}};function drawFinder(matrix,x,y){for(let dy=-4;dy<=4;dy+=1)for(let dx=-4;dx<=4;dx+=1){const distance=Math.max(Math.abs(dx),Math.abs(dy));const xx=x+dx;const yy=y+dy;if(xx>=0&&xx<matrix.size&&yy>=0&&yy<matrix.size)matrix.set(xx,yy,distance!==2&&distance!==4)}}function drawFormatBits(matrix,level,mask){const data=level.formatBits<<3|mask;let remainder=data;for(let index=0;index<10;index+=1)remainder=remainder<<1^(remainder>>>9)*1335;const bits=(data<<10|remainder)^21522;for(let index=0;index<=5;index+=1)matrix.set(8,index,bit(bits,index));matrix.set(8,7,bit(bits,6));matrix.set(8,8,bit(bits,7));matrix.set(7,8,bit(bits,8));for(let index=9;index<15;index+=1)matrix.set(14-index,8,bit(bits,index));for(let index=0;index<8;index+=1)matrix.set(matrix.size-1-index,8,bit(bits,index));for(let index=8;index<15;index+=1)matrix.set(8,matrix.size-15+index,bit(bits,index));matrix.set(8,matrix.size-8,true)}function drawVersion(matrix,version){if(version<7)return;let remainder=version;for(let index=0;index<12;index+=1)remainder=remainder<<1^(remainder>>>11)*7973;const bits=version<<12|remainder;for(let index=0;index<18;index+=1){const dark=bit(bits,index);const a=matrix.size-11+index%3;const b=Math.floor(index/3);matrix.set(a,b,dark);matrix.set(b,a,dark)}}function drawFunctionPatterns(matrix,version,level){for(let index=0;index<matrix.size;index+=1){matrix.set(6,index,index%2===0);matrix.set(index,6,index%2===0)}drawFinder(matrix,3,3);drawFinder(matrix,matrix.size-4,3);drawFinder(matrix,3,matrix.size-4);const positions=alignmentPositions(version);const last=positions.length-1;positions.forEach((x,i)=>positions.forEach((y,j)=>{if(i===0&&j===0||i===0&&j===last||i===last&&j===0)return;for(let dy=-2;dy<=2;dy+=1)for(let dx=-2;dx<=2;dx+=1)matrix.set(x+dx,y+dy,Math.max(Math.abs(dx),Math.abs(dy))!==1)}));drawFormatBits(matrix,level,0);drawVersion(matrix,version)}function drawCodewords(matrix,codewords){let index=0;for(let right=matrix.size-1;right>=1;right-=2){if(right===6)right=5;for(let vertical=0;vertical<matrix.size;vertical+=1)for(let column=0;column<2;column+=1){const x=right-column;const y=(right+1&2)===0?matrix.size-1-vertical:vertical;if(!matrix.reserved[y][x]&&index<codewords.length*8){matrix.modules[y][x]=bit(codewords[index>>>3],7-(index&7));index+=1}}}}var MASKS=[(x,y)=>(x+y)%2===0,(x,y)=>y%2===0,x=>x%3===0,(x,y)=>(x+y)%3===0,(x,y)=>(Math.floor(x/3)+Math.floor(y/2))%2===0,(x,y)=>x*y%2+x*y%3===0,(x,y)=>(x*y%2+x*y%3)%2===0,(x,y)=>((x+y)%2+x*y%3)%2===0];function applyMask(matrix,mask){for(let y=0;y<matrix.size;y+=1)for(let x=0;x<matrix.size;x+=1)if(!matrix.reserved[y][x]&&MASKS[mask](x,y))matrix.modules[y][x]=!matrix.modules[y][x]}function finderPenaltyCountPatterns(history){const n=history[1];const core=n>0&&history[2]===n&&history[3]===n*3&&history[4]===n&&history[5]===n;return(core&&history[0]>=n*4&&history[6]>=n?1:0)+(core&&history[6]>=n*4&&history[0]>=n?1:0)}function finderPenaltyAddHistory(length,history,size){history.pop();history.unshift(history[0]===0?length+size:length)}function finderPenaltyTerminate(dark,length,history,size){let run=length;if(dark){finderPenaltyAddHistory(run,history,size);run=0}run+=size;finderPenaltyAddHistory(run,history,size);return finderPenaltyCountPatterns(history)}function penaltyScore(matrix){const{size,modules}=matrix;let result=0;for(const pass of[0,1])for(let a=0;a<size;a+=1){let color=false;let run=0;const history=[0,0,0,0,0,0,0];for(let b=0;b<size;b+=1){const value=pass===0?modules[a][b]:modules[b][a];if(value===color){run+=1;if(run===5)result+=PENALTY_N1;else if(run>5)result+=1}else{finderPenaltyAddHistory(run,history,size);if(!color)result+=finderPenaltyCountPatterns(history)*PENALTY_N3;color=value;run=1}}result+=finderPenaltyTerminate(color,run,history,size)*PENALTY_N3}for(let y=0;y<size-1;y+=1)for(let x=0;x<size-1;x+=1){const color=modules[y][x];if(color===modules[y][x+1]&&color===modules[y+1][x]&&color===modules[y+1][x+1])result+=PENALTY_N2}const dark=modules.reduce((sum,row)=>sum+row.filter(Boolean).length,0);const total=size*size;const k=Math.ceil(Math.abs(dark*20-total*10)/total)-1;return result+k*PENALTY_N4}function qrMatrix(text,{level=`M`}={}){const ecl=LEVELS[level];if(!ecl)throw new RangeError(`QR error correction is L, M, Q or H.`);const{version,codewords}=encodeSegments([...new TextEncoder().encode(String(text))],ecl);const all=interleave(codewords,version,ecl);let best=null;for(let mask=0;mask<8;mask+=1){const matrix=new Matrix(version);drawFunctionPatterns(matrix,version,ecl);drawCodewords(matrix,all);applyMask(matrix,mask);drawFormatBits(matrix,ecl,mask);const score=penaltyScore(matrix);if(!best||score<best.score)best={matrix,score,mask}}return{version,mask:best.mask,size:best.matrix.size,modules:best.matrix.modules}}function escapeAttribute(value){return String(value).replace(/&/gu,`&`).replace(/"/gu,`"`).replace(/</gu,`<`)}function qrSvg(text,{level=`M`,margin=4,dark=`#000000`,light=`#ffffff`,title=``}={}){const{size,modules}=qrMatrix(text,{level});const extent=size+margin*2;const parts=[];modules.forEach((row,y)=>row.forEach((value,x)=>{if(value)parts.push(`M${x+margin},${y+margin}h1v1h-1z`)}));const label=title?`<title>${escapeAttribute(title)}</title>`:``;return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${extent} ${extent}" shape-rendering="crispEdges" role="img"${title?` aria-label="${escapeAttribute(title)}"`:``}>${label}<rect width="100%" height="100%" fill="${escapeAttribute(light)}"/><path d="${parts.join(``)}" fill="${escapeAttribute(dark)}"/></svg>`}var BASE=`/api/vibe64/publishing`;function publishingRequest(suffix=``,{method=`GET`,body}={}){return getHttpWebClient().request(resolveStudioRequestUrl(`${BASE}${suffix}`),{method,...body===void 0?{}:{body}})}function usePublishing({active=()=>true,request=publishingRequest}={}){const state=ref(null);const loading=ref(false);const loadError=ref(``);let timer=null;const busy=computed(()=>Boolean(state.value?.activeRelease||(state.value?.releases||[]).some(release=>release.status===`running`)||state.value?.checks?.status===`running`||state.value?.toolchains?.install?.status===`running`));async function refresh(){if(!active())return state.value;loading.value=true;try{const answer=await request(``);if(answer?.ok===false)throw Object.assign(new Error(answer.error),{code:answer.code});state.value=answer;loadError.value=``}catch(error){loadError.value=error?.message||`Publishing could not load.`}finally{loading.value=false}return state.value}async function call(suffix,{method=`POST`,body,refreshAfter=true}={}){const answer=await request(suffix,{method,body});if(answer?.ok===false)throw Object.assign(new Error(answer.error||`Publishing failed.`),{code:answer.code,details:answer.details});if(refreshAfter)await refresh();return answer}watch(busy,running=>{clearInterval(timer);timer=running?setInterval(refresh,2e3):null},{immediate:true});onBeforeUnmount(()=>clearInterval(timer));return{state,loading,loadError,busy,refresh,call}}function apkDownloadUrl(releaseId,targetId){return resolveStudioRequestUrl(`${BASE}/releases/${encodeURIComponent(releaseId)}/targets/${encodeURIComponent(targetId)}/apk`)}var _hoisted_1$10={class:`publish-install__badge`};var _hoisted_2$8={key:0};var _hoisted_3$6={key:0,class:`publish-install__here`};var _hoisted_4$6={key:1,class:`publish-install__layout`};var _hoisted_5$5=[`innerHTML`];var _hoisted_6$5={class:`publish-install__steps`};var _hoisted_7$5={key:2,class:`publish-install__expiry`};var _sfc_main$11={__name:`InstallOnPhoneDialog`,props:{modelValue:{type:Boolean,default:false},releaseId:{type:String,default:``},targetId:{type:String,default:``},title:{type:String,default:``},version:{type:String,default:``},call:{type:Function,required:true}},emits:[`update:modelValue`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const onThisPhone=typeof navigator!==`undefined`&&/Android/iu.test(navigator.userAgent||``);const showQr=ref(!onThisPhone);const share=ref(null);const busy=ref(false);const error=ref(``);const left=ref(0);let timer=null;const qr=computed(()=>share.value?.url?qrSvg(share.value.url,{level:`M`,margin:2,title:`QR code that downloads the app`}):``);const minutes=computed(()=>`${Math.floor(left.value/60)}:${String(left.value%60).padStart(2,`0`)}`);function tick(){left.value=Math.max(0,Math.round((Date.parse(share.value?.expiresAt||``)-Date.now())/1e3));if(!left.value&&share.value)share.value=null}async function start(){busy.value=true;error.value=``;try{share.value=(await props.call(`/share`,{body:{releaseId:props.releaseId,targetId:props.targetId},refreshAfter:false})).share;tick();clearInterval(timer);timer=setInterval(tick,1e3)}catch(failure){error.value=failure.message}finally{busy.value=false}}async function stop(){clearInterval(timer);if(share.value)await props.call(`/share`,{method:`DELETE`,refreshAfter:false}).catch(()=>{});share.value=null}watch(()=>props.modelValue,open=>open?showQr.value?start():null:stop());function revealQr(){showQr.value=true;start()}onBeforeUnmount(stop);return(_ctx,_cache)=>{return openBlock(),createBlock(VDialog,{"model-value":__props.modelValue,"max-width":`520`,"onUpdate:modelValue":_cache[1]||(_cache[1]=$event=>emit(`update:modelValue`,$event))},{default:withCtx(()=>[createVNode(VCard,{class:`publish-install`,rounded:`xl`},{default:withCtx(()=>[createVNode(VCardTitle,{class:`publish-dialog__title publish-install__title`},{default:withCtx(()=>[createBaseVNode(`span`,_hoisted_1$10,[createVNode(VIcon,{icon:unref(mdiCellphoneArrowDown),size:`22`},null,8,[`icon`])]),createBaseVNode(`span`,null,[createTextVNode(toDisplayString(__props.title?`Install ${__props.title}`:`Install on your phone`)+` `,1),__props.version?(openBlock(),createElementBlock(`small`,_hoisted_2$8,`Version `+toDisplayString(__props.version)+` · signed with your install key`,1)):createCommentVNode(``,true)])]),_:1}),createVNode(VCardText,null,{default:withCtx(()=>[unref(onThisPhone)?(openBlock(),createElementBlock(`div`,_hoisted_3$6,[createVNode(VBtn,{href:unref(apkDownloadUrl)(__props.releaseId,__props.targetId),"prepend-icon":unref(mdiDownload),block:``,color:`success`,rounded:`pill`,size:`large`,variant:`flat`},{default:withCtx(()=>[createTextVNode(` Download `+toDisplayString(__props.title||`the app`),1)]),_:1},8,[`href`,`prepend-icon`]),_cache[3]||(_cache[3]=createBaseVNode(`ol`,{class:`publish-install__steps`},[createBaseVNode(`li`,null,[createBaseVNode(`strong`,null,`Download`),createTextVNode(` it here. Android asks once to allow installs from your browser.`)]),createBaseVNode(`li`,null,[createBaseVNode(`strong`,null,`Install.`),createTextVNode(` Later versions install over it and keep its data.`)])],-1)),!showQr.value?(openBlock(),createBlock(VBtn,{key:0,"prepend-icon":unref(mdiQrcode),rounded:`pill`,variant:`text`,onClick:revealQr},{default:withCtx(()=>[..._cache[2]||(_cache[2]=[createTextVNode(`Show a QR code for another phone`,-1)])]),_:1},8,[`prepend-icon`])):createCommentVNode(``,true)])):createCommentVNode(``,true),showQr.value?(openBlock(),createElementBlock(`div`,_hoisted_4$6,[createBaseVNode(`div`,{class:normalizeClass([`publish-install__qr`,{"is-waiting":!qr.value}])},[qr.value?(openBlock(),createElementBlock(`div`,{key:0,class:`publish-install__code`,innerHTML:qr.value},null,8,_hoisted_5$5)):busy.value?(openBlock(),createBlock(VProgressCircular,{key:1,color:`primary`,indeterminate:``})):(openBlock(),createBlock(VBtn,{key:2,"prepend-icon":unref(mdiWifi),rounded:`pill`,variant:`tonal`,onClick:start},{default:withCtx(()=>[..._cache[4]||(_cache[4]=[createTextVNode(`Share again`,-1)])]),_:1},8,[`prepend-icon`]))],2),createBaseVNode(`ol`,_hoisted_6$5,[_cache[6]||(_cache[6]=createBaseVNode(`li`,null,[createBaseVNode(`strong`,null,`Scan`),createTextVNode(` with your Android phone's camera, on the same Wi-Fi as this computer.`)],-1)),createBaseVNode(`li`,null,[_cache[5]||(_cache[5]=createBaseVNode(`strong`,null,`Download`,-1)),createTextVNode(` `+toDisplayString(__props.title||`the app`)+`. Android asks once to allow installs from your browser.`,1)]),_cache[7]||(_cache[7]=createBaseVNode(`li`,null,[createBaseVNode(`strong`,null,`Install.`),createTextVNode(` Later versions install over it and keep its data.`)],-1))])])):createCommentVNode(``,true),share.value&&showQr.value?(openBlock(),createElementBlock(`p`,_hoisted_7$5,[createVNode(VIcon,{icon:unref(mdiWifi),size:`16`},null,8,[`icon`]),createTextVNode(` Shared on your network for `+toDisplayString(minutes.value)+`. Closing this stops it. `,1)])):createCommentVNode(``,true),error.value?(openBlock(),createBlock(VAlert,{key:3,class:`mt-3`,type:`warning`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(error.value),1)]),_:1})):createCommentVNode(``,true)]),_:1}),createVNode(VCardActions,{class:`publish-dialog__actions`},{default:withCtx(()=>[!unref(onThisPhone)?(openBlock(),createBlock(VBtn,{key:0,href:unref(apkDownloadUrl)(__props.releaseId,__props.targetId),"prepend-icon":unref(mdiDownload),rounded:`pill`,variant:`text`},{default:withCtx(()=>[..._cache[8]||(_cache[8]=[createTextVNode(`Download APK`,-1)])]),_:1},8,[`href`,`prepend-icon`])):createCommentVNode(``,true),createVNode(VSpacer),createVNode(VBtn,{color:`primary`,rounded:`pill`,variant:`flat`,onClick:_cache[0]||(_cache[0]=$event=>emit(`update:modelValue`,false))},{default:withCtx(()=>[..._cache[9]||(_cache[9]=[createTextVNode(`Done`,-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,[`model-value`])}}};var InstallOnPhoneDialog_default=_plugin_vue_export_helper_default(_sfc_main$11,[[`__scopeId`,`data-v-7a3bfa13`]]);var _hoisted_1$9={class:`publish-keys__vault-icon`};var _hoisted_2$7={class:`publish-keys__vault-copy`};var _hoisted_3$5={key:0};var _hoisted_4$5={key:1};var _hoisted_5$4={key:2};var _hoisted_6$4={key:0,class:`publish-keys__form`};var _hoisted_7$4={key:1,class:`publish-keys__inline`};var _hoisted_8$4={class:`publish-keys__heading`};var _hoisted_9$4={key:0,class:`publish-keys__list`};var _hoisted_10$4={key:1,class:`publish-keys__note`};var _hoisted_11$4={key:2,class:`publish-keys__add`};var _hoisted_12$4={key:0,class:`publish-keys__note mb-3`};var _hoisted_13$4={class:`publish-keys__add-actions`};var _hoisted_14$4={key:0};var _hoisted_15$4={key:1};var _hoisted_16$4={key:2,class:`text-medium-emphasis`};var _hoisted_17$4={key:3};var _sfc_main$10={__name:`PublishingAccountsPanel`,props:{modelValue:{type:Boolean,default:false},state:{type:Object,default:null},addKind:{type:String,default:``},call:{type:Function,required:true}},emits:[`update:modelValue`,`recovery-kit`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const KIND_ICONS={npm:mdiNpm,pypi:mdiLanguagePython,github:mdiGithub};const passphrase=ref(``);const repeat=ref(``);const adding=ref(false);const form=ref({kind:`npm`,label:``,address:``,token:``,source:`token`});const replacing=ref(``);const busy=ref(``);const error=ref(``);const keys=computed(()=>props.state?.keys||{});const accounts=computed(()=>props.state?.accounts||[]);const kinds=computed(()=>props.state?.accountKinds||[]);const kind=computed(()=>kinds.value.find(entry=>entry.id===form.value.kind)||null);const installKeys=computed(()=>(keys.value.entries||[]).filter(entry=>entry.kind===`android-sideload-key`));const kitDate=computed(()=>keys.value.recoveryKit?.createdAt||``);const kitStale=computed(()=>(keys.value.entries||[]).some(entry=>!entry.coveredByRecoveryKit));const until=computed(()=>keys.value.unlockedUntil?new Date(keys.value.unlockedUntil).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):``);watch(()=>props.modelValue,open=>{if(!open)return;error.value=``;passphrase.value=``;repeat.value=``;if(props.addKind)startAdding(props.addKind);else adding.value=false});function startAdding(kindId=`npm`){const chosen=kinds.value.find(entry=>entry.id===kindId)||kinds.value[0];form.value={kind:chosen?.id||`npm`,label:``,address:chosen?.defaultAddress||``,token:``,source:`token`};replacing.value=``;adding.value=true}function startReplacing(account){form.value={kind:account.kind,label:account.label,address:account.address||``,token:``,source:account.source===`github-cli`?`github-cli`:`token`};adding.value=true;replacing.value=account.id}watch(()=>form.value.kind,(value,previous)=>{if(value===previous||replacing.value)return;form.value.address=kinds.value.find(entry=>entry.id===value)?.defaultAddress||``;form.value.source=`token`});async function run(name,work){busy.value=name;error.value=``;try{await work()}catch(failure){error.value=failure.message}finally{busy.value=``}}const create=()=>run(`create`,async()=>{if(passphrase.value!==repeat.value)throw new Error(`The two passphrases differ.`);await props.call(`/keys`,{body:{passphrase:passphrase.value}});passphrase.value=repeat.value=``});const unlock=()=>run(`unlock`,async()=>{await props.call(`/keys/unlock`,{body:{passphrase:passphrase.value}});passphrase.value=``});const lock=()=>run(`lock`,()=>props.call(`/keys/lock`));const addAccount=()=>run(`add`,async()=>{const{kind:kindId,label,address,token,source}=form.value;await props.call(`/accounts`,{body:{kind:kindId,label:label||kind.value?.label,address,source,...source===`token`?{token}:{}}});form.value.token=``;adding.value=false;replacing.value=``});const removeAccount=id=>run(`remove:${id}`,()=>props.call(`/accounts/${encodeURIComponent(id)}`,{method:`DELETE`}));return(_ctx,_cache)=>{return openBlock(),createBlock(VDialog,{"model-value":__props.modelValue,"max-width":`640`,scrollable:``,"onUpdate:modelValue":_cache[12]||(_cache[12]=$event=>emit(`update:modelValue`,$event))},{default:withCtx(()=>[createVNode(VCard,{rounded:`xl`},{default:withCtx(()=>[createVNode(VCardTitle,{class:`publish-dialog__title`},{default:withCtx(()=>[..._cache[13]||(_cache[13]=[createTextVNode(`Accounts & keys`,-1)])]),_:1}),createVNode(VCardText,{class:`publish-keys`},{default:withCtx(()=>[createBaseVNode(`section`,{class:normalizeClass([`publish-keys__vault`,{"is-open":keys.value.unlocked}])},[createBaseVNode(`span`,_hoisted_1$9,[createVNode(VIcon,{icon:keys.value.unlocked?unref(mdiLockOpenVariantOutline):unref(mdiShieldKeyOutline),size:`26`},null,8,[`icon`])]),createBaseVNode(`div`,_hoisted_2$7,[_cache[14]||(_cache[14]=createBaseVNode(`strong`,null,`Publishing keys`,-1)),!keys.value.exists?(openBlock(),createElementBlock(`span`,_hoisted_3$5,`One passphrase protects every sign-in and install key Vibe64 keeps for publishing. It stays on this computer, encrypted.`)):keys.value.unlocked?(openBlock(),createElementBlock(`span`,_hoisted_4$5,`Unlocked until `+toDisplayString(until.value)+`. Locks by itself.`,1)):(openBlock(),createElementBlock(`span`,_hoisted_5$4,`Locked. Unlock to add accounts or publish.`))]),keys.value.unlocked?(openBlock(),createBlock(VBtn,{key:0,loading:busy.value===`lock`,"prepend-icon":unref(mdiLockOutline),rounded:`pill`,variant:`tonal`,onClick:lock},{default:withCtx(()=>[..._cache[15]||(_cache[15]=[createTextVNode(`Lock`,-1)])]),_:1},8,[`loading`,`prepend-icon`])):createCommentVNode(``,true)],2),!keys.value.exists?(openBlock(),createElementBlock(`div`,_hoisted_6$4,[createVNode(VTextField,{modelValue:passphrase.value,"onUpdate:modelValue":_cache[0]||(_cache[0]=$event=>passphrase.value=$event),autocomplete:`new-password`,hint:`At least 12 characters. A short sentence works well.`,label:`Passphrase`,"persistent-hint":``,type:`password`,variant:`outlined`},null,8,[`modelValue`]),createVNode(VTextField,{modelValue:repeat.value,"onUpdate:modelValue":_cache[1]||(_cache[1]=$event=>repeat.value=$event),autocomplete:`new-password`,label:`Passphrase again`,type:`password`,variant:`outlined`,onKeydown:withKeys(create,[`enter`])},null,8,[`modelValue`]),_cache[17]||(_cache[17]=createBaseVNode(`p`,{class:`publish-keys__note`},`Vibe64 cannot recover a forgotten passphrase. A recovery kit (its own passphrase) restores your keys on any computer.`,-1)),createVNode(VBtn,{disabled:passphrase.value.length<12||!repeat.value,loading:busy.value===`create`,color:`primary`,rounded:`pill`,variant:`flat`,onClick:create},{default:withCtx(()=>[..._cache[16]||(_cache[16]=[createTextVNode(`Create publishing keys`,-1)])]),_:1},8,[`disabled`,`loading`])])):!keys.value.unlocked?(openBlock(),createElementBlock(`div`,_hoisted_7$4,[createVNode(VTextField,{modelValue:passphrase.value,"onUpdate:modelValue":_cache[2]||(_cache[2]=$event=>passphrase.value=$event),"prepend-inner-icon":unref(mdiLockOutline),autocomplete:`current-password`,density:`comfortable`,"hide-details":``,label:`Passphrase`,type:`password`,variant:`outlined`,onKeydown:withKeys(unlock,[`enter`])},null,8,[`modelValue`,`prepend-inner-icon`]),createVNode(VBtn,{disabled:passphrase.value.length<12,loading:busy.value===`unlock`,color:`primary`,rounded:`pill`,variant:`flat`,onClick:unlock},{default:withCtx(()=>[..._cache[18]||(_cache[18]=[createTextVNode(`Unlock`,-1)])]),_:1},8,[`disabled`,`loading`])])):createCommentVNode(``,true),keys.value.exists?(openBlock(),createElementBlock(Fragment,{key:2},[createBaseVNode(`h3`,_hoisted_8$4,[_cache[20]||(_cache[20]=createTextVNode(` Accounts `,-1)),!adding.value?(openBlock(),createBlock(VBtn,{key:0,disabled:!keys.value.unlocked,"prepend-icon":unref(mdiPlus),class:`ml-auto`,rounded:`pill`,size:`small`,variant:`tonal`,onClick:_cache[3]||(_cache[3]=$event=>startAdding())},{default:withCtx(()=>[..._cache[19]||(_cache[19]=[createTextVNode(`Add account`,-1)])]),_:1},8,[`disabled`,`prepend-icon`])):createCommentVNode(``,true)]),accounts.value.length?(openBlock(),createElementBlock(`ul`,_hoisted_9$4,[(openBlock(true),createElementBlock(Fragment,null,renderList(accounts.value,account=>{return openBlock(),createElementBlock(`li`,{key:account.id},[createVNode(VIcon,{icon:KIND_ICONS[account.kind]||unref(`M5.8 10C5.4 8.8 4.3 8 3 8C1.3 8 0 9.3 0 11S1.3 14 3 14C4.3 14 5.4 13.2 5.8 12H7V14H9V12H11V10H5.8M3 12C2.4 12 2 11.6 2 11S2.4 10 3 10 4 10.4 4 11 3.6 12 3 12M16 4C13.8 4 12 5.8 12 8S13.8 12 16 12 20 10.2 20 8 18.2 4 16 4M16 10.1C14.8 10.1 13.9 9.2 13.9 8C13.9 6.8 14.8 5.9 16 5.9C17.2 5.9 18.1 6.8 18.1 8S17.2 10.1 16 10.1M16 13C13.3 13 8 14.3 8 17V20H24V17C24 14.3 18.7 13 16 13M22.1 18.1H9.9V17C9.9 16.4 13 14.9 16 14.9C19 14.9 22.1 16.4 22.1 17V18.1Z`),size:`22`},null,8,[`icon`]),createBaseVNode(`div`,null,[createBaseVNode(`strong`,null,toDisplayString(account.label),1),createBaseVNode(`span`,null,toDisplayString(account.source===`github-cli`?`From your GitHub CLI sign-in`:account.address||`Token`)+` · added `+toDisplayString(unref(relativeTime)(account.createdAt)),1)]),createVNode(VBtn,{"aria-label":`Replace the token of ${account.label}`,disabled:!keys.value.unlocked,icon:unref(mdiKeyChange),size:`small`,title:`Replace token`,variant:`text`,onClick:$event=>startReplacing(account)},null,8,[`aria-label`,`disabled`,`icon`,`onClick`]),createVNode(VBtn,{"aria-label":`Remove ${account.label}`,disabled:!keys.value.unlocked,icon:unref(mdiTrashCanOutline),loading:busy.value===`remove:${account.id}`,size:`small`,variant:`text`,onClick:$event=>removeAccount(account.id)},null,8,[`aria-label`,`disabled`,`icon`,`loading`,`onClick`])])}),128))])):!adding.value?(openBlock(),createElementBlock(`p`,_hoisted_10$4,`No accounts yet. Install on my phone needs none; npm, PyPI and GitHub each need one.`)):createCommentVNode(``,true),adding.value?(openBlock(),createElementBlock(`div`,_hoisted_11$4,[replacing.value?(openBlock(),createElementBlock(`p`,_hoisted_12$4,[_cache[21]||(_cache[21]=createTextVNode(`New token for `,-1)),createBaseVNode(`strong`,null,toDisplayString(form.value.label),1),_cache[22]||(_cache[22]=createTextVNode(`. Targets using it keep working with the new token.`,-1))])):createCommentVNode(``,true),!replacing.value?(openBlock(),createBlock(VBtnToggle,{key:1,modelValue:form.value.kind,"onUpdate:modelValue":_cache[4]||(_cache[4]=$event=>form.value.kind=$event),class:`mb-3`,color:`primary`,density:`comfortable`,divided:``,mandatory:``,rounded:`pill`,variant:`outlined`},{default:withCtx(()=>[(openBlock(true),createElementBlock(Fragment,null,renderList(kinds.value,entry=>{return openBlock(),createBlock(VBtn,{key:entry.id,"prepend-icon":KIND_ICONS[entry.id],value:entry.id},{default:withCtx(()=>[createTextVNode(toDisplayString(entry.label),1)]),_:2},1032,[`prepend-icon`,`value`])}),128))]),_:1},8,[`modelValue`])):createCommentVNode(``,true),!replacing.value?(openBlock(),createBlock(VTextField,{key:2,modelValue:form.value.label,"onUpdate:modelValue":_cache[5]||(_cache[5]=$event=>form.value.label=$event),placeholder:kind.value?.label,label:`Name`,variant:`outlined`},null,8,[`modelValue`,`placeholder`])):createCommentVNode(``,true),kind.value?.addressLabel&&!replacing.value?(openBlock(),createBlock(VTextField,{key:3,modelValue:form.value.address,"onUpdate:modelValue":_cache[6]||(_cache[6]=$event=>form.value.address=$event),label:kind.value.addressLabel,variant:`outlined`},null,8,[`modelValue`,`label`])):createCommentVNode(``,true),form.value.kind===`github`?(openBlock(),createBlock(VRadioGroup,{key:4,modelValue:form.value.source,"onUpdate:modelValue":_cache[7]||(_cache[7]=$event=>form.value.source=$event),density:`compact`,"hide-details":``,inline:``},{default:withCtx(()=>[createVNode(VRadio,{label:`Use my GitHub CLI sign-in`,value:`github-cli`}),createVNode(VRadio,{label:`Paste a token`,value:`token`})]),_:1},8,[`modelValue`])):createCommentVNode(``,true),form.value.source===`token`?(openBlock(),createBlock(VTextField,{key:5,modelValue:form.value.token,"onUpdate:modelValue":_cache[8]||(_cache[8]=$event=>form.value.token=$event),autocomplete:`off`,label:kind.value?.tokenLabel||`Token`,type:`password`,variant:`outlined`},null,8,[`modelValue`,`label`])):createCommentVNode(``,true),createBaseVNode(`div`,_hoisted_13$4,[createVNode(VBtn,{rounded:`pill`,variant:`text`,onClick:_cache[9]||(_cache[9]=$event=>{adding.value=false;replacing.value=``})},{default:withCtx(()=>[..._cache[23]||(_cache[23]=[createTextVNode(`Cancel`,-1)])]),_:1}),createVNode(VBtn,{disabled:form.value.source===`token`&&form.value.token.length<8,loading:busy.value===`add`,color:`primary`,rounded:`pill`,variant:`flat`,onClick:addAccount},{default:withCtx(()=>[createTextVNode(toDisplayString(replacing.value?`Replace token`:`Add`),1)]),_:1},8,[`disabled`,`loading`])])])):createCommentVNode(``,true),_cache[24]||(_cache[24]=createBaseVNode(`h3`,{class:`publish-keys__heading`},`Recovery kit`,-1)),createBaseVNode(`div`,{class:normalizeClass([`publish-keys__kit`,{"is-stale":kitStale.value}])},[createVNode(VIcon,{icon:unref(mdiLifebuoy),size:`22`},null,8,[`icon`]),createBaseVNode(`div`,null,[createBaseVNode(`strong`,null,toDisplayString(!kitDate.value?`No recovery kit yet`:kitStale.value?`Your recovery kit is out of date`:`Saved ${unref(relativeTime)(kitDate.value)}`),1),kitStale.value&&installKeys.value.length?(openBlock(),createElementBlock(`span`,_hoisted_14$4,`Save a new kit: an install key is not in it yet.`)):kitStale.value?(openBlock(),createElementBlock(`span`,_hoisted_15$4,`Save a new kit so it holds every key.`)):createCommentVNode(``,true),kitStale.value&&kitDate.value?(openBlock(),createElementBlock(`span`,_hoisted_16$4,`Last saved `+toDisplayString(unref(relativeTime)(kitDate.value))+`.`,1)):(openBlock(),createElementBlock(`span`,_hoisted_17$4,`Holds every key. Keep it somewhere safe off this computer.`))]),createVNode(VBtn,{color:kitStale.value?`primary`:void 0,variant:kitStale.value?`flat`:`tonal`,rounded:`pill`,size:`small`,onClick:_cache[10]||(_cache[10]=$event=>emit(`recovery-kit`))},{default:withCtx(()=>[createTextVNode(toDisplayString(kitStale.value?`Save kit`:`Manage`),1)]),_:1},8,[`color`,`variant`])],2)],64)):createCommentVNode(``,true),error.value?(openBlock(),createBlock(VAlert,{key:3,class:`mt-3`,type:`error`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(error.value),1)]),_:1})):createCommentVNode(``,true)]),_:1}),createVNode(VCardActions,{class:`publish-dialog__actions`},{default:withCtx(()=>[createVNode(VSpacer),createVNode(VBtn,{rounded:`pill`,variant:`text`,onClick:_cache[11]||(_cache[11]=$event=>emit(`update:modelValue`,false))},{default:withCtx(()=>[..._cache[25]||(_cache[25]=[createTextVNode(`Done`,-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,[`model-value`])}}};var PublishingAccountsPanel_default=_plugin_vue_export_helper_default(_sfc_main$10,[[`__scopeId`,`data-v-8c763fe9`]]);var _hoisted_1$8={key:0,class:`publish-kit__lead`};var _hoisted_2$6={key:1,class:`publish-kit__lead`};var _sfc_main$9={__name:`RecoveryKitDialog`,props:{modelValue:{type:Boolean,default:false},state:{type:Object,default:null},call:{type:Function,required:true}},emits:[`update:modelValue`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const tab=ref(`save`);const passphrase=ref(``);const repeat=ref(``);const file=ref(null);const busy=ref(false);const error=ref(``);const done=ref(``);const unlocked=computed(()=>Boolean(props.state?.keys?.unlocked));const count=computed(()=>(props.state?.keys?.entries||[]).length);watch(()=>props.modelValue,open=>{if(!open)return;tab.value=`save`;passphrase.value=repeat.value=``;file.value=null;error.value=done.value=``});function download(base64,fileName){const bytes=Uint8Array.from(atob(base64),character=>character.charCodeAt(0));const url=URL.createObjectURL(new Blob([bytes],{type:`application/octet-stream`}));const link=Object.assign(document.createElement(`a`),{href:url,download:fileName});document.body.append(link);link.click();link.remove();setTimeout(()=>URL.revokeObjectURL(url),1e3)}function asBase64(chosen){return new Promise((resolve,reject)=>{const reader=new FileReader;reader.onload=()=>resolve(String(reader.result).split(`,`)[1]||``);reader.onerror=()=>reject(new Error(`The kit file could not be read.`));reader.readAsDataURL(chosen)})}async function act(work){busy.value=true;error.value=``;try{await work()}catch(failure){error.value=failure.message}finally{busy.value=false}}const save=()=>act(async()=>{if(passphrase.value!==repeat.value)throw new Error(`The two passphrases differ.`);const kit=await props.call(`/recovery-kit`,{body:{passphrase:passphrase.value}});download(kit.data,kit.fileName);passphrase.value=repeat.value=``;done.value=`${kit.fileName} downloaded. Keep it and its passphrase somewhere safe, apart from this computer.`});const restore=()=>act(async()=>{const chosen=Array.isArray(file.value)?file.value[0]:file.value;if(!chosen)throw new Error(`Choose the kit file.`);const answer=await props.call(`/recovery-kit/restore`,{body:{data:await asBase64(chosen),passphrase:passphrase.value}});passphrase.value=``;const restoredCount=answer.restored?.length||0;done.value=`Restored ${restoredCount} ${restoredCount===1?`key`:`keys`}.`});return(_ctx,_cache)=>{return openBlock(),createBlock(VDialog,{"model-value":__props.modelValue,"max-width":`520`,"onUpdate:modelValue":_cache[5]||(_cache[5]=$event=>emit(`update:modelValue`,$event))},{default:withCtx(()=>[createVNode(VCard,{rounded:`xl`},{default:withCtx(()=>[createVNode(VCardTitle,{class:`publish-dialog__title`},{default:withCtx(()=>[createVNode(VIcon,{icon:unref(mdiLifebuoy),class:`mr-2`,color:`primary`},null,8,[`icon`]),_cache[6]||(_cache[6]=createTextVNode(`Recovery kit`,-1))]),_:1}),createVNode(VTabs,{modelValue:tab.value,"onUpdate:modelValue":_cache[0]||(_cache[0]=$event=>tab.value=$event),class:`px-4`,color:`primary`,density:`compact`},{default:withCtx(()=>[createVNode(VTab,{value:`save`},{default:withCtx(()=>[..._cache[7]||(_cache[7]=[createTextVNode(`Save a kit`,-1)])]),_:1}),createVNode(VTab,{value:`restore`},{default:withCtx(()=>[..._cache[8]||(_cache[8]=[createTextVNode(`Restore`,-1)])]),_:1})]),_:1},8,[`modelValue`]),createVNode(VCardText,{class:`publish-kit`},{default:withCtx(()=>[tab.value===`save`?(openBlock(),createElementBlock(`p`,_hoisted_1$8,` The kit holds all `+toDisplayString(count.value)+` of your publishing keys, encrypted under a passphrase of its own. If this computer is lost, the kit restores them, so phones keep accepting your app's updates. `,1)):(openBlock(),createElementBlock(`p`,_hoisted_2$6,`Restore keys from a kit into your publishing keys on this computer.`)),!unlocked.value?(openBlock(),createBlock(VAlert,{key:2,class:`mb-3`,type:`info`,variant:`tonal`},{default:withCtx(()=>[..._cache[9]||(_cache[9]=[createTextVNode(`Unlock your publishing keys first.`,-1)])]),_:1})):createCommentVNode(``,true),tab.value===`restore`?(openBlock(),createBlock(VFileInput,{key:3,modelValue:file.value,"onUpdate:modelValue":_cache[1]||(_cache[1]=$event=>file.value=$event),"prepend-icon":null,"prepend-inner-icon":unref(mdiUpload),accept:`.age`,label:`Kit file (.age)`,variant:`outlined`},null,8,[`modelValue`,`prepend-inner-icon`])):createCommentVNode(``,true),createVNode(VTextField,{modelValue:passphrase.value,"onUpdate:modelValue":_cache[2]||(_cache[2]=$event=>passphrase.value=$event),hint:tab.value===`save`?`Use a different passphrase from your keys. At least 12 characters.`:``,autocomplete:`new-password`,label:`Kit passphrase`,"persistent-hint":``,type:`password`,variant:`outlined`},null,8,[`modelValue`,`hint`]),tab.value===`save`?(openBlock(),createBlock(VTextField,{key:4,modelValue:repeat.value,"onUpdate:modelValue":_cache[3]||(_cache[3]=$event=>repeat.value=$event),autocomplete:`new-password`,label:`Kit passphrase again`,type:`password`,variant:`outlined`},null,8,[`modelValue`])):createCommentVNode(``,true),done.value?(openBlock(),createBlock(VAlert,{key:5,color:`success`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(done.value),1)]),_:1})):createCommentVNode(``,true),error.value?(openBlock(),createBlock(VAlert,{key:6,type:`error`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(error.value),1)]),_:1})):createCommentVNode(``,true)]),_:1}),createVNode(VCardActions,{class:`publish-dialog__actions`},{default:withCtx(()=>[createVNode(VSpacer),createVNode(VBtn,{rounded:`pill`,variant:`text`,onClick:_cache[4]||(_cache[4]=$event=>emit(`update:modelValue`,false))},{default:withCtx(()=>[..._cache[10]||(_cache[10]=[createTextVNode(`Close`,-1)])]),_:1}),tab.value===`save`?(openBlock(),createBlock(VBtn,{key:0,disabled:!unlocked.value||passphrase.value.length<12||!repeat.value,loading:busy.value,"prepend-icon":unref(mdiDownload),color:`primary`,rounded:`pill`,variant:`flat`,onClick:save},{default:withCtx(()=>[..._cache[11]||(_cache[11]=[createTextVNode(` Download kit `,-1)])]),_:1},8,[`disabled`,`loading`,`prepend-icon`])):(openBlock(),createBlock(VBtn,{key:1,disabled:!unlocked.value||passphrase.value.length<12||!file.value,loading:busy.value,color:`primary`,rounded:`pill`,variant:`flat`,onClick:restore},{default:withCtx(()=>[..._cache[12]||(_cache[12]=[createTextVNode(`Restore`,-1)])]),_:1},8,[`disabled`,`loading`]))]),_:1})]),_:1})]),_:1},8,[`model-value`])}}};var RecoveryKitDialog_default=_plugin_vue_export_helper_default(_sfc_main$9,[[`__scopeId`,`data-v-14fb34ce`]]);var _hoisted_1$7={class:`publish-release__steps`,"aria-label":`Release steps`};var _hoisted_2$5=[`disabled`];var _hoisted_3$4={class:`publish-release__package-name`};var _hoisted_4$4={key:0,class:`publish-release__muted`};var _hoisted_5$3={key:1,class:`publish-release__bumps`};var _hoisted_6$3={class:`publish-release__kind`};var _hoisted_7$3={key:0,class:`publish-release__muted`};var _hoisted_8$3={key:2,class:`publish-release__note`,role:`note`};var _hoisted_9$3={key:0};var _hoisted_10$3={key:1};var _hoisted_11$3={class:`publish-release__muted`};var _hoisted_12$3={class:`publish-release__baseline`};var _hoisted_13$3={class:`publish-release__targets`};var _hoisted_14$3={key:0,class:`publish-release__unlock`};var _hoisted_15$3={class:`publish-release__heading`};var _hoisted_16$3={key:2,class:`publish-release__checks`};var _hoisted_17$3={key:1,class:`publish-release__output`};var _hoisted_18$3={key:0,class:`publish-release__passed`};var _hoisted_19$1={key:0};var _hoisted_20$1={key:1};var _hoisted_21$1={class:`publish-release__heading`};var _hoisted_22$1={class:`publish-release__plan-id`,title:`Every release follows exactly this reviewed plan`};var _hoisted_23$1={class:`publish-release__plan`};var _hoisted_24={key:0};var _hoisted_25={key:0,class:`publish-release__blocked`};var _sfc_main$8={__name:`ReleaseDialog`,props:{modelValue:{type:Boolean,default:false},state:{type:Object,default:null},dashboardContext:{type:Object,default:()=>({})},call:{type:Function,required:true}},emits:[`update:modelValue`,`confirm`,`dry-run-started`,`accounts`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const step=ref(1);const suggestion=ref(null);const versions=ref({});const notes=ref(``);const prepared=ref(null);const selected=ref([]);const acknowledged=ref([]);const plan=ref(null);const passphrase=ref(``);const busy=ref(``);const error=ref(``);const targets=computed(()=>props.state?.targets||[]);const baseline=computed(()=>props.state?.baseline||{});const keys=computed(()=>props.state?.keys||{});const labels=computed(()=>Object.fromEntries((props.state?.destinations||[]).map(entry=>[entry.id,entry.label])));const packageLabel=computed(()=>packageLabeller(props.state?.packaging?.packages||[]));const sessionId=computed(()=>String(props.dashboardContext?.sessionId||``));const canSave=computed(()=>typeof props.dashboardContext?.requestSaveWork===`function`);const blocked=computed(()=>Boolean(plan.value?.preflight?.blocked));const needsAck=computed(()=>(plan.value?.preflight?.checks||[]).filter(check=>!check.ok&&check.severity===`ack`));const ready=computed(()=>Boolean(plan.value&&!blocked.value&&needsAck.value.every(check=>acknowledged.value.includes(check.id))));const showPassed=ref(false);const passedChecks=computed(()=>(plan.value?.preflight?.checks||[]).filter(check=>check.ok));const shownChecks=computed(()=>[...(plan.value?.preflight?.checks||[]).filter(check=>!check.ok),...showPassed.value?passedChecks.value:[]]);const checksRunning=computed(()=>props.state?.checks?.status===`running`);const checksOutput=computed(()=>props.state?.checks?.status===`failed`?props.state.checks.output||``:``);const showOutput=ref(false);const managed=computed(()=>(suggestion.value?.packages||[]).filter(entry=>!entry.external));function choicesFor(entry){return[...entry.current&&!entry.released?[{kind:`as saved`,version:entry.current}]:[],...entry.suggestions.filter(choice=>choice.version!==entry.current)]}function liveLine(entry){const live=targets.value.filter(target=>target.package===entry.id&&target.latest?.version).map(target=>target.latest.version);const saved=`Saved ${entry.current||`without a version`}`;return live.length?`${saved} · live ${[...new Set(live)].join(`, `)}`:`${saved} · not published yet`}const changes=computed(()=>managed.value.filter(entry=>versions.value[entry.id]&&versions.value[entry.id]!==entry.current));const unreleasedSaved=computed(()=>managed.value.some(entry=>entry.current&&!entry.released));const needsWriting=computed(()=>changes.value.length>0&&!prepared.value);function releaseAsSaved(){versions.value=Object.fromEntries(managed.value.map(entry=>[entry.id,entry.current]));review()}const accountsById=computed(()=>Object.fromEntries((props.state?.accounts||[]).map(entry=>[entry.id,entry])));const planSteps=computed(()=>{if(!plan.value)return[];const versionOf=id=>plan.value.packages?.find(entry=>entry.id===id)?.version||shortCommit(plan.value.savedCommit);return(plan.value.steps||[]).map(entry=>{if(entry.kind===`build`)return{id:`build:${entry.package}`,icon:mdiWrenchOutline,text:`Build ${packageLabel.value(entry.package)} ${versionOf(entry.package)} once`};if(entry.kind===`tag`)return{id:`tag:${entry.tag}`,icon:mdiTagOutline,text:`Tag the saved commit ${entry.tag}`};const target=plan.value.targets.find(candidate=>candidate.id===entry.target);const account=accountsById.value[target.account];const where=hostOf(target.settings?.registry||target.settings?.repository||``);const signed=target.destination===`android-sideload`?`signed with your install key`:``;return{id:`publish:${target.id}`,icon:destinationIcon(target.destination),text:`${labels.value[target.destination]||target.destination}: ${packageLabel.value(target.package)} ${versionOf(target.package)}`,detail:[account?.label,where,signed].filter(Boolean).join(` · `)}})});const blockedHint=computed(()=>{if(!plan.value)return``;if(blocked.value)return`Fix what is marked in red to continue.`;if(!ready.value)return`Confirm what is marked in amber to continue.`;return``});watch(()=>props.modelValue,async open=>{if(!open)return;step.value=1;error.value=``;prepared.value=null;plan.value=null;acknowledged.value=[];selected.value=targets.value.map(target=>target.id);busy.value=`suggest`;try{suggestion.value=await props.call(`/release/suggestion`,{method:`GET`,refreshAfter:false});versions.value=Object.fromEntries(suggestion.value.packages.filter(entry=>!entry.external).map(entry=>[entry.id,choicesFor(entry)[0].version]));notes.value=suggestion.value.notes||``}catch(failure){error.value=failure.message}finally{busy.value=``}});watch(()=>[props.state?.baseline?.commit,props.state?.checks?.status],()=>{if(props.modelValue&&step.value===2&&busy.value!==`plan`)review()});async function run(name,work){busy.value=name;error.value=``;try{return await work()}catch(failure){error.value=failure.message;return null}finally{busy.value=``}}const prepare=()=>run(`prepare`,async()=>{const chosen=Object.fromEntries(changes.value.map(entry=>[entry.id,versions.value[entry.id]]));prepared.value=await props.call(`/release/prepare`,{body:{sessionId:sessionId.value,versions:chosen,notes:notes.value},refreshAfter:false});await props.dashboardContext?.refreshSessionWork?.()});async function save(){await props.dashboardContext.requestSaveWork()}const review=()=>run(`plan`,async()=>{step.value=2;const answer=await props.call(`/plan`,{body:{targetIds:selected.value,acknowledged:acknowledged.value},refreshAfter:false});plan.value=answer.plan});const unlock=()=>run(`unlock`,async()=>{await props.call(`/keys/unlock`,{body:{passphrase:passphrase.value}});passphrase.value=``;busy.value=``;await review()});const runChecks=()=>run(`checks`,()=>props.call(`/checks`));const pushSaved=()=>run(`push`,async()=>{await props.call(`/baseline/push`);busy.value=``;await review()});const dryRun=()=>run(`dry-run`,async()=>{const answer=await props.call(`/dry-run`,{body:{planHash:plan.value.planHash,targetIds:selected.value,acknowledged:acknowledged.value}});emit(`dry-run-started`,answer.releaseId);emit(`update:modelValue`,false)});function publish(){emit(`confirm`,{plan:plan.value,targetIds:[...selected.value],acknowledged:[...acknowledged.value]})}function checkIcon(check){if(check.ok)return{icon:mdiCheckCircle,color:`success`};return check.severity===`block`?{icon:mdiCloseCircle,color:`error`}:{icon:mdiAlertCircle,color:`warning`}}return(_ctx,_cache)=>{return openBlock(),createBlock(VDialog,{"model-value":__props.modelValue,"max-width":`720`,scrollable:``,"onUpdate:modelValue":_cache[10]||(_cache[10]=$event=>emit(`update:modelValue`,$event))},{default:withCtx(()=>[createVNode(VCard,{class:`publish-release`,rounded:`xl`},{default:withCtx(()=>[createVNode(VCardTitle,{class:`publish-dialog__title`},{default:withCtx(()=>[..._cache[11]||(_cache[11]=[createTextVNode(`Release`,-1)])]),_:1}),createBaseVNode(`nav`,_hoisted_1$7,[createBaseVNode(`button`,{class:normalizeClass({"is-current":step.value===1}),type:`button`,onClick:_cache[0]||(_cache[0]=$event=>step.value=1)},[..._cache[12]||(_cache[12]=[createBaseVNode(`span`,null,`1`,-1),createTextVNode(` Version`,-1)])],2),_cache[14]||(_cache[14]=createBaseVNode(`span`,{class:`publish-release__rule`,"aria-hidden":`true`},null,-1)),createBaseVNode(`button`,{class:normalizeClass({"is-current":step.value===2}),disabled:!targets.value.length,type:`button`,onClick:review},[..._cache[13]||(_cache[13]=[createBaseVNode(`span`,null,`2`,-1),createTextVNode(` Review & publish`,-1)])],10,_hoisted_2$5)]),createVNode(VCardText,{class:`publish-release__body`},{default:withCtx(()=>[step.value===1?(openBlock(),createElementBlock(Fragment,{key:0},[busy.value===`suggest`?(openBlock(),createBlock(VSkeletonLoader,{key:0,type:`list-item-two-line, list-item-two-line`})):(openBlock(),createElementBlock(Fragment,{key:1},[_cache[18]||(_cache[18]=createBaseVNode(`p`,{class:`publish-release__lead`},` Choose the version people get. A new version is written with its changelog into your session for you to Save; releases always use the saved commit. `,-1)),(openBlock(true),createElementBlock(Fragment,null,renderList(suggestion.value?.packages||[],entry=>{return openBlock(),createElementBlock(`div`,{key:entry.id,class:`publish-release__package`},[createBaseVNode(`div`,_hoisted_3$4,[createBaseVNode(`strong`,null,toDisplayString(entry.label),1),createBaseVNode(`span`,null,toDisplayString(liveLine(entry)),1)]),entry.external?(openBlock(),createElementBlock(`span`,_hoisted_4$4,`Set by the project's own build.`)):(openBlock(),createElementBlock(`div`,_hoisted_5$3,[createVNode(VChipGroup,{modelValue:versions.value[entry.id],"onUpdate:modelValue":$event=>versions.value[entry.id]=$event,color:`primary`,column:``,mandatory:``},{default:withCtx(()=>[(openBlock(true),createElementBlock(Fragment,null,renderList(choicesFor(entry),choice=>{return openBlock(),createBlock(VChip,{key:choice.kind,value:choice.version,filter:``,rounded:`pill`,variant:`outlined`},{default:withCtx(()=>[createTextVNode(toDisplayString(choice.version),1),createBaseVNode(`span`,_hoisted_6$3,toDisplayString(choice.kind),1)]),_:2},1032,[`value`])}),128))]),_:2},1032,[`modelValue`,`onUpdate:modelValue`])]))])}),128)),suggestion.value&&!suggestion.value.packages.length?(openBlock(),createElementBlock(`p`,_hoisted_7$3,`No package has a version Vibe64 manages. Release the saved commit as it is.`)):createCommentVNode(``,true),needsWriting.value||prepared.value?(openBlock(),createBlock(VTextarea,{key:1,modelValue:notes.value,"onUpdate:modelValue":_cache[1]||(_cache[1]=$event=>notes.value=$event),"auto-grow":``,class:`mt-2`,label:`What's new`,"max-rows":`10`,rows:`4`,variant:`outlined`},null,8,[`modelValue`])):createCommentVNode(``,true),needsWriting.value&&!sessionId.value?(openBlock(),createElementBlock(`div`,_hoisted_8$3,[createVNode(VIcon,{icon:unref(mdiInformationOutline),size:`18`},null,8,[`icon`]),unreleasedSaved.value?(openBlock(),createElementBlock(`span`,_hoisted_9$3,[..._cache[15]||(_cache[15]=[createTextVNode(`Writing a new version needs a session. Start one with `,-1),createBaseVNode(`strong`,null,`+`,-1),createTextVNode(` and open Publish from it, or release what is saved as it is.`,-1)])])):(openBlock(),createElementBlock(`span`,_hoisted_10$3,[..._cache[16]||(_cache[16]=[createTextVNode(`The saved version is already published. Writing a new one needs a session: start one with `,-1),createBaseVNode(`strong`,null,`+`,-1),createTextVNode(` and open Publish from it.`,-1)])]))])):createCommentVNode(``,true),prepared.value?(openBlock(),createBlock(VAlert,{key:3,class:`publish-release__prepared`,color:`success`,variant:`tonal`},{default:withCtx(()=>[_cache[17]||(_cache[17]=createBaseVNode(`strong`,null,`Written into this session:`,-1)),createTextVNode(` `+toDisplayString(prepared.value.packages.map(entry=>`${entry.id} ${entry.previousVersion||`–`} → ${entry.version}`).join(`, `))+` `,1),createBaseVNode(`div`,_hoisted_11$3,toDisplayString(prepared.value.packages.flatMap(entry=>entry.files).join(` · `)),1)]),_:1})):createCommentVNode(``,true)],64))],64)):(openBlock(),createElementBlock(Fragment,{key:1},[createBaseVNode(`div`,_hoisted_12$3,[createVNode(VIcon,{icon:unref(mdiSourceCommit),size:`18`},null,8,[`icon`]),createBaseVNode(`span`,null,[_cache[19]||(_cache[19]=createTextVNode(`Saved commit `,-1)),createBaseVNode(`code`,null,toDisplayString(unref(shortCommit)(baseline.value.commit)),1),createTextVNode(` on `+toDisplayString(baseline.value.branch),1)]),createVNode(VChip,{color:baseline.value.pushed?`success`:`warning`,size:`x-small`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(baseline.value.pushed?`pushed`:`not pushed`),1)]),_:1},8,[`color`])]),_cache[24]||(_cache[24]=createBaseVNode(`h3`,{class:`publish-release__heading`},`Targets`,-1)),createBaseVNode(`div`,_hoisted_13$3,[(openBlock(true),createElementBlock(Fragment,null,renderList(targets.value,target=>{return openBlock(),createBlock(VCheckbox,{key:target.id,modelValue:selected.value,"onUpdate:modelValue":[_cache[2]||(_cache[2]=$event=>selected.value=$event),review],value:target.id,density:`compact`,"hide-details":``},{label:withCtx(()=>[createVNode(VIcon,{icon:unref(destinationIcon)(target.destination),class:`mr-2`,size:`18`},null,8,[`icon`]),createTextVNode(` `+toDisplayString(labels.value[target.destination]||target.destination)+` · `+toDisplayString(packageLabel.value(target.package)),1)]),_:2},1032,[`modelValue`,`value`])}),128))]),keys.value.exists&&!keys.value.unlocked?(openBlock(),createElementBlock(`div`,_hoisted_14$3,[createVNode(VTextField,{modelValue:passphrase.value,"onUpdate:modelValue":_cache[3]||(_cache[3]=$event=>passphrase.value=$event),"prepend-inner-icon":unref(mdiLockOutline),autocomplete:`current-password`,density:`comfortable`,"hide-details":``,label:`Unlock publishing keys to check sign-ins`,type:`password`,variant:`outlined`,onKeydown:withKeys(unlock,[`enter`])},null,8,[`modelValue`,`prepend-inner-icon`]),createVNode(VBtn,{disabled:passphrase.value.length<12,loading:busy.value===`unlock`,color:`primary`,rounded:`pill`,variant:`flat`,onClick:unlock},{default:withCtx(()=>[..._cache[20]||(_cache[20]=[createTextVNode(`Unlock`,-1)])]),_:1},8,[`disabled`,`loading`])])):createCommentVNode(``,true),createBaseVNode(`h3`,_hoisted_15$3,[_cache[21]||(_cache[21]=createTextVNode(` Before publishing `,-1)),createVNode(VBtn,{icon:unref(mdiRefresh),loading:busy.value===`plan`,"aria-label":`Check again`,class:`ml-auto`,size:`small`,variant:`text`,onClick:review},null,8,[`icon`,`loading`])]),busy.value===`plan`&&!plan.value?(openBlock(),createBlock(VSkeletonLoader,{key:1,type:`list-item, list-item, list-item`})):plan.value?(openBlock(),createElementBlock(`ul`,_hoisted_16$3,[(openBlock(true),createElementBlock(Fragment,null,renderList(shownChecks.value,check=>{return openBlock(),createElementBlock(`li`,{key:check.id,class:normalizeClass({"is-failed":!check.ok&&check.severity===`block`,"is-warning":!check.ok&&check.severity!==`block`})},[createVNode(VIcon,mergeProps({ref_for:true},checkIcon(check),{size:`20`}),null,16),createBaseVNode(`div`,null,[createBaseVNode(`strong`,null,toDisplayString(check.label),1),createBaseVNode(`span`,null,toDisplayString(check.id===`verification-passed`&&!check.ok&&__props.state?.checks?.failedCommand?`${__props.state.checks.failedCommand} failed on the saved commit.`:check.message),1),check.id===`verification-passed`&&checksOutput.value?(openBlock(),createElementBlock(`button`,{key:0,class:`publish-release__output-toggle`,type:`button`,onClick:_cache[4]||(_cache[4]=$event=>showOutput.value=!showOutput.value)},toDisplayString(showOutput.value?`Hide output`:`Show output`),1)):createCommentVNode(``,true),check.id===`verification-passed`&&showOutput.value&&checksOutput.value?(openBlock(),createElementBlock(`pre`,_hoisted_17$3,toDisplayString(checksOutput.value),1)):createCommentVNode(``,true)]),check.id===`verification-passed`&&!check.ok?(openBlock(),createBlock(VBtn,{key:0,loading:checksRunning.value||busy.value===`checks`,rounded:`pill`,size:`small`,variant:`tonal`,onClick:runChecks},{default:withCtx(()=>[createTextVNode(toDisplayString(__props.state?.checks?.status===`failed`?`Run again`:`Run checks`),1)]),_:1},8,[`loading`])):check.id===`baseline-saved-pushed`&&!check.ok&&baseline.value.saved&&!baseline.value.pushed&&baseline.value.remote?(openBlock(),createBlock(VBtn,{key:1,loading:busy.value===`push`,rounded:`pill`,size:`small`,variant:`tonal`,onClick:pushSaved},{default:withCtx(()=>[createTextVNode(` Push to `+toDisplayString(baseline.value.remote.name),1)]),_:1},8,[`loading`])):check.id===`credentials-valid`&&!check.ok?(openBlock(),createBlock(VBtn,{key:2,"prepend-icon":unref(mdiAccountKeyOutline),rounded:`pill`,size:`small`,variant:`tonal`,onClick:_cache[5]||(_cache[5]=$event=>emit(`accounts`))},{default:withCtx(()=>[..._cache[22]||(_cache[22]=[createTextVNode(` Fix sign-in `,-1)])]),_:1},8,[`prepend-icon`])):!check.ok&&check.severity===`ack`?(openBlock(),createBlock(VCheckbox,{key:3,modelValue:acknowledged.value,"onUpdate:modelValue":_cache[6]||(_cache[6]=$event=>acknowledged.value=$event),value:check.id,density:`compact`,"hide-details":``,label:`I understand`},null,8,[`modelValue`,`value`])):createCommentVNode(``,true)],2)}),128)),passedChecks.value.length?(openBlock(),createElementBlock(`li`,_hoisted_18$3,[createBaseVNode(`button`,{type:`button`,onClick:_cache[7]||(_cache[7]=$event=>showPassed.value=!showPassed.value)},[createVNode(VIcon,{icon:unref(mdiCheckCircle),color:`success`,size:`20`},null,8,[`icon`]),passedChecks.value.length===(plan.value.preflight?.checks||[]).length?(openBlock(),createElementBlock(`span`,_hoisted_19$1,[createTextVNode(`All `+toDisplayString(passedChecks.value.length)+` checks passed`,1),createBaseVNode(`em`,null,toDisplayString(showPassed.value?`Hide`:`Show`),1)])):(openBlock(),createElementBlock(`span`,_hoisted_20$1,toDisplayString(showPassed.value?`Hide`:`Show`)+` `+toDisplayString(passedChecks.value.length)+` passed `+toDisplayString(passedChecks.value.length===1?`check`:`checks`),1))])])):createCommentVNode(``,true)])):createCommentVNode(``,true),plan.value&&planSteps.value.length?(openBlock(),createElementBlock(Fragment,{key:3},[createBaseVNode(`h3`,_hoisted_21$1,[_cache[23]||(_cache[23]=createTextVNode(` What happens `,-1)),createBaseVNode(`span`,_hoisted_22$1,`Plan `+toDisplayString(plan.value.planId),1)]),createBaseVNode(`ol`,_hoisted_23$1,[(openBlock(true),createElementBlock(Fragment,null,renderList(planSteps.value,entry=>{return openBlock(),createElementBlock(`li`,{key:entry.id},[createVNode(VIcon,{icon:entry.icon,size:`18`},null,8,[`icon`]),createBaseVNode(`span`,null,[createTextVNode(toDisplayString(entry.text),1),entry.detail?(openBlock(),createElementBlock(`em`,_hoisted_24,toDisplayString(entry.detail),1)):createCommentVNode(``,true)])])}),128))])],64)):createCommentVNode(``,true)],64)),error.value?(openBlock(),createBlock(VAlert,{key:2,class:`mt-4`,type:`error`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(error.value),1)]),_:1})):createCommentVNode(``,true)]),_:1}),createVNode(VCardActions,{class:`publish-dialog__actions`},{default:withCtx(()=>[step.value===1?(openBlock(),createElementBlock(Fragment,{key:0},[createVNode(VBtn,{rounded:`pill`,variant:`text`,onClick:_cache[8]||(_cache[8]=$event=>emit(`update:modelValue`,false))},{default:withCtx(()=>[..._cache[25]||(_cache[25]=[createTextVNode(`Cancel`,-1)])]),_:1}),createVNode(VSpacer),needsWriting.value?(openBlock(),createElementBlock(Fragment,{key:0},[!sessionId.value&&unreleasedSaved.value?(openBlock(),createBlock(VBtn,{key:0,rounded:`pill`,variant:`tonal`,onClick:releaseAsSaved},{default:withCtx(()=>[..._cache[26]||(_cache[26]=[createTextVNode(`Release as saved`,-1)])]),_:1})):createCommentVNode(``,true),createVNode(VBtn,{disabled:!sessionId.value,loading:busy.value===`prepare`,"prepend-icon":unref(mdiPencilOutline),color:`primary`,rounded:`pill`,variant:`flat`,onClick:prepare},{default:withCtx(()=>[createTextVNode(` Write `+toDisplayString(changes.value.length===1?versions.value[changes.value[0].id]:`versions`),1)]),_:1},8,[`disabled`,`loading`,`prepend-icon`])],64)):(openBlock(),createElementBlock(Fragment,{key:1},[prepared.value&&canSave.value?(openBlock(),createBlock(VBtn,{key:0,"prepend-icon":unref(mdiContentSaveOutline),rounded:`pill`,variant:`tonal`,onClick:save},{default:withCtx(()=>[..._cache[27]||(_cache[27]=[createTextVNode(`Save`,-1)])]),_:1},8,[`prepend-icon`])):createCommentVNode(``,true),createVNode(VBtn,{"append-icon":unref(mdiArrowRight),color:`primary`,"data-test":`release-continue`,rounded:`pill`,variant:`flat`,onClick:review},{default:withCtx(()=>[..._cache[28]||(_cache[28]=[createTextVNode(`Continue`,-1)])]),_:1},8,[`append-icon`])],64))],64)):(openBlock(),createElementBlock(Fragment,{key:1},[createVNode(VBtn,{rounded:`pill`,variant:`text`,onClick:_cache[9]||(_cache[9]=$event=>emit(`update:modelValue`,false))},{default:withCtx(()=>[..._cache[29]||(_cache[29]=[createTextVNode(`Close`,-1)])]),_:1}),createVNode(VSpacer),blockedHint.value?(openBlock(),createElementBlock(`span`,_hoisted_25,toDisplayString(blockedHint.value),1)):createCommentVNode(``,true),createVNode(VBtn,{disabled:!ready.value,loading:busy.value===`dry-run`,"prepend-icon":unref(mdiTestTube),rounded:`pill`,variant:`tonal`,onClick:dryRun},{default:withCtx(()=>[..._cache[30]||(_cache[30]=[createTextVNode(`Dry run`,-1)])]),_:1},8,[`disabled`,`loading`,`prepend-icon`]),createVNode(VBtn,{disabled:!ready.value,"prepend-icon":unref(mdiRocketLaunchOutline),color:`primary`,rounded:`pill`,variant:`flat`,onClick:publish},{default:withCtx(()=>[..._cache[31]||(_cache[31]=[createTextVNode(`Publish…`,-1)])]),_:1},8,[`disabled`,`prepend-icon`])],64))]),_:1})]),_:1})]),_:1},8,[`model-value`])}}};var ReleaseDialog_default=_plugin_vue_export_helper_default(_sfc_main$8,[[`__scopeId`,`data-v-f02db937`]]);var _hoisted_1$6={class:`publish-history`,"aria-labelledby":`publish-history-title`};var _hoisted_2$4={key:0,class:`publish-history__empty`};var _hoisted_3$3={key:1,class:`publish-history__list`};var _hoisted_4$3=[`data-release`];var _hoisted_5$2=[`aria-expanded`,`onClick`];var _hoisted_6$2={class:`publish-history__what`};var _hoisted_7$2={key:1,class:`publish-history__detail`};var _hoisted_8$2={class:`publish-history__steps`};var _hoisted_9$2={class:`publish-history__message`};var _hoisted_10$2={key:0,class:`publish-history__outcomes`};var _hoisted_11$2={class:`publish-history__target`};var _hoisted_12$2={key:0,class:`publish-history__error`};var _hoisted_13$2={key:1,class:`publish-history__proof`};var _hoisted_14$2={key:2,class:`publish-history__apk`};var _hoisted_15$2={key:1,class:`publish-history__error`};var _hoisted_16$2={key:2,class:`publish-history__log publish-history__log--failure`};var _hoisted_17$2={class:`publish-history__tools`};var _hoisted_18$2={key:3,class:`publish-history__log`};var _sfc_main$7={__name:`ReleaseHistory`,props:{releases:{type:Array,default:()=>[]},targets:{type:Array,default:()=>[]},destinations:{type:Array,default:()=>[]},activeRelease:{type:String,default:``},savedCommit:{type:String,default:``},packages:{type:Array,default:()=>[]},call:{type:Function,required:true}},emits:[`install`,`resume`,`release`],setup(__props,{expose:__expose,emit:__emit}){const props=__props;const emit=__emit;const open=ref(``);const label=computed(()=>packageLabeller(props.packages));const logs=ref({});const targetsById=computed(()=>{const labels=Object.fromEntries(props.destinations.map(entry=>[entry.id,entry.shortLabel||entry.label]));return Object.fromEntries(props.targets.map(target=>[target.id,{...target,destinationLabel:labels[target.destination]}]))});function outcomeLabel(release){if(release.kind===`dry-run`&&release.status===`succeeded`)return`Would publish — nothing was sent`;return statusInfo(release.status).label}const FAILED=[`failed`,`partial`,`interrupted`];const latestFailedRelease=computed(()=>{const newest=props.releases.find(entry=>entry.kind===`release`);return newest&&FAILED.includes(newest.status)?newest.id:``});const showFull=ref({});function toggle(id){open.value=open.value===id?``:id;const release=props.releases.find(entry=>entry.id===id);if(open.value&&FAILED.includes(release?.status)&&!logs.value[id])showLog(id)}function failureOutput(id){return(logs.value[id]||[]).filter(line=>line.level===`error`).map(line=>line.message).slice(1).join(`
|
|
2
|
+
`).trim()||``}async function reveal(id){open.value=id;await nextTick();showFull.value={...showFull.value,[id]:false};document.querySelector(`[data-release="${CSS.escape(id)}"]`)?.scrollIntoView({behavior:`smooth`,block:`start`});if(!logs.value[id])await showLog(id)}__expose({reveal});function targetName(release,targetId){const target=targetsById.value[targetId];const destination=target?.destination||release.targets?.[targetId]?.destination;const where=target?.destinationLabel||props.destinations.find(entry=>entry.id===destination)?.label||destination||``;return{icon:destinationIcon(destination),text:`${where} · ${label.value(target?.package||release.targets?.[targetId]?.package||targetId)}`}}async function showLog(id){const answer=await props.call(`/releases/${encodeURIComponent(id)}/logs`,{method:`GET`,refreshAfter:false}).catch(error=>({log:[{message:error.message}]}));logs.value={...logs.value,[id]:answer.log||[]}}function versionsLine(release){return Object.entries(release.versions||{}).map(([id,version])=>`${label.value(id)} ${version}`).join(` · `)||shortCommit(release.savedCommit)}function progress(release){const steps=release.steps||[];if(!steps.length)return 0;return Math.round(100*steps.filter(entry=>[`done`,`failed`,`skipped`].includes(entry.status)).length/steps.length)}function isApk(release,targetId){return targetsById.value[targetId]?.destination===`android-sideload`||release.targets?.[targetId]?.destination===`android-sideload`}return(_ctx,_cache)=>{return openBlock(),createElementBlock(`section`,_hoisted_1$6,[_cache[5]||(_cache[5]=createBaseVNode(`h2`,{id:`publish-history-title`,class:`publish-section-title`},`History`,-1)),!__props.releases.length?(openBlock(),createElementBlock(`p`,_hoisted_2$4,`Releases and dry runs appear here, with every step and the proof of what was published.`)):(openBlock(),createElementBlock(`ol`,_hoisted_3$3,[(openBlock(true),createElementBlock(Fragment,null,renderList(__props.releases,release=>{return openBlock(),createElementBlock(`li`,{key:release.id,class:normalizeClass({"is-open":open.value===release.id}),"data-release":release.id},[createBaseVNode(`button`,{class:`publish-history__row`,type:`button`,"aria-expanded":open.value===release.id,onClick:$event=>toggle(release.id)},[createVNode(VIcon,{color:unref(statusInfo)(release.status).color,icon:release.status===`running`?release.kind===`dry-run`?unref(mdiTestTube):unref(mdiRocketLaunchOutline):unref(statusInfo)(release.status).icon,size:`22`},null,8,[`color`,`icon`]),createBaseVNode(`span`,_hoisted_6$2,[createBaseVNode(`strong`,null,toDisplayString(release.kind===`dry-run`?`Dry run`:`Release`)+` · `+toDisplayString(versionsLine(release)),1),createBaseVNode(`span`,null,toDisplayString(outcomeLabel(release))+` · `+toDisplayString(unref(relativeTime)(release.finishedAt||release.createdAt))+` · plan `+toDisplayString(release.planId),1)]),createVNode(VIcon,{icon:unref(mdiChevronDown),class:`publish-history__chevron`,size:`20`},null,8,[`icon`])],8,_hoisted_5$2),release.status===`running`?(openBlock(),createBlock(VProgressLinear,{key:0,"model-value":progress(release),color:`primary`,height:`3`},null,8,[`model-value`])):createCommentVNode(``,true),open.value===release.id||release.status===`running`?(openBlock(),createElementBlock(`div`,_hoisted_7$2,[createBaseVNode(`ol`,_hoisted_8$2,[(openBlock(true),createElementBlock(Fragment,null,renderList(release.steps,entry=>{return openBlock(),createElementBlock(`li`,{key:entry.id},[createVNode(VIcon,{color:unref(statusInfo)(entry.status).color,icon:unref(statusInfo)(entry.status).icon,size:`16`},null,8,[`color`,`icon`]),createBaseVNode(`span`,null,toDisplayString(unref(stepLabel)(entry.id,targetsById.value,label.value)),1),createBaseVNode(`span`,_hoisted_9$2,toDisplayString(entry.message),1)])}),128))]),Object.keys(release.targets||{}).length?(openBlock(),createElementBlock(`ul`,_hoisted_10$2,[(openBlock(true),createElementBlock(Fragment,null,renderList(release.targets,(outcome,targetId)=>{return openBlock(),createElementBlock(`li`,{key:targetId},[createBaseVNode(`strong`,_hoisted_11$2,[createVNode(VIcon,{icon:targetName(release,targetId).icon,size:`16`},null,8,[`icon`]),createTextVNode(toDisplayString(targetName(release,targetId).text),1)]),outcome.error?(openBlock(),createElementBlock(`span`,_hoisted_12$2,toDisplayString(outcome.error.message),1)):(openBlock(),createElementBlock(`span`,_hoisted_13$2,toDisplayString(outcome.alreadyPublished?`already published · `:``)+toDisplayString(unref(proofLine)({checksum:outcome.checksum,...outcome.proof})||unref(statusInfo)(outcome.status).label),1)),release.kind===`release`&&outcome.status===`proven`&&isApk(release,targetId)?(openBlock(),createElementBlock(`span`,_hoisted_14$2,[createVNode(VBtn,{href:unref(apkDownloadUrl)(release.id,targetId),"prepend-icon":unref(mdiDownload),rounded:`pill`,size:`small`,variant:`text`},{default:withCtx(()=>[..._cache[1]||(_cache[1]=[createTextVNode(`APK`,-1)])]),_:1},8,[`href`,`prepend-icon`]),createVNode(VBtn,{"prepend-icon":unref(mdiQrcode),rounded:`pill`,size:`small`,variant:`text`,onClick:$event=>emit(`install`,{releaseId:release.id,targetId})},{default:withCtx(()=>[..._cache[2]||(_cache[2]=[createTextVNode(`QR`,-1)])]),_:1},8,[`prepend-icon`,`onClick`])])):createCommentVNode(``,true)])}),128))])):createCommentVNode(``,true),release.error?(openBlock(),createElementBlock(`p`,_hoisted_15$2,toDisplayString(release.error.message),1)):createCommentVNode(``,true),FAILED.includes(release.status)&&failureOutput(release.id)&&!showFull.value[release.id]?(openBlock(),createElementBlock(`pre`,_hoisted_16$2,toDisplayString(failureOutput(release.id)),1)):createCommentVNode(``,true),createBaseVNode(`div`,_hoisted_17$2,[release.kind===`release`&&FAILED.includes(release.status)&&release.id===latestFailedRelease.value?(openBlock(),createElementBlock(Fragment,{key:0},[!__props.savedCommit||__props.savedCommit===release.savedCommit?(openBlock(),createBlock(VBtn,{key:0,"prepend-icon":unref(mdiReplay),rounded:`pill`,size:`small`,variant:`tonal`,onClick:$event=>emit(`resume`,release)},{default:withCtx(()=>[..._cache[3]||(_cache[3]=[createTextVNode(` Finish this release `,-1)])]),_:1},8,[`prepend-icon`,`onClick`])):(openBlock(),createBlock(VBtn,{key:1,"prepend-icon":unref(mdiRocketLaunchOutline),rounded:`pill`,size:`small`,variant:`tonal`,onClick:_cache[0]||(_cache[0]=$event=>emit(`release`))},{default:withCtx(()=>[..._cache[4]||(_cache[4]=[createTextVNode(` Release the new saved work `,-1)])]),_:1},8,[`prepend-icon`]))],64)):createCommentVNode(``,true),createVNode(VBtn,{rounded:`pill`,size:`small`,variant:`text`,onClick:$event=>{showFull.value={...showFull.value,[release.id]:!showFull.value[release.id]};showLog(release.id)}},{default:withCtx(()=>[createTextVNode(toDisplayString(showFull.value[release.id]?`Hide full log`:`Full log`),1)]),_:2},1032,[`onClick`])]),logs.value[release.id]&&showFull.value[release.id]?(openBlock(),createElementBlock(`pre`,_hoisted_18$2,toDisplayString(logs.value[release.id].map(line=>`${line.at?line.at.slice(11,19)+` `:``}${line.message}`).join(`
|
|
3
|
+
`)||`No log lines.`),1)):createCommentVNode(``,true)])):createCommentVNode(``,true)],10,_hoisted_4$3)}),128))]))])}}};var ReleaseHistory_default=_plugin_vue_export_helper_default(_sfc_main$7,[[`__scopeId`,`data-v-d3846248`]]);var _hoisted_1$5=[`data-target`];var _hoisted_2$3={class:`publish-target__head`};var _hoisted_3$2={class:`publish-target__icon`,"aria-hidden":`true`};var _hoisted_4$2={class:`publish-target__title`};var _hoisted_5$1={class:`publish-target__version`,"aria-live":`polite`};var _hoisted_6$1={class:`publish-target__pending`};var _hoisted_7$1={class:`publish-target__live`};var _hoisted_8$1={class:`publish-target__facts`};var _hoisted_9$1={key:0};var _hoisted_10$1={class:`publish-target__verified-files`};var _hoisted_11$1=[`title`];var _hoisted_12$1={class:`publish-target__file-lines`};var _hoisted_13$1={class:`publish-target__file`};var _hoisted_14$1={class:`publish-target__mono`};var _hoisted_15$1={key:1};var _hoisted_16$1=[`title`];var _hoisted_17$1={class:`publish-target__mono`};var _hoisted_18$1={key:1,class:`publish-target__actions`};var _sfc_main$6={__name:`TargetCard`,props:{target:{type:Object,required:true},destination:{type:Object,default:null},packageInfo:{type:Object,default:null},accounts:{type:Array,default:()=>[]},busy:{type:Boolean,default:false},waiting:{type:String,default:``},activity:{type:Object,default:()=>({})}},emits:[`remove`,`change-account`,`show-release`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const accent=computed(()=>destinationAccent(props.target.destination));const latest=computed(()=>props.target.latest||null);const account=computed(()=>props.accounts.find(entry=>entry.id===props.target.account)||null);const proof=computed(()=>latest.value?proofLine({checksum:latest.value.checksum,...latest.value.proof,url:``}):``);const proofFiles=computed(()=>{const facts=latest.value?.proof||{};return(Array.isArray(facts.files)&&facts.files.length?facts.files:Array.isArray(facts.assets)?facts.assets:[]).filter(file=>file?.name&&/^sha256:[0-9a-f]{64}$/u.test(String(file.sha256||``))).map(file=>({name:file.name,sha256:String(file.sha256).slice(7)}))});const accountChoices=computed(()=>props.accounts.filter(entry=>entry.kind===props.destination?.accountKind));const pageUrl=computed(()=>{const proofFacts=latest.value?.proof||{};if(proofFacts.page)return proofFacts.page;return proofFacts.package?publicPageUrl(props.target.destination,{package:proofFacts.package,version:latest.value.version,settings:props.target.settings}):``});const failure=computed(()=>props.activity?.failure||null);return(_ctx,_cache)=>{return openBlock(),createElementBlock(`article`,{class:normalizeClass([`publish-target`,[`publish-target--${accent.value}`,{"is-running":__props.activity.running,"is-live":latest.value&&!__props.activity.running}]]),"data-target":__props.target.id},[createBaseVNode(`header`,_hoisted_2$3,[createBaseVNode(`span`,_hoisted_3$2,[createVNode(VIcon,{icon:unref(destinationIcon)(__props.target.destination),size:`22`},null,8,[`icon`])]),createBaseVNode(`div`,_hoisted_4$2,[createBaseVNode(`h3`,null,toDisplayString(__props.destination?.label||__props.target.destination),1),createBaseVNode(`p`,null,[createTextVNode(toDisplayString(__props.packageInfo?.label||__props.target.package),1),account.value?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(` · `+toDisplayString(account.value.label),1)],64)):createCommentVNode(``,true)])]),createVNode(VMenu,{location:`bottom end`},{activator:withCtx(({props:menu})=>[createVNode(VBtn,mergeProps(menu,{"aria-label":`More for ${__props.target.id}`,disabled:__props.busy,icon:unref(mdiDotsVertical),size:`small`,variant:`text`}),null,16,[`aria-label`,`disabled`,`icon`])]),default:withCtx(()=>[createVNode(VList,{density:`compact`,"min-width":`220`},{default:withCtx(()=>[(openBlock(true),createElementBlock(Fragment,null,renderList(accountChoices.value,choice=>{return openBlock(),createBlock(VListItem,{key:choice.id,active:choice.id===__props.target.account,"prepend-icon":unref(mdiAccountKeyOutline),title:`Use ${choice.label}`,onClick:$event=>emit(`change-account`,choice.id)},null,8,[`active`,`prepend-icon`,`title`,`onClick`])}),128)),createVNode(VListItem,{"prepend-icon":unref(mdiTrashCanOutline),"base-color":`error`,title:`Remove target`,onClick:_cache[0]||(_cache[0]=$event=>emit(`remove`))},null,8,[`prepend-icon`])]),_:1})]),_:1})]),createBaseVNode(`div`,_hoisted_5$1,[__props.activity.running?(openBlock(),createElementBlock(Fragment,{key:0},[createBaseVNode(`strong`,_hoisted_6$1,toDisplayString(__props.activity.version?`Publishing ${__props.activity.version}`:`Publishing`)+`…`,1),createVNode(VProgressLinear,{class:`publish-target__progress`,color:`primary`,indeterminate:``,rounded:``})],64)):latest.value?(openBlock(),createElementBlock(Fragment,{key:1},[createBaseVNode(`strong`,null,toDisplayString(latest.value.version),1),createBaseVNode(`span`,_hoisted_7$1,[_cache[2]||(_cache[2]=createBaseVNode(`i`,{"aria-hidden":`true`},null,-1)),createTextVNode(`Live · published `+toDisplayString(unref(relativeTime)(latest.value.at)),1)])],64)):(openBlock(),createElementBlock(Fragment,{key:2},[_cache[3]||(_cache[3]=createBaseVNode(`strong`,{class:`publish-target__none`},`Not published yet`,-1)),createBaseVNode(`span`,null,toDisplayString(__props.waiting||`Ready for its first release`),1)],64))]),failure.value&&!__props.activity.running?(openBlock(),createElementBlock(`button`,{key:0,class:`publish-target__failure`,type:`button`,onClick:_cache[1]||(_cache[1]=$event=>emit(`show-release`,failure.value.release.id))},[createVNode(VIcon,{icon:unref(mdiAlertCircleOutline),size:`18`},null,8,[`icon`]),createBaseVNode(`span`,null,[_cache[4]||(_cache[4]=createBaseVNode(`strong`,null,`Last release failed.`,-1)),createTextVNode(` `+toDisplayString(failure.value.message),1)])])):createCommentVNode(``,true),createBaseVNode(`dl`,_hoisted_8$1,[renderSlot(_ctx.$slots,`facts`,{},void 0,true),proofFiles.value.length&&!__props.activity.running?(openBlock(),createElementBlock(`div`,_hoisted_9$1,[_cache[5]||(_cache[5]=createBaseVNode(`dt`,null,`Verified`,-1)),createBaseVNode(`dd`,_hoisted_10$1,[(openBlock(true),createElementBlock(Fragment,null,renderList(proofFiles.value,file=>{return openBlock(),createElementBlock(`span`,{key:file.name,class:`publish-target__verified publish-target__verified--file`,title:`Read back from ${__props.destination?.label||`the destination`} after publishing: ${file.name} sha256 ${file.sha256}`},[createVNode(VIcon,{icon:unref(mdiCheckDecagram),color:`success`,size:`16`},null,8,[`icon`]),createBaseVNode(`span`,_hoisted_12$1,[createBaseVNode(`span`,_hoisted_13$1,toDisplayString(file.name),1),createBaseVNode(`span`,_hoisted_14$1,`sha256 `+toDisplayString(file.sha256.slice(0,12))+`…`,1)])],8,_hoisted_11$1)}),128))])])):proof.value&&!__props.activity.running?(openBlock(),createElementBlock(`div`,_hoisted_15$1,[_cache[6]||(_cache[6]=createBaseVNode(`dt`,null,`Verified`,-1)),createBaseVNode(`dd`,{class:`publish-target__verified`,title:`Read back from ${__props.destination?.label||`the destination`} after publishing: ${proof.value}`},[createVNode(VIcon,{icon:unref(mdiCheckDecagram),color:`success`,size:`16`},null,8,[`icon`]),createBaseVNode(`span`,_hoisted_17$1,toDisplayString(proof.value),1)],8,_hoisted_16$1)])):createCommentVNode(``,true)]),renderSlot(_ctx.$slots,`setup`,{},void 0,true),_ctx.$slots.actions||pageUrl.value?(openBlock(),createElementBlock(`footer`,_hoisted_18$1,[renderSlot(_ctx.$slots,`actions`,{},void 0,true),pageUrl.value?(openBlock(),createBlock(VBtn,{key:0,"append-icon":unref(mdiOpenInNew),href:pageUrl.value,rel:`noopener`,rounded:`pill`,size:`small`,target:`_blank`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(` View `+toDisplayString(latest.value.version),1)]),_:1},8,[`append-icon`,`href`])):createCommentVNode(``,true)])):createCommentVNode(``,true)],10,_hoisted_1$5)}}};var TargetCard_default=_plugin_vue_export_helper_default(_sfc_main$6,[[`__scopeId`,`data-v-aa617e31`]]);var _hoisted_1$4={key:0};var _hoisted_2$2=[`title`];var _hoisted_3$1={key:1};var _hoisted_4$1={class:`publish-android-tasks`,"aria-label":`One-time setup`};var _sfc_main$5={__name:`AndroidSideloadCard`,props:{target:{type:Object,required:true},toolchains:{type:Object,default:()=>({})},busy:{type:Boolean,default:false}},emits:[`remove`,`change-account`,`setup-tools`,`create-key`,`recovery-kit`,`install`,`show-release`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const keyExists=computed(()=>Boolean(props.target.installKey?.exists));const kitCovers=computed(()=>Boolean(props.target.installKey?.coveredByRecoveryKit));const installing=computed(()=>props.toolchains.install?.status===`running`);const toolsReady=computed(()=>Boolean(props.toolchains.java?.ready&&props.toolchains.androidSdk?.ready));const tasks=computed(()=>[{id:`tools`,done:toolsReady.value,running:installing.value,title:`Android build tools`,detail:installing.value?props.toolchains.install?.message||`Downloading Java and the Android SDK…`:toolsReady.value?`Java and the Android SDK are ready.`:`A one-time 1.9 GB download after you accept Google's licence.`,action:`Set up`,event:`setup-tools`},{id:`key`,done:keyExists.value,title:`Install key`,detail:keyExists.value?`Signs every version so your phone accepts updates.`:`Vibe64 makes it and keeps it in your publishing keys.`,action:`Create`,event:`create-key`,needs:toolsReady.value?``:`Set up the tools first`},{id:`kit`,done:kitCovers.value,title:`Recovery kit`,detail:kitCovers.value?`Your kit holds this key.`:`Without it, a lost key means reinstalling the app.`,action:`Save kit`,event:`recovery-kit`,needs:keyExists.value?``:`Create the key first`}]);const ready=computed(()=>tasks.value.every(task=>task.done));return(_ctx,_cache)=>{return openBlock(),createBlock(TargetCard_default,mergeProps(_ctx.$attrs,{busy:__props.busy,target:__props.target,waiting:ready.value?``:`Finish the one-time setup below first`,onChangeAccount:_cache[1]||(_cache[1]=$event=>emit(`change-account`,$event)),onRemove:_cache[2]||(_cache[2]=$event=>emit(`remove`)),onShowRelease:_cache[3]||(_cache[3]=$event=>emit(`show-release`,$event))}),createSlots({facts:withCtx(()=>[__props.target.settings?.certificateSha256?(openBlock(),createElementBlock(`div`,_hoisted_1$4,[_cache[4]||(_cache[4]=createBaseVNode(`dt`,null,`Install key`,-1)),createBaseVNode(`dd`,{class:`publish-target__mono`,title:__props.target.settings.certificateSha256},toDisplayString(__props.target.settings.certificateSha256.slice(0,23))+`…`,9,_hoisted_2$2)])):createCommentVNode(``,true),__props.target.latest?.proof?.size?(openBlock(),createElementBlock(`div`,_hoisted_3$1,[_cache[5]||(_cache[5]=createBaseVNode(`dt`,null,`Size`,-1)),createBaseVNode(`dd`,null,toDisplayString((__props.target.latest.proof.size/1048576).toFixed(1))+` MB`,1)])):createCommentVNode(``,true)]),_:2},[!ready.value?{name:`setup`,fn:withCtx(()=>[createBaseVNode(`ol`,_hoisted_4$1,[(openBlock(true),createElementBlock(Fragment,null,renderList(tasks.value,task=>{return openBlock(),createElementBlock(`li`,{key:task.id,class:normalizeClass({"is-done":task.done})},[createVNode(VIcon,{color:task.done?`success`:task.running?`primary`:void 0,icon:task.done?unref(mdiCheckCircle):task.running?unref(mdiProgressClock):unref(mdiCircleOutline),size:`20`},null,8,[`color`,`icon`]),createBaseVNode(`div`,null,[createBaseVNode(`strong`,null,toDisplayString(task.title),1),createBaseVNode(`span`,null,toDisplayString(task.detail),1),task.running?(openBlock(),createBlock(VProgressLinear,{key:0,class:`mt-1`,color:`primary`,indeterminate:``,rounded:``})):createCommentVNode(``,true)]),!task.done&&!task.running?(openBlock(),createBlock(VBtn,{key:0,disabled:__props.busy||Boolean(task.needs),title:task.needs||void 0,rounded:`pill`,size:`small`,variant:`tonal`,onClick:$event=>emit(task.event)},{default:withCtx(()=>[createTextVNode(toDisplayString(task.action),1)]),_:2},1032,[`disabled`,`title`,`onClick`])):createCommentVNode(``,true)],2)}),128))])]),key:`0`}:void 0,__props.target.latest?.downloadable?{name:`actions`,fn:withCtx(()=>[createVNode(VBtn,{"prepend-icon":unref(mdiQrcode),color:`success`,rounded:`pill`,variant:`flat`,onClick:_cache[0]||(_cache[0]=$event=>emit(`install`))},{default:withCtx(()=>[..._cache[6]||(_cache[6]=[createTextVNode(`Install on phone`,-1)])]),_:1},8,[`prepend-icon`])]),key:`1`}:void 0]),1040,[`busy`,`target`,`waiting`])}}};var AndroidSideloadCard_default=_plugin_vue_export_helper_default(_sfc_main$5,[[`__scopeId`,`data-v-12e9de34`]]);var _hoisted_1$3={key:0};var _sfc_main$4={__name:`GithubReleasesCard`,props:{target:{type:Object,required:true}},emits:[`remove`,`change-account`,`show-release`],setup(__props){return(_ctx,_cache)=>{return openBlock(),createBlock(TargetCard_default,mergeProps(_ctx.$attrs,{target:__props.target,onChangeAccount:_cache[0]||(_cache[0]=$event=>_ctx.$emit(`change-account`,$event)),onRemove:_cache[1]||(_cache[1]=$event=>_ctx.$emit(`remove`)),onShowRelease:_cache[2]||(_cache[2]=$event=>_ctx.$emit(`show-release`,$event))}),createSlots({facts:withCtx(()=>[createBaseVNode(`div`,null,[_cache[3]||(_cache[3]=createBaseVNode(`dt`,null,`Repository`,-1)),createBaseVNode(`dd`,null,toDisplayString(__props.target.settings?.repository),1)]),__props.target.latest?.proof?.tag?(openBlock(),createElementBlock(`div`,_hoisted_1$3,[_cache[4]||(_cache[4]=createBaseVNode(`dt`,null,`Release`,-1)),createBaseVNode(`dd`,null,toDisplayString(__props.target.latest.proof.tag),1)])):createCommentVNode(``,true)]),_:2},[__props.target.latest?.proof?.url?{name:`actions`,fn:withCtx(()=>[createVNode(VBtn,{"append-icon":unref(mdiOpenInNew),href:__props.target.latest.proof.url,rel:`noopener`,rounded:`pill`,size:`small`,target:`_blank`,variant:`tonal`},{default:withCtx(()=>[..._cache[5]||(_cache[5]=[createTextVNode(` Open release `,-1)])]),_:1},8,[`append-icon`,`href`])]),key:`0`}:void 0]),1040,[`target`])}}};var _hoisted_1$2=[`title`];var _hoisted_2$1={key:0};var _sfc_main$3={__name:`NpmCard`,props:{target:{type:Object,required:true}},emits:[`remove`,`change-account`,`show-release`],setup(__props){return(_ctx,_cache)=>{return openBlock(),createBlock(TargetCard_default,mergeProps(_ctx.$attrs,{target:__props.target,onChangeAccount:_cache[0]||(_cache[0]=$event=>_ctx.$emit(`change-account`,$event)),onRemove:_cache[1]||(_cache[1]=$event=>_ctx.$emit(`remove`)),onShowRelease:_cache[2]||(_cache[2]=$event=>_ctx.$emit(`show-release`,$event))}),{facts:withCtx(()=>[createBaseVNode(`div`,null,[_cache[3]||(_cache[3]=createBaseVNode(`dt`,null,`Registry`,-1)),createBaseVNode(`dd`,{title:__props.target.settings?.registry},toDisplayString(unref(hostOf)(__props.target.settings?.registry)),9,_hoisted_1$2)]),createBaseVNode(`div`,null,[_cache[4]||(_cache[4]=createBaseVNode(`dt`,null,`Tag`,-1)),createBaseVNode(`dd`,null,toDisplayString(__props.target.channel||`latest`),1)]),__props.target.settings?.access?(openBlock(),createElementBlock(`div`,_hoisted_2$1,[_cache[5]||(_cache[5]=createBaseVNode(`dt`,null,`Access`,-1)),createBaseVNode(`dd`,null,toDisplayString(__props.target.settings.access),1)])):createCommentVNode(``,true)]),_:1},16,[`target`])}}};var _hoisted_1$1=[`title`];var _sfc_main$2={__name:`PypiCard`,props:{target:{type:Object,required:true}},emits:[`remove`,`change-account`,`show-release`],setup(__props){const props=__props;const where=computed(()=>{const settings=props.target.settings||{};if(settings.instance===`testpypi`)return`TestPyPI`;if(settings.instance===`pypi`)return`pypi.org`;return hostOf(settings.repository||``)});return(_ctx,_cache)=>{return openBlock(),createBlock(TargetCard_default,mergeProps(_ctx.$attrs,{target:__props.target,onChangeAccount:_cache[0]||(_cache[0]=$event=>_ctx.$emit(`change-account`,$event)),onRemove:_cache[1]||(_cache[1]=$event=>_ctx.$emit(`remove`)),onShowRelease:_cache[2]||(_cache[2]=$event=>_ctx.$emit(`show-release`,$event))}),{facts:withCtx(()=>[createBaseVNode(`div`,null,[_cache[3]||(_cache[3]=createBaseVNode(`dt`,null,`Index`,-1)),createBaseVNode(`dd`,{title:__props.target.settings?.repository||where.value},toDisplayString(where.value),9,_hoisted_1$1)])]),_:1},16,[`target`])}}};var _hoisted_1={class:`publish-page`};var _hoisted_2={key:0,class:`publish-banner publish-banner--ask`,role:`status`};var _hoisted_3={key:1,class:`publish-banner publish-banner--running`,role:`status`};var _hoisted_4={class:`publish-saved`,"aria-label":`Saved work`};var _hoisted_5={class:`publish-saved__line`};var _hoisted_6={class:`publish-saved__line`};var _hoisted_7={key:0,class:`publish-saved__output`};var _hoisted_8={class:`publish-saved__packages`};var _hoisted_9={class:`publish-saved__chips`};var _hoisted_10={key:0,class:`publish-saved__muted`};var _hoisted_11={key:3,class:`publish-empty`};var _hoisted_12={key:0,class:`publish-empty__diagnostics`};var _hoisted_13={key:0};var _hoisted_14={key:4,class:`publish-targets`,"aria-labelledby":`publish-targets-title`};var _hoisted_15={key:0,class:`publish-targets__grid`};var _hoisted_16={class:`publish-targets__add-icon`};var _hoisted_17={key:1,class:`publish-start`};var _hoisted_18={class:`publish-start__lead`};var _hoisted_19={class:`publish-start__grid`};var _hoisted_20=[`disabled`,`onClick`];var _hoisted_21={class:`publish-start__icon`};var _hoisted_22={key:0,class:`publish-start__meta publish-start__meta--missing`};var _hoisted_23={key:1,class:`publish-start__meta`};var _sfc_main$1={__name:`PublishPage`,props:{dashboardContext:{type:Object,default:()=>({})},request:{type:Function,default:void 0}},setup(__props){const props=__props;const PACKER_KINDS={"web-bundle":`web files`,capacitor:`app`,npm:`npm package`,"python-dist":`Python package`};const CARDS={npm:_sfc_main$3,pypi:_sfc_main$2,"github-releases":_sfc_main$4,"android-sideload":AndroidSideloadCard_default};const{state,loadError,refresh,call}=usePublishing({active:()=>props.dashboardContext?.active!==false,...props.request?{request:props.request}:{}});refresh();const dialogs=ref({add:false,release:false,confirm:false,keys:false,kit:false,licence:false,install:false});const addPreset=ref(``);const addAccountKind=ref(``);const confirmation=ref({plan:null,targetIds:[],acknowledged:[],requestedBy:``});const install=ref({releaseId:``,targetId:``,title:``,version:``});const pageError=ref(``);const working=ref(``);const destinations=computed(()=>(state.value?.destinations||[]).map(entry=>({...entry,accountKind:(state.value?.accountKinds||[]).find(kind=>kind.destination===entry.id)?.id||``})));const destinationById=computed(()=>Object.fromEntries(destinations.value.map(entry=>[entry.id,entry])));const packages=computed(()=>state.value?.packaging?.packages||[]);const packageById=computed(()=>Object.fromEntries(packages.value.map(entry=>[entry.id,entry])));const targets=computed(()=>state.value?.targets||[]);const baseline=computed(()=>state.value?.baseline||{});const checks=computed(()=>state.value?.checks||null);const packagingReady=computed(()=>state.value?.packaging?.status===`ready`);const running=computed(()=>(state.value?.releases||[]).find(release=>release.id===state.value?.activeRelease)||(state.value?.releases||[]).find(release=>release.status===`running`)||null);const pending=computed(()=>state.value?.pendingConfirmation||null);const keysIcon=computed(()=>state.value?.keys?.unlocked?mdiLockOpenVariantOutline:mdiShieldKeyOutline);const history=ref(null);function availability(entry){const reason=destinationGap(entry,{packages:packages.value,baseline:baseline.value});return{ok:!reason,reason}}const startDestinations=computed(()=>destinations.value.map(entry=>({...entry,availability:availability(entry)})).sort((left,right)=>Number(right.availability.ok)-Number(left.availability.ok)));const startLead=computed(()=>{const open=startDestinations.value.filter(entry=>entry.availability.ok);if(!open.length)return`None of these fits this project's packages yet.`;const free=open.filter(entry=>entry.zeroAccount).length;return free?`Choose where your first release goes. ${free===1?`One needs`:`${free} need`} no new account.`:`Choose where your first release goes.`});const activityByTarget=computed(()=>Object.fromEntries(targets.value.map(target=>{const inFlight=running.value&&(running.value.steps||[]).some(entry=>entry.id===`publish:${target.id}`)&&running.value.kind===`release`;return[target.id,{running:Boolean(inFlight),version:inFlight?running.value.versions?.[target.package]||``:``,failure:lastFailure(target,state.value?.releases||[])}]})));const runChecks=()=>act(`checks`,()=>call(`/checks`));const showOutput=ref(false);function openAdd(preset=``){addPreset.value=preset;dialogs.value.add=true}const returnToAdd=ref(``);function openKeys(kind=``){addAccountKind.value=kind;returnToAdd.value=kind&&dialogs.value.add?addPreset.value||destinations.value.find(entry=>entry.accountKind===kind)?.id||``:``;dialogs.value.add=false;dialogs.value.keys=true}watch(()=>dialogs.value.keys,open=>{if(open||!returnToAdd.value)return;addPreset.value=returnToAdd.value;returnToAdd.value=``;dialogs.value.add=true});async function act(name,work){working.value=name;pageError.value=``;try{await work()}catch(failure){pageError.value=failure.message}finally{working.value=``}}const removeTarget=target=>act(`remove:${target.id}`,()=>call(`/targets/${encodeURIComponent(target.id)}`,{method:`DELETE`}));const changeAccount=(target,account)=>act(`account:${target.id}`,()=>call(`/targets/${encodeURIComponent(target.id)}`,{method:`PATCH`,body:{account}}));const createKey=target=>act(`key:${target.id}`,async()=>{if(!state.value?.keys?.unlocked){openKeys();throw new Error(`Unlock your publishing keys, then create the install key.`)}await call(`/targets/${encodeURIComponent(target.id)}/install-key`)});function openConfirm({plan,targetIds,acknowledged=[],requestedBy=``}){confirmation.value={plan,targetIds,acknowledged,requestedBy};dialogs.value.release=false;dialogs.value.confirm=true}function planAgain(){dialogs.value.confirm=false;dialogs.value.release=true}const reviewRequest=()=>act(`review`,async()=>{const{plan}=await call(`/plan`,{body:{targetIds:pending.value.targetIds},refreshAfter:false});if(plan.planHash!==pending.value.planHash)throw new Error(`The saved work changed since this was asked for. Open Release to review the new plan.`);openConfirm({plan,targetIds:pending.value.targetIds,requestedBy:`assistant`})});const dismissRequest=()=>act(`dismiss`,()=>call(`/confirmation/request`,{method:`DELETE`}));const notice=ref(``);const resume=release=>act(`resume`,async()=>{const targetIds=(release.steps||[]).filter(entry=>entry.id.startsWith(`publish:`)).map(entry=>entry.id.slice(8));const{plan}=await call(`/plan`,{body:{targetIds},refreshAfter:false});if(plan.planHash!==release.planHash){notice.value=`This release's plan changed since you confirmed it, so here is a new release from the saved work.`;dialogs.value.release=true;return}openConfirm({plan,targetIds})});function openInstall({releaseId,targetId}){const target=targets.value.find(entry=>entry.id===targetId);const release=(state.value?.releases||[]).find(entry=>entry.id===releaseId);install.value={releaseId,targetId,title:packageById.value[target?.package]?.applicationName||target?.package||``,version:release?.versions?.[target?.package]||target?.latest?.version||``};dialogs.value.install=true}return(_ctx,_cache)=>{return openBlock(),createElementBlock(`section`,_hoisted_1,[createVNode(Vibe64DashboardPageHeader_default,{icon:unref(mdiPackageVariantClosed),description:`Release your project as an app on your phone or a package people can install.`,title:`Publish`},{actions:withCtx(()=>[createVNode(VBtn,{"prepend-icon":keysIcon.value,"data-test":`open-keys`,rounded:`pill`,variant:`tonal`,onClick:_cache[0]||(_cache[0]=$event=>openKeys())},{default:withCtx(()=>[..._cache[19]||(_cache[19]=[createTextVNode(`Accounts & keys`,-1)])]),_:1},8,[`prepend-icon`]),createVNode(VBtn,{disabled:!targets.value.length||!packagingReady.value||Boolean(running.value),"prepend-icon":unref(mdiRocketLaunchOutline),color:`primary`,"data-test":`open-release`,rounded:`pill`,variant:`flat`,onClick:_cache[1]||(_cache[1]=$event=>dialogs.value.release=true)},{default:withCtx(()=>[..._cache[20]||(_cache[20]=[createTextVNode(` Release `,-1)])]),_:1},8,[`disabled`,`prepend-icon`])]),_:1},8,[`icon`]),unref(loadError)?(openBlock(),createBlock(VAlert,{key:0,type:`error`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(loadError)),1)]),_:1})):createCommentVNode(``,true),!unref(state)&&!unref(loadError)?(openBlock(),createBlock(VSkeletonLoader,{key:1,type:`article, card`})):createCommentVNode(``,true),unref(state)?(openBlock(),createElementBlock(Fragment,{key:2},[pending.value?(openBlock(),createElementBlock(`div`,_hoisted_2,[createVNode(VIcon,{icon:unref(mdiRobotOutline),size:`22`},null,8,[`icon`]),createBaseVNode(`div`,null,[createBaseVNode(`strong`,null,`Your Colleague asked to publish plan `+toDisplayString(pending.value.planId),1),_cache[21]||(_cache[21]=createBaseVNode(`span`,null,`Nothing is published until you review and confirm it here.`,-1))]),createVNode(VBtn,{loading:working.value===`dismiss`,rounded:`pill`,variant:`text`,onClick:dismissRequest},{default:withCtx(()=>[..._cache[22]||(_cache[22]=[createTextVNode(`Dismiss`,-1)])]),_:1},8,[`loading`]),createVNode(VBtn,{loading:working.value===`review`,color:`primary`,rounded:`pill`,variant:`flat`,onClick:reviewRequest},{default:withCtx(()=>[..._cache[23]||(_cache[23]=[createTextVNode(`Review`,-1)])]),_:1},8,[`loading`])])):createCommentVNode(``,true),running.value?(openBlock(),createElementBlock(`div`,_hoisted_3,[createVNode(VIcon,{icon:unref(mdiProgressClock),class:`publish-banner__spin`,size:`22`},null,8,[`icon`]),createBaseVNode(`div`,null,[createBaseVNode(`strong`,null,toDisplayString(running.value.kind===`dry-run`?`Dry run`:`Releasing`)+` `+toDisplayString(Object.entries(running.value.versions||{}).map(([id,version])=>`${packageById.value[id]?.label||id} ${version}`).join(` · `)),1),createBaseVNode(`span`,null,toDisplayString((running.value.steps||[]).filter(entry=>entry.status===`done`).length)+` of `+toDisplayString((running.value.steps||[]).length)+` steps done. You can leave this page; it carries on.`,1)])])):createCommentVNode(``,true),!baseline.value.supported?(openBlock(),createBlock(VAlert,{key:2,type:`warning`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(baseline.value.message||`This project's repository cannot be published from here yet.`),1)]),_:1})):createCommentVNode(``,true),createBaseVNode(`section`,_hoisted_4,[createBaseVNode(`div`,null,[_cache[24]||(_cache[24]=createBaseVNode(`span`,{class:`publish-saved__label`},`Releases use your saved work`,-1)),createBaseVNode(`span`,_hoisted_5,[createVNode(VIcon,{icon:unref(mdiSourceCommit),size:`18`},null,8,[`icon`]),createBaseVNode(`code`,null,toDisplayString(unref(shortCommit)(baseline.value.commit)||`—`),1),createVNode(VIcon,{icon:unref(mdiSourceBranch),class:`ml-2`,size:`18`},null,8,[`icon`]),createTextVNode(` `+toDisplayString(baseline.value.branch||`—`)+` `,1),createVNode(VChip,{color:baseline.value.pushed?`success`:`warning`,class:`ml-1`,size:`x-small`,variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(baseline.value.pushed?`pushed`:`not pushed`),1)]),_:1},8,[`color`])])]),createBaseVNode(`div`,null,[_cache[25]||(_cache[25]=createBaseVNode(`span`,{class:`publish-saved__label`},`Checks`,-1)),createBaseVNode(`span`,_hoisted_6,[createVNode(VIcon,{class:normalizeClass({"publish-banner__spin":checks.value?.status===`running`}),color:unref(statusInfo)(checks.value?.status).color,icon:checks.value?unref(statusInfo)(checks.value.status).icon:unref(mdiClockOutline),size:`18`},null,8,[`class`,`color`,`icon`]),createTextVNode(` `+toDisplayString(checks.value?checks.value.status===`failed`?`${checks.value.failedCommand||`Checks`} failed`:unref(statusInfo)(checks.value.status).label:`Not run on this commit`)+` `,1),packagingReady.value&&(!checks.value||checks.value.status===`failed`)?(openBlock(),createBlock(VBtn,{key:0,loading:working.value===`checks`,"prepend-icon":unref(mdiPlay),class:`ml-1`,rounded:`pill`,size:`x-small`,variant:`tonal`,onClick:runChecks},{default:withCtx(()=>[createTextVNode(toDisplayString(checks.value?`Run again`:`Run checks`),1)]),_:1},8,[`loading`,`prepend-icon`])):createCommentVNode(``,true),checks.value?.status===`failed`&&checks.value.output?(openBlock(),createBlock(VBtn,{key:1,class:`publish-saved__output-toggle`,rounded:`pill`,size:`x-small`,variant:`text`,onClick:_cache[2]||(_cache[2]=$event=>showOutput.value=!showOutput.value)},{default:withCtx(()=>[createTextVNode(toDisplayString(showOutput.value?`Hide output`:`Show output`),1)]),_:1})):createCommentVNode(``,true)])]),showOutput.value&&checks.value?.status===`failed`&&checks.value.output?(openBlock(),createElementBlock(`pre`,_hoisted_7,toDisplayString(checks.value.output),1)):createCommentVNode(``,true),createBaseVNode(`div`,_hoisted_8,[_cache[26]||(_cache[26]=createBaseVNode(`span`,{class:`publish-saved__label`},`Packages`,-1)),createBaseVNode(`span`,_hoisted_9,[(openBlock(true),createElementBlock(Fragment,null,renderList(packages.value,entry=>{return openBlock(),createElementBlock(`span`,{key:entry.id,class:`publish-chip`},[createTextVNode(toDisplayString(entry.label)+` `,1),createBaseVNode(`em`,null,toDisplayString(entry.version||PACKER_KINDS[entry.packer]||entry.packer),1)])}),128)),!packages.value.length?(openBlock(),createElementBlock(`span`,_hoisted_10,`None yet`)):createCommentVNode(``,true)])])]),!packagingReady.value?(openBlock(),createElementBlock(`div`,_hoisted_11,[createVNode(VIcon,{icon:unref(mdiAlertOutline),color:`warning`,size:`40`},null,8,[`icon`]),_cache[27]||(_cache[27]=createBaseVNode(`h2`,null,`Tell Vibe64 what to build`,-1)),_cache[28]||(_cache[28]=createBaseVNode(`p`,null,[createTextVNode(` Publishing starts from the project's Packaging section, which says what each package is and how it is built. Ask your Colleague, for example: `),createBaseVNode(`q`,null,`Set up packaging so I can install this app on my phone`),createTextVNode(`, then Save. `)],-1)),unref(state).packaging.problem||unref(state).packaging.diagnostics.length?(openBlock(),createElementBlock(`ul`,_hoisted_12,[unref(state).packaging.problem?(openBlock(),createElementBlock(`li`,_hoisted_13,toDisplayString(unref(state).packaging.problem),1)):createCommentVNode(``,true),(openBlock(true),createElementBlock(Fragment,null,renderList(unref(state).packaging.diagnostics,message=>{return openBlock(),createElementBlock(`li`,{key:message},toDisplayString(message),1)}),128))])):createCommentVNode(``,true)])):(openBlock(),createElementBlock(`section`,_hoisted_14,[_cache[30]||(_cache[30]=createBaseVNode(`h2`,{id:`publish-targets-title`,class:`publish-section-title`},`Targets`,-1)),targets.value.length?(openBlock(),createElementBlock(`div`,_hoisted_15,[(openBlock(true),createElementBlock(Fragment,null,renderList(targets.value,target=>{return openBlock(),createBlock(resolveDynamicComponent(CARDS[target.destination]),{key:target.id,accounts:unref(state).accounts,activity:activityByTarget.value[target.id],busy:working.value.endsWith(`:${target.id}`),destination:destinationById.value[target.destination],"package-info":packageById.value[target.package],target,toolchains:unref(state).toolchains,onChangeAccount:$event=>changeAccount(target,$event),onCreateKey:$event=>createKey(target),onInstall:$event=>openInstall({releaseId:target.latest.releaseId,targetId:target.id}),onRecoveryKit:_cache[3]||(_cache[3]=$event=>dialogs.value.kit=true),onRemove:$event=>removeTarget(target),onSetupTools:_cache[4]||(_cache[4]=$event=>dialogs.value.licence=true),onShowRelease:_cache[5]||(_cache[5]=$event=>history.value?.reveal($event))},null,40,[`accounts`,`activity`,`busy`,`destination`,`package-info`,`target`,`toolchains`,`onChangeAccount`,`onCreateKey`,`onInstall`,`onRemove`])}),128)),createBaseVNode(`button`,{class:`publish-targets__add`,"data-test":`add-target`,type:`button`,onClick:_cache[6]||(_cache[6]=$event=>openAdd())},[createBaseVNode(`span`,_hoisted_16,[createVNode(VIcon,{icon:unref(mdiPlus),size:`22`},null,8,[`icon`])]),_cache[29]||(_cache[29]=createBaseVNode(`strong`,null,`Add target`,-1)),createBaseVNode(`span`,null,`Publish `+toDisplayString(packages.value.length===1?packages.value[0].label:`a package`)+` somewhere else too.`,1)])])):(openBlock(),createElementBlock(`div`,_hoisted_17,[createBaseVNode(`p`,_hoisted_18,toDisplayString(startLead.value),1),createBaseVNode(`div`,_hoisted_19,[(openBlock(true),createElementBlock(Fragment,null,renderList(startDestinations.value,entry=>{return openBlock(),createElementBlock(`button`,{key:entry.id,class:normalizeClass([`publish-start__tile--${unref(destinationAccent)(entry.id)}`,`publish-start__tile`]),disabled:!entry.availability.ok,type:`button`,onClick:$event=>openAdd(entry.id)},[createBaseVNode(`span`,_hoisted_21,[createVNode(VIcon,{icon:unref(destinationIcon)(entry.id),size:`26`},null,8,[`icon`])]),createBaseVNode(`strong`,null,toDisplayString(entry.label),1),createBaseVNode(`span`,null,toDisplayString(entry.summary),1),!entry.availability.ok?(openBlock(),createElementBlock(`span`,_hoisted_22,[createVNode(VIcon,{icon:unref(mdiAlertOutline),size:`14`},null,8,[`icon`]),createTextVNode(` `+toDisplayString(entry.availability.reason),1)])):(openBlock(),createElementBlock(`span`,_hoisted_23,[createVNode(VIcon,{icon:entry.id===`github-releases`?unref(mdiGithub):entry.zeroAccount?unref(mdiCheckCircle):unref(mdiAccountKeyOutline),size:`14`},null,8,[`icon`]),createTextVNode(` `+toDisplayString(entry.id===`github-releases`?`Your GitHub sign-in`:entry.zeroAccount?`No account`:`Needs an account`)+` · `+toDisplayString(entry.cost),1)]))],10,_hoisted_20)}),128))])]))])),createVNode(ReleaseHistory_default,{ref_key:`history`,ref:history,"active-release":unref(state).activeRelease||``,"saved-commit":baseline.value.commit||``,packages:packages.value,call:unref(call),destinations:destinations.value,releases:unref(state).releases,targets:targets.value,onInstall:openInstall,onRelease:_cache[7]||(_cache[7]=$event=>dialogs.value.release=true),onResume:resume},null,8,[`active-release`,`saved-commit`,`packages`,`call`,`destinations`,`releases`,`targets`])],64)):createCommentVNode(``,true),createVNode(VSnackbar,{"model-value":Boolean(pageError.value||notice.value),color:pageError.value?`error`:void 0,location:`bottom`,"max-width":`560`,timeout:`8000`,"onUpdate:modelValue":_cache[9]||(_cache[9]=$event=>{pageError.value=``;notice.value=``})},{actions:withCtx(()=>[createVNode(VBtn,{variant:`text`,onClick:_cache[8]||(_cache[8]=$event=>{pageError.value=``;notice.value=``})},{default:withCtx(()=>[..._cache[31]||(_cache[31]=[createTextVNode(`Close`,-1)])]),_:1})]),default:withCtx(()=>[createTextVNode(toDisplayString(pageError.value||notice.value)+` `,1)]),_:1},8,[`model-value`,`color`]),createVNode(AddTargetDialog_default,{modelValue:dialogs.value.add,"onUpdate:modelValue":_cache[10]||(_cache[10]=$event=>dialogs.value.add=$event),call:unref(call),preset:addPreset.value,state:unref(state),onAddAccount:openKeys},null,8,[`modelValue`,`call`,`preset`,`state`]),createVNode(ReleaseDialog_default,{modelValue:dialogs.value.release,"onUpdate:modelValue":_cache[11]||(_cache[11]=$event=>dialogs.value.release=$event),call:unref(call),"dashboard-context":__props.dashboardContext,state:unref(state),onAccounts:_cache[12]||(_cache[12]=$event=>openKeys()),onConfirm:openConfirm},null,8,[`modelValue`,`call`,`dashboard-context`,`state`]),createVNode(ConfirmPublishDialog_default,{modelValue:dialogs.value.confirm,"onUpdate:modelValue":_cache[13]||(_cache[13]=$event=>dialogs.value.confirm=$event),acknowledged:confirmation.value.acknowledged,call:unref(call),plan:confirmation.value.plan,"requested-by":confirmation.value.requestedBy,state:unref(state),"target-ids":confirmation.value.targetIds,onPlanChanged:planAgain},null,8,[`modelValue`,`acknowledged`,`call`,`plan`,`requested-by`,`state`,`target-ids`]),createVNode(PublishingAccountsPanel_default,{modelValue:dialogs.value.keys,"onUpdate:modelValue":_cache[14]||(_cache[14]=$event=>dialogs.value.keys=$event),"add-kind":addAccountKind.value,call:unref(call),state:unref(state),onRecoveryKit:_cache[15]||(_cache[15]=$event=>dialogs.value.kit=true)},null,8,[`modelValue`,`add-kind`,`call`,`state`]),createVNode(RecoveryKitDialog_default,{modelValue:dialogs.value.kit,"onUpdate:modelValue":_cache[16]||(_cache[16]=$event=>dialogs.value.kit=$event),call:unref(call),state:unref(state)},null,8,[`modelValue`,`call`,`state`]),createVNode(AndroidSdkLicenceDialog_default,{modelValue:dialogs.value.licence,"onUpdate:modelValue":_cache[17]||(_cache[17]=$event=>dialogs.value.licence=$event),call:unref(call),state:unref(state)},null,8,[`modelValue`,`call`,`state`]),createVNode(InstallOnPhoneDialog_default,{modelValue:dialogs.value.install,"onUpdate:modelValue":_cache[18]||(_cache[18]=$event=>dialogs.value.install=$event),call:unref(call),"release-id":install.value.releaseId,"target-id":install.value.targetId,title:install.value.title,version:install.value.version},null,8,[`modelValue`,`call`,`release-id`,`target-id`,`title`,`version`])])}}};var PublishPage_default=_plugin_vue_export_helper_default(_sfc_main$1,[[`__scopeId`,`data-v-27375b96`]]);var _sfc_main={__name:`index`,props:{dashboardContext:{default:()=>({}),type:Object}},setup(__props){return(_ctx,_cache)=>{return openBlock(),createBlock(unref(PublishPage_default),{"dashboard-context":__props.dashboardContext},null,8,[`dashboard-context`])}}};export{_sfc_main as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as createVNode,E as createTextVNode,Ht as watch,On as unref,_ as createBaseVNode,b as createElementBlock,bt as renderList,g as computed,mt as openBlock,o as Fragment,qt as withCtx,tr as toDisplayString,v as createBlock,vn as ref,y as createCommentVNode}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{_ as VIcon,cr as withKeys,lr as withModifiers}from"./VAvatar-H2hyOWlB.js";import{t as useEndpointResource,tt as useQueryClient}from"./useEndpointResource-tVvsJvd4.js";import{_ as useRouter,g as useRoute}from"./useApi-BPuI6ZR9-CFWU1m37.js";import{o as projectSlugFromRoute,r as projectAppPath}from"./vibe64ProjectScope.local-l5_-E6pq.js";import{t as VSelect}from"./VSelect-Dqnp_CFi.js";import{c as VListItemTitle,n as VList,s as VListItem}from"./VMenu-DnhVIMrr.js";import{t as VChip}from"./VChip-Uixfx461.js";import{t as VTextField}from"./VTextField-CnkGeXaT.js";import{r as scopedDevelopmentApiUrl}from"./studioUrls-B0-GdWh8.js";import{C as mdiArrowRight,Jn as mdiPlus,L as mdiCheck,Q as mdiCloseCircleOutline,Rn as mdiOpenInNew,br as mdiSourceMerge,er as mdiRefresh,gr as mdiSourceBranch,kn as mdiMagnify,vr as mdiSourceBranchSync,xr as mdiSourcePull}from"./mdi-X9prU-DG.js";import{i as VBtnToggle,t as VBtn}from"./VBtn-Sj5jAuOx.js";import{t as VAlert}from"./VAlert-7_VM9EUm.js";import{t as VDivider}from"./VDivider-AUQb_N9d.js";import{t as VSheet}from"./VSheet-CMhyReNa.js";import{t as VDialog}from"./VDialog-Drp3yzSH.js";import{i as VCardTitle,n as VCardText,o as VCardActions,t as VCard}from"./VCard-DExT9Cji.js";import{t as VSpacer}from"./VSpacer-BSTt0_VA.js";import{t as VSkeletonLoader}from"./VSkeletonLoader-pc4bBTxv.js";import{t as _plugin_vue_export_helper_default}from"./_plugin-vue_export-helper-DNW4j-dv.js";import{b as LongTextPreviewBlocks_default,x as parseLongTextReviewBlocks}from"./conversation-DL4AODd9.js";import"./conversation-DG9lp25w.js";import{t as useUiFeedback}from"./useUiFeedback-DLUToc5y.js";import{a as vibe64SessionPullRequest}from"./vibe64SessionViewModel-B0cCumM8.js";import{t as Vibe64DashboardBackButton_default}from"./Vibe64DashboardBackButton-CE9ig_nO.js";import{a as githubProjectRepositoryName,i as githubProjectAvailable}from"./vibe64GithubProject-Bct-bzKq.js";import{n as Vibe64AssistantSessionDialog_default,r as Vibe64CreatePullRequestDialog_default,t as focusCreatedVibe64SessionTab}from"./vibe64SessionFocus-CDIB5Gpr.js";import{t as _sfc_main$3}from"./GithubBrowserTabs-_l6htLOV.js";var _hoisted_1$1={key:0,role:`status`,class:`text-body-medium ma-0`};var _hoisted_2$1={class:`d-flex flex-wrap ga-2 text-body-small`};var _hoisted_3$1={key:0,class:`text-body-medium ma-0`};var _hoisted_4$1={class:`d-flex flex-wrap ga-2`};var _hoisted_5$1={class:`text-wrap`};var _hoisted_6$1={class:`text-wrap`};var _hoisted_7$1={key:1,class:`text-body-small ma-0`};var _hoisted_8$1={key:2,class:`text-body-medium ma-0`};var _hoisted_9$1={key:3,class:`text-body-medium ma-0`};var _hoisted_10$1={class:`text-body-medium ma-0`};var _hoisted_11$1={key:0,class:`text-body-medium ma-0`};var _hoisted_12$1={key:1,class:`text-body-medium ma-0`};var _hoisted_13$1={key:1,class:`text-body-small ma-0`};var _hoisted_14$1=[`href`];var _sfc_main$2={__name:`GithubPullRequestActions`,props:{pullRequest:{type:Object,required:true},apiPath:{type:String,required:true},disabled:Boolean},emits:[`changed`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const feedback=useUiFeedback({source:`vibe64.pullRequests.actions`});const confirmation=ref(null);const pending=ref(false);const mergeMethod=ref(``);const notice=ref(``);const updatingHead=ref(``);const failed=ref(false);const methodLabels={merge:`Create a merge commit`,squash:`Squash and merge`,rebase:`Rebase and merge`};const checksLabel=computed(()=>({SUCCESS:`Checks passed`,FAILURE:`Some checks failed`,ERROR:`Checks reported an error`,PENDING:`Checks are running`,EXPECTED:`Waiting for checks`})[props.pullRequest.checksState]||`No checks reported`);const reviewLabel=computed(()=>({APPROVED:`Reviews approved`,CHANGES_REQUESTED:`Changes requested`,REVIEW_REQUIRED:`Reviews required`})[props.pullRequest.reviewDecision]||``);const path=computed(()=>confirmation.value?.path||props.apiPath);const command=useEndpointResource({path,enabled:false,queryKey:computed(()=>[`vibe64.pullRequestAction`,path.value]),mutationOptions:{retry:false}});const actionDisabled=computed(()=>props.disabled||pending.value||!props.pullRequest.review);watch(()=>props.apiPath,()=>{confirmation.value=null;notice.value=``;updatingHead.value=``;failed.value=false});watch(()=>[props.pullRequest.headRefOid,props.pullRequest.state],([head,state])=>{if(state!==`OPEN`){notice.value=``;updatingHead.value=``}else if(updatingHead.value&&head&&head!==updatingHead.value){notice.value=`New commits are available. Update your session to load them.`;updatingHead.value=``}});function open(operation){const pr=props.pullRequest;if(actionDisabled.value||pr.actions?.[operation]!==``)return;mergeMethod.value=pr.mergeMethods[0]||``;const head=`${pr.review.headRepository}:${pr.review.headBranch}`;const base=`${pr.review.repository}:${pr.review.baseBranch}`;confirmation.value={operation,path:`${props.apiPath}/${operation}`,apiPath:props.apiPath,review:{...pr.review},url:pr.url,methods:pr.mergeMethods,from:operation===`update-branch`?base:head,to:operation===`update-branch`?head:base,title:operation===`ready`?`Ready for review?`:operation===`update-branch`?`Update branch from ${pr.baseRefName}?`:`Merge into ${pr.baseRefName}?`};failed.value=false}async function submit(){const reviewed=confirmation.value;if(!reviewed||pending.value||props.disabled)return;pending.value=true;failed.value=false;try{const result=await command.save({review:reviewed.review,...reviewed.operation===`merge`?{mergeMethod:mergeMethod.value}:{}},{method:`POST`,path:reviewed.path});if(props.apiPath===reviewed.apiPath){notice.value=result.pending?result.message:``;updatingHead.value=result.pending?reviewed.review.headCommit:``;confirmation.value=null}feedback.success(`PR #${reviewed.review.number}: ${result.message}`);emit(`changed`,{apiPath:reviewed.apiPath,operation:reviewed.operation})}catch(error){if(props.apiPath===reviewed.apiPath)failed.value=true;feedback.error(error,`The result could not be confirmed. Refresh this pull request before trying again.`)}finally{pending.value=false}}return(_ctx,_cache)=>{return openBlock(),createElementBlock(Fragment,null,[createVNode(VSheet,{rounded:`xl`,border:``,class:`pa-5 d-flex flex-column ga-3 pr-actions`},{default:withCtx(()=>[notice.value?(openBlock(),createElementBlock(`p`,_hoisted_1$1,toDisplayString(notice.value),1)):createCommentVNode(``,true),__props.pullRequest.state===`OPEN`?(openBlock(),createElementBlock(Fragment,{key:1},[createBaseVNode(`div`,_hoisted_2$1,[createVNode(VChip,{size:`small`,color:[`FAILURE`,`ERROR`].includes(__props.pullRequest.checksState)?`warning`:void 0},{default:withCtx(()=>[createTextVNode(toDisplayString(checksLabel.value),1)]),_:1},8,[`color`]),reviewLabel.value?(openBlock(),createBlock(VChip,{key:0,size:`small`},{default:withCtx(()=>[createTextVNode(toDisplayString(reviewLabel.value),1)]),_:1})):createCommentVNode(``,true)]),__props.pullRequest.actions?.merge?(openBlock(),createElementBlock(`p`,_hoisted_3$1,toDisplayString(__props.pullRequest.actions.merge),1)):createCommentVNode(``,true),createBaseVNode(`div`,_hoisted_4$1,[__props.pullRequest.isDraft?(openBlock(),createBlock(VBtn,{key:0,color:`primary`,variant:`tonal`,"min-height":`48`,height:`auto`,"max-width":`100%`,"prepend-icon":unref(mdiCheck),disabled:actionDisabled.value||Boolean(__props.pullRequest.actions?.ready),onClick:_cache[0]||(_cache[0]=$event=>open(`ready`))},{default:withCtx(()=>[..._cache[6]||(_cache[6]=[createBaseVNode(`span`,{class:`text-wrap`},`Ready for review`,-1)])]),_:1},8,[`prepend-icon`,`disabled`])):createCommentVNode(``,true),__props.pullRequest.actions?.[`update-branch`]===``?(openBlock(),createBlock(VBtn,{key:1,variant:`tonal`,"min-height":`48`,height:`auto`,"max-width":`100%`,"prepend-icon":unref(mdiSourceBranchSync),disabled:actionDisabled.value,onClick:_cache[1]||(_cache[1]=$event=>open(`update-branch`))},{default:withCtx(()=>[createBaseVNode(`span`,_hoisted_5$1,`Update branch from `+toDisplayString(__props.pullRequest.baseRefName),1)]),_:1},8,[`prepend-icon`,`disabled`])):createCommentVNode(``,true),!__props.pullRequest.isDraft?(openBlock(),createBlock(VBtn,{key:2,color:`primary`,variant:`flat`,"min-height":`48`,height:`auto`,"max-width":`100%`,"prepend-icon":unref(mdiSourceMerge),disabled:actionDisabled.value||Boolean(__props.pullRequest.actions?.merge),onClick:_cache[2]||(_cache[2]=$event=>open(`merge`))},{default:withCtx(()=>[createBaseVNode(`span`,_hoisted_6$1,`Merge into `+toDisplayString(__props.pullRequest.baseRefName),1)]),_:1},8,[`prepend-icon`,`disabled`])):createCommentVNode(``,true)]),__props.pullRequest.isDraft&&__props.pullRequest.actions?.ready?(openBlock(),createElementBlock(`p`,_hoisted_7$1,toDisplayString(__props.pullRequest.actions.ready),1)):createCommentVNode(``,true)],64)):__props.pullRequest.state===`MERGED`&&!notice.value?(openBlock(),createElementBlock(`p`,_hoisted_8$1,` Merged into `+toDisplayString(__props.pullRequest.baseRefName)+`. Archive your session when you have finished with it. `,1)):!notice.value?(openBlock(),createElementBlock(`p`,_hoisted_9$1,`This pull request is closed.`)):createCommentVNode(``,true)]),_:1}),createVNode(VDialog,{"model-value":Boolean(confirmation.value),"max-width":`36rem`,scrollable:``,persistent:pending.value,"onUpdate:modelValue":_cache[5]||(_cache[5]=$event=>!$event&&!pending.value&&(confirmation.value=null))},{default:withCtx(()=>[confirmation.value?(openBlock(),createBlock(VCard,{key:0,rounded:`xl`},{default:withCtx(()=>[createVNode(VCardTitle,{class:`text-wrap`},{default:withCtx(()=>[createTextVNode(toDisplayString(confirmation.value.title),1)]),_:1}),createVNode(VCardText,{class:`d-flex flex-column ga-3 pr-confirmation`},{default:withCtx(()=>[createBaseVNode(`p`,_hoisted_10$1,toDisplayString(confirmation.value.from)+` → `+toDisplayString(confirmation.value.to),1),confirmation.value.operation===`ready`?(openBlock(),createElementBlock(`p`,_hoisted_11$1,`Mark this draft ready so reviewers can review it.`)):confirmation.value.operation===`update-branch`?(openBlock(),createElementBlock(`p`,_hoisted_12$1,` Merge `+toDisplayString(confirmation.value.review.baseBranch)+` into `+toDisplayString(confirmation.value.review.headBranch)+` on GitHub. Then use Update session to load those changes into your session. `,1)):(openBlock(),createElementBlock(Fragment,{key:2},[_cache[7]||(_cache[7]=createBaseVNode(`p`,{class:`text-body-medium ma-0`},`Merge the commits already on GitHub. Save any session work you want included first.`,-1)),confirmation.value.methods.length>1?(openBlock(),createBlock(VSelect,{key:0,modelValue:mergeMethod.value,"onUpdate:modelValue":_cache[3]||(_cache[3]=$event=>mergeMethod.value=$event),label:`Merge method`,variant:`outlined`,"hide-details":``,items:confirmation.value.methods.map(value=>({title:methodLabels[value],value})),disabled:pending.value},null,8,[`modelValue`,`items`,`disabled`])):(openBlock(),createElementBlock(`p`,_hoisted_13$1,toDisplayString(methodLabels[mergeMethod.value]),1))],64)),failed.value?(openBlock(),createBlock(VAlert,{key:3,type:`warning`,variant:`tonal`},{default:withCtx(()=>[_cache[8]||(_cache[8]=createTextVNode(` This action was not confirmed. Close this dialog and refresh, or view the pull request on GitHub, before trying again. `,-1)),createBaseVNode(`a`,{href:confirmation.value.url,target:`_blank`,rel:`noopener noreferrer`},`View on GitHub`,8,_hoisted_14$1)]),_:1})):createCommentVNode(``,true)]),_:1}),createVNode(VCardActions,{class:`pa-4 flex-wrap`},{default:withCtx(()=>[createVNode(VSpacer),createVNode(VBtn,{disabled:pending.value,height:`48`,onClick:_cache[4]||(_cache[4]=$event=>confirmation.value=null)},{default:withCtx(()=>[..._cache[9]||(_cache[9]=[createTextVNode(`Cancel`,-1)])]),_:1},8,[`disabled`]),createVNode(VBtn,{color:`primary`,variant:`flat`,height:`48`,disabled:pending.value||__props.disabled||failed.value,"aria-busy":pending.value,onClick:submit},{default:withCtx(()=>[createTextVNode(toDisplayString(pending.value?`Working…`:confirmation.value.operation===`ready`?`Ready for review`:confirmation.value.operation===`merge`?`Merge pull request`:`Update branch`),1)]),_:1},8,[`disabled`,`aria-busy`])]),_:1})]),_:1})):createCommentVNode(``,true)]),_:1},8,[`model-value`,`persistent`])],64)}}};var GithubPullRequestActions_default=_plugin_vue_export_helper_default(_sfc_main$2,[[`__scopeId`,`data-v-5aa628de`]]);var _hoisted_1={class:`pull-requests d-flex flex-column ga-2`};var _hoisted_2={class:`d-flex align-center flex-wrap ga-2`};var _hoisted_3={class:`d-flex justify-space-between px-2 text-label-large text-medium-emphasis`};var _hoisted_4={class:`d-flex flex-wrap ga-2 text-body-small text-medium-emphasis mt-1`};var _hoisted_5={class:`pull-requests__branch`};var _hoisted_6={class:`d-flex justify-end ga-2`};var _hoisted_7={class:`px-2`};var _hoisted_8={class:`d-flex align-center flex-wrap ga-2 mb-3`};var _hoisted_9={class:`text-body-medium text-medium-emphasis`};var _hoisted_10={class:`text-headline-small mb-3`};var _hoisted_11={class:`d-flex flex-wrap ga-3 text-body-small text-medium-emphasis`};var _hoisted_12={class:`text-success`};var _hoisted_13={class:`text-error`};var _hoisted_14={class:`d-flex align-start ga-3`};var _hoisted_15={class:`pull-requests__branch`};var _hoisted_16={class:`text-body-medium mt-1`};var _hoisted_17={class:`text-body-small text-medium-emphasis mt-1`};var _hoisted_18={key:0,class:`text-body-medium ma-0`};var _hoisted_19={key:1,class:`text-body-medium ma-0`};var _hoisted_20={key:2,class:`text-body-medium ma-0`};var _hoisted_21={class:`d-flex flex-wrap ga-2`};var _hoisted_22={key:1,class:`text-body-medium text-medium-emphasis ma-0`};var _sfc_main$1={__name:`GithubPullRequestsPanel`,props:{dashboardContext:{type:Object,default:()=>({})}},setup(__props){const props=__props;const route=useRoute();const router=useRouter();const queryClient=useQueryClient();const projectSlug=computed(()=>projectSlugFromRoute(route));const repository=computed(()=>githubProjectRepositoryName(props.dashboardContext.projectContext));const available=computed(()=>githubProjectAvailable(props.dashboardContext.projectContext));const active=computed(()=>available.value&&props.dashboardContext.active!==false);const number=computed(()=>/^\d+$/u.test(String(route.query.pr||``))?String(route.query.pr):``);const state=computed(()=>[`open`,`closed`,`merged`,`all`].includes(route.query.prState)?route.query.prState:`open`);const search=ref(String(route.query.prSearch||``));watch(()=>route.query.prSearch,value=>{search.value=String(value||``)});const basePath=computed(()=>scopedDevelopmentApiUrl(`/api/vibe64/pull-requests`,projectSlug.value));const listQuery=computed(()=>({state:state.value,search:String(route.query.prSearch||``),...route.query.prCursor?{cursor:route.query.prCursor}:{}}));const list=useEndpointResource({path:basePath,readQuery:listQuery,queryKey:computed(()=>[`vibe64.pullRequests`,basePath.value,listQuery.value]),enabled:computed(()=>active.value&&!number.value),queryOptions:{retry:false},fallbackLoadError:`Pull requests could not load.`});const detail=useEndpointResource({path:computed(()=>`${basePath.value}/${number.value}`),queryKey:computed(()=>[`vibe64.pullRequest`,basePath.value,number.value]),enabled:computed(()=>active.value&&Boolean(number.value)),queryOptions:{retry:false},fallbackLoadError:`This pull request could not load.`});const resource=computed(()=>number.value?detail:list);const pr=computed(()=>detail.data.value?.pullRequest);const description=computed(()=>parseLongTextReviewBlocks(pr.value?.body||``));const assistantDialog=ref(false);const createDialog=ref(false);const selectedSource=computed(()=>vibe64SessionPullRequest(props.dashboardContext.session));const createAvailable=computed(()=>Boolean(props.dashboardContext.sessionId)&&!selectedSource.value?.number);const toolbar=computed(()=>({...props.dashboardContext.sessionToolbar,repositoryBranchSelectionDisabled:true,createSession:(selection,options={})=>props.dashboardContext.sessionToolbar?.createSession?.(selection,{...options,pullRequestNumber:Number(number.value)})}));watch(()=>route.query.createPullRequest,value=>{if(value&&createAvailable.value)createDialog.value=true},{immediate:true});function navigate(query){return router.push({query:{...route.query,...query}})}function filter(nextState=state.value){return navigate({prState:nextState,prSearch:String(search.value||``).trim()||void 0,prCursor:void 0,pr:void 0})}function status(item){if(item.state===`MERGED`)return`Merged`;if(item.state===`CLOSED`)return`Closed`;return item.isDraft?`Draft`:`Open`}function color(item){if(item.state===`MERGED`)return`primary`;if(item.state===`CLOSED`)return`error`;return item.isDraft?void 0:`success`}function icon(item){if(item.state===`MERGED`)return mdiSourceMerge;return item.state===`CLOSED`?mdiCloseCircleOutline:mdiSourcePull}function date(value){return value?new Date(value).toLocaleDateString(void 0,{month:`short`,day:`numeric`}):``}async function created(response){if(!response?.sessionId)return;await router.push(projectAppPath(projectSlug.value,`/dashboard/changes`));focusCreatedVibe64SessionTab(response.sessionId)}async function published(source){await list.reload();await navigate({pr:String(source.number),createPullRequest:void 0});await detail.reload()}async function actionFinished({apiPath}){await queryClient.invalidateQueries({queryKey:[`vibe64.pullRequests`,apiPath.replace(/\/\d+$/u,``)]});if(apiPath!==`${basePath.value}/${number.value}`)return;await detail.reload();props.dashboardContext.refreshSessionWork?.()}return(_ctx,_cache)=>{return openBlock(),createElementBlock(`section`,_hoisted_1,[createBaseVNode(`div`,_hoisted_2,[createVNode(Vibe64DashboardBackButton_default,{to:available.value&&number.value?void 0:unref(projectAppPath)(projectSlug.value,`/dashboard/env`),onClick:_cache[0]||(_cache[0]=$event=>available.value&&number.value&&navigate({pr:void 0}))},{default:withCtx(()=>[createTextVNode(toDisplayString(available.value&&number.value?`All pull requests`:`Back to dashboard`),1)]),_:1},8,[`to`]),createVNode(VSpacer),available.value?(openBlock(),createBlock(VBtn,{key:0,"prepend-icon":unref(mdiRefresh),variant:`text`,size:`small`,height:`48`,disabled:resource.value.isFetching.value,onClick:_cache[1]||(_cache[1]=$event=>resource.value.reload())},{default:withCtx(()=>[createTextVNode(toDisplayString(resource.value.isFetching.value?`Refreshing…`:`Refresh`),1)]),_:1},8,[`prepend-icon`,`disabled`])):createCommentVNode(``,true),available.value&&createAvailable.value?(openBlock(),createBlock(VBtn,{key:1,color:`primary`,variant:`tonal`,rounded:`pill`,size:`small`,height:`48`,"prepend-icon":unref(mdiPlus),disabled:__props.dashboardContext.sourceOperationsSuspended,onClick:_cache[2]||(_cache[2]=$event=>createDialog.value=true)},{default:withCtx(()=>[..._cache[15]||(_cache[15]=[createTextVNode(` Create from session `,-1)])]),_:1},8,[`prepend-icon`,`disabled`])):createCommentVNode(``,true)]),!available.value?(openBlock(),createBlock(VAlert,{key:0,type:`info`,variant:`tonal`},{default:withCtx(()=>[..._cache[16]||(_cache[16]=[createTextVNode(`Pull requests are available only for GitHub projects.`,-1)])]),_:1})):(openBlock(),createElementBlock(Fragment,{key:1},[createVNode(_sfc_main$3),!number.value?(openBlock(),createElementBlock(`form`,{key:0,class:`d-flex flex-wrap align-center ga-3`,onSubmit:_cache[8]||(_cache[8]=withModifiers($event=>filter(),[`prevent`]))},[createVNode(VBtnToggle,{"model-value":state.value,mandatory:``,divided:``,rounded:`pill`,color:`primary`,variant:`outlined`,"aria-label":`Pull request state`,"onUpdate:modelValue":_cache[3]||(_cache[3]=$event=>filter($event))},{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList([`open`,`closed`,`merged`,`all`],value=>{return createVNode(VBtn,{key:value,value,height:`48`},{default:withCtx(()=>[createTextVNode(toDisplayString(value[0].toUpperCase()+value.slice(1)),1)]),_:2},1032,[`value`])}),64))]),_:1},8,[`model-value`]),createVNode(VTextField,{modelValue:search.value,"onUpdate:modelValue":_cache[5]||(_cache[5]=$event=>search.value=$event),class:`pull-requests__search`,label:`Search pull requests`,"prepend-inner-icon":unref(mdiMagnify),variant:`outlined`,rounded:`pill`,"hide-details":``,maxlength:`200`,clearable:``,onKeydown:_cache[6]||(_cache[6]=withKeys(withModifiers($event=>filter(),[`prevent`]),[`enter`])),"onClick:clear":_cache[7]||(_cache[7]=$event=>{search.value=``;filter()})},{"append-inner":withCtx(()=>[createVNode(VBtn,{icon:unref(mdiArrowRight),variant:`text`,size:`48`,"aria-label":`Search pull requests`,onClick:_cache[4]||(_cache[4]=$event=>filter())},null,8,[`icon`])]),_:1},8,[`modelValue`,`prepend-inner-icon`])],32)):createCommentVNode(``,true),resource.value.isInitialLoading.value?(openBlock(),createBlock(VSheet,{key:1,rounded:`xl`,border:``,class:`pa-4`,"aria-label":`Loading pull requests`,"aria-busy":`true`},{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(4,index=>{return createVNode(VSkeletonLoader,{key:index,type:number.value?`paragraph`:`list-item-two-line`},null,8,[`type`])}),64))]),_:1})):resource.value.loadError.value?(openBlock(),createBlock(VAlert,{key:2,type:`error`,variant:`tonal`,rounded:`lg`},{append:withCtx(()=>[createVNode(VBtn,{variant:`text`,height:`48`,onClick:_cache[9]||(_cache[9]=$event=>resource.value.reload())},{default:withCtx(()=>[..._cache[17]||(_cache[17]=[createTextVNode(`Retry`,-1)])]),_:1})]),default:withCtx(()=>[createTextVNode(toDisplayString(resource.value.loadError.value)+` `,1)]),_:1})):!number.value?(openBlock(),createElementBlock(Fragment,{key:3},[createBaseVNode(`div`,_hoisted_3,[createBaseVNode(`span`,null,toDisplayString(unref(list).data.value?.total||0)+` pull requests`,1),_cache[18]||(_cache[18]=createBaseVNode(`span`,null,`Recently updated`,-1))]),unref(list).data.value?.pullRequests?.length?(openBlock(),createBlock(VList,{key:0,class:`pa-0`,density:`compact`,rounded:`xl`,border:``,slim:``,"aria-label":`GitHub pull requests`},{default:withCtx(()=>[(openBlock(true),createElementBlock(Fragment,null,renderList(unref(list).data.value.pullRequests,(item,index)=>{return openBlock(),createElementBlock(Fragment,{key:item.number},[index?(openBlock(),createBlock(VDivider,{key:0})):createCommentVNode(``,true),createVNode(VListItem,{class:`py-2`,active:false,to:{query:{..._ctx.$route.query,pr:String(item.number)}}},{prepend:withCtx(()=>[createVNode(VIcon,{icon:icon(item),color:color(item)},null,8,[`icon`,`color`])]),default:withCtx(()=>[createVNode(VListItemTitle,{class:`text-title-medium text-wrap`},{default:withCtx(()=>[createTextVNode(toDisplayString(item.title),1)]),_:2},1024),createBaseVNode(`div`,_hoisted_4,[createBaseVNode(`span`,null,`#`+toDisplayString(item.number)+` · `+toDisplayString(status(item))+` · `+toDisplayString(item.author?.login)+` · `+toDisplayString(date(item.updatedAt)),1),createBaseVNode(`span`,_hoisted_5,toDisplayString(item.headRefName)+` → `+toDisplayString(item.baseRefName),1)])]),_:2},1032,[`to`])],64)}),128))]),_:1})):(openBlock(),createBlock(VSheet,{key:1,rounded:`xl`,color:`surface-light`,class:`pa-8 text-center`},{default:withCtx(()=>[createVNode(VIcon,{icon:unref(mdiSourcePull),size:`40`,class:`mb-3`},null,8,[`icon`]),_cache[19]||(_cache[19]=createBaseVNode(`h2`,{class:`text-title-large mb-2`},`No pull requests here`,-1)),_cache[20]||(_cache[20]=createBaseVNode(`p`,{class:`text-body-medium text-medium-emphasis`},`Try another filter, or turn your session into a pull request.`,-1))]),_:1})),createBaseVNode(`div`,_hoisted_6,[_ctx.$route.query.prCursor?(openBlock(),createBlock(VBtn,{key:0,variant:`text`,height:`48`,onClick:_cache[10]||(_cache[10]=$event=>navigate({prCursor:void 0}))},{default:withCtx(()=>[..._cache[21]||(_cache[21]=[createTextVNode(`First page`,-1)])]),_:1})):createCommentVNode(``,true),unref(list).data.value?.pageInfo?.hasNextPage?(openBlock(),createBlock(VBtn,{key:1,variant:`tonal`,height:`48`,"append-icon":unref(mdiArrowRight),onClick:_cache[11]||(_cache[11]=$event=>navigate({prCursor:unref(list).data.value.pageInfo.endCursor}))},{default:withCtx(()=>[..._cache[22]||(_cache[22]=[createTextVNode(` Next page `,-1)])]),_:1},8,[`append-icon`])):createCommentVNode(``,true)])],64)):pr.value?(openBlock(),createElementBlock(Fragment,{key:4},[createBaseVNode(`div`,_hoisted_7,[createBaseVNode(`div`,_hoisted_8,[createVNode(VChip,{color:color(pr.value),"prepend-icon":icon(pr.value),variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(status(pr.value)),1)]),_:1},8,[`color`,`prepend-icon`]),createBaseVNode(`span`,_hoisted_9,`#`+toDisplayString(pr.value.number)+` · `+toDisplayString(pr.value.author?.login),1)]),createBaseVNode(`h2`,_hoisted_10,toDisplayString(pr.value.title),1),createBaseVNode(`div`,_hoisted_11,[createBaseVNode(`span`,null,toDisplayString(pr.value.changedFiles)+` files changed`,1),createBaseVNode(`span`,_hoisted_12,`+`+toDisplayString(pr.value.additions),1),createBaseVNode(`span`,_hoisted_13,`−`+toDisplayString(pr.value.deletions),1)])]),createVNode(VSheet,{rounded:`xl`,color:`surface-light`,class:`pa-5 d-flex flex-column ga-4`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_14,[createVNode(VIcon,{icon:unref(mdiSourceBranch),color:`primary`,class:`mt-1`},null,8,[`icon`]),createBaseVNode(`div`,_hoisted_15,[_cache[23]||(_cache[23]=createBaseVNode(`div`,{class:`text-label-large`},`Session source · Save destination`,-1)),createBaseVNode(`div`,_hoisted_16,toDisplayString(pr.value.headRepository?.nameWithOwner||`Deleted repository`)+`:`+toDisplayString(pr.value.headRefName),1),createBaseVNode(`div`,_hoisted_17,`Proposed into `+toDisplayString(repository.value)+`:`+toDisplayString(pr.value.baseRefName),1)])]),pr.value.state===`OPEN`?(openBlock(),createElementBlock(`p`,_hoisted_18,`Open an isolated session with this PR’s changes and description. Save pushes further work to its source branch.`)):createCommentVNode(``,true),pr.value.state===`OPEN`&&pr.value.unavailableReason?(openBlock(),createElementBlock(`p`,_hoisted_19,toDisplayString(pr.value.unavailableReason),1)):pr.value.state===`OPEN`&&!toolbar.value.canCreateSession?(openBlock(),createElementBlock(`p`,_hoisted_20,toDisplayString(toolbar.value.createSessionTitle),1)):createCommentVNode(``,true),createBaseVNode(`div`,_hoisted_21,[pr.value.state===`OPEN`?(openBlock(),createBlock(VBtn,{key:0,color:`primary`,rounded:`pill`,height:`48`,"prepend-icon":unref(mdiSourcePull),disabled:Boolean(pr.value.unavailableReason)||!toolbar.value.canCreateSession||toolbar.value.createSessionRunning,onClick:_cache[12]||(_cache[12]=$event=>assistantDialog.value=true)},{default:withCtx(()=>[..._cache[24]||(_cache[24]=[createTextVNode(` Open as session `,-1)])]),_:1},8,[`prepend-icon`,`disabled`])):createCommentVNode(``,true),createVNode(VBtn,{href:pr.value.url,target:`_blank`,rel:`noopener noreferrer`,variant:`text`,height:`48`,"append-icon":unref(mdiOpenInNew)},{default:withCtx(()=>[..._cache[25]||(_cache[25]=[createTextVNode(`View on GitHub`,-1)])]),_:1},8,[`href`,`append-icon`])])]),_:1}),createVNode(GithubPullRequestActions_default,{"pull-request":pr.value,"api-path":`${basePath.value}/${number.value}`,disabled:unref(detail).isFetching.value,onChanged:actionFinished},null,8,[`pull-request`,`api-path`,`disabled`]),createVNode(VSheet,{rounded:`xl`,border:``,class:`pa-5 pull-requests__description`},{default:withCtx(()=>[_cache[26]||(_cache[26]=createBaseVNode(`h3`,{class:`text-title-medium mb-4`},`Description`,-1)),pr.value.body?(openBlock(),createBlock(unref(LongTextPreviewBlocks_default),{key:0,blocks:description.value},null,8,[`blocks`])):(openBlock(),createElementBlock(`p`,_hoisted_22,`No description provided.`))]),_:1})],64)):createCommentVNode(``,true)],64)),available.value&&assistantDialog.value?(openBlock(),createBlock(Vibe64AssistantSessionDialog_default,{key:2,modelValue:assistantDialog.value,"onUpdate:modelValue":_cache[13]||(_cache[13]=$event=>assistantDialog.value=$event),toolbar:toolbar.value,onCreated:created},null,8,[`modelValue`,`toolbar`])):createCommentVNode(``,true),available.value?(openBlock(),createBlock(Vibe64CreatePullRequestDialog_default,{key:3,modelValue:createDialog.value,"onUpdate:modelValue":_cache[14]||(_cache[14]=$event=>createDialog.value=$event),"dashboard-context":__props.dashboardContext,onCreated:published},null,8,[`modelValue`,`dashboard-context`])):createCommentVNode(``,true)])}}};var GithubPullRequestsPanel_default=_plugin_vue_export_helper_default(_sfc_main$1,[[`__scopeId`,`data-v-f75e5bff`]]);var _sfc_main={__name:`index`,props:{dashboardContext:{type:Object,default:()=>({})}},setup(__props){return(_ctx,_cache)=>{return openBlock(),createBlock(GithubPullRequestsPanel_default,{"dashboard-context":__props.dashboardContext},null,8,[`dashboard-context`])}}};export{_sfc_main as default};
|
|
1
|
+
import{D as createVNode,E as createTextVNode,Ht as watch,On as unref,_ as createBaseVNode,b as createElementBlock,bt as renderList,g as computed,mt as openBlock,o as Fragment,qt as withCtx,tr as toDisplayString,v as createBlock,vn as ref,y as createCommentVNode}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{_ as VIcon,cr as withKeys,lr as withModifiers}from"./VAvatar-H2hyOWlB.js";import{t as useEndpointResource,tt as useQueryClient}from"./useEndpointResource-7-YDfAxX.js";import{_ as useRouter,g as useRoute}from"./useApi-BPuI6ZR9-CFWU1m37.js";import{o as projectSlugFromRoute,r as projectAppPath}from"./vibe64ProjectScope.local-l5_-E6pq.js";import{t as VSelect}from"./VSelect-Dqnp_CFi.js";import{c as VListItemTitle,n as VList,s as VListItem}from"./VMenu-DnhVIMrr.js";import{t as VChip}from"./VChip-Uixfx461.js";import{t as VTextField}from"./VTextField-CnkGeXaT.js";import{r as scopedDevelopmentApiUrl}from"./studioUrls-B0-GdWh8.js";import{C as mdiArrowRight,Jn as mdiPlus,L as mdiCheck,Q as mdiCloseCircleOutline,Rn as mdiOpenInNew,br as mdiSourceMerge,er as mdiRefresh,gr as mdiSourceBranch,kn as mdiMagnify,vr as mdiSourceBranchSync,xr as mdiSourcePull}from"./mdi-X9prU-DG.js";import{i as VBtnToggle,t as VBtn}from"./VBtn-Sj5jAuOx.js";import{t as VAlert}from"./VAlert-7_VM9EUm.js";import{t as VDivider}from"./VDivider-AUQb_N9d.js";import{t as VSheet}from"./VSheet-CMhyReNa.js";import{t as VDialog}from"./VDialog-Drp3yzSH.js";import{i as VCardTitle,n as VCardText,o as VCardActions,t as VCard}from"./VCard-DExT9Cji.js";import{t as VSpacer}from"./VSpacer-BSTt0_VA.js";import{t as VSkeletonLoader}from"./VSkeletonLoader-pc4bBTxv.js";import{t as _plugin_vue_export_helper_default}from"./_plugin-vue_export-helper-DNW4j-dv.js";import{b as LongTextPreviewBlocks_default,x as parseLongTextReviewBlocks}from"./conversation-ErAO1CmH.js";import"./conversation-DG9lp25w.js";import{t as useUiFeedback}from"./useUiFeedback-Bd3rao6E.js";import{a as vibe64SessionPullRequest}from"./vibe64SessionViewModel-B0cCumM8.js";import{t as Vibe64DashboardBackButton_default}from"./Vibe64DashboardBackButton-CE9ig_nO.js";import{a as githubProjectRepositoryName,i as githubProjectAvailable}from"./vibe64GithubProject-Bct-bzKq.js";import{n as Vibe64AssistantSessionDialog_default,r as Vibe64CreatePullRequestDialog_default,t as focusCreatedVibe64SessionTab}from"./vibe64SessionFocus-CS6Ex53G.js";import{t as _sfc_main$3}from"./GithubBrowserTabs-BwpiRS2u.js";var _hoisted_1$1={key:0,role:`status`,class:`text-body-medium ma-0`};var _hoisted_2$1={class:`d-flex flex-wrap ga-2 text-body-small`};var _hoisted_3$1={key:0,class:`text-body-medium ma-0`};var _hoisted_4$1={class:`d-flex flex-wrap ga-2`};var _hoisted_5$1={class:`text-wrap`};var _hoisted_6$1={class:`text-wrap`};var _hoisted_7$1={key:1,class:`text-body-small ma-0`};var _hoisted_8$1={key:2,class:`text-body-medium ma-0`};var _hoisted_9$1={key:3,class:`text-body-medium ma-0`};var _hoisted_10$1={class:`text-body-medium ma-0`};var _hoisted_11$1={key:0,class:`text-body-medium ma-0`};var _hoisted_12$1={key:1,class:`text-body-medium ma-0`};var _hoisted_13$1={key:1,class:`text-body-small ma-0`};var _hoisted_14$1=[`href`];var _sfc_main$2={__name:`GithubPullRequestActions`,props:{pullRequest:{type:Object,required:true},apiPath:{type:String,required:true},disabled:Boolean},emits:[`changed`],setup(__props,{emit:__emit}){const props=__props;const emit=__emit;const feedback=useUiFeedback({source:`vibe64.pullRequests.actions`});const confirmation=ref(null);const pending=ref(false);const mergeMethod=ref(``);const notice=ref(``);const updatingHead=ref(``);const failed=ref(false);const methodLabels={merge:`Create a merge commit`,squash:`Squash and merge`,rebase:`Rebase and merge`};const checksLabel=computed(()=>({SUCCESS:`Checks passed`,FAILURE:`Some checks failed`,ERROR:`Checks reported an error`,PENDING:`Checks are running`,EXPECTED:`Waiting for checks`})[props.pullRequest.checksState]||`No checks reported`);const reviewLabel=computed(()=>({APPROVED:`Reviews approved`,CHANGES_REQUESTED:`Changes requested`,REVIEW_REQUIRED:`Reviews required`})[props.pullRequest.reviewDecision]||``);const path=computed(()=>confirmation.value?.path||props.apiPath);const command=useEndpointResource({path,enabled:false,queryKey:computed(()=>[`vibe64.pullRequestAction`,path.value]),mutationOptions:{retry:false}});const actionDisabled=computed(()=>props.disabled||pending.value||!props.pullRequest.review);watch(()=>props.apiPath,()=>{confirmation.value=null;notice.value=``;updatingHead.value=``;failed.value=false});watch(()=>[props.pullRequest.headRefOid,props.pullRequest.state],([head,state])=>{if(state!==`OPEN`){notice.value=``;updatingHead.value=``}else if(updatingHead.value&&head&&head!==updatingHead.value){notice.value=`New commits are available. Update your session to load them.`;updatingHead.value=``}});function open(operation){const pr=props.pullRequest;if(actionDisabled.value||pr.actions?.[operation]!==``)return;mergeMethod.value=pr.mergeMethods[0]||``;const head=`${pr.review.headRepository}:${pr.review.headBranch}`;const base=`${pr.review.repository}:${pr.review.baseBranch}`;confirmation.value={operation,path:`${props.apiPath}/${operation}`,apiPath:props.apiPath,review:{...pr.review},url:pr.url,methods:pr.mergeMethods,from:operation===`update-branch`?base:head,to:operation===`update-branch`?head:base,title:operation===`ready`?`Ready for review?`:operation===`update-branch`?`Update branch from ${pr.baseRefName}?`:`Merge into ${pr.baseRefName}?`};failed.value=false}async function submit(){const reviewed=confirmation.value;if(!reviewed||pending.value||props.disabled)return;pending.value=true;failed.value=false;try{const result=await command.save({review:reviewed.review,...reviewed.operation===`merge`?{mergeMethod:mergeMethod.value}:{}},{method:`POST`,path:reviewed.path});if(props.apiPath===reviewed.apiPath){notice.value=result.pending?result.message:``;updatingHead.value=result.pending?reviewed.review.headCommit:``;confirmation.value=null}feedback.success(`PR #${reviewed.review.number}: ${result.message}`);emit(`changed`,{apiPath:reviewed.apiPath,operation:reviewed.operation})}catch(error){if(props.apiPath===reviewed.apiPath)failed.value=true;feedback.error(error,`The result could not be confirmed. Refresh this pull request before trying again.`)}finally{pending.value=false}}return(_ctx,_cache)=>{return openBlock(),createElementBlock(Fragment,null,[createVNode(VSheet,{rounded:`xl`,border:``,class:`pa-5 d-flex flex-column ga-3 pr-actions`},{default:withCtx(()=>[notice.value?(openBlock(),createElementBlock(`p`,_hoisted_1$1,toDisplayString(notice.value),1)):createCommentVNode(``,true),__props.pullRequest.state===`OPEN`?(openBlock(),createElementBlock(Fragment,{key:1},[createBaseVNode(`div`,_hoisted_2$1,[createVNode(VChip,{size:`small`,color:[`FAILURE`,`ERROR`].includes(__props.pullRequest.checksState)?`warning`:void 0},{default:withCtx(()=>[createTextVNode(toDisplayString(checksLabel.value),1)]),_:1},8,[`color`]),reviewLabel.value?(openBlock(),createBlock(VChip,{key:0,size:`small`},{default:withCtx(()=>[createTextVNode(toDisplayString(reviewLabel.value),1)]),_:1})):createCommentVNode(``,true)]),__props.pullRequest.actions?.merge?(openBlock(),createElementBlock(`p`,_hoisted_3$1,toDisplayString(__props.pullRequest.actions.merge),1)):createCommentVNode(``,true),createBaseVNode(`div`,_hoisted_4$1,[__props.pullRequest.isDraft?(openBlock(),createBlock(VBtn,{key:0,color:`primary`,variant:`tonal`,"min-height":`48`,height:`auto`,"max-width":`100%`,"prepend-icon":unref(mdiCheck),disabled:actionDisabled.value||Boolean(__props.pullRequest.actions?.ready),onClick:_cache[0]||(_cache[0]=$event=>open(`ready`))},{default:withCtx(()=>[..._cache[6]||(_cache[6]=[createBaseVNode(`span`,{class:`text-wrap`},`Ready for review`,-1)])]),_:1},8,[`prepend-icon`,`disabled`])):createCommentVNode(``,true),__props.pullRequest.actions?.[`update-branch`]===``?(openBlock(),createBlock(VBtn,{key:1,variant:`tonal`,"min-height":`48`,height:`auto`,"max-width":`100%`,"prepend-icon":unref(mdiSourceBranchSync),disabled:actionDisabled.value,onClick:_cache[1]||(_cache[1]=$event=>open(`update-branch`))},{default:withCtx(()=>[createBaseVNode(`span`,_hoisted_5$1,`Update branch from `+toDisplayString(__props.pullRequest.baseRefName),1)]),_:1},8,[`prepend-icon`,`disabled`])):createCommentVNode(``,true),!__props.pullRequest.isDraft?(openBlock(),createBlock(VBtn,{key:2,color:`primary`,variant:`flat`,"min-height":`48`,height:`auto`,"max-width":`100%`,"prepend-icon":unref(mdiSourceMerge),disabled:actionDisabled.value||Boolean(__props.pullRequest.actions?.merge),onClick:_cache[2]||(_cache[2]=$event=>open(`merge`))},{default:withCtx(()=>[createBaseVNode(`span`,_hoisted_6$1,`Merge into `+toDisplayString(__props.pullRequest.baseRefName),1)]),_:1},8,[`prepend-icon`,`disabled`])):createCommentVNode(``,true)]),__props.pullRequest.isDraft&&__props.pullRequest.actions?.ready?(openBlock(),createElementBlock(`p`,_hoisted_7$1,toDisplayString(__props.pullRequest.actions.ready),1)):createCommentVNode(``,true)],64)):__props.pullRequest.state===`MERGED`&&!notice.value?(openBlock(),createElementBlock(`p`,_hoisted_8$1,` Merged into `+toDisplayString(__props.pullRequest.baseRefName)+`. Archive your session when you have finished with it. `,1)):!notice.value?(openBlock(),createElementBlock(`p`,_hoisted_9$1,`This pull request is closed.`)):createCommentVNode(``,true)]),_:1}),createVNode(VDialog,{"model-value":Boolean(confirmation.value),"max-width":`36rem`,scrollable:``,persistent:pending.value,"onUpdate:modelValue":_cache[5]||(_cache[5]=$event=>!$event&&!pending.value&&(confirmation.value=null))},{default:withCtx(()=>[confirmation.value?(openBlock(),createBlock(VCard,{key:0,rounded:`xl`},{default:withCtx(()=>[createVNode(VCardTitle,{class:`text-wrap`},{default:withCtx(()=>[createTextVNode(toDisplayString(confirmation.value.title),1)]),_:1}),createVNode(VCardText,{class:`d-flex flex-column ga-3 pr-confirmation`},{default:withCtx(()=>[createBaseVNode(`p`,_hoisted_10$1,toDisplayString(confirmation.value.from)+` → `+toDisplayString(confirmation.value.to),1),confirmation.value.operation===`ready`?(openBlock(),createElementBlock(`p`,_hoisted_11$1,`Mark this draft ready so reviewers can review it.`)):confirmation.value.operation===`update-branch`?(openBlock(),createElementBlock(`p`,_hoisted_12$1,` Merge `+toDisplayString(confirmation.value.review.baseBranch)+` into `+toDisplayString(confirmation.value.review.headBranch)+` on GitHub. Then use Update session to load those changes into your session. `,1)):(openBlock(),createElementBlock(Fragment,{key:2},[_cache[7]||(_cache[7]=createBaseVNode(`p`,{class:`text-body-medium ma-0`},`Merge the commits already on GitHub. Save any session work you want included first.`,-1)),confirmation.value.methods.length>1?(openBlock(),createBlock(VSelect,{key:0,modelValue:mergeMethod.value,"onUpdate:modelValue":_cache[3]||(_cache[3]=$event=>mergeMethod.value=$event),label:`Merge method`,variant:`outlined`,"hide-details":``,items:confirmation.value.methods.map(value=>({title:methodLabels[value],value})),disabled:pending.value},null,8,[`modelValue`,`items`,`disabled`])):(openBlock(),createElementBlock(`p`,_hoisted_13$1,toDisplayString(methodLabels[mergeMethod.value]),1))],64)),failed.value?(openBlock(),createBlock(VAlert,{key:3,type:`warning`,variant:`tonal`},{default:withCtx(()=>[_cache[8]||(_cache[8]=createTextVNode(` This action was not confirmed. Close this dialog and refresh, or view the pull request on GitHub, before trying again. `,-1)),createBaseVNode(`a`,{href:confirmation.value.url,target:`_blank`,rel:`noopener noreferrer`},`View on GitHub`,8,_hoisted_14$1)]),_:1})):createCommentVNode(``,true)]),_:1}),createVNode(VCardActions,{class:`pa-4 flex-wrap`},{default:withCtx(()=>[createVNode(VSpacer),createVNode(VBtn,{disabled:pending.value,height:`48`,onClick:_cache[4]||(_cache[4]=$event=>confirmation.value=null)},{default:withCtx(()=>[..._cache[9]||(_cache[9]=[createTextVNode(`Cancel`,-1)])]),_:1},8,[`disabled`]),createVNode(VBtn,{color:`primary`,variant:`flat`,height:`48`,disabled:pending.value||__props.disabled||failed.value,"aria-busy":pending.value,onClick:submit},{default:withCtx(()=>[createTextVNode(toDisplayString(pending.value?`Working…`:confirmation.value.operation===`ready`?`Ready for review`:confirmation.value.operation===`merge`?`Merge pull request`:`Update branch`),1)]),_:1},8,[`disabled`,`aria-busy`])]),_:1})]),_:1})):createCommentVNode(``,true)]),_:1},8,[`model-value`,`persistent`])],64)}}};var GithubPullRequestActions_default=_plugin_vue_export_helper_default(_sfc_main$2,[[`__scopeId`,`data-v-5aa628de`]]);var _hoisted_1={class:`pull-requests d-flex flex-column ga-2`};var _hoisted_2={class:`d-flex align-center flex-wrap ga-2`};var _hoisted_3={class:`d-flex justify-space-between px-2 text-label-large text-medium-emphasis`};var _hoisted_4={class:`d-flex flex-wrap ga-2 text-body-small text-medium-emphasis mt-1`};var _hoisted_5={class:`pull-requests__branch`};var _hoisted_6={class:`d-flex justify-end ga-2`};var _hoisted_7={class:`px-2`};var _hoisted_8={class:`d-flex align-center flex-wrap ga-2 mb-3`};var _hoisted_9={class:`text-body-medium text-medium-emphasis`};var _hoisted_10={class:`text-headline-small mb-3`};var _hoisted_11={class:`d-flex flex-wrap ga-3 text-body-small text-medium-emphasis`};var _hoisted_12={class:`text-success`};var _hoisted_13={class:`text-error`};var _hoisted_14={class:`d-flex align-start ga-3`};var _hoisted_15={class:`pull-requests__branch`};var _hoisted_16={class:`text-body-medium mt-1`};var _hoisted_17={class:`text-body-small text-medium-emphasis mt-1`};var _hoisted_18={key:0,class:`text-body-medium ma-0`};var _hoisted_19={key:1,class:`text-body-medium ma-0`};var _hoisted_20={key:2,class:`text-body-medium ma-0`};var _hoisted_21={class:`d-flex flex-wrap ga-2`};var _hoisted_22={key:1,class:`text-body-medium text-medium-emphasis ma-0`};var _sfc_main$1={__name:`GithubPullRequestsPanel`,props:{dashboardContext:{type:Object,default:()=>({})}},setup(__props){const props=__props;const route=useRoute();const router=useRouter();const queryClient=useQueryClient();const projectSlug=computed(()=>projectSlugFromRoute(route));const repository=computed(()=>githubProjectRepositoryName(props.dashboardContext.projectContext));const available=computed(()=>githubProjectAvailable(props.dashboardContext.projectContext));const active=computed(()=>available.value&&props.dashboardContext.active!==false);const number=computed(()=>/^\d+$/u.test(String(route.query.pr||``))?String(route.query.pr):``);const state=computed(()=>[`open`,`closed`,`merged`,`all`].includes(route.query.prState)?route.query.prState:`open`);const search=ref(String(route.query.prSearch||``));watch(()=>route.query.prSearch,value=>{search.value=String(value||``)});const basePath=computed(()=>scopedDevelopmentApiUrl(`/api/vibe64/pull-requests`,projectSlug.value));const listQuery=computed(()=>({state:state.value,search:String(route.query.prSearch||``),...route.query.prCursor?{cursor:route.query.prCursor}:{}}));const list=useEndpointResource({path:basePath,readQuery:listQuery,queryKey:computed(()=>[`vibe64.pullRequests`,basePath.value,listQuery.value]),enabled:computed(()=>active.value&&!number.value),queryOptions:{retry:false},fallbackLoadError:`Pull requests could not load.`});const detail=useEndpointResource({path:computed(()=>`${basePath.value}/${number.value}`),queryKey:computed(()=>[`vibe64.pullRequest`,basePath.value,number.value]),enabled:computed(()=>active.value&&Boolean(number.value)),queryOptions:{retry:false},fallbackLoadError:`This pull request could not load.`});const resource=computed(()=>number.value?detail:list);const pr=computed(()=>detail.data.value?.pullRequest);const description=computed(()=>parseLongTextReviewBlocks(pr.value?.body||``));const assistantDialog=ref(false);const createDialog=ref(false);const selectedSource=computed(()=>vibe64SessionPullRequest(props.dashboardContext.session));const createAvailable=computed(()=>Boolean(props.dashboardContext.sessionId)&&!selectedSource.value?.number);const toolbar=computed(()=>({...props.dashboardContext.sessionToolbar,repositoryBranchSelectionDisabled:true,createSession:(selection,options={})=>props.dashboardContext.sessionToolbar?.createSession?.(selection,{...options,pullRequestNumber:Number(number.value)})}));watch(()=>route.query.createPullRequest,value=>{if(value&&createAvailable.value)createDialog.value=true},{immediate:true});function navigate(query){return router.push({query:{...route.query,...query}})}function filter(nextState=state.value){return navigate({prState:nextState,prSearch:String(search.value||``).trim()||void 0,prCursor:void 0,pr:void 0})}function status(item){if(item.state===`MERGED`)return`Merged`;if(item.state===`CLOSED`)return`Closed`;return item.isDraft?`Draft`:`Open`}function color(item){if(item.state===`MERGED`)return`primary`;if(item.state===`CLOSED`)return`error`;return item.isDraft?void 0:`success`}function icon(item){if(item.state===`MERGED`)return mdiSourceMerge;return item.state===`CLOSED`?mdiCloseCircleOutline:mdiSourcePull}function date(value){return value?new Date(value).toLocaleDateString(void 0,{month:`short`,day:`numeric`}):``}async function created(response){if(!response?.sessionId)return;await router.push(projectAppPath(projectSlug.value,`/dashboard/changes`));focusCreatedVibe64SessionTab(response.sessionId)}async function published(source){await list.reload();await navigate({pr:String(source.number),createPullRequest:void 0});await detail.reload()}async function actionFinished({apiPath}){await queryClient.invalidateQueries({queryKey:[`vibe64.pullRequests`,apiPath.replace(/\/\d+$/u,``)]});if(apiPath!==`${basePath.value}/${number.value}`)return;await detail.reload();props.dashboardContext.refreshSessionWork?.()}return(_ctx,_cache)=>{return openBlock(),createElementBlock(`section`,_hoisted_1,[createBaseVNode(`div`,_hoisted_2,[createVNode(Vibe64DashboardBackButton_default,{to:available.value&&number.value?void 0:unref(projectAppPath)(projectSlug.value,`/dashboard/env`),onClick:_cache[0]||(_cache[0]=$event=>available.value&&number.value&&navigate({pr:void 0}))},{default:withCtx(()=>[createTextVNode(toDisplayString(available.value&&number.value?`All pull requests`:`Back to dashboard`),1)]),_:1},8,[`to`]),createVNode(VSpacer),available.value?(openBlock(),createBlock(VBtn,{key:0,"prepend-icon":unref(mdiRefresh),variant:`text`,size:`small`,height:`48`,disabled:resource.value.isFetching.value,onClick:_cache[1]||(_cache[1]=$event=>resource.value.reload())},{default:withCtx(()=>[createTextVNode(toDisplayString(resource.value.isFetching.value?`Refreshing…`:`Refresh`),1)]),_:1},8,[`prepend-icon`,`disabled`])):createCommentVNode(``,true),available.value&&createAvailable.value?(openBlock(),createBlock(VBtn,{key:1,color:`primary`,variant:`tonal`,rounded:`pill`,size:`small`,height:`48`,"prepend-icon":unref(mdiPlus),disabled:__props.dashboardContext.sourceOperationsSuspended,onClick:_cache[2]||(_cache[2]=$event=>createDialog.value=true)},{default:withCtx(()=>[..._cache[15]||(_cache[15]=[createTextVNode(` Create from session `,-1)])]),_:1},8,[`prepend-icon`,`disabled`])):createCommentVNode(``,true)]),!available.value?(openBlock(),createBlock(VAlert,{key:0,type:`info`,variant:`tonal`},{default:withCtx(()=>[..._cache[16]||(_cache[16]=[createTextVNode(`Pull requests are available only for GitHub projects.`,-1)])]),_:1})):(openBlock(),createElementBlock(Fragment,{key:1},[createVNode(_sfc_main$3),!number.value?(openBlock(),createElementBlock(`form`,{key:0,class:`d-flex flex-wrap align-center ga-3`,onSubmit:_cache[8]||(_cache[8]=withModifiers($event=>filter(),[`prevent`]))},[createVNode(VBtnToggle,{"model-value":state.value,mandatory:``,divided:``,rounded:`pill`,color:`primary`,variant:`outlined`,"aria-label":`Pull request state`,"onUpdate:modelValue":_cache[3]||(_cache[3]=$event=>filter($event))},{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList([`open`,`closed`,`merged`,`all`],value=>{return createVNode(VBtn,{key:value,value,height:`48`},{default:withCtx(()=>[createTextVNode(toDisplayString(value[0].toUpperCase()+value.slice(1)),1)]),_:2},1032,[`value`])}),64))]),_:1},8,[`model-value`]),createVNode(VTextField,{modelValue:search.value,"onUpdate:modelValue":_cache[5]||(_cache[5]=$event=>search.value=$event),class:`pull-requests__search`,label:`Search pull requests`,"prepend-inner-icon":unref(mdiMagnify),variant:`outlined`,rounded:`pill`,"hide-details":``,maxlength:`200`,clearable:``,onKeydown:_cache[6]||(_cache[6]=withKeys(withModifiers($event=>filter(),[`prevent`]),[`enter`])),"onClick:clear":_cache[7]||(_cache[7]=$event=>{search.value=``;filter()})},{"append-inner":withCtx(()=>[createVNode(VBtn,{icon:unref(mdiArrowRight),variant:`text`,size:`48`,"aria-label":`Search pull requests`,onClick:_cache[4]||(_cache[4]=$event=>filter())},null,8,[`icon`])]),_:1},8,[`modelValue`,`prepend-inner-icon`])],32)):createCommentVNode(``,true),resource.value.isInitialLoading.value?(openBlock(),createBlock(VSheet,{key:1,rounded:`xl`,border:``,class:`pa-4`,"aria-label":`Loading pull requests`,"aria-busy":`true`},{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(4,index=>{return createVNode(VSkeletonLoader,{key:index,type:number.value?`paragraph`:`list-item-two-line`},null,8,[`type`])}),64))]),_:1})):resource.value.loadError.value?(openBlock(),createBlock(VAlert,{key:2,type:`error`,variant:`tonal`,rounded:`lg`},{append:withCtx(()=>[createVNode(VBtn,{variant:`text`,height:`48`,onClick:_cache[9]||(_cache[9]=$event=>resource.value.reload())},{default:withCtx(()=>[..._cache[17]||(_cache[17]=[createTextVNode(`Retry`,-1)])]),_:1})]),default:withCtx(()=>[createTextVNode(toDisplayString(resource.value.loadError.value)+` `,1)]),_:1})):!number.value?(openBlock(),createElementBlock(Fragment,{key:3},[createBaseVNode(`div`,_hoisted_3,[createBaseVNode(`span`,null,toDisplayString(unref(list).data.value?.total||0)+` pull requests`,1),_cache[18]||(_cache[18]=createBaseVNode(`span`,null,`Recently updated`,-1))]),unref(list).data.value?.pullRequests?.length?(openBlock(),createBlock(VList,{key:0,class:`pa-0`,density:`compact`,rounded:`xl`,border:``,slim:``,"aria-label":`GitHub pull requests`},{default:withCtx(()=>[(openBlock(true),createElementBlock(Fragment,null,renderList(unref(list).data.value.pullRequests,(item,index)=>{return openBlock(),createElementBlock(Fragment,{key:item.number},[index?(openBlock(),createBlock(VDivider,{key:0})):createCommentVNode(``,true),createVNode(VListItem,{class:`py-2`,active:false,to:{query:{..._ctx.$route.query,pr:String(item.number)}}},{prepend:withCtx(()=>[createVNode(VIcon,{icon:icon(item),color:color(item)},null,8,[`icon`,`color`])]),default:withCtx(()=>[createVNode(VListItemTitle,{class:`text-title-medium text-wrap`},{default:withCtx(()=>[createTextVNode(toDisplayString(item.title),1)]),_:2},1024),createBaseVNode(`div`,_hoisted_4,[createBaseVNode(`span`,null,`#`+toDisplayString(item.number)+` · `+toDisplayString(status(item))+` · `+toDisplayString(item.author?.login)+` · `+toDisplayString(date(item.updatedAt)),1),createBaseVNode(`span`,_hoisted_5,toDisplayString(item.headRefName)+` → `+toDisplayString(item.baseRefName),1)])]),_:2},1032,[`to`])],64)}),128))]),_:1})):(openBlock(),createBlock(VSheet,{key:1,rounded:`xl`,color:`surface-light`,class:`pa-8 text-center`},{default:withCtx(()=>[createVNode(VIcon,{icon:unref(mdiSourcePull),size:`40`,class:`mb-3`},null,8,[`icon`]),_cache[19]||(_cache[19]=createBaseVNode(`h2`,{class:`text-title-large mb-2`},`No pull requests here`,-1)),_cache[20]||(_cache[20]=createBaseVNode(`p`,{class:`text-body-medium text-medium-emphasis`},`Try another filter, or turn your session into a pull request.`,-1))]),_:1})),createBaseVNode(`div`,_hoisted_6,[_ctx.$route.query.prCursor?(openBlock(),createBlock(VBtn,{key:0,variant:`text`,height:`48`,onClick:_cache[10]||(_cache[10]=$event=>navigate({prCursor:void 0}))},{default:withCtx(()=>[..._cache[21]||(_cache[21]=[createTextVNode(`First page`,-1)])]),_:1})):createCommentVNode(``,true),unref(list).data.value?.pageInfo?.hasNextPage?(openBlock(),createBlock(VBtn,{key:1,variant:`tonal`,height:`48`,"append-icon":unref(mdiArrowRight),onClick:_cache[11]||(_cache[11]=$event=>navigate({prCursor:unref(list).data.value.pageInfo.endCursor}))},{default:withCtx(()=>[..._cache[22]||(_cache[22]=[createTextVNode(` Next page `,-1)])]),_:1},8,[`append-icon`])):createCommentVNode(``,true)])],64)):pr.value?(openBlock(),createElementBlock(Fragment,{key:4},[createBaseVNode(`div`,_hoisted_7,[createBaseVNode(`div`,_hoisted_8,[createVNode(VChip,{color:color(pr.value),"prepend-icon":icon(pr.value),variant:`tonal`},{default:withCtx(()=>[createTextVNode(toDisplayString(status(pr.value)),1)]),_:1},8,[`color`,`prepend-icon`]),createBaseVNode(`span`,_hoisted_9,`#`+toDisplayString(pr.value.number)+` · `+toDisplayString(pr.value.author?.login),1)]),createBaseVNode(`h2`,_hoisted_10,toDisplayString(pr.value.title),1),createBaseVNode(`div`,_hoisted_11,[createBaseVNode(`span`,null,toDisplayString(pr.value.changedFiles)+` files changed`,1),createBaseVNode(`span`,_hoisted_12,`+`+toDisplayString(pr.value.additions),1),createBaseVNode(`span`,_hoisted_13,`−`+toDisplayString(pr.value.deletions),1)])]),createVNode(VSheet,{rounded:`xl`,color:`surface-light`,class:`pa-5 d-flex flex-column ga-4`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_14,[createVNode(VIcon,{icon:unref(mdiSourceBranch),color:`primary`,class:`mt-1`},null,8,[`icon`]),createBaseVNode(`div`,_hoisted_15,[_cache[23]||(_cache[23]=createBaseVNode(`div`,{class:`text-label-large`},`Session source · Save destination`,-1)),createBaseVNode(`div`,_hoisted_16,toDisplayString(pr.value.headRepository?.nameWithOwner||`Deleted repository`)+`:`+toDisplayString(pr.value.headRefName),1),createBaseVNode(`div`,_hoisted_17,`Proposed into `+toDisplayString(repository.value)+`:`+toDisplayString(pr.value.baseRefName),1)])]),pr.value.state===`OPEN`?(openBlock(),createElementBlock(`p`,_hoisted_18,`Open an isolated session with this PR’s changes and description. Save pushes further work to its source branch.`)):createCommentVNode(``,true),pr.value.state===`OPEN`&&pr.value.unavailableReason?(openBlock(),createElementBlock(`p`,_hoisted_19,toDisplayString(pr.value.unavailableReason),1)):pr.value.state===`OPEN`&&!toolbar.value.canCreateSession?(openBlock(),createElementBlock(`p`,_hoisted_20,toDisplayString(toolbar.value.createSessionTitle),1)):createCommentVNode(``,true),createBaseVNode(`div`,_hoisted_21,[pr.value.state===`OPEN`?(openBlock(),createBlock(VBtn,{key:0,color:`primary`,rounded:`pill`,height:`48`,"prepend-icon":unref(mdiSourcePull),disabled:Boolean(pr.value.unavailableReason)||!toolbar.value.canCreateSession||toolbar.value.createSessionRunning,onClick:_cache[12]||(_cache[12]=$event=>assistantDialog.value=true)},{default:withCtx(()=>[..._cache[24]||(_cache[24]=[createTextVNode(` Open as session `,-1)])]),_:1},8,[`prepend-icon`,`disabled`])):createCommentVNode(``,true),createVNode(VBtn,{href:pr.value.url,target:`_blank`,rel:`noopener noreferrer`,variant:`text`,height:`48`,"append-icon":unref(mdiOpenInNew)},{default:withCtx(()=>[..._cache[25]||(_cache[25]=[createTextVNode(`View on GitHub`,-1)])]),_:1},8,[`href`,`append-icon`])])]),_:1}),createVNode(GithubPullRequestActions_default,{"pull-request":pr.value,"api-path":`${basePath.value}/${number.value}`,disabled:unref(detail).isFetching.value,onChanged:actionFinished},null,8,[`pull-request`,`api-path`,`disabled`]),createVNode(VSheet,{rounded:`xl`,border:``,class:`pa-5 pull-requests__description`},{default:withCtx(()=>[_cache[26]||(_cache[26]=createBaseVNode(`h3`,{class:`text-title-medium mb-4`},`Description`,-1)),pr.value.body?(openBlock(),createBlock(unref(LongTextPreviewBlocks_default),{key:0,blocks:description.value},null,8,[`blocks`])):(openBlock(),createElementBlock(`p`,_hoisted_22,`No description provided.`))]),_:1})],64)):createCommentVNode(``,true)],64)),available.value&&assistantDialog.value?(openBlock(),createBlock(Vibe64AssistantSessionDialog_default,{key:2,modelValue:assistantDialog.value,"onUpdate:modelValue":_cache[13]||(_cache[13]=$event=>assistantDialog.value=$event),toolbar:toolbar.value,onCreated:created},null,8,[`modelValue`,`toolbar`])):createCommentVNode(``,true),available.value?(openBlock(),createBlock(Vibe64CreatePullRequestDialog_default,{key:3,modelValue:createDialog.value,"onUpdate:modelValue":_cache[14]||(_cache[14]=$event=>createDialog.value=$event),"dashboard-context":__props.dashboardContext,onCreated:published},null,8,[`modelValue`,`dashboard-context`])):createCommentVNode(``,true)])}}};var GithubPullRequestsPanel_default=_plugin_vue_export_helper_default(_sfc_main$1,[[`__scopeId`,`data-v-f75e5bff`]]);var _sfc_main={__name:`index`,props:{dashboardContext:{type:Object,default:()=>({})}},setup(__props){return(_ctx,_cache)=>{return openBlock(),createBlock(GithubPullRequestsPanel_default,{"dashboard-context":__props.dashboardContext},null,8,[`dashboard-context`])}}};export{_sfc_main as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mt as openBlock,v as createBlock,y as createCommentVNode}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{t as Vibe64RepositoryWorkspace_default}from"./Vibe64RepositoryWorkspace-
|
|
1
|
+
import{mt as openBlock,v as createBlock,y as createCommentVNode}from"./runtime-core.esm-bundler-DGXg_mpN.js";import{t as Vibe64RepositoryWorkspace_default}from"./Vibe64RepositoryWorkspace-C-8S4JUF.js";var _sfc_main={__name:`index`,props:{dashboardContext:{default:()=>({}),type:Object}},setup(__props){return(_ctx,_cache)=>{return __props.dashboardContext.active!==false?(openBlock(),createBlock(Vibe64RepositoryWorkspace_default,{key:0,"dashboard-context":__props.dashboardContext,view:`history`},null,8,[`dashboard-context`])):createCommentVNode(``,true)}}};export{_sfc_main as default};
|