@tickernelz/paperclip-pro-ui 2026.1006.4 → 2026.1007.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 (78) hide show
  1. package/dist/assets/{AgentAvatar-CrnNGelJ.js → AgentAvatar-DOIbFsCU.js} +1 -1
  2. package/dist/assets/{AgentIdentity-Bl7KfJ-S.js → AgentIdentity-DWRgKwgc.js} +1 -1
  3. package/dist/assets/{Agents.production-BFGp0ZEf.js → Agents.production-DzTwiTIu.js} +2 -2
  4. package/dist/assets/{CompanyActivity.production-C-f8UQ4g.js → CompanyActivity.production-CH3-d-9W.js} +1 -1
  5. package/dist/assets/{CompanyExport-DYAZZQrK.js → CompanyExport-BFs2zqet.js} +4 -4
  6. package/dist/assets/{CompanySkills.production-h32zfrEI.js → CompanySkills.production-zcTnD7H9.js} +2 -2
  7. package/dist/assets/{Costs.production-BzmIV_bd.js → Costs.production-CE4rIL_p.js} +1 -1
  8. package/dist/assets/{EmptyState-ClZXiygF.js → EmptyState-DkE9QlTq.js} +1 -1
  9. package/dist/assets/{MarkdownBody-Usks4GYV.js → MarkdownBody-BpBJyNbg.js} +8 -8
  10. package/dist/assets/{MarkdownEditor-D0uqxShB.js → MarkdownEditor-jeCoRaVU.js} +12 -12
  11. package/dist/assets/{OrgChart.production-Bj3afQhp.js → OrgChart.production-ac2nRt-h.js} +1 -1
  12. package/dist/assets/{PageSkeleton-DQuX4FJP.js → PageSkeleton-Cd8QAH2P.js} +1 -1
  13. package/dist/assets/{RoutineDetail.production-BcFxZ4EE.js → RoutineDetail.production-D4v3t3pE.js} +1 -1
  14. package/dist/assets/{RoutineRunVariablesDialog--quGEm4y.js → RoutineRunVariablesDialog--kZqZqMt.js} +2 -2
  15. package/dist/assets/{Routines.production-51FSuBP4.js → Routines.production-DKgQdAih.js} +1 -1
  16. package/dist/assets/{SidebarContext-DHnDudYw.js → SidebarContext-DAcKcNyg.js} +1 -1
  17. package/dist/assets/{StatusIcon-D__DIZlm.js → StatusIcon-csJ_L48Q.js} +1 -1
  18. package/dist/assets/{agent-avatar-url-CiVC72zn.js → agent-avatar-url-DzsNQ_N0.js} +18 -18
  19. package/dist/assets/{agents-BGdf-J_C.js → agents-CmnAqgia.js} +1 -1
  20. package/dist/assets/{badge-Dwnb7bwc.js → badge-CKdPuPE0.js} +1 -1
  21. package/dist/assets/{bot-DyYJ3E4C.js → bot-n5EOqTXp.js} +1 -1
  22. package/dist/assets/{boxes-BGSl5NUN.js → boxes-EP8QVomc.js} +1 -1
  23. package/dist/assets/{button-BmDU7YzH.js → button-C6jaf_Sl.js} +1 -1
  24. package/dist/assets/{card-V5O2wbgV.js → card-IPj1L8Q4.js} +1 -1
  25. package/dist/assets/{check-B3EECTO-.js → check-Dm5GNoSc.js} +1 -1
  26. package/dist/assets/{checkbox-SdYP--OH.js → checkbox-BsmZjqhc.js} +1 -1
  27. package/dist/assets/{chevron-down-wArmbnHu.js → chevron-down-BtssLI8G.js} +1 -1
  28. package/dist/assets/{chevron-right-BhU5OvzN.js → chevron-right-BnzFxwAz.js} +1 -1
  29. package/dist/assets/{clipboard-CATj6OsB.js → clipboard-DeYfJjiD.js} +1 -1
  30. package/dist/assets/{company-members-c2ldQ5sU.js → company-members-DQ4Cc5d-.js} +1 -1
  31. package/dist/assets/{definition-DNGMKdWy.js → definition-Db0yOtgX.js} +1 -1
  32. package/dist/assets/{dist-bLGzOSwF.js → dist-B6qV1XGe.js} +1 -1
  33. package/dist/assets/{dist-DA-GP1EK.js → dist-DXa1ezVw.js} +1 -1
  34. package/dist/assets/{environments-12KK8Hvb.js → environments-gtjPQOYW.js} +1 -1
  35. package/dist/assets/{external-link-CGgtFJT7.js → external-link-BotwQKus.js} +1 -1
  36. package/dist/assets/{file-text-BehN_jnQ.js → file-text-DU47Mi_p.js} +1 -1
  37. package/dist/assets/{health-BqfpMlIG.js → health-Bo0HHN85.js} +1 -1
  38. package/dist/assets/{heartbeats-By7EcEMQ.js → heartbeats-CSvbdPsF.js} +1 -1
  39. package/dist/assets/{index-Du_ofjV1.js → index-BzKQBlXD.js} +168 -168
  40. package/dist/assets/{input-CfZ7FdDr.js → input-Du0q8vsG.js} +1 -1
  41. package/dist/assets/{label-CA4aszl3.js → label-CTHBK1II.js} +2 -2
  42. package/dist/assets/{loader-circle-B6QmcXd3.js → loader-circle-DPmWrmQZ.js} +1 -1
  43. package/dist/assets/{mention-chips-3yfCFzXQ.js → mention-chips-LAG1VXql.js} +2 -2
  44. package/dist/assets/{octagon-alert-CAPjvRAd.js → octagon-alert-CuAhSfBL.js} +1 -1
  45. package/dist/assets/{rotate-ccw-qAsLpcfW.js → rotate-ccw-y_hmU4UY.js} +1 -1
  46. package/dist/assets/{router-CGbOrhXy.js → router-CMTjElv-.js} +2 -2
  47. package/dist/assets/{save-dnfn3gBp.js → save-Dj31zyO7.js} +1 -1
  48. package/dist/assets/{select-Db0ppga4.js → select-CPMo6vns.js} +1 -1
  49. package/dist/assets/{sheet-CqcQLexE.js → sheet-DVA_uRCz.js} +1 -1
  50. package/dist/assets/{skeleton-tce5L2Bu.js → skeleton-BBVFeioZ.js} +1 -1
  51. package/dist/assets/{tabs-Bs8GGKXg.js → tabs-CzMk2LB6.js} +1 -1
  52. package/dist/assets/{triangle-alert-BSwSeDrD.js → triangle-alert-DmBxLWGs.js} +1 -1
  53. package/dist/assets/{use-adapter-capabilities-h7tUuKwM.js → use-adapter-capabilities-DphVdf3J.js} +1 -1
  54. package/dist/assets/{useHiddenSettings-DwCbKddT.js → useHiddenSettings-BkL_80LS.js} +1 -1
  55. package/dist/index.html +45 -45
  56. package/dist/sounds/LICENSE.txt +19 -0
  57. package/dist/sounds/bong.mp3 +0 -0
  58. package/dist/sounds/bong.ogg +0 -0
  59. package/dist/sounds/confirmation.mp3 +0 -0
  60. package/dist/sounds/confirmation.ogg +0 -0
  61. package/dist/sounds/drop.mp3 +0 -0
  62. package/dist/sounds/drop.ogg +0 -0
  63. package/dist/sounds/error.mp3 +0 -0
  64. package/dist/sounds/error.ogg +0 -0
  65. package/dist/sounds/glass.mp3 +0 -0
  66. package/dist/sounds/glass.ogg +0 -0
  67. package/dist/sounds/maximize.mp3 +0 -0
  68. package/dist/sounds/maximize.ogg +0 -0
  69. package/dist/sounds/open.mp3 +0 -0
  70. package/dist/sounds/open.ogg +0 -0
  71. package/dist/sounds/pluck.mp3 +0 -0
  72. package/dist/sounds/pluck.ogg +0 -0
  73. package/dist/sounds/question.mp3 +0 -0
  74. package/dist/sounds/question.ogg +0 -0
  75. package/dist/sounds/select.mp3 +0 -0
  76. package/dist/sounds/select.ogg +0 -0
  77. package/dist/sw.js +57 -1
  78. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- var cr=Object.defineProperty;var a=(e,t)=>cr(e,"name",{value:t,configurable:!0});import{i as Lt}from"./rolldown-runtime-ZpX3ckPj.js";import{Di as dr,Ei as fr,Ir as mr,Jr as hr,Lr as h,S as ze,U as pr,X as ue,ki as gr,kr as yr,t as S}from"./agent-avatar-url-CiVC72zn.js";import{t as vr}from"./preload-helper-CceJXRIF.js";import{t as wr}from"./boxes-BGSl5NUN.js";import{a as kr,c as xr,d as Ir,g as Rr,i as Sr,l as br,n as Er,o as Cr,p as $r,r as _r,s as Ar,u as Lr}from"./agents-BGdf-J_C.js";import{i as Pr}from"./EmptyState-ClZXiygF.js";var l=Lt(gr(),1),He=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Pt=/^[\\/]{2}/;function Dr(e,t){return t+e.replace(/\\/g,"/")}a(Dr,"normalizeProtocolRelativeUrl");var at="popstate";function ot(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}a(ot,"isLocation");function Mr(e={}){function t(r,o){let i=o.state?.masked,{pathname:s,search:u,hash:c}=i||r.location;return Me("",{pathname:s,search:u,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}a(t,"createBrowserLocation");function n(r,o){return typeof o=="string"?o:V(o)}return a(n,"createBrowserHref"),Or(t,n,null,e)}a(Mr,"createBrowserHistory");function C(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}a(C,"invariant");function D(e,t){if(!e)try{throw new Error(t)}catch{}}a(D,"warning");function Tr(){return Math.random().toString(36).substring(2,10)}a(Tr,"createKey");function it(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(it,"getHistoryState");function Me(e,t,n=null,r,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Z(t):t,state:n,key:t&&t.key||r||Tr(),mask:o}}a(Me,"createLocation");function V({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}a(V,"createPath");function Z(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}a(Z,"parsePath");function Or(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,u="POP",c=null,d=m();d==null&&(d=0,s.replaceState({...s.state,idx:d},""));function m(){return(s.state||{idx:null}).idx}a(m,"getIndex");function f(){u="POP";let p=m(),k=p==null?null:p-d;d=p,c&&c({action:u,location:y.location,delta:k})}a(f,"handlePop");function g(p,k){u="PUSH";let x=ot(p)?p:Me(y.location,p,k);n&&n(x,p),d=m()+1;let I=it(x,d),$=y.createHref(x.mask||x);try{s.pushState(I,"",$)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;o.location.assign($)}i&&c&&c({action:u,location:y.location,delta:1})}a(g,"push");function v(p,k){u="REPLACE";let x=ot(p)?p:Me(y.location,p,k);n&&n(x,p),d=m();let I=it(x,d),$=y.createHref(x.mask||x);s.replaceState(I,"",$),i&&c&&c({action:u,location:y.location,delta:0})}a(v,"replace2");function w(p){return Nr(o,p)}a(w,"createURL");let y={get action(){return u},get location(){return e(o,s)},listen(p){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(at,f),c=p,()=>{o.removeEventListener(at,f),c=null}},createHref(p){return t(o,p)},createURL:w,encodeLocation(p){let k=w(p);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:g,replace:v,go(p){return s.go(p)}};return y}a(Or,"getUrlBasedHistory");function Nr(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),C(r,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:V(t);return o=o.replace(/ $/,"%20"),!n&&Pt.test(o)&&(o=r+o),new URL(o,r)}a(Nr,"createBrowserURLImpl");var Ur;Ur=new WeakMap;function Dt(e,t,n="/"){return Mt(e,t,n,!1)}a(Dt,"matchRoutes");function Mt(e,t,n,r,o){let i=z((typeof t=="string"?Z(t):t).pathname||"/",n);if(i==null)return null;let s=o??Fr(e),u=null,c=Gr(i);for(let d=0;u==null&&d<s.length;++d)u=Yr(s[d],c,r);return u}a(Mt,"matchRoutesImpl");function jr(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],loaderData:t[n.id],handle:n.handle}}a(jr,"convertRouteMatchToUiMatch");function Fr(e){let t=Tt(e);return Br(t),t}a(Fr,"flattenAndRankRoutes");function Tt(e,t=[],n=[],r="",o=!1){let i=a((s,u,c=o,d)=>{let m={relativePath:d===void 0?s.path||"":d,caseSensitive:s.caseSensitive===!0,childrenIndex:u,route:s};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&c)return;C(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let f=U([r,m.relativePath]),g=n.concat(m);s.children&&s.children.length>0&&(C(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),Tt(s.children,t,g,f,c)),!(s.path==null&&!s.index)&&t.push({path:f,score:Kr(f,s.index),routesMeta:g.map((v,w)=>{let[y,p]=Ut(v.relativePath,v.caseSensitive,w===g.length-1);return{...v,matcher:y,compiledParams:p}})})},"flattenRoute");return e.forEach((s,u)=>{if(s.path===""||!s.path?.includes("?"))i(s,u);else for(let c of Ot(s.path))i(s,u,!0,c)}),t}a(Tt,"flattenRoutes");function Ot(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=Ot(r.join("/")),u=[];return u.push(...s.map(c=>c===""?i:[i,c].join("/"))),o&&u.push(...s),u.map(c=>e.startsWith("/")&&c===""?"/":c)}a(Ot,"explodeOptionalSegments");function Br(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Jr(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}a(Br,"rankRouteBranches");var zr=/^:[\w-]+$/,Hr=3,Wr=2,qr=1,Vr=10,Qr=-2,st=a(e=>e==="*","isSplat");function Kr(e,t){let n=e.split("/"),r=n.length;return n.some(st)&&(r+=Qr),t&&(r+=Wr),n.filter(o=>!st(o)).reduce((o,i)=>o+(zr.test(i)?Hr:i===""?qr:Vr),r)}a(Kr,"computeScore");function Jr(e,t){return e.length===t.length&&e.slice(0,-1).every((n,r)=>n===t[r])?e[e.length-1]-t[t.length-1]:0}a(Jr,"compareIndexes");function Yr(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",s=[];for(let u=0;u<r.length;++u){let c=r[u],d=u===r.length-1,m=i==="/"?t:t.slice(i.length)||"/",f={path:c.relativePath,caseSensitive:c.caseSensitive,end:d},g=c.matcher&&c.compiledParams?Nt(f,m,c.matcher,c.compiledParams):ve(f,m),v=c.route;if(!g&&d&&n&&!r[r.length-1].route.index&&(g=ve({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},m)),!g)return null;Object.assign(o,g.params),s.push({params:o,pathname:U([i,g.pathname]),pathnameBase:ea(U([i,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(i=U([i,g.pathnameBase]))}return s}a(Yr,"matchRouteBranch");function ve(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ut(e.path,e.caseSensitive,e.end);return Nt(e,t,n,r)}a(ve,"matchPath");function Nt(e,t,n,r){let o=t.match(n);if(!o)return null;let i=o[0],s=G(i,1),u=o.slice(1);return{params:r.reduce((c,{paramName:d,isOptional:m},f)=>{if(d==="*"){let v=u[f]||"";s=G(i.slice(0,i.length-v.length),1)}const g=u[f];return m&&!g?c[d]=void 0:c[d]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:s,pattern:e}}a(Nt,"matchPathImpl");function Ut(e,t=!1,n=!0){D(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 r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,u,c,d)=>{if(r.push({paramName:s,isOptional:u!=null}),u){let m=d.charAt(c+i.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}a(Ut,"compilePath");function Gr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return D(!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(Gr,"decodePath");function z(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}a(z,"stripBasename");function Xr(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Z(e):e,i;return n?(n=jt(n),n.startsWith("/")||n.startsWith("\\")?i=lt(n.substring(1),"/"):i=lt(n,t)):i=t,{pathname:i,search:ta(r),hash:na(o)}}a(Xr,"resolvePath");function lt(e,t){let n=G(t).split("/");return e.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}a(lt,"resolvePathname");function Ae(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}a(Ae,"getInvalidPathError");function Zr(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}a(Zr,"getPathContributingMatches");function We(e){let t=Zr(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}a(We,"getResolveToMatches");function Ie(e,t,n,r=!1){let o;typeof e=="string"?o=Z(e):(o={...e},C(!o.pathname||!o.pathname.includes("?"),Ae("?","pathname","search",o)),C(!o.pathname||!o.pathname.includes("#"),Ae("#","pathname","hash",o)),C(!o.search||!o.search.includes("#"),Ae("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,u;if(s==null)u=n;else{let f=t.length-1;if(!r&&s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),f-=1;o.pathname=g.join("/")}u=f>=0?t[f]:"/"}let c=Xr(o,u),d=s&&s!=="/"&&s.endsWith("/"),m=(i||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||m)&&(c.pathname+="/"),c}a(Ie,"resolveTo$1");var jt=a(e=>e.replace(/[\\/]{2,}/g,"/"),"removeDoubleSlashes"),U=a(e=>jt(e.join("/")),"joinPaths");function G(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}a(G,"removeTrailingSlash");var ea=a(e=>G(e).replace(/^\/*/,"/"),"normalizePathname"),ta=a(e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,"normalizeSearch"),na=a(e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,"normalizeHash"),ra=class{static{a(this,"ErrorResponseImpl")}constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ft(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}a(Ft,"isRouteErrorResponse");function aa(e){return U(e.map(t=>t.route.path).filter(Boolean))||"/"}a(aa,"getRoutePattern");var Bt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function zt(e,t){let n=e;if(typeof n!="string"||!He.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(Bt)try{let i=new URL(window.location.href),s=Pt.test(n)?new URL(Dr(n,i.protocol)):new URL(n),u=z(s.pathname,t);s.origin===i.origin&&u!=null?n=u+s.search+s.hash:o=!0}catch{D(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}a(zt,"parseToInfo");var rs=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),ut=new URL("http://localhost");function qe(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),ut)}catch{return ut}}a(qe,"getNavigatorCurrentUrl");function Le(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}a(Le,"isSameOrigin");function oa(e,t){if(e.startsWith("//"))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===""||e.slice(n.length).startsWith("//"):!1}a(oa,"isExplicitUrl");function Ve(e,t,n,r){let o=null;try{o=e==null?null:new URL(e,n)}catch{}let i=new URL(t,n),s=o!=null&&!Le(o,n),u=!Le(i,n);if(r==="reject"){if(s||u)throw new Error("External navigation is not allowed")}else if(u&&(o==null||!oa(e,o)||!Le(o,i)))throw new Error("External navigation is not allowed")}a(Ve,"validateNavigationTarget");var Ht=["POST","PUT","PATCH","DELETE"],as=new Set(Ht),ia=["GET",...Ht],os=new Set(ia),sa,la,ua,ca;sa=new WeakMap;la=new WeakMap;ua=new WeakMap;ca=new WeakMap;var da=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function fa(e){try{return da.includes(new URL(e).protocol)}catch{return!1}}a(fa,"hasInvalidProtocol");var ee=l.createContext(null);ee.displayName="DataRouter";var ce=l.createContext(null);ce.displayName="DataRouterState";var Wt=l.createContext(!1);function qt(){return l.useContext(Wt)}a(qt,"useIsRSCRouterContext");var Vt=l.createContext({isTransitioning:!1});Vt.displayName="ViewTransition";var ma=l.createContext(new Map);ma.displayName="Fetchers";var Te=l.createContext(null);Te.displayName="Await";var L=l.createContext(null);L.displayName="Navigation";var te=l.createContext(null);te.displayName="Location";var O=l.createContext({outlet:null,matches:[],isDataRoute:!1});O.displayName="Route";var Qe=l.createContext(null);Qe.displayName="RouteError";var Qt="REACT_ROUTER_ERROR",ha="REDIRECT",pa="ROUTE_ERROR_RESPONSE";function ga(e){if(e.startsWith(`${Qt}:${ha}:{`))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(ga,"decodeRedirectErrorDigest");function ya(e){if(e.startsWith(`${Qt}:${pa}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new ra(t.status,t.statusText,t.data)}catch{}}a(ya,"decodeRouteErrorResponseDigest");function va(e,{relative:t}={}){C(ne(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=l.useContext(L),{hash:o,pathname:i,search:s}=de(e,{relative:t}),u=i;return n!=="/"&&(u=i==="/"?n:U([n,i])),r.createHref({pathname:u,search:s,hash:o})}a(va,"useHref");function ne(){return l.useContext(te)!=null}a(ne,"useInRouterContext");function M(){return C(ne(),"useLocation() may be used only in the context of a <Router> component."),l.useContext(te).location}a(M,"useLocation");function is(){return l.useContext(te).navigationType}a(is,"useNavigationType");var Kt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jt(e){l.useContext(L).static||l.useLayoutEffect(e)}a(Jt,"useIsomorphicLayoutEffect");function Re(){let{isDataRoute:e}=l.useContext(O);return e?Ma():wa()}a(Re,"useNavigate$1");function wa(){C(ne(),"useNavigate() may be used only in the context of a <Router> component.");let e=l.useContext(ee),{basename:t,navigator:n}=l.useContext(L),{matches:r}=l.useContext(O),{pathname:o}=M(),i=JSON.stringify(We(r)),s=l.useRef(!1);return Jt(()=>{s.current=!0}),l.useCallback((u,c={})=>{if(D(s.current,Kt),!s.current)return;if(typeof u=="number"){n.go(u);return}let d=Ie(u,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:U([t,d.pathname])),Ve(typeof u=="string"?u:V(u),n.createHref(d),qe(n),"reject"),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,i,o,e])}a(wa,"useNavigateUnstable");var ka=l.createContext(null);function xa(e){let t=l.useContext(O).outlet;return l.useMemo(()=>t&&l.createElement(ka.Provider,{value:e},t),[t,e])}a(xa,"useOutlet");function Ia(){let{matches:e}=l.useContext(O);return e[e.length-1]?.params??{}}a(Ia,"useParams");function de(e,{relative:t}={}){let{matches:n}=l.useContext(O),{pathname:r}=M(),o=JSON.stringify(We(n));return l.useMemo(()=>Ie(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}a(de,"useResolvedPath");function Ra(e,t){return Yt(e,t)}a(Ra,"useRoutes");function Yt(e,t,n){C(ne(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=l.useContext(L),{matches:o}=l.useContext(O),i=o[o.length-1],s=i?i.params:{},u=i?i.pathname:"/",c=i?i.pathnameBase:"/",d=i&&i.route;{let p=d&&d.path||"";Zt(u,!d||p.endsWith("*")||p.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${p}">) 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 cr=Object.defineProperty;var a=(e,t)=>cr(e,"name",{value:t,configurable:!0});import{i as Lt}from"./rolldown-runtime-ZpX3ckPj.js";import{Ai as dr,Ar as fr,Di as mr,Lr as hr,Oi as pr,Rr as h,S as ze,U as gr,X as ue,Yr as yr,t as S}from"./agent-avatar-url-DzsNQ_N0.js";import{t as vr}from"./preload-helper-CceJXRIF.js";import{t as wr}from"./boxes-EP8QVomc.js";import{a as kr,c as xr,d as Ir,g as Rr,i as Sr,l as br,n as Er,o as Cr,p as $r,r as _r,s as Ar,u as Lr}from"./agents-CmnAqgia.js";import{i as Pr}from"./EmptyState-DkE9QlTq.js";var l=Lt(dr(),1),He=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Pt=/^[\\/]{2}/;function Dr(e,t){return t+e.replace(/\\/g,"/")}a(Dr,"normalizeProtocolRelativeUrl");var at="popstate";function ot(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}a(ot,"isLocation");function Mr(e={}){function t(r,o){let i=o.state?.masked,{pathname:s,search:u,hash:c}=i||r.location;return Me("",{pathname:s,search:u,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}a(t,"createBrowserLocation");function n(r,o){return typeof o=="string"?o:V(o)}return a(n,"createBrowserHref"),Or(t,n,null,e)}a(Mr,"createBrowserHistory");function C(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}a(C,"invariant");function D(e,t){if(!e)try{throw new Error(t)}catch{}}a(D,"warning");function Tr(){return Math.random().toString(36).substring(2,10)}a(Tr,"createKey");function it(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(it,"getHistoryState");function Me(e,t,n=null,r,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Z(t):t,state:n,key:t&&t.key||r||Tr(),mask:o}}a(Me,"createLocation");function V({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}a(V,"createPath");function Z(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}a(Z,"parsePath");function Or(e,t,n,r={}){let{window:o=document.defaultView,v5Compat:i=!1}=r,s=o.history,u="POP",c=null,d=m();d==null&&(d=0,s.replaceState({...s.state,idx:d},""));function m(){return(s.state||{idx:null}).idx}a(m,"getIndex");function f(){u="POP";let p=m(),k=p==null?null:p-d;d=p,c&&c({action:u,location:y.location,delta:k})}a(f,"handlePop");function g(p,k){u="PUSH";let x=ot(p)?p:Me(y.location,p,k);n&&n(x,p),d=m()+1;let I=it(x,d),$=y.createHref(x.mask||x);try{s.pushState(I,"",$)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;o.location.assign($)}i&&c&&c({action:u,location:y.location,delta:1})}a(g,"push");function v(p,k){u="REPLACE";let x=ot(p)?p:Me(y.location,p,k);n&&n(x,p),d=m();let I=it(x,d),$=y.createHref(x.mask||x);s.replaceState(I,"",$),i&&c&&c({action:u,location:y.location,delta:0})}a(v,"replace2");function w(p){return Nr(o,p)}a(w,"createURL");let y={get action(){return u},get location(){return e(o,s)},listen(p){if(c)throw new Error("A history only accepts one active listener");return o.addEventListener(at,f),c=p,()=>{o.removeEventListener(at,f),c=null}},createHref(p){return t(o,p)},createURL:w,encodeLocation(p){let k=w(p);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:g,replace:v,go(p){return s.go(p)}};return y}a(Or,"getUrlBasedHistory");function Nr(e,t,n=!1){let r="http://localhost";e&&(r=e.location.origin!=="null"?e.location.origin:e.location.href),C(r,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:V(t);return o=o.replace(/ $/,"%20"),!n&&Pt.test(o)&&(o=r+o),new URL(o,r)}a(Nr,"createBrowserURLImpl");var Ur;Ur=new WeakMap;function Dt(e,t,n="/"){return Mt(e,t,n,!1)}a(Dt,"matchRoutes");function Mt(e,t,n,r,o){let i=z((typeof t=="string"?Z(t):t).pathname||"/",n);if(i==null)return null;let s=o??Fr(e),u=null,c=Gr(i);for(let d=0;u==null&&d<s.length;++d)u=Yr(s[d],c,r);return u}a(Mt,"matchRoutesImpl");function jr(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],loaderData:t[n.id],handle:n.handle}}a(jr,"convertRouteMatchToUiMatch");function Fr(e){let t=Tt(e);return Br(t),t}a(Fr,"flattenAndRankRoutes");function Tt(e,t=[],n=[],r="",o=!1){let i=a((s,u,c=o,d)=>{let m={relativePath:d===void 0?s.path||"":d,caseSensitive:s.caseSensitive===!0,childrenIndex:u,route:s};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&c)return;C(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let f=U([r,m.relativePath]),g=n.concat(m);s.children&&s.children.length>0&&(C(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),Tt(s.children,t,g,f,c)),!(s.path==null&&!s.index)&&t.push({path:f,score:Kr(f,s.index),routesMeta:g.map((v,w)=>{let[y,p]=Ut(v.relativePath,v.caseSensitive,w===g.length-1);return{...v,matcher:y,compiledParams:p}})})},"flattenRoute");return e.forEach((s,u)=>{if(s.path===""||!s.path?.includes("?"))i(s,u);else for(let c of Ot(s.path))i(s,u,!0,c)}),t}a(Tt,"flattenRoutes");function Ot(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let s=Ot(r.join("/")),u=[];return u.push(...s.map(c=>c===""?i:[i,c].join("/"))),o&&u.push(...s),u.map(c=>e.startsWith("/")&&c===""?"/":c)}a(Ot,"explodeOptionalSegments");function Br(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Jr(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}a(Br,"rankRouteBranches");var zr=/^:[\w-]+$/,Hr=3,Wr=2,qr=1,Vr=10,Qr=-2,st=a(e=>e==="*","isSplat");function Kr(e,t){let n=e.split("/"),r=n.length;return n.some(st)&&(r+=Qr),t&&(r+=Wr),n.filter(o=>!st(o)).reduce((o,i)=>o+(zr.test(i)?Hr:i===""?qr:Vr),r)}a(Kr,"computeScore");function Jr(e,t){return e.length===t.length&&e.slice(0,-1).every((n,r)=>n===t[r])?e[e.length-1]-t[t.length-1]:0}a(Jr,"compareIndexes");function Yr(e,t,n=!1){let{routesMeta:r}=e,o={},i="/",s=[];for(let u=0;u<r.length;++u){let c=r[u],d=u===r.length-1,m=i==="/"?t:t.slice(i.length)||"/",f={path:c.relativePath,caseSensitive:c.caseSensitive,end:d},g=c.matcher&&c.compiledParams?Nt(f,m,c.matcher,c.compiledParams):ve(f,m),v=c.route;if(!g&&d&&n&&!r[r.length-1].route.index&&(g=ve({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},m)),!g)return null;Object.assign(o,g.params),s.push({params:o,pathname:U([i,g.pathname]),pathnameBase:ea(U([i,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(i=U([i,g.pathnameBase]))}return s}a(Yr,"matchRouteBranch");function ve(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ut(e.path,e.caseSensitive,e.end);return Nt(e,t,n,r)}a(ve,"matchPath");function Nt(e,t,n,r){let o=t.match(n);if(!o)return null;let i=o[0],s=G(i,1),u=o.slice(1);return{params:r.reduce((c,{paramName:d,isOptional:m},f)=>{if(d==="*"){let v=u[f]||"";s=G(i.slice(0,i.length-v.length),1)}const g=u[f];return m&&!g?c[d]=void 0:c[d]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:s,pattern:e}}a(Nt,"matchPathImpl");function Ut(e,t=!1,n=!0){D(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 r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,u,c,d)=>{if(r.push({paramName:s,isOptional:u!=null}),u){let m=d.charAt(c+i.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}a(Ut,"compilePath");function Gr(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return D(!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(Gr,"decodePath");function z(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}a(z,"stripBasename");function Xr(e,t="/"){let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Z(e):e,i;return n?(n=jt(n),n.startsWith("/")||n.startsWith("\\")?i=lt(n.substring(1),"/"):i=lt(n,t)):i=t,{pathname:i,search:ta(r),hash:na(o)}}a(Xr,"resolvePath");function lt(e,t){let n=G(t).split("/");return e.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}a(lt,"resolvePathname");function Ae(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}a(Ae,"getInvalidPathError");function Zr(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}a(Zr,"getPathContributingMatches");function We(e){let t=Zr(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}a(We,"getResolveToMatches");function Ie(e,t,n,r=!1){let o;typeof e=="string"?o=Z(e):(o={...e},C(!o.pathname||!o.pathname.includes("?"),Ae("?","pathname","search",o)),C(!o.pathname||!o.pathname.includes("#"),Ae("#","pathname","hash",o)),C(!o.search||!o.search.includes("#"),Ae("#","search","hash",o)));let i=e===""||o.pathname==="",s=i?"/":o.pathname,u;if(s==null)u=n;else{let f=t.length-1;if(!r&&s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),f-=1;o.pathname=g.join("/")}u=f>=0?t[f]:"/"}let c=Xr(o,u),d=s&&s!=="/"&&s.endsWith("/"),m=(i||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(d||m)&&(c.pathname+="/"),c}a(Ie,"resolveTo$1");var jt=a(e=>e.replace(/[\\/]{2,}/g,"/"),"removeDoubleSlashes"),U=a(e=>jt(e.join("/")),"joinPaths");function G(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}a(G,"removeTrailingSlash");var ea=a(e=>G(e).replace(/^\/*/,"/"),"normalizePathname"),ta=a(e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,"normalizeSearch"),na=a(e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,"normalizeHash"),ra=class{static{a(this,"ErrorResponseImpl")}constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ft(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}a(Ft,"isRouteErrorResponse");function aa(e){return U(e.map(t=>t.route.path).filter(Boolean))||"/"}a(aa,"getRoutePattern");var Bt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function zt(e,t){let n=e;if(typeof n!="string"||!He.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,o=!1;if(Bt)try{let i=new URL(window.location.href),s=Pt.test(n)?new URL(Dr(n,i.protocol)):new URL(n),u=z(s.pathname,t);s.origin===i.origin&&u!=null?n=u+s.search+s.hash:o=!0}catch{D(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:n}}a(zt,"parseToInfo");var rs=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),ut=new URL("http://localhost");function qe(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),ut)}catch{return ut}}a(qe,"getNavigatorCurrentUrl");function Le(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}a(Le,"isSameOrigin");function oa(e,t){if(e.startsWith("//"))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===""||e.slice(n.length).startsWith("//"):!1}a(oa,"isExplicitUrl");function Ve(e,t,n,r){let o=null;try{o=e==null?null:new URL(e,n)}catch{}let i=new URL(t,n),s=o!=null&&!Le(o,n),u=!Le(i,n);if(r==="reject"){if(s||u)throw new Error("External navigation is not allowed")}else if(u&&(o==null||!oa(e,o)||!Le(o,i)))throw new Error("External navigation is not allowed")}a(Ve,"validateNavigationTarget");var Ht=["POST","PUT","PATCH","DELETE"],as=new Set(Ht),ia=["GET",...Ht],os=new Set(ia),sa,la,ua,ca;sa=new WeakMap;la=new WeakMap;ua=new WeakMap;ca=new WeakMap;var da=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function fa(e){try{return da.includes(new URL(e).protocol)}catch{return!1}}a(fa,"hasInvalidProtocol");var ee=l.createContext(null);ee.displayName="DataRouter";var ce=l.createContext(null);ce.displayName="DataRouterState";var Wt=l.createContext(!1);function qt(){return l.useContext(Wt)}a(qt,"useIsRSCRouterContext");var Vt=l.createContext({isTransitioning:!1});Vt.displayName="ViewTransition";var ma=l.createContext(new Map);ma.displayName="Fetchers";var Te=l.createContext(null);Te.displayName="Await";var L=l.createContext(null);L.displayName="Navigation";var te=l.createContext(null);te.displayName="Location";var O=l.createContext({outlet:null,matches:[],isDataRoute:!1});O.displayName="Route";var Qe=l.createContext(null);Qe.displayName="RouteError";var Qt="REACT_ROUTER_ERROR",ha="REDIRECT",pa="ROUTE_ERROR_RESPONSE";function ga(e){if(e.startsWith(`${Qt}:${ha}:{`))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(ga,"decodeRedirectErrorDigest");function ya(e){if(e.startsWith(`${Qt}:${pa}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new ra(t.status,t.statusText,t.data)}catch{}}a(ya,"decodeRouteErrorResponseDigest");function va(e,{relative:t}={}){C(ne(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=l.useContext(L),{hash:o,pathname:i,search:s}=de(e,{relative:t}),u=i;return n!=="/"&&(u=i==="/"?n:U([n,i])),r.createHref({pathname:u,search:s,hash:o})}a(va,"useHref");function ne(){return l.useContext(te)!=null}a(ne,"useInRouterContext");function M(){return C(ne(),"useLocation() may be used only in the context of a <Router> component."),l.useContext(te).location}a(M,"useLocation");function is(){return l.useContext(te).navigationType}a(is,"useNavigationType");var Kt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jt(e){l.useContext(L).static||l.useLayoutEffect(e)}a(Jt,"useIsomorphicLayoutEffect");function Re(){let{isDataRoute:e}=l.useContext(O);return e?Ma():wa()}a(Re,"useNavigate$1");function wa(){C(ne(),"useNavigate() may be used only in the context of a <Router> component.");let e=l.useContext(ee),{basename:t,navigator:n}=l.useContext(L),{matches:r}=l.useContext(O),{pathname:o}=M(),i=JSON.stringify(We(r)),s=l.useRef(!1);return Jt(()=>{s.current=!0}),l.useCallback((u,c={})=>{if(D(s.current,Kt),!s.current)return;if(typeof u=="number"){n.go(u);return}let d=Ie(u,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:U([t,d.pathname])),Ve(typeof u=="string"?u:V(u),n.createHref(d),qe(n),"reject"),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,i,o,e])}a(wa,"useNavigateUnstable");var ka=l.createContext(null);function xa(e){let t=l.useContext(O).outlet;return l.useMemo(()=>t&&l.createElement(ka.Provider,{value:e},t),[t,e])}a(xa,"useOutlet");function Ia(){let{matches:e}=l.useContext(O);return e[e.length-1]?.params??{}}a(Ia,"useParams");function de(e,{relative:t}={}){let{matches:n}=l.useContext(O),{pathname:r}=M(),o=JSON.stringify(We(n));return l.useMemo(()=>Ie(e,JSON.parse(o),r,t==="path"),[e,o,r,t])}a(de,"useResolvedPath");function Ra(e,t){return Yt(e,t)}a(Ra,"useRoutes");function Yt(e,t,n){C(ne(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=l.useContext(L),{matches:o}=l.useContext(O),i=o[o.length-1],s=i?i.params:{},u=i?i.pathname:"/",c=i?i.pathnameBase:"/",d=i&&i.route;{let p=d&&d.path||"";Zt(u,!d||p.endsWith("*")||p.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${p}">) 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="${p}"> to <Route path="${p==="/"?"*":`${p}/*`}">.`)}let m=M(),f;if(t){let p=typeof t=="string"?Z(t):t;C(c==="/"||p.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 "${p.pathname}" was given in the \`location\` prop.`),f=p}else f=m;let g=f.pathname||"/",v=g;if(c!=="/"){let p=c.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(p.length).join("/")}let w=n&&n.state.matches.length?n.state.matches.map(p=>Object.assign(p,{route:n.manifest[p.route.id]||p.route})):Dt(e,{pathname:v});D(d||w!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),D(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.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=$a(w&&w.map(p=>Object.assign({},p,{params:Object.assign({},s,p.params),pathname:U([c,r.encodeLocation?r.encodeLocation(p.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathname]),pathnameBase:p.pathnameBase==="/"?c:U([c,r.encodeLocation?r.encodeLocation(p.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:p.pathnameBase])})),o,n);return t&&y?l.createElement(te.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...f},navigationType:"POP"}},y):y}a(Yt,"useRoutesImpl");function Sa(){let e=Da(),t=Ft(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return s=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:i},"ErrorBoundary")," or"," ",l.createElement("code",{style:i},"errorElement")," prop on your route.")),l.createElement(l.Fragment,null,l.createElement("h2",null,"Unexpected Application Error!"),l.createElement("h3",{style:{fontStyle:"italic"}},t),n?l.createElement("pre",{style:o},n):null,s)}a(Sa,"DefaultErrorComponent");var ba=l.createElement(Sa,null),Gt=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 n=ya(e.digest);n&&(e=n)}let t=e!==void 0?l.createElement(O.Provider,{value:this.props.routeContext},l.createElement(Qe.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?l.createElement(Ea,{error:e},t):t}};Gt.contextType=Wt;var Pe=new WeakMap;function Ea({children:e,error:t}){let{basename:n,navigator:r}=l.useContext(L);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=ga(t.digest);if(o){let i=Pe.get(t);if(i)throw i;let s=zt(o.location,n),u=s.absoluteURL||s.to;if(Ve(o.location,u,qe(r),"allow-explicit"),fa(u))throw new Error("Invalid redirect location");if(Bt&&!Pe.get(t))if(s.isExternal||o.reloadDocument)window.location.href=u;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:o.replace}));throw Pe.set(t,c),c}return l.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u}`})}}return e}a(Ea,"RSCErrorHandler");function Ca({routeContext:e,match:t,children:n}){let r=l.useContext(ee);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),l.createElement(O.Provider,{value:e},n)}a(Ca,"RenderedRoute");function $a(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r?.errors;if(i!=null){let m=o.findIndex(f=>f.route.id&&i?.[f.route.id]!==void 0);C(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,m+1))}let s=!1,u=-1;if(n&&r){s=r.renderFallback;for(let m=0;m<o.length;m++){let f=o[m];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=m),f.route.id){let{loaderData:g,errors:v}=r,w=f.route.loader&&!g.hasOwnProperty(f.route.id)&&(!v||v[f.route.id]===void 0);if(f.route.lazy||w){n.isStatic&&(s=!0),u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}}let c=n?.onError,d=r&&c?(m,f)=>{c(m,{location:r.location,params:r.matches?.[0]?.params??{},pattern:aa(r.matches),errorInfo:f})}:void 0;return o.reduceRight((m,f,g)=>{let v,w=!1,y=null,p=null;r&&(v=i&&f.route.id?i[f.route.id]:void 0,y=f.route.errorElement||ba,s&&(u<0&&g===0?(Zt("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,p=null):u===g&&(w=!0,p=f.route.hydrateFallbackElement||null)));let k=t.concat(o.slice(0,g+1)),x=a(()=>{let I;return v?I=y:w?I=p:f.route.Component?I=l.createElement(f.route.Component,null):f.route.element?I=f.route.element:I=m,l.createElement(Ca,{match:f,routeContext:{outlet:m,matches:k,isDataRoute:r!=null},children:I})},"getChildren");return r&&(f.route.ErrorBoundary||f.route.errorElement||g===0)?l.createElement(Gt,{location:r.location,revalidation:r.revalidation,component:y,error:v,children:x(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:d}):x()},null)}a($a,"_renderMatches");function Ke(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}a(Ke,"getDataRouterConsoleError");function _a(e){let t=l.useContext(ee);return C(t,Ke(e)),t}a(_a,"useDataRouterContext");function Je(e){let t=l.useContext(ce);return C(t,Ke(e)),t}a(Je,"useDataRouterState");function Aa(e){let t=l.useContext(O);return C(t,Ke(e)),t}a(Aa,"useRouteContext");function Ye(e){let t=Aa(e),n=t.matches[t.matches.length-1];return C(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}a(Ye,"useCurrentRouteId");function La(){return Ye("useRouteId")}a(La,"useRouteId");function Pa(){let e=Je("useNavigation");return l.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}a(Pa,"useNavigation");function Xt(){let{matches:e,loaderData:t}=Je("useMatches");return l.useMemo(()=>e.map(n=>jr(n,t)),[e,t])}a(Xt,"useMatches");function Da(){let e=l.useContext(Qe),t=Je("useRouteError"),n=Ye("useRouteError");return e!==void 0?e:t.errors?.[n]}a(Da,"useRouteError");function Ma(){let{router:e}=_a("useNavigate"),t=Ye("useNavigate"),n=l.useRef(!1);return Jt(()=>{n.current=!0}),l.useCallback(async(r,o={})=>{D(n.current,Kt),n.current&&(typeof r=="number"?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))},[e,t])}a(Ma,"useNavigateStable");var ct={};function Zt(e,t,n){!t&&!ct[e]&&(ct[e]=!0,D(!1,n))}a(Zt,"warningOnce");var dt={};function Ta(e,t){!e&&!dt[t]&&(dt[t]=!0)}a(Ta,"warnOnce");var ss=l.memo(Oa);function Oa({routes:e,manifest:t,future:n,state:r,isStatic:o,onError:i}){return Yt(e,void 0,{manifest:t,state:r,isStatic:o,onError:i,future:n})}a(Oa,"DataRoutes2");function Na({to:e,replace:t,state:n,relative:r}){C(ne(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o,navigator:i}=l.useContext(L);D(!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:s}=l.useContext(O),{pathname:u}=M(),c=Re(),d=Ie(e,We(s),u,r==="path");Ve(typeof e=="string"?e:V(e),i.createHref(d),qe(i),"reject");let m=JSON.stringify(d);return l.useEffect(()=>{c(JSON.parse(m),{replace:t,state:n,relative:r})},[c,m,r,t,n]),null}a(Na,"Navigate$1");function ls(e){return xa(e.context)}a(ls,"Outlet");function Ua(e){C(!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(Ua,"Route");function en({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1,useTransitions:s}){C(!ne(),"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:i,useTransitions:s,future:{}}),[u,o,i,s]);typeof n=="string"&&(n=Z(n));let{pathname:d="/",search:m="",hash:f="",state:g=null,key:v="default",mask:w}=n,y=l.useMemo(()=>{let p=z(d,u);return p==null?null:{location:{pathname:p,search:m,hash:f,state:g,key:v,mask:w},navigationType:r}},[u,d,m,f,g,v,r,w]);return D(y!=null,`<Router basename="${u}"> is not able to match the URL "${d}${m}${f}" because it does not start with the basename, so the <Router> won't render anything.`),y==null?null:l.createElement(L.Provider,{value:c},l.createElement(te.Provider,{children:t,value:y}))}a(en,"Router");function us({children:e,location:t}){return Ra(Oe(e),t)}a(us,"Routes");var cs=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:n}=this.props,r=null,o=0;if(!(n instanceof Promise))o=1,r=Promise.resolve(),Object.defineProperty(r,"_tracked",{get:a(()=>!0,"get")}),Object.defineProperty(r,"_data",{get:a(()=>n,"get")});else if(this.state.error){o=2;let i=this.state.error;r=Promise.reject().catch(()=>{}),Object.defineProperty(r,"_tracked",{get:a(()=>!0,"get")}),Object.defineProperty(r,"_error",{get:a(()=>i,"get")})}else n._tracked?(r=n,o="_error"in r?2:"_data"in r?1:0):(o=0,Object.defineProperty(n,"_tracked",{get:a(()=>!0,"get")}),r=n.then(i=>Object.defineProperty(n,"_data",{get:a(()=>i,"get")}),i=>{this.props.onError?.(i),Object.defineProperty(n,"_error",{get:a(()=>i,"get")})}));if(o===2&&!t)throw r._error;if(o===2)return l.createElement(Te.Provider,{value:r,children:t});if(o===1)return l.createElement(Te.Provider,{value:r,children:e});throw r}};function Oe(e,t=[]){let n=[];return l.Children.forEach(e,(r,o)=>{if(!l.isValidElement(r))return;let i=[...t,o];if(r.type===l.Fragment){n.push.apply(n,Oe(r.props.children,i));return}C(r.type===Ua,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),C(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Oe(r.props.children,i)),n.push(s)}),n}a(Oe,"createRoutesFromChildren");var ge="get",ye="application/x-www-form-urlencoded";function Se(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}a(Se,"isHtmlElement");function ja(e){return Se(e)&&e.tagName.toLowerCase()==="button"}a(ja,"isButtonElement");function Fa(e){return Se(e)&&e.tagName.toLowerCase()==="form"}a(Fa,"isFormElement");function Ba(e){return Se(e)&&e.tagName.toLowerCase()==="input"}a(Ba,"isInputElement");function za(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}a(za,"isModifiedEvent");function Ha(e,t){return e.button===0&&(!t||t==="_self")&&!za(e)}a(Ha,"shouldProcessLinkClick");function Ne(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(o=>[n,o]):[[n,r]])},[]))}a(Ne,"createSearchParams");function Wa(e,t){let n=Ne(e);return t&&t.forEach((r,o)=>{n.has(o)||t.getAll(o).forEach(i=>{n.append(o,i)})}),n}a(Wa,"getSearchParamsForLocation");var he=null;function qa(){if(he===null)try{new FormData(document.createElement("form"),0),he=!1}catch{he=!0}return he}a(qa,"isFormDataSubmitterSupported");var Va=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function De(e){return e!=null&&!Va.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ye}"`),null):e}a(De,"getFormEncType");function Qa(e,t){let n,r,o,i,s;if(Fa(e)){let u=e.getAttribute("action");r=u?z(u,t):null,n=e.getAttribute("method")||ge,o=De(e.getAttribute("enctype"))||ye,i=new FormData(e)}else if(ja(e)||Ba(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(r=c?z(c,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||ge,o=De(e.getAttribute("formenctype"))||De(u.getAttribute("enctype"))||ye,i=new FormData(u,e),!qa()){let{name:d,type:m,value:f}=e;if(m==="image"){let g=d?`${d}.`:"";i.append(`${g}x`,"0"),i.append(`${g}y`,"0")}else d&&i.append(d,f)}}else{if(Se(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ge,r=null,o=ye,s=e}return i&&o==="text/plain"&&(s=i,i=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:i,body:s}}a(Qa,"getFormSubmissionInfo");var ds=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),Ka={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Ja=/[&><\u2028\u2029]/g;function ft(e){return e.replace(Ja,t=>Ka[t])}a(ft,"escapeHtml");function be(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}a(be,"invariant2");function tn(e,t,n,r){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:t&&z(o.pathname,t)==="/"?o.pathname=`${G(t)}/_root.${r}`:o.pathname=`${G(o.pathname)}.${r}`,o}a(tn,"singleFetchUrl");async function Ya(e,t){if(e.id in t)return t[e.id];try{let n=await vr(()=>import(e.module),[]);return t[e.id]=n,n}catch{return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}a(Ya,"loadRouteModule");function Ga(e){return e!=null&&typeof e.page=="string"}a(Ga,"isPageLinkDescriptor");function Xa(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(Xa,"isHtmlLinkDescriptor");async function Za(e,t,n){return no((await Promise.all(e.map(async r=>{let o=t.routes[r.route.id];if(o){let i=await Ya(o,n);return i.links?i.links():[]}return[]}))).flat(1).filter(Xa).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}a(Za,"getKeyedPrefetchLinks");function mt(e,t,n,r,o,i){let s=a((c,d)=>n[d]?c.route.id!==n[d].route.id:!0,"isNew"),u=a((c,d)=>n[d].pathname!==c.pathname||n[d].route.path?.endsWith("*")&&n[d].params["*"]!==c.params["*"],"matchPathChanged");return i==="assets"?t.filter((c,d)=>s(c,d)||u(c,d)):i==="data"?t.filter((c,d)=>{let m=r.routes[c.route.id];if(!m||!m.hasLoader)return!1;if(s(c,d)||u(c,d))return!0;if(c.route.shouldRevalidate){let f=c.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}a(mt,"getNewMatchesForLinks");function nn(e,t,{includeHydrateFallback:n}={}){return eo(e.map(r=>{let o=t.routes[r.route.id];if(!o)return[];let i=[o.module];return o.clientActionModule&&(i=i.concat(o.clientActionModule)),o.clientLoaderModule&&(i=i.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(i=i.concat(o.hydrateFallbackModule)),o.imports&&(i=i.concat(o.imports)),i}).flat(1))}a(nn,"getModuleLinkHrefs");function eo(e){return[...new Set(e)]}a(eo,"dedupeHrefs");function to(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}a(to,"sortKeys");function no(e,t){let n=new Set,r=new Set(t);return e.reduce((o,i)=>{if(t&&!Ga(i)&&i.as==="script"&&i.href&&r.has(i.href))return o;let s=JSON.stringify(to(i));return n.has(s)||(n.add(s),o.push({key:s,link:i})),o},[])}a(no,"dedupeLinkDescriptors");function ro(e,t){return e.mode==="lazy"&&t===!0}a(ro,"isFogOfWarEnabled");function ao({sri:e,...t},n){let r=new Set(n.state.matches.map(u=>u.route.id)),o=n.state.location.pathname.split("/").filter(Boolean),i=["/"];for(o.pop();o.length>0;)i.push(`/${o.join("/")}`),o.pop();i.forEach(u=>{let c=Mt(n.routes,u,n.basename||"/",!1,n.branches);c&&c.forEach(d=>r.add(d.route.id))});let s=[...r].reduce((u,c)=>Object.assign(u,{[c]:t.routes[c]}),{});return{...t,routes:s,sri:e?!0:void 0}}a(ao,"getPartialManifest");function Ee(){let e=l.useContext(ee);return be(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}a(Ee,"useDataRouterContext2");function rn(){let e=l.useContext(ce);return be(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}a(rn,"useDataRouterStateContext");var Ce=l.createContext(void 0);Ce.displayName="FrameworkContext";function Q(){let e=l.useContext(Ce);return be(e,"You must render this element inside a <HydratedRouter> element"),e}a(Q,"useFrameworkContext");function oo(e,t){let n=l.useContext(Ce),[r,o]=l.useState(!1),[i,s]=l.useState(!1),{onFocus:u,onBlur:c,onMouseEnter:d,onMouseLeave:m,onTouchStart:f}=t,g=l.useRef(null);l.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let y=a(k=>{k.forEach(x=>{s(x.isIntersecting)})},"callback"),p=new IntersectionObserver(y,{threshold:.5});return g.current&&p.observe(g.current),()=>{p.disconnect()}}},[e]),l.useEffect(()=>{if(r){let y=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(y)}}},[r]);let v=a(()=>{o(!0)},"setIntent"),w=a(()=>{o(!1),s(!1)},"cancelIntent");return n?e!=="intent"?[i,g,{}]:[i,g,{onFocus:oe(u,v),onBlur:oe(c,w),onMouseEnter:oe(d,v),onMouseLeave:oe(m,w),onTouchStart:oe(f,v)}]:[!1,g,{}]}a(oo,"usePrefetchBehavior");function oe(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}a(oe,"composeEventHandlers");function io(e,t,n){if(n&&!we)return[e[0]];if(t){let r=e.findIndex(o=>t[o.route.id]!==void 0);return e.slice(0,r+1)}return e}a(io,"getActiveMatches");function so({page:e,...t}){let n=qt(),{nonce:r}=Q(),{router:o}=Ee(),i=l.useMemo(()=>Dt(o.routes,e,o.basename),[o.routes,e,o.basename]);return i?(t.nonce==null&&r&&(t={...t,nonce:r}),n?l.createElement(uo,{page:e,matches:i,...t}):l.createElement(co,{page:e,matches:i,...t})):null}a(so,"PrefetchPageLinks");function lo(e){let{manifest:t,routeModules:n}=Q(),[r,o]=l.useState([]);return l.useEffect(()=>{let i=!1;return Za(e,t,n).then(s=>{i||o(s)}),()=>{i=!0}},[e,t,n]),r}a(lo,"useKeyedPrefetchLinks");function uo({page:e,matches:t,...n}){let r=M(),{future:o}=Q(),{basename:i}=Ee(),s=l.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let u=tn(e,i,o.v8_trailingSlashAwareDataRequests,"rsc"),c=!1,d=[];for(let m of t)typeof m.route.shouldRevalidate=="function"?c=!0:d.push(m.route.id);return c&&d.length>0&&u.searchParams.set("_routes",d.join(",")),[u.pathname+u.search]},[i,o.v8_trailingSlashAwareDataRequests,e,r,t]);return l.createElement(l.Fragment,null,s.map(u=>l.createElement("link",{key:u,rel:"prefetch",as:"fetch",href:u,...n})))}a(uo,"RSCPrefetchPageLinksImpl");function co({page:e,matches:t,...n}){let r=M(),{future:o,manifest:i,routeModules:s}=Q(),{basename:u}=Ee(),{loaderData:c,matches:d}=rn(),m=l.useMemo(()=>mt(e,t,d,i,r,"data"),[e,t,d,i,r]),f=l.useMemo(()=>mt(e,t,d,i,r,"assets"),[e,t,d,i,r]),g=l.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let y=new Set,p=!1;if(t.forEach(x=>{let I=i.routes[x.route.id];!I||!I.hasLoader||(!m.some($=>$.route.id===x.route.id)&&x.route.id in c&&s[x.route.id]?.shouldRevalidate||I.hasClientLoader?p=!0:y.add(x.route.id))}),y.size===0)return[];let k=tn(e,u,o.v8_trailingSlashAwareDataRequests,"data");return p&&y.size>0&&k.searchParams.set("_routes",t.filter(x=>y.has(x.route.id)).map(x=>x.route.id).join(",")),[k.pathname+k.search]},[u,o.v8_trailingSlashAwareDataRequests,c,r,i,m,t,e,s]),v=l.useMemo(()=>nn(f,i),[f,i]),w=lo(f);return l.createElement(l.Fragment,null,g.map(y=>l.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...n})),v.map(y=>l.createElement("link",{key:y,rel:"modulepreload",href:y,...n})),w.map(({key:y,link:p})=>l.createElement("link",{key:y,nonce:n.nonce,...p,crossOrigin:p.crossOrigin??n.crossOrigin})))}a(co,"PrefetchPageLinksImpl");var we=!1;function fo(){we=!0}a(fo,"setIsHydrated");function mo(e){let{manifest:t,serverHandoffString:n,isSpaMode:r,renderMeta:o,routeDiscovery:i,ssr:s,nonce:u}=Q(),{router:c,static:d,staticContext:m}=Ee(),{matches:f}=rn(),g=qt(),v=ro(i,s);e.nonce==null&&u&&(e={...e,nonce:u}),o&&(o.didRenderScripts=!0);let w=io(f,null,r);l.useEffect(()=>{fo()},[]);let y=l.useMemo(()=>{if(g)return null;let x=m?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",I=d?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${v?"":`import ${JSON.stringify(t.url)}`};
4
4
  ${w.map(($,b)=>{let _=`route${b}`,P=t.routes[$.route.id];be(P,`Route ${$.route.id} not found in manifest`);let{clientActionModule:N,clientLoaderModule:A,clientMiddlewareModule:j,hydrateFallbackModule:K,module:T}=P,H=[...N?[{module:N,varName:`${_}_clientAction`}]:[],...A?[{module:A,varName:`${_}_clientLoader`}]:[],...j?[{module:j,varName:`${_}_clientMiddleware`}]:[],...K?[{module:K,varName:`${_}_HydrateFallback`}]:[],{module:T,varName:`${_}_main`}];return H.length===1?`import * as ${_} from ${JSON.stringify(T)};`:[H.map(F=>`import * as ${F.varName} from "${F.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(Ft(e))return l.createElement(ht,{title:"Unhandled Thrown Response!"},l.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let o;if(e instanceof Error)o=e;else{let i=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);o=new Error(i)}return l.createElement(ht,{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),r)}a(po,"RemixRootDefaultErrorBoundary");function ht({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:o}=Q();return o.root?.Layout&&!n?r: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"}},r,t?l.createElement(mo,null):null)))}a(ht,"BoundaryShell");var go=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{go&&(window.__reactRouterVersion="7.18.4")}catch{}function ms({basename:e,children:t,useTransitions:n,window:r}){let o=l.useRef();o.current==null&&(o.current=Mr({window:r,v5Compat:!0}));let i=o.current,[s,u]=l.useState({action:i.action,location:i.location}),c=l.useCallback(d=>{n===!1?u(d):l.startTransition(()=>u(d))},[n]);return l.useLayoutEffect(()=>i.listen(c),[i,c]),l.createElement(en,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,useTransitions:n})}a(ms,"BrowserRouter");function yo({basename:e,children:t,history:n,useTransitions:r}){let[o,i]=l.useState({action:n.action,location:n.location}),s=l.useCallback(u=>{r===!1?i(u):l.startTransition(()=>i(u))},[r]);return l.useLayoutEffect(()=>n.listen(s),[n,s]),l.createElement(en,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:n,useTransitions:r})}a(yo,"HistoryRouter");yo.displayName="unstable_HistoryRouter";var fe=l.forwardRef(a(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:s,mask:u,state:c,target:d,to:m,preventScrollReset:f,viewTransition:g,defaultShouldRevalidate:v,...w},y){let{basename:p,navigator:k,useTransitions:x}=l.useContext(L),I=typeof m=="string"&&He.test(m),$=zt(m,p);m=$.to;let b=va(m,{relative:o}),_=M(),P=null;if(u){let B=Ie(u,[],_.mask?_.mask.pathname:"/",!0);p!=="/"&&(B.pathname=B.pathname==="/"?p:U([p,B.pathname])),P=k.createHref(B)}let[N,A,j]=oo(r,w),K=xo(m,{replace:s,mask:u,state:c,target:d,preventScrollReset:f,relative:o,viewTransition:g,defaultShouldRevalidate:v,useTransitions:x});function T(B){t&&t(B),B.defaultPrevented||K(B)}a(T,"handleClick");let H=!($.isExternal||i),F=l.createElement("a",{...w,...j,href:(H?P:void 0)||$.absoluteURL||b,onClick:H?T:t,ref:ho(y,A),target:d,"data-discover":!I&&n==="render"?"true":void 0});return N&&!I?l.createElement(l.Fragment,null,F,l.createElement(so,{page:b})):F},"LinkWithRef"));fe.displayName="Link";var an=l.forwardRef(a(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:s,viewTransition:u,children:c,...d},m){let f=de(s,{relative:d.relative}),g=M(),v=l.useContext(ce),{navigator:w,basename:y}=l.useContext(L),p=v!=null&&$o(f)&&u===!0,k=w.encodeLocation?w.encodeLocation(f).pathname:f.pathname,x=g.pathname,I=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(x=x.toLowerCase(),I=I?I.toLowerCase():null,k=k.toLowerCase()),I&&y&&(I=z(I,y)||I);const $=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let b=x===k||!o&&x.startsWith(k)&&x.charAt($)==="/",_=I!=null&&(I===k||!o&&I.startsWith(k)&&I.charAt(k.length)==="/"),P={isActive:b,isPending:_,isTransitioning:p},N=b?t:void 0,A;typeof r=="function"?A=r(P):A=[r,b?"active":null,_?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let j=typeof i=="function"?i(P):i;return l.createElement(fe,{...d,"aria-current":N,className:A,ref:m,style:j,to:s,viewTransition:u},typeof c=="function"?c(P):c)},"NavLinkWithRef"));an.displayName="NavLink";var vo=l.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:s=ge,action:u,onSubmit:c,relative:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g,...v},w)=>{let{useTransitions:y}=l.useContext(L),p=So(),k=bo(u,{relative:d}),x=s.toLowerCase()==="get"?"get":"post",I=typeof u=="string"&&He.test(u),$=a(b=>{if(c&&c(b),b.defaultPrevented)return;b.preventDefault();let _=b.nativeEvent.submitter,P=_?.getAttribute("formmethod")||s,N=a(()=>p(_||b.currentTarget,{fetcherKey:t,method:P,navigate:n,replace:o,state:i,relative:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g}),"doSubmit");y&&n!==!1?l.startTransition(()=>N()):N()},"submitHandler");return l.createElement("form",{ref:w,method:x,action:k,onSubmit:r?c:$,...v,"data-discover":!I&&e==="render"?"true":void 0})});vo.displayName="Form";function wo({getKey:e,storageKey:t,...n}){let r=l.useContext(Ce),{basename:o}=l.useContext(L),i=M(),s=Xt();Eo({getKey:e,storageKey:t});let u=l.useMemo(()=>{if(!r||!e)return null;let d=je(i,s,o,e);return d!==i.key?d:null},[]);if(!r||r.isSpaMode)return null;let c=((d,m)=>{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(d)||"{}")[m||window.history.state.key];typeof f=="number"&&window.scrollTo(0,f)}catch{sessionStorage.removeItem(d)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),l.createElement("script",{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${ft(JSON.stringify(t||Ue))}, ${ft(JSON.stringify(u))})`}})}a(wo,"ScrollRestoration");wo.displayName="ScrollRestoration";function on(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}a(on,"getDataRouterConsoleError2");function Ge(e){let t=l.useContext(ee);return C(t,on(e)),t}a(Ge,"useDataRouterContext3");function ko(e){let t=l.useContext(ce);return C(t,on(e)),t}a(ko,"useDataRouterState2");function xo(e,{target:t,replace:n,mask:r,state:o,preventScrollReset:i,relative:s,viewTransition:u,defaultShouldRevalidate:c,useTransitions:d}={}){let m=Re(),f=M(),g=de(e,{relative:s});return l.useCallback(v=>{if(Ha(v,t)){v.preventDefault();let w=n!==void 0?n:V(f)===V(g),y=a(()=>m(e,{replace:w,mask:r,state:o,preventScrollReset:i,relative:s,viewTransition:u,defaultShouldRevalidate:c}),"doNavigate");d?l.startTransition(()=>y()):y()}},[f,m,g,n,r,o,t,e,i,s,u,c,d])}a(xo,"useLinkClickHandler");function hs(e){D(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)),n=l.useRef(!1),r=M(),o=l.useMemo(()=>Wa(r.search,n.current?null:t.current),[r.search]),i=Re();return[o,l.useCallback((s,u)=>{const c=Ne(typeof s=="function"?s(new URLSearchParams(o)):s);n.current=!0,i("?"+c,u)},[i,o])]}a(hs,"useSearchParams");var Io=0,Ro=a(()=>`__${String(++Io)}__`,"getUniqueFetcherId");function So(){let{router:e}=Ge("useSubmit"),{basename:t}=l.useContext(L),n=La(),r=e.fetch,o=e.navigate;return l.useCallback(async(i,s={})=>{let{action:u,method:c,encType:d,formData:m,body:f}=Qa(i,t);if(s.navigate===!1){let g=s.fetcherKey||Ro();await r(g,n,s.action||u,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:m,body:f,formMethod:s.method||c,formEncType:s.encType||d,flushSync:s.flushSync})}else await o(s.action||u,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:m,body:f,formMethod:s.method||c,formEncType:s.encType||d,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,o,t,n])}a(So,"useSubmit");function bo(e,{relative:t}={}){let{basename:n}=l.useContext(L),r=l.useContext(O);C(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...de(e||".",{relative:t})},s=M();if(e==null){i.search=s.search;let u=new URLSearchParams(i.search),c=u.getAll("index");if(c.some(d=>d==="")){u.delete("index"),c.filter(m=>m).forEach(m=>u.append("index",m));let d=u.toString();i.search=d?`?${d}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:U([n,i.pathname])),V(i)}a(bo,"useFormAction");var Ue="react-router-scroll-positions",pe={};function je(e,t,n,r){let o=null;return r&&(n!=="/"?o=r({...e,pathname:z(e.pathname,n)||e.pathname},t):o=r(e,t)),o==null&&(o=e.key),o}a(je,"getScrollRestorationKey");function Eo({getKey:e,storageKey:t}={}){let{router:n}=Ge("useScrollRestoration"),{restoreScrollPosition:r,preventScrollReset:o}=ko("useScrollRestoration"),{basename:i}=l.useContext(L),s=M(),u=Xt(),c=Pa();l.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),Co(l.useCallback(()=>{if(c.state==="idle"){let d=je(s,u,i,e);pe[d]=window.scrollY}try{sessionStorage.setItem(t||Ue,JSON.stringify(pe))}catch(d){D(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${d}).`)}window.history.scrollRestoration="auto"},[c.state,e,i,s,u,t])),typeof document<"u"&&(l.useLayoutEffect(()=>{try{let d=sessionStorage.getItem(t||Ue);d&&(pe=JSON.parse(d))}catch{}},[t]),l.useLayoutEffect(()=>{let d=n?.enableScrollRestoration(pe,()=>window.scrollY,e?(m,f)=>je(m,f,i,e):void 0);return()=>d&&d()},[n,i,e]),l.useLayoutEffect(()=>{if(r!==!1){if(typeof r=="number"){window.scrollTo(0,r);return}try{if(s.hash){let d=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(d){d.scrollIntoView();return}}}catch{D(!1,`"${s.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}o!==!0&&window.scrollTo(0,0)}},[s,r,o]))}a(Eo,"useScrollRestoration");function ps(e,t){let{capture:n}=t||{};l.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("beforeunload",e,r),()=>{window.removeEventListener("beforeunload",e,r)}},[e,n])}a(ps,"useBeforeUnload");function Co(e,t){let{capture:n}=t||{};l.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,n])}a(Co,"usePageHide");function $o(e,{relative:t}={}){let n=l.useContext(Vt);C(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ge("useViewTransitionState"),o=de(e,{relative:t});if(!n.isTransitioning)return!1;let i=z(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=z(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ve(o.pathname,s)!=null||ve(o.pathname,i)!=null}a($o,"useViewTransitionState");var pt=60,Fe=3600,ke=24*Fe,gt=7*ke,yt=30*ke;function _o(e){const t=Date.now(),n=new Date(e).getTime(),r=Math.round((t-n)/1e3);return r<pt?"just now":r<Fe?`${Math.floor(r/pt)}m ago`:r<ke?`${Math.floor(r/Fe)}h ago`:r<gt?`${Math.floor(r/ke)}d ago`:r<yt?`${Math.floor(r/gt)}w ago`:`${Math.floor(r/yt)}mo ago`}a(_o,"timeAgo");var Ao=[{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"}]}],sn=new Map(Ao.flatMap(e=>e.views.map(t=>[t.key,t]))),ln="mine",Lo="view",Po="paperclip:tasks:last-view";function Do(e){return typeof e=="string"&&sn.has(e)}a(Do,"isTaskViewKey");function un(e){return sn.get(e)}a(un,"taskView");function Xe(e){return Do(e)?e:null}a(Xe,"normalizeTaskViewKey");var vt={mine:"mine",unread:"unread",blocked:"blocked",recent:"recent",all:"everything"};function gs(e){return e&&e in vt?vt[e]:ln}a(gs,"taskViewForInboxTab");function ys(){try{return Xe(window.localStorage.getItem("paperclip:tasks:last-view"))??"mine"}catch{return ln}}a(ys,"loadLastTaskView");function vs(e){try{window.localStorage.setItem(Po,e)}catch{}}a(vs,"saveLastTaskView");var ws=["assignee","workspace","participantAgentId","q"];function ks(e,t,n){const r=Xe(e);return t&&(!r||un(r).surface==="inbox")?"all":r??n}a(ks,"resolveInitialTaskView");var cn="from",dn="fromHref",fn="paperclip:issue-detail-breadcrumb:";function mn(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.label=="string"&&typeof t.href=="string"}a(mn,"isIssueDetailBreadcrumb");function hn(e){return e==="issues"||e==="inbox"}a(hn,"isIssueDetailSource");function pn(e){if(typeof e!="object"||e===null)return!1;const t=e,n=t.originKind===void 0||typeof t.originKind=="string",r=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")&&n&&r}a(pn,"isIssueDetailHeaderSeed");function Mo(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(Mo,"createIssueDetailHeaderSeed");function gn(e,t){const n=Mo(t);return typeof e!="object"||e===null?{issueDetailHeaderSeed:n}:{...e,issueDetailHeaderSeed:n}}a(gn,"withIssueDetailHeaderSeed");function To(e){if(typeof e!="object"||e===null)return null;const t=e.issueDetailHeaderSeed;return pn(t)?t:null}a(To,"readIssueDetailHeaderSeed");function Oo(e){if(!e)return null;const t=new URLSearchParams(e).get(cn);return hn(t)?t:null}a(Oo,"readIssueDetailSourceFromSearch");function No(e){if(!e)return null;const t=new URLSearchParams(e).get(dn);return t&&t.startsWith("/")?t:null}a(No,"readIssueDetailBreadcrumbHrefFromSearch");function Uo(e){const t=e.slice(e.indexOf("?")+1);if(!e.includes("?"))return!1;const n=new URLSearchParams(t).get(Lo),r=Xe(n);return r!==null&&un(r).surface==="inbox"}a(Uo,"isInboxBackedTaskViewHref");function yn(e,t){return hn(e?.issueDetailSource)?e.issueDetailSource:t?t.href.includes("/inbox")||Uo(t.href)||t.label==="Inbox"?"inbox":t.label==="Tasks"||t.href.includes("/issues")?"issues":null:null}a(yn,"inferIssueDetailSource");function wt(e){return e==="inbox"?{label:"Inbox",href:"/inbox"}:{label:"Tasks",href:"/issues"}}a(wt,"breadcrumbForSource");function xs(e,t,n){return{issueDetailBreadcrumb:{label:e,href:t},issueDetailSource:n}}a(xs,"createIssueDetailLocationState");function Is(e){return typeof e!="object"||e===null?{issueDetailInboxQuickArchiveArmed:!0}:{...e,issueDetailInboxQuickArchiveArmed:!0}}a(Is,"armIssueDetailInboxQuickArchive");function jo(e){if(typeof window>"u"||!window.sessionStorage)return null;const t=window.sessionStorage.getItem(`${fn}${e}`);if(!t)return null;try{const n=JSON.parse(t),r=mn(n.issueDetailBreadcrumb)?n.issueDetailBreadcrumb:null,o=yn(n,r);if(!r||!o)return null;const i=pn(n.issueDetailHeaderSeed)?n.issueDetailHeaderSeed:void 0;return{issueDetailBreadcrumb:r,issueDetailSource:o,issueDetailInboxQuickArchiveArmed:n.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:i}}catch{return null}}a(jo,"readStoredIssueDetailLocationState");function vn(e,t){if(typeof e=="object"&&e!==null){const o=e.issueDetailBreadcrumb;if(mn(o)){const i=yn(e,o);if(!i)return null;const s=To(e)??void 0;return{issueDetailBreadcrumb:o,issueDetailSource:i,issueDetailInboxQuickArchiveArmed:e.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:s}}}const n=Oo(t),r=No(t);return n?{issueDetailBreadcrumb:r?{...wt(n),href:r}:wt(n),issueDetailSource:n,issueDetailInboxQuickArchiveArmed:!1}:null}a(vn,"normalizeIssueDetailLocationState");function Rs(e,t,n){if(typeof window>"u"||!window.sessionStorage)return;const r=vn(t,n);r&&window.sessionStorage.setItem(`${fn}${e}`,JSON.stringify(r))}a(Rs,"rememberIssueDetailLocationState");function Fo(e){return`/issues/${e}`}a(Fo,"createIssueDetailPath");function Ss(e){if(!e)return!1;const t=new URLSearchParams(e);return t.has(cn)||t.has(dn)}a(Ss,"hasLegacyIssueDetailQuery");function Bo(e,t,n){const r=vn(t,n);return r||(e?jo(e):null)}a(Bo,"readIssueDetailLocationState");function bs(e,t,n){return Bo(e,t,n)?.issueDetailBreadcrumb??null}a(bs,"readIssueDetailBreadcrumb");var kt=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 xt(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e,n=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;return typeof t.id=="string"&&n.test(t.id)&&typeof t.issueId=="string"&&n.test(t.issueId)&&typeof t.body=="string"}a(xt,"hasCommentReceipt");async function It(e,t){try{const n=await e;if(!t(n))throw new kt;return n}catch(n){throw n instanceof mr&&n.status<500?n:new kt}}a(It,"confirmedCommentResponse");function Rt(e){const t=new URLSearchParams;return e?.attention&&t.set("attention",e.attention),e?.status&&t.set("status",e.status),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?.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(Rt,"issueListSearchParams");var Y={listAll:a(async(e,t,n)=>{const o=new Map;let i;for(;;){const s=await Y.list(e,{...t,limit:500,sortField:"id",sortDir:"asc",afterId:i},n);for(const u of s)o.set(u.id,u);if(s.length<500)return[...o.values()];i=s[s.length-1].id}},"listAll"),list:a((e,t,n)=>{const r=Rt(t).toString(),o=`/companies/${e}/issues${r?`?${r}`:""}`;return n?h.get(o,n):h.get(o)},"list"),listCompact:a((e,t,n)=>{const r=Rt(t);r.set("view","compact");const o=`/companies/${e}/issues?${r.toString()}`;return n?h.get(o,n):h.get(o)},"listCompact"),count:a((e,t)=>{const n=new URLSearchParams;return n.set("attention",t.attention),t.status&&n.set("status",t.status),t.assigneeAgentId&&n.set("assigneeAgentId",t.assigneeAgentId),t.assigneeUserId&&n.set("assigneeUserId",t.assigneeUserId),t.projectId&&n.set("projectId",t.projectId),t.labelId&&n.set("labelId",t.labelId),t.q&&n.set("q",t.q),h.get(`/companies/${e}/issues/count?${n.toString()}`)},"count"),listLabels:a(e=>h.get(`/companies/${e}/labels`),"listLabels"),createLabel:a((e,t)=>h.post(`/companies/${e}/labels`,t),"createLabel"),deleteLabel:a(e=>h.delete(`/labels/${e}`),"deleteLabel"),get:a((e,t)=>t?h.get(`/issues/${e}`,t):h.get(`/issues/${e}`),"get"),getRunnerGoal:a((e,t)=>{const n=t?`?agentId=${encodeURIComponent(t)}`:"";return h.get(`/issues/${e}/runner-goal${n}`)},"getRunnerGoal"),actOnRunnerGoal:a((e,t)=>h.post(`/issues/${e}/runner-goal/actions`,t),"actOnRunnerGoal"),getModelOverride:a(e=>h.get(`/issues/${e}/model-override`),"getModelOverride"),setModelOverride:a((e,t)=>h.put(`/issues/${e}/model-override`,t),"setModelOverride"),getWatchdog:a(e=>h.get(`/issues/${e}/watchdog`),"getWatchdog"),upsertWatchdog:a((e,t)=>h.put(`/issues/${e}/watchdog`,t),"upsertWatchdog"),deleteWatchdog:a(e=>h.delete(`/issues/${e}/watchdog`),"deleteWatchdog"),markRead:a(e=>h.post(`/issues/${e}/read`,{}),"markRead"),markUnread:a(e=>h.delete(`/issues/${e}/read`),"markUnread"),archiveFromInbox:a(e=>h.post(`/issues/${e}/inbox-archive`,{}),"archiveFromInbox"),unarchiveFromInbox:a(e=>h.delete(`/issues/${e}/inbox-archive`),"unarchiveFromInbox"),setTitle:a((e,t)=>h.put(`/issues/${e}/title`,t),"setTitle"),create:a((e,t)=>h.post(`/companies/${e}/issues`,t),"create"),update:a((e,t)=>{const n=h.patch(`/issues/${e}`,t);return typeof t.comment=="string"?It(n,r=>xt(r?.comment)):n},"update"),decideStalledReview:a((e,t)=>h.post(`/issues/${e}/stalled-review-decision`,t),"decideStalledReview"),retryWorkspaceExport:a((e,t)=>h.post(`/issues/${e}/recovery-actions/retry-workspace-export`,t),"retryWorkspaceExport"),resolveRecoveryAction:a((e,t)=>h.post(`/issues/${e}/recovery-actions/resolve`,t),"resolveRecoveryAction"),previewTreeControl:a((e,t)=>h.post(`/issues/${e}/tree-control/preview`,t),"previewTreeControl"),createTreeHold:a((e,t)=>h.post(`/issues/${e}/tree-holds`,t),"createTreeHold"),getTreeHold:a((e,t)=>h.get(`/issues/${e}/tree-holds/${t}`),"getTreeHold"),listTreeHolds:a((e,t)=>{const n=new URLSearchParams;t?.status&&n.set("status",t.status),t?.mode&&n.set("mode",t.mode),t?.includeMembers&&n.set("includeMembers","true");const r=n.toString();return h.get(`/issues/${e}/tree-holds${r?`?${r}`:""}`)},"listTreeHolds"),getTreeControlState:a(e=>h.get(`/issues/${e}/tree-control/state`),"getTreeControlState"),releaseTreeHold:a((e,t,n)=>h.post(`/issues/${e}/tree-holds/${t}/release`,n),"releaseTreeHold"),checkMonitorNow:a(e=>h.post(`/issues/${e}/monitor/check-now`,{}),"checkMonitorNow"),retryScheduledRetryNow:a(e=>h.post(`/issues/${e}/scheduled-retry/retry-now`,{}),"retryScheduledRetryNow"),remove:a(e=>h.delete(`/issues/${e}`),"remove"),checkout:a((e,t)=>h.post(`/issues/${e}/checkout`,{agentId:t,expectedStatuses:["todo","backlog","blocked","in_review"]}),"checkout"),release:a(e=>h.post(`/issues/${e}/release`,{}),"release"),listComments:a((e,t)=>{const n=new URLSearchParams;t?.after&&n.set("after",t.after),t?.order&&n.set("order",t.order),t?.limit&&n.set("limit",String(t.limit));const r=n.toString();return h.get(`/issues/${e}/comments${r?`?${r}`:""}`)},"listComments"),getQueuedComments:a(e=>h.get(`/issues/${e}/queued-comments`),"getQueuedComments"),editQueuedComment:a((e,t,n)=>h.patch(`/issues/${e}/queued-comments/${t}`,n),"editQueuedComment"),reorderQueuedComments:a((e,t)=>h.put(`/issues/${e}/queued-comments/order`,t),"reorderQueuedComments"),interruptQueuedComments:a((e,t)=>h.post(`/issues/${e}/queued-comments/interrupt`,t),"interruptQueuedComments"),interruptLatestQueuedComments:a(async(e,t)=>{const n=await Y.getQueuedComments(e);if(!n.queueId||n.targetRunId&&n.targetRunId!==t)throw new Error("The queued messages changed. Refresh and try again.");return Y.interruptQueuedComments(e,{queueId:n.queueId,revision:n.revision,targetRunId:n.targetRunId})},"interruptLatestQueuedComments"),steerQueuedComment:a((e,t,n)=>h.post(`/issues/${e}/queued-comments/${t}/steer`,n),"steerQueuedComment"),discardQueuedComment:a((e,t,n)=>h.delete(`/issues/${e}/queued-comments/${t}`,n),"discardQueuedComment"),listInteractions:a(e=>h.get(`/issues/${e}/interactions`),"listInteractions"),listAcceptedPlanDecompositions:a(e=>h.get(`/issues/${e}/accepted-plan-decompositions`),"listAcceptedPlanDecompositions"),createInteraction:a((e,t)=>h.post(`/issues/${e}/interactions`,t),"createInteraction"),acceptInteraction:a((e,t,n)=>h.post(`/issues/${e}/interactions/${t}/accept`,n??{}),"acceptInteraction"),rejectInteraction:a((e,t,n)=>h.post(`/issues/${e}/interactions/${t}/reject`,n?{reason:n}:{}),"rejectInteraction"),cancelInteraction:a((e,t,n)=>h.post(`/issues/${e}/interactions/${t}/cancel`,n?{reason:n}:{}),"cancelInteraction"),skipInteraction:a((e,t,n)=>h.post(`/issues/${e}/interactions/${t}/skip`,n?{reason:n}:{}),"skipInteraction"),respondToInteraction:a((e,t,n)=>h.post(`/issues/${e}/interactions/${t}/respond`,n),"respondToInteraction"),submitInteractionVerdicts:a((e,t,n)=>h.post(`/issues/${e}/interactions/${t}/verdicts`,{verdicts:n}),"submitInteractionVerdicts"),getComment:a((e,t)=>h.get(`/issues/${e}/comments/${t}`),"getComment"),listFeedbackVotes:a(e=>h.get(`/issues/${e}/feedback-votes`),"listFeedbackVotes"),getCostSummary:a((e,t={})=>{const n=t.excludeRoot?"?excludeRoot=true":"";return h.get(`/issues/${e}/cost-summary${n}`)},"getCostSummary"),listFeedbackTraces:a((e,t)=>{const n=new URLSearchParams;for(const[o,i]of Object.entries(t??{}))i!==void 0&&n.set(o,String(i));const r=n.toString();return h.get(`/issues/${e}/feedback-traces${r?`?${r}`:""}`)},"listFeedbackTraces"),upsertFeedbackVote:a((e,t)=>h.post(`/issues/${e}/feedback-votes`,t),"upsertFeedbackVote"),addComment:a((e,t,n,r,o,i,s)=>It(h.post(`/issues/${e}/comments`,{body:t,...i?{clientRequestId:i}:{},...n===void 0?{}:{reopen:n},...r===void 0?{}:{interrupt:r},...o?.length?{attachmentIds:o}:{},...s===void 0?{}:{deliver:s}}),xt),"addComment"),cancelComment:a((e,t)=>h.delete(`/issues/${e}/comments/${t}?mode=cancel`),"cancelComment"),deleteComment:a((e,t)=>h.delete(`/issues/${e}/comments/${t}`),"deleteComment"),listDocuments:a((e,t)=>h.get(`/issues/${e}/documents${t?.includeSystem?"?includeSystem=true":""}`),"listDocuments"),getDocument:a((e,t)=>h.get(`/issues/${e}/documents/${encodeURIComponent(t)}`),"getDocument"),getDocumentPdf:a((e,t)=>h.getBlob(`/issues/${e}/documents/${encodeURIComponent(t)}/pdf`),"getDocumentPdf"),upsertDocument:a((e,t,n)=>h.put(`/issues/${e}/documents/${encodeURIComponent(t)}`,n),"upsertDocument"),lockDocument:a((e,t)=>h.post(`/issues/${e}/documents/${encodeURIComponent(t)}/lock`,{}),"lockDocument"),unlockDocument:a((e,t)=>h.post(`/issues/${e}/documents/${encodeURIComponent(t)}/unlock`,{}),"unlockDocument"),listDocumentRevisions:a((e,t)=>h.get(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions`),"listDocumentRevisions"),restoreDocumentRevision:a((e,t,n)=>h.post(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions/${n}/restore`,{}),"restoreDocumentRevision"),deleteDocument:a((e,t)=>h.delete(`/issues/${e}/documents/${encodeURIComponent(t)}`),"deleteDocument"),listAttachments:a(e=>h.get(`/issues/${e}/attachments`),"listAttachments"),uploadAttachment:a((e,t,n,r)=>{const o=new FormData;return o.append("file",n),r&&o.append("issueCommentId",r),h.postForm(`/companies/${e}/issues/${t}/attachments`,o)},"uploadAttachment"),deleteAttachment:a(e=>h.delete(`/attachments/${e}`),"deleteAttachment"),listApprovals:a(e=>h.get(`/issues/${e}/approvals`),"listApprovals"),linkApproval:a((e,t)=>h.post(`/issues/${e}/approvals`,{approvalId:t}),"linkApproval"),unlinkApproval:a((e,t)=>h.delete(`/issues/${e}/approvals/${t}`),"unlinkApproval"),listWorkProducts:a((e,t)=>h.get(`/issues/${e}/work-products${t?.refreshPullRequests?"?refreshPullRequests=true":""}`),"listWorkProducts"),ensureWorkProductReviewDocument:a((e,t)=>h.post(`/issues/${e}/work-products/${t}/review-document`,{}),"ensureWorkProductReviewDocument"),createWorkProduct:a((e,t)=>h.post(`/issues/${e}/work-products`,t),"createWorkProduct"),updateWorkProduct:a((e,t)=>h.patch(`/work-products/${e}`,t),"updateWorkProduct"),deleteWorkProduct:a(e=>h.delete(`/work-products/${e}`),"deleteWorkProduct")};function X(e){return new Date(e).getTime()}a(X,"toTimestamp");function zo(){const e=globalThis.crypto?.randomUUID?.();return e?`optimistic-${e}`:`optimistic-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}a(zo,"createOptimisticCommentId");function Ze(e){return[...e].sort((t,n)=>{const r=X(t.createdAt)-X(n.createdAt);return r!==0?r:t.id.localeCompare(n.id)})}a(Ze,"sortIssueComments");function St(e){return Ze(e).reverse()}a(St,"sortIssueCommentsDesc");function Es(e){const t=new Date,n=zo();return{id:n,clientId:n,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(Es,"createOptimisticIssueComment");function Cs(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?X(e.comment.createdAt)>=X(e.activeRunStartedAt):!1}a(Cs,"isQueuedIssueComment");function $s(e,t){const n=t.queuedTargetRunId??null;return!n||!t.targetRunIsLive||t.runningRunId&&t.runningRunId!==n?e:{...e,clientStatus:"queued",queueState:"queued",queueTargetRunId:n}}a($s,"applyLocalQueuedIssueCommentState");function _s(e,t){const n=e??[],r=[...n],o=new Set(r.map(s=>s.id)),i=new Set;for(const s of t){if(o.has(s.id))continue;const u=n.find(c=>!i.has(c.id)&&c.issueId===s.issueId&&c.authorType===s.authorType&&c.authorUserId===s.authorUserId&&c.body===s.body&&Math.abs(X(c.createdAt)-X(s.createdAt))<=6e4);if(u){i.add(u.id);const c={...u,clientId:s.clientId};r[r.findIndex(d=>d.id===u.id)]=c;continue}r.push(s)}return Ze(r)}a(_s,"mergeIssueComments");function As(e,t){const n=e.findIndex(r=>r.clientId===t);return n===-1?{comments:e,comment:null}:{comments:e.filter(r=>r.clientId!==t),comment:e[n]??null}}a(As,"takeOptimisticIssueComment");function Ls(e){return Ze((e??[]).flatMap(t=>t))}a(Ls,"flattenIssueCommentPages");function Ho(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}a(Ho,"getNextIssueCommentPageParam");function bt(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}a(bt,"getNextPageCursor");async function Ps(e){const t=(e.pages??[]).map(s=>[...s]),n=e.pageParams?[...e.pageParams].slice(0,t.length):t.map(()=>null);for(;n.length<t.length;)n.push(null);if(e.pageSize<=0)return{pages:t,pageParams:n};let r=bt(t[t.length-1],e.pageSize);const o=Math.max(0,e.maxPages??Number.POSITIVE_INFINITY),i=new Set;for(;r&&!i.has(r)&&i.size<o;){i.add(r);const s=[...await e.fetchPage(r)];t.push(s),n.push(r),r=bt(s,e.pageSize)}return{pages:t,pageParams:n}}a(Ps,"loadRemainingIssueCommentPages");function Ds(e){return e.activeDetailTab!=="chat"||!e.hasOlderComments||e.initialPageLoading||e.olderPageLoading||e.loadedCommentCount===0?!1:e.loadedCommentCount<e.autoLoadLimit}a(Ds,"shouldAutoloadOlderIssueComments");function Ms(e,t){if(!e)return e;const n={...e};return t.reopen===!0&&(e.status==="done"||e.status==="cancelled"||e.status==="blocked")&&(n.status="todo"),t.reassignment&&(n.assigneeAgentId=t.reassignment.assigneeAgentId,n.assigneeUserId=t.reassignment.assigneeUserId),n}a(Ms,"applyOptimisticIssueCommentUpdate");function Wo(e,t){if(!e)return e;const n={...e,updatedAt:new Date},r=a(i=>Object.prototype.hasOwnProperty.call(t,i),"hasOwn"),o=a(i=>{r(i)&&(n[i]=t[i])},"assign");if(o("status"),o("priority"),o("assigneeAgentId"),o("assigneeUserId"),o("projectId"),o("parentId"),o("projectWorkspaceId"),o("executionWorkspaceId"),o("executionWorkspacePreference"),o("executionWorkspaceSettings"),o("hiddenAt"),r("labelIds")&&Array.isArray(t.labelIds)){const i=t.labelIds.filter(s=>typeof s=="string");n.labelIds=i,e.labels&&(n.labels=e.labels.filter(s=>i.includes(s.id)))}if(r("blockedByIssueIds")&&Array.isArray(t.blockedByIssueIds)&&e.blockedBy){const i=new Set(t.blockedByIssueIds.filter(s=>typeof s=="string"));n.blockedBy=e.blockedBy.filter(s=>i.has(s.id))}return r("projectId")&&(n.project=e.project?.id===n.projectId?e.project:null),r("parentId")&&(n.ancestors=void 0),r("executionWorkspaceId")&&(n.currentExecutionWorkspace=e.currentExecutionWorkspace?.id===n.executionWorkspaceId?e.currentExecutionWorkspace:null),n}a(Wo,"applyOptimisticIssueFieldUpdate");function qo(e,t){const n=t instanceof Set?t:new Set(t);return n.has(e.id)||!!e.identifier&&n.has(e.identifier)}a(qo,"matchesIssueRef$1");function Ts(e,t,n){if(!e)return e;let r=!1;const o=e.map(i=>qo(i,t)?(r=!0,Wo(i,n)??i):i);return r?o:e}a(Ts,"applyOptimisticIssueFieldUpdateToCollection");function Os(e,t){if(!e||e.length===0)return[[t]];const n=e.map(r=>[...r]);for(let r=0;r<n.length;r+=1){const o=n[r].findIndex(i=>i.id===t.id);if(o!==-1)return n[r][o]=t,n[r]=St(n[r]),n}return n[0]=St([...n[0],t]),n}a(Os,"upsertIssueCommentInPages");function Ns(e,t){return!e||e.length===0?[]:e.map(n=>n.filter(r=>r.id!==t)).filter(n=>n.length>0)}a(Ns,"removeIssueCommentFromPages");var Vo=["issues","detail"],wn=6e4,Qo=3e4;function ie(e){return typeof e=="string"&&e.length>0}a(ie,"isNonEmptyString");function kn(e,t){const n=new Set;return ie(e)&&n.add(e),ie(t?.id)&&n.add(t.id),ie(t?.identifier)&&n.add(t.identifier),Array.from(n)}a(kn,"collectIssueRefs");function Ko(e,t){const n=t instanceof Set?t:new Set(t);return n.has(e.id)||!!e.identifier&&n.has(e.identifier)}a(Ko,"matchesIssueRef");function xe(e){if(typeof e!="object"||e===null)return!1;const t=e;return ie(t.id)&&ie(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(xe,"isCompleteIssueSnapshot");function Et(e,t){return e?{...e,...t}:t}a(Et,"mergeIssueSnapshots");function xn(e,t,n){const r=kn(t,n);for(const o of r){const i=e.getQueryData(ue.issues.detail(o));if(xe(i))return i}return e.getQueriesData({queryKey:Vo}).map(([,o])=>o).find(o=>xe(o)&&Ko(o,r))}a(xn,"getCachedIssueDetail");function In(e,t,n){if(!xe(t))return t;const r=kn(n?.issueRef,t),o=Et(xn(e,n?.issueRef,t),t);for(const i of r)e.setQueryData(ue.issues.detail(i),s=>Et(s,o));return o}a(In,"seedIssueDetailCache");async function Rn(e,t,n){return In(e,n?await Y.get(t,n):await Y.get(t),{issueRef:t})}a(Rn,"fetchIssueDetail");function Jo(e,t,n){return{queryKey:ue.issues.detail(t),queryFn:a(({signal:r})=>Rn(e,t,{signal:r}),"queryFn"),placeholderData:xn(e,t,n?.placeholderIssue??void 0)}}a(Jo,"getIssueDetailQueryOptions");function Yo(e,t,n){return xe(n?.issue)&&In(e,n.issue,{issueRef:t}),e.prefetchQuery({queryKey:ue.issues.detail(t),queryFn:a(()=>Rn(e,t),"queryFn"),staleTime:wn})}a(Yo,"prefetchIssueDetail");function Go(e,t){return e.prefetchInfiniteQuery({queryKey:ue.issues.comments(t),queryFn:a(({pageParam:n})=>Y.listComments(t,{order:"desc",limit:50,...n?{after:n}:{}}),"queryFn"),initialPageParam:null,getNextPageParam:a(n=>Ho(n,50),"getNextPageParam"),staleTime:Qo,pages:1})}a(Go,"prefetchIssueComments");function Xo(e,t,n){return Promise.all([Yo(e,t,n),Go(e,n?.issue?.id??t)])}a(Xo,"prefetchIssueDetailForNavigation");var Sn={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"}]]};Sn.node;var Zo=S(Sn),bn={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"}]]};bn.node;var ei=S(bn),En={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"}]]};En.node;var ti=S(En),Cn={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"}]]};Cn.node;var ni=S(Cn),$n={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"}]]};$n.node;var ri=S($n),_n={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"}]]};_n.node;var ai=S(_n),An={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"}]]};An.node;var oi=S(An),Ln={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"}]]};Ln.node;var ii=S(Ln),Pn={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"}]]};Pn.node;var si=S(Pn),Dn={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"}]]};Dn.node;var li=S(Dn),Mn={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"}]]};Mn.node;var ui=S(Mn),Tn={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"}]]};Tn.node;var ci=S(Tn),On={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"}]]};On.node;var di=S(On),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 fi=S(Nn),Un={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"]};Un.node;var mi=S(Un),jn={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"}]]};jn.node;var hi=S(jn),Fn={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"}]]};Fn.node;var pi=S(Fn),Bn={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"}]]};Bn.node;var gi=S(Bn),zn={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"}]]};zn.node;var yi=S(zn),Hn={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"}]]};Hn.node;var vi=S(Hn),Wn={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"}]]};Wn.node;var wi=S(Wn),qn={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"}]]};qn.node;var ki=S(qn),Vn={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"}]]};Vn.node;var xi=S(Vn),Qn={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"}]]};Qn.node;var Ii=S(Qn),Kn={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"}]]};Kn.node;var Ri=S(Kn),Jn={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"}]]};Jn.node;var Si=S(Jn),Yn={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"}]]};Yn.node;var bi=S(Yn),Gn={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"}]]};Gn.node;var Ei=S(Gn),Xn={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"}]]};Xn.node;var Ci=S(Xn),Ct={folder:Ar,rocket:xi,code:br,terminal:Er,database:ii,globe:ci,package:vi,boxes:wr,box:ei,layers:mi,briefcase:ni,compass:ai,target:Si,flame:li,zap:Ci,star:Ri,bug:Lr,wrench:Ei,hammer:di,lightbulb:hi,sparkles:_r,shield:Ii,lock:pi,search:Sr,cog:ri,brain:ti,cpu:xr,"git-branch":ui,"file-code":si,puzzle:wi,gem:Cr,atom:Zo,heart:kr,mail:gi,"message-square":yi,crown:oi,radar:ki,telescope:bi,hexagon:fi},$i="folder";function _i(e){return e&&yr.includes(e)?Ct[e]:Ct[$i]}a(_i,"getProjectIcon");var R=Lt(dr(),1),Ai={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 Li({color:e,icon:t,size:n="md",className:r}){const o=Ai[n],i=!!e,s=_i(t);return(0,R.jsx)("span",{"aria-hidden":!0,className:ze("inline-flex shrink-0 items-center justify-center",o.box,i?"text-white":"bg-muted text-muted-foreground",r),style:i?{backgroundColor:e??void 0}:void 0,children:(0,R.jsx)(s,{className:o.icon})})}a(Li,"ProjectTile");var se=null,Be=new Set;function Zn(){for(const e of Be)e()}a(Zn,"emitQuicklookChange");function $t(e){se!==e&&(se=e,Zn())}a($t,"openQuicklookId");function _t(e){se===e&&(se=null,Zn())}a(_t,"closeQuicklookId");function Pi(e){return Be.add(e),()=>{Be.delete(e)}}a(Pi,"subscribeQuicklook");function Di(e){return l.useSyncExternalStore(Pi,()=>se===e,()=>!1)}a(Di,"useIsQuicklookOpen");var Mi=120,Ti=13,Oi="w-72 p-3";function Ni(e="start"){return e==="start"?-13:e==="end"?Ti:0}a(Ni,"quicklookAlignOffset");function Ui(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(Ui,"summarizeIssueDescription");function ji({className:e}){return(0,R.jsx)("span",{className:ze("text-xs",e),"aria-hidden":!0,children:"·"})}a(ji,"QuicklookSeparator");function Fi(e){const t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}a(Fi,"statusLabel");function Bi({issue:e,linkTo:t,linkState:n,compact:r=!1}){const o=(0,l.useMemo)(()=>Ui(e.description),[e.description]),i=e.project?.name;return(0,R.jsxs)("div",{className:ze("space-y-2",r&&"space-y-1.5"),children:[(0,R.jsxs)("div",{className:"flex items-center gap-1",children:[(0,R.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1",children:[(0,R.jsx)(Pr,{status:e.status,size:"md",title:Fi(e.status)}),(0,R.jsx)("span",{className:"shrink-0 font-mono text-(length:--text-micro) text-muted-foreground",children:e.identifier??e.id.slice(0,8)}),i?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(ji,{className:"shrink-0 text-muted-foreground"}),(0,R.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:i,"data-testid":"quicklook-project",children:[(0,R.jsx)(Li,{size:"xs"}),(0,R.jsx)("span",{className:"truncate",children:i})]})]}):null]}),(0,R.jsx)("span",{className:"shrink-0 text-(length:--text-micro) text-muted-foreground",children:_o(new Date(e.updatedAt))})]}),(0,R.jsx)(fe,{to:t,state:n??gn(null,e),className:"block text-sm font-medium leading-snug hover:underline line-clamp-2",children:e.title}),o?(0,R.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(Bi,"IssueQuicklookCard");var zi=l.forwardRef(a(function({issuePathId:t,to:n,children:r,className:o,state:i,disableIssueQuicklook:s=!1,issuePrefetch:u=null,issueQuicklookSide:c="top",issueQuicklookAlign:d="start",onClick:m,onClickCapture:f,onMouseEnter:g,onFocus:v,onBlur:w,onTouchStart:y,...p},k){const x=fr(),I=l.useMemo(()=>Symbol("issue-quicklook"),[]),$=Di(I),b=l.useRef(null),_=l.useRef(null),P=l.useRef(null),N=l.useCallback(E=>{_.current=E,typeof k=="function"?k(E):k&&(k.current=E)},[k]),A=l.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null)},[]),j=l.useCallback(()=>{A(),$t(I)},[A,I]),K=l.useCallback(()=>{A(),b.current=setTimeout(()=>{b.current=null,$t(I)},Mi)},[A,I]),T=l.useCallback(()=>{A(),_t(I)},[A,I]);l.useEffect(()=>()=>{A(),_t(I)},[A,I]),l.useEffect(()=>{if(!$)return;const E=12,nt=a((q,ae,J)=>{if(!q)return!1;const W=q.getBoundingClientRect();return ae>=W.left-E&&ae<=W.right+E&&J>=W.top-E&&J<=W.bottom+E},"nearBox"),ur=a((q,ae)=>{const J=_.current,W=P.current;if(J?.matches(":hover")||W?.matches(":hover")||nt(J,q,ae)||nt(W,q,ae))return!0;const _e=document.activeElement;return J===_e||!!W&&!!_e&&W.contains(_e)},"stillEngaged"),rt=a(q=>{ur(q.clientX,q.clientY)||T()},"onPointerMove");return document.addEventListener("pointermove",rt,{passive:!0}),()=>document.removeEventListener("pointermove",rt)},[$,T]);const H=u?gn(i,u):i,{data:F,isLoading:B}=hr({...Jo(x,t,{placeholderIssue:u??void 0}),enabled:$,staleTime:wn}),lr=Fo(t),re=l.useCallback(()=>{Xo(x,t,{issue:u})},[t,u,x]),tt=(0,R.jsx)(fe,{ref:N,to:n,state:H,className:o,onMouseEnter:a(E=>{re(),g?.(E)},"onMouseEnter"),onFocus:a(E=>{re(),j(),v?.(E)},"onFocus"),onBlur:a(E=>{setTimeout(()=>T(),0),w?.(E)},"onBlur"),onTouchStart:a(E=>{re(),y?.(E)},"onTouchStart"),onClickCapture:a(E=>{re(),f?.(E)},"onClickCapture"),onClick:a(E=>{T(),m?.(E)},"onClick"),...p,children:r});return s?tt:(0,R.jsxs)(Ir,{open:$,onOpenChange:a(E=>E?j():T(),"onOpenChange"),children:[(0,R.jsx)(Rr,{asChild:!0,onMouseEnter:a(()=>{re(),K()},"onMouseEnter"),onMouseLeave:T,children:tt}),(0,R.jsx)($r,{ref:P,"data-quicklook":!0,className:Oi,side:c,align:d,alignOffset:Ni(d),onMouseEnter:j,onMouseLeave:T,onOpenAutoFocus:a(E=>E.preventDefault(),"onOpenAutoFocus"),onCloseAutoFocus:a(E=>E.preventDefault(),"onCloseAutoFocus"),children:F?(0,R.jsx)(Bi,{issue:F,linkTo:lr,linkState:H,compact:!0}):(0,R.jsxs)("div",{className:"space-y-2",children:[(0,R.jsx)("div",{className:"h-4 w-24 rounded bg-accent/50"}),(0,R.jsx)("div",{className:"h-4 w-full rounded bg-accent/40"}),(0,R.jsx)("div",{className:"h-4 w-3/4 rounded bg-accent/30"}),B?null:(0,R.jsx)("p",{className:"text-xs text-muted-foreground",children:"Unable to load task preview."})]})})]})},"IssueLinkQuicklookImpl")),er=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"]),et=new Set(["auth","invite","board-claim","cli-auth","docs","instance"]);function le(e){return e.trim().toUpperCase()}a(le,"normalizeCompanyPrefix");function tr(e){const t=e.match(/^([^?#]*)(\?[^#]*)?(#.*)?$/);return{pathname:t?.[1]??e,search:t?.[2]??"",hash:t?.[3]??""}}a(tr,"splitPath");function Hi(e){return e.split("/").filter(Boolean)[0]??null}a(Hi,"getRootSegment");function Wi(e){if(e==="/")return!0;const t=Hi(e);return t?et.has(t.toLowerCase()):!0}a(Wi,"isGlobalPath");function nr(e){const t=e.split("/").filter(Boolean);if(t.length===0)return null;const n=t[0].toLowerCase();return et.has(n)||er.has(n)?null:le(t[0])}a(nr,"extractCompanyPrefixFromPath");function At(e,t){const{pathname:n,search:r,hash:o}=tr(e);if(!n.startsWith("/")||Wi(n)||!t)return e;const i=le(t);return nr(n)?e:`/${i}${n}${r}${o}`}a(At,"applyCompanyPrefix");function qi(e,...t){const n=["cases",...t].filter(Boolean).join("/");return e?`/${le(e)}/${n}`:`/${n}`}a(qi,"caseHref");function Us(e){const{pathname:t,search:n,hash:r}=tr(e),o=t.split("/").filter(Boolean);if(o.length>=2){const i=o[1].toLowerCase();if(!et.has(o[0].toLowerCase())&&er.has(i))return`/${o.slice(1).join("/")}${n}${r}`}return`${t}${n}${r}`}a(Us,"toCompanyRelativePath");var rr=/^[A-Z][A-Z0-9]*-\d+$/i,Vi=/^issue:\/\/:?([^?#\s]+)([?#].*)?$/i,Qi=/issue:\/\/:?[^\s<>()]+|https?:\/\/[^\s<>()]+|\/(?:[^\s<>()/]+\/)*issues\/[A-Z][A-Z0-9]*-\d+(?=$|[\s<>)\],.;!?:])|\b[A-Z][A-Z0-9]*-\d+\b/gi;function ar(e){if(!e)return null;const t=e.trim();if(!t||/^https?:\/\//i.test(t))return null;const n=t.split(/[?#]/,1)[0].split("/").filter(Boolean),r=n.findIndex(i=>i==="issues");if(r===-1||r===n.length-1)return null;const o=decodeURIComponent(n[r+1]??"");return!o||o.startsWith(":")?null:rr.test(o)?o.toUpperCase():o}a(ar,"parseIssuePathIdFromPath");function or(e,t){if(!e)return null;const n=e.trim(),r=n.match(Vi);if(r?.[1]){const s=decodeURIComponent(r[1]);return{issuePathId:s,href:`/issues/${encodeURIComponent(s)}${r[2]??""}`}}const o=ar(e);if(o)return{issuePathId:o,href:`/issues/${encodeURIComponent(o)}${n.match(/[?#].*$/)?.[0]??""}`};if(!rr.test(n))return null;const i=n.toUpperCase();if(t&&t.size>0){const s=i.split("-")[0];if(!s||!t.has(s))return null}return{issuePathId:i,href:`/issues/${encodeURIComponent(i)}`}}a(or,"parseIssueReferenceFromHref");function Ki(e){let t=e,n="";for(;t.length>0;){const r=t.at(-1);if(!r||!/[),.;!?:\]]/.test(r))break;if(r===")"){const o=(t.match(/\(/g)??[]).length;if((t.match(/\)/g)??[]).length<=o)break}if(r==="]"){const o=(t.match(/\[/g)??[]).length;if((t.match(/\]/g)??[]).length<=o)break}n=`${r}${n}`,t=t.slice(0,-1)}return{core:t,trailing:n}}a(Ki,"splitTrailingPunctuation");function ir(e,t,n="text"){return{type:"link",url:t,children:[{type:n,value:e}]}}a(ir,"createIssueLinkNode");function Ji(e,t){const n=[];let r=0,o=!1;for(const i of e.matchAll(Qi)){const s=i[0];if(!s)continue;const u=i.index??0,c=u+s.length,{core:d,trailing:m}=Ki(s),f=or(d,t);f&&(o=!0,u>r&&n.push({type:"text",value:e.slice(r,u)}),n.push(ir(d,f.href)),m&&n.push({type:"text",value:m}),r=c)}return o?(r<e.length&&n.push({type:"text",value:e.slice(r)}),n):null}a(Ji,"linkifyIssueReferencesInText");function sr(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 n=[];for(const r of e.children){if(r.type==="inlineCode"&&typeof r.value=="string"){const o=or(r.value,t);if(o){n.push(ir(r.value,o.href,"inlineCode"));continue}}if(r.type==="text"&&typeof r.value=="string"){const o=Ji(r.value,t);if(o){n.push(...o);continue}}sr(r,t),n.push(r)}e.children=n}a(sr,"rewriteMarkdownTree");function js(e){const t=e?.knownPrefixes&&e.knownPrefixes.length>0?new Set(e.knownPrefixes.map(n=>n.toUpperCase())):void 0;return n=>{sr(n,t)}}a(js,"remarkLinkIssueReferences");function $e(e,t){if(typeof e=="string")return At(e,t);if(e.pathname&&e.pathname.startsWith("/")){const n=At(e.pathname,t);if(n!==e.pathname)return{...e,pathname:n}}return e}a($e,"resolveTo");function me(){const{selectedCompany:e}=pr(),t=Ia(),n=M();if(t.companyPrefix)return le(t.companyPrefix);const r=nr(n.pathname);return r||(e?le(e.issuePrefix):null)}a(me,"useActiveCompanyPrefix");function Fs(){const e=me();return l.useCallback((...t)=>qi(e,...t),[e])}a(Fs,"useCaseHref");var Bs=l.forwardRef(a(function({to:t,disableIssueQuicklook:n=!1,issuePrefetch:r=null,issueQuicklookSide:o,issueQuicklookAlign:i,...s},u){const c=$e(t,me()),d=ar(typeof c=="string"?c:c.pathname);return d?(0,R.jsx)(zi,{ref:u,to:c,issuePathId:d,disableIssueQuicklook:n,issuePrefetch:r,issueQuicklookSide:o,issueQuicklookAlign:i,...s}):(0,R.jsx)(fe,{ref:u,to:c,...s})},"CompanyLink")),zs=l.forwardRef(a(function({to:t,...n},r){const o=me();return(0,R.jsx)(an,{ref:r,to:$e(t,o),...n})},"CompanyNavLink"));function Hs({to:e,...t}){const n=me();return(0,R.jsx)(Na,{to:$e(e,n),...t})}a(Hs,"Navigate");function Ws(){const e=Re(),t=me();return l.useCallback(((n,r)=>{if(typeof n=="number"){e(n);return}e($e(n,t),r)}),[e,t])}a(Ws,"useNavigate");export{Wo as $,yi as A,un as At,si as B,Re as Bt,Si as C,ws as Ct,ki as D,Xe as Dt,xi as E,ys as Et,fi as F,ls as Ft,ti as G,oi as H,Ia as Ht,di as I,Ua as It,xn as J,ei as K,ci as L,us as Lt,pi as M,_o as Mt,hi as N,ms as Nt,wi as O,ks as Ot,mi as P,fe as Pt,Ms as Q,ui as R,ps as Rt,bi as S,gn as St,Ii as T,Lo as Tt,ai as U,hs as Ut,ii as V,is as Vt,ri as W,Xo as X,Jo as Y,$s as Z,Ni as _,Ss as _t,Fs as a,Ps as at,Ci as b,Bo as bt,js as c,Ns as ct,Wi as d,Os as dt,Ts as et,le as f,Y as ft,Oi as g,Fo as gt,Bi as h,xs as ht,me as i,Cs as it,gi as j,gs as jt,vi as k,vs as kt,At as l,Ds as lt,zi as m,Is as mt,zs as n,Ls as nt,Ws as o,qo as ot,Us as p,kt as pt,Zo as q,Hs as r,Ho as rt,or as s,_s as st,Bs as t,Es as tt,nr as u,As as ut,Li as v,bs as vt,Ri as w,Ao as wt,Ei as x,Rs as xt,Ct as y,To as yt,li as z,M as zt};
15
+ `}});if(Ft(e))return l.createElement(ht,{title:"Unhandled Thrown Response!"},l.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let o;if(e instanceof Error)o=e;else{let i=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);o=new Error(i)}return l.createElement(ht,{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),r)}a(po,"RemixRootDefaultErrorBoundary");function ht({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){let{routeModules:o}=Q();return o.root?.Layout&&!n?r: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"}},r,t?l.createElement(mo,null):null)))}a(ht,"BoundaryShell");var go=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{go&&(window.__reactRouterVersion="7.18.4")}catch{}function ms({basename:e,children:t,useTransitions:n,window:r}){let o=l.useRef();o.current==null&&(o.current=Mr({window:r,v5Compat:!0}));let i=o.current,[s,u]=l.useState({action:i.action,location:i.location}),c=l.useCallback(d=>{n===!1?u(d):l.startTransition(()=>u(d))},[n]);return l.useLayoutEffect(()=>i.listen(c),[i,c]),l.createElement(en,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,useTransitions:n})}a(ms,"BrowserRouter");function yo({basename:e,children:t,history:n,useTransitions:r}){let[o,i]=l.useState({action:n.action,location:n.location}),s=l.useCallback(u=>{r===!1?i(u):l.startTransition(()=>i(u))},[r]);return l.useLayoutEffect(()=>n.listen(s),[n,s]),l.createElement(en,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:n,useTransitions:r})}a(yo,"HistoryRouter");yo.displayName="unstable_HistoryRouter";var fe=l.forwardRef(a(function({onClick:t,discover:n="render",prefetch:r="none",relative:o,reloadDocument:i,replace:s,mask:u,state:c,target:d,to:m,preventScrollReset:f,viewTransition:g,defaultShouldRevalidate:v,...w},y){let{basename:p,navigator:k,useTransitions:x}=l.useContext(L),I=typeof m=="string"&&He.test(m),$=zt(m,p);m=$.to;let b=va(m,{relative:o}),_=M(),P=null;if(u){let B=Ie(u,[],_.mask?_.mask.pathname:"/",!0);p!=="/"&&(B.pathname=B.pathname==="/"?p:U([p,B.pathname])),P=k.createHref(B)}let[N,A,j]=oo(r,w),K=xo(m,{replace:s,mask:u,state:c,target:d,preventScrollReset:f,relative:o,viewTransition:g,defaultShouldRevalidate:v,useTransitions:x});function T(B){t&&t(B),B.defaultPrevented||K(B)}a(T,"handleClick");let H=!($.isExternal||i),F=l.createElement("a",{...w,...j,href:(H?P:void 0)||$.absoluteURL||b,onClick:H?T:t,ref:ho(y,A),target:d,"data-discover":!I&&n==="render"?"true":void 0});return N&&!I?l.createElement(l.Fragment,null,F,l.createElement(so,{page:b})):F},"LinkWithRef"));fe.displayName="Link";var an=l.forwardRef(a(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:o=!1,style:i,to:s,viewTransition:u,children:c,...d},m){let f=de(s,{relative:d.relative}),g=M(),v=l.useContext(ce),{navigator:w,basename:y}=l.useContext(L),p=v!=null&&$o(f)&&u===!0,k=w.encodeLocation?w.encodeLocation(f).pathname:f.pathname,x=g.pathname,I=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(x=x.toLowerCase(),I=I?I.toLowerCase():null,k=k.toLowerCase()),I&&y&&(I=z(I,y)||I);const $=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let b=x===k||!o&&x.startsWith(k)&&x.charAt($)==="/",_=I!=null&&(I===k||!o&&I.startsWith(k)&&I.charAt(k.length)==="/"),P={isActive:b,isPending:_,isTransitioning:p},N=b?t:void 0,A;typeof r=="function"?A=r(P):A=[r,b?"active":null,_?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let j=typeof i=="function"?i(P):i;return l.createElement(fe,{...d,"aria-current":N,className:A,ref:m,style:j,to:s,viewTransition:u},typeof c=="function"?c(P):c)},"NavLinkWithRef"));an.displayName="NavLink";var vo=l.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:o,state:i,method:s=ge,action:u,onSubmit:c,relative:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g,...v},w)=>{let{useTransitions:y}=l.useContext(L),p=So(),k=bo(u,{relative:d}),x=s.toLowerCase()==="get"?"get":"post",I=typeof u=="string"&&He.test(u),$=a(b=>{if(c&&c(b),b.defaultPrevented)return;b.preventDefault();let _=b.nativeEvent.submitter,P=_?.getAttribute("formmethod")||s,N=a(()=>p(_||b.currentTarget,{fetcherKey:t,method:P,navigate:n,replace:o,state:i,relative:d,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g}),"doSubmit");y&&n!==!1?l.startTransition(()=>N()):N()},"submitHandler");return l.createElement("form",{ref:w,method:x,action:k,onSubmit:r?c:$,...v,"data-discover":!I&&e==="render"?"true":void 0})});vo.displayName="Form";function wo({getKey:e,storageKey:t,...n}){let r=l.useContext(Ce),{basename:o}=l.useContext(L),i=M(),s=Xt();Eo({getKey:e,storageKey:t});let u=l.useMemo(()=>{if(!r||!e)return null;let d=je(i,s,o,e);return d!==i.key?d:null},[]);if(!r||r.isSpaMode)return null;let c=((d,m)=>{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(d)||"{}")[m||window.history.state.key];typeof f=="number"&&window.scrollTo(0,f)}catch{sessionStorage.removeItem(d)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),l.createElement("script",{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${ft(JSON.stringify(t||Ue))}, ${ft(JSON.stringify(u))})`}})}a(wo,"ScrollRestoration");wo.displayName="ScrollRestoration";function on(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}a(on,"getDataRouterConsoleError2");function Ge(e){let t=l.useContext(ee);return C(t,on(e)),t}a(Ge,"useDataRouterContext3");function ko(e){let t=l.useContext(ce);return C(t,on(e)),t}a(ko,"useDataRouterState2");function xo(e,{target:t,replace:n,mask:r,state:o,preventScrollReset:i,relative:s,viewTransition:u,defaultShouldRevalidate:c,useTransitions:d}={}){let m=Re(),f=M(),g=de(e,{relative:s});return l.useCallback(v=>{if(Ha(v,t)){v.preventDefault();let w=n!==void 0?n:V(f)===V(g),y=a(()=>m(e,{replace:w,mask:r,state:o,preventScrollReset:i,relative:s,viewTransition:u,defaultShouldRevalidate:c}),"doNavigate");d?l.startTransition(()=>y()):y()}},[f,m,g,n,r,o,t,e,i,s,u,c,d])}a(xo,"useLinkClickHandler");function hs(e){D(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)),n=l.useRef(!1),r=M(),o=l.useMemo(()=>Wa(r.search,n.current?null:t.current),[r.search]),i=Re();return[o,l.useCallback((s,u)=>{const c=Ne(typeof s=="function"?s(new URLSearchParams(o)):s);n.current=!0,i("?"+c,u)},[i,o])]}a(hs,"useSearchParams");var Io=0,Ro=a(()=>`__${String(++Io)}__`,"getUniqueFetcherId");function So(){let{router:e}=Ge("useSubmit"),{basename:t}=l.useContext(L),n=La(),r=e.fetch,o=e.navigate;return l.useCallback(async(i,s={})=>{let{action:u,method:c,encType:d,formData:m,body:f}=Qa(i,t);if(s.navigate===!1){let g=s.fetcherKey||Ro();await r(g,n,s.action||u,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:m,body:f,formMethod:s.method||c,formEncType:s.encType||d,flushSync:s.flushSync})}else await o(s.action||u,{defaultShouldRevalidate:s.defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:m,body:f,formMethod:s.method||c,formEncType:s.encType||d,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,o,t,n])}a(So,"useSubmit");function bo(e,{relative:t}={}){let{basename:n}=l.useContext(L),r=l.useContext(O);C(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...de(e||".",{relative:t})},s=M();if(e==null){i.search=s.search;let u=new URLSearchParams(i.search),c=u.getAll("index");if(c.some(d=>d==="")){u.delete("index"),c.filter(m=>m).forEach(m=>u.append("index",m));let d=u.toString();i.search=d?`?${d}`:""}}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:U([n,i.pathname])),V(i)}a(bo,"useFormAction");var Ue="react-router-scroll-positions",pe={};function je(e,t,n,r){let o=null;return r&&(n!=="/"?o=r({...e,pathname:z(e.pathname,n)||e.pathname},t):o=r(e,t)),o==null&&(o=e.key),o}a(je,"getScrollRestorationKey");function Eo({getKey:e,storageKey:t}={}){let{router:n}=Ge("useScrollRestoration"),{restoreScrollPosition:r,preventScrollReset:o}=ko("useScrollRestoration"),{basename:i}=l.useContext(L),s=M(),u=Xt(),c=Pa();l.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),Co(l.useCallback(()=>{if(c.state==="idle"){let d=je(s,u,i,e);pe[d]=window.scrollY}try{sessionStorage.setItem(t||Ue,JSON.stringify(pe))}catch(d){D(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${d}).`)}window.history.scrollRestoration="auto"},[c.state,e,i,s,u,t])),typeof document<"u"&&(l.useLayoutEffect(()=>{try{let d=sessionStorage.getItem(t||Ue);d&&(pe=JSON.parse(d))}catch{}},[t]),l.useLayoutEffect(()=>{let d=n?.enableScrollRestoration(pe,()=>window.scrollY,e?(m,f)=>je(m,f,i,e):void 0);return()=>d&&d()},[n,i,e]),l.useLayoutEffect(()=>{if(r!==!1){if(typeof r=="number"){window.scrollTo(0,r);return}try{if(s.hash){let d=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(d){d.scrollIntoView();return}}}catch{D(!1,`"${s.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}o!==!0&&window.scrollTo(0,0)}},[s,r,o]))}a(Eo,"useScrollRestoration");function ps(e,t){let{capture:n}=t||{};l.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("beforeunload",e,r),()=>{window.removeEventListener("beforeunload",e,r)}},[e,n])}a(ps,"useBeforeUnload");function Co(e,t){let{capture:n}=t||{};l.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,n])}a(Co,"usePageHide");function $o(e,{relative:t}={}){let n=l.useContext(Vt);C(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ge("useViewTransitionState"),o=de(e,{relative:t});if(!n.isTransitioning)return!1;let i=z(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=z(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ve(o.pathname,s)!=null||ve(o.pathname,i)!=null}a($o,"useViewTransitionState");var pt=60,Fe=3600,ke=24*Fe,gt=7*ke,yt=30*ke;function _o(e){const t=Date.now(),n=new Date(e).getTime(),r=Math.round((t-n)/1e3);return r<pt?"just now":r<Fe?`${Math.floor(r/pt)}m ago`:r<ke?`${Math.floor(r/Fe)}h ago`:r<gt?`${Math.floor(r/ke)}d ago`:r<yt?`${Math.floor(r/gt)}w ago`:`${Math.floor(r/yt)}mo ago`}a(_o,"timeAgo");var Ao=[{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"}]}],sn=new Map(Ao.flatMap(e=>e.views.map(t=>[t.key,t]))),ln="mine",Lo="view",Po="paperclip:tasks:last-view";function Do(e){return typeof e=="string"&&sn.has(e)}a(Do,"isTaskViewKey");function un(e){return sn.get(e)}a(un,"taskView");function Xe(e){return Do(e)?e:null}a(Xe,"normalizeTaskViewKey");var vt={mine:"mine",unread:"unread",blocked:"blocked",recent:"recent",all:"everything"};function gs(e){return e&&e in vt?vt[e]:ln}a(gs,"taskViewForInboxTab");function ys(){try{return Xe(window.localStorage.getItem("paperclip:tasks:last-view"))??"mine"}catch{return ln}}a(ys,"loadLastTaskView");function vs(e){try{window.localStorage.setItem(Po,e)}catch{}}a(vs,"saveLastTaskView");var ws=["assignee","workspace","participantAgentId","q"];function ks(e,t,n){const r=Xe(e);return t&&(!r||un(r).surface==="inbox")?"all":r??n}a(ks,"resolveInitialTaskView");var cn="from",dn="fromHref",fn="paperclip:issue-detail-breadcrumb:";function mn(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.label=="string"&&typeof t.href=="string"}a(mn,"isIssueDetailBreadcrumb");function hn(e){return e==="issues"||e==="inbox"}a(hn,"isIssueDetailSource");function pn(e){if(typeof e!="object"||e===null)return!1;const t=e,n=t.originKind===void 0||typeof t.originKind=="string",r=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")&&n&&r}a(pn,"isIssueDetailHeaderSeed");function Mo(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(Mo,"createIssueDetailHeaderSeed");function gn(e,t){const n=Mo(t);return typeof e!="object"||e===null?{issueDetailHeaderSeed:n}:{...e,issueDetailHeaderSeed:n}}a(gn,"withIssueDetailHeaderSeed");function To(e){if(typeof e!="object"||e===null)return null;const t=e.issueDetailHeaderSeed;return pn(t)?t:null}a(To,"readIssueDetailHeaderSeed");function Oo(e){if(!e)return null;const t=new URLSearchParams(e).get(cn);return hn(t)?t:null}a(Oo,"readIssueDetailSourceFromSearch");function No(e){if(!e)return null;const t=new URLSearchParams(e).get(dn);return t&&t.startsWith("/")?t:null}a(No,"readIssueDetailBreadcrumbHrefFromSearch");function Uo(e){const t=e.slice(e.indexOf("?")+1);if(!e.includes("?"))return!1;const n=new URLSearchParams(t).get(Lo),r=Xe(n);return r!==null&&un(r).surface==="inbox"}a(Uo,"isInboxBackedTaskViewHref");function yn(e,t){return hn(e?.issueDetailSource)?e.issueDetailSource:t?t.href.includes("/inbox")||Uo(t.href)||t.label==="Inbox"?"inbox":t.label==="Tasks"||t.href.includes("/issues")?"issues":null:null}a(yn,"inferIssueDetailSource");function wt(e){return e==="inbox"?{label:"Inbox",href:"/inbox"}:{label:"Tasks",href:"/issues"}}a(wt,"breadcrumbForSource");function xs(e,t,n){return{issueDetailBreadcrumb:{label:e,href:t},issueDetailSource:n}}a(xs,"createIssueDetailLocationState");function Is(e){return typeof e!="object"||e===null?{issueDetailInboxQuickArchiveArmed:!0}:{...e,issueDetailInboxQuickArchiveArmed:!0}}a(Is,"armIssueDetailInboxQuickArchive");function jo(e){if(typeof window>"u"||!window.sessionStorage)return null;const t=window.sessionStorage.getItem(`${fn}${e}`);if(!t)return null;try{const n=JSON.parse(t),r=mn(n.issueDetailBreadcrumb)?n.issueDetailBreadcrumb:null,o=yn(n,r);if(!r||!o)return null;const i=pn(n.issueDetailHeaderSeed)?n.issueDetailHeaderSeed:void 0;return{issueDetailBreadcrumb:r,issueDetailSource:o,issueDetailInboxQuickArchiveArmed:n.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:i}}catch{return null}}a(jo,"readStoredIssueDetailLocationState");function vn(e,t){if(typeof e=="object"&&e!==null){const o=e.issueDetailBreadcrumb;if(mn(o)){const i=yn(e,o);if(!i)return null;const s=To(e)??void 0;return{issueDetailBreadcrumb:o,issueDetailSource:i,issueDetailInboxQuickArchiveArmed:e.issueDetailInboxQuickArchiveArmed===!0,issueDetailHeaderSeed:s}}}const n=Oo(t),r=No(t);return n?{issueDetailBreadcrumb:r?{...wt(n),href:r}:wt(n),issueDetailSource:n,issueDetailInboxQuickArchiveArmed:!1}:null}a(vn,"normalizeIssueDetailLocationState");function Rs(e,t,n){if(typeof window>"u"||!window.sessionStorage)return;const r=vn(t,n);r&&window.sessionStorage.setItem(`${fn}${e}`,JSON.stringify(r))}a(Rs,"rememberIssueDetailLocationState");function Fo(e){return`/issues/${e}`}a(Fo,"createIssueDetailPath");function Ss(e){if(!e)return!1;const t=new URLSearchParams(e);return t.has(cn)||t.has(dn)}a(Ss,"hasLegacyIssueDetailQuery");function Bo(e,t,n){const r=vn(t,n);return r||(e?jo(e):null)}a(Bo,"readIssueDetailLocationState");function bs(e,t,n){return Bo(e,t,n)?.issueDetailBreadcrumb??null}a(bs,"readIssueDetailBreadcrumb");var kt=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 xt(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e,n=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;return typeof t.id=="string"&&n.test(t.id)&&typeof t.issueId=="string"&&n.test(t.issueId)&&typeof t.body=="string"}a(xt,"hasCommentReceipt");async function It(e,t){try{const n=await e;if(!t(n))throw new kt;return n}catch(n){throw n instanceof hr&&n.status<500?n:new kt}}a(It,"confirmedCommentResponse");function Rt(e){const t=new URLSearchParams;return e?.attention&&t.set("attention",e.attention),e?.status&&t.set("status",e.status),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?.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(Rt,"issueListSearchParams");var Y={listAll:a(async(e,t,n)=>{const o=new Map;let i;for(;;){const s=await Y.list(e,{...t,limit:500,sortField:"id",sortDir:"asc",afterId:i},n);for(const u of s)o.set(u.id,u);if(s.length<500)return[...o.values()];i=s[s.length-1].id}},"listAll"),list:a((e,t,n)=>{const r=Rt(t).toString(),o=`/companies/${e}/issues${r?`?${r}`:""}`;return n?h.get(o,n):h.get(o)},"list"),listCompact:a((e,t,n)=>{const r=Rt(t);r.set("view","compact");const o=`/companies/${e}/issues?${r.toString()}`;return n?h.get(o,n):h.get(o)},"listCompact"),count:a((e,t)=>{const n=new URLSearchParams;return n.set("attention",t.attention),t.status&&n.set("status",t.status),t.assigneeAgentId&&n.set("assigneeAgentId",t.assigneeAgentId),t.assigneeUserId&&n.set("assigneeUserId",t.assigneeUserId),t.projectId&&n.set("projectId",t.projectId),t.labelId&&n.set("labelId",t.labelId),t.q&&n.set("q",t.q),h.get(`/companies/${e}/issues/count?${n.toString()}`)},"count"),listLabels:a(e=>h.get(`/companies/${e}/labels`),"listLabels"),createLabel:a((e,t)=>h.post(`/companies/${e}/labels`,t),"createLabel"),deleteLabel:a(e=>h.delete(`/labels/${e}`),"deleteLabel"),get:a((e,t)=>t?h.get(`/issues/${e}`,t):h.get(`/issues/${e}`),"get"),getRunnerGoal:a((e,t)=>{const n=t?`?agentId=${encodeURIComponent(t)}`:"";return h.get(`/issues/${e}/runner-goal${n}`)},"getRunnerGoal"),actOnRunnerGoal:a((e,t)=>h.post(`/issues/${e}/runner-goal/actions`,t),"actOnRunnerGoal"),getModelOverride:a(e=>h.get(`/issues/${e}/model-override`),"getModelOverride"),setModelOverride:a((e,t)=>h.put(`/issues/${e}/model-override`,t),"setModelOverride"),getWatchdog:a(e=>h.get(`/issues/${e}/watchdog`),"getWatchdog"),upsertWatchdog:a((e,t)=>h.put(`/issues/${e}/watchdog`,t),"upsertWatchdog"),deleteWatchdog:a(e=>h.delete(`/issues/${e}/watchdog`),"deleteWatchdog"),markRead:a(e=>h.post(`/issues/${e}/read`,{}),"markRead"),markUnread:a(e=>h.delete(`/issues/${e}/read`),"markUnread"),archiveFromInbox:a(e=>h.post(`/issues/${e}/inbox-archive`,{}),"archiveFromInbox"),unarchiveFromInbox:a(e=>h.delete(`/issues/${e}/inbox-archive`),"unarchiveFromInbox"),setTitle:a((e,t)=>h.put(`/issues/${e}/title`,t),"setTitle"),create:a((e,t)=>h.post(`/companies/${e}/issues`,t),"create"),update:a((e,t)=>{const n=h.patch(`/issues/${e}`,t);return typeof t.comment=="string"?It(n,r=>xt(r?.comment)):n},"update"),decideStalledReview:a((e,t)=>h.post(`/issues/${e}/stalled-review-decision`,t),"decideStalledReview"),retryWorkspaceExport:a((e,t)=>h.post(`/issues/${e}/recovery-actions/retry-workspace-export`,t),"retryWorkspaceExport"),resolveRecoveryAction:a((e,t)=>h.post(`/issues/${e}/recovery-actions/resolve`,t),"resolveRecoveryAction"),previewTreeControl:a((e,t)=>h.post(`/issues/${e}/tree-control/preview`,t),"previewTreeControl"),createTreeHold:a((e,t)=>h.post(`/issues/${e}/tree-holds`,t),"createTreeHold"),getTreeHold:a((e,t)=>h.get(`/issues/${e}/tree-holds/${t}`),"getTreeHold"),listTreeHolds:a((e,t)=>{const n=new URLSearchParams;t?.status&&n.set("status",t.status),t?.mode&&n.set("mode",t.mode),t?.includeMembers&&n.set("includeMembers","true");const r=n.toString();return h.get(`/issues/${e}/tree-holds${r?`?${r}`:""}`)},"listTreeHolds"),getTreeControlState:a(e=>h.get(`/issues/${e}/tree-control/state`),"getTreeControlState"),releaseTreeHold:a((e,t,n)=>h.post(`/issues/${e}/tree-holds/${t}/release`,n),"releaseTreeHold"),checkMonitorNow:a(e=>h.post(`/issues/${e}/monitor/check-now`,{}),"checkMonitorNow"),retryScheduledRetryNow:a(e=>h.post(`/issues/${e}/scheduled-retry/retry-now`,{}),"retryScheduledRetryNow"),remove:a(e=>h.delete(`/issues/${e}`),"remove"),checkout:a((e,t)=>h.post(`/issues/${e}/checkout`,{agentId:t,expectedStatuses:["todo","backlog","blocked","in_review"]}),"checkout"),release:a(e=>h.post(`/issues/${e}/release`,{}),"release"),listComments:a((e,t)=>{const n=new URLSearchParams;t?.after&&n.set("after",t.after),t?.order&&n.set("order",t.order),t?.limit&&n.set("limit",String(t.limit));const r=n.toString();return h.get(`/issues/${e}/comments${r?`?${r}`:""}`)},"listComments"),getQueuedComments:a(e=>h.get(`/issues/${e}/queued-comments`),"getQueuedComments"),editQueuedComment:a((e,t,n)=>h.patch(`/issues/${e}/queued-comments/${t}`,n),"editQueuedComment"),reorderQueuedComments:a((e,t)=>h.put(`/issues/${e}/queued-comments/order`,t),"reorderQueuedComments"),interruptQueuedComments:a((e,t)=>h.post(`/issues/${e}/queued-comments/interrupt`,t),"interruptQueuedComments"),interruptLatestQueuedComments:a(async(e,t)=>{const n=await Y.getQueuedComments(e);if(!n.queueId||n.targetRunId&&n.targetRunId!==t)throw new Error("The queued messages changed. Refresh and try again.");return Y.interruptQueuedComments(e,{queueId:n.queueId,revision:n.revision,targetRunId:n.targetRunId})},"interruptLatestQueuedComments"),steerQueuedComment:a((e,t,n)=>h.post(`/issues/${e}/queued-comments/${t}/steer`,n),"steerQueuedComment"),discardQueuedComment:a((e,t,n)=>h.delete(`/issues/${e}/queued-comments/${t}`,n),"discardQueuedComment"),listInteractions:a(e=>h.get(`/issues/${e}/interactions`),"listInteractions"),listAcceptedPlanDecompositions:a(e=>h.get(`/issues/${e}/accepted-plan-decompositions`),"listAcceptedPlanDecompositions"),createInteraction:a((e,t)=>h.post(`/issues/${e}/interactions`,t),"createInteraction"),acceptInteraction:a((e,t,n)=>h.post(`/issues/${e}/interactions/${t}/accept`,n??{}),"acceptInteraction"),rejectInteraction:a((e,t,n)=>h.post(`/issues/${e}/interactions/${t}/reject`,n?{reason:n}:{}),"rejectInteraction"),cancelInteraction:a((e,t,n)=>h.post(`/issues/${e}/interactions/${t}/cancel`,n?{reason:n}:{}),"cancelInteraction"),skipInteraction:a((e,t,n)=>h.post(`/issues/${e}/interactions/${t}/skip`,n?{reason:n}:{}),"skipInteraction"),respondToInteraction:a((e,t,n)=>h.post(`/issues/${e}/interactions/${t}/respond`,n),"respondToInteraction"),submitInteractionVerdicts:a((e,t,n)=>h.post(`/issues/${e}/interactions/${t}/verdicts`,{verdicts:n}),"submitInteractionVerdicts"),getComment:a((e,t)=>h.get(`/issues/${e}/comments/${t}`),"getComment"),listFeedbackVotes:a(e=>h.get(`/issues/${e}/feedback-votes`),"listFeedbackVotes"),getCostSummary:a((e,t={})=>{const n=t.excludeRoot?"?excludeRoot=true":"";return h.get(`/issues/${e}/cost-summary${n}`)},"getCostSummary"),listFeedbackTraces:a((e,t)=>{const n=new URLSearchParams;for(const[o,i]of Object.entries(t??{}))i!==void 0&&n.set(o,String(i));const r=n.toString();return h.get(`/issues/${e}/feedback-traces${r?`?${r}`:""}`)},"listFeedbackTraces"),upsertFeedbackVote:a((e,t)=>h.post(`/issues/${e}/feedback-votes`,t),"upsertFeedbackVote"),addComment:a((e,t,n,r,o,i,s)=>It(h.post(`/issues/${e}/comments`,{body:t,...i?{clientRequestId:i}:{},...n===void 0?{}:{reopen:n},...r===void 0?{}:{interrupt:r},...o?.length?{attachmentIds:o}:{},...s===void 0?{}:{deliver:s}}),xt),"addComment"),cancelComment:a((e,t)=>h.delete(`/issues/${e}/comments/${t}?mode=cancel`),"cancelComment"),deleteComment:a((e,t)=>h.delete(`/issues/${e}/comments/${t}`),"deleteComment"),listDocuments:a((e,t)=>h.get(`/issues/${e}/documents${t?.includeSystem?"?includeSystem=true":""}`),"listDocuments"),getDocument:a((e,t)=>h.get(`/issues/${e}/documents/${encodeURIComponent(t)}`),"getDocument"),getDocumentPdf:a((e,t)=>h.getBlob(`/issues/${e}/documents/${encodeURIComponent(t)}/pdf`),"getDocumentPdf"),upsertDocument:a((e,t,n)=>h.put(`/issues/${e}/documents/${encodeURIComponent(t)}`,n),"upsertDocument"),lockDocument:a((e,t)=>h.post(`/issues/${e}/documents/${encodeURIComponent(t)}/lock`,{}),"lockDocument"),unlockDocument:a((e,t)=>h.post(`/issues/${e}/documents/${encodeURIComponent(t)}/unlock`,{}),"unlockDocument"),listDocumentRevisions:a((e,t)=>h.get(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions`),"listDocumentRevisions"),restoreDocumentRevision:a((e,t,n)=>h.post(`/issues/${e}/documents/${encodeURIComponent(t)}/revisions/${n}/restore`,{}),"restoreDocumentRevision"),deleteDocument:a((e,t)=>h.delete(`/issues/${e}/documents/${encodeURIComponent(t)}`),"deleteDocument"),listAttachments:a(e=>h.get(`/issues/${e}/attachments`),"listAttachments"),uploadAttachment:a((e,t,n,r)=>{const o=new FormData;return o.append("file",n),r&&o.append("issueCommentId",r),h.postForm(`/companies/${e}/issues/${t}/attachments`,o)},"uploadAttachment"),deleteAttachment:a(e=>h.delete(`/attachments/${e}`),"deleteAttachment"),listApprovals:a(e=>h.get(`/issues/${e}/approvals`),"listApprovals"),linkApproval:a((e,t)=>h.post(`/issues/${e}/approvals`,{approvalId:t}),"linkApproval"),unlinkApproval:a((e,t)=>h.delete(`/issues/${e}/approvals/${t}`),"unlinkApproval"),listWorkProducts:a((e,t)=>h.get(`/issues/${e}/work-products${t?.refreshPullRequests?"?refreshPullRequests=true":""}`),"listWorkProducts"),ensureWorkProductReviewDocument:a((e,t)=>h.post(`/issues/${e}/work-products/${t}/review-document`,{}),"ensureWorkProductReviewDocument"),createWorkProduct:a((e,t)=>h.post(`/issues/${e}/work-products`,t),"createWorkProduct"),updateWorkProduct:a((e,t)=>h.patch(`/work-products/${e}`,t),"updateWorkProduct"),deleteWorkProduct:a(e=>h.delete(`/work-products/${e}`),"deleteWorkProduct")};function X(e){return new Date(e).getTime()}a(X,"toTimestamp");function zo(){const e=globalThis.crypto?.randomUUID?.();return e?`optimistic-${e}`:`optimistic-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}a(zo,"createOptimisticCommentId");function Ze(e){return[...e].sort((t,n)=>{const r=X(t.createdAt)-X(n.createdAt);return r!==0?r:t.id.localeCompare(n.id)})}a(Ze,"sortIssueComments");function St(e){return Ze(e).reverse()}a(St,"sortIssueCommentsDesc");function Es(e){const t=new Date,n=zo();return{id:n,clientId:n,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(Es,"createOptimisticIssueComment");function Cs(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?X(e.comment.createdAt)>=X(e.activeRunStartedAt):!1}a(Cs,"isQueuedIssueComment");function $s(e,t){const n=t.queuedTargetRunId??null;return!n||!t.targetRunIsLive||t.runningRunId&&t.runningRunId!==n?e:{...e,clientStatus:"queued",queueState:"queued",queueTargetRunId:n}}a($s,"applyLocalQueuedIssueCommentState");function _s(e,t){const n=e??[],r=[...n],o=new Set(r.map(s=>s.id)),i=new Set;for(const s of t){if(o.has(s.id))continue;const u=n.find(c=>!i.has(c.id)&&c.issueId===s.issueId&&c.authorType===s.authorType&&c.authorUserId===s.authorUserId&&c.body===s.body&&Math.abs(X(c.createdAt)-X(s.createdAt))<=6e4);if(u){i.add(u.id);const c={...u,clientId:s.clientId};r[r.findIndex(d=>d.id===u.id)]=c;continue}r.push(s)}return Ze(r)}a(_s,"mergeIssueComments");function As(e,t){const n=e.findIndex(r=>r.clientId===t);return n===-1?{comments:e,comment:null}:{comments:e.filter(r=>r.clientId!==t),comment:e[n]??null}}a(As,"takeOptimisticIssueComment");function Ls(e){return Ze((e??[]).flatMap(t=>t))}a(Ls,"flattenIssueCommentPages");function Ho(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}a(Ho,"getNextIssueCommentPageParam");function bt(e,t){if(!(!e||e.length<t))return e[e.length-1]?.id}a(bt,"getNextPageCursor");async function Ps(e){const t=(e.pages??[]).map(s=>[...s]),n=e.pageParams?[...e.pageParams].slice(0,t.length):t.map(()=>null);for(;n.length<t.length;)n.push(null);if(e.pageSize<=0)return{pages:t,pageParams:n};let r=bt(t[t.length-1],e.pageSize);const o=Math.max(0,e.maxPages??Number.POSITIVE_INFINITY),i=new Set;for(;r&&!i.has(r)&&i.size<o;){i.add(r);const s=[...await e.fetchPage(r)];t.push(s),n.push(r),r=bt(s,e.pageSize)}return{pages:t,pageParams:n}}a(Ps,"loadRemainingIssueCommentPages");function Ds(e){return e.activeDetailTab!=="chat"||!e.hasOlderComments||e.initialPageLoading||e.olderPageLoading||e.loadedCommentCount===0?!1:e.loadedCommentCount<e.autoLoadLimit}a(Ds,"shouldAutoloadOlderIssueComments");function Ms(e,t){if(!e)return e;const n={...e};return t.reopen===!0&&(e.status==="done"||e.status==="cancelled"||e.status==="blocked")&&(n.status="todo"),t.reassignment&&(n.assigneeAgentId=t.reassignment.assigneeAgentId,n.assigneeUserId=t.reassignment.assigneeUserId),n}a(Ms,"applyOptimisticIssueCommentUpdate");function Wo(e,t){if(!e)return e;const n={...e,updatedAt:new Date},r=a(i=>Object.prototype.hasOwnProperty.call(t,i),"hasOwn"),o=a(i=>{r(i)&&(n[i]=t[i])},"assign");if(o("status"),o("priority"),o("assigneeAgentId"),o("assigneeUserId"),o("projectId"),o("parentId"),o("projectWorkspaceId"),o("executionWorkspaceId"),o("executionWorkspacePreference"),o("executionWorkspaceSettings"),o("hiddenAt"),r("labelIds")&&Array.isArray(t.labelIds)){const i=t.labelIds.filter(s=>typeof s=="string");n.labelIds=i,e.labels&&(n.labels=e.labels.filter(s=>i.includes(s.id)))}if(r("blockedByIssueIds")&&Array.isArray(t.blockedByIssueIds)&&e.blockedBy){const i=new Set(t.blockedByIssueIds.filter(s=>typeof s=="string"));n.blockedBy=e.blockedBy.filter(s=>i.has(s.id))}return r("projectId")&&(n.project=e.project?.id===n.projectId?e.project:null),r("parentId")&&(n.ancestors=void 0),r("executionWorkspaceId")&&(n.currentExecutionWorkspace=e.currentExecutionWorkspace?.id===n.executionWorkspaceId?e.currentExecutionWorkspace:null),n}a(Wo,"applyOptimisticIssueFieldUpdate");function qo(e,t){const n=t instanceof Set?t:new Set(t);return n.has(e.id)||!!e.identifier&&n.has(e.identifier)}a(qo,"matchesIssueRef$1");function Ts(e,t,n){if(!e)return e;let r=!1;const o=e.map(i=>qo(i,t)?(r=!0,Wo(i,n)??i):i);return r?o:e}a(Ts,"applyOptimisticIssueFieldUpdateToCollection");function Os(e,t){if(!e||e.length===0)return[[t]];const n=e.map(r=>[...r]);for(let r=0;r<n.length;r+=1){const o=n[r].findIndex(i=>i.id===t.id);if(o!==-1)return n[r][o]=t,n[r]=St(n[r]),n}return n[0]=St([...n[0],t]),n}a(Os,"upsertIssueCommentInPages");function Ns(e,t){return!e||e.length===0?[]:e.map(n=>n.filter(r=>r.id!==t)).filter(n=>n.length>0)}a(Ns,"removeIssueCommentFromPages");var Vo=["issues","detail"],wn=6e4,Qo=3e4;function ie(e){return typeof e=="string"&&e.length>0}a(ie,"isNonEmptyString");function kn(e,t){const n=new Set;return ie(e)&&n.add(e),ie(t?.id)&&n.add(t.id),ie(t?.identifier)&&n.add(t.identifier),Array.from(n)}a(kn,"collectIssueRefs");function Ko(e,t){const n=t instanceof Set?t:new Set(t);return n.has(e.id)||!!e.identifier&&n.has(e.identifier)}a(Ko,"matchesIssueRef");function xe(e){if(typeof e!="object"||e===null)return!1;const t=e;return ie(t.id)&&ie(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(xe,"isCompleteIssueSnapshot");function Et(e,t){return e?{...e,...t}:t}a(Et,"mergeIssueSnapshots");function xn(e,t,n){const r=kn(t,n);for(const o of r){const i=e.getQueryData(ue.issues.detail(o));if(xe(i))return i}return e.getQueriesData({queryKey:Vo}).map(([,o])=>o).find(o=>xe(o)&&Ko(o,r))}a(xn,"getCachedIssueDetail");function In(e,t,n){if(!xe(t))return t;const r=kn(n?.issueRef,t),o=Et(xn(e,n?.issueRef,t),t);for(const i of r)e.setQueryData(ue.issues.detail(i),s=>Et(s,o));return o}a(In,"seedIssueDetailCache");async function Rn(e,t,n){return In(e,n?await Y.get(t,n):await Y.get(t),{issueRef:t})}a(Rn,"fetchIssueDetail");function Jo(e,t,n){return{queryKey:ue.issues.detail(t),queryFn:a(({signal:r})=>Rn(e,t,{signal:r}),"queryFn"),placeholderData:xn(e,t,n?.placeholderIssue??void 0)}}a(Jo,"getIssueDetailQueryOptions");function Yo(e,t,n){return xe(n?.issue)&&In(e,n.issue,{issueRef:t}),e.prefetchQuery({queryKey:ue.issues.detail(t),queryFn:a(()=>Rn(e,t),"queryFn"),staleTime:wn})}a(Yo,"prefetchIssueDetail");function Go(e,t){return e.prefetchInfiniteQuery({queryKey:ue.issues.comments(t),queryFn:a(({pageParam:n})=>Y.listComments(t,{order:"desc",limit:50,...n?{after:n}:{}}),"queryFn"),initialPageParam:null,getNextPageParam:a(n=>Ho(n,50),"getNextPageParam"),staleTime:Qo,pages:1})}a(Go,"prefetchIssueComments");function Xo(e,t,n){return Promise.all([Yo(e,t,n),Go(e,n?.issue?.id??t)])}a(Xo,"prefetchIssueDetailForNavigation");var Sn={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"}]]};Sn.node;var Zo=S(Sn),bn={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"}]]};bn.node;var ei=S(bn),En={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"}]]};En.node;var ti=S(En),Cn={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"}]]};Cn.node;var ni=S(Cn),$n={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"}]]};$n.node;var ri=S($n),_n={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"}]]};_n.node;var ai=S(_n),An={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"}]]};An.node;var oi=S(An),Ln={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"}]]};Ln.node;var ii=S(Ln),Pn={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"}]]};Pn.node;var si=S(Pn),Dn={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"}]]};Dn.node;var li=S(Dn),Mn={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"}]]};Mn.node;var ui=S(Mn),Tn={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"}]]};Tn.node;var ci=S(Tn),On={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"}]]};On.node;var di=S(On),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 fi=S(Nn),Un={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"]};Un.node;var mi=S(Un),jn={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"}]]};jn.node;var hi=S(jn),Fn={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"}]]};Fn.node;var pi=S(Fn),Bn={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"}]]};Bn.node;var gi=S(Bn),zn={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"}]]};zn.node;var yi=S(zn),Hn={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"}]]};Hn.node;var vi=S(Hn),Wn={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"}]]};Wn.node;var wi=S(Wn),qn={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"}]]};qn.node;var ki=S(qn),Vn={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"}]]};Vn.node;var xi=S(Vn),Qn={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"}]]};Qn.node;var Ii=S(Qn),Kn={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"}]]};Kn.node;var Ri=S(Kn),Jn={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"}]]};Jn.node;var Si=S(Jn),Yn={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"}]]};Yn.node;var bi=S(Yn),Gn={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"}]]};Gn.node;var Ei=S(Gn),Xn={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"}]]};Xn.node;var Ci=S(Xn),Ct={folder:Ar,rocket:xi,code:br,terminal:Er,database:ii,globe:ci,package:vi,boxes:wr,box:ei,layers:mi,briefcase:ni,compass:ai,target:Si,flame:li,zap:Ci,star:Ri,bug:Lr,wrench:Ei,hammer:di,lightbulb:hi,sparkles:_r,shield:Ii,lock:pi,search:Sr,cog:ri,brain:ti,cpu:xr,"git-branch":ui,"file-code":si,puzzle:wi,gem:Cr,atom:Zo,heart:kr,mail:gi,"message-square":yi,crown:oi,radar:ki,telescope:bi,hexagon:fi},$i="folder";function _i(e){return e&&fr.includes(e)?Ct[e]:Ct[$i]}a(_i,"getProjectIcon");var R=Lt(pr(),1),Ai={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 Li({color:e,icon:t,size:n="md",className:r}){const o=Ai[n],i=!!e,s=_i(t);return(0,R.jsx)("span",{"aria-hidden":!0,className:ze("inline-flex shrink-0 items-center justify-center",o.box,i?"text-white":"bg-muted text-muted-foreground",r),style:i?{backgroundColor:e??void 0}:void 0,children:(0,R.jsx)(s,{className:o.icon})})}a(Li,"ProjectTile");var se=null,Be=new Set;function Zn(){for(const e of Be)e()}a(Zn,"emitQuicklookChange");function $t(e){se!==e&&(se=e,Zn())}a($t,"openQuicklookId");function _t(e){se===e&&(se=null,Zn())}a(_t,"closeQuicklookId");function Pi(e){return Be.add(e),()=>{Be.delete(e)}}a(Pi,"subscribeQuicklook");function Di(e){return l.useSyncExternalStore(Pi,()=>se===e,()=>!1)}a(Di,"useIsQuicklookOpen");var Mi=120,Ti=13,Oi="w-72 p-3";function Ni(e="start"){return e==="start"?-13:e==="end"?Ti:0}a(Ni,"quicklookAlignOffset");function Ui(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(Ui,"summarizeIssueDescription");function ji({className:e}){return(0,R.jsx)("span",{className:ze("text-xs",e),"aria-hidden":!0,children:"·"})}a(ji,"QuicklookSeparator");function Fi(e){const t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}a(Fi,"statusLabel");function Bi({issue:e,linkTo:t,linkState:n,compact:r=!1}){const o=(0,l.useMemo)(()=>Ui(e.description),[e.description]),i=e.project?.name;return(0,R.jsxs)("div",{className:ze("space-y-2",r&&"space-y-1.5"),children:[(0,R.jsxs)("div",{className:"flex items-center gap-1",children:[(0,R.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1",children:[(0,R.jsx)(Pr,{status:e.status,size:"md",title:Fi(e.status)}),(0,R.jsx)("span",{className:"shrink-0 font-mono text-(length:--text-micro) text-muted-foreground",children:e.identifier??e.id.slice(0,8)}),i?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(ji,{className:"shrink-0 text-muted-foreground"}),(0,R.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:i,"data-testid":"quicklook-project",children:[(0,R.jsx)(Li,{size:"xs"}),(0,R.jsx)("span",{className:"truncate",children:i})]})]}):null]}),(0,R.jsx)("span",{className:"shrink-0 text-(length:--text-micro) text-muted-foreground",children:_o(new Date(e.updatedAt))})]}),(0,R.jsx)(fe,{to:t,state:n??gn(null,e),className:"block text-sm font-medium leading-snug hover:underline line-clamp-2",children:e.title}),o?(0,R.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(Bi,"IssueQuicklookCard");var zi=l.forwardRef(a(function({issuePathId:t,to:n,children:r,className:o,state:i,disableIssueQuicklook:s=!1,issuePrefetch:u=null,issueQuicklookSide:c="top",issueQuicklookAlign:d="start",onClick:m,onClickCapture:f,onMouseEnter:g,onFocus:v,onBlur:w,onTouchStart:y,...p},k){const x=mr(),I=l.useMemo(()=>Symbol("issue-quicklook"),[]),$=Di(I),b=l.useRef(null),_=l.useRef(null),P=l.useRef(null),N=l.useCallback(E=>{_.current=E,typeof k=="function"?k(E):k&&(k.current=E)},[k]),A=l.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null)},[]),j=l.useCallback(()=>{A(),$t(I)},[A,I]),K=l.useCallback(()=>{A(),b.current=setTimeout(()=>{b.current=null,$t(I)},Mi)},[A,I]),T=l.useCallback(()=>{A(),_t(I)},[A,I]);l.useEffect(()=>()=>{A(),_t(I)},[A,I]),l.useEffect(()=>{if(!$)return;const E=12,nt=a((q,ae,J)=>{if(!q)return!1;const W=q.getBoundingClientRect();return ae>=W.left-E&&ae<=W.right+E&&J>=W.top-E&&J<=W.bottom+E},"nearBox"),ur=a((q,ae)=>{const J=_.current,W=P.current;if(J?.matches(":hover")||W?.matches(":hover")||nt(J,q,ae)||nt(W,q,ae))return!0;const _e=document.activeElement;return J===_e||!!W&&!!_e&&W.contains(_e)},"stillEngaged"),rt=a(q=>{ur(q.clientX,q.clientY)||T()},"onPointerMove");return document.addEventListener("pointermove",rt,{passive:!0}),()=>document.removeEventListener("pointermove",rt)},[$,T]);const H=u?gn(i,u):i,{data:F,isLoading:B}=yr({...Jo(x,t,{placeholderIssue:u??void 0}),enabled:$,staleTime:wn}),lr=Fo(t),re=l.useCallback(()=>{Xo(x,t,{issue:u})},[t,u,x]),tt=(0,R.jsx)(fe,{ref:N,to:n,state:H,className:o,onMouseEnter:a(E=>{re(),g?.(E)},"onMouseEnter"),onFocus:a(E=>{re(),j(),v?.(E)},"onFocus"),onBlur:a(E=>{setTimeout(()=>T(),0),w?.(E)},"onBlur"),onTouchStart:a(E=>{re(),y?.(E)},"onTouchStart"),onClickCapture:a(E=>{re(),f?.(E)},"onClickCapture"),onClick:a(E=>{T(),m?.(E)},"onClick"),...p,children:r});return s?tt:(0,R.jsxs)(Ir,{open:$,onOpenChange:a(E=>E?j():T(),"onOpenChange"),children:[(0,R.jsx)(Rr,{asChild:!0,onMouseEnter:a(()=>{re(),K()},"onMouseEnter"),onMouseLeave:T,children:tt}),(0,R.jsx)($r,{ref:P,"data-quicklook":!0,className:Oi,side:c,align:d,alignOffset:Ni(d),onMouseEnter:j,onMouseLeave:T,onOpenAutoFocus:a(E=>E.preventDefault(),"onOpenAutoFocus"),onCloseAutoFocus:a(E=>E.preventDefault(),"onCloseAutoFocus"),children:F?(0,R.jsx)(Bi,{issue:F,linkTo:lr,linkState:H,compact:!0}):(0,R.jsxs)("div",{className:"space-y-2",children:[(0,R.jsx)("div",{className:"h-4 w-24 rounded bg-accent/50"}),(0,R.jsx)("div",{className:"h-4 w-full rounded bg-accent/40"}),(0,R.jsx)("div",{className:"h-4 w-3/4 rounded bg-accent/30"}),B?null:(0,R.jsx)("p",{className:"text-xs text-muted-foreground",children:"Unable to load task preview."})]})})]})},"IssueLinkQuicklookImpl")),er=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"]),et=new Set(["auth","invite","board-claim","cli-auth","docs","instance","s"]);function le(e){return e.trim().toUpperCase()}a(le,"normalizeCompanyPrefix");function tr(e){const t=e.match(/^([^?#]*)(\?[^#]*)?(#.*)?$/);return{pathname:t?.[1]??e,search:t?.[2]??"",hash:t?.[3]??""}}a(tr,"splitPath");function Hi(e){return e.split("/").filter(Boolean)[0]??null}a(Hi,"getRootSegment");function Wi(e){if(e==="/")return!0;const t=Hi(e);return t?et.has(t.toLowerCase()):!0}a(Wi,"isGlobalPath");function nr(e){const t=e.split("/").filter(Boolean);if(t.length===0)return null;const n=t[0].toLowerCase();return et.has(n)||er.has(n)?null:le(t[0])}a(nr,"extractCompanyPrefixFromPath");function At(e,t){const{pathname:n,search:r,hash:o}=tr(e);if(!n.startsWith("/")||Wi(n)||!t)return e;const i=le(t);return nr(n)?e:`/${i}${n}${r}${o}`}a(At,"applyCompanyPrefix");function qi(e,...t){const n=["cases",...t].filter(Boolean).join("/");return e?`/${le(e)}/${n}`:`/${n}`}a(qi,"caseHref");function Us(e){const{pathname:t,search:n,hash:r}=tr(e),o=t.split("/").filter(Boolean);if(o.length>=2){const i=o[1].toLowerCase();if(!et.has(o[0].toLowerCase())&&er.has(i))return`/${o.slice(1).join("/")}${n}${r}`}return`${t}${n}${r}`}a(Us,"toCompanyRelativePath");var rr=/^[A-Z][A-Z0-9]*-\d+$/i,Vi=/^issue:\/\/:?([^?#\s]+)([?#].*)?$/i,Qi=/issue:\/\/:?[^\s<>()]+|https?:\/\/[^\s<>()]+|\/(?:[^\s<>()/]+\/)*issues\/[A-Z][A-Z0-9]*-\d+(?=$|[\s<>)\],.;!?:])|\b[A-Z][A-Z0-9]*-\d+\b/gi;function ar(e){if(!e)return null;const t=e.trim();if(!t||/^https?:\/\//i.test(t))return null;const n=t.split(/[?#]/,1)[0].split("/").filter(Boolean),r=n.findIndex(i=>i==="issues");if(r===-1||r===n.length-1)return null;const o=decodeURIComponent(n[r+1]??"");return!o||o.startsWith(":")?null:rr.test(o)?o.toUpperCase():o}a(ar,"parseIssuePathIdFromPath");function or(e,t){if(!e)return null;const n=e.trim(),r=n.match(Vi);if(r?.[1]){const s=decodeURIComponent(r[1]);return{issuePathId:s,href:`/issues/${encodeURIComponent(s)}${r[2]??""}`}}const o=ar(e);if(o)return{issuePathId:o,href:`/issues/${encodeURIComponent(o)}${n.match(/[?#].*$/)?.[0]??""}`};if(!rr.test(n))return null;const i=n.toUpperCase();if(t&&t.size>0){const s=i.split("-")[0];if(!s||!t.has(s))return null}return{issuePathId:i,href:`/issues/${encodeURIComponent(i)}`}}a(or,"parseIssueReferenceFromHref");function Ki(e){let t=e,n="";for(;t.length>0;){const r=t.at(-1);if(!r||!/[),.;!?:\]]/.test(r))break;if(r===")"){const o=(t.match(/\(/g)??[]).length;if((t.match(/\)/g)??[]).length<=o)break}if(r==="]"){const o=(t.match(/\[/g)??[]).length;if((t.match(/\]/g)??[]).length<=o)break}n=`${r}${n}`,t=t.slice(0,-1)}return{core:t,trailing:n}}a(Ki,"splitTrailingPunctuation");function ir(e,t,n="text"){return{type:"link",url:t,children:[{type:n,value:e}]}}a(ir,"createIssueLinkNode");function Ji(e,t){const n=[];let r=0,o=!1;for(const i of e.matchAll(Qi)){const s=i[0];if(!s)continue;const u=i.index??0,c=u+s.length,{core:d,trailing:m}=Ki(s),f=or(d,t);f&&(o=!0,u>r&&n.push({type:"text",value:e.slice(r,u)}),n.push(ir(d,f.href)),m&&n.push({type:"text",value:m}),r=c)}return o?(r<e.length&&n.push({type:"text",value:e.slice(r)}),n):null}a(Ji,"linkifyIssueReferencesInText");function sr(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 n=[];for(const r of e.children){if(r.type==="inlineCode"&&typeof r.value=="string"){const o=or(r.value,t);if(o){n.push(ir(r.value,o.href,"inlineCode"));continue}}if(r.type==="text"&&typeof r.value=="string"){const o=Ji(r.value,t);if(o){n.push(...o);continue}}sr(r,t),n.push(r)}e.children=n}a(sr,"rewriteMarkdownTree");function js(e){const t=e?.knownPrefixes&&e.knownPrefixes.length>0?new Set(e.knownPrefixes.map(n=>n.toUpperCase())):void 0;return n=>{sr(n,t)}}a(js,"remarkLinkIssueReferences");function $e(e,t){if(typeof e=="string")return At(e,t);if(e.pathname&&e.pathname.startsWith("/")){const n=At(e.pathname,t);if(n!==e.pathname)return{...e,pathname:n}}return e}a($e,"resolveTo");function me(){const{selectedCompany:e}=gr(),t=Ia(),n=M();if(t.companyPrefix)return le(t.companyPrefix);const r=nr(n.pathname);return r||(e?le(e.issuePrefix):null)}a(me,"useActiveCompanyPrefix");function Fs(){const e=me();return l.useCallback((...t)=>qi(e,...t),[e])}a(Fs,"useCaseHref");var Bs=l.forwardRef(a(function({to:t,disableIssueQuicklook:n=!1,issuePrefetch:r=null,issueQuicklookSide:o,issueQuicklookAlign:i,...s},u){const c=$e(t,me()),d=ar(typeof c=="string"?c:c.pathname);return d?(0,R.jsx)(zi,{ref:u,to:c,issuePathId:d,disableIssueQuicklook:n,issuePrefetch:r,issueQuicklookSide:o,issueQuicklookAlign:i,...s}):(0,R.jsx)(fe,{ref:u,to:c,...s})},"CompanyLink")),zs=l.forwardRef(a(function({to:t,...n},r){const o=me();return(0,R.jsx)(an,{ref:r,to:$e(t,o),...n})},"CompanyNavLink"));function Hs({to:e,...t}){const n=me();return(0,R.jsx)(Na,{to:$e(e,n),...t})}a(Hs,"Navigate");function Ws(){const e=Re(),t=me();return l.useCallback(((n,r)=>{if(typeof n=="number"){e(n);return}e($e(n,t),r)}),[e,t])}a(Ws,"useNavigate");export{Wo as $,yi as A,un as At,si as B,Re as Bt,Si as C,ws as Ct,ki as D,Xe as Dt,xi as E,ys as Et,fi as F,ls as Ft,ti as G,oi as H,Ia as Ht,di as I,Ua as It,xn as J,ei as K,ci as L,us as Lt,pi as M,_o as Mt,hi as N,ms as Nt,wi as O,ks as Ot,mi as P,fe as Pt,Ms as Q,ui as R,ps as Rt,bi as S,gn as St,Ii as T,Lo as Tt,ai as U,hs as Ut,ii as V,is as Vt,ri as W,Xo as X,Jo as Y,$s as Z,Ni as _,Ss as _t,Fs as a,Ps as at,Ci as b,Bo as bt,js as c,Ns as ct,Wi as d,Os as dt,Ts as et,le as f,Y as ft,Oi as g,Fo as gt,Bi as h,xs as ht,me as i,Cs as it,gi as j,gs as jt,vi as k,vs as kt,At as l,Ds as lt,zi as m,Is as mt,zs as n,Ls as nt,Ws as o,qo as ot,Us as p,kt as pt,Zo as q,Hs as r,Ho as rt,or as s,_s as st,Bs as t,Es as tt,nr as u,As as ut,Li as v,bs as vt,Ri as w,Ao as wt,Ei as x,Rs as xt,Ct as y,To as yt,li as z,M as zt};
@@ -1 +1 @@
1
- import{t as e}from"./agent-avatar-url-CiVC72zn.js";var a={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};a.node;var l=e(a),c={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};c.node;var t=e(c),r={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};r.node;var n=e(r);export{t as n,l as r,n as t};
1
+ import{t as e}from"./agent-avatar-url-DzsNQ_N0.js";var a={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};a.node;var l=e(a),c={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};c.node;var t=e(c),r={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};r.node;var n=e(r);export{t as n,l as r,n as t};
@@ -1 +1 @@
1
- var u=Object.defineProperty;var s=(t,a)=>u(t,"name",{value:a,configurable:!0});import{i as n}from"./rolldown-runtime-ZpX3ckPj.js";import{Di as m,S as r,ki as p,t as x}from"./agent-avatar-url-CiVC72zn.js";import{a as f,c as g,d as h,f as v,h as S,i as b,l as j,m as w,n as y,o as z,p as _,r as N,s as $,t as k,u as I}from"./dist-bLGzOSwF.js";import{t as C}from"./check-B3EECTO-.js";import{t as i}from"./chevron-down-wArmbnHu.js";var c={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};c.node;var D=x(c),M=n(p(),1),e=n(m(),1);function P({...t}){return(0,e.jsx)(k,{"data-slot":"select",...t})}s(P,"Select");function A({...t}){return(0,e.jsx)(N,{"data-slot":"select-group",...t})}s(A,"SelectGroup");function F({...t}){return(0,e.jsx)(w,{"data-slot":"select-value",...t})}s(F,"SelectValue");function H({className:t,size:a="default",children:o,...l}){return(0,e.jsxs)(_,{"data-slot":"select-trigger","data-size":a,className:r("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-base md:text-sm whitespace-nowrap shadow-xs transition-(--tp-color-box-shadow) outline-none focus-visible:ring-(length:--rad-3) disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...l,children:[o,(0,e.jsx)(b,{asChild:!0,children:(0,e.jsx)(i,{className:"size-4 opacity-50"})})]})}s(H,"SelectTrigger");function J({className:t,children:a,position:o="item-aligned",align:l="center",...d}){return(0,e.jsx)(j,{children:(0,e.jsxs)(y,{"data-slot":"select-content",className:r("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 relative z-50 max-h-(--radix-select-content-available-height) min-w-(--sz-8rem) origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,align:l,...d,children:[(0,e.jsx)(B,{}),(0,e.jsx)(S,{className:r("p-1",o==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),children:a}),(0,e.jsx)(L,{})]})})}s(J,"SelectContent");function K({className:t,...a}){return(0,e.jsx)(g,{"data-slot":"select-label",className:r("text-muted-foreground px-2 py-1.5 text-xs",t),...a})}s(K,"SelectLabel");function O({className:t,children:a,...o}){return(0,e.jsxs)(f,{"data-slot":"select-item",className:r("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...o,children:[(0,e.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,e.jsx)(z,{children:(0,e.jsx)(C,{className:"size-4"})})}),(0,e.jsx)($,{children:a})]})}s(O,"SelectItem");function Q({className:t,...a}){return(0,e.jsx)(v,{"data-slot":"select-separator",className:r("bg-border pointer-events-none -mx-1 my-1 h-px",t),...a})}s(Q,"SelectSeparator");function B({className:t,...a}){return(0,e.jsx)(h,{"data-slot":"select-scroll-up-button",className:r("flex cursor-default items-center justify-center py-1",t),...a,children:(0,e.jsx)(D,{className:"size-4"})})}s(B,"SelectScrollUpButton");function L({className:t,...a}){return(0,e.jsx)(I,{"data-slot":"select-scroll-down-button",className:r("flex cursor-default items-center justify-center py-1",t),...a,children:(0,e.jsx)(i,{className:"size-4"})})}s(L,"SelectScrollDownButton");export{K as a,F as c,O as i,D as l,J as n,Q as o,A as r,H as s,P as t};
1
+ var u=Object.defineProperty;var s=(t,a)=>u(t,"name",{value:a,configurable:!0});import{i as n}from"./rolldown-runtime-ZpX3ckPj.js";import{Ai as m,Oi as p,S as r,t as x}from"./agent-avatar-url-DzsNQ_N0.js";import{a as f,c as g,d as h,f as v,h as S,i as b,l as j,m as w,n as y,o as z,p as _,r as N,s as $,t as k,u as I}from"./dist-B6qV1XGe.js";import{t as C}from"./check-Dm5GNoSc.js";import{t as i}from"./chevron-down-BtssLI8G.js";var c={name:"chevron-up",size:24,node:[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]};c.node;var B=x(c),E=n(m(),1),e=n(p(),1);function M({...t}){return(0,e.jsx)(k,{"data-slot":"select",...t})}s(M,"Select");function O({...t}){return(0,e.jsx)(N,{"data-slot":"select-group",...t})}s(O,"SelectGroup");function P({...t}){return(0,e.jsx)(w,{"data-slot":"select-value",...t})}s(P,"SelectValue");function F({className:t,size:a="default",children:o,...l}){return(0,e.jsxs)(_,{"data-slot":"select-trigger","data-size":a,className:r("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-base md:text-sm whitespace-nowrap shadow-xs transition-(--tp-color-box-shadow) outline-none focus-visible:ring-(length:--rad-3) disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...l,children:[o,(0,e.jsx)(b,{asChild:!0,children:(0,e.jsx)(i,{className:"size-4 opacity-50"})})]})}s(F,"SelectTrigger");function H({className:t,children:a,position:o="item-aligned",align:l="center",...d}){return(0,e.jsx)(j,{children:(0,e.jsxs)(y,{"data-slot":"select-content",className:r("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 relative z-50 max-h-(--radix-select-content-available-height) min-w-(--sz-8rem) origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:o,align:l,...d,children:[(0,e.jsx)(D,{}),(0,e.jsx)(S,{className:r("p-1",o==="popper"&&"h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width) scroll-my-1"),children:a}),(0,e.jsx)(L,{})]})})}s(H,"SelectContent");function J({className:t,...a}){return(0,e.jsx)(g,{"data-slot":"select-label",className:r("text-muted-foreground px-2 py-1.5 text-xs",t),...a})}s(J,"SelectLabel");function K({className:t,children:a,...o}){return(0,e.jsxs)(f,{"data-slot":"select-item",className:r("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...o,children:[(0,e.jsx)("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:(0,e.jsx)(z,{children:(0,e.jsx)(C,{className:"size-4"})})}),(0,e.jsx)($,{children:a})]})}s(K,"SelectItem");function Q({className:t,...a}){return(0,e.jsx)(v,{"data-slot":"select-separator",className:r("bg-border pointer-events-none -mx-1 my-1 h-px",t),...a})}s(Q,"SelectSeparator");function D({className:t,...a}){return(0,e.jsx)(h,{"data-slot":"select-scroll-up-button",className:r("flex cursor-default items-center justify-center py-1",t),...a,children:(0,e.jsx)(B,{className:"size-4"})})}s(D,"SelectScrollUpButton");function L({className:t,...a}){return(0,e.jsx)(I,{"data-slot":"select-scroll-down-button",className:r("flex cursor-default items-center justify-center py-1",t),...a,children:(0,e.jsx)(i,{className:"size-4"})})}s(L,"SelectScrollDownButton");export{J as a,P as c,K as i,B as l,H as n,Q as o,O as r,F as s,M as t};