@motiadev/plugin-observability 0.13.2-beta.164-704005 → 0.13.2-beta.164-681857

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),Y=require("@motiadev/ui"),St=require("@motiadev/stream-client-react"),cr=require("react-dom");function lr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const m=lr(w),ur=lr(cr);var Ve={exports:{}},_e={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),Y=require("@motiadev/ui"),xt=require("@motiadev/stream-client-react"),qn=require("react-dom");function Jn(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const p=Jn(w),Qn=Jn(qn);var We={exports:{}},_e={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var dn;function Fo(){if(dn)return _e;dn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var i in o)i!=="key"&&(s[i]=o[i])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:s}}return _e.Fragment=t,_e.jsx=n,_e.jsxs=n,_e}var De={};/**
9
+ */var rn;function So(){if(rn)return _e;rn=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var a=null;if(s!==void 0&&(a=""+s),o.key!==void 0&&(a=""+o.key),"key"in o){s={};for(var i in o)i!=="key"&&(s[i]=o[i])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:a,ref:o!==void 0?o:null,props:s}}return _e.Fragment=t,_e.jsx=n,_e.jsxs=n,_e}var Me={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,92 +14,92 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var mn;function Lo(){return mn||(mn=1,process.env.NODE_ENV!=="production"&&function(){function e(y){if(y==null)return null;if(typeof y=="function")return y.$$typeof===I?null:y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case g:return"Fragment";case b:return"Profiler";case x:return"StrictMode";case j:return"Suspense";case P:return"SuspenseList";case M:return"Activity"}if(typeof y=="object")switch(typeof y.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),y.$$typeof){case v:return"Portal";case S:return(y.displayName||"Context")+".Provider";case A:return(y._context.displayName||"Context")+".Consumer";case C:var O=y.render;return y=y.displayName,y||(y=O.displayName||O.name||"",y=y!==""?"ForwardRef("+y+")":"ForwardRef"),y;case E:return O=y.displayName||null,O!==null?O:e(y.type)||"Memo";case k:O=y._payload,y=y._init;try{return e(y(O))}catch{}}return null}function t(y){return""+y}function n(y){try{t(y);var O=!1}catch{O=!0}if(O){O=console;var W=O.error,N=typeof Symbol=="function"&&Symbol.toStringTag&&y[Symbol.toStringTag]||y.constructor.name||"Object";return W.call(O,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",N),t(y)}}function r(y){if(y===g)return"<>";if(typeof y=="object"&&y!==null&&y.$$typeof===k)return"<...>";try{var O=e(y);return O?"<"+O+">":"<...>"}catch{return"<...>"}}function o(){var y=B.A;return y===null?null:y.getOwner()}function s(){return Error("react-stack-top-frame")}function a(y){if(H.call(y,"key")){var O=Object.getOwnPropertyDescriptor(y,"key").get;if(O&&O.isReactWarning)return!1}return y.key!==void 0}function i(y,O){function W(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",O))}W.isReactWarning=!0,Object.defineProperty(y,"key",{get:W,configurable:!0})}function u(){var y=e(this.type);return F[y]||(F[y]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),y=this.props.ref,y!==void 0?y:null}function l(y,O,W,N,L,U,ke,re){return W=U.ref,y={$$typeof:p,type:y,key:O,props:U,_owner:L},(W!==void 0?W:null)!==null?Object.defineProperty(y,"ref",{enumerable:!1,get:u}):Object.defineProperty(y,"ref",{enumerable:!1,value:null}),y._store={},Object.defineProperty(y._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(y,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(y,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ke}),Object.defineProperty(y,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:re}),Object.freeze&&(Object.freeze(y.props),Object.freeze(y)),y}function f(y,O,W,N,L,U,ke,re){var V=O.children;if(V!==void 0)if(N)if($(V)){for(N=0;N<V.length;N++)d(V[N]);Object.freeze&&Object.freeze(V)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(V);if(H.call(O,"key")){V=e(y);var ie=Object.keys(O).filter(function(pt){return pt!=="key"});N=0<ie.length?"{key: someKey, "+ie.join(": ..., ")+": ...}":"{key: someKey}",z[V+N]||(ie=0<ie.length?"{"+ie.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var on;function Ao(){return on||(on=1,process.env.NODE_ENV!=="production"&&function(){function e(g){if(g==null)return null;if(typeof g=="function")return g.$$typeof===F?null:g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case h:return"Fragment";case b:return"Profiler";case x:return"StrictMode";case C:return"Suspense";case N:return"SuspenseList";case _:return"Activity"}if(typeof g=="object")switch(typeof g.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),g.$$typeof){case y:return"Portal";case S:return(g.displayName||"Context")+".Provider";case A:return(g._context.displayName||"Context")+".Consumer";case j:var T=g.render;return g=g.displayName,g||(g=T.displayName||T.name||"",g=g!==""?"ForwardRef("+g+")":"ForwardRef"),g;case E:return T=g.displayName||null,T!==null?T:e(g.type)||"Memo";case k:T=g._payload,g=g._init;try{return e(g(T))}catch{}}return null}function t(g){return""+g}function n(g){try{t(g);var T=!1}catch{T=!0}if(T){T=console;var B=T.error,R=typeof Symbol=="function"&&Symbol.toStringTag&&g[Symbol.toStringTag]||g.constructor.name||"Object";return B.call(T,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",R),t(g)}}function r(g){if(g===h)return"<>";if(typeof g=="object"&&g!==null&&g.$$typeof===k)return"<...>";try{var T=e(g);return T?"<"+T+">":"<...>"}catch{return"<...>"}}function o(){var g=W.A;return g===null?null:g.getOwner()}function s(){return Error("react-stack-top-frame")}function a(g){if(H.call(g,"key")){var T=Object.getOwnPropertyDescriptor(g,"key").get;if(T&&T.isReactWarning)return!1}return g.key!==void 0}function i(g,T){function B(){D||(D=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",T))}B.isReactWarning=!0,Object.defineProperty(g,"key",{get:B,configurable:!0})}function u(){var g=e(this.type);return I[g]||(I[g]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),g=this.props.ref,g!==void 0?g:null}function l(g,T,B,R,L,V,Pe,re){return B=V.ref,g={$$typeof:m,type:g,key:T,props:V,_owner:L},(B!==void 0?B:null)!==null?Object.defineProperty(g,"ref",{enumerable:!1,get:u}):Object.defineProperty(g,"ref",{enumerable:!1,value:null}),g._store={},Object.defineProperty(g._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(g,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(g,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Pe}),Object.defineProperty(g,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:re}),Object.freeze&&(Object.freeze(g.props),Object.freeze(g)),g}function f(g,T,B,R,L,V,Pe,re){var z=T.children;if(z!==void 0)if(R)if($(z)){for(R=0;R<z.length;R++)d(z[R]);Object.freeze&&Object.freeze(z)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(z);if(H.call(T,"key")){z=e(g);var ie=Object.keys(T).filter(function(lt){return lt!=="key"});R=0<ie.length?"{key: someKey, "+ie.join(": ..., ")+": ...}":"{key: someKey}",U[z+R]||(ie=0<ie.length?"{"+ie.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,N,V,ie,V),z[V+N]=!0)}if(V=null,W!==void 0&&(n(W),V=""+W),a(O)&&(n(O.key),V=""+O.key),"key"in O){W={};for(var Me in O)Me!=="key"&&(W[Me]=O[Me])}else W=O;return V&&i(W,typeof y=="function"?y.displayName||y.name||"Unknown":y),l(y,V,U,L,o(),W,ke,re)}function d(y){typeof y=="object"&&y!==null&&y.$$typeof===p&&y._store&&(y._store.validated=1)}var h=w,p=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),S=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),I=Symbol.for("react.client.reference"),B=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.prototype.hasOwnProperty,$=Array.isArray,_=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(y){return y()}};var D,F={},T=h.react_stack_bottom_frame.bind(h,s)(),R=_(r(s)),z={};De.Fragment=g,De.jsx=function(y,O,W,N,L){var U=1e4>B.recentlyCreatedOwnerStacks++;return f(y,O,W,!1,N,L,U?Error("react-stack-top-frame"):T,U?_(r(y)):R)},De.jsxs=function(y,O,W,N,L){var U=1e4>B.recentlyCreatedOwnerStacks++;return f(y,O,W,!0,N,L,U?Error("react-stack-top-frame"):T,U?_(r(y)):R)}}()),De}var pn;function Io(){return pn||(pn=1,process.env.NODE_ENV==="production"?Ve.exports=Fo():Ve.exports=Lo()),Ve.exports}var c=Io();/**
22
+ <%s key={someKey} {...props} />`,R,z,ie,z),U[z+R]=!0)}if(z=null,B!==void 0&&(n(B),z=""+B),a(T)&&(n(T.key),z=""+T.key),"key"in T){B={};for(var ke in T)ke!=="key"&&(B[ke]=T[ke])}else B=T;return z&&i(B,typeof g=="function"?g.displayName||g.name||"Unknown":g),l(g,z,V,L,o(),B,Pe,re)}function d(g){typeof g=="object"&&g!==null&&g.$$typeof===m&&g._store&&(g._store.validated=1)}var v=w,m=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),b=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),S=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),F=Symbol.for("react.client.reference"),W=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=Object.prototype.hasOwnProperty,$=Array.isArray,M=console.createTask?console.createTask:function(){return null};v={react_stack_bottom_frame:function(g){return g()}};var D,I={},P=v.react_stack_bottom_frame.bind(v,s)(),O=M(r(s)),U={};Me.Fragment=h,Me.jsx=function(g,T,B,R,L){var V=1e4>W.recentlyCreatedOwnerStacks++;return f(g,T,B,!1,R,L,V?Error("react-stack-top-frame"):P,V?M(r(g)):O)},Me.jsxs=function(g,T,B,R,L){var V=1e4>W.recentlyCreatedOwnerStacks++;return f(g,T,B,!0,R,L,V?Error("react-stack-top-frame"):P,V?M(r(g)):O)}}()),Me}var sn;function No(){return sn||(sn=1,process.env.NODE_ENV==="production"?We.exports=So():We.exports=Ao()),We.exports}var c=No();/**
23
23
  * @license lucide-react v0.548.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */const $o=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wo=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),hn=e=>{const t=Wo(e);return t.charAt(0).toUpperCase()+t.slice(1)},fr=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Bo=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
27
+ */const Ro=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),To=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),an=e=>{const t=To(e);return t.charAt(0).toUpperCase()+t.slice(1)},er=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Oo=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
28
28
  * @license lucide-react v0.548.0 - ISC
29
29
  *
30
30
  * This source code is licensed under the ISC license.
31
31
  * See the LICENSE file in the root directory of this source tree.
32
- */var Ho={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
32
+ */var Po={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
33
33
  * @license lucide-react v0.548.0 - ISC
34
34
  *
35
35
  * This source code is licensed under the ISC license.
36
36
  * See the LICENSE file in the root directory of this source tree.
37
- */const zo=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:a,...i},u)=>w.createElement("svg",{ref:u,...Ho,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:fr("lucide",o),...!s&&!Bo(i)&&{"aria-hidden":"true"},...i},[...a.map(([l,f])=>w.createElement(l,f)),...Array.isArray(s)?s:[s]]));/**
37
+ */const ko=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:a,...i},u)=>w.createElement("svg",{ref:u,...Po,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:er("lucide",o),...!s&&!Oo(i)&&{"aria-hidden":"true"},...i},[...a.map(([l,f])=>w.createElement(l,f)),...Array.isArray(s)?s:[s]]));/**
38
38
  * @license lucide-react v0.548.0 - ISC
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const X=(e,t)=>{const n=w.forwardRef(({className:r,...o},s)=>w.createElement(zo,{ref:s,iconNode:t,className:fr(`lucide-${$o(hn(e))}`,`lucide-${e}`,r),...o}));return n.displayName=hn(e),n};/**
42
+ */const K=(e,t)=>{const n=w.forwardRef(({className:r,...o},s)=>w.createElement(ko,{ref:s,iconNode:t,className:er(`lucide-${Ro(an(e))}`,`lucide-${e}`,r),...o}));return n.displayName=an(e),n};/**
43
43
  * @license lucide-react v0.548.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const Vo=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Uo=X("search",Vo);/**
47
+ */const _o=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Mo=K("search",_o);/**
48
48
  * @license lucide-react v0.548.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const Yo=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Go=X("trash",Yo);/**
52
+ */const Do=[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Io=K("trash",Do);/**
53
53
  * @license lucide-react v0.548.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const Zo=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dr=X("x",Zo),gn=e=>{let t;const n=new Set,r=(l,f)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const h=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(p=>p(t,h))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>u,subscribe:l=>(n.add(l),()=>n.delete(l))},u=t=e(r,o,i);return i},Xo=e=>e?gn(e):gn,qo=e=>e;function Jo(e,t=qo){const n=w.useSyncExternalStore(e.subscribe,w.useCallback(()=>t(e.getState()),[e,t]),w.useCallback(()=>t(e.getInitialState()),[e,t]));return w.useDebugValue(n),n}const Ko=e=>{const t=Xo(e),n=r=>Jo(t,r);return Object.assign(n,t),n},Qo=e=>Ko,q=Qo()(e=>({selectedTraceGroupId:"",selectedTraceId:void 0,search:"",selectTraceGroupId:t=>e({selectedTraceGroupId:t}),selectTraceId:t=>e({selectedTraceId:t}),setSearch:t=>e({search:t}),clearTraces:()=>{fetch("/__motia/trace/clear",{method:"POST"})}})),mr=w.memo(()=>{const e=q(r=>r.search),t=q(r=>r.setSearch),n=q(r=>r.clearTraces);return c.jsxs("div",{className:"flex p-2 border-b gap-2","data-testid":"logs-search-container",children:[c.jsxs("div",{className:"flex-1 relative",children:[c.jsx(Y.Input,{variant:"shade",value:e,onChange:r=>t(r.target.value),className:"px-9! font-medium",placeholder:"Search by Trace ID or Step Name"}),c.jsx(Uo,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50"}),c.jsx(dr,{className:Y.cn("cursor-pointer absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50 hover:text-muted-foreground",{visible:e!=="",invisible:e===""}),onClick:()=>t("")})]}),c.jsxs(Y.Button,{variant:"default",onClick:n,className:"h-[34px]",children:[c.jsx(Go,{})," Clear"]})]})});mr.displayName="SearchBar";const pr=w.memo(()=>q(t=>t.selectedTraceGroupId)?null:c.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-center",children:"Select a trace or trace group to view the timeline"}));pr.displayName="TraceEmptyState";/**
57
+ */const Lo=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],tr=K("x",Lo),cn=e=>{let t;const n=new Set,r=(l,f)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const v=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,v))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>u,subscribe:l=>(n.add(l),()=>n.delete(l))},u=t=e(r,o,i);return i},Fo=e=>e?cn(e):cn,$o=e=>e;function Bo(e,t=$o){const n=w.useSyncExternalStore(e.subscribe,w.useCallback(()=>t(e.getState()),[e,t]),w.useCallback(()=>t(e.getInitialState()),[e,t]));return w.useDebugValue(n),n}const Wo=e=>{const t=Fo(e),n=r=>Bo(t,r);return Object.assign(n,t),n},Ho=e=>Wo,X=Ho()(e=>({selectedTraceGroupId:"",selectedTraceId:void 0,search:"",selectTraceGroupId:t=>e({selectedTraceGroupId:t}),selectTraceId:t=>e({selectedTraceId:t}),setSearch:t=>e({search:t}),clearTraces:()=>{fetch("/__motia/trace/clear",{method:"POST"})}})),nr=w.memo(()=>{const e=X(r=>r.search),t=X(r=>r.setSearch),n=X(r=>r.clearTraces);return c.jsxs("div",{className:"flex p-2 border-b gap-2","data-testid":"logs-search-container",children:[c.jsxs("div",{className:"flex-1 relative",children:[c.jsx(Y.Input,{variant:"shade",value:e,onChange:r=>t(r.target.value),className:"px-9! font-medium",placeholder:"Search by Trace ID or Step Name"}),c.jsx(Mo,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50"}),c.jsx(tr,{className:Y.cn("cursor-pointer absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50 hover:text-muted-foreground",{visible:e!=="",invisible:e===""}),onClick:()=>t("")})]}),c.jsxs(Y.Button,{variant:"default",onClick:n,className:"h-[34px]",children:[c.jsx(Io,{})," Clear"]})]})});nr.displayName="SearchBar";const rr=w.memo(()=>X(t=>t.selectedTraceGroupId)?null:c.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-center",children:"Select a trace or trace group to view the timeline"}));rr.displayName="TraceEmptyState";/**
58
58
  * @license lucide-react v0.548.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const es=[["path",{d:"M5 12h14",key:"1ays0h"}]],ts=X("minus",es);/**
62
+ */const Uo=[["path",{d:"M5 12h14",key:"1ays0h"}]],zo=K("minus",Uo);/**
63
63
  * @license lucide-react v0.548.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const ns=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],rs=X("plus",ns),os=e=>{const t=e?.endTime,[n,r]=w.useState(()=>t||Date.now());return w.useEffect(()=>{let o;return t?t!==n&&r(t):o=setInterval(()=>r(Date.now()),100),()=>clearInterval(o)},[t,n]),n},xe=e=>e==null?"N/A":e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${(e/6e4).toFixed(1)}min`:`${(e/36e5).toFixed(1)}h`,ss={running:"bg-[repeating-linear-gradient(140deg,#BEFE29,#BEFE29_8px,#ABE625_8px,#ABE625_16px)]",completed:"bg-[repeating-linear-gradient(140deg,#2862FE,#2862FE_8px,#2358E5_8px,#2358E5_16px)]",failed:"bg-[repeating-linear-gradient(140deg,#EA2069,#EA2069_8px,#D41E60_8px,#D41E60_16px)]"},hr=w.memo(({traceId:e,traceName:t,traceStatus:n,traceStartTime:r,traceEndTime:o,groupStartTime:s,groupEndTime:a,onExpand:i})=>{const u=w.useCallback(()=>{i(e)},[i,e]),l=w.useMemo(()=>Y.cn("h-[24px] rounded-[4px] hover:opacity-80 transition-all duration-200",ss[n]),[n]),f=w.useMemo(()=>({marginLeft:`${(r-s)/(a-s)*100}%`,width:o?`${(o-r)/(a-s)*100}%`:`${(Date.now()-r)/(a-s)*100}%`}),[r,o,s,a]);return c.jsxs("div",{className:"flex hover:bg-muted-foreground/10 relative cursor-pointer",onClick:u,"data-testid":"trace-timeline-item",children:[c.jsx("div",{className:"flex items-center min-w-[200px] max-w-[200px] h-[32px] max-h-[32px] py-4 px-2 text-sm font-semibold text-foreground truncate sticky left-0 bg-card z-9",children:t}),c.jsx("div",{className:"flex w-full flex-row items-center hover:bg-muted/50 rounded-md",children:c.jsx("div",{className:"relative w-full h-[32px] flex items-center",children:c.jsx("div",{className:l,style:f})})})]})});hr.displayName="TraceItem";/**
67
+ */const Vo=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Yo=K("plus",Vo),Go=e=>{const t=e?.endTime,[n,r]=w.useState(()=>t||Date.now());return w.useEffect(()=>{let o;return t?t!==n&&r(t):o=setInterval(()=>r(Date.now()),100),()=>clearInterval(o)},[t,n]),n},ye=e=>e==null?"N/A":e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${(e/6e4).toFixed(1)}min`:`${(e/36e5).toFixed(1)}h`,Zo={running:"bg-[repeating-linear-gradient(140deg,#BEFE29,#BEFE29_8px,#ABE625_8px,#ABE625_16px)]",completed:"bg-[repeating-linear-gradient(140deg,#2862FE,#2862FE_8px,#2358E5_8px,#2358E5_16px)]",failed:"bg-[repeating-linear-gradient(140deg,#EA2069,#EA2069_8px,#D41E60_8px,#D41E60_16px)]"},or=w.memo(({traceId:e,traceName:t,traceStatus:n,traceStartTime:r,traceEndTime:o,groupStartTime:s,groupEndTime:a,onExpand:i})=>{const u=w.useCallback(()=>{i(e)},[i,e]),l=w.useMemo(()=>Y.cn("h-[24px] rounded-[4px] hover:opacity-80 transition-all duration-200",Zo[n]),[n]),f=w.useMemo(()=>({marginLeft:`${(r-s)/(a-s)*100}%`,width:o?`${(o-r)/(a-s)*100}%`:`${(Date.now()-r)/(a-s)*100}%`}),[r,o,s,a]);return c.jsxs("div",{className:"flex hover:bg-muted-foreground/10 relative cursor-pointer",onClick:u,"data-testid":"trace-timeline-item",children:[c.jsx("div",{className:"flex items-center min-w-[200px] max-w-[200px] h-[32px] max-h-[32px] py-4 px-2 text-sm font-semibold text-foreground truncate sticky left-0 bg-card z-9",children:t}),c.jsx("div",{className:"flex w-full flex-row items-center hover:bg-muted/50 rounded-md",children:c.jsx("div",{className:"relative w-full h-[32px] flex items-center",children:c.jsx("div",{className:l,style:f})})})]})});or.displayName="TraceItem";/**
68
68
  * @license lucide-react v0.548.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const as=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],is=X("message-circle",as);/**
72
+ */const Ko=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],Xo=K("message-circle",Ko);/**
73
73
  * @license lucide-react v0.548.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const cs=[["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"}]],ls=X("package",cs);/**
77
+ */const qo=[["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"}]],Jo=K("package",qo);/**
78
78
  * @license lucide-react v0.548.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const us=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],fs=X("radio",us);/**
82
+ */const Qo=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],es=K("radio",Qo);/**
83
83
  * @license lucide-react v0.548.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const ds=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],ms=X("scroll-text",ds),ps=({event:e})=>{if(e.type==="log")return c.jsx(ms,{className:"w-4 h-4 text-muted-foreground"});if(e.type==="emit")return c.jsx(is,{className:"w-4 h-4 text-muted-foreground"});if(e.type==="state")return c.jsx(ls,{className:"w-4 h-4 text-muted-foreground"});if(e.type==="stream")return c.jsx(fs,{className:"w-4 h-4 text-muted-foreground"})};/**
87
+ */const ts=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],ns=K("scroll-text",ts),rs=({event:e})=>{if(e.type==="log")return c.jsx(ns,{className:"w-4 h-4 text-muted-foreground"});if(e.type==="emit")return c.jsx(Xo,{className:"w-4 h-4 text-muted-foreground"});if(e.type==="state")return c.jsx(Jo,{className:"w-4 h-4 text-muted-foreground"});if(e.type==="stream")return c.jsx(es,{className:"w-4 h-4 text-muted-foreground"})};/**
88
88
  * @license lucide-react v0.548.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const hs=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],gs=X("check",hs);/**
92
+ */const os=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ss=K("check",os);/**
93
93
  * @license lucide-react v0.548.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const vs=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ys=X("copy",vs),At=({textToCopy:e,className:t,title:n})=>{const[r,o]=w.useState(!1),s=w.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch(a){console.error("Failed to copy:",a)}},[e]);return c.jsx(Y.Button,{variant:"icon",size:"icon",onClick:s,className:Y.cn("cursor-pointer p-3 rounded-full",t),title:n??(r?"Copied!":"Copy"),children:r?c.jsx(gs,{className:"w-4 h-4 text-green-500"}):c.jsx(ys,{className:"w-4 h-4 text-gray-400"})})};function le(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function vn(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function gr(...e){return t=>{let n=!1;const r=e.map(o=>{const s=vn(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():vn(e[o],null)}}}}function he(...e){return m.useCallback(gr(...e),e)}function vr(e,t=[]){let n=[];function r(s,a){const i=m.createContext(a),u=n.length;n=[...n,a];const l=d=>{const{scope:h,children:p,...v}=d,g=h?.[e]?.[u]||i,x=m.useMemo(()=>v,Object.values(v));return c.jsx(g.Provider,{value:x,children:p})};l.displayName=s+"Provider";function f(d,h){const p=h?.[e]?.[u]||i,v=m.useContext(p);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,f]}const o=()=>{const s=n.map(a=>m.createContext(a));return function(i){const u=i?.[e]||s;return m.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return o.scopeName=e,[r,xs(o,...t)]}function xs(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:u,scopeName:l})=>{const d=u(s)[`__scope${l}`];return{...i,...d}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function yr(e){const t=bs(e),n=m.forwardRef((r,o)=>{const{children:s,...a}=r,i=m.Children.toArray(s),u=i.find(Cs);if(u){const l=u.props.children,f=i.map(d=>d===u?m.Children.count(l)>1?m.Children.only(null):m.isValidElement(l)?l.props.children:null:d);return c.jsx(t,{...a,ref:o,children:m.isValidElement(l)?m.cloneElement(l,void 0,f):null})}return c.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function bs(e){const t=m.forwardRef((n,r)=>{const{children:o,...s}=n;if(m.isValidElement(o)){const a=Es(o),i=js(s,o.props);return o.type!==m.Fragment&&(i.ref=r?gr(r,a):a),m.cloneElement(o,i)}return m.Children.count(o)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ws=Symbol("radix.slottable");function Cs(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ws}function js(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const u=s(...i);return o(...i),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Es(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ss=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ae=Ss.reduce((e,t)=>{const n=yr(`Primitive.${t}`),r=m.forwardRef((o,s)=>{const{asChild:a,...i}=o,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function As(e,t){e&&ur.flushSync(()=>e.dispatchEvent(t))}function Pe(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>t.current?.(...n),[])}function Ps(e,t=globalThis?.document){const n=Pe(e);m.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Ns="DismissableLayer",Pt="dismissableLayer.update",Os="dismissableLayer.pointerDownOutside",Rs="dismissableLayer.focusOutside",yn,xr=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),br=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,l=m.useContext(xr),[f,d]=m.useState(null),h=f?.ownerDocument??globalThis?.document,[,p]=m.useState({}),v=he(t,E=>d(E)),g=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(x),A=f?g.indexOf(f):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,C=A>=b,j=Ms(E=>{const k=E.target,M=[...l.branches].some(I=>I.contains(k));!C||M||(o?.(E),a?.(E),E.defaultPrevented||i?.())},h),P=_s(E=>{const k=E.target;[...l.branches].some(I=>I.contains(k))||(s?.(E),a?.(E),E.defaultPrevented||i?.())},h);return Ps(E=>{A===l.layers.size-1&&(r?.(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},h),m.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(yn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),xn(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=yn)}},[f,h,n,l]),m.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),xn())},[f,l]),m.useEffect(()=>{const E=()=>p({});return document.addEventListener(Pt,E),()=>document.removeEventListener(Pt,E)},[]),c.jsx(ae.div,{...u,ref:v,style:{pointerEvents:S?C?"auto":"none":void 0,...e.style},onFocusCapture:le(e.onFocusCapture,P.onFocusCapture),onBlurCapture:le(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:le(e.onPointerDownCapture,j.onPointerDownCapture)})});br.displayName=Ns;var Ts="DismissableLayerBranch",ks=m.forwardRef((e,t)=>{const n=m.useContext(xr),r=m.useRef(null),o=he(t,r);return m.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsx(ae.div,{...e,ref:o})});ks.displayName=Ts;function Ms(e,t=globalThis?.document){const n=Pe(e),r=m.useRef(!1),o=m.useRef(()=>{});return m.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let u=function(){wr(Os,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function _s(e,t=globalThis?.document){const n=Pe(e),r=m.useRef(!1);return m.useEffect(()=>{const o=s=>{s.target&&!r.current&&wr(Rs,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function xn(){const e=new CustomEvent(Pt);document.dispatchEvent(e)}function wr(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?As(o,s):o.dispatchEvent(s)}var ht=0;function Ds(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??bn()),document.body.insertAdjacentElement("beforeend",e[1]??bn()),ht++,()=>{ht===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ht--}},[])}function bn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var gt="focusScope.autoFocusOnMount",vt="focusScope.autoFocusOnUnmount",wn={bubbles:!1,cancelable:!0},Fs="FocusScope",Cr=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,u]=m.useState(null),l=Pe(o),f=Pe(s),d=m.useRef(null),h=he(t,g=>u(g)),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let g=function(S){if(p.paused||!i)return;const C=S.target;i.contains(C)?d.current=C:ce(d.current,{select:!0})},x=function(S){if(p.paused||!i)return;const C=S.relatedTarget;C!==null&&(i.contains(C)||ce(d.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const j of S)j.removedNodes.length>0&&ce(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const A=new MutationObserver(b);return i&&A.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),A.disconnect()}}},[r,i,p.paused]),m.useEffect(()=>{if(i){jn.add(p);const g=document.activeElement;if(!i.contains(g)){const b=new CustomEvent(gt,wn);i.addEventListener(gt,l),i.dispatchEvent(b),b.defaultPrevented||(Ls(Hs(jr(i)),{select:!0}),document.activeElement===g&&ce(i))}return()=>{i.removeEventListener(gt,l),setTimeout(()=>{const b=new CustomEvent(vt,wn);i.addEventListener(vt,f),i.dispatchEvent(b),b.defaultPrevented||ce(g??document.body,{select:!0}),i.removeEventListener(vt,f),jn.remove(p)},0)}}},[i,l,f,p]);const v=m.useCallback(g=>{if(!n&&!r||p.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(x&&b){const A=g.currentTarget,[S,C]=Is(A);S&&C?!g.shiftKey&&b===C?(g.preventDefault(),n&&ce(S,{select:!0})):g.shiftKey&&b===S&&(g.preventDefault(),n&&ce(C,{select:!0})):b===A&&g.preventDefault()}},[n,r,p.paused]);return c.jsx(ae.div,{tabIndex:-1,...a,ref:h,onKeyDown:v})});Cr.displayName=Fs;function Ls(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ce(r,{select:t}),document.activeElement!==n)return}function Is(e){const t=jr(e),n=Cn(t,e),r=Cn(t.reverse(),e);return[n,r]}function jr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Cn(e,t){for(const n of e)if(!$s(n,{upTo:t}))return n}function $s(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ws(e){return e instanceof HTMLInputElement&&"select"in e}function ce(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ws(e)&&t&&e.select()}}var jn=Bs();function Bs(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=En(e,t),e.unshift(t)},remove(t){e=En(e,t),e[0]?.resume()}}}function En(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Hs(e){return e.filter(t=>t.tagName!=="A")}var ue=globalThis?.document?m.useLayoutEffect:()=>{},zs=m[" useId ".trim().toString()]||(()=>{}),Vs=0;function Us(e){const[t,n]=m.useState(zs());return ue(()=>{n(r=>r??String(Vs++))},[e]),e||(t?`radix-${t}`:"")}const Ys=["top","right","bottom","left"],fe=Math.min,G=Math.max,nt=Math.round,Ue=Math.floor,ee=e=>({x:e,y:e}),Gs={left:"right",right:"left",bottom:"top",top:"bottom"},Zs={start:"end",end:"start"};function Nt(e,t,n){return G(e,fe(t,n))}function oe(e,t){return typeof e=="function"?e(t):e}function se(e){return e.split("-")[0]}function Re(e){return e.split("-")[1]}function Ut(e){return e==="x"?"y":"x"}function Yt(e){return e==="y"?"height":"width"}function de(e){return["top","bottom"].includes(se(e))?"y":"x"}function Gt(e){return Ut(de(e))}function Xs(e,t,n){n===void 0&&(n=!1);const r=Re(e),o=Gt(e),s=Yt(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=rt(a)),[a,rt(a)]}function qs(e){const t=rt(e);return[Ot(e),t,Ot(t)]}function Ot(e){return e.replace(/start|end/g,t=>Zs[t])}function Js(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:a;default:return[]}}function Ks(e,t,n,r){const o=Re(e);let s=Js(se(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Ot)))),s}function rt(e){return e.replace(/left|right|bottom|top/g,t=>Gs[t])}function Qs(e){return{top:0,right:0,bottom:0,left:0,...e}}function Er(e){return typeof e!="number"?Qs(e):{top:e,right:e,bottom:e,left:e}}function ot(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Sn(e,t,n){let{reference:r,floating:o}=e;const s=de(t),a=Gt(t),i=Yt(a),u=se(t),l=s==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[i]/2-o[i]/2;let p;switch(u){case"top":p={x:f,y:r.y-o.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Re(t)){case"start":p[a]-=h*(n&&l?-1:1);break;case"end":p[a]+=h*(n&&l?-1:1);break}return p}const ea=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=Sn(l,r,u),h=r,p={},v=0;for(let g=0;g<i.length;g++){const{name:x,fn:b}=i[g],{x:A,y:S,data:C,reset:j}=await b({x:f,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});f=A??f,d=S??d,p={...p,[x]:{...p[x],...C}},j&&v<=50&&(v++,typeof j=="object"&&(j.placement&&(h=j.placement),j.rects&&(l=j.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):j.rects),{x:f,y:d}=Sn(l,h,u)),g=-1)}return{x:f,y:d,placement:h,strategy:o,middlewareData:p}};async function $e(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:i,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=oe(t,e),v=Er(p),x=i[h?d==="floating"?"reference":"floating":d],b=ot(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:l,rootBoundary:f,strategy:u})),A=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),C=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},j=ot(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:A,offsetParent:S,strategy:u}):A);return{top:(b.top-j.top+v.top)/C.y,bottom:(j.bottom-b.bottom+v.bottom)/C.y,left:(b.left-j.left+v.left)/C.x,right:(j.right-b.right+v.right)/C.x}}const ta=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:i,middlewareData:u}=t,{element:l,padding:f=0}=oe(e,t)||{};if(l==null)return{};const d=Er(f),h={x:n,y:r},p=Gt(o),v=Yt(p),g=await a.getDimensions(l),x=p==="y",b=x?"top":"left",A=x?"bottom":"right",S=x?"clientHeight":"clientWidth",C=s.reference[v]+s.reference[p]-h[p]-s.floating[v],j=h[p]-s.reference[p],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let E=P?P[S]:0;(!E||!await(a.isElement==null?void 0:a.isElement(P)))&&(E=i.floating[S]||s.floating[v]);const k=C/2-j/2,M=E/2-g[v]/2-1,I=fe(d[b],M),B=fe(d[A],M),H=I,$=E-g[v]-B,_=E/2-g[v]/2+k,D=Nt(H,_,$),F=!u.arrow&&Re(o)!=null&&_!==D&&s.reference[v]/2-(_<H?I:B)-g[v]/2<0,T=F?_<H?_-H:_-$:0;return{[p]:h[p]+T,data:{[p]:D,centerOffset:_-D-T,...F&&{alignmentOffset:T}},reset:F}}}),na=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:u,elements:l}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...x}=oe(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=se(o),A=de(i),S=se(i)===i,C=await(u.isRTL==null?void 0:u.isRTL(l.floating)),j=h||(S||!g?[rt(i)]:qs(i)),P=v!=="none";!h&&P&&j.push(...Ks(i,g,v,C));const E=[i,...j],k=await $e(t,x),M=[];let I=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&M.push(k[b]),d){const _=Xs(o,a,C);M.push(k[_[0]],k[_[1]])}if(I=[...I,{placement:o,overflows:M}],!M.every(_=>_<=0)){var B,H;const _=(((B=s.flip)==null?void 0:B.index)||0)+1,D=E[_];if(D)return{data:{index:_,overflows:I},reset:{placement:D}};let F=(H=I.filter(T=>T.overflows[0]<=0).sort((T,R)=>T.overflows[1]-R.overflows[1])[0])==null?void 0:H.placement;if(!F)switch(p){case"bestFit":{var $;const T=($=I.filter(R=>{if(P){const z=de(R.placement);return z===A||z==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(z=>z>0).reduce((z,y)=>z+y,0)]).sort((R,z)=>R[1]-z[1])[0])==null?void 0:$[0];T&&(F=T);break}case"initialPlacement":F=i;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function An(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Pn(e){return Ys.some(t=>e[t]>=0)}const ra=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=oe(e,t);switch(r){case"referenceHidden":{const s=await $e(t,{...o,elementContext:"reference"}),a=An(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Pn(a)}}}case"escaped":{const s=await $e(t,{...o,altBoundary:!0}),a=An(s,n.floating);return{data:{escapedOffsets:a,escaped:Pn(a)}}}default:return{}}}}};async function oa(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=se(n),i=Re(n),u=de(n)==="y",l=["left","top"].includes(a)?-1:1,f=s&&u?-1:1,d=oe(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof v=="number"&&(p=i==="end"?v*-1:v),u?{x:p*f,y:h*l}:{x:h*l,y:p*f}}const sa=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:i}=t,u=await oa(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:a}}}}},aa=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:x=>{let{x:b,y:A}=x;return{x:b,y:A}}},...u}=oe(e,t),l={x:n,y:r},f=await $e(t,u),d=de(se(o)),h=Ut(d);let p=l[h],v=l[d];if(s){const x=h==="y"?"top":"left",b=h==="y"?"bottom":"right",A=p+f[x],S=p-f[b];p=Nt(A,p,S)}if(a){const x=d==="y"?"top":"left",b=d==="y"?"bottom":"right",A=v+f[x],S=v-f[b];v=Nt(A,v,S)}const g=i.fn({...t,[h]:p,[d]:v});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:s,[d]:a}}}}}},ia=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:u=!0,crossAxis:l=!0}=oe(e,t),f={x:n,y:r},d=de(o),h=Ut(d);let p=f[h],v=f[d];const g=oe(i,t),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(u){const S=h==="y"?"height":"width",C=s.reference[h]-s.floating[S]+x.mainAxis,j=s.reference[h]+s.reference[S]-x.mainAxis;p<C?p=C:p>j&&(p=j)}if(l){var b,A;const S=h==="y"?"width":"height",C=["top","left"].includes(se(o)),j=s.reference[d]-s.floating[S]+(C&&((b=a.offset)==null?void 0:b[d])||0)+(C?0:x.crossAxis),P=s.reference[d]+s.reference[S]+(C?0:((A=a.offset)==null?void 0:A[d])||0)-(C?x.crossAxis:0);v<j?v=j:v>P&&(v=P)}return{[h]:p,[d]:v}}}},ca=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:u=()=>{},...l}=oe(e,t),f=await $e(t,l),d=se(o),h=Re(o),p=de(o)==="y",{width:v,height:g}=s.floating;let x,b;d==="top"||d==="bottom"?(x=d,b=h===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(b=d,x=h==="end"?"top":"bottom");const A=g-f.top-f.bottom,S=v-f.left-f.right,C=fe(g-f[x],A),j=fe(v-f[b],S),P=!t.middlewareData.shift;let E=C,k=j;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=A),P&&!h){const I=G(f.left,0),B=G(f.right,0),H=G(f.top,0),$=G(f.bottom,0);p?k=v-2*(I!==0||B!==0?I+B:G(f.left,f.right)):E=g-2*(H!==0||$!==0?H+$:G(f.top,f.bottom))}await u({...t,availableWidth:k,availableHeight:E});const M=await a.getDimensions(i.floating);return v!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}};function at(){return typeof window<"u"}function Te(e){return Sr(e)?(e.nodeName||"").toLowerCase():"#document"}function Z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ne(e){var t;return(t=(Sr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Sr(e){return at()?e instanceof Node||e instanceof Z(e).Node:!1}function J(e){return at()?e instanceof Element||e instanceof Z(e).Element:!1}function te(e){return at()?e instanceof HTMLElement||e instanceof Z(e).HTMLElement:!1}function Nn(e){return!at()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Z(e).ShadowRoot}function Be(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=K(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function la(e){return["table","td","th"].includes(Te(e))}function it(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Zt(e){const t=Xt(),n=J(e)?K(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function ua(e){let t=me(e);for(;te(t)&&!Ne(t);){if(Zt(t))return t;if(it(t))return null;t=me(t)}return null}function Xt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ne(e){return["html","body","#document"].includes(Te(e))}function K(e){return Z(e).getComputedStyle(e)}function ct(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function me(e){if(Te(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Nn(e)&&e.host||ne(e);return Nn(t)?t.host:t}function Ar(e){const t=me(e);return Ne(t)?e.ownerDocument?e.ownerDocument.body:e.body:te(t)&&Be(t)?t:Ar(t)}function We(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ar(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Z(o);if(s){const i=Rt(a);return t.concat(a,a.visualViewport||[],Be(o)?o:[],i&&n?We(i):[])}return t.concat(o,We(o,[],n))}function Rt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Pr(e){const t=K(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=te(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=nt(n)!==s||nt(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function qt(e){return J(e)?e:e.contextElement}function Ee(e){const t=qt(e);if(!te(t))return ee(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=Pr(t);let a=(s?nt(n.width):n.width)/r,i=(s?nt(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const fa=ee(0);function Nr(e){const t=Z(e);return!Xt()||!t.visualViewport?fa:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function da(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Z(e)?!1:t}function be(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=qt(e);let a=ee(1);t&&(r?J(r)&&(a=Ee(r)):a=Ee(e));const i=da(s,n,r)?Nr(s):ee(0);let u=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(s){const h=Z(s),p=r&&J(r)?Z(r):r;let v=h,g=Rt(v);for(;g&&r&&p!==v;){const x=Ee(g),b=g.getBoundingClientRect(),A=K(g),S=b.left+(g.clientLeft+parseFloat(A.paddingLeft))*x.x,C=b.top+(g.clientTop+parseFloat(A.paddingTop))*x.y;u*=x.x,l*=x.y,f*=x.x,d*=x.y,u+=S,l+=C,v=Z(g),g=Rt(v)}}return ot({width:f,height:d,x:u,y:l})}function Jt(e,t){const n=ct(e).scrollLeft;return t?t.left+n:be(ne(e)).left+n}function Or(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Jt(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function ma(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=ne(r),i=t?it(t.floating):!1;if(r===a||i&&s)return n;let u={scrollLeft:0,scrollTop:0},l=ee(1);const f=ee(0),d=te(r);if((d||!d&&!s)&&((Te(r)!=="body"||Be(a))&&(u=ct(r)),te(r))){const p=be(r);l=Ee(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const h=a&&!d&&!s?Or(a,u,!0):ee(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+f.x+h.x,y:n.y*l.y-u.scrollTop*l.y+f.y+h.y}}function pa(e){return Array.from(e.getClientRects())}function ha(e){const t=ne(e),n=ct(e),r=e.ownerDocument.body,o=G(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=G(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Jt(e);const i=-n.scrollTop;return K(r).direction==="rtl"&&(a+=G(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}function ga(e,t){const n=Z(e),r=ne(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,i=0,u=0;if(o){s=o.width,a=o.height;const l=Xt();(!l||l&&t==="fixed")&&(i=o.offsetLeft,u=o.offsetTop)}return{width:s,height:a,x:i,y:u}}function va(e,t){const n=be(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=te(e)?Ee(e):ee(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,u=o*s.x,l=r*s.y;return{width:a,height:i,x:u,y:l}}function On(e,t,n){let r;if(t==="viewport")r=ga(e,n);else if(t==="document")r=ha(ne(e));else if(J(t))r=va(t,n);else{const o=Nr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ot(r)}function Rr(e,t){const n=me(e);return n===t||!J(n)||Ne(n)?!1:K(n).position==="fixed"||Rr(n,t)}function ya(e,t){const n=t.get(e);if(n)return n;let r=We(e,[],!1).filter(i=>J(i)&&Te(i)!=="body"),o=null;const s=K(e).position==="fixed";let a=s?me(e):e;for(;J(a)&&!Ne(a);){const i=K(a),u=Zt(a);!u&&i.position==="fixed"&&(o=null),(s?!u&&!o:!u&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Be(a)&&!u&&Rr(e,a))?r=r.filter(f=>f!==a):o=i,a=me(a)}return t.set(e,r),r}function xa(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?it(t)?[]:ya(t,this._c):[].concat(n),r],i=a[0],u=a.reduce((l,f)=>{const d=On(t,f,o);return l.top=G(d.top,l.top),l.right=fe(d.right,l.right),l.bottom=fe(d.bottom,l.bottom),l.left=G(d.left,l.left),l},On(t,i,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function ba(e){const{width:t,height:n}=Pr(e);return{width:t,height:n}}function wa(e,t,n){const r=te(t),o=ne(t),s=n==="fixed",a=be(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const u=ee(0);if(r||!r&&!s)if((Te(t)!=="body"||Be(o))&&(i=ct(t)),r){const h=be(t,!0,s,t);u.x=h.x+t.clientLeft,u.y=h.y+t.clientTop}else o&&(u.x=Jt(o));const l=o&&!r&&!s?Or(o,i):ee(0),f=a.left+i.scrollLeft-u.x-l.x,d=a.top+i.scrollTop-u.y-l.y;return{x:f,y:d,width:a.width,height:a.height}}function yt(e){return K(e).position==="static"}function Rn(e,t){if(!te(e)||K(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ne(e)===n&&(n=n.ownerDocument.body),n}function Tr(e,t){const n=Z(e);if(it(e))return n;if(!te(e)){let o=me(e);for(;o&&!Ne(o);){if(J(o)&&!yt(o))return o;o=me(o)}return n}let r=Rn(e,t);for(;r&&la(r)&&yt(r);)r=Rn(r,t);return r&&Ne(r)&&yt(r)&&!Zt(r)?n:r||ua(e)||n}const Ca=async function(e){const t=this.getOffsetParent||Tr,n=this.getDimensions,r=await n(e.floating);return{reference:wa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ja(e){return K(e).direction==="rtl"}const Ea={convertOffsetParentRelativeRectToViewportRelativeRect:ma,getDocumentElement:ne,getClippingRect:xa,getOffsetParent:Tr,getElementRects:Ca,getClientRects:pa,getDimensions:ba,getScale:Ee,isElement:J,isRTL:ja};function kr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Sa(e,t){let n=null,r;const o=ne(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),s();const l=e.getBoundingClientRect(),{left:f,top:d,width:h,height:p}=l;if(i||t(),!h||!p)return;const v=Ue(d),g=Ue(o.clientWidth-(f+h)),x=Ue(o.clientHeight-(d+p)),b=Ue(f),S={rootMargin:-v+"px "+-g+"px "+-x+"px "+-b+"px",threshold:G(0,fe(1,u))||1};let C=!0;function j(P){const E=P[0].intersectionRatio;if(E!==u){if(!C)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!kr(l,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(j,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(j,S)}n.observe(e)}return a(!0),s}function Aa(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=qt(e),f=o||s?[...l?We(l):[],...We(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const d=l&&i?Sa(l,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(b=>{let[A]=b;A&&A.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let v,g=u?be(e):null;u&&x();function x(){const b=be(e);g&&!kr(g,b)&&n(),g=b,v=requestAnimationFrame(x)}return n(),()=>{var b;f.forEach(A=>{o&&A.removeEventListener("scroll",n),s&&A.removeEventListener("resize",n)}),d?.(),(b=p)==null||b.disconnect(),p=null,u&&cancelAnimationFrame(v)}}const Pa=sa,Na=aa,Oa=na,Ra=ca,Ta=ra,Tn=ta,ka=ia,Ma=(e,t,n)=>{const r=new Map,o={platform:Ea,...n},s={...o.platform,_c:r};return ea(e,t,{...o,platform:s})};var Ke=typeof document<"u"?w.useLayoutEffect:w.useEffect;function st(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!st(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!st(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Mr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function kn(e,t){const n=Mr(e);return Math.round(t*n)/n}function xt(e){const t=m.useRef(e);return Ke(()=>{t.current=e}),t}function _a(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:u,open:l}=e,[f,d]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=m.useState(r);st(h,r)||p(r);const[v,g]=m.useState(null),[x,b]=m.useState(null),A=m.useCallback(R=>{R!==P.current&&(P.current=R,g(R))},[]),S=m.useCallback(R=>{R!==E.current&&(E.current=R,b(R))},[]),C=s||v,j=a||x,P=m.useRef(null),E=m.useRef(null),k=m.useRef(f),M=u!=null,I=xt(u),B=xt(o),H=xt(l),$=m.useCallback(()=>{if(!P.current||!E.current)return;const R={placement:t,strategy:n,middleware:h};B.current&&(R.platform=B.current),Ma(P.current,E.current,R).then(z=>{const y={...z,isPositioned:H.current!==!1};_.current&&!st(k.current,y)&&(k.current=y,ur.flushSync(()=>{d(y)}))})},[h,t,n,B,H]);Ke(()=>{l===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[l]);const _=m.useRef(!1);Ke(()=>(_.current=!0,()=>{_.current=!1}),[]),Ke(()=>{if(C&&(P.current=C),j&&(E.current=j),C&&j){if(I.current)return I.current(C,j,$);$()}},[C,j,$,I,M]);const D=m.useMemo(()=>({reference:P,floating:E,setReference:A,setFloating:S}),[A,S]),F=m.useMemo(()=>({reference:C,floating:j}),[C,j]),T=m.useMemo(()=>{const R={position:n,left:0,top:0};if(!F.floating)return R;const z=kn(F.floating,f.x),y=kn(F.floating,f.y);return i?{...R,transform:"translate("+z+"px, "+y+"px)",...Mr(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:y}},[n,i,F.floating,f.x,f.y]);return m.useMemo(()=>({...f,update:$,refs:D,elements:F,floatingStyles:T}),[f,$,D,F,T])}const Da=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Tn({element:r.current,padding:o}).fn(n):{}:r?Tn({element:r,padding:o}).fn(n):{}}}},Fa=(e,t)=>({...Pa(e),options:[e,t]}),La=(e,t)=>({...Na(e),options:[e,t]}),Ia=(e,t)=>({...ka(e),options:[e,t]}),$a=(e,t)=>({...Oa(e),options:[e,t]}),Wa=(e,t)=>({...Ra(e),options:[e,t]}),Ba=(e,t)=>({...Ta(e),options:[e,t]}),Ha=(e,t)=>({...Da(e),options:[e,t]});var za="Arrow",_r=m.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsx(ae.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});_r.displayName=za;var Va=_r;function Ua(e){const[t,n]=m.useState(void 0);return ue(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const u=s.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,i=l.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Kt="Popper",[Dr,Fr]=vr(Kt),[Ya,Lr]=Dr(Kt),Ir=e=>{const{__scopePopper:t,children:n}=e,[r,o]=m.useState(null);return c.jsx(Ya,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ir.displayName=Kt;var $r="PopperAnchor",Wr=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Lr($r,n),a=m.useRef(null),i=he(t,a),u=m.useRef(null);return m.useEffect(()=>{const l=u.current;u.current=r?.current||a.current,l!==u.current&&s.onAnchorChange(u.current)}),r?null:c.jsx(ae.div,{...o,ref:i})});Wr.displayName=$r;var Qt="PopperContent",[Ga,Za]=Dr(Qt),Br=m.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:v,...g}=e,x=Lr(Qt,n),[b,A]=m.useState(null),S=he(t,re=>A(re)),[C,j]=m.useState(null),P=Ua(C),E=P?.width??0,k=P?.height??0,M=r+(s!=="center"?"-"+s:""),I=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},B=Array.isArray(l)?l:[l],H=B.length>0,$={padding:I,boundary:B.filter(qa),altBoundary:H},{refs:_,floatingStyles:D,placement:F,isPositioned:T,middlewareData:R}=_a({strategy:"fixed",placement:M,whileElementsMounted:(...re)=>Aa(...re,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[Fa({mainAxis:o+k,alignmentAxis:a}),u&&La({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Ia():void 0,...$}),u&&$a({...$}),Wa({...$,apply:({elements:re,rects:V,availableWidth:ie,availableHeight:Me})=>{const{width:pt,height:Do}=V.reference,ze=re.floating.style;ze.setProperty("--radix-popper-available-width",`${ie}px`),ze.setProperty("--radix-popper-available-height",`${Me}px`),ze.setProperty("--radix-popper-anchor-width",`${pt}px`),ze.setProperty("--radix-popper-anchor-height",`${Do}px`)}}),C&&Ha({element:C,padding:i}),Ja({arrowWidth:E,arrowHeight:k}),h&&Ba({strategy:"referenceHidden",...$})]}),[z,y]=Vr(F),O=Pe(v);ue(()=>{T&&O?.()},[T,O]);const W=R.arrow?.x,N=R.arrow?.y,L=R.arrow?.centerOffset!==0,[U,ke]=m.useState();return ue(()=>{b&&ke(window.getComputedStyle(b).zIndex)},[b]),c.jsx("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:T?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[R.transformOrigin?.x,R.transformOrigin?.y].join(" "),...R.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Ga,{scope:n,placedSide:z,onArrowChange:j,arrowX:W,arrowY:N,shouldHideArrow:L,children:c.jsx(ae.div,{"data-side":z,"data-align":y,...g,ref:S,style:{...g.style,animation:T?void 0:"none"}})})})});Br.displayName=Qt;var Hr="PopperArrow",Xa={top:"bottom",right:"left",bottom:"top",left:"right"},zr=m.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Za(Hr,r),a=Xa[s.placedSide];return c.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsx(Va,{...o,ref:n,style:{...o.style,display:"block"}})})});zr.displayName=Hr;function qa(e){return e!==null}var Ja=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,f]=Vr(n),d={start:"0%",center:"50%",end:"100%"}[f],h=(o.arrow?.x??0)+i/2,p=(o.arrow?.y??0)+u/2;let v="",g="";return l==="bottom"?(v=a?d:`${h}px`,g=`${-u}px`):l==="top"?(v=a?d:`${h}px`,g=`${r.floating.height+u}px`):l==="right"?(v=`${-u}px`,g=a?d:`${p}px`):l==="left"&&(v=`${r.floating.width+u}px`,g=a?d:`${p}px`),{data:{x:v,y:g}}}});function Vr(e){const[t,n="center"]=e.split("-");return[t,n]}var Ka=Ir,Ur=Wr,Qa=Br,ei=zr,ti="Portal",Yr=m.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=m.useState(!1);ue(()=>s(!0),[]);const a=n||o&&globalThis?.document?.body;return a?cr.createPortal(c.jsx(ae.div,{...r,ref:t}),a):null});Yr.displayName=ti;function ni(e,t){return m.useReducer((n,r)=>t[n][r]??n,e)}var en=e=>{const{present:t,children:n}=e,r=ri(t),o=typeof n=="function"?n({present:r.isPresent}):m.Children.only(n),s=he(r.ref,oi(o));return typeof n=="function"||r.isPresent?m.cloneElement(o,{ref:s}):null};en.displayName="Presence";function ri(e){const[t,n]=m.useState(),r=m.useRef(null),o=m.useRef(e),s=m.useRef("none"),a=e?"mounted":"unmounted",[i,u]=ni(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const l=Ye(r.current);s.current=i==="mounted"?l:"none"},[i]),ue(()=>{const l=r.current,f=o.current;if(f!==e){const h=s.current,p=Ye(l);e?u("MOUNT"):p==="none"||l?.display==="none"?u("UNMOUNT"):u(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),ue(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,d=p=>{const g=Ye(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&g&&(u("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},h=p=>{p.target===t&&(s.current=Ye(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:m.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Ye(e){return e?.animationName||"none"}function oi(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var si=m[" useInsertionEffect ".trim().toString()]||ue;function ai({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=ii({defaultProp:t,onChange:n}),i=e!==void 0,u=i?e:o;{const f=m.useRef(e!==void 0);m.useEffect(()=>{const d=f.current;d!==i&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,r])}const l=m.useCallback(f=>{if(i){const d=ci(f)?f(e):f;d!==e&&a.current?.(d)}else s(f)},[i,e,s,a]);return[u,l]}function ii({defaultProp:e,onChange:t}){const[n,r]=m.useState(e),o=m.useRef(n),s=m.useRef(t);return si(()=>{s.current=t},[t]),m.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function ci(e){return typeof e=="function"}var li=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},we=new WeakMap,Ge=new WeakMap,Ze={},bt=0,Gr=function(e){return e&&(e.host||Gr(e.parentNode))},ui=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Gr(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},fi=function(e,t,n,r){var o=ui(t,Array.isArray(e)?e:[e]);Ze[n]||(Ze[n]=new WeakMap);var s=Ze[n],a=[],i=new Set,u=new Set(o),l=function(d){!d||i.has(d)||(i.add(d),l(d.parentNode))};o.forEach(l);var f=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(h){if(i.has(h))f(h);else try{var p=h.getAttribute(r),v=p!==null&&p!=="false",g=(we.get(h)||0)+1,x=(s.get(h)||0)+1;we.set(h,g),s.set(h,x),a.push(h),g===1&&v&&Ge.set(h,!0),x===1&&h.setAttribute(n,"true"),v||h.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",h,b)}})};return f(t),i.clear(),bt++,function(){a.forEach(function(d){var h=we.get(d)-1,p=s.get(d)-1;we.set(d,h),s.set(d,p),h||(Ge.has(d)||d.removeAttribute(r),Ge.delete(d)),p||d.removeAttribute(n)}),bt--,bt||(we=new WeakMap,we=new WeakMap,Ge=new WeakMap,Ze={})}},di=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=li(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),fi(r,o,n,"aria-hidden")):function(){return null}},Q=function(){return Q=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Q.apply(this,arguments)};function Zr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function mi(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Qe="right-scroll-bar-position",et="width-before-scroll-bar",pi="with-scroll-bars-hidden",hi="--removed-body-scroll-bar-size";function wt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function gi(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var vi=typeof window<"u"?m.useLayoutEffect:m.useEffect,Mn=new WeakMap;function yi(e,t){var n=gi(null,function(r){return e.forEach(function(o){return wt(o,r)})});return vi(function(){var r=Mn.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(i){s.has(i)||wt(i,null)}),s.forEach(function(i){o.has(i)||wt(i,a)})}Mn.set(n,e)},[e]),n}function xi(e){return e}function bi(e,t){t===void 0&&(t=xi);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var u=function(){var f=a;a=[],f.forEach(s)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(f){a.push(f),l()},filter:function(f){return a=a.filter(f),n}}}};return o}function wi(e){e===void 0&&(e={});var t=bi(null);return t.options=Q({async:!0,ssr:!1},e),t}var Xr=function(e){var t=e.sideCar,n=Zr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return m.createElement(r,Q({},n))};Xr.isSideCarExport=!0;function Ci(e,t){return e.useMedium(t),Xr}var qr=wi(),Ct=function(){},lt=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:Ct,onWheelCapture:Ct,onTouchMoveCapture:Ct}),o=r[0],s=r[1],a=e.forwardProps,i=e.children,u=e.className,l=e.removeScrollBar,f=e.enabled,d=e.shards,h=e.sideCar,p=e.noIsolation,v=e.inert,g=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,A=e.gapMode,S=Zr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,j=yi([n,t]),P=Q(Q({},S),o);return m.createElement(m.Fragment,null,f&&m.createElement(C,{sideCar:qr,removeScrollBar:l,shards:d,noIsolation:p,inert:v,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:A}),a?m.cloneElement(m.Children.only(i),Q(Q({},P),{ref:j})):m.createElement(b,Q({},P,{className:u,ref:j}),i))});lt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};lt.classNames={fullWidth:et,zeroRight:Qe};var ji=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ei(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ji();return t&&e.setAttribute("nonce",t),e}function Si(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ai(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Pi=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ei())&&(Si(t,n),Ai(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ni=function(){var e=Pi();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Jr=function(){var e=Ni(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Oi={left:0,top:0,right:0,gap:0},jt=function(e){return parseInt(e||"",10)||0},Ri=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[jt(n),jt(r),jt(o)]},Ti=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Oi;var t=Ri(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ki=Jr(),Se="data-scroll-locked",Mi=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
98
- .`.concat(pi,` {
97
+ */const as=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],is=K("copy",as),bt=({textToCopy:e,className:t,title:n})=>{const[r,o]=w.useState(!1),s=w.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch(a){console.error("Failed to copy:",a)}},[e]);return c.jsx(Y.Button,{variant:"icon",size:"icon",onClick:s,className:Y.cn("cursor-pointer p-3 rounded-full",t),title:n??(r?"Copied!":"Copy"),children:r?c.jsx(ss,{className:"w-4 h-4 text-green-500"}):c.jsx(is,{className:"w-4 h-4 text-gray-400"})})};function le(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function ln(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function sr(...e){return t=>{let n=!1;const r=e.map(o=>{const s=ln(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():ln(e[o],null)}}}}function me(...e){return p.useCallback(sr(...e),e)}function ar(e,t=[]){let n=[];function r(s,a){const i=p.createContext(a),u=n.length;n=[...n,a];const l=d=>{const{scope:v,children:m,...y}=d,h=v?.[e]?.[u]||i,x=p.useMemo(()=>y,Object.values(y));return c.jsx(h.Provider,{value:x,children:m})};l.displayName=s+"Provider";function f(d,v){const m=v?.[e]?.[u]||i,y=p.useContext(m);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,f]}const o=()=>{const s=n.map(a=>p.createContext(a));return function(i){const u=i?.[e]||s;return p.useMemo(()=>({[`__scope${e}`]:{...i,[e]:u}}),[i,u])}};return o.scopeName=e,[r,cs(o,...t)]}function cs(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:u,scopeName:l})=>{const d=u(s)[`__scope${l}`];return{...i,...d}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ir(e){const t=ls(e),n=p.forwardRef((r,o)=>{const{children:s,...a}=r,i=p.Children.toArray(s),u=i.find(fs);if(u){const l=u.props.children,f=i.map(d=>d===u?p.Children.count(l)>1?p.Children.only(null):p.isValidElement(l)?l.props.children:null:d);return c.jsx(t,{...a,ref:o,children:p.isValidElement(l)?p.cloneElement(l,void 0,f):null})}return c.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function ls(e){const t=p.forwardRef((n,r)=>{const{children:o,...s}=n;if(p.isValidElement(o)){const a=ps(o),i=ds(s,o.props);return o.type!==p.Fragment&&(i.ref=r?sr(r,a):a),p.cloneElement(o,i)}return p.Children.count(o)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var us=Symbol("radix.slottable");function fs(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===us}function ds(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const u=s(...i);return o(...i),u}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ps(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ms=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ae=ms.reduce((e,t)=>{const n=ir(`Primitive.${t}`),r=p.forwardRef((o,s)=>{const{asChild:a,...i}=o,u=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(u,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function hs(e,t){e&&Qn.flushSync(()=>e.dispatchEvent(t))}function Ae(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>t.current?.(...n),[])}function vs(e,t=globalThis?.document){const n=Ae(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var gs="DismissableLayer",wt="dismissableLayer.update",ys="dismissableLayer.pointerDownOutside",xs="dismissableLayer.focusOutside",un,cr=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lr=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...u}=e,l=p.useContext(cr),[f,d]=p.useState(null),v=f?.ownerDocument??globalThis?.document,[,m]=p.useState({}),y=me(t,E=>d(E)),h=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(x),A=f?h.indexOf(f):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,j=A>=b,C=js(E=>{const k=E.target,_=[...l.branches].some(F=>F.contains(k));!j||_||(o?.(E),a?.(E),E.defaultPrevented||i?.())},v),N=Cs(E=>{const k=E.target;[...l.branches].some(F=>F.contains(k))||(s?.(E),a?.(E),E.defaultPrevented||i?.())},v);return vs(E=>{A===l.layers.size-1&&(r?.(E),!E.defaultPrevented&&i&&(E.preventDefault(),i()))},v),p.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(un=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),fn(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=un)}},[f,v,n,l]),p.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),fn())},[f,l]),p.useEffect(()=>{const E=()=>m({});return document.addEventListener(wt,E),()=>document.removeEventListener(wt,E)},[]),c.jsx(ae.div,{...u,ref:y,style:{pointerEvents:S?j?"auto":"none":void 0,...e.style},onFocusCapture:le(e.onFocusCapture,N.onFocusCapture),onBlurCapture:le(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:le(e.onPointerDownCapture,C.onPointerDownCapture)})});lr.displayName=gs;var bs="DismissableLayerBranch",ws=p.forwardRef((e,t)=>{const n=p.useContext(cr),r=p.useRef(null),o=me(t,r);return p.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),c.jsx(ae.div,{...e,ref:o})});ws.displayName=bs;function js(e,t=globalThis?.document){const n=Ae(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let u=function(){ur(ys,n,l,{discrete:!0})};const l={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Cs(e,t=globalThis?.document){const n=Ae(e),r=p.useRef(!1);return p.useEffect(()=>{const o=s=>{s.target&&!r.current&&ur(xs,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function fn(){const e=new CustomEvent(wt);document.dispatchEvent(e)}function ur(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?hs(o,s):o.dispatchEvent(s)}var ut=0;function Es(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??dn()),document.body.insertAdjacentElement("beforeend",e[1]??dn()),ut++,()=>{ut===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ut--}},[])}function dn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ft="focusScope.autoFocusOnMount",dt="focusScope.autoFocusOnUnmount",pn={bubbles:!1,cancelable:!0},Ss="FocusScope",fr=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,u]=p.useState(null),l=Ae(o),f=Ae(s),d=p.useRef(null),v=me(t,h=>u(h)),m=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let h=function(S){if(m.paused||!i)return;const j=S.target;i.contains(j)?d.current=j:ce(d.current,{select:!0})},x=function(S){if(m.paused||!i)return;const j=S.relatedTarget;j!==null&&(i.contains(j)||ce(d.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const C of S)C.removedNodes.length>0&&ce(i)};document.addEventListener("focusin",h),document.addEventListener("focusout",x);const A=new MutationObserver(b);return i&&A.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",x),A.disconnect()}}},[r,i,m.paused]),p.useEffect(()=>{if(i){hn.add(m);const h=document.activeElement;if(!i.contains(h)){const b=new CustomEvent(ft,pn);i.addEventListener(ft,l),i.dispatchEvent(b),b.defaultPrevented||(As(Ps(dr(i)),{select:!0}),document.activeElement===h&&ce(i))}return()=>{i.removeEventListener(ft,l),setTimeout(()=>{const b=new CustomEvent(dt,pn);i.addEventListener(dt,f),i.dispatchEvent(b),b.defaultPrevented||ce(h??document.body,{select:!0}),i.removeEventListener(dt,f),hn.remove(m)},0)}}},[i,l,f,m]);const y=p.useCallback(h=>{if(!n&&!r||m.paused)return;const x=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,b=document.activeElement;if(x&&b){const A=h.currentTarget,[S,j]=Ns(A);S&&j?!h.shiftKey&&b===j?(h.preventDefault(),n&&ce(S,{select:!0})):h.shiftKey&&b===S&&(h.preventDefault(),n&&ce(j,{select:!0})):b===A&&h.preventDefault()}},[n,r,m.paused]);return c.jsx(ae.div,{tabIndex:-1,...a,ref:v,onKeyDown:y})});fr.displayName=Ss;function As(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ce(r,{select:t}),document.activeElement!==n)return}function Ns(e){const t=dr(e),n=mn(t,e),r=mn(t.reverse(),e);return[n,r]}function dr(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function mn(e,t){for(const n of e)if(!Rs(n,{upTo:t}))return n}function Rs(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ts(e){return e instanceof HTMLInputElement&&"select"in e}function ce(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ts(e)&&t&&e.select()}}var hn=Os();function Os(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=vn(e,t),e.unshift(t)},remove(t){e=vn(e,t),e[0]?.resume()}}}function vn(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ps(e){return e.filter(t=>t.tagName!=="A")}var ue=globalThis?.document?p.useLayoutEffect:()=>{},ks=p[" useId ".trim().toString()]||(()=>{}),_s=0;function Ms(e){const[t,n]=p.useState(ks());return ue(()=>{n(r=>r??String(_s++))},[e]),e||(t?`radix-${t}`:"")}const Ds=["top","right","bottom","left"],fe=Math.min,G=Math.max,qe=Math.round,He=Math.floor,ee=e=>({x:e,y:e}),Is={left:"right",right:"left",bottom:"top",top:"bottom"},Ls={start:"end",end:"start"};function jt(e,t,n){return G(e,fe(t,n))}function oe(e,t){return typeof e=="function"?e(t):e}function se(e){return e.split("-")[0]}function Te(e){return e.split("-")[1]}function $t(e){return e==="x"?"y":"x"}function Bt(e){return e==="y"?"height":"width"}function de(e){return["top","bottom"].includes(se(e))?"y":"x"}function Wt(e){return $t(de(e))}function Fs(e,t,n){n===void 0&&(n=!1);const r=Te(e),o=Wt(e),s=Bt(o);let a=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Je(a)),[a,Je(a)]}function $s(e){const t=Je(e);return[Ct(e),t,Ct(t)]}function Ct(e){return e.replace(/start|end/g,t=>Ls[t])}function Bs(e,t,n){const r=["left","right"],o=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:a;default:return[]}}function Ws(e,t,n,r){const o=Te(e);let s=Bs(se(e),n==="start",r);return o&&(s=s.map(a=>a+"-"+o),t&&(s=s.concat(s.map(Ct)))),s}function Je(e){return e.replace(/left|right|bottom|top/g,t=>Is[t])}function Hs(e){return{top:0,right:0,bottom:0,left:0,...e}}function pr(e){return typeof e!="number"?Hs(e):{top:e,right:e,bottom:e,left:e}}function Qe(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function gn(e,t,n){let{reference:r,floating:o}=e;const s=de(t),a=Wt(t),i=Bt(a),u=se(t),l=s==="y",f=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,v=r[i]/2-o[i]/2;let m;switch(u){case"top":m={x:f,y:r.y-o.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(Te(t)){case"start":m[a]-=v*(n&&l?-1:1);break;case"end":m[a]+=v*(n&&l?-1:1);break}return m}const Us=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:a}=n,i=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=gn(l,r,u),v=r,m={},y=0;for(let h=0;h<i.length;h++){const{name:x,fn:b}=i[h],{x:A,y:S,data:j,reset:C}=await b({x:f,y:d,initialPlacement:r,placement:v,strategy:o,middlewareData:m,rects:l,platform:a,elements:{reference:e,floating:t}});f=A??f,d=S??d,m={...m,[x]:{...m[x],...j}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(v=C.placement),C.rects&&(l=C.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:d}=gn(l,v,u)),h=-1)}return{x:f,y:d,placement:v,strategy:o,middlewareData:m}};async function Ie(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:a,elements:i,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:v=!1,padding:m=0}=oe(t,e),y=pr(m),x=i[v?d==="floating"?"reference":"floating":d],b=Qe(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(i.floating)),boundary:l,rootBoundary:f,strategy:u})),A=d==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(i.floating)),j=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},C=Qe(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:A,offsetParent:S,strategy:u}):A);return{top:(b.top-C.top+y.top)/j.y,bottom:(C.bottom-b.bottom+y.bottom)/j.y,left:(b.left-C.left+y.left)/j.x,right:(C.right-b.right+y.right)/j.x}}const zs=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:a,elements:i,middlewareData:u}=t,{element:l,padding:f=0}=oe(e,t)||{};if(l==null)return{};const d=pr(f),v={x:n,y:r},m=Wt(o),y=Bt(m),h=await a.getDimensions(l),x=m==="y",b=x?"top":"left",A=x?"bottom":"right",S=x?"clientHeight":"clientWidth",j=s.reference[y]+s.reference[m]-v[m]-s.floating[y],C=v[m]-s.reference[m],N=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let E=N?N[S]:0;(!E||!await(a.isElement==null?void 0:a.isElement(N)))&&(E=i.floating[S]||s.floating[y]);const k=j/2-C/2,_=E/2-h[y]/2-1,F=fe(d[b],_),W=fe(d[A],_),H=F,$=E-h[y]-W,M=E/2-h[y]/2+k,D=jt(H,M,$),I=!u.arrow&&Te(o)!=null&&M!==D&&s.reference[y]/2-(M<H?F:W)-h[y]/2<0,P=I?M<H?M-H:M-$:0;return{[m]:v[m]+P,data:{[m]:D,centerOffset:M-D-P,...I&&{alignmentOffset:P}},reset:I}}}),Vs=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:a,initialPlacement:i,platform:u,elements:l}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:v,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:h=!0,...x}=oe(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=se(o),A=de(i),S=se(i)===i,j=await(u.isRTL==null?void 0:u.isRTL(l.floating)),C=v||(S||!h?[Je(i)]:$s(i)),N=y!=="none";!v&&N&&C.push(...Ws(i,h,y,j));const E=[i,...C],k=await Ie(t,x),_=[];let F=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&_.push(k[b]),d){const M=Fs(o,a,j);_.push(k[M[0]],k[M[1]])}if(F=[...F,{placement:o,overflows:_}],!_.every(M=>M<=0)){var W,H;const M=(((W=s.flip)==null?void 0:W.index)||0)+1,D=E[M];if(D)return{data:{index:M,overflows:F},reset:{placement:D}};let I=(H=F.filter(P=>P.overflows[0]<=0).sort((P,O)=>P.overflows[1]-O.overflows[1])[0])==null?void 0:H.placement;if(!I)switch(m){case"bestFit":{var $;const P=($=F.filter(O=>{if(N){const U=de(O.placement);return U===A||U==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(U=>U>0).reduce((U,g)=>U+g,0)]).sort((O,U)=>O[1]-U[1])[0])==null?void 0:$[0];P&&(I=P);break}case"initialPlacement":I=i;break}if(o!==I)return{reset:{placement:I}}}return{}}}};function yn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xn(e){return Ds.some(t=>e[t]>=0)}const Ys=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=oe(e,t);switch(r){case"referenceHidden":{const s=await Ie(t,{...o,elementContext:"reference"}),a=yn(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:xn(a)}}}case"escaped":{const s=await Ie(t,{...o,altBoundary:!0}),a=yn(s,n.floating);return{data:{escapedOffsets:a,escaped:xn(a)}}}default:return{}}}}};async function Gs(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=se(n),i=Te(n),u=de(n)==="y",l=["left","top"].includes(a)?-1:1,f=s&&u?-1:1,d=oe(t,e);let{mainAxis:v,crossAxis:m,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof y=="number"&&(m=i==="end"?y*-1:y),u?{x:m*f,y:v*l}:{x:v*l,y:m*f}}const Zs=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:a,middlewareData:i}=t,u=await Gs(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+u.x,y:s+u.y,data:{...u,placement:a}}}}},Ks=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:i={fn:x=>{let{x:b,y:A}=x;return{x:b,y:A}}},...u}=oe(e,t),l={x:n,y:r},f=await Ie(t,u),d=de(se(o)),v=$t(d);let m=l[v],y=l[d];if(s){const x=v==="y"?"top":"left",b=v==="y"?"bottom":"right",A=m+f[x],S=m-f[b];m=jt(A,m,S)}if(a){const x=d==="y"?"top":"left",b=d==="y"?"bottom":"right",A=y+f[x],S=y-f[b];y=jt(A,y,S)}const h=i.fn({...t,[v]:m,[d]:y});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[v]:s,[d]:a}}}}}},Xs=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:a}=t,{offset:i=0,mainAxis:u=!0,crossAxis:l=!0}=oe(e,t),f={x:n,y:r},d=de(o),v=$t(d);let m=f[v],y=f[d];const h=oe(i,t),x=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const S=v==="y"?"height":"width",j=s.reference[v]-s.floating[S]+x.mainAxis,C=s.reference[v]+s.reference[S]-x.mainAxis;m<j?m=j:m>C&&(m=C)}if(l){var b,A;const S=v==="y"?"width":"height",j=["top","left"].includes(se(o)),C=s.reference[d]-s.floating[S]+(j&&((b=a.offset)==null?void 0:b[d])||0)+(j?0:x.crossAxis),N=s.reference[d]+s.reference[S]+(j?0:((A=a.offset)==null?void 0:A[d])||0)-(j?x.crossAxis:0);y<C?y=C:y>N&&(y=N)}return{[v]:m,[d]:y}}}},qs=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:a,elements:i}=t,{apply:u=()=>{},...l}=oe(e,t),f=await Ie(t,l),d=se(o),v=Te(o),m=de(o)==="y",{width:y,height:h}=s.floating;let x,b;d==="top"||d==="bottom"?(x=d,b=v===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(b=d,x=v==="end"?"top":"bottom");const A=h-f.top-f.bottom,S=y-f.left-f.right,j=fe(h-f[x],A),C=fe(y-f[b],S),N=!t.middlewareData.shift;let E=j,k=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=A),N&&!v){const F=G(f.left,0),W=G(f.right,0),H=G(f.top,0),$=G(f.bottom,0);m?k=y-2*(F!==0||W!==0?F+W:G(f.left,f.right)):E=h-2*(H!==0||$!==0?H+$:G(f.top,f.bottom))}await u({...t,availableWidth:k,availableHeight:E});const _=await a.getDimensions(i.floating);return y!==_.width||h!==_.height?{reset:{rects:!0}}:{}}}};function tt(){return typeof window<"u"}function Oe(e){return mr(e)?(e.nodeName||"").toLowerCase():"#document"}function Z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ne(e){var t;return(t=(mr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mr(e){return tt()?e instanceof Node||e instanceof Z(e).Node:!1}function q(e){return tt()?e instanceof Element||e instanceof Z(e).Element:!1}function te(e){return tt()?e instanceof HTMLElement||e instanceof Z(e).HTMLElement:!1}function bn(e){return!tt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Z(e).ShadowRoot}function Fe(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=J(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Js(e){return["table","td","th"].includes(Oe(e))}function nt(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ht(e){const t=Ut(),n=q(e)?J(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Qs(e){let t=pe(e);for(;te(t)&&!Ne(t);){if(Ht(t))return t;if(nt(t))return null;t=pe(t)}return null}function Ut(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ne(e){return["html","body","#document"].includes(Oe(e))}function J(e){return Z(e).getComputedStyle(e)}function rt(e){return q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function pe(e){if(Oe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bn(e)&&e.host||ne(e);return bn(t)?t.host:t}function hr(e){const t=pe(e);return Ne(t)?e.ownerDocument?e.ownerDocument.body:e.body:te(t)&&Fe(t)?t:hr(t)}function Le(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=hr(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),a=Z(o);if(s){const i=Et(a);return t.concat(a,a.visualViewport||[],Fe(o)?o:[],i&&n?Le(i):[])}return t.concat(o,Le(o,[],n))}function Et(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vr(e){const t=J(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=te(e),s=o?e.offsetWidth:n,a=o?e.offsetHeight:r,i=qe(n)!==s||qe(r)!==a;return i&&(n=s,r=a),{width:n,height:r,$:i}}function zt(e){return q(e)?e:e.contextElement}function Ce(e){const t=zt(e);if(!te(t))return ee(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=vr(t);let a=(s?qe(n.width):n.width)/r,i=(s?qe(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const ea=ee(0);function gr(e){const t=Z(e);return!Ut()||!t.visualViewport?ea:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ta(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Z(e)?!1:t}function xe(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=zt(e);let a=ee(1);t&&(r?q(r)&&(a=Ce(r)):a=Ce(e));const i=ta(s,n,r)?gr(s):ee(0);let u=(o.left+i.x)/a.x,l=(o.top+i.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(s){const v=Z(s),m=r&&q(r)?Z(r):r;let y=v,h=Et(y);for(;h&&r&&m!==y;){const x=Ce(h),b=h.getBoundingClientRect(),A=J(h),S=b.left+(h.clientLeft+parseFloat(A.paddingLeft))*x.x,j=b.top+(h.clientTop+parseFloat(A.paddingTop))*x.y;u*=x.x,l*=x.y,f*=x.x,d*=x.y,u+=S,l+=j,y=Z(h),h=Et(y)}}return Qe({width:f,height:d,x:u,y:l})}function Vt(e,t){const n=rt(e).scrollLeft;return t?t.left+n:xe(ne(e)).left+n}function yr(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Vt(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function na(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",a=ne(r),i=t?nt(t.floating):!1;if(r===a||i&&s)return n;let u={scrollLeft:0,scrollTop:0},l=ee(1);const f=ee(0),d=te(r);if((d||!d&&!s)&&((Oe(r)!=="body"||Fe(a))&&(u=rt(r)),te(r))){const m=xe(r);l=Ce(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const v=a&&!d&&!s?yr(a,u,!0):ee(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+f.x+v.x,y:n.y*l.y-u.scrollTop*l.y+f.y+v.y}}function ra(e){return Array.from(e.getClientRects())}function oa(e){const t=ne(e),n=rt(e),r=e.ownerDocument.body,o=G(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=G(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Vt(e);const i=-n.scrollTop;return J(r).direction==="rtl"&&(a+=G(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:a,y:i}}function sa(e,t){const n=Z(e),r=ne(e),o=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,i=0,u=0;if(o){s=o.width,a=o.height;const l=Ut();(!l||l&&t==="fixed")&&(i=o.offsetLeft,u=o.offsetTop)}return{width:s,height:a,x:i,y:u}}function aa(e,t){const n=xe(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=te(e)?Ce(e):ee(1),a=e.clientWidth*s.x,i=e.clientHeight*s.y,u=o*s.x,l=r*s.y;return{width:a,height:i,x:u,y:l}}function wn(e,t,n){let r;if(t==="viewport")r=sa(e,n);else if(t==="document")r=oa(ne(e));else if(q(t))r=aa(t,n);else{const o=gr(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Qe(r)}function xr(e,t){const n=pe(e);return n===t||!q(n)||Ne(n)?!1:J(n).position==="fixed"||xr(n,t)}function ia(e,t){const n=t.get(e);if(n)return n;let r=Le(e,[],!1).filter(i=>q(i)&&Oe(i)!=="body"),o=null;const s=J(e).position==="fixed";let a=s?pe(e):e;for(;q(a)&&!Ne(a);){const i=J(a),u=Ht(a);!u&&i.position==="fixed"&&(o=null),(s?!u&&!o:!u&&i.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Fe(a)&&!u&&xr(e,a))?r=r.filter(f=>f!==a):o=i,a=pe(a)}return t.set(e,r),r}function ca(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?nt(t)?[]:ia(t,this._c):[].concat(n),r],i=a[0],u=a.reduce((l,f)=>{const d=wn(t,f,o);return l.top=G(d.top,l.top),l.right=fe(d.right,l.right),l.bottom=fe(d.bottom,l.bottom),l.left=G(d.left,l.left),l},wn(t,i,o));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function la(e){const{width:t,height:n}=vr(e);return{width:t,height:n}}function ua(e,t,n){const r=te(t),o=ne(t),s=n==="fixed",a=xe(e,!0,s,t);let i={scrollLeft:0,scrollTop:0};const u=ee(0);if(r||!r&&!s)if((Oe(t)!=="body"||Fe(o))&&(i=rt(t)),r){const v=xe(t,!0,s,t);u.x=v.x+t.clientLeft,u.y=v.y+t.clientTop}else o&&(u.x=Vt(o));const l=o&&!r&&!s?yr(o,i):ee(0),f=a.left+i.scrollLeft-u.x-l.x,d=a.top+i.scrollTop-u.y-l.y;return{x:f,y:d,width:a.width,height:a.height}}function pt(e){return J(e).position==="static"}function jn(e,t){if(!te(e)||J(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ne(e)===n&&(n=n.ownerDocument.body),n}function br(e,t){const n=Z(e);if(nt(e))return n;if(!te(e)){let o=pe(e);for(;o&&!Ne(o);){if(q(o)&&!pt(o))return o;o=pe(o)}return n}let r=jn(e,t);for(;r&&Js(r)&&pt(r);)r=jn(r,t);return r&&Ne(r)&&pt(r)&&!Ht(r)?n:r||Qs(e)||n}const fa=async function(e){const t=this.getOffsetParent||br,n=this.getDimensions,r=await n(e.floating);return{reference:ua(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function da(e){return J(e).direction==="rtl"}const pa={convertOffsetParentRelativeRectToViewportRelativeRect:na,getDocumentElement:ne,getClippingRect:ca,getOffsetParent:br,getElementRects:fa,getClientRects:ra,getDimensions:la,getScale:Ce,isElement:q,isRTL:da};function wr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ma(e,t){let n=null,r;const o=ne(e);function s(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function a(i,u){i===void 0&&(i=!1),u===void 0&&(u=1),s();const l=e.getBoundingClientRect(),{left:f,top:d,width:v,height:m}=l;if(i||t(),!v||!m)return;const y=He(d),h=He(o.clientWidth-(f+v)),x=He(o.clientHeight-(d+m)),b=He(f),S={rootMargin:-y+"px "+-h+"px "+-x+"px "+-b+"px",threshold:G(0,fe(1,u))||1};let j=!0;function C(N){const E=N[0].intersectionRatio;if(E!==u){if(!j)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!wr(l,e.getBoundingClientRect())&&a(),j=!1}try{n=new IntersectionObserver(C,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,S)}n.observe(e)}return a(!0),s}function ha(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=zt(e),f=o||s?[...l?Le(l):[],...Le(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const d=l&&i?ma(l,n):null;let v=-1,m=null;a&&(m=new ResizeObserver(b=>{let[A]=b;A&&A.target===l&&m&&(m.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var S;(S=m)==null||S.observe(t)})),n()}),l&&!u&&m.observe(l),m.observe(t));let y,h=u?xe(e):null;u&&x();function x(){const b=xe(e);h&&!wr(h,b)&&n(),h=b,y=requestAnimationFrame(x)}return n(),()=>{var b;f.forEach(A=>{o&&A.removeEventListener("scroll",n),s&&A.removeEventListener("resize",n)}),d?.(),(b=m)==null||b.disconnect(),m=null,u&&cancelAnimationFrame(y)}}const va=Zs,ga=Ks,ya=Vs,xa=qs,ba=Ys,Cn=zs,wa=Xs,ja=(e,t,n)=>{const r=new Map,o={platform:pa,...n},s={...o.platform,_c:r};return Us(e,t,{...o,platform:s})};var Ze=typeof document<"u"?w.useLayoutEffect:w.useEffect;function et(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!et(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!et(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function jr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function En(e,t){const n=jr(e);return Math.round(t*n)/n}function mt(e){const t=p.useRef(e);return Ze(()=>{t.current=e}),t}function Ca(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:a}={},transform:i=!0,whileElementsMounted:u,open:l}=e,[f,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,m]=p.useState(r);et(v,r)||m(r);const[y,h]=p.useState(null),[x,b]=p.useState(null),A=p.useCallback(O=>{O!==N.current&&(N.current=O,h(O))},[]),S=p.useCallback(O=>{O!==E.current&&(E.current=O,b(O))},[]),j=s||y,C=a||x,N=p.useRef(null),E=p.useRef(null),k=p.useRef(f),_=u!=null,F=mt(u),W=mt(o),H=mt(l),$=p.useCallback(()=>{if(!N.current||!E.current)return;const O={placement:t,strategy:n,middleware:v};W.current&&(O.platform=W.current),ja(N.current,E.current,O).then(U=>{const g={...U,isPositioned:H.current!==!1};M.current&&!et(k.current,g)&&(k.current=g,Qn.flushSync(()=>{d(g)}))})},[v,t,n,W,H]);Ze(()=>{l===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(O=>({...O,isPositioned:!1})))},[l]);const M=p.useRef(!1);Ze(()=>(M.current=!0,()=>{M.current=!1}),[]),Ze(()=>{if(j&&(N.current=j),C&&(E.current=C),j&&C){if(F.current)return F.current(j,C,$);$()}},[j,C,$,F,_]);const D=p.useMemo(()=>({reference:N,floating:E,setReference:A,setFloating:S}),[A,S]),I=p.useMemo(()=>({reference:j,floating:C}),[j,C]),P=p.useMemo(()=>{const O={position:n,left:0,top:0};if(!I.floating)return O;const U=En(I.floating,f.x),g=En(I.floating,f.y);return i?{...O,transform:"translate("+U+"px, "+g+"px)",...jr(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:g}},[n,i,I.floating,f.x,f.y]);return p.useMemo(()=>({...f,update:$,refs:D,elements:I,floatingStyles:P}),[f,$,D,I,P])}const Ea=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Cn({element:r.current,padding:o}).fn(n):{}:r?Cn({element:r,padding:o}).fn(n):{}}}},Sa=(e,t)=>({...va(e),options:[e,t]}),Aa=(e,t)=>({...ga(e),options:[e,t]}),Na=(e,t)=>({...wa(e),options:[e,t]}),Ra=(e,t)=>({...ya(e),options:[e,t]}),Ta=(e,t)=>({...xa(e),options:[e,t]}),Oa=(e,t)=>({...ba(e),options:[e,t]}),Pa=(e,t)=>({...Ea(e),options:[e,t]});var ka="Arrow",Cr=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return c.jsx(ae.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cr.displayName=ka;var _a=Cr;function Ma(e){const[t,n]=p.useState(void 0);return ue(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const u=s.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,i=l.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Yt="Popper",[Er,Sr]=ar(Yt),[Da,Ar]=Er(Yt),Nr=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return c.jsx(Da,{scope:t,anchor:r,onAnchorChange:o,children:n})};Nr.displayName=Yt;var Rr="PopperAnchor",Tr=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Ar(Rr,n),a=p.useRef(null),i=me(t,a),u=p.useRef(null);return p.useEffect(()=>{const l=u.current;u.current=r?.current||a.current,l!==u.current&&s.onAnchorChange(u.current)}),r?null:c.jsx(ae.div,{...o,ref:i})});Tr.displayName=Rr;var Gt="PopperContent",[Ia,La]=Er(Gt),Or=p.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:v=!1,updatePositionStrategy:m="optimized",onPlaced:y,...h}=e,x=Ar(Gt,n),[b,A]=p.useState(null),S=me(t,re=>A(re)),[j,C]=p.useState(null),N=Ma(j),E=N?.width??0,k=N?.height??0,_=r+(s!=="center"?"-"+s:""),F=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},W=Array.isArray(l)?l:[l],H=W.length>0,$={padding:F,boundary:W.filter($a),altBoundary:H},{refs:M,floatingStyles:D,placement:I,isPositioned:P,middlewareData:O}=Ca({strategy:"fixed",placement:_,whileElementsMounted:(...re)=>ha(...re,{animationFrame:m==="always"}),elements:{reference:x.anchor},middleware:[Sa({mainAxis:o+k,alignmentAxis:a}),u&&Aa({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Na():void 0,...$}),u&&Ra({...$}),Ta({...$,apply:({elements:re,rects:z,availableWidth:ie,availableHeight:ke})=>{const{width:lt,height:Eo}=z.reference,Be=re.floating.style;Be.setProperty("--radix-popper-available-width",`${ie}px`),Be.setProperty("--radix-popper-available-height",`${ke}px`),Be.setProperty("--radix-popper-anchor-width",`${lt}px`),Be.setProperty("--radix-popper-anchor-height",`${Eo}px`)}}),j&&Pa({element:j,padding:i}),Ba({arrowWidth:E,arrowHeight:k}),v&&Oa({strategy:"referenceHidden",...$})]}),[U,g]=_r(I),T=Ae(y);ue(()=>{P&&T?.()},[P,T]);const B=O.arrow?.x,R=O.arrow?.y,L=O.arrow?.centerOffset!==0,[V,Pe]=p.useState();return ue(()=>{b&&Pe(window.getComputedStyle(b).zIndex)},[b]),c.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:P?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,"--radix-popper-transform-origin":[O.transformOrigin?.x,O.transformOrigin?.y].join(" "),...O.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Ia,{scope:n,placedSide:U,onArrowChange:C,arrowX:B,arrowY:R,shouldHideArrow:L,children:c.jsx(ae.div,{"data-side":U,"data-align":g,...h,ref:S,style:{...h.style,animation:P?void 0:"none"}})})})});Or.displayName=Gt;var Pr="PopperArrow",Fa={top:"bottom",right:"left",bottom:"top",left:"right"},kr=p.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=La(Pr,r),a=Fa[s.placedSide];return c.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:c.jsx(_a,{...o,ref:n,style:{...o.style,display:"block"}})})});kr.displayName=Pr;function $a(e){return e!==null}var Ba=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,f]=_r(n),d={start:"0%",center:"50%",end:"100%"}[f],v=(o.arrow?.x??0)+i/2,m=(o.arrow?.y??0)+u/2;let y="",h="";return l==="bottom"?(y=a?d:`${v}px`,h=`${-u}px`):l==="top"?(y=a?d:`${v}px`,h=`${r.floating.height+u}px`):l==="right"?(y=`${-u}px`,h=a?d:`${m}px`):l==="left"&&(y=`${r.floating.width+u}px`,h=a?d:`${m}px`),{data:{x:y,y:h}}}});function _r(e){const[t,n="center"]=e.split("-");return[t,n]}var Wa=Nr,Mr=Tr,Ha=Or,Ua=kr,za="Portal",Dr=p.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=p.useState(!1);ue(()=>s(!0),[]);const a=n||o&&globalThis?.document?.body;return a?qn.createPortal(c.jsx(ae.div,{...r,ref:t}),a):null});Dr.displayName=za;function Va(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Zt=e=>{const{present:t,children:n}=e,r=Ya(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),s=me(r.ref,Ga(o));return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:s}):null};Zt.displayName="Presence";function Ya(e){const[t,n]=p.useState(),r=p.useRef(null),o=p.useRef(e),s=p.useRef("none"),a=e?"mounted":"unmounted",[i,u]=Va(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const l=Ue(r.current);s.current=i==="mounted"?l:"none"},[i]),ue(()=>{const l=r.current,f=o.current;if(f!==e){const v=s.current,m=Ue(l);e?u("MOUNT"):m==="none"||l?.display==="none"?u("UNMOUNT"):u(f&&v!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),ue(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,d=m=>{const h=Ue(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&h&&(u("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},v=m=>{m.target===t&&(s.current=Ue(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:p.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Ue(e){return e?.animationName||"none"}function Ga(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Za=p[" useInsertionEffect ".trim().toString()]||ue;function Ka({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=Xa({defaultProp:t,onChange:n}),i=e!==void 0,u=i?e:o;{const f=p.useRef(e!==void 0);p.useEffect(()=>{const d=f.current;d!==i&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,r])}const l=p.useCallback(f=>{if(i){const d=qa(f)?f(e):f;d!==e&&a.current?.(d)}else s(f)},[i,e,s,a]);return[u,l]}function Xa({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),o=p.useRef(n),s=p.useRef(t);return Za(()=>{s.current=t},[t]),p.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function qa(e){return typeof e=="function"}var Ja=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},be=new WeakMap,ze=new WeakMap,Ve={},ht=0,Ir=function(e){return e&&(e.host||Ir(e.parentNode))},Qa=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ir(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ei=function(e,t,n,r){var o=Qa(t,Array.isArray(e)?e:[e]);Ve[n]||(Ve[n]=new WeakMap);var s=Ve[n],a=[],i=new Set,u=new Set(o),l=function(d){!d||i.has(d)||(i.add(d),l(d.parentNode))};o.forEach(l);var f=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(v){if(i.has(v))f(v);else try{var m=v.getAttribute(r),y=m!==null&&m!=="false",h=(be.get(v)||0)+1,x=(s.get(v)||0)+1;be.set(v,h),s.set(v,x),a.push(v),h===1&&y&&ze.set(v,!0),x===1&&v.setAttribute(n,"true"),y||v.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",v,b)}})};return f(t),i.clear(),ht++,function(){a.forEach(function(d){var v=be.get(d)-1,m=s.get(d)-1;be.set(d,v),s.set(d,m),v||(ze.has(d)||d.removeAttribute(r),ze.delete(d)),m||d.removeAttribute(n)}),ht--,ht||(be=new WeakMap,be=new WeakMap,ze=new WeakMap,Ve={})}},ti=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Ja(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),ei(r,o,n,"aria-hidden")):function(){return null}},Q=function(){return Q=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Q.apply(this,arguments)};function Lr(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function ni(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Ke="right-scroll-bar-position",Xe="width-before-scroll-bar",ri="with-scroll-bars-hidden",oi="--removed-body-scroll-bar-size";function vt(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function si(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var ai=typeof window<"u"?p.useLayoutEffect:p.useEffect,Sn=new WeakMap;function ii(e,t){var n=si(null,function(r){return e.forEach(function(o){return vt(o,r)})});return ai(function(){var r=Sn.get(n);if(r){var o=new Set(r),s=new Set(e),a=n.current;o.forEach(function(i){s.has(i)||vt(i,null)}),s.forEach(function(i){o.has(i)||vt(i,a)})}Sn.set(n,e)},[e]),n}function ci(e){return e}function li(e,t){t===void 0&&(t=ci);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(i){return i!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(i){return s(i)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var i=n;n=[],i.forEach(s),a=n}var u=function(){var f=a;a=[],f.forEach(s)},l=function(){return Promise.resolve().then(u)};l(),n={push:function(f){a.push(f),l()},filter:function(f){return a=a.filter(f),n}}}};return o}function ui(e){e===void 0&&(e={});var t=li(null);return t.options=Q({async:!0,ssr:!1},e),t}var Fr=function(e){var t=e.sideCar,n=Lr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,Q({},n))};Fr.isSideCarExport=!0;function fi(e,t){return e.useMedium(t),Fr}var $r=ui(),gt=function(){},ot=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:gt,onWheelCapture:gt,onTouchMoveCapture:gt}),o=r[0],s=r[1],a=e.forwardProps,i=e.children,u=e.className,l=e.removeScrollBar,f=e.enabled,d=e.shards,v=e.sideCar,m=e.noIsolation,y=e.inert,h=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,A=e.gapMode,S=Lr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),j=v,C=ii([n,t]),N=Q(Q({},S),o);return p.createElement(p.Fragment,null,f&&p.createElement(j,{sideCar:$r,removeScrollBar:l,shards:d,noIsolation:m,inert:y,setCallbacks:s,allowPinchZoom:!!h,lockRef:n,gapMode:A}),a?p.cloneElement(p.Children.only(i),Q(Q({},N),{ref:C})):p.createElement(b,Q({},N,{className:u,ref:C}),i))});ot.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ot.classNames={fullWidth:Xe,zeroRight:Ke};var di=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function pi(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=di();return t&&e.setAttribute("nonce",t),e}function mi(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hi(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vi=function(){var e=0,t=null;return{add:function(n){e==0&&(t=pi())&&(mi(t,n),hi(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gi=function(){var e=vi();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Br=function(){var e=gi(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},yi={left:0,top:0,right:0,gap:0},yt=function(e){return parseInt(e||"",10)||0},xi=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[yt(n),yt(r),yt(o)]},bi=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yi;var t=xi(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},wi=Br(),Ee="data-scroll-locked",ji=function(e,t,n,r){var o=e.left,s=e.top,a=e.right,i=e.gap;return n===void 0&&(n="margin"),`
98
+ .`.concat(ri,` {
99
99
  overflow: hidden `).concat(r,`;
100
100
  padding-right: `).concat(i,"px ").concat(r,`;
101
101
  }
102
- body[`).concat(Se,`] {
102
+ body[`).concat(Ee,`] {
103
103
  overflow: hidden `).concat(r,`;
104
104
  overscroll-behavior: contain;
105
105
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -112,31 +112,31 @@ React keys must be passed directly to JSX without using spread:
112
112
  `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
113
113
  }
114
114
 
115
- .`).concat(Qe,` {
115
+ .`).concat(Ke,` {
116
116
  right: `).concat(i,"px ").concat(r,`;
117
117
  }
118
118
 
119
- .`).concat(et,` {
119
+ .`).concat(Xe,` {
120
120
  margin-right: `).concat(i,"px ").concat(r,`;
121
121
  }
122
122
 
123
- .`).concat(Qe," .").concat(Qe,` {
123
+ .`).concat(Ke," .").concat(Ke,` {
124
124
  right: 0 `).concat(r,`;
125
125
  }
126
126
 
127
- .`).concat(et," .").concat(et,` {
127
+ .`).concat(Xe," .").concat(Xe,` {
128
128
  margin-right: 0 `).concat(r,`;
129
129
  }
130
130
 
131
- body[`).concat(Se,`] {
132
- `).concat(hi,": ").concat(i,`px;
131
+ body[`).concat(Ee,`] {
132
+ `).concat(oi,": ").concat(i,`px;
133
133
  }
134
- `)},_n=function(){var e=parseInt(document.body.getAttribute(Se)||"0",10);return isFinite(e)?e:0},_i=function(){m.useEffect(function(){return document.body.setAttribute(Se,(_n()+1).toString()),function(){var e=_n()-1;e<=0?document.body.removeAttribute(Se):document.body.setAttribute(Se,e.toString())}},[])},Di=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;_i();var s=m.useMemo(function(){return Ti(o)},[o]);return m.createElement(ki,{styles:Mi(s,!t,o,n?"":"!important")})},Tt=!1;if(typeof window<"u")try{var Xe=Object.defineProperty({},"passive",{get:function(){return Tt=!0,!0}});window.addEventListener("test",Xe,Xe),window.removeEventListener("test",Xe,Xe)}catch{Tt=!1}var Ce=Tt?{passive:!1}:!1,Fi=function(e){return e.tagName==="TEXTAREA"},Kr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Fi(e)&&n[t]==="visible")},Li=function(e){return Kr(e,"overflowY")},Ii=function(e){return Kr(e,"overflowX")},Dn=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Qr(e,r);if(o){var s=eo(e,r),a=s[1],i=s[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},$i=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Wi=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Qr=function(e,t){return e==="v"?Li(t):Ii(t)},eo=function(e,t){return e==="v"?$i(t):Wi(t)},Bi=function(e,t){return e==="h"&&t==="rtl"?-1:1},Hi=function(e,t,n,r,o){var s=Bi(e,window.getComputedStyle(t).direction),a=s*r,i=n.target,u=t.contains(i),l=!1,f=a>0,d=0,h=0;do{var p=eo(e,i),v=p[0],g=p[1],x=p[2],b=g-x-s*v;(v||b)&&Qr(e,i)&&(d+=b,h+=v),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(f&&Math.abs(d)<1||!f&&Math.abs(h)<1)&&(l=!0),l},qe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fn=function(e){return[e.deltaX,e.deltaY]},Ln=function(e){return e&&"current"in e?e.current:e},zi=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Vi=function(e){return`
134
+ `)},An=function(){var e=parseInt(document.body.getAttribute(Ee)||"0",10);return isFinite(e)?e:0},Ci=function(){p.useEffect(function(){return document.body.setAttribute(Ee,(An()+1).toString()),function(){var e=An()-1;e<=0?document.body.removeAttribute(Ee):document.body.setAttribute(Ee,e.toString())}},[])},Ei=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Ci();var s=p.useMemo(function(){return bi(o)},[o]);return p.createElement(wi,{styles:ji(s,!t,o,n?"":"!important")})},St=!1;if(typeof window<"u")try{var Ye=Object.defineProperty({},"passive",{get:function(){return St=!0,!0}});window.addEventListener("test",Ye,Ye),window.removeEventListener("test",Ye,Ye)}catch{St=!1}var we=St?{passive:!1}:!1,Si=function(e){return e.tagName==="TEXTAREA"},Wr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Si(e)&&n[t]==="visible")},Ai=function(e){return Wr(e,"overflowY")},Ni=function(e){return Wr(e,"overflowX")},Nn=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Hr(e,r);if(o){var s=Ur(e,r),a=s[1],i=s[2];if(a>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ri=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ti=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Hr=function(e,t){return e==="v"?Ai(t):Ni(t)},Ur=function(e,t){return e==="v"?Ri(t):Ti(t)},Oi=function(e,t){return e==="h"&&t==="rtl"?-1:1},Pi=function(e,t,n,r,o){var s=Oi(e,window.getComputedStyle(t).direction),a=s*r,i=n.target,u=t.contains(i),l=!1,f=a>0,d=0,v=0;do{var m=Ur(e,i),y=m[0],h=m[1],x=m[2],b=h-x-s*y;(y||b)&&Hr(e,i)&&(d+=b,v+=y),i instanceof ShadowRoot?i=i.host:i=i.parentNode}while(!u&&i!==document.body||u&&(t.contains(i)||t===i));return(f&&Math.abs(d)<1||!f&&Math.abs(v)<1)&&(l=!0),l},Ge=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rn=function(e){return[e.deltaX,e.deltaY]},Tn=function(e){return e&&"current"in e?e.current:e},ki=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_i=function(e){return`
135
135
  .block-interactivity-`.concat(e,` {pointer-events: none;}
136
136
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
137
- `)},Ui=0,je=[];function Yi(e){var t=m.useRef([]),n=m.useRef([0,0]),r=m.useRef(),o=m.useState(Ui++)[0],s=m.useState(Jr)[0],a=m.useRef(e);m.useEffect(function(){a.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=mi([e.lockRef.current],(e.shards||[]).map(Ln),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=m.useCallback(function(g,x){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!a.current.allowPinchZoom;var b=qe(g),A=n.current,S="deltaX"in g?g.deltaX:A[0]-b[0],C="deltaY"in g?g.deltaY:A[1]-b[1],j,P=g.target,E=Math.abs(S)>Math.abs(C)?"h":"v";if("touches"in g&&E==="h"&&P.type==="range")return!1;var k=Dn(E,P);if(!k)return!0;if(k?j=E:(j=E==="v"?"h":"v",k=Dn(E,P)),!k)return!1;if(!r.current&&"changedTouches"in g&&(S||C)&&(r.current=j),!j)return!0;var M=r.current||j;return Hi(M,x,g,M==="h"?S:C)},[]),u=m.useCallback(function(g){var x=g;if(!(!je.length||je[je.length-1]!==s)){var b="deltaY"in x?Fn(x):qe(x),A=t.current.filter(function(j){return j.name===x.type&&(j.target===x.target||x.target===j.shadowParent)&&zi(j.delta,b)})[0];if(A&&A.should){x.cancelable&&x.preventDefault();return}if(!A){var S=(a.current.shards||[]).map(Ln).filter(Boolean).filter(function(j){return j.contains(x.target)}),C=S.length>0?i(x,S[0]):!a.current.noIsolation;C&&x.cancelable&&x.preventDefault()}}},[]),l=m.useCallback(function(g,x,b,A){var S={name:g,delta:x,target:b,should:A,shadowParent:Gi(b)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(C){return C!==S})},1)},[]),f=m.useCallback(function(g){n.current=qe(g),r.current=void 0},[]),d=m.useCallback(function(g){l(g.type,Fn(g),g.target,i(g,e.lockRef.current))},[]),h=m.useCallback(function(g){l(g.type,qe(g),g.target,i(g,e.lockRef.current))},[]);m.useEffect(function(){return je.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Ce),document.addEventListener("touchmove",u,Ce),document.addEventListener("touchstart",f,Ce),function(){je=je.filter(function(g){return g!==s}),document.removeEventListener("wheel",u,Ce),document.removeEventListener("touchmove",u,Ce),document.removeEventListener("touchstart",f,Ce)}},[]);var p=e.removeScrollBar,v=e.inert;return m.createElement(m.Fragment,null,v?m.createElement(s,{styles:Vi(o)}):null,p?m.createElement(Di,{gapMode:e.gapMode}):null)}function Gi(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Zi=Ci(qr,Yi);var to=m.forwardRef(function(e,t){return m.createElement(lt,Q({},e,{ref:t,sideCar:Zi}))});to.classNames=lt.classNames;var ut="Popover",[no]=vr(ut,[Fr]),He=Fr(),[Xi,ge]=no(ut),ro=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!1}=e,i=He(t),u=m.useRef(null),[l,f]=m.useState(!1),[d,h]=ai({prop:r,defaultProp:o??!1,onChange:s,caller:ut});return c.jsx(Ka,{...i,children:c.jsx(Xi,{scope:t,contentId:Us(),triggerRef:u,open:d,onOpenChange:h,onOpenToggle:m.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:l,onCustomAnchorAdd:m.useCallback(()=>f(!0),[]),onCustomAnchorRemove:m.useCallback(()=>f(!1),[]),modal:a,children:n})})};ro.displayName=ut;var oo="PopoverAnchor",qi=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ge(oo,n),s=He(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=o;return m.useEffect(()=>(a(),()=>i()),[a,i]),c.jsx(Ur,{...s,...r,ref:t})});qi.displayName=oo;var so="PopoverTrigger",ao=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ge(so,n),s=He(n),a=he(t,o.triggerRef),i=c.jsx(ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":fo(o.open),...r,ref:a,onClick:le(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:c.jsx(Ur,{asChild:!0,...s,children:i})});ao.displayName=so;var tn="PopoverPortal",[Ji,Ki]=no(tn,{forceMount:void 0}),io=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=ge(tn,t);return c.jsx(Ji,{scope:t,forceMount:n,children:c.jsx(en,{present:n||s.open,children:c.jsx(Yr,{asChild:!0,container:o,children:r})})})};io.displayName=tn;var Oe="PopoverContent",co=m.forwardRef((e,t)=>{const n=Ki(Oe,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=ge(Oe,e.__scopePopover);return c.jsx(en,{present:r||s.open,children:s.modal?c.jsx(ec,{...o,ref:t}):c.jsx(tc,{...o,ref:t})})});co.displayName=Oe;var Qi=yr("PopoverContent.RemoveScroll"),ec=m.forwardRef((e,t)=>{const n=ge(Oe,e.__scopePopover),r=m.useRef(null),o=he(t,r),s=m.useRef(!1);return m.useEffect(()=>{const a=r.current;if(a)return di(a)},[]),c.jsx(to,{as:Qi,allowPinchZoom:!0,children:c.jsx(lo,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:le(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:le(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,l=i.button===2||u;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:le(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),tc=m.forwardRef((e,t)=>{const n=ge(Oe,e.__scopePopover),r=m.useRef(!1),o=m.useRef(!1);return c.jsx(lo,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),lo=m.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:f,...d}=e,h=ge(Oe,n),p=He(n);return Ds(),c.jsx(Cr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsx(br,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:c.jsx(Qa,{"data-state":fo(h.open),role:"dialog",id:h.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),uo="PopoverClose",nc=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ge(uo,n);return c.jsx(ae.button,{type:"button",...r,ref:t,onClick:le(e.onClick,()=>o.onOpenChange(!1))})});nc.displayName=uo;var rc="PopoverArrow",oc=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=He(n);return c.jsx(ei,{...o,...r,ref:t})});oc.displayName=rc;function fo(e){return e?"open":"closed"}var sc=ro,ac=ao,ic=io,cc=co;const mo=({...e})=>c.jsx(sc,{"data-slot":"popover",...e}),po=({...e})=>c.jsx(ac,{"data-slot":"popover-trigger",...e}),ho=({className:e,align:t="center",sideOffset:n=4,...r})=>c.jsx(ic,{children:c.jsx(cc,{"data-slot":"popover-content",align:t,sideOffset:n,className:Y.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})});function lc(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(d){a(d)}}function u(f){try{l(r.throw(f))}catch(d){a(d)}}function l(f){f.done?s(f.value):o(f.value).then(i,u)}l((r=r.apply(e,[])).next())})}var uc=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(o){e.addRange(o)}),t&&t.focus()}},fc=uc,In={"text/plain":"Text","text/html":"Url",default:"Text"},dc="Copy to clipboard: #{key}, Enter";function mc(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function pc(e,t){var n,r,o,s,a,i,u=!1;t||(t={}),n=t.debug||!1;try{o=fc(),s=document.createRange(),a=document.getSelection(),i=document.createElement("span"),i.textContent=e,i.ariaHidden="true",i.style.all="unset",i.style.position="fixed",i.style.top=0,i.style.clip="rect(0, 0, 0, 0)",i.style.whiteSpace="pre",i.style.webkitUserSelect="text",i.style.MozUserSelect="text",i.style.msUserSelect="text",i.style.userSelect="text",i.addEventListener("copy",function(f){if(f.stopPropagation(),t.format)if(f.preventDefault(),typeof f.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=In[t.format]||In.default;window.clipboardData.setData(d,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(i),s.selectNodeContents(i),a.addRange(s);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");u=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=mc("message"in t?t.message:dc),window.prompt(r,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(s):a.removeAllRanges()),i&&document.body.removeChild(i),o()}return u}var hc=pc;function ve(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ie(e){return Array.isArray(e)?e.length:ve(e)?Object.keys(e).length:0}function gc(e,t){if(typeof e=="string")return e;try{return JSON.stringify(e,(n,r)=>{switch(typeof r){case"bigint":return String(r)+"n";case"number":case"boolean":case"object":case"string":return r;default:return String(r)}},t)}catch(n){return`${n.name}: ${n.message}`||"JSON.stringify failed"}}function vc(e){return lc(this,void 0,void 0,function*(){try{yield navigator.clipboard.writeText(e)}catch{hc(e)}})}function $n(e,t,n,r,o,s){if(s&&s.collapsed!==void 0)return!!s.collapsed;if(typeof r=="boolean")return r;if(typeof r=="number"&&t>r)return!0;const a=Ie(e);if(typeof r=="function"){const i=nn(r,[{node:e,depth:t,indexOrName:n,size:a}]);if(typeof i=="boolean")return i}return!!(Array.isArray(e)&&a>o||ve(e)&&a>o)}function Wn(e,t,n,r,o,s){if(s&&s.collapsed!==void 0)return!!s.collapsed;if(typeof r=="boolean")return r;if(typeof r=="number"&&t>r)return!0;const a=Math.ceil(e.length/100);if(typeof r=="function"){const i=nn(r,[{node:e,depth:t,indexOrName:n,size:a}]);if(typeof i=="boolean")return i}return!!(Array.isArray(e)&&a>o||ve(e)&&a>o)}function Ae(e,t,n){return typeof e=="boolean"?e:!!(typeof e=="number"&&t>e||e==="collapsed"&&n||e==="expanded"&&!n)}function nn(e,t){try{return e(...t)}catch(n){reportError(n)}}function go(e){if(e===!0||ve(e)&&e.add===!0)return!0}function Bn(e){if(e===!0||ve(e)&&e.edit===!0)return!0}function rn(e){if(e===!0||ve(e)&&e.delete===!0)return!0}function yc(e){return typeof e=="function"}function vo(e){return!e||e.add===void 0||!!e.add}function Hn(e){return!e||e.edit===void 0||!!e.edit}function on(e){return!e||e.delete===void 0||!!e.delete}function ft(e){return!e||e.enableClipboard===void 0||!!e.enableClipboard}function xc(e){return!e||e.matchesURL===void 0||!!e.matchesURL}function bc(e,t){return e==="string"?t.trim().replace(/^\"([\s\S]+?)\"$/,"$1"):t}var zn;function kt(){return kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kt.apply(this,arguments)}var sn=function(t){return m.createElement("svg",kt({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},t),zn||(zn=m.createElement("path",{fill:"currentColor",d:"M12.473 5.806a.666.666 0 0 0-.946 0L8.473 8.86a.667.667 0 0 1-.946 0L4.473 5.806a.667.667 0 1 0-.946.94l3.06 3.06a2 2 0 0 0 2.826 0l3.06-3.06a.667.667 0 0 0 0-.94Z"})))},Vn;function Mt(){return Mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mt.apply(this,arguments)}var wc=function(t){return m.createElement("svg",Mt({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Vn||(Vn=m.createElement("path",{fill:"currentColor",d:"M17.542 2.5h-4.75a3.963 3.963 0 0 0-3.959 3.958v4.75a3.963 3.963 0 0 0 3.959 3.959h4.75a3.963 3.963 0 0 0 3.958-3.959v-4.75A3.963 3.963 0 0 0 17.542 2.5Zm2.375 8.708a2.378 2.378 0 0 1-2.375 2.375h-4.75a2.378 2.378 0 0 1-2.375-2.375v-4.75a2.378 2.378 0 0 1 2.375-2.375h4.75a2.378 2.378 0 0 1 2.375 2.375v4.75Zm-4.75 6.334a3.963 3.963 0 0 1-3.959 3.958h-4.75A3.963 3.963 0 0 1 2.5 17.542v-4.75a3.963 3.963 0 0 1 3.958-3.959.791.791 0 1 1 0 1.584 2.378 2.378 0 0 0-2.375 2.375v4.75a2.378 2.378 0 0 0 2.375 2.375h4.75a2.378 2.378 0 0 0 2.375-2.375.792.792 0 1 1 1.584 0Z"})))},Un,Yn;function _t(){return _t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_t.apply(this,arguments)}var Cc=function(t){return m.createElement("svg",_t({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Un||(Un=m.createElement("path",{fill:"currentColor",d:"M17.25 3H6.75A3.755 3.755 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.755 3.755 0 0 0 17.25 3Zm2.25 14.25a2.25 2.25 0 0 1-2.25 2.25H6.75a2.25 2.25 0 0 1-2.25-2.25V6.75A2.25 2.25 0 0 1 6.75 4.5h10.5a2.25 2.25 0 0 1 2.25 2.25v10.5Z"})),Yn||(Yn=m.createElement("path",{fill:"#14C786",d:"M10.312 14.45 7.83 11.906a.625.625 0 0 0-.896 0 .659.659 0 0 0 0 .918l2.481 2.546a1.264 1.264 0 0 0 .896.381 1.237 1.237 0 0 0 .895-.38l5.858-6.011a.658.658 0 0 0 0-.919.625.625 0 0 0-.896 0l-5.857 6.01Z"})))};function dt({node:e,nodeMeta:t}){const{customizeCopy:n,CopyComponent:r,CopiedComponent:o}=w.useContext(ye),[s,a]=w.useState(!1),i=u=>{u.stopPropagation();const l=n(e,t);typeof l=="string"&&l&&vc(l),a(!0),setTimeout(()=>a(!1),3e3)};return s?typeof o=="function"?c.jsx(o,{className:"json-view--copy",style:{display:"inline-block"}}):c.jsx(Cc,{className:"json-view--copy",style:{display:"inline-block"}}):typeof r=="function"?c.jsx(r,{onClick:i,className:"json-view--copy"}):c.jsx(wc,{onClick:i,className:"json-view--copy"})}function Dt({indexOrName:e,value:t,depth:n,deleteHandle:r,editHandle:o,parent:s,parentPath:a}){const{displayArrayIndex:i}=w.useContext(ye),u=Array.isArray(s);return c.jsxs("div",Object.assign({className:"json-view--pair"},{children:[!u||u&&i?c.jsxs(c.Fragment,{children:[c.jsx("span",Object.assign({className:typeof e=="number"?"json-view--index":"json-view--property"},{children:e})),":"," "]}):c.jsx(c.Fragment,{}),c.jsx(xo,{node:t,depth:n+1,deleteHandle:(l,f)=>r(l,f),editHandle:(l,f,d,h)=>o(l,f,d,h),parent:s,indexOrName:e,parentPath:a})]}))}var Gn,Zn;function Ft(){return Ft=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ft.apply(this,arguments)}var an=function(t){return m.createElement("svg",Ft({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Gn||(Gn=m.createElement("path",{fill:"currentColor",d:"M18.75 6h-2.325a3.757 3.757 0 0 0-3.675-3h-1.5a3.757 3.757 0 0 0-3.675 3H5.25a.75.75 0 0 0 0 1.5H6v9.75A3.754 3.754 0 0 0 9.75 21h4.5A3.754 3.754 0 0 0 18 17.25V7.5h.75a.75.75 0 1 0 0-1.5Zm-7.5-1.5h1.5A2.255 2.255 0 0 1 14.872 6H9.128a2.255 2.255 0 0 1 2.122-1.5Zm5.25 12.75a2.25 2.25 0 0 1-2.25 2.25h-4.5a2.25 2.25 0 0 1-2.25-2.25V7.5h9v9.75Z"})),Zn||(Zn=m.createElement("path",{fill:"#DA0000",d:"M10.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM13.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z"})))},Xn,qn;function Lt(){return Lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lt.apply(this,arguments)}var yo=function(t){return m.createElement("svg",Lt({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Xn||(Xn=m.createElement("path",{fill:"currentColor",d:"M21 6.75v10.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3h10.5A3.754 3.754 0 0 1 21 6.75Zm-1.5 0c0-1.24-1.01-2.25-2.25-2.25H6.75C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25V6.75Z"})),qn||(qn=m.createElement("path",{fill:"#14C786",d:"M15 12.75a.75.75 0 1 0 0-1.5h-2.25V9a.75.75 0 1 0-1.5 0v2.25H9a.75.75 0 1 0 0 1.5h2.25V15a.75.75 0 1 0 1.5 0v-2.25H15Z"})))},Jn,Kn;function It(){return It=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},It.apply(this,arguments)}var cn=function(t){return m.createElement("svg",It({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Jn||(Jn=m.createElement("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"})),Kn||(Kn=m.createElement("path",{fill:"#14C786",d:"m10.85 13.96-1.986-2.036a.5.5 0 0 0-.716 0 .527.527 0 0 0 0 .735l1.985 2.036a1.01 1.01 0 0 0 .717.305.99.99 0 0 0 .716-.305l4.686-4.808a.526.526 0 0 0 0-.735.5.5 0 0 0-.716 0l-4.687 4.809Z"})))},Qn,er;function $t(){return $t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$t.apply(this,arguments)}var ln=function(t){return m.createElement("svg",$t({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Qn||(Qn=m.createElement("path",{fill:"#DA0000",d:"M15 9a.75.75 0 0 0-1.06 0L12 10.94 10.06 9A.75.75 0 0 0 9 10.06L10.94 12 9 13.94A.75.75 0 0 0 10.06 15L12 13.06 13.94 15A.75.75 0 0 0 15 13.94L13.06 12 15 10.06A.75.75 0 0 0 15 9Z"})),er||(er=m.createElement("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"})))};function jc({originNode:e,node:t,depth:n,index:r,deleteHandle:o,customOptions:s,startIndex:a,parent:i,parentPath:u}){const{enableClipboard:l,src:f,onEdit:d,onChange:h,forceUpdate:p,displaySize:v,CustomOperation:g}=w.useContext(ye),x=[...u,String(r)],[b,A]=w.useState(!0),S=w.useCallback((P,E,k)=>{e[P]=E,d&&d({newValue:E,oldValue:k,depth:n,src:f,indexOrName:P,parentType:"array",parentPath:u}),h&&h({type:"edit",depth:n,src:f,indexOrName:P,parentType:"array",parentPath:u}),p()},[t,d,h,p]),C=P=>{e.splice(P,1),o&&o(P,u),p()},j=c.jsxs(c.Fragment,{children:[!b&&c.jsxs("span",Object.assign({onClick:()=>A(!0),className:"jv-size-chevron"},{children:[Ae(v,n,b)&&c.jsxs("span",Object.assign({className:"jv-size"},{children:[Ie(t)," Items"]})),c.jsx(sn,{className:"jv-chevron"})]})),!b&&l&&ft(s)&&c.jsx(dt,{node:t,nodeMeta:{depth:n,indexOrName:r,parent:i,parentPath:u,currentPath:x}}),typeof g=="function"?c.jsx(g,{node:t}):null]});return c.jsxs("div",{children:[c.jsx("span",{children:"["}),j,b?c.jsxs("button",Object.assign({onClick:()=>A(!1),className:"jv-button"},{children:[a," ... ",a+t.length-1]})):c.jsx("div",Object.assign({className:"jv-indent"},{children:t.map((P,E)=>c.jsx(Dt,{indexOrName:E+a,value:P,depth:n,parent:t,deleteHandle:C,editHandle:S,parentPath:u},String(r)+String(E)))})),c.jsx("span",{children:"]"})]})}function Ec({node:e,depth:t,deleteHandle:n,indexOrName:r,customOptions:o,parent:s,parentPath:a}){const i=typeof r<"u"?[...a,String(r)]:a,u=[];for(let D=0;D<e.length;D+=100)u.push(e.slice(D,D+100));const{collapsed:l,enableClipboard:f,collapseObjectsAfterLength:d,editable:h,onDelete:p,src:v,onAdd:g,CustomOperation:x,onChange:b,forceUpdate:A,displaySize:S}=w.useContext(ye),[C,j]=w.useState(Wn(e,t,r,l,d,o));w.useEffect(()=>{j(Wn(e,t,r,l,d,o))},[l,d]);const[P,E]=w.useState(!1),k=()=>{E(!1),n&&n(r,a),p&&p({value:e,depth:t,src:v,indexOrName:r,parentType:"array",parentPath:a}),b&&b({type:"delete",depth:t,src:v,indexOrName:r,parentType:"array",parentPath:a})},[M,I]=w.useState(!1),B=()=>{const D=e;D.push(null),g&&g({indexOrName:D.length-1,depth:t,src:v,parentType:"array",parentPath:a}),b&&b({type:"add",indexOrName:D.length-1,depth:t,src:v,parentType:"array",parentPath:a}),A()},H=P||M,$=()=>{E(!1),I(!1)},_=c.jsxs(c.Fragment,{children:[!C&&!H&&c.jsxs("span",Object.assign({onClick:()=>j(!0),className:"jv-size-chevron"},{children:[Ae(S,t,C)&&c.jsxs("span",Object.assign({className:"jv-size"},{children:[e.length," Items"]})),c.jsx(sn,{className:"jv-chevron"})]})),H&&c.jsx(cn,{className:"json-view--edit",style:{display:"inline-block"},onClick:M?B:k}),H&&c.jsx(ln,{className:"json-view--edit",style:{display:"inline-block"},onClick:$}),!C&&!H&&f&&ft(o)&&c.jsx(dt,{node:e,nodeMeta:{depth:t,indexOrName:r,parent:s,parentPath:a,currentPath:i}}),!C&&!H&&go(h)&&vo(o)&&c.jsx(yo,{className:"json-view--edit",onClick:()=>{B()}}),!C&&!H&&rn(h)&&on(o)&&n&&c.jsx(an,{className:"json-view--edit",onClick:()=>E(!0)}),typeof x=="function"?c.jsx(x,{node:e}):null]});return c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"["}),_,C?c.jsx("button",Object.assign({onClick:()=>j(!1),className:"jv-button"},{children:"..."})):c.jsx("div",Object.assign({className:"jv-indent"},{children:u.map((D,F)=>c.jsx(jc,{originNode:e,node:D,depth:t,index:F,startIndex:F*100,deleteHandle:n,customOptions:o,parentPath:a},String(r)+String(F)))})),c.jsx("span",{children:"]"}),C&&Ae(S,t,C)&&c.jsxs("span",Object.assign({onClick:()=>j(!1),className:"jv-size"},{children:[e.length," Items"]}))]})}function Sc({node:e,depth:t,indexOrName:n,deleteHandle:r,customOptions:o,parent:s,parentPath:a}){const{collapsed:i,onCollapse:u,enableClipboard:l,ignoreLargeArray:f,collapseObjectsAfterLength:d,editable:h,onDelete:p,src:v,onAdd:g,onEdit:x,onChange:b,forceUpdate:A,displaySize:S,CustomOperation:C}=w.useContext(ye),j=typeof n<"u"?[...a,String(n)]:a;if(!f&&Array.isArray(e)&&e.length>100)return c.jsx(Ec,{node:e,depth:t,indexOrName:n,deleteHandle:r,customOptions:o,parentPath:j});const P=ve(e),[E,k]=w.useState($n(e,t,n,i,d,o)),M=N=>{u?.({isCollapsing:!N,node:e,depth:t,indexOrName:n}),k(N)};w.useEffect(()=>{M($n(e,t,n,i,d,o))},[i,d]);const I=w.useCallback((N,L,U)=>{Array.isArray(e)?e[+N]=L:e&&(e[N]=L),x&&x({newValue:L,oldValue:U,depth:t,src:v,indexOrName:N,parentType:P?"object":"array",parentPath:j}),b&&b({type:"edit",depth:t,src:v,indexOrName:N,parentType:P?"object":"array",parentPath:j}),A()},[e,x,b,A]),B=N=>{Array.isArray(e)?e.splice(+N,1):e&&delete e[N],A()},[H,$]=w.useState(!1),_=()=>{$(!1),r&&r(n,j),p&&p({value:e,depth:t,src:v,indexOrName:n,parentType:P?"object":"array",parentPath:j}),b&&b({type:"delete",depth:t,src:v,indexOrName:n,parentType:P?"object":"array",parentPath:j})},[D,F]=w.useState(!1),T=w.useRef(null),R=()=>{var N;if(P){const L=(N=T.current)===null||N===void 0?void 0:N.value;L&&(e[L]=null,T.current&&(T.current.value=""),F(!1),g&&g({indexOrName:L,depth:t,src:v,parentType:"object",parentPath:j}),b&&b({type:"add",indexOrName:L,depth:t,src:v,parentType:"object",parentPath:j}))}else if(Array.isArray(e)){const L=e;L.push(null),g&&g({indexOrName:L.length-1,depth:t,src:v,parentType:"array",parentPath:j}),b&&b({type:"add",indexOrName:L.length-1,depth:t,src:v,parentType:"array",parentPath:j})}A()},z=N=>{N.key==="Enter"?(N.preventDefault(),R()):N.key==="Escape"&&O()},y=H||D,O=()=>{$(!1),F(!1)},W=c.jsxs(c.Fragment,{children:[!E&&!y&&c.jsxs("span",Object.assign({onClick:()=>M(!0),className:"jv-size-chevron"},{children:[Ae(S,t,E)&&c.jsxs("span",Object.assign({className:"jv-size"},{children:[Ie(e)," Items"]})),c.jsx(sn,{className:"jv-chevron"})]})),D&&P&&c.jsx("input",{className:"json-view--input",placeholder:"property",ref:T,onKeyDown:z}),y&&c.jsx(cn,{className:"json-view--edit",style:{display:"inline-block"},onClick:D?R:_}),y&&c.jsx(ln,{className:"json-view--edit",style:{display:"inline-block"},onClick:O}),!E&&!y&&l&&ft(o)&&c.jsx(dt,{node:e,nodeMeta:{depth:t,indexOrName:n,parent:s,parentPath:a,currentPath:j}}),!E&&!y&&go(h)&&vo(o)&&c.jsx(yo,{className:"json-view--edit",onClick:()=>{P?(F(!0),setTimeout(()=>{var N;return(N=T.current)===null||N===void 0?void 0:N.focus()})):R()}}),!E&&!y&&rn(h)&&on(o)&&r&&c.jsx(an,{className:"json-view--edit",onClick:()=>$(!0)}),typeof C=="function"?c.jsx(C,{node:e}):null]});return Array.isArray(e)?c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"["}),W,E?c.jsx("button",Object.assign({onClick:()=>M(!1),className:"jv-button"},{children:"..."})):c.jsx("div",Object.assign({className:"jv-indent"},{children:e.map((N,L)=>c.jsx(Dt,{indexOrName:L,value:N,depth:t,parent:e,deleteHandle:B,editHandle:I,parentPath:j},String(n)+String(L)))})),c.jsx("span",{children:"]"}),E&&Ae(S,t,E)&&c.jsxs("span",Object.assign({onClick:()=>M(!1),className:"jv-size"},{children:[Ie(e)," Items"]}))]}):P?c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"{"}),W,E?c.jsx("button",Object.assign({onClick:()=>M(!1),className:"jv-button"},{children:"..."})):c.jsx("div",Object.assign({className:"jv-indent"},{children:Object.entries(e).map(([N,L])=>c.jsx(Dt,{indexOrName:N,value:L,depth:t,parent:e,deleteHandle:B,editHandle:I,parentPath:j},String(n)+String(N)))})),c.jsx("span",{children:"}"}),E&&Ae(S,t,E)&&c.jsxs("span",Object.assign({onClick:()=>M(!1),className:"jv-size"},{children:[Ie(e)," Items"]}))]}):c.jsx("span",{children:String(e)})}const Ac=w.forwardRef(({str:e,className:t,ctrlClick:n},r)=>{let{collapseStringMode:o,collapseStringsAfterLength:s,customizeCollapseStringUI:a}=w.useContext(ye);const[i,u]=w.useState(!0),l=w.useRef(null);s=s>0?s:0;const f=e.replace(/\s+/g," "),d=typeof a=="function"?a(f,i):typeof a=="string"?a:"...",h=p=>{var v;if((p.ctrlKey||p.metaKey)&&n)n(p);else{const g=window.getSelection();if(g&&g.anchorOffset!==g.focusOffset&&((v=g.anchorNode)===null||v===void 0?void 0:v.parentElement)===l.current)return;u(!i)}};if(e.length<=s)return c.jsxs("span",Object.assign({ref:l,className:t,onClick:n},{children:['"',e,'"']}));if(o==="address")return e.length<=10?c.jsxs("span",Object.assign({ref:l,className:t,onClick:n},{children:['"',e,'"']})):c.jsxs("span",Object.assign({ref:l,onClick:h,className:t+" cursor-pointer"},{children:['"',i?[f.slice(0,6),d,f.slice(-4)]:e,'"']}));if(o==="directly")return c.jsxs("span",Object.assign({ref:l,onClick:h,className:t+" cursor-pointer"},{children:['"',i?[f.slice(0,s),d]:e,'"']}));if(o==="word"){let p=s,v=s+1,g=f,x=1;for(;;){if(/\W/.test(e[p])){g=e.slice(0,p);break}if(/\W/.test(e[v])){g=e.slice(0,v);break}if(x===6){g=e.slice(0,s);break}x++,p--,v++}return c.jsxs("span",Object.assign({ref:l,onClick:h,className:t+" cursor-pointer"},{children:['"',i?[g,d]:e,'"']}))}return c.jsxs("span",Object.assign({ref:l,className:t},{children:['"',e,'"']}))});var tr;function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wt.apply(this,arguments)}var Pc=function(t){return m.createElement("svg",Wt({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),tr||(tr=m.createElement("path",{fill:"currentColor",d:"M17.25 3H6.75A3.754 3.754 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.754 3.754 0 0 0 17.25 3Zm2.25 14.25c0 1.24-1.01 2.25-2.25 2.25H6.75c-1.24 0-2.25-1.01-2.25-2.25V6.75c0-1.24 1.01-2.25 2.25-2.25h10.5c1.24 0 2.25 1.01 2.25 2.25v10.5Zm-6.09-9.466-5.031 5.03a2.981 2.981 0 0 0-.879 2.121v1.19c0 .415.336.75.75.75h1.19c.8 0 1.554-.312 2.12-.879l5.03-5.03a2.252 2.252 0 0 0 0-3.182c-.85-.85-2.331-.85-3.18 0Zm-2.91 7.151c-.28.28-.666.44-1.06.44H9v-.44c0-.4.156-.777.44-1.06l3.187-3.188 1.06 1.061-3.187 3.188Zm5.03-5.03-.782.783-1.06-1.061.782-.782a.766.766 0 0 1 1.06 0 .75.75 0 0 1 0 1.06Z"})))},nr,rr;function Bt(){return Bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bt.apply(this,arguments)}var Nc=function(t){return m.createElement("svg",Bt({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),nr||(nr=m.createElement("path",{fill:"currentColor",d:"M6.75 3h5.5v1.5h-5.5C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25v-5.5H21v5.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3Z"})),rr||(rr=m.createElement("path",{fill:"currentColor",d:"M20.013 3h-3.946a.987.987 0 0 0 0 1.973h1.564l-6.342 6.342a1.004 1.004 0 0 0 0 1.396 1.004 1.004 0 0 0 1.396 0l6.342-6.342v1.564a.987.987 0 0 0 1.973 0V3.987A.987.987 0 0 0 20.013 3Z"})))};function xo({node:e,depth:t,deleteHandle:n,indexOrName:r,parent:o,editHandle:s,parentPath:a}){const{collapseStringsAfterLength:i,enableClipboard:u,editable:l,src:f,onDelete:d,onChange:h,customizeNode:p,matchesURL:v,urlRegExp:g,EditComponent:x,DoneComponent:b,CancelComponent:A,CustomOperation:S}=w.useContext(ye);let C;if(typeof p=="function"&&(C=nn(p,[{node:e,depth:t,indexOrName:r}])),C){if(w.isValidElement(C))return C;if(yc(C)){const j=C;return c.jsx(j,{node:e,depth:t,indexOrName:r})}}if(Array.isArray(e)||ve(e))return c.jsx(Sc,{parent:o,node:e,depth:t,indexOrName:r,deleteHandle:n,parentPath:a,customOptions:typeof C=="object"?C:void 0});{const j=typeof e,P=typeof r<"u"?[...a,String(r)]:a,[E,k]=w.useState(!1),[M,I]=w.useState(!1),B=w.useRef(null),H=()=>{k(!0),setTimeout(()=>{var N,L;(N=window.getSelection())===null||N===void 0||N.selectAllChildren(B.current),(L=B.current)===null||L===void 0||L.focus()})},$=w.useCallback(()=>{let N=B.current.innerText;try{const L=JSON.parse(N);s&&s(r,L,e,a)}catch{const U=bc(j,N);s&&s(r,U,e,a)}k(!1)},[s,r,e,a,j]),_=()=>{k(!1),I(!1)},D=()=>{I(!1),n&&n(r,a),d&&d({value:e,depth:t,src:f,indexOrName:r,parentType:Array.isArray(o)?"array":"object",parentPath:a}),h&&h({depth:t,src:f,indexOrName:r,parentType:Array.isArray(o)?"array":"object",type:"delete",parentPath:a})},F=w.useCallback(N=>{N.key==="Enter"?(N.preventDefault(),$()):N.key==="Escape"&&_()},[$]),T=E||M,R=!T&&Bn(l)&&Hn(C)&&s?N=>{(N.ctrlKey||N.metaKey)&&H()}:void 0,z=c.jsxs(c.Fragment,{children:[T&&(typeof b=="function"?c.jsx(b,{className:"json-view--edit",style:{display:"inline-block"},onClick:M?D:$}):c.jsx(cn,{className:"json-view--edit",style:{display:"inline-block"},onClick:M?D:$})),T&&(typeof A=="function"?c.jsx(A,{className:"json-view--edit",style:{display:"inline-block"},onClick:_}):c.jsx(ln,{className:"json-view--edit",style:{display:"inline-block"},onClick:_})),!T&&u&&ft(C)&&c.jsx(dt,{node:e,nodeMeta:{depth:t,indexOrName:r,parent:o,parentPath:a,currentPath:P}}),!T&&v&&j==="string"&&g.test(e)&&xc(C)&&c.jsx("a",Object.assign({href:e,target:"_blank",className:"json-view--link"},{children:c.jsx(Nc,{})})),!T&&Bn(l)&&Hn(C)&&s&&(typeof x=="function"?c.jsx(x,{className:"json-view--edit",onClick:H}):c.jsx(Pc,{className:"json-view--edit",onClick:H})),!T&&rn(l)&&on(C)&&n&&c.jsx(an,{className:"json-view--edit",onClick:()=>I(!0)}),typeof S=="function"?c.jsx(S,{node:e}):null]});let y="json-view--string";switch(j){case"number":case"bigint":y="json-view--number";break;case"boolean":y="json-view--boolean";break;case"object":y="json-view--null";break}typeof C?.className=="string"&&(y+=" "+C.className),M&&(y+=" json-view--deleting");let O=String(e);j==="bigint"&&(O+="n");const W=w.useMemo(()=>c.jsx("span",{contentEditable:!0,className:y,dangerouslySetInnerHTML:{__html:j==="string"?`"${O}"`:O},ref:B,onKeyDown:F}),[O,j,F]);return j==="string"?c.jsxs(c.Fragment,{children:[E?W:e.length>i?c.jsx(Ac,{str:e,ref:B,className:y,ctrlClick:R}):c.jsxs("span",Object.assign({className:y,onClick:R},{children:['"',O,'"']})),z]}):c.jsxs(c.Fragment,{children:[E?W:c.jsx("span",Object.assign({className:y,onClick:R},{children:O})),z]})}}const bo=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,ye=w.createContext({src:void 0,collapseStringsAfterLength:99,collapseStringMode:"directly",customizeCollapseStringUI:void 0,collapseObjectsAfterLength:20,collapsed:!1,onCollapse:void 0,enableClipboard:!0,editable:!1,onEdit:void 0,onDelete:void 0,onAdd:void 0,onChange:void 0,forceUpdate:()=>{},customizeNode:void 0,customizeCopy:()=>{},displaySize:void 0,displayArrayIndex:!0,matchesURL:!1,urlRegExp:bo,ignoreLargeArray:!1,CopyComponent:void 0,CopiedComponent:void 0,EditComponent:void 0,CancelComponent:void 0,DoneComponent:void 0,CustomOperation:void 0});function or({src:e,collapseStringsAfterLength:t=99,collapseStringMode:n="directly",customizeCollapseStringUI:r,collapseObjectsAfterLength:o=99,collapsed:s,onCollapse:a,enableClipboard:i=!0,editable:u=!1,onEdit:l,onDelete:f,onAdd:d,onChange:h,dark:p=!1,theme:v="default",customizeNode:g,customizeCopy:x=_=>gc(_),displaySize:b,displayArrayIndex:A=!0,style:S,className:C,matchesURL:j=!1,urlRegExp:P=bo,ignoreLargeArray:E=!1,CopyComponent:k,CopiedComponent:M,EditComponent:I,CancelComponent:B,DoneComponent:H,CustomOperation:$}){const[_,D]=w.useState(0),F=w.useCallback(()=>D(z=>++z),[]),[T,R]=w.useState(e);return w.useEffect(()=>R(e),[e]),c.jsx(ye.Provider,Object.assign({value:{src:T,collapseStringsAfterLength:t,collapseStringMode:n,customizeCollapseStringUI:r,collapseObjectsAfterLength:o,collapsed:s,onCollapse:a,enableClipboard:i,editable:u,onEdit:l,onDelete:f,onAdd:d,onChange:h,forceUpdate:F,customizeNode:g,customizeCopy:x,displaySize:b,displayArrayIndex:A,matchesURL:j,urlRegExp:P,ignoreLargeArray:E,CopyComponent:k,CopiedComponent:M,EditComponent:I,CancelComponent:B,DoneComponent:H,CustomOperation:$}},{children:c.jsx("code",Object.assign({className:"json-view"+(p?" dark":"")+(v&&v!=="default"?" json-view_"+v:"")+(C?" "+C:""),style:S},{children:c.jsx(xo,{node:T,depth:1,editHandle:(z,y,O,W)=>{R(y),l&&l({newValue:y,oldValue:O,depth:1,src:T,indexOrName:z,parentType:null,parentPath:W}),h&&h({type:"edit",depth:1,src:T,indexOrName:z,parentType:null,parentPath:W})},deleteHandle:(z,y)=>{R(void 0),f&&f({value:T,depth:1,src:T,indexOrName:z,parentType:null,parentPath:y}),h&&h({depth:1,src:T,indexOrName:z,parentType:null,type:"delete",parentPath:y})},parentPath:[]})}))}))}const Oc=e=>typeof e=="object"&&e!==null?JSON.stringify(e,null,1):e===null?"null":e.toString(),Ht=w.memo(({arg:e,popover:t=!0})=>{const n=w.useMemo(()=>typeof e=="object"&&e!==null,[e]),r=w.useMemo(()=>Oc(e),[e]),o=w.useMemo(()=>JSON.stringify(e,null,2),[e]);return t?c.jsxs(mo,{children:[c.jsx(po,{asChild:!0,children:c.jsx("span",{className:"truncate font-mono text-blue-500 cursor-pointer inline-block",children:r})}),c.jsx(ho,{className:"backdrop-blur-md w-auto max-w-2xl relative max-h-[50vh] overflow-y-auto",hideWhenDetached:!0,children:n?c.jsxs("div",{children:[c.jsx(At,{textToCopy:o,className:"absolute top-4 right-4",title:"Copy JSON"}),c.jsx(or,{src:e,theme:"default",enableClipboard:!1,style:{padding:0}})]}):c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{children:r}),c.jsx(At,{textToCopy:o,className:"ml-2",title:"Copy JSON"})]})})]}):c.jsx(c.Fragment,{children:n?c.jsx(or,{src:e,theme:"default",enableClipboard:!1,style:{padding:0}}):c.jsx("span",{className:"font-mono text-blue-500",children:r})})});Ht.displayName="Argument";const zt=w.memo(({callsQuantity:e,noQuantity:t=!1})=>{const n=e&&e>1;return c.jsxs("div",{className:"flex items-center",children:[c.jsx("span",{className:"font-mono text-emerald-500",children:")"}),!t&&n&&c.jsxs("span",{className:"font-mono text-muted-foreground",children:[" x",e]})]})});zt.displayName="ClosingParenthesis";const Vt=w.forwardRef(({topLevelClassName:e,objectName:t,functionName:n,className:r,...o},s)=>c.jsxs("div",{ref:s,className:Y.cn("flex items-center",r),...o,children:[e&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"font-mono text-pink-500",children:e}),c.jsx("span",{children:"."})]}),t&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"font-mono text-pink-500",children:t}),c.jsx("span",{children:"."})]}),c.jsx("span",{className:"font-mono text-pink-500",children:n}),c.jsx("span",{className:"font-mono text-emerald-500",children:"("})]}));Vt.displayName="FunctionCallContent";const Rc={gridTemplateColumns:"max-content 1fr max-content"},mt=w.memo(({topLevelClassName:e,objectName:t,functionName:n,args:r,callsQuantity:o})=>{const s=w.useMemo(()=>r.filter(u=>u!==void 0),[r]),a=w.useMemo(()=>({gridTemplateColumns:`repeat(${s.length*2}, minmax(0, auto))`}),[s.length]),i=w.useMemo(()=>{const u=[e,t].filter(Boolean).join("."),l=u?`${u}.`:"",f=s.map(d=>typeof d=="object"&&d!==null?JSON.stringify(d,null,2):d===null?"null":typeof d=="string"?`'${d}'`:String(d)).join(", ");return`${l}${n}(${f})`},[e,t,n,s]);return c.jsxs("div",{className:"grid overflow-hidden items-center",style:Rc,children:[c.jsxs(mo,{children:[c.jsx(po,{asChild:!0,children:c.jsx(Vt,{className:"cursor-pointer",functionName:n,topLevelClassName:e,objectName:t})}),c.jsxs(ho,{className:"grid grid-rows-auto backdrop-blur-md w-auto max-w-2xl max-h-[50vh] overflow-y-auto",hideWhenDetached:!0,children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsx(Vt,{functionName:n,topLevelClassName:e,objectName:t}),c.jsx(At,{textToCopy:i})]}),s.map((u,l)=>c.jsxs("div",{className:"grid grid-cols-[auto_1fr] items-center pl-4",children:[c.jsx(Ht,{arg:u,popover:!1}),l<s.length-1&&c.jsx("span",{children:", "})]},l)),c.jsx(zt,{callsQuantity:o,noQuantity:!0})]})]}),c.jsx("div",{className:"grid items-center min-w-0",style:a,children:s.map((u,l)=>c.jsxs(w.Fragment,{children:[c.jsx(Ht,{arg:u}),l<s.length-1&&c.jsx("span",{children:", "})]},l))}),c.jsx(zt,{callsQuantity:o})]})});mt.displayName="FunctionCall";const wo=w.memo(({event:e})=>{const t=w.useMemo(()=>[{topic:e.topic,data:e.data}],[e]);return c.jsx(mt,{functionName:"emit",args:t})});wo.displayName="TraceEmitEvent";const Co=w.memo(({event:e})=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Y.LevelDot,{level:e.level})," ",e.message]}));Co.displayName="TraceLogEvent";const jo=w.memo(({event:e})=>{const t=w.useMemo(()=>[e.data.traceId,e.data.key,e.data.value],[e]);return c.jsx(mt,{objectName:"state",functionName:e.operation,args:t})});jo.displayName="TraceStateEvent";const Eo=w.memo(({event:e})=>{const t=w.useMemo(()=>[e.data.groupId,e.data.id,e.data.data],[e]);return c.jsx(mt,{topLevelClassName:"streams",objectName:e.streamName,functionName:e.operation,args:t,callsQuantity:e.calls})});Eo.displayName="TraceStreamEvent";const So=w.memo(({event:e})=>{if(e.type==="log")return c.jsx(Co,{event:e});if(e.type==="emit")return c.jsx(wo,{event:e});if(e.type==="state")return c.jsx(jo,{event:e});if(e.type==="stream")return c.jsx(Eo,{event:e})});So.displayName="TraceEvent";const Ao=w.memo(({event:e,traceStartTime:t})=>c.jsxs(w.Fragment,{children:[c.jsx("div",{className:"grid place-items-center",children:c.jsx("div",{className:"w-1 h-1 rounded-full bg-emerald-500 outline outline-2 outline-emerald-500/50 -ml-[26px]"})}),c.jsx("div",{className:"grid place-items-center",children:c.jsx(ps,{event:e})}),c.jsx("div",{className:"grid place-items-center",children:c.jsxs("span",{className:"text-sm font-mono text-muted-foreground",children:["+",xe(Math.floor(e.timestamp-t))]})}),c.jsx("div",{className:"grid place-items-start",children:c.jsx(So,{event:e})})]}));Ao.displayName="TraceEventItem";const Po=w.memo(({trace:e,onClose:t})=>{const n=w.useMemo(()=>[{icon:c.jsx(dr,{}),onClick:t,label:"Close"}],[t]);return c.jsxs(Y.Sidebar,{onClose:t,initialWidth:600,title:"Trace Details",subtitle:`Viewing details from step ${e.name}`,actions:n,children:[c.jsxs("div",{className:"px-2 overflow-auto",children:[c.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground mb-4",children:[e.endTime&&c.jsxs("span",{children:["Duration: ",xe(e.endTime-e.startTime)]}),c.jsx("div",{className:"bg-blue-500 font-bold text-xs px-[4px] py-[2px] rounded-sm text-blue-100",children:e.entryPoint.type}),e.correlationId&&c.jsxs(Y.Badge,{variant:"outline",children:["Correlated: ",e.correlationId]})]}),c.jsx("div",{className:"grid grid-cols-[auto_auto_auto_1fr] gap-x-2 gap-y-3 font-mono text-xs border-l-1 border-gray-500/40 pl-6",children:e.events.map((r,o)=>c.jsx(Ao,{event:r,traceStartTime:e.startTime},o))})]}),e.error&&c.jsxs("div",{className:"p-4 bg-red-800/10",children:[c.jsx("div",{className:"text-sm text-red-800 dark:text-red-400 font-semibold",children:e.error.message}),c.jsx("div",{className:"text-sm text-red-800 dark:text-red-400 pl-4",children:e.error.stack})]})]})});Po.displayName="TraceItemDetail";const No=w.memo(()=>{const e=q(t=>t.selectedTraceGroupId);return e?c.jsx(Oo,{groupId:e}):null});No.displayName="TraceTimeline";const Oo=w.memo(({groupId:e})=>{const t=w.useMemo(()=>({streamName:"motia-trace-group",groupId:"default",id:e}),[e]),{data:n}=St.useStreamItem(t),r=w.useMemo(()=>({streamName:"motia-trace",groupId:e}),[e]),{data:o}=St.useStreamGroup(r),s=os(n),[a,i]=w.useState(100),u=q(p=>p.selectedTraceId),l=q(p=>p.selectTraceId),f=w.useMemo(()=>o?.find(p=>p.id===u),[o,u]),d=()=>a>100&&i(p=>p-10),h=()=>a<200&&i(p=>p+10);return n?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"flex flex-col flex-1 relative min-h-full min-w-[1000px]",children:c.jsxs("div",{className:"flex flex-col",style:{width:`${a}%`},children:[c.jsxs("div",{className:"flex flex-1 bg-background",style:{width:`${a}%`},children:[c.jsxs("div",{className:"shrink-0 w-[200px] h-[37px] flex items-center justify-center gap-2 sticky left-0 top-0 z-10 bg-card backdrop-blur-xs backdrop-filter",children:[c.jsx(Y.Button,{variant:"icon",size:"sm",className:"px-2",onClick:d,disabled:a<=100,children:c.jsx(ts,{className:"w-4 h-4 cursor-pointer"})}),c.jsxs("span",{className:"min-w-12 text-center select-none text-sm font-bold text-muted-foreground",children:[a,"%"]}),c.jsx(Y.Button,{variant:"icon",size:"sm",className:"px-2",onClick:h,disabled:a>=200,children:c.jsx(rs,{className:"w-4 h-4 cursor-pointer"})})]}),c.jsxs("div",{className:"flex justify-between font-mono p-2 w-full text-xs text-muted-foreground bg-card",children:[c.jsx("span",{children:"0ms"}),c.jsx("span",{children:xe(Math.floor((s-n.startTime)*.25))}),c.jsx("span",{children:xe(Math.floor((s-n.startTime)*.5))}),c.jsx("span",{children:xe(Math.floor((s-n.startTime)*.75))}),c.jsx("span",{children:xe(Math.floor(s-n.startTime))})]})]}),c.jsx("div",{className:"flex flex-col h-full",style:{width:`${a}%`},children:o?.map(p=>c.jsx(hr,{traceId:p.id,traceName:p.name,traceStatus:p.status,traceStartTime:p.startTime,traceEndTime:p.endTime,groupStartTime:n.startTime,groupEndTime:s,onExpand:l},p.id))})]})}),f&&c.jsx(Po,{trace:f,onClose:()=>l(void 0)})]}):null});Oo.displayName="TraceTimelineComponent";const Tc=()=>{const e=w.useMemo(()=>({streamName:"motia-trace-group",groupId:"default"}),[]),{data:t}=St.useStreamGroup(e),n=q(r=>r.search);return w.useMemo(()=>t?.filter(r=>r.name.toLowerCase().includes(n.toLowerCase())||r.id.toLowerCase().includes(n.toLowerCase())),[t,n])},Je=43200,sr=1440,ar=Symbol.for("constructDateFrom");function un(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ar in e?e[ar](t):e instanceof Date?new e.constructor(t):new Date(t)}function pe(e,t){return un(e,e)}let kc={};function Mc(){return kc}function ir(e){const t=pe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function fn(e,...t){const n=un.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function tt(e,t){const n=+pe(e)-+pe(t);return n<0?-1:n>0?1:n}function _c(e){return un(e,Date.now())}function Dc(e,t,n){const[r,o]=fn(n?.in,e,t),s=r.getFullYear()-o.getFullYear(),a=r.getMonth()-o.getMonth();return s*12+a}function Fc(e){return t=>{const n=Math.trunc,r=n(t);return r===0?0:r}}function Lc(e,t){return+pe(e)-+pe(t)}function Ic(e,t){const n=pe(e);return n.setHours(23,59,59,999),n}function $c(e,t){const n=pe(e),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Wc(e,t){const n=pe(e);return+Ic(n)==+$c(n)}function Bc(e,t,n){const[r,o,s]=fn(n?.in,e,e,t),a=tt(o,s),i=Math.abs(Dc(o,s));if(i<1)return 0;o.getMonth()===1&&o.getDate()>27&&o.setDate(30),o.setMonth(o.getMonth()-a*i);let u=tt(o,s)===-a;Wc(r)&&i===1&&tt(r,s)===1&&(u=!1);const l=a*(i-+u);return l===0?0:l}function Hc(e,t,n){const r=Lc(e,t)/1e3;return Fc()(r)}const zc={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Vc=(e,t,n)=>{let r;const o=zc[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Et(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Uc={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Yc={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Gc={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Zc={date:Et({formats:Uc,defaultWidth:"full"}),time:Et({formats:Yc,defaultWidth:"full"}),dateTime:Et({formats:Gc,defaultWidth:"full"})},Xc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},qc=(e,t,n,r)=>Xc[e];function Fe(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,i=n?.width?String(n.width):a;o=e.formattingValues[i]||e.formattingValues[a]}else{const a=e.defaultWidth,i=n?.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const Jc={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Kc={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Qc={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},el={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},tl={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},nl={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},rl=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ol={ordinalNumber:rl,era:Fe({values:Jc,defaultWidth:"wide"}),quarter:Fe({values:Kc,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Fe({values:Qc,defaultWidth:"wide"}),day:Fe({values:el,defaultWidth:"wide"}),dayPeriod:Fe({values:tl,defaultWidth:"wide",formattingValues:nl,defaultFormattingWidth:"wide"})};function Le(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const a=s[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(i)?al(i,d=>d.test(a)):sl(i,d=>d.test(a));let l;l=e.valueCallback?e.valueCallback(u):u,l=n.valueCallback?n.valueCallback(l):l;const f=t.slice(a.length);return{value:l,rest:f}}}function sl(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function al(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function il(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=n.valueCallback?n.valueCallback(a):a;const i=t.slice(o.length);return{value:a,rest:i}}}const cl=/^(\d+)(th|st|nd|rd)?/i,ll=/\d+/i,ul={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},fl={any:[/^b/i,/^(a|c)/i]},dl={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ml={any:[/1/i,/2/i,/3/i,/4/i]},pl={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},hl={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},gl={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},vl={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},yl={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},xl={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},bl={ordinalNumber:il({matchPattern:cl,parsePattern:ll,valueCallback:e=>parseInt(e,10)}),era:Le({matchPatterns:ul,defaultMatchWidth:"wide",parsePatterns:fl,defaultParseWidth:"any"}),quarter:Le({matchPatterns:dl,defaultMatchWidth:"wide",parsePatterns:ml,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Le({matchPatterns:pl,defaultMatchWidth:"wide",parsePatterns:hl,defaultParseWidth:"any"}),day:Le({matchPatterns:gl,defaultMatchWidth:"wide",parsePatterns:vl,defaultParseWidth:"any"}),dayPeriod:Le({matchPatterns:yl,defaultMatchWidth:"any",parsePatterns:xl,defaultParseWidth:"any"})},wl={code:"en-US",formatDistance:Vc,formatLong:Zc,formatRelative:qc,localize:ol,match:bl,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Cl(e,t,n){const r=Mc(),o=n?.locale??r.locale??wl,s=2520,a=tt(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const i=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:a}),[u,l]=fn(n?.in,...a>0?[t,e]:[e,t]),f=Hc(l,u),d=(ir(l)-ir(u))/1e3,h=Math.round((f-d)/60);let p;if(h<2)return h===0?o.formatDistance("lessThanXMinutes",1,i):o.formatDistance("xMinutes",h,i);if(h<45)return o.formatDistance("xMinutes",h,i);if(h<90)return o.formatDistance("aboutXHours",1,i);if(h<sr){const v=Math.round(h/60);return o.formatDistance("aboutXHours",v,i)}else{if(h<s)return o.formatDistance("xDays",1,i);if(h<Je){const v=Math.round(h/sr);return o.formatDistance("xDays",v,i)}else if(h<Je*2)return p=Math.round(h/Je),o.formatDistance("aboutXMonths",p,i)}if(p=Bc(l,u),p<12){const v=Math.round(h/Je);return o.formatDistance("xMonths",v,i)}else{const v=p%12,g=Math.trunc(p/12);return v<3?o.formatDistance("aboutXYears",g,i):v<9?o.formatDistance("overXYears",g,i):o.formatDistance("almostXYears",g+1,i)}}function jl(e,t){return Cl(e,_c(e),t)}const El={running:"info",completed:"success",failed:"error",default:"default"},Ro=w.memo(({status:e,duration:t})=>c.jsx(Y.Badge,{variant:El[e],children:t&&e!=="failed"?t:e}));Ro.displayName="TraceStatusBadge";const To=w.memo(({groupId:e,groupName:t,groupStatus:n,groupStartTime:r,groupEndTime:o,totalSteps:s,activeSteps:a,isSelected:i})=>{const u=q(d=>d.selectTraceGroupId),l=w.useMemo(()=>o?xe(o-r):void 0,[o,r]),f=w.useCallback(()=>{u(e)},[e,u]);return c.jsx("button",{type:"button","data-testid":`trace-${e}`,className:Y.cn("motia-trace-group cursor-pointer transition-colors w-full text-left",i?"bg-muted-foreground/10":"hover:bg-muted/70"),onClick:f,children:c.jsxs("div",{className:"p-3 flex flex-col gap-1",children:[c.jsxs("div",{className:"flex flex-row justify-between items-center gap-2",children:[c.jsx("span",{className:"font-semibold text-lg truncate flex-1 min-w-0",children:t}),c.jsx(Ro,{status:n,duration:l})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-1",children:[c.jsxs("div",{className:"flex justify-between",children:[c.jsx("div",{"data-testid":"trace-id",className:"text-xs text-muted-foreground font-mono tracking-[1px]",children:e}),c.jsxs("span",{children:[s," steps"]})]}),c.jsxs("div",{className:"flex justify-between",children:[jl(r)," ago"]}),a>0&&c.jsxs("div",{className:"text-blue-600",children:[a," active"]})]})]})},e)});To.displayName="TraceGroupItem";const ko=w.memo(()=>{const e=Tc(),t=q(a=>a.selectedTraceGroupId),n=q(a=>a.selectTraceGroupId),r=w.useMemo(()=>e?.length||0,[e]),o=w.useMemo(()=>{if(!e||e.length===0)return"";const a=e[e.length-1];return a?.status==="running"?a.id:""},[e]);w.useEffect(()=>{o&&o!==t?n(o):!o&&!r&&t&&n("")},[o,r]);const s=w.useMemo(()=>[...e].reverse(),[e]);return!e||e.length===0?null:c.jsx("div",{className:"overflow-auto",children:s.map(a=>c.jsx(To,{groupId:a.id,groupName:a.name,groupStatus:a.status,groupStartTime:a.startTime,groupEndTime:a.endTime,totalSteps:a.metadata.totalSteps,activeSteps:a.metadata.activeSteps,isSelected:t===a.id},a.id))})});ko.displayName="TracesGroups";const Mo=w.memo(()=>c.jsxs("div",{className:"grid grid-rows-[auto_1fr] h-full",children:[c.jsx(mr,{}),c.jsxs("div",{className:"grid grid-cols-[300px_1fr] overflow-hidden",children:[c.jsx("div",{className:"w-[300px] border-r border-border overflow-auto h-full","data-testid":"traces-container",children:c.jsx(ko,{})}),c.jsxs("div",{className:"overflow-auto","data-testid":"trace-details",children:[c.jsx(No,{}),c.jsx(pr,{})]})]})]}));Mo.displayName="ObservabilityPage";/**
137
+ `)},Mi=0,je=[];function Di(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(Mi++)[0],s=p.useState(Br)[0],a=p.useRef(e);p.useEffect(function(){a.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=ni([e.lockRef.current],(e.shards||[]).map(Tn),!0).filter(Boolean);return h.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=p.useCallback(function(h,x){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var b=Ge(h),A=n.current,S="deltaX"in h?h.deltaX:A[0]-b[0],j="deltaY"in h?h.deltaY:A[1]-b[1],C,N=h.target,E=Math.abs(S)>Math.abs(j)?"h":"v";if("touches"in h&&E==="h"&&N.type==="range")return!1;var k=Nn(E,N);if(!k)return!0;if(k?C=E:(C=E==="v"?"h":"v",k=Nn(E,N)),!k)return!1;if(!r.current&&"changedTouches"in h&&(S||j)&&(r.current=C),!C)return!0;var _=r.current||C;return Pi(_,x,h,_==="h"?S:j)},[]),u=p.useCallback(function(h){var x=h;if(!(!je.length||je[je.length-1]!==s)){var b="deltaY"in x?Rn(x):Ge(x),A=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&ki(C.delta,b)})[0];if(A&&A.should){x.cancelable&&x.preventDefault();return}if(!A){var S=(a.current.shards||[]).map(Tn).filter(Boolean).filter(function(C){return C.contains(x.target)}),j=S.length>0?i(x,S[0]):!a.current.noIsolation;j&&x.cancelable&&x.preventDefault()}}},[]),l=p.useCallback(function(h,x,b,A){var S={name:h,delta:x,target:b,should:A,shadowParent:Ii(b)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(j){return j!==S})},1)},[]),f=p.useCallback(function(h){n.current=Ge(h),r.current=void 0},[]),d=p.useCallback(function(h){l(h.type,Rn(h),h.target,i(h,e.lockRef.current))},[]),v=p.useCallback(function(h){l(h.type,Ge(h),h.target,i(h,e.lockRef.current))},[]);p.useEffect(function(){return je.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:v}),document.addEventListener("wheel",u,we),document.addEventListener("touchmove",u,we),document.addEventListener("touchstart",f,we),function(){je=je.filter(function(h){return h!==s}),document.removeEventListener("wheel",u,we),document.removeEventListener("touchmove",u,we),document.removeEventListener("touchstart",f,we)}},[]);var m=e.removeScrollBar,y=e.inert;return p.createElement(p.Fragment,null,y?p.createElement(s,{styles:_i(o)}):null,m?p.createElement(Ei,{gapMode:e.gapMode}):null)}function Ii(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Li=fi($r,Di);var zr=p.forwardRef(function(e,t){return p.createElement(ot,Q({},e,{ref:t,sideCar:Li}))});zr.classNames=ot.classNames;var st="Popover",[Vr]=ar(st,[Sr]),$e=Sr(),[Fi,he]=Vr(st),Yr=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!1}=e,i=$e(t),u=p.useRef(null),[l,f]=p.useState(!1),[d,v]=Ka({prop:r,defaultProp:o??!1,onChange:s,caller:st});return c.jsx(Wa,{...i,children:c.jsx(Fi,{scope:t,contentId:Ms(),triggerRef:u,open:d,onOpenChange:v,onOpenToggle:p.useCallback(()=>v(m=>!m),[v]),hasCustomAnchor:l,onCustomAnchorAdd:p.useCallback(()=>f(!0),[]),onCustomAnchorRemove:p.useCallback(()=>f(!1),[]),modal:a,children:n})})};Yr.displayName=st;var Gr="PopoverAnchor",$i=p.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=he(Gr,n),s=$e(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:i}=o;return p.useEffect(()=>(a(),()=>i()),[a,i]),c.jsx(Mr,{...s,...r,ref:t})});$i.displayName=Gr;var Zr="PopoverTrigger",Kr=p.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=he(Zr,n),s=$e(n),a=me(t,o.triggerRef),i=c.jsx(ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":eo(o.open),...r,ref:a,onClick:le(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:c.jsx(Mr,{asChild:!0,...s,children:i})});Kr.displayName=Zr;var Kt="PopoverPortal",[Bi,Wi]=Vr(Kt,{forceMount:void 0}),Xr=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=he(Kt,t);return c.jsx(Bi,{scope:t,forceMount:n,children:c.jsx(Zt,{present:n||s.open,children:c.jsx(Dr,{asChild:!0,container:o,children:r})})})};Xr.displayName=Kt;var Re="PopoverContent",qr=p.forwardRef((e,t)=>{const n=Wi(Re,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=he(Re,e.__scopePopover);return c.jsx(Zt,{present:r||s.open,children:s.modal?c.jsx(Ui,{...o,ref:t}):c.jsx(zi,{...o,ref:t})})});qr.displayName=Re;var Hi=ir("PopoverContent.RemoveScroll"),Ui=p.forwardRef((e,t)=>{const n=he(Re,e.__scopePopover),r=p.useRef(null),o=me(t,r),s=p.useRef(!1);return p.useEffect(()=>{const a=r.current;if(a)return ti(a)},[]),c.jsx(zr,{as:Hi,allowPinchZoom:!0,children:c.jsx(Jr,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:le(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:le(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,l=i.button===2||u;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:le(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),zi=p.forwardRef((e,t)=>{const n=he(Re,e.__scopePopover),r=p.useRef(!1),o=p.useRef(!1);return c.jsx(Jr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Jr=p.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:f,...d}=e,v=he(Re,n),m=$e(n);return Es(),c.jsx(fr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:c.jsx(lr,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>v.onOpenChange(!1),children:c.jsx(Ha,{"data-state":eo(v.open),role:"dialog",id:v.contentId,...m,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Qr="PopoverClose",Vi=p.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=he(Qr,n);return c.jsx(ae.button,{type:"button",...r,ref:t,onClick:le(e.onClick,()=>o.onOpenChange(!1))})});Vi.displayName=Qr;var Yi="PopoverArrow",Gi=p.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=$e(n);return c.jsx(Ua,{...o,...r,ref:t})});Gi.displayName=Yi;function eo(e){return e?"open":"closed"}var Zi=Yr,Ki=Kr,Xi=Xr,qi=qr;const to=({...e})=>c.jsx(Zi,{"data-slot":"popover",...e}),no=({...e})=>c.jsx(Ki,{"data-slot":"popover-trigger",...e}),ro=({className:e,align:t="center",sideOffset:n=4,...r})=>c.jsx(Xi,{children:c.jsx(qi,{"data-slot":"popover-content",align:t,sideOffset:n,className:Y.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})});function Ji(e,t,n,r){function o(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function i(f){try{l(r.next(f))}catch(d){a(d)}}function u(f){try{l(r.throw(f))}catch(d){a(d)}}function l(f){f.done?s(f.value):o(f.value).then(i,u)}l((r=r.apply(e,[])).next())})}var Qi=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(o){e.addRange(o)}),t&&t.focus()}},ec=Qi,On={"text/plain":"Text","text/html":"Url",default:"Text"},tc="Copy to clipboard: #{key}, Enter";function nc(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function rc(e,t){var n,r,o,s,a,i,u=!1;t||(t={}),n=t.debug||!1;try{o=ec(),s=document.createRange(),a=document.getSelection(),i=document.createElement("span"),i.textContent=e,i.ariaHidden="true",i.style.all="unset",i.style.position="fixed",i.style.top=0,i.style.clip="rect(0, 0, 0, 0)",i.style.whiteSpace="pre",i.style.webkitUserSelect="text",i.style.MozUserSelect="text",i.style.msUserSelect="text",i.style.userSelect="text",i.addEventListener("copy",function(f){if(f.stopPropagation(),t.format)if(f.preventDefault(),typeof f.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=On[t.format]||On.default;window.clipboardData.setData(d,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.clipboardData))}),document.body.appendChild(i),s.selectNodeContents(i),a.addRange(s);var l=document.execCommand("copy");if(!l)throw new Error("copy command was unsuccessful");u=!0}catch(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=nc("message"in t?t.message:tc),window.prompt(r,e)}}finally{a&&(typeof a.removeRange=="function"?a.removeRange(s):a.removeAllRanges()),i&&document.body.removeChild(i),o()}return u}var oc=rc;function ve(e){return Object.prototype.toString.call(e)==="[object Object]"}function De(e){return Array.isArray(e)?e.length:ve(e)?Object.keys(e).length:0}function sc(e,t){if(typeof e=="string")return e;try{return JSON.stringify(e,(n,r)=>{switch(typeof r){case"bigint":return String(r)+"n";case"number":case"boolean":case"object":case"string":return r;default:return String(r)}},t)}catch(n){return`${n.name}: ${n.message}`||"JSON.stringify failed"}}function ac(e){return Ji(this,void 0,void 0,function*(){try{yield navigator.clipboard.writeText(e)}catch{oc(e)}})}function Pn(e,t,n,r,o,s){if(s&&s.collapsed!==void 0)return!!s.collapsed;if(typeof r=="boolean")return r;if(typeof r=="number"&&t>r)return!0;const a=De(e);if(typeof r=="function"){const i=Xt(r,[{node:e,depth:t,indexOrName:n,size:a}]);if(typeof i=="boolean")return i}return!!(Array.isArray(e)&&a>o||ve(e)&&a>o)}function kn(e,t,n,r,o,s){if(s&&s.collapsed!==void 0)return!!s.collapsed;if(typeof r=="boolean")return r;if(typeof r=="number"&&t>r)return!0;const a=Math.ceil(e.length/100);if(typeof r=="function"){const i=Xt(r,[{node:e,depth:t,indexOrName:n,size:a}]);if(typeof i=="boolean")return i}return!!(Array.isArray(e)&&a>o||ve(e)&&a>o)}function Se(e,t,n){return typeof e=="boolean"?e:!!(typeof e=="number"&&t>e||e==="collapsed"&&n||e==="expanded"&&!n)}function Xt(e,t){try{return e(...t)}catch(n){reportError(n)}}function oo(e){if(e===!0||ve(e)&&e.add===!0)return!0}function _n(e){if(e===!0||ve(e)&&e.edit===!0)return!0}function qt(e){if(e===!0||ve(e)&&e.delete===!0)return!0}function ic(e){return typeof e=="function"}function so(e){return!e||e.add===void 0||!!e.add}function Mn(e){return!e||e.edit===void 0||!!e.edit}function Jt(e){return!e||e.delete===void 0||!!e.delete}function at(e){return!e||e.enableClipboard===void 0||!!e.enableClipboard}function cc(e){return!e||e.matchesURL===void 0||!!e.matchesURL}function lc(e,t){return e==="string"?t.trim().replace(/^\"([\s\S]+?)\"$/,"$1"):t}var Dn;function At(){return At=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},At.apply(this,arguments)}var Qt=function(t){return p.createElement("svg",At({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},t),Dn||(Dn=p.createElement("path",{fill:"currentColor",d:"M12.473 5.806a.666.666 0 0 0-.946 0L8.473 8.86a.667.667 0 0 1-.946 0L4.473 5.806a.667.667 0 1 0-.946.94l3.06 3.06a2 2 0 0 0 2.826 0l3.06-3.06a.667.667 0 0 0 0-.94Z"})))},In;function Nt(){return Nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nt.apply(this,arguments)}var uc=function(t){return p.createElement("svg",Nt({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),In||(In=p.createElement("path",{fill:"currentColor",d:"M17.542 2.5h-4.75a3.963 3.963 0 0 0-3.959 3.958v4.75a3.963 3.963 0 0 0 3.959 3.959h4.75a3.963 3.963 0 0 0 3.958-3.959v-4.75A3.963 3.963 0 0 0 17.542 2.5Zm2.375 8.708a2.378 2.378 0 0 1-2.375 2.375h-4.75a2.378 2.378 0 0 1-2.375-2.375v-4.75a2.378 2.378 0 0 1 2.375-2.375h4.75a2.378 2.378 0 0 1 2.375 2.375v4.75Zm-4.75 6.334a3.963 3.963 0 0 1-3.959 3.958h-4.75A3.963 3.963 0 0 1 2.5 17.542v-4.75a3.963 3.963 0 0 1 3.958-3.959.791.791 0 1 1 0 1.584 2.378 2.378 0 0 0-2.375 2.375v4.75a2.378 2.378 0 0 0 2.375 2.375h4.75a2.378 2.378 0 0 0 2.375-2.375.792.792 0 1 1 1.584 0Z"})))},Ln,Fn;function Rt(){return Rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rt.apply(this,arguments)}var fc=function(t){return p.createElement("svg",Rt({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Ln||(Ln=p.createElement("path",{fill:"currentColor",d:"M17.25 3H6.75A3.755 3.755 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.755 3.755 0 0 0 17.25 3Zm2.25 14.25a2.25 2.25 0 0 1-2.25 2.25H6.75a2.25 2.25 0 0 1-2.25-2.25V6.75A2.25 2.25 0 0 1 6.75 4.5h10.5a2.25 2.25 0 0 1 2.25 2.25v10.5Z"})),Fn||(Fn=p.createElement("path",{fill:"#14C786",d:"M10.312 14.45 7.83 11.906a.625.625 0 0 0-.896 0 .659.659 0 0 0 0 .918l2.481 2.546a1.264 1.264 0 0 0 .896.381 1.237 1.237 0 0 0 .895-.38l5.858-6.011a.658.658 0 0 0 0-.919.625.625 0 0 0-.896 0l-5.857 6.01Z"})))};function it({node:e,nodeMeta:t}){const{customizeCopy:n,CopyComponent:r,CopiedComponent:o}=w.useContext(ge),[s,a]=w.useState(!1),i=u=>{u.stopPropagation();const l=n(e,t);typeof l=="string"&&l&&ac(l),a(!0),setTimeout(()=>a(!1),3e3)};return s?typeof o=="function"?c.jsx(o,{className:"json-view--copy",style:{display:"inline-block"}}):c.jsx(fc,{className:"json-view--copy",style:{display:"inline-block"}}):typeof r=="function"?c.jsx(r,{onClick:i,className:"json-view--copy"}):c.jsx(uc,{onClick:i,className:"json-view--copy"})}function Tt({indexOrName:e,value:t,depth:n,deleteHandle:r,editHandle:o,parent:s,parentPath:a}){const{displayArrayIndex:i}=w.useContext(ge),u=Array.isArray(s);return c.jsxs("div",Object.assign({className:"json-view--pair"},{children:[!u||u&&i?c.jsxs(c.Fragment,{children:[c.jsx("span",Object.assign({className:typeof e=="number"?"json-view--index":"json-view--property"},{children:e})),":"," "]}):c.jsx(c.Fragment,{}),c.jsx(io,{node:t,depth:n+1,deleteHandle:(l,f)=>r(l,f),editHandle:(l,f,d,v)=>o(l,f,d,v),parent:s,indexOrName:e,parentPath:a})]}))}var $n,Bn;function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ot.apply(this,arguments)}var en=function(t){return p.createElement("svg",Ot({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),$n||($n=p.createElement("path",{fill:"currentColor",d:"M18.75 6h-2.325a3.757 3.757 0 0 0-3.675-3h-1.5a3.757 3.757 0 0 0-3.675 3H5.25a.75.75 0 0 0 0 1.5H6v9.75A3.754 3.754 0 0 0 9.75 21h4.5A3.754 3.754 0 0 0 18 17.25V7.5h.75a.75.75 0 1 0 0-1.5Zm-7.5-1.5h1.5A2.255 2.255 0 0 1 14.872 6H9.128a2.255 2.255 0 0 1 2.122-1.5Zm5.25 12.75a2.25 2.25 0 0 1-2.25 2.25h-4.5a2.25 2.25 0 0 1-2.25-2.25V7.5h9v9.75Z"})),Bn||(Bn=p.createElement("path",{fill:"#DA0000",d:"M10.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM13.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z"})))},Wn,Hn;function Pt(){return Pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pt.apply(this,arguments)}var ao=function(t){return p.createElement("svg",Pt({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Wn||(Wn=p.createElement("path",{fill:"currentColor",d:"M21 6.75v10.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3h10.5A3.754 3.754 0 0 1 21 6.75Zm-1.5 0c0-1.24-1.01-2.25-2.25-2.25H6.75C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25V6.75Z"})),Hn||(Hn=p.createElement("path",{fill:"#14C786",d:"M15 12.75a.75.75 0 1 0 0-1.5h-2.25V9a.75.75 0 1 0-1.5 0v2.25H9a.75.75 0 1 0 0 1.5h2.25V15a.75.75 0 1 0 1.5 0v-2.25H15Z"})))},Un,zn;function kt(){return kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kt.apply(this,arguments)}var tn=function(t){return p.createElement("svg",kt({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Un||(Un=p.createElement("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"})),zn||(zn=p.createElement("path",{fill:"#14C786",d:"m10.85 13.96-1.986-2.036a.5.5 0 0 0-.716 0 .527.527 0 0 0 0 .735l1.985 2.036a1.01 1.01 0 0 0 .717.305.99.99 0 0 0 .716-.305l4.686-4.808a.526.526 0 0 0 0-.735.5.5 0 0 0-.716 0l-4.687 4.809Z"})))},Vn,Yn;function _t(){return _t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_t.apply(this,arguments)}var nn=function(t){return p.createElement("svg",_t({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Vn||(Vn=p.createElement("path",{fill:"#DA0000",d:"M15 9a.75.75 0 0 0-1.06 0L12 10.94 10.06 9A.75.75 0 0 0 9 10.06L10.94 12 9 13.94A.75.75 0 0 0 10.06 15L12 13.06 13.94 15A.75.75 0 0 0 15 13.94L13.06 12 15 10.06A.75.75 0 0 0 15 9Z"})),Yn||(Yn=p.createElement("path",{fill:"currentColor",d:"M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"})))};function dc({originNode:e,node:t,depth:n,index:r,deleteHandle:o,customOptions:s,startIndex:a,parent:i,parentPath:u}){const{enableClipboard:l,src:f,onEdit:d,onChange:v,forceUpdate:m,displaySize:y,CustomOperation:h}=w.useContext(ge),x=[...u,String(r)],[b,A]=w.useState(!0),S=w.useCallback((N,E,k)=>{e[N]=E,d&&d({newValue:E,oldValue:k,depth:n,src:f,indexOrName:N,parentType:"array",parentPath:u}),v&&v({type:"edit",depth:n,src:f,indexOrName:N,parentType:"array",parentPath:u}),m()},[t,d,v,m]),j=N=>{e.splice(N,1),o&&o(N,u),m()},C=c.jsxs(c.Fragment,{children:[!b&&c.jsxs("span",Object.assign({onClick:()=>A(!0),className:"jv-size-chevron"},{children:[Se(y,n,b)&&c.jsxs("span",Object.assign({className:"jv-size"},{children:[De(t)," Items"]})),c.jsx(Qt,{className:"jv-chevron"})]})),!b&&l&&at(s)&&c.jsx(it,{node:t,nodeMeta:{depth:n,indexOrName:r,parent:i,parentPath:u,currentPath:x}}),typeof h=="function"?c.jsx(h,{node:t}):null]});return c.jsxs("div",{children:[c.jsx("span",{children:"["}),C,b?c.jsxs("button",Object.assign({onClick:()=>A(!1),className:"jv-button"},{children:[a," ... ",a+t.length-1]})):c.jsx("div",Object.assign({className:"jv-indent"},{children:t.map((N,E)=>c.jsx(Tt,{indexOrName:E+a,value:N,depth:n,parent:t,deleteHandle:j,editHandle:S,parentPath:u},String(r)+String(E)))})),c.jsx("span",{children:"]"})]})}function pc({node:e,depth:t,deleteHandle:n,indexOrName:r,customOptions:o,parent:s,parentPath:a}){const i=typeof r<"u"?[...a,String(r)]:a,u=[];for(let D=0;D<e.length;D+=100)u.push(e.slice(D,D+100));const{collapsed:l,enableClipboard:f,collapseObjectsAfterLength:d,editable:v,onDelete:m,src:y,onAdd:h,CustomOperation:x,onChange:b,forceUpdate:A,displaySize:S}=w.useContext(ge),[j,C]=w.useState(kn(e,t,r,l,d,o));w.useEffect(()=>{C(kn(e,t,r,l,d,o))},[l,d]);const[N,E]=w.useState(!1),k=()=>{E(!1),n&&n(r,a),m&&m({value:e,depth:t,src:y,indexOrName:r,parentType:"array",parentPath:a}),b&&b({type:"delete",depth:t,src:y,indexOrName:r,parentType:"array",parentPath:a})},[_,F]=w.useState(!1),W=()=>{const D=e;D.push(null),h&&h({indexOrName:D.length-1,depth:t,src:y,parentType:"array",parentPath:a}),b&&b({type:"add",indexOrName:D.length-1,depth:t,src:y,parentType:"array",parentPath:a}),A()},H=N||_,$=()=>{E(!1),F(!1)},M=c.jsxs(c.Fragment,{children:[!j&&!H&&c.jsxs("span",Object.assign({onClick:()=>C(!0),className:"jv-size-chevron"},{children:[Se(S,t,j)&&c.jsxs("span",Object.assign({className:"jv-size"},{children:[e.length," Items"]})),c.jsx(Qt,{className:"jv-chevron"})]})),H&&c.jsx(tn,{className:"json-view--edit",style:{display:"inline-block"},onClick:_?W:k}),H&&c.jsx(nn,{className:"json-view--edit",style:{display:"inline-block"},onClick:$}),!j&&!H&&f&&at(o)&&c.jsx(it,{node:e,nodeMeta:{depth:t,indexOrName:r,parent:s,parentPath:a,currentPath:i}}),!j&&!H&&oo(v)&&so(o)&&c.jsx(ao,{className:"json-view--edit",onClick:()=>{W()}}),!j&&!H&&qt(v)&&Jt(o)&&n&&c.jsx(en,{className:"json-view--edit",onClick:()=>E(!0)}),typeof x=="function"?c.jsx(x,{node:e}):null]});return c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"["}),M,j?c.jsx("button",Object.assign({onClick:()=>C(!1),className:"jv-button"},{children:"..."})):c.jsx("div",Object.assign({className:"jv-indent"},{children:u.map((D,I)=>c.jsx(dc,{originNode:e,node:D,depth:t,index:I,startIndex:I*100,deleteHandle:n,customOptions:o,parentPath:a},String(r)+String(I)))})),c.jsx("span",{children:"]"}),j&&Se(S,t,j)&&c.jsxs("span",Object.assign({onClick:()=>C(!1),className:"jv-size"},{children:[e.length," Items"]}))]})}function mc({node:e,depth:t,indexOrName:n,deleteHandle:r,customOptions:o,parent:s,parentPath:a}){const{collapsed:i,onCollapse:u,enableClipboard:l,ignoreLargeArray:f,collapseObjectsAfterLength:d,editable:v,onDelete:m,src:y,onAdd:h,onEdit:x,onChange:b,forceUpdate:A,displaySize:S,CustomOperation:j}=w.useContext(ge),C=typeof n<"u"?[...a,String(n)]:a;if(!f&&Array.isArray(e)&&e.length>100)return c.jsx(pc,{node:e,depth:t,indexOrName:n,deleteHandle:r,customOptions:o,parentPath:C});const N=ve(e),[E,k]=w.useState(Pn(e,t,n,i,d,o)),_=R=>{u?.({isCollapsing:!R,node:e,depth:t,indexOrName:n}),k(R)};w.useEffect(()=>{_(Pn(e,t,n,i,d,o))},[i,d]);const F=w.useCallback((R,L,V)=>{Array.isArray(e)?e[+R]=L:e&&(e[R]=L),x&&x({newValue:L,oldValue:V,depth:t,src:y,indexOrName:R,parentType:N?"object":"array",parentPath:C}),b&&b({type:"edit",depth:t,src:y,indexOrName:R,parentType:N?"object":"array",parentPath:C}),A()},[e,x,b,A]),W=R=>{Array.isArray(e)?e.splice(+R,1):e&&delete e[R],A()},[H,$]=w.useState(!1),M=()=>{$(!1),r&&r(n,C),m&&m({value:e,depth:t,src:y,indexOrName:n,parentType:N?"object":"array",parentPath:C}),b&&b({type:"delete",depth:t,src:y,indexOrName:n,parentType:N?"object":"array",parentPath:C})},[D,I]=w.useState(!1),P=w.useRef(null),O=()=>{var R;if(N){const L=(R=P.current)===null||R===void 0?void 0:R.value;L&&(e[L]=null,P.current&&(P.current.value=""),I(!1),h&&h({indexOrName:L,depth:t,src:y,parentType:"object",parentPath:C}),b&&b({type:"add",indexOrName:L,depth:t,src:y,parentType:"object",parentPath:C}))}else if(Array.isArray(e)){const L=e;L.push(null),h&&h({indexOrName:L.length-1,depth:t,src:y,parentType:"array",parentPath:C}),b&&b({type:"add",indexOrName:L.length-1,depth:t,src:y,parentType:"array",parentPath:C})}A()},U=R=>{R.key==="Enter"?(R.preventDefault(),O()):R.key==="Escape"&&T()},g=H||D,T=()=>{$(!1),I(!1)},B=c.jsxs(c.Fragment,{children:[!E&&!g&&c.jsxs("span",Object.assign({onClick:()=>_(!0),className:"jv-size-chevron"},{children:[Se(S,t,E)&&c.jsxs("span",Object.assign({className:"jv-size"},{children:[De(e)," Items"]})),c.jsx(Qt,{className:"jv-chevron"})]})),D&&N&&c.jsx("input",{className:"json-view--input",placeholder:"property",ref:P,onKeyDown:U}),g&&c.jsx(tn,{className:"json-view--edit",style:{display:"inline-block"},onClick:D?O:M}),g&&c.jsx(nn,{className:"json-view--edit",style:{display:"inline-block"},onClick:T}),!E&&!g&&l&&at(o)&&c.jsx(it,{node:e,nodeMeta:{depth:t,indexOrName:n,parent:s,parentPath:a,currentPath:C}}),!E&&!g&&oo(v)&&so(o)&&c.jsx(ao,{className:"json-view--edit",onClick:()=>{N?(I(!0),setTimeout(()=>{var R;return(R=P.current)===null||R===void 0?void 0:R.focus()})):O()}}),!E&&!g&&qt(v)&&Jt(o)&&r&&c.jsx(en,{className:"json-view--edit",onClick:()=>$(!0)}),typeof j=="function"?c.jsx(j,{node:e}):null]});return Array.isArray(e)?c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"["}),B,E?c.jsx("button",Object.assign({onClick:()=>_(!1),className:"jv-button"},{children:"..."})):c.jsx("div",Object.assign({className:"jv-indent"},{children:e.map((R,L)=>c.jsx(Tt,{indexOrName:L,value:R,depth:t,parent:e,deleteHandle:W,editHandle:F,parentPath:C},String(n)+String(L)))})),c.jsx("span",{children:"]"}),E&&Se(S,t,E)&&c.jsxs("span",Object.assign({onClick:()=>_(!1),className:"jv-size"},{children:[De(e)," Items"]}))]}):N?c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"{"}),B,E?c.jsx("button",Object.assign({onClick:()=>_(!1),className:"jv-button"},{children:"..."})):c.jsx("div",Object.assign({className:"jv-indent"},{children:Object.entries(e).map(([R,L])=>c.jsx(Tt,{indexOrName:R,value:L,depth:t,parent:e,deleteHandle:W,editHandle:F,parentPath:C},String(n)+String(R)))})),c.jsx("span",{children:"}"}),E&&Se(S,t,E)&&c.jsxs("span",Object.assign({onClick:()=>_(!1),className:"jv-size"},{children:[De(e)," Items"]}))]}):c.jsx("span",{children:String(e)})}const hc=w.forwardRef(({str:e,className:t,ctrlClick:n},r)=>{let{collapseStringMode:o,collapseStringsAfterLength:s,customizeCollapseStringUI:a}=w.useContext(ge);const[i,u]=w.useState(!0),l=w.useRef(null);s=s>0?s:0;const f=e.replace(/\s+/g," "),d=typeof a=="function"?a(f,i):typeof a=="string"?a:"...",v=m=>{var y;if((m.ctrlKey||m.metaKey)&&n)n(m);else{const h=window.getSelection();if(h&&h.anchorOffset!==h.focusOffset&&((y=h.anchorNode)===null||y===void 0?void 0:y.parentElement)===l.current)return;u(!i)}};if(e.length<=s)return c.jsxs("span",Object.assign({ref:l,className:t,onClick:n},{children:['"',e,'"']}));if(o==="address")return e.length<=10?c.jsxs("span",Object.assign({ref:l,className:t,onClick:n},{children:['"',e,'"']})):c.jsxs("span",Object.assign({ref:l,onClick:v,className:t+" cursor-pointer"},{children:['"',i?[f.slice(0,6),d,f.slice(-4)]:e,'"']}));if(o==="directly")return c.jsxs("span",Object.assign({ref:l,onClick:v,className:t+" cursor-pointer"},{children:['"',i?[f.slice(0,s),d]:e,'"']}));if(o==="word"){let m=s,y=s+1,h=f,x=1;for(;;){if(/\W/.test(e[m])){h=e.slice(0,m);break}if(/\W/.test(e[y])){h=e.slice(0,y);break}if(x===6){h=e.slice(0,s);break}x++,m--,y++}return c.jsxs("span",Object.assign({ref:l,onClick:v,className:t+" cursor-pointer"},{children:['"',i?[h,d]:e,'"']}))}return c.jsxs("span",Object.assign({ref:l,className:t},{children:['"',e,'"']}))});var Gn;function Mt(){return Mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mt.apply(this,arguments)}var vc=function(t){return p.createElement("svg",Mt({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Gn||(Gn=p.createElement("path",{fill:"currentColor",d:"M17.25 3H6.75A3.754 3.754 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.754 3.754 0 0 0 17.25 3Zm2.25 14.25c0 1.24-1.01 2.25-2.25 2.25H6.75c-1.24 0-2.25-1.01-2.25-2.25V6.75c0-1.24 1.01-2.25 2.25-2.25h10.5c1.24 0 2.25 1.01 2.25 2.25v10.5Zm-6.09-9.466-5.031 5.03a2.981 2.981 0 0 0-.879 2.121v1.19c0 .415.336.75.75.75h1.19c.8 0 1.554-.312 2.12-.879l5.03-5.03a2.252 2.252 0 0 0 0-3.182c-.85-.85-2.331-.85-3.18 0Zm-2.91 7.151c-.28.28-.666.44-1.06.44H9v-.44c0-.4.156-.777.44-1.06l3.187-3.188 1.06 1.061-3.187 3.188Zm5.03-5.03-.782.783-1.06-1.061.782-.782a.766.766 0 0 1 1.06 0 .75.75 0 0 1 0 1.06Z"})))},Zn,Kn;function Dt(){return Dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dt.apply(this,arguments)}var gc=function(t){return p.createElement("svg",Dt({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},t),Zn||(Zn=p.createElement("path",{fill:"currentColor",d:"M6.75 3h5.5v1.5h-5.5C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25v-5.5H21v5.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3Z"})),Kn||(Kn=p.createElement("path",{fill:"currentColor",d:"M20.013 3h-3.946a.987.987 0 0 0 0 1.973h1.564l-6.342 6.342a1.004 1.004 0 0 0 0 1.396 1.004 1.004 0 0 0 1.396 0l6.342-6.342v1.564a.987.987 0 0 0 1.973 0V3.987A.987.987 0 0 0 20.013 3Z"})))};function io({node:e,depth:t,deleteHandle:n,indexOrName:r,parent:o,editHandle:s,parentPath:a}){const{collapseStringsAfterLength:i,enableClipboard:u,editable:l,src:f,onDelete:d,onChange:v,customizeNode:m,matchesURL:y,urlRegExp:h,EditComponent:x,DoneComponent:b,CancelComponent:A,CustomOperation:S}=w.useContext(ge);let j;if(typeof m=="function"&&(j=Xt(m,[{node:e,depth:t,indexOrName:r}])),j){if(w.isValidElement(j))return j;if(ic(j)){const C=j;return c.jsx(C,{node:e,depth:t,indexOrName:r})}}if(Array.isArray(e)||ve(e))return c.jsx(mc,{parent:o,node:e,depth:t,indexOrName:r,deleteHandle:n,parentPath:a,customOptions:typeof j=="object"?j:void 0});{const C=typeof e,N=typeof r<"u"?[...a,String(r)]:a,[E,k]=w.useState(!1),[_,F]=w.useState(!1),W=w.useRef(null),H=()=>{k(!0),setTimeout(()=>{var R,L;(R=window.getSelection())===null||R===void 0||R.selectAllChildren(W.current),(L=W.current)===null||L===void 0||L.focus()})},$=w.useCallback(()=>{let R=W.current.innerText;try{const L=JSON.parse(R);s&&s(r,L,e,a)}catch{const V=lc(C,R);s&&s(r,V,e,a)}k(!1)},[s,r,e,a,C]),M=()=>{k(!1),F(!1)},D=()=>{F(!1),n&&n(r,a),d&&d({value:e,depth:t,src:f,indexOrName:r,parentType:Array.isArray(o)?"array":"object",parentPath:a}),v&&v({depth:t,src:f,indexOrName:r,parentType:Array.isArray(o)?"array":"object",type:"delete",parentPath:a})},I=w.useCallback(R=>{R.key==="Enter"?(R.preventDefault(),$()):R.key==="Escape"&&M()},[$]),P=E||_,O=!P&&_n(l)&&Mn(j)&&s?R=>{(R.ctrlKey||R.metaKey)&&H()}:void 0,U=c.jsxs(c.Fragment,{children:[P&&(typeof b=="function"?c.jsx(b,{className:"json-view--edit",style:{display:"inline-block"},onClick:_?D:$}):c.jsx(tn,{className:"json-view--edit",style:{display:"inline-block"},onClick:_?D:$})),P&&(typeof A=="function"?c.jsx(A,{className:"json-view--edit",style:{display:"inline-block"},onClick:M}):c.jsx(nn,{className:"json-view--edit",style:{display:"inline-block"},onClick:M})),!P&&u&&at(j)&&c.jsx(it,{node:e,nodeMeta:{depth:t,indexOrName:r,parent:o,parentPath:a,currentPath:N}}),!P&&y&&C==="string"&&h.test(e)&&cc(j)&&c.jsx("a",Object.assign({href:e,target:"_blank",className:"json-view--link"},{children:c.jsx(gc,{})})),!P&&_n(l)&&Mn(j)&&s&&(typeof x=="function"?c.jsx(x,{className:"json-view--edit",onClick:H}):c.jsx(vc,{className:"json-view--edit",onClick:H})),!P&&qt(l)&&Jt(j)&&n&&c.jsx(en,{className:"json-view--edit",onClick:()=>F(!0)}),typeof S=="function"?c.jsx(S,{node:e}):null]});let g="json-view--string";switch(C){case"number":case"bigint":g="json-view--number";break;case"boolean":g="json-view--boolean";break;case"object":g="json-view--null";break}typeof j?.className=="string"&&(g+=" "+j.className),_&&(g+=" json-view--deleting");let T=String(e);C==="bigint"&&(T+="n");const B=w.useMemo(()=>c.jsx("span",{contentEditable:!0,className:g,dangerouslySetInnerHTML:{__html:C==="string"?`"${T}"`:T},ref:W,onKeyDown:I}),[T,C,I]);return C==="string"?c.jsxs(c.Fragment,{children:[E?B:e.length>i?c.jsx(hc,{str:e,ref:W,className:g,ctrlClick:O}):c.jsxs("span",Object.assign({className:g,onClick:O},{children:['"',T,'"']})),U]}):c.jsxs(c.Fragment,{children:[E?B:c.jsx("span",Object.assign({className:g,onClick:O},{children:T})),U]})}}const co=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,ge=w.createContext({src:void 0,collapseStringsAfterLength:99,collapseStringMode:"directly",customizeCollapseStringUI:void 0,collapseObjectsAfterLength:20,collapsed:!1,onCollapse:void 0,enableClipboard:!0,editable:!1,onEdit:void 0,onDelete:void 0,onAdd:void 0,onChange:void 0,forceUpdate:()=>{},customizeNode:void 0,customizeCopy:()=>{},displaySize:void 0,displayArrayIndex:!0,matchesURL:!1,urlRegExp:co,ignoreLargeArray:!1,CopyComponent:void 0,CopiedComponent:void 0,EditComponent:void 0,CancelComponent:void 0,DoneComponent:void 0,CustomOperation:void 0});function Xn({src:e,collapseStringsAfterLength:t=99,collapseStringMode:n="directly",customizeCollapseStringUI:r,collapseObjectsAfterLength:o=99,collapsed:s,onCollapse:a,enableClipboard:i=!0,editable:u=!1,onEdit:l,onDelete:f,onAdd:d,onChange:v,dark:m=!1,theme:y="default",customizeNode:h,customizeCopy:x=M=>sc(M),displaySize:b,displayArrayIndex:A=!0,style:S,className:j,matchesURL:C=!1,urlRegExp:N=co,ignoreLargeArray:E=!1,CopyComponent:k,CopiedComponent:_,EditComponent:F,CancelComponent:W,DoneComponent:H,CustomOperation:$}){const[M,D]=w.useState(0),I=w.useCallback(()=>D(U=>++U),[]),[P,O]=w.useState(e);return w.useEffect(()=>O(e),[e]),c.jsx(ge.Provider,Object.assign({value:{src:P,collapseStringsAfterLength:t,collapseStringMode:n,customizeCollapseStringUI:r,collapseObjectsAfterLength:o,collapsed:s,onCollapse:a,enableClipboard:i,editable:u,onEdit:l,onDelete:f,onAdd:d,onChange:v,forceUpdate:I,customizeNode:h,customizeCopy:x,displaySize:b,displayArrayIndex:A,matchesURL:C,urlRegExp:N,ignoreLargeArray:E,CopyComponent:k,CopiedComponent:_,EditComponent:F,CancelComponent:W,DoneComponent:H,CustomOperation:$}},{children:c.jsx("code",Object.assign({className:"json-view"+(m?" dark":"")+(y&&y!=="default"?" json-view_"+y:"")+(j?" "+j:""),style:S},{children:c.jsx(io,{node:P,depth:1,editHandle:(U,g,T,B)=>{O(g),l&&l({newValue:g,oldValue:T,depth:1,src:P,indexOrName:U,parentType:null,parentPath:B}),v&&v({type:"edit",depth:1,src:P,indexOrName:U,parentType:null,parentPath:B})},deleteHandle:(U,g)=>{O(void 0),f&&f({value:P,depth:1,src:P,indexOrName:U,parentType:null,parentPath:g}),v&&v({depth:1,src:P,indexOrName:U,parentType:null,type:"delete",parentPath:g})},parentPath:[]})}))}))}const yc=e=>typeof e=="object"&&e!==null?JSON.stringify(e,null,1):e===null?"null":e.toString(),It=w.memo(({arg:e,popover:t=!0})=>{const n=w.useMemo(()=>typeof e=="object"&&e!==null,[e]),r=w.useMemo(()=>yc(e),[e]),o=w.useMemo(()=>JSON.stringify(e,null,2),[e]);return t?c.jsxs(to,{children:[c.jsx(no,{asChild:!0,children:c.jsx("span",{className:"truncate font-mono text-blue-500 cursor-pointer inline-block",children:r})}),c.jsx(ro,{className:"backdrop-blur-md w-auto max-w-2xl relative max-h-[50vh] overflow-y-auto",hideWhenDetached:!0,children:n?c.jsxs("div",{children:[c.jsx(bt,{textToCopy:o,className:"absolute top-4 right-4",title:"Copy JSON"}),c.jsx(Xn,{src:e,theme:"default",enableClipboard:!1,style:{padding:0}})]}):c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{children:r}),c.jsx(bt,{textToCopy:o,className:"ml-2",title:"Copy JSON"})]})})]}):c.jsx(c.Fragment,{children:n?c.jsx(Xn,{src:e,theme:"default",enableClipboard:!1,style:{padding:0}}):c.jsx("span",{className:"font-mono text-blue-500",children:r})})});It.displayName="Argument";const Lt=w.memo(({callsQuantity:e,noQuantity:t=!1})=>{const n=e&&e>1;return c.jsxs("div",{className:"flex items-center",children:[c.jsx("span",{className:"font-mono text-emerald-500",children:")"}),!t&&n&&c.jsxs("span",{className:"font-mono text-muted-foreground",children:[" x",e]})]})});Lt.displayName="ClosingParenthesis";const Ft=w.forwardRef(({topLevelClassName:e,objectName:t,functionName:n,className:r,...o},s)=>c.jsxs("div",{ref:s,className:Y.cn("flex items-center",r),...o,children:[e&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"font-mono text-pink-500",children:e}),c.jsx("span",{children:"."})]}),t&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"font-mono text-pink-500",children:t}),c.jsx("span",{children:"."})]}),c.jsx("span",{className:"font-mono text-pink-500",children:n}),c.jsx("span",{className:"font-mono text-emerald-500",children:"("})]}));Ft.displayName="FunctionCallContent";const xc={gridTemplateColumns:"max-content 1fr max-content"},ct=w.memo(({topLevelClassName:e,objectName:t,functionName:n,args:r,callsQuantity:o})=>{const s=w.useMemo(()=>r.filter(u=>u!==void 0),[r]),a=w.useMemo(()=>({gridTemplateColumns:`repeat(${s.length*2}, minmax(0, auto))`}),[s.length]),i=w.useMemo(()=>{const u=[e,t].filter(Boolean).join("."),l=u?`${u}.`:"",f=s.map(d=>typeof d=="object"&&d!==null?JSON.stringify(d,null,2):d===null?"null":typeof d=="string"?`'${d}'`:String(d)).join(", ");return`${l}${n}(${f})`},[e,t,n,s]);return c.jsxs("div",{className:"grid overflow-hidden items-center",style:xc,children:[c.jsxs(to,{children:[c.jsx(no,{asChild:!0,children:c.jsx(Ft,{className:"cursor-pointer",functionName:n,topLevelClassName:e,objectName:t})}),c.jsxs(ro,{className:"grid grid-rows-auto backdrop-blur-md w-auto max-w-2xl max-h-[50vh] overflow-y-auto",hideWhenDetached:!0,children:[c.jsxs("div",{className:"flex items-center justify-between gap-2",children:[c.jsx(Ft,{functionName:n,topLevelClassName:e,objectName:t}),c.jsx(bt,{textToCopy:i})]}),s.map((u,l)=>c.jsxs("div",{className:"grid grid-cols-[auto_1fr] items-center pl-4",children:[c.jsx(It,{arg:u,popover:!1}),l<s.length-1&&c.jsx("span",{children:", "})]},l)),c.jsx(Lt,{callsQuantity:o,noQuantity:!0})]})]}),c.jsx("div",{className:"grid items-center min-w-0",style:a,children:s.map((u,l)=>c.jsxs(w.Fragment,{children:[c.jsx(It,{arg:u}),l<s.length-1&&c.jsx("span",{children:", "})]},l))}),c.jsx(Lt,{callsQuantity:o})]})});ct.displayName="FunctionCall";const lo=w.memo(({event:e})=>{const t=w.useMemo(()=>[{topic:e.topic,data:e.data}],[e]);return c.jsx(ct,{functionName:"emit",args:t})});lo.displayName="TraceEmitEvent";const uo=w.memo(({event:e})=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Y.LevelDot,{level:e.level})," ",e.message]}));uo.displayName="TraceLogEvent";const fo=w.memo(({event:e})=>{const t=w.useMemo(()=>[e.data.traceId,e.data.key,e.data.value],[e]);return c.jsx(ct,{objectName:"state",functionName:e.operation,args:t})});fo.displayName="TraceStateEvent";const po=w.memo(({event:e})=>{const t=w.useMemo(()=>[e.data.groupId,e.data.id,e.data.data],[e]);return c.jsx(ct,{topLevelClassName:"streams",objectName:e.streamName,functionName:e.operation,args:t,callsQuantity:e.calls})});po.displayName="TraceStreamEvent";const mo=w.memo(({event:e})=>{if(e.type==="log")return c.jsx(uo,{event:e});if(e.type==="emit")return c.jsx(lo,{event:e});if(e.type==="state")return c.jsx(fo,{event:e});if(e.type==="stream")return c.jsx(po,{event:e})});mo.displayName="TraceEvent";const ho=w.memo(({event:e,traceStartTime:t})=>c.jsxs(w.Fragment,{children:[c.jsx("div",{className:"grid place-items-center",children:c.jsx("div",{className:"w-1 h-1 rounded-full bg-emerald-500 outline outline-2 outline-emerald-500/50 -ml-[26px]"})}),c.jsx("div",{className:"grid place-items-center",children:c.jsx(rs,{event:e})}),c.jsx("div",{className:"grid place-items-center",children:c.jsxs("span",{className:"text-sm font-mono text-muted-foreground",children:["+",ye(Math.floor(e.timestamp-t))]})}),c.jsx("div",{className:"grid place-items-start",children:c.jsx(mo,{event:e})})]}));ho.displayName="TraceEventItem";const vo=w.memo(({trace:e,onClose:t})=>{const n=w.useMemo(()=>[{icon:c.jsx(tr,{}),onClick:t,label:"Close"}],[t]);return c.jsxs(Y.Sidebar,{onClose:t,initialWidth:600,title:"Trace Details",subtitle:`Viewing details from step ${e.name}`,actions:n,children:[c.jsxs("div",{className:"px-2 overflow-auto",children:[c.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground mb-4",children:[e.endTime&&c.jsxs("span",{children:["Duration: ",ye(e.endTime-e.startTime)]}),c.jsx("div",{className:"bg-blue-500 font-bold text-xs px-[4px] py-[2px] rounded-sm text-blue-100",children:e.entryPoint.type}),e.correlationId&&c.jsxs(Y.Badge,{variant:"outline",children:["Correlated: ",e.correlationId]})]}),c.jsx("div",{className:"grid grid-cols-[auto_auto_auto_1fr] gap-x-2 gap-y-3 font-mono text-xs border-l-1 border-gray-500/40 pl-6",children:e.events.map((r,o)=>c.jsx(ho,{event:r,traceStartTime:e.startTime},o))})]}),e.error&&c.jsxs("div",{className:"p-4 bg-red-800/10",children:[c.jsx("div",{className:"text-sm text-red-800 dark:text-red-400 font-semibold",children:e.error.message}),c.jsx("div",{className:"text-sm text-red-800 dark:text-red-400 pl-4",children:e.error.stack})]})]})});vo.displayName="TraceItemDetail";const go=w.memo(()=>{const e=X(t=>t.selectedTraceGroupId);return e?c.jsx(yo,{groupId:e}):null});go.displayName="TraceTimeline";const yo=w.memo(({groupId:e})=>{const t=w.useMemo(()=>({streamName:"motia-trace-group",groupId:"default",id:e}),[e]),{data:n}=xt.useStreamItem(t),r=w.useMemo(()=>({streamName:"motia-trace",groupId:e}),[e]),{data:o}=xt.useStreamGroup(r),s=Go(n),[a,i]=w.useState(100),u=X(m=>m.selectedTraceId),l=X(m=>m.selectTraceId),f=w.useMemo(()=>o?.find(m=>m.id===u),[o,u]),d=()=>a>100&&i(m=>m-10),v=()=>a<200&&i(m=>m+10);return n?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"flex flex-col flex-1 relative min-h-full min-w-[1000px]",children:c.jsxs("div",{className:"flex flex-col",style:{width:`${a}%`},children:[c.jsxs("div",{className:"flex flex-1 bg-background",style:{width:`${a}%`},children:[c.jsxs("div",{className:"shrink-0 w-[200px] h-[37px] flex items-center justify-center gap-2 sticky left-0 top-0 z-10 bg-card backdrop-blur-xs backdrop-filter",children:[c.jsx(Y.Button,{variant:"icon",size:"sm",className:"px-2",onClick:d,disabled:a<=100,children:c.jsx(zo,{className:"w-4 h-4 cursor-pointer"})}),c.jsxs("span",{className:"min-w-12 text-center select-none text-sm font-bold text-muted-foreground",children:[a,"%"]}),c.jsx(Y.Button,{variant:"icon",size:"sm",className:"px-2",onClick:v,disabled:a>=200,children:c.jsx(Yo,{className:"w-4 h-4 cursor-pointer"})})]}),c.jsxs("div",{className:"flex justify-between font-mono p-2 w-full text-xs text-muted-foreground bg-card",children:[c.jsx("span",{children:"0ms"}),c.jsx("span",{children:ye(Math.floor((s-n.startTime)*.25))}),c.jsx("span",{children:ye(Math.floor((s-n.startTime)*.5))}),c.jsx("span",{children:ye(Math.floor((s-n.startTime)*.75))}),c.jsx("span",{children:ye(Math.floor(s-n.startTime))})]})]}),c.jsx("div",{className:"flex flex-col h-full",style:{width:`${a}%`},children:o?.map(m=>c.jsx(or,{traceId:m.id,traceName:m.name,traceStatus:m.status,traceStartTime:m.startTime,traceEndTime:m.endTime,groupStartTime:n.startTime,groupEndTime:s,onExpand:l},m.id))})]})}),f&&c.jsx(vo,{trace:f,onClose:()=>l(void 0)})]}):null});yo.displayName="TraceTimelineComponent";const bc=()=>{const e=w.useMemo(()=>({streamName:"motia-trace-group",groupId:"default"}),[]),{data:t}=xt.useStreamGroup(e),n=X(r=>r.search);return w.useMemo(()=>t?.filter(r=>r.name.toLowerCase().includes(n.toLowerCase())||r.id.toLowerCase().includes(n.toLowerCase())),[t,n])};function wc(e){const o=Date.now(),s=typeof e=="number"?e:e.getTime(),a=Math.abs(o-s),i=Math.round(a/6e4);if(i<1)return"less than a minute";if(i===1)return"1 minute";if(i<45)return`${i} minutes`;if(i<90)return"about 1 hour";if(i<1440)return`about ${Math.round(i/60)} hours`;if(i<2520)return"1 day";if(i<43200)return`${Math.round(i/1440)} days`;if(i<64800)return"about 1 month";if(i<86400)return"about 2 months";if(i<525600)return`${Math.round(i/43200)} months`;if(i<655200)return"about 1 year";if(i<788400)return"over 1 year";if(i<525600*2)return"almost 2 years";const u=Math.round(i/525600),l=i%525600,f=525600/4;return l<f?`about ${u} years`:l<f*3?`over ${u} years`:`almost ${u+1} years`}const jc={running:"info",completed:"success",failed:"error",default:"default"},xo=w.memo(({status:e,duration:t})=>c.jsx(Y.Badge,{variant:jc[e],children:t&&e!=="failed"?t:e}));xo.displayName="TraceStatusBadge";const bo=w.memo(({groupId:e,groupName:t,groupStatus:n,groupStartTime:r,groupEndTime:o,totalSteps:s,activeSteps:a,isSelected:i})=>{const u=X(d=>d.selectTraceGroupId),l=w.useMemo(()=>o?ye(o-r):void 0,[o,r]),f=w.useCallback(()=>{u(e)},[e,u]);return c.jsx("button",{type:"button","data-testid":`trace-${e}`,className:Y.cn("motia-trace-group cursor-pointer transition-colors w-full text-left",i?"bg-muted-foreground/10":"hover:bg-muted/70"),onClick:f,children:c.jsxs("div",{className:"p-3 flex flex-col gap-1",children:[c.jsxs("div",{className:"flex flex-row justify-between items-center gap-2",children:[c.jsx("span",{className:"font-semibold text-lg truncate flex-1 min-w-0",children:t}),c.jsx(xo,{status:n,duration:l})]}),c.jsxs("div",{className:"text-xs text-muted-foreground space-y-1",children:[c.jsxs("div",{className:"flex justify-between",children:[c.jsx("div",{"data-testid":"trace-id",className:"text-xs text-muted-foreground font-mono tracking-[1px]",children:e}),c.jsxs("span",{children:[s," steps"]})]}),c.jsxs("div",{className:"flex justify-between",children:[wc(r)," ago"]}),a>0&&c.jsxs("div",{className:"text-blue-600",children:[a," active"]})]})]})},e)});bo.displayName="TraceGroupItem";const wo=w.memo(()=>{const e=bc(),t=X(a=>a.selectedTraceGroupId),n=X(a=>a.selectTraceGroupId),r=w.useMemo(()=>e?.length||0,[e]),o=w.useMemo(()=>{if(!e||e.length===0)return"";const a=e[e.length-1];return a?.status==="running"?a.id:""},[e]);w.useEffect(()=>{o&&o!==t?n(o):!o&&!r&&t&&n("")},[o,r]);const s=w.useMemo(()=>[...e].reverse(),[e]);return!e||e.length===0?null:c.jsx("div",{className:"overflow-auto",children:s.map(a=>c.jsx(bo,{groupId:a.id,groupName:a.name,groupStatus:a.status,groupStartTime:a.startTime,groupEndTime:a.endTime,totalSteps:a.metadata.totalSteps,activeSteps:a.metadata.activeSteps,isSelected:t===a.id},a.id))})});wo.displayName="TracesGroups";const jo=w.memo(()=>c.jsxs("div",{className:"grid grid-rows-[auto_1fr] h-full",children:[c.jsx(nr,{}),c.jsxs("div",{className:"grid grid-cols-[300px_1fr] overflow-hidden",children:[c.jsx("div",{className:"w-[300px] border-r border-border overflow-auto h-full","data-testid":"traces-container",children:c.jsx(wo,{})}),c.jsxs("div",{className:"overflow-auto","data-testid":"trace-details",children:[c.jsx(go,{}),c.jsx(rr,{})]})]})]}));jo.displayName="ObservabilityPage";/**
138
138
  * @license lucide-react v0.548.0 - ISC
139
139
  *
140
140
  * This source code is licensed under the ISC license.
141
141
  * See the LICENSE file in the root directory of this source tree.
142
- */const Sl=[["path",{d:"M6 5h12",key:"fvfigv"}],["path",{d:"M4 12h10",key:"oujl3d"}],["path",{d:"M12 19h8",key:"baeox8"}]],Al=X("chart-no-axes-gantt",Sl),_o=w.memo(()=>c.jsxs("div",{"data-testid":"observability-link",children:[c.jsx(Al,{"aria-hidden":"true"}),c.jsx("span",{children:"Tracing"})]}));_o.displayName="ObservabilityTabLabel";exports.ObservabilityPage=Mo;exports.ObservabilityTabLabel=_o;
142
+ */const Cc=[["path",{d:"M6 5h12",key:"fvfigv"}],["path",{d:"M4 12h10",key:"oujl3d"}],["path",{d:"M12 19h8",key:"baeox8"}]],Ec=K("chart-no-axes-gantt",Cc),Co=w.memo(()=>c.jsxs("div",{"data-testid":"observability-link",children:[c.jsx(Ec,{"aria-hidden":"true"}),c.jsx("span",{children:"Tracing"})]}));Co.displayName="ObservabilityTabLabel";exports.ObservabilityPage=jo;exports.ObservabilityTabLabel=Co;