@tickernelz/paperclip-pro-ui 2026.1017.2 → 2026.1018.0

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.
Files changed (51) hide show
  1. package/dist/assets/{AgentAvatar-Cy7DadMK.js → AgentAvatar-rZFrG-iC.js} +1 -1
  2. package/dist/assets/{Agents.production-BJyEbiQk.js → Agents.production-uSJFITvi.js} +2 -2
  3. package/dist/assets/{BreadcrumbContext-CIC8QOSJ.js → BreadcrumbContext-za5ULJSm.js} +2 -2
  4. package/dist/assets/{CompanyActivity.production-Dp4ldx4P.js → CompanyActivity.production-fp0biOpS.js} +1 -1
  5. package/dist/assets/{CompanyExport-BBAKbfHg.js → CompanyExport-IOz8ZA8x.js} +2 -2
  6. package/dist/assets/{CompanySkills.production-XuOHqAg6.js → CompanySkills.production-CffIe8qr.js} +2 -2
  7. package/dist/assets/{EmptyState-Dvu_j1Dk.js → EmptyState-BJJPfoYe.js} +1 -1
  8. package/dist/assets/{MarkdownBody-Dh6kczcO.js → MarkdownBody-C4hEmflc.js} +3 -3
  9. package/dist/assets/{MarkdownEditor-nPcj3w4g.js → MarkdownEditor-DBC64_fF.js} +1 -1
  10. package/dist/assets/{OrgChart.production-B-U1K3BO.js → OrgChart.production-CjZIrTL_.js} +1 -1
  11. package/dist/assets/{PageSkeleton-B858kNMV.js → PageSkeleton-D-vmgL0l.js} +1 -1
  12. package/dist/assets/{RoutineDetail.production-DR37hdFP.js → RoutineDetail.production-1l07aNMo.js} +1 -1
  13. package/dist/assets/{RoutineRunVariablesDialog-TmqPj_PL.js → RoutineRunVariablesDialog-B8lrS2FZ.js} +2 -2
  14. package/dist/assets/{Routines.production-D4Jwvus7.js → Routines.production-D87FWVo9.js} +1 -1
  15. package/dist/assets/{StatusIcon-PIDWeOS3.js → StatusIcon-t9uPRpE5.js} +1 -1
  16. package/dist/assets/{ToastContext-B6w8XXdu.js → ToastContext-fIh2QNZJ.js} +1 -1
  17. package/dist/assets/{agent-avatar-url-Dp-4-Emx.js → agent-avatar-url-BHbCsFus.js} +21 -21
  18. package/dist/assets/{alert-dialog-Cgn1_GT7.js → alert-dialog-BQZoePYb.js} +1 -1
  19. package/dist/assets/{arrow-right-Dblp-MTW.js → arrow-right-BzMD-DNO.js} +1 -1
  20. package/dist/assets/{badge-B6lcLGFG.js → badge-dcpUmKh9.js} +1 -1
  21. package/dist/assets/{bot-BIsZWSPn.js → bot-DoEo7gOa.js} +1 -1
  22. package/dist/assets/{card-Byu34cBe.js → card-mNYVrsX_.js} +1 -1
  23. package/dist/assets/{check-AN9f-5s7.js → check-BkartoVa.js} +1 -1
  24. package/dist/assets/{checkbox-DVrU8RYw.js → checkbox-JP8qevXt.js} +1 -1
  25. package/dist/assets/{clipboard-Bj1LrAus.js → clipboard-Bz_p8QHy.js} +1 -1
  26. package/dist/assets/{company-members-B3Kl56Wi.js → company-members-rOuXjQRg.js} +1 -1
  27. package/dist/assets/{definition-DSY4nExe.js → definition-dyCYbBA7.js} +1 -1
  28. package/dist/assets/{dist-qobNlkwf.js → dist-CI0Tr-Id.js} +1 -1
  29. package/dist/assets/{dist-BoN0lntx.js → dist-CMclhGEN.js} +1 -1
  30. package/dist/assets/{dist-DNeg6Olm.js → dist-D2Bp7-l0.js} +1 -1
  31. package/dist/assets/{environments-CnsaRGwX.js → environments-BIMSsOem.js} +1 -1
  32. package/dist/assets/{external-link-DJ5KXpF5.js → external-link-CUBJORqK.js} +1 -1
  33. package/dist/assets/{file-text-BqJfYVg5.js → file-text-CTqnIoYc.js} +1 -1
  34. package/dist/assets/{health-DXJ-aWLi.js → health-DzPZ7RTI.js} +1 -1
  35. package/dist/assets/{heartbeats-BoD7FLml.js → heartbeats-cR8PFCO4.js} +1 -1
  36. package/dist/assets/{index-BVwUuuxT.js → index-BQ6k9M0h.js} +159 -159
  37. package/dist/assets/{input-BGjNwUvf.js → input-DWDEF0_4.js} +1 -1
  38. package/dist/assets/{label-CKJXPwWx.js → label-D1IFWYWZ.js} +2 -2
  39. package/dist/assets/{mention-chips-BovBgzq0.js → mention-chips-tvFPtLxM.js} +1 -1
  40. package/dist/assets/{rotate-ccw-B7ntLtp4.js → rotate-ccw-CIoC0n9j.js} +1 -1
  41. package/dist/assets/{select-DIma4_VX.js → select-DDOAq1-R.js} +1 -1
  42. package/dist/assets/{sheet-C9tsiOQC.js → sheet-De2PrRU3.js} +1 -1
  43. package/dist/assets/skeleton-BBZG3C3Z.js +1 -0
  44. package/dist/assets/{tabs-nc-7quf8.js → tabs-DNtO_nZK.js} +1 -1
  45. package/dist/assets/{use-adapter-capabilities-DiUfxjZz.js → use-adapter-capabilities-BHmVN8eS.js} +1 -1
  46. package/dist/assets/{use-copy-action-RWCAx8p8.js → use-copy-action-CEHlaOnX.js} +1 -1
  47. package/dist/assets/{useHiddenSettings-Be7MTSIM.js → useHiddenSettings-tTY86zjx.js} +1 -1
  48. package/dist/index.html +39 -39
  49. package/dist/sw.js +1 -1
  50. package/package.json +1 -1
  51. package/dist/assets/skeleton-CyS6Uq5n.js +0 -1
@@ -1,4 +1,4 @@
1
- var On=Object.defineProperty;var a=(e,t)=>On(e,"name",{value:t,configurable:!0});import{i as jt}from"./rolldown-runtime-ZpX3ckPj.js";import{Ba as jn,Fi as Bn,G as K,Gi as Bt,Ha as Nn,Ji as zn,Ki as d,Or as Fn,P as qn,St as de,a as Hn,c as Wn,ht as Vn,kr as st,l as Kn,n as k,oa as Qn,pt as Jn,qi as Gn,r as Yn,t as Zn,u as Xn,za as ea}from"./agent-avatar-url-Dp-4-Emx.js";import{t as ta}from"./preload-helper-CceJXRIF.js";var l=jt(Nn(),1),We=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Nt=/^[\\/]{2}/;function ra(e,t){return t+e.replace(/\\/g,"/")}a(ra,"normalizeProtocolRelativeUrl");var it="popstate";function lt(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}a(lt,"isLocation");function na(e={}){function t(n,o){let s=o.state?.masked,{pathname:i,search:u,hash:c}=s||n.location;return Oe("",{pathname:i,search:u,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default",s?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}a(t,"createBrowserLocation");function r(n,o){return typeof o=="string"?o:Q(o)}return a(r,"createBrowserHref"),oa(t,r,null,e)}a(na,"createBrowserHistory");function $(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}a($,"invariant");function M(e,t){if(!e)try{throw new Error(t)}catch{}}a(M,"warning");function aa(){return Math.random().toString(36).substring(2,10)}a(aa,"createKey");function ut(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}a(ut,"getHistoryState");function Oe(e,t,r=null,n,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?te(t):t,state:r,key:t&&t.key||n||aa(),mask:o}}a(Oe,"createLocation");function Q({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}a(Q,"createPath");function te(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}a(te,"parsePath");function oa(e,t,r,n={}){let{window:o=document.defaultView,v5Compat:s=!1}=n,i=o.history,u="POP",c=null,m=p();m==null&&(m=0,i.replaceState({...i.state,idx:m},""));function p(){return(i.state||{idx:null}).idx}a(p,"getIndex");function f(){u="POP";let h=p(),x=h==null?null:h-m;m=h,c&&c({action:u,location:y.location,delta:x})}a(f,"handlePop");function g(h,x){u="PUSH";let w=lt(h)?h:Oe(y.location,h,x);r&&r(w,h),m=p()+1;let I=ut(w,m),_=y.createHref(w.mask||w);try{i.pushState(I,"",_)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(_)}s&&c&&c({action:u,location:y.location,delta:1})}a(g,"push");function b(h,x){u="REPLACE";let w=lt(h)?h:Oe(y.location,h,x);r&&r(w,h),m=p();let I=ut(w,m),_=y.createHref(w.mask||w);i.replaceState(I,"",_),s&&c&&c({action:u,location:y.location,delta:0})}a(b,"replace2");function v(h){return sa(o,h)}a(v,"createURL");let y={get action(){return u},get location(){return e(o,i)},listen(h){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(it,f),c=h,()=>{o.removeEventListener(it,f),c=null}},createHref(h){return t(o,h)},createURL:v,encodeLocation(h){let x=v(h);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:g,replace:b,go(h){return i.go(h)}};return y}a(oa,"getUrlBasedHistory");function sa(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),$(n,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:Q(t);return o=o.replace(/ $/,"%20"),!r&&Nt.test(o)&&(o=n+o),new URL(o,n)}a(sa,"createBrowserURLImpl");var ia;ia=new WeakMap;function zt(e,t,r="/"){return Ft(e,t,r,!1)}a(zt,"matchRoutes");function Ft(e,t,r,n,o){let s=q((typeof t=="string"?te(t):t).pathname||"/",r);if(s==null)return null;let i=o??ua(e),u=null,c=ka(s);for(let m=0;u==null&&m<i.length;++m)u=ba(i[m],c,n);return u}a(Ft,"matchRoutesImpl");function la(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],loaderData:t[r.id],handle:r.handle}}a(la,"convertRouteMatchToUiMatch");function ua(e){let t=qt(e);return ca(t),t}a(ua,"flattenAndRankRoutes");function qt(e,t=[],r=[],n="",o=!1){let s=a((i,u,c=o,m)=>{let p={relativePath:m===void 0?i.path||"":m,caseSensitive:i.caseSensitive===!0,childrenIndex:u,route:i};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(n)&&c)return;$(p.relativePath.startsWith(n),`Absolute route path "${p.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(n.length)}let f=B([n,p.relativePath]),g=r.concat(p);i.children&&i.children.length>0&&($(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),qt(i.children,t,g,f,c)),!(i.path==null&&!i.index)&&t.push({path:f,score:ya(f,i.index),routesMeta:g.map((b,v)=>{let[y,h]=Vt(b.relativePath,b.caseSensitive,v===g.length-1);return{...b,matcher:y,compiledParams:h}})})},"flattenRoute");return e.forEach((i,u)=>{if(i.path===""||!i.path?.includes("?"))s(i,u);else for(let c of Ht(i.path))s(i,u,!0,c)}),t}a(qt,"flattenRoutes");function Ht(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return o?[s,""]:[s];let i=Ht(n.join("/")),u=[];return u.push(...i.map(c=>c===""?s:[s,c].join("/"))),o&&u.push(...i),u.map(c=>e.startsWith("/")&&c===""?"/":c)}a(Ht,"explodeOptionalSegments");function ca(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:va(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}a(ca,"rankRouteBranches");var da=/^:[\w-]+$/,ma=3,fa=2,pa=1,ha=10,ga=-2,ct=a(e=>e==="*","isSplat");function ya(e,t){let r=e.split("/"),n=r.length;return r.some(ct)&&(n+=ga),t&&(n+=fa),r.filter(o=>!ct(o)).reduce((o,s)=>o+(da.test(s)?ma:s===""?pa:ha),n)}a(ya,"computeScore");function va(e,t){return e.length===t.length&&e.slice(0,-1).every((r,n)=>r===t[n])?e[e.length-1]-t[t.length-1]:0}a(va,"compareIndexes");function ba(e,t,r=!1){let{routesMeta:n}=e,o={},s="/",i=[];for(let u=0;u<n.length;++u){let c=n[u],m=u===n.length-1,p=s==="/"?t:t.slice(s.length)||"/",f={path:c.relativePath,caseSensitive:c.caseSensitive,end:m},g=c.matcher&&c.compiledParams?Wt(f,p,c.matcher,c.compiledParams):xe(f,p),b=c.route;if(!g&&m&&r&&!n[n.length-1].route.index&&(g=xe({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},p)),!g)return null;Object.assign(o,g.params),i.push({params:o,pathname:B([s,g.pathname]),pathnameBase:Ia(B([s,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(s=B([s,g.pathnameBase]))}return i}a(ba,"matchRouteBranch");function xe(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Vt(e.path,e.caseSensitive,e.end);return Wt(e,t,r,n)}a(xe,"matchPath");function Wt(e,t,r,n){let o=t.match(r);if(!o)return null;let s=o[0],i=X(s,1),u=o.slice(1);return{params:n.reduce((c,{paramName:m,isOptional:p},f)=>{if(m==="*"){let b=u[f]||"";i=X(s.slice(0,s.length-b.length),1)}const g=u[f];return p&&!g?c[m]=void 0:c[m]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:i,pattern:e}}a(Wt,"matchPathImpl");function Vt(e,t=!1,r=!0){M(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,i,u,c,m)=>{if(n.push({paramName:i,isOptional:u!=null}),u){let p=m.charAt(c+s.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}a(Vt,"compilePath");function ka(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return M(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}a(ka,"decodePath");function q(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}a(q,"stripBasename");function xa(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?te(e):e,s;return r?(r=Kt(r),r.startsWith("/")||r.startsWith("\\")?s=dt(r.substring(1),"/"):s=dt(r,t)):s=t,{pathname:s,search:Sa(n),hash:Ra(o)}}a(xa,"resolvePath");function dt(e,t){let r=X(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}a(dt,"resolvePathname");function Le(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}a(Le,"getInvalidPathError");function wa(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}a(wa,"getPathContributingMatches");function Ve(e){let t=wa(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}a(Ve,"getResolveToMatches");function Re(e,t,r,n=!1){let o;typeof e=="string"?o=te(e):(o={...e},$(!o.pathname||!o.pathname.includes("?"),Le("?","pathname","search",o)),$(!o.pathname||!o.pathname.includes("#"),Le("#","pathname","hash",o)),$(!o.search||!o.search.includes("#"),Le("#","search","hash",o)));let s=e===""||o.pathname==="",i=s?"/":o.pathname,u;if(i==null)u=r;else{let f=t.length-1;if(!n&&i.startsWith("..")){let g=i.split("/");for(;g[0]==="..";)g.shift(),f-=1;o.pathname=g.join("/")}u=f>=0?t[f]:"/"}let c=xa(o,u),m=i&&i!=="/"&&i.endsWith("/"),p=(s||i===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(m||p)&&(c.pathname+="/"),c}a(Re,"resolveTo$1");var Kt=a(e=>e.replace(/[\\/]{2,}/g,"/"),"removeDoubleSlashes"),B=a(e=>Kt(e.join("/")),"joinPaths");function X(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}a(X,"removeTrailingSlash");var Ia=a(e=>X(e).replace(/^\/*/,"/"),"normalizePathname"),Sa=a(e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,"normalizeSearch"),Ra=a(e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,"normalizeHash"),Ca=class{static{a(this,"ErrorResponseImpl")}constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Qt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}a(Qt,"isRouteErrorResponse");function Ea(e){return B(e.map(t=>t.route.path).filter(Boolean))||"/"}a(Ea,"getRoutePattern");var Jt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Gt(e,t){let r=e;if(typeof r!="string"||!We.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,o=!1;if(Jt)try{let s=new URL(window.location.href),i=Nt.test(r)?new URL(ra(r,s.protocol)):new URL(r),u=q(i.pathname,t);i.origin===s.origin&&u!=null?r=u+i.search+i.hash:o=!0}catch{M(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:o,to:r}}a(Gt,"parseToInfo");var Ji=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),mt=new URL("http://localhost");function Ke(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),mt)}catch{return mt}}a(Ke,"getNavigatorCurrentUrl");function Me(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}a(Me,"isSameOrigin");function $a(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}a($a,"isExplicitUrl");function Qe(e,t,r,n){let o=null;try{o=e==null?null:new URL(e,r)}catch{}let s=new URL(t,r),i=o!=null&&!Me(o,r),u=!Me(s,r);if(n==="reject"){if(i||u)throw new Error("External navigation is not allowed")}else if(u&&(o==null||!$a(e,o)||!Me(o,s)))throw new Error("External navigation is not allowed")}a(Qe,"validateNavigationTarget");var Yt=["POST","PUT","PATCH","DELETE"],Gi=new Set(Yt),_a=["GET",...Yt],Yi=new Set(_a),Aa,Da,Pa,La;Aa=new WeakMap;Da=new WeakMap;Pa=new WeakMap;La=new WeakMap;var Ma=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Ta(e){try{return Ma.includes(new URL(e).protocol)}catch{return!1}}a(Ta,"hasInvalidProtocol");var re=l.createContext(null);re.displayName="DataRouter";var me=l.createContext(null);me.displayName="DataRouterState";var Zt=l.createContext(!1);function Xt(){return l.useContext(Zt)}a(Xt,"useIsRSCRouterContext");var er=l.createContext({isTransitioning:!1});er.displayName="ViewTransition";var Ua=l.createContext(new Map);Ua.displayName="Fetchers";var je=l.createContext(null);je.displayName="Await";var P=l.createContext(null);P.displayName="Navigation";var ne=l.createContext(null);ne.displayName="Location";var O=l.createContext({outlet:null,matches:[],isDataRoute:!1});O.displayName="Route";var Je=l.createContext(null);Je.displayName="RouteError";var tr="REACT_ROUTER_ERROR",Oa="REDIRECT",ja="ROUTE_ERROR_RESPONSE";function Ba(e){if(e.startsWith(`${tr}:${Oa}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}a(Ba,"decodeRedirectErrorDigest");function Na(e){if(e.startsWith(`${tr}:${ja}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Ca(t.status,t.statusText,t.data)}catch{}}a(Na,"decodeRouteErrorResponseDigest");function za(e,{relative:t}={}){$(ae(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=l.useContext(P),{hash:o,pathname:s,search:i}=fe(e,{relative:t}),u=s;return r!=="/"&&(u=s==="/"?r:B([r,s])),n.createHref({pathname:u,search:i,hash:o})}a(za,"useHref");function ae(){return l.useContext(ne)!=null}a(ae,"useInRouterContext");function T(){return $(ae(),"useLocation() may be used only in the context of a <Router> component."),l.useContext(ne).location}a(T,"useLocation");function Zi(){return l.useContext(ne).navigationType}a(Zi,"useNavigationType");var rr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function nr(e){l.useContext(P).static||l.useLayoutEffect(e)}a(nr,"useIsomorphicLayoutEffect");function Ce(){let{isDataRoute:e}=l.useContext(O);return e?no():Fa()}a(Ce,"useNavigate$1");function Fa(){$(ae(),"useNavigate() may be used only in the context of a <Router> component.");let e=l.useContext(re),{basename:t,navigator:r}=l.useContext(P),{matches:n}=l.useContext(O),{pathname:o}=T(),s=JSON.stringify(Ve(n)),i=l.useRef(!1);return nr(()=>{i.current=!0}),l.useCallback((u,c={})=>{if(M(i.current,rr),!i.current)return;if(typeof u=="number"){r.go(u);return}let m=Re(u,JSON.parse(s),o,c.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:B([t,m.pathname])),Qe(typeof u=="string"?u:Q(u),r.createHref(m),Ke(r),"reject"),(c.replace?r.replace:r.push)(m,c.state,c)},[t,r,s,o,e])}a(Fa,"useNavigateUnstable");var qa=l.createContext(null);function Ha(e){let t=l.useContext(O).outlet;return l.useMemo(()=>t&&l.createElement(qa.Provider,{value:e},t),[t,e])}a(Ha,"useOutlet");function Wa(){let{matches:e}=l.useContext(O);return e[e.length-1]?.params??{}}a(Wa,"useParams");function fe(e,{relative:t}={}){let{matches:r}=l.useContext(O),{pathname:n}=T(),o=JSON.stringify(Ve(r));return l.useMemo(()=>Re(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}a(fe,"useResolvedPath");function Va(e,t){return ar(e,t)}a(Va,"useRoutes");function ar(e,t,r){$(ae(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=l.useContext(P),{matches:o}=l.useContext(O),s=o[o.length-1],i=s?s.params:{},u=s?s.pathname:"/",c=s?s.pathnameBase:"/",m=s&&s.route;{let h=m&&m.path||"";ir(u,!m||h.endsWith("*")||h.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${h}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
1
+ var On=Object.defineProperty;var a=(e,t)=>On(e,"name",{value:t,configurable:!0});import{i as jt}from"./rolldown-runtime-ZpX3ckPj.js";import{Ba as jn,G as K,Ii as Bn,Ji as Nn,Ki as Bt,Or as zn,P as Fn,St as de,Ua as qn,Va as Hn,Yi as Wn,a as Vn,c as Kn,ht as Qn,kr as st,l as Jn,n as k,pt as Gn,qi as d,r as Yn,sa as Zn,t as Xn,u as ea}from"./agent-avatar-url-BHbCsFus.js";import{t as ta}from"./preload-helper-CceJXRIF.js";var l=jt(qn(),1),We=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Nt=/^[\\/]{2}/;function ra(e,t){return t+e.replace(/\\/g,"/")}a(ra,"normalizeProtocolRelativeUrl");var it="popstate";function lt(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}a(lt,"isLocation");function na(e={}){function t(n,o){let s=o.state?.masked,{pathname:i,search:u,hash:c}=s||n.location;return Oe("",{pathname:i,search:u,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default",s?{pathname:n.location.pathname,search:n.location.search,hash:n.location.hash}:void 0)}a(t,"createBrowserLocation");function r(n,o){return typeof o=="string"?o:Q(o)}return a(r,"createBrowserHref"),oa(t,r,null,e)}a(na,"createBrowserHistory");function $(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}a($,"invariant");function M(e,t){if(!e)try{throw new Error(t)}catch{}}a(M,"warning");function aa(){return Math.random().toString(36).substring(2,10)}a(aa,"createKey");function ut(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}a(ut,"getHistoryState");function Oe(e,t,r=null,n,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?te(t):t,state:r,key:t&&t.key||n||aa(),mask:o}}a(Oe,"createLocation");function Q({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}a(Q,"createPath");function te(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}a(te,"parsePath");function oa(e,t,r,n={}){let{window:o=document.defaultView,v5Compat:s=!1}=n,i=o.history,u="POP",c=null,m=p();m==null&&(m=0,i.replaceState({...i.state,idx:m},""));function p(){return(i.state||{idx:null}).idx}a(p,"getIndex");function f(){u="POP";let h=p(),x=h==null?null:h-m;m=h,c&&c({action:u,location:y.location,delta:x})}a(f,"handlePop");function g(h,x){u="PUSH";let w=lt(h)?h:Oe(y.location,h,x);r&&r(w,h),m=p()+1;let I=ut(w,m),_=y.createHref(w.mask||w);try{i.pushState(I,"",_)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;o.location.assign(_)}s&&c&&c({action:u,location:y.location,delta:1})}a(g,"push");function b(h,x){u="REPLACE";let w=lt(h)?h:Oe(y.location,h,x);r&&r(w,h),m=p();let I=ut(w,m),_=y.createHref(w.mask||w);i.replaceState(I,"",_),s&&c&&c({action:u,location:y.location,delta:0})}a(b,"replace2");function v(h){return sa(o,h)}a(v,"createURL");let y={get action(){return u},get location(){return e(o,i)},listen(h){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(it,f),c=h,()=>{o.removeEventListener(it,f),c=null}},createHref(h){return t(o,h)},createURL:v,encodeLocation(h){let x=v(h);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:g,replace:b,go(h){return i.go(h)}};return y}a(oa,"getUrlBasedHistory");function sa(e,t,r=!1){let n="http://localhost";e&&(n=e.location.origin!=="null"?e.location.origin:e.location.href),$(n,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:Q(t);return o=o.replace(/ $/,"%20"),!r&&Nt.test(o)&&(o=n+o),new URL(o,n)}a(sa,"createBrowserURLImpl");var ia;ia=new WeakMap;function zt(e,t,r="/"){return Ft(e,t,r,!1)}a(zt,"matchRoutes");function Ft(e,t,r,n,o){let s=q((typeof t=="string"?te(t):t).pathname||"/",r);if(s==null)return null;let i=o??ua(e),u=null,c=ka(s);for(let m=0;u==null&&m<i.length;++m)u=ba(i[m],c,n);return u}a(Ft,"matchRoutesImpl");function la(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],loaderData:t[r.id],handle:r.handle}}a(la,"convertRouteMatchToUiMatch");function ua(e){let t=qt(e);return ca(t),t}a(ua,"flattenAndRankRoutes");function qt(e,t=[],r=[],n="",o=!1){let s=a((i,u,c=o,m)=>{let p={relativePath:m===void 0?i.path||"":m,caseSensitive:i.caseSensitive===!0,childrenIndex:u,route:i};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(n)&&c)return;$(p.relativePath.startsWith(n),`Absolute route path "${p.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(n.length)}let f=B([n,p.relativePath]),g=r.concat(p);i.children&&i.children.length>0&&($(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),qt(i.children,t,g,f,c)),!(i.path==null&&!i.index)&&t.push({path:f,score:ya(f,i.index),routesMeta:g.map((b,v)=>{let[y,h]=Vt(b.relativePath,b.caseSensitive,v===g.length-1);return{...b,matcher:y,compiledParams:h}})})},"flattenRoute");return e.forEach((i,u)=>{if(i.path===""||!i.path?.includes("?"))s(i,u);else for(let c of Ht(i.path))s(i,u,!0,c)}),t}a(qt,"flattenRoutes");function Ht(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return o?[s,""]:[s];let i=Ht(n.join("/")),u=[];return u.push(...i.map(c=>c===""?s:[s,c].join("/"))),o&&u.push(...i),u.map(c=>e.startsWith("/")&&c===""?"/":c)}a(Ht,"explodeOptionalSegments");function ca(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:va(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}a(ca,"rankRouteBranches");var da=/^:[\w-]+$/,ma=3,fa=2,pa=1,ha=10,ga=-2,ct=a(e=>e==="*","isSplat");function ya(e,t){let r=e.split("/"),n=r.length;return r.some(ct)&&(n+=ga),t&&(n+=fa),r.filter(o=>!ct(o)).reduce((o,s)=>o+(da.test(s)?ma:s===""?pa:ha),n)}a(ya,"computeScore");function va(e,t){return e.length===t.length&&e.slice(0,-1).every((r,n)=>r===t[n])?e[e.length-1]-t[t.length-1]:0}a(va,"compareIndexes");function ba(e,t,r=!1){let{routesMeta:n}=e,o={},s="/",i=[];for(let u=0;u<n.length;++u){let c=n[u],m=u===n.length-1,p=s==="/"?t:t.slice(s.length)||"/",f={path:c.relativePath,caseSensitive:c.caseSensitive,end:m},g=c.matcher&&c.compiledParams?Wt(f,p,c.matcher,c.compiledParams):xe(f,p),b=c.route;if(!g&&m&&r&&!n[n.length-1].route.index&&(g=xe({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},p)),!g)return null;Object.assign(o,g.params),i.push({params:o,pathname:B([s,g.pathname]),pathnameBase:Ia(B([s,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(s=B([s,g.pathnameBase]))}return i}a(ba,"matchRouteBranch");function xe(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Vt(e.path,e.caseSensitive,e.end);return Wt(e,t,r,n)}a(xe,"matchPath");function Wt(e,t,r,n){let o=t.match(r);if(!o)return null;let s=o[0],i=X(s,1),u=o.slice(1);return{params:n.reduce((c,{paramName:m,isOptional:p},f)=>{if(m==="*"){let b=u[f]||"";i=X(s.slice(0,s.length-b.length),1)}const g=u[f];return p&&!g?c[m]=void 0:c[m]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:i,pattern:e}}a(Wt,"matchPathImpl");function Vt(e,t=!1,r=!0){M(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,i,u,c,m)=>{if(n.push({paramName:i,isOptional:u!=null}),u){let p=m.charAt(c+s.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}a(Vt,"compilePath");function ka(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return M(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}a(ka,"decodePath");function q(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}a(q,"stripBasename");function xa(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?te(e):e,s;return r?(r=Kt(r),r.startsWith("/")||r.startsWith("\\")?s=dt(r.substring(1),"/"):s=dt(r,t)):s=t,{pathname:s,search:Sa(n),hash:Ra(o)}}a(xa,"resolvePath");function dt(e,t){let r=X(t).split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}a(dt,"resolvePathname");function Le(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}a(Le,"getInvalidPathError");function wa(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}a(wa,"getPathContributingMatches");function Ve(e){let t=wa(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}a(Ve,"getResolveToMatches");function Re(e,t,r,n=!1){let o;typeof e=="string"?o=te(e):(o={...e},$(!o.pathname||!o.pathname.includes("?"),Le("?","pathname","search",o)),$(!o.pathname||!o.pathname.includes("#"),Le("#","pathname","hash",o)),$(!o.search||!o.search.includes("#"),Le("#","search","hash",o)));let s=e===""||o.pathname==="",i=s?"/":o.pathname,u;if(i==null)u=r;else{let f=t.length-1;if(!n&&i.startsWith("..")){let g=i.split("/");for(;g[0]==="..";)g.shift(),f-=1;o.pathname=g.join("/")}u=f>=0?t[f]:"/"}let c=xa(o,u),m=i&&i!=="/"&&i.endsWith("/"),p=(s||i===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(m||p)&&(c.pathname+="/"),c}a(Re,"resolveTo$1");var Kt=a(e=>e.replace(/[\\/]{2,}/g,"/"),"removeDoubleSlashes"),B=a(e=>Kt(e.join("/")),"joinPaths");function X(e,t=0){let r=e.length;for(;r>t&&e.charCodeAt(r-1)===47;)r--;return r===e.length?e:e.slice(0,r)}a(X,"removeTrailingSlash");var Ia=a(e=>X(e).replace(/^\/*/,"/"),"normalizePathname"),Sa=a(e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,"normalizeSearch"),Ra=a(e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,"normalizeHash"),Ca=class{static{a(this,"ErrorResponseImpl")}constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Qt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}a(Qt,"isRouteErrorResponse");function Ea(e){return B(e.map(t=>t.route.path).filter(Boolean))||"/"}a(Ea,"getRoutePattern");var Jt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Gt(e,t){let r=e;if(typeof r!="string"||!We.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,o=!1;if(Jt)try{let s=new URL(window.location.href),i=Nt.test(r)?new URL(ra(r,s.protocol)):new URL(r),u=q(i.pathname,t);i.origin===s.origin&&u!=null?r=u+i.search+i.hash:o=!0}catch{M(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:o,to:r}}a(Gt,"parseToInfo");var Ji=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),mt=new URL("http://localhost");function Ke(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),mt)}catch{return mt}}a(Ke,"getNavigatorCurrentUrl");function Me(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}a(Me,"isSameOrigin");function $a(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}a($a,"isExplicitUrl");function Qe(e,t,r,n){let o=null;try{o=e==null?null:new URL(e,r)}catch{}let s=new URL(t,r),i=o!=null&&!Me(o,r),u=!Me(s,r);if(n==="reject"){if(i||u)throw new Error("External navigation is not allowed")}else if(u&&(o==null||!$a(e,o)||!Me(o,s)))throw new Error("External navigation is not allowed")}a(Qe,"validateNavigationTarget");var Yt=["POST","PUT","PATCH","DELETE"],Gi=new Set(Yt),_a=["GET",...Yt],Yi=new Set(_a),Aa,Da,Pa,La;Aa=new WeakMap;Da=new WeakMap;Pa=new WeakMap;La=new WeakMap;var Ma=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Ta(e){try{return Ma.includes(new URL(e).protocol)}catch{return!1}}a(Ta,"hasInvalidProtocol");var re=l.createContext(null);re.displayName="DataRouter";var me=l.createContext(null);me.displayName="DataRouterState";var Zt=l.createContext(!1);function Xt(){return l.useContext(Zt)}a(Xt,"useIsRSCRouterContext");var er=l.createContext({isTransitioning:!1});er.displayName="ViewTransition";var Ua=l.createContext(new Map);Ua.displayName="Fetchers";var je=l.createContext(null);je.displayName="Await";var P=l.createContext(null);P.displayName="Navigation";var ne=l.createContext(null);ne.displayName="Location";var O=l.createContext({outlet:null,matches:[],isDataRoute:!1});O.displayName="Route";var Je=l.createContext(null);Je.displayName="RouteError";var tr="REACT_ROUTER_ERROR",Oa="REDIRECT",ja="ROUTE_ERROR_RESPONSE";function Ba(e){if(e.startsWith(`${tr}:${Oa}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}a(Ba,"decodeRedirectErrorDigest");function Na(e){if(e.startsWith(`${tr}:${ja}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Ca(t.status,t.statusText,t.data)}catch{}}a(Na,"decodeRouteErrorResponseDigest");function za(e,{relative:t}={}){$(ae(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=l.useContext(P),{hash:o,pathname:s,search:i}=fe(e,{relative:t}),u=s;return r!=="/"&&(u=s==="/"?r:B([r,s])),n.createHref({pathname:u,search:i,hash:o})}a(za,"useHref");function ae(){return l.useContext(ne)!=null}a(ae,"useInRouterContext");function T(){return $(ae(),"useLocation() may be used only in the context of a <Router> component."),l.useContext(ne).location}a(T,"useLocation");function Zi(){return l.useContext(ne).navigationType}a(Zi,"useNavigationType");var rr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function nr(e){l.useContext(P).static||l.useLayoutEffect(e)}a(nr,"useIsomorphicLayoutEffect");function Ce(){let{isDataRoute:e}=l.useContext(O);return e?no():Fa()}a(Ce,"useNavigate$1");function Fa(){$(ae(),"useNavigate() may be used only in the context of a <Router> component.");let e=l.useContext(re),{basename:t,navigator:r}=l.useContext(P),{matches:n}=l.useContext(O),{pathname:o}=T(),s=JSON.stringify(Ve(n)),i=l.useRef(!1);return nr(()=>{i.current=!0}),l.useCallback((u,c={})=>{if(M(i.current,rr),!i.current)return;if(typeof u=="number"){r.go(u);return}let m=Re(u,JSON.parse(s),o,c.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:B([t,m.pathname])),Qe(typeof u=="string"?u:Q(u),r.createHref(m),Ke(r),"reject"),(c.replace?r.replace:r.push)(m,c.state,c)},[t,r,s,o,e])}a(Fa,"useNavigateUnstable");var qa=l.createContext(null);function Ha(e){let t=l.useContext(O).outlet;return l.useMemo(()=>t&&l.createElement(qa.Provider,{value:e},t),[t,e])}a(Ha,"useOutlet");function Wa(){let{matches:e}=l.useContext(O);return e[e.length-1]?.params??{}}a(Wa,"useParams");function fe(e,{relative:t}={}){let{matches:r}=l.useContext(O),{pathname:n}=T(),o=JSON.stringify(Ve(r));return l.useMemo(()=>Re(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}a(fe,"useResolvedPath");function Va(e,t){return ar(e,t)}a(Va,"useRoutes");function ar(e,t,r){$(ae(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=l.useContext(P),{matches:o}=l.useContext(O),s=o[o.length-1],i=s?s.params:{},u=s?s.pathname:"/",c=s?s.pathnameBase:"/",m=s&&s.route;{let h=m&&m.path||"";ir(u,!m||h.endsWith("*")||h.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${h}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
2
2
 
3
3
  Please change the parent <Route path="${h}"> to <Route path="${h==="/"?"*":`${h}/*`}">.`)}let p=T(),f;if(t){let h=typeof t=="string"?te(t):t;$(c==="/"||h.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${h.pathname}" was given in the \`location\` prop.`),f=h}else f=p;let g=f.pathname||"/",b=g;if(c!=="/"){let h=c.replace(/^\//,"").split("/");b="/"+g.replace(/^\//,"").split("/").slice(h.length).join("/")}let v=r&&r.state.matches.length?r.state.matches.map(h=>Object.assign(h,{route:r.manifest[h.route.id]||h.route})):zt(e,{pathname:b});M(m||v!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),M(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=Ya(v&&v.map(h=>Object.assign({},h,{params:Object.assign({},i,h.params),pathname:B([c,n.encodeLocation?n.encodeLocation(h.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?c:B([c,n.encodeLocation?n.encodeLocation(h.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:h.pathnameBase])})),o,r);return t&&y?l.createElement(ne.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...f},navigationType:"POP"}},y):y}a(ar,"useRoutesImpl");function Ka(){let e=ro(),t=Qt(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},i=null;return i=l.createElement(l.Fragment,null,l.createElement("p",null,"💿 Hey developer 👋"),l.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",l.createElement("code",{style:s},"ErrorBoundary")," or"," ",l.createElement("code",{style:s},"errorElement")," prop on your route.")),l.createElement(l.Fragment,null,l.createElement("h2",null,"Unexpected Application Error!"),l.createElement("h3",{style:{fontStyle:"italic"}},t),r?l.createElement("pre",{style:o},r):null,i)}a(Ka,"DefaultErrorComponent");var Qa=l.createElement(Ka,null),or=class extends l.Component{static{a(this,"RenderErrorBoundary")}constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=Na(e.digest);r&&(e=r)}let t=e!==void 0?l.createElement(O.Provider,{value:this.props.routeContext},l.createElement(Je.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?l.createElement(Ja,{error:e},t):t}};or.contextType=Zt;var Te=new WeakMap;function Ja({children:e,error:t}){let{basename:r,navigator:n}=l.useContext(P);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=Ba(t.digest);if(o){let s=Te.get(t);if(s)throw s;let i=Gt(o.location,r),u=i.absoluteURL||i.to;if(Qe(o.location,u,Ke(n),"allow-explicit"),Ta(u))throw new Error("Invalid redirect location");if(Jt&&!Te.get(t))if(i.isExternal||o.reloadDocument)window.location.href=u;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:o.replace}));throw Te.set(t,c),c}return l.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u}`})}}return e}a(Ja,"RSCErrorHandler");function Ga({routeContext:e,match:t,children:r}){let n=l.useContext(re);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),l.createElement(O.Provider,{value:e},r)}a(Ga,"RenderedRoute");function Ya(e,t=[],r){let n=r?.state;if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=n?.errors;if(s!=null){let p=o.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);$(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,p+1))}let i=!1,u=-1;if(r&&n){i=n.renderFallback;for(let p=0;p<o.length;p++){let f=o[p];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=p),f.route.id){let{loaderData:g,errors:b}=n,v=f.route.loader&&!g.hasOwnProperty(f.route.id)&&(!b||b[f.route.id]===void 0);if(f.route.lazy||v){r.isStatic&&(i=!0),u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}}let c=r?.onError,m=n&&c?(p,f)=>{c(p,{location:n.location,params:n.matches?.[0]?.params??{},pattern:Ea(n.matches),errorInfo:f})}:void 0;return o.reduceRight((p,f,g)=>{let b,v=!1,y=null,h=null;n&&(b=s&&f.route.id?s[f.route.id]:void 0,y=f.route.errorElement||Qa,i&&(u<0&&g===0?(ir("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),v=!0,h=null):u===g&&(v=!0,h=f.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,g+1)),w=a(()=>{let I;return b?I=y:v?I=h:f.route.Component?I=l.createElement(f.route.Component,null):f.route.element?I=f.route.element:I=p,l.createElement(Ga,{match:f,routeContext:{outlet:p,matches:x,isDataRoute:n!=null},children:I})},"getChildren");return n&&(f.route.ErrorBoundary||f.route.errorElement||g===0)?l.createElement(or,{location:n.location,revalidation:n.revalidation,component:y,error:b,children:w(),routeContext:{outlet:null,matches:x,isDataRoute:!0},onError:m}):w()},null)}a(Ya,"_renderMatches");function Ge(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}a(Ge,"getDataRouterConsoleError");function Za(e){let t=l.useContext(re);return $(t,Ge(e)),t}a(Za,"useDataRouterContext");function Ye(e){let t=l.useContext(me);return $(t,Ge(e)),t}a(Ye,"useDataRouterState");function Xa(e){let t=l.useContext(O);return $(t,Ge(e)),t}a(Xa,"useRouteContext");function Ze(e){let t=Xa(e),r=t.matches[t.matches.length-1];return $(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}a(Ze,"useCurrentRouteId");function eo(){return Ze("useRouteId")}a(eo,"useRouteId");function to(){let e=Ye("useNavigation");return l.useMemo(()=>{let{matches:t,historyAction:r,...n}=e.navigation;return n},[e.navigation])}a(to,"useNavigation");function sr(){let{matches:e,loaderData:t}=Ye("useMatches");return l.useMemo(()=>e.map(r=>la(r,t)),[e,t])}a(sr,"useMatches");function ro(){let e=l.useContext(Je),t=Ye("useRouteError"),r=Ze("useRouteError");return e!==void 0?e:t.errors?.[r]}a(ro,"useRouteError");function no(){let{router:e}=Za("useNavigate"),t=Ze("useNavigate"),r=l.useRef(!1);return nr(()=>{r.current=!0}),l.useCallback(async(n,o={})=>{M(r.current,rr),r.current&&(typeof n=="number"?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}a(no,"useNavigateStable");var ft={};function ir(e,t,r){!t&&!ft[e]&&(ft[e]=!0,M(!1,r))}a(ir,"warningOnce");var pt={};function ao(e,t){!e&&!pt[t]&&(pt[t]=!0)}a(ao,"warnOnce");var Xi=l.memo(oo);function oo({routes:e,manifest:t,future:r,state:n,isStatic:o,onError:s}){return ar(e,void 0,{manifest:t,state:n,isStatic:o,onError:s,future:r})}a(oo,"DataRoutes2");function so({to:e,replace:t,state:r,relative:n}){$(ae(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o,navigator:s}=l.useContext(P);M(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=l.useContext(O),{pathname:u}=T(),c=Ce(),m=Re(e,Ve(i),u,n==="path");Qe(typeof e=="string"?e:Q(e),s.createHref(m),Ke(s),"reject");let p=JSON.stringify(m);return l.useEffect(()=>{c(JSON.parse(p),{replace:t,state:r,relative:n})},[c,p,n,t,r]),null}a(so,"Navigate$1");function el(e){return Ha(e.context)}a(el,"Outlet");function io(e){$(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}a(io,"Route");function lr({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:o,static:s=!1,useTransitions:i}){$(!ae(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),c=l.useMemo(()=>({basename:u,navigator:o,static:s,useTransitions:i,future:{}}),[u,o,s,i]);typeof r=="string"&&(r=te(r));let{pathname:m="/",search:p="",hash:f="",state:g=null,key:b="default",mask:v}=r,y=l.useMemo(()=>{let h=q(m,u);return h==null?null:{location:{pathname:h,search:p,hash:f,state:g,key:b,mask:v},navigationType:n}},[u,m,p,f,g,b,n,v]);return M(y!=null,`<Router basename="${u}"> is not able to match the URL "${m}${p}${f}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:l.createElement(P.Provider,{value:c},l.createElement(ne.Provider,{children:t,value:y}))}a(lr,"Router");function tl({children:e,location:t}){return Va(Be(e),t)}a(tl,"Routes");var rl=class extends l.Component{static{a(this,"AwaitErrorBoundary")}constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,n=null,o=0;if(!(r instanceof Promise))o=1,n=Promise.resolve(),Object.defineProperty(n,"_tracked",{get:a(()=>!0,"get")}),Object.defineProperty(n,"_data",{get:a(()=>r,"get")});else if(this.state.error){o=2;let s=this.state.error;n=Promise.reject().catch(()=>{}),Object.defineProperty(n,"_tracked",{get:a(()=>!0,"get")}),Object.defineProperty(n,"_error",{get:a(()=>s,"get")})}else r._tracked?(n=r,o="_error"in n?2:"_data"in n?1:0):(o=0,Object.defineProperty(r,"_tracked",{get:a(()=>!0,"get")}),n=r.then(s=>Object.defineProperty(r,"_data",{get:a(()=>s,"get")}),s=>{this.props.onError?.(s),Object.defineProperty(r,"_error",{get:a(()=>s,"get")})}));if(o===2&&!t)throw n._error;if(o===2)return l.createElement(je.Provider,{value:n,children:t});if(o===1)return l.createElement(je.Provider,{value:n,children:e});throw n}};function Be(e,t=[]){let r=[];return l.Children.forEach(e,(n,o)=>{if(!l.isValidElement(n))return;let s=[...t,o];if(n.type===l.Fragment){r.push.apply(r,Be(n.props.children,s));return}$(n.type===io,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),$(!n.props.index||!n.props.children,"An index route cannot have child routes.");let i={id:n.props.id||s.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=Be(n.props.children,s)),r.push(i)}),r}a(Be,"createRoutesFromChildren");var be="get",ke="application/x-www-form-urlencoded";function Ee(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}a(Ee,"isHtmlElement");function lo(e){return Ee(e)&&e.tagName.toLowerCase()==="button"}a(lo,"isButtonElement");function uo(e){return Ee(e)&&e.tagName.toLowerCase()==="form"}a(uo,"isFormElement");function co(e){return Ee(e)&&e.tagName.toLowerCase()==="input"}a(co,"isInputElement");function mo(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}a(mo,"isModifiedEvent");function fo(e,t){return e.button===0&&(!t||t==="_self")&&!mo(e)}a(fo,"shouldProcessLinkClick");function Ne(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(o=>[r,o]):[[r,n]])},[]))}a(Ne,"createSearchParams");function po(e,t){let r=Ne(e);return t&&t.forEach((n,o)=>{r.has(o)||t.getAll(o).forEach(s=>{r.append(o,s)})}),r}a(po,"getSearchParamsForLocation");var ge=null;function ho(){if(ge===null)try{new FormData(document.createElement("form"),0),ge=!1}catch{ge=!0}return ge}a(ho,"isFormDataSubmitterSupported");var go=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ue(e){return e!=null&&!go.has(e)?(M(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ke}"`),null):e}a(Ue,"getFormEncType");function yo(e,t){let r,n,o,s,i;if(uo(e)){let u=e.getAttribute("action");n=u?q(u,t):null,r=e.getAttribute("method")||be,o=Ue(e.getAttribute("enctype"))||ke,s=new FormData(e)}else if(lo(e)||co(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||u.getAttribute("action");if(n=c?q(c,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||be,o=Ue(e.getAttribute("formenctype"))||Ue(u.getAttribute("enctype"))||ke,s=new FormData(u,e),!ho()){let{name:m,type:p,value:f}=e;if(p==="image"){let g=m?`${m}.`:"";s.append(`${g}x`,"0"),s.append(`${g}y`,"0")}else m&&s.append(m,f)}}else{if(Ee(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=be,n=null,o=ke,i=e}return s&&o==="text/plain"&&(i=s,s=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:s,body:i}}a(yo,"getFormSubmissionInfo");var nl=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),vo={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},bo=/[&><\u2028\u2029]/g;function ht(e){return e.replace(bo,t=>vo[t])}a(ht,"escapeHtml");function $e(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}a($e,"invariant2");function ur(e,t,r,n){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${n}`:o.pathname=`${o.pathname}.${n}`:o.pathname==="/"?o.pathname=`_root.${n}`:t&&q(o.pathname,t)==="/"?o.pathname=`${X(t)}/_root.${n}`:o.pathname=`${X(o.pathname)}.${n}`,o}a(ur,"singleFetchUrl");async function ko(e,t){if(e.id in t)return t[e.id];try{let r=await ta(()=>import(e.module),[]);return t[e.id]=r,r}catch{return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}a(ko,"loadRouteModule");function xo(e){return e!=null&&typeof e.page=="string"}a(xo,"isPageLinkDescriptor");function wo(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}a(wo,"isHtmlLinkDescriptor");async function Io(e,t,r){return Co((await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let s=await ko(o,r);return s.links?s.links():[]}return[]}))).flat(1).filter(wo).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}a(Io,"getKeyedPrefetchLinks");function gt(e,t,r,n,o,s){let i=a((c,m)=>r[m]?c.route.id!==r[m].route.id:!0,"isNew"),u=a((c,m)=>r[m].pathname!==c.pathname||r[m].route.path?.endsWith("*")&&r[m].params["*"]!==c.params["*"],"matchPathChanged");return s==="assets"?t.filter((c,m)=>i(c,m)||u(c,m)):s==="data"?t.filter((c,m)=>{let p=n.routes[c.route.id];if(!p||!p.hasLoader)return!1;if(i(c,m)||u(c,m))return!0;if(c.route.shouldRevalidate){let f=c.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}a(gt,"getNewMatchesForLinks");function cr(e,t,{includeHydrateFallback:r}={}){return So(e.map(n=>{let o=t.routes[n.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}a(cr,"getModuleLinkHrefs");function So(e){return[...new Set(e)]}a(So,"dedupeHrefs");function Ro(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}a(Ro,"sortKeys");function Co(e,t){let r=new Set,n=new Set(t);return e.reduce((o,s)=>{if(t&&!xo(s)&&s.as==="script"&&s.href&&n.has(s.href))return o;let i=JSON.stringify(Ro(s));return r.has(i)||(r.add(i),o.push({key:i,link:s})),o},[])}a(Co,"dedupeLinkDescriptors");function Eo(e,t){return e.mode==="lazy"&&t===!0}a(Eo,"isFogOfWarEnabled");function $o({sri:e,...t},r){let n=new Set(r.state.matches.map(u=>u.route.id)),o=r.state.location.pathname.split("/").filter(Boolean),s=["/"];for(o.pop();o.length>0;)s.push(`/${o.join("/")}`),o.pop();s.forEach(u=>{let c=Ft(r.routes,u,r.basename||"/",!1,r.branches);c&&c.forEach(m=>n.add(m.route.id))});let i=[...n].reduce((u,c)=>Object.assign(u,{[c]:t.routes[c]}),{});return{...t,routes:i,sri:e?!0:void 0}}a($o,"getPartialManifest");function _e(){let e=l.useContext(re);return $e(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}a(_e,"useDataRouterContext2");function dr(){let e=l.useContext(me);return $e(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}a(dr,"useDataRouterStateContext");var Ae=l.createContext(void 0);Ae.displayName="FrameworkContext";function J(){let e=l.useContext(Ae);return $e(e,"You must render this element inside a <HydratedRouter> element"),e}a(J,"useFrameworkContext");function _o(e,t){let r=l.useContext(Ae),[n,o]=l.useState(!1),[s,i]=l.useState(!1),{onFocus:u,onBlur:c,onMouseEnter:m,onMouseLeave:p,onTouchStart:f}=t,g=l.useRef(null);l.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let y=a(x=>{x.forEach(w=>{i(w.isIntersecting)})},"callback"),h=new IntersectionObserver(y,{threshold:.5});return g.current&&h.observe(g.current),()=>{h.disconnect()}}},[e]),l.useEffect(()=>{if(n){let y=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(y)}}},[n]);let b=a(()=>{o(!0)},"setIntent"),v=a(()=>{o(!1),i(!1)},"cancelIntent");return r?e!=="intent"?[s,g,{}]:[s,g,{onFocus:ie(u,b),onBlur:ie(c,v),onMouseEnter:ie(m,b),onMouseLeave:ie(p,v),onTouchStart:ie(f,b)}]:[!1,g,{}]}a(_o,"usePrefetchBehavior");function ie(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}a(ie,"composeEventHandlers");function Ao(e,t,r){if(r&&!we)return[e[0]];if(t){let n=e.findIndex(o=>t[o.route.id]!==void 0);return e.slice(0,n+1)}return e}a(Ao,"getActiveMatches");function Do({page:e,...t}){let r=Xt(),{nonce:n}=J(),{router:o}=_e(),s=l.useMemo(()=>zt(o.routes,e,o.basename),[o.routes,e,o.basename]);return s?(t.nonce==null&&n&&(t={...t,nonce:n}),r?l.createElement(Lo,{page:e,matches:s,...t}):l.createElement(Mo,{page:e,matches:s,...t})):null}a(Do,"PrefetchPageLinks");function Po(e){let{manifest:t,routeModules:r}=J(),[n,o]=l.useState([]);return l.useEffect(()=>{let s=!1;return Io(e,t,r).then(i=>{s||o(i)}),()=>{s=!0}},[e,t,r]),n}a(Po,"useKeyedPrefetchLinks");function Lo({page:e,matches:t,...r}){let n=T(),{future:o}=J(),{basename:s}=_e(),i=l.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let u=ur(e,s,o.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,m=[];for(let p of t)typeof p.route.shouldRevalidate=="function"?c=!0:m.push(p.route.id);return c&&m.length>0&&u.searchParams.set("_routes",m.join(",")),[u.pathname+u.search]},[s,o.v8_trailingSlashAwareDataRequests,e,n,t]);return l.createElement(l.Fragment,null,i.map(u=>l.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...r})))}a(Lo,"RSCPrefetchPageLinksImpl");function Mo({page:e,matches:t,...r}){let n=T(),{future:o,manifest:s,routeModules:i}=J(),{basename:u}=_e(),{loaderData:c,matches:m}=dr(),p=l.useMemo(()=>gt(e,t,m,s,n,"data"),[e,t,m,s,n]),f=l.useMemo(()=>gt(e,t,m,s,n,"assets"),[e,t,m,s,n]),g=l.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let y=new Set,h=!1;if(t.forEach(w=>{let I=s.routes[w.route.id];!I||!I.hasLoader||(!p.some(_=>_.route.id===w.route.id)&&w.route.id in c&&i[w.route.id]?.shouldRevalidate||I.hasClientLoader?h=!0:y.add(w.route.id))}),y.size===0)return[];let x=ur(e,u,o.v8_trailingSlashAwareDataRequests,"data");return h&&y.size>0&&x.searchParams.set("_routes",t.filter(w=>y.has(w.route.id)).map(w=>w.route.id).join(",")),[x.pathname+x.search]},[u,o.v8_trailingSlashAwareDataRequests,c,n,s,p,t,e,i]),b=l.useMemo(()=>cr(f,s),[f,s]),v=Po(f);return l.createElement(l.Fragment,null,g.map(y=>l.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...r})),b.map(y=>l.createElement("link",{key:y,rel:"modulepreload",href:y,...r})),v.map(({key:y,link:h})=>l.createElement("link",{key:y,nonce:r.nonce,...h,crossOrigin:h.crossOrigin??r.crossOrigin})))}a(Mo,"PrefetchPageLinksImpl");var we=!1;function To(){we=!0}a(To,"setIsHydrated");function Uo(e){let{manifest:t,serverHandoffString:r,isSpaMode:n,renderMeta:o,routeDiscovery:s,ssr:i,nonce:u}=J(),{router:c,static:m,staticContext:p}=_e(),{matches:f}=dr(),g=Xt(),b=Eo(s,i);e.nonce==null&&u&&(e={...e,nonce:u}),o&&(o.didRenderScripts=!0);let v=Ao(f,null,n);l.useEffect(()=>{To()},[]);let y=l.useMemo(()=>{if(g)return null;let w=p?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",I=m?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${b?"":`import ${JSON.stringify(t.url)}`};
4
4
  ${v.map((_,C)=>{let A=`route${C}`,L=t.routes[_.route.id];$e(L,`Route ${_.route.id} not found in manifest`);let{clientActionModule:j,clientLoaderModule:D,clientMiddlewareModule:N,hydrateFallbackModule:G,module:U}=L,H=[...j?[{module:j,varName:`${A}_clientAction`}]:[],...D?[{module:D,varName:`${A}_clientLoader`}]:[],...N?[{module:N,varName:`${A}_clientMiddleware`}]:[],...G?[{module:G,varName:`${A}_HydrateFallback`}]:[],{module:U,varName:`${A}_main`}];return H.length===1?`import * as ${A} from ${JSON.stringify(U)};`:[H.map(z=>`import * as ${z.varName} from "${z.module}";`).join(`
@@ -12,4 +12,4 @@ import(${JSON.stringify(t.entry.module)});`:" ";return l.createElement(l.Fragmen
12
12
  console.log(
13
13
  "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
14
14
  );
15
- `}});if(Qt(e))return l.createElement(yt,{title:"Unhandled Thrown Response!"},l.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),n);let o;if(e instanceof Error)o=e;else{let s=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);o=new Error(s)}return l.createElement(yt,{title:"Application Error!",isOutsideRemixApp:t},l.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),l.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},o.stack),n)}a(jo,"RemixRootDefaultErrorBoundary");function yt({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){let{routeModules:o}=J();return o.root?.Layout&&!r?n:l.createElement("html",{lang:"en"},l.createElement("head",null,l.createElement("meta",{charSet:"utf-8"}),l.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),l.createElement("title",null,e)),l.createElement("body",null,l.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n,t?l.createElement(Uo,null):null)))}a(yt,"BoundaryShell");var Bo=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Bo&&(window.__reactRouterVersion="7.18.4")}catch{}function ol({basename:e,children:t,useTransitions:r,window:n}){let o=l.useRef();o.current==null&&(o.current=na({window:n,v5Compat:!0}));let s=o.current,[i,u]=l.useState({action:s.action,location:s.location}),c=l.useCallback(m=>{r===!1?u(m):l.startTransition(()=>u(m))},[r]);return l.useLayoutEffect(()=>s.listen(c),[s,c]),l.createElement(lr,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:s,useTransitions:r})}a(ol,"BrowserRouter");function No({basename:e,children:t,history:r,useTransitions:n}){let[o,s]=l.useState({action:r.action,location:r.location}),i=l.useCallback(u=>{n===!1?s(u):l.startTransition(()=>s(u))},[n]);return l.useLayoutEffect(()=>r.listen(i),[r,i]),l.createElement(lr,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:r,useTransitions:n})}a(No,"HistoryRouter");No.displayName="unstable_HistoryRouter";var pe=l.forwardRef(a(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:s,replace:i,mask:u,state:c,target:m,to:p,preventScrollReset:f,viewTransition:g,defaultShouldRevalidate:b,...v},y){let{basename:h,navigator:x,useTransitions:w}=l.useContext(P),I=typeof p=="string"&&We.test(p),_=Gt(p,h);p=_.to;let C=za(p,{relative:o}),A=T(),L=null;if(u){let F=Re(u,[],A.mask?A.mask.pathname:"/",!0);h!=="/"&&(F.pathname=F.pathname==="/"?h:B([h,F.pathname])),L=x.createHref(F)}let[j,D,N]=_o(n,v),G=Ho(p,{replace:i,mask:u,state:c,target:m,preventScrollReset:f,relative:o,viewTransition:g,defaultShouldRevalidate:b,useTransitions:w});function U(F){t&&t(F),F.defaultPrevented||G(F)}a(U,"handleClick");let H=!(_.isExternal||s),z=l.createElement("a",{...v,...N,href:(H?L:void 0)||_.absoluteURL||C,onClick:H?U:t,ref:Oo(y,D),target:m,"data-discover":!I&&r==="render"?"true":void 0});return j&&!I?l.createElement(l.Fragment,null,z,l.createElement(Do,{page:C})):z},"LinkWithRef"));pe.displayName="Link";var mr=l.forwardRef(a(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:s,to:i,viewTransition:u,children:c,...m},p){let f=fe(i,{relative:m.relative}),g=T(),b=l.useContext(me),{navigator:v,basename:y}=l.useContext(P),h=b!=null&&Yo(f)&&u===!0,x=v.encodeLocation?v.encodeLocation(f).pathname:f.pathname,w=g.pathname,I=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;r||(w=w.toLowerCase(),I=I?I.toLowerCase():null,x=x.toLowerCase()),I&&y&&(I=q(I,y)||I);const _=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let C=w===x||!o&&w.startsWith(x)&&w.charAt(_)==="/",A=I!=null&&(I===x||!o&&I.startsWith(x)&&I.charAt(x.length)==="/"),L={isActive:C,isPending:A,isTransitioning:h},j=C?t:void 0,D;typeof n=="function"?D=n(L):D=[n,C?"active":null,A?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let N=typeof s=="function"?s(L):s;return l.createElement(pe,{...m,"aria-current":j,className:D,ref:p,style:N,to:i,viewTransition:u},typeof c=="function"?c(L):c)},"NavLinkWithRef"));mr.displayName="NavLink";var zo=l.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:s,method:i=be,action:u,onSubmit:c,relative:m,preventScrollReset:p,viewTransition:f,defaultShouldRevalidate:g,...b},v)=>{let{useTransitions:y}=l.useContext(P),h=Ko(),x=Qo(u,{relative:m}),w=i.toLowerCase()==="get"?"get":"post",I=typeof u=="string"&&We.test(u),_=a(C=>{if(c&&c(C),C.defaultPrevented)return;C.preventDefault();let A=C.nativeEvent.submitter,L=A?.getAttribute("formmethod")||i,j=a(()=>h(A||C.currentTarget,{fetcherKey:t,method:L,navigate:r,replace:o,state:s,relative:m,preventScrollReset:p,viewTransition:f,defaultShouldRevalidate:g}),"doSubmit");y&&r!==!1?l.startTransition(()=>j()):j()},"submitHandler");return l.createElement("form",{ref:v,method:w,action:x,onSubmit:n?c:_,...b,"data-discover":!I&&e==="render"?"true":void 0})});zo.displayName="Form";function Fo({getKey:e,storageKey:t,...r}){let n=l.useContext(Ae),{basename:o}=l.useContext(P),s=T(),i=sr();Jo({getKey:e,storageKey:t});let u=l.useMemo(()=>{if(!n||!e)return null;let m=Fe(s,i,o,e);return m!==s.key?m:null},[]);if(!n||n.isSpaMode)return null;let c=((m,p)=>{if(!window.history.state||!window.history.state.key){let f=Math.random().toString(32).slice(2);window.history.replaceState({key:f},"")}try{let f=JSON.parse(sessionStorage.getItem(m)||"{}")[p||window.history.state.key];typeof f=="number"&&window.scrollTo(0,f)}catch{sessionStorage.removeItem(m)}}).toString();return r.nonce==null&&n?.nonce&&(r.nonce=n.nonce),l.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${ht(JSON.stringify(t||ze))}, ${ht(JSON.stringify(u))})`}})}a(Fo,"ScrollRestoration");Fo.displayName="ScrollRestoration";function fr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}a(fr,"getDataRouterConsoleError2");function Xe(e){let t=l.useContext(re);return $(t,fr(e)),t}a(Xe,"useDataRouterContext3");function qo(e){let t=l.useContext(me);return $(t,fr(e)),t}a(qo,"useDataRouterState2");function Ho(e,{target:t,replace:r,mask:n,state:o,preventScrollReset:s,relative:i,viewTransition:u,defaultShouldRevalidate:c,useTransitions:m}={}){let p=Ce(),f=T(),g=fe(e,{relative:i});return l.useCallback(b=>{if(fo(b,t)){b.preventDefault();let v=r!==void 0?r:Q(f)===Q(g),y=a(()=>p(e,{replace:v,mask:n,state:o,preventScrollReset:s,relative:i,viewTransition:u,defaultShouldRevalidate:c}),"doNavigate");m?l.startTransition(()=>y()):y()}},[f,p,g,r,n,o,t,e,s,i,u,c,m])}a(Ho,"useLinkClickHandler");function sl(e){M(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=l.useRef(Ne(e)),r=l.useRef(!1),n=T(),o=l.useMemo(()=>po(n.search,r.current?null:t.current),[n.search]),s=Ce();return[o,l.useCallback((i,u)=>{const c=Ne(typeof i=="function"?i(new URLSearchParams(o)):i);r.current=!0,s("?"+c,u)},[s,o])]}a(sl,"useSearchParams");var Wo=0,Vo=a(()=>`__${String(++Wo)}__`,"getUniqueFetcherId");function Ko(){let{router:e}=Xe("useSubmit"),{basename:t}=l.useContext(P),r=eo(),n=e.fetch,o=e.navigate;return l.useCallback(async(s,i={})=>{let{action:u,method:c,encType:m,formData:p,body:f}=yo(s,t);if(i.navigate===!1){let g=i.fetcherKey||Vo();await n(g,r,i.action||u,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:p,body:f,formMethod:i.method||c,formEncType:i.encType||m,flushSync:i.flushSync})}else await o(i.action||u,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:p,body:f,formMethod:i.method||c,formEncType:i.encType||m,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[n,o,t,r])}a(Ko,"useSubmit");function Qo(e,{relative:t}={}){let{basename:r}=l.useContext(P),n=l.useContext(O);$(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),s={...fe(e||".",{relative:t})},i=T();if(e==null){s.search=i.search;let u=new URLSearchParams(s.search),c=u.getAll("index");if(c.some(m=>m==="")){u.delete("index"),c.filter(p=>p).forEach(p=>u.append("index",p));let m=u.toString();s.search=m?`?${m}`:""}}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:B([r,s.pathname])),Q(s)}a(Qo,"useFormAction");var ze="react-router-scroll-positions",ye={};function Fe(e,t,r,n){let o=null;return n&&(r!=="/"?o=n({...e,pathname:q(e.pathname,r)||e.pathname},t):o=n(e,t)),o==null&&(o=e.key),o}a(Fe,"getScrollRestorationKey");function Jo({getKey:e,storageKey:t}={}){let{router:r}=Xe("useScrollRestoration"),{restoreScrollPosition:n,preventScrollReset:o}=qo("useScrollRestoration"),{basename:s}=l.useContext(P),i=T(),u=sr(),c=to();l.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),Go(l.useCallback(()=>{if(c.state==="idle"){let m=Fe(i,u,s,e);ye[m]=window.scrollY}try{sessionStorage.setItem(t||ze,JSON.stringify(ye))}catch(m){M(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${m}).`)}window.history.scrollRestoration="auto"},[c.state,e,s,i,u,t])),typeof document<"u"&&(l.useLayoutEffect(()=>{try{let m=sessionStorage.getItem(t||ze);m&&(ye=JSON.parse(m))}catch{}},[t]),l.useLayoutEffect(()=>{let m=r?.enableScrollRestoration(ye,()=>window.scrollY,e?(p,f)=>Fe(p,f,s,e):void 0);return()=>m&&m()},[r,s,e]),l.useLayoutEffect(()=>{if(n!==!1){if(typeof n=="number"){window.scrollTo(0,n);return}try{if(i.hash){let m=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(m){m.scrollIntoView();return}}}catch{M(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}o!==!0&&window.scrollTo(0,0)}},[i,n,o]))}a(Jo,"useScrollRestoration");function il(e,t){let{capture:r}=t||{};l.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("beforeunload",e,n),()=>{window.removeEventListener("beforeunload",e,n)}},[e,r])}a(il,"useBeforeUnload");function Go(e,t){let{capture:r}=t||{};l.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}a(Go,"usePageHide");function Yo(e,{relative:t}={}){let r=l.useContext(er);$(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Xe("useViewTransitionState"),o=fe(e,{relative:t});if(!r.isTransitioning)return!1;let s=q(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=q(r.nextLocation.pathname,n)||r.nextLocation.pathname;return xe(o.pathname,i)!=null||xe(o.pathname,s)!=null}a(Yo,"useViewTransitionState");var vt=60,qe=3600,Ie=24*qe,bt=7*Ie,kt=30*Ie;function Zo(e){const t=Date.now(),r=new Date(e).getTime(),n=Math.round((t-r)/1e3);return n<vt?"just now":n<qe?`${Math.floor(n/vt)}m ago`:n<Ie?`${Math.floor(n/qe)}h ago`:n<bt?`${Math.floor(n/Ie)}d ago`:n<kt?`${Math.floor(n/bt)}w ago`:`${Math.floor(n/kt)}mo ago`}a(Zo,"timeAgo");var Xo=[{label:"My work",views:[{key:"mine",label:"Mine",surface:"inbox",inboxTab:"mine",hint:"Assigned to you or waiting on you"},{key:"unread",label:"Unread",surface:"inbox",inboxTab:"unread",hint:"Tasks you touched with new activity"},{key:"blocked",label:"Blocked",surface:"inbox",inboxTab:"blocked",hint:"Blocked tasks, grouped by blocker"},{key:"recent",label:"Recent",surface:"inbox",inboxTab:"recent",hint:"Everything you touched lately"},{key:"everything",label:"Everything",surface:"inbox",inboxTab:"all",hint:"Tasks, approvals, failed runs and join requests"}]},{label:"Organization",views:[{key:"all",label:"All tasks",surface:"issues",statuses:[],hint:"Every task in the organization"},{key:"active",label:"Active",surface:"issues",statuses:["todo","in_progress","in_review","blocked"],hint:"Open tasks, running or not"},{key:"backlog",label:"Backlog",surface:"issues",statuses:["backlog"],hint:"Not started yet"},{key:"done",label:"Done",surface:"issues",statuses:["done","cancelled"],hint:"Completed and cancelled"}]}],pr=new Map(Xo.flatMap(e=>e.views.map(t=>[t.key,t]))),hr="mine",es="view",ts="paperclip:tasks:last-view";function rs(e){return typeof e=="string"&&pr.has(e)}a(rs,"isTaskViewKey");function gr(e){return pr.get(e)}a(gr,"taskView");function et(e){return rs(e)?e:null}a(et,"normalizeTaskViewKey");var xt={mine:"mine",unread:"unread",blocked:"blocked",recent:"recent",all:"everything"};function ll(e){return e&&e in xt?xt[e]:hr}a(ll,"taskViewForInboxTab");function ul(){try{return et(window.localStorage.getItem("paperclip:tasks:last-view"))??"mine"}catch{return hr}}a(ul,"loadLastTaskView");function cl(e){try{window.localStorage.setItem(ts,e)}catch{}}a(cl,"saveLastTaskView");var dl=["assignee","workspace","participantAgentId","q"];function ml(e,t,r){const n=et(e);return t&&(!n||gr(n).surface==="inbox")?"all":n??r}a(ml,"resolveInitialTaskView");var yr="from",vr="fromHref",br="paperclip:issue-detail-breadcrumb:";function kr(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.label=="string"&&typeof t.href=="string"}a(kr,"isIssueDetailBreadcrumb");function xr(e){return e==="issues"||e==="inbox"}a(xr,"isIssueDetailSource");function wr(e){if(typeof e!="object"||e===null)return!1;const t=e,r=t.originKind===void 0||typeof t.originKind=="string",n=t.originId===void 0||t.originId===null||typeof t.originId=="string",o=t.blockerAttention===void 0||typeof t.blockerAttention=="object"&&t.blockerAttention!==null;return typeof t.id=="string"&&(t.identifier===null||typeof t.identifier=="string")&&typeof t.title=="string"&&typeof t.status=="string"&&o&&typeof t.priority=="string"&&(t.projectId===null||typeof t.projectId=="string")&&(t.projectName===null||typeof t.projectName=="string")&&r&&n}a(wr,"isIssueDetailHeaderSeed");function ns(e){return{id:e.id,identifier:e.identifier??null,title:e.title,status:e.status,blockerAttention:e.blockerAttention,priority:e.priority,projectId:e.projectId??null,projectName:e.project?.name??null,originKind:e.originKind,originId:e.originId??null}}a(ns,"createIssueDetailHeaderSeed");function Ir(e,t){const r=ns(t);return typeof e!="object"||e===null?{issueDetailHeaderSeed:r}:{...e,issueDetailHeaderSeed:r}}a(Ir,"withIssueDetailHeaderSeed");function as(e){if(typeof e!="object"||e===null)return null;const t=e.issueDetailHeaderSeed;return wr(t)?t:null}a(as,"readIssueDetailHeaderSeed");function os(e){if(!e)return null;const t=new URLSearchParams(e).get(yr);return xr(t)?t:null}a(os,"readIssueDetailSourceFromSearch");function ss(e){if(!e)return null;const t=new URLSearchParams(e).get(vr);return t&&t.startsWith("/")?t:null}a(ss,"readIssueDetailBreadcrumbHrefFromSearch");function is(e){const t=e.slice(e.indexOf("?")+1);if(!e.includes("?"))return!1;const r=new URLSearchParams(t).get(es),n=et(r);return n!==null&&gr(n).surface==="inbox"}a(is,"isInboxBackedTaskViewHref");function Sr(e,t){return xr(e?.issueDetailSource)?e.issueDetailSource:t?t.href.includes("/inbox")||is(t.href)||t.label==="Inbox"?"inbox":t.label==="Tasks"||t.href.includes("/issues")?"issues":null:null}a(Sr,"inferIssueDetailSource");function wt(e){return e==="inbox"?{label:"Inbox",href:"/inbox"}:{label:"Tasks",href:"/issues"}}a(wt,"breadcrumbForSource");function fl(e,t,r){return{issueDetailBreadcrumb:{label:e,href:t},issueDetailSource:r}}a(fl,"createIssueDetailLocationState");function pl(e){return typeof e!="object"||e===null?{issueDetailInboxQuickArchiveArmed:!0}:{...e,issueDetailInboxQuickArchiveArmed:!0}}a(pl,"armIssueDetailInboxQuickArchive");function ls(e){if(typeof window>"u"||!window.sessionStorage)return null;const t=window.sessionStorage.getItem(`${br}${e}`);if(!t)return null;try{const r=JSON.parse(t),n=kr(r.issueDetailBreadcrumb)?r.issueDetailBreadcrumb:null,o=Sr(r,n);if(!n||!o)return null;const s=wr(r.issueDetailHeaderSeed)?r.issueDetailHeaderSeed:void 0;return{issueDetailBreadcrumb:n,issueDetailSource:o,issueDetailInboxQuickArchiveArmed:r.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:s}}catch{return null}}a(ls,"readStoredIssueDetailLocationState");function Rr(e,t){if(typeof e=="object"&&e!==null){const o=e.issueDetailBreadcrumb;if(kr(o)){const s=Sr(e,o);if(!s)return null;const i=as(e)??void 0;return{issueDetailBreadcrumb:o,issueDetailSource:s,issueDetailInboxQuickArchiveArmed:e.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:i}}}const r=os(t),n=ss(t);return r?{issueDetailBreadcrumb:n?{...wt(r),href:n}:wt(r),issueDetailSource:r,issueDetailInboxQuickArchiveArmed:!1}:null}a(Rr,"normalizeIssueDetailLocationState");function hl(e,t,r){if(typeof window>"u"||!window.sessionStorage)return;const n=Rr(t,r);n&&window.sessionStorage.setItem(`${br}${e}`,JSON.stringify(n))}a(hl,"rememberIssueDetailLocationState");function us(e){return`/issues/${e}`}a(us,"createIssueDetailPath");function gl(e){if(!e)return!1;const t=new URLSearchParams(e);return t.has(yr)||t.has(vr)}a(gl,"hasLegacyIssueDetailQuery");function cs(e,t,r){const n=Rr(t,r);return n||(e?ls(e):null)}a(cs,"readIssueDetailLocationState");function yl(e,t,r){return cs(e,t,r)?.issueDetailBreadcrumb??null}a(yl,"readIssueDetailBreadcrumb");var It=class extends Error{static{a(this,"CommentSubmissionUnknownError")}constructor(){super("We couldn’t confirm whether this comment was saved. Review the conversation before starting another draft."),this.name="CommentSubmissionUnknownError"}};function St(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e,r=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;return typeof t.id=="string"&&r.test(t.id)&&typeof t.issueId=="string"&&r.test(t.issueId)&&typeof t.body=="string"}a(St,"hasCommentReceipt");async function Rt(e,t){try{const r=await e;if(!t(r))throw new It;return r}catch(r){throw r instanceof Bt&&r.status<500?r:new It}}a(Rt,"confirmedCommentResponse");function Ct(e){const t=new URLSearchParams;return e?.attention&&t.set("attention",e.attention),e?.status&&t.set("status",e.status),e?.priority&&t.set("priority",e.priority),e?.projectId&&t.set("projectId",e.projectId),e?.parentId&&t.set("parentId",e.parentId),e?.assigneeAgentId&&t.set("assigneeAgentId",e.assigneeAgentId),e?.participantAgentId&&t.set("participantAgentId",e.participantAgentId),e?.assigneeUserId&&t.set("assigneeUserId",e.assigneeUserId),e?.touchedByUserId&&t.set("touchedByUserId",e.touchedByUserId),e?.inboxArchivedByUserId&&t.set("inboxArchivedByUserId",e.inboxArchivedByUserId),e?.unreadForUserId&&t.set("unreadForUserId",e.unreadForUserId),e?.labelId&&t.set("labelId",e.labelId),e?.createdByAgentId&&t.set("createdByAgentId",e.createdByAgentId),e?.createdByUserId&&t.set("createdByUserId",e.createdByUserId),e?.updatedSince&&t.set("updatedSince",e.updatedSince),e?.workspaceId&&t.set("workspaceId",e.workspaceId),e?.executionWorkspaceId&&t.set("executionWorkspaceId",e.executionWorkspaceId),e?.originKind&&t.set("originKind",e.originKind),e?.originKindPrefix&&t.set("originKindPrefix",e.originKindPrefix),e?.originId&&t.set("originId",e.originId),e?.descendantOf&&t.set("descendantOf",e.descendantOf),e?.createdFromIssueId&&t.set("createdFromIssueId",e.createdFromIssueId),e?.includeRoutineExecutions&&t.set("includeRoutineExecutions","true"),e?.includeBlockedBy&&t.set("includeBlockedBy","true"),e?.includeBlockedInboxAttention&&t.set("includeBlockedInboxAttention","true"),e?.includeLiveDescendantSummary&&t.set("includeLiveDescendantSummary","true"),e?.hasPlanDocument!==void 0&&t.set("hasPlanDocument",e.hasPlanDocument?"true":"false"),e?.q&&t.set("q",e.q),e?.limit&&t.set("limit",String(e.limit)),e?.offset!==void 0&&t.set("offset",String(e.offset)),e?.sortField&&t.set("sortField",e.sortField),e?.sortDir&&t.set("sortDir",e.sortDir),e?.afterId&&t.set("afterId",e.afterId),t}a(Ct,"issueListSearchParams");var Z={listAll:a(async(e,t,r)=>{const o=new Map;let s;for(;;){const i=await Z.list(e,{...t,limit:500,sortField:"id",sortDir:"asc",afterId:s},r);for(const u of i)o.set(u.id,u);if(i.length<500)return[...o.values()];s=i[i.length-1].id}},"listAll"),list:a((e,t,r)=>{const n=Ct(t).toString(),o=`/companies/${e}/issues${n?`?${n}`:""}`;return r?d.get(o,r):d.get(o)},"list"),listCompact:a((e,t,r)=>{const n=Ct(t);n.set("view","compact");const o=`/companies/${e}/issues?${n.toString()}`;return r?d.get(o,r):d.get(o)},"listCompact"),count:a((e,t)=>{const r=new URLSearchParams;return r.set("attention",t.attention),t.status&&r.set("status",t.status),t.assigneeAgentId&&r.set("assigneeAgentId",t.assigneeAgentId),t.assigneeUserId&&r.set("assigneeUserId",t.assigneeUserId),t.projectId&&r.set("projectId",t.projectId),t.labelId&&r.set("labelId",t.labelId),t.q&&r.set("q",t.q),d.get(`/companies/${e}/issues/count?${r.toString()}`)},"count"),listLabels:a(e=>d.get(`/companies/${e}/labels`),"listLabels"),createLabel:a((e,t)=>d.post(`/companies/${e}/labels`,t),"createLabel"),deleteLabel:a(e=>d.delete(`/labels/${e}`),"deleteLabel"),get:a((e,t)=>t?d.get(`/issues/${e}`,t):d.get(`/issues/${e}`),"get"),refs:a((e,t)=>d.get(`/companies/${e}/issues/refs?ids=${encodeURIComponent(t.join(","))}`),"refs"),getRunnerGoal:a((e,t)=>{const r=t?`?agentId=${encodeURIComponent(t)}`:"";return d.get(`/issues/${e}/runner-goal${r}`)},"getRunnerGoal"),actOnRunnerGoal:a((e,t)=>d.post(`/issues/${e}/runner-goal/actions`,t),"actOnRunnerGoal"),getModelOverride:a(e=>d.get(`/issues/${e}/model-override`),"getModelOverride"),setModelOverride:a((e,t)=>d.put(`/issues/${e}/model-override`,t),"setModelOverride"),getWatchdog:a(e=>d.get(`/issues/${e}/watchdog`),"getWatchdog"),upsertWatchdog:a((e,t)=>d.put(`/issues/${e}/watchdog`,t),"upsertWatchdog"),deleteWatchdog:a(e=>d.delete(`/issues/${e}/watchdog`),"deleteWatchdog"),markRead:a(e=>d.post(`/issues/${e}/read`,{}),"markRead"),markUnread:a(e=>d.delete(`/issues/${e}/read`),"markUnread"),archiveFromInbox:a(e=>d.post(`/issues/${e}/inbox-archive`,{}),"archiveFromInbox"),unarchiveFromInbox:a(e=>d.delete(`/issues/${e}/inbox-archive`),"unarchiveFromInbox"),setTitle:a((e,t)=>d.put(`/issues/${e}/title`,t),"setTitle"),create:a((e,t)=>d.post(`/companies/${e}/issues`,t),"create"),update:a((e,t)=>{const r=d.patch(`/issues/${e}`,t);return typeof t.comment=="string"?Rt(r,n=>St(n?.comment)):r},"update"),decideStalledReview:a((e,t)=>d.post(`/issues/${e}/stalled-review-decision`,t),"decideStalledReview"),retryWorkspaceExport:a((e,t)=>d.post(`/issues/${e}/recovery-actions/retry-workspace-export`,t),"retryWorkspaceExport"),resolveRecoveryAction:a((e,t)=>d.post(`/issues/${e}/recovery-actions/resolve`,t),"resolveRecoveryAction"),previewTreeControl:a((e,t)=>d.post(`/issues/${e}/tree-control/preview`,t),"previewTreeControl"),createTreeHold:a((e,t)=>d.post(`/issues/${e}/tree-holds`,t),"createTreeHold"),getTreeHold:a((e,t)=>d.get(`/issues/${e}/tree-holds/${t}`),"getTreeHold"),listTreeHolds:a((e,t)=>{const r=new URLSearchParams;t?.status&&r.set("status",t.status),t?.mode&&r.set("mode",t.mode),t?.includeMembers&&r.set("includeMembers","true");const n=r.toString();return d.get(`/issues/${e}/tree-holds${n?`?${n}`:""}`)},"listTreeHolds"),getTreeControlState:a(e=>d.get(`/issues/${e}/tree-control/state`),"getTreeControlState"),releaseTreeHold:a((e,t,r)=>d.post(`/issues/${e}/tree-holds/${t}/release`,r),"releaseTreeHold"),checkMonitorNow:a(e=>d.post(`/issues/${e}/monitor/check-now`,{}),"checkMonitorNow"),retryScheduledRetryNow:a(e=>d.post(`/issues/${e}/scheduled-retry/retry-now`,{}),"retryScheduledRetryNow"),remove:a(e=>d.delete(`/issues/${e}`),"remove"),checkout:a((e,t)=>d.post(`/issues/${e}/checkout`,{agentId:t,expectedStatuses:["todo","backlog","blocked","in_review"]}),"checkout"),release:a(e=>d.post(`/issues/${e}/release`,{}),"release"),listComments:a((e,t)=>{const r=new URLSearchParams;t?.after&&r.set("after",t.after),t?.order&&r.set("order",t.order),t?.limit&&r.set("limit",String(t.limit));const n=r.toString();return d.get(`/issues/${e}/comments${n?`?${n}`:""}`)},"listComments"),getQueuedComments:a(e=>d.get(`/issues/${e}/queued-comments`),"getQueuedComments"),editQueuedComment:a((e,t,r)=>d.patch(`/issues/${e}/queued-comments/${t}`,r),"editQueuedComment"),reorderQueuedComments:a((e,t)=>d.put(`/issues/${e}/queued-comments/order`,t),"reorderQueuedComments"),interruptQueuedComments:a((e,t)=>d.post(`/issues/${e}/queued-comments/interrupt`,t),"interruptQueuedComments"),interruptLatestQueuedComments:a(async(e,t)=>{const r=await Z.getQueuedComments(e);if(!r.queueId||r.targetRunId&&r.targetRunId!==t)throw new Error("The queued messages changed. Refresh and try again.");return Z.interruptQueuedComments(e,{queueId:r.queueId,revision:r.revision,targetRunId:r.targetRunId})},"interruptLatestQueuedComments"),steerQueuedComment:a((e,t,r)=>d.post(`/issues/${e}/queued-comments/${t}/steer`,r),"steerQueuedComment"),discardQueuedComment:a((e,t,r)=>d.delete(`/issues/${e}/queued-comments/${t}`,r),"discardQueuedComment"),listInteractions:a(e=>d.get(`/issues/${e}/interactions`),"listInteractions"),listAcceptedPlanDecompositions:a(e=>d.get(`/issues/${e}/accepted-plan-decompositions`),"listAcceptedPlanDecompositions"),createInteraction:a((e,t)=>d.post(`/issues/${e}/interactions`,t),"createInteraction"),acceptInteraction:a((e,t,r)=>{const{note:n,...o}=r??{};return d.post(`/issues/${e}/interactions/${t}/accept`,n?.trim()?{...o,note:n}:o)},"acceptInteraction"),rejectInteraction:a((e,t,r,n)=>d.post(`/issues/${e}/interactions/${t}/reject`,{...r?{reason:r}:{},...n?.trim()?{note:n}:{}}),"rejectInteraction"),cancelInteraction:a((e,t,r)=>d.post(`/issues/${e}/interactions/${t}/cancel`,r?{reason:r}:{}),"cancelInteraction"),skipInteraction:a((e,t,r)=>d.post(`/issues/${e}/interactions/${t}/skip`,r?{reason:r}:{}),"skipInteraction"),respondToInteraction:a((e,t,r)=>d.post(`/issues/${e}/interactions/${t}/respond`,r),"respondToInteraction"),submitInteractionVerdicts:a((e,t,r)=>d.post(`/issues/${e}/interactions/${t}/verdicts`,{verdicts:r}),"submitInteractionVerdicts"),getComment:a((e,t)=>d.get(`/issues/${e}/comments/${t}`),"getComment"),listFeedbackVotes:a(e=>d.get(`/issues/${e}/feedback-votes`),"listFeedbackVotes"),getCostSummary:a((e,t={})=>{const r=t.excludeRoot?"?excludeRoot=true":"";return d.get(`/issues/${e}/cost-summary${r}`)},"getCostSummary"),listFeedbackTraces:a((e,t)=>{const r=new URLSearchParams;for(const[o,s]of Object.entries(t??{}))s!==void 0&&r.set(o,String(s));const n=r.toString();return d.get(`/issues/${e}/feedback-traces${n?`?${n}`:""}`)},"listFeedbackTraces"),upsertFeedbackVote:a((e,t)=>d.post(`/issues/${e}/feedback-votes`,t),"upsertFeedbackVote"),addComment:a((e,t,r,n,o,s,i)=>Rt(d.post(`/issues/${e}/comments`,{body:t,...s?{clientRequestId:s}:{},...r===void 0?{}:{reopen:r},...n===void 0?{}:{interrupt:n},...o?.length?{attachmentIds:o}:{},...i===void 0?{}:{deliver:i}}),St),"addComment"),cancelComment:a((e,t)=>d.delete(`/issues/${e}/comments/${t}?mode=cancel`),"cancelComment"),deleteComment:a((e,t)=>d.delete(`/issues/${e}/comments/${t}`),"deleteComment"),listDocuments:a((e,t)=>d.get(`/issues/${e}/documents${t?.includeSystem?"?includeSystem=true":""}`),"listDocuments"),getDocument:a((e,t)=>d.get(`/issues/${e}/documents/${encodeURIComponent(t)}`),"getDocument"),getDocumentPdf:a((e,t)=>d.getBlob(`/issues/${e}/documents/${encodeURIComponent(t)}/pdf`),"getDocumentPdf"),upsertDocument:a((e,t,r)=>d.put(`/issues/${e}/documents/${encodeURIComponent(t)}`,r),"upsertDocument"),lockDocument:a((e,t)=>d.post(`/issues/${e}/documents/${encodeURIComponent(t)}/lock`,{}),"lockDocument"),unlockDocument:a((e,t)=>d.post(`/issues/${e}/documents/${encodeURIComponent(t)}/unlock`,{}),"unlockDocument"),listDocumentRevisions:a((e,t)=>d.get(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions`),"listDocumentRevisions"),restoreDocumentRevision:a((e,t,r)=>d.post(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions/${r}/restore`,{}),"restoreDocumentRevision"),deleteDocument:a((e,t)=>d.delete(`/issues/${e}/documents/${encodeURIComponent(t)}`),"deleteDocument"),listAttachments:a(e=>d.get(`/issues/${e}/attachments`),"listAttachments"),uploadAttachment:a((e,t,r,n)=>{const o=zn(r);if(o)return Promise.reject(o);const s=new FormData;return s.append("file",r),n&&s.append("issueCommentId",n),d.postForm(`/companies/${e}/issues/${t}/attachments`,s)},"uploadAttachment"),deleteAttachment:a(e=>d.delete(`/attachments/${e}`),"deleteAttachment"),privacyConstraints:a(e=>d.get(`/issues/${e}/privacy-constraints`),"privacyConstraints"),listAccessGrants:a((e,t)=>t?d.get(`/issues/${e}/access-grants`,t):d.get(`/issues/${e}/access-grants`),"listAccessGrants"),createAccessGrant:a((e,t)=>d.post(`/issues/${e}/access-grants`,t),"createAccessGrant"),revokeAccessGrant:a((e,t)=>d.post(`/issues/${e}/access-grants/${t}/revoke`,{}),"revokeAccessGrant"),setVisibility:a((e,t)=>d.patch(`/issues/${e}`,{visibility:t}),"setVisibility"),listApprovals:a(e=>d.get(`/issues/${e}/approvals`),"listApprovals"),linkApproval:a((e,t)=>d.post(`/issues/${e}/approvals`,{approvalId:t}),"linkApproval"),unlinkApproval:a((e,t)=>d.delete(`/issues/${e}/approvals/${t}`),"unlinkApproval"),listWorkProducts:a((e,t)=>{const r=`/issues/${e}/work-products${t?.refreshPullRequests?"?refreshPullRequests=true":""}`;return t?.fresh&&Gn(r),d.get(r,{signal:t?.signal})},"listWorkProducts"),ensureWorkProductReviewDocument:a((e,t)=>d.post(`/issues/${e}/work-products/${t}/review-document`,{}),"ensureWorkProductReviewDocument"),createWorkProduct:a((e,t)=>d.post(`/issues/${e}/work-products`,t),"createWorkProduct"),updateWorkProduct:a((e,t)=>d.patch(`/work-products/${e}`,t),"updateWorkProduct"),deleteWorkProduct:a(e=>d.delete(`/work-products/${e}`),"deleteWorkProduct")};function ee(e){return new Date(e).getTime()}a(ee,"toTimestamp");function ds(){const e=globalThis.crypto?.randomUUID?.();return e?`optimistic-${e}`:`optimistic-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}a(ds,"createOptimisticCommentId");function tt(e){return[...e].sort((t,r)=>{const n=ee(t.createdAt)-ee(r.createdAt);return n!==0?n:t.id.localeCompare(r.id)})}a(tt,"sortIssueComments");function Et(e){return tt(e).reverse()}a(Et,"sortIssueCommentsDesc");function vl(e){const t=new Date,r=ds();return{id:r,clientId:r,companyId:e.companyId,issueId:e.issueId,authorType:"user",authorAgentId:null,authorUserId:e.authorUserId,body:e.body,presentation:null,metadata:null,clientStatus:e.clientStatus??"pending",queueTargetRunId:e.queueTargetRunId??null,createdAt:t,updatedAt:t}}a(vl,"createOptimisticIssueComment");function bl(e){return e.runId||e.interruptedRunId||e.comment.id&&(e.comment.id===e.activeRunWakeCommentId||e.comment.id===e.activeRunCommentId)||e.comment.authorAgentId&&e.activeRunAgentId&&e.comment.authorAgentId===e.activeRunAgentId?!1:e.comment.clientStatus==="queued"?!0:e.activeRunStartedAt?ee(e.comment.createdAt)>=ee(e.activeRunStartedAt):!1}a(bl,"isQueuedIssueComment");function kl(e,t){const r=t.queuedTargetRunId??null;return!r||!t.targetRunIsLive||t.runningRunId&&t.runningRunId!==r?e:{...e,clientStatus:"queued",queueState:"queued",queueTargetRunId:r}}a(kl,"applyLocalQueuedIssueCommentState");function xl(e,t){const r=e??[],n=[...r],o=new Set(n.map(i=>i.id)),s=new Set;for(const i of t){if(o.has(i.id))continue;const u=r.find(c=>!s.has(c.id)&&c.issueId===i.issueId&&c.authorType===i.authorType&&c.authorUserId===i.authorUserId&&c.body===i.body&&Math.abs(ee(c.createdAt)-ee(i.createdAt))<=6e4);if(u){s.add(u.id);const c={...u,clientId:i.clientId};n[n.findIndex(m=>m.id===u.id)]=c;continue}n.push(i)}return tt(n)}a(xl,"mergeIssueComments");function wl(e,t){const r=e.findIndex(n=>n.clientId===t);return r===-1?{comments:e,comment:null}:{comments:e.filter(n=>n.clientId!==t),comment:e[r]??null}}a(wl,"takeOptimisticIssueComment");function Il(e){return tt((e??[]).flatMap(t=>t))}a(Il,"flattenIssueCommentPages");function ms(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}a(ms,"getNextIssueCommentPageParam");function $t(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}a($t,"getNextPageCursor");async function Sl(e){const t=(e.pages??[]).map(i=>[...i]),r=e.pageParams?[...e.pageParams].slice(0,t.length):t.map(()=>null);for(;r.length<t.length;)r.push(null);if(e.pageSize<=0)return{pages:t,pageParams:r};let n=$t(t[t.length-1],e.pageSize);const o=Math.max(0,e.maxPages??Number.POSITIVE_INFINITY),s=new Set;for(;n&&!s.has(n)&&s.size<o;){s.add(n);const i=[...await e.fetchPage(n)];t.push(i),r.push(n),n=$t(i,e.pageSize)}return{pages:t,pageParams:r}}a(Sl,"loadRemainingIssueCommentPages");function Rl(e){return e.activeDetailTab!=="chat"||!e.hasOlderComments||e.initialPageLoading||e.olderPageLoading||e.loadedCommentCount===0?!1:e.loadedCommentCount<e.autoLoadLimit}a(Rl,"shouldAutoloadOlderIssueComments");function Cl(e,t){if(!e)return e;const r={...e};return t.reopen===!0&&(e.status==="done"||e.status==="cancelled"||e.status==="blocked")&&(r.status="todo"),t.reassignment&&(r.assigneeAgentId=t.reassignment.assigneeAgentId,r.assigneeUserId=t.reassignment.assigneeUserId),r}a(Cl,"applyOptimisticIssueCommentUpdate");function fs(e,t){if(!e)return e;const r={...e,updatedAt:new Date},n=a(s=>Object.prototype.hasOwnProperty.call(t,s),"hasOwn"),o=a(s=>{n(s)&&(r[s]=t[s])},"assign");if(o("status"),o("priority"),o("assigneeAgentId"),o("assigneeUserId"),o("projectId"),o("parentId"),o("projectWorkspaceId"),o("executionWorkspaceId"),o("executionWorkspacePreference"),o("executionWorkspaceSettings"),o("hiddenAt"),n("labelIds")&&Array.isArray(t.labelIds)){const s=t.labelIds.filter(i=>typeof i=="string");r.labelIds=s,e.labels&&(r.labels=e.labels.filter(i=>s.includes(i.id)))}if(n("blockedByIssueIds")&&Array.isArray(t.blockedByIssueIds)&&e.blockedBy){const s=new Set(t.blockedByIssueIds.filter(i=>typeof i=="string"));r.blockedBy=e.blockedBy.filter(i=>s.has(i.id))}return n("projectId")&&(r.project=e.project?.id===r.projectId?e.project:null),n("parentId")&&(r.ancestors=void 0),n("executionWorkspaceId")&&(r.currentExecutionWorkspace=e.currentExecutionWorkspace?.id===r.executionWorkspaceId?e.currentExecutionWorkspace:null),r}a(fs,"applyOptimisticIssueFieldUpdate");function ps(e,t){const r=t instanceof Set?t:new Set(t);return r.has(e.id)||!!e.identifier&&r.has(e.identifier)}a(ps,"matchesIssueRef$1");function El(e,t,r){if(!e)return e;let n=!1;const o=e.map(s=>ps(s,t)?(n=!0,fs(s,r)??s):s);return n?o:e}a(El,"applyOptimisticIssueFieldUpdateToCollection");function $l(e,t){if(!e||e.length===0)return[[t]];const r=e.map(n=>[...n]);for(let n=0;n<r.length;n+=1){const o=r[n].findIndex(s=>s.id===t.id);if(o!==-1)return r[n][o]=t,r[n]=Et(r[n]),r}return r[0]=Et([...r[0],t]),r}a($l,"upsertIssueCommentInPages");function _l(e,t){return!e||e.length===0?[]:e.map(r=>r.filter(n=>n.id!==t)).filter(r=>r.length>0)}a(_l,"removeIssueCommentFromPages");var hs=["issues","detail"],Cr=6e4,gs=3e4;function le(e){return typeof e=="string"&&e.length>0}a(le,"isNonEmptyString");function Er(e,t){const r=new Set;return le(e)&&r.add(e),le(t?.id)&&r.add(t.id),le(t?.identifier)&&r.add(t.identifier),Array.from(r)}a(Er,"collectIssueRefs");function ys(e,t){const r=t instanceof Set?t:new Set(t);return r.has(e.id)||!!e.identifier&&r.has(e.identifier)}a(ys,"matchesIssueRef");function Se(e){if(typeof e!="object"||e===null)return!1;const t=e;return le(t.id)&&le(t.companyId)&&typeof t.title=="string"&&typeof t.status=="string"&&typeof t.workMode=="string"&&typeof t.priority=="string"&&(t.projectId===null||typeof t.projectId=="string")&&(t.parentId===null||typeof t.parentId=="string")&&(t.identifier===null||typeof t.identifier=="string")&&(t.description===null||typeof t.description=="string")&&(t.assigneeAgentId===null||typeof t.assigneeAgentId=="string")&&(t.assigneeUserId===null||typeof t.assigneeUserId=="string")&&(t.executionRunId===null||typeof t.executionRunId=="string")&&(t.issueNumber===null||typeof t.issueNumber=="number")&&typeof t.requestDepth=="number"&&t.createdAt!=null&&t.updatedAt!=null}a(Se,"isCompleteIssueSnapshot");function _t(e,t){return e?{...e,...t}:t}a(_t,"mergeIssueSnapshots");function $r(e,t,r){const n=Er(t,r);for(const o of n){const s=e.getQueryData(de.issues.detail(o));if(Se(s))return s}return e.getQueriesData({queryKey:hs}).map(([,o])=>o).find(o=>Se(o)&&ys(o,n))}a($r,"getCachedIssueDetail");function _r(e,t,r){if(!Se(t))return t;const n=Er(r?.issueRef,t),o=_t($r(e,r?.issueRef,t),t);for(const s of n)e.setQueryData(de.issues.detail(s),i=>_t(i,o));return o}a(_r,"seedIssueDetailCache");async function Ar(e,t,r){return _r(e,r?await Z.get(t,r):await Z.get(t),{issueRef:t})}a(Ar,"fetchIssueDetail");function vs(e,t,r){return{queryKey:de.issues.detail(t),queryFn:a(({signal:n})=>Ar(e,t,{signal:n}),"queryFn"),placeholderData:$r(e,t,r?.placeholderIssue??void 0)}}a(vs,"getIssueDetailQueryOptions");function bs(e,t,r){return Se(r?.issue)&&_r(e,r.issue,{issueRef:t}),e.prefetchQuery({queryKey:de.issues.detail(t),queryFn:a(()=>Ar(e,t),"queryFn"),staleTime:Cr})}a(bs,"prefetchIssueDetail");function ks(e,t){return e.prefetchInfiniteQuery({queryKey:de.issues.comments(t),queryFn:a(({pageParam:r})=>Z.listComments(t,{order:"desc",limit:50,...r?{after:r}:{}}),"queryFn"),initialPageParam:null,getNextPageParam:a(r=>ms(r,50),"getNextPageParam"),staleTime:gs,pages:1})}a(ks,"prefetchIssueComments");function xs(e,t,r){return Promise.all([bs(e,t,r),ks(e,r?.issue?.id??t)])}a(xs,"prefetchIssueDetailForNavigation");var S=jt(jn(),1);function ws({...e}){return(0,S.jsx)(Kn,{"data-slot":"popover",...e})}a(ws,"Popover");function Is({...e}){return(0,S.jsx)(Xn,{"data-slot":"popover-trigger",...e})}a(Is,"PopoverTrigger");function Ss({className:e,align:t="center",sideOffset:r=4,disablePortal:n=!1,...o}){const s=(0,S.jsx)(Hn,{"data-slot":"popover-content",align:t,sideOffset:r,className:K("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 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o});return n?s:(0,S.jsx)(Wn,{children:s})}a(Ss,"PopoverContent");function Al({...e}){return(0,S.jsx)(Yn,{"data-slot":"popover-anchor",...e})}a(Al,"PopoverAnchor");function Dl({className:e,...t}){return(0,S.jsx)("div",{"data-slot":"popover-title",className:K("font-medium",e),...t})}a(Dl,"PopoverTitle");function Pl({className:e,...t}){return(0,S.jsx)("p",{"data-slot":"popover-description",className:K("text-muted-foreground",e),...t})}a(Pl,"PopoverDescription");var Dr={name:"atom",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z",key:"1l2ple"}],["path",{d:"M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z",key:"1wam0m"}]]};Dr.node;var Rs=k(Dr),Pr={name:"ban",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]};Pr.node;var Cs=k(Pr),Lr={name:"box",size:24,node:[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]};Lr.node;var Es=k(Lr),Mr={name:"brain",size:24,node:[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]};Mr.node;var $s=k(Mr),Tr={name:"briefcase",size:24,node:[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]};Tr.node;var _s=k(Tr),Ur={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};Ur.node;var As=k(Ur),Or={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};Or.node;var Ds=k(Or),jr={name:"circle-dashed",size:24,node:[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]};jr.node;var Br=k(jr),Nr={name:"circle-dot",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]};Nr.node;var Ps=k(Nr),zr={name:"circle-minus",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],aliases:["minus-circle"]};zr.node;var At=k(zr),Fr={name:"circle",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]};Fr.node;var Dt=k(Fr),qr={name:"code",size:24,node:[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]};qr.node;var Ls=k(qr),Hr={name:"cog",size:24,node:[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]]};Hr.node;var Ms=k(Hr),Wr={name:"compass",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]]};Wr.node;var Ts=k(Wr),Vr={name:"cpu",size:24,node:[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]};Vr.node;var Us=k(Vr),Kr={name:"crown",size:24,node:[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]};Kr.node;var Os=k(Kr),Qr={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};Qr.node;var js=k(Qr),Jr={name:"file-code",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 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]};Jr.node;var Bs=k(Jr),Gr={name:"flame",size:24,node:[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]]};Gr.node;var Ns=k(Gr),Yr={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};Yr.node;var zs=k(Yr),Zr={name:"gem",size:24,node:[["path",{d:"M10.5 3 8 9l4 13 4-13-2.5-6",key:"b3dvk1"}],["path",{d:"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z",key:"7w4byz"}],["path",{d:"M2 9h20",key:"16fsjt"}]]};Zr.node;var Fs=k(Zr),Xr={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};Xr.node;var qs=k(Xr),en={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};en.node;var Hs=k(en),tn={name:"hammer",size:24,node:[["path",{d:"m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9",key:"1hayfq"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"15ts47"}]]};tn.node;var Ws=k(tn),rn={name:"heart",size:24,node:[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]};rn.node;var Vs=k(rn),nn={name:"hexagon",size:24,node:[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}]]};nn.node;var Ks=k(nn),an={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};an.node;var Qs=k(an),on={name:"lightbulb",size:24,node:[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]};on.node;var Js=k(on),sn={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};sn.node;var Gs=k(sn),ln={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};ln.node;var Ys=k(ln),un={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};un.node;var Zs=k(un),cn={name:"package",size:24,node:[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]};cn.node;var Xs=k(cn),dn={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};dn.node;var Ll=k(dn),mn={name:"puzzle",size:24,node:[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]};mn.node;var ei=k(mn),fn={name:"radar",size:24,node:[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]]};fn.node;var ti=k(fn),pn={name:"rocket",size:24,node:[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]};pn.node;var ri=k(pn),hn={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};hn.node;var ni=k(hn),gn={name:"shield",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]};gn.node;var ai=k(gn),yn={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};yn.node;var oi=k(yn),vn={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};vn.node;var si=k(vn),bn={name:"target",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};bn.node;var ii=k(bn),kn={name:"telescope",size:24,node:[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]]};kn.node;var li=k(kn),xn={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};xn.node;var ui=k(xn),wn={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};wn.node;var ci=k(wn),In={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};In.node;var di=k(In),Ml={backlog:"text-muted-foreground border-muted-foreground",todo:"text-amber-600 border-amber-600 dark:text-amber-400 dark:border-amber-400",in_progress:"text-blue-600 border-blue-600 dark:text-blue-400 dark:border-blue-400",in_review:"text-violet-600 border-violet-600 dark:text-violet-400 dark:border-violet-400",done:"text-green-600 border-green-600 dark:text-green-400 dark:border-green-400",cancelled:"text-neutral-500 border-neutral-500",blocked:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400"},Tl="text-muted-foreground border-muted-foreground",Ul={backlog:"text-muted-foreground",todo:"text-amber-600 dark:text-amber-400",in_progress:"text-blue-600 dark:text-blue-400",in_review:"text-violet-600 dark:text-violet-400",done:"text-green-600 dark:text-green-400",cancelled:"text-neutral-500",blocked:"text-red-600 dark:text-red-400"},Ol="text-muted-foreground",ve={gray:"bg-[#F5F3F0] text-[#52585D] border-[#A8AEB2] dark:bg-[#6e696024] dark:text-[#9A958A] dark:border-[#9e958a73]",blue:"bg-[#DBEAFE] text-[#1D4ED8] border-[#2563EB] dark:bg-[#2563eb2e] dark:text-[#2563EB] dark:border-[#2563eb73]",amber:"bg-[#FEF3C7] text-[#B45309] border-[#F59E0B] dark:bg-[#f59e0b24] dark:text-[#F59E0B] dark:border-[#f59e0b73]",green:"bg-[#DCFCE7] text-[#188A3C] border-[#22C55E] dark:bg-[#22c55e1f] dark:text-[#22C55E] dark:border-[#22c55e73]",violet:"bg-[#EDE9FE] text-[#5B21B6] border-[#7C3AED] dark:bg-[#7c3aed2e] dark:text-[#7C3AED] dark:border-[#7c3aed73]",red:"bg-[#FEE2E2] text-[#991B1B] border-[#DC2626] dark:bg-[#dc26262e] dark:text-[#DC2626] dark:border-[#dc262673]"},jl={active:`border ${ve.green}`,running:`border ${ve.blue}`,scheduled_retry:"bg-sky-100 text-sky-700 dark:bg-sky-900/50 dark:text-sky-300",paused:`border ${ve.amber}`,idle:`border ${ve.gray}`,archived:"bg-muted text-muted-foreground",planned:"bg-muted text-muted-foreground",achieved:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",completed:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",failed:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",timed_out:"bg-orange-100 text-orange-700 dark:bg-orange-900/50 dark:text-orange-300",succeeded:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",ok:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",warning:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",error:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",info:"bg-sky-100 text-sky-700 dark:bg-sky-900/50 dark:text-sky-300",terminated:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",pending:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/50 dark:text-yellow-300",queued:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/50 dark:text-yellow-300",pending_approval:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",revision_requested:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",approved:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",rejected:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",draft:"bg-muted text-muted-foreground",backlog:"bg-muted text-muted-foreground",todo:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",in_progress:"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300",in_review:"bg-violet-100 text-violet-700 dark:bg-violet-900/50 dark:text-violet-300",blocked:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",done:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",cancelled:"bg-muted text-muted-foreground",allowed:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",denied:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",block:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300","require-approval":"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",redacted:"bg-violet-100 text-violet-700 dark:bg-violet-900/50 dark:text-violet-300","rate-limit":"bg-orange-100 text-orange-700 dark:bg-orange-900/50 dark:text-orange-300",deferred:"bg-sky-100 text-sky-700 dark:bg-sky-900/50 dark:text-sky-300",hidden:"bg-muted text-muted-foreground",quarantined:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300","runtime-error":"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",healthy:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",degraded:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",unchecked:"bg-muted text-muted-foreground"},Bl="bg-muted text-muted-foreground",Nl="text-[#1D4ED8] dark:text-[#2563EB]",zl="bg-blue-500/10 border-blue-500/30 text-blue-600 dark:text-blue-400",Fl={info:"border-[#2563EB]/40 bg-[#DBEAFE]/50 text-[#1D4ED8] dark:border-[#2563eb59] dark:bg-[#2563eb14] dark:text-[#93C5FD]",warning:"border-[#F59E0B]/50 bg-[#FEF3C7]/60 text-[#B45309] dark:border-[#f59e0b59] dark:bg-[#f59e0b12] dark:text-[#F59E0B]",danger:"border-destructive/40 bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300"},ql={idle:"--status-agent-idle",active:"--status-agent-idle",running:"--status-agent-running",paused:"--status-agent-paused",error:"--status-agent-error"},Hl="--status-agent-idle",Wl={idle:"--status-task-backlog",backlog:"--status-task-backlog",todo:"--status-task-todo",in_progress:"--status-task-in_progress",in_review:"--status-task-in_review",done:"--status-task-done",blocked:"--status-task-blocked",cancelled:"--status-task-cancelled"},Vl="--status-task-backlog",mi={idle:"--status-task-icon-backlog",backlog:"--status-task-icon-backlog",todo:"--status-task-icon-todo",in_progress:"--status-task-icon-in_progress",in_review:"--status-task-icon-in_review",done:"--status-task-icon-done",blocked:"--status-task-icon-blocked",cancelled:"--status-task-icon-cancelled",in_queue:"--status-task-icon-in_queue"};var Kl={running:"bg-blue-400 animate-pulse",active:"bg-green-400",paused:"bg-yellow-400",idle:"bg-yellow-400",pending_approval:"bg-amber-400",error:"bg-red-400",archived:"bg-neutral-400"},Ql="bg-neutral-400",Jl={critical:"text-red-600 dark:text-red-400",high:"text-orange-600 dark:text-orange-400",medium:"text-yellow-600 dark:text-yellow-400",low:"text-blue-600 dark:text-blue-400"},Gl="text-yellow-600 dark:text-yellow-400",Yl={unknown:"text-muted-foreground border-muted-foreground",open:"text-blue-600 border-blue-600 dark:text-blue-400 dark:border-blue-400",waiting:"text-amber-600 border-amber-600 dark:text-amber-400 dark:border-amber-400",running:"text-blue-600 border-blue-600 dark:text-blue-400 dark:border-blue-400",succeeded:"text-green-600 border-green-600 dark:text-green-400 dark:border-green-400",merged:"text-violet-600 border-violet-600 dark:text-violet-400 dark:border-violet-400",failed:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400",blocked:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400",closed:"text-neutral-500 border-neutral-500",archived:"text-neutral-500 border-neutral-500",auth_required:"text-amber-600 border-amber-600 dark:text-amber-400 dark:border-amber-400",unreachable:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400"},Zl="text-muted-foreground border-muted-foreground",Xl={unknown:"bg-muted text-muted-foreground",open:"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300",waiting:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",running:"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300",succeeded:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",failed:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",blocked:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",closed:"bg-muted text-muted-foreground",archived:"bg-muted text-muted-foreground",auth_required:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",unreachable:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300"},eu="bg-muted text-muted-foreground",tu={unknown:"",fresh:"",stale:"opacity-70 [border-style:dashed]",auth_required:"[border-style:dashed]",unreachable:"[border-style:dashed]"},fi={sm:14,md:16,lg:20},pi=k("TaskProgressSpinner",[["circle",{cx:"12",cy:"12",r:"10",pathLength:"100",strokeDasharray:"80 20",key:"progress"}]]),hi={idle:Dt,backlog:Br,todo:Dt,in_progress:pi,in_review:Ps,done:Ds,blocked:At,cancelled:Cs,in_queue:At},gi=Br;function yi({status:e,size:t="md",className:r,title:n}){const o=fi[t],s=hi[e]??gi,i=mi[e]??"--status-task-icon-backlog",u=n?{role:"img","aria-label":n}:{"aria-hidden":!0};return(0,S.jsx)(s,{size:o,className:K("inline-block shrink-0 align-middle",e==="in_progress"&&"motion-safe:animate-spin",r),style:{color:`var(${i})`},...u,children:n?(0,S.jsx)("title",{children:n}):null})}a(yi,"StatusGlyph");var Pt={folder:zs,rocket:ri,code:Ls,terminal:ui,database:js,globe:Hs,package:Xs,boxes:Zn,box:Es,layers:Qs,briefcase:_s,compass:Ts,target:ii,flame:Ns,zap:di,star:si,bug:As,wrench:ci,hammer:Ws,lightbulb:Js,sparkles:oi,shield:ai,lock:Gs,search:ni,cog:Ms,brain:$s,cpu:Us,"git-branch":qs,"file-code":Bs,puzzle:ei,gem:Fs,atom:Rs,heart:Vs,mail:Ys,"message-square":Zs,crown:Os,radar:ti,telescope:li,hexagon:Ks},vi="folder";function bi(e){return e&&Bn.includes(e)?Pt[e]:Pt[vi]}a(bi,"getProjectIcon");var ki={xs:{box:"h-4 w-4 rounded-sm",icon:"h-2.5 w-2.5"},sm:{box:"h-6 w-6 rounded-md",icon:"h-3.5 w-3.5"},md:{box:"h-7 w-7 rounded-lg",icon:"h-4 w-4"},lg:{box:"h-9 w-9 rounded-lg",icon:"h-5 w-5"}};function xi({color:e,icon:t,size:r="md",className:n}){const o=ki[r],s=!!e,i=bi(t);return(0,S.jsx)("span",{"aria-hidden":!0,className:K("inline-flex shrink-0 items-center justify-center",o.box,s?"text-white":"bg-muted text-muted-foreground",n),style:s?{backgroundColor:e??void 0}:void 0,children:(0,S.jsx)(i,{className:o.icon})})}a(xi,"ProjectTile");var ue=null,He=new Set;function Sn(){for(const e of He)e()}a(Sn,"emitQuicklookChange");function Lt(e){ue!==e&&(ue=e,Sn())}a(Lt,"openQuicklookId");function Mt(e){ue===e&&(ue=null,Sn())}a(Mt,"closeQuicklookId");function wi(e){return He.add(e),()=>{He.delete(e)}}a(wi,"subscribeQuicklook");function Ii(e){return l.useSyncExternalStore(wi,()=>ue===e,()=>!1)}a(Ii,"useIsQuicklookOpen");var Si=120,Ri=13,Ci="w-72 p-3";function Ei(e="start"){return e==="start"?-13:e==="end"?Ri:0}a(Ei,"quicklookAlignOffset");function $i(e){if(!e)return null;const t=e.replace(/!\[[^\]]*]\([^)]+\)/g," ").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[#>*_`~-]+/g," ").replace(/\s+/g," ").trim();return t?t.length>180?`${t.slice(0,177).trimEnd()}...`:t:null}a($i,"summarizeIssueDescription");function _i({className:e}){return(0,S.jsx)("span",{className:K("text-xs",e),"aria-hidden":!0,children:"·"})}a(_i,"QuicklookSeparator");function Ai(e){const t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}a(Ai,"statusLabel");function Di({issue:e,linkTo:t,linkState:r,compact:n=!1}){const o=(0,l.useMemo)(()=>$i(e.description),[e.description]),s=e.project?.name;return(0,S.jsxs)("div",{className:K("space-y-2",n&&"space-y-1.5"),children:[(0,S.jsxs)("div",{className:"flex items-center gap-1",children:[(0,S.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1",children:[(0,S.jsx)(yi,{status:e.status,size:"md",title:Ai(e.status)}),(0,S.jsx)("span",{className:"shrink-0 font-mono text-(length:--text-micro) text-muted-foreground",children:e.identifier??e.id.slice(0,8)}),s?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(_i,{className:"shrink-0 text-muted-foreground"}),(0,S.jsxs)("span",{className:"flex min-w-0 max-w-(--sz-12rem) flex-1 items-center gap-1 text-(length:--text-micro) text-muted-foreground",title:s,"data-testid":"quicklook-project",children:[(0,S.jsx)(xi,{size:"xs"}),(0,S.jsx)("span",{className:"truncate",children:s})]})]}):null]}),(0,S.jsx)("span",{className:"shrink-0 text-(length:--text-micro) text-muted-foreground",children:Zo(new Date(e.updatedAt))})]}),(0,S.jsx)(pe,{to:t,state:r??Ir(null,e),className:"block text-sm font-medium leading-snug hover:underline line-clamp-2",children:e.title}),o?(0,S.jsx)("p",{className:"text-xs leading-5 text-muted-foreground [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:4] overflow-hidden",children:o}):null]})}a(Di,"IssueQuicklookCard");var Pi=l.forwardRef(a(function({issuePathId:t,to:r,children:n,className:o,state:s,disableIssueQuicklook:i=!1,issuePrefetch:u=null,issueQuicklookSide:c="top",issueQuicklookAlign:m="start",onClick:p,onClickCapture:f,onMouseEnter:g,onFocus:b,onBlur:v,onTouchStart:y,...h},x){const w=ea(),I=l.useMemo(()=>Symbol("issue-quicklook"),[]),_=Ii(I),C=l.useRef(null),A=l.useRef(null),L=l.useRef(null),j=l.useCallback(E=>{A.current=E,typeof x=="function"?x(E):x&&(x.current=E)},[x]),D=l.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null)},[]),N=l.useCallback(()=>{D(),Lt(I)},[D,I]),G=l.useCallback(()=>{D(),C.current=setTimeout(()=>{C.current=null,Lt(I)},Si)},[D,I]),U=l.useCallback(()=>{D(),Mt(I)},[D,I]);l.useEffect(()=>()=>{D(),Mt(I)},[D,I]),l.useEffect(()=>{if(!_)return;const E=12,at=a((V,se,Y)=>{if(!V)return!1;const W=V.getBoundingClientRect();return se>=W.left-E&&se<=W.right+E&&Y>=W.top-E&&Y<=W.bottom+E},"nearBox"),Un=a((V,se)=>{const Y=A.current,W=L.current;if(Y?.matches(":hover")||W?.matches(":hover")||at(Y,V,se)||at(W,V,se))return!0;const Pe=document.activeElement;return Y===Pe||!!W&&!!Pe&&W.contains(Pe)},"stillEngaged"),ot=a(V=>{Un(V.clientX,V.clientY)||U()},"onPointerMove");return document.addEventListener("pointermove",ot,{passive:!0}),()=>document.removeEventListener("pointermove",ot)},[_,U]);const H=u?Ir(s,u):s,{data:z,isLoading:F}=Qn({...vs(w,t,{placeholderIssue:u??void 0}),enabled:_,staleTime:Cr}),Tn=us(t),oe=l.useCallback(()=>{xs(w,t,{issue:u})},[t,u,w]),nt=(0,S.jsx)(pe,{ref:j,to:r,state:H,className:o,onMouseEnter:a(E=>{oe(),g?.(E)},"onMouseEnter"),onFocus:a(E=>{oe(),N(),b?.(E)},"onFocus"),onBlur:a(E=>{setTimeout(()=>U(),0),v?.(E)},"onBlur"),onTouchStart:a(E=>{oe(),y?.(E)},"onTouchStart"),onClickCapture:a(E=>{oe(),f?.(E)},"onClickCapture"),onClick:a(E=>{U(),p?.(E)},"onClick"),...h,children:n});return i?nt:(0,S.jsxs)(ws,{open:_,onOpenChange:a(E=>E?N():U(),"onOpenChange"),children:[(0,S.jsx)(Is,{asChild:!0,onMouseEnter:a(()=>{oe(),G()},"onMouseEnter"),onMouseLeave:U,children:nt}),(0,S.jsx)(Ss,{ref:L,"data-quicklook":!0,className:Ci,side:c,align:m,alignOffset:Ei(m),onMouseEnter:N,onMouseLeave:U,onOpenAutoFocus:a(E=>E.preventDefault(),"onOpenAutoFocus"),onCloseAutoFocus:a(E=>E.preventDefault(),"onCloseAutoFocus"),children:z?(0,S.jsx)(Di,{issue:z,linkTo:Tn,linkState:H,compact:!0}):(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsx)("div",{className:"h-4 w-24 rounded bg-accent/50"}),(0,S.jsx)("div",{className:"h-4 w-full rounded bg-accent/40"}),(0,S.jsx)("div",{className:"h-4 w-3/4 rounded bg-accent/30"}),F?null:(0,S.jsx)("p",{className:"text-xs text-muted-foreground",children:"Unable to load task preview."})]})})]})},"IssueLinkQuicklookImpl")),Rn=new Set(["dashboard","companies","company","skills","teams-catalog","org","agents","chats","apps","projects","workspaces","execution-workspaces","issues","tasks","routines","goals","artifacts","tools","approvals","costs","usage","activity","audit","decisions","inbox","board-chat","artifacts","u","design-guide","search","settings","timeline"]),rt=new Set(["auth","invite","board-claim","cli-auth","mcp-connect","dot-connect","assistant-connections","docs","instance","s"]);function ce(e){return e.trim().toUpperCase()}a(ce,"normalizeCompanyPrefix");function Cn(e){const t=e.match(/^([^?#]*)(\?[^#]*)?(#.*)?$/);return{pathname:t?.[1]??e,search:t?.[2]??"",hash:t?.[3]??""}}a(Cn,"splitPath");function Li(e){return e.split("/").filter(Boolean)[0]??null}a(Li,"getRootSegment");function Mi(e){if(e==="/")return!0;const t=Li(e);return t?rt.has(t.toLowerCase()):!0}a(Mi,"isGlobalPath");function En(e){const t=e.split("/").filter(Boolean);if(t.length===0)return null;const r=t[0].toLowerCase();return rt.has(r)||Rn.has(r)?null:ce(t[0])}a(En,"extractCompanyPrefixFromPath");function Tt(e,t){const{pathname:r,search:n,hash:o}=Cn(e);if(!r.startsWith("/")||Mi(r)||!t)return e;const s=ce(t);return En(r)?e:`/${s}${r}${n}${o}`}a(Tt,"applyCompanyPrefix");function Ti(e,...t){const r=["cases",...t].filter(Boolean).join("/");return e?`/${ce(e)}/${r}`:`/${r}`}a(Ti,"caseHref");function ru(e){const{pathname:t,search:r,hash:n}=Cn(e),o=t.split("/").filter(Boolean);if(o.length>=2){const s=o[1].toLowerCase();if(!rt.has(o[0].toLowerCase())&&Rn.has(s))return`/${o.slice(1).join("/")}${r}${n}`}return`${t}${r}${n}`}a(ru,"toCompanyRelativePath");var $n=/^[A-Z][A-Z0-9]*-\d+$/i,Ui=/^issue:\/\/:?([^?#\s]+)([?#].*)?$/i,Oi=/issue:\/\/:?[^\s<>()]+|https?:\/\/[^\s<>()]+|\/(?:[^\s<>()/]+\/)*issues\/[A-Z][A-Z0-9]*-\d+(?=$|[\s<>)\],.;!?:])|\b[A-Z][A-Z0-9]*-\d+\b/gi;function _n(e){if(!e)return null;const t=e.trim();if(!t||/^https?:\/\//i.test(t))return null;const r=t.split(/[?#]/,1)[0].split("/").filter(Boolean),n=r.findIndex(s=>s==="issues");if(n===-1||n===r.length-1)return null;const o=decodeURIComponent(r[n+1]??"");return!o||o.startsWith(":")?null:$n.test(o)?o.toUpperCase():o}a(_n,"parseIssuePathIdFromPath");function An(e,t){if(!e)return null;const r=e.trim(),n=r.match(Ui);if(n?.[1]){const i=decodeURIComponent(n[1]);return{issuePathId:i,href:`/issues/${encodeURIComponent(i)}${n[2]??""}`}}const o=_n(e);if(o)return{issuePathId:o,href:`/issues/${encodeURIComponent(o)}${r.match(/[?#].*$/)?.[0]??""}`};if(!$n.test(r))return null;const s=r.toUpperCase();if(t&&t.size>0){const i=s.split("-")[0];if(!i||!t.has(i))return null}return{issuePathId:s,href:`/issues/${encodeURIComponent(s)}`}}a(An,"parseIssueReferenceFromHref");function ji(e){let t=e,r="";for(;t.length>0;){const n=t.at(-1);if(!n||!/[),.;!?:\]]/.test(n))break;if(n===")"){const o=(t.match(/\(/g)??[]).length;if((t.match(/\)/g)??[]).length<=o)break}if(n==="]"){const o=(t.match(/\[/g)??[]).length;if((t.match(/\]/g)??[]).length<=o)break}r=`${n}${r}`,t=t.slice(0,-1)}return{core:t,trailing:r}}a(ji,"splitTrailingPunctuation");function Dn(e,t,r="text"){return{type:"link",url:t,children:[{type:r,value:e}]}}a(Dn,"createIssueLinkNode");function Bi(e,t){const r=[];let n=0,o=!1;for(const s of e.matchAll(Oi)){const i=s[0];if(!i)continue;const u=s.index??0,c=u+i.length,{core:m,trailing:p}=ji(i),f=An(m,t);f&&(o=!0,u>n&&r.push({type:"text",value:e.slice(n,u)}),r.push(Dn(m,f.href)),p&&r.push({type:"text",value:p}),n=c)}return o?(n<e.length&&r.push({type:"text",value:e.slice(n)}),r):null}a(Bi,"linkifyIssueReferencesInText");function Pn(e,t){if(!Array.isArray(e.children)||e.children.length===0||e.type==="link"||e.type==="linkReference"||e.type==="code"||e.type==="definition"||e.type==="html")return;const r=[];for(const n of e.children){if(n.type==="inlineCode"&&typeof n.value=="string"){const o=An(n.value,t);if(o){r.push(Dn(n.value,o.href,"inlineCode"));continue}}if(n.type==="text"&&typeof n.value=="string"){const o=Bi(n.value,t);if(o){r.push(...o);continue}}Pn(n,t),r.push(n)}e.children=r}a(Pn,"rewriteMarkdownTree");function nu(e){const t=e?.knownPrefixes&&e.knownPrefixes.length>0?new Set(e.knownPrefixes.map(r=>r.toUpperCase())):void 0;return r=>{Pn(r,t)}}a(nu,"remarkLinkIssueReferences");function De(e,t){if(typeof e=="string")return Tt(e,t);if(e.pathname&&e.pathname.startsWith("/")){const r=Tt(e.pathname,t);if(r!==e.pathname)return{...e,pathname:r}}return e}a(De,"resolveTo");function he(){const{selectedCompany:e}=Vn(),t=Wa(),r=T();if(t.companyPrefix)return ce(t.companyPrefix);const n=En(r.pathname);return n||(e?ce(e.issuePrefix):null)}a(he,"useActiveCompanyPrefix");function au(){const e=he();return l.useCallback((...t)=>Ti(e,...t),[e])}a(au,"useCaseHref");var ou=l.forwardRef(a(function({to:t,disableIssueQuicklook:r=!1,issuePrefetch:n=null,issueQuicklookSide:o,issueQuicklookAlign:s,...i},u){const c=De(t,he()),m=_n(typeof c=="string"?c:c.pathname);return m?(0,S.jsx)(Pi,{ref:u,to:c,issuePathId:m,disableIssueQuicklook:r,issuePrefetch:n,issueQuicklookSide:o,issueQuicklookAlign:s,...i}):(0,S.jsx)(pe,{ref:u,to:c,...i})},"CompanyLink")),su=l.forwardRef(a(function({to:t,...r},n){const o=he();return(0,S.jsx)(mr,{ref:n,to:De(t,o),...r})},"CompanyNavLink"));function iu({to:e,...t}){const r=he();return(0,S.jsx)(so,{to:De(e,r),...t})}a(iu,"Navigate");function lu(){const e=Ce(),t=he();return l.useCallback(((r,n)=>{if(typeof r=="number"){e(r);return}e(De(r,t),n)}),[e,t])}a(lu,"useNavigate");var Ut=a(e=>typeof e=="boolean"?`${e}`:e===0?"0":e,"falsyToString"),Ot=Jn,Ni=a((e,t)=>r=>{var n;if(t?.variants==null)return Ot(e,r?.class,r?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(m=>{const p=r?.[m],f=s?.[m];if(p===null)return null;const g=Ut(p)||Ut(f);return o[m][g]}),u=r&&Object.entries(r).reduce((m,p)=>{let[f,g]=p;return g===void 0||(m[f]=g),m},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((m,p)=>{let{class:f,className:g,...b}=p;return Object.entries(b).every(v=>{let[y,h]=v;return Array.isArray(h)?h.includes({...s,...u}[y]):{...s,...u}[y]===h})?[...m,f,g]:m},[]);return Ot(e,i,c,r?.class,r?.className)},"cva"),zi=Ni("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-(--tp-color-background-color-border-color-box-shadow-opacity) disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-(length:--rad-3) aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",cta:"bg-foreground text-background hover:bg-foreground/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-9 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-10","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-9","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),Fi=l.forwardRef(a(function({className:t,variant:r="default",size:n="default",asChild:o=!1,...s},i){const u=o?qn:"button";return(0,S.jsx)(u,{ref:i,"data-slot":"button","data-variant":r,"data-size":n,className:K(zi({variant:r,size:n,className:t})),...s})},"Button"));Fi.displayName="Button";function Ln(e,t){return t?`${e}${e.includes("?")?"&":"?"}companyId=${encodeURIComponent(t)}`:e}a(Ln,"withCompanyScope");function R(e,t,r=""){return Ln(`/agents/${encodeURIComponent(e)}${r}`,t)}a(R,"agentPath");var uu={setAvatar:a((e,t,r)=>d.put(`/companies/${e}/agents/${t}/avatar`,{imageBase64:r}),"setAvatar"),getIdentity:a((e,t)=>d.get(R(e,t,"/identity")),"getIdentity"),adoptAiConnection:a((e,t,r,n)=>d.post(Ln(`/agents/${e}/connection-intents/${t}/adopt`,n),{connectionId:r}),"adoptAiConnection"),list:a(e=>d.get(`/companies/${e}/agents`),"list"),org:a(e=>d.get(`/companies/${e}/org`),"org"),listConfigurations:a(e=>d.get(`/companies/${e}/agent-configurations`),"listConfigurations"),get:a(async(e,t)=>{try{return await d.get(R(e,t))}catch(r){if(!(r instanceof Bt)||r.status!==409||!t||Fn(e))throw r;const n=st(e);if(!n)throw r;const o=(await d.get(`/companies/${t}/agents`)).filter(s=>s.status!=="terminated"&&st(s.urlKey)===n);if(o.length!==1)throw r;return d.get(R(o[0].id,t))}},"get"),getConfiguration:a((e,t)=>d.get(R(e,t,"/configuration")),"getConfiguration"),listConfigRevisions:a((e,t)=>d.get(R(e,t,"/config-revisions")),"listConfigRevisions"),getConfigRevision:a((e,t,r)=>d.get(R(e,r,`/config-revisions/${t}`)),"getConfigRevision"),rollbackConfigRevision:a((e,t,r)=>d.post(R(e,r,`/config-revisions/${t}/rollback`),{}),"rollbackConfigRevision"),create:a((e,t)=>d.post(`/companies/${e}/agents`,t),"create"),hire:a((e,t)=>d.post(`/companies/${e}/agent-hires`,t),"hire"),update:a((e,t,r)=>d.patch(R(e,r),t),"update"),updatePermissions:a((e,t,r)=>d.patch(R(e,r,"/permissions"),t),"updatePermissions"),batchAdapterConfigPreview:a(e=>d.post("/agents/batch/adapter-config/preview",{agentIds:e}),"batchAdapterConfigPreview"),batchAdapterConfig:a((e,t)=>d.post("/agents/batch/adapter-config",{agentIds:e,values:t}),"batchAdapterConfig"),instructionsBundle:a((e,t)=>d.get(R(e,t,"/instructions-bundle")),"instructionsBundle"),updateInstructionsBundle:a((e,t,r)=>d.patch(R(e,r,"/instructions-bundle"),t),"updateInstructionsBundle"),instructionsFile:a((e,t,r)=>d.get(R(e,r,`/instructions-bundle/file?path=${encodeURIComponent(t)}`)),"instructionsFile"),saveInstructionsFile:a((e,t,r)=>d.put(R(e,r,"/instructions-bundle/file"),t),"saveInstructionsFile"),instructionCandidates:a((e,t)=>d.get(R(e,t,"/instructions-bundle/candidates")),"instructionCandidates"),resolveInstructionCandidate:a((e,t,r,n)=>d.post(R(e,n,`/instructions-bundle/candidates/${t}/resolve`),r),"resolveInstructionCandidate"),instructionHistory:a((e,t,r,n)=>d.get(R(e,r,`/instructions-bundle/history?path=${encodeURIComponent(t)}${n?`&cursor=${encodeURIComponent(n)}`:""}`)),"instructionHistory"),instructionRevision:a((e,t,r,n)=>d.get(R(e,n,`/instructions-bundle/revision/${r}?path=${encodeURIComponent(t)}`)),"instructionRevision"),instructionDiff:a((e,t,r,n,o)=>d.get(R(e,o,`/instructions-bundle/diff?path=${encodeURIComponent(t)}&from=${encodeURIComponent(r)}&to=${encodeURIComponent(n)}`)),"instructionDiff"),restoreInstructions:a((e,t,r)=>d.post(R(e,r,"/instructions-bundle/restore"),t),"restoreInstructions"),downloadInstructionsFile:a((e,t,r)=>`/api${R(e,r,`/instructions-bundle/file?path=${encodeURIComponent(t)}&download=true`)}`,"downloadInstructionsFile"),deleteInstructionsFile:a((e,t,r,n)=>d.delete(R(e,r,`/instructions-bundle/file?path=${encodeURIComponent(t)}${n?`&baseHash=${n}`:""}`)),"deleteInstructionsFile"),retryLifecycle:a((e,t)=>d.post(R(e,t,"/lifecycle/retry"),{}),"retryLifecycle"),pause:a((e,t)=>d.post(R(e,t,"/pause"),{}),"pause"),resume:a((e,t)=>d.post(R(e,t,"/resume"),{}),"resume"),clearError:a((e,t)=>d.post(R(e,t,"/clear-error"),{}),"clearError"),approve:a((e,t)=>d.post(R(e,t,"/approve"),{}),"approve"),terminate:a((e,t)=>d.post(R(e,t,"/terminate"),{}),"terminate"),remove:a((e,t)=>d.delete(R(e,t)),"remove"),listKeys:a((e,t)=>d.get(R(e,t,"/keys")),"listKeys"),skills:a((e,t)=>d.get(R(e,t,"/skills")),"skills"),syncSkills:a((e,t,r,n)=>d.post(R(e,n,"/skills/sync"),{desiredSkills:t,mode:r}),"syncSkills"),createKey:a((e,t,r,n)=>d.post(R(e,r,"/keys"),{name:t,...n?{scope:n}:{}}),"createKey"),revokeKey:a((e,t,r)=>d.delete(R(e,r,`/keys/${encodeURIComponent(t)}`)),"revokeKey"),runtimeState:a((e,t)=>d.get(R(e,t,"/runtime-state")),"runtimeState"),taskSessions:a((e,t)=>d.get(R(e,t,"/task-sessions")),"taskSessions"),resetSession:a((e,t,r)=>d.post(R(e,r,"/runtime-state/reset-session"),{taskKey:t??null}),"resetSession"),adapterModels:a((e,t,r)=>{const n=new URLSearchParams;r?.refresh&&n.set("refresh","1"),r?.provider&&n.set("provider",r.provider),r?.poolId&&n.set("poolId",r.poolId),r?.environmentId&&n.set("environmentId",r.environmentId);const o=n.size>0?`?${n.toString()}`:"";return d.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/models${o}`)},"adapterModels"),detectModel:a((e,t)=>d.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/detect-model`),"detectModel"),testEnvironment:a((e,t,r)=>d.post(`/companies/${e}/adapters/${t}/test-environment`,r),"testEnvironment"),getAdapterAuthSignal:a((e,t,r)=>{const n=r?`?environmentId=${encodeURIComponent(r)}`:"";return d.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/auth-signal${n}`)},"getAdapterAuthSignal"),invoke:a((e,t,r={})=>d.post(R(e,t,"/heartbeat/invoke"),r),"invoke"),wakeup:a((e,t,r)=>d.post(R(e,r,"/wakeup"),t),"wakeup"),retryFailedRun:a(async(e,t,r)=>{const n=await d.post(R(e,r,"/wakeup"),{source:"on_demand",triggerDetail:"manual",reason:"retry_failed_run",failedRunId:t});if("id"in n){if(["failed","timed_out","cancelled","interrupted"].includes(n.status))throw new Error("The previous retry has already stopped. Refresh the task and retry its latest failed run.");return{runId:n.id,issueId:null}}if("actionId"in n){if(n.status==="failed"||n.status==="cancelled")throw new Error("This retry could not start. Open the task to review its current access and recovery state.");return{runId:n.runId,issueId:n.issueId}}throw new Error(n.message??"Retry was skipped.")},"retryFailedRun"),loginWithClaude:a((e,t)=>d.post(R(e,t,"/claude-login"),{}),"loginWithClaude"),startAdapterAuthLogin:a((e,t,r)=>d.post(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions`,r),"startAdapterAuthLogin"),getAdapterAuthLoginStatus:a((e,t,r)=>d.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/${encodeURIComponent(r)}`,{cache:"no-store"}),"getAdapterAuthLoginStatus"),getActiveAdapterAuthLoginSession:a((e,t)=>d.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/active`,{cache:"no-store"}),"getActiveAdapterAuthLoginSession"),cancelAdapterAuthLogin:a((e,t,r)=>d.post(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/${encodeURIComponent(r)}/cancel`,{}),"cancelAdapterAuthLogin"),getClaudeOAuthTokenStatus:a(e=>d.get(`/companies/${encodeURIComponent(e)}/claude-oauth-token-status`),"getClaudeOAuthTokenStatus"),startClaudeSetupTokenLogin:a((e,t)=>d.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions`,{adapterType:"claude_local",...t}),"startClaudeSetupTokenLogin"),getClaudeSetupTokenLoginStatus:a((e,t)=>d.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}`),"getClaudeSetupTokenLoginStatus"),getActiveClaudeSetupTokenLoginSession:a(e=>d.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/active`,{cache:"no-store"}),"getActiveClaudeSetupTokenLoginSession"),getClaudeSetupTokenLoginPrompt:a((e,t)=>d.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/prompt`),"getClaudeSetupTokenLoginPrompt"),submitClaudeSetupTokenBrowserCode:a((e,t,r)=>d.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/code`,{browserCode:r}),"submitClaudeSetupTokenBrowserCode"),completeClaudeSetupTokenLogin:a((e,t)=>d.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/completion`,{}),"completeClaudeSetupTokenLogin"),cancelClaudeSetupTokenLogin:a((e,t)=>d.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/cancel`,{}),"cancelClaudeSetupTokenLogin"),availableSkills:a(()=>d.get("/skills/available"),"availableSkills")},Mn=(0,l.createContext)(null);function qi(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1)if(e[r]?.label!==t[r]?.label||e[r]?.onClick!==t[r]?.onClick||e[r]?.href!==t[r]?.href||e[r]?.identifier!==t[r]?.identifier||e[r]?.leadingKey!==t[r]?.leadingKey||e[r]?.trailingKey!==t[r]?.trailingKey)return!1;return!0}a(qi,"breadcrumbsEqual");function Hi(e,t){const r=e.length===0?[]:[...e].reverse().map(o=>o.label),n=t?.trim()?[t.trim()]:[];return[...r,...n,"Paperclip"].join(" • ")}a(Hi,"buildDocumentTitle");function cu({children:e,companyName:t}){const[r,n]=(0,l.useState)([]),[o,s]=(0,l.useState)(null),[i,u]=(0,l.useState)(null),[c,m]=(0,l.useState)(null),p=(0,l.useCallback)(v=>{n(y=>qi(y,v)?y:v)},[]),f=(0,l.useCallback)(v=>{m(v)},[]),g=(0,l.useCallback)(v=>{s(v)},[]),b=(0,l.useCallback)(v=>{u(v)},[]);return(0,l.useEffect)(()=>{document.title=Hi(r,t)},[r,t]),(0,S.jsx)(Mn.Provider,{value:{breadcrumbs:r,setBreadcrumbs:p,breadcrumbToolbar:o,setBreadcrumbToolbar:g,breadcrumbPanelControl:i,setBreadcrumbPanelControl:b,mobileToolbar:c,setMobileToolbar:f},children:e})}a(cu,"BreadcrumbProvider");function du(){const e=(0,l.useContext)(Mn);if(!e)throw new Error("useBreadcrumbs must be used within BreadcrumbProvider");return e}a(du,"useBreadcrumbs");export{li as $,vl as $t,Hl as A,Zo as An,Dt as At,Ul as B,Wa as Bn,ws as Bt,Ei as C,es as Cn,Bs as Ct,Kl as D,cl as Dn,Ts as Dt,yi as E,ml as En,Us as Et,eu as F,tl as Fn,As as Ft,Nl as G,Is as Gt,zl as H,Ss as Ht,Yl as I,il as In,$s as It,Wl as J,xs as Jt,jl as K,$r as Kt,Zl as L,T as Ln,Es as Lt,ve as M,pe as Mn,Ps as Mt,tu as N,el as Nn,Br as Nt,Ql as O,gr as On,Ms as Ot,Xl as P,io as Pn,Ds as Pt,ui as Q,El as Qt,Ml as R,Ce as Rn,Cs as Rt,Ci as S,Xo as Sn,Ns as St,Pt as T,et as Tn,Os as Tt,Jl as U,Pl as Ut,Ol as V,sl as Vn,Al as Vt,Gl as W,Dl as Wt,di as X,Cl as Xt,Vl as Y,kl as Yt,ci as Z,fs as Zt,Mi as _,as as _n,Ws as _t,zi as a,xl as an,ri as at,Pi as b,Ir as bn,Fs as bt,su as c,wl as cn,Ll as ct,au as d,It as dn,Ys as dt,Il as en,ii as et,lu as f,pl as fn,Gs as ft,En as g,yl as gn,Vs as gt,Tt as h,gl as hn,Ks as ht,Fi as i,ps as in,ni as it,Fl as j,ol as jn,At as jt,ql as k,ll as kn,Ls as kt,iu as l,$l as ln,Xs as lt,nu as m,us as mn,Qs as mt,du as n,bl as nn,oi as nt,Ni as o,_l as on,ti as ot,An as p,fl as pn,Js as pt,Bl as q,vs as qt,uu as r,Sl as rn,ai as rt,ou as s,Rl as sn,ei as st,cu as t,ms as tn,si as tt,he as u,Z as un,Zs as ut,ce as v,cs as vn,Hs as vt,xi as w,ul as wn,js as wt,Di as x,dl as xn,zs as xt,ru as y,hl as yn,qs as yt,Tl as z,Zi as zn,Rs as zt};
15
+ `}});if(Qt(e))return l.createElement(yt,{title:"Unhandled Thrown Response!"},l.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),n);let o;if(e instanceof Error)o=e;else{let s=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);o=new Error(s)}return l.createElement(yt,{title:"Application Error!",isOutsideRemixApp:t},l.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),l.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},o.stack),n)}a(jo,"RemixRootDefaultErrorBoundary");function yt({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){let{routeModules:o}=J();return o.root?.Layout&&!r?n:l.createElement("html",{lang:"en"},l.createElement("head",null,l.createElement("meta",{charSet:"utf-8"}),l.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),l.createElement("title",null,e)),l.createElement("body",null,l.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n,t?l.createElement(Uo,null):null)))}a(yt,"BoundaryShell");var Bo=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Bo&&(window.__reactRouterVersion="7.18.4")}catch{}function ol({basename:e,children:t,useTransitions:r,window:n}){let o=l.useRef();o.current==null&&(o.current=na({window:n,v5Compat:!0}));let s=o.current,[i,u]=l.useState({action:s.action,location:s.location}),c=l.useCallback(m=>{r===!1?u(m):l.startTransition(()=>u(m))},[r]);return l.useLayoutEffect(()=>s.listen(c),[s,c]),l.createElement(lr,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:s,useTransitions:r})}a(ol,"BrowserRouter");function No({basename:e,children:t,history:r,useTransitions:n}){let[o,s]=l.useState({action:r.action,location:r.location}),i=l.useCallback(u=>{n===!1?s(u):l.startTransition(()=>s(u))},[n]);return l.useLayoutEffect(()=>r.listen(i),[r,i]),l.createElement(lr,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:r,useTransitions:n})}a(No,"HistoryRouter");No.displayName="unstable_HistoryRouter";var pe=l.forwardRef(a(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:s,replace:i,mask:u,state:c,target:m,to:p,preventScrollReset:f,viewTransition:g,defaultShouldRevalidate:b,...v},y){let{basename:h,navigator:x,useTransitions:w}=l.useContext(P),I=typeof p=="string"&&We.test(p),_=Gt(p,h);p=_.to;let C=za(p,{relative:o}),A=T(),L=null;if(u){let F=Re(u,[],A.mask?A.mask.pathname:"/",!0);h!=="/"&&(F.pathname=F.pathname==="/"?h:B([h,F.pathname])),L=x.createHref(F)}let[j,D,N]=_o(n,v),G=Ho(p,{replace:i,mask:u,state:c,target:m,preventScrollReset:f,relative:o,viewTransition:g,defaultShouldRevalidate:b,useTransitions:w});function U(F){t&&t(F),F.defaultPrevented||G(F)}a(U,"handleClick");let H=!(_.isExternal||s),z=l.createElement("a",{...v,...N,href:(H?L:void 0)||_.absoluteURL||C,onClick:H?U:t,ref:Oo(y,D),target:m,"data-discover":!I&&r==="render"?"true":void 0});return j&&!I?l.createElement(l.Fragment,null,z,l.createElement(Do,{page:C})):z},"LinkWithRef"));pe.displayName="Link";var mr=l.forwardRef(a(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:s,to:i,viewTransition:u,children:c,...m},p){let f=fe(i,{relative:m.relative}),g=T(),b=l.useContext(me),{navigator:v,basename:y}=l.useContext(P),h=b!=null&&Yo(f)&&u===!0,x=v.encodeLocation?v.encodeLocation(f).pathname:f.pathname,w=g.pathname,I=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;r||(w=w.toLowerCase(),I=I?I.toLowerCase():null,x=x.toLowerCase()),I&&y&&(I=q(I,y)||I);const _=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let C=w===x||!o&&w.startsWith(x)&&w.charAt(_)==="/",A=I!=null&&(I===x||!o&&I.startsWith(x)&&I.charAt(x.length)==="/"),L={isActive:C,isPending:A,isTransitioning:h},j=C?t:void 0,D;typeof n=="function"?D=n(L):D=[n,C?"active":null,A?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let N=typeof s=="function"?s(L):s;return l.createElement(pe,{...m,"aria-current":j,className:D,ref:p,style:N,to:i,viewTransition:u},typeof c=="function"?c(L):c)},"NavLinkWithRef"));mr.displayName="NavLink";var zo=l.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:s,method:i=be,action:u,onSubmit:c,relative:m,preventScrollReset:p,viewTransition:f,defaultShouldRevalidate:g,...b},v)=>{let{useTransitions:y}=l.useContext(P),h=Ko(),x=Qo(u,{relative:m}),w=i.toLowerCase()==="get"?"get":"post",I=typeof u=="string"&&We.test(u),_=a(C=>{if(c&&c(C),C.defaultPrevented)return;C.preventDefault();let A=C.nativeEvent.submitter,L=A?.getAttribute("formmethod")||i,j=a(()=>h(A||C.currentTarget,{fetcherKey:t,method:L,navigate:r,replace:o,state:s,relative:m,preventScrollReset:p,viewTransition:f,defaultShouldRevalidate:g}),"doSubmit");y&&r!==!1?l.startTransition(()=>j()):j()},"submitHandler");return l.createElement("form",{ref:v,method:w,action:x,onSubmit:n?c:_,...b,"data-discover":!I&&e==="render"?"true":void 0})});zo.displayName="Form";function Fo({getKey:e,storageKey:t,...r}){let n=l.useContext(Ae),{basename:o}=l.useContext(P),s=T(),i=sr();Jo({getKey:e,storageKey:t});let u=l.useMemo(()=>{if(!n||!e)return null;let m=Fe(s,i,o,e);return m!==s.key?m:null},[]);if(!n||n.isSpaMode)return null;let c=((m,p)=>{if(!window.history.state||!window.history.state.key){let f=Math.random().toString(32).slice(2);window.history.replaceState({key:f},"")}try{let f=JSON.parse(sessionStorage.getItem(m)||"{}")[p||window.history.state.key];typeof f=="number"&&window.scrollTo(0,f)}catch{sessionStorage.removeItem(m)}}).toString();return r.nonce==null&&n?.nonce&&(r.nonce=n.nonce),l.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${ht(JSON.stringify(t||ze))}, ${ht(JSON.stringify(u))})`}})}a(Fo,"ScrollRestoration");Fo.displayName="ScrollRestoration";function fr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}a(fr,"getDataRouterConsoleError2");function Xe(e){let t=l.useContext(re);return $(t,fr(e)),t}a(Xe,"useDataRouterContext3");function qo(e){let t=l.useContext(me);return $(t,fr(e)),t}a(qo,"useDataRouterState2");function Ho(e,{target:t,replace:r,mask:n,state:o,preventScrollReset:s,relative:i,viewTransition:u,defaultShouldRevalidate:c,useTransitions:m}={}){let p=Ce(),f=T(),g=fe(e,{relative:i});return l.useCallback(b=>{if(fo(b,t)){b.preventDefault();let v=r!==void 0?r:Q(f)===Q(g),y=a(()=>p(e,{replace:v,mask:n,state:o,preventScrollReset:s,relative:i,viewTransition:u,defaultShouldRevalidate:c}),"doNavigate");m?l.startTransition(()=>y()):y()}},[f,p,g,r,n,o,t,e,s,i,u,c,m])}a(Ho,"useLinkClickHandler");function sl(e){M(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=l.useRef(Ne(e)),r=l.useRef(!1),n=T(),o=l.useMemo(()=>po(n.search,r.current?null:t.current),[n.search]),s=Ce();return[o,l.useCallback((i,u)=>{const c=Ne(typeof i=="function"?i(new URLSearchParams(o)):i);r.current=!0,s("?"+c,u)},[s,o])]}a(sl,"useSearchParams");var Wo=0,Vo=a(()=>`__${String(++Wo)}__`,"getUniqueFetcherId");function Ko(){let{router:e}=Xe("useSubmit"),{basename:t}=l.useContext(P),r=eo(),n=e.fetch,o=e.navigate;return l.useCallback(async(s,i={})=>{let{action:u,method:c,encType:m,formData:p,body:f}=yo(s,t);if(i.navigate===!1){let g=i.fetcherKey||Vo();await n(g,r,i.action||u,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:p,body:f,formMethod:i.method||c,formEncType:i.encType||m,flushSync:i.flushSync})}else await o(i.action||u,{defaultShouldRevalidate:i.defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:p,body:f,formMethod:i.method||c,formEncType:i.encType||m,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[n,o,t,r])}a(Ko,"useSubmit");function Qo(e,{relative:t}={}){let{basename:r}=l.useContext(P),n=l.useContext(O);$(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),s={...fe(e||".",{relative:t})},i=T();if(e==null){s.search=i.search;let u=new URLSearchParams(s.search),c=u.getAll("index");if(c.some(m=>m==="")){u.delete("index"),c.filter(p=>p).forEach(p=>u.append("index",p));let m=u.toString();s.search=m?`?${m}`:""}}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:B([r,s.pathname])),Q(s)}a(Qo,"useFormAction");var ze="react-router-scroll-positions",ye={};function Fe(e,t,r,n){let o=null;return n&&(r!=="/"?o=n({...e,pathname:q(e.pathname,r)||e.pathname},t):o=n(e,t)),o==null&&(o=e.key),o}a(Fe,"getScrollRestorationKey");function Jo({getKey:e,storageKey:t}={}){let{router:r}=Xe("useScrollRestoration"),{restoreScrollPosition:n,preventScrollReset:o}=qo("useScrollRestoration"),{basename:s}=l.useContext(P),i=T(),u=sr(),c=to();l.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),Go(l.useCallback(()=>{if(c.state==="idle"){let m=Fe(i,u,s,e);ye[m]=window.scrollY}try{sessionStorage.setItem(t||ze,JSON.stringify(ye))}catch(m){M(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${m}).`)}window.history.scrollRestoration="auto"},[c.state,e,s,i,u,t])),typeof document<"u"&&(l.useLayoutEffect(()=>{try{let m=sessionStorage.getItem(t||ze);m&&(ye=JSON.parse(m))}catch{}},[t]),l.useLayoutEffect(()=>{let m=r?.enableScrollRestoration(ye,()=>window.scrollY,e?(p,f)=>Fe(p,f,s,e):void 0);return()=>m&&m()},[r,s,e]),l.useLayoutEffect(()=>{if(n!==!1){if(typeof n=="number"){window.scrollTo(0,n);return}try{if(i.hash){let m=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(m){m.scrollIntoView();return}}}catch{M(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}o!==!0&&window.scrollTo(0,0)}},[i,n,o]))}a(Jo,"useScrollRestoration");function il(e,t){let{capture:r}=t||{};l.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("beforeunload",e,n),()=>{window.removeEventListener("beforeunload",e,n)}},[e,r])}a(il,"useBeforeUnload");function Go(e,t){let{capture:r}=t||{};l.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}a(Go,"usePageHide");function Yo(e,{relative:t}={}){let r=l.useContext(er);$(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Xe("useViewTransitionState"),o=fe(e,{relative:t});if(!r.isTransitioning)return!1;let s=q(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=q(r.nextLocation.pathname,n)||r.nextLocation.pathname;return xe(o.pathname,i)!=null||xe(o.pathname,s)!=null}a(Yo,"useViewTransitionState");var vt=60,qe=3600,Ie=24*qe,bt=7*Ie,kt=30*Ie;function Zo(e){const t=Date.now(),r=new Date(e).getTime(),n=Math.round((t-r)/1e3);return n<vt?"just now":n<qe?`${Math.floor(n/vt)}m ago`:n<Ie?`${Math.floor(n/qe)}h ago`:n<bt?`${Math.floor(n/Ie)}d ago`:n<kt?`${Math.floor(n/bt)}w ago`:`${Math.floor(n/kt)}mo ago`}a(Zo,"timeAgo");var Xo=[{label:"My work",views:[{key:"mine",label:"Mine",surface:"inbox",inboxTab:"mine",hint:"Assigned to you or waiting on you"},{key:"unread",label:"Unread",surface:"inbox",inboxTab:"unread",hint:"Tasks you touched with new activity"},{key:"blocked",label:"Blocked",surface:"inbox",inboxTab:"blocked",hint:"Blocked tasks, grouped by blocker"},{key:"recent",label:"Recent",surface:"inbox",inboxTab:"recent",hint:"Everything you touched lately"},{key:"everything",label:"Everything",surface:"inbox",inboxTab:"all",hint:"Tasks, approvals, failed runs and join requests"}]},{label:"Organization",views:[{key:"all",label:"All tasks",surface:"issues",statuses:[],hint:"Every task in the organization"},{key:"active",label:"Active",surface:"issues",statuses:["todo","in_progress","in_review","blocked"],hint:"Open tasks, running or not"},{key:"backlog",label:"Backlog",surface:"issues",statuses:["backlog"],hint:"Not started yet"},{key:"done",label:"Done",surface:"issues",statuses:["done","cancelled"],hint:"Completed and cancelled"}]}],pr=new Map(Xo.flatMap(e=>e.views.map(t=>[t.key,t]))),hr="mine",es="view",ts="paperclip:tasks:last-view";function rs(e){return typeof e=="string"&&pr.has(e)}a(rs,"isTaskViewKey");function gr(e){return pr.get(e)}a(gr,"taskView");function et(e){return rs(e)?e:null}a(et,"normalizeTaskViewKey");var xt={mine:"mine",unread:"unread",blocked:"blocked",recent:"recent",all:"everything"};function ll(e){return e&&e in xt?xt[e]:hr}a(ll,"taskViewForInboxTab");function ul(){try{return et(window.localStorage.getItem("paperclip:tasks:last-view"))??"mine"}catch{return hr}}a(ul,"loadLastTaskView");function cl(e){try{window.localStorage.setItem(ts,e)}catch{}}a(cl,"saveLastTaskView");var dl=["assignee","workspace","participantAgentId","q"];function ml(e,t,r){const n=et(e);return t&&(!n||gr(n).surface==="inbox")?"all":n??r}a(ml,"resolveInitialTaskView");var yr="from",vr="fromHref",br="paperclip:issue-detail-breadcrumb:";function kr(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.label=="string"&&typeof t.href=="string"}a(kr,"isIssueDetailBreadcrumb");function xr(e){return e==="issues"||e==="inbox"}a(xr,"isIssueDetailSource");function wr(e){if(typeof e!="object"||e===null)return!1;const t=e,r=t.originKind===void 0||typeof t.originKind=="string",n=t.originId===void 0||t.originId===null||typeof t.originId=="string",o=t.blockerAttention===void 0||typeof t.blockerAttention=="object"&&t.blockerAttention!==null;return typeof t.id=="string"&&(t.identifier===null||typeof t.identifier=="string")&&typeof t.title=="string"&&typeof t.status=="string"&&o&&typeof t.priority=="string"&&(t.projectId===null||typeof t.projectId=="string")&&(t.projectName===null||typeof t.projectName=="string")&&r&&n}a(wr,"isIssueDetailHeaderSeed");function ns(e){return{id:e.id,identifier:e.identifier??null,title:e.title,status:e.status,blockerAttention:e.blockerAttention,priority:e.priority,projectId:e.projectId??null,projectName:e.project?.name??null,originKind:e.originKind,originId:e.originId??null}}a(ns,"createIssueDetailHeaderSeed");function Ir(e,t){const r=ns(t);return typeof e!="object"||e===null?{issueDetailHeaderSeed:r}:{...e,issueDetailHeaderSeed:r}}a(Ir,"withIssueDetailHeaderSeed");function as(e){if(typeof e!="object"||e===null)return null;const t=e.issueDetailHeaderSeed;return wr(t)?t:null}a(as,"readIssueDetailHeaderSeed");function os(e){if(!e)return null;const t=new URLSearchParams(e).get(yr);return xr(t)?t:null}a(os,"readIssueDetailSourceFromSearch");function ss(e){if(!e)return null;const t=new URLSearchParams(e).get(vr);return t&&t.startsWith("/")?t:null}a(ss,"readIssueDetailBreadcrumbHrefFromSearch");function is(e){const t=e.slice(e.indexOf("?")+1);if(!e.includes("?"))return!1;const r=new URLSearchParams(t).get(es),n=et(r);return n!==null&&gr(n).surface==="inbox"}a(is,"isInboxBackedTaskViewHref");function Sr(e,t){return xr(e?.issueDetailSource)?e.issueDetailSource:t?t.href.includes("/inbox")||is(t.href)||t.label==="Inbox"?"inbox":t.label==="Tasks"||t.href.includes("/issues")?"issues":null:null}a(Sr,"inferIssueDetailSource");function wt(e){return e==="inbox"?{label:"Inbox",href:"/inbox"}:{label:"Tasks",href:"/issues"}}a(wt,"breadcrumbForSource");function fl(e,t,r){return{issueDetailBreadcrumb:{label:e,href:t},issueDetailSource:r}}a(fl,"createIssueDetailLocationState");function pl(e){return typeof e!="object"||e===null?{issueDetailInboxQuickArchiveArmed:!0}:{...e,issueDetailInboxQuickArchiveArmed:!0}}a(pl,"armIssueDetailInboxQuickArchive");function ls(e){if(typeof window>"u"||!window.sessionStorage)return null;const t=window.sessionStorage.getItem(`${br}${e}`);if(!t)return null;try{const r=JSON.parse(t),n=kr(r.issueDetailBreadcrumb)?r.issueDetailBreadcrumb:null,o=Sr(r,n);if(!n||!o)return null;const s=wr(r.issueDetailHeaderSeed)?r.issueDetailHeaderSeed:void 0;return{issueDetailBreadcrumb:n,issueDetailSource:o,issueDetailInboxQuickArchiveArmed:r.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:s}}catch{return null}}a(ls,"readStoredIssueDetailLocationState");function Rr(e,t){if(typeof e=="object"&&e!==null){const o=e.issueDetailBreadcrumb;if(kr(o)){const s=Sr(e,o);if(!s)return null;const i=as(e)??void 0;return{issueDetailBreadcrumb:o,issueDetailSource:s,issueDetailInboxQuickArchiveArmed:e.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:i}}}const r=os(t),n=ss(t);return r?{issueDetailBreadcrumb:n?{...wt(r),href:n}:wt(r),issueDetailSource:r,issueDetailInboxQuickArchiveArmed:!1}:null}a(Rr,"normalizeIssueDetailLocationState");function hl(e,t,r){if(typeof window>"u"||!window.sessionStorage)return;const n=Rr(t,r);n&&window.sessionStorage.setItem(`${br}${e}`,JSON.stringify(n))}a(hl,"rememberIssueDetailLocationState");function us(e){return`/issues/${e}`}a(us,"createIssueDetailPath");function gl(e){if(!e)return!1;const t=new URLSearchParams(e);return t.has(yr)||t.has(vr)}a(gl,"hasLegacyIssueDetailQuery");function cs(e,t,r){const n=Rr(t,r);return n||(e?ls(e):null)}a(cs,"readIssueDetailLocationState");function yl(e,t,r){return cs(e,t,r)?.issueDetailBreadcrumb??null}a(yl,"readIssueDetailBreadcrumb");var It=class extends Error{static{a(this,"CommentSubmissionUnknownError")}constructor(){super("We couldn’t confirm whether this comment was saved. Review the conversation before starting another draft."),this.name="CommentSubmissionUnknownError"}};function St(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e,r=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;return typeof t.id=="string"&&r.test(t.id)&&typeof t.issueId=="string"&&r.test(t.issueId)&&typeof t.body=="string"}a(St,"hasCommentReceipt");async function Rt(e,t){try{const r=await e;if(!t(r))throw new It;return r}catch(r){throw r instanceof Bt&&r.status<500?r:new It}}a(Rt,"confirmedCommentResponse");function Ct(e){const t=new URLSearchParams;return e?.attention&&t.set("attention",e.attention),e?.status&&t.set("status",e.status),e?.priority&&t.set("priority",e.priority),e?.projectId&&t.set("projectId",e.projectId),e?.parentId&&t.set("parentId",e.parentId),e?.assigneeAgentId&&t.set("assigneeAgentId",e.assigneeAgentId),e?.participantAgentId&&t.set("participantAgentId",e.participantAgentId),e?.assigneeUserId&&t.set("assigneeUserId",e.assigneeUserId),e?.touchedByUserId&&t.set("touchedByUserId",e.touchedByUserId),e?.inboxArchivedByUserId&&t.set("inboxArchivedByUserId",e.inboxArchivedByUserId),e?.unreadForUserId&&t.set("unreadForUserId",e.unreadForUserId),e?.labelId&&t.set("labelId",e.labelId),e?.createdByAgentId&&t.set("createdByAgentId",e.createdByAgentId),e?.createdByUserId&&t.set("createdByUserId",e.createdByUserId),e?.updatedSince&&t.set("updatedSince",e.updatedSince),e?.workspaceId&&t.set("workspaceId",e.workspaceId),e?.executionWorkspaceId&&t.set("executionWorkspaceId",e.executionWorkspaceId),e?.originKind&&t.set("originKind",e.originKind),e?.originKindPrefix&&t.set("originKindPrefix",e.originKindPrefix),e?.originId&&t.set("originId",e.originId),e?.descendantOf&&t.set("descendantOf",e.descendantOf),e?.createdFromIssueId&&t.set("createdFromIssueId",e.createdFromIssueId),e?.includeRoutineExecutions&&t.set("includeRoutineExecutions","true"),e?.includeBlockedBy&&t.set("includeBlockedBy","true"),e?.includeBlockedInboxAttention&&t.set("includeBlockedInboxAttention","true"),e?.includeLiveDescendantSummary&&t.set("includeLiveDescendantSummary","true"),e?.hasPlanDocument!==void 0&&t.set("hasPlanDocument",e.hasPlanDocument?"true":"false"),e?.q&&t.set("q",e.q),e?.limit&&t.set("limit",String(e.limit)),e?.offset!==void 0&&t.set("offset",String(e.offset)),e?.sortField&&t.set("sortField",e.sortField),e?.sortDir&&t.set("sortDir",e.sortDir),e?.afterId&&t.set("afterId",e.afterId),t}a(Ct,"issueListSearchParams");var Z={listAll:a(async(e,t,r)=>{const o=new Map;let s;for(;;){const i=await Z.list(e,{...t,limit:500,sortField:"id",sortDir:"asc",afterId:s},r);for(const u of i)o.set(u.id,u);if(i.length<500)return[...o.values()];s=i[i.length-1].id}},"listAll"),list:a((e,t,r)=>{const n=Ct(t).toString(),o=`/companies/${e}/issues${n?`?${n}`:""}`;return r?d.get(o,r):d.get(o)},"list"),listCompact:a((e,t,r)=>{const n=Ct(t);n.set("view","compact");const o=`/companies/${e}/issues?${n.toString()}`;return r?d.get(o,r):d.get(o)},"listCompact"),count:a((e,t)=>{const r=new URLSearchParams;return r.set("attention",t.attention),t.status&&r.set("status",t.status),t.assigneeAgentId&&r.set("assigneeAgentId",t.assigneeAgentId),t.assigneeUserId&&r.set("assigneeUserId",t.assigneeUserId),t.projectId&&r.set("projectId",t.projectId),t.labelId&&r.set("labelId",t.labelId),t.q&&r.set("q",t.q),d.get(`/companies/${e}/issues/count?${r.toString()}`)},"count"),listLabels:a(e=>d.get(`/companies/${e}/labels`),"listLabels"),createLabel:a((e,t)=>d.post(`/companies/${e}/labels`,t),"createLabel"),deleteLabel:a(e=>d.delete(`/labels/${e}`),"deleteLabel"),get:a((e,t)=>t?d.get(`/issues/${e}`,t):d.get(`/issues/${e}`),"get"),refs:a((e,t)=>d.get(`/companies/${e}/issues/refs?ids=${encodeURIComponent(t.join(","))}`),"refs"),getRunnerGoal:a((e,t)=>{const r=t?`?agentId=${encodeURIComponent(t)}`:"";return d.get(`/issues/${e}/runner-goal${r}`)},"getRunnerGoal"),actOnRunnerGoal:a((e,t)=>d.post(`/issues/${e}/runner-goal/actions`,t),"actOnRunnerGoal"),getModelOverride:a(e=>d.get(`/issues/${e}/model-override`),"getModelOverride"),setModelOverride:a((e,t)=>d.put(`/issues/${e}/model-override`,t),"setModelOverride"),getWatchdog:a(e=>d.get(`/issues/${e}/watchdog`),"getWatchdog"),upsertWatchdog:a((e,t)=>d.put(`/issues/${e}/watchdog`,t),"upsertWatchdog"),deleteWatchdog:a(e=>d.delete(`/issues/${e}/watchdog`),"deleteWatchdog"),markRead:a(e=>d.post(`/issues/${e}/read`,{}),"markRead"),markUnread:a(e=>d.delete(`/issues/${e}/read`),"markUnread"),archiveFromInbox:a(e=>d.post(`/issues/${e}/inbox-archive`,{}),"archiveFromInbox"),unarchiveFromInbox:a(e=>d.delete(`/issues/${e}/inbox-archive`),"unarchiveFromInbox"),setTitle:a((e,t)=>d.put(`/issues/${e}/title`,t),"setTitle"),create:a((e,t)=>d.post(`/companies/${e}/issues`,t),"create"),update:a((e,t)=>{const r=d.patch(`/issues/${e}`,t);return typeof t.comment=="string"?Rt(r,n=>St(n?.comment)):r},"update"),decideStalledReview:a((e,t)=>d.post(`/issues/${e}/stalled-review-decision`,t),"decideStalledReview"),retryWorkspaceExport:a((e,t)=>d.post(`/issues/${e}/recovery-actions/retry-workspace-export`,t),"retryWorkspaceExport"),resolveRecoveryAction:a((e,t)=>d.post(`/issues/${e}/recovery-actions/resolve`,t),"resolveRecoveryAction"),previewTreeControl:a((e,t)=>d.post(`/issues/${e}/tree-control/preview`,t),"previewTreeControl"),createTreeHold:a((e,t)=>d.post(`/issues/${e}/tree-holds`,t),"createTreeHold"),getTreeHold:a((e,t)=>d.get(`/issues/${e}/tree-holds/${t}`),"getTreeHold"),listTreeHolds:a((e,t)=>{const r=new URLSearchParams;t?.status&&r.set("status",t.status),t?.mode&&r.set("mode",t.mode),t?.includeMembers&&r.set("includeMembers","true");const n=r.toString();return d.get(`/issues/${e}/tree-holds${n?`?${n}`:""}`)},"listTreeHolds"),getTreeControlState:a(e=>d.get(`/issues/${e}/tree-control/state`),"getTreeControlState"),releaseTreeHold:a((e,t,r)=>d.post(`/issues/${e}/tree-holds/${t}/release`,r),"releaseTreeHold"),checkMonitorNow:a(e=>d.post(`/issues/${e}/monitor/check-now`,{}),"checkMonitorNow"),retryScheduledRetryNow:a(e=>d.post(`/issues/${e}/scheduled-retry/retry-now`,{}),"retryScheduledRetryNow"),remove:a(e=>d.delete(`/issues/${e}`),"remove"),checkout:a((e,t)=>d.post(`/issues/${e}/checkout`,{agentId:t,expectedStatuses:["todo","backlog","blocked","in_review"]}),"checkout"),release:a(e=>d.post(`/issues/${e}/release`,{}),"release"),listComments:a((e,t)=>{const r=new URLSearchParams;t?.after&&r.set("after",t.after),t?.order&&r.set("order",t.order),t?.limit&&r.set("limit",String(t.limit));const n=r.toString();return d.get(`/issues/${e}/comments${n?`?${n}`:""}`)},"listComments"),getQueuedComments:a(e=>d.get(`/issues/${e}/queued-comments`),"getQueuedComments"),editQueuedComment:a((e,t,r)=>d.patch(`/issues/${e}/queued-comments/${t}`,r),"editQueuedComment"),reorderQueuedComments:a((e,t)=>d.put(`/issues/${e}/queued-comments/order`,t),"reorderQueuedComments"),interruptQueuedComments:a((e,t)=>d.post(`/issues/${e}/queued-comments/interrupt`,t),"interruptQueuedComments"),interruptLatestQueuedComments:a(async(e,t)=>{const r=await Z.getQueuedComments(e);if(!r.queueId||r.targetRunId&&r.targetRunId!==t)throw new Error("The queued messages changed. Refresh and try again.");return Z.interruptQueuedComments(e,{queueId:r.queueId,revision:r.revision,targetRunId:r.targetRunId})},"interruptLatestQueuedComments"),steerQueuedComment:a((e,t,r)=>d.post(`/issues/${e}/queued-comments/${t}/steer`,r),"steerQueuedComment"),discardQueuedComment:a((e,t,r)=>d.delete(`/issues/${e}/queued-comments/${t}`,r),"discardQueuedComment"),listInteractions:a(e=>d.get(`/issues/${e}/interactions`),"listInteractions"),listAcceptedPlanDecompositions:a(e=>d.get(`/issues/${e}/accepted-plan-decompositions`),"listAcceptedPlanDecompositions"),createInteraction:a((e,t)=>d.post(`/issues/${e}/interactions`,t),"createInteraction"),acceptInteraction:a((e,t,r)=>{const{note:n,...o}=r??{};return d.post(`/issues/${e}/interactions/${t}/accept`,n?.trim()?{...o,note:n}:o)},"acceptInteraction"),rejectInteraction:a((e,t,r,n)=>d.post(`/issues/${e}/interactions/${t}/reject`,{...r?{reason:r}:{},...n?.trim()?{note:n}:{}}),"rejectInteraction"),cancelInteraction:a((e,t,r)=>d.post(`/issues/${e}/interactions/${t}/cancel`,r?{reason:r}:{}),"cancelInteraction"),skipInteraction:a((e,t,r)=>d.post(`/issues/${e}/interactions/${t}/skip`,r?{reason:r}:{}),"skipInteraction"),respondToInteraction:a((e,t,r)=>d.post(`/issues/${e}/interactions/${t}/respond`,r),"respondToInteraction"),submitInteractionVerdicts:a((e,t,r)=>d.post(`/issues/${e}/interactions/${t}/verdicts`,{verdicts:r}),"submitInteractionVerdicts"),getComment:a((e,t)=>d.get(`/issues/${e}/comments/${t}`),"getComment"),listFeedbackVotes:a(e=>d.get(`/issues/${e}/feedback-votes`),"listFeedbackVotes"),getCostSummary:a((e,t={})=>{const r=t.excludeRoot?"?excludeRoot=true":"";return d.get(`/issues/${e}/cost-summary${r}`)},"getCostSummary"),listFeedbackTraces:a((e,t)=>{const r=new URLSearchParams;for(const[o,s]of Object.entries(t??{}))s!==void 0&&r.set(o,String(s));const n=r.toString();return d.get(`/issues/${e}/feedback-traces${n?`?${n}`:""}`)},"listFeedbackTraces"),upsertFeedbackVote:a((e,t)=>d.post(`/issues/${e}/feedback-votes`,t),"upsertFeedbackVote"),addComment:a((e,t,r,n,o,s,i)=>Rt(d.post(`/issues/${e}/comments`,{body:t,...s?{clientRequestId:s}:{},...r===void 0?{}:{reopen:r},...n===void 0?{}:{interrupt:n},...o?.length?{attachmentIds:o}:{},...i===void 0?{}:{deliver:i}}),St),"addComment"),cancelComment:a((e,t)=>d.delete(`/issues/${e}/comments/${t}?mode=cancel`),"cancelComment"),deleteComment:a((e,t)=>d.delete(`/issues/${e}/comments/${t}`),"deleteComment"),listDocuments:a((e,t)=>d.get(`/issues/${e}/documents${t?.includeSystem?"?includeSystem=true":""}`),"listDocuments"),getDocument:a((e,t)=>d.get(`/issues/${e}/documents/${encodeURIComponent(t)}`),"getDocument"),getDocumentPdf:a((e,t)=>d.getBlob(`/issues/${e}/documents/${encodeURIComponent(t)}/pdf`),"getDocumentPdf"),upsertDocument:a((e,t,r)=>d.put(`/issues/${e}/documents/${encodeURIComponent(t)}`,r),"upsertDocument"),lockDocument:a((e,t)=>d.post(`/issues/${e}/documents/${encodeURIComponent(t)}/lock`,{}),"lockDocument"),unlockDocument:a((e,t)=>d.post(`/issues/${e}/documents/${encodeURIComponent(t)}/unlock`,{}),"unlockDocument"),listDocumentRevisions:a((e,t)=>d.get(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions`),"listDocumentRevisions"),restoreDocumentRevision:a((e,t,r)=>d.post(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions/${r}/restore`,{}),"restoreDocumentRevision"),deleteDocument:a((e,t)=>d.delete(`/issues/${e}/documents/${encodeURIComponent(t)}`),"deleteDocument"),listAttachments:a(e=>d.get(`/issues/${e}/attachments`),"listAttachments"),uploadAttachment:a((e,t,r,n)=>{const o=Wn(r);if(o)return Promise.reject(o);const s=new FormData;return s.append("file",r),n&&s.append("issueCommentId",n),d.postForm(`/companies/${e}/issues/${t}/attachments`,s)},"uploadAttachment"),deleteAttachment:a(e=>d.delete(`/attachments/${e}`),"deleteAttachment"),privacyConstraints:a(e=>d.get(`/issues/${e}/privacy-constraints`),"privacyConstraints"),listAccessGrants:a((e,t)=>t?d.get(`/issues/${e}/access-grants`,t):d.get(`/issues/${e}/access-grants`),"listAccessGrants"),createAccessGrant:a((e,t)=>d.post(`/issues/${e}/access-grants`,t),"createAccessGrant"),revokeAccessGrant:a((e,t)=>d.post(`/issues/${e}/access-grants/${t}/revoke`,{}),"revokeAccessGrant"),setVisibility:a((e,t)=>d.patch(`/issues/${e}`,{visibility:t}),"setVisibility"),listApprovals:a(e=>d.get(`/issues/${e}/approvals`),"listApprovals"),linkApproval:a((e,t)=>d.post(`/issues/${e}/approvals`,{approvalId:t}),"linkApproval"),unlinkApproval:a((e,t)=>d.delete(`/issues/${e}/approvals/${t}`),"unlinkApproval"),listWorkProducts:a((e,t)=>{const r=`/issues/${e}/work-products${t?.refreshPullRequests?"?refreshPullRequests=true":""}`;return t?.fresh&&Nn(r),d.get(r,{signal:t?.signal})},"listWorkProducts"),ensureWorkProductReviewDocument:a((e,t)=>d.post(`/issues/${e}/work-products/${t}/review-document`,{}),"ensureWorkProductReviewDocument"),createWorkProduct:a((e,t)=>d.post(`/issues/${e}/work-products`,t),"createWorkProduct"),updateWorkProduct:a((e,t)=>d.patch(`/work-products/${e}`,t),"updateWorkProduct"),deleteWorkProduct:a(e=>d.delete(`/work-products/${e}`),"deleteWorkProduct")};function ee(e){return new Date(e).getTime()}a(ee,"toTimestamp");function ds(){const e=globalThis.crypto?.randomUUID?.();return e?`optimistic-${e}`:`optimistic-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}a(ds,"createOptimisticCommentId");function tt(e){return[...e].sort((t,r)=>{const n=ee(t.createdAt)-ee(r.createdAt);return n!==0?n:t.id.localeCompare(r.id)})}a(tt,"sortIssueComments");function Et(e){return tt(e).reverse()}a(Et,"sortIssueCommentsDesc");function vl(e){const t=new Date,r=ds();return{id:r,clientId:r,companyId:e.companyId,issueId:e.issueId,authorType:"user",authorAgentId:null,authorUserId:e.authorUserId,body:e.body,presentation:null,metadata:null,clientStatus:e.clientStatus??"pending",queueTargetRunId:e.queueTargetRunId??null,createdAt:t,updatedAt:t}}a(vl,"createOptimisticIssueComment");function bl(e){return e.runId||e.interruptedRunId||e.comment.id&&(e.comment.id===e.activeRunWakeCommentId||e.comment.id===e.activeRunCommentId)||e.comment.authorAgentId&&e.activeRunAgentId&&e.comment.authorAgentId===e.activeRunAgentId?!1:e.comment.clientStatus==="queued"?!0:e.activeRunStartedAt?ee(e.comment.createdAt)>=ee(e.activeRunStartedAt):!1}a(bl,"isQueuedIssueComment");function kl(e,t){const r=t.queuedTargetRunId??null;return!r||!t.targetRunIsLive||t.runningRunId&&t.runningRunId!==r?e:{...e,clientStatus:"queued",queueState:"queued",queueTargetRunId:r}}a(kl,"applyLocalQueuedIssueCommentState");function xl(e,t){const r=e??[],n=[...r],o=new Set(n.map(i=>i.id)),s=new Set;for(const i of t){if(o.has(i.id))continue;const u=r.find(c=>!s.has(c.id)&&c.issueId===i.issueId&&c.authorType===i.authorType&&c.authorUserId===i.authorUserId&&c.body===i.body&&Math.abs(ee(c.createdAt)-ee(i.createdAt))<=6e4);if(u){s.add(u.id);const c={...u,clientId:i.clientId};n[n.findIndex(m=>m.id===u.id)]=c;continue}n.push(i)}return tt(n)}a(xl,"mergeIssueComments");function wl(e,t){const r=e.findIndex(n=>n.clientId===t);return r===-1?{comments:e,comment:null}:{comments:e.filter(n=>n.clientId!==t),comment:e[r]??null}}a(wl,"takeOptimisticIssueComment");function Il(e){return tt((e??[]).flatMap(t=>t))}a(Il,"flattenIssueCommentPages");function ms(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}a(ms,"getNextIssueCommentPageParam");function $t(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}a($t,"getNextPageCursor");async function Sl(e){const t=(e.pages??[]).map(i=>[...i]),r=e.pageParams?[...e.pageParams].slice(0,t.length):t.map(()=>null);for(;r.length<t.length;)r.push(null);if(e.pageSize<=0)return{pages:t,pageParams:r};let n=$t(t[t.length-1],e.pageSize);const o=Math.max(0,e.maxPages??Number.POSITIVE_INFINITY),s=new Set;for(;n&&!s.has(n)&&s.size<o;){s.add(n);const i=[...await e.fetchPage(n)];t.push(i),r.push(n),n=$t(i,e.pageSize)}return{pages:t,pageParams:r}}a(Sl,"loadRemainingIssueCommentPages");function Rl(e){return e.activeDetailTab!=="chat"||!e.hasOlderComments||e.initialPageLoading||e.olderPageLoading||e.loadedCommentCount===0?!1:e.loadedCommentCount<e.autoLoadLimit}a(Rl,"shouldAutoloadOlderIssueComments");function Cl(e,t){if(!e)return e;const r={...e};return t.reopen===!0&&(e.status==="done"||e.status==="cancelled"||e.status==="blocked")&&(r.status="todo"),t.reassignment&&(r.assigneeAgentId=t.reassignment.assigneeAgentId,r.assigneeUserId=t.reassignment.assigneeUserId),r}a(Cl,"applyOptimisticIssueCommentUpdate");function fs(e,t){if(!e)return e;const r={...e,updatedAt:new Date},n=a(s=>Object.prototype.hasOwnProperty.call(t,s),"hasOwn"),o=a(s=>{n(s)&&(r[s]=t[s])},"assign");if(o("status"),o("priority"),o("assigneeAgentId"),o("assigneeUserId"),o("projectId"),o("parentId"),o("projectWorkspaceId"),o("executionWorkspaceId"),o("executionWorkspacePreference"),o("executionWorkspaceSettings"),o("hiddenAt"),n("labelIds")&&Array.isArray(t.labelIds)){const s=t.labelIds.filter(i=>typeof i=="string");r.labelIds=s,e.labels&&(r.labels=e.labels.filter(i=>s.includes(i.id)))}if(n("blockedByIssueIds")&&Array.isArray(t.blockedByIssueIds)&&e.blockedBy){const s=new Set(t.blockedByIssueIds.filter(i=>typeof i=="string"));r.blockedBy=e.blockedBy.filter(i=>s.has(i.id))}return n("projectId")&&(r.project=e.project?.id===r.projectId?e.project:null),n("parentId")&&(r.ancestors=void 0),n("executionWorkspaceId")&&(r.currentExecutionWorkspace=e.currentExecutionWorkspace?.id===r.executionWorkspaceId?e.currentExecutionWorkspace:null),r}a(fs,"applyOptimisticIssueFieldUpdate");function ps(e,t){const r=t instanceof Set?t:new Set(t);return r.has(e.id)||!!e.identifier&&r.has(e.identifier)}a(ps,"matchesIssueRef$1");function El(e,t,r){if(!e)return e;let n=!1;const o=e.map(s=>ps(s,t)?(n=!0,fs(s,r)??s):s);return n?o:e}a(El,"applyOptimisticIssueFieldUpdateToCollection");function $l(e,t){if(!e||e.length===0)return[[t]];const r=e.map(n=>[...n]);for(let n=0;n<r.length;n+=1){const o=r[n].findIndex(s=>s.id===t.id);if(o!==-1)return r[n][o]=t,r[n]=Et(r[n]),r}return r[0]=Et([...r[0],t]),r}a($l,"upsertIssueCommentInPages");function _l(e,t){return!e||e.length===0?[]:e.map(r=>r.filter(n=>n.id!==t)).filter(r=>r.length>0)}a(_l,"removeIssueCommentFromPages");var hs=["issues","detail"],Cr=6e4,gs=3e4;function le(e){return typeof e=="string"&&e.length>0}a(le,"isNonEmptyString");function Er(e,t){const r=new Set;return le(e)&&r.add(e),le(t?.id)&&r.add(t.id),le(t?.identifier)&&r.add(t.identifier),Array.from(r)}a(Er,"collectIssueRefs");function ys(e,t){const r=t instanceof Set?t:new Set(t);return r.has(e.id)||!!e.identifier&&r.has(e.identifier)}a(ys,"matchesIssueRef");function Se(e){if(typeof e!="object"||e===null)return!1;const t=e;return le(t.id)&&le(t.companyId)&&typeof t.title=="string"&&typeof t.status=="string"&&typeof t.workMode=="string"&&typeof t.priority=="string"&&(t.projectId===null||typeof t.projectId=="string")&&(t.parentId===null||typeof t.parentId=="string")&&(t.identifier===null||typeof t.identifier=="string")&&(t.description===null||typeof t.description=="string")&&(t.assigneeAgentId===null||typeof t.assigneeAgentId=="string")&&(t.assigneeUserId===null||typeof t.assigneeUserId=="string")&&(t.executionRunId===null||typeof t.executionRunId=="string")&&(t.issueNumber===null||typeof t.issueNumber=="number")&&typeof t.requestDepth=="number"&&t.createdAt!=null&&t.updatedAt!=null}a(Se,"isCompleteIssueSnapshot");function _t(e,t){return e?{...e,...t}:t}a(_t,"mergeIssueSnapshots");function $r(e,t,r){const n=Er(t,r);for(const o of n){const s=e.getQueryData(de.issues.detail(o));if(Se(s))return s}return e.getQueriesData({queryKey:hs}).map(([,o])=>o).find(o=>Se(o)&&ys(o,n))}a($r,"getCachedIssueDetail");function _r(e,t,r){if(!Se(t))return t;const n=Er(r?.issueRef,t),o=_t($r(e,r?.issueRef,t),t);for(const s of n)e.setQueryData(de.issues.detail(s),i=>_t(i,o));return o}a(_r,"seedIssueDetailCache");async function Ar(e,t,r){return _r(e,r?await Z.get(t,r):await Z.get(t),{issueRef:t})}a(Ar,"fetchIssueDetail");function vs(e,t,r){return{queryKey:de.issues.detail(t),queryFn:a(({signal:n})=>Ar(e,t,{signal:n}),"queryFn"),placeholderData:$r(e,t,r?.placeholderIssue??void 0)}}a(vs,"getIssueDetailQueryOptions");function bs(e,t,r){return Se(r?.issue)&&_r(e,r.issue,{issueRef:t}),e.prefetchQuery({queryKey:de.issues.detail(t),queryFn:a(()=>Ar(e,t),"queryFn"),staleTime:Cr})}a(bs,"prefetchIssueDetail");function ks(e,t){return e.prefetchInfiniteQuery({queryKey:de.issues.comments(t),queryFn:a(({pageParam:r})=>Z.listComments(t,{order:"desc",limit:50,...r?{after:r}:{}}),"queryFn"),initialPageParam:null,getNextPageParam:a(r=>ms(r,50),"getNextPageParam"),staleTime:gs,pages:1})}a(ks,"prefetchIssueComments");function xs(e,t,r){return Promise.all([bs(e,t,r),ks(e,r?.issue?.id??t)])}a(xs,"prefetchIssueDetailForNavigation");var S=jt(Hn(),1);function ws({...e}){return(0,S.jsx)(Jn,{"data-slot":"popover",...e})}a(ws,"Popover");function Is({...e}){return(0,S.jsx)(ea,{"data-slot":"popover-trigger",...e})}a(Is,"PopoverTrigger");function Ss({className:e,align:t="center",sideOffset:r=4,disablePortal:n=!1,...o}){const s=(0,S.jsx)(Vn,{"data-slot":"popover-content",align:t,sideOffset:r,className:K("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 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...o});return n?s:(0,S.jsx)(Kn,{children:s})}a(Ss,"PopoverContent");function Al({...e}){return(0,S.jsx)(Yn,{"data-slot":"popover-anchor",...e})}a(Al,"PopoverAnchor");function Dl({className:e,...t}){return(0,S.jsx)("div",{"data-slot":"popover-title",className:K("font-medium",e),...t})}a(Dl,"PopoverTitle");function Pl({className:e,...t}){return(0,S.jsx)("p",{"data-slot":"popover-description",className:K("text-muted-foreground",e),...t})}a(Pl,"PopoverDescription");var Dr={name:"atom",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z",key:"1l2ple"}],["path",{d:"M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z",key:"1wam0m"}]]};Dr.node;var Rs=k(Dr),Pr={name:"ban",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}]]};Pr.node;var Cs=k(Pr),Lr={name:"box",size:24,node:[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]};Lr.node;var Es=k(Lr),Mr={name:"brain",size:24,node:[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]};Mr.node;var $s=k(Mr),Tr={name:"briefcase",size:24,node:[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]};Tr.node;var _s=k(Tr),Ur={name:"bug",size:24,node:[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]]};Ur.node;var As=k(Ur),Or={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};Or.node;var Ds=k(Or),jr={name:"circle-dashed",size:24,node:[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]};jr.node;var Br=k(jr),Nr={name:"circle-dot",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]};Nr.node;var Ps=k(Nr),zr={name:"circle-minus",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}]],aliases:["minus-circle"]};zr.node;var At=k(zr),Fr={name:"circle",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]};Fr.node;var Dt=k(Fr),qr={name:"code",size:24,node:[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]};qr.node;var Ls=k(qr),Hr={name:"cog",size:24,node:[["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["circle",{cx:"12",cy:"12",r:"8",key:"46899m"}]]};Hr.node;var Ms=k(Hr),Wr={name:"compass",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]]};Wr.node;var Ts=k(Wr),Vr={name:"cpu",size:24,node:[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]};Vr.node;var Us=k(Vr),Kr={name:"crown",size:24,node:[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]};Kr.node;var Os=k(Kr),Qr={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};Qr.node;var js=k(Qr),Jr={name:"file-code",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 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]};Jr.node;var Bs=k(Jr),Gr={name:"flame",size:24,node:[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]]};Gr.node;var Ns=k(Gr),Yr={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};Yr.node;var zs=k(Yr),Zr={name:"gem",size:24,node:[["path",{d:"M10.5 3 8 9l4 13 4-13-2.5-6",key:"b3dvk1"}],["path",{d:"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z",key:"7w4byz"}],["path",{d:"M2 9h20",key:"16fsjt"}]]};Zr.node;var Fs=k(Zr),Xr={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};Xr.node;var qs=k(Xr),en={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};en.node;var Hs=k(en),tn={name:"hammer",size:24,node:[["path",{d:"m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9",key:"1hayfq"}],["path",{d:"m18 15 4-4",key:"16gjal"}],["path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",key:"15ts47"}]]};tn.node;var Ws=k(tn),rn={name:"heart",size:24,node:[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]};rn.node;var Vs=k(rn),nn={name:"hexagon",size:24,node:[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}]]};nn.node;var Ks=k(nn),an={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};an.node;var Qs=k(an),on={name:"lightbulb",size:24,node:[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]};on.node;var Js=k(on),sn={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};sn.node;var Gs=k(sn),ln={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};ln.node;var Ys=k(ln),un={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};un.node;var Zs=k(un),cn={name:"package",size:24,node:[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]};cn.node;var Xs=k(cn),dn={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};dn.node;var Ll=k(dn),mn={name:"puzzle",size:24,node:[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]};mn.node;var ei=k(mn),fn={name:"radar",size:24,node:[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]]};fn.node;var ti=k(fn),pn={name:"rocket",size:24,node:[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]};pn.node;var ri=k(pn),hn={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};hn.node;var ni=k(hn),gn={name:"shield",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]};gn.node;var ai=k(gn),yn={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};yn.node;var oi=k(yn),vn={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};vn.node;var si=k(vn),bn={name:"target",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};bn.node;var ii=k(bn),kn={name:"telescope",size:24,node:[["path",{d:"m10.065 12.493-6.18 1.318a.934.934 0 0 1-1.108-.702l-.537-2.15a1.07 1.07 0 0 1 .691-1.265l13.504-4.44",key:"k4qptu"}],["path",{d:"m13.56 11.747 4.332-.924",key:"19l80z"}],["path",{d:"m16 21-3.105-6.21",key:"7oh9d"}],["path",{d:"M16.485 5.94a2 2 0 0 1 1.455-2.425l1.09-.272a1 1 0 0 1 1.212.727l1.515 6.06a1 1 0 0 1-.727 1.213l-1.09.272a2 2 0 0 1-2.425-1.455z",key:"m7xp4m"}],["path",{d:"m6.158 8.633 1.114 4.456",key:"74o979"}],["path",{d:"m8 21 3.105-6.21",key:"1fvxut"}],["circle",{cx:"12",cy:"13",r:"2",key:"1c1ljs"}]]};kn.node;var li=k(kn),xn={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};xn.node;var ui=k(xn),wn={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};wn.node;var ci=k(wn),In={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};In.node;var di=k(In),Ml={backlog:"text-muted-foreground border-muted-foreground",todo:"text-amber-600 border-amber-600 dark:text-amber-400 dark:border-amber-400",in_progress:"text-blue-600 border-blue-600 dark:text-blue-400 dark:border-blue-400",in_review:"text-violet-600 border-violet-600 dark:text-violet-400 dark:border-violet-400",done:"text-green-600 border-green-600 dark:text-green-400 dark:border-green-400",cancelled:"text-neutral-500 border-neutral-500",blocked:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400"},Tl="text-muted-foreground border-muted-foreground",Ul={backlog:"text-muted-foreground",todo:"text-amber-600 dark:text-amber-400",in_progress:"text-blue-600 dark:text-blue-400",in_review:"text-violet-600 dark:text-violet-400",done:"text-green-600 dark:text-green-400",cancelled:"text-neutral-500",blocked:"text-red-600 dark:text-red-400"},Ol="text-muted-foreground",ve={gray:"bg-[#F5F3F0] text-[#52585D] border-[#A8AEB2] dark:bg-[#6e696024] dark:text-[#9A958A] dark:border-[#9e958a73]",blue:"bg-[#DBEAFE] text-[#1D4ED8] border-[#2563EB] dark:bg-[#2563eb2e] dark:text-[#2563EB] dark:border-[#2563eb73]",amber:"bg-[#FEF3C7] text-[#B45309] border-[#F59E0B] dark:bg-[#f59e0b24] dark:text-[#F59E0B] dark:border-[#f59e0b73]",green:"bg-[#DCFCE7] text-[#188A3C] border-[#22C55E] dark:bg-[#22c55e1f] dark:text-[#22C55E] dark:border-[#22c55e73]",violet:"bg-[#EDE9FE] text-[#5B21B6] border-[#7C3AED] dark:bg-[#7c3aed2e] dark:text-[#7C3AED] dark:border-[#7c3aed73]",red:"bg-[#FEE2E2] text-[#991B1B] border-[#DC2626] dark:bg-[#dc26262e] dark:text-[#DC2626] dark:border-[#dc262673]"},jl={active:`border ${ve.green}`,running:`border ${ve.blue}`,scheduled_retry:"bg-sky-100 text-sky-700 dark:bg-sky-900/50 dark:text-sky-300",paused:`border ${ve.amber}`,idle:`border ${ve.gray}`,archived:"bg-muted text-muted-foreground",planned:"bg-muted text-muted-foreground",achieved:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",completed:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",failed:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",timed_out:"bg-orange-100 text-orange-700 dark:bg-orange-900/50 dark:text-orange-300",succeeded:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",ok:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",warning:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",error:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",info:"bg-sky-100 text-sky-700 dark:bg-sky-900/50 dark:text-sky-300",terminated:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",pending:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/50 dark:text-yellow-300",queued:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/50 dark:text-yellow-300",pending_approval:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",revision_requested:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",approved:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",rejected:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",draft:"bg-muted text-muted-foreground",backlog:"bg-muted text-muted-foreground",todo:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",in_progress:"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300",in_review:"bg-violet-100 text-violet-700 dark:bg-violet-900/50 dark:text-violet-300",blocked:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",done:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",cancelled:"bg-muted text-muted-foreground",allowed:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",denied:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",block:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300","require-approval":"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",redacted:"bg-violet-100 text-violet-700 dark:bg-violet-900/50 dark:text-violet-300","rate-limit":"bg-orange-100 text-orange-700 dark:bg-orange-900/50 dark:text-orange-300",deferred:"bg-sky-100 text-sky-700 dark:bg-sky-900/50 dark:text-sky-300",hidden:"bg-muted text-muted-foreground",quarantined:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300","runtime-error":"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",healthy:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",degraded:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",unchecked:"bg-muted text-muted-foreground"},Bl="bg-muted text-muted-foreground",Nl="text-[#1D4ED8] dark:text-[#2563EB]",zl="bg-blue-500/10 border-blue-500/30 text-blue-600 dark:text-blue-400",Fl={info:"border-[#2563EB]/40 bg-[#DBEAFE]/50 text-[#1D4ED8] dark:border-[#2563eb59] dark:bg-[#2563eb14] dark:text-[#93C5FD]",warning:"border-[#F59E0B]/50 bg-[#FEF3C7]/60 text-[#B45309] dark:border-[#f59e0b59] dark:bg-[#f59e0b12] dark:text-[#F59E0B]",danger:"border-destructive/40 bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300"},ql={idle:"--status-agent-idle",active:"--status-agent-idle",running:"--status-agent-running",paused:"--status-agent-paused",error:"--status-agent-error"},Hl="--status-agent-idle",Wl={idle:"--status-task-backlog",backlog:"--status-task-backlog",todo:"--status-task-todo",in_progress:"--status-task-in_progress",in_review:"--status-task-in_review",done:"--status-task-done",blocked:"--status-task-blocked",cancelled:"--status-task-cancelled"},Vl="--status-task-backlog",mi={idle:"--status-task-icon-backlog",backlog:"--status-task-icon-backlog",todo:"--status-task-icon-todo",in_progress:"--status-task-icon-in_progress",in_review:"--status-task-icon-in_review",done:"--status-task-icon-done",blocked:"--status-task-icon-blocked",cancelled:"--status-task-icon-cancelled",in_queue:"--status-task-icon-in_queue"};var Kl={running:"bg-blue-400 animate-pulse",active:"bg-green-400",paused:"bg-yellow-400",idle:"bg-yellow-400",pending_approval:"bg-amber-400",error:"bg-red-400",archived:"bg-neutral-400"},Ql="bg-neutral-400",Jl={critical:"text-red-600 dark:text-red-400",high:"text-orange-600 dark:text-orange-400",medium:"text-yellow-600 dark:text-yellow-400",low:"text-blue-600 dark:text-blue-400"},Gl="text-yellow-600 dark:text-yellow-400",Yl={unknown:"text-muted-foreground border-muted-foreground",open:"text-blue-600 border-blue-600 dark:text-blue-400 dark:border-blue-400",waiting:"text-amber-600 border-amber-600 dark:text-amber-400 dark:border-amber-400",running:"text-blue-600 border-blue-600 dark:text-blue-400 dark:border-blue-400",succeeded:"text-green-600 border-green-600 dark:text-green-400 dark:border-green-400",merged:"text-violet-600 border-violet-600 dark:text-violet-400 dark:border-violet-400",failed:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400",blocked:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400",closed:"text-neutral-500 border-neutral-500",archived:"text-neutral-500 border-neutral-500",auth_required:"text-amber-600 border-amber-600 dark:text-amber-400 dark:border-amber-400",unreachable:"text-red-600 border-red-600 dark:text-red-400 dark:border-red-400"},Zl="text-muted-foreground border-muted-foreground",Xl={unknown:"bg-muted text-muted-foreground",open:"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300",waiting:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",running:"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300",succeeded:"bg-green-100 text-green-700 dark:bg-green-900/50 dark:text-green-300",failed:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",blocked:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",closed:"bg-muted text-muted-foreground",archived:"bg-muted text-muted-foreground",auth_required:"bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",unreachable:"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300"},eu="bg-muted text-muted-foreground",tu={unknown:"",fresh:"",stale:"opacity-70 [border-style:dashed]",auth_required:"[border-style:dashed]",unreachable:"[border-style:dashed]"},fi={sm:14,md:16,lg:20},pi=k("TaskProgressSpinner",[["circle",{cx:"12",cy:"12",r:"10",pathLength:"100",strokeDasharray:"80 20",key:"progress"}]]),hi={idle:Dt,backlog:Br,todo:Dt,in_progress:pi,in_review:Ps,done:Ds,blocked:At,cancelled:Cs,in_queue:At},gi=Br;function yi({status:e,size:t="md",className:r,title:n}){const o=fi[t],s=hi[e]??gi,i=mi[e]??"--status-task-icon-backlog",u=n?{role:"img","aria-label":n}:{"aria-hidden":!0};return(0,S.jsx)(s,{size:o,className:K("inline-block shrink-0 align-middle",e==="in_progress"&&"motion-safe:animate-spin",r),style:{color:`var(${i})`},...u,children:n?(0,S.jsx)("title",{children:n}):null})}a(yi,"StatusGlyph");var Pt={folder:zs,rocket:ri,code:Ls,terminal:ui,database:js,globe:Hs,package:Xs,boxes:Xn,box:Es,layers:Qs,briefcase:_s,compass:Ts,target:ii,flame:Ns,zap:di,star:si,bug:As,wrench:ci,hammer:Ws,lightbulb:Js,sparkles:oi,shield:ai,lock:Gs,search:ni,cog:Ms,brain:$s,cpu:Us,"git-branch":qs,"file-code":Bs,puzzle:ei,gem:Fs,atom:Rs,heart:Vs,mail:Ys,"message-square":Zs,crown:Os,radar:ti,telescope:li,hexagon:Ks},vi="folder";function bi(e){return e&&Bn.includes(e)?Pt[e]:Pt[vi]}a(bi,"getProjectIcon");var ki={xs:{box:"h-4 w-4 rounded-sm",icon:"h-2.5 w-2.5"},sm:{box:"h-6 w-6 rounded-md",icon:"h-3.5 w-3.5"},md:{box:"h-7 w-7 rounded-lg",icon:"h-4 w-4"},lg:{box:"h-9 w-9 rounded-lg",icon:"h-5 w-5"}};function xi({color:e,icon:t,size:r="md",className:n}){const o=ki[r],s=!!e,i=bi(t);return(0,S.jsx)("span",{"aria-hidden":!0,className:K("inline-flex shrink-0 items-center justify-center",o.box,s?"text-white":"bg-muted text-muted-foreground",n),style:s?{backgroundColor:e??void 0}:void 0,children:(0,S.jsx)(i,{className:o.icon})})}a(xi,"ProjectTile");var ue=null,He=new Set;function Sn(){for(const e of He)e()}a(Sn,"emitQuicklookChange");function Lt(e){ue!==e&&(ue=e,Sn())}a(Lt,"openQuicklookId");function Mt(e){ue===e&&(ue=null,Sn())}a(Mt,"closeQuicklookId");function wi(e){return He.add(e),()=>{He.delete(e)}}a(wi,"subscribeQuicklook");function Ii(e){return l.useSyncExternalStore(wi,()=>ue===e,()=>!1)}a(Ii,"useIsQuicklookOpen");var Si=120,Ri=13,Ci="w-72 p-3";function Ei(e="start"){return e==="start"?-13:e==="end"?Ri:0}a(Ei,"quicklookAlignOffset");function $i(e){if(!e)return null;const t=e.replace(/!\[[^\]]*]\([^)]+\)/g," ").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[#>*_`~-]+/g," ").replace(/\s+/g," ").trim();return t?t.length>180?`${t.slice(0,177).trimEnd()}...`:t:null}a($i,"summarizeIssueDescription");function _i({className:e}){return(0,S.jsx)("span",{className:K("text-xs",e),"aria-hidden":!0,children:"·"})}a(_i,"QuicklookSeparator");function Ai(e){const t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}a(Ai,"statusLabel");function Di({issue:e,linkTo:t,linkState:r,compact:n=!1}){const o=(0,l.useMemo)(()=>$i(e.description),[e.description]),s=e.project?.name;return(0,S.jsxs)("div",{className:K("space-y-2",n&&"space-y-1.5"),children:[(0,S.jsxs)("div",{className:"flex items-center gap-1",children:[(0,S.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1",children:[(0,S.jsx)(yi,{status:e.status,size:"md",title:Ai(e.status)}),(0,S.jsx)("span",{className:"shrink-0 font-mono text-(length:--text-micro) text-muted-foreground",children:e.identifier??e.id.slice(0,8)}),s?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(_i,{className:"shrink-0 text-muted-foreground"}),(0,S.jsxs)("span",{className:"flex min-w-0 max-w-(--sz-12rem) flex-1 items-center gap-1 text-(length:--text-micro) text-muted-foreground",title:s,"data-testid":"quicklook-project",children:[(0,S.jsx)(xi,{size:"xs"}),(0,S.jsx)("span",{className:"truncate",children:s})]})]}):null]}),(0,S.jsx)("span",{className:"shrink-0 text-(length:--text-micro) text-muted-foreground",children:Zo(new Date(e.updatedAt))})]}),(0,S.jsx)(pe,{to:t,state:r??Ir(null,e),className:"block text-sm font-medium leading-snug hover:underline line-clamp-2",children:e.title}),o?(0,S.jsx)("p",{className:"text-xs leading-5 text-muted-foreground [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:4] overflow-hidden",children:o}):null]})}a(Di,"IssueQuicklookCard");var Pi=l.forwardRef(a(function({issuePathId:t,to:r,children:n,className:o,state:s,disableIssueQuicklook:i=!1,issuePrefetch:u=null,issueQuicklookSide:c="top",issueQuicklookAlign:m="start",onClick:p,onClickCapture:f,onMouseEnter:g,onFocus:b,onBlur:v,onTouchStart:y,...h},x){const w=jn(),I=l.useMemo(()=>Symbol("issue-quicklook"),[]),_=Ii(I),C=l.useRef(null),A=l.useRef(null),L=l.useRef(null),j=l.useCallback(E=>{A.current=E,typeof x=="function"?x(E):x&&(x.current=E)},[x]),D=l.useCallback(()=>{C.current&&(clearTimeout(C.current),C.current=null)},[]),N=l.useCallback(()=>{D(),Lt(I)},[D,I]),G=l.useCallback(()=>{D(),C.current=setTimeout(()=>{C.current=null,Lt(I)},Si)},[D,I]),U=l.useCallback(()=>{D(),Mt(I)},[D,I]);l.useEffect(()=>()=>{D(),Mt(I)},[D,I]),l.useEffect(()=>{if(!_)return;const E=12,at=a((V,se,Y)=>{if(!V)return!1;const W=V.getBoundingClientRect();return se>=W.left-E&&se<=W.right+E&&Y>=W.top-E&&Y<=W.bottom+E},"nearBox"),Un=a((V,se)=>{const Y=A.current,W=L.current;if(Y?.matches(":hover")||W?.matches(":hover")||at(Y,V,se)||at(W,V,se))return!0;const Pe=document.activeElement;return Y===Pe||!!W&&!!Pe&&W.contains(Pe)},"stillEngaged"),ot=a(V=>{Un(V.clientX,V.clientY)||U()},"onPointerMove");return document.addEventListener("pointermove",ot,{passive:!0}),()=>document.removeEventListener("pointermove",ot)},[_,U]);const H=u?Ir(s,u):s,{data:z,isLoading:F}=Zn({...vs(w,t,{placeholderIssue:u??void 0}),enabled:_,staleTime:Cr}),Tn=us(t),oe=l.useCallback(()=>{xs(w,t,{issue:u})},[t,u,w]),nt=(0,S.jsx)(pe,{ref:j,to:r,state:H,className:o,onMouseEnter:a(E=>{oe(),g?.(E)},"onMouseEnter"),onFocus:a(E=>{oe(),N(),b?.(E)},"onFocus"),onBlur:a(E=>{setTimeout(()=>U(),0),v?.(E)},"onBlur"),onTouchStart:a(E=>{oe(),y?.(E)},"onTouchStart"),onClickCapture:a(E=>{oe(),f?.(E)},"onClickCapture"),onClick:a(E=>{U(),p?.(E)},"onClick"),...h,children:n});return i?nt:(0,S.jsxs)(ws,{open:_,onOpenChange:a(E=>E?N():U(),"onOpenChange"),children:[(0,S.jsx)(Is,{asChild:!0,onMouseEnter:a(()=>{oe(),G()},"onMouseEnter"),onMouseLeave:U,children:nt}),(0,S.jsx)(Ss,{ref:L,"data-quicklook":!0,className:Ci,side:c,align:m,alignOffset:Ei(m),onMouseEnter:N,onMouseLeave:U,onOpenAutoFocus:a(E=>E.preventDefault(),"onOpenAutoFocus"),onCloseAutoFocus:a(E=>E.preventDefault(),"onCloseAutoFocus"),children:z?(0,S.jsx)(Di,{issue:z,linkTo:Tn,linkState:H,compact:!0}):(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsx)("div",{className:"h-4 w-24 rounded bg-accent/50"}),(0,S.jsx)("div",{className:"h-4 w-full rounded bg-accent/40"}),(0,S.jsx)("div",{className:"h-4 w-3/4 rounded bg-accent/30"}),F?null:(0,S.jsx)("p",{className:"text-xs text-muted-foreground",children:"Unable to load task preview."})]})})]})},"IssueLinkQuicklookImpl")),Rn=new Set(["dashboard","companies","company","skills","teams-catalog","org","agents","chats","apps","projects","workspaces","execution-workspaces","issues","tasks","routines","goals","artifacts","tools","approvals","costs","usage","activity","audit","decisions","inbox","board-chat","artifacts","u","design-guide","search","settings","timeline"]),rt=new Set(["auth","invite","board-claim","cli-auth","mcp-connect","dot-connect","assistant-connections","docs","instance","s"]);function ce(e){return e.trim().toUpperCase()}a(ce,"normalizeCompanyPrefix");function Cn(e){const t=e.match(/^([^?#]*)(\?[^#]*)?(#.*)?$/);return{pathname:t?.[1]??e,search:t?.[2]??"",hash:t?.[3]??""}}a(Cn,"splitPath");function Li(e){return e.split("/").filter(Boolean)[0]??null}a(Li,"getRootSegment");function Mi(e){if(e==="/")return!0;const t=Li(e);return t?rt.has(t.toLowerCase()):!0}a(Mi,"isGlobalPath");function En(e){const t=e.split("/").filter(Boolean);if(t.length===0)return null;const r=t[0].toLowerCase();return rt.has(r)||Rn.has(r)?null:ce(t[0])}a(En,"extractCompanyPrefixFromPath");function Tt(e,t){const{pathname:r,search:n,hash:o}=Cn(e);if(!r.startsWith("/")||Mi(r)||!t)return e;const s=ce(t);return En(r)?e:`/${s}${r}${n}${o}`}a(Tt,"applyCompanyPrefix");function Ti(e,...t){const r=["cases",...t].filter(Boolean).join("/");return e?`/${ce(e)}/${r}`:`/${r}`}a(Ti,"caseHref");function ru(e){const{pathname:t,search:r,hash:n}=Cn(e),o=t.split("/").filter(Boolean);if(o.length>=2){const s=o[1].toLowerCase();if(!rt.has(o[0].toLowerCase())&&Rn.has(s))return`/${o.slice(1).join("/")}${r}${n}`}return`${t}${r}${n}`}a(ru,"toCompanyRelativePath");var $n=/^[A-Z][A-Z0-9]*-\d+$/i,Ui=/^issue:\/\/:?([^?#\s]+)([?#].*)?$/i,Oi=/issue:\/\/:?[^\s<>()]+|https?:\/\/[^\s<>()]+|\/(?:[^\s<>()/]+\/)*issues\/[A-Z][A-Z0-9]*-\d+(?=$|[\s<>)\],.;!?:])|\b[A-Z][A-Z0-9]*-\d+\b/gi;function _n(e){if(!e)return null;const t=e.trim();if(!t||/^https?:\/\//i.test(t))return null;const r=t.split(/[?#]/,1)[0].split("/").filter(Boolean),n=r.findIndex(s=>s==="issues");if(n===-1||n===r.length-1)return null;const o=decodeURIComponent(r[n+1]??"");return!o||o.startsWith(":")?null:$n.test(o)?o.toUpperCase():o}a(_n,"parseIssuePathIdFromPath");function An(e,t){if(!e)return null;const r=e.trim(),n=r.match(Ui);if(n?.[1]){const i=decodeURIComponent(n[1]);return{issuePathId:i,href:`/issues/${encodeURIComponent(i)}${n[2]??""}`}}const o=_n(e);if(o)return{issuePathId:o,href:`/issues/${encodeURIComponent(o)}${r.match(/[?#].*$/)?.[0]??""}`};if(!$n.test(r))return null;const s=r.toUpperCase();if(t&&t.size>0){const i=s.split("-")[0];if(!i||!t.has(i))return null}return{issuePathId:s,href:`/issues/${encodeURIComponent(s)}`}}a(An,"parseIssueReferenceFromHref");function ji(e){let t=e,r="";for(;t.length>0;){const n=t.at(-1);if(!n||!/[),.;!?:\]]/.test(n))break;if(n===")"){const o=(t.match(/\(/g)??[]).length;if((t.match(/\)/g)??[]).length<=o)break}if(n==="]"){const o=(t.match(/\[/g)??[]).length;if((t.match(/\]/g)??[]).length<=o)break}r=`${n}${r}`,t=t.slice(0,-1)}return{core:t,trailing:r}}a(ji,"splitTrailingPunctuation");function Dn(e,t,r="text"){return{type:"link",url:t,children:[{type:r,value:e}]}}a(Dn,"createIssueLinkNode");function Bi(e,t){const r=[];let n=0,o=!1;for(const s of e.matchAll(Oi)){const i=s[0];if(!i)continue;const u=s.index??0,c=u+i.length,{core:m,trailing:p}=ji(i),f=An(m,t);f&&(o=!0,u>n&&r.push({type:"text",value:e.slice(n,u)}),r.push(Dn(m,f.href)),p&&r.push({type:"text",value:p}),n=c)}return o?(n<e.length&&r.push({type:"text",value:e.slice(n)}),r):null}a(Bi,"linkifyIssueReferencesInText");function Pn(e,t){if(!Array.isArray(e.children)||e.children.length===0||e.type==="link"||e.type==="linkReference"||e.type==="code"||e.type==="definition"||e.type==="html")return;const r=[];for(const n of e.children){if(n.type==="inlineCode"&&typeof n.value=="string"){const o=An(n.value,t);if(o){r.push(Dn(n.value,o.href,"inlineCode"));continue}}if(n.type==="text"&&typeof n.value=="string"){const o=Bi(n.value,t);if(o){r.push(...o);continue}}Pn(n,t),r.push(n)}e.children=r}a(Pn,"rewriteMarkdownTree");function nu(e){const t=e?.knownPrefixes&&e.knownPrefixes.length>0?new Set(e.knownPrefixes.map(r=>r.toUpperCase())):void 0;return r=>{Pn(r,t)}}a(nu,"remarkLinkIssueReferences");function De(e,t){if(typeof e=="string")return Tt(e,t);if(e.pathname&&e.pathname.startsWith("/")){const r=Tt(e.pathname,t);if(r!==e.pathname)return{...e,pathname:r}}return e}a(De,"resolveTo");function he(){const{selectedCompany:e}=Qn(),t=Wa(),r=T();if(t.companyPrefix)return ce(t.companyPrefix);const n=En(r.pathname);return n||(e?ce(e.issuePrefix):null)}a(he,"useActiveCompanyPrefix");function au(){const e=he();return l.useCallback((...t)=>Ti(e,...t),[e])}a(au,"useCaseHref");var ou=l.forwardRef(a(function({to:t,disableIssueQuicklook:r=!1,issuePrefetch:n=null,issueQuicklookSide:o,issueQuicklookAlign:s,...i},u){const c=De(t,he()),m=_n(typeof c=="string"?c:c.pathname);return m?(0,S.jsx)(Pi,{ref:u,to:c,issuePathId:m,disableIssueQuicklook:r,issuePrefetch:n,issueQuicklookSide:o,issueQuicklookAlign:s,...i}):(0,S.jsx)(pe,{ref:u,to:c,...i})},"CompanyLink")),su=l.forwardRef(a(function({to:t,...r},n){const o=he();return(0,S.jsx)(mr,{ref:n,to:De(t,o),...r})},"CompanyNavLink"));function iu({to:e,...t}){const r=he();return(0,S.jsx)(so,{to:De(e,r),...t})}a(iu,"Navigate");function lu(){const e=Ce(),t=he();return l.useCallback(((r,n)=>{if(typeof r=="number"){e(r);return}e(De(r,t),n)}),[e,t])}a(lu,"useNavigate");var Ut=a(e=>typeof e=="boolean"?`${e}`:e===0?"0":e,"falsyToString"),Ot=Gn,Ni=a((e,t)=>r=>{var n;if(t?.variants==null)return Ot(e,r?.class,r?.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(m=>{const p=r?.[m],f=s?.[m];if(p===null)return null;const g=Ut(p)||Ut(f);return o[m][g]}),u=r&&Object.entries(r).reduce((m,p)=>{let[f,g]=p;return g===void 0||(m[f]=g),m},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((m,p)=>{let{class:f,className:g,...b}=p;return Object.entries(b).every(v=>{let[y,h]=v;return Array.isArray(h)?h.includes({...s,...u}[y]):{...s,...u}[y]===h})?[...m,f,g]:m},[]);return Ot(e,i,c,r?.class,r?.className)},"cva"),zi=Ni("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-(--tp-color-background-color-border-color-box-shadow-opacity) disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-(length:--rad-3) aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",cta:"bg-foreground text-background hover:bg-foreground/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-9 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-10","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-9","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),Fi=l.forwardRef(a(function({className:t,variant:r="default",size:n="default",asChild:o=!1,...s},i){const u=o?Fn:"button";return(0,S.jsx)(u,{ref:i,"data-slot":"button","data-variant":r,"data-size":n,className:K(zi({variant:r,size:n,className:t})),...s})},"Button"));Fi.displayName="Button";function Ln(e,t){return t?`${e}${e.includes("?")?"&":"?"}companyId=${encodeURIComponent(t)}`:e}a(Ln,"withCompanyScope");function R(e,t,r=""){return Ln(`/agents/${encodeURIComponent(e)}${r}`,t)}a(R,"agentPath");var uu={setAvatar:a((e,t,r)=>d.put(`/companies/${e}/agents/${t}/avatar`,{imageBase64:r}),"setAvatar"),getIdentity:a((e,t)=>d.get(R(e,t,"/identity")),"getIdentity"),adoptAiConnection:a((e,t,r,n)=>d.post(Ln(`/agents/${e}/connection-intents/${t}/adopt`,n),{connectionId:r}),"adoptAiConnection"),list:a(e=>d.get(`/companies/${e}/agents`),"list"),org:a(e=>d.get(`/companies/${e}/org`),"org"),listConfigurations:a(e=>d.get(`/companies/${e}/agent-configurations`),"listConfigurations"),get:a(async(e,t)=>{try{return await d.get(R(e,t))}catch(r){if(!(r instanceof Bt)||r.status!==409||!t||zn(e))throw r;const n=st(e);if(!n)throw r;const o=(await d.get(`/companies/${t}/agents`)).filter(s=>s.status!=="terminated"&&st(s.urlKey)===n);if(o.length!==1)throw r;return d.get(R(o[0].id,t))}},"get"),getConfiguration:a((e,t)=>d.get(R(e,t,"/configuration")),"getConfiguration"),listConfigRevisions:a((e,t)=>d.get(R(e,t,"/config-revisions")),"listConfigRevisions"),getConfigRevision:a((e,t,r)=>d.get(R(e,r,`/config-revisions/${t}`)),"getConfigRevision"),rollbackConfigRevision:a((e,t,r)=>d.post(R(e,r,`/config-revisions/${t}/rollback`),{}),"rollbackConfigRevision"),create:a((e,t)=>d.post(`/companies/${e}/agents`,t),"create"),hire:a((e,t)=>d.post(`/companies/${e}/agent-hires`,t),"hire"),update:a((e,t,r)=>d.patch(R(e,r),t),"update"),updatePermissions:a((e,t,r)=>d.patch(R(e,r,"/permissions"),t),"updatePermissions"),batchAdapterConfigPreview:a(e=>d.post("/agents/batch/adapter-config/preview",{agentIds:e}),"batchAdapterConfigPreview"),batchAdapterConfig:a((e,t)=>d.post("/agents/batch/adapter-config",{agentIds:e,values:t}),"batchAdapterConfig"),instructionsBundle:a((e,t)=>d.get(R(e,t,"/instructions-bundle")),"instructionsBundle"),updateInstructionsBundle:a((e,t,r)=>d.patch(R(e,r,"/instructions-bundle"),t),"updateInstructionsBundle"),instructionsFile:a((e,t,r)=>d.get(R(e,r,`/instructions-bundle/file?path=${encodeURIComponent(t)}`)),"instructionsFile"),saveInstructionsFile:a((e,t,r)=>d.put(R(e,r,"/instructions-bundle/file"),t),"saveInstructionsFile"),instructionCandidates:a((e,t)=>d.get(R(e,t,"/instructions-bundle/candidates")),"instructionCandidates"),resolveInstructionCandidate:a((e,t,r,n)=>d.post(R(e,n,`/instructions-bundle/candidates/${t}/resolve`),r),"resolveInstructionCandidate"),instructionHistory:a((e,t,r,n)=>d.get(R(e,r,`/instructions-bundle/history?path=${encodeURIComponent(t)}${n?`&cursor=${encodeURIComponent(n)}`:""}`)),"instructionHistory"),instructionRevision:a((e,t,r,n)=>d.get(R(e,n,`/instructions-bundle/revision/${r}?path=${encodeURIComponent(t)}`)),"instructionRevision"),instructionDiff:a((e,t,r,n,o)=>d.get(R(e,o,`/instructions-bundle/diff?path=${encodeURIComponent(t)}&from=${encodeURIComponent(r)}&to=${encodeURIComponent(n)}`)),"instructionDiff"),restoreInstructions:a((e,t,r)=>d.post(R(e,r,"/instructions-bundle/restore"),t),"restoreInstructions"),downloadInstructionsFile:a((e,t,r)=>`/api${R(e,r,`/instructions-bundle/file?path=${encodeURIComponent(t)}&download=true`)}`,"downloadInstructionsFile"),deleteInstructionsFile:a((e,t,r,n)=>d.delete(R(e,r,`/instructions-bundle/file?path=${encodeURIComponent(t)}${n?`&baseHash=${n}`:""}`)),"deleteInstructionsFile"),retryLifecycle:a((e,t)=>d.post(R(e,t,"/lifecycle/retry"),{}),"retryLifecycle"),pause:a((e,t)=>d.post(R(e,t,"/pause"),{}),"pause"),resume:a((e,t)=>d.post(R(e,t,"/resume"),{}),"resume"),clearError:a((e,t)=>d.post(R(e,t,"/clear-error"),{}),"clearError"),approve:a((e,t)=>d.post(R(e,t,"/approve"),{}),"approve"),terminate:a((e,t)=>d.post(R(e,t,"/terminate"),{}),"terminate"),remove:a((e,t)=>d.delete(R(e,t)),"remove"),listKeys:a((e,t)=>d.get(R(e,t,"/keys")),"listKeys"),skills:a((e,t)=>d.get(R(e,t,"/skills")),"skills"),syncSkills:a((e,t,r,n)=>d.post(R(e,n,"/skills/sync"),{desiredSkills:t,mode:r}),"syncSkills"),createKey:a((e,t,r,n)=>d.post(R(e,r,"/keys"),{name:t,...n?{scope:n}:{}}),"createKey"),revokeKey:a((e,t,r)=>d.delete(R(e,r,`/keys/${encodeURIComponent(t)}`)),"revokeKey"),runtimeState:a((e,t)=>d.get(R(e,t,"/runtime-state")),"runtimeState"),taskSessions:a((e,t)=>d.get(R(e,t,"/task-sessions")),"taskSessions"),resetSession:a((e,t,r)=>d.post(R(e,r,"/runtime-state/reset-session"),{taskKey:t??null}),"resetSession"),adapterModels:a((e,t,r)=>{const n=new URLSearchParams;r?.refresh&&n.set("refresh","1"),r?.provider&&n.set("provider",r.provider),r?.poolId&&n.set("poolId",r.poolId),r?.environmentId&&n.set("environmentId",r.environmentId);const o=n.size>0?`?${n.toString()}`:"";return d.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/models${o}`)},"adapterModels"),detectModel:a((e,t)=>d.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/detect-model`),"detectModel"),testEnvironment:a((e,t,r)=>d.post(`/companies/${e}/adapters/${t}/test-environment`,r),"testEnvironment"),getAdapterAuthSignal:a((e,t,r)=>{const n=r?`?environmentId=${encodeURIComponent(r)}`:"";return d.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/auth-signal${n}`)},"getAdapterAuthSignal"),invoke:a((e,t,r={})=>d.post(R(e,t,"/heartbeat/invoke"),r),"invoke"),wakeup:a((e,t,r)=>d.post(R(e,r,"/wakeup"),t),"wakeup"),retryFailedRun:a(async(e,t,r)=>{const n=await d.post(R(e,r,"/wakeup"),{source:"on_demand",triggerDetail:"manual",reason:"retry_failed_run",failedRunId:t});if("id"in n){if(["failed","timed_out","cancelled","interrupted"].includes(n.status))throw new Error("The previous retry has already stopped. Refresh the task and retry its latest failed run.");return{runId:n.id,issueId:null}}if("actionId"in n){if(n.status==="failed"||n.status==="cancelled")throw new Error("This retry could not start. Open the task to review its current access and recovery state.");return{runId:n.runId,issueId:n.issueId}}throw new Error(n.message??"Retry was skipped.")},"retryFailedRun"),loginWithClaude:a((e,t)=>d.post(R(e,t,"/claude-login"),{}),"loginWithClaude"),startAdapterAuthLogin:a((e,t,r)=>d.post(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions`,r),"startAdapterAuthLogin"),getAdapterAuthLoginStatus:a((e,t,r)=>d.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/${encodeURIComponent(r)}`,{cache:"no-store"}),"getAdapterAuthLoginStatus"),getActiveAdapterAuthLoginSession:a((e,t)=>d.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/active`,{cache:"no-store"}),"getActiveAdapterAuthLoginSession"),cancelAdapterAuthLogin:a((e,t,r)=>d.post(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/${encodeURIComponent(r)}/cancel`,{}),"cancelAdapterAuthLogin"),getClaudeOAuthTokenStatus:a(e=>d.get(`/companies/${encodeURIComponent(e)}/claude-oauth-token-status`),"getClaudeOAuthTokenStatus"),startClaudeSetupTokenLogin:a((e,t)=>d.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions`,{adapterType:"claude_local",...t}),"startClaudeSetupTokenLogin"),getClaudeSetupTokenLoginStatus:a((e,t)=>d.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}`),"getClaudeSetupTokenLoginStatus"),getActiveClaudeSetupTokenLoginSession:a(e=>d.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/active`,{cache:"no-store"}),"getActiveClaudeSetupTokenLoginSession"),getClaudeSetupTokenLoginPrompt:a((e,t)=>d.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/prompt`),"getClaudeSetupTokenLoginPrompt"),submitClaudeSetupTokenBrowserCode:a((e,t,r)=>d.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/code`,{browserCode:r}),"submitClaudeSetupTokenBrowserCode"),completeClaudeSetupTokenLogin:a((e,t)=>d.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/completion`,{}),"completeClaudeSetupTokenLogin"),cancelClaudeSetupTokenLogin:a((e,t)=>d.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/cancel`,{}),"cancelClaudeSetupTokenLogin"),availableSkills:a(()=>d.get("/skills/available"),"availableSkills")},Mn=(0,l.createContext)(null);function qi(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1)if(e[r]?.label!==t[r]?.label||e[r]?.onClick!==t[r]?.onClick||e[r]?.href!==t[r]?.href||e[r]?.identifier!==t[r]?.identifier||e[r]?.leadingKey!==t[r]?.leadingKey||e[r]?.trailingKey!==t[r]?.trailingKey)return!1;return!0}a(qi,"breadcrumbsEqual");function Hi(e,t){const r=e.length===0?[]:[...e].reverse().map(o=>o.label),n=t?.trim()?[t.trim()]:[];return[...r,...n,"Paperclip"].join(" • ")}a(Hi,"buildDocumentTitle");function cu({children:e,companyName:t}){const[r,n]=(0,l.useState)([]),[o,s]=(0,l.useState)(null),[i,u]=(0,l.useState)(null),[c,m]=(0,l.useState)(null),p=(0,l.useCallback)(v=>{n(y=>qi(y,v)?y:v)},[]),f=(0,l.useCallback)(v=>{m(v)},[]),g=(0,l.useCallback)(v=>{s(v)},[]),b=(0,l.useCallback)(v=>{u(v)},[]);return(0,l.useEffect)(()=>{document.title=Hi(r,t)},[r,t]),(0,S.jsx)(Mn.Provider,{value:{breadcrumbs:r,setBreadcrumbs:p,breadcrumbToolbar:o,setBreadcrumbToolbar:g,breadcrumbPanelControl:i,setBreadcrumbPanelControl:b,mobileToolbar:c,setMobileToolbar:f},children:e})}a(cu,"BreadcrumbProvider");function du(){const e=(0,l.useContext)(Mn);if(!e)throw new Error("useBreadcrumbs must be used within BreadcrumbProvider");return e}a(du,"useBreadcrumbs");export{li as $,vl as $t,Hl as A,Zo as An,Dt as At,Ul as B,Wa as Bn,ws as Bt,Ei as C,es as Cn,Bs as Ct,Kl as D,cl as Dn,Ts as Dt,yi as E,ml as En,Us as Et,eu as F,tl as Fn,As as Ft,Nl as G,Is as Gt,zl as H,Ss as Ht,Yl as I,il as In,$s as It,Wl as J,xs as Jt,jl as K,$r as Kt,Zl as L,T as Ln,Es as Lt,ve as M,pe as Mn,Ps as Mt,tu as N,el as Nn,Br as Nt,Ql as O,gr as On,Ms as Ot,Xl as P,io as Pn,Ds as Pt,ui as Q,El as Qt,Ml as R,Ce as Rn,Cs as Rt,Ci as S,Xo as Sn,Ns as St,Pt as T,et as Tn,Os as Tt,Jl as U,Pl as Ut,Ol as V,sl as Vn,Al as Vt,Gl as W,Dl as Wt,di as X,Cl as Xt,Vl as Y,kl as Yt,ci as Z,fs as Zt,Mi as _,as as _n,Ws as _t,zi as a,xl as an,ri as at,Pi as b,Ir as bn,Fs as bt,su as c,wl as cn,Ll as ct,au as d,It as dn,Ys as dt,Il as en,ii as et,lu as f,pl as fn,Gs as ft,En as g,yl as gn,Vs as gt,Tt as h,gl as hn,Ks as ht,Fi as i,ps as in,ni as it,Fl as j,ol as jn,At as jt,ql as k,ll as kn,Ls as kt,iu as l,$l as ln,Xs as lt,nu as m,us as mn,Qs as mt,du as n,bl as nn,oi as nt,Ni as o,_l as on,ti as ot,An as p,fl as pn,Js as pt,Bl as q,vs as qt,uu as r,Sl as rn,ai as rt,ou as s,Rl as sn,ei as st,cu as t,ms as tn,si as tt,he as u,Z as un,Zs as ut,ce as v,cs as vn,Hs as vt,xi as w,ul as wn,js as wt,Di as x,dl as xn,zs as xt,ru as y,hl as yn,qs as yt,Tl as z,Zi as zn,Rs as zt};