@cline/cli-windows-arm64 3.0.58 → 3.0.60
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/cline.exe +0 -0
- package/cline-hub/webview/assets/{Chat-Cex3jKu5.js → Chat-D1yFEsnx.js} +1 -1
- package/cline-hub/webview/assets/{extensions-view-BD9jbbuq.js → extensions-view-CrNdCNmP.js} +1 -1
- package/cline-hub/webview/assets/{index-Bsy7d1gk.js → index-aYt5DmxH.js} +2 -2
- package/cline-hub/webview/assets/{label-DSGRch_J.js → label-DySiNulg.js} +1 -1
- package/cline-hub/webview/assets/{settings-view-Byu0xmXf.js → settings-view-snjUAWHF.js} +1 -1
- package/cline-hub/webview/index.html +1 -1
- package/package.json +1 -1
|
@@ -73,4 +73,4 @@ You are in Plan mode. Your role is to explore, analyze, and plan -- not to execu
|
|
|
73
73
|
- Do NOT edit files, write code, run destructive commands, or make any changes
|
|
74
74
|
- Do NOT implement anything -- focus on understanding and alignment first
|
|
75
75
|
|
|
76
|
-
The run_commands tool remains available in plan mode strictly for read-only inspection -- listing files, searching (grep), reading configs, inspecting git history and diffs, checking tool versions, and the like. Never use it to change anything: no creating, modifying, or deleting files, no writing scripts that make changes, and no state-changing commands (installs, migrations, database or schema changes, container commands that mutate state, etc.). File-editing commands (rm/mv/cp, in-place edits like sed -i, output redirection to files outside /tmp, git commands that change the working tree, package installs) are hard-blocked in plan mode: they are not executed and return a tool error instead, so do not attempt them. If the task requires a mutation, put it in the plan; it happens only after the user switches to act mode.`;`${Dg}`,`${Dg}`;var Og=`anthropic/claude-sonnet-5`,kg=K({models:G(K({id:B(),temperature:H().optional(),maxTokens:H().optional(),contextWindow:H().optional(),inputPrice:H().optional(),outputPrice:H().optional(),supportsImages:U().optional()})).optional(),openAiBaseUrl:B().optional(),openAiHeaders:q(B(),B()).optional(),azureApiVersion:B().optional(),azureIdentity:U().optional()}),Ag=K({id:B(),thinkingBudgetTokens:H().optional()}),jg=K({name:B(),baseModelId:B(),thinkingBudgetTokens:H().optional()}),Mg=K({models:G(Ag).optional(),customModels:G(jg).optional(),awsRegion:B().optional(),awsUseCrossRegionInference:U().optional(),awsUseGlobalInference:U().optional(),awsBedrockUsePromptCache:U().optional(),awsBedrockEndpoint:B().optional()}),Ng=K({models:G(K({id:B()})).optional()}),Pg=K({models:G(K({id:B(),thinkingBudgetTokens:H().optional()})).optional(),vertexProjectId:B().optional(),vertexRegion:B().optional()}),Fg=K({models:G(K({id:B(),thinkingBudgetTokens:H().optional(),promptCachingEnabled:U().optional()})).optional(),baseUrl:B().optional()}),Ig=K({models:G(K({id:B(),thinkingBudgetTokens:H().optional()})).optional(),baseUrl:B().optional()}),Lg=K({OpenAiCompatible:kg.optional(),AwsBedrock:Mg.optional(),Cline:Ng.optional(),Vertex:Pg.optional(),LiteLLM:Fg.optional(),Anthropic:Ig.optional()}),Rg=K({id:B()}),zg=K({name:B(),url:B(),alwaysEnabled:U().optional(),headers:q(B(),B()).optional()}),Bg=K({alwaysEnabled:U(),name:B(),contents:B()}),Vg=K({bucket:B(),accessKeyId:B(),secretAccessKey:B(),region:B().optional(),endpoint:B().optional(),accountId:B().optional()}),Hg=K({promptUploading:K({enabled:U().optional(),type:sm([Y(`s3_access_keys`),Y(`r2_access_keys`),Y(`azure_access_keys`)]).optional(),s3AccessSettings:Vg.optional(),r2AccessSettings:Vg.optional(),azureAccessSettings:Vg.optional()}).optional()});K({version:B(),providerSettings:Lg.optional(),telemetryEnabled:U().optional(),kanbanEnabled:U().optional(),mcpMarketplaceEnabled:U().optional(),allowedMCPServers:G(Rg).optional(),remoteMCPServers:G(zg).optional(),blockPersonalRemoteMCPServers:U().optional(),yoloModeAllowed:U().optional(),openTelemetryEnabled:U().optional(),openTelemetryMetricsExporter:B().optional(),openTelemetryLogsExporter:B().optional(),openTelemetryOtlpProtocol:B().optional(),openTelemetryOtlpEndpoint:B().optional(),openTelemetryOtlpHeaders:q(B(),B()).optional(),openTelemetryOtlpMetricsProtocol:B().optional(),openTelemetryOtlpMetricsEndpoint:B().optional(),openTelemetryOtlpMetricsHeaders:q(B(),B()).optional(),openTelemetryOtlpLogsProtocol:B().optional(),openTelemetryOtlpLogsEndpoint:B().optional(),openTelemetryOtlpLogsHeaders:q(B(),B()).optional(),openTelemetryMetricExportInterval:H().optional(),openTelemetryOtlpInsecure:U().optional(),openTelemetryLogBatchSize:H().optional(),openTelemetryLogBatchTimeout:H().optional(),openTelemetryLogMaxQueueSize:H().optional(),enterpriseTelemetry:Hg.optional(),globalRules:G(Bg).optional(),globalWorkflows:G(Bg).optional()}),q(B(),B()),zh.enum([`reasoning`,`prompt-cache`,`tools`,`provider-tools`,`oauth`,`temperature`,`files`,`streaming`,`vision`,`computer-use`,`local-auth`,`popular`]),zh.enum([`anthropic`,`gemini`,`openai-chat`,`openai-responses`,`openai-r1`,`ai-sdk`]),zh.enum([`anthropic`,`ai-sdk`,`ai-sdk-community`,`openai`,`openai-compatible`,`openai-r1`,`gemini`,`bedrock`,`custom`,`fetch`,`vertex`]);var Ug=K({rootPath:B().min(1),hint:B().min(1).optional(),associatedRemoteUrls:G(B().min(1)).optional(),latestGitCommitHash:B().min(1).optional(),latestGitBranchName:B().min(1).optional()});K({currentWorkspacePath:B().min(1).optional(),workspaces:q(B().min(1),Ug)});var Wg=[`current_state`,`boundary_analysis`,`interface_proposal`],Gg=xh(e=>e instanceof Date?e.toISOString():e,B().datetime()),Kg=J([`pending`,`in_progress`,`blocked`,`completed`]),qg=J([`queued`,`running`,`completed`,`failed`,`cancelled`,`interrupted`]),Jg=J([`draft`,`in_review`,`finalized`]),Yg=K({agentId:B(),role:J([`lead`,`teammate`]),description:B().optional(),status:J([`idle`,`running`,`stopped`])});K({agentId:B(),rolePrompt:B(),modelId:B().optional(),maxIterations:H().optional()});function Z(e){return xh(e=>e===null?void 0:e,e.optional())}K({agentId:B().min(1).describe(`Teammate identifier`),rolePrompt:B().min(1).describe(`System prompt describing teammate role`)}).strict(),K({agentId:B().min(1).describe(`Teammate identifier`),reason:Z(B().min(1)).describe(`Optional shutdown reason`)}),K({});var Xg={create:[`title`,`description`],list:[],claim:[`taskId`],complete:[`taskId`,`summary`],block:[`taskId`,`reason`]};K({action:J([`create`,`list`,`claim`,`complete`,`block`]),title:Z(B().min(1)).describe(`Task title`),description:Z(B().min(1)).describe(`Task details`),dependsOn:Z(G(B().describe(`Dependency task ID`))).describe(`Array of dependency task IDs`),assignee:Z(B().min(1)).describe(`Optional assignee`),status:Z(J([`pending`,`in_progress`,`blocked`,`completed`])).describe(`Optional task status filter`),taskId:Z(B()).describe(`Task ID`),summary:Z(B().min(1)).describe(`Completion summary`),reason:Z(B().min(1)).describe(`Blocking reason`)}).superRefine((e,t)=>{for(let n of Xg[e.action])e[n]===void 0&&t.addIssue({code:`custom`,path:[n],message:`Field "${n}" is required when action=${e.action}`})}),K({agentId:B().describe(`Teammate agent ID`),task:B().min(1).describe(`Task instructions for the teammate`),taskId:Z(B()).describe(`Optional shared task list ID`),runMode:Z(J([`sync`,`async`])).describe(`Execution mode: 'sync' blocks until the teammate finishes and returns the result (default if omitted); 'async' queues the run and returns a runId immediately — use team_await_runs to collect results later.`),continueConversation:Z(U()).describe(`If true, continue the teammate conversation; otherwise start fresh`)}),K({status:Z(J([`queued`,`running`,`completed`,`failed`,`cancelled`,`interrupted`])).describe(`Optional run status filter. Omit to include all statuses.`),agentId:Z(B().min(1)).describe(`Optional teammate ID filter. Omit to include all teammates.`),includeCompleted:Z(U()).describe(`Include completed/failed runs (default true)`)}),K({runId:B().min(1).describe(`Run ID`),reason:Z(B().min(1)).describe(`Optional cancellation reason`)}),K({runId:Z(B().min(1)).describe(`Optional async run ID to await. Omit to wait for all active async runs.`)}).strict(),K({toAgentId:B().min(1).describe(`Recipient agent ID`),subject:B().min(1).describe(`Message subject`),body:B().min(1).describe(`Message body`),taskId:Z(B().min(1)).describe(`Optional task ID context`)}),K({subject:B().min(1).describe(`Message subject`),body:B().min(1).describe(`Message body`),taskId:Z(B().min(1)).describe(`Optional task ID context`)}),K({unreadOnly:Z(U()).describe(`Only unread messages for read action (default true)`)}),K({kind:J([`progress`,`handoff`,`blocked`,`decision`,`done`,`error`]),summary:B().min(1).describe(`Update summary`),taskId:Z(B().min(1)).describe(`Optional task ID context`),evidence:Z(G(B().min(1))).describe(`Optional evidence links/snippets`),nextAction:Z(B().min(1)).describe(`Planned next step`)}),K({}),K({title:B().describe(`Outcome title`),requiredSections:G(B()).default(Wg).describe(`Required sections for finalization gate (defaults to current_state,boundary_analysis,interface_proposal)`)}),K({outcomeId:B().describe(`Outcome ID`),section:B().describe(`Section name`),sourceRunId:Z(B()).describe(`Optional source run ID`),content:B().describe(`Section fragment content`)}),K({fragmentId:B().describe(`Fragment ID`),approved:U().describe(`Review decision`)}),K({outcomeId:B().describe(`Outcome ID`)}),K({}),K({teamId:B(),teamName:B(),members:G(Yg),taskCounts:q(Kg,H()),unreadMessages:H(),missionLogEntries:H(),activeRuns:H(),queuedRuns:H(),outcomeCounts:q(Jg,H())});var Zg=K({id:B(),title:B(),description:B(),status:Kg,createdAt:Gg,updatedAt:Gg,createdBy:B(),assignee:B().optional(),dependsOn:G(B()),summary:B().optional(),isReady:U(),blockedBy:G(B())});dm(`action`,[K({action:Y(`create`),taskId:B(),status:Kg,ignoredFields:G(B()).optional(),note:B().optional()}),K({action:Y(`list`),tasks:G(Zg)}),K({action:Y(`claim`),taskId:B(),status:Kg,nextStep:B()}),K({action:Y(`complete`),taskId:B(),status:Kg}),K({action:Y(`block`),taskId:B(),status:Kg})]),K({agentId:B(),mode:J([`sync`,`async`]),status:J([`dispatched`,`running`,`queued`,`joined`]),dispatched:U(),message:B(),deduped:U().optional(),runId:B().optional(),text:B().optional(),iterations:H().optional()});var Qg=K({textPreview:B(),iterations:H(),finishReason:B(),durationMs:H(),usage:K({inputTokens:H(),outputTokens:H(),cacheReadTokens:H().optional(),cacheWriteTokens:H().optional(),totalCost:H().optional()})});K({id:B(),agentId:B(),taskId:B().optional(),status:qg,messagePreview:B(),priority:H(),retryCount:H(),maxRetries:H(),nextAttemptAt:Gg.optional(),continueConversation:U().optional(),startedAt:Gg,endedAt:Gg.optional(),leaseOwner:B().optional(),heartbeatAt:Gg.optional(),lastProgressAt:Gg.optional(),lastProgressMessage:B().optional(),currentActivity:B().optional(),error:B().optional(),resultSummary:Qg.optional()}),K({id:B(),teamId:B(),fromAgentId:B(),toAgentId:B(),subject:B(),body:B(),taskId:B().optional(),sentAt:Gg,readAt:Gg.optional()}),K({id:B(),teamId:B(),title:B(),status:Jg,requiredSections:G(B()),createdBy:B(),createdAt:Gg,finalizedAt:Gg.optional()}),K({outcomeId:B(),status:Jg,requiredSections:G(B())}),K({agentId:B(),status:B()}),K({runId:B(),status:qg}),K({id:B(),toAgentId:B()}),K({delivered:H()}),K({id:B()}),K({status:B()}),K({fragmentId:B(),status:B()}),K({outcomeId:B(),status:Jg});var $g;(e=>{e.TaskStart=`task_start`,e.TaskEnd=`task_end`,e.AgentEvent=`agent_event`,e.TeammateSpawned=`teammate_spawned`,e.TeammateShutdown=`teammate_shutdown`,e.TeamTaskUpdated=`team_task_updated`,e.TeamMessage=`team_message`,e.TeamMissionLog=`team_mission_log`,e.TeamTaskCompleted=`team_task_completed`,e.RunStarted=`run_started`,e.RunQueued=`run_queued`,e.RunProgress=`run_progress`,e.RunCompleted=`run_completed`,e.RunFailed=`run_failed`,e.RunCancelled=`run_cancelled`,e.RunInterrupted=`run_interrupted`,e.OutcomeCreated=`outcome_created`,e.OutcomeFragmentAttached=`outcome_fragment_attached`,e.OutcomeFragmentReviewed=`outcome_fragment_reviewed`,e.OutcomeFinalized=`outcome_finalized`})($g||={});function e_(e){let t=D.useRef(!0);t.current&&(t.current=!1,e())}var t_=D.createContext(null);function n_(){let e=D.useContext(t_);if(e===null)throw Error(Ne(60));return e}var r_=(e,t)=>Object.is(e,t);function i_(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function a_(e,t,n){return!e||e.length===0?!1:e.some(e=>e!==void 0&&i_(t,e,n))}function o_(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e!==void 0&&i_(e,t,n))}function s_(e,t,n,r){let i=o_(e,r&&Array.isArray(t)?t[t.length-1]:t,n);return i===-1?null:i}function c_(e,t,n){return e.filter(e=>!i_(t,e,n))}function l_(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var Q=r();function u_(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function d_(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(u_(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function f_(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return l_(e)}function p_(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?l_(e.value):l_(e)}function m_(e,t,n){function r(){return f_(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=u_(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function h_(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Q.jsx)(D.Fragment,{children:m_(r,t,n)},i)),e),[])}var $={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:p_(t,r)!==``},hasNullItemLabel:(e,t)=>t?d_(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>i_(t,e,n)):i_(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function g_(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function __(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:o,defaultOpen:s=!1,onOpenChange:d,name:f,form:m,autoComplete:te,disabled:h=!1,readOnly:g=!1,required:ne=!1,modal:re=!0,actionsRef:ie,inputRef:_,onOpenChangeComplete:ae,items:oe,multiple:y=!1,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S=r_,highlightItemOnHover:ce=!0,children:ue}=e,{clearErrors:de}=De(),{setDirty:fe,setTouched:pe,setFocused:me,validityData:he,setFilled:_e,name:ve,disabled:ye,validation:be,validationMode:Se}=ke(),Ce=Qe({id:t}),w=ye||h,T=ve??f,[E,we]=l({controlled:n,default:y?r??We:r,name:`Select`,state:`value`}),[Ae,Ne]=l({controlled:o,default:s,name:`Select`,state:`open`}),Fe=D.useRef([]),Ie=D.useRef([]),Le=D.useRef(null),Re=D.useRef(null),Ve=D.useRef(0),He=D.useRef(null),Ge=D.useRef([]),qe=D.useRef(!1),Je=D.useRef(null),Ye=D.useRef(null),Ze=D.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),$e=D.useRef(!1),{mounted:tt,setMounted:rt,transitionStatus:it}=et(Ae),{openMethod:at,triggerProps:st}=p(Ae),ct=Te(()=>new ot({id:Ce,labelId:void 0,modal:re,multiple:y,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,value:E,open:Ae,mounted:tt,transitionStatus:it,items:oe,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,lt=u(ct,$.activeIndex),ut=u(ct,$.selectedIndex),dt=u(ct,$.triggerElement),ft=u(ct,$.positionerElement),pt=yt(at),mt=at??pt,ht=D.useMemo(()=>y?``:p_(E,x),[y,E,x]),gt=D.useMemo(()=>y&&Array.isArray(E)?E.map(e=>p_(e,x)):p_(E,x),[y,E,x]),_t=C(dt),bt=Me(()=>gt);ze(_t,Ce,E,bt,!w,f);let xt=D.useRef(E),St=y?Array.isArray(E)&&E.length>0:E!=null&&ht!==``;xe(()=>{_e(St)},[St,_e]),xe(function(){let e=E,t=!1;if(y){let n=Array.isArray(E)?E:[];t=n.length===0,e=n[n.length-1]}let n=t?-1:o_(Ge.current,e,S),r=n===-1?null:n;r===null&&(Ye.current=null),!Ae&&ct.set(`selectedIndex`,r)},[y,Ae,E,S,ct]);function Ct(e){let t=he.initialValue;return Array.isArray(e)&&Array.isArray(t)?!g_(e,t,(e,t)=>i_(e,t,S)):e!==t}v(E,()=>{de(T),fe(Ct(E)),be.change(E)});let wt=Me((e,t)=>{d?.(e,t),!t.isCanceled&&(Ne(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(pe(!0),me(!1),Se===`onBlur`&&be.commit(E)))}),Tt=Me(()=>{rt(!1),ct.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),ae?.(!1)});Oe({enabled:!ie,open:Ae,ref:Le,onComplete(){Ae||Tt()}}),D.useImperativeHandle(ie,()=>({unmount:Tt}),[Tt]);let Et=Me((e,t)=>{i?.(e,t),!t.isCanceled&&we(e)}),Ot=Me(e=>{let t=Ke(e.scrollHeight,e.clientHeight),n=je(e.scrollTop,t),r=n>0,i=n<t;ct.set(`scrollUpArrowVisible`,r),ct.set(`scrollDownArrowVisible`,i)}),kt=vt({open:Ae,onOpenChange:wt,elements:{reference:dt,floating:ft}}),O=ee(kt,{enabled:!g&&!w,event:`mousedown`}),At=le(kt),jt=se(kt,{enabled:!g&&!w,listRef:Fe,activeIndex:lt,selectedIndex:ut,disabledIndices:We,onNavigate(e){e===null&&!Ae||ct.set(`activeIndex`,e)},focusItemOnHover:ce}),Mt=ge(kt,{enabled:!g&&!w&&(Ae||!y),listRef:Ie,activeIndex:lt,selectedIndex:ut,disabledIndices:e=>Dt(Fe.current[e]),onMatch(e){Ae?ct.set(`activeIndex`,e):Et(Ge.current[e],Be(nt))},onTyping(e){qe.current=e}}),Nt=D.useMemo(()=>c(Mt.reference,jt.reference,At.reference,O.reference,st),[O.reference,Mt.reference,jt.reference,At.reference,st]),k=D.useMemo(()=>c(Pe,Mt.floating,jt.floating,At.floating),[Mt.floating,jt.floating,At.floating]),Pt=jt.item??Xe;e_(()=>{ct.update({popupProps:k,triggerProps:Nt})}),ct.useSyncedValues({id:Ce,modal:re,multiple:y,value:E,open:Ae,mounted:tt,transitionStatus:it,popupProps:k,triggerProps:Nt,items:oe,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,openMethod:mt});let Ft=D.useMemo(()=>({store:ct,floatingContext:kt,required:ne,disabled:w,readOnly:g,multiple:y,highlightItemOnHover:ce,setValue:Et,setOpen:wt,listRef:Fe,popupRef:Le,scrollHandlerRef:Re,handleScrollArrowVisibility:Ot,scrollArrowsMountedCountRef:Ve,itemProps:Pt,valueRef:He,valuesRef:Ge,labelsRef:Ie,typingRef:qe,selectionRef:Ze,firstItemTextRef:Je,selectedItemTextRef:Ye,validation:be,onOpenChangeComplete:ae,alignItemWithTriggerActiveRef:$e,initialValueRef:xt}),[ct,kt,ne,w,g,y,ce,Et,wt,Pt,be,ae,Ot]),It=Ue(_,be.inputRef),Lt=y?void 0:T,Rt=D.useMemo(()=>!y||!Array.isArray(E)||!T?null:E.map(e=>{let t=p_(e,x);return(0,Q.jsx)(`input`,{type:`hidden`,form:m,name:T,value:t,disabled:w},t)}),[y,E,m,T,x,w]);return(0,Q.jsxs)(t_.Provider,{value:Ft,children:[ue,(0,Q.jsx)(`input`,{...be.getValidationProps(w,{onFocus(){ct.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||w||g)return;let t=e.currentTarget.value,n=Be(nt,e.nativeEvent);function r(){if(y)return;let e=t.toLowerCase(),r=Ge.current.findIndex(t=>p_(t,x).toLowerCase()===e||f_(t,b).toLowerCase()===e);r===-1&&(r=Ge.current.findIndex((t,n)=>{let r=Ie.current[n];return r!=null&&r.toLowerCase()===e}));let i=Ge.current[r];i!=null&&Et(i,n)}ct.set(`forceMount`,!0),queueMicrotask(r)}}),id:Ce&&Lt==null?`${Ce}-hidden-input`:void 0,form:m,name:Lt,autoComplete:te,value:ht,disabled:w,required:ne&&!(y&&St),readOnly:g,ref:It,style:T?Ee:a,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Rt]})}function v_(e,t){return e??t}var y_=400,b_={...Ge,...ye,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},x_=D.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...l}=e,{setTouched:d,setFocused:f,validationMode:p,state:ee,disabled:m}=ke(),{labelId:te}=E(),{store:h,setOpen:g,selectionRef:ne,validation:re,readOnly:ie,required:_,alignItemWithTriggerActiveRef:ae,disabled:v}=n_(),y=m||v||a,se=u(h,$.open),b=u(h,$.mounted),S=u(h,$.value),ce=u(h,$.triggerProps),le=u(h,$.positionerElement),ue=u(h,$.listElement),de=u(h,$.popupSide),fe=u(h,$.id),pe=u(h,$.labelId),me=u(h,$.hasSelectedValue),he=b&&le?de:null,ge=i??fe,_e=v_(te,pe);Qe({id:ge});let ve=C(le),ye=D.useRef(null),{getButtonProps:be,buttonRef:xe}=Fe({disabled:y,native:o}),Se=h.useStateSetter(`triggerElement`),Ce=Ve(),w=Ve(),T=Ve();D.useEffect(()=>{if(se)return T.start(y_,()=>{ne.current.allowUnselectedMouseUp=!0,ne.current.allowSelectedMouseUp=!0}),()=>{T.clear()};ne.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},w.clear()},[se,ne,w,T]);let Te=c(ce,{id:ge,role:`combobox`,"aria-expanded":se,"aria-haspopup":`listbox`,"aria-controls":se?ue?.id??oe(le)?.id:void 0,"aria-labelledby":_e,"aria-readonly":ie||void 0,"aria-required":_||void 0,tabIndex:y?-1:0,onFocus(e){f(!0),se&&ae.current&&g(!1,Be(nt,e.nativeEvent)),Ce.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){x(le,e.relatedTarget)||(d(!0),f(!1),p===`onBlur`&&re.commit(S))},onMouseDown(e){if(se)return;let t=Ze(e.currentTarget);function n(e){if(!ye.current)return;let t=e.target;x(ye.current,t)||x(ve.current,t)||$e(e,ye.current)||g(!1,Be(we,e))}w.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},l,be),Ee=re.getValidationProps(y,Te);Ee.role=`combobox`;let De={...ee,open:se,disabled:y,value:S,readOnly:ie,popupSide:he,placeholder:!me};return lt(`button`,e,{ref:[t,ye,xe,Se],state:De,stateAttributesMapping:b_,props:Ee})}),S_={value:()=>null},C_=D.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:l}=n_(),d=u(c,$.value),f=u(c,$.items),p=u(c,$.itemToStringLabel),ee=u(c,$.hasSelectedValue),m=!ee&&a!=null&&i==null,te=u(c,$.hasNullItemLabel,m),h={value:d,placeholder:!ee},g=null;return g=typeof i==`function`?i(d):i??(m&&!te?a:Array.isArray(d)?h_(d,f,p):m_(d,f,p)),lt(`span`,e,{state:h,ref:[t,l],props:[{children:g},s],stateAttributesMapping:S_})}),w_=D.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=n_(),s={open:u(o,$.open)};return lt(`span`,e,{state:s,ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:re})}),T_=D.forwardRef(function(e,t){let{store:n}=n_(),r=u(n,$.mounted),i=u(n,$.forceMount);return r||i?(0,Q.jsx)(y,{ref:t,...e}):null}),E_=D.createContext(void 0);function D_(){let e=D.useContext(E_);if(!e)throw Error(Ne(59));return e}function O_(e,t){e&&Object.assign(e.style,t)}var k_={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},A_={position:`fixed`},j_=D.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:c,sideOffset:l,alignOffset:d,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p,arrowPadding:ee,sticky:m,disableAnchorTracking:h,alignItemWithTrigger:g=!0,collisionAvoidance:ne=ae,style:re,...ie}=e,{store:_,listRef:oe,labelsRef:v,alignItemWithTriggerActiveRef:y,selectedItemTextRef:se,valuesRef:b,initialValueRef:x,popupRef:S,setValue:ce,floatingContext:le}=n_(),ue=u(_,$.open),de=u(_,$.mounted),fe=u(_,$.modal),pe=u(_,$.value),me=u(_,$.openMethod),he=u(_,$.positionerElement),ge=u(_,$.triggerElement),_e=u(_,$.isItemEqualToValue),ve=u(_,$.transitionStatus),ye=D.useRef(null),be=D.useRef(null),[C,Ce]=D.useState(g),w=de&&C&&me!==`touch`;!de&&C!==g&&Ce(g),D.useImperativeHandle(y,()=>w),st((w||fe)&&ue,me===`touch`,he,ge);let T=te({anchor:n,floatingRootContext:le,positionMethod:a,mounted:de,side:o,sideOffset:l,align:c,alignOffset:d,arrowPadding:ee,collisionBoundary:f,collisionPadding:p,sticky:m,disableAnchorTracking:h??w,collisionAvoidance:ne,keepMounted:!0}),E=w?`none`:T.side,we=w?A_:T.positionerStyles,Te={open:ue,side:E,align:T.align,anchorHidden:T.anchorHidden};xe(()=>{_.set(`popupSide`,T.side)},[_,T.side]);let Ee=_.useStateSetter(`positionerElement`),De=s(e,Te,{styles:we,transitionStatus:ve,props:ie,refs:[t,Ee],hidden:!de,inert:!ue}),Oe=D.useRef(0),ke=Me(e=>{if(b.current.length===0)return;let t=Oe.current;if(Oe.current=e.size,e.size===t)return;let n=Be(nt);if(t!==0&&!_.state.multiple&&pe!==null&&o_(b.current,pe,_e)===-1){let e=x.current,t=e!=null&&o_(b.current,e,_e)!==-1?e:null;ce(t,n),t===null&&(_.set(`selectedIndex`,null),se.current=null)}if(t!==0&&_.state.multiple&&Array.isArray(pe)){let e=pe.filter(e=>o_(b.current,e,_e)!==-1);e.length!==pe.length&&(ce(e,n),e.length===0&&(_.set(`selectedIndex`,null),se.current=null))}if(ue&&w){_.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};O_(he,e),O_(S.current,e)}}),Ae=D.useMemo(()=>({...T,side:E,alignItemWithTriggerActive:w,setControlledAlignItemWithTrigger:Ce,scrollUpArrowRef:ye,scrollDownArrowRef:be}),[T,E,w,Ce]);return(0,Q.jsx)(Se,{elementsRef:oe,labelsRef:v,onMapChange:ke,children:(0,Q.jsxs)(E_.Provider,{value:Ae,children:[de&&fe&&(0,Q.jsx)(Re,{inert:ct(!ue),cutout:ge}),De]})})}),M_={...m,...he},N_=D.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...s}=e,{store:c,popupRef:l,onOpenChangeComplete:d,setOpen:p,valueRef:ee,firstItemTextRef:m,selectedItemTextRef:te,multiple:h,handleScrollArrowVisibility:g,scrollHandlerRef:ne,listRef:re,highlightItemOnHover:ie,floatingContext:_}=n_(),{side:ae,align:oe,alignItemWithTriggerActive:v,isPositioned:y,setControlledAlignItemWithTrigger:se}=D_(),b=it(!0)!=null,x=ue(),{nonce:S,disableStyleElements:ce}=He(),le=u(c,$.id),pe=u(c,$.open),me=u(c,$.openMethod),he=u(c,$.mounted),ge=u(c,$.popupProps),ve=u(c,$.transitionStatus),ye=u(c,$.triggerElement),C=u(c,$.positionerElement),Se=u(c,$.listElement),Ce=D.useRef(!1),w=D.useRef(!1),E=D.useRef({}),we=qe(),Te=Me(e=>{if(!C||!l.current||!w.current)return;let t=C.style.top===`0px`,n=C.style.bottom===`0px`;if(Ce.current||!v||!t&&!n){g(e);return}let r=I_(C),i=L_(C.getBoundingClientRect().height,`y`,r),a=Ze(C),o=de(C),s=o.getComputedStyle(C),c=parseFloat(s.marginTop),u=parseFloat(s.marginBottom),d=P_(o.getComputedStyle(l.current)),f=Math.min(a.documentElement.clientHeight-c-u,d),p=e.scrollTop,ee=F_(e),m=null,te=e=>{C.style.height=`${e}px`},h=t?ee-p:p,ne=Math.min(i+h,f);if(h<=1){let n=be(h,0,f-i);n>0&&te(i+n),e.scrollTop=t?ee:0,f-(i+n)<=1&&(Ce.current=!0),g(e);return}f-ne>1?m=t?1/0:0:n&&p<ee&&(m=p-(h-(i+h-f)));let re=Math.ceil(ne);if(re!==0&&te(re),m!=null){let t=be(m,0,F_(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}re>=f-1&&(Ce.current=!0),g(e)});D.useImperativeHandle(ne,()=>Te,[Te]),Oe({open:pe,ref:l,onComplete(){pe&&d?.(!0)}});let Ee={open:pe,transitionStatus:ve,side:ae,align:oe};xe(()=>{!C||!l.current||Object.keys(E.current).length||(E.current={top:C.style.top||`0`,left:C.style.left||`0`,right:C.style.right,height:C.style.height,bottom:C.style.bottom,minHeight:C.style.minHeight,maxHeight:C.style.maxHeight,marginTop:C.style.marginTop,marginBottom:C.style.marginBottom})},[l,C]),xe(()=>{pe||v||(w.current=!1,Ce.current=!1,O_(C,E.current))},[pe,v,C,l]),xe(()=>{let e=l.current;if(!pe||!ye||!C||!e||v&&!y||c.state.transitionStatus===`ending`)return;if(w.current=!0,e.style.removeProperty(`--transform-origin`),!v){we.request(()=>g(Se||e));return}let t=B_(e);try{let t=te.current;t?.isConnected||(t=!$.hasSelectedValue(c.state)&&m.current?.isConnected?m.current:null);let n=ee.current,r=de(C),i=r.getComputedStyle(C),a=r.getComputedStyle(e),o=Ze(ye),s=I_(ye),l=R_(ye.getBoundingClientRect(),s),u=R_(C.getBoundingClientRect(),s),d=l.height,f=Se||e,p=f.scrollHeight,h=parseFloat(a.borderBottomWidth),ne=parseFloat(i.marginTop)||10,_=parseFloat(i.marginBottom)||10,ae=parseFloat(i.minHeight)||100,oe=P_(a),v=o.documentElement.clientHeight-ne-_,y=o.documentElement.clientWidth,b=v-l.bottom+d,S,ce=x===`rtl`?l.right-u.width:l.left,le=0;if(t&&n){let e=R_(n.getBoundingClientRect(),s);S=R_(t.getBoundingClientRect(),s),ce=u.left+(x===`rtl`?e.right-S.right:e.left-S.left);let r=e.top-l.top+e.height/2;le=S.top-u.top+S.height/2-r}let ue=b+le+_+h,fe=Math.min(v,ue),pe=v-ne-_,me=ue-fe,he=y-5;C.style.left=`${be(ce,5,he-u.width)}px`,C.style.height=`${fe}px`,C.style.maxHeight=`none`,C.style.marginTop=`${ne}px`,C.style.marginBottom=`${_}px`,e.style.height=`100%`;let ge=F_(f),ve=me>=ge-1;ve&&(fe=Math.min(v,u.height)-(me-ge));let xe=l.top<20||l.bottom>v-20||Math.ceil(fe)+1<Math.min(p,ae),w=(r.visualViewport?.scale??1)!==1&&_e;if(xe||w){O_(C,E.current),se(!1);return}let T=Math.max(ae,fe);if(ve){let e=Math.max(0,v-ue);C.style.top=u.height>=pe?`0`:`${e}px`,C.style.height=`${fe}px`,f.scrollTop=F_(f)}else C.style.bottom=`0`,f.scrollTop=me;if(S){let t=u.top,n=u.height,r=S.top+S.height/2,i=be(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(T===v||fe>=oe)&&(Ce.current=!0),g(f),ie&&c.state.selectedIndex===null&&c.state.activeIndex===null&&re.current[0]!=null&&c.set(`activeIndex`,0)}finally{t()}},[c,pe,C,ye,ee,m,te,l,g,v,se,we,Se,re,ie,x,y]),D.useEffect(()=>{if(!v||!C||!pe)return;let e=de(C);function t(e){p(!1,Be(Ie,e))}return T(e,`resize`,t)},[p,v,C,pe]);let De={...Se?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":h||void 0,id:`${le}-list`},onKeyDown(e){b&&o.has(e.key)&&e.stopPropagation()},onScroll(e){Se||Te(e.currentTarget)},...v&&{style:Se?{height:`100%`}:k_},className:!Se&&v?Ye.className:void 0},ke=lt(`div`,e,{ref:[t,l],state:Ee,stateAttributesMapping:M_,props:[ge,De,fe(ve),s]});return(0,Q.jsxs)(D.Fragment,{children:[!ce&&Ye.getElement(S),(0,Q.jsx)(f,{context:_,modal:!1,disabled:!he,openInteractionType:me,returnFocus:a,restoreFocus:!0,children:ke})]})});function P_(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function F_(e){return Ke(e.scrollHeight,e.clientHeight)}function I_(e){return rt.getScale(e)}function L_(e,t,n){return e/n[t]}function R_(e,t){return ve({x:L_(e.x,`x`,t),y:L_(e.y,`y`,t),width:L_(e.width,`x`,t),height:L_(e.height,`y`,t)})}var z_=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function B_(e){let{style:t}=e,n={};for(let[e,r]of z_)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of z_){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var V_=D.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:s,multiple:c}=n_(),{alignItemWithTriggerActive:l}=D_(),d=u(o,$.hasScrollArrows),f=u(o,$.openMethod),p={id:`${u(o,$.id)}-list`,role:`listbox`,"aria-multiselectable":c||void 0,onScroll(e){s.current?.(e.currentTarget)},...l&&{style:k_},className:d&&f!==`touch`?Ye.className:void 0},ee=o.useStateSetter(`listElement`);return lt(`div`,e,{ref:[t,ee],props:[p,a]})}),H_=D.createContext(void 0);function U_(){let e=D.useContext(H_);if(!e)throw Error(Ne(57));return e}var W_=D.memo(D.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,d=D.useRef(null),f=S({guess:!0,label:o,textRef:d}),{store:p,itemProps:ee,setOpen:m,setValue:te,selectionRef:h,typingRef:g,valuesRef:ne,multiple:re,selectedItemTextRef:_,disabled:ae,readOnly:oe}=n_(),v=ae||s,y=u(p,$.isActive,f.index),se=u(p,$.open),b=u(p,$.isSelected,a),x=u(p,$.isSelectedByFocus,f.index),ce=u(p,$.isItemEqualToValue),le=f.index,ue=D.useRef(null);xe(()=>{let e=ne.current;return e[le]=a,()=>{delete e[le]}},[le,a,ne]),xe(()=>{let e=p.state.value,t=e;re&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),t!==void 0&&i_(a,t,ce)&&(p.set(`selectedIndex`,le),d.current&&(_.current=d.current))},[le,re,ce,p,a,_]);let de=D.useRef(`mouse`),fe=D.useRef(!1),{getButtonProps:pe,buttonRef:me}=Fe({disabled:v,focusableWhenDisabled:!0,native:c,composite:!0}),he={disabled:v,selected:b,highlighted:y};function ge(e){if(ae||oe)return;let t=p.state.value;if(re){let n=Array.isArray(t)?t:[],r=b?c_(n,a,ce):[...n,a];te(r,Be(at,e))}else te(a,Be(at,e)),m(!1,Be(at,e))}function _e(){h.current.dragY=0}let ve={role:`option`,"aria-selected":b,tabIndex:se&&y?0:-1,onKeyDown(e){p.set(`activeIndex`,le),e.key===` `&&g.current&&e.preventDefault()},onClick(e){let t=de.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&ie(e.nativeEvent)&&(n!==void 0||y),i=t&&!r&&!fe.current;fe.current=!1,!(v||i)&&ge(e.nativeEvent)},onPointerEnter(e){de.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=h.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){de.current=e.pointerType,fe.current=!0,_e()},onMouseUp(){if(_e(),v||de.current===`touch`||fe.current)return;let e=!h.current.allowSelectedMouseUp&&b,t=!h.current.allowUnselectedMouseUp&&!b;e||t||(fe.current=!0,ue.current?.click(),fe.current=!1)}},ye=lt(`div`,e,{ref:[me,t,f.ref,ue],state:he,props:[ee,ve,l,pe]}),be=D.useMemo(()=>({selected:b,index:le,textRef:d,selectedByFocus:x}),[b,le,d,x]);return(0,Q.jsx)(H_.Provider,{value:be,children:ye})})),G_=D.forwardRef(function(e,t){let{selected:n}=U_();return e.keepMounted||n?(0,Q.jsx)(K_,{...e,ref:t}):null}),K_=D.memo(D.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=U_(),c=D.useRef(null),{transitionStatus:l,setMounted:u}=et(s),d=lt(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:he});return Oe({open:s,ref:c,onComplete(){s||u(!1)}}),d})),q_=D.memo(D.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=U_(),{firstItemTextRef:a,selectedItemTextRef:o}=n_(),{render:s,className:c,style:l,...u}=e,d=D.useCallback(e=>{e&&(n===0&&(a.current=e),i&&(o.current=e))},[a,o,n,i]);return lt(`div`,e,{ref:[d,t,r],props:u})})),J_=D.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,{store:l,popupRef:d,listRef:f,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:ee}=n_(),{side:m,scrollDownArrowRef:te,scrollUpArrowRef:h}=D_(),g=c?$.scrollUpArrowVisible:$.scrollDownArrowVisible,ne=u(l,g),re=u(l,$.openMethod),ie=ne&&re!==`touch`,_=Ve(),ae=c?h:te,{mounted:oe,transitionStatus:v,setMounted:y}=et(ie);xe(()=>(ee.current+=1,l.set(`hasScrollArrows`,!0),()=>{ee.current=Math.max(0,ee.current-1),ee.current===0&&l.set(`hasScrollArrows`,!1)}),[l,ee]),Oe({open:ie,ref:ae,onComplete(){ie||y(!1)}});let se=lt(`div`,e,{ref:[t,ae],state:{direction:a,visible:ie,side:m,transitionStatus:v},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||_.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??d.current;if(!e)return;l.set(`activeIndex`,null),p(e);let n=Ke(e.scrollHeight,e.clientHeight),r=je(e.scrollTop,n),i=r===(c?0:n),a=f.current;if(r!==e.scrollTop&&(e.scrollTop=r),i){_.clear();return}if(a.length>0){let t=ae.current?.offsetHeight||0;e.scrollTop=Y_(a,c,r,e.clientHeight,t,n)}_.start(40,t)}_.start(40,t)},onMouseLeave(){_.clear()}},s],stateAttributesMapping:he});return oe||o?se:null});function Y_(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?je(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?je(l.offsetTop+l.offsetHeight-r+i,a):a}var X_=D.forwardRef(function(e,t){return(0,Q.jsx)(J_,{...e,ref:t,direction:`down`})}),Z_=D.forwardRef(function(e,t){return(0,Q.jsx)(J_,{...e,ref:t,direction:`up`})}),Q_=__;function $_({className:e,...t}){return(0,Q.jsx)(C_,{"data-slot":`select-value`,className:b(`flex flex-1 text-left`,e),...t})}function ev({className:e,size:t=`default`,children:n,...r}){return(0,Q.jsxs)(x_,{"data-slot":`select-trigger`,"data-size":t,className:b(`flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,Q.jsx)(w_,{render:(0,Q.jsx)(bt,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function tv({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...s}){return(0,Q.jsx)(T_,{children:(0,Q.jsx)(j_,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,Q.jsxs)(N_,{"data-slot":`select-content`,"data-align-trigger":o,className:b(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...s,children:[(0,Q.jsx)(rv,{}),(0,Q.jsx)(V_,{children:t}),(0,Q.jsx)(iv,{})]})})})}function nv({className:e,children:t,...n}){return(0,Q.jsxs)(W_,{"data-slot":`select-item`,className:b(`relative flex w-full cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,Q.jsx)(q_,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,Q.jsx)(G_,{render:(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,Q.jsx)(g,{className:`pointer-events-none`})})]})}function rv({className:e,...t}){return(0,Q.jsx)(Z_,{"data-slot":`select-scroll-up-button`,className:b(`top-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Q.jsx)(xt,{})})}function iv({className:e,...t}){return(0,Q.jsx)(X_,{"data-slot":`select-scroll-down-button`,className:b(`bottom-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Q.jsx)(bt,{})})}function av(e){return gt(`dialog`,e)}function ov({...e}){return(0,Q.jsx)(av,{"data-slot":`dialog`,...e})}function sv({...e}){return(0,Q.jsx)(Et,{"data-slot":`dialog-trigger`,...e})}function cv({...e}){return(0,Q.jsx)(pt,{"data-slot":`dialog-portal`,...e})}function lv({className:e,...t}){return(0,Q.jsx)(mt,{"data-slot":`dialog-overlay`,className:b(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function uv({className:e,children:t,showCloseButton:n=!0,...r}){return(0,Q.jsxs)(cv,{children:[(0,Q.jsx)(lv,{}),(0,Q.jsxs)(ht,{"data-slot":`dialog-content`,className:b(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[t,n&&(0,Q.jsxs)(ut,{"data-slot":`dialog-close`,render:(0,Q.jsx)(tt,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,Q.jsx)(Tt,{}),(0,Q.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function dv({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`dialog-header`,className:b(`flex flex-col gap-2`,e),...t})}function fv({className:e,showCloseButton:t=!1,children:n,...r}){return(0,Q.jsxs)(`div`,{"data-slot":`dialog-footer`,className:b(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,Q.jsx)(ut,{render:(0,Q.jsx)(tt,{variant:`outline`}),children:`Close`})]})}function pv({className:e,...t}){return(0,Q.jsx)(_t,{"data-slot":`dialog-title`,className:b(`text-base leading-none font-medium`,e),...t})}function mv({className:e,...t}){return(0,Q.jsx)(ft,{"data-slot":`dialog-description`,className:b(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function hv({className:e,...t}){return(0,Q.jsx)(`textarea`,{"data-slot":`textarea`,className:b(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function gv({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:b(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var _v=ce(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function vv({className:e,align:t=`inline-start`,...n}){return(0,Q.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:b(_v({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var yv=ce(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function bv({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,Q.jsx)(tt,{type:t,"data-size":r,variant:n,className:b(yv({size:r}),e),...i})}function xv({className:e,...t}){return(0,Q.jsx)(w,{"data-slot":`input-group-control`,className:b(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function Sv({className:e,...t}){return(0,Q.jsx)(hv,{"data-slot":`input-group-control`,className:b(`flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function Cv({className:e,...t}){return(0,Q.jsx)(`label`,{"data-slot":`label`,className:b(`flex items-center gap-2 text-base leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}export{c_ as A,wt as B,u_ as C,r_ as D,i_ as E,Og as F,St as H,Tg as I,vg as L,e_ as M,Sg as N,o_ as O,eg as P,Cg as R,d_ as S,p_ as T,bt as U,Ct as V,vt as W,nv as _,xv as a,v_ as b,ov as c,fv as d,dv as f,tv as g,Q_ as h,bv as i,a_ as j,s_ as k,uv as l,sv as m,gv as n,Sv as o,pv as p,vv as r,hv as s,Cv as t,mv as u,ev as v,f_ as w,g_ as x,$_ as y,Tt as z};
|
|
76
|
+
The run_commands tool remains available in plan mode strictly for read-only inspection -- listing files, searching (grep), reading configs, inspecting git history and diffs, checking tool versions, and the like. Never use it to change anything: no creating, modifying, or deleting files, no writing scripts that make changes, and no state-changing commands (installs, migrations, database or schema changes, container commands that mutate state, etc.). File-editing commands (rm/mv/cp, in-place edits like sed -i, output redirection to files outside /tmp, git commands that change the working tree, package installs) are hard-blocked in plan mode: they are not executed and return a tool error instead, so do not attempt them. If the task requires a mutation, put it in the plan; it happens only after the user switches to act mode.`;`${Dg}`,`${Dg}`;var Og=`anthropic/claude-sonnet-5`,kg=K({models:G(K({id:B(),temperature:H().optional(),maxTokens:H().optional(),contextWindow:H().optional(),inputPrice:H().optional(),outputPrice:H().optional(),supportsImages:U().optional()})).optional(),openAiBaseUrl:B().optional(),openAiHeaders:q(B(),B()).optional(),azureApiVersion:B().optional(),azureIdentity:U().optional()}),Ag=K({id:B(),thinkingBudgetTokens:H().optional()}),jg=K({name:B(),baseModelId:B(),thinkingBudgetTokens:H().optional()}),Mg=K({models:G(Ag).optional(),customModels:G(jg).optional(),awsRegion:B().optional(),awsUseCrossRegionInference:U().optional(),awsUseGlobalInference:U().optional(),awsBedrockUsePromptCache:U().optional(),awsBedrockEndpoint:B().optional()}),Ng=K({models:G(K({id:B()})).optional()}),Pg=K({models:G(K({id:B(),thinkingBudgetTokens:H().optional()})).optional(),vertexProjectId:B().optional(),vertexRegion:B().optional()}),Fg=K({models:G(K({id:B(),thinkingBudgetTokens:H().optional(),promptCachingEnabled:U().optional()})).optional(),baseUrl:B().optional()}),Ig=K({models:G(K({id:B(),thinkingBudgetTokens:H().optional()})).optional(),baseUrl:B().optional()}),Lg=K({OpenAiCompatible:kg.optional(),AwsBedrock:Mg.optional(),Cline:Ng.optional(),Vertex:Pg.optional(),LiteLLM:Fg.optional(),Anthropic:Ig.optional()}),Rg=K({id:B()}),zg=K({name:B(),url:B(),alwaysEnabled:U().optional(),headers:q(B(),B()).optional()}),Bg=K({alwaysEnabled:U(),name:B(),contents:B()}),Vg=K({bucket:B(),accessKeyId:B(),secretAccessKey:B(),region:B().optional(),endpoint:B().optional(),accountId:B().optional()}),Hg=K({promptUploading:K({enabled:U().optional(),type:sm([Y(`s3_access_keys`),Y(`r2_access_keys`),Y(`azure_access_keys`)]).optional(),s3AccessSettings:Vg.optional(),r2AccessSettings:Vg.optional(),azureAccessSettings:Vg.optional()}).optional()});K({version:B(),providerSettings:Lg.optional(),telemetryEnabled:U().optional(),kanbanEnabled:U().optional(),mcpMarketplaceEnabled:U().optional(),allowedMCPServers:G(Rg).optional(),remoteMCPServers:G(zg).optional(),blockPersonalRemoteMCPServers:U().optional(),yoloModeAllowed:U().optional(),openTelemetryEnabled:U().optional(),openTelemetryMetricsExporter:B().optional(),openTelemetryLogsExporter:B().optional(),openTelemetryOtlpProtocol:B().optional(),openTelemetryOtlpEndpoint:B().optional(),openTelemetryOtlpHeaders:q(B(),B()).optional(),openTelemetryOtlpMetricsProtocol:B().optional(),openTelemetryOtlpMetricsEndpoint:B().optional(),openTelemetryOtlpMetricsHeaders:q(B(),B()).optional(),openTelemetryOtlpLogsProtocol:B().optional(),openTelemetryOtlpLogsEndpoint:B().optional(),openTelemetryOtlpLogsHeaders:q(B(),B()).optional(),openTelemetryMetricExportInterval:H().optional(),openTelemetryOtlpInsecure:U().optional(),openTelemetryLogBatchSize:H().optional(),openTelemetryLogBatchTimeout:H().optional(),openTelemetryLogMaxQueueSize:H().optional(),enterpriseTelemetry:Hg.optional(),globalRules:G(Bg).optional(),globalWorkflows:G(Bg).optional()}),q(B(),B()),zh.enum([`reasoning`,`prompt-cache`,`tools`,`provider-tools`,`oauth`,`temperature`,`files`,`streaming`,`vision`,`computer-use`,`local-auth`,`popular`]),zh.enum([`anthropic`,`gemini`,`openai-chat`,`openai-responses`,`openai-r1`,`ai-sdk`]),zh.enum([`anthropic`,`ai-sdk`,`ai-sdk-community`,`openai`,`openai-compatible`,`openai-r1`,`gemini`,`bedrock`,`custom`,`fetch`,`vertex`]);var Ug=K({rootPath:B().min(1),hint:B().min(1).optional(),associatedRemoteUrls:G(B().min(1)).optional(),latestGitCommitHash:B().min(1).optional(),latestGitBranchName:B().min(1).optional()});K({currentWorkspacePath:B().min(1).optional(),workspaces:q(B().min(1),Ug)});var Wg=[`current_state`,`boundary_analysis`,`interface_proposal`],Gg=xh(e=>e instanceof Date?e.toISOString():e,B().datetime()),Kg=J([`pending`,`in_progress`,`blocked`,`completed`]),qg=J([`queued`,`running`,`completed`,`failed`,`cancelled`,`interrupted`]),Jg=J([`draft`,`in_review`,`finalized`]),Yg=K({agentId:B(),role:J([`lead`,`teammate`]),description:B().optional(),status:J([`idle`,`running`,`stopped`])});K({agentId:B(),rolePrompt:B(),modelId:B().optional(),maxIterations:H().optional()});function Z(e){return xh(e=>e===null?void 0:e,e.optional())}K({agentId:B().min(1).describe(`Teammate identifier`),rolePrompt:B().min(1).describe(`System prompt describing teammate role`)}).strict(),K({agentId:B().min(1).describe(`Teammate identifier`),reason:Z(B().min(1)).describe(`Optional shutdown reason`)}),K({});var Xg={create:[`title`,`description`],list:[],claim:[`taskId`],complete:[`taskId`,`summary`],block:[`taskId`,`reason`]};K({action:J([`create`,`list`,`claim`,`complete`,`block`]),title:Z(B().min(1)).describe(`Task title`),description:Z(B().min(1)).describe(`Task details`),dependsOn:Z(G(B().describe(`Dependency task ID`))).describe(`Array of dependency task IDs`),assignee:Z(B().min(1)).describe(`Optional assignee`),status:Z(J([`pending`,`in_progress`,`blocked`,`completed`])).describe(`Optional task status filter`),taskId:Z(B()).describe(`Task ID`),summary:Z(B().min(1)).describe(`Completion summary`),reason:Z(B().min(1)).describe(`Blocking reason`)}).superRefine((e,t)=>{for(let n of Xg[e.action])e[n]===void 0&&t.addIssue({code:`custom`,path:[n],message:`Field "${n}" is required when action=${e.action}`})}),K({agentId:B().describe(`Teammate agent ID`),task:B().min(1).describe(`Task instructions for the teammate`),taskId:Z(B()).describe(`Optional shared task list ID`),runMode:Z(J([`sync`,`async`])).describe(`Execution mode: 'sync' blocks until the teammate finishes and returns the result (default if omitted); 'async' queues the run and returns a runId immediately — use team_await_runs to collect results later.`),continueConversation:Z(U()).describe(`If true, continue the teammate conversation; otherwise start fresh`)}),K({status:Z(J([`queued`,`running`,`completed`,`failed`,`cancelled`,`interrupted`])).describe(`Optional run status filter. Omit to include all statuses.`),agentId:Z(B().min(1)).describe(`Optional teammate ID filter. Omit to include all teammates.`),includeCompleted:Z(U()).describe(`Include completed/failed runs (default true)`)}),K({runId:B().min(1).describe(`Run ID`),reason:Z(B().min(1)).describe(`Optional cancellation reason`)}),K({runId:Z(B().min(1)).describe(`Optional async run ID to await. Omit to wait for all active async runs.`)}).strict(),K({toAgentId:B().min(1).describe(`Recipient agent ID`),subject:B().min(1).describe(`Message subject`),body:B().min(1).describe(`Message body`),taskId:Z(B().min(1)).describe(`Optional task ID context`)}),K({subject:B().min(1).describe(`Message subject`),body:B().min(1).describe(`Message body`),taskId:Z(B().min(1)).describe(`Optional task ID context`)}),K({unreadOnly:Z(U()).describe(`Only unread messages for read action (default true)`)}),K({kind:J([`progress`,`handoff`,`blocked`,`decision`,`done`,`error`]),summary:B().min(1).describe(`Update summary`),taskId:Z(B().min(1)).describe(`Optional task ID context`),evidence:Z(G(B().min(1))).describe(`Optional evidence links/snippets`),nextAction:Z(B().min(1)).describe(`Planned next step`)}),K({}),K({title:B().describe(`Outcome title`),requiredSections:G(B()).default(Wg).describe(`Required sections for finalization gate (defaults to current_state,boundary_analysis,interface_proposal)`)}),K({outcomeId:B().describe(`Outcome ID`),section:B().describe(`Section name`),sourceRunId:Z(B()).describe(`Optional source run ID`),content:B().describe(`Section fragment content`)}),K({fragmentId:B().describe(`Fragment ID`),approved:U().describe(`Review decision`)}),K({outcomeId:B().describe(`Outcome ID`)}),K({}),K({teamId:B(),teamName:B(),members:G(Yg),taskCounts:q(Kg,H()),unreadMessages:H(),missionLogEntries:H(),activeRuns:H(),queuedRuns:H(),outcomeCounts:q(Jg,H())});var Zg=K({id:B(),title:B(),description:B(),status:Kg,createdAt:Gg,updatedAt:Gg,createdBy:B(),assignee:B().optional(),dependsOn:G(B()),summary:B().optional(),isReady:U(),blockedBy:G(B())});dm(`action`,[K({action:Y(`create`),taskId:B(),status:Kg,ignoredFields:G(B()).optional(),note:B().optional()}),K({action:Y(`list`),tasks:G(Zg)}),K({action:Y(`claim`),taskId:B(),status:Kg,nextStep:B()}),K({action:Y(`complete`),taskId:B(),status:Kg}),K({action:Y(`block`),taskId:B(),status:Kg})]),K({agentId:B(),mode:J([`sync`,`async`]),status:J([`dispatched`,`running`,`queued`,`joined`]),dispatched:U(),message:B(),deduped:U().optional(),runId:B().optional(),text:B().optional(),iterations:H().optional()});var Qg=K({textPreview:B(),iterations:H(),finishReason:B(),durationMs:H(),usage:K({inputTokens:H(),outputTokens:H(),cacheReadTokens:H().optional(),cacheWriteTokens:H().optional(),totalCost:H().optional()})});K({id:B(),agentId:B(),taskId:B().optional(),status:qg,messagePreview:B(),priority:H(),retryCount:H(),maxRetries:H(),nextAttemptAt:Gg.optional(),continueConversation:U().optional(),startedAt:Gg,endedAt:Gg.optional(),leaseOwner:B().optional(),heartbeatAt:Gg.optional(),lastProgressAt:Gg.optional(),lastProgressMessage:B().optional(),currentActivity:B().optional(),error:B().optional(),resultSummary:Qg.optional()}),K({id:B(),teamId:B(),fromAgentId:B(),toAgentId:B(),subject:B(),body:B(),taskId:B().optional(),sentAt:Gg,readAt:Gg.optional()}),K({id:B(),teamId:B(),title:B(),status:Jg,requiredSections:G(B()),createdBy:B(),createdAt:Gg,finalizedAt:Gg.optional()}),K({outcomeId:B(),status:Jg,requiredSections:G(B())}),K({agentId:B(),status:B()}),K({runId:B(),status:qg}),K({id:B(),toAgentId:B()}),K({delivered:H()}),K({id:B()}),K({status:B()}),K({fragmentId:B(),status:B()}),K({outcomeId:B(),status:Jg});var $g;(e=>{e.TaskStart=`task_start`,e.TaskEnd=`task_end`,e.AgentEvent=`agent_event`,e.TeammateSpawned=`teammate_spawned`,e.TeammateShutdown=`teammate_shutdown`,e.TeamTaskUpdated=`team_task_updated`,e.TeamMessage=`team_message`,e.TeamMissionLog=`team_mission_log`,e.TeamTaskCompleted=`team_task_completed`,e.RunStarted=`run_started`,e.RunQueued=`run_queued`,e.RunProgress=`run_progress`,e.RunCompleted=`run_completed`,e.RunFailed=`run_failed`,e.RunCancelled=`run_cancelled`,e.RunInterrupted=`run_interrupted`,e.OutcomeCreated=`outcome_created`,e.OutcomeFragmentAttached=`outcome_fragment_attached`,e.OutcomeFragmentReviewed=`outcome_fragment_reviewed`,e.OutcomeFinalized=`outcome_finalized`})($g||={});function e_(e){let t=D.useRef(!0);t.current&&(t.current=!1,e())}var t_=D.createContext(null);function n_(){let e=D.useContext(t_);if(e===null)throw Error(Ne(60));return e}var r_=(e,t)=>Object.is(e,t);function i_(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function a_(e,t,n){return!e||e.length===0?!1:e.some(e=>e!==void 0&&i_(t,e,n))}function o_(e,t,n){return!e||e.length===0?-1:e.findIndex(e=>e!==void 0&&i_(e,t,n))}function s_(e,t,n,r){let i=o_(e,r&&Array.isArray(t)?t[t.length-1]:t,n);return i===-1?null:i}function c_(e,t,n){return e.filter(e=>!i_(t,e,n))}function l_(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}var Q=r();function u_(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function d_(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(u_(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function f_(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return l_(e)}function p_(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?l_(e.value):l_(e)}function m_(e,t,n){function r(){return f_(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){let n=t,i=u_(n)?n.flatMap(e=>e.items):n;if(typeof e!=`object`||!e){let t=i.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=i.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function h_(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,Q.jsx)(D.Fragment,{children:m_(r,t,n)},i)),e),[])}var $={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:p_(t,r)!==``},hasNullItemLabel:(e,t)=>t?d_(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>i_(t,e,n)):i_(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function g_(e,t,n=(e,t)=>e===t){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}function __(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:o,defaultOpen:s=!1,onOpenChange:d,name:f,form:m,autoComplete:te,disabled:h=!1,readOnly:g=!1,required:ne=!1,modal:re=!0,actionsRef:ie,inputRef:_,onOpenChangeComplete:ae,items:oe,multiple:y=!1,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S=r_,highlightItemOnHover:ce=!0,children:ue}=e,{clearErrors:de}=De(),{setDirty:fe,setTouched:pe,setFocused:me,validityData:he,setFilled:_e,name:ve,disabled:ye,validation:be,validationMode:Se}=ke(),Ce=Qe({id:t}),w=ye||h,T=ve??f,[E,we]=l({controlled:n,default:y?r??We:r,name:`Select`,state:`value`}),[Ae,Ne]=l({controlled:o,default:s,name:`Select`,state:`open`}),Fe=D.useRef([]),Ie=D.useRef([]),Le=D.useRef(null),Re=D.useRef(null),Ve=D.useRef(0),He=D.useRef(null),Ge=D.useRef([]),qe=D.useRef(!1),Je=D.useRef(null),Ye=D.useRef(null),Ze=D.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),$e=D.useRef(!1),{mounted:tt,setMounted:rt,transitionStatus:it}=et(Ae),{openMethod:at,triggerProps:st}=p(Ae),ct=Te(()=>new ot({id:Ce,labelId:void 0,modal:re,multiple:y,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,value:E,open:Ae,mounted:tt,transitionStatus:it,items:oe,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,lt=u(ct,$.activeIndex),ut=u(ct,$.selectedIndex),dt=u(ct,$.triggerElement),ft=u(ct,$.positionerElement),pt=yt(at),mt=at??pt,ht=D.useMemo(()=>y?``:p_(E,x),[y,E,x]),gt=D.useMemo(()=>y&&Array.isArray(E)?E.map(e=>p_(e,x)):p_(E,x),[y,E,x]),_t=C(dt),bt=Me(()=>gt);ze(_t,Ce,E,bt,!w,f);let xt=D.useRef(E),St=y?Array.isArray(E)&&E.length>0:E!=null&&ht!==``;xe(()=>{_e(St)},[St,_e]),xe(function(){let e=E,t=!1;if(y){let n=Array.isArray(E)?E:[];t=n.length===0,e=n[n.length-1]}let n=t?-1:o_(Ge.current,e,S),r=n===-1?null:n;r===null&&(Ye.current=null),!Ae&&ct.set(`selectedIndex`,r)},[y,Ae,E,S,ct]);function Ct(e){let t=he.initialValue;return Array.isArray(e)&&Array.isArray(t)?!g_(e,t,(e,t)=>i_(e,t,S)):e!==t}v(E,()=>{de(T),fe(Ct(E)),be.change(E)});let wt=Me((e,t)=>{d?.(e,t),!t.isCanceled&&(Ne(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(pe(!0),me(!1),Se===`onBlur`&&be.commit(E)))}),Tt=Me(()=>{rt(!1),ct.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),ae?.(!1)});Oe({enabled:!ie,open:Ae,ref:Le,onComplete(){Ae||Tt()}}),D.useImperativeHandle(ie,()=>({unmount:Tt}),[Tt]);let Et=Me((e,t)=>{i?.(e,t),!t.isCanceled&&we(e)}),Ot=Me(e=>{let t=Ke(e.scrollHeight,e.clientHeight),n=je(e.scrollTop,t),r=n>0,i=n<t;ct.set(`scrollUpArrowVisible`,r),ct.set(`scrollDownArrowVisible`,i)}),kt=vt({open:Ae,onOpenChange:wt,elements:{reference:dt,floating:ft}}),O=ee(kt,{enabled:!g&&!w,event:`mousedown`}),At=le(kt),jt=se(kt,{enabled:!g&&!w,listRef:Fe,activeIndex:lt,selectedIndex:ut,disabledIndices:We,onNavigate(e){e===null&&!Ae||ct.set(`activeIndex`,e)},focusItemOnHover:ce}),Mt=ge(kt,{enabled:!g&&!w&&(Ae||!y),listRef:Ie,activeIndex:lt,selectedIndex:ut,disabledIndices:e=>Dt(Fe.current[e]),onMatch(e){Ae?ct.set(`activeIndex`,e):Et(Ge.current[e],Be(nt))},onTyping(e){qe.current=e}}),Nt=D.useMemo(()=>c(Mt.reference,jt.reference,At.reference,O.reference,st),[O.reference,Mt.reference,jt.reference,At.reference,st]),k=D.useMemo(()=>c(Pe,Mt.floating,jt.floating,At.floating),[Mt.floating,jt.floating,At.floating]),Pt=jt.item??Xe;e_(()=>{ct.update({popupProps:k,triggerProps:Nt})}),ct.useSyncedValues({id:Ce,modal:re,multiple:y,value:E,open:Ae,mounted:tt,transitionStatus:it,popupProps:k,triggerProps:Nt,items:oe,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,openMethod:mt});let Ft=D.useMemo(()=>({store:ct,floatingContext:kt,required:ne,disabled:w,readOnly:g,multiple:y,highlightItemOnHover:ce,setValue:Et,setOpen:wt,listRef:Fe,popupRef:Le,scrollHandlerRef:Re,handleScrollArrowVisibility:Ot,scrollArrowsMountedCountRef:Ve,itemProps:Pt,valueRef:He,valuesRef:Ge,labelsRef:Ie,typingRef:qe,selectionRef:Ze,firstItemTextRef:Je,selectedItemTextRef:Ye,validation:be,onOpenChangeComplete:ae,alignItemWithTriggerActiveRef:$e,initialValueRef:xt}),[ct,kt,ne,w,g,y,ce,Et,wt,Pt,be,ae,Ot]),It=Ue(_,be.inputRef),Lt=y?void 0:T,Rt=D.useMemo(()=>!y||!Array.isArray(E)||!T?null:E.map(e=>{let t=p_(e,x);return(0,Q.jsx)(`input`,{type:`hidden`,form:m,name:T,value:t,disabled:w},t)}),[y,E,m,T,x,w]);return(0,Q.jsxs)(t_.Provider,{value:Ft,children:[ue,(0,Q.jsx)(`input`,{...be.getValidationProps(w,{onFocus(){ct.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||w||g)return;let t=e.currentTarget.value,n=Be(nt,e.nativeEvent);function r(){if(y)return;let e=t.toLowerCase(),r=Ge.current.findIndex(t=>p_(t,x).toLowerCase()===e||f_(t,b).toLowerCase()===e);r===-1&&(r=Ge.current.findIndex((t,n)=>{let r=Ie.current[n];return r!=null&&r.toLowerCase()===e}));let i=Ge.current[r];i!=null&&Et(i,n)}ct.set(`forceMount`,!0),queueMicrotask(r)}}),id:Ce&&Lt==null?`${Ce}-hidden-input`:void 0,form:m,name:Lt,autoComplete:te,value:ht,disabled:w,required:ne&&!(y&&St),readOnly:g,ref:It,style:T?Ee:a,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),Rt]})}function v_(e,t){return e??t}var y_=400,b_={...Ge,...ye,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},x_=D.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...l}=e,{setTouched:d,setFocused:f,validationMode:p,state:ee,disabled:m}=ke(),{labelId:te}=E(),{store:h,setOpen:g,selectionRef:ne,validation:re,readOnly:ie,required:_,alignItemWithTriggerActiveRef:ae,disabled:v}=n_(),y=m||v||a,se=u(h,$.open),b=u(h,$.mounted),S=u(h,$.value),ce=u(h,$.triggerProps),le=u(h,$.positionerElement),ue=u(h,$.listElement),de=u(h,$.popupSide),fe=u(h,$.id),pe=u(h,$.labelId),me=u(h,$.hasSelectedValue),he=b&&le?de:null,ge=i??fe,_e=v_(te,pe);Qe({id:ge});let ve=C(le),ye=D.useRef(null),{getButtonProps:be,buttonRef:xe}=Fe({disabled:y,native:o}),Se=h.useStateSetter(`triggerElement`),Ce=Ve(),w=Ve(),T=Ve();D.useEffect(()=>{if(se)return T.start(y_,()=>{ne.current.allowUnselectedMouseUp=!0,ne.current.allowSelectedMouseUp=!0}),()=>{T.clear()};ne.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},w.clear()},[se,ne,w,T]);let Te=c(ce,{id:ge,role:`combobox`,"aria-expanded":se,"aria-haspopup":`listbox`,"aria-controls":se?ue?.id??oe(le)?.id:void 0,"aria-labelledby":_e,"aria-readonly":ie||void 0,"aria-required":_||void 0,tabIndex:y?-1:0,onFocus(e){f(!0),se&&ae.current&&g(!1,Be(nt,e.nativeEvent)),Ce.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){x(le,e.relatedTarget)||(d(!0),f(!1),p===`onBlur`&&re.commit(S))},onMouseDown(e){if(se)return;let t=Ze(e.currentTarget);function n(e){if(!ye.current)return;let t=e.target;x(ye.current,t)||x(ve.current,t)||$e(e,ye.current)||g(!1,Be(we,e))}w.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},l,be),Ee=re.getValidationProps(y,Te);Ee.role=`combobox`;let De={...ee,open:se,disabled:y,value:S,readOnly:ie,popupSide:he,placeholder:!me};return lt(`button`,e,{ref:[t,ye,xe,Se],state:De,stateAttributesMapping:b_,props:Ee})}),S_={value:()=>null},C_=D.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,{store:c,valueRef:l}=n_(),d=u(c,$.value),f=u(c,$.items),p=u(c,$.itemToStringLabel),ee=u(c,$.hasSelectedValue),m=!ee&&a!=null&&i==null,te=u(c,$.hasNullItemLabel,m),h={value:d,placeholder:!ee},g=null;return g=typeof i==`function`?i(d):i??(m&&!te?a:Array.isArray(d)?h_(d,f,p):m_(d,f,p)),lt(`span`,e,{state:h,ref:[t,l],props:[{children:g},s],stateAttributesMapping:S_})}),w_=D.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o}=n_(),s={open:u(o,$.open)};return lt(`span`,e,{state:s,ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:re})}),T_=D.forwardRef(function(e,t){let{store:n}=n_(),r=u(n,$.mounted),i=u(n,$.forceMount);return r||i?(0,Q.jsx)(y,{ref:t,...e}):null}),E_=D.createContext(void 0);function D_(){let e=D.useContext(E_);if(!e)throw Error(Ne(59));return e}function O_(e,t){e&&Object.assign(e.style,t)}var k_={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`},A_={position:`fixed`},j_=D.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:c,sideOffset:l,alignOffset:d,collisionBoundary:f=`clipping-ancestors`,collisionPadding:p,arrowPadding:ee,sticky:m,disableAnchorTracking:h,alignItemWithTrigger:g=!0,collisionAvoidance:ne=ae,style:re,...ie}=e,{store:_,listRef:oe,labelsRef:v,alignItemWithTriggerActiveRef:y,selectedItemTextRef:se,valuesRef:b,initialValueRef:x,popupRef:S,setValue:ce,floatingContext:le}=n_(),ue=u(_,$.open),de=u(_,$.mounted),fe=u(_,$.modal),pe=u(_,$.value),me=u(_,$.openMethod),he=u(_,$.positionerElement),ge=u(_,$.triggerElement),_e=u(_,$.isItemEqualToValue),ve=u(_,$.transitionStatus),ye=D.useRef(null),be=D.useRef(null),[C,Ce]=D.useState(g),w=de&&C&&me!==`touch`;!de&&C!==g&&Ce(g),D.useImperativeHandle(y,()=>w),st((w||fe)&&ue,me===`touch`,he,ge);let T=te({anchor:n,floatingRootContext:le,positionMethod:a,mounted:de,side:o,sideOffset:l,align:c,alignOffset:d,arrowPadding:ee,collisionBoundary:f,collisionPadding:p,sticky:m,disableAnchorTracking:h??w,collisionAvoidance:ne,keepMounted:!0}),E=w?`none`:T.side,we=w?A_:T.positionerStyles,Te={open:ue,side:E,align:T.align,anchorHidden:T.anchorHidden};xe(()=>{_.set(`popupSide`,T.side)},[_,T.side]);let Ee=_.useStateSetter(`positionerElement`),De=s(e,Te,{styles:we,transitionStatus:ve,props:ie,refs:[t,Ee],hidden:!de,inert:!ue}),Oe=D.useRef(0),ke=Me(e=>{if(b.current.length===0)return;let t=Oe.current;if(Oe.current=e.size,e.size===t)return;let n=Be(nt);if(t!==0&&!_.state.multiple&&pe!==null&&o_(b.current,pe,_e)===-1){let e=x.current,t=e!=null&&o_(b.current,e,_e)!==-1?e:null;ce(t,n),t===null&&(_.set(`selectedIndex`,null),se.current=null)}if(t!==0&&_.state.multiple&&Array.isArray(pe)){let e=pe.filter(e=>o_(b.current,e,_e)!==-1);e.length!==pe.length&&(ce(e,n),e.length===0&&(_.set(`selectedIndex`,null),se.current=null))}if(ue&&w){_.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};O_(he,e),O_(S.current,e)}}),Ae=D.useMemo(()=>({...T,side:E,alignItemWithTriggerActive:w,setControlledAlignItemWithTrigger:Ce,scrollUpArrowRef:ye,scrollDownArrowRef:be}),[T,E,w,Ce]);return(0,Q.jsx)(Se,{elementsRef:oe,labelsRef:v,onMapChange:ke,children:(0,Q.jsxs)(E_.Provider,{value:Ae,children:[de&&fe&&(0,Q.jsx)(Re,{inert:ct(!ue),cutout:ge}),De]})})}),M_={...m,...he},N_=D.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...s}=e,{store:c,popupRef:l,onOpenChangeComplete:d,setOpen:p,valueRef:ee,firstItemTextRef:m,selectedItemTextRef:te,multiple:h,handleScrollArrowVisibility:g,scrollHandlerRef:ne,listRef:re,highlightItemOnHover:ie,floatingContext:_}=n_(),{side:ae,align:oe,alignItemWithTriggerActive:v,isPositioned:y,setControlledAlignItemWithTrigger:se}=D_(),b=it(!0)!=null,x=ue(),{nonce:S,disableStyleElements:ce}=He(),le=u(c,$.id),pe=u(c,$.open),me=u(c,$.openMethod),he=u(c,$.mounted),ge=u(c,$.popupProps),ve=u(c,$.transitionStatus),ye=u(c,$.triggerElement),C=u(c,$.positionerElement),Se=u(c,$.listElement),Ce=D.useRef(!1),w=D.useRef(!1),E=D.useRef({}),we=qe(),Te=Me(e=>{if(!C||!l.current||!w.current)return;let t=C.style.top===`0px`,n=C.style.bottom===`0px`;if(Ce.current||!v||!t&&!n){g(e);return}let r=I_(C),i=L_(C.getBoundingClientRect().height,`y`,r),a=Ze(C),o=de(C),s=o.getComputedStyle(C),c=parseFloat(s.marginTop),u=parseFloat(s.marginBottom),d=P_(o.getComputedStyle(l.current)),f=Math.min(a.documentElement.clientHeight-c-u,d),p=e.scrollTop,ee=F_(e),m=null,te=e=>{C.style.height=`${e}px`},h=t?ee-p:p,ne=Math.min(i+h,f);if(h<=1){let n=be(h,0,f-i);n>0&&te(i+n),e.scrollTop=t?ee:0,f-(i+n)<=1&&(Ce.current=!0),g(e);return}f-ne>1?m=t?1/0:0:n&&p<ee&&(m=p-(h-(i+h-f)));let re=Math.ceil(ne);if(re!==0&&te(re),m!=null){let t=be(m,0,F_(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}re>=f-1&&(Ce.current=!0),g(e)});D.useImperativeHandle(ne,()=>Te,[Te]),Oe({open:pe,ref:l,onComplete(){pe&&d?.(!0)}});let Ee={open:pe,transitionStatus:ve,side:ae,align:oe};xe(()=>{!C||!l.current||Object.keys(E.current).length||(E.current={top:C.style.top||`0`,left:C.style.left||`0`,right:C.style.right,height:C.style.height,bottom:C.style.bottom,minHeight:C.style.minHeight,maxHeight:C.style.maxHeight,marginTop:C.style.marginTop,marginBottom:C.style.marginBottom})},[l,C]),xe(()=>{pe||v||(w.current=!1,Ce.current=!1,O_(C,E.current))},[pe,v,C,l]),xe(()=>{let e=l.current;if(!pe||!ye||!C||!e||v&&!y||c.state.transitionStatus===`ending`)return;if(w.current=!0,e.style.removeProperty(`--transform-origin`),!v){we.request(()=>g(Se||e));return}let t=B_(e);try{let t=te.current;t?.isConnected||(t=!$.hasSelectedValue(c.state)&&m.current?.isConnected?m.current:null);let n=ee.current,r=de(C),i=r.getComputedStyle(C),a=r.getComputedStyle(e),o=Ze(ye),s=I_(ye),l=R_(ye.getBoundingClientRect(),s),u=R_(C.getBoundingClientRect(),s),d=l.height,f=Se||e,p=f.scrollHeight,h=parseFloat(a.borderBottomWidth),ne=parseFloat(i.marginTop)||10,_=parseFloat(i.marginBottom)||10,ae=parseFloat(i.minHeight)||100,oe=P_(a),v=o.documentElement.clientHeight-ne-_,y=o.documentElement.clientWidth,b=v-l.bottom+d,S,ce=x===`rtl`?l.right-u.width:l.left,le=0;if(t&&n){let e=R_(n.getBoundingClientRect(),s);S=R_(t.getBoundingClientRect(),s),ce=u.left+(x===`rtl`?e.right-S.right:e.left-S.left);let r=e.top-l.top+e.height/2;le=S.top-u.top+S.height/2-r}let ue=b+le+_+h,fe=Math.min(v,ue),pe=v-ne-_,me=ue-fe,he=y-5;C.style.left=`${be(ce,5,he-u.width)}px`,C.style.height=`${fe}px`,C.style.maxHeight=`none`,C.style.marginTop=`${ne}px`,C.style.marginBottom=`${_}px`,e.style.height=`100%`;let ge=F_(f),ve=me>=ge-1;ve&&(fe=Math.min(v,u.height)-(me-ge));let xe=l.top<20||l.bottom>v-20||Math.ceil(fe)+1<Math.min(p,ae),w=(r.visualViewport?.scale??1)!==1&&_e;if(xe||w){O_(C,E.current),se(!1);return}let T=Math.max(ae,fe);if(ve){let e=Math.max(0,v-ue);C.style.top=u.height>=pe?`0`:`${e}px`,C.style.height=`${fe}px`,f.scrollTop=F_(f)}else C.style.bottom=`0`,f.scrollTop=me;if(S){let t=u.top,n=u.height,r=S.top+S.height/2,i=be(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(`--transform-origin`,`50% ${i}%`)}(T===v||fe>=oe)&&(Ce.current=!0),g(f),ie&&c.state.selectedIndex===null&&c.state.activeIndex===null&&re.current[0]!=null&&c.set(`activeIndex`,0)}finally{t()}},[c,pe,C,ye,ee,m,te,l,g,v,se,we,Se,re,ie,x,y]),D.useEffect(()=>{if(!v||!C||!pe)return;let e=de(C);function t(e){p(!1,Be(Ie,e))}return T(e,`resize`,t)},[p,v,C,pe]);let De={...Se?{role:`presentation`,"aria-orientation":void 0}:{role:`listbox`,"aria-multiselectable":h||void 0,id:`${le}-list`},onKeyDown(e){b&&o.has(e.key)&&e.stopPropagation()},onScroll(e){Se||Te(e.currentTarget)},...v&&{style:Se?{height:`100%`}:k_},className:!Se&&v?Ye.className:void 0},ke=lt(`div`,e,{ref:[t,l],state:Ee,stateAttributesMapping:M_,props:[ge,De,fe(ve),s]});return(0,Q.jsxs)(D.Fragment,{children:[!ce&&Ye.getElement(S),(0,Q.jsx)(f,{context:_,modal:!1,disabled:!he,openInteractionType:me,returnFocus:a,restoreFocus:!0,children:ke})]})});function P_(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function F_(e){return Ke(e.scrollHeight,e.clientHeight)}function I_(e){return rt.getScale(e)}function L_(e,t,n){return e/n[t]}function R_(e,t){return ve({x:L_(e.x,`x`,t),y:L_(e.y,`y`,t),width:L_(e.width,`x`,t),height:L_(e.height,`y`,t)})}var z_=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function B_(e){let{style:t}=e,n={};for(let[e,r]of z_)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of z_){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var V_=D.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{store:o,scrollHandlerRef:s,multiple:c}=n_(),{alignItemWithTriggerActive:l}=D_(),d=u(o,$.hasScrollArrows),f=u(o,$.openMethod),p={id:`${u(o,$.id)}-list`,role:`listbox`,"aria-multiselectable":c||void 0,onScroll(e){s.current?.(e.currentTarget)},...l&&{style:k_},className:d&&f!==`touch`?Ye.className:void 0},ee=o.useStateSetter(`listElement`);return lt(`div`,e,{ref:[t,ee],props:[p,a]})}),H_=D.createContext(void 0);function U_(){let e=D.useContext(H_);if(!e)throw Error(Ne(57));return e}var W_=D.memo(D.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,d=D.useRef(null),f=S({guess:!0,label:o,textRef:d}),{store:p,itemProps:ee,setOpen:m,setValue:te,selectionRef:h,typingRef:g,valuesRef:ne,multiple:re,selectedItemTextRef:_,disabled:ae,readOnly:oe}=n_(),v=ae||s,y=u(p,$.isActive,f.index),se=u(p,$.open),b=u(p,$.isSelected,a),x=u(p,$.isSelectedByFocus,f.index),ce=u(p,$.isItemEqualToValue),le=f.index,ue=D.useRef(null);xe(()=>{let e=ne.current;return e[le]=a,()=>{delete e[le]}},[le,a,ne]),xe(()=>{let e=p.state.value,t=e;re&&Array.isArray(e)&&(t=e.length>0?e[e.length-1]:void 0),t!==void 0&&i_(a,t,ce)&&(p.set(`selectedIndex`,le),d.current&&(_.current=d.current))},[le,re,ce,p,a,_]);let de=D.useRef(`mouse`),fe=D.useRef(!1),{getButtonProps:pe,buttonRef:me}=Fe({disabled:v,focusableWhenDisabled:!0,native:c,composite:!0}),he={disabled:v,selected:b,highlighted:y};function ge(e){if(ae||oe)return;let t=p.state.value;if(re){let n=Array.isArray(t)?t:[],r=b?c_(n,a,ce):[...n,a];te(r,Be(at,e))}else te(a,Be(at,e)),m(!1,Be(at,e))}function _e(){h.current.dragY=0}let ve={role:`option`,"aria-selected":b,tabIndex:se&&y?0:-1,onKeyDown(e){p.set(`activeIndex`,le),e.key===` `&&g.current&&e.preventDefault()},onClick(e){let t=de.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&ie(e.nativeEvent)&&(n!==void 0||y),i=t&&!r&&!fe.current;fe.current=!1,!(v||i)&&ge(e.nativeEvent)},onPointerEnter(e){de.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=h.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){de.current=e.pointerType,fe.current=!0,_e()},onMouseUp(){if(_e(),v||de.current===`touch`||fe.current)return;let e=!h.current.allowSelectedMouseUp&&b,t=!h.current.allowUnselectedMouseUp&&!b;e||t||(fe.current=!0,ue.current?.click(),fe.current=!1)}},ye=lt(`div`,e,{ref:[me,t,f.ref,ue],state:he,props:[ee,ve,l,pe]}),be=D.useMemo(()=>({selected:b,index:le,textRef:d,selectedByFocus:x}),[b,le,d,x]);return(0,Q.jsx)(H_.Provider,{value:be,children:ye})})),G_=D.forwardRef(function(e,t){let{selected:n}=U_();return e.keepMounted||n?(0,Q.jsx)(K_,{...e,ref:t}):null}),K_=D.memo(D.forwardRef((e,t)=>{let{render:n,className:r,style:i,keepMounted:a,...o}=e,{selected:s}=U_(),c=D.useRef(null),{transitionStatus:l,setMounted:u}=et(s),d=lt(`span`,e,{ref:[t,c],state:{selected:s,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},o],stateAttributesMapping:he});return Oe({open:s,ref:c,onComplete(){s||u(!1)}}),d})),q_=D.memo(D.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=U_(),{firstItemTextRef:a,selectedItemTextRef:o}=n_(),{render:s,className:c,style:l,...u}=e,d=D.useCallback(e=>{e&&(n===0&&(a.current=e),i&&(o.current=e))},[a,o,n,i]);return lt(`div`,e,{ref:[d,t,r],props:u})})),J_=D.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,{store:l,popupRef:d,listRef:f,handleScrollArrowVisibility:p,scrollArrowsMountedCountRef:ee}=n_(),{side:m,scrollDownArrowRef:te,scrollUpArrowRef:h}=D_(),g=c?$.scrollUpArrowVisible:$.scrollDownArrowVisible,ne=u(l,g),re=u(l,$.openMethod),ie=ne&&re!==`touch`,_=Ve(),ae=c?h:te,{mounted:oe,transitionStatus:v,setMounted:y}=et(ie);xe(()=>(ee.current+=1,l.set(`hasScrollArrows`,!0),()=>{ee.current=Math.max(0,ee.current-1),ee.current===0&&l.set(`hasScrollArrows`,!1)}),[l,ee]),Oe({open:ie,ref:ae,onComplete(){ie||y(!1)}});let se=lt(`div`,e,{ref:[t,ae],state:{direction:a,visible:ie,side:m,transitionStatus:v},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||_.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??d.current;if(!e)return;l.set(`activeIndex`,null),p(e);let n=Ke(e.scrollHeight,e.clientHeight),r=je(e.scrollTop,n),i=r===(c?0:n),a=f.current;if(r!==e.scrollTop&&(e.scrollTop=r),i){_.clear();return}if(a.length>0){let t=ae.current?.offsetHeight||0;e.scrollTop=Y_(a,c,r,e.clientHeight,t,n)}_.start(40,t)}_.start(40,t)},onMouseLeave(){_.clear()}},s],stateAttributesMapping:he});return oe||o?se:null});function Y_(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?je(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?je(l.offsetTop+l.offsetHeight-r+i,a):a}var X_=D.forwardRef(function(e,t){return(0,Q.jsx)(J_,{...e,ref:t,direction:`down`})}),Z_=D.forwardRef(function(e,t){return(0,Q.jsx)(J_,{...e,ref:t,direction:`up`})}),Q_=__;function $_({className:e,...t}){return(0,Q.jsx)(C_,{"data-slot":`select-value`,className:b(`flex flex-1 text-left`,e),...t})}function ev({className:e,size:t=`default`,children:n,...r}){return(0,Q.jsxs)(x_,{"data-slot":`select-trigger`,"data-size":t,className:b(`flex w-fit cursor-pointer items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,Q.jsx)(w_,{render:(0,Q.jsx)(bt,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function tv({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...s}){return(0,Q.jsx)(T_,{children:(0,Q.jsx)(j_,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,Q.jsxs)(N_,{"data-slot":`select-content`,"data-align-trigger":o,className:b(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...s,children:[(0,Q.jsx)(rv,{}),(0,Q.jsx)(V_,{children:t}),(0,Q.jsx)(iv,{})]})})})}function nv({className:e,children:t,...n}){return(0,Q.jsxs)(W_,{"data-slot":`select-item`,className:b(`relative flex w-full cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,Q.jsx)(q_,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,Q.jsx)(G_,{render:(0,Q.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,Q.jsx)(g,{className:`pointer-events-none`})})]})}function rv({className:e,...t}){return(0,Q.jsx)(Z_,{"data-slot":`select-scroll-up-button`,className:b(`top-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Q.jsx)(xt,{})})}function iv({className:e,...t}){return(0,Q.jsx)(X_,{"data-slot":`select-scroll-down-button`,className:b(`bottom-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,Q.jsx)(bt,{})})}function av(e){return gt(`dialog`,e)}function ov({...e}){return(0,Q.jsx)(av,{"data-slot":`dialog`,...e})}function sv({...e}){return(0,Q.jsx)(Et,{"data-slot":`dialog-trigger`,...e})}function cv({...e}){return(0,Q.jsx)(pt,{"data-slot":`dialog-portal`,...e})}function lv({className:e,...t}){return(0,Q.jsx)(mt,{"data-slot":`dialog-overlay`,className:b(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function uv({className:e,children:t,showCloseButton:n=!0,...r}){return(0,Q.jsxs)(cv,{children:[(0,Q.jsx)(lv,{}),(0,Q.jsxs)(ht,{"data-slot":`dialog-content`,className:b(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[t,n&&(0,Q.jsxs)(ut,{"data-slot":`dialog-close`,render:(0,Q.jsx)(tt,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,Q.jsx)(Tt,{}),(0,Q.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function dv({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`dialog-header`,className:b(`flex flex-col gap-2`,e),...t})}function fv({className:e,showCloseButton:t=!1,children:n,...r}){return(0,Q.jsxs)(`div`,{"data-slot":`dialog-footer`,className:b(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,Q.jsx)(ut,{render:(0,Q.jsx)(tt,{variant:`outline`}),children:`Close`})]})}function pv({className:e,...t}){return(0,Q.jsx)(_t,{"data-slot":`dialog-title`,className:b(`text-base leading-none font-medium`,e),...t})}function mv({className:e,...t}){return(0,Q.jsx)(ft,{"data-slot":`dialog-description`,className:b(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function hv({className:e,...t}){return(0,Q.jsx)(`textarea`,{"data-slot":`textarea`,className:b(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function gv({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:b(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var _v=ce(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function vv({className:e,align:t=`inline-start`,...n}){return(0,Q.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:b(_v({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var yv=ce(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function bv({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,Q.jsx)(tt,{type:t,"data-size":r,variant:n,className:b(yv({size:r}),e),...i})}function xv({className:e,...t}){return(0,Q.jsx)(w,{"data-slot":`input-group-control`,className:b(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function Sv({className:e,...t}){return(0,Q.jsx)(hv,{"data-slot":`input-group-control`,className:b(`flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function Cv({className:e,...t}){return(0,Q.jsx)(`label`,{"data-slot":`label`,className:b(`flex items-center gap-2 text-base leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}export{c_ as A,wt as B,u_ as C,r_ as D,i_ as E,eg as F,St as H,Tg as I,vg as L,e_ as M,Sg as N,o_ as O,Og as P,Cg as R,d_ as S,p_ as T,bt as U,Ct as V,vt as W,nv as _,xv as a,v_ as b,ov as c,fv as d,dv as f,tv as g,Q_ as h,bv as i,a_ as j,s_ as k,uv as l,sv as m,gv as n,Sv as o,pv as p,vv as r,hv as s,Cv as t,mv as u,ev as v,f_ as w,g_ as x,$_ as y,Tt as z};
|