try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`f63f251a-afcd-459b-b22e-48421c98ad50`,e._sentryDebugIdIdentifier=`sentry-dbid-f63f251a-afcd-459b-b22e-48421c98ad50`)}catch{}import{Ag as e,bp as t,na as n,wl as r}from"./entry.client-mpghtlrl.js";import{n as i}from"./WidgetNavigationHostProvider-j82lfshf.js";var a=e(),o=e=>{if(e==null)return``;if(typeof e!=`object`)return String(e);if(Array.isArray(e))return`[${e.map(o).join(`,`)}]`;let t=e;return`{${Object.keys(t).sort().map(e=>`${e}:${o(t[e])}`).join(`,`)}}`},s=e=>{let n=`params`in e&&e.params?e.params:{},{interpolatedPath:r}=t({path:e.to,params:n}),i=`search`in e&&e.search?e.search:void 0;return i?`${r}?${encodeURIComponent(o(i))}`:r};function c(e){let t=(0,a.c)(21),{getNavigateParams:o,getHeader:c,navigate:l}=e,u=n(),d=e.targetRouterKey??u,f=i(),p;t[0]!==d||t[1]!==o?(p=e=>s(o(e,d??``)),t[0]=d,t[1]=o,t[2]=p):p=t[2];let m=p,h;t[3]!==d||t[4]!==f||t[5]!==m?(h=e=>{if(!d||!f?.supportsDrop)return;let t=r(d,m(e));f.createWidget(t).catch(()=>{})},t[3]=d,t[4]=f,t[5]=m,t[6]=h):h=t[6];let g=h,_=f?.supportsDrop??!1,v;t[7]!==g||t[8]!==u||t[9]!==l||t[10]!==o||t[11]!==_||t[12]!==d||t[13]!==f||t[14]!==m||t[15]!==c?(v=e=>{let t=t=>{if(t.ctrlKey||t.metaKey){g(e);return}u&&l(o(e,u))};if(!_||!d||!f)return{onPress:t};let n=u??d;return{onPress:t,onCreate:()=>g(e),onPointerDown:t=>{t.button===0&&(t.stopPropagation(),f.beginDrag({kind:`creation`,sourceKey:n,targetKey:d,item:e,resolveBranchId:m,getNavigateParams:o,header:c?.(e)},{x:t.clientX,y:t.clientY},t.pointerId,t.currentTarget))}}},t[7]=g,t[8]=u,t[9]=l,t[10]=o,t[11]=_,t[12]=d,t[13]=f,t[14]=m,t[15]=c,t[16]=v):v=t[16];let y=v,b=!!u,x;return t[17]!==b||t[18]!==_||t[19]!==y?(x={isReady:b,supportsDrop:_,getItemProps:y},t[17]=b,t[18]=_,t[19]=y,t[20]=x):x=t[20],x}export{c as t};