@tickernelz/paperclip-pro-ui 2026.1025.2 → 2026.1025.4
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/dist/assets/{AgentAvatar-BtQCvYNI.js → AgentAvatar-BuPU_RoW.js} +1 -1
- package/dist/assets/{Agents.production-DbtoAoUQ.js → Agents.production-CfYiauq6.js} +2 -2
- package/dist/assets/{BreadcrumbContext-DSzhZWh7.js → BreadcrumbContext-BXnrcRDo.js} +1 -1
- package/dist/assets/{CompanyActivity.production-Bx3wHHDp.js → CompanyActivity.production-CIsQ1I5W.js} +1 -1
- package/dist/assets/{CompanyExport-kpky2xuC.js → CompanyExport-lfotUnMu.js} +1 -1
- package/dist/assets/{CompanySkills.production-BuVkNosy.js → CompanySkills.production-JyTlhvZG.js} +1 -1
- package/dist/assets/{EmptyState-BWnCbo9i.js → EmptyState-BIDylAt6.js} +1 -1
- package/dist/assets/{MarkdownBody-5YQEeTHc.js → MarkdownBody-CWnwZpD8.js} +1 -1
- package/dist/assets/{MarkdownEditor-B01YT6TZ.js → MarkdownEditor-0_k7pqew.js} +1 -1
- package/dist/assets/{OrgChart.production-D-XB4GXh.js → OrgChart.production-BHVoTaJT.js} +1 -1
- package/dist/assets/{PageSkeleton-DazUbswA.js → PageSkeleton-CKjkGlye.js} +1 -1
- package/dist/assets/{RoutineDetail.production-B1919-qY.js → RoutineDetail.production-DEDJuydP.js} +1 -1
- package/dist/assets/{RoutineRunVariablesDialog-CWOnQljf.js → RoutineRunVariablesDialog-DS7mWVIL.js} +1 -1
- package/dist/assets/{Routines.production-CWKuR092.js → Routines.production-DpL4nsV4.js} +1 -1
- package/dist/assets/{SearchableSelect-BNdmZ91w.js → SearchableSelect-De24jvb_.js} +1 -1
- package/dist/assets/{StatusIcon-CDeLAAD6.js → StatusIcon-BniLgbZ9.js} +1 -1
- package/dist/assets/{Terminal-BTETQQTg.js → Terminal-B5XTxoYD.js} +1 -1
- package/dist/assets/{ToastContext-BhcEr0eG.js → ToastContext-lzMi_GqI.js} +1 -1
- package/dist/assets/{access-CNVV-JPP.js → access-DRacMF6o.js} +1 -1
- package/dist/assets/agent-avatar-url-D9Umo3Cf.js +1 -0
- package/dist/assets/{agents-Be9FZXvR.js → agents-Hg-b7pM5.js} +1 -1
- package/dist/assets/{alert-dialog-B9yc0xH5.js → alert-dialog-DV-7P7jH.js} +1 -1
- package/dist/assets/{arrow-right-DKHsAC4Q.js → arrow-right-BpVQGR38.js} +1 -1
- package/dist/assets/{badge-DKn90tZY.js → badge-Ckc_4jxf.js} +1 -1
- package/dist/assets/{bot-ByBGWg5B.js → bot-7-j_Rzi5.js} +1 -1
- package/dist/assets/{boxes-DLOydH_J.js → boxes-CwMr8JCg.js} +1 -1
- package/dist/assets/{card-CIjSpeNG.js → card-Ductdx0_.js} +1 -1
- package/dist/assets/{check-BwfUaND_.js → check-DeNE2bzR.js} +1 -1
- package/dist/assets/{checkbox-DXAjlowZ.js → checkbox-CmKbgOEQ.js} +1 -1
- package/dist/assets/{chevron-down-n6cWCeT6.js → chevron-down-g45Yxv5X.js} +1 -1
- package/dist/assets/{clipboard-DfO4drH0.js → clipboard-XFzVw2Fw.js} +1 -1
- package/dist/assets/{definition-g8Ojcw3n.js → definition-DbuiY1X2.js} +1 -1
- package/dist/assets/{dialog-wSBPUZbR.js → dialog-Dbll6EPK.js} +1 -1
- package/dist/assets/{dist-DAe64jq9.js → dist-B35dvbuD.js} +1 -1
- package/dist/assets/{dist-D1PYISjh.js → dist-C3ZQ9Oum.js} +1 -1
- package/dist/assets/{dist-byHTiYvx.js → dist-C8lGa9JE.js} +1 -1
- package/dist/assets/{dist-Cbbod8tH.js → dist-CLftygY1.js} +1 -1
- package/dist/assets/{dist-Bh1tkrMN.js → dist-DRcvUxQj.js} +1 -1
- package/dist/assets/{environments-lOEya-g2.js → environments-Dnu9u7C4.js} +1 -1
- package/dist/assets/{external-link-CF7uAxuI.js → external-link-CRqfKDSs.js} +1 -1
- package/dist/assets/{file-text-_ZIlOXhw.js → file-text-Dk6EMTv-.js} +1 -1
- package/dist/assets/{health-RLGdw6VN.js → health-CXqClHRi.js} +1 -1
- package/dist/assets/{heartbeats-CtRu34PZ.js → heartbeats-DIc5yBql.js} +1 -1
- package/dist/assets/{index-DGvCVg4n.js → index-BagTLQNY.js} +5 -5
- package/dist/assets/{input-BLjkJw2C.js → input-D1hkyP4P.js} +1 -1
- package/dist/assets/{instanceSettings-6aWAmT0B.js → instanceSettings-D33fYO3Z.js} +1 -1
- package/dist/assets/{label-BF7N7Ewo.js → label-BEcM7we0.js} +1 -1
- package/dist/assets/{mention-chips-DgHq43TZ.js → mention-chips-ChjkuyD3.js} +1 -1
- package/dist/assets/{rotate-ccw-BW12Hr0F.js → rotate-ccw-DKbM34sX.js} +1 -1
- package/dist/assets/{save-BPX30Z4U.js → save-D3vq-fOA.js} +1 -1
- package/dist/assets/{select-B93rxRbm.js → select-CYyKXBo3.js} +1 -1
- package/dist/assets/{sheet-ClwtvLVS.js → sheet-CugbMbz_.js} +1 -1
- package/dist/assets/{skeleton-CeDio6tF.js → skeleton-oJJvXNdk.js} +1 -1
- package/dist/assets/{tabs-LnaduMig.js → tabs-BeOWCiE7.js} +1 -1
- package/dist/assets/{use-adapter-capabilities-DVwRtrsr.js → use-adapter-capabilities-DpZN_gbv.js} +1 -1
- package/dist/assets/{useHiddenSettings-u2chU7_y.js → useHiddenSettings-kuGtzcba.js} +1 -1
- package/dist/assets/{usePrefersReducedMotion-Bi8tEcS2.js → usePrefersReducedMotion-C_1dNyks.js} +1 -1
- package/dist/assets/{x-DwA5I4ik.js → x-DoY9fSuL.js} +1 -1
- package/dist/downloads/local-browser-chromium.zip +0 -0
- package/dist/downloads/local-browser-firefox-unsigned.zip +0 -0
- package/dist/index.html +49 -49
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/agent-avatar-url-B3rF018s.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var i=Object.defineProperty;var t=(r,a)=>i(r,"name",{value:a,configurable:!0});import{i as o}from"./rolldown-runtime-ZpX3ckPj.js";import{G as e,Ha as d,Wa as c}from"./boxes-
|
|
1
|
+
var i=Object.defineProperty;var t=(r,a)=>i(r,"name",{value:a,configurable:!0});import{i as o}from"./rolldown-runtime-ZpX3ckPj.js";import{G as e,Ha as d,Wa as c}from"./boxes-CwMr8JCg.js";var m=o(c(),1),s=o(d(),1);function x({className:r,interactive:a=!1,...n}){return(0,s.jsx)("div",{"data-slot":"card",className:e("bg-card text-card-foreground flex flex-col gap-6 rounded-lg border py-6",a&&"cursor-pointer transition-colors hover:border-foreground/20 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",r),...n})}t(x,"Card");function p({className:r,...a}){return(0,s.jsx)("div",{"data-slot":"card-header",className:e("@container/card-header grid auto-rows-min grid-rows-(--gtr-1) items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-(--gtc-17) [.border-b]:pb-6",r),...a})}t(p,"CardHeader");function g({className:r,...a}){return(0,s.jsx)("div",{"data-slot":"card-title",className:e("leading-none font-semibold",r),...a})}t(g,"CardTitle");function v({className:r,...a}){return(0,s.jsx)("div",{"data-slot":"card-description",className:e("text-muted-foreground text-sm",r),...a})}t(v,"CardDescription");function b({className:r,...a}){return(0,s.jsx)("div",{"data-slot":"card-action",className:e("col-start-2 row-span-2 row-start-1 self-start justify-self-end",r),...a})}t(b,"CardAction");function j({className:r,...a}){return(0,s.jsx)("div",{"data-slot":"card-content",className:e("px-6",r),...a})}t(j,"CardContent");function C({className:r,...a}){return(0,s.jsx)("div",{"data-slot":"card-footer",className:e("flex items-center px-6 [.border-t]:pt-6",r),...a})}t(C,"CardFooter");export{C as a,v as i,b as n,p as o,j as r,g as s,x as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as a}from"./boxes-
|
|
1
|
+
import{n as a}from"./boxes-CwMr8JCg.js";var e={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};e.node;var o=a(e);export{o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var J=Object.defineProperty;var s=(e,t)=>J(e,"name",{value:t,configurable:!0});import{i as D}from"./rolldown-runtime-ZpX3ckPj.js";import{A as j,D as Q,G as L,Ha as V,L as A,M as S,O as Y,Wa as Z,g as ee,j as te,n as M}from"./boxes-
|
|
1
|
+
var J=Object.defineProperty;var s=(e,t)=>J(e,"name",{value:t,configurable:!0});import{i as D}from"./rolldown-runtime-ZpX3ckPj.js";import{A as j,D as Q,G as L,Ha as V,L as A,M as S,O as Y,Wa as Z,g as ee,j as te,n as M}from"./boxes-CwMr8JCg.js";import{t as re}from"./check-DeNE2bzR.js";var a=D(Z(),1),c=D(V(),1),ne=Object.defineProperty,x=s((e,t)=>ne(e,"name",{value:t,configurable:!0}),"__name"),z="Checkbox",[oe,xe]=te(z),[ae,B]=oe(z);function O(e){const{__scopeCheckbox:t,checked:h,children:i,defaultChecked:d,disabled:b,form:n,name:u,onCheckedChange:r,required:l,value:g="on",internal_do_not_use_render:C}=e,[p,v]=Y({prop:h,defaultProp:d??!1,onChange:r,caller:z}),[_,y]=a.useState(null),[I,R]=a.useState(null),w=a.useRef(!1),[o,f]=a.useReducer(m=>m+1,0),E=_?!!n||!!_.closest("form"):!0,P={checked:p,disabled:b,setChecked:v,control:_,setControl:y,name:u,form:n,value:g,hasConsumerStoppedPropagationRef:w,userInteractionCount:o,onUserInteraction:f,required:l,defaultChecked:k(d)?!1:d,isFormControl:E,bubbleInput:I,setBubbleInput:R};return(0,c.jsx)(ae,{scope:t,...P,children:U(C)?C(P):i})}s(O,"CheckboxProvider");x(O,"CheckboxProvider");var ce="CheckboxTrigger",se=a.forwardRef(x(s(function({__scopeCheckbox:t,onKeyDown:h,onClick:i,...d},b){const{control:n,value:u,disabled:r,checked:l,required:g,setControl:C,setChecked:p,hasConsumerStoppedPropagationRef:v,onUserInteraction:_,isFormControl:y,bubbleInput:I}=B(ce,t),R=A(b,C),w=a.useRef(l);return a.useEffect(()=>{const o=n?.form;if(o){const f=x(()=>p(w.current),"reset");return o.addEventListener("reset",f),()=>o.removeEventListener("reset",f)}},[n,p]),(0,c.jsx)(S.button,{type:"button",role:"checkbox","aria-checked":k(l)?"mixed":l,"aria-required":g,"data-state":N(l),"data-disabled":r?"":void 0,disabled:r,value:u,...d,ref:R,onKeyDown:j(h,o=>{o.key==="Enter"&&o.preventDefault()}),onClick:j(i,o=>{_(),p(f=>k(f)?!0:!f),I&&y&&(v.current=o.isPropagationStopped(),v.current||o.stopPropagation())})})},"CheckboxTrigger2"),"CheckboxTrigger")),ie=a.forwardRef(x(s(function(t,h){const{__scopeCheckbox:i,name:d,checked:b,defaultChecked:n,required:u,disabled:r,value:l,onCheckedChange:g,form:C,...p}=t;return(0,c.jsx)(O,{__scopeCheckbox:i,checked:b,defaultChecked:n,disabled:r,required:u,onCheckedChange:g,name:d,form:C,value:l,internal_do_not_use_render:s(({isFormControl:v})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(se,{...p,ref:h,__scopeCheckbox:i}),v&&(0,c.jsx)(fe,{__scopeCheckbox:i})]}),"internal_do_not_use_render")})},"Checkbox2"),"Checkbox")),de="CheckboxIndicator",ue=a.forwardRef(x(s(function(t,h){const{__scopeCheckbox:i,forceMount:d,...b}=t,n=B(de,i);return(0,c.jsx)(Q,{present:d||k(n.checked)||n.checked===!0,children:(0,c.jsx)(S.span,{"data-state":N(n.checked),"data-disabled":n.disabled?"":void 0,...b,ref:h,style:{pointerEvents:"none",...t.style}})})},"CheckboxIndicator2"),"CheckboxIndicator")),le="CheckboxBubbleInput",fe=a.forwardRef(x(s(function({__scopeCheckbox:t,onClick:h,...i},d){const{control:b,hasConsumerStoppedPropagationRef:n,userInteractionCount:u,checked:r,defaultChecked:l,required:g,disabled:C,name:p,value:v,form:_,bubbleInput:y,setBubbleInput:I}=B(le,t),R=A(d,I),w=ee(b),o=a.useRef(!1),f=a.useRef(r),E=a.useRef(u);a.useEffect(()=>{const m=y;if(!m)return;const $=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor($,"checked").set,q=u!==E.current;E.current=u;const K=f.current!==r;f.current=r;const X=!(q&&n.current);if(K&&T){o.current=!q;const W=new Event("click",{bubbles:X});m.indeterminate=k(r),T.call(m,k(r)?!1:r),m.dispatchEvent(W),o.current=!1}},[y,r,n,u]);const P=a.useRef(k(r)?!1:r);return(0,c.jsx)(S.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??P.current,required:g,disabled:C,name:p,value:v,form:_,...i,tabIndex:-1,ref:R,onClick:j(h,m=>{o.current&&m.stopPropagation()}),style:{...i.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput2"),"CheckboxBubbleInput"));function U(e){return typeof e=="function"}s(U,"isFunction");x(U,"isFunction");function k(e){return e==="indeterminate"}s(k,"isIndeterminate");x(k,"isIndeterminate");function N(e){return k(e)?"indeterminate":e?"checked":"unchecked"}s(N,"getState");x(N,"getState");var F={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};F.node;var Ce=M(F),H={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};H.node;var ve=M(H),G={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};G.node;var me=M(G);function ge({className:e,...t}){return(0,c.jsx)("textarea",{"data-slot":"textarea",className:L("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 min-w-0 w-full max-w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-(--tp-color-box-shadow) outline-none focus-visible:ring-(length:--rad-3) disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}s(ge,"Textarea");function _e({className:e,...t}){return(0,c.jsx)(ie,{"data-slot":"checkbox",className:L("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-(--rad-4) border shadow-xs transition-shadow outline-none focus-visible:ring-(length:--rad-3) disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:(0,c.jsx)(ue,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:(0,c.jsx)(re,{className:"size-3.5"})})})}s(_e,"Checkbox");export{Ce as a,ve as i,ge as n,me as r,_e as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n}from"./boxes-
|
|
1
|
+
import{n}from"./boxes-CwMr8JCg.js";var e={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};e.node;var a=n(e);export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var c=Object.defineProperty;var a=(t,e)=>c(t,"name",{value:e,configurable:!0});import{n as r}from"./boxes-
|
|
1
|
+
var c=Object.defineProperty;var a=(t,e)=>c(t,"name",{value:e,configurable:!0});import{n as r}from"./boxes-CwMr8JCg.js";var n={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};n.node;var u=r(n),i={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};i.node;var p=r(i);async function f(){if(typeof navigator>"u"||!navigator.clipboard?.read)return null;try{return await navigator.clipboard.read()}catch{return null}}a(f,"readClipboardItems");async function s(){if(typeof navigator>"u"||!navigator.clipboard?.readText)return"";try{return await navigator.clipboard.readText()}catch{return""}}a(s,"readTextFromClipboard");async function y(t){if((typeof window>"u"||window.isSecureContext!==!1)&&typeof navigator<"u"&&navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(t);return}catch{}if(typeof document>"u")throw new Error("Clipboard unavailable");const e=document.createElement("textarea");e.value=t,e.setAttribute("aria-hidden","true"),e.tabIndex=-1,e.style.position="fixed",e.style.top="0",e.style.left="-9999px",(document.activeElement?.closest('[role="dialog"]')??document.querySelector('dialog[open], [role="dialog"][data-state="open"]')??document.body).appendChild(e);const o=document.activeElement;try{if(e.focus({preventScroll:!0}),e.select(),e.setSelectionRange(0,t.length),!document.execCommand("copy"))throw new Error("execCommand copy failed")}finally{e.remove(),o!==document.activeElement&&typeof o?.focus=="function"&&o.focus({preventScroll:!0})}}a(y,"copyTextToClipboard");export{u as a,p as i,f as n,s as r,y as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var c=Object.defineProperty;var n=(e,o)=>c(e,"name",{value:o,configurable:!0});import{Rt as p}from"./index-
|
|
1
|
+
var c=Object.defineProperty;var n=(e,o)=>c(e,"name",{value:o,configurable:!0});import{Rt as p}from"./index-BagTLQNY.js";import{PAPERCLIP_CHARACTER as a}from"./character-CguPM7IG.js";import{o as l,r as f}from"./model-DL5biheO.js";function b(e,o=!1){const r=p[o?"muted-dream":e.paletteId],i={...a.character,id:"paperclip-cap-v1",name:"Agent",color:r.a,color2:r.b,followCursor:!0,followRotation:!0},s=f({version:1,name:"Paperclip",characters:[i],expressions:a.expressions,animations:a.animations},i);for(const t of s.animations)t.id==="happy"&&(t.loop=!1);return s}n(b,"characterDefinition");function d(e){return e==="success"?"happy":e==="rest"?"idle":e}n(d,"animationId");function C(e,o){if(o==="rest"){const r=e.expressions.find(i=>i.id==="idle")??e.expressions[0];return{pose:{...r.beats[0].pose},blink:0,bob:0,breathe:0,expressionId:r.id,beatIndex:0,stepIndex:0,faceLayers:void 0}}return l(e,d(o),.6)}n(C,"characterStill");export{d as animationId,b as characterDefinition,C as characterStill};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var qe=Object.defineProperty;var c=(n,e)=>qe(n,"name",{value:e,configurable:!0});import{i as he}from"./rolldown-runtime-ZpX3ckPj.js";import{A as M,C as Ze,D as q,E as W,F as Je,G as b,Ha as Qe,L as y,M as A,N as en,O as ve,S as nn,T as ae,Wa as tn,_ as on,b as rn,d as an,h as Me,j as we,m as Ce,n as sn,p as cn,v as un,x as dn}from"./boxes-DLOydH_J.js";import{kt as ln,r as pn}from"./BreadcrumbContext-DSzhZWh7.js";import{a as fn,i as mn,n as gn,r as be,t as xn}from"./dist-byHTiYvx.js";import{a as hn,c as vn,i as Mn,n as se,o as wn,r as Cn,s as bn,t as _n}from"./dist-DAe64jq9.js";import{t as Dn}from"./check-BwfUaND_.js";import{a as Sn}from"./clipboard-DfO4drH0.js";import{t as In}from"./x-DwA5I4ik.js";var u=he(tn(),1),o=he(Qe(),1),Rn=Object.defineProperty,m=c((n,e)=>Rn(n,"name",{value:e,configurable:!0}),"__name$1"),oe=["Enter"," "],jn=["ArrowDown","PageUp","Home"],_e=["ArrowUp","PageDown","End"],Pn=[...jn,..._e],yn={ltr:[...oe,"ArrowRight"],rtl:[...oe,"ArrowLeft"]},En={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Z="Menu",[G,Tn,kn]=fn(Z),[E,De]=we(Z,[kn,Me,be]),J=Me(),Se=be(),[Ie,R]=E(Z),[On,z]=E(Z),Nn=m(n=>{const{__scopeMenu:e,open:r=!1,children:t,dir:a,onOpenChange:s,modal:i=!0}=n,d=J(e),[x,f]=u.useState(null),v=u.useRef(!1),h=ae(s),l=mn(a);return u.useEffect(()=>{const g=m(()=>{v.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},"handleKeyDown"),w=m(()=>v.current=!1,"handlePointer");return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),u.useEffect(()=>{if(!r)return;const g=m(()=>h(!1),"handleBlur");return window.addEventListener("blur",g),()=>window.removeEventListener("blur",g)},[r,h]),(0,o.jsx)(Ce,{...d,children:(0,o.jsx)(Ie,{scope:e,open:r,onOpenChange:h,content:x,onContentChange:f,children:(0,o.jsx)(On,{scope:e,onClose:u.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:v,dir:l,modal:i,children:t})})})},"Menu"),Re=u.forwardRef(m(c(function(e,r){const{__scopeMenu:t,...a}=e,s=J(t);return(0,o.jsx)(an,{...s,...a,ref:r})},"MenuAnchor2"),"MenuAnchor")),je="MenuPortal",[Ln,Pe]=E(je,{forceMount:void 0}),An=m(n=>{const{__scopeMenu:e,forceMount:r,children:t,container:a}=n,s=R(je,e);return(0,o.jsx)(Ln,{scope:e,forceMount:r,children:(0,o.jsx)(q,{present:r||s.open,children:(0,o.jsx)(dn,{asChild:!0,container:a,children:t})})})},"MenuPortal"),S="MenuContent",[Fn,ce]=E(S),Gn=u.forwardRef(m(c(function(e,r){const t=Pe(S,e.__scopeMenu),{forceMount:a=t.forceMount,...s}=e,i=R(S,e.__scopeMenu),d=z(S,e.__scopeMenu);return(0,o.jsx)(G.Provider,{scope:e.__scopeMenu,children:(0,o.jsx)(q,{present:a||i.open,children:(0,o.jsx)(G.Slot,{scope:e.__scopeMenu,children:d.modal?(0,o.jsx)(Kn,{...s,ref:r}):(0,o.jsx)(zn,{...s,ref:r})})})})},"MenuContent2"),"MenuContent")),Kn=u.forwardRef(m(c(function(e,r){const t=R(S,e.__scopeMenu),a=u.useRef(null),s=y(r,a);return u.useEffect(()=>{const i=a.current;if(i)return on(i)},[]),(0,o.jsx)(ue,{...e,ref:s,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:c(()=>t.onOpenChange(!1),"onDismiss")})},"MenuRootContentModal2"),"MenuRootContentModal")),zn=u.forwardRef(m(c(function(e,r){const t=R(S,e.__scopeMenu);return(0,o.jsx)(ue,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:c(()=>t.onOpenChange(!1),"onDismiss")})},"MenuRootContentNonModal2"),"MenuRootContentNonModal")),$n=Je("MenuContent.ScrollLock"),ue=u.forwardRef(m(c(function(e,r){const{__scopeMenu:t,loop:a=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:d,disableOutsidePointerEvents:x,onEntryFocus:f,onEscapeKeyDown:v,onPointerDownOutside:h,onFocusOutside:l,onInteractOutside:g,onDismiss:w,disableOutsideScroll:C,...j}=e,$=R(S,t),T=z(S,t),U=J(t),Ue=Se(t),pe=Tn(t),[Ve,fe]=u.useState(null),V=u.useRef(null),Be=y(r,V,$.onContentChange),B=u.useRef(0),Y=u.useRef(""),Ye=u.useRef(0),ee=u.useRef(null),me=u.useRef("right"),ne=u.useRef(0),Xe=C?un:u.Fragment,He=C?{as:$n,allowPinchZoom:!0}:void 0,We=m(p=>{const O=Y.current+p,P=pe().filter(I=>!I.disabled),F=document.activeElement,te=P.find(I=>I.ref.current===F)?.textValue,X=Ae(P.map(I=>I.textValue),O,te),N=P.find(I=>I.textValue===X)?.ref.current;m(c((function I(ge){Y.current=ge,window.clearTimeout(B.current),ge!==""&&(B.current=window.setTimeout(()=>I(""),1e3))}),"updateSearch"),"updateSearch")(O),N&&setTimeout(()=>N.focus())},"handleTypeaheadSearch");u.useEffect(()=>()=>window.clearTimeout(B.current),[]),rn();const k=u.useCallback(p=>me.current===ee.current?.side&&Ge(p,ee.current?.area),[]);return(0,o.jsx)(Fn,{scope:t,searchRef:Y,onItemEnter:u.useCallback(p=>{k(p)&&p.preventDefault()},[k]),onItemLeave:u.useCallback(p=>{k(p)||(V.current?.focus(),fe(null))},[k]),onTriggerLeave:u.useCallback(p=>{k(p)&&p.preventDefault()},[k]),pointerGraceTimerRef:Ye,onPointerGraceIntentChange:u.useCallback(p=>{ee.current=p},[]),children:(0,o.jsx)(Xe,{...He,children:(0,o.jsx)(nn,{asChild:!0,trapped:s,onMountAutoFocus:M(i,p=>{p.preventDefault(),V.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:(0,o.jsx)(Ze,{asChild:!0,disableOutsidePointerEvents:x,onEscapeKeyDown:v,onPointerDownOutside:h,onFocusOutside:l,onInteractOutside:g,onDismiss:w,children:(0,o.jsx)(gn,{asChild:!0,...Ue,dir:T.dir,orientation:"vertical",loop:a,currentTabStopId:Ve,onCurrentTabStopIdChange:fe,onEntryFocus:M(f,p=>{T.isUsingKeyboardRef.current||p.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,o.jsx)(cn,{role:"menu","aria-orientation":"vertical","data-state":de($.open),"data-radix-menu-content":"",dir:T.dir,...U,...j,ref:Be,style:{outline:"none",...j.style},onKeyDown:M(j.onKeyDown,p=>{const O=p.target.closest("[data-radix-menu-content]")===p.currentTarget,P=p.ctrlKey||p.altKey||p.metaKey,F=p.key.length===1;O&&(p.key==="Tab"&&p.preventDefault(),!P&&F&&We(p.key));const te=V.current;if(p.target!==te||!Pn.includes(p.key))return;p.preventDefault();const X=pe().filter(N=>!N.disabled).map(N=>N.ref.current);_e.includes(p.key)&&X.reverse(),Ne(X)}),onBlur:M(e.onBlur,p=>{p.currentTarget.contains(p.target)||(window.clearTimeout(B.current),Y.current="")}),onPointerMove:M(e.onPointerMove,L(p=>{const O=p.target,P=ne.current!==p.clientX;if(p.currentTarget.contains(O)&&P){const F=p.clientX>ne.current?"right":"left";me.current=F,ne.current=p.clientX}}))})})})})})})},"MenuContentImpl2"),"MenuContentImpl")),Un=u.forwardRef(m(c(function(e,r){const{__scopeMenu:t,...a}=e;return(0,o.jsx)(A.div,{role:"group",...a,ref:r})},"MenuGroup2"),"MenuGroup")),Vn=u.forwardRef(m(c(function(e,r){const{__scopeMenu:t,...a}=e;return(0,o.jsx)(A.div,{...a,ref:r})},"MenuLabel2"),"MenuLabel")),re="MenuItem",xe="menu.itemSelect",ie=u.forwardRef(m(c(function(e,r){const{disabled:t=!1,onSelect:a,...s}=e,i=u.useRef(null),d=z(re,e.__scopeMenu),x=ce(re,e.__scopeMenu),f=y(r,i),v=u.useRef(!1),h=m(()=>{const l=i.current;if(!t&&l){const g=new CustomEvent(xe,{bubbles:!0,cancelable:!0});l.addEventListener(xe,w=>a?.(w),{once:!0}),en(l,g),g.defaultPrevented?v.current=!1:d.onClose()}},"handleSelect");return(0,o.jsx)(ye,{...s,ref:f,disabled:t,onClick:M(e.onClick,h),onPointerDown:c(l=>{e.onPointerDown?.(l),v.current=!0},"onPointerDown"),onPointerUp:M(e.onPointerUp,l=>{v.current||l.currentTarget?.click()}),onKeyDown:M(e.onKeyDown,l=>{t||l.target!==l.currentTarget||x.searchRef.current!==""&&l.key===" "||oe.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})},"MenuItem2"),"MenuItem")),ye=u.forwardRef(m(c(function(e,r){const{__scopeMenu:t,disabled:a=!1,textValue:s,...i}=e,d=ce(re,t),x=Se(t),f=u.useRef(null),v=y(r,f),[h,l]=u.useState(!1),[g,w]=u.useState("");return u.useEffect(()=>{const C=f.current;C&&w((C.textContent??"").trim())},[i.children]),(0,o.jsx)(G.ItemSlot,{scope:t,disabled:a,textValue:s??g,children:(0,o.jsx)(xn,{asChild:!0,...x,focusable:!a,children:(0,o.jsx)(A.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...i,ref:v,onPointerMove:M(e.onPointerMove,L(C=>{a?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,L(C=>d.onItemLeave(C))),onFocus:M(e.onFocus,()=>l(!0)),onBlur:M(e.onBlur,()=>l(!1))})})})},"MenuItemImpl2"),"MenuItemImpl")),Bn=u.forwardRef(m(c(function(e,r){const{checked:t=!1,onCheckedChange:a,...s}=e;return(0,o.jsx)(Te,{scope:e.__scopeMenu,checked:t,children:(0,o.jsx)(ie,{role:"menuitemcheckbox","aria-checked":K(t)?"mixed":t,...s,ref:r,"data-state":Q(t),onSelect:M(s.onSelect,()=>a?.(K(t)?!0:!t),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem2"),"MenuCheckboxItem")),[Yn,Xn]=E("MenuRadioGroup",{value:void 0,onValueChange:m(()=>{},"onValueChange")}),Hn=u.forwardRef(m(c(function(e,r){const{value:t,onValueChange:a,...s}=e,i=ae(a);return(0,o.jsx)(Yn,{scope:e.__scopeMenu,value:t,onValueChange:i,children:(0,o.jsx)(Un,{...s,ref:r})})},"MenuRadioGroup2"),"MenuRadioGroup")),Wn="MenuRadioItem",qn=u.forwardRef(m(c(function(e,r){const{value:t,...a}=e,s=Xn(Wn,e.__scopeMenu),i=t===s.value;return(0,o.jsx)(Te,{scope:e.__scopeMenu,checked:i,children:(0,o.jsx)(ie,{role:"menuitemradio","aria-checked":i,...a,ref:r,"data-state":Q(i),onSelect:M(a.onSelect,()=>s.onValueChange?.(t),{checkForDefaultPrevented:!1})})})},"MenuRadioItem2"),"MenuRadioItem")),Ee="MenuItemIndicator",[Te,Zn]=E(Ee,{checked:!1}),Jn=u.forwardRef(m(c(function(e,r){const{__scopeMenu:t,forceMount:a,...s}=e,i=Zn(Ee,t);return(0,o.jsx)(q,{present:a||K(i.checked)||i.checked===!0,children:(0,o.jsx)(A.span,{...s,ref:r,"data-state":Q(i.checked)})})},"MenuItemIndicator2"),"MenuItemIndicator")),Qn=u.forwardRef(m(c(function(e,r){const{__scopeMenu:t,...a}=e;return(0,o.jsx)(A.div,{role:"separator","aria-orientation":"horizontal",...a,ref:r})},"MenuSeparator2"),"MenuSeparator")),ke="MenuSub",[et,Oe]=E(ke),nt=m(n=>{const{__scopeMenu:e,children:r,open:t=!1,onOpenChange:a}=n,s=R(ke,e),i=J(e),[d,x]=u.useState(null),[f,v]=u.useState(null),h=ae(a);return u.useEffect(()=>(s.open===!1&&h(!1),()=>h(!1)),[s.open,h]),(0,o.jsx)(Ce,{...i,children:(0,o.jsx)(Ie,{scope:e,open:t,onOpenChange:h,content:f,onContentChange:v,children:(0,o.jsx)(et,{scope:e,contentId:W(),triggerId:W(),trigger:d,onTriggerChange:x,children:r})})})},"MenuSub"),H="MenuSubTrigger",tt=u.forwardRef(m(c(function(e,r){const t=R(H,e.__scopeMenu),a=z(H,e.__scopeMenu),s=Oe(H,e.__scopeMenu),i=ce(H,e.__scopeMenu),d=u.useRef(null),{pointerGraceTimerRef:x,onPointerGraceIntentChange:f}=i,v={__scopeMenu:e.__scopeMenu},h=u.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);u.useEffect(()=>h,[h]),u.useEffect(()=>{const g=x.current;return()=>{window.clearTimeout(g),f(null)}},[x,f]);const l=y(r,s.onTriggerChange);return(0,o.jsx)(Re,{asChild:!0,...v,children:(0,o.jsx)(ye,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":t.open?s.contentId:void 0,"data-state":de(t.open),...e,ref:l,onClick:c(g=>{e.onClick?.(g),!(e.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),t.open||t.onOpenChange(!0))},"onClick"),onPointerMove:M(e.onPointerMove,L(g=>{i.onItemEnter(g),!g.defaultPrevented&&!e.disabled&&!t.open&&!d.current&&(i.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{t.onOpenChange(!0),h()},100))})),onPointerLeave:M(e.onPointerLeave,L(g=>{h();const w=t.content?.getBoundingClientRect();if(w){const C=t.content?.dataset.side,j=C==="right",$=j?-5:5,T=w[j?"left":"right"],U=w[j?"right":"left"];i.onPointerGraceIntentChange({area:[{x:g.clientX+$,y:g.clientY},{x:T,y:w.top},{x:U,y:w.top},{x:U,y:w.bottom},{x:T,y:w.bottom}],side:C}),window.clearTimeout(x.current),x.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(g),g.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,g=>{e.disabled||g.target!==g.currentTarget||i.searchRef.current!==""&&g.key===" "||yn[a.dir].includes(g.key)&&(t.onOpenChange(!0),t.content?.focus(),g.preventDefault())})})})},"MenuSubTrigger2"),"MenuSubTrigger")),ot="MenuSubContent",rt=u.forwardRef(m(c(function(e,r){const t=Pe(S,e.__scopeMenu),{forceMount:a=t.forceMount,align:s="start",...i}=e,d=R(S,e.__scopeMenu),x=z(S,e.__scopeMenu),f=Oe(ot,e.__scopeMenu),v=u.useRef(null),h=y(r,v);return(0,o.jsx)(G.Provider,{scope:e.__scopeMenu,children:(0,o.jsx)(q,{present:a||d.open,children:(0,o.jsx)(G.Slot,{scope:e.__scopeMenu,children:(0,o.jsx)(ue,{id:f.contentId,"aria-labelledby":f.triggerId,...i,ref:h,align:s,side:x.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c(l=>{x.isUsingKeyboardRef.current&&v.current?.focus(),l.preventDefault()},"onOpenAutoFocus"),onCloseAutoFocus:c(l=>l.preventDefault(),"onCloseAutoFocus"),onFocusOutside:M(e.onFocusOutside,l=>{l.target!==f.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,l=>{x.onClose(),l.preventDefault()}),onKeyDown:M(e.onKeyDown,l=>{const g=l.currentTarget.contains(l.target),w=En[x.dir].includes(l.key);g&&w&&(d.onOpenChange(!1),f.trigger?.focus(),l.preventDefault())})})})})})},"MenuSubContent2"),"MenuSubContent"));function de(n){return n?"open":"closed"}c(de,"getOpenState");m(de,"getOpenState");function K(n){return n==="indeterminate"}c(K,"isIndeterminate");m(K,"isIndeterminate");function Q(n){return K(n)?"indeterminate":n?"checked":"unchecked"}c(Q,"getCheckedState");m(Q,"getCheckedState");function Ne(n){const e=document.activeElement;for(const r of n)if(r===e||(r.focus(),document.activeElement!==e))return}c(Ne,"focusFirst");m(Ne,"focusFirst");function Le(n,e){return n.map((r,t)=>n[(e+t)%n.length])}c(Le,"wrapArray");m(Le,"wrapArray");function Ae(n,e,r){const t=e.length>1&&Array.from(e).every(d=>d===e[0])?e[0]:e,a=r?n.indexOf(r):-1;let s=Le(n,Math.max(a,0));t.length===1&&(s=s.filter(d=>d!==r));const i=s.find(d=>d.toLowerCase().startsWith(t.toLowerCase()));return i!==r?i:void 0}c(Ae,"getNextMatch");m(Ae,"getNextMatch");function Fe(n,e){const{x:r,y:t}=n;let a=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const d=e[s],x=e[i],f=d.x,v=d.y,h=x.x,l=x.y;v>t!=l>t&&r<(h-f)*(t-v)/(l-v)+f&&(a=!a)}return a}c(Fe,"isPointInPolygon");m(Fe,"isPointInPolygon");function Ge(n,e){return e?Fe({x:n.clientX,y:n.clientY},e):!1}c(Ge,"isPointerInGraceArea");m(Ge,"isPointerInGraceArea");function L(n){return e=>e.pointerType==="mouse"?n(e):void 0}c(L,"whenMouse");m(L,"whenMouse");var at=Nn,st=Re,ct=An,ut=Gn,it=Vn,dt=ie,lt=Bn,pt=Hn,ft=qn,mt=Jn,gt=Qn,xt=nt,ht=tt,vt=rt,Mt=Object.defineProperty,_=c((n,e)=>Mt(n,"name",{value:e,configurable:!0}),"__name"),le="DropdownMenu",[wt,uo]=we(le,[De]),D=De(),[Ct,Ke]=wt(le),bt=_(n=>{const{__scopeDropdownMenu:e,children:r,dir:t,open:a,defaultOpen:s,onOpenChange:i,modal:d=!0}=n,x=D(e),f=u.useRef(null),[v,h]=ve({prop:a,defaultProp:s??!1,onChange:i,caller:le});return(0,o.jsx)(Ct,{scope:e,triggerId:W(),triggerRef:f,contentId:W(),open:v,onOpenChange:h,onOpenToggle:u.useCallback(()=>h(l=>!l),[h]),modal:d,children:(0,o.jsx)(at,{...x,open:v,onOpenChange:h,dir:t,modal:d,children:r})})},"DropdownMenu"),_t="DropdownMenuTrigger",Dt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,disabled:a=!1,...s}=e,i=Ke(_t,t),d=D(t),x=y(r,i.triggerRef);return(0,o.jsx)(st,{asChild:!0,...d,children:(0,o.jsx)(A.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...s,ref:x,onPointerDown:M(e.onPointerDown,f=>{!a&&f.button===0&&f.ctrlKey===!1&&(i.onOpenToggle(),i.open||f.preventDefault())}),onKeyDown:M(e.onKeyDown,f=>{a||(["Enter"," "].includes(f.key)&&i.onOpenToggle(),f.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})},"DropdownMenuTrigger2"),"DropdownMenuTrigger")),St=_(n=>{const{__scopeDropdownMenu:e,...r}=n,t=D(e);return(0,o.jsx)(ct,{...t,...r})},"DropdownMenuPortal"),It="DropdownMenuContent",Rt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=Ke(It,t),i=D(t),d=u.useRef(!1);return(0,o.jsx)(ut,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...a,ref:r,onCloseAutoFocus:M(e.onCloseAutoFocus,x=>{d.current||s.triggerRef.current?.focus(),d.current=!1,x.preventDefault()}),onInteractOutside:M(e.onInteractOutside,x=>{const f=x.detail.originalEvent,v=f.button===0&&f.ctrlKey===!0,h=f.button===2||v;(!s.modal||h)&&(d.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent2"),"DropdownMenuContent")),jt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(it,{...s,...a,ref:r})},"DropdownMenuLabel2"),"DropdownMenuLabel")),Pt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(dt,{...s,...a,ref:r})},"DropdownMenuItem2"),"DropdownMenuItem")),yt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(lt,{...s,...a,ref:r})},"DropdownMenuCheckboxItem2"),"DropdownMenuCheckboxItem")),Et=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(pt,{...s,...a,ref:r})},"DropdownMenuRadioGroup2"),"DropdownMenuRadioGroup")),Tt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(ft,{...s,...a,ref:r})},"DropdownMenuRadioItem2"),"DropdownMenuRadioItem")),kt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(mt,{...s,...a,ref:r})},"DropdownMenuItemIndicator2"),"DropdownMenuItemIndicator")),Ot=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(gt,{...s,...a,ref:r})},"DropdownMenuSeparator2"),"DropdownMenuSeparator")),Nt=_(n=>{const{__scopeDropdownMenu:e,children:r,open:t,onOpenChange:a,defaultOpen:s}=n,i=D(e),[d,x]=ve({prop:t,defaultProp:s??!1,onChange:a,caller:"DropdownMenuSub"});return(0,o.jsx)(xt,{...i,open:d,onOpenChange:x,children:r})},"DropdownMenuSub"),Lt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(ht,{...s,...a,ref:r})},"DropdownMenuSubTrigger2"),"DropdownMenuSubTrigger")),At=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(vt,{...s,...a,ref:r,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent2"),"DropdownMenuSubContent")),Ft=bt,Gt=Dt,Kt=St,zt=Rt,$t=jt,Ut=Pt,Vt=yt,Bt=Et,Yt=Tt,ze=kt,Xt=Ot,Ht=Nt,Wt=Lt,qt=At,$e={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};$e.node;var io=sn($e);function lo({...n}){return(0,o.jsx)(Ft,{"data-slot":"dropdown-menu",...n})}c(lo,"DropdownMenu");function po({...n}){return(0,o.jsx)(Gt,{"data-slot":"dropdown-menu-trigger",...n})}c(po,"DropdownMenuTrigger");function fo({className:n,sideOffset:e=4,...r}){return(0,o.jsx)(Kt,{children:(0,o.jsx)(zt,{"data-slot":"dropdown-menu-content",sideOffset:e,className:b("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-(--sz-8rem) origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n),...r})})}c(fo,"DropdownMenuContent");function mo({className:n,inset:e,variant:r="default",...t}){return(0,o.jsx)(Ut,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":r,className:b("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...t})}c(mo,"DropdownMenuItem");function go({className:n,children:e,checked:r,...t}){return(0,o.jsxs)(Vt,{"data-slot":"dropdown-menu-checkbox-item",className:b("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),checked:r,...t,children:[(0,o.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,o.jsx)(ze,{children:(0,o.jsx)(Dn,{className:"size-4"})})}),e]})}c(go,"DropdownMenuCheckboxItem");function xo({...n}){return(0,o.jsx)(Bt,{"data-slot":"dropdown-menu-radio-group",...n})}c(xo,"DropdownMenuRadioGroup");function ho({className:n,children:e,...r}){return(0,o.jsxs)(Yt,{"data-slot":"dropdown-menu-radio-item",className:b("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...r,children:[(0,o.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,o.jsx)(ze,{children:(0,o.jsx)(ln,{className:"size-2 fill-current"})})}),e]})}c(ho,"DropdownMenuRadioItem");function vo({className:n,inset:e,...r}){return(0,o.jsx)($t,{"data-slot":"dropdown-menu-label","data-inset":e,className:b("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",n),...r})}c(vo,"DropdownMenuLabel");function Mo({className:n,...e}){return(0,o.jsx)(Xt,{"data-slot":"dropdown-menu-separator",className:b("bg-border -mx-1 my-1 h-px",n),...e})}c(Mo,"DropdownMenuSeparator");function wo({className:n,...e}){return(0,o.jsx)("span",{"data-slot":"dropdown-menu-shortcut",className:b("text-muted-foreground ml-auto text-xs tracking-widest",n),...e})}c(wo,"DropdownMenuShortcut");function Co({...n}){return(0,o.jsx)(Ht,{"data-slot":"dropdown-menu-sub",...n})}c(Co,"DropdownMenuSub");function bo({className:n,inset:e,children:r,...t}){return(0,o.jsxs)(Wt,{"data-slot":"dropdown-menu-sub-trigger","data-inset":e,className:b("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...t,children:[r,(0,o.jsx)(Sn,{className:"ml-auto size-4"})]})}c(bo,"DropdownMenuSubTrigger");function _o({className:n,...e}){return(0,o.jsx)(qt,{"data-slot":"dropdown-menu-sub-content",className:b("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 z-50 min-w-(--sz-8rem) origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",n),...e})}c(_o,"DropdownMenuSubContent");function Do({...n}){return(0,o.jsx)(_n,{"data-slot":"dialog",...n})}c(Do,"Dialog");function So({...n}){return(0,o.jsx)(vn,{"data-slot":"dialog-trigger",...n})}c(So,"DialogTrigger");function Zt({...n}){return(0,o.jsx)(wn,{"data-slot":"dialog-portal",...n})}c(Zt,"DialogPortal");function Io({...n}){return(0,o.jsx)(se,{"data-slot":"dialog-close",...n})}c(Io,"DialogClose");function Jt({className:n,...e}){return(0,o.jsx)(hn,{"data-slot":"dialog-overlay",className:b("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 duration-100 motion-reduce:animate-none motion-reduce:transition-none",n),...e})}c(Jt,"DialogOverlay");function Ro({className:n,children:e,showCloseButton:r=!0,...t}){return(0,o.jsxs)(Zt,{"data-slot":"dialog-portal",children:[(0,o.jsx)(Jt,{}),(0,o.jsxs)(Cn,{"data-slot":"dialog-content",className:b("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-[0.97] data-[state=open]:zoom-in-[0.97] data-[state=closed]:slide-out-to-top-[1%] data-[state=open]:slide-in-from-top-[1%] fixed top-(--sz-calc-26) md:top-(--pct-50) left-(--pct-50) z-50 grid w-full max-w-(--sz-calc-25) translate-x-(--pct-neg-50) translate-y-0 md:translate-y-(--pct-neg-50) gap-4 rounded-lg border p-6 shadow-lg duration-150 ease-(--e-cubic-bezier-0_16-1-0_3-1) outline-none sm:max-w-lg [&>*]:min-w-0 motion-reduce:animate-none motion-reduce:transition-none",n),...t,children:[e,r&&(0,o.jsxs)(se,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,o.jsx)(In,{}),(0,o.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}c(Ro,"DialogContent");function jo({className:n,...e}){return(0,o.jsx)("div",{"data-slot":"dialog-header",className:b("flex flex-col gap-2 text-center sm:text-left",n),...e})}c(jo,"DialogHeader");function Po({className:n,showCloseButton:e=!1,children:r,...t}){return(0,o.jsxs)("div",{"data-slot":"dialog-footer",className:b("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",n),...t,children:[r,e&&(0,o.jsx)(se,{asChild:!0,children:(0,o.jsx)(pn,{variant:"outline",children:"Close"})})]})}c(Po,"DialogFooter");function yo({className:n,...e}){return(0,o.jsx)(bn,{"data-slot":"dialog-title",className:b("text-lg leading-none font-semibold",n),...e})}c(yo,"DialogTitle");function Eo({className:n,...e}){return(0,o.jsx)(Mn,{"data-slot":"dialog-description",className:b("text-muted-foreground text-sm",n),...e})}c(Eo,"DialogDescription");export{De as A,io as C,ct as D,dt as E,at as O,po as S,ut as T,Mo as _,Po as a,_o as b,yo as c,go as d,fo as f,ho as g,xo as h,Eo as i,gt as k,So as l,vo as m,Io as n,jo as o,mo as p,Ro as r,Zt as s,Do as t,lo as u,wo as v,st as w,bo as x,Co as y};
|
|
1
|
+
var qe=Object.defineProperty;var c=(n,e)=>qe(n,"name",{value:e,configurable:!0});import{i as he}from"./rolldown-runtime-ZpX3ckPj.js";import{A as M,C as Ze,D as q,E as W,F as Je,G as b,Ha as Qe,L as y,M as A,N as en,O as ve,S as nn,T as ae,Wa as tn,_ as on,b as rn,d as an,h as Me,j as we,m as Ce,n as sn,p as cn,v as un,x as dn}from"./boxes-CwMr8JCg.js";import{kt as ln,r as pn}from"./BreadcrumbContext-BXnrcRDo.js";import{a as fn,i as mn,n as gn,r as be,t as xn}from"./dist-C8lGa9JE.js";import{a as hn,c as vn,i as Mn,n as se,o as wn,r as Cn,s as bn,t as _n}from"./dist-B35dvbuD.js";import{t as Dn}from"./check-DeNE2bzR.js";import{a as Sn}from"./clipboard-XFzVw2Fw.js";import{t as In}from"./x-DoY9fSuL.js";var u=he(tn(),1),o=he(Qe(),1),Rn=Object.defineProperty,m=c((n,e)=>Rn(n,"name",{value:e,configurable:!0}),"__name$1"),oe=["Enter"," "],jn=["ArrowDown","PageUp","Home"],_e=["ArrowUp","PageDown","End"],Pn=[...jn,..._e],yn={ltr:[...oe,"ArrowRight"],rtl:[...oe,"ArrowLeft"]},En={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Z="Menu",[G,Tn,kn]=fn(Z),[E,De]=we(Z,[kn,Me,be]),J=Me(),Se=be(),[Ie,R]=E(Z),[On,z]=E(Z),Nn=m(n=>{const{__scopeMenu:e,open:r=!1,children:t,dir:a,onOpenChange:s,modal:i=!0}=n,d=J(e),[x,f]=u.useState(null),v=u.useRef(!1),h=ae(s),l=mn(a);return u.useEffect(()=>{const g=m(()=>{v.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},"handleKeyDown"),w=m(()=>v.current=!1,"handlePointer");return document.addEventListener("keydown",g,{capture:!0}),()=>{document.removeEventListener("keydown",g,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),u.useEffect(()=>{if(!r)return;const g=m(()=>h(!1),"handleBlur");return window.addEventListener("blur",g),()=>window.removeEventListener("blur",g)},[r,h]),(0,o.jsx)(Ce,{...d,children:(0,o.jsx)(Ie,{scope:e,open:r,onOpenChange:h,content:x,onContentChange:f,children:(0,o.jsx)(On,{scope:e,onClose:u.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:v,dir:l,modal:i,children:t})})})},"Menu"),Re=u.forwardRef(m(c(function(e,r){const{__scopeMenu:t,...a}=e,s=J(t);return(0,o.jsx)(an,{...s,...a,ref:r})},"MenuAnchor2"),"MenuAnchor")),je="MenuPortal",[Ln,Pe]=E(je,{forceMount:void 0}),An=m(n=>{const{__scopeMenu:e,forceMount:r,children:t,container:a}=n,s=R(je,e);return(0,o.jsx)(Ln,{scope:e,forceMount:r,children:(0,o.jsx)(q,{present:r||s.open,children:(0,o.jsx)(dn,{asChild:!0,container:a,children:t})})})},"MenuPortal"),S="MenuContent",[Fn,ce]=E(S),Gn=u.forwardRef(m(c(function(e,r){const t=Pe(S,e.__scopeMenu),{forceMount:a=t.forceMount,...s}=e,i=R(S,e.__scopeMenu),d=z(S,e.__scopeMenu);return(0,o.jsx)(G.Provider,{scope:e.__scopeMenu,children:(0,o.jsx)(q,{present:a||i.open,children:(0,o.jsx)(G.Slot,{scope:e.__scopeMenu,children:d.modal?(0,o.jsx)(Kn,{...s,ref:r}):(0,o.jsx)(zn,{...s,ref:r})})})})},"MenuContent2"),"MenuContent")),Kn=u.forwardRef(m(c(function(e,r){const t=R(S,e.__scopeMenu),a=u.useRef(null),s=y(r,a);return u.useEffect(()=>{const i=a.current;if(i)return on(i)},[]),(0,o.jsx)(ue,{...e,ref:s,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:M(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:c(()=>t.onOpenChange(!1),"onDismiss")})},"MenuRootContentModal2"),"MenuRootContentModal")),zn=u.forwardRef(m(c(function(e,r){const t=R(S,e.__scopeMenu);return(0,o.jsx)(ue,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:c(()=>t.onOpenChange(!1),"onDismiss")})},"MenuRootContentNonModal2"),"MenuRootContentNonModal")),$n=Je("MenuContent.ScrollLock"),ue=u.forwardRef(m(c(function(e,r){const{__scopeMenu:t,loop:a=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:d,disableOutsidePointerEvents:x,onEntryFocus:f,onEscapeKeyDown:v,onPointerDownOutside:h,onFocusOutside:l,onInteractOutside:g,onDismiss:w,disableOutsideScroll:C,...j}=e,$=R(S,t),T=z(S,t),U=J(t),Ue=Se(t),pe=Tn(t),[Ve,fe]=u.useState(null),V=u.useRef(null),Be=y(r,V,$.onContentChange),B=u.useRef(0),Y=u.useRef(""),Ye=u.useRef(0),ee=u.useRef(null),me=u.useRef("right"),ne=u.useRef(0),Xe=C?un:u.Fragment,He=C?{as:$n,allowPinchZoom:!0}:void 0,We=m(p=>{const O=Y.current+p,P=pe().filter(I=>!I.disabled),F=document.activeElement,te=P.find(I=>I.ref.current===F)?.textValue,X=Ae(P.map(I=>I.textValue),O,te),N=P.find(I=>I.textValue===X)?.ref.current;m(c((function I(ge){Y.current=ge,window.clearTimeout(B.current),ge!==""&&(B.current=window.setTimeout(()=>I(""),1e3))}),"updateSearch"),"updateSearch")(O),N&&setTimeout(()=>N.focus())},"handleTypeaheadSearch");u.useEffect(()=>()=>window.clearTimeout(B.current),[]),rn();const k=u.useCallback(p=>me.current===ee.current?.side&&Ge(p,ee.current?.area),[]);return(0,o.jsx)(Fn,{scope:t,searchRef:Y,onItemEnter:u.useCallback(p=>{k(p)&&p.preventDefault()},[k]),onItemLeave:u.useCallback(p=>{k(p)||(V.current?.focus(),fe(null))},[k]),onTriggerLeave:u.useCallback(p=>{k(p)&&p.preventDefault()},[k]),pointerGraceTimerRef:Ye,onPointerGraceIntentChange:u.useCallback(p=>{ee.current=p},[]),children:(0,o.jsx)(Xe,{...He,children:(0,o.jsx)(nn,{asChild:!0,trapped:s,onMountAutoFocus:M(i,p=>{p.preventDefault(),V.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:(0,o.jsx)(Ze,{asChild:!0,disableOutsidePointerEvents:x,onEscapeKeyDown:v,onPointerDownOutside:h,onFocusOutside:l,onInteractOutside:g,onDismiss:w,children:(0,o.jsx)(gn,{asChild:!0,...Ue,dir:T.dir,orientation:"vertical",loop:a,currentTabStopId:Ve,onCurrentTabStopIdChange:fe,onEntryFocus:M(f,p=>{T.isUsingKeyboardRef.current||p.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,o.jsx)(cn,{role:"menu","aria-orientation":"vertical","data-state":de($.open),"data-radix-menu-content":"",dir:T.dir,...U,...j,ref:Be,style:{outline:"none",...j.style},onKeyDown:M(j.onKeyDown,p=>{const O=p.target.closest("[data-radix-menu-content]")===p.currentTarget,P=p.ctrlKey||p.altKey||p.metaKey,F=p.key.length===1;O&&(p.key==="Tab"&&p.preventDefault(),!P&&F&&We(p.key));const te=V.current;if(p.target!==te||!Pn.includes(p.key))return;p.preventDefault();const X=pe().filter(N=>!N.disabled).map(N=>N.ref.current);_e.includes(p.key)&&X.reverse(),Ne(X)}),onBlur:M(e.onBlur,p=>{p.currentTarget.contains(p.target)||(window.clearTimeout(B.current),Y.current="")}),onPointerMove:M(e.onPointerMove,L(p=>{const O=p.target,P=ne.current!==p.clientX;if(p.currentTarget.contains(O)&&P){const F=p.clientX>ne.current?"right":"left";me.current=F,ne.current=p.clientX}}))})})})})})})},"MenuContentImpl2"),"MenuContentImpl")),Un=u.forwardRef(m(c(function(e,r){const{__scopeMenu:t,...a}=e;return(0,o.jsx)(A.div,{role:"group",...a,ref:r})},"MenuGroup2"),"MenuGroup")),Vn=u.forwardRef(m(c(function(e,r){const{__scopeMenu:t,...a}=e;return(0,o.jsx)(A.div,{...a,ref:r})},"MenuLabel2"),"MenuLabel")),re="MenuItem",xe="menu.itemSelect",ie=u.forwardRef(m(c(function(e,r){const{disabled:t=!1,onSelect:a,...s}=e,i=u.useRef(null),d=z(re,e.__scopeMenu),x=ce(re,e.__scopeMenu),f=y(r,i),v=u.useRef(!1),h=m(()=>{const l=i.current;if(!t&&l){const g=new CustomEvent(xe,{bubbles:!0,cancelable:!0});l.addEventListener(xe,w=>a?.(w),{once:!0}),en(l,g),g.defaultPrevented?v.current=!1:d.onClose()}},"handleSelect");return(0,o.jsx)(ye,{...s,ref:f,disabled:t,onClick:M(e.onClick,h),onPointerDown:c(l=>{e.onPointerDown?.(l),v.current=!0},"onPointerDown"),onPointerUp:M(e.onPointerUp,l=>{v.current||l.currentTarget?.click()}),onKeyDown:M(e.onKeyDown,l=>{t||l.target!==l.currentTarget||x.searchRef.current!==""&&l.key===" "||oe.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})},"MenuItem2"),"MenuItem")),ye=u.forwardRef(m(c(function(e,r){const{__scopeMenu:t,disabled:a=!1,textValue:s,...i}=e,d=ce(re,t),x=Se(t),f=u.useRef(null),v=y(r,f),[h,l]=u.useState(!1),[g,w]=u.useState("");return u.useEffect(()=>{const C=f.current;C&&w((C.textContent??"").trim())},[i.children]),(0,o.jsx)(G.ItemSlot,{scope:t,disabled:a,textValue:s??g,children:(0,o.jsx)(xn,{asChild:!0,...x,focusable:!a,children:(0,o.jsx)(A.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...i,ref:v,onPointerMove:M(e.onPointerMove,L(C=>{a?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:M(e.onPointerLeave,L(C=>d.onItemLeave(C))),onFocus:M(e.onFocus,()=>l(!0)),onBlur:M(e.onBlur,()=>l(!1))})})})},"MenuItemImpl2"),"MenuItemImpl")),Bn=u.forwardRef(m(c(function(e,r){const{checked:t=!1,onCheckedChange:a,...s}=e;return(0,o.jsx)(Te,{scope:e.__scopeMenu,checked:t,children:(0,o.jsx)(ie,{role:"menuitemcheckbox","aria-checked":K(t)?"mixed":t,...s,ref:r,"data-state":Q(t),onSelect:M(s.onSelect,()=>a?.(K(t)?!0:!t),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem2"),"MenuCheckboxItem")),[Yn,Xn]=E("MenuRadioGroup",{value:void 0,onValueChange:m(()=>{},"onValueChange")}),Hn=u.forwardRef(m(c(function(e,r){const{value:t,onValueChange:a,...s}=e,i=ae(a);return(0,o.jsx)(Yn,{scope:e.__scopeMenu,value:t,onValueChange:i,children:(0,o.jsx)(Un,{...s,ref:r})})},"MenuRadioGroup2"),"MenuRadioGroup")),Wn="MenuRadioItem",qn=u.forwardRef(m(c(function(e,r){const{value:t,...a}=e,s=Xn(Wn,e.__scopeMenu),i=t===s.value;return(0,o.jsx)(Te,{scope:e.__scopeMenu,checked:i,children:(0,o.jsx)(ie,{role:"menuitemradio","aria-checked":i,...a,ref:r,"data-state":Q(i),onSelect:M(a.onSelect,()=>s.onValueChange?.(t),{checkForDefaultPrevented:!1})})})},"MenuRadioItem2"),"MenuRadioItem")),Ee="MenuItemIndicator",[Te,Zn]=E(Ee,{checked:!1}),Jn=u.forwardRef(m(c(function(e,r){const{__scopeMenu:t,forceMount:a,...s}=e,i=Zn(Ee,t);return(0,o.jsx)(q,{present:a||K(i.checked)||i.checked===!0,children:(0,o.jsx)(A.span,{...s,ref:r,"data-state":Q(i.checked)})})},"MenuItemIndicator2"),"MenuItemIndicator")),Qn=u.forwardRef(m(c(function(e,r){const{__scopeMenu:t,...a}=e;return(0,o.jsx)(A.div,{role:"separator","aria-orientation":"horizontal",...a,ref:r})},"MenuSeparator2"),"MenuSeparator")),ke="MenuSub",[et,Oe]=E(ke),nt=m(n=>{const{__scopeMenu:e,children:r,open:t=!1,onOpenChange:a}=n,s=R(ke,e),i=J(e),[d,x]=u.useState(null),[f,v]=u.useState(null),h=ae(a);return u.useEffect(()=>(s.open===!1&&h(!1),()=>h(!1)),[s.open,h]),(0,o.jsx)(Ce,{...i,children:(0,o.jsx)(Ie,{scope:e,open:t,onOpenChange:h,content:f,onContentChange:v,children:(0,o.jsx)(et,{scope:e,contentId:W(),triggerId:W(),trigger:d,onTriggerChange:x,children:r})})})},"MenuSub"),H="MenuSubTrigger",tt=u.forwardRef(m(c(function(e,r){const t=R(H,e.__scopeMenu),a=z(H,e.__scopeMenu),s=Oe(H,e.__scopeMenu),i=ce(H,e.__scopeMenu),d=u.useRef(null),{pointerGraceTimerRef:x,onPointerGraceIntentChange:f}=i,v={__scopeMenu:e.__scopeMenu},h=u.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);u.useEffect(()=>h,[h]),u.useEffect(()=>{const g=x.current;return()=>{window.clearTimeout(g),f(null)}},[x,f]);const l=y(r,s.onTriggerChange);return(0,o.jsx)(Re,{asChild:!0,...v,children:(0,o.jsx)(ye,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":t.open?s.contentId:void 0,"data-state":de(t.open),...e,ref:l,onClick:c(g=>{e.onClick?.(g),!(e.disabled||g.defaultPrevented)&&(g.currentTarget.focus(),t.open||t.onOpenChange(!0))},"onClick"),onPointerMove:M(e.onPointerMove,L(g=>{i.onItemEnter(g),!g.defaultPrevented&&!e.disabled&&!t.open&&!d.current&&(i.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{t.onOpenChange(!0),h()},100))})),onPointerLeave:M(e.onPointerLeave,L(g=>{h();const w=t.content?.getBoundingClientRect();if(w){const C=t.content?.dataset.side,j=C==="right",$=j?-5:5,T=w[j?"left":"right"],U=w[j?"right":"left"];i.onPointerGraceIntentChange({area:[{x:g.clientX+$,y:g.clientY},{x:T,y:w.top},{x:U,y:w.top},{x:U,y:w.bottom},{x:T,y:w.bottom}],side:C}),window.clearTimeout(x.current),x.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(g),g.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:M(e.onKeyDown,g=>{e.disabled||g.target!==g.currentTarget||i.searchRef.current!==""&&g.key===" "||yn[a.dir].includes(g.key)&&(t.onOpenChange(!0),t.content?.focus(),g.preventDefault())})})})},"MenuSubTrigger2"),"MenuSubTrigger")),ot="MenuSubContent",rt=u.forwardRef(m(c(function(e,r){const t=Pe(S,e.__scopeMenu),{forceMount:a=t.forceMount,align:s="start",...i}=e,d=R(S,e.__scopeMenu),x=z(S,e.__scopeMenu),f=Oe(ot,e.__scopeMenu),v=u.useRef(null),h=y(r,v);return(0,o.jsx)(G.Provider,{scope:e.__scopeMenu,children:(0,o.jsx)(q,{present:a||d.open,children:(0,o.jsx)(G.Slot,{scope:e.__scopeMenu,children:(0,o.jsx)(ue,{id:f.contentId,"aria-labelledby":f.triggerId,...i,ref:h,align:s,side:x.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c(l=>{x.isUsingKeyboardRef.current&&v.current?.focus(),l.preventDefault()},"onOpenAutoFocus"),onCloseAutoFocus:c(l=>l.preventDefault(),"onCloseAutoFocus"),onFocusOutside:M(e.onFocusOutside,l=>{l.target!==f.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:M(e.onEscapeKeyDown,l=>{x.onClose(),l.preventDefault()}),onKeyDown:M(e.onKeyDown,l=>{const g=l.currentTarget.contains(l.target),w=En[x.dir].includes(l.key);g&&w&&(d.onOpenChange(!1),f.trigger?.focus(),l.preventDefault())})})})})})},"MenuSubContent2"),"MenuSubContent"));function de(n){return n?"open":"closed"}c(de,"getOpenState");m(de,"getOpenState");function K(n){return n==="indeterminate"}c(K,"isIndeterminate");m(K,"isIndeterminate");function Q(n){return K(n)?"indeterminate":n?"checked":"unchecked"}c(Q,"getCheckedState");m(Q,"getCheckedState");function Ne(n){const e=document.activeElement;for(const r of n)if(r===e||(r.focus(),document.activeElement!==e))return}c(Ne,"focusFirst");m(Ne,"focusFirst");function Le(n,e){return n.map((r,t)=>n[(e+t)%n.length])}c(Le,"wrapArray");m(Le,"wrapArray");function Ae(n,e,r){const t=e.length>1&&Array.from(e).every(d=>d===e[0])?e[0]:e,a=r?n.indexOf(r):-1;let s=Le(n,Math.max(a,0));t.length===1&&(s=s.filter(d=>d!==r));const i=s.find(d=>d.toLowerCase().startsWith(t.toLowerCase()));return i!==r?i:void 0}c(Ae,"getNextMatch");m(Ae,"getNextMatch");function Fe(n,e){const{x:r,y:t}=n;let a=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const d=e[s],x=e[i],f=d.x,v=d.y,h=x.x,l=x.y;v>t!=l>t&&r<(h-f)*(t-v)/(l-v)+f&&(a=!a)}return a}c(Fe,"isPointInPolygon");m(Fe,"isPointInPolygon");function Ge(n,e){return e?Fe({x:n.clientX,y:n.clientY},e):!1}c(Ge,"isPointerInGraceArea");m(Ge,"isPointerInGraceArea");function L(n){return e=>e.pointerType==="mouse"?n(e):void 0}c(L,"whenMouse");m(L,"whenMouse");var at=Nn,st=Re,ct=An,ut=Gn,it=Vn,dt=ie,lt=Bn,pt=Hn,ft=qn,mt=Jn,gt=Qn,xt=nt,ht=tt,vt=rt,Mt=Object.defineProperty,_=c((n,e)=>Mt(n,"name",{value:e,configurable:!0}),"__name"),le="DropdownMenu",[wt,uo]=we(le,[De]),D=De(),[Ct,Ke]=wt(le),bt=_(n=>{const{__scopeDropdownMenu:e,children:r,dir:t,open:a,defaultOpen:s,onOpenChange:i,modal:d=!0}=n,x=D(e),f=u.useRef(null),[v,h]=ve({prop:a,defaultProp:s??!1,onChange:i,caller:le});return(0,o.jsx)(Ct,{scope:e,triggerId:W(),triggerRef:f,contentId:W(),open:v,onOpenChange:h,onOpenToggle:u.useCallback(()=>h(l=>!l),[h]),modal:d,children:(0,o.jsx)(at,{...x,open:v,onOpenChange:h,dir:t,modal:d,children:r})})},"DropdownMenu"),_t="DropdownMenuTrigger",Dt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,disabled:a=!1,...s}=e,i=Ke(_t,t),d=D(t),x=y(r,i.triggerRef);return(0,o.jsx)(st,{asChild:!0,...d,children:(0,o.jsx)(A.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...s,ref:x,onPointerDown:M(e.onPointerDown,f=>{!a&&f.button===0&&f.ctrlKey===!1&&(i.onOpenToggle(),i.open||f.preventDefault())}),onKeyDown:M(e.onKeyDown,f=>{a||(["Enter"," "].includes(f.key)&&i.onOpenToggle(),f.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(f.key)&&f.preventDefault())})})})},"DropdownMenuTrigger2"),"DropdownMenuTrigger")),St=_(n=>{const{__scopeDropdownMenu:e,...r}=n,t=D(e);return(0,o.jsx)(ct,{...t,...r})},"DropdownMenuPortal"),It="DropdownMenuContent",Rt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=Ke(It,t),i=D(t),d=u.useRef(!1);return(0,o.jsx)(ut,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...a,ref:r,onCloseAutoFocus:M(e.onCloseAutoFocus,x=>{d.current||s.triggerRef.current?.focus(),d.current=!1,x.preventDefault()}),onInteractOutside:M(e.onInteractOutside,x=>{const f=x.detail.originalEvent,v=f.button===0&&f.ctrlKey===!0,h=f.button===2||v;(!s.modal||h)&&(d.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent2"),"DropdownMenuContent")),jt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(it,{...s,...a,ref:r})},"DropdownMenuLabel2"),"DropdownMenuLabel")),Pt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(dt,{...s,...a,ref:r})},"DropdownMenuItem2"),"DropdownMenuItem")),yt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(lt,{...s,...a,ref:r})},"DropdownMenuCheckboxItem2"),"DropdownMenuCheckboxItem")),Et=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(pt,{...s,...a,ref:r})},"DropdownMenuRadioGroup2"),"DropdownMenuRadioGroup")),Tt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(ft,{...s,...a,ref:r})},"DropdownMenuRadioItem2"),"DropdownMenuRadioItem")),kt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(mt,{...s,...a,ref:r})},"DropdownMenuItemIndicator2"),"DropdownMenuItemIndicator")),Ot=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(gt,{...s,...a,ref:r})},"DropdownMenuSeparator2"),"DropdownMenuSeparator")),Nt=_(n=>{const{__scopeDropdownMenu:e,children:r,open:t,onOpenChange:a,defaultOpen:s}=n,i=D(e),[d,x]=ve({prop:t,defaultProp:s??!1,onChange:a,caller:"DropdownMenuSub"});return(0,o.jsx)(xt,{...i,open:d,onOpenChange:x,children:r})},"DropdownMenuSub"),Lt=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(ht,{...s,...a,ref:r})},"DropdownMenuSubTrigger2"),"DropdownMenuSubTrigger")),At=u.forwardRef(_(c(function(e,r){const{__scopeDropdownMenu:t,...a}=e,s=D(t);return(0,o.jsx)(vt,{...s,...a,ref:r,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent2"),"DropdownMenuSubContent")),Ft=bt,Gt=Dt,Kt=St,zt=Rt,$t=jt,Ut=Pt,Vt=yt,Bt=Et,Yt=Tt,ze=kt,Xt=Ot,Ht=Nt,Wt=Lt,qt=At,$e={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};$e.node;var io=sn($e);function lo({...n}){return(0,o.jsx)(Ft,{"data-slot":"dropdown-menu",...n})}c(lo,"DropdownMenu");function po({...n}){return(0,o.jsx)(Gt,{"data-slot":"dropdown-menu-trigger",...n})}c(po,"DropdownMenuTrigger");function fo({className:n,sideOffset:e=4,...r}){return(0,o.jsx)(Kt,{children:(0,o.jsx)(zt,{"data-slot":"dropdown-menu-content",sideOffset:e,className:b("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-(--sz-8rem) origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n),...r})})}c(fo,"DropdownMenuContent");function mo({className:n,inset:e,variant:r="default",...t}){return(0,o.jsx)(Ut,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":r,className:b("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...t})}c(mo,"DropdownMenuItem");function go({className:n,children:e,checked:r,...t}){return(0,o.jsxs)(Vt,{"data-slot":"dropdown-menu-checkbox-item",className:b("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),checked:r,...t,children:[(0,o.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,o.jsx)(ze,{children:(0,o.jsx)(Dn,{className:"size-4"})})}),e]})}c(go,"DropdownMenuCheckboxItem");function xo({...n}){return(0,o.jsx)(Bt,{"data-slot":"dropdown-menu-radio-group",...n})}c(xo,"DropdownMenuRadioGroup");function ho({className:n,children:e,...r}){return(0,o.jsxs)(Yt,{"data-slot":"dropdown-menu-radio-item",className:b("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...r,children:[(0,o.jsx)("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:(0,o.jsx)(ze,{children:(0,o.jsx)(ln,{className:"size-2 fill-current"})})}),e]})}c(ho,"DropdownMenuRadioItem");function vo({className:n,inset:e,...r}){return(0,o.jsx)($t,{"data-slot":"dropdown-menu-label","data-inset":e,className:b("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",n),...r})}c(vo,"DropdownMenuLabel");function Mo({className:n,...e}){return(0,o.jsx)(Xt,{"data-slot":"dropdown-menu-separator",className:b("bg-border -mx-1 my-1 h-px",n),...e})}c(Mo,"DropdownMenuSeparator");function wo({className:n,...e}){return(0,o.jsx)("span",{"data-slot":"dropdown-menu-shortcut",className:b("text-muted-foreground ml-auto text-xs tracking-widest",n),...e})}c(wo,"DropdownMenuShortcut");function Co({...n}){return(0,o.jsx)(Ht,{"data-slot":"dropdown-menu-sub",...n})}c(Co,"DropdownMenuSub");function bo({className:n,inset:e,children:r,...t}){return(0,o.jsxs)(Wt,{"data-slot":"dropdown-menu-sub-trigger","data-inset":e,className:b("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...t,children:[r,(0,o.jsx)(Sn,{className:"ml-auto size-4"})]})}c(bo,"DropdownMenuSubTrigger");function _o({className:n,...e}){return(0,o.jsx)(qt,{"data-slot":"dropdown-menu-sub-content",className:b("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-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 z-50 min-w-(--sz-8rem) origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",n),...e})}c(_o,"DropdownMenuSubContent");function Do({...n}){return(0,o.jsx)(_n,{"data-slot":"dialog",...n})}c(Do,"Dialog");function So({...n}){return(0,o.jsx)(vn,{"data-slot":"dialog-trigger",...n})}c(So,"DialogTrigger");function Zt({...n}){return(0,o.jsx)(wn,{"data-slot":"dialog-portal",...n})}c(Zt,"DialogPortal");function Io({...n}){return(0,o.jsx)(se,{"data-slot":"dialog-close",...n})}c(Io,"DialogClose");function Jt({className:n,...e}){return(0,o.jsx)(hn,{"data-slot":"dialog-overlay",className:b("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 duration-100 motion-reduce:animate-none motion-reduce:transition-none",n),...e})}c(Jt,"DialogOverlay");function Ro({className:n,children:e,showCloseButton:r=!0,...t}){return(0,o.jsxs)(Zt,{"data-slot":"dialog-portal",children:[(0,o.jsx)(Jt,{}),(0,o.jsxs)(Cn,{"data-slot":"dialog-content",className:b("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-[0.97] data-[state=open]:zoom-in-[0.97] data-[state=closed]:slide-out-to-top-[1%] data-[state=open]:slide-in-from-top-[1%] fixed top-(--sz-calc-26) md:top-(--pct-50) left-(--pct-50) z-50 grid w-full max-w-(--sz-calc-25) translate-x-(--pct-neg-50) translate-y-0 md:translate-y-(--pct-neg-50) gap-4 rounded-lg border p-6 shadow-lg duration-150 ease-(--e-cubic-bezier-0_16-1-0_3-1) outline-none sm:max-w-lg [&>*]:min-w-0 motion-reduce:animate-none motion-reduce:transition-none",n),...t,children:[e,r&&(0,o.jsxs)(se,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[(0,o.jsx)(In,{}),(0,o.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}c(Ro,"DialogContent");function jo({className:n,...e}){return(0,o.jsx)("div",{"data-slot":"dialog-header",className:b("flex flex-col gap-2 text-center sm:text-left",n),...e})}c(jo,"DialogHeader");function Po({className:n,showCloseButton:e=!1,children:r,...t}){return(0,o.jsxs)("div",{"data-slot":"dialog-footer",className:b("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",n),...t,children:[r,e&&(0,o.jsx)(se,{asChild:!0,children:(0,o.jsx)(pn,{variant:"outline",children:"Close"})})]})}c(Po,"DialogFooter");function yo({className:n,...e}){return(0,o.jsx)(bn,{"data-slot":"dialog-title",className:b("text-lg leading-none font-semibold",n),...e})}c(yo,"DialogTitle");function Eo({className:n,...e}){return(0,o.jsx)(Mn,{"data-slot":"dialog-description",className:b("text-muted-foreground text-sm",n),...e})}c(Eo,"DialogDescription");export{De as A,io as C,ct as D,dt as E,at as O,po as S,ut as T,Mo as _,Po as a,_o as b,yo as c,go as d,fo as f,ho as g,xo as h,Eo as i,gt as k,So as l,vo as m,Io as n,jo as o,mo as p,Ro as r,Zt as s,Do as t,lo as u,wo as v,st as w,bo as x,Co as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var N=Object.defineProperty;var u=(l,o)=>N(l,"name",{value:o,configurable:!0});import{i as h}from"./rolldown-runtime-ZpX3ckPj.js";import{A as p,C as L,D as P,E as x,F as k,Ha as G,L as R,M as v,O as q,S as H,Wa as K,_ as U,b as V,j as W,k as E,v as Y,w as Z,x as z}from"./boxes-
|
|
1
|
+
var N=Object.defineProperty;var u=(l,o)=>N(l,"name",{value:o,configurable:!0});import{i as h}from"./rolldown-runtime-ZpX3ckPj.js";import{A as p,C as L,D as P,E as x,F as k,Ha as G,L as R,M as v,O as q,S as H,Wa as K,_ as U,b as V,j as W,k as E,v as Y,w as Z,x as z}from"./boxes-CwMr8JCg.js";var i=h(K(),1),s=h(G(),1),B=Object.defineProperty,f=u((l,o)=>B(l,"name",{value:o,configurable:!0}),"__name"),m="Dialog",[j,ce]=W(m),[J,d]=j(m),ue=f(l=>{const{__scopeDialog:o,children:a,open:n,defaultOpen:r,onOpenChange:t,modal:e=!0}=l,c=i.useRef(null),g=i.useRef(null),[b,_]=q({prop:n,defaultProp:r??!1,onChange:t,caller:m}),[A,T]=i.useState(0),[S,F]=i.useState(0);return(0,s.jsx)(J,{scope:o,triggerRef:c,contentRef:g,contentId:x(),titleId:x(),descriptionId:x(),titlePresent:A>0,descriptionPresent:S>0,setTitleCount:T,setDescriptionCount:F,open:b,onOpenChange:_,onOpenToggle:i.useCallback(()=>_(w=>!w),[_]),modal:e,children:a})},"Dialog"),Q="DialogTrigger",fe=i.forwardRef(f(u(function(o,a){const{__scopeDialog:n,...r}=o,t=d(Q,n),e=R(a,t.triggerRef);return(0,s.jsx)(v.button,{type:"button","aria-haspopup":"dialog","aria-expanded":t.open,"aria-controls":t.open?t.contentId:void 0,"data-state":C(t.open),...r,ref:e,onClick:p(o.onClick,t.onOpenToggle)})},"DialogTrigger2"),"DialogTrigger")),I="DialogPortal",[X,y]=j(I,{forceMount:void 0}),ge=f(l=>{const{__scopeDialog:o,forceMount:a,children:n,container:r}=l,t=d(I,o);return(0,s.jsx)(X,{scope:o,forceMount:a,children:i.Children.map(n,e=>(0,s.jsx)(P,{present:a||t.open,children:(0,s.jsx)(z,{asChild:!0,container:r,children:e})}))})},"DialogPortal"),O="DialogOverlay",de=i.forwardRef(f(u(function(o,a){const n=y(O,o.__scopeDialog),{forceMount:r=n.forceMount,...t}=o,e=d(O,o.__scopeDialog);return e.modal?(0,s.jsx)(P,{present:r||e.open,children:(0,s.jsx)(ee,{...t,ref:a})}):null},"DialogOverlay2"),"DialogOverlay")),$=k("DialogOverlay.RemoveScroll"),ee=i.forwardRef(f(u(function(o,a){const{__scopeDialog:n,...r}=o,t=d(O,n),e=Z(),c=R(a,e);return(0,s.jsx)(Y,{as:$,allowPinchZoom:!0,shards:[t.contentRef],children:(0,s.jsx)(v.div,{"data-state":C(t.open),...r,ref:c,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl2"),"DialogOverlayImpl")),D="DialogContent",pe=i.forwardRef(f(u(function(o,a){const n=y(D,o.__scopeDialog),{forceMount:r=n.forceMount,...t}=o,e=d(D,o.__scopeDialog);return(0,s.jsx)(P,{present:r||e.open,children:e.modal?(0,s.jsx)(oe,{...t,ref:a}):(0,s.jsx)(te,{...t,ref:a})})},"DialogContent2"),"DialogContent")),oe=i.forwardRef(f(u(function(o,a){const n=d(D,o.__scopeDialog),r=i.useRef(null),t=R(a,n.contentRef,r);return i.useEffect(()=>{const e=r.current;if(e)return U(e)},[]),(0,s.jsx)(M,{...o,ref:t,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:p(o.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:p(o.onPointerDownOutside,e=>{const c=e.detail.originalEvent,g=c.button===0&&c.ctrlKey===!0;(c.button===2||g)&&e.preventDefault()}),onFocusOutside:p(o.onFocusOutside,e=>e.preventDefault())})},"DialogContentModal2"),"DialogContentModal")),te=i.forwardRef(f(u(function(o,a){const n=d(D,o.__scopeDialog),r=i.useRef(!1),t=i.useRef(!1);return(0,s.jsx)(M,{...o,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u(e=>{o.onCloseAutoFocus?.(e),e.defaultPrevented||(r.current||n.triggerRef.current?.focus(),e.preventDefault()),r.current=!1,t.current=!1},"onCloseAutoFocus"),onInteractOutside:u(e=>{o.onInteractOutside?.(e),e.defaultPrevented||(r.current=!0,e.detail.originalEvent.type==="pointerdown"&&(t.current=!0));const c=e.target;n.triggerRef.current?.contains(c)&&e.preventDefault(),e.detail.originalEvent.type==="focusin"&&t.current&&e.preventDefault()},"onInteractOutside")})},"DialogContentNonModal2"),"DialogContentNonModal")),M=i.forwardRef(f(u(function(o,a){const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:t,onCloseAutoFocus:e,...c}=o,g=d(D,n);return V(),(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(H,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:t,onUnmountAutoFocus:e,children:(0,s.jsx)(L,{role:"dialog",id:g.contentId,"aria-describedby":g.descriptionPresent?g.descriptionId:void 0,"aria-labelledby":g.titlePresent?g.titleId:void 0,"data-state":C(g.open),...c,ref:a,deferPointerDownOutside:!0,onDismiss:u(()=>g.onOpenChange(!1),"onDismiss")})})})},"DialogContentImpl2"),"DialogContentImpl")),ne="DialogTitle",De=i.forwardRef(f(u(function(o,a){const{__scopeDialog:n,...r}=o,t=d(ne,n),{setTitleCount:e}=t;return E(()=>(e(c=>c+1),()=>e(c=>c-1)),[e]),(0,s.jsx)(v.h2,{id:t.titleId,...r,ref:a})},"DialogTitle2"),"DialogTitle")),re="DialogDescription",ve=i.forwardRef(f(u(function(o,a){const{__scopeDialog:n,...r}=o,t=d(re,n),{setDescriptionCount:e}=t;return E(()=>(e(c=>c+1),()=>e(c=>c-1)),[e]),(0,s.jsx)(v.p,{id:t.descriptionId,...r,ref:a})},"DialogDescription2"),"DialogDescription")),ae="DialogClose",Ce=i.forwardRef(f(u(function(o,a){const{__scopeDialog:n,...r}=o,t=d(ae,n);return(0,s.jsx)(v.button,{type:"button",...r,ref:a,onClick:p(o.onClick,()=>t.onOpenChange(!1))})},"DialogClose2"),"DialogClose"));function C(l){return l?"open":"closed"}u(C,"getState");f(C,"getState");export{de as a,fe as c,ve as i,ce as l,Ce as n,ge as o,pe as r,De as s,ue as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Fe=Object.defineProperty;var p=(a,e)=>Fe(a,"name",{value:e,configurable:!0});import{i as we}from"./rolldown-runtime-ZpX3ckPj.js";import{A as E,C as Ue,D as We,E as Ce,F as Ke,Ha as Ge,L as U,M as L,O as be,S as qe,T as Ie,Ua as ze,Wa as Ye,_ as $e,b as Xe,d as Ze,h as Ne,j as Je,k as X,m as Qe,p as et,v as tt,x as ot}from"./boxes-DLOydH_J.js";import{n as nt}from"./dist-Bh1tkrMN.js";import{a as rt,i as ct}from"./dist-byHTiYvx.js";var Oe=we(ze(),1),o=we(Ye(),1),st=Object.defineProperty,lt=p((a,e)=>st(a,"name",{value:e,configurable:!0}),"__name$2");function De(a){const e=o.useRef({value:a,previous:a});return o.useMemo(()=>(e.current.value!==a&&(e.current.previous=e.current.value,e.current.value=a),e.current.previous),[a])}p(De,"usePrevious");lt(De,"usePrevious");var at=Object.defineProperty,it=p((a,e)=>at(a,"name",{value:e,configurable:!0}),"__name$1");function ge(a,[e,s]){return Math.min(s,Math.max(e,a))}p(ge,"clamp");it(ge,"clamp");var d=we(Ge(),1),dt=Object.defineProperty,v=p((a,e)=>dt(a,"name",{value:e,configurable:!0}),"__name"),ut=[" ","Enter","ArrowUp","ArrowDown"],pt=[" ","Enter"],se="Select",[fe,he,ft]=rt(se),[te,Bt]=Je(se,[ft,Ne]),Pe=Ne(),[ht,Z]=te(se),[mt,St]=te(se);function Le(a){const{__scopeSelect:e,children:s,open:t,defaultOpen:u,onOpenChange:r,value:f,defaultValue:n,onValueChange:c,dir:l,name:x,autoComplete:I,disabled:P,required:_,form:y,internal_do_not_use_render:T}=a,i=Pe(e),[g,C]=o.useState(null),[m,h]=o.useState(null),[N,O]=o.useState(!1),le=ct(l),[A,B]=be({prop:t,defaultProp:u??!1,onChange:r,caller:se}),[J,q]=be({prop:f,defaultProp:n,onChange:c,caller:se}),W=o.useRef(null),K=o.useRef(J);o.useEffect(()=>{const M=y?g?.ownerDocument.getElementById(y):g?.form;if(M instanceof HTMLFormElement){const F=v(()=>q(K.current),"reset");return M.addEventListener("reset",F),()=>M.removeEventListener("reset",F)}},[y,g,q]);const Q=g?!!y||!!g.closest("form"):!0,[G,V]=o.useState(new Set),z=Ce(),Y=Array.from(G).map(M=>M.props.value).join(";"),$=o.useCallback(M=>{V(F=>new Set(F).add(M))},[]),H=o.useCallback(M=>{V(F=>{const re=new Set(F);return re.delete(M),re})},[]),ne={required:_,trigger:g,onTriggerChange:C,valueNode:m,onValueNodeChange:h,valueNodeHasChildren:N,onValueNodeHasChildrenChange:O,contentId:z,value:J,onValueChange:q,open:A,onOpenChange:B,dir:le,triggerPointerDownPosRef:W,disabled:P,name:x,autoComplete:I,form:y,nativeOptions:G,nativeSelectKey:Y,isFormControl:Q};return(0,d.jsx)(Qe,{...i,children:(0,d.jsx)(ht,{scope:e,...ne,children:(0,d.jsx)(fe.Provider,{scope:e,children:(0,d.jsx)(mt,{scope:e,onNativeOptionAdd:$,onNativeOptionRemove:H,children:Ve(T)?T(ne):s})})})})}p(Le,"SelectProvider");v(Le,"SelectProvider");var Vt=v(a=>{const{__scopeSelect:e,children:s,...t}=a;return(0,d.jsx)(Le,{__scopeSelect:e,...t,internal_do_not_use_render:p(({isFormControl:u})=>(0,d.jsxs)(d.Fragment,{children:[s,u?(0,d.jsx)(Nt,{__scopeSelect:e}):null]}),"internal_do_not_use_render")})},"Select"),vt="SelectTrigger",Ht=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,disabled:u=!1,...r}=e,f=Pe(t),n=Z(vt,t),c=n.disabled||u,l=U(s,n.onTriggerChange),x=he(t),I=o.useRef("touch"),[P,_,y]=_e(i=>{const g=x().filter(m=>!m.disabled),C=Te(g,i,g.find(m=>m.value===n.value));C!==void 0&&n.onValueChange(C.value)}),T=v(i=>{c||(n.onOpenChange(!0),y()),i&&(n.triggerPointerDownPosRef.current={x:Math.round(i.pageX),y:Math.round(i.pageY)})},"handleOpen");return(0,d.jsx)(Ze,{asChild:!0,...f,children:(0,d.jsx)(L.button,{type:"button",role:"combobox","aria-controls":n.open?n.contentId:void 0,"aria-expanded":n.open,"aria-required":n.required,"aria-autocomplete":"none",dir:n.dir,"data-state":n.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":de(n.value)?"":void 0,...r,ref:l,onClick:E(r.onClick,i=>{i.currentTarget.focus(),I.current!=="mouse"&&T(i)}),onPointerDown:E(r.onPointerDown,i=>{I.current=i.pointerType;const g=i.target;g.hasPointerCapture(i.pointerId)&&g.releasePointerCapture(i.pointerId),i.button===0&&i.ctrlKey===!1&&i.pointerType==="mouse"&&(T(i),i.preventDefault())}),onKeyDown:E(r.onKeyDown,i=>{const g=P.current!=="";!(i.ctrlKey||i.altKey||i.metaKey)&&i.key.length===1&&_(i.key),!(g&&i.key===" ")&&ut.includes(i.key)&&(T(),i.preventDefault())})})})},"SelectTrigger2"),"SelectTrigger")),gt="SelectValue",Ft=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,className:u,style:r,children:f,placeholder:n="",...c}=e,l=Z(gt,t),{onValueNodeHasChildrenChange:x}=l,I=f!==void 0,P=U(s,l.onValueNodeChange);X(()=>{x(I)},[x,I]);const _=de(l.value);return(0,d.jsx)(L.span,{...c,asChild:_?!1:c.asChild,ref:P,style:{pointerEvents:"none"},children:(0,d.jsx)(o.Fragment,{children:_?n:f},_?"placeholder":"value")})},"SelectValue2"),"SelectValue")),Ut=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,children:u,...r}=e;return(0,d.jsx)(L.span,{"aria-hidden":!0,...r,ref:s,children:u||"▼"})},"SelectIcon2"),"SelectIcon")),[xt,wt]=te("SelectPortal",{forceMount:void 0}),Wt=v(a=>{const{__scopeSelect:e,forceMount:s,...t}=a;return(0,d.jsx)(xt,{scope:a.__scopeSelect,forceMount:s,children:(0,d.jsx)(ot,{asChild:!0,...t})})},"SelectPortal"),ee="SelectContent",Kt=o.forwardRef(v(p(function(e,s){const t=wt(ee,e.__scopeSelect),{forceMount:u=t.forceMount,...r}=e,f=Z(ee,e.__scopeSelect),[n,c]=o.useState();return X(()=>{c(new DocumentFragment)},[]),(0,d.jsx)(We,{present:u||f.open,children:p(({present:l})=>l?(0,d.jsx)(Pt,{...r,ref:s}):(0,d.jsx)(Ct,{...r,fragment:n}),"children")})},"SelectContent2"),"SelectContent")),Ct=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,children:u,fragment:r}=e;return r?Oe.createPortal((0,d.jsx)(Ae,{scope:t,children:(0,d.jsx)(fe.Slot,{scope:t,children:(0,d.jsx)("div",{ref:s,children:u})})}),r):null},"SelectContentFragment2"),"SelectContentFragment")),k=10,[Ae,oe]=te(ee),It=Ke("SelectContent.RemoveScroll"),Pt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t}=e,{position:u="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:f,onPointerDownOutside:n,side:c,sideOffset:l,align:x,alignOffset:I,arrowPadding:P,collisionBoundary:_,collisionPadding:y,sticky:T,hideWhenDetached:i,avoidCollisions:g,...C}=e,m=Z(ee,t),[h,N]=o.useState(null),[O,le]=o.useState(null),A=U(s,N),[B,J]=o.useState(null),[q,W]=o.useState(null),K=he(t),[Q,G]=o.useState(!1),V=o.useRef(!1);o.useEffect(()=>{if(h)return $e(h)},[h]),Xe();const z=o.useCallback(S=>{const[R,...b]=K().map(D=>D.ref.current),[w]=b.slice(-1),j=document.activeElement;for(const D of S)if(D===j||(D?.scrollIntoView({block:"nearest"}),D===R&&O&&(O.scrollTop=0),D===w&&O&&(O.scrollTop=O.scrollHeight),D?.focus(),document.activeElement!==j))return},[K,O]),Y=o.useCallback(()=>z([B,h]),[z,B,h]);o.useEffect(()=>{Q&&Y()},[Q,Y]);const{onOpenChange:$,triggerPointerDownPosRef:H}=m;o.useEffect(()=>{if(h){let S={x:0,y:0};const R=v(w=>{S={x:Math.abs(Math.round(w.pageX)-(H.current?.x??0)),y:Math.abs(Math.round(w.pageY)-(H.current?.y??0))}},"handlePointerMove"),b=v(w=>{S.x<=10&&S.y<=10?w.preventDefault():w.composedPath().includes(h)||$(!1),document.removeEventListener("pointermove",R),H.current=null},"handlePointerUp");return H.current!==null&&(document.addEventListener("pointermove",R),document.addEventListener("pointerup",b,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",b,{capture:!0})}}},[h,$,H]),o.useEffect(()=>{const S=v(()=>$(!1),"close");return window.addEventListener("blur",S),window.addEventListener("resize",S),()=>{window.removeEventListener("blur",S),window.removeEventListener("resize",S)}},[$]);const[ne,M]=_e(S=>{const R=K().filter(w=>!w.disabled),b=Te(R,S,R.find(w=>w.ref.current===document.activeElement));b&&setTimeout(()=>b.ref.current?.focus())}),F=o.useCallback((S,R,b)=>{const w=!V.current&&!b;(m.value!==void 0&&m.value===R||w)&&(J(S),w&&(V.current=!0))},[m.value]),re=o.useCallback(()=>h?.focus(),[h]),ce=o.useCallback((S,R,b)=>{const w=!V.current&&!b;(m.value!==void 0&&m.value===R||w)&&W(S)},[m.value]),ue=u==="popper"?Re:yt,ae=ue===Re?{side:c,sideOffset:l,align:x,alignOffset:I,arrowPadding:P,collisionBoundary:_,collisionPadding:y,sticky:T,hideWhenDetached:i,avoidCollisions:g}:{};return(0,d.jsx)(Ae,{scope:t,content:h,viewport:O,onViewportChange:le,itemRefCallback:F,selectedItem:B,onItemLeave:re,itemTextRefCallback:ce,focusSelectedItem:Y,selectedItemText:q,position:u,isPositioned:Q,searchRef:ne,children:(0,d.jsx)(tt,{as:It,allowPinchZoom:!0,children:(0,d.jsx)(qe,{asChild:!0,trapped:m.open,onMountAutoFocus:p(S=>{S.preventDefault()},"onMountAutoFocus"),onUnmountAutoFocus:E(r,S=>{m.trigger?.focus({preventScroll:!0}),S.preventDefault()}),children:(0,d.jsx)(Ue,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:n,onFocusOutside:p(S=>S.preventDefault(),"onFocusOutside"),onDismiss:p(()=>m.onOpenChange(!1),"onDismiss"),children:(0,d.jsx)(ue,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:p(S=>S.preventDefault(),"onContextMenu"),...C,...ae,onPlaced:p(()=>G(!0),"onPlaced"),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:E(C.onKeyDown,S=>{const R=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!R&&S.key.length===1&&M(S.key),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let b=K().filter(w=>!w.disabled).map(w=>w.ref.current);if(["ArrowUp","End"].includes(S.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const w=S.target,j=b.indexOf(w);b=b.slice(j+1)}setTimeout(()=>z(b)),S.preventDefault()}})})})})})})},"SelectContentImpl2"),"SelectContentImpl")),yt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,onPlaced:u,...r}=e,f=Z(ee,t),n=oe(ee,t),[c,l]=o.useState(null),[x,I]=o.useState(null),P=U(s,I),_=he(t),y=o.useRef(!1),T=o.useRef(!0),{viewport:i,selectedItem:g,selectedItemText:C,focusSelectedItem:m}=n,h=o.useCallback(()=>{if(f.trigger&&f.valueNode&&c&&x&&i&&g&&C){const A=f.trigger.getBoundingClientRect(),B=x.getBoundingClientRect(),J=f.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(f.dir!=="rtl"){const w=q.left-B.left,j=J.left-w,D=A.left-j,ie=A.width+D,me=Math.max(ie,B.width),Se=window.innerWidth-k,ve=ge(j,[k,Math.max(k,Se-me)]);c.style.minWidth=ie+"px",c.style.left=ve+"px"}else{const w=B.right-q.right,j=window.innerWidth-J.right-w,D=window.innerWidth-A.right-j,ie=A.width+D,me=Math.max(ie,B.width),Se=window.innerWidth-k,ve=ge(j,[k,Math.max(k,Se-me)]);c.style.minWidth=ie+"px",c.style.right=ve+"px"}const W=_(),K=window.innerHeight-k*2,Q=i.scrollHeight,G=window.getComputedStyle(x),V=parseInt(G.borderTopWidth,10),z=parseInt(G.paddingTop,10),Y=parseInt(G.borderBottomWidth,10),$=parseInt(G.paddingBottom,10),H=V+z+Q+$+Y,ne=Math.min(g.offsetHeight*5,H),M=window.getComputedStyle(i),F=parseInt(M.paddingTop,10),re=parseInt(M.paddingBottom,10),ce=A.top+A.height/2-k,ue=K-ce,ae=g.offsetHeight/2,S=g.offsetTop+ae,R=V+z+S,b=H-R;if(R<=ce){const w=W.length>0&&g===W[W.length-1].ref.current;c.style.bottom="0px";const j=x.clientHeight-i.offsetTop-i.offsetHeight,D=R+Math.max(ue,ae+(w?re:0)+j+Y);c.style.height=D+"px"}else{const w=W.length>0&&g===W[0].ref.current;c.style.top="0px";const j=Math.max(ce,V+i.offsetTop+(w?F:0)+ae)+b;c.style.height=j+"px",i.scrollTop=R-ce+i.offsetTop}c.style.margin=`${k}px 0`,c.style.minHeight=ne+"px",c.style.maxHeight=K+"px",u?.(),requestAnimationFrame(()=>y.current=!0)}},[_,f.trigger,f.valueNode,c,x,i,g,C,f.dir,u]);X(()=>h(),[h]);const[N,O]=o.useState();X(()=>{x&&O(window.getComputedStyle(x).zIndex)},[x]);const le=o.useCallback(A=>{A&&T.current===!0&&(h(),m?.(),T.current=!1)},[h,m]);return(0,d.jsx)(_t,{scope:t,contentWrapper:c,shouldExpandOnScrollRef:y,onScrollButtonChange:le,children:(0,d.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:(0,d.jsx)(L.div,{...r,ref:P,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})},"SelectItemAlignedPosition2"),"SelectItemAlignedPosition")),Re=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,align:u="start",collisionPadding:r=k,...f}=e,n=Pe(t);return(0,d.jsx)(et,{...n,...f,ref:s,align:u,collisionPadding:r,style:{boxSizing:"border-box",...f.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition2"),"SelectPopperPosition")),[_t,ye]=te(ee,{}),Ee="SelectViewport",Gt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,nonce:u,...r}=e,f=oe(Ee,t),n=ye(Ee,t),c=U(s,f.onViewportChange),l=o.useRef(0);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:u}),(0,d.jsx)(fe.Slot,{scope:t,children:(0,d.jsx)(L.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:E(r.onScroll,x=>{const I=x.currentTarget,{contentWrapper:P,shouldExpandOnScrollRef:_}=n;if(_?.current&&P){const y=Math.abs(l.current-I.scrollTop);if(y>0){const T=window.innerHeight-k*2,i=parseFloat(P.style.minHeight),g=parseFloat(P.style.height),C=Math.max(i,g);if(C<T){const m=C+y,h=Math.min(T,m),N=m-h;P.style.height=h+"px",P.style.bottom==="0px"&&(I.scrollTop=N>0?N:0,P.style.justifyContent="flex-end")}}}l.current=I.scrollTop})})})]})},"SelectViewport2"),"SelectViewport")),[Tt,bt]=te("SelectGroup"),qt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,...u}=e,r=Ce();return(0,d.jsx)(Tt,{scope:t,id:r,children:(0,d.jsx)(L.div,{role:"group","aria-labelledby":r,...u,ref:s})})},"SelectGroup2"),"SelectGroup")),Rt="SelectLabel",zt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,...u}=e,r=bt(Rt,t);return(0,d.jsx)(L.div,{id:r.id,...u,ref:s})},"SelectLabel2"),"SelectLabel")),xe="SelectItem",[Et,ke]=te(xe),Yt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,value:u,disabled:r=!1,textValue:f,...n}=e,c=Z(xe,t),l=oe(xe,t),x=c.value===u,[I,P]=o.useState(f??""),[_,y]=o.useState(!1),T=Ie(h=>l.itemRefCallback?.(h,u,r)),i=U(s,T),g=Ce(),C=o.useRef("touch"),m=v(()=>{r||(c.onValueChange(u),c.onOpenChange(!1))},"handleSelect");return(0,d.jsx)(Et,{scope:t,value:u,disabled:r,textId:g,isSelected:x,onItemTextChange:o.useCallback(h=>{P(N=>N||(h?.textContent??"").trim())},[]),children:(0,d.jsx)(fe.ItemSlot,{scope:t,value:u,disabled:r,textValue:I,children:(0,d.jsx)(L.div,{role:"option","aria-labelledby":g,"data-highlighted":_?"":void 0,"aria-selected":x&&_,"data-state":x?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...n,ref:i,onFocus:E(n.onFocus,()=>y(!0)),onBlur:E(n.onBlur,()=>y(!1)),onClick:E(n.onClick,()=>{C.current!=="mouse"&&m()}),onPointerUp:E(n.onPointerUp,()=>{C.current==="mouse"&&m()}),onPointerDown:E(n.onPointerDown,h=>{C.current=h.pointerType}),onPointerMove:E(n.onPointerMove,h=>{C.current=h.pointerType,r?l.onItemLeave?.():C.current==="mouse"&&h.currentTarget.focus({preventScroll:!0})}),onPointerLeave:E(n.onPointerLeave,h=>{h.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:E(n.onKeyDown,h=>{r||h.target!==h.currentTarget||l.searchRef?.current!==""&&h.key===" "||(pt.includes(h.key)&&m(),h.key===" "&&h.preventDefault())})})})})},"SelectItem2"),"SelectItem")),pe="SelectItemText",$t=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,className:u,style:r,...f}=e,n=Z(pe,t),c=oe(pe,t),l=ke(pe,t),x=St(pe,t),[I,P]=o.useState(null),_=Ie(m=>c.itemTextRefCallback?.(m,l.value,l.disabled)),y=U(s,P,l.onItemTextChange,_),T=I?.textContent,i=o.useMemo(()=>(0,d.jsx)("option",{value:l.value,disabled:l.disabled,children:T},l.value),[l.disabled,l.value,T]),{onNativeOptionAdd:g,onNativeOptionRemove:C}=x;return X(()=>(g(i),()=>C(i)),[g,C,i]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(L.span,{id:l.textId,...f,ref:y}),l.isSelected&&n.valueNode&&!n.valueNodeHasChildren&&!de(n.value)?Oe.createPortal(f.children,n.valueNode):null]})},"SelectItemText2"),"SelectItemText")),Mt="SelectItemIndicator",Xt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,...u}=e;return ke(Mt,t).isSelected?(0,d.jsx)(L.span,{"aria-hidden":!0,...u,ref:s}):null},"SelectItemIndicator2"),"SelectItemIndicator")),Me="SelectScrollUpButton",Zt=o.forwardRef(v(p(function(e,s){const t=oe(Me,e.__scopeSelect),u=ye(Me,e.__scopeSelect),[r,f]=o.useState(!1),n=U(s,u.onScrollButtonChange);return X(()=>{if(t.viewport&&t.isPositioned){let c=p(function(){const x=l.scrollTop>0;f(x)},"handleScroll2");v(c,"handleScroll");const l=t.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),r?(0,d.jsx)(Be,{...e,ref:n,onAutoScroll:p(()=>{const{viewport:c,selectedItem:l}=t;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)},"onAutoScroll")}):null},"SelectScrollUpButton2"),"SelectScrollUpButton")),je="SelectScrollDownButton",Jt=o.forwardRef(v(p(function(e,s){const t=oe(je,e.__scopeSelect),u=ye(je,e.__scopeSelect),[r,f]=o.useState(!1),n=U(s,u.onScrollButtonChange);return X(()=>{if(t.viewport&&t.isPositioned){let c=p(function(){const x=l.scrollHeight-l.clientHeight,I=Math.ceil(l.scrollTop)<x;f(I)},"handleScroll2");v(c,"handleScroll");const l=t.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),r?(0,d.jsx)(Be,{...e,ref:n,onAutoScroll:p(()=>{const{viewport:c,selectedItem:l}=t;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)},"onAutoScroll")}):null},"SelectScrollDownButton2"),"SelectScrollDownButton")),Be=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,onAutoScroll:u,...r}=e,f=oe("SelectScrollButton",t),n=o.useRef(null),c=he(t),l=o.useCallback(()=>{n.current!==null&&(window.clearInterval(n.current),n.current=null)},[]);return o.useEffect(()=>()=>l(),[l]),X(()=>{c().find(x=>x.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),(0,d.jsx)(L.div,{"aria-hidden":!0,...r,ref:s,style:{flexShrink:0,...r.style},onPointerDown:E(r.onPointerDown,()=>{n.current===null&&(n.current=window.setInterval(u,50))}),onPointerMove:E(r.onPointerMove,()=>{f.onItemLeave?.(),n.current===null&&(n.current=window.setInterval(u,50))}),onPointerLeave:E(r.onPointerLeave,()=>{l()})})},"SelectScrollButtonImpl2"),"SelectScrollButtonImpl")),Qt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,...u}=e;return(0,d.jsx)(L.div,{"aria-hidden":!0,...u,ref:s})},"SelectSeparator2"),"SelectSeparator")),jt="SelectBubbleInput",Nt=o.forwardRef(v(p(function({__scopeSelect:e,...s},t){const u=Z(jt,e),{value:r,onValueChange:f,required:n,disabled:c,name:l,autoComplete:x,form:I}=u,{nativeOptions:P,nativeSelectKey:_}=u,y=o.useRef(null),T=U(t,y),i=r??"",g=De(i),C=Array.from(P).some(m=>(m.props.value??"")==="");return o.useEffect(()=>{const m=y.current;if(!m)return;const h=window.HTMLSelectElement.prototype,N=Object.getOwnPropertyDescriptor(h,"value").set;if(g!==i&&N){const O=new Event("change",{bubbles:!0});N.call(m,i),m.dispatchEvent(O)}},[g,i]),(0,d.jsxs)(L.select,{"aria-hidden":!0,required:n,tabIndex:-1,name:l,autoComplete:x,disabled:c,form:I,onChange:p(m=>f(m.target.value),"onChange"),...s,style:{...nt,...s.style},ref:T,defaultValue:i,children:[de(r)&&!C?(0,d.jsx)("option",{value:""}):null,Array.from(P)]},_)},"SelectBubbleInput2"),"SelectBubbleInput"));function Ve(a){return typeof a=="function"}p(Ve,"isFunction");v(Ve,"isFunction");function de(a){return a===""||a===void 0}p(de,"shouldShowPlaceholder");v(de,"shouldShowPlaceholder");function _e(a){const e=Ie(a),s=o.useRef(""),t=o.useRef(0),u=o.useCallback(f=>{const n=s.current+f;e(n),v(p((function c(l){s.current=l,window.clearTimeout(t.current),l!==""&&(t.current=window.setTimeout(()=>c(""),1e3))}),"updateSearch"),"updateSearch")(n)},[e]),r=o.useCallback(()=>{s.current="",window.clearTimeout(t.current)},[]);return o.useEffect(()=>()=>window.clearTimeout(t.current),[]),[s,u,r]}p(_e,"useTypeaheadSearch");v(_e,"useTypeaheadSearch");function Te(a,e,s){const t=e.length>1&&Array.from(e).every(n=>n===e[0])?e[0]:e,u=s?a.indexOf(s):-1;let r=He(a,Math.max(u,0));t.length===1&&(r=r.filter(n=>n!==s));const f=r.find(n=>n.textValue.toLowerCase().startsWith(t.toLowerCase()));return f!==s?f:void 0}p(Te,"findNextItem");v(Te,"findNextItem");function He(a,e){return a.map((s,t)=>a[(e+t)%a.length])}p(He,"wrapArray");v(He,"wrapArray");export{Yt as a,zt as c,Zt as d,Qt as f,ge as g,Gt as h,Ut as i,Wt as l,Ft as m,Kt as n,Xt as o,Ht as p,qt as r,$t as s,Vt as t,Jt as u};
|
|
1
|
+
var Fe=Object.defineProperty;var p=(a,e)=>Fe(a,"name",{value:e,configurable:!0});import{i as we}from"./rolldown-runtime-ZpX3ckPj.js";import{A as E,C as Ue,D as We,E as Ce,F as Ke,Ha as Ge,L as U,M as L,O as be,S as qe,T as Ie,Ua as ze,Wa as Ye,_ as $e,b as Xe,d as Ze,h as Ne,j as Je,k as X,m as Qe,p as et,v as tt,x as ot}from"./boxes-CwMr8JCg.js";import{n as nt}from"./dist-DRcvUxQj.js";import{a as rt,i as ct}from"./dist-C8lGa9JE.js";var Oe=we(ze(),1),o=we(Ye(),1),st=Object.defineProperty,lt=p((a,e)=>st(a,"name",{value:e,configurable:!0}),"__name$2");function De(a){const e=o.useRef({value:a,previous:a});return o.useMemo(()=>(e.current.value!==a&&(e.current.previous=e.current.value,e.current.value=a),e.current.previous),[a])}p(De,"usePrevious");lt(De,"usePrevious");var at=Object.defineProperty,it=p((a,e)=>at(a,"name",{value:e,configurable:!0}),"__name$1");function ge(a,[e,s]){return Math.min(s,Math.max(e,a))}p(ge,"clamp");it(ge,"clamp");var d=we(Ge(),1),dt=Object.defineProperty,v=p((a,e)=>dt(a,"name",{value:e,configurable:!0}),"__name"),ut=[" ","Enter","ArrowUp","ArrowDown"],pt=[" ","Enter"],se="Select",[fe,he,ft]=rt(se),[te,Bt]=Je(se,[ft,Ne]),Pe=Ne(),[ht,Z]=te(se),[mt,St]=te(se);function Le(a){const{__scopeSelect:e,children:s,open:t,defaultOpen:u,onOpenChange:r,value:f,defaultValue:n,onValueChange:c,dir:l,name:x,autoComplete:I,disabled:P,required:_,form:y,internal_do_not_use_render:T}=a,i=Pe(e),[g,C]=o.useState(null),[m,h]=o.useState(null),[N,O]=o.useState(!1),le=ct(l),[A,B]=be({prop:t,defaultProp:u??!1,onChange:r,caller:se}),[J,q]=be({prop:f,defaultProp:n,onChange:c,caller:se}),W=o.useRef(null),K=o.useRef(J);o.useEffect(()=>{const M=y?g?.ownerDocument.getElementById(y):g?.form;if(M instanceof HTMLFormElement){const F=v(()=>q(K.current),"reset");return M.addEventListener("reset",F),()=>M.removeEventListener("reset",F)}},[y,g,q]);const Q=g?!!y||!!g.closest("form"):!0,[G,V]=o.useState(new Set),z=Ce(),Y=Array.from(G).map(M=>M.props.value).join(";"),$=o.useCallback(M=>{V(F=>new Set(F).add(M))},[]),H=o.useCallback(M=>{V(F=>{const re=new Set(F);return re.delete(M),re})},[]),ne={required:_,trigger:g,onTriggerChange:C,valueNode:m,onValueNodeChange:h,valueNodeHasChildren:N,onValueNodeHasChildrenChange:O,contentId:z,value:J,onValueChange:q,open:A,onOpenChange:B,dir:le,triggerPointerDownPosRef:W,disabled:P,name:x,autoComplete:I,form:y,nativeOptions:G,nativeSelectKey:Y,isFormControl:Q};return(0,d.jsx)(Qe,{...i,children:(0,d.jsx)(ht,{scope:e,...ne,children:(0,d.jsx)(fe.Provider,{scope:e,children:(0,d.jsx)(mt,{scope:e,onNativeOptionAdd:$,onNativeOptionRemove:H,children:Ve(T)?T(ne):s})})})})}p(Le,"SelectProvider");v(Le,"SelectProvider");var Vt=v(a=>{const{__scopeSelect:e,children:s,...t}=a;return(0,d.jsx)(Le,{__scopeSelect:e,...t,internal_do_not_use_render:p(({isFormControl:u})=>(0,d.jsxs)(d.Fragment,{children:[s,u?(0,d.jsx)(Nt,{__scopeSelect:e}):null]}),"internal_do_not_use_render")})},"Select"),vt="SelectTrigger",Ht=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,disabled:u=!1,...r}=e,f=Pe(t),n=Z(vt,t),c=n.disabled||u,l=U(s,n.onTriggerChange),x=he(t),I=o.useRef("touch"),[P,_,y]=_e(i=>{const g=x().filter(m=>!m.disabled),C=Te(g,i,g.find(m=>m.value===n.value));C!==void 0&&n.onValueChange(C.value)}),T=v(i=>{c||(n.onOpenChange(!0),y()),i&&(n.triggerPointerDownPosRef.current={x:Math.round(i.pageX),y:Math.round(i.pageY)})},"handleOpen");return(0,d.jsx)(Ze,{asChild:!0,...f,children:(0,d.jsx)(L.button,{type:"button",role:"combobox","aria-controls":n.open?n.contentId:void 0,"aria-expanded":n.open,"aria-required":n.required,"aria-autocomplete":"none",dir:n.dir,"data-state":n.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":de(n.value)?"":void 0,...r,ref:l,onClick:E(r.onClick,i=>{i.currentTarget.focus(),I.current!=="mouse"&&T(i)}),onPointerDown:E(r.onPointerDown,i=>{I.current=i.pointerType;const g=i.target;g.hasPointerCapture(i.pointerId)&&g.releasePointerCapture(i.pointerId),i.button===0&&i.ctrlKey===!1&&i.pointerType==="mouse"&&(T(i),i.preventDefault())}),onKeyDown:E(r.onKeyDown,i=>{const g=P.current!=="";!(i.ctrlKey||i.altKey||i.metaKey)&&i.key.length===1&&_(i.key),!(g&&i.key===" ")&&ut.includes(i.key)&&(T(),i.preventDefault())})})})},"SelectTrigger2"),"SelectTrigger")),gt="SelectValue",Ft=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,className:u,style:r,children:f,placeholder:n="",...c}=e,l=Z(gt,t),{onValueNodeHasChildrenChange:x}=l,I=f!==void 0,P=U(s,l.onValueNodeChange);X(()=>{x(I)},[x,I]);const _=de(l.value);return(0,d.jsx)(L.span,{...c,asChild:_?!1:c.asChild,ref:P,style:{pointerEvents:"none"},children:(0,d.jsx)(o.Fragment,{children:_?n:f},_?"placeholder":"value")})},"SelectValue2"),"SelectValue")),Ut=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,children:u,...r}=e;return(0,d.jsx)(L.span,{"aria-hidden":!0,...r,ref:s,children:u||"▼"})},"SelectIcon2"),"SelectIcon")),[xt,wt]=te("SelectPortal",{forceMount:void 0}),Wt=v(a=>{const{__scopeSelect:e,forceMount:s,...t}=a;return(0,d.jsx)(xt,{scope:a.__scopeSelect,forceMount:s,children:(0,d.jsx)(ot,{asChild:!0,...t})})},"SelectPortal"),ee="SelectContent",Kt=o.forwardRef(v(p(function(e,s){const t=wt(ee,e.__scopeSelect),{forceMount:u=t.forceMount,...r}=e,f=Z(ee,e.__scopeSelect),[n,c]=o.useState();return X(()=>{c(new DocumentFragment)},[]),(0,d.jsx)(We,{present:u||f.open,children:p(({present:l})=>l?(0,d.jsx)(Pt,{...r,ref:s}):(0,d.jsx)(Ct,{...r,fragment:n}),"children")})},"SelectContent2"),"SelectContent")),Ct=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,children:u,fragment:r}=e;return r?Oe.createPortal((0,d.jsx)(Ae,{scope:t,children:(0,d.jsx)(fe.Slot,{scope:t,children:(0,d.jsx)("div",{ref:s,children:u})})}),r):null},"SelectContentFragment2"),"SelectContentFragment")),k=10,[Ae,oe]=te(ee),It=Ke("SelectContent.RemoveScroll"),Pt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t}=e,{position:u="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:f,onPointerDownOutside:n,side:c,sideOffset:l,align:x,alignOffset:I,arrowPadding:P,collisionBoundary:_,collisionPadding:y,sticky:T,hideWhenDetached:i,avoidCollisions:g,...C}=e,m=Z(ee,t),[h,N]=o.useState(null),[O,le]=o.useState(null),A=U(s,N),[B,J]=o.useState(null),[q,W]=o.useState(null),K=he(t),[Q,G]=o.useState(!1),V=o.useRef(!1);o.useEffect(()=>{if(h)return $e(h)},[h]),Xe();const z=o.useCallback(S=>{const[R,...b]=K().map(D=>D.ref.current),[w]=b.slice(-1),j=document.activeElement;for(const D of S)if(D===j||(D?.scrollIntoView({block:"nearest"}),D===R&&O&&(O.scrollTop=0),D===w&&O&&(O.scrollTop=O.scrollHeight),D?.focus(),document.activeElement!==j))return},[K,O]),Y=o.useCallback(()=>z([B,h]),[z,B,h]);o.useEffect(()=>{Q&&Y()},[Q,Y]);const{onOpenChange:$,triggerPointerDownPosRef:H}=m;o.useEffect(()=>{if(h){let S={x:0,y:0};const R=v(w=>{S={x:Math.abs(Math.round(w.pageX)-(H.current?.x??0)),y:Math.abs(Math.round(w.pageY)-(H.current?.y??0))}},"handlePointerMove"),b=v(w=>{S.x<=10&&S.y<=10?w.preventDefault():w.composedPath().includes(h)||$(!1),document.removeEventListener("pointermove",R),H.current=null},"handlePointerUp");return H.current!==null&&(document.addEventListener("pointermove",R),document.addEventListener("pointerup",b,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",b,{capture:!0})}}},[h,$,H]),o.useEffect(()=>{const S=v(()=>$(!1),"close");return window.addEventListener("blur",S),window.addEventListener("resize",S),()=>{window.removeEventListener("blur",S),window.removeEventListener("resize",S)}},[$]);const[ne,M]=_e(S=>{const R=K().filter(w=>!w.disabled),b=Te(R,S,R.find(w=>w.ref.current===document.activeElement));b&&setTimeout(()=>b.ref.current?.focus())}),F=o.useCallback((S,R,b)=>{const w=!V.current&&!b;(m.value!==void 0&&m.value===R||w)&&(J(S),w&&(V.current=!0))},[m.value]),re=o.useCallback(()=>h?.focus(),[h]),ce=o.useCallback((S,R,b)=>{const w=!V.current&&!b;(m.value!==void 0&&m.value===R||w)&&W(S)},[m.value]),ue=u==="popper"?Re:yt,ae=ue===Re?{side:c,sideOffset:l,align:x,alignOffset:I,arrowPadding:P,collisionBoundary:_,collisionPadding:y,sticky:T,hideWhenDetached:i,avoidCollisions:g}:{};return(0,d.jsx)(Ae,{scope:t,content:h,viewport:O,onViewportChange:le,itemRefCallback:F,selectedItem:B,onItemLeave:re,itemTextRefCallback:ce,focusSelectedItem:Y,selectedItemText:q,position:u,isPositioned:Q,searchRef:ne,children:(0,d.jsx)(tt,{as:It,allowPinchZoom:!0,children:(0,d.jsx)(qe,{asChild:!0,trapped:m.open,onMountAutoFocus:p(S=>{S.preventDefault()},"onMountAutoFocus"),onUnmountAutoFocus:E(r,S=>{m.trigger?.focus({preventScroll:!0}),S.preventDefault()}),children:(0,d.jsx)(Ue,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:n,onFocusOutside:p(S=>S.preventDefault(),"onFocusOutside"),onDismiss:p(()=>m.onOpenChange(!1),"onDismiss"),children:(0,d.jsx)(ue,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:p(S=>S.preventDefault(),"onContextMenu"),...C,...ae,onPlaced:p(()=>G(!0),"onPlaced"),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:E(C.onKeyDown,S=>{const R=S.ctrlKey||S.altKey||S.metaKey;if(S.key==="Tab"&&S.preventDefault(),!R&&S.key.length===1&&M(S.key),["ArrowUp","ArrowDown","Home","End"].includes(S.key)){let b=K().filter(w=>!w.disabled).map(w=>w.ref.current);if(["ArrowUp","End"].includes(S.key)&&(b=b.slice().reverse()),["ArrowUp","ArrowDown"].includes(S.key)){const w=S.target,j=b.indexOf(w);b=b.slice(j+1)}setTimeout(()=>z(b)),S.preventDefault()}})})})})})})},"SelectContentImpl2"),"SelectContentImpl")),yt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,onPlaced:u,...r}=e,f=Z(ee,t),n=oe(ee,t),[c,l]=o.useState(null),[x,I]=o.useState(null),P=U(s,I),_=he(t),y=o.useRef(!1),T=o.useRef(!0),{viewport:i,selectedItem:g,selectedItemText:C,focusSelectedItem:m}=n,h=o.useCallback(()=>{if(f.trigger&&f.valueNode&&c&&x&&i&&g&&C){const A=f.trigger.getBoundingClientRect(),B=x.getBoundingClientRect(),J=f.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(f.dir!=="rtl"){const w=q.left-B.left,j=J.left-w,D=A.left-j,ie=A.width+D,me=Math.max(ie,B.width),Se=window.innerWidth-k,ve=ge(j,[k,Math.max(k,Se-me)]);c.style.minWidth=ie+"px",c.style.left=ve+"px"}else{const w=B.right-q.right,j=window.innerWidth-J.right-w,D=window.innerWidth-A.right-j,ie=A.width+D,me=Math.max(ie,B.width),Se=window.innerWidth-k,ve=ge(j,[k,Math.max(k,Se-me)]);c.style.minWidth=ie+"px",c.style.right=ve+"px"}const W=_(),K=window.innerHeight-k*2,Q=i.scrollHeight,G=window.getComputedStyle(x),V=parseInt(G.borderTopWidth,10),z=parseInt(G.paddingTop,10),Y=parseInt(G.borderBottomWidth,10),$=parseInt(G.paddingBottom,10),H=V+z+Q+$+Y,ne=Math.min(g.offsetHeight*5,H),M=window.getComputedStyle(i),F=parseInt(M.paddingTop,10),re=parseInt(M.paddingBottom,10),ce=A.top+A.height/2-k,ue=K-ce,ae=g.offsetHeight/2,S=g.offsetTop+ae,R=V+z+S,b=H-R;if(R<=ce){const w=W.length>0&&g===W[W.length-1].ref.current;c.style.bottom="0px";const j=x.clientHeight-i.offsetTop-i.offsetHeight,D=R+Math.max(ue,ae+(w?re:0)+j+Y);c.style.height=D+"px"}else{const w=W.length>0&&g===W[0].ref.current;c.style.top="0px";const j=Math.max(ce,V+i.offsetTop+(w?F:0)+ae)+b;c.style.height=j+"px",i.scrollTop=R-ce+i.offsetTop}c.style.margin=`${k}px 0`,c.style.minHeight=ne+"px",c.style.maxHeight=K+"px",u?.(),requestAnimationFrame(()=>y.current=!0)}},[_,f.trigger,f.valueNode,c,x,i,g,C,f.dir,u]);X(()=>h(),[h]);const[N,O]=o.useState();X(()=>{x&&O(window.getComputedStyle(x).zIndex)},[x]);const le=o.useCallback(A=>{A&&T.current===!0&&(h(),m?.(),T.current=!1)},[h,m]);return(0,d.jsx)(_t,{scope:t,contentWrapper:c,shouldExpandOnScrollRef:y,onScrollButtonChange:le,children:(0,d.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:(0,d.jsx)(L.div,{...r,ref:P,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})},"SelectItemAlignedPosition2"),"SelectItemAlignedPosition")),Re=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,align:u="start",collisionPadding:r=k,...f}=e,n=Pe(t);return(0,d.jsx)(et,{...n,...f,ref:s,align:u,collisionPadding:r,style:{boxSizing:"border-box",...f.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition2"),"SelectPopperPosition")),[_t,ye]=te(ee,{}),Ee="SelectViewport",Gt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,nonce:u,...r}=e,f=oe(Ee,t),n=ye(Ee,t),c=U(s,f.onViewportChange),l=o.useRef(0);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:u}),(0,d.jsx)(fe.Slot,{scope:t,children:(0,d.jsx)(L.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:E(r.onScroll,x=>{const I=x.currentTarget,{contentWrapper:P,shouldExpandOnScrollRef:_}=n;if(_?.current&&P){const y=Math.abs(l.current-I.scrollTop);if(y>0){const T=window.innerHeight-k*2,i=parseFloat(P.style.minHeight),g=parseFloat(P.style.height),C=Math.max(i,g);if(C<T){const m=C+y,h=Math.min(T,m),N=m-h;P.style.height=h+"px",P.style.bottom==="0px"&&(I.scrollTop=N>0?N:0,P.style.justifyContent="flex-end")}}}l.current=I.scrollTop})})})]})},"SelectViewport2"),"SelectViewport")),[Tt,bt]=te("SelectGroup"),qt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,...u}=e,r=Ce();return(0,d.jsx)(Tt,{scope:t,id:r,children:(0,d.jsx)(L.div,{role:"group","aria-labelledby":r,...u,ref:s})})},"SelectGroup2"),"SelectGroup")),Rt="SelectLabel",zt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,...u}=e,r=bt(Rt,t);return(0,d.jsx)(L.div,{id:r.id,...u,ref:s})},"SelectLabel2"),"SelectLabel")),xe="SelectItem",[Et,ke]=te(xe),Yt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,value:u,disabled:r=!1,textValue:f,...n}=e,c=Z(xe,t),l=oe(xe,t),x=c.value===u,[I,P]=o.useState(f??""),[_,y]=o.useState(!1),T=Ie(h=>l.itemRefCallback?.(h,u,r)),i=U(s,T),g=Ce(),C=o.useRef("touch"),m=v(()=>{r||(c.onValueChange(u),c.onOpenChange(!1))},"handleSelect");return(0,d.jsx)(Et,{scope:t,value:u,disabled:r,textId:g,isSelected:x,onItemTextChange:o.useCallback(h=>{P(N=>N||(h?.textContent??"").trim())},[]),children:(0,d.jsx)(fe.ItemSlot,{scope:t,value:u,disabled:r,textValue:I,children:(0,d.jsx)(L.div,{role:"option","aria-labelledby":g,"data-highlighted":_?"":void 0,"aria-selected":x&&_,"data-state":x?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...n,ref:i,onFocus:E(n.onFocus,()=>y(!0)),onBlur:E(n.onBlur,()=>y(!1)),onClick:E(n.onClick,()=>{C.current!=="mouse"&&m()}),onPointerUp:E(n.onPointerUp,()=>{C.current==="mouse"&&m()}),onPointerDown:E(n.onPointerDown,h=>{C.current=h.pointerType}),onPointerMove:E(n.onPointerMove,h=>{C.current=h.pointerType,r?l.onItemLeave?.():C.current==="mouse"&&h.currentTarget.focus({preventScroll:!0})}),onPointerLeave:E(n.onPointerLeave,h=>{h.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:E(n.onKeyDown,h=>{r||h.target!==h.currentTarget||l.searchRef?.current!==""&&h.key===" "||(pt.includes(h.key)&&m(),h.key===" "&&h.preventDefault())})})})})},"SelectItem2"),"SelectItem")),pe="SelectItemText",$t=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,className:u,style:r,...f}=e,n=Z(pe,t),c=oe(pe,t),l=ke(pe,t),x=St(pe,t),[I,P]=o.useState(null),_=Ie(m=>c.itemTextRefCallback?.(m,l.value,l.disabled)),y=U(s,P,l.onItemTextChange,_),T=I?.textContent,i=o.useMemo(()=>(0,d.jsx)("option",{value:l.value,disabled:l.disabled,children:T},l.value),[l.disabled,l.value,T]),{onNativeOptionAdd:g,onNativeOptionRemove:C}=x;return X(()=>(g(i),()=>C(i)),[g,C,i]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(L.span,{id:l.textId,...f,ref:y}),l.isSelected&&n.valueNode&&!n.valueNodeHasChildren&&!de(n.value)?Oe.createPortal(f.children,n.valueNode):null]})},"SelectItemText2"),"SelectItemText")),Mt="SelectItemIndicator",Xt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,...u}=e;return ke(Mt,t).isSelected?(0,d.jsx)(L.span,{"aria-hidden":!0,...u,ref:s}):null},"SelectItemIndicator2"),"SelectItemIndicator")),Me="SelectScrollUpButton",Zt=o.forwardRef(v(p(function(e,s){const t=oe(Me,e.__scopeSelect),u=ye(Me,e.__scopeSelect),[r,f]=o.useState(!1),n=U(s,u.onScrollButtonChange);return X(()=>{if(t.viewport&&t.isPositioned){let c=p(function(){const x=l.scrollTop>0;f(x)},"handleScroll2");v(c,"handleScroll");const l=t.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),r?(0,d.jsx)(Be,{...e,ref:n,onAutoScroll:p(()=>{const{viewport:c,selectedItem:l}=t;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)},"onAutoScroll")}):null},"SelectScrollUpButton2"),"SelectScrollUpButton")),je="SelectScrollDownButton",Jt=o.forwardRef(v(p(function(e,s){const t=oe(je,e.__scopeSelect),u=ye(je,e.__scopeSelect),[r,f]=o.useState(!1),n=U(s,u.onScrollButtonChange);return X(()=>{if(t.viewport&&t.isPositioned){let c=p(function(){const x=l.scrollHeight-l.clientHeight,I=Math.ceil(l.scrollTop)<x;f(I)},"handleScroll2");v(c,"handleScroll");const l=t.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[t.viewport,t.isPositioned]),r?(0,d.jsx)(Be,{...e,ref:n,onAutoScroll:p(()=>{const{viewport:c,selectedItem:l}=t;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)},"onAutoScroll")}):null},"SelectScrollDownButton2"),"SelectScrollDownButton")),Be=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,onAutoScroll:u,...r}=e,f=oe("SelectScrollButton",t),n=o.useRef(null),c=he(t),l=o.useCallback(()=>{n.current!==null&&(window.clearInterval(n.current),n.current=null)},[]);return o.useEffect(()=>()=>l(),[l]),X(()=>{c().find(x=>x.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),(0,d.jsx)(L.div,{"aria-hidden":!0,...r,ref:s,style:{flexShrink:0,...r.style},onPointerDown:E(r.onPointerDown,()=>{n.current===null&&(n.current=window.setInterval(u,50))}),onPointerMove:E(r.onPointerMove,()=>{f.onItemLeave?.(),n.current===null&&(n.current=window.setInterval(u,50))}),onPointerLeave:E(r.onPointerLeave,()=>{l()})})},"SelectScrollButtonImpl2"),"SelectScrollButtonImpl")),Qt=o.forwardRef(v(p(function(e,s){const{__scopeSelect:t,...u}=e;return(0,d.jsx)(L.div,{"aria-hidden":!0,...u,ref:s})},"SelectSeparator2"),"SelectSeparator")),jt="SelectBubbleInput",Nt=o.forwardRef(v(p(function({__scopeSelect:e,...s},t){const u=Z(jt,e),{value:r,onValueChange:f,required:n,disabled:c,name:l,autoComplete:x,form:I}=u,{nativeOptions:P,nativeSelectKey:_}=u,y=o.useRef(null),T=U(t,y),i=r??"",g=De(i),C=Array.from(P).some(m=>(m.props.value??"")==="");return o.useEffect(()=>{const m=y.current;if(!m)return;const h=window.HTMLSelectElement.prototype,N=Object.getOwnPropertyDescriptor(h,"value").set;if(g!==i&&N){const O=new Event("change",{bubbles:!0});N.call(m,i),m.dispatchEvent(O)}},[g,i]),(0,d.jsxs)(L.select,{"aria-hidden":!0,required:n,tabIndex:-1,name:l,autoComplete:x,disabled:c,form:I,onChange:p(m=>f(m.target.value),"onChange"),...s,style:{...nt,...s.style},ref:T,defaultValue:i,children:[de(r)&&!C?(0,d.jsx)("option",{value:""}):null,Array.from(P)]},_)},"SelectBubbleInput2"),"SelectBubbleInput"));function Ve(a){return typeof a=="function"}p(Ve,"isFunction");v(Ve,"isFunction");function de(a){return a===""||a===void 0}p(de,"shouldShowPlaceholder");v(de,"shouldShowPlaceholder");function _e(a){const e=Ie(a),s=o.useRef(""),t=o.useRef(0),u=o.useCallback(f=>{const n=s.current+f;e(n),v(p((function c(l){s.current=l,window.clearTimeout(t.current),l!==""&&(t.current=window.setTimeout(()=>c(""),1e3))}),"updateSearch"),"updateSearch")(n)},[e]),r=o.useCallback(()=>{s.current="",window.clearTimeout(t.current)},[]);return o.useEffect(()=>()=>window.clearTimeout(t.current),[]),[s,u,r]}p(_e,"useTypeaheadSearch");v(_e,"useTypeaheadSearch");function Te(a,e,s){const t=e.length>1&&Array.from(e).every(n=>n===e[0])?e[0]:e,u=s?a.indexOf(s):-1;let r=He(a,Math.max(u,0));t.length===1&&(r=r.filter(n=>n!==s));const f=r.find(n=>n.textValue.toLowerCase().startsWith(t.toLowerCase()));return f!==s?f:void 0}p(Te,"findNextItem");v(Te,"findNextItem");function He(a,e){return a.map((s,t)=>a[(e+t)%a.length])}p(He,"wrapArray");v(He,"wrapArray");export{Yt as a,zt as c,Zt as d,Qt as f,ge as g,Gt as h,Ut as i,Wt as l,Ft as m,Kt as n,Xt as o,Ht as p,qt as r,$t as s,Vt as t,Jt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var me=Object.defineProperty;var u=(r,e)=>me(r,"name",{value:e,configurable:!0});import{i as Z}from"./rolldown-runtime-ZpX3ckPj.js";import{A as j,E as ve,F as z,Ha as Ie,L as k,M as ee,O as ye,T as Ce,Wa as xe,j as q,k as Re}from"./boxes-DLOydH_J.js";var c=Z(xe(),1),g=Z(Ie(),1),Se=Object.defineProperty,x=u((r,e)=>Se(r,"name",{value:e,configurable:!0}),"__name$3");function te(r){const e=r+"CollectionProvider",[t,n]=q(e),[o,i]=t(e,{collectionRef:{current:null},itemMap:new Map}),f=x(m=>{const{scope:v,children:I}=m,s=c.useRef(null),l=c.useRef(new Map).current;return(0,g.jsx)(o,{scope:v,itemMap:l,collectionRef:s,children:I})},"CollectionProvider");f.displayName=e;const d=r+"CollectionSlot",O=z(d),A=c.forwardRef((m,v)=>{const{scope:I,children:s}=m,l=i(d,I),a=k(v,l.collectionRef);return(0,g.jsx)(O,{ref:a,children:s})});A.displayName=d;const y=r+"CollectionItemSlot",p="data-radix-collection-item",_=z(y),h=c.forwardRef((m,v)=>{const{scope:I,children:s,...l}=m,a=c.useRef(null),S=k(v,a),E=i(y,I);return c.useEffect(()=>(E.itemMap.set(a,{ref:a,...l}),()=>{E.itemMap.delete(a)})),(0,g.jsx)(_,{[p]:"",ref:S,children:s})});h.displayName=y;function C(m){const v=i(r+"CollectionConsumer",m);return c.useCallback(()=>{const I=v.collectionRef.current;if(!I)return[];const s=Array.from(I.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((l,a)=>s.indexOf(l.ref.current)-s.indexOf(a.ref.current))},[v.collectionRef,v.itemMap])}return u(C,"useCollection"),x(C,"useCollection"),[{Provider:f,Slot:A,ItemSlot:h},C,n]}u(te,"createCollection");x(te,"createCollection");var X=new WeakMap,H=class D extends Map{static{u(this,"_OrderedDict")}static{x(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],X.set(this,!0)}set(e,t){return X.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){const o=this.has(t),i=this.#e.length,f=Y(e);let d=f>=0?f:i+f;const O=d<0||d>=i?-1:d;if(O===this.size||o&&O===this.size-1||O===-1)return this.set(t,n),this;const A=this.size+(o?0:1);f<0&&d++;const y=[...this.#e];let p,_=!1;for(let h=d;h<A;h++)if(d===h){let C=y[h];y[h]===t&&(C=y[h+1]),o&&this.delete(t),p=this.get(C),this.set(t,n)}else{!_&&y[h-1]===t&&(_=!0);const C=y[_?h:h-1],m=p;p=this.get(C),this.delete(C),this.set(C,m)}return this}with(e,t,n){const o=new D(this);return o.insert(e,t,n),o}before(e){const t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){const o=this.#e.indexOf(e);return o===-1?this:this.insert(o,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){const o=this.#e.indexOf(e);return o===-1?this:this.insert(o+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){const t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){const t=this.keyAt(e);return t!==void 0?this.delete(t):!1}at(e){const t=G(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){const t=G(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return G(this.#e,e)}from(e,t){const n=this.indexOf(e);if(n===-1)return;let o=n+t;return o<0&&(o=0),o>=this.size&&(o=this.size-1),this.at(o)}keyFrom(e,t){const n=this.indexOf(e);if(n===-1)return;let o=n+t;return o<0&&(o=0),o>=this.size&&(o=this.size-1),this.keyAt(o)}find(e,t){let n=0;for(const o of this){if(Reflect.apply(e,t,[o,n,this]))return o;n++}}findIndex(e,t){let n=0;for(const o of this){if(Reflect.apply(e,t,[o,n,this]))return n;n++}return-1}filter(e,t){const n=[];let o=0;for(const i of this)Reflect.apply(e,t,[i,o,this])&&n.push(i),o++;return new D(n)}map(e,t){const n=[];let o=0;for(const i of this)n.push([i[0],Reflect.apply(e,t,[i,o,this])]),o++;return new D(n)}reduce(...e){const[t,n]=e;let o=0,i=n??this.at(0);for(const f of this)o===0&&e.length===1?i=f:i=Reflect.apply(t,this,[i,f,o,this]),o++;return i}reduceRight(...e){const[t,n]=e;let o=n??this.at(-1);for(let i=this.size-1;i>=0;i--){const f=this.at(i);i===this.size-1&&e.length===1?o=f:o=Reflect.apply(t,this,[o,f,i,this])}return o}toSorted(e){const t=[...this.entries()].sort(e);return new D(t)}toReversed(){const e=new D;for(let t=this.size-1;t>=0;t--){const n=this.keyAt(t),o=this.get(n);e.set(n,o)}return e}toSpliced(...e){const t=[...this.entries()];return t.splice(...e),new D(t)}slice(e,t){const n=new D;let o=this.size-1;if(e===void 0)return n;e<0&&(e=e+this.size),t!==void 0&&t>0&&(o=t-1);for(let i=e;i<=o;i++){const f=this.keyAt(i),d=this.get(f);n.set(f,d)}return n}every(e,t){let n=0;for(const o of this){if(!Reflect.apply(e,t,[o,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(const o of this){if(Reflect.apply(e,t,[o,n,this]))return!0;n++}return!1}};function G(r,e){if("at"in Array.prototype)return Array.prototype.at.call(r,e);const t=oe(r,e);return t===-1?void 0:r[t]}u(G,"at");x(G,"at");function oe(r,e){const t=r.length,n=Y(e),o=n>=0?n:t+n;return o<0||o>=t?-1:o}u(oe,"toSafeIndex");x(oe,"toSafeIndex");function Y(r){return r!==r||r===0?0:Math.trunc(r)}u(Y,"toSafeInteger");x(Y,"toSafeInteger");function ge(r){const e=r+"CollectionProvider",[t,n]=q(e),[o,i]=t(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new H,setItemMap:x(()=>{},"setItemMap")}),f=x(({state:s,...l})=>s?(0,g.jsx)(O,{...l,state:s}):(0,g.jsx)(d,{...l}),"CollectionProvider");f.displayName=e;const d=x(s=>{const l=v();return(0,g.jsx)(O,{...s,state:l})},"CollectionInit");d.displayName=e+"Init";const O=x(s=>{const{scope:l,children:a,state:S}=s,E=c.useRef(null),[w,b]=c.useState(null),R=k(E,b),[L,M]=S;return c.useEffect(()=>{if(!w)return;const F=se(()=>{});return F.observe(w,{childList:!0,subtree:!0}),()=>{F.disconnect()}},[w]),(0,g.jsx)(o,{scope:l,itemMap:L,setItemMap:M,collectionRef:R,collectionRefObject:E,collectionElement:w,children:a})},"CollectionProviderImpl");O.displayName=e+"Impl";const A=r+"CollectionSlot",y=z(A),p=c.forwardRef((s,l)=>{const{scope:a,children:S}=s,E=i(A,a),w=k(l,E.collectionRef);return(0,g.jsx)(y,{ref:w,children:S})});p.displayName=A;const _=r+"CollectionItemSlot",h="data-radix-collection-item",C=z(_),m=c.forwardRef((s,l)=>{const{scope:a,children:S,...E}=s,w=c.useRef(null),[b,R]=c.useState(null),L=k(l,w,R),{setItemMap:M}=i(_,a),F=c.useRef(E);ne(F.current,E)||(F.current=E);const T=F.current;return c.useEffect(()=>{const Q=T;return M(P=>b?P.has(b)?P.set(b,{...Q,element:b}).toSorted(V):(P.set(b,{...Q,element:b}),P.toSorted(V)):P),()=>{M(P=>!b||!P.has(b)?P:(P.delete(b),new H(P)))}},[b,T,M]),(0,g.jsx)(C,{[h]:"",ref:L,children:S})});m.displayName=_;function v(){return c.useState(new H)}u(v,"useInitCollection"),x(v,"useInitCollection");function I(s){const{itemMap:l}=i(r+"CollectionConsumer",s);return l}return u(I,"useCollection"),x(I,"useCollection"),[{Provider:f,Slot:p,ItemSlot:m},{createCollectionScope:n,useCollection:I,useInitCollection:v}]}u(ge,"createCollection2");x(ge,"createCollection");function ne(r,e){if(r===e)return!0;if(typeof r!="object"||typeof e!="object"||r==null||e==null)return!1;const t=Object.keys(r),n=Object.keys(e);if(t.length!==n.length)return!1;for(const o of t)if(!Object.prototype.hasOwnProperty.call(e,o)||r[o]!==e[o])return!1;return!0}u(ne,"shallowEqual");x(ne,"shallowEqual");function re(r,e){return!!(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING)}u(re,"isElementPreceding");x(re,"isElementPreceding");function V(r,e){return!r[1].element||!e[1].element?0:re(r[1].element,e[1].element)?-1:1}u(V,"sortByDocumentPosition");x(V,"sortByDocumentPosition");function se(r){return new MutationObserver(e=>{for(const t of e)if(t.type==="childList"){r();return}})}u(se,"getChildListObserver");x(se,"getChildListObserver");var Ee=Object.defineProperty,be=u((r,e)=>Ee(r,"name",{value:e,configurable:!0}),"__name$2"),_e=c.createContext(void 0);function ie(r){const e=c.useContext(_e);return r||e||"ltr"}u(ie,"useDirection");be(ie,"useDirection");var Oe=Object.defineProperty,W=u((r,e)=>Oe(r,"name",{value:e,configurable:!0}),"__name$1"),B=!1;function ce(){const[r,e]=c.useState(B);return c.useEffect(()=>{B||(B=!0,e(!0))},[]),r}u(ce,"useIsHydrated");W(ce,"useIsHydrated");var le=c[" useSyncExternalStore ".trim().toString()];function ue(){return()=>{}}u(ue,"subscribe");W(ue,"subscribe");function ae(){return le(ue,()=>!0,()=>!1)}u(ae,"useIsHydratedModern");W(ae,"useIsHydratedModern");var Ae=typeof le=="function"?ae:ce,we=Object.defineProperty,N=u((r,e)=>we(r,"name",{value:e,configurable:!0}),"__name"),U="rovingFocusGroup.onEntryFocus",Fe={bubbles:!1,cancelable:!0},K="RovingFocusGroup",[$,fe,Te]=te(K),[Pe,Be]=q(K,[Te]),[Me,De]=Pe(K),Ne=c.forwardRef(N(u(function(e,t){return(0,g.jsx)($.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)($.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)(je,{...e,ref:t})})})},"RovingFocusGroup2"),"RovingFocusGroup")),je=c.forwardRef(N(u(function(e,t){const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:f,currentTabStopId:d,defaultCurrentTabStopId:O,onCurrentTabStopIdChange:A,onEntryFocus:y,preventScrollOnEntryFocus:p=!1,..._}=e,h=c.useRef(null),C=k(t,h),m=ie(f),[v,I]=ye({prop:d,defaultProp:O??null,onChange:A,caller:K}),[s,l]=c.useState(!1),a=Ce(y),S=fe(n),E=c.useRef(!1),[w,b]=c.useState(0);return c.useEffect(()=>{const R=h.current;if(R)return R.addEventListener(U,a),()=>R.removeEventListener(U,a)},[a]),(0,g.jsx)(Me,{scope:n,orientation:o,dir:m,loop:i,currentTabStopId:v,onItemFocus:c.useCallback(R=>I(R),[I]),onItemShiftTab:c.useCallback(()=>l(!0),[]),onFocusableItemAdd:c.useCallback(()=>b(R=>R+1),[]),onFocusableItemRemove:c.useCallback(()=>b(R=>R-1),[]),children:(0,g.jsx)(ee.div,{tabIndex:s||w===0?-1:0,"data-orientation":o,..._,ref:C,style:{outline:"none",...e.style},onMouseDown:j(e.onMouseDown,()=>{E.current=!0}),onFocus:j(e.onFocus,R=>{const L=!E.current;if(R.target===R.currentTarget&&L&&!s){const M=new CustomEvent(U,Fe);if(R.currentTarget.dispatchEvent(M),!M.defaultPrevented){const F=S().filter(T=>T.focusable);J([F.find(T=>T.active),F.find(T=>T.id===v),...F].filter(Boolean).map(T=>T.ref.current),p)}}E.current=!1}),onBlur:j(e.onBlur,()=>l(!1))})})},"RovingFocusGroupImpl2"),"RovingFocusGroupImpl")),ke="RovingFocusGroupItem",Le=c.forwardRef(N(u(function(e,t){const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:f,children:d,...O}=e,A=ve(),y=f||A,p=De(ke,n),_=p.currentTabStopId===y,h=fe(n),{onFocusableItemAdd:C,onFocusableItemRemove:m,currentTabStopId:v}=p,I=Ae();return Re(()=>{if(!(!I||!o))return C(),()=>m()},[I,o,C,m]),c.useEffect(()=>{if(!(I||!o))return C(),()=>m()},[I,o,C,m]),(0,g.jsx)($.ItemSlot,{scope:n,id:y,focusable:o,active:i,children:(0,g.jsx)(ee.span,{tabIndex:_?0:-1,"data-orientation":p.orientation,...O,ref:t,onMouseDown:j(e.onMouseDown,s=>{o?p.onItemFocus(y):s.preventDefault()}),onFocus:j(e.onFocus,()=>p.onItemFocus(y)),onKeyDown:j(e.onKeyDown,s=>{if(s.key==="Tab"&&s.shiftKey){p.onItemShiftTab();return}if(s.target!==s.currentTarget)return;const l=pe(s,p.orientation,p.dir);if(l!==void 0){if(s.metaKey||s.ctrlKey||s.altKey||s.shiftKey)return;s.preventDefault();let a=h().filter(S=>S.focusable).map(S=>S.ref.current);if(l==="last")a.reverse();else if(l==="prev"||l==="next"){l==="prev"&&a.reverse();const S=a.indexOf(s.currentTarget);a=p.loop?he(a,S+1):a.slice(S+1)}setTimeout(()=>J(a))}}),children:typeof d=="function"?d({isCurrentTabStop:_,hasTabStop:v!=null}):d})})},"RovingFocusGroupItem2"),"RovingFocusGroupItem")),Ge={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function de(r,e){return e!=="rtl"?r:r==="ArrowLeft"?"ArrowRight":r==="ArrowRight"?"ArrowLeft":r}u(de,"getDirectionAwareKey");N(de,"getDirectionAwareKey");function pe(r,e,t){const n=de(r.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Ge[n]}u(pe,"getFocusIntent");N(pe,"getFocusIntent");function J(r,e=!1){const t=document.activeElement;for(const n of r)if(n===t||(n.focus({preventScroll:e}),document.activeElement!==t))return}u(J,"focusFirst");N(J,"focusFirst");function he(r,e){return r.map((t,n)=>r[(e+n)%r.length])}u(he,"wrapArray");N(he,"wrapArray");var Ue=Ne,Ve=Le;export{te as a,ie as i,Ue as n,Be as r,Ve as t};
|
|
1
|
+
var me=Object.defineProperty;var u=(r,e)=>me(r,"name",{value:e,configurable:!0});import{i as Z}from"./rolldown-runtime-ZpX3ckPj.js";import{A as j,E as ve,F as z,Ha as Ie,L as k,M as ee,O as ye,T as Ce,Wa as xe,j as q,k as Re}from"./boxes-CwMr8JCg.js";var c=Z(xe(),1),g=Z(Ie(),1),Se=Object.defineProperty,x=u((r,e)=>Se(r,"name",{value:e,configurable:!0}),"__name$3");function te(r){const e=r+"CollectionProvider",[t,n]=q(e),[o,i]=t(e,{collectionRef:{current:null},itemMap:new Map}),f=x(m=>{const{scope:v,children:I}=m,s=c.useRef(null),l=c.useRef(new Map).current;return(0,g.jsx)(o,{scope:v,itemMap:l,collectionRef:s,children:I})},"CollectionProvider");f.displayName=e;const d=r+"CollectionSlot",O=z(d),A=c.forwardRef((m,v)=>{const{scope:I,children:s}=m,l=i(d,I),a=k(v,l.collectionRef);return(0,g.jsx)(O,{ref:a,children:s})});A.displayName=d;const y=r+"CollectionItemSlot",p="data-radix-collection-item",_=z(y),h=c.forwardRef((m,v)=>{const{scope:I,children:s,...l}=m,a=c.useRef(null),S=k(v,a),E=i(y,I);return c.useEffect(()=>(E.itemMap.set(a,{ref:a,...l}),()=>{E.itemMap.delete(a)})),(0,g.jsx)(_,{[p]:"",ref:S,children:s})});h.displayName=y;function C(m){const v=i(r+"CollectionConsumer",m);return c.useCallback(()=>{const I=v.collectionRef.current;if(!I)return[];const s=Array.from(I.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((l,a)=>s.indexOf(l.ref.current)-s.indexOf(a.ref.current))},[v.collectionRef,v.itemMap])}return u(C,"useCollection"),x(C,"useCollection"),[{Provider:f,Slot:A,ItemSlot:h},C,n]}u(te,"createCollection");x(te,"createCollection");var X=new WeakMap,H=class D extends Map{static{u(this,"_OrderedDict")}static{x(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],X.set(this,!0)}set(e,t){return X.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){const o=this.has(t),i=this.#e.length,f=Y(e);let d=f>=0?f:i+f;const O=d<0||d>=i?-1:d;if(O===this.size||o&&O===this.size-1||O===-1)return this.set(t,n),this;const A=this.size+(o?0:1);f<0&&d++;const y=[...this.#e];let p,_=!1;for(let h=d;h<A;h++)if(d===h){let C=y[h];y[h]===t&&(C=y[h+1]),o&&this.delete(t),p=this.get(C),this.set(t,n)}else{!_&&y[h-1]===t&&(_=!0);const C=y[_?h:h-1],m=p;p=this.get(C),this.delete(C),this.set(C,m)}return this}with(e,t,n){const o=new D(this);return o.insert(e,t,n),o}before(e){const t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){const o=this.#e.indexOf(e);return o===-1?this:this.insert(o,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){const o=this.#e.indexOf(e);return o===-1?this:this.insert(o+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){const t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){const t=this.keyAt(e);return t!==void 0?this.delete(t):!1}at(e){const t=G(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){const t=G(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return G(this.#e,e)}from(e,t){const n=this.indexOf(e);if(n===-1)return;let o=n+t;return o<0&&(o=0),o>=this.size&&(o=this.size-1),this.at(o)}keyFrom(e,t){const n=this.indexOf(e);if(n===-1)return;let o=n+t;return o<0&&(o=0),o>=this.size&&(o=this.size-1),this.keyAt(o)}find(e,t){let n=0;for(const o of this){if(Reflect.apply(e,t,[o,n,this]))return o;n++}}findIndex(e,t){let n=0;for(const o of this){if(Reflect.apply(e,t,[o,n,this]))return n;n++}return-1}filter(e,t){const n=[];let o=0;for(const i of this)Reflect.apply(e,t,[i,o,this])&&n.push(i),o++;return new D(n)}map(e,t){const n=[];let o=0;for(const i of this)n.push([i[0],Reflect.apply(e,t,[i,o,this])]),o++;return new D(n)}reduce(...e){const[t,n]=e;let o=0,i=n??this.at(0);for(const f of this)o===0&&e.length===1?i=f:i=Reflect.apply(t,this,[i,f,o,this]),o++;return i}reduceRight(...e){const[t,n]=e;let o=n??this.at(-1);for(let i=this.size-1;i>=0;i--){const f=this.at(i);i===this.size-1&&e.length===1?o=f:o=Reflect.apply(t,this,[o,f,i,this])}return o}toSorted(e){const t=[...this.entries()].sort(e);return new D(t)}toReversed(){const e=new D;for(let t=this.size-1;t>=0;t--){const n=this.keyAt(t),o=this.get(n);e.set(n,o)}return e}toSpliced(...e){const t=[...this.entries()];return t.splice(...e),new D(t)}slice(e,t){const n=new D;let o=this.size-1;if(e===void 0)return n;e<0&&(e=e+this.size),t!==void 0&&t>0&&(o=t-1);for(let i=e;i<=o;i++){const f=this.keyAt(i),d=this.get(f);n.set(f,d)}return n}every(e,t){let n=0;for(const o of this){if(!Reflect.apply(e,t,[o,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(const o of this){if(Reflect.apply(e,t,[o,n,this]))return!0;n++}return!1}};function G(r,e){if("at"in Array.prototype)return Array.prototype.at.call(r,e);const t=oe(r,e);return t===-1?void 0:r[t]}u(G,"at");x(G,"at");function oe(r,e){const t=r.length,n=Y(e),o=n>=0?n:t+n;return o<0||o>=t?-1:o}u(oe,"toSafeIndex");x(oe,"toSafeIndex");function Y(r){return r!==r||r===0?0:Math.trunc(r)}u(Y,"toSafeInteger");x(Y,"toSafeInteger");function ge(r){const e=r+"CollectionProvider",[t,n]=q(e),[o,i]=t(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new H,setItemMap:x(()=>{},"setItemMap")}),f=x(({state:s,...l})=>s?(0,g.jsx)(O,{...l,state:s}):(0,g.jsx)(d,{...l}),"CollectionProvider");f.displayName=e;const d=x(s=>{const l=v();return(0,g.jsx)(O,{...s,state:l})},"CollectionInit");d.displayName=e+"Init";const O=x(s=>{const{scope:l,children:a,state:S}=s,E=c.useRef(null),[w,b]=c.useState(null),R=k(E,b),[L,M]=S;return c.useEffect(()=>{if(!w)return;const F=se(()=>{});return F.observe(w,{childList:!0,subtree:!0}),()=>{F.disconnect()}},[w]),(0,g.jsx)(o,{scope:l,itemMap:L,setItemMap:M,collectionRef:R,collectionRefObject:E,collectionElement:w,children:a})},"CollectionProviderImpl");O.displayName=e+"Impl";const A=r+"CollectionSlot",y=z(A),p=c.forwardRef((s,l)=>{const{scope:a,children:S}=s,E=i(A,a),w=k(l,E.collectionRef);return(0,g.jsx)(y,{ref:w,children:S})});p.displayName=A;const _=r+"CollectionItemSlot",h="data-radix-collection-item",C=z(_),m=c.forwardRef((s,l)=>{const{scope:a,children:S,...E}=s,w=c.useRef(null),[b,R]=c.useState(null),L=k(l,w,R),{setItemMap:M}=i(_,a),F=c.useRef(E);ne(F.current,E)||(F.current=E);const T=F.current;return c.useEffect(()=>{const Q=T;return M(P=>b?P.has(b)?P.set(b,{...Q,element:b}).toSorted(V):(P.set(b,{...Q,element:b}),P.toSorted(V)):P),()=>{M(P=>!b||!P.has(b)?P:(P.delete(b),new H(P)))}},[b,T,M]),(0,g.jsx)(C,{[h]:"",ref:L,children:S})});m.displayName=_;function v(){return c.useState(new H)}u(v,"useInitCollection"),x(v,"useInitCollection");function I(s){const{itemMap:l}=i(r+"CollectionConsumer",s);return l}return u(I,"useCollection"),x(I,"useCollection"),[{Provider:f,Slot:p,ItemSlot:m},{createCollectionScope:n,useCollection:I,useInitCollection:v}]}u(ge,"createCollection2");x(ge,"createCollection");function ne(r,e){if(r===e)return!0;if(typeof r!="object"||typeof e!="object"||r==null||e==null)return!1;const t=Object.keys(r),n=Object.keys(e);if(t.length!==n.length)return!1;for(const o of t)if(!Object.prototype.hasOwnProperty.call(e,o)||r[o]!==e[o])return!1;return!0}u(ne,"shallowEqual");x(ne,"shallowEqual");function re(r,e){return!!(e.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING)}u(re,"isElementPreceding");x(re,"isElementPreceding");function V(r,e){return!r[1].element||!e[1].element?0:re(r[1].element,e[1].element)?-1:1}u(V,"sortByDocumentPosition");x(V,"sortByDocumentPosition");function se(r){return new MutationObserver(e=>{for(const t of e)if(t.type==="childList"){r();return}})}u(se,"getChildListObserver");x(se,"getChildListObserver");var Ee=Object.defineProperty,be=u((r,e)=>Ee(r,"name",{value:e,configurable:!0}),"__name$2"),_e=c.createContext(void 0);function ie(r){const e=c.useContext(_e);return r||e||"ltr"}u(ie,"useDirection");be(ie,"useDirection");var Oe=Object.defineProperty,W=u((r,e)=>Oe(r,"name",{value:e,configurable:!0}),"__name$1"),B=!1;function ce(){const[r,e]=c.useState(B);return c.useEffect(()=>{B||(B=!0,e(!0))},[]),r}u(ce,"useIsHydrated");W(ce,"useIsHydrated");var le=c[" useSyncExternalStore ".trim().toString()];function ue(){return()=>{}}u(ue,"subscribe");W(ue,"subscribe");function ae(){return le(ue,()=>!0,()=>!1)}u(ae,"useIsHydratedModern");W(ae,"useIsHydratedModern");var Ae=typeof le=="function"?ae:ce,we=Object.defineProperty,N=u((r,e)=>we(r,"name",{value:e,configurable:!0}),"__name"),U="rovingFocusGroup.onEntryFocus",Fe={bubbles:!1,cancelable:!0},K="RovingFocusGroup",[$,fe,Te]=te(K),[Pe,Be]=q(K,[Te]),[Me,De]=Pe(K),Ne=c.forwardRef(N(u(function(e,t){return(0,g.jsx)($.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)($.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,g.jsx)(je,{...e,ref:t})})})},"RovingFocusGroup2"),"RovingFocusGroup")),je=c.forwardRef(N(u(function(e,t){const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:f,currentTabStopId:d,defaultCurrentTabStopId:O,onCurrentTabStopIdChange:A,onEntryFocus:y,preventScrollOnEntryFocus:p=!1,..._}=e,h=c.useRef(null),C=k(t,h),m=ie(f),[v,I]=ye({prop:d,defaultProp:O??null,onChange:A,caller:K}),[s,l]=c.useState(!1),a=Ce(y),S=fe(n),E=c.useRef(!1),[w,b]=c.useState(0);return c.useEffect(()=>{const R=h.current;if(R)return R.addEventListener(U,a),()=>R.removeEventListener(U,a)},[a]),(0,g.jsx)(Me,{scope:n,orientation:o,dir:m,loop:i,currentTabStopId:v,onItemFocus:c.useCallback(R=>I(R),[I]),onItemShiftTab:c.useCallback(()=>l(!0),[]),onFocusableItemAdd:c.useCallback(()=>b(R=>R+1),[]),onFocusableItemRemove:c.useCallback(()=>b(R=>R-1),[]),children:(0,g.jsx)(ee.div,{tabIndex:s||w===0?-1:0,"data-orientation":o,..._,ref:C,style:{outline:"none",...e.style},onMouseDown:j(e.onMouseDown,()=>{E.current=!0}),onFocus:j(e.onFocus,R=>{const L=!E.current;if(R.target===R.currentTarget&&L&&!s){const M=new CustomEvent(U,Fe);if(R.currentTarget.dispatchEvent(M),!M.defaultPrevented){const F=S().filter(T=>T.focusable);J([F.find(T=>T.active),F.find(T=>T.id===v),...F].filter(Boolean).map(T=>T.ref.current),p)}}E.current=!1}),onBlur:j(e.onBlur,()=>l(!1))})})},"RovingFocusGroupImpl2"),"RovingFocusGroupImpl")),ke="RovingFocusGroupItem",Le=c.forwardRef(N(u(function(e,t){const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:f,children:d,...O}=e,A=ve(),y=f||A,p=De(ke,n),_=p.currentTabStopId===y,h=fe(n),{onFocusableItemAdd:C,onFocusableItemRemove:m,currentTabStopId:v}=p,I=Ae();return Re(()=>{if(!(!I||!o))return C(),()=>m()},[I,o,C,m]),c.useEffect(()=>{if(!(I||!o))return C(),()=>m()},[I,o,C,m]),(0,g.jsx)($.ItemSlot,{scope:n,id:y,focusable:o,active:i,children:(0,g.jsx)(ee.span,{tabIndex:_?0:-1,"data-orientation":p.orientation,...O,ref:t,onMouseDown:j(e.onMouseDown,s=>{o?p.onItemFocus(y):s.preventDefault()}),onFocus:j(e.onFocus,()=>p.onItemFocus(y)),onKeyDown:j(e.onKeyDown,s=>{if(s.key==="Tab"&&s.shiftKey){p.onItemShiftTab();return}if(s.target!==s.currentTarget)return;const l=pe(s,p.orientation,p.dir);if(l!==void 0){if(s.metaKey||s.ctrlKey||s.altKey||s.shiftKey)return;s.preventDefault();let a=h().filter(S=>S.focusable).map(S=>S.ref.current);if(l==="last")a.reverse();else if(l==="prev"||l==="next"){l==="prev"&&a.reverse();const S=a.indexOf(s.currentTarget);a=p.loop?he(a,S+1):a.slice(S+1)}setTimeout(()=>J(a))}}),children:typeof d=="function"?d({isCurrentTabStop:_,hasTabStop:v!=null}):d})})},"RovingFocusGroupItem2"),"RovingFocusGroupItem")),Ge={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function de(r,e){return e!=="rtl"?r:r==="ArrowLeft"?"ArrowRight":r==="ArrowRight"?"ArrowLeft":r}u(de,"getDirectionAwareKey");N(de,"getDirectionAwareKey");function pe(r,e,t){const n=de(r.key,t);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Ge[n]}u(pe,"getFocusIntent");N(pe,"getFocusIntent");function J(r,e=!1){const t=document.activeElement;for(const n of r)if(n===t||(n.focus({preventScroll:e}),document.activeElement!==t))return}u(J,"focusFirst");N(J,"focusFirst");function he(r,e){return r.map((t,n)=>r[(e+n)%r.length])}u(he,"wrapArray");N(he,"wrapArray");var Ue=Ne,Ve=Le;export{te as a,ie as i,Ue as n,Be as r,Ve as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Q=Object.defineProperty;var x=(r,e)=>Q(r,"name",{value:e,configurable:!0});import{i as G}from"./rolldown-runtime-ZpX3ckPj.js";import{A as E,C as Z,D as F,E as ee,Ha as te,I as oe,L as q,M as re,O as ne,Wa as se,d as ae,f as ie,h as B,j as le,k as ce,m as ue,p as pe,x as de}from"./boxes-
|
|
1
|
+
var Q=Object.defineProperty;var x=(r,e)=>Q(r,"name",{value:e,configurable:!0});import{i as G}from"./rolldown-runtime-ZpX3ckPj.js";import{A as E,C as Z,D as F,E as ee,Ha as te,I as oe,L as q,M as re,O as ne,Wa as se,d as ae,f as ie,h as B,j as le,k as ce,m as ue,p as pe,x as de}from"./boxes-CwMr8JCg.js";import{t as fe}from"./dist-DRcvUxQj.js";var s=G(se(),1),h=G(te(),1),ve=Object.defineProperty,f=x((r,e)=>ve(r,"name",{value:e,configurable:!0}),"__name"),[I,ke]=le("Tooltip",[B]),L=B(),Te="TooltipProvider",he=700,A="tooltip.open",[ge,M]=I(Te),xe=f(r=>{const{__scopeTooltip:e,delayDuration:t=he,skipDelayDuration:o=300,disableHoverableContent:a=!1,children:n}=r,i=s.useRef(!0),v=s.useRef(!1),c=s.useRef(0);return s.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),(0,h.jsx)(ge,{scope:e,isOpenDelayedRef:i,delayDuration:t,onOpen:s.useCallback(()=>{o<=0||(window.clearTimeout(c.current),i.current=!1)},[o]),onClose:s.useCallback(()=>{o<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,o))},[o]),isPointerInTransitRef:v,onPointerInTransitChange:s.useCallback(u=>{v.current=u},[]),disableHoverableContent:a,children:n})},"TooltipProvider"),k="Tooltip",[Ce,_]=I(k),me=f(r=>{const{__scopeTooltip:e,children:t,open:o,defaultOpen:a,onOpenChange:n,disableHoverableContent:i,delayDuration:v}=r,c=M(k,r.__scopeTooltip),u=L(e),[p,T]=s.useState(null),[d,g]=s.useState(void 0),y=ee(),l=s.useRef(0),C=i??c.disableHoverableContent,m=v??c.delayDuration,b=s.useRef(!1),[w,P]=ne({prop:o,defaultProp:a??!1,onChange:f(H=>{H?(c.onOpen(),document.dispatchEvent(new CustomEvent(A))):c.onClose(),n?.(H)},"onChange"),caller:k}),O=s.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),D=s.useCallback(()=>{window.clearTimeout(l.current),l.current=0,b.current=!1,P(!0)},[P]),j=s.useCallback(()=>{window.clearTimeout(l.current),l.current=0,P(!1)},[P]),S=s.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>{b.current=!0,P(!0),l.current=0},m)},[m,P]);s.useEffect(()=>()=>{l.current&&(window.clearTimeout(l.current),l.current=0)},[]);const J=d??y;return(0,h.jsx)(ue,{...u,children:(0,h.jsx)(Ce,{scope:e,contentId:J,setContentId:g,open:w,stateAttribute:O,trigger:p,onTriggerChange:T,onTriggerEnter:s.useCallback(()=>{c.isOpenDelayedRef.current?S():D()},[c.isOpenDelayedRef,S,D]),onTriggerLeave:s.useCallback(()=>{C?j():(window.clearTimeout(l.current),l.current=0)},[j,C]),onOpen:D,onClose:j,disableHoverableContent:C,children:t})})},"Tooltip"),N="TooltipTrigger",ye=s.forwardRef(f(x(function(e,t){const{__scopeTooltip:o,...a}=e,n=_(N,o),i=M(N,o),v=L(o),c=s.useRef(null),u=q(t,c,n.onTriggerChange),p=s.useRef(!1),T=s.useRef(!1),d=s.useCallback(()=>p.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,h.jsx)(ae,{asChild:!0,...v,children:(0,h.jsx)(re.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...a,ref:u,onPointerMove:E(e.onPointerMove,g=>{g.pointerType!=="touch"&&!T.current&&!i.isPointerInTransitRef.current&&(n.onTriggerEnter(),T.current=!0)}),onPointerLeave:E(e.onPointerLeave,()=>{n.onTriggerLeave(),T.current=!1}),onPointerDown:E(e.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:E(e.onFocus,()=>{p.current||n.onOpen()}),onBlur:E(e.onBlur,n.onClose),onClick:E(e.onClick,n.onClose)})})},"TooltipTrigger2"),"TooltipTrigger")),U="TooltipPortal",[Pe,be]=I(U,{forceMount:void 0}),we=f(r=>{const{__scopeTooltip:e,forceMount:t,children:o,container:a}=r,n=_(U,e);return(0,h.jsx)(Pe,{scope:e,forceMount:t,children:(0,h.jsx)(F,{present:t||n.open,children:(0,h.jsx)(de,{asChild:!0,container:a,children:o})})})},"TooltipPortal"),R="TooltipContent",Ee=s.forwardRef(f(x(function(e,t){const o=be(R,e.__scopeTooltip),{forceMount:a=o.forceMount,side:n="top",...i}=e,v=_(R,e.__scopeTooltip);return(0,h.jsx)(F,{present:a||v.open,children:v.disableHoverableContent?(0,h.jsx)(Y,{side:n,...i,ref:t}):(0,h.jsx)(Re,{side:n,...i,ref:t})})},"TooltipContent2"),"TooltipContent")),Re=s.forwardRef(f(x(function(e,t){const o=_(R,e.__scopeTooltip),a=M(R,e.__scopeTooltip),n=s.useRef(null),i=q(t,n),[v,c]=s.useState(null),{trigger:u,onClose:p}=o,T=n.current,{onPointerInTransitChange:d}=a,g=s.useCallback(()=>{c(null),d(!1)},[d]),y=s.useCallback((l,C)=>{const m=l.currentTarget,b={x:l.clientX,y:l.clientY},w=K(b,X(b,m.getBoundingClientRect())),P=V(C.getBoundingClientRect()),O=$([...w,...P]);c(O),d(!0)},[d]);return s.useEffect(()=>()=>g(),[g]),s.useEffect(()=>{if(u&&T){const l=f(m=>y(m,T),"handleTriggerLeave"),C=f(m=>y(m,u),"handleContentLeave");return u.addEventListener("pointerleave",l),T.addEventListener("pointerleave",C),()=>{u.removeEventListener("pointerleave",l),T.removeEventListener("pointerleave",C)}}},[u,T,y,g]),s.useEffect(()=>{if(v){const l=f(C=>{const m=C.target,b={x:C.clientX,y:C.clientY},w=u?.contains(m)||T?.contains(m),P=!W(b,v);w?g():P&&(g(),p())},"handleTrackPointerGrace");return document.addEventListener("pointermove",l),()=>document.removeEventListener("pointermove",l)}},[u,T,v,p,g]),(0,h.jsx)(Y,{...e,ref:i})},"TooltipContentHoverable2"),"TooltipContentHoverable")),_e=oe("TooltipContent"),Y=s.forwardRef(f(x(function(e,t){const{__scopeTooltip:o,children:a,"aria-label":n,id:i,onEscapeKeyDown:v,onPointerDownOutside:c,...u}=e,p=_(R,o),T=L(o),{onClose:d}=p;s.useEffect(()=>(document.addEventListener(A,d),()=>document.removeEventListener(A,d)),[d]),s.useEffect(()=>{if(p.trigger){const y=f(l=>{l.target instanceof Node&&l.target.contains(p.trigger)&&d()},"handleScroll");return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[p.trigger,d]);const{setContentId:g}=p;return ce(()=>(g(i),()=>{g(void 0)}),[i,g]),(0,h.jsx)(Z,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:v,onPointerDownOutside:c,onFocusOutside:x(y=>y.preventDefault(),"onFocusOutside"),onDismiss:d,children:(0,h.jsxs)(pe,{"data-state":p.stateAttribute,role:n?void 0:"tooltip",id:n?void 0:p.contentId,...T,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,h.jsx)(_e,{children:a}),n?(0,h.jsx)(fe,{id:p.contentId,role:"tooltip",children:n}):null]})})},"TooltipContentImpl2"),"TooltipContentImpl")),Le=s.forwardRef(f(x(function(e,t){const{__scopeTooltip:o,...a}=e,n=L(o);return(0,h.jsx)(ie,{...n,...a,ref:t})},"TooltipArrow2"),"TooltipArrow"));function X(r,e){const t=Math.abs(e.top-r.y),o=Math.abs(e.bottom-r.y),a=Math.abs(e.right-r.x),n=Math.abs(e.left-r.x);switch(Math.min(t,o,a,n)){case n:return"left";case a:return"right";case t:return"top";case o:return"bottom";default:throw new Error("unreachable")}}x(X,"getExitSideFromRect");f(X,"getExitSideFromRect");function K(r,e,t=5){const o=[];switch(e){case"top":o.push({x:r.x-t,y:r.y+t},{x:r.x+t,y:r.y+t});break;case"bottom":o.push({x:r.x-t,y:r.y-t},{x:r.x+t,y:r.y-t});break;case"left":o.push({x:r.x+t,y:r.y-t},{x:r.x+t,y:r.y+t});break;case"right":o.push({x:r.x-t,y:r.y-t},{x:r.x-t,y:r.y+t})}return o}x(K,"getPaddedExitPoints");f(K,"getPaddedExitPoints");function V(r){const{top:e,right:t,bottom:o,left:a}=r;return[{x:a,y:e},{x:t,y:e},{x:t,y:o},{x:a,y:o}]}x(V,"getPointsFromRect");f(V,"getPointsFromRect");function W(r,e){const{x:t,y:o}=r;let a=!1;for(let n=0,i=e.length-1;n<e.length;i=n++){const v=e[n],c=e[i],u=v.x,p=v.y,T=c.x,d=c.y;p>o!=d>o&&t<(T-u)*(o-p)/(d-p)+u&&(a=!a)}return a}x(W,"isPointInPolygon");f(W,"isPointInPolygon");function $(r){const e=r.slice();return e.sort((t,o)=>t.x<o.x?-1:t.x>o.x?1:t.y<o.y?-1:t.y>o.y?1:0),z(e)}x($,"getHull");f($,"getHull");function z(r){if(r.length<=1)return r.slice();const e=[];for(let o=0;o<r.length;o++){const a=r[o];for(;e.length>=2;){const n=e[e.length-1],i=e[e.length-2];if((n.x-i.x)*(a.y-i.y)>=(n.y-i.y)*(a.x-i.x))e.pop();else break}e.push(a)}e.pop();const t=[];for(let o=r.length-1;o>=0;o--){const a=r[o];for(;t.length>=2;){const n=t[t.length-1],i=t[t.length-2];if((n.x-i.x)*(a.y-i.y)>=(n.y-i.y)*(a.x-i.x))t.pop();else break}t.push(a)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}x(z,"getHullPresorted");f(z,"getHullPresorted");var Ie=xe,Me=me,Se=ye,He=we,Ne=Ee,Ge=Le;export{Me as a,Ie as i,Ne as n,Se as o,He as r,Ge as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var o=Object.defineProperty;var a=(e,r)=>o(e,"name",{value:r,configurable:!0});import{i}from"./rolldown-runtime-ZpX3ckPj.js";import{Ha as n,M as d,Wa as s}from"./boxes-
|
|
1
|
+
var o=Object.defineProperty;var a=(e,r)=>o(e,"name",{value:r,configurable:!0});import{i}from"./rolldown-runtime-ZpX3ckPj.js";import{Ha as n,M as d,Wa as s}from"./boxes-CwMr8JCg.js";var _=i(s(),1),l=i(n(),1),m=Object.defineProperty,p=a((e,r)=>m(e,"name",{value:r,configurable:!0}),"__name"),u=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),f=_.forwardRef(p(a(function(r,t){return(0,l.jsx)(d.span,{...r,ref:t,style:{...u,...r.style}})},"VisuallyHidden2"),"VisuallyHidden")),y=f;export{u as n,y as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var i=Object.defineProperty;var t=(e,s)=>i(e,"name",{value:s,configurable:!0});import{Ji as n}from"./boxes-
|
|
1
|
+
var i=Object.defineProperty;var t=(e,s)=>i(e,"name",{value:s,configurable:!0});import{Ji as n}from"./boxes-CwMr8JCg.js";function m(e){return`companyId=${encodeURIComponent(e)}`}t(m,"companyIdQuery");var p={list:t(e=>n.get(`/companies/${e}/environments`),"list"),capabilities:t(e=>n.get(`/companies/${e}/environments/capabilities`),"capabilities"),lease:t(e=>n.get(`/environment-leases/${e}`),"lease"),secretRefs:t(e=>n.get(`/environments/${e}/secret-refs`),"secretRefs"),deleteBlastRadius:t(e=>n.get(`/environments/${e}/delete-blast-radius`),"deleteBlastRadius"),remove:t((e,s={})=>n.delete(s.destroyReusableSandboxLeases?`/environments/${e}?destroyReusableSandboxLeases=true`:`/environments/${e}`),"remove"),create:t((e,s)=>n.post(`/companies/${e}/environments`,s),"create"),update:t((e,s,o)=>n.patch(o?`/environments/${e}?${m(o)}`:`/environments/${e}`,s),"update"),probe:t((e,s)=>n.post(s?`/environments/${e}/probe?${m(s)}`:`/environments/${e}/probe`,{}),"probe"),probeConfig:t((e,s)=>n.post(`/companies/${e}/environments/probe-config`,s),"probeConfig"),customImageTemplate:t((e,s)=>n.get(`/environments/${e}/custom-image-template?${m(s)}`),"customImageTemplate"),startCustomImageSetupSession:t((e,s,o={})=>n.post(`/environments/${e}/custom-image-setup-sessions?${m(s)}`,o),"startCustomImageSetupSession"),customImageSetupSession:t(e=>n.get(`/environment-custom-image-setup-sessions/${e}`),"customImageSetupSession"),createCustomImageTerminalSessionToken:t((e,s={})=>n.post(`/environment-custom-image-setup-sessions/${e}/terminal-session-token`,s),"createCustomImageTerminalSessionToken"),finishCustomImageSetupSession:t((e,s={})=>n.post(`/environment-custom-image-setup-sessions/${e}/finish`,s),"finishCustomImageSetupSession"),cancelCustomImageSetupSession:t((e,s={})=>n.post(`/environment-custom-image-setup-sessions/${e}/cancel`,s),"cancelCustomImageSetupSession"),rollbackCustomImageTemplate:t((e,s)=>n.post(`/environments/${e}/custom-image-template/rollback?${m(s)}`,{}),"rollbackCustomImageTemplate"),relinkCustomImageTemplate:t((e,s,o={})=>n.post(`/environments/${e}/custom-image-template/relink?${m(s)}`,{confirmBootSourceDrift:o.confirmBootSourceDrift===!0}),"relinkCustomImageTemplate"),disableCustomImageTemplate:t((e,s,o={})=>n.delete(`/environments/${e}/custom-image-template?${m(s)}&deleteProviderTemplate=${o.deleteProviderTemplate===!0?"true":"false"}`),"disableCustomImageTemplate")};export{p as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as a}from"./boxes-
|
|
1
|
+
import{n as a}from"./boxes-CwMr8JCg.js";var e={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};e.node;var n=a(e),r={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};r.node;var i=a(r);export{n,i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./boxes-
|
|
1
|
+
import{n as e}from"./boxes-CwMr8JCg.js";var a={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};a.node;var r=e(a);export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var o=Object.defineProperty;var r=(t,e)=>o(t,"name",{value:e,configurable:!0});import{Qi as i,ea as n,na as c,qi as h,ra as s}from"./boxes-
|
|
1
|
+
var o=Object.defineProperty;var r=(t,e)=>o(t,"name",{value:e,configurable:!0});import{Qi as i,ea as n,na as c,qi as h,ra as s}from"./boxes-CwMr8JCg.js";var p={get:r(async()=>{const t=await fetch("/api/health",{credentials:"include",headers:{Accept:"application/json"},cache:"no-store"}),e=await n(t);if(!t.ok){const a=s.recoverIfNeeded(t.status,e);if(a)return a;throw new h(e?.error??`Failed to load health (${t.status})`,t.status,e)}if(e?.status!=="ok"&&e?.status!=="starting")throw new i(t.status);return c(e.attachmentLimit),e},"get"),requestDevServerRestart:r(async()=>{const t=await fetch("/api/health/dev-server/restart",{method:"POST",credentials:"include",headers:{Accept:"application/json"}});if(!t.ok){const e=await t.json().catch(()=>null),a=s.recoverIfNeeded(t.status,e);if(a)return a;throw new Error(e?.error??`Failed to request restart (${t.status})`)}},"requestDevServerRestart")};export{p as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var G=Object.defineProperty;var n=(e,t)=>G(e,"name",{value:t,configurable:!0});import{i as q}from"./rolldown-runtime-ZpX3ckPj.js";import{Ha as L,Ji as r,Wa as F,n as E,ra as B}from"./boxes-
|
|
1
|
+
var G=Object.defineProperty;var n=(e,t)=>G(e,"name",{value:t,configurable:!0});import{i as q}from"./rolldown-runtime-ZpX3ckPj.js";import{Ha as L,Ji as r,Wa as F,n as E,ra as B}from"./boxes-CwMr8JCg.js";var M={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};M.node;var Q=E(M),s=q(F(),1),U=q(L(),1),_=(0,s.createContext)(null),A=(0,s.createContext)(null);function X({children:e}){const[t,a]=(0,s.useState)(!1),[o,i]=(0,s.useState)({}),[c,l]=(0,s.useState)(!1),[d,g]=(0,s.useState)(!1),[p,m]=(0,s.useState)({}),[f,h]=(0,s.useState)(!1),[v,w]=(0,s.useState)(!1),[b,$]=(0,s.useState)({}),[S,C]=(0,s.useState)(!1),I=(0,s.useCallback)((u={})=>{i(u),a(!0)},[]),k=(0,s.useCallback)(()=>{a(!1),i({})},[]),O=(0,s.useCallback)(()=>{l(!0)},[]),D=(0,s.useCallback)(()=>{l(!1)},[]),R=(0,s.useCallback)((u={})=>{m(u),g(!0)},[]),P=(0,s.useCallback)(()=>{g(!1),m({})},[]),x=(0,s.useCallback)(()=>{h(!0)},[]),y=(0,s.useCallback)(()=>{h(!1)},[]),N=(0,s.useCallback)((u={})=>{$(u),w(!0)},[]),j=(0,s.useCallback)(()=>{w(!1),$({})},[]),T=(0,s.useMemo)(()=>({newIssueOpen:t,newIssueDefaults:o,newProjectOpen:c,newGoalOpen:d,newGoalDefaults:p,newAgentOpen:f,onboardingOpen:v,onboardingOptions:b,onboardingRouteDismissed:S}),[t,o,c,d,p,f,v,b,S]),z=(0,s.useMemo)(()=>({openNewIssue:I,closeNewIssue:k,openNewProject:O,closeNewProject:D,openNewGoal:R,closeNewGoal:P,openNewAgent:x,closeNewAgent:y,openOnboarding:N,closeOnboarding:j,setOnboardingRouteDismissed:C}),[I,k,O,D,R,P,x,y,N,j,C]);return(0,U.jsx)(A.Provider,{value:z,children:(0,U.jsx)(_.Provider,{value:T,children:e})})}n(X,"DialogProvider");function K(){const e=(0,s.useContext)(A);if(!e)throw new Error("useDialogActions must be used within DialogProvider");return e}n(K,"useDialogActions");function V(){const e=(0,s.useContext)(_);if(!e)throw new Error("useDialogState must be used within DialogProvider");return e}n(V,"useDialogState");function Y(){return{...V(),...K()}}n(Y,"useDialog");var Z={executionForIssue:n(e=>r.get(`/issues/${e}/execution`),"executionForIssue"),list:n((e,t,a,o={})=>{const i=new URLSearchParams;t&&i.set("agentId",t),a&&i.set("limit",String(a)),o.summary&&i.set("summary","true");const c=i.toString();return r.get(`/companies/${e}/heartbeat-runs${c?`?${c}`:""}`)},"list"),get:n(e=>r.get(`/heartbeat-runs/${e}`),"get"),events:n((e,t=0,a=200,o)=>r.get(`/heartbeat-runs/${e}/events?afterSeq=${encodeURIComponent(String(t))}&limit=${encodeURIComponent(String(a))}`,o),"events"),log:n((e,t=0,a=256e3,o)=>r.get(`/heartbeat-runs/${e}/log?offset=${encodeURIComponent(String(t))}&limitBytes=${encodeURIComponent(String(a))}`,o),"log"),workspaceOperations:n(e=>r.get(`/heartbeat-runs/${e}/workspace-operations`),"workspaceOperations"),providerTrace:n(e=>r.get(`/heartbeat-runs/${e}/provider-trace`),"providerTrace"),providerTraceMetadata:n((e,t)=>{const a=new URLSearchParams({runIds:t.slice(0,100).join(",")});return r.get(`/companies/${e}/provider-traces?${a.toString()}`)},"providerTraceMetadata"),revealProviderTraceFrame:n((e,t)=>r.post(`/heartbeat-runs/${e}/provider-trace/frames/${t}/reveal`,{}),"revealProviderTraceFrame"),deleteProviderTrace:n(e=>r.delete(`/heartbeat-runs/${e}/provider-trace`),"deleteProviderTrace"),downloadProviderTrace:n(async e=>{const t=await fetch(`/api/heartbeat-runs/${e}/provider-trace/download`,{credentials:"include",headers:{Accept:"application/x-ndjson"}});if(!t.ok){const a=await t.json().catch(()=>null),o=B.recoverIfNeeded(t.status,a);if(o)return o;throw new Error(a?.error??`Trace download failed: ${t.status}`)}return t.blob()},"downloadProviderTrace"),workspaceOperationLog:n((e,t=0,a=256e3)=>r.get(`/workspace-operations/${e}/log?offset=${encodeURIComponent(String(t))}&limitBytes=${encodeURIComponent(String(a))}`),"workspaceOperationLog"),cancel:n(e=>r.post(`/heartbeat-runs/${e}/cancel`,{}),"cancel"),resolveRuntimeRequest:n(e=>r.post(`/heartbeat-runs/${e.runId}/runtime-requests/${encodeURIComponent(e.requestId)}/resolve`,{turnId:e.turnId,requestKind:e.requestKind,resolution:e.resolution}),"resolveRuntimeRequest"),recordWatchdogDecision:n(e=>r.post(`/heartbeat-runs/${e.runId}/watchdog-decisions`,{decision:e.decision,evaluationIssueId:e.evaluationIssueId??null,reason:e.reason??null,snoozedUntil:e.snoozedUntil??null}),"recordWatchdogDecision"),liveRunsForIssue:n(e=>r.get(`/issues/${e}/live-runs`),"liveRunsForIssue"),activeRunForIssue:n(e=>r.get(`/issues/${e}/active-run`),"activeRunForIssue"),liveRunsForCompany:n((e,t)=>{const a=new URLSearchParams;typeof t=="number"?a.set("minCount",String(t)):t&&(t.minCount&&a.set("minCount",String(t.minCount)),t.limit&&a.set("limit",String(t.limit)),t.distinctTasks&&a.set("distinctTasks","true"));const o=a.toString();return r.get(`/companies/${e}/live-runs${o?`?${o}`:""}`)},"liveRunsForCompany")};export{V as a,K as i,X as n,Q as o,Y as r,Z as t};
|