agentix-cli 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/agent-4AOMVXRJ.js +2 -0
  2. package/dist/board-dashboard-CXIVJKDP.js +7282 -0
  3. package/dist/board-dashboard-CXIVJKDP.js.map +1 -0
  4. package/dist/chunk-34NG7UDX.js +11 -0
  5. package/dist/chunk-34NG7UDX.js.map +1 -0
  6. package/dist/chunk-4HP6UC2X.js +13 -0
  7. package/dist/chunk-4HP6UC2X.js.map +1 -0
  8. package/dist/chunk-5WNGHDFC.js +164 -0
  9. package/dist/chunk-5WNGHDFC.js.map +1 -0
  10. package/dist/{chunk-7MBTMCKY.js → chunk-63UYRJIC.js} +2 -2
  11. package/dist/chunk-6PPIFDOQ.js +1742 -0
  12. package/dist/chunk-6PPIFDOQ.js.map +1 -0
  13. package/dist/chunk-ABCHHNG6.js +625 -0
  14. package/dist/chunk-ABCHHNG6.js.map +1 -0
  15. package/dist/chunk-AFRHKA7B.js +2 -0
  16. package/dist/chunk-AFRHKA7B.js.map +1 -0
  17. package/dist/chunk-CDNWCYF7.js +2 -0
  18. package/dist/chunk-CDNWCYF7.js.map +1 -0
  19. package/dist/{chunk-6MKAXEE5.js → chunk-EKTPCSN4.js} +2 -2
  20. package/dist/{chunk-6MKAXEE5.js.map → chunk-EKTPCSN4.js.map} +1 -1
  21. package/dist/chunk-EW27SCCC.js +2 -0
  22. package/dist/chunk-EW27SCCC.js.map +1 -0
  23. package/dist/chunk-HCFSHGK4.js +46 -0
  24. package/dist/chunk-HCFSHGK4.js.map +1 -0
  25. package/dist/chunk-HHJGKD5B.js +71 -0
  26. package/dist/chunk-HHJGKD5B.js.map +1 -0
  27. package/dist/{chunk-YI2T5QYB.js → chunk-MBEQASP3.js} +2 -2
  28. package/dist/chunk-N67JZAXU.js +2 -0
  29. package/dist/chunk-N67JZAXU.js.map +1 -0
  30. package/dist/{chunk-FLOGK2U7.js → chunk-SRHLXZRF.js} +2 -2
  31. package/dist/chunk-TT2Q7YMZ.js +118 -0
  32. package/dist/chunk-TT2Q7YMZ.js.map +1 -0
  33. package/dist/{chunk-HI24KAEY.js → chunk-WJXU5F4Z.js} +3 -4
  34. package/dist/{chunk-HI24KAEY.js.map → chunk-WJXU5F4Z.js.map} +1 -1
  35. package/dist/chunk-XDJSYQST.js +6 -0
  36. package/dist/chunk-XDJSYQST.js.map +1 -0
  37. package/dist/chunk-YPOELN6Z.js +798 -0
  38. package/dist/chunk-YPOELN6Z.js.map +1 -0
  39. package/dist/{chunk-QZP65I2H.js → chunk-ZE2YFX4K.js} +2 -2
  40. package/dist/cli.js +1 -320
  41. package/dist/cli.js.map +1 -1
  42. package/dist/{compaction-JBZZ7I7Y.js → compaction-X46EQEPS.js} +6 -6
  43. package/dist/compaction-X46EQEPS.js.map +1 -0
  44. package/dist/{config-LN6JEHMF.js → config-KCYHMKCT.js} +2 -2
  45. package/dist/config-mutator-QP4GLBOE.js +2 -0
  46. package/dist/context-planner-G2J7FNNU.js +17 -0
  47. package/dist/context-planner-G2J7FNNU.js.map +1 -0
  48. package/dist/editor-chat-R54E65W5.js +137 -0
  49. package/dist/editor-chat-R54E65W5.js.map +1 -0
  50. package/dist/heal-JDXUPRET.js +2 -0
  51. package/dist/inbox-L5ZZ623Y.js +315 -0
  52. package/dist/inbox-L5ZZ623Y.js.map +1 -0
  53. package/dist/index.d.ts +2917 -1781
  54. package/dist/index.js +23 -53
  55. package/dist/index.js.map +1 -1
  56. package/dist/ingest-whatsapp-NS4OWDOU.js +6 -0
  57. package/dist/ingest-whatsapp-NS4OWDOU.js.map +1 -0
  58. package/dist/memory-extract-WH4FZ456.js +2 -0
  59. package/dist/processes-XF5CV4LK.js +256 -0
  60. package/dist/processes-XF5CV4LK.js.map +1 -0
  61. package/dist/program-FFWEILAS.js +2 -0
  62. package/dist/providers-AKQ4HTB4.js +2 -0
  63. package/dist/registry-IFMDJWQ7.js +2 -0
  64. package/dist/scheduler-63D5KFO7.js +2 -0
  65. package/dist/slack-PSQLVTGB.js +3 -0
  66. package/dist/slack-PSQLVTGB.js.map +1 -0
  67. package/dist/store-5MJOO74U.js +2 -0
  68. package/dist/store-5MJOO74U.js.map +1 -0
  69. package/dist/task-store-NM7VKNLE.js +2 -0
  70. package/dist/task-store-NM7VKNLE.js.map +1 -0
  71. package/dist/telegram-W4SLFMNY.js +3 -0
  72. package/dist/telegram-W4SLFMNY.js.map +1 -0
  73. package/dist/timers-PCB4ZIBD.js +2 -0
  74. package/dist/timers-PCB4ZIBD.js.map +1 -0
  75. package/dist/types-C7IFH42Z.js +2 -0
  76. package/dist/types-C7IFH42Z.js.map +1 -0
  77. package/dist/usage-dashboard-AXPXB2KP.js +803 -0
  78. package/dist/usage-dashboard-AXPXB2KP.js.map +1 -0
  79. package/dist/web/workflow-editor.global.js +1427 -0
  80. package/dist/web/workflow-editor.global.js.map +1 -0
  81. package/dist/whatsapp-DCHRBRVV.js +3 -0
  82. package/dist/whatsapp-DCHRBRVV.js.map +1 -0
  83. package/dist/workspace-setup-C4VB3QZV.js +2 -0
  84. package/dist/workspace-setup-C4VB3QZV.js.map +1 -0
  85. package/package.json +9 -2
  86. package/dist/agent-BCDPSPKU.js +0 -2
  87. package/dist/board-dashboard-LA7WW56M.js +0 -5668
  88. package/dist/board-dashboard-LA7WW56M.js.map +0 -1
  89. package/dist/chunk-6U2XOQHU.js +0 -7
  90. package/dist/chunk-6U2XOQHU.js.map +0 -1
  91. package/dist/chunk-7FJQGD6U.js +0 -6
  92. package/dist/chunk-7FJQGD6U.js.map +0 -1
  93. package/dist/chunk-ABDP7TDL.js +0 -71
  94. package/dist/chunk-ABDP7TDL.js.map +0 -1
  95. package/dist/chunk-CXY2RYNI.js +0 -11
  96. package/dist/chunk-CXY2RYNI.js.map +0 -1
  97. package/dist/chunk-HVC6FJNP.js +0 -108
  98. package/dist/chunk-HVC6FJNP.js.map +0 -1
  99. package/dist/chunk-K7BE4E35.js +0 -138
  100. package/dist/chunk-K7BE4E35.js.map +0 -1
  101. package/dist/chunk-KXJSLLSQ.js +0 -199
  102. package/dist/chunk-KXJSLLSQ.js.map +0 -1
  103. package/dist/chunk-KXZMYLHQ.js +0 -46
  104. package/dist/chunk-KXZMYLHQ.js.map +0 -1
  105. package/dist/chunk-M7HKBG3V.js +0 -2
  106. package/dist/chunk-M7HKBG3V.js.map +0 -1
  107. package/dist/chunk-RB7265LO.js +0 -12
  108. package/dist/chunk-RB7265LO.js.map +0 -1
  109. package/dist/compaction-JBZZ7I7Y.js.map +0 -1
  110. package/dist/config-mutator-24TH7PHM.js +0 -2
  111. package/dist/heal-WKY5I4KB.js +0 -2
  112. package/dist/memory-extract-AD7KMRPC.js +0 -2
  113. package/dist/providers-VUIWO3ZK.js +0 -2
  114. package/dist/registry-ASC2QS5K.js +0 -2
  115. package/dist/scheduler-A3TQOCKT.js +0 -2
  116. package/dist/usage-dashboard-QX3CF6KK.js +0 -404
  117. package/dist/usage-dashboard-QX3CF6KK.js.map +0 -1
  118. package/dist/workspace-setup-ZWTT42XT.js +0 -2
  119. /package/dist/{agent-BCDPSPKU.js.map → agent-4AOMVXRJ.js.map} +0 -0
  120. /package/dist/{chunk-7MBTMCKY.js.map → chunk-63UYRJIC.js.map} +0 -0
  121. /package/dist/{chunk-YI2T5QYB.js.map → chunk-MBEQASP3.js.map} +0 -0
  122. /package/dist/{chunk-FLOGK2U7.js.map → chunk-SRHLXZRF.js.map} +0 -0
  123. /package/dist/{chunk-QZP65I2H.js.map → chunk-ZE2YFX4K.js.map} +0 -0
  124. /package/dist/{config-LN6JEHMF.js.map → config-KCYHMKCT.js.map} +0 -0
  125. /package/dist/{config-mutator-24TH7PHM.js.map → config-mutator-QP4GLBOE.js.map} +0 -0
  126. /package/dist/{heal-WKY5I4KB.js.map → heal-JDXUPRET.js.map} +0 -0
  127. /package/dist/{memory-extract-AD7KMRPC.js.map → memory-extract-WH4FZ456.js.map} +0 -0
  128. /package/dist/{providers-VUIWO3ZK.js.map → program-FFWEILAS.js.map} +0 -0
  129. /package/dist/{registry-ASC2QS5K.js.map → providers-AKQ4HTB4.js.map} +0 -0
  130. /package/dist/{scheduler-A3TQOCKT.js.map → registry-IFMDJWQ7.js.map} +0 -0
  131. /package/dist/{workspace-setup-ZWTT42XT.js.map → scheduler-63D5KFO7.js.map} +0 -0
@@ -0,0 +1,1427 @@
1
+ "use strict";var AgentXWorkflowEditor=(()=>{var Sp=Object.create;var fs=Object.defineProperty;var Np=Object.getOwnPropertyDescriptor;var Cp=Object.getOwnPropertyNames;var Ep=Object.getPrototypeOf,Pp=Object.prototype.hasOwnProperty;var bt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Tp=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Cp(t))!Pp.call(e,o)&&o!==n&&fs(e,o,{get:()=>t[o],enumerable:!(r=Np(t,o))||r.enumerable});return e};var re=(e,t,n)=>(n=e!=null?Sp(Ep(e)):{},Tp(t||!e||!e.__esModule?fs(n,"default",{value:e,enumerable:!0}):n,e));var Cs=bt(B=>{"use strict";var ar=Symbol.for("react.element"),Fp=Symbol.for("react.portal"),Rp=Symbol.for("react.fragment"),Ip=Symbol.for("react.strict_mode"),Lp=Symbol.for("react.profiler"),zp=Symbol.for("react.provider"),Op=Symbol.for("react.context"),Ap=Symbol.for("react.forward_ref"),Dp=Symbol.for("react.suspense"),jp=Symbol.for("react.memo"),Up=Symbol.for("react.lazy"),hs=Symbol.iterator;function Wp(e){return e===null||typeof e!="object"?null:(e=hs&&e[hs]||e["@@iterator"],typeof e=="function"?e:null)}var ys={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xs=Object.assign,ws={};function bn(e,t,n){this.props=e,this.context=t,this.refs=ws,this.updater=n||ys}bn.prototype.isReactComponent={};bn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};bn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ks(){}ks.prototype=bn.prototype;function ji(e,t,n){this.props=e,this.context=t,this.refs=ws,this.updater=n||ys}var Ui=ji.prototype=new ks;Ui.constructor=ji;xs(Ui,bn.prototype);Ui.isPureReactComponent=!0;var ms=Array.isArray,_s=Object.prototype.hasOwnProperty,Wi={current:null},bs={key:!0,ref:!0,__self:!0,__source:!0};function Ss(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)_s.call(t,r)&&!bs.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(u===1)o.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];o.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)o[r]===void 0&&(o[r]=u[r]);return{$$typeof:ar,type:e,key:i,ref:a,props:o,_owner:Wi.current}}function Bp(e,t){return{$$typeof:ar,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Bi(e){return typeof e=="object"&&e!==null&&e.$$typeof===ar}function Hp(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var vs=/\/+/g;function Di(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Hp(""+e.key):t.toString(36)}function no(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case ar:case Fp:a=!0}}if(a)return a=e,o=o(a),e=r===""?"."+Di(a,0):r,ms(o)?(n="",e!=null&&(n=e.replace(vs,"$&/")+"/"),no(o,t,n,"",function(c){return c})):o!=null&&(Bi(o)&&(o=Bp(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(vs,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=r===""?".":r+":",ms(e))for(var u=0;u<e.length;u++){i=e[u];var s=r+Di(i,u);a+=no(i,t,n,s,o)}else if(s=Wp(e),typeof s=="function")for(e=s.call(e),u=0;!(i=e.next()).done;)i=i.value,s=r+Di(i,u++),a+=no(i,t,n,s,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function to(e,t,n){if(e==null)return e;var r=[],o=0;return no(e,r,"","",function(i){return t.call(n,i,o++)}),r}function $p(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Fe={current:null},ro={transition:null},Gp={ReactCurrentDispatcher:Fe,ReactCurrentBatchConfig:ro,ReactCurrentOwner:Wi};function Ns(){throw Error("act(...) is not supported in production builds of React.")}B.Children={map:to,forEach:function(e,t,n){to(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return to(e,function(){t++}),t},toArray:function(e){return to(e,function(t){return t})||[]},only:function(e){if(!Bi(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};B.Component=bn;B.Fragment=Rp;B.Profiler=Lp;B.PureComponent=ji;B.StrictMode=Ip;B.Suspense=Dp;B.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Gp;B.act=Ns;B.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=xs({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=Wi.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(s in t)_s.call(t,s)&&!bs.hasOwnProperty(s)&&(r[s]=t[s]===void 0&&u!==void 0?u[s]:t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){u=Array(s);for(var c=0;c<s;c++)u[c]=arguments[c+2];r.children=u}return{$$typeof:ar,type:e.type,key:o,ref:i,props:r,_owner:a}};B.createContext=function(e){return e={$$typeof:Op,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:zp,_context:e},e.Consumer=e};B.createElement=Ss;B.createFactory=function(e){var t=Ss.bind(null,e);return t.type=e,t};B.createRef=function(){return{current:null}};B.forwardRef=function(e){return{$$typeof:Ap,render:e}};B.isValidElement=Bi;B.lazy=function(e){return{$$typeof:Up,_payload:{_status:-1,_result:e},_init:$p}};B.memo=function(e,t){return{$$typeof:jp,type:e,compare:t===void 0?null:t}};B.startTransition=function(e){var t=ro.transition;ro.transition={};try{e()}finally{ro.transition=t}};B.unstable_act=Ns;B.useCallback=function(e,t){return Fe.current.useCallback(e,t)};B.useContext=function(e){return Fe.current.useContext(e)};B.useDebugValue=function(){};B.useDeferredValue=function(e){return Fe.current.useDeferredValue(e)};B.useEffect=function(e,t){return Fe.current.useEffect(e,t)};B.useId=function(){return Fe.current.useId()};B.useImperativeHandle=function(e,t,n){return Fe.current.useImperativeHandle(e,t,n)};B.useInsertionEffect=function(e,t){return Fe.current.useInsertionEffect(e,t)};B.useLayoutEffect=function(e,t){return Fe.current.useLayoutEffect(e,t)};B.useMemo=function(e,t){return Fe.current.useMemo(e,t)};B.useReducer=function(e,t,n){return Fe.current.useReducer(e,t,n)};B.useRef=function(e){return Fe.current.useRef(e)};B.useState=function(e){return Fe.current.useState(e)};B.useSyncExternalStore=function(e,t,n){return Fe.current.useSyncExternalStore(e,t,n)};B.useTransition=function(){return Fe.current.useTransition()};B.version="18.3.1"});var St=bt((Tm,Es)=>{"use strict";Es.exports=Cs()});var As=bt(Y=>{"use strict";function Vi(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<oo(o,t))e[r]=t,e[n]=o,n=r;else break e}}function it(e){return e.length===0?null:e[0]}function ao(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var a=2*(r+1)-1,u=e[a],s=a+1,c=e[s];if(0>oo(u,n))s<o&&0>oo(c,u)?(e[r]=c,e[s]=n,r=s):(e[r]=u,e[a]=n,r=a);else if(s<o&&0>oo(c,n))e[r]=c,e[s]=n,r=s;else break e}}return t}function oo(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Ps=performance,Y.unstable_now=function(){return Ps.now()}):(Hi=Date,Ts=Hi.now(),Y.unstable_now=function(){return Hi.now()-Ts});var Ps,Hi,Ts,ht=[],At=[],Vp=1,Ye=null,Se=3,lo=!1,an=!1,sr=!1,Rs=typeof setTimeout=="function"?setTimeout:null,Is=typeof clearTimeout=="function"?clearTimeout:null,Ms=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Ki(e){for(var t=it(At);t!==null;){if(t.callback===null)ao(At);else if(t.startTime<=e)ao(At),t.sortIndex=t.expirationTime,Vi(ht,t);else break;t=it(At)}}function Qi(e){if(sr=!1,Ki(e),!an)if(it(ht)!==null)an=!0,Yi(Ji);else{var t=it(At);t!==null&&Xi(Qi,t.startTime-e)}}function Ji(e,t){an=!1,sr&&(sr=!1,Is(ur),ur=-1),lo=!0;var n=Se;try{for(Ki(t),Ye=it(ht);Ye!==null&&(!(Ye.expirationTime>t)||e&&!Os());){var r=Ye.callback;if(typeof r=="function"){Ye.callback=null,Se=Ye.priorityLevel;var o=r(Ye.expirationTime<=t);t=Y.unstable_now(),typeof o=="function"?Ye.callback=o:Ye===it(ht)&&ao(ht),Ki(t)}else ao(ht);Ye=it(ht)}if(Ye!==null)var i=!0;else{var a=it(At);a!==null&&Xi(Qi,a.startTime-t),i=!1}return i}finally{Ye=null,Se=n,lo=!1}}var so=!1,io=null,ur=-1,Ls=5,zs=-1;function Os(){return!(Y.unstable_now()-zs<Ls)}function $i(){if(io!==null){var e=Y.unstable_now();zs=e;var t=!0;try{t=io(!0,e)}finally{t?lr():(so=!1,io=null)}}else so=!1}var lr;typeof Ms=="function"?lr=function(){Ms($i)}:typeof MessageChannel<"u"?(Gi=new MessageChannel,Fs=Gi.port2,Gi.port1.onmessage=$i,lr=function(){Fs.postMessage(null)}):lr=function(){Rs($i,0)};var Gi,Fs;function Yi(e){io=e,so||(so=!0,lr())}function Xi(e,t){ur=Rs(function(){e(Y.unstable_now())},t)}Y.unstable_IdlePriority=5;Y.unstable_ImmediatePriority=1;Y.unstable_LowPriority=4;Y.unstable_NormalPriority=3;Y.unstable_Profiling=null;Y.unstable_UserBlockingPriority=2;Y.unstable_cancelCallback=function(e){e.callback=null};Y.unstable_continueExecution=function(){an||lo||(an=!0,Yi(Ji))};Y.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ls=0<e?Math.floor(1e3/e):5};Y.unstable_getCurrentPriorityLevel=function(){return Se};Y.unstable_getFirstCallbackNode=function(){return it(ht)};Y.unstable_next=function(e){switch(Se){case 1:case 2:case 3:var t=3;break;default:t=Se}var n=Se;Se=t;try{return e()}finally{Se=n}};Y.unstable_pauseExecution=function(){};Y.unstable_requestPaint=function(){};Y.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Se;Se=e;try{return t()}finally{Se=n}};Y.unstable_scheduleCallback=function(e,t,n){var r=Y.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:Vp++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Vi(At,e),it(ht)===null&&e===it(At)&&(sr?(Is(ur),ur=-1):sr=!0,Xi(Qi,n-r))):(e.sortIndex=o,Vi(ht,e),an||lo||(an=!0,Yi(Ji))),e};Y.unstable_shouldYield=Os;Y.unstable_wrapCallback=function(e){var t=Se;return function(){var n=Se;Se=t;try{return e.apply(this,arguments)}finally{Se=n}}}});var js=bt((Fm,Ds)=>{"use strict";Ds.exports=As()});var Hd=bt(Je=>{"use strict";var Kp=St(),Ke=js();function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Vu=new Set,Fr={};function xn(e,t){$n(e,t),$n(e+"Capture",t)}function $n(e,t){for(Fr[e]=t,e=0;e<t.length;e++)Vu.add(t[e])}var Mt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wa=Object.prototype.hasOwnProperty,Qp=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Us={},Ws={};function Jp(e){return wa.call(Ws,e)?!0:wa.call(Us,e)?!1:Qp.test(e)?Ws[e]=!0:(Us[e]=!0,!1)}function Yp(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Xp(e,t,n,r){if(t===null||typeof t>"u"||Yp(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Le(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ke[e]=new Le(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ke[t]=new Le(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new Le(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new Le(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ke[e]=new Le(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new Le(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new Le(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new Le(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new Le(e,5,!1,e.toLowerCase(),null,!1,!1)});var pl=/[\-:]([a-z])/g;function fl(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(pl,fl);ke[t]=new Le(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(pl,fl);ke[t]=new Le(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(pl,fl);ke[t]=new Le(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new Le(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new Le("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new Le(e,1,!1,e.toLowerCase(),null,!0,!0)});function gl(e,t,n,r){var o=ke.hasOwnProperty(t)?ke[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Xp(t,n,o,r)&&(n=null),r||o===null?Jp(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Lt=Kp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,uo=Symbol.for("react.element"),Cn=Symbol.for("react.portal"),En=Symbol.for("react.fragment"),hl=Symbol.for("react.strict_mode"),ka=Symbol.for("react.profiler"),Ku=Symbol.for("react.provider"),Qu=Symbol.for("react.context"),ml=Symbol.for("react.forward_ref"),_a=Symbol.for("react.suspense"),ba=Symbol.for("react.suspense_list"),vl=Symbol.for("react.memo"),jt=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var Ju=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Bs=Symbol.iterator;function cr(e){return e===null||typeof e!="object"?null:(e=Bs&&e[Bs]||e["@@iterator"],typeof e=="function"?e:null)}var ae=Object.assign,qi;function yr(e){if(qi===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);qi=t&&t[1]||""}return`
2
+ `+qi+e}var Zi=!1;function ea(e,t){if(!e||Zi)return"";Zi=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
3
+ `),i=r.stack.split(`
4
+ `),a=o.length-1,u=i.length-1;1<=a&&0<=u&&o[a]!==i[u];)u--;for(;1<=a&&0<=u;a--,u--)if(o[a]!==i[u]){if(a!==1||u!==1)do if(a--,u--,0>u||o[a]!==i[u]){var s=`
5
+ `+o[a].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=a&&0<=u);break}}}finally{Zi=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?yr(e):""}function qp(e){switch(e.tag){case 5:return yr(e.type);case 16:return yr("Lazy");case 13:return yr("Suspense");case 19:return yr("SuspenseList");case 0:case 2:case 15:return e=ea(e.type,!1),e;case 11:return e=ea(e.type.render,!1),e;case 1:return e=ea(e.type,!0),e;default:return""}}function Sa(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case En:return"Fragment";case Cn:return"Portal";case ka:return"Profiler";case hl:return"StrictMode";case _a:return"Suspense";case ba:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qu:return(e.displayName||"Context")+".Consumer";case Ku:return(e._context.displayName||"Context")+".Provider";case ml:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vl:return t=e.displayName||null,t!==null?t:Sa(e.type)||"Memo";case jt:t=e._payload,e=e._init;try{return Sa(e(t))}catch{}}return null}function Zp(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Sa(t);case 8:return t===hl?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Zt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ef(e){var t=Yu(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function co(e){e._valueTracker||(e._valueTracker=ef(e))}function Xu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Yu(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function jo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Na(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Hs(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Zt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qu(e,t){t=t.checked,t!=null&&gl(e,"checked",t,!1)}function Ca(e,t){qu(e,t);var n=Zt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ea(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ea(e,t.type,Zt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function $s(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ea(e,t,n){(t!=="number"||jo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var xr=Array.isArray;function Dn(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Zt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Pa(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(_(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Gs(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(_(92));if(xr(n)){if(1<n.length)throw Error(_(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Zt(n)}}function Zu(e,t){var n=Zt(t.value),r=Zt(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Vs(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ec(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ta(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ec(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var po,tc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(po=po||document.createElement("div"),po.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=po.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Rr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _r={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},tf=["Webkit","ms","Moz","O"];Object.keys(_r).forEach(function(e){tf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_r[t]=_r[e]})});function nc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||_r.hasOwnProperty(e)&&_r[e]?(""+t).trim():t+"px"}function rc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=nc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var nf=ae({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ma(e,t){if(t){if(nf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function Fa(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ra=null;function yl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ia=null,jn=null,Un=null;function Ks(e){if(e=Yr(e)){if(typeof Ia!="function")throw Error(_(280));var t=e.stateNode;t&&(t=fi(t),Ia(e.stateNode,e.type,t))}}function oc(e){jn?Un?Un.push(e):Un=[e]:jn=e}function ic(){if(jn){var e=jn,t=Un;if(Un=jn=null,Ks(e),t)for(e=0;e<t.length;e++)Ks(t[e])}}function ac(e,t){return e(t)}function lc(){}var ta=!1;function sc(e,t,n){if(ta)return e(t,n);ta=!0;try{return ac(e,t,n)}finally{ta=!1,(jn!==null||Un!==null)&&(lc(),ic())}}function Ir(e,t){var n=e.stateNode;if(n===null)return null;var r=fi(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(_(231,t,typeof n));return n}var La=!1;if(Mt)try{Sn={},Object.defineProperty(Sn,"passive",{get:function(){La=!0}}),window.addEventListener("test",Sn,Sn),window.removeEventListener("test",Sn,Sn)}catch{La=!1}var Sn;function rf(e,t,n,r,o,i,a,u,s){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var br=!1,Uo=null,Wo=!1,za=null,of={onError:function(e){br=!0,Uo=e}};function af(e,t,n,r,o,i,a,u,s){br=!1,Uo=null,rf.apply(of,arguments)}function lf(e,t,n,r,o,i,a,u,s){if(af.apply(this,arguments),br){if(br){var c=Uo;br=!1,Uo=null}else throw Error(_(198));Wo||(Wo=!0,za=c)}}function wn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function uc(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Qs(e){if(wn(e)!==e)throw Error(_(188))}function sf(e){var t=e.alternate;if(!t){if(t=wn(e),t===null)throw Error(_(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Qs(o),e;if(i===r)return Qs(o),t;i=i.sibling}throw Error(_(188))}if(n.return!==r.return)n=o,r=i;else{for(var a=!1,u=o.child;u;){if(u===n){a=!0,n=o,r=i;break}if(u===r){a=!0,r=o,n=i;break}u=u.sibling}if(!a){for(u=i.child;u;){if(u===n){a=!0,n=i,r=o;break}if(u===r){a=!0,r=i,n=o;break}u=u.sibling}if(!a)throw Error(_(189))}}if(n.alternate!==r)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?e:t}function cc(e){return e=sf(e),e!==null?dc(e):null}function dc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=dc(e);if(t!==null)return t;e=e.sibling}return null}var pc=Ke.unstable_scheduleCallback,Js=Ke.unstable_cancelCallback,uf=Ke.unstable_shouldYield,cf=Ke.unstable_requestPaint,ce=Ke.unstable_now,df=Ke.unstable_getCurrentPriorityLevel,xl=Ke.unstable_ImmediatePriority,fc=Ke.unstable_UserBlockingPriority,Bo=Ke.unstable_NormalPriority,pf=Ke.unstable_LowPriority,gc=Ke.unstable_IdlePriority,ui=null,xt=null;function ff(e){if(xt&&typeof xt.onCommitFiberRoot=="function")try{xt.onCommitFiberRoot(ui,e,void 0,(e.current.flags&128)===128)}catch{}}var ct=Math.clz32?Math.clz32:mf,gf=Math.log,hf=Math.LN2;function mf(e){return e>>>=0,e===0?32:31-(gf(e)/hf|0)|0}var fo=64,go=4194304;function wr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ho(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var u=a&~o;u!==0?r=wr(u):(i&=a,i!==0&&(r=wr(i)))}else a=n&~o,a!==0?r=wr(a):i!==0&&(r=wr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-ct(t),o=1<<n,r|=e[n],t&=~o;return r}function vf(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-ct(i),u=1<<a,s=o[a];s===-1?(!(u&n)||u&r)&&(o[a]=vf(u,t)):s<=t&&(e.expiredLanes|=u),i&=~u}}function Oa(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function hc(){var e=fo;return fo<<=1,!(fo&4194240)&&(fo=64),e}function na(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ct(t),e[t]=n}function xf(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-ct(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function wl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ct(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var J=0;function mc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var vc,kl,yc,xc,wc,Aa=!1,ho=[],Gt=null,Vt=null,Kt=null,Lr=new Map,zr=new Map,Wt=[],wf="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ys(e,t){switch(e){case"focusin":case"focusout":Gt=null;break;case"dragenter":case"dragleave":Vt=null;break;case"mouseover":case"mouseout":Kt=null;break;case"pointerover":case"pointerout":Lr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zr.delete(t.pointerId)}}function dr(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Yr(t),t!==null&&kl(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function kf(e,t,n,r,o){switch(t){case"focusin":return Gt=dr(Gt,e,t,n,r,o),!0;case"dragenter":return Vt=dr(Vt,e,t,n,r,o),!0;case"mouseover":return Kt=dr(Kt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Lr.set(i,dr(Lr.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,zr.set(i,dr(zr.get(i)||null,e,t,n,r,o)),!0}return!1}function kc(e){var t=un(e.target);if(t!==null){var n=wn(t);if(n!==null){if(t=n.tag,t===13){if(t=uc(n),t!==null){e.blockedOn=t,wc(e.priority,function(){yc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function To(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Da(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ra=r,n.target.dispatchEvent(r),Ra=null}else return t=Yr(n),t!==null&&kl(t),e.blockedOn=n,!1;t.shift()}return!0}function Xs(e,t,n){To(e)&&n.delete(t)}function _f(){Aa=!1,Gt!==null&&To(Gt)&&(Gt=null),Vt!==null&&To(Vt)&&(Vt=null),Kt!==null&&To(Kt)&&(Kt=null),Lr.forEach(Xs),zr.forEach(Xs)}function pr(e,t){e.blockedOn===t&&(e.blockedOn=null,Aa||(Aa=!0,Ke.unstable_scheduleCallback(Ke.unstable_NormalPriority,_f)))}function Or(e){function t(o){return pr(o,e)}if(0<ho.length){pr(ho[0],e);for(var n=1;n<ho.length;n++){var r=ho[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Gt!==null&&pr(Gt,e),Vt!==null&&pr(Vt,e),Kt!==null&&pr(Kt,e),Lr.forEach(t),zr.forEach(t),n=0;n<Wt.length;n++)r=Wt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Wt.length&&(n=Wt[0],n.blockedOn===null);)kc(n),n.blockedOn===null&&Wt.shift()}var Wn=Lt.ReactCurrentBatchConfig,$o=!0;function bf(e,t,n,r){var o=J,i=Wn.transition;Wn.transition=null;try{J=1,_l(e,t,n,r)}finally{J=o,Wn.transition=i}}function Sf(e,t,n,r){var o=J,i=Wn.transition;Wn.transition=null;try{J=4,_l(e,t,n,r)}finally{J=o,Wn.transition=i}}function _l(e,t,n,r){if($o){var o=Da(e,t,n,r);if(o===null)ua(e,t,r,Go,n),Ys(e,r);else if(kf(o,e,t,n,r))r.stopPropagation();else if(Ys(e,r),t&4&&-1<wf.indexOf(e)){for(;o!==null;){var i=Yr(o);if(i!==null&&vc(i),i=Da(e,t,n,r),i===null&&ua(e,t,r,Go,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else ua(e,t,r,null,n)}}var Go=null;function Da(e,t,n,r){if(Go=null,e=yl(r),e=un(e),e!==null)if(t=wn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=uc(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Go=e,null}function _c(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(df()){case xl:return 1;case fc:return 4;case Bo:case pf:return 16;case gc:return 536870912;default:return 16}default:return 16}}var Ht=null,bl=null,Mo=null;function bc(){if(Mo)return Mo;var e,t=bl,n=t.length,r,o="value"in Ht?Ht.value:Ht.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===o[i-r];r++);return Mo=o.slice(e,1<r?1-r:void 0)}function Fo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function mo(){return!0}function qs(){return!1}function Qe(e){function t(n,r,o,i,a){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(i):i[u]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?mo:qs,this.isPropagationStopped=qs,this}return ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=mo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=mo)},persist:function(){},isPersistent:mo}),t}var Xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sl=Qe(Xn),Jr=ae({},Xn,{view:0,detail:0}),Nf=Qe(Jr),ra,oa,fr,ci=ae({},Jr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nl,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fr&&(fr&&e.type==="mousemove"?(ra=e.screenX-fr.screenX,oa=e.screenY-fr.screenY):oa=ra=0,fr=e),ra)},movementY:function(e){return"movementY"in e?e.movementY:oa}}),Zs=Qe(ci),Cf=ae({},ci,{dataTransfer:0}),Ef=Qe(Cf),Pf=ae({},Jr,{relatedTarget:0}),ia=Qe(Pf),Tf=ae({},Xn,{animationName:0,elapsedTime:0,pseudoElement:0}),Mf=Qe(Tf),Ff=ae({},Xn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Rf=Qe(Ff),If=ae({},Xn,{data:0}),eu=Qe(If),Lf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zf={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Of={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Af(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Of[e])?!!t[e]:!1}function Nl(){return Af}var Df=ae({},Jr,{key:function(e){if(e.key){var t=Lf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Fo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?zf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nl,charCode:function(e){return e.type==="keypress"?Fo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Fo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),jf=Qe(Df),Uf=ae({},ci,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tu=Qe(Uf),Wf=ae({},Jr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nl}),Bf=Qe(Wf),Hf=ae({},Xn,{propertyName:0,elapsedTime:0,pseudoElement:0}),$f=Qe(Hf),Gf=ae({},ci,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Vf=Qe(Gf),Kf=[9,13,27,32],Cl=Mt&&"CompositionEvent"in window,Sr=null;Mt&&"documentMode"in document&&(Sr=document.documentMode);var Qf=Mt&&"TextEvent"in window&&!Sr,Sc=Mt&&(!Cl||Sr&&8<Sr&&11>=Sr),nu=String.fromCharCode(32),ru=!1;function Nc(e,t){switch(e){case"keyup":return Kf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Pn=!1;function Jf(e,t){switch(e){case"compositionend":return Cc(t);case"keypress":return t.which!==32?null:(ru=!0,nu);case"textInput":return e=t.data,e===nu&&ru?null:e;default:return null}}function Yf(e,t){if(Pn)return e==="compositionend"||!Cl&&Nc(e,t)?(e=bc(),Mo=bl=Ht=null,Pn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Sc&&t.locale!=="ko"?null:t.data;default:return null}}var Xf={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ou(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Xf[e.type]:t==="textarea"}function Ec(e,t,n,r){oc(r),t=Vo(t,"onChange"),0<t.length&&(n=new Sl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Nr=null,Ar=null;function qf(e){Dc(e,0)}function di(e){var t=Fn(e);if(Xu(t))return e}function Zf(e,t){if(e==="change")return t}var Pc=!1;Mt&&(Mt?(yo="oninput"in document,yo||(aa=document.createElement("div"),aa.setAttribute("oninput","return;"),yo=typeof aa.oninput=="function"),vo=yo):vo=!1,Pc=vo&&(!document.documentMode||9<document.documentMode));var vo,yo,aa;function iu(){Nr&&(Nr.detachEvent("onpropertychange",Tc),Ar=Nr=null)}function Tc(e){if(e.propertyName==="value"&&di(Ar)){var t=[];Ec(t,Ar,e,yl(e)),sc(qf,t)}}function eg(e,t,n){e==="focusin"?(iu(),Nr=t,Ar=n,Nr.attachEvent("onpropertychange",Tc)):e==="focusout"&&iu()}function tg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return di(Ar)}function ng(e,t){if(e==="click")return di(t)}function rg(e,t){if(e==="input"||e==="change")return di(t)}function og(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var pt=typeof Object.is=="function"?Object.is:og;function Dr(e,t){if(pt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!wa.call(t,o)||!pt(e[o],t[o]))return!1}return!0}function au(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lu(e,t){var n=au(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=au(n)}}function Mc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fc(){for(var e=window,t=jo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=jo(e.document)}return t}function El(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ig(e){var t=Fc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Mc(n.ownerDocument.documentElement,n)){if(r!==null&&El(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=lu(n,i);var a=lu(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ag=Mt&&"documentMode"in document&&11>=document.documentMode,Tn=null,ja=null,Cr=null,Ua=!1;function su(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ua||Tn==null||Tn!==jo(r)||(r=Tn,"selectionStart"in r&&El(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Cr&&Dr(Cr,r)||(Cr=r,r=Vo(ja,"onSelect"),0<r.length&&(t=new Sl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Tn)))}function xo(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Mn={animationend:xo("Animation","AnimationEnd"),animationiteration:xo("Animation","AnimationIteration"),animationstart:xo("Animation","AnimationStart"),transitionend:xo("Transition","TransitionEnd")},la={},Rc={};Mt&&(Rc=document.createElement("div").style,"AnimationEvent"in window||(delete Mn.animationend.animation,delete Mn.animationiteration.animation,delete Mn.animationstart.animation),"TransitionEvent"in window||delete Mn.transitionend.transition);function pi(e){if(la[e])return la[e];if(!Mn[e])return e;var t=Mn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Rc)return la[e]=t[n];return e}var Ic=pi("animationend"),Lc=pi("animationiteration"),zc=pi("animationstart"),Oc=pi("transitionend"),Ac=new Map,uu="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function tn(e,t){Ac.set(e,t),xn(t,[e])}for(wo=0;wo<uu.length;wo++)ko=uu[wo],cu=ko.toLowerCase(),du=ko[0].toUpperCase()+ko.slice(1),tn(cu,"on"+du);var ko,cu,du,wo;tn(Ic,"onAnimationEnd");tn(Lc,"onAnimationIteration");tn(zc,"onAnimationStart");tn("dblclick","onDoubleClick");tn("focusin","onFocus");tn("focusout","onBlur");tn(Oc,"onTransitionEnd");$n("onMouseEnter",["mouseout","mouseover"]);$n("onMouseLeave",["mouseout","mouseover"]);$n("onPointerEnter",["pointerout","pointerover"]);$n("onPointerLeave",["pointerout","pointerover"]);xn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));xn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));xn("onBeforeInput",["compositionend","keypress","textInput","paste"]);xn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));xn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));xn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),lg=new Set("cancel close invalid load scroll toggle".split(" ").concat(kr));function pu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,lf(r,t,void 0,e),e.currentTarget=null}function Dc(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var u=r[a],s=u.instance,c=u.currentTarget;if(u=u.listener,s!==i&&o.isPropagationStopped())break e;pu(o,u,c),i=s}else for(a=0;a<r.length;a++){if(u=r[a],s=u.instance,c=u.currentTarget,u=u.listener,s!==i&&o.isPropagationStopped())break e;pu(o,u,c),i=s}}}if(Wo)throw e=za,Wo=!1,za=null,e}function q(e,t){var n=t[Ga];n===void 0&&(n=t[Ga]=new Set);var r=e+"__bubble";n.has(r)||(jc(t,e,2,!1),n.add(r))}function sa(e,t,n){var r=0;t&&(r|=4),jc(n,e,r,t)}var _o="_reactListening"+Math.random().toString(36).slice(2);function jr(e){if(!e[_o]){e[_o]=!0,Vu.forEach(function(n){n!=="selectionchange"&&(lg.has(n)||sa(n,!1,e),sa(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_o]||(t[_o]=!0,sa("selectionchange",!1,t))}}function jc(e,t,n,r){switch(_c(t)){case 1:var o=bf;break;case 4:o=Sf;break;default:o=_l}n=o.bind(null,t,n,e),o=void 0,!La||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function ua(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var u=r.stateNode.containerInfo;if(u===o||u.nodeType===8&&u.parentNode===o)break;if(a===4)for(a=r.return;a!==null;){var s=a.tag;if((s===3||s===4)&&(s=a.stateNode.containerInfo,s===o||s.nodeType===8&&s.parentNode===o))return;a=a.return}for(;u!==null;){if(a=un(u),a===null)return;if(s=a.tag,s===5||s===6){r=i=a;continue e}u=u.parentNode}}r=r.return}sc(function(){var c=i,d=yl(n),g=[];e:{var m=Ac.get(e);if(m!==void 0){var v=Sl,k=e;switch(e){case"keypress":if(Fo(n)===0)break e;case"keydown":case"keyup":v=jf;break;case"focusin":k="focus",v=ia;break;case"focusout":k="blur",v=ia;break;case"beforeblur":case"afterblur":v=ia;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=Zs;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=Ef;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=Bf;break;case Ic:case Lc:case zc:v=Mf;break;case Oc:v=$f;break;case"scroll":v=Nf;break;case"wheel":v=Vf;break;case"copy":case"cut":case"paste":v=Rf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=tu}var S=(t&4)!==0,$=!S&&e==="scroll",f=S?m!==null?m+"Capture":null:m;S=[];for(var p=c,h;p!==null;){h=p;var x=h.stateNode;if(h.tag===5&&x!==null&&(h=x,f!==null&&(x=Ir(p,f),x!=null&&S.push(Ur(p,x,h)))),$)break;p=p.return}0<S.length&&(m=new v(m,k,null,n,d),g.push({event:m,listeners:S}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",m&&n!==Ra&&(k=n.relatedTarget||n.fromElement)&&(un(k)||k[Ft]))break e;if((v||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,v?(k=n.relatedTarget||n.toElement,v=c,k=k?un(k):null,k!==null&&($=wn(k),k!==$||k.tag!==5&&k.tag!==6)&&(k=null)):(v=null,k=c),v!==k)){if(S=Zs,x="onMouseLeave",f="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(S=tu,x="onPointerLeave",f="onPointerEnter",p="pointer"),$=v==null?m:Fn(v),h=k==null?m:Fn(k),m=new S(x,p+"leave",v,n,d),m.target=$,m.relatedTarget=h,x=null,un(d)===c&&(S=new S(f,p+"enter",k,n,d),S.target=h,S.relatedTarget=$,x=S),$=x,v&&k)t:{for(S=v,f=k,p=0,h=S;h;h=Nn(h))p++;for(h=0,x=f;x;x=Nn(x))h++;for(;0<p-h;)S=Nn(S),p--;for(;0<h-p;)f=Nn(f),h--;for(;p--;){if(S===f||f!==null&&S===f.alternate)break t;S=Nn(S),f=Nn(f)}S=null}else S=null;v!==null&&fu(g,m,v,S,!1),k!==null&&$!==null&&fu(g,$,k,S,!0)}}e:{if(m=c?Fn(c):window,v=m.nodeName&&m.nodeName.toLowerCase(),v==="select"||v==="input"&&m.type==="file")var E=Zf;else if(ou(m))if(Pc)E=rg;else{E=tg;var M=eg}else(v=m.nodeName)&&v.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(E=ng);if(E&&(E=E(e,c))){Ec(g,E,n,d);break e}M&&M(e,m,c),e==="focusout"&&(M=m._wrapperState)&&M.controlled&&m.type==="number"&&Ea(m,"number",m.value)}switch(M=c?Fn(c):window,e){case"focusin":(ou(M)||M.contentEditable==="true")&&(Tn=M,ja=c,Cr=null);break;case"focusout":Cr=ja=Tn=null;break;case"mousedown":Ua=!0;break;case"contextmenu":case"mouseup":case"dragend":Ua=!1,su(g,n,d);break;case"selectionchange":if(ag)break;case"keydown":case"keyup":su(g,n,d)}var F;if(Cl)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else Pn?Nc(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(Sc&&n.locale!=="ko"&&(Pn||P!=="onCompositionStart"?P==="onCompositionEnd"&&Pn&&(F=bc()):(Ht=d,bl="value"in Ht?Ht.value:Ht.textContent,Pn=!0)),M=Vo(c,P),0<M.length&&(P=new eu(P,e,null,n,d),g.push({event:P,listeners:M}),F?P.data=F:(F=Cc(n),F!==null&&(P.data=F)))),(F=Qf?Jf(e,n):Yf(e,n))&&(c=Vo(c,"onBeforeInput"),0<c.length&&(d=new eu("onBeforeInput","beforeinput",null,n,d),g.push({event:d,listeners:c}),d.data=F))}Dc(g,t)})}function Ur(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vo(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Ir(e,n),i!=null&&r.unshift(Ur(e,i,o)),i=Ir(e,t),i!=null&&r.push(Ur(e,i,o))),e=e.return}return r}function Nn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function fu(e,t,n,r,o){for(var i=t._reactName,a=[];n!==null&&n!==r;){var u=n,s=u.alternate,c=u.stateNode;if(s!==null&&s===r)break;u.tag===5&&c!==null&&(u=c,o?(s=Ir(n,i),s!=null&&a.unshift(Ur(n,s,u))):o||(s=Ir(n,i),s!=null&&a.push(Ur(n,s,u)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var sg=/\r\n?/g,ug=/\u0000|\uFFFD/g;function gu(e){return(typeof e=="string"?e:""+e).replace(sg,`
6
+ `).replace(ug,"")}function bo(e,t,n){if(t=gu(t),gu(e)!==t&&n)throw Error(_(425))}function Ko(){}var Wa=null,Ba=null;function Ha(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $a=typeof setTimeout=="function"?setTimeout:void 0,cg=typeof clearTimeout=="function"?clearTimeout:void 0,hu=typeof Promise=="function"?Promise:void 0,dg=typeof queueMicrotask=="function"?queueMicrotask:typeof hu<"u"?function(e){return hu.resolve(null).then(e).catch(pg)}:$a;function pg(e){setTimeout(function(){throw e})}function ca(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Or(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Or(t)}function Qt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function mu(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var qn=Math.random().toString(36).slice(2),yt="__reactFiber$"+qn,Wr="__reactProps$"+qn,Ft="__reactContainer$"+qn,Ga="__reactEvents$"+qn,fg="__reactListeners$"+qn,gg="__reactHandles$"+qn;function un(e){var t=e[yt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ft]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mu(e);e!==null;){if(n=e[yt])return n;e=mu(e)}return t}e=n,n=e.parentNode}return null}function Yr(e){return e=e[yt]||e[Ft],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Fn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_(33))}function fi(e){return e[Wr]||null}var Va=[],Rn=-1;function nn(e){return{current:e}}function Z(e){0>Rn||(e.current=Va[Rn],Va[Rn]=null,Rn--)}function X(e,t){Rn++,Va[Rn]=e.current,e.current=t}var en={},Pe=nn(en),Ae=nn(!1),gn=en;function Gn(e,t){var n=e.type.contextTypes;if(!n)return en;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function De(e){return e=e.childContextTypes,e!=null}function Qo(){Z(Ae),Z(Pe)}function vu(e,t,n){if(Pe.current!==en)throw Error(_(168));X(Pe,t),X(Ae,n)}function Uc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(_(108,Zp(e)||"Unknown",o));return ae({},n,r)}function Jo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||en,gn=Pe.current,X(Pe,e),X(Ae,Ae.current),!0}function yu(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=Uc(e,t,gn),r.__reactInternalMemoizedMergedChildContext=e,Z(Ae),Z(Pe),X(Pe,e)):Z(Ae),X(Ae,n)}var Ct=null,gi=!1,da=!1;function Wc(e){Ct===null?Ct=[e]:Ct.push(e)}function hg(e){gi=!0,Wc(e)}function rn(){if(!da&&Ct!==null){da=!0;var e=0,t=J;try{var n=Ct;for(J=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ct=null,gi=!1}catch(o){throw Ct!==null&&(Ct=Ct.slice(e+1)),pc(xl,rn),o}finally{J=t,da=!1}}return null}var In=[],Ln=0,Yo=null,Xo=0,Xe=[],qe=0,hn=null,Et=1,Pt="";function ln(e,t){In[Ln++]=Xo,In[Ln++]=Yo,Yo=e,Xo=t}function Bc(e,t,n){Xe[qe++]=Et,Xe[qe++]=Pt,Xe[qe++]=hn,hn=e;var r=Et;e=Pt;var o=32-ct(r)-1;r&=~(1<<o),n+=1;var i=32-ct(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Et=1<<32-ct(t)+o|n<<o|r,Pt=i+e}else Et=1<<i|n<<o|r,Pt=e}function Pl(e){e.return!==null&&(ln(e,1),Bc(e,1,0))}function Tl(e){for(;e===Yo;)Yo=In[--Ln],In[Ln]=null,Xo=In[--Ln],In[Ln]=null;for(;e===hn;)hn=Xe[--qe],Xe[qe]=null,Pt=Xe[--qe],Xe[qe]=null,Et=Xe[--qe],Xe[qe]=null}var Ve=null,Ge=null,ee=!1,ut=null;function Hc(e,t){var n=Ze(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function xu(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ve=e,Ge=Qt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ve=e,Ge=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=hn!==null?{id:Et,overflow:Pt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ze(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ve=e,Ge=null,!0):!1;default:return!1}}function Ka(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Qa(e){if(ee){var t=Ge;if(t){var n=t;if(!xu(e,t)){if(Ka(e))throw Error(_(418));t=Qt(n.nextSibling);var r=Ve;t&&xu(e,t)?Hc(r,n):(e.flags=e.flags&-4097|2,ee=!1,Ve=e)}}else{if(Ka(e))throw Error(_(418));e.flags=e.flags&-4097|2,ee=!1,Ve=e}}}function wu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ve=e}function So(e){if(e!==Ve)return!1;if(!ee)return wu(e),ee=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ha(e.type,e.memoizedProps)),t&&(t=Ge)){if(Ka(e))throw $c(),Error(_(418));for(;t;)Hc(e,t),t=Qt(t.nextSibling)}if(wu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ge=Qt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ge=null}}else Ge=Ve?Qt(e.stateNode.nextSibling):null;return!0}function $c(){for(var e=Ge;e;)e=Qt(e.nextSibling)}function Vn(){Ge=Ve=null,ee=!1}function Ml(e){ut===null?ut=[e]:ut.push(e)}var mg=Lt.ReactCurrentBatchConfig;function gr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(_(309));var r=n.stateNode}if(!r)throw Error(_(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var u=o.refs;a===null?delete u[i]:u[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(_(284));if(!n._owner)throw Error(_(290,e))}return e}function No(e,t){throw e=Object.prototype.toString.call(t),Error(_(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ku(e){var t=e._init;return t(e._payload)}function Gc(e){function t(f,p){if(e){var h=f.deletions;h===null?(f.deletions=[p],f.flags|=16):h.push(p)}}function n(f,p){if(!e)return null;for(;p!==null;)t(f,p),p=p.sibling;return null}function r(f,p){for(f=new Map;p!==null;)p.key!==null?f.set(p.key,p):f.set(p.index,p),p=p.sibling;return f}function o(f,p){return f=qt(f,p),f.index=0,f.sibling=null,f}function i(f,p,h){return f.index=h,e?(h=f.alternate,h!==null?(h=h.index,h<p?(f.flags|=2,p):h):(f.flags|=2,p)):(f.flags|=1048576,p)}function a(f){return e&&f.alternate===null&&(f.flags|=2),f}function u(f,p,h,x){return p===null||p.tag!==6?(p=ya(h,f.mode,x),p.return=f,p):(p=o(p,h),p.return=f,p)}function s(f,p,h,x){var E=h.type;return E===En?d(f,p,h.props.children,x,h.key):p!==null&&(p.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===jt&&ku(E)===p.type)?(x=o(p,h.props),x.ref=gr(f,p,h),x.return=f,x):(x=Do(h.type,h.key,h.props,null,f.mode,x),x.ref=gr(f,p,h),x.return=f,x)}function c(f,p,h,x){return p===null||p.tag!==4||p.stateNode.containerInfo!==h.containerInfo||p.stateNode.implementation!==h.implementation?(p=xa(h,f.mode,x),p.return=f,p):(p=o(p,h.children||[]),p.return=f,p)}function d(f,p,h,x,E){return p===null||p.tag!==7?(p=fn(h,f.mode,x,E),p.return=f,p):(p=o(p,h),p.return=f,p)}function g(f,p,h){if(typeof p=="string"&&p!==""||typeof p=="number")return p=ya(""+p,f.mode,h),p.return=f,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case uo:return h=Do(p.type,p.key,p.props,null,f.mode,h),h.ref=gr(f,null,p),h.return=f,h;case Cn:return p=xa(p,f.mode,h),p.return=f,p;case jt:var x=p._init;return g(f,x(p._payload),h)}if(xr(p)||cr(p))return p=fn(p,f.mode,h,null),p.return=f,p;No(f,p)}return null}function m(f,p,h,x){var E=p!==null?p.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return E!==null?null:u(f,p,""+h,x);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case uo:return h.key===E?s(f,p,h,x):null;case Cn:return h.key===E?c(f,p,h,x):null;case jt:return E=h._init,m(f,p,E(h._payload),x)}if(xr(h)||cr(h))return E!==null?null:d(f,p,h,x,null);No(f,h)}return null}function v(f,p,h,x,E){if(typeof x=="string"&&x!==""||typeof x=="number")return f=f.get(h)||null,u(p,f,""+x,E);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case uo:return f=f.get(x.key===null?h:x.key)||null,s(p,f,x,E);case Cn:return f=f.get(x.key===null?h:x.key)||null,c(p,f,x,E);case jt:var M=x._init;return v(f,p,h,M(x._payload),E)}if(xr(x)||cr(x))return f=f.get(h)||null,d(p,f,x,E,null);No(p,x)}return null}function k(f,p,h,x){for(var E=null,M=null,F=p,P=p=0,H=null;F!==null&&P<h.length;P++){F.index>P?(H=F,F=null):H=F.sibling;var U=m(f,F,h[P],x);if(U===null){F===null&&(F=H);break}e&&F&&U.alternate===null&&t(f,F),p=i(U,p,P),M===null?E=U:M.sibling=U,M=U,F=H}if(P===h.length)return n(f,F),ee&&ln(f,P),E;if(F===null){for(;P<h.length;P++)F=g(f,h[P],x),F!==null&&(p=i(F,p,P),M===null?E=F:M.sibling=F,M=F);return ee&&ln(f,P),E}for(F=r(f,F);P<h.length;P++)H=v(F,f,P,h[P],x),H!==null&&(e&&H.alternate!==null&&F.delete(H.key===null?P:H.key),p=i(H,p,P),M===null?E=H:M.sibling=H,M=H);return e&&F.forEach(function(be){return t(f,be)}),ee&&ln(f,P),E}function S(f,p,h,x){var E=cr(h);if(typeof E!="function")throw Error(_(150));if(h=E.call(h),h==null)throw Error(_(151));for(var M=E=null,F=p,P=p=0,H=null,U=h.next();F!==null&&!U.done;P++,U=h.next()){F.index>P?(H=F,F=null):H=F.sibling;var be=m(f,F,U.value,x);if(be===null){F===null&&(F=H);break}e&&F&&be.alternate===null&&t(f,F),p=i(be,p,P),M===null?E=be:M.sibling=be,M=be,F=H}if(U.done)return n(f,F),ee&&ln(f,P),E;if(F===null){for(;!U.done;P++,U=h.next())U=g(f,U.value,x),U!==null&&(p=i(U,p,P),M===null?E=U:M.sibling=U,M=U);return ee&&ln(f,P),E}for(F=r(f,F);!U.done;P++,U=h.next())U=v(F,f,P,U.value,x),U!==null&&(e&&U.alternate!==null&&F.delete(U.key===null?P:U.key),p=i(U,p,P),M===null?E=U:M.sibling=U,M=U);return e&&F.forEach(function(on){return t(f,on)}),ee&&ln(f,P),E}function $(f,p,h,x){if(typeof h=="object"&&h!==null&&h.type===En&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case uo:e:{for(var E=h.key,M=p;M!==null;){if(M.key===E){if(E=h.type,E===En){if(M.tag===7){n(f,M.sibling),p=o(M,h.props.children),p.return=f,f=p;break e}}else if(M.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===jt&&ku(E)===M.type){n(f,M.sibling),p=o(M,h.props),p.ref=gr(f,M,h),p.return=f,f=p;break e}n(f,M);break}else t(f,M);M=M.sibling}h.type===En?(p=fn(h.props.children,f.mode,x,h.key),p.return=f,f=p):(x=Do(h.type,h.key,h.props,null,f.mode,x),x.ref=gr(f,p,h),x.return=f,f=x)}return a(f);case Cn:e:{for(M=h.key;p!==null;){if(p.key===M)if(p.tag===4&&p.stateNode.containerInfo===h.containerInfo&&p.stateNode.implementation===h.implementation){n(f,p.sibling),p=o(p,h.children||[]),p.return=f,f=p;break e}else{n(f,p);break}else t(f,p);p=p.sibling}p=xa(h,f.mode,x),p.return=f,f=p}return a(f);case jt:return M=h._init,$(f,p,M(h._payload),x)}if(xr(h))return k(f,p,h,x);if(cr(h))return S(f,p,h,x);No(f,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,p!==null&&p.tag===6?(n(f,p.sibling),p=o(p,h),p.return=f,f=p):(n(f,p),p=ya(h,f.mode,x),p.return=f,f=p),a(f)):n(f,p)}return $}var Kn=Gc(!0),Vc=Gc(!1),qo=nn(null),Zo=null,zn=null,Fl=null;function Rl(){Fl=zn=Zo=null}function Il(e){var t=qo.current;Z(qo),e._currentValue=t}function Ja(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Bn(e,t){Zo=e,Fl=zn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Oe=!0),e.firstContext=null)}function tt(e){var t=e._currentValue;if(Fl!==e)if(e={context:e,memoizedValue:t,next:null},zn===null){if(Zo===null)throw Error(_(308));zn=e,Zo.dependencies={lanes:0,firstContext:e}}else zn=zn.next=e;return t}var cn=null;function Ll(e){cn===null?cn=[e]:cn.push(e)}function Kc(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Ll(t)):(n.next=o.next,o.next=n),t.interleaved=n,Rt(e,r)}function Rt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ut=!1;function zl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Tt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,V&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Rt(e,n)}return o=r.interleaved,o===null?(t.next=t,Ll(r)):(t.next=o.next,o.next=t),r.interleaved=t,Rt(e,n)}function Ro(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wl(e,n)}}function _u(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ei(e,t,n,r){var o=e.updateQueue;Ut=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,u=o.shared.pending;if(u!==null){o.shared.pending=null;var s=u,c=s.next;s.next=null,a===null?i=c:a.next=c,a=s;var d=e.alternate;d!==null&&(d=d.updateQueue,u=d.lastBaseUpdate,u!==a&&(u===null?d.firstBaseUpdate=c:u.next=c,d.lastBaseUpdate=s))}if(i!==null){var g=o.baseState;a=0,d=c=s=null,u=i;do{var m=u.lane,v=u.eventTime;if((r&m)===m){d!==null&&(d=d.next={eventTime:v,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var k=e,S=u;switch(m=t,v=n,S.tag){case 1:if(k=S.payload,typeof k=="function"){g=k.call(v,g,m);break e}g=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=S.payload,m=typeof k=="function"?k.call(v,g,m):k,m==null)break e;g=ae({},g,m);break e;case 2:Ut=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,m=o.effects,m===null?o.effects=[u]:m.push(u))}else v={eventTime:v,lane:m,tag:u.tag,payload:u.payload,callback:u.callback,next:null},d===null?(c=d=v,s=g):d=d.next=v,a|=m;if(u=u.next,u===null){if(u=o.shared.pending,u===null)break;m=u,u=m.next,m.next=null,o.lastBaseUpdate=m,o.shared.pending=null}}while(1);if(d===null&&(s=g),o.baseState=s,o.firstBaseUpdate=c,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);vn|=a,e.lanes=a,e.memoizedState=g}}function bu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(_(191,o));o.call(r)}}}var Xr={},wt=nn(Xr),Br=nn(Xr),Hr=nn(Xr);function dn(e){if(e===Xr)throw Error(_(174));return e}function Ol(e,t){switch(X(Hr,t),X(Br,e),X(wt,Xr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ta(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ta(t,e)}Z(wt),X(wt,t)}function Qn(){Z(wt),Z(Br),Z(Hr)}function Jc(e){dn(Hr.current);var t=dn(wt.current),n=Ta(t,e.type);t!==n&&(X(Br,e),X(wt,n))}function Al(e){Br.current===e&&(Z(wt),Z(Br))}var oe=nn(0);function ti(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var pa=[];function Dl(){for(var e=0;e<pa.length;e++)pa[e]._workInProgressVersionPrimary=null;pa.length=0}var Io=Lt.ReactCurrentDispatcher,fa=Lt.ReactCurrentBatchConfig,mn=0,ie=null,ge=null,me=null,ni=!1,Er=!1,$r=0,vg=0;function Ne(){throw Error(_(321))}function jl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!pt(e[n],t[n]))return!1;return!0}function Ul(e,t,n,r,o,i){if(mn=i,ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Io.current=e===null||e.memoizedState===null?kg:_g,e=n(r,o),Er){i=0;do{if(Er=!1,$r=0,25<=i)throw Error(_(301));i+=1,me=ge=null,t.updateQueue=null,Io.current=bg,e=n(r,o)}while(Er)}if(Io.current=ri,t=ge!==null&&ge.next!==null,mn=0,me=ge=ie=null,ni=!1,t)throw Error(_(300));return e}function Wl(){var e=$r!==0;return $r=0,e}function vt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return me===null?ie.memoizedState=me=e:me=me.next=e,me}function nt(){if(ge===null){var e=ie.alternate;e=e!==null?e.memoizedState:null}else e=ge.next;var t=me===null?ie.memoizedState:me.next;if(t!==null)me=t,ge=e;else{if(e===null)throw Error(_(310));ge=e,e={memoizedState:ge.memoizedState,baseState:ge.baseState,baseQueue:ge.baseQueue,queue:ge.queue,next:null},me===null?ie.memoizedState=me=e:me=me.next=e}return me}function Gr(e,t){return typeof t=="function"?t(e):t}function ga(e){var t=nt(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=ge,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var a=o.next;o.next=i.next,i.next=a}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var u=a=null,s=null,c=i;do{var d=c.lane;if((mn&d)===d)s!==null&&(s=s.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var g={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};s===null?(u=s=g,a=r):s=s.next=g,ie.lanes|=d,vn|=d}c=c.next}while(c!==null&&c!==i);s===null?a=r:s.next=u,pt(r,t.memoizedState)||(Oe=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=s,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,ie.lanes|=i,vn|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ha(e){var t=nt(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var a=o=o.next;do i=e(i,a.action),a=a.next;while(a!==o);pt(i,t.memoizedState)||(Oe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Yc(){}function Xc(e,t){var n=ie,r=nt(),o=t(),i=!pt(r.memoizedState,o);if(i&&(r.memoizedState=o,Oe=!0),r=r.queue,Bl(ed.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||me!==null&&me.memoizedState.tag&1){if(n.flags|=2048,Vr(9,Zc.bind(null,n,r,o,t),void 0,null),ve===null)throw Error(_(349));mn&30||qc(n,t,o)}return o}function qc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ie.updateQueue,t===null?(t={lastEffect:null,stores:null},ie.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Zc(e,t,n,r){t.value=n,t.getSnapshot=r,td(t)&&nd(e)}function ed(e,t,n){return n(function(){td(t)&&nd(e)})}function td(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!pt(e,n)}catch{return!0}}function nd(e){var t=Rt(e,1);t!==null&&dt(t,e,1,-1)}function Su(e){var t=vt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Gr,lastRenderedState:e},t.queue=e,e=e.dispatch=wg.bind(null,ie,e),[t.memoizedState,e]}function Vr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ie.updateQueue,t===null?(t={lastEffect:null,stores:null},ie.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function rd(){return nt().memoizedState}function Lo(e,t,n,r){var o=vt();ie.flags|=e,o.memoizedState=Vr(1|t,n,void 0,r===void 0?null:r)}function hi(e,t,n,r){var o=nt();r=r===void 0?null:r;var i=void 0;if(ge!==null){var a=ge.memoizedState;if(i=a.destroy,r!==null&&jl(r,a.deps)){o.memoizedState=Vr(t,n,i,r);return}}ie.flags|=e,o.memoizedState=Vr(1|t,n,i,r)}function Nu(e,t){return Lo(8390656,8,e,t)}function Bl(e,t){return hi(2048,8,e,t)}function od(e,t){return hi(4,2,e,t)}function id(e,t){return hi(4,4,e,t)}function ad(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ld(e,t,n){return n=n!=null?n.concat([e]):null,hi(4,4,ad.bind(null,t,e),n)}function Hl(){}function sd(e,t){var n=nt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&jl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ud(e,t){var n=nt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&jl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function cd(e,t,n){return mn&21?(pt(n,t)||(n=hc(),ie.lanes|=n,vn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Oe=!0),e.memoizedState=n)}function yg(e,t){var n=J;J=n!==0&&4>n?n:4,e(!0);var r=fa.transition;fa.transition={};try{e(!1),t()}finally{J=n,fa.transition=r}}function dd(){return nt().memoizedState}function xg(e,t,n){var r=Xt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},pd(e))fd(t,n);else if(n=Kc(e,t,n,r),n!==null){var o=Ie();dt(n,e,r,o),gd(n,t,r)}}function wg(e,t,n){var r=Xt(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(pd(e))fd(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,u=i(a,n);if(o.hasEagerState=!0,o.eagerState=u,pt(u,a)){var s=t.interleaved;s===null?(o.next=o,Ll(t)):(o.next=s.next,s.next=o),t.interleaved=o;return}}catch{}finally{}n=Kc(e,t,o,r),n!==null&&(o=Ie(),dt(n,e,r,o),gd(n,t,r))}}function pd(e){var t=e.alternate;return e===ie||t!==null&&t===ie}function fd(e,t){Er=ni=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wl(e,n)}}var ri={readContext:tt,useCallback:Ne,useContext:Ne,useEffect:Ne,useImperativeHandle:Ne,useInsertionEffect:Ne,useLayoutEffect:Ne,useMemo:Ne,useReducer:Ne,useRef:Ne,useState:Ne,useDebugValue:Ne,useDeferredValue:Ne,useTransition:Ne,useMutableSource:Ne,useSyncExternalStore:Ne,useId:Ne,unstable_isNewReconciler:!1},kg={readContext:tt,useCallback:function(e,t){return vt().memoizedState=[e,t===void 0?null:t],e},useContext:tt,useEffect:Nu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Lo(4194308,4,ad.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Lo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Lo(4,2,e,t)},useMemo:function(e,t){var n=vt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=vt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=xg.bind(null,ie,e),[r.memoizedState,e]},useRef:function(e){var t=vt();return e={current:e},t.memoizedState=e},useState:Su,useDebugValue:Hl,useDeferredValue:function(e){return vt().memoizedState=e},useTransition:function(){var e=Su(!1),t=e[0];return e=yg.bind(null,e[1]),vt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ie,o=vt();if(ee){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),ve===null)throw Error(_(349));mn&30||qc(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Nu(ed.bind(null,r,i,e),[e]),r.flags|=2048,Vr(9,Zc.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=vt(),t=ve.identifierPrefix;if(ee){var n=Pt,r=Et;n=(r&~(1<<32-ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=$r++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=vg++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},_g={readContext:tt,useCallback:sd,useContext:tt,useEffect:Bl,useImperativeHandle:ld,useInsertionEffect:od,useLayoutEffect:id,useMemo:ud,useReducer:ga,useRef:rd,useState:function(){return ga(Gr)},useDebugValue:Hl,useDeferredValue:function(e){var t=nt();return cd(t,ge.memoizedState,e)},useTransition:function(){var e=ga(Gr)[0],t=nt().memoizedState;return[e,t]},useMutableSource:Yc,useSyncExternalStore:Xc,useId:dd,unstable_isNewReconciler:!1},bg={readContext:tt,useCallback:sd,useContext:tt,useEffect:Bl,useImperativeHandle:ld,useInsertionEffect:od,useLayoutEffect:id,useMemo:ud,useReducer:ha,useRef:rd,useState:function(){return ha(Gr)},useDebugValue:Hl,useDeferredValue:function(e){var t=nt();return ge===null?t.memoizedState=e:cd(t,ge.memoizedState,e)},useTransition:function(){var e=ha(Gr)[0],t=nt().memoizedState;return[e,t]},useMutableSource:Yc,useSyncExternalStore:Xc,useId:dd,unstable_isNewReconciler:!1};function lt(e,t){if(e&&e.defaultProps){t=ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ya(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var mi={isMounted:function(e){return(e=e._reactInternals)?wn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ie(),o=Xt(e),i=Tt(r,o);i.payload=t,n!=null&&(i.callback=n),t=Jt(e,i,o),t!==null&&(dt(t,e,o,r),Ro(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ie(),o=Xt(e),i=Tt(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Jt(e,i,o),t!==null&&(dt(t,e,o,r),Ro(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ie(),r=Xt(e),o=Tt(n,r);o.tag=2,t!=null&&(o.callback=t),t=Jt(e,o,r),t!==null&&(dt(t,e,r,n),Ro(t,e,r))}};function Cu(e,t,n,r,o,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!Dr(n,r)||!Dr(o,i):!0}function hd(e,t,n){var r=!1,o=en,i=t.contextType;return typeof i=="object"&&i!==null?i=tt(i):(o=De(t)?gn:Pe.current,r=t.contextTypes,i=(r=r!=null)?Gn(e,o):en),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=mi,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Eu(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&mi.enqueueReplaceState(t,t.state,null)}function Xa(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},zl(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=tt(i):(i=De(t)?gn:Pe.current,o.context=Gn(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Ya(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&mi.enqueueReplaceState(o,o.state,null),ei(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Jn(e,t){try{var n="",r=t;do n+=qp(r),r=r.return;while(r);var o=n}catch(i){o=`
7
+ Error generating stack: `+i.message+`
8
+ `+i.stack}return{value:e,source:t,stack:o,digest:null}}function ma(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function qa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Sg=typeof WeakMap=="function"?WeakMap:Map;function md(e,t,n){n=Tt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ii||(ii=!0,sl=r),qa(e,t)},n}function vd(e,t,n){n=Tt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){qa(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){qa(e,t),typeof r!="function"&&(Yt===null?Yt=new Set([this]):Yt.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Pu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Sg;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Dg.bind(null,e,t,n),t.then(e,e))}function Tu(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Mu(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Tt(-1,1),t.tag=2,Jt(n,t,1))),n.lanes|=1),e)}var Ng=Lt.ReactCurrentOwner,Oe=!1;function Re(e,t,n,r){t.child=e===null?Vc(t,null,n,r):Kn(t,e.child,n,r)}function Fu(e,t,n,r,o){n=n.render;var i=t.ref;return Bn(t,o),r=Ul(e,t,n,r,i,o),n=Wl(),e!==null&&!Oe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,It(e,t,o)):(ee&&n&&Pl(t),t.flags|=1,Re(e,t,r,o),t.child)}function Ru(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Xl(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,yd(e,t,i,r,o)):(e=Do(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Dr,n(a,r)&&e.ref===t.ref)return It(e,t,o)}return t.flags|=1,e=qt(i,r),e.ref=t.ref,e.return=t,t.child=e}function yd(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Dr(i,r)&&e.ref===t.ref)if(Oe=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Oe=!0);else return t.lanes=e.lanes,It(e,t,o)}return Za(e,t,n,r,o)}function xd(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},X(An,$e),$e|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,X(An,$e),$e|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,X(An,$e),$e|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,X(An,$e),$e|=r;return Re(e,t,o,n),t.child}function wd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Za(e,t,n,r,o){var i=De(n)?gn:Pe.current;return i=Gn(t,i),Bn(t,o),n=Ul(e,t,n,r,i,o),r=Wl(),e!==null&&!Oe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,It(e,t,o)):(ee&&r&&Pl(t),t.flags|=1,Re(e,t,n,o),t.child)}function Iu(e,t,n,r,o){if(De(n)){var i=!0;Jo(t)}else i=!1;if(Bn(t,o),t.stateNode===null)zo(e,t),hd(t,n,r),Xa(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,u=t.memoizedProps;a.props=u;var s=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=tt(c):(c=De(n)?gn:Pe.current,c=Gn(t,c));var d=n.getDerivedStateFromProps,g=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";g||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==r||s!==c)&&Eu(t,a,r,c),Ut=!1;var m=t.memoizedState;a.state=m,ei(t,r,a,o),s=t.memoizedState,u!==r||m!==s||Ae.current||Ut?(typeof d=="function"&&(Ya(t,n,d,r),s=t.memoizedState),(u=Ut||Cu(t,n,u,r,m,s,c))?(g||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=c,r=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Qc(e,t),u=t.memoizedProps,c=t.type===t.elementType?u:lt(t.type,u),a.props=c,g=t.pendingProps,m=a.context,s=n.contextType,typeof s=="object"&&s!==null?s=tt(s):(s=De(n)?gn:Pe.current,s=Gn(t,s));var v=n.getDerivedStateFromProps;(d=typeof v=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==g||m!==s)&&Eu(t,a,r,s),Ut=!1,m=t.memoizedState,a.state=m,ei(t,r,a,o);var k=t.memoizedState;u!==g||m!==k||Ae.current||Ut?(typeof v=="function"&&(Ya(t,n,v,r),k=t.memoizedState),(c=Ut||Cu(t,n,c,r,m,k,s)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,k,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,k,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=k),a.props=r,a.state=k,a.context=s,r=c):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return el(e,t,n,r,i,o)}function el(e,t,n,r,o,i){wd(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&yu(t,n,!1),It(e,t,i);r=t.stateNode,Ng.current=t;var u=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Kn(t,e.child,null,i),t.child=Kn(t,null,u,i)):Re(e,t,u,i),t.memoizedState=r.state,o&&yu(t,n,!0),t.child}function kd(e){var t=e.stateNode;t.pendingContext?vu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&vu(e,t.context,!1),Ol(e,t.containerInfo)}function Lu(e,t,n,r,o){return Vn(),Ml(o),t.flags|=256,Re(e,t,n,r),t.child}var tl={dehydrated:null,treeContext:null,retryLane:0};function nl(e){return{baseLanes:e,cachePool:null,transitions:null}}function _d(e,t,n){var r=t.pendingProps,o=oe.current,i=!1,a=(t.flags&128)!==0,u;if((u=a)||(u=e!==null&&e.memoizedState===null?!1:(o&2)!==0),u?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),X(oe,o&1),e===null)return Qa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=xi(a,r,0,null),e=fn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=nl(n),t.memoizedState=tl,e):$l(t,a));if(o=e.memoizedState,o!==null&&(u=o.dehydrated,u!==null))return Cg(e,t,a,r,u,o,n);if(i){i=r.fallback,a=t.mode,o=e.child,u=o.sibling;var s={mode:"hidden",children:r.children};return!(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=s,t.deletions=null):(r=qt(o,s),r.subtreeFlags=o.subtreeFlags&14680064),u!==null?i=qt(u,i):(i=fn(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?nl(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=tl,r}return i=e.child,e=i.sibling,r=qt(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function $l(e,t){return t=xi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Co(e,t,n,r){return r!==null&&Ml(r),Kn(t,e.child,null,n),e=$l(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cg(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=ma(Error(_(422))),Co(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=xi({mode:"visible",children:r.children},o,0,null),i=fn(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Kn(t,e.child,null,a),t.child.memoizedState=nl(a),t.memoizedState=tl,i);if(!(t.mode&1))return Co(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var u=r.dgst;return r=u,i=Error(_(419)),r=ma(i,r,void 0),Co(e,t,a,r)}if(u=(a&e.childLanes)!==0,Oe||u){if(r=ve,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|a)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Rt(e,o),dt(r,e,o,-1))}return Yl(),r=ma(Error(_(421))),Co(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=jg.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Ge=Qt(o.nextSibling),Ve=t,ee=!0,ut=null,e!==null&&(Xe[qe++]=Et,Xe[qe++]=Pt,Xe[qe++]=hn,Et=e.id,Pt=e.overflow,hn=t),t=$l(t,r.children),t.flags|=4096,t)}function zu(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ja(e.return,t,n)}function va(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function bd(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Re(e,t,r.children,n),r=oe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zu(e,n,t);else if(e.tag===19)zu(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(X(oe,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&ti(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),va(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&ti(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}va(t,!0,n,null,i);break;case"together":va(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function zo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function It(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=qt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=qt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Eg(e,t,n){switch(t.tag){case 3:kd(t),Vn();break;case 5:Jc(t);break;case 1:De(t.type)&&Jo(t);break;case 4:Ol(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;X(qo,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(X(oe,oe.current&1),t.flags|=128,null):n&t.child.childLanes?_d(e,t,n):(X(oe,oe.current&1),e=It(e,t,n),e!==null?e.sibling:null);X(oe,oe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return bd(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),X(oe,oe.current),r)break;return null;case 22:case 23:return t.lanes=0,xd(e,t,n)}return It(e,t,n)}var Sd,rl,Nd,Cd;Sd=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};rl=function(){};Nd=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,dn(wt.current);var i=null;switch(n){case"input":o=Na(e,o),r=Na(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=Pa(e,o),r=Pa(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ko)}Ma(n,r);var a;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var u=o[c];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Fr.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var s=r[c];if(u=o?.[c],r.hasOwnProperty(c)&&s!==u&&(s!=null||u!=null))if(c==="style")if(u){for(a in u)!u.hasOwnProperty(a)||s&&s.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in s)s.hasOwnProperty(a)&&u[a]!==s[a]&&(n||(n={}),n[a]=s[a])}else n||(i||(i=[]),i.push(c,n)),n=s;else c==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,u=u?u.__html:void 0,s!=null&&u!==s&&(i=i||[]).push(c,s)):c==="children"?typeof s!="string"&&typeof s!="number"||(i=i||[]).push(c,""+s):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Fr.hasOwnProperty(c)?(s!=null&&c==="onScroll"&&q("scroll",e),i||u===s||(i=[])):(i=i||[]).push(c,s))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Cd=function(e,t,n,r){n!==r&&(t.flags|=4)};function hr(e,t){if(!ee)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ce(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Pg(e,t,n){var r=t.pendingProps;switch(Tl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(t),null;case 1:return De(t.type)&&Qo(),Ce(t),null;case 3:return r=t.stateNode,Qn(),Z(Ae),Z(Pe),Dl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(So(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ut!==null&&(dl(ut),ut=null))),rl(e,t),Ce(t),null;case 5:Al(t);var o=dn(Hr.current);if(n=t.type,e!==null&&t.stateNode!=null)Nd(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_(166));return Ce(t),null}if(e=dn(wt.current),So(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[yt]=t,r[Wr]=i,e=(t.mode&1)!==0,n){case"dialog":q("cancel",r),q("close",r);break;case"iframe":case"object":case"embed":q("load",r);break;case"video":case"audio":for(o=0;o<kr.length;o++)q(kr[o],r);break;case"source":q("error",r);break;case"img":case"image":case"link":q("error",r),q("load",r);break;case"details":q("toggle",r);break;case"input":Hs(r,i),q("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},q("invalid",r);break;case"textarea":Gs(r,i),q("invalid",r)}Ma(n,i),o=null;for(var a in i)if(i.hasOwnProperty(a)){var u=i[a];a==="children"?typeof u=="string"?r.textContent!==u&&(i.suppressHydrationWarning!==!0&&bo(r.textContent,u,e),o=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(i.suppressHydrationWarning!==!0&&bo(r.textContent,u,e),o=["children",""+u]):Fr.hasOwnProperty(a)&&u!=null&&a==="onScroll"&&q("scroll",r)}switch(n){case"input":co(r),$s(r,i,!0);break;case"textarea":co(r),Vs(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Ko)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ec(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[yt]=t,e[Wr]=r,Sd(e,t,!1,!1),t.stateNode=e;e:{switch(a=Fa(n,r),n){case"dialog":q("cancel",e),q("close",e),o=r;break;case"iframe":case"object":case"embed":q("load",e),o=r;break;case"video":case"audio":for(o=0;o<kr.length;o++)q(kr[o],e);o=r;break;case"source":q("error",e),o=r;break;case"img":case"image":case"link":q("error",e),q("load",e),o=r;break;case"details":q("toggle",e),o=r;break;case"input":Hs(e,r),o=Na(e,r),q("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),q("invalid",e);break;case"textarea":Gs(e,r),o=Pa(e,r),q("invalid",e);break;default:o=r}Ma(n,o),u=o;for(i in u)if(u.hasOwnProperty(i)){var s=u[i];i==="style"?rc(e,s):i==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,s!=null&&tc(e,s)):i==="children"?typeof s=="string"?(n!=="textarea"||s!=="")&&Rr(e,s):typeof s=="number"&&Rr(e,""+s):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Fr.hasOwnProperty(i)?s!=null&&i==="onScroll"&&q("scroll",e):s!=null&&gl(e,i,s,a))}switch(n){case"input":co(e),$s(e,r,!1);break;case"textarea":co(e),Vs(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Zt(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Dn(e,!!r.multiple,i,!1):r.defaultValue!=null&&Dn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Ko)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ce(t),null;case 6:if(e&&t.stateNode!=null)Cd(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(_(166));if(n=dn(Hr.current),dn(wt.current),So(t)){if(r=t.stateNode,n=t.memoizedProps,r[yt]=t,(i=r.nodeValue!==n)&&(e=Ve,e!==null))switch(e.tag){case 3:bo(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&bo(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[yt]=t,t.stateNode=r}return Ce(t),null;case 13:if(Z(oe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ee&&Ge!==null&&t.mode&1&&!(t.flags&128))$c(),Vn(),t.flags|=98560,i=!1;else if(i=So(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(_(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(_(317));i[yt]=t}else Vn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ce(t),i=!1}else ut!==null&&(dl(ut),ut=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||oe.current&1?he===0&&(he=3):Yl())),t.updateQueue!==null&&(t.flags|=4),Ce(t),null);case 4:return Qn(),rl(e,t),e===null&&jr(t.stateNode.containerInfo),Ce(t),null;case 10:return Il(t.type._context),Ce(t),null;case 17:return De(t.type)&&Qo(),Ce(t),null;case 19:if(Z(oe),i=t.memoizedState,i===null)return Ce(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)hr(i,!1);else{if(he!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=ti(e),a!==null){for(t.flags|=128,hr(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return X(oe,oe.current&1|2),t.child}e=e.sibling}i.tail!==null&&ce()>Yn&&(t.flags|=128,r=!0,hr(i,!1),t.lanes=4194304)}else{if(!r)if(e=ti(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),hr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!ee)return Ce(t),null}else 2*ce()-i.renderingStartTime>Yn&&n!==1073741824&&(t.flags|=128,r=!0,hr(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ce(),t.sibling=null,n=oe.current,X(oe,r?n&1|2:n&1),t):(Ce(t),null);case 22:case 23:return Jl(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?$e&1073741824&&(Ce(t),t.subtreeFlags&6&&(t.flags|=8192)):Ce(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function Tg(e,t){switch(Tl(t),t.tag){case 1:return De(t.type)&&Qo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qn(),Z(Ae),Z(Pe),Dl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Al(t),null;case 13:if(Z(oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));Vn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Z(oe),null;case 4:return Qn(),null;case 10:return Il(t.type._context),null;case 22:case 23:return Jl(),null;case 24:return null;default:return null}}var Eo=!1,Ee=!1,Mg=typeof WeakSet=="function"?WeakSet:Set,T=null;function On(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){le(e,t,r)}else n.current=null}function ol(e,t,n){try{n()}catch(r){le(e,t,r)}}var Ou=!1;function Fg(e,t){if(Wa=$o,e=Fc(),El(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,u=-1,s=-1,c=0,d=0,g=e,m=null;t:for(;;){for(var v;g!==n||o!==0&&g.nodeType!==3||(u=a+o),g!==i||r!==0&&g.nodeType!==3||(s=a+r),g.nodeType===3&&(a+=g.nodeValue.length),(v=g.firstChild)!==null;)m=g,g=v;for(;;){if(g===e)break t;if(m===n&&++c===o&&(u=a),m===i&&++d===r&&(s=a),(v=g.nextSibling)!==null)break;g=m,m=g.parentNode}g=v}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ba={focusedElem:e,selectionRange:n},$o=!1,T=t;T!==null;)if(t=T,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,T=e;else for(;T!==null;){t=T;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var S=k.memoizedProps,$=k.memoizedState,f=t.stateNode,p=f.getSnapshotBeforeUpdate(t.elementType===t.type?S:lt(t.type,S),$);f.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(x){le(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,T=e;break}T=t.return}return k=Ou,Ou=!1,k}function Pr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&ol(t,n,i)}o=o.next}while(o!==r)}}function vi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ed(e){var t=e.alternate;t!==null&&(e.alternate=null,Ed(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yt],delete t[Wr],delete t[Ga],delete t[fg],delete t[gg])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Pd(e){return e.tag===5||e.tag===3||e.tag===4}function Au(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ko));else if(r!==4&&(e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}function ll(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(ll(e,t,n),e=e.sibling;e!==null;)ll(e,t,n),e=e.sibling}var xe=null,st=!1;function Dt(e,t,n){for(n=n.child;n!==null;)Td(e,t,n),n=n.sibling}function Td(e,t,n){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(ui,n)}catch{}switch(n.tag){case 5:Ee||On(n,t);case 6:var r=xe,o=st;xe=null,Dt(e,t,n),xe=r,st=o,xe!==null&&(st?(e=xe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):xe.removeChild(n.stateNode));break;case 18:xe!==null&&(st?(e=xe,n=n.stateNode,e.nodeType===8?ca(e.parentNode,n):e.nodeType===1&&ca(e,n),Or(e)):ca(xe,n.stateNode));break;case 4:r=xe,o=st,xe=n.stateNode.containerInfo,st=!0,Dt(e,t,n),xe=r,st=o;break;case 0:case 11:case 14:case 15:if(!Ee&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&ol(n,t,a),o=o.next}while(o!==r)}Dt(e,t,n);break;case 1:if(!Ee&&(On(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){le(n,t,u)}Dt(e,t,n);break;case 21:Dt(e,t,n);break;case 22:n.mode&1?(Ee=(r=Ee)||n.memoizedState!==null,Dt(e,t,n),Ee=r):Dt(e,t,n);break;default:Dt(e,t,n)}}function Du(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Mg),t.forEach(function(r){var o=Ug.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function at(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,a=t,u=a;e:for(;u!==null;){switch(u.tag){case 5:xe=u.stateNode,st=!1;break e;case 3:xe=u.stateNode.containerInfo,st=!0;break e;case 4:xe=u.stateNode.containerInfo,st=!0;break e}u=u.return}if(xe===null)throw Error(_(160));Td(i,a,o),xe=null,st=!1;var s=o.alternate;s!==null&&(s.return=null),o.return=null}catch(c){le(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Md(t,e),t=t.sibling}function Md(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(at(t,e),mt(e),r&4){try{Pr(3,e,e.return),vi(3,e)}catch(S){le(e,e.return,S)}try{Pr(5,e,e.return)}catch(S){le(e,e.return,S)}}break;case 1:at(t,e),mt(e),r&512&&n!==null&&On(n,n.return);break;case 5:if(at(t,e),mt(e),r&512&&n!==null&&On(n,n.return),e.flags&32){var o=e.stateNode;try{Rr(o,"")}catch(S){le(e,e.return,S)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,u=e.type,s=e.updateQueue;if(e.updateQueue=null,s!==null)try{u==="input"&&i.type==="radio"&&i.name!=null&&qu(o,i),Fa(u,a);var c=Fa(u,i);for(a=0;a<s.length;a+=2){var d=s[a],g=s[a+1];d==="style"?rc(o,g):d==="dangerouslySetInnerHTML"?tc(o,g):d==="children"?Rr(o,g):gl(o,d,g,c)}switch(u){case"input":Ca(o,i);break;case"textarea":Zu(o,i);break;case"select":var m=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var v=i.value;v!=null?Dn(o,!!i.multiple,v,!1):m!==!!i.multiple&&(i.defaultValue!=null?Dn(o,!!i.multiple,i.defaultValue,!0):Dn(o,!!i.multiple,i.multiple?[]:"",!1))}o[Wr]=i}catch(S){le(e,e.return,S)}}break;case 6:if(at(t,e),mt(e),r&4){if(e.stateNode===null)throw Error(_(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(S){le(e,e.return,S)}}break;case 3:if(at(t,e),mt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Or(t.containerInfo)}catch(S){le(e,e.return,S)}break;case 4:at(t,e),mt(e);break;case 13:at(t,e),mt(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Kl=ce())),r&4&&Du(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Ee=(c=Ee)||d,at(t,e),Ee=c):at(t,e),mt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(T=e,d=e.child;d!==null;){for(g=T=d;T!==null;){switch(m=T,v=m.child,m.tag){case 0:case 11:case 14:case 15:Pr(4,m,m.return);break;case 1:On(m,m.return);var k=m.stateNode;if(typeof k.componentWillUnmount=="function"){r=m,n=m.return;try{t=r,k.props=t.memoizedProps,k.state=t.memoizedState,k.componentWillUnmount()}catch(S){le(r,n,S)}}break;case 5:On(m,m.return);break;case 22:if(m.memoizedState!==null){Uu(g);continue}}v!==null?(v.return=m,T=v):Uu(g)}d=d.sibling}e:for(d=null,g=e;;){if(g.tag===5){if(d===null){d=g;try{o=g.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(u=g.stateNode,s=g.memoizedProps.style,a=s!=null&&s.hasOwnProperty("display")?s.display:null,u.style.display=nc("display",a))}catch(S){le(e,e.return,S)}}}else if(g.tag===6){if(d===null)try{g.stateNode.nodeValue=c?"":g.memoizedProps}catch(S){le(e,e.return,S)}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===e)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===e)break e;for(;g.sibling===null;){if(g.return===null||g.return===e)break e;d===g&&(d=null),g=g.return}d===g&&(d=null),g.sibling.return=g.return,g=g.sibling}}break;case 19:at(t,e),mt(e),r&4&&Du(e);break;case 21:break;default:at(t,e),mt(e)}}function mt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Pd(n)){var r=n;break e}n=n.return}throw Error(_(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Rr(o,""),r.flags&=-33);var i=Au(e);ll(e,i,o);break;case 3:case 4:var a=r.stateNode.containerInfo,u=Au(e);al(e,u,a);break;default:throw Error(_(161))}}catch(s){le(e,e.return,s)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Rg(e,t,n){T=e,Fd(e,t,n)}function Fd(e,t,n){for(var r=(e.mode&1)!==0;T!==null;){var o=T,i=o.child;if(o.tag===22&&r){var a=o.memoizedState!==null||Eo;if(!a){var u=o.alternate,s=u!==null&&u.memoizedState!==null||Ee;u=Eo;var c=Ee;if(Eo=a,(Ee=s)&&!c)for(T=o;T!==null;)a=T,s=a.child,a.tag===22&&a.memoizedState!==null?Wu(o):s!==null?(s.return=a,T=s):Wu(o);for(;i!==null;)T=i,Fd(i,t,n),i=i.sibling;T=o,Eo=u,Ee=c}ju(e,t,n)}else o.subtreeFlags&8772&&i!==null?(i.return=o,T=i):ju(e,t,n)}}function ju(e){for(;T!==null;){var t=T;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ee||vi(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ee)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:lt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&bu(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}bu(t,a,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var s=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":s.autoFocus&&n.focus();break;case"img":s.src&&(n.src=s.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var g=d.dehydrated;g!==null&&Or(g)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(_(163))}Ee||t.flags&512&&il(t)}catch(m){le(t,t.return,m)}}if(t===e){T=null;break}if(n=t.sibling,n!==null){n.return=t.return,T=n;break}T=t.return}}function Uu(e){for(;T!==null;){var t=T;if(t===e){T=null;break}var n=t.sibling;if(n!==null){n.return=t.return,T=n;break}T=t.return}}function Wu(e){for(;T!==null;){var t=T;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{vi(4,t)}catch(s){le(t,n,s)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(s){le(t,o,s)}}var i=t.return;try{il(t)}catch(s){le(t,i,s)}break;case 5:var a=t.return;try{il(t)}catch(s){le(t,a,s)}}}catch(s){le(t,t.return,s)}if(t===e){T=null;break}var u=t.sibling;if(u!==null){u.return=t.return,T=u;break}T=t.return}}var Ig=Math.ceil,oi=Lt.ReactCurrentDispatcher,Gl=Lt.ReactCurrentOwner,et=Lt.ReactCurrentBatchConfig,V=0,ve=null,pe=null,we=0,$e=0,An=nn(0),he=0,Kr=null,vn=0,yi=0,Vl=0,Tr=null,ze=null,Kl=0,Yn=1/0,Nt=null,ii=!1,sl=null,Yt=null,Po=!1,$t=null,ai=0,Mr=0,ul=null,Oo=-1,Ao=0;function Ie(){return V&6?ce():Oo!==-1?Oo:Oo=ce()}function Xt(e){return e.mode&1?V&2&&we!==0?we&-we:mg.transition!==null?(Ao===0&&(Ao=hc()),Ao):(e=J,e!==0||(e=window.event,e=e===void 0?16:_c(e.type)),e):1}function dt(e,t,n,r){if(50<Mr)throw Mr=0,ul=null,Error(_(185));Qr(e,n,r),(!(V&2)||e!==ve)&&(e===ve&&(!(V&2)&&(yi|=n),he===4&&Bt(e,we)),je(e,r),n===1&&V===0&&!(t.mode&1)&&(Yn=ce()+500,gi&&rn()))}function je(e,t){var n=e.callbackNode;yf(e,t);var r=Ho(e,e===ve?we:0);if(r===0)n!==null&&Js(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Js(n),t===1)e.tag===0?hg(Bu.bind(null,e)):Wc(Bu.bind(null,e)),dg(function(){!(V&6)&&rn()}),n=null;else{switch(mc(r)){case 1:n=xl;break;case 4:n=fc;break;case 16:n=Bo;break;case 536870912:n=gc;break;default:n=Bo}n=jd(n,Rd.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Rd(e,t){if(Oo=-1,Ao=0,V&6)throw Error(_(327));var n=e.callbackNode;if(Hn()&&e.callbackNode!==n)return null;var r=Ho(e,e===ve?we:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=li(e,r);else{t=r;var o=V;V|=2;var i=Ld();(ve!==e||we!==t)&&(Nt=null,Yn=ce()+500,pn(e,t));do try{Og();break}catch(u){Id(e,u)}while(1);Rl(),oi.current=i,V=o,pe!==null?t=0:(ve=null,we=0,t=he)}if(t!==0){if(t===2&&(o=Oa(e),o!==0&&(r=o,t=cl(e,o))),t===1)throw n=Kr,pn(e,0),Bt(e,r),je(e,ce()),n;if(t===6)Bt(e,r);else{if(o=e.current.alternate,!(r&30)&&!Lg(o)&&(t=li(e,r),t===2&&(i=Oa(e),i!==0&&(r=i,t=cl(e,i))),t===1))throw n=Kr,pn(e,0),Bt(e,r),je(e,ce()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(_(345));case 2:sn(e,ze,Nt);break;case 3:if(Bt(e,r),(r&130023424)===r&&(t=Kl+500-ce(),10<t)){if(Ho(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ie(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=$a(sn.bind(null,e,ze,Nt),t);break}sn(e,ze,Nt);break;case 4:if(Bt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var a=31-ct(r);i=1<<a,a=t[a],a>o&&(o=a),r&=~i}if(r=o,r=ce()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ig(r/1960))-r,10<r){e.timeoutHandle=$a(sn.bind(null,e,ze,Nt),r);break}sn(e,ze,Nt);break;case 5:sn(e,ze,Nt);break;default:throw Error(_(329))}}}return je(e,ce()),e.callbackNode===n?Rd.bind(null,e):null}function cl(e,t){var n=Tr;return e.current.memoizedState.isDehydrated&&(pn(e,t).flags|=256),e=li(e,t),e!==2&&(t=ze,ze=n,t!==null&&dl(t)),e}function dl(e){ze===null?ze=e:ze.push.apply(ze,e)}function Lg(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!pt(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Bt(e,t){for(t&=~Vl,t&=~yi,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ct(t),r=1<<n;e[n]=-1,t&=~r}}function Bu(e){if(V&6)throw Error(_(327));Hn();var t=Ho(e,0);if(!(t&1))return je(e,ce()),null;var n=li(e,t);if(e.tag!==0&&n===2){var r=Oa(e);r!==0&&(t=r,n=cl(e,r))}if(n===1)throw n=Kr,pn(e,0),Bt(e,t),je(e,ce()),n;if(n===6)throw Error(_(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,sn(e,ze,Nt),je(e,ce()),null}function Ql(e,t){var n=V;V|=1;try{return e(t)}finally{V=n,V===0&&(Yn=ce()+500,gi&&rn())}}function yn(e){$t!==null&&$t.tag===0&&!(V&6)&&Hn();var t=V;V|=1;var n=et.transition,r=J;try{if(et.transition=null,J=1,e)return e()}finally{J=r,et.transition=n,V=t,!(V&6)&&rn()}}function Jl(){$e=An.current,Z(An)}function pn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,cg(n)),pe!==null)for(n=pe.return;n!==null;){var r=n;switch(Tl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Qo();break;case 3:Qn(),Z(Ae),Z(Pe),Dl();break;case 5:Al(r);break;case 4:Qn();break;case 13:Z(oe);break;case 19:Z(oe);break;case 10:Il(r.type._context);break;case 22:case 23:Jl()}n=n.return}if(ve=e,pe=e=qt(e.current,null),we=$e=t,he=0,Kr=null,Vl=yi=vn=0,ze=Tr=null,cn!==null){for(t=0;t<cn.length;t++)if(n=cn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=o,r.next=a}n.pending=r}cn=null}return e}function Id(e,t){do{var n=pe;try{if(Rl(),Io.current=ri,ni){for(var r=ie.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ni=!1}if(mn=0,me=ge=ie=null,Er=!1,$r=0,Gl.current=null,n===null||n.return===null){he=1,Kr=t,pe=null;break}e:{var i=e,a=n.return,u=n,s=t;if(t=we,u.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=s,d=u,g=d.tag;if(!(d.mode&1)&&(g===0||g===11||g===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var v=Tu(a);if(v!==null){v.flags&=-257,Mu(v,a,u,i,t),v.mode&1&&Pu(i,c,t),t=v,s=c;var k=t.updateQueue;if(k===null){var S=new Set;S.add(s),t.updateQueue=S}else k.add(s);break e}else{if(!(t&1)){Pu(i,c,t),Yl();break e}s=Error(_(426))}}else if(ee&&u.mode&1){var $=Tu(a);if($!==null){!($.flags&65536)&&($.flags|=256),Mu($,a,u,i,t),Ml(Jn(s,u));break e}}i=s=Jn(s,u),he!==4&&(he=2),Tr===null?Tr=[i]:Tr.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var f=md(i,s,t);_u(i,f);break e;case 1:u=s;var p=i.type,h=i.stateNode;if(!(i.flags&128)&&(typeof p.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Yt===null||!Yt.has(h)))){i.flags|=65536,t&=-t,i.lanes|=t;var x=vd(i,u,t);_u(i,x);break e}}i=i.return}while(i!==null)}Od(n)}catch(E){t=E,pe===n&&n!==null&&(pe=n=n.return);continue}break}while(1)}function Ld(){var e=oi.current;return oi.current=ri,e===null?ri:e}function Yl(){(he===0||he===3||he===2)&&(he=4),ve===null||!(vn&268435455)&&!(yi&268435455)||Bt(ve,we)}function li(e,t){var n=V;V|=2;var r=Ld();(ve!==e||we!==t)&&(Nt=null,pn(e,t));do try{zg();break}catch(o){Id(e,o)}while(1);if(Rl(),V=n,oi.current=r,pe!==null)throw Error(_(261));return ve=null,we=0,he}function zg(){for(;pe!==null;)zd(pe)}function Og(){for(;pe!==null&&!uf();)zd(pe)}function zd(e){var t=Dd(e.alternate,e,$e);e.memoizedProps=e.pendingProps,t===null?Od(e):pe=t,Gl.current=null}function Od(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Tg(n,t),n!==null){n.flags&=32767,pe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{he=6,pe=null;return}}else if(n=Pg(n,t,$e),n!==null){pe=n;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);he===0&&(he=5)}function sn(e,t,n){var r=J,o=et.transition;try{et.transition=null,J=1,Ag(e,t,n,r)}finally{et.transition=o,J=r}return null}function Ag(e,t,n,r){do Hn();while($t!==null);if(V&6)throw Error(_(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(_(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(xf(e,i),e===ve&&(pe=ve=null,we=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Po||(Po=!0,jd(Bo,function(){return Hn(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=et.transition,et.transition=null;var a=J;J=1;var u=V;V|=4,Gl.current=null,Fg(e,n),Md(n,e),ig(Ba),$o=!!Wa,Ba=Wa=null,e.current=n,Rg(n,e,o),cf(),V=u,J=a,et.transition=i}else e.current=n;if(Po&&(Po=!1,$t=e,ai=o),i=e.pendingLanes,i===0&&(Yt=null),ff(n.stateNode,r),je(e,ce()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(ii)throw ii=!1,e=sl,sl=null,e;return ai&1&&e.tag!==0&&Hn(),i=e.pendingLanes,i&1?e===ul?Mr++:(Mr=0,ul=e):Mr=0,rn(),null}function Hn(){if($t!==null){var e=mc(ai),t=et.transition,n=J;try{if(et.transition=null,J=16>e?16:e,$t===null)var r=!1;else{if(e=$t,$t=null,ai=0,V&6)throw Error(_(331));var o=V;for(V|=4,T=e.current;T!==null;){var i=T,a=i.child;if(T.flags&16){var u=i.deletions;if(u!==null){for(var s=0;s<u.length;s++){var c=u[s];for(T=c;T!==null;){var d=T;switch(d.tag){case 0:case 11:case 15:Pr(8,d,i)}var g=d.child;if(g!==null)g.return=d,T=g;else for(;T!==null;){d=T;var m=d.sibling,v=d.return;if(Ed(d),d===c){T=null;break}if(m!==null){m.return=v,T=m;break}T=v}}}var k=i.alternate;if(k!==null){var S=k.child;if(S!==null){k.child=null;do{var $=S.sibling;S.sibling=null,S=$}while(S!==null)}}T=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,T=a;else e:for(;T!==null;){if(i=T,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Pr(9,i,i.return)}var f=i.sibling;if(f!==null){f.return=i.return,T=f;break e}T=i.return}}var p=e.current;for(T=p;T!==null;){a=T;var h=a.child;if(a.subtreeFlags&2064&&h!==null)h.return=a,T=h;else e:for(a=p;T!==null;){if(u=T,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:vi(9,u)}}catch(E){le(u,u.return,E)}if(u===a){T=null;break e}var x=u.sibling;if(x!==null){x.return=u.return,T=x;break e}T=u.return}}if(V=o,rn(),xt&&typeof xt.onPostCommitFiberRoot=="function")try{xt.onPostCommitFiberRoot(ui,e)}catch{}r=!0}return r}finally{J=n,et.transition=t}}return!1}function Hu(e,t,n){t=Jn(n,t),t=md(e,t,1),e=Jt(e,t,1),t=Ie(),e!==null&&(Qr(e,1,t),je(e,t))}function le(e,t,n){if(e.tag===3)Hu(e,e,n);else for(;t!==null;){if(t.tag===3){Hu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yt===null||!Yt.has(r))){e=Jn(n,e),e=vd(t,e,1),t=Jt(t,e,1),e=Ie(),t!==null&&(Qr(t,1,e),je(t,e));break}}t=t.return}}function Dg(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ie(),e.pingedLanes|=e.suspendedLanes&n,ve===e&&(we&n)===n&&(he===4||he===3&&(we&130023424)===we&&500>ce()-Kl?pn(e,0):Vl|=n),je(e,t)}function Ad(e,t){t===0&&(e.mode&1?(t=go,go<<=1,!(go&130023424)&&(go=4194304)):t=1);var n=Ie();e=Rt(e,t),e!==null&&(Qr(e,t,n),je(e,n))}function jg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ad(e,n)}function Ug(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),Ad(e,n)}var Dd;Dd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ae.current)Oe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Oe=!1,Eg(e,t,n);Oe=!!(e.flags&131072)}else Oe=!1,ee&&t.flags&1048576&&Bc(t,Xo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zo(e,t),e=t.pendingProps;var o=Gn(t,Pe.current);Bn(t,n),o=Ul(null,t,r,e,o,n);var i=Wl();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,De(r)?(i=!0,Jo(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,zl(t),o.updater=mi,t.stateNode=o,o._reactInternals=t,Xa(t,r,e,n),t=el(null,t,r,!0,i,n)):(t.tag=0,ee&&i&&Pl(t),Re(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(zo(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Bg(r),e=lt(r,e),o){case 0:t=Za(null,t,r,e,n);break e;case 1:t=Iu(null,t,r,e,n);break e;case 11:t=Fu(null,t,r,e,n);break e;case 14:t=Ru(null,t,r,lt(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lt(r,o),Za(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lt(r,o),Iu(e,t,r,o,n);case 3:e:{if(kd(t),e===null)throw Error(_(387));r=t.pendingProps,i=t.memoizedState,o=i.element,Qc(e,t),ei(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Jn(Error(_(423)),t),t=Lu(e,t,r,n,o);break e}else if(r!==o){o=Jn(Error(_(424)),t),t=Lu(e,t,r,n,o);break e}else for(Ge=Qt(t.stateNode.containerInfo.firstChild),Ve=t,ee=!0,ut=null,n=Vc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vn(),r===o){t=It(e,t,n);break e}Re(e,t,r,n)}t=t.child}return t;case 5:return Jc(t),e===null&&Qa(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,Ha(r,o)?a=null:i!==null&&Ha(r,i)&&(t.flags|=32),wd(e,t),Re(e,t,a,n),t.child;case 6:return e===null&&Qa(t),null;case 13:return _d(e,t,n);case 4:return Ol(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Kn(t,null,r,n):Re(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lt(r,o),Fu(e,t,r,o,n);case 7:return Re(e,t,t.pendingProps,n),t.child;case 8:return Re(e,t,t.pendingProps.children,n),t.child;case 12:return Re(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,X(qo,r._currentValue),r._currentValue=a,i!==null)if(pt(i.value,a)){if(i.children===o.children&&!Ae.current){t=It(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){a=i.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Tt(-1,n&-n),s.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?s.next=s:(s.next=d.next,d.next=s),c.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Ja(i.return,n,t),u.lanes|=n;break}s=s.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(_(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Ja(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Re(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Bn(t,n),o=tt(o),r=r(o),t.flags|=1,Re(e,t,r,n),t.child;case 14:return r=t.type,o=lt(r,t.pendingProps),o=lt(r.type,o),Ru(e,t,r,o,n);case 15:return yd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:lt(r,o),zo(e,t),t.tag=1,De(r)?(e=!0,Jo(t)):e=!1,Bn(t,n),hd(t,r,o),Xa(t,r,o,n),el(null,t,r,!0,e,n);case 19:return bd(e,t,n);case 22:return xd(e,t,n)}throw Error(_(156,t.tag))};function jd(e,t){return pc(e,t)}function Wg(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ze(e,t,n,r){return new Wg(e,t,n,r)}function Xl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Bg(e){if(typeof e=="function")return Xl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ml)return 11;if(e===vl)return 14}return 2}function qt(e,t){var n=e.alternate;return n===null?(n=Ze(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Do(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")Xl(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case En:return fn(n.children,o,i,t);case hl:a=8,o|=8;break;case ka:return e=Ze(12,n,t,o|2),e.elementType=ka,e.lanes=i,e;case _a:return e=Ze(13,n,t,o),e.elementType=_a,e.lanes=i,e;case ba:return e=Ze(19,n,t,o),e.elementType=ba,e.lanes=i,e;case Ju:return xi(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ku:a=10;break e;case Qu:a=9;break e;case ml:a=11;break e;case vl:a=14;break e;case jt:a=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Ze(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function fn(e,t,n,r){return e=Ze(7,e,r,t),e.lanes=n,e}function xi(e,t,n,r){return e=Ze(22,e,r,t),e.elementType=Ju,e.lanes=n,e.stateNode={isHidden:!1},e}function ya(e,t,n){return e=Ze(6,e,null,t),e.lanes=n,e}function xa(e,t,n){return t=Ze(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hg(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=na(0),this.expirationTimes=na(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=na(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ql(e,t,n,r,o,i,a,u,s){return e=new Hg(e,t,n,u,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ze(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},zl(i),e}function $g(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Cn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Ud(e){if(!e)return en;e=e._reactInternals;e:{if(wn(e)!==e||e.tag!==1)throw Error(_(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(De(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(_(171))}if(e.tag===1){var n=e.type;if(De(n))return Uc(e,n,t)}return t}function Wd(e,t,n,r,o,i,a,u,s){return e=ql(n,r,!0,e,o,i,a,u,s),e.context=Ud(null),n=e.current,r=Ie(),o=Xt(n),i=Tt(r,o),i.callback=t??null,Jt(n,i,o),e.current.lanes=o,Qr(e,o,r),je(e,r),e}function wi(e,t,n,r){var o=t.current,i=Ie(),a=Xt(o);return n=Ud(n),t.context===null?t.context=n:t.pendingContext=n,t=Tt(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Jt(o,t,a),e!==null&&(dt(e,o,a,i),Ro(e,o,a)),a}function si(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function $u(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zl(e,t){$u(e,t),(e=e.alternate)&&$u(e,t)}function Gg(){return null}var Bd=typeof reportError=="function"?reportError:function(e){console.error(e)};function es(e){this._internalRoot=e}ki.prototype.render=es.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_(409));wi(e,t,null,null)};ki.prototype.unmount=es.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;yn(function(){wi(null,e,null,null)}),t[Ft]=null}};function ki(e){this._internalRoot=e}ki.prototype.unstable_scheduleHydration=function(e){if(e){var t=xc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Wt.length&&t!==0&&t<Wt[n].priority;n++);Wt.splice(n,0,e),n===0&&kc(e)}};function ts(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _i(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Gu(){}function Vg(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var c=si(a);i.call(c)}}var a=Wd(t,r,e,0,null,!1,!1,"",Gu);return e._reactRootContainer=a,e[Ft]=a.current,jr(e.nodeType===8?e.parentNode:e),yn(),a}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var u=r;r=function(){var c=si(s);u.call(c)}}var s=ql(e,0,!1,null,null,!1,!1,"",Gu);return e._reactRootContainer=s,e[Ft]=s.current,jr(e.nodeType===8?e.parentNode:e),yn(function(){wi(t,s,n,r)}),s}function bi(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if(typeof o=="function"){var u=o;o=function(){var s=si(a);u.call(s)}}wi(t,a,e,o)}else a=Vg(n,t,e,o,r);return si(a)}vc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=wr(t.pendingLanes);n!==0&&(wl(t,n|1),je(t,ce()),!(V&6)&&(Yn=ce()+500,rn()))}break;case 13:yn(function(){var r=Rt(e,1);if(r!==null){var o=Ie();dt(r,e,1,o)}}),Zl(e,1)}};kl=function(e){if(e.tag===13){var t=Rt(e,134217728);if(t!==null){var n=Ie();dt(t,e,134217728,n)}Zl(e,134217728)}};yc=function(e){if(e.tag===13){var t=Xt(e),n=Rt(e,t);if(n!==null){var r=Ie();dt(n,e,t,r)}Zl(e,t)}};xc=function(){return J};wc=function(e,t){var n=J;try{return J=e,t()}finally{J=n}};Ia=function(e,t,n){switch(t){case"input":if(Ca(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=fi(r);if(!o)throw Error(_(90));Xu(r),Ca(r,o)}}}break;case"textarea":Zu(e,n);break;case"select":t=n.value,t!=null&&Dn(e,!!n.multiple,t,!1)}};ac=Ql;lc=yn;var Kg={usingClientEntryPoint:!1,Events:[Yr,Fn,fi,oc,ic,Ql]},mr={findFiberByHostInstance:un,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Qg={bundleType:mr.bundleType,version:mr.version,rendererPackageName:mr.rendererPackageName,rendererConfig:mr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Lt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=cc(e),e===null?null:e.stateNode},findFiberByHostInstance:mr.findFiberByHostInstance||Gg,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(vr=__REACT_DEVTOOLS_GLOBAL_HOOK__,!vr.isDisabled&&vr.supportsFiber))try{ui=vr.inject(Qg),xt=vr}catch{}var vr;Je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Kg;Je.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ts(t))throw Error(_(200));return $g(e,t,null,n)};Je.createRoot=function(e,t){if(!ts(e))throw Error(_(299));var n=!1,r="",o=Bd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=ql(e,1,!1,null,null,n,!1,r,o),e[Ft]=t.current,jr(e.nodeType===8?e.parentNode:e),new es(t)};Je.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(_(188)):(e=Object.keys(e).join(","),Error(_(268,e)));return e=cc(t),e=e===null?null:e.stateNode,e};Je.flushSync=function(e){return yn(e)};Je.hydrate=function(e,t,n){if(!_i(t))throw Error(_(200));return bi(null,e,t,!0,n)};Je.hydrateRoot=function(e,t,n){if(!ts(e))throw Error(_(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",a=Bd;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Wd(t,null,e,1,n??null,o,!1,i,a),e[Ft]=t.current,jr(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new ki(t)};Je.render=function(e,t,n){if(!_i(t))throw Error(_(200));return bi(null,e,t,!1,n)};Je.unmountComponentAtNode=function(e){if(!_i(e))throw Error(_(40));return e._reactRootContainer?(yn(function(){bi(null,null,e,!1,function(){e._reactRootContainer=null,e[Ft]=null})}),!0):!1};Je.unstable_batchedUpdates=Ql;Je.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!_i(n))throw Error(_(200));if(e==null||e._reactInternals===void 0)throw Error(_(38));return bi(e,t,n,!1,r)};Je.version="18.3.1-next-f1338f8080-20240426"});var Vd=bt((Im,Gd)=>{"use strict";function $d(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($d)}catch(e){console.error(e)}}$d(),Gd.exports=Hd()});var Qd=bt(ns=>{"use strict";var Kd=Vd();ns.createRoot=Kd.createRoot,ns.hydrateRoot=Kd.hydrateRoot;var Lm});var Yd=bt(Si=>{"use strict";var Jg=St(),Yg=Symbol.for("react.element"),Xg=Symbol.for("react.fragment"),qg=Object.prototype.hasOwnProperty,Zg=Jg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,eh={key:!0,ref:!0,__self:!0,__source:!0};function Jd(e,t,n){var r,o={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)qg.call(t,r)&&!eh.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Yg,type:e,key:i,ref:a,props:o,_owner:Zg.current}}Si.Fragment=Xg;Si.jsx=Jd;Si.jsxs=Jd});var _e=bt((Am,Xd)=>{"use strict";Xd.exports=Yd()});var gs=`/* ---------------------------------------------------------------
9
+ Workflow Editor \u2014 bold redesign
10
+ Design system:
11
+ - Type: Space Grotesk (UI), JetBrains Mono (identifiers/expr),
12
+ Instrument Serif (display accents)
13
+ - Color: cool-neutral base, single accent keyed to workflow type.
14
+ Accent hue tweakable; chroma held constant (oklch).
15
+ - Node geometry: each type has its own shape (trigger pill, state
16
+ card, branch diamond-sliced card, action chip).
17
+ --------------------------------------------------------------- */
18
+
19
+ :root {
20
+ --accent-hue: 255; /* tweakable */
21
+ --accent: oklch(0.70 0.16 var(--accent-hue));
22
+ --accent-ink: oklch(0.22 0.08 var(--accent-hue));
23
+ --accent-soft: oklch(0.70 0.16 var(--accent-hue) / 0.14);
24
+ --accent-line: oklch(0.70 0.16 var(--accent-hue) / 0.38);
25
+
26
+ /* type roles */
27
+ --t-trigger: oklch(0.78 0.14 145);
28
+ --t-state: oklch(0.72 0.14 250);
29
+ --t-branch: oklch(0.78 0.13 60);
30
+ --t-action: oklch(0.72 0.14 330);
31
+ --t-end: oklch(0.62 0.04 260);
32
+
33
+ --t-trigger-soft: oklch(0.78 0.14 145 / 0.14);
34
+ --t-state-soft: oklch(0.72 0.14 250 / 0.14);
35
+ --t-branch-soft: oklch(0.78 0.13 60 / 0.14);
36
+ --t-action-soft: oklch(0.72 0.14 330 / 0.14);
37
+ --t-end-soft: oklch(0.62 0.04 260 / 0.16);
38
+
39
+ --ok: oklch(0.78 0.14 155);
40
+ --warn: oklch(0.78 0.14 75);
41
+ --err: oklch(0.68 0.20 25);
42
+
43
+ --radius: 10px;
44
+ --radius-sm: 6px;
45
+ --density: 1;
46
+ }
47
+
48
+ /* DARK (default) */
49
+ :root[data-theme="dark"] {
50
+ --bg: oklch(0.18 0.014 265);
51
+ --bg-deep: oklch(0.14 0.014 265);
52
+ --surface: oklch(0.22 0.014 265);
53
+ --surface-2: oklch(0.26 0.014 265);
54
+ --line: oklch(0.32 0.018 265);
55
+ --line-soft: oklch(0.28 0.014 265);
56
+ --ink: oklch(0.96 0.006 265);
57
+ --ink-2: oklch(0.82 0.012 265);
58
+ --muted: oklch(0.62 0.012 265);
59
+ --muted-2: oklch(0.48 0.012 265);
60
+ --grid: oklch(0.32 0.014 265 / 0.35);
61
+ --grid-bold: oklch(0.32 0.014 265 / 0.65);
62
+ --node: oklch(0.24 0.014 265);
63
+ --node-hi: oklch(0.28 0.014 265);
64
+ --shadow: 0 1px 0 oklch(1 0 0 / 0.04) inset,
65
+ 0 18px 40px -20px oklch(0 0 0 / 0.7),
66
+ 0 2px 6px -2px oklch(0 0 0 / 0.5);
67
+ }
68
+
69
+ /* LIGHT */
70
+ :root[data-theme="light"] {
71
+ --bg: oklch(0.985 0.003 265);
72
+ --bg-deep: oklch(0.96 0.004 265);
73
+ --surface: oklch(1 0 0);
74
+ --surface-2: oklch(0.975 0.004 265);
75
+ --line: oklch(0.90 0.006 265);
76
+ --line-soft: oklch(0.94 0.005 265);
77
+ --ink: oklch(0.20 0.016 265);
78
+ --ink-2: oklch(0.34 0.014 265);
79
+ --muted: oklch(0.52 0.010 265);
80
+ --muted-2: oklch(0.66 0.010 265);
81
+ --grid: oklch(0.90 0.006 265 / 0.6);
82
+ --grid-bold: oklch(0.80 0.010 265 / 0.75);
83
+ --node: oklch(1 0 0);
84
+ --node-hi: oklch(0.98 0.004 265);
85
+ --shadow: 0 1px 0 oklch(1 0 0 / 0.9) inset,
86
+ 0 20px 40px -24px oklch(0.2 0.02 265 / 0.18),
87
+ 0 2px 6px -3px oklch(0.2 0.02 265 / 0.12);
88
+ }
89
+
90
+ * { box-sizing: border-box; }
91
+ html, body, #root { height: 100%; margin: 0; }
92
+ body {
93
+ background: var(--bg-deep);
94
+ color: var(--ink);
95
+ font: 13px/1.5 "Space Grotesk", system-ui, -apple-system, sans-serif;
96
+ font-feature-settings: "ss01", "cv01";
97
+ -webkit-font-smoothing: antialiased;
98
+ overflow: hidden;
99
+ }
100
+ kbd {
101
+ font: 500 10.5px/1 "JetBrains Mono", ui-monospace, monospace;
102
+ background: var(--surface-2);
103
+ border: 1px solid var(--line);
104
+ border-bottom-width: 2px;
105
+ padding: 2px 5px;
106
+ border-radius: 4px;
107
+ color: var(--ink-2);
108
+ }
109
+ code, .mono {
110
+ font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
111
+ font-size: 0.92em;
112
+ letter-spacing: -0.005em;
113
+ }
114
+
115
+ /* ============================================================
116
+ APP SHELL
117
+ ============================================================ */
118
+ .app {
119
+ display: grid;
120
+ grid-template-rows: 52px 1fr;
121
+ grid-template-columns: 288px 1fr 380px;
122
+ height: 100vh;
123
+ background: var(--bg);
124
+ }
125
+ .app[data-density="compact"] { --density: 0.88; }
126
+ .app[data-density="cozy"] { --density: 1; }
127
+ .app[data-density="roomy"] { --density: 1.12; }
128
+
129
+ /* ============================================================
130
+ TOOLBAR
131
+ ============================================================ */
132
+ .tb {
133
+ grid-column: 1 / 4;
134
+ display: flex;
135
+ align-items: stretch;
136
+ background: var(--surface);
137
+ border-bottom: 1px solid var(--line);
138
+ position: relative;
139
+ z-index: 5;
140
+ }
141
+ .tb__brand {
142
+ display: flex; align-items: center; gap: 10px;
143
+ padding: 0 16px;
144
+ border-right: 1px solid var(--line);
145
+ width: 288px;
146
+ }
147
+ .tb__mark {
148
+ width: 26px; height: 26px;
149
+ border-radius: 7px;
150
+ background: linear-gradient(140deg, var(--accent) 0%, var(--t-action) 100%);
151
+ position: relative;
152
+ display: grid; place-items: center;
153
+ color: var(--accent-ink);
154
+ font-weight: 700;
155
+ box-shadow: 0 2px 8px -2px var(--accent-line), inset 0 0 0 1px oklch(1 0 0 / 0.2);
156
+ }
157
+ .tb__mark::after {
158
+ content: "";
159
+ position: absolute; inset: 3px;
160
+ border-radius: 5px;
161
+ background: radial-gradient(circle at 30% 30%, oklch(1 0 0 / 0.35), transparent 60%);
162
+ pointer-events: none;
163
+ }
164
+ .tb__brand-label { font-weight: 600; letter-spacing: -0.01em; font-size: 13px; }
165
+ .tb__brand-sub { font-size: 10px; color: var(--muted); font-family: "JetBrains Mono", monospace; letter-spacing: 0; }
166
+
167
+ .tb__main {
168
+ flex: 1;
169
+ display: flex; align-items: center; gap: 4px;
170
+ padding: 0 14px;
171
+ min-width: 0;
172
+ }
173
+ .tb__crumbs {
174
+ display: flex; align-items: center; gap: 8px;
175
+ font-size: 12px; color: var(--muted);
176
+ min-width: 0;
177
+ }
178
+ .tb__crumbs b {
179
+ color: var(--ink);
180
+ font-weight: 600;
181
+ max-width: 320px;
182
+ overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
183
+ font-size: 13px;
184
+ letter-spacing: -0.005em;
185
+ }
186
+ .tb__crumbs input {
187
+ font: inherit;
188
+ font-weight: 600;
189
+ color: var(--ink);
190
+ background: transparent;
191
+ border: 1px solid transparent;
192
+ padding: 3px 6px;
193
+ border-radius: 5px;
194
+ min-width: 240px;
195
+ letter-spacing: -0.005em;
196
+ }
197
+ .tb__crumbs input:focus { outline: none; border-color: var(--accent-line); background: var(--bg); }
198
+ .tb__crumbs .sep { color: var(--muted-2); }
199
+ .tb__status {
200
+ font: 500 10.5px/1 "JetBrains Mono", monospace;
201
+ color: var(--muted);
202
+ display: inline-flex; align-items: center; gap: 6px;
203
+ padding: 4px 8px;
204
+ border-radius: 20px;
205
+ background: var(--surface-2);
206
+ border: 1px solid var(--line-soft);
207
+ }
208
+ .tb__status .dot {
209
+ width: 6px; height: 6px; border-radius: 50%;
210
+ background: var(--muted);
211
+ }
212
+ .tb__status.is-dirty .dot { background: var(--warn); box-shadow: 0 0 0 3px oklch(from var(--warn) l c h / 0.25); }
213
+ .tb__status.is-saved .dot { background: var(--ok); }
214
+ .tb__status.is-running .dot { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
215
+
216
+ .tb__sep { width: 1px; background: var(--line); margin: 10px 6px; }
217
+ .tb__spacer { flex: 1; }
218
+
219
+ .tb__actions { display: flex; align-items: center; gap: 4px; padding: 0 12px; border-left: 1px solid var(--line); }
220
+
221
+ /* ============================================================
222
+ BUTTONS
223
+ ============================================================ */
224
+ .btn {
225
+ font: 500 12px/1 "Space Grotesk", sans-serif;
226
+ color: var(--ink-2);
227
+ background: transparent;
228
+ border: 1px solid transparent;
229
+ height: 30px;
230
+ padding: 0 10px;
231
+ border-radius: 7px;
232
+ display: inline-flex; align-items: center; gap: 6px;
233
+ cursor: pointer;
234
+ transition: background .12s ease, border-color .12s ease, color .12s ease;
235
+ white-space: nowrap;
236
+ }
237
+ .btn:hover { background: var(--surface-2); color: var(--ink); }
238
+ .btn:disabled { opacity: 0.4; cursor: not-allowed; }
239
+ .btn svg { width: 14px; height: 14px; }
240
+
241
+ .btn--outline { border-color: var(--line); background: var(--surface); }
242
+ .btn--outline:hover { border-color: var(--line); background: var(--node-hi); }
243
+
244
+ .btn--primary {
245
+ background: var(--accent);
246
+ color: var(--accent-ink);
247
+ border-color: var(--accent);
248
+ font-weight: 600;
249
+ }
250
+ .btn--primary:hover { filter: brightness(1.08); color: var(--accent-ink); background: var(--accent); }
251
+
252
+ .btn--ghost-icon {
253
+ width: 30px; padding: 0; justify-content: center;
254
+ color: var(--muted);
255
+ }
256
+ .btn--ghost-icon:hover { color: var(--ink); background: var(--surface-2); }
257
+ .btn--ghost-icon.is-active { color: var(--accent); background: var(--accent-soft); }
258
+
259
+ .btn--danger {
260
+ color: var(--err);
261
+ background: oklch(from var(--err) l c h / 0.08);
262
+ border-color: oklch(from var(--err) l c h / 0.3);
263
+ }
264
+ .btn--danger:hover { background: oklch(from var(--err) l c h / 0.16); }
265
+
266
+ /* ============================================================
267
+ PALETTE (left)
268
+ ============================================================ */
269
+ .pal {
270
+ border-right: 1px solid var(--line);
271
+ background: var(--surface);
272
+ display: flex; flex-direction: column;
273
+ overflow: hidden;
274
+ min-width: 0;
275
+ }
276
+ .pal__search {
277
+ position: relative;
278
+ padding: 12px 14px 8px;
279
+ border-bottom: 1px solid var(--line-soft);
280
+ }
281
+ .pal__search input {
282
+ width: 100%;
283
+ font: 13px "Space Grotesk", sans-serif;
284
+ background: var(--bg);
285
+ border: 1px solid var(--line);
286
+ border-radius: 8px;
287
+ padding: 8px 12px 8px 32px;
288
+ color: var(--ink);
289
+ }
290
+ .pal__search input::placeholder { color: var(--muted-2); }
291
+ .pal__search input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
292
+ .pal__search svg {
293
+ position: absolute; left: 24px; top: 50%;
294
+ width: 14px; height: 14px;
295
+ transform: translateY(-4px);
296
+ color: var(--muted);
297
+ pointer-events: none;
298
+ }
299
+ .pal__search kbd { position: absolute; right: 22px; top: 20px; }
300
+
301
+ .pal__scroll { flex: 1; overflow-y: auto; padding: 14px 10px 18px; }
302
+ .pal__scroll::-webkit-scrollbar { width: 8px; }
303
+ .pal__scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
304
+
305
+ .pal__section {
306
+ display: flex; align-items: center; justify-content: space-between;
307
+ padding: 14px 6px 6px;
308
+ font-size: 10px; font-weight: 600;
309
+ letter-spacing: 0.1em;
310
+ text-transform: uppercase;
311
+ color: var(--muted);
312
+ }
313
+ .pal__section:first-child { padding-top: 4px; }
314
+ .pal__section-count {
315
+ font-size: 10px; font-family: "JetBrains Mono", monospace;
316
+ color: var(--muted-2);
317
+ }
318
+
319
+ .pal__item {
320
+ display: flex; align-items: flex-start; gap: 10px;
321
+ padding: 9px 10px;
322
+ margin: 2px 0;
323
+ border-radius: 8px;
324
+ cursor: grab;
325
+ user-select: none;
326
+ border: 1px solid transparent;
327
+ position: relative;
328
+ transition: background .12s, border-color .12s;
329
+ }
330
+ .pal__item:hover { background: var(--surface-2); border-color: var(--line-soft); }
331
+ .pal__item:active { cursor: grabbing; }
332
+ .pal__item.is-dragging { opacity: 0.35; }
333
+
334
+ .pal__glyph {
335
+ flex-shrink: 0;
336
+ width: 30px; height: 30px;
337
+ display: grid; place-items: center;
338
+ color: var(--gcol, var(--ink));
339
+ background: var(--gbg, var(--surface-2));
340
+ border: 1px solid var(--gbor, var(--line));
341
+ }
342
+ .pal__glyph.g-trigger { --gcol: var(--t-trigger); --gbg: var(--t-trigger-soft); --gbor: oklch(from var(--t-trigger) l c h / 0.3); border-radius: 15px; }
343
+ .pal__glyph.g-state { --gcol: var(--t-state); --gbg: var(--t-state-soft); --gbor: oklch(from var(--t-state) l c h / 0.3); border-radius: 6px; }
344
+ .pal__glyph.g-branch { --gcol: var(--t-branch); --gbg: var(--t-branch-soft); --gbor: oklch(from var(--t-branch) l c h / 0.3); border-radius: 4px; transform: rotate(45deg); }
345
+ .pal__glyph.g-branch svg { transform: rotate(-45deg); }
346
+ .pal__glyph.g-action { --gcol: var(--t-action); --gbg: var(--t-action-soft); --gbor: oklch(from var(--t-action) l c h / 0.3); border-radius: 4px 10px 10px 4px; }
347
+ .pal__glyph.g-end { --gcol: var(--t-end); --gbg: var(--t-end-soft); --gbor: oklch(from var(--t-end) l c h / 0.3); border-radius: 15px; border-style: dashed; }
348
+ .pal__glyph svg { width: 14px; height: 14px; }
349
+
350
+ .pal__meta { min-width: 0; flex: 1; padding-top: 2px; }
351
+ .pal__label { font-size: 12.5px; font-weight: 500; color: var(--ink); letter-spacing: -0.005em; }
352
+ .pal__hint { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
353
+
354
+ .pal__tpl {
355
+ display: block;
356
+ padding: 12px 14px;
357
+ background: var(--bg);
358
+ border: 1px solid var(--line);
359
+ border-radius: 10px;
360
+ margin: 6px 4px;
361
+ cursor: pointer;
362
+ position: relative;
363
+ overflow: hidden;
364
+ transition: border-color .12s, transform .12s;
365
+ }
366
+ .pal__tpl:hover { border-color: var(--accent-line); transform: translateY(-1px); }
367
+ .pal__tpl-title { font-size: 12.5px; font-weight: 600; letter-spacing: -0.005em; margin-bottom: 4px; }
368
+ .pal__tpl-hint { font-size: 10.5px; color: var(--muted); line-height: 1.45; }
369
+ .pal__tpl-dots {
370
+ position: absolute; right: 10px; top: 10px;
371
+ display: flex; gap: 3px;
372
+ }
373
+ .pal__tpl-dots span {
374
+ width: 5px; height: 5px; border-radius: 50%;
375
+ background: var(--line);
376
+ }
377
+ .pal__tpl-dots span.on { background: var(--accent); }
378
+
379
+ .pal__foot {
380
+ border-top: 1px solid var(--line);
381
+ padding: 10px 14px;
382
+ font-size: 10.5px; color: var(--muted);
383
+ display: flex; align-items: center; gap: 8px;
384
+ background: var(--surface-2);
385
+ }
386
+
387
+ /* ============================================================
388
+ CANVAS
389
+ ============================================================ */
390
+ .cv {
391
+ position: relative;
392
+ overflow: hidden;
393
+ background: var(--bg);
394
+ background-image:
395
+ radial-gradient(circle at center, var(--grid) 1px, transparent 1px),
396
+ linear-gradient(to right, var(--grid-bold) 1px, transparent 1px),
397
+ linear-gradient(to bottom, var(--grid-bold) 1px, transparent 1px);
398
+ background-size: 24px 24px, 120px 120px, 120px 120px;
399
+ background-position: 0 0, 0 0, 0 0;
400
+ cursor: default;
401
+ }
402
+ .cv.is-panning { cursor: grabbing; }
403
+ .cv.is-drop-target::before {
404
+ content: "";
405
+ position: absolute; inset: 8px;
406
+ border: 2px dashed var(--accent);
407
+ border-radius: 18px;
408
+ background: var(--accent-soft);
409
+ pointer-events: none;
410
+ z-index: 0;
411
+ }
412
+
413
+ .cv__viewport {
414
+ position: absolute;
415
+ left: 0; top: 0;
416
+ width: 100%; height: 100%;
417
+ transform-origin: 0 0;
418
+ }
419
+
420
+ .cv__edges {
421
+ position: absolute; inset: 0;
422
+ pointer-events: none;
423
+ overflow: visible;
424
+ z-index: 1;
425
+ }
426
+ .cv__edges path {
427
+ fill: none;
428
+ stroke: var(--line);
429
+ stroke-width: 1.6;
430
+ pointer-events: stroke;
431
+ cursor: pointer;
432
+ }
433
+ .cv__edges path.edge-bg {
434
+ stroke: transparent;
435
+ stroke-width: 14;
436
+ pointer-events: stroke;
437
+ }
438
+ .cv__edges path.is-hover { stroke: var(--ink-2); }
439
+ .cv__edges path.is-selected { stroke: var(--accent); stroke-width: 2; }
440
+ .cv__edges path.is-running {
441
+ stroke: var(--accent);
442
+ stroke-width: 2;
443
+ stroke-dasharray: 6 4;
444
+ animation: dash 0.6s linear infinite;
445
+ }
446
+ .cv__edges path.is-visited { stroke: var(--accent); stroke-width: 1.8; }
447
+ .cv__edges path.is-true { stroke: var(--ok); }
448
+ .cv__edges path.is-false { stroke: var(--err); }
449
+ .cv__edges .edge-label {
450
+ font: 500 10.5px "JetBrains Mono", monospace;
451
+ fill: var(--ink-2);
452
+ }
453
+ .cv__edges .edge-label-bg {
454
+ fill: var(--surface);
455
+ stroke: var(--line);
456
+ stroke-width: 1;
457
+ }
458
+ @keyframes dash { to { stroke-dashoffset: -20; } }
459
+ @keyframes pulse {
460
+ 0%, 100% { opacity: 1; transform: scale(1); }
461
+ 50% { opacity: 0.55; transform: scale(1.25); }
462
+ }
463
+
464
+ /* ---------- NODE base ---------- */
465
+ .node {
466
+ position: absolute;
467
+ --c: var(--t-state);
468
+ --c-soft: var(--t-state-soft);
469
+ --c-line: oklch(from var(--c) l c h / 0.38);
470
+ background: var(--node);
471
+ color: var(--ink);
472
+ font-family: "Space Grotesk", sans-serif;
473
+ border: 1.25px solid var(--line);
474
+ border-radius: var(--radius);
475
+ min-width: 220px;
476
+ box-shadow: var(--shadow);
477
+ cursor: grab;
478
+ transition: border-color .12s, box-shadow .12s, transform .12s;
479
+ z-index: 2;
480
+ }
481
+ .node.t-trigger { --c: var(--t-trigger); --c-soft: var(--t-trigger-soft); }
482
+ .node.t-state { --c: var(--t-state); --c-soft: var(--t-state-soft); }
483
+ .node.t-branch { --c: var(--t-branch); --c-soft: var(--t-branch-soft); }
484
+ .node.t-action { --c: var(--t-action); --c-soft: var(--t-action-soft); }
485
+ .node.t-end { --c: var(--t-end); --c-soft: var(--t-end-soft); }
486
+
487
+ .node:active { cursor: grabbing; }
488
+ .node.is-selected { border-color: var(--c-line); box-shadow: var(--shadow), 0 0 0 2px oklch(from var(--c) l c h / 0.4); z-index: 4; }
489
+ .node.is-running { box-shadow: var(--shadow), 0 0 0 2px var(--c-line), 0 0 22px 2px oklch(from var(--c) l c h / 0.4); border-color: var(--c-line); }
490
+ .node.is-visited { border-color: var(--c-line); }
491
+ .node.is-error { border-color: var(--err); box-shadow: var(--shadow), 0 0 0 2px oklch(from var(--err) l c h / 0.35); }
492
+
493
+ .node__stripe {
494
+ height: 4px;
495
+ border-radius: var(--radius) var(--radius) 0 0;
496
+ background: linear-gradient(90deg, var(--c) 0%, oklch(from var(--c) l c h / 0.5) 100%);
497
+ position: relative;
498
+ overflow: hidden;
499
+ }
500
+ .node__stripe::after {
501
+ content: "";
502
+ position: absolute; inset: 0;
503
+ background: repeating-linear-gradient(90deg, oklch(1 0 0 / 0.15) 0 2px, transparent 2px 4px);
504
+ mix-blend-mode: overlay;
505
+ }
506
+ .node__head {
507
+ display: flex; align-items: center; gap: 10px;
508
+ padding: 10px 12px 6px;
509
+ }
510
+ .node__icon {
511
+ width: 22px; height: 22px;
512
+ border-radius: 5px;
513
+ background: var(--c-soft);
514
+ color: var(--c);
515
+ border: 1px solid oklch(from var(--c) l c h / 0.28);
516
+ display: grid; place-items: center;
517
+ flex-shrink: 0;
518
+ }
519
+ .node__icon svg { width: 12px; height: 12px; }
520
+ .node__meta { min-width: 0; flex: 1; }
521
+ .node__kind {
522
+ font: 600 9px/1 "JetBrains Mono", monospace;
523
+ letter-spacing: 0.12em;
524
+ text-transform: uppercase;
525
+ color: var(--c);
526
+ }
527
+ .node__name {
528
+ font-weight: 600; font-size: 13.5px;
529
+ letter-spacing: -0.01em;
530
+ margin-top: 2px;
531
+ color: var(--ink);
532
+ white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
533
+ }
534
+ .node__chev {
535
+ color: var(--muted-2);
536
+ display: grid; place-items: center;
537
+ }
538
+ .node__body {
539
+ padding: 0 12px 12px;
540
+ display: flex; flex-direction: column; gap: 6px;
541
+ }
542
+ .node__row {
543
+ display: flex; align-items: center; gap: 6px;
544
+ font-size: 11.5px;
545
+ color: var(--ink-2);
546
+ min-height: 18px;
547
+ }
548
+ .node__row .mono { color: var(--muted); }
549
+ .node__row svg { width: 12px; height: 12px; color: var(--muted); flex-shrink: 0; }
550
+ .node__tag {
551
+ font: 500 10px "JetBrains Mono", monospace;
552
+ padding: 2px 6px;
553
+ background: var(--surface-2);
554
+ border-radius: 3px;
555
+ color: var(--ink-2);
556
+ border: 1px solid var(--line-soft);
557
+ }
558
+
559
+ .node__foot {
560
+ padding: 8px 12px;
561
+ border-top: 1px dashed var(--line-soft);
562
+ display: flex; align-items: center; justify-content: space-between;
563
+ font-size: 10.5px;
564
+ color: var(--muted);
565
+ }
566
+ .node__badges { display: flex; gap: 4px; }
567
+ .node__badge {
568
+ font: 600 9px/1 "JetBrains Mono", monospace;
569
+ letter-spacing: 0.08em;
570
+ padding: 3px 5px;
571
+ border-radius: 3px;
572
+ background: var(--surface-2);
573
+ color: var(--ink-2);
574
+ text-transform: uppercase;
575
+ border: 1px solid var(--line-soft);
576
+ }
577
+ .node__badge.ok { color: var(--ok); background: oklch(from var(--ok) l c h / 0.12); border-color: oklch(from var(--ok) l c h / 0.3); }
578
+ .node__badge.warn { color: var(--warn); background: oklch(from var(--warn) l c h / 0.12); border-color: oklch(from var(--warn) l c h / 0.3); }
579
+ .node__badge.err { color: var(--err); background: oklch(from var(--err) l c h / 0.12); border-color: oklch(from var(--err) l c h / 0.3); }
580
+
581
+ /* ---------- NODE: Trigger (pill) ---------- */
582
+ .node.t-trigger {
583
+ border-radius: 999px;
584
+ min-width: 200px;
585
+ padding: 10px 18px 10px 14px;
586
+ }
587
+ .node.t-trigger .node__stripe { display: none; }
588
+ .node.t-trigger .node__head { padding: 0; gap: 10px; }
589
+ .node.t-trigger .node__body { display: none; }
590
+ .node.t-trigger .node__foot { display: none; }
591
+ .node.t-trigger::before {
592
+ content: "";
593
+ position: absolute;
594
+ left: -6px; top: 50%;
595
+ transform: translateY(-50%);
596
+ width: 10px; height: 10px;
597
+ border-radius: 50%;
598
+ background: var(--c);
599
+ box-shadow: 0 0 0 3px var(--bg), 0 0 14px 2px oklch(from var(--c) l c h / 0.6);
600
+ }
601
+
602
+ /* ---------- NODE: Branch (diamond-clipped card) ---------- */
603
+ .node.t-branch {
604
+ min-width: 240px;
605
+ clip-path: polygon(0% 14px, 14px 0%, calc(100% - 14px) 0%, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0% calc(100% - 14px));
606
+ }
607
+
608
+ /* ---------- NODE: Action (chip, smaller) ---------- */
609
+ .node.t-action {
610
+ min-width: 200px;
611
+ border-radius: 4px 14px 14px 4px;
612
+ border-left: 3px solid var(--c);
613
+ }
614
+ .node.t-action .node__stripe { display: none; }
615
+ .node.t-action .node__head { padding-top: 10px; }
616
+
617
+ /* ---------- HANDLES (ports) ---------- */
618
+ .handle {
619
+ position: absolute;
620
+ width: 12px; height: 12px;
621
+ border-radius: 50%;
622
+ background: var(--node);
623
+ border: 2px solid var(--c);
624
+ transform: translate(-50%, -50%);
625
+ cursor: crosshair;
626
+ z-index: 5;
627
+ transition: transform .1s, background .12s;
628
+ }
629
+ .handle:hover, .handle.is-active {
630
+ background: var(--c);
631
+ transform: translate(-50%, -50%) scale(1.35);
632
+ }
633
+ .handle.h-in { left: 0; top: 50%; }
634
+ .handle.h-out { left: 100%; top: 50%; }
635
+ .handle.h-true { left: 100%; top: 30%; border-color: var(--ok); }
636
+ .handle.h-false { left: 100%; top: 70%; border-color: var(--err); }
637
+ .handle__label {
638
+ position: absolute;
639
+ left: 14px; top: 50%;
640
+ transform: translateY(-50%);
641
+ font: 600 9px/1 "JetBrains Mono", monospace;
642
+ letter-spacing: 0.1em;
643
+ text-transform: uppercase;
644
+ color: var(--muted);
645
+ white-space: nowrap;
646
+ pointer-events: none;
647
+ }
648
+ .handle.h-true .handle__label { color: var(--ok); }
649
+ .handle.h-false .handle__label { color: var(--err); }
650
+
651
+ /* ---------- Canvas overlays ---------- */
652
+ .cv__controls {
653
+ position: absolute;
654
+ left: 14px; bottom: 14px;
655
+ display: flex; gap: 6px;
656
+ background: var(--surface);
657
+ border: 1px solid var(--line);
658
+ border-radius: 10px;
659
+ padding: 4px;
660
+ box-shadow: var(--shadow);
661
+ z-index: 10;
662
+ }
663
+ .cv__controls button {
664
+ width: 28px; height: 28px;
665
+ background: transparent;
666
+ border: 0;
667
+ border-radius: 6px;
668
+ color: var(--ink-2);
669
+ cursor: pointer;
670
+ display: grid; place-items: center;
671
+ }
672
+ .cv__controls button:hover { background: var(--surface-2); color: var(--ink); }
673
+ .cv__zoom { padding: 0 8px; font: 500 11px "JetBrains Mono", monospace; color: var(--muted); display: grid; place-items: center; border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-width: 56px; }
674
+
675
+ .cv__mini {
676
+ position: absolute;
677
+ right: 14px; bottom: 14px;
678
+ width: 200px; height: 140px;
679
+ background: var(--surface);
680
+ border: 1px solid var(--line);
681
+ border-radius: 10px;
682
+ overflow: hidden;
683
+ z-index: 10;
684
+ box-shadow: var(--shadow);
685
+ transition: height .16s, width .16s;
686
+ }
687
+ .cv__mini.is-collapsed { height: 32px; width: 140px; }
688
+ .cv__mini-head {
689
+ height: 28px;
690
+ display: flex; align-items: center; justify-content: space-between;
691
+ padding: 0 10px;
692
+ font: 600 10px "Space Grotesk"; letter-spacing: 0.08em; text-transform: uppercase;
693
+ color: var(--muted);
694
+ border-bottom: 1px solid var(--line-soft);
695
+ }
696
+ .cv__mini-head button { background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 2px; border-radius: 4px; display: grid; place-items: center; }
697
+ .cv__mini-head button:hover { color: var(--ink); background: var(--surface-2); }
698
+ .cv__mini svg { width: 100%; height: calc(100% - 28px); display: block; }
699
+ .cv__mini .mini-node { fill: var(--muted-2); }
700
+ .cv__mini .mini-node.sel { fill: var(--accent); }
701
+ .cv__mini .mini-view { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1; }
702
+
703
+ /* ---------- Run panel ---------- */
704
+ .run {
705
+ position: absolute;
706
+ top: 14px; left: 14px;
707
+ width: 320px;
708
+ max-height: calc(100% - 28px);
709
+ background: var(--surface);
710
+ border: 1px solid var(--line);
711
+ border-radius: 12px;
712
+ box-shadow: var(--shadow);
713
+ z-index: 9;
714
+ overflow: hidden;
715
+ display: flex; flex-direction: column;
716
+ }
717
+ .run__head {
718
+ display: flex; align-items: center; gap: 10px;
719
+ padding: 10px 12px;
720
+ border-bottom: 1px solid var(--line-soft);
721
+ }
722
+ .run__title { font-weight: 600; font-size: 12.5px; letter-spacing: -0.005em; }
723
+ .run__chip {
724
+ font: 600 10px "JetBrains Mono", monospace;
725
+ padding: 3px 7px;
726
+ border-radius: 20px;
727
+ background: oklch(from var(--accent) l c h / 0.14);
728
+ color: var(--accent);
729
+ border: 1px solid var(--accent-line);
730
+ display: inline-flex; align-items: center; gap: 5px;
731
+ }
732
+ .run__chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: pulse 1s ease-in-out infinite; }
733
+ .run__body { overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
734
+ .run__step {
735
+ display: flex; gap: 10px;
736
+ padding: 9px 10px;
737
+ background: var(--bg);
738
+ border: 1px solid var(--line-soft);
739
+ border-radius: 8px;
740
+ font-size: 11.5px;
741
+ position: relative;
742
+ }
743
+ .run__step.is-current { border-color: var(--accent-line); background: var(--accent-soft); }
744
+ .run__step.is-done .run__marker { background: var(--ok); color: var(--bg); border-color: var(--ok); }
745
+ .run__step.is-current .run__marker { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); animation: pulse 1s ease-in-out infinite; }
746
+ .run__marker {
747
+ width: 20px; height: 20px; flex-shrink: 0;
748
+ border-radius: 50%;
749
+ display: grid; place-items: center;
750
+ font: 600 10px "JetBrains Mono", monospace;
751
+ color: var(--muted);
752
+ border: 1.5px solid var(--line);
753
+ }
754
+ .run__step-title { font-weight: 600; font-size: 11.5px; }
755
+ .run__step-body { color: var(--muted); font-size: 11px; margin-top: 3px; line-height: 1.4; }
756
+ .run__step-body code { color: var(--ink-2); }
757
+ .run__foot {
758
+ padding: 8px 12px;
759
+ border-top: 1px solid var(--line-soft);
760
+ display: flex; align-items: center; justify-content: space-between;
761
+ font-size: 11px; color: var(--muted);
762
+ font-family: "JetBrains Mono", monospace;
763
+ }
764
+
765
+ /* ---------- Empty state ---------- */
766
+ .cv__empty {
767
+ position: absolute;
768
+ inset: 0;
769
+ display: grid; place-items: center;
770
+ color: var(--muted);
771
+ pointer-events: none;
772
+ }
773
+ .cv__empty-card {
774
+ background: var(--surface);
775
+ border: 1px dashed var(--line);
776
+ border-radius: 14px;
777
+ padding: 28px 32px;
778
+ text-align: center;
779
+ pointer-events: auto;
780
+ max-width: 360px;
781
+ box-shadow: var(--shadow);
782
+ }
783
+ .cv__empty-card h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 26px; margin: 8px 0 4px; color: var(--ink); letter-spacing: -0.01em; }
784
+ .cv__empty-card p { font-size: 12px; line-height: 1.5; margin: 0 0 14px; }
785
+
786
+ /* ============================================================
787
+ INSPECTOR (right)
788
+ ============================================================ */
789
+ .insp {
790
+ border-left: 1px solid var(--line);
791
+ background: var(--surface);
792
+ display: flex; flex-direction: column;
793
+ overflow: hidden;
794
+ }
795
+ .insp__head {
796
+ padding: 12px 16px 0;
797
+ border-bottom: 1px solid var(--line-soft);
798
+ background: var(--surface);
799
+ }
800
+ .insp__top {
801
+ display: flex; align-items: center; gap: 8px;
802
+ padding-bottom: 12px;
803
+ }
804
+ .insp__type-pill {
805
+ font: 600 9px "JetBrains Mono", monospace;
806
+ letter-spacing: 0.1em;
807
+ text-transform: uppercase;
808
+ padding: 3px 7px;
809
+ border-radius: 20px;
810
+ background: var(--c-soft, var(--surface-2));
811
+ color: var(--c, var(--ink-2));
812
+ border: 1px solid oklch(from var(--c, var(--line)) l c h / 0.3);
813
+ }
814
+ .insp__name {
815
+ font-weight: 600; font-size: 14px; letter-spacing: -0.01em;
816
+ flex: 1; min-width: 0;
817
+ background: transparent; border: 1px solid transparent;
818
+ color: var(--ink);
819
+ padding: 4px 6px;
820
+ border-radius: 5px;
821
+ font-family: inherit;
822
+ }
823
+ .insp__name:focus { outline: none; border-color: var(--accent-line); background: var(--bg); }
824
+ .insp__tabs {
825
+ display: flex; gap: 2px;
826
+ margin-top: 6px;
827
+ }
828
+ .insp__tab {
829
+ font: 500 11.5px "Space Grotesk";
830
+ color: var(--muted);
831
+ background: transparent;
832
+ border: 0;
833
+ padding: 8px 10px;
834
+ cursor: pointer;
835
+ border-bottom: 2px solid transparent;
836
+ display: inline-flex; align-items: center; gap: 6px;
837
+ margin-bottom: -1px;
838
+ }
839
+ .insp__tab:hover { color: var(--ink-2); }
840
+ .insp__tab.is-active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
841
+ .insp__tab .count {
842
+ font: 600 9.5px "JetBrains Mono", monospace;
843
+ background: var(--surface-2);
844
+ color: var(--muted);
845
+ padding: 2px 5px;
846
+ border-radius: 10px;
847
+ }
848
+ .insp__tab.is-active .count { background: var(--accent-soft); color: var(--accent); }
849
+
850
+ .insp__body { overflow-y: auto; flex: 1; padding-bottom: 24px; }
851
+ .insp__body::-webkit-scrollbar { width: 8px; }
852
+ .insp__body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
853
+
854
+ .insp__section {
855
+ border-bottom: 1px solid var(--line-soft);
856
+ }
857
+ .insp__section-head {
858
+ display: flex; align-items: center; gap: 8px;
859
+ padding: 14px 16px 8px;
860
+ cursor: pointer;
861
+ user-select: none;
862
+ }
863
+ .insp__section-head h4 {
864
+ margin: 0;
865
+ font: 600 10.5px "Space Grotesk";
866
+ letter-spacing: 0.1em;
867
+ text-transform: uppercase;
868
+ color: var(--muted);
869
+ flex: 1;
870
+ }
871
+ .insp__section-head .chev { color: var(--muted-2); transition: transform .16s; }
872
+ .insp__section.is-collapsed .insp__section-body { display: none; }
873
+ .insp__section.is-collapsed .chev { transform: rotate(-90deg); }
874
+ .insp__section-body {
875
+ padding: 4px 16px 16px;
876
+ display: flex; flex-direction: column; gap: 10px;
877
+ }
878
+
879
+ /* ---------- Form fields ---------- */
880
+ .fld { display: flex; flex-direction: column; gap: 5px; }
881
+ .fld__label {
882
+ font: 500 11px "Space Grotesk";
883
+ color: var(--muted);
884
+ display: flex; align-items: center; justify-content: space-between;
885
+ }
886
+ .fld__hint { font-size: 10.5px; color: var(--muted-2); }
887
+ .fld__input,
888
+ .fld__select,
889
+ .fld__textarea {
890
+ font-family: "Space Grotesk", sans-serif;
891
+ font-size: 12.5px;
892
+ background: var(--bg);
893
+ color: var(--ink);
894
+ border: 1px solid var(--line);
895
+ border-radius: 6px;
896
+ padding: 7px 9px;
897
+ width: 100%;
898
+ transition: border-color .12s, box-shadow .12s;
899
+ }
900
+ .fld.is-mono .fld__input,
901
+ .fld.is-mono .fld__textarea { font-family: "JetBrains Mono", monospace; font-size: 11.5px; }
902
+ .fld__input:focus,
903
+ .fld__select:focus,
904
+ .fld__textarea:focus {
905
+ outline: none;
906
+ border-color: var(--accent-line);
907
+ box-shadow: 0 0 0 3px var(--accent-soft);
908
+ }
909
+ .fld__textarea { min-height: 70px; resize: vertical; line-height: 1.5; }
910
+ .fld__select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 26px; }
911
+ .fld.is-err .fld__input, .fld.is-err .fld__select, .fld.is-err .fld__textarea { border-color: var(--err); box-shadow: 0 0 0 3px oklch(from var(--err) l c h / 0.15); }
912
+ .fld__err { font-size: 10.5px; color: var(--err); display: flex; align-items: center; gap: 4px; }
913
+ .fld__ok { font-size: 10.5px; color: var(--ok); display: flex; align-items: center; gap: 4px; }
914
+
915
+ /* ---------- Agent picker (combo) ---------- */
916
+ .combo { position: relative; }
917
+ .combo__btn {
918
+ width: 100%;
919
+ display: flex; align-items: center; gap: 8px;
920
+ background: var(--bg);
921
+ border: 1px solid var(--line);
922
+ border-radius: 6px;
923
+ padding: 6px 8px 6px 6px;
924
+ cursor: pointer;
925
+ font-family: inherit;
926
+ font-size: 12.5px;
927
+ color: var(--ink);
928
+ text-align: left;
929
+ }
930
+ .combo__btn:hover { border-color: var(--line); background: var(--node-hi); }
931
+ .combo__btn:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
932
+ .combo__avatar {
933
+ width: 22px; height: 22px;
934
+ border-radius: 5px;
935
+ display: grid; place-items: center;
936
+ font: 700 10px "Space Grotesk";
937
+ letter-spacing: -0.02em;
938
+ color: oklch(0.25 0.04 265);
939
+ flex-shrink: 0;
940
+ }
941
+ .combo__main { min-width: 0; flex: 1; }
942
+ .combo__name { font-weight: 500; font-size: 12px; letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
943
+ .combo__id { font: 10.5px "JetBrains Mono", monospace; color: var(--muted); }
944
+ .combo__chev { color: var(--muted); }
945
+ .combo__menu {
946
+ position: absolute;
947
+ top: calc(100% + 4px);
948
+ left: 0; right: 0;
949
+ background: var(--surface);
950
+ border: 1px solid var(--line);
951
+ border-radius: 8px;
952
+ box-shadow: var(--shadow);
953
+ z-index: 20;
954
+ max-height: 280px;
955
+ overflow: hidden;
956
+ display: flex; flex-direction: column;
957
+ }
958
+ .combo__menu-search {
959
+ padding: 8px;
960
+ border-bottom: 1px solid var(--line-soft);
961
+ }
962
+ .combo__menu-search input {
963
+ width: 100%;
964
+ background: var(--bg);
965
+ border: 1px solid var(--line);
966
+ border-radius: 5px;
967
+ padding: 5px 8px;
968
+ font: 12px "Space Grotesk";
969
+ color: var(--ink);
970
+ }
971
+ .combo__menu-search input:focus { outline: none; border-color: var(--accent-line); }
972
+ .combo__menu-list { overflow-y: auto; padding: 4px; flex: 1; }
973
+ .combo__opt {
974
+ display: flex; align-items: center; gap: 10px;
975
+ padding: 6px 8px;
976
+ border-radius: 5px;
977
+ cursor: pointer;
978
+ }
979
+ .combo__opt:hover, .combo__opt.is-active { background: var(--accent-soft); }
980
+ .combo__opt-name { font-weight: 500; font-size: 12px; letter-spacing: -0.005em; }
981
+ .combo__opt-id { font: 10.5px "JetBrains Mono", monospace; color: var(--muted); }
982
+ .combo__opt-tags { display: flex; gap: 3px; margin-left: auto; }
983
+ .combo__opt-tag {
984
+ font: 500 9.5px "JetBrains Mono", monospace;
985
+ padding: 1px 5px;
986
+ border-radius: 3px;
987
+ background: var(--surface-2);
988
+ color: var(--muted);
989
+ border: 1px solid var(--line-soft);
990
+ }
991
+
992
+ /* ---------- Expression editor ---------- */
993
+ .expr {
994
+ position: relative;
995
+ }
996
+ .expr__box {
997
+ font-family: "JetBrains Mono", monospace;
998
+ font-size: 11.5px;
999
+ line-height: 1.55;
1000
+ background: var(--bg);
1001
+ border: 1px solid var(--line);
1002
+ border-radius: 6px;
1003
+ padding: 8px 10px;
1004
+ color: var(--ink);
1005
+ min-height: 72px;
1006
+ resize: vertical;
1007
+ width: 100%;
1008
+ }
1009
+ .expr__box:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
1010
+ .expr__hint {
1011
+ font: 500 10.5px "Space Grotesk";
1012
+ color: var(--muted);
1013
+ display: flex; gap: 4px; align-items: center; margin-top: 2px;
1014
+ }
1015
+ .expr__hint code {
1016
+ background: var(--surface-2);
1017
+ padding: 1px 5px;
1018
+ border-radius: 3px;
1019
+ color: var(--accent);
1020
+ border: 1px solid var(--line-soft);
1021
+ }
1022
+ .expr__popover {
1023
+ position: absolute;
1024
+ left: 0; top: calc(100% + 4px);
1025
+ background: var(--surface);
1026
+ border: 1px solid var(--line);
1027
+ border-radius: 8px;
1028
+ padding: 6px;
1029
+ max-height: 240px;
1030
+ overflow-y: auto;
1031
+ width: 300px;
1032
+ z-index: 30;
1033
+ box-shadow: var(--shadow);
1034
+ }
1035
+ .expr__pop-group {
1036
+ font: 600 9.5px "JetBrains Mono", monospace;
1037
+ letter-spacing: 0.08em;
1038
+ text-transform: uppercase;
1039
+ color: var(--muted);
1040
+ padding: 8px 8px 4px;
1041
+ }
1042
+ .expr__pop-opt {
1043
+ display: flex; gap: 10px; align-items: center;
1044
+ padding: 5px 8px;
1045
+ border-radius: 5px;
1046
+ cursor: pointer;
1047
+ font: 11.5px "JetBrains Mono", monospace;
1048
+ }
1049
+ .expr__pop-opt:hover, .expr__pop-opt.is-active { background: var(--accent-soft); }
1050
+ .expr__pop-opt b { color: var(--accent); font-weight: 600; }
1051
+ .expr__pop-opt .typ {
1052
+ margin-left: auto;
1053
+ font: 500 9.5px "Space Grotesk";
1054
+ color: var(--muted);
1055
+ padding: 1px 5px;
1056
+ background: var(--surface-2);
1057
+ border-radius: 3px;
1058
+ border: 1px solid var(--line-soft);
1059
+ }
1060
+
1061
+ /* ---------- Cards inside inspector ---------- */
1062
+ .card {
1063
+ background: var(--bg);
1064
+ border: 1px solid var(--line);
1065
+ border-radius: 8px;
1066
+ padding: 10px;
1067
+ display: flex; flex-direction: column; gap: 8px;
1068
+ }
1069
+ .card__head {
1070
+ display: flex; align-items: center; gap: 8px;
1071
+ justify-content: space-between;
1072
+ }
1073
+ .card__title {
1074
+ display: flex; align-items: center; gap: 6px;
1075
+ font-weight: 600; font-size: 11.5px; letter-spacing: -0.005em;
1076
+ }
1077
+ .card__del {
1078
+ background: transparent; border: 0; padding: 3px;
1079
+ border-radius: 4px; color: var(--muted); cursor: pointer;
1080
+ }
1081
+ .card__del:hover { color: var(--err); background: oklch(from var(--err) l c h / 0.12); }
1082
+ .card__kind {
1083
+ font: 600 9.5px "JetBrains Mono", monospace;
1084
+ letter-spacing: 0.08em;
1085
+ text-transform: uppercase;
1086
+ padding: 2px 6px;
1087
+ border-radius: 3px;
1088
+ background: var(--surface-2);
1089
+ color: var(--muted);
1090
+ border: 1px solid var(--line-soft);
1091
+ }
1092
+ .card__add {
1093
+ background: transparent;
1094
+ border: 1px dashed var(--line);
1095
+ border-radius: 6px;
1096
+ padding: 8px;
1097
+ width: 100%;
1098
+ font: 500 11.5px "Space Grotesk";
1099
+ color: var(--muted);
1100
+ cursor: pointer;
1101
+ display: flex; align-items: center; justify-content: center; gap: 6px;
1102
+ }
1103
+ .card__add:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
1104
+
1105
+ /* ---------- Empty inspector state ---------- */
1106
+ .insp__empty {
1107
+ padding: 40px 24px;
1108
+ text-align: center;
1109
+ color: var(--muted);
1110
+ }
1111
+ .insp__empty h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 24px; margin: 4px 0 2px; color: var(--ink); letter-spacing: -0.005em; }
1112
+ .insp__empty p { font-size: 12px; line-height: 1.5; margin: 0; }
1113
+ .insp__empty-shortcuts { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; font-size: 11.5px; color: var(--ink-2); text-align: left; }
1114
+ .insp__empty-shortcuts div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line-soft); }
1115
+ .insp__empty-shortcuts div:last-child { border: 0; }
1116
+ .insp__empty-shortcuts div > span:first-child { flex: 1; min-width: 0; text-align: left; white-space: nowrap; color: var(--ink-2); }
1117
+ .insp__empty-shortcuts div > *:not(:first-child) { flex-shrink: 0; display: inline-flex; gap: 4px; }
1118
+
1119
+ /* ============================================================
1120
+ Tweaks panel
1121
+ ============================================================ */
1122
+ .tweaks {
1123
+ position: fixed;
1124
+ right: 396px;
1125
+ bottom: 16px;
1126
+ width: 260px;
1127
+ background: var(--surface);
1128
+ border: 1px solid var(--line);
1129
+ border-radius: 12px;
1130
+ box-shadow: var(--shadow);
1131
+ z-index: 100;
1132
+ font-size: 12px;
1133
+ overflow: hidden;
1134
+ }
1135
+ .tweaks__head {
1136
+ padding: 10px 12px;
1137
+ border-bottom: 1px solid var(--line-soft);
1138
+ font: 600 10.5px "Space Grotesk"; letter-spacing: 0.1em; text-transform: uppercase;
1139
+ color: var(--muted);
1140
+ display: flex; justify-content: space-between; align-items: center;
1141
+ }
1142
+ .tweaks__body { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
1143
+ .tweaks__row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11.5px; }
1144
+ .tweaks__row label { color: var(--muted); }
1145
+ .tweaks__opts { display: flex; gap: 4px; }
1146
+ .tweaks__opts button {
1147
+ font: 500 11px "Space Grotesk";
1148
+ background: transparent;
1149
+ border: 1px solid var(--line);
1150
+ border-radius: 5px;
1151
+ padding: 4px 8px;
1152
+ cursor: pointer;
1153
+ color: var(--ink-2);
1154
+ }
1155
+ .tweaks__opts button.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
1156
+ .tweaks__hue {
1157
+ display: flex; gap: 6px; flex-wrap: wrap;
1158
+ }
1159
+ .tweaks__hue button {
1160
+ width: 22px; height: 22px;
1161
+ border-radius: 50%;
1162
+ border: 2px solid transparent;
1163
+ cursor: pointer;
1164
+ padding: 0;
1165
+ }
1166
+ .tweaks__hue button.on { border-color: var(--ink); }
1167
+
1168
+ /* ============================================================
1169
+ Keyboard overlay
1170
+ ============================================================ */
1171
+ .kbd-overlay {
1172
+ position: fixed; inset: 0;
1173
+ background: oklch(0 0 0 / 0.5);
1174
+ z-index: 200;
1175
+ display: grid; place-items: center;
1176
+ backdrop-filter: blur(4px);
1177
+ }
1178
+ .kbd-card {
1179
+ background: var(--surface);
1180
+ border: 1px solid var(--line);
1181
+ border-radius: 14px;
1182
+ padding: 24px 28px;
1183
+ width: 520px;
1184
+ box-shadow: var(--shadow);
1185
+ }
1186
+ .kbd-card h3 { font-family: "Instrument Serif", serif; font-weight: 400; font-size: 28px; margin: 0 0 16px; letter-spacing: -0.01em; }
1187
+ .kbd-card .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line-soft); font-size: 12.5px; }
1188
+ .kbd-card .row:last-child { border: 0; }
1189
+ .kbd-card .row span:first-child { color: var(--ink-2); }
1190
+
1191
+ /* ============================================================
1192
+ Toast
1193
+ ============================================================ */
1194
+ .toast {
1195
+ position: fixed;
1196
+ bottom: 20px; left: 50%;
1197
+ transform: translateX(-50%);
1198
+ padding: 8px 16px;
1199
+ background: var(--surface);
1200
+ border: 1px solid var(--line);
1201
+ border-radius: 8px;
1202
+ font-size: 12px;
1203
+ z-index: 150;
1204
+ box-shadow: var(--shadow);
1205
+ display: inline-flex; align-items: center; gap: 8px;
1206
+ }
1207
+ .toast .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
1208
+ .toast.err .dot { background: var(--err); }
1209
+
1210
+ /* ============================================================
1211
+ Connecting-edge ghost
1212
+ ============================================================ */
1213
+ .cv__ghost-edge {
1214
+ position: absolute; inset: 0;
1215
+ pointer-events: none;
1216
+ z-index: 8;
1217
+ }
1218
+ .cv__ghost-edge path {
1219
+ fill: none;
1220
+ stroke: var(--accent);
1221
+ stroke-width: 2;
1222
+ stroke-dasharray: 6 4;
1223
+ animation: dash 0.6s linear infinite;
1224
+ }
1225
+
1226
+ /* Utilities */
1227
+ .hstack { display: flex; gap: 8px; align-items: center; }
1228
+ .vstack { display: flex; flex-direction: column; gap: 8px; }
1229
+ .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
1230
+ `;var _p=re(Qd(),1);var O=re(St(),1);var Ue=re(St(),1);var y=re(_e(),1),W=({children:e,size:t=14,...n})=>(0,y.jsx)("svg",{viewBox:"0 0 16 16",width:t,height:t,fill:"none",stroke:"currentColor",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round",...n,children:e}),A={gitlab:()=>(0,y.jsx)(W,{children:(0,y.jsx)("path",{d:"M8 14L2 7l1.2-4.5L5 7h6l1.8-4.5L14 7z"})}),clock:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,y.jsx)("path",{d:"M8 5v3l2 1.5"})]}),hook:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("path",{d:"M4 3v4a4 4 0 0 0 4 4h4"}),(0,y.jsx)("path",{d:"M10 9l2 2-2 2"})]}),play:()=>(0,y.jsx)(W,{children:(0,y.jsx)("path",{d:"M5 3.5l7 4.5-7 4.5z",fill:"currentColor"})}),box:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("rect",{x:"2.5",y:"2.5",width:"11",height:"11",rx:"1.5"}),(0,y.jsx)("path",{d:"M2.5 6h11M6 2.5v11"})]}),branch:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("circle",{cx:"4",cy:"4",r:"1.5"}),(0,y.jsx)("circle",{cx:"12",cy:"12",r:"1.5"}),(0,y.jsx)("circle",{cx:"12",cy:"4",r:"1.5"}),(0,y.jsx)("path",{d:"M4 5.5v3a2 2 0 0 0 2 2h4.5"}),(0,y.jsx)("path",{d:"M12 5.5v5"})]}),stop:()=>(0,y.jsx)(W,{children:(0,y.jsx)("rect",{x:"3",y:"3",width:"10",height:"10",rx:"1"})}),msg:()=>(0,y.jsx)(W,{children:(0,y.jsx)("path",{d:"M2.5 3.5h11v8h-6l-3 2.5v-2.5h-2z"})}),tag:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("path",{d:"M8 2h5v5l-6 6-5-5z"}),(0,y.jsx)("circle",{cx:"10.5",cy:"5.5",r:.8,fill:"currentColor"})]}),bell:()=>(0,y.jsx)(W,{children:(0,y.jsx)("path",{d:"M4 11V7a4 4 0 0 1 8 0v4l1 1.5H3zM6.5 13.5a1.5 1.5 0 0 0 3 0"})}),globe:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,y.jsx)("path",{d:"M2.5 8h11M8 2.5c2 2 2 9 0 11M8 2.5c-2 2-2 9 0 11"})]}),search:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("circle",{cx:"7",cy:"7",r:"4"}),(0,y.jsx)("path",{d:"M10 10l3.5 3.5"})]}),undo:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("path",{d:"M4 7h6a3 3 0 0 1 0 6H7"}),(0,y.jsx)("path",{d:"M6.5 4.5L4 7l2.5 2.5"})]}),redo:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("path",{d:"M12 7H6a3 3 0 0 0 0 6h3"}),(0,y.jsx)("path",{d:"M9.5 4.5L12 7 9.5 9.5"})]}),save:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("path",{d:"M3 3h8l2 2v8H3z"}),(0,y.jsx)("path",{d:"M5 3v4h6V3M5 13v-4h6v4"})]}),run:()=>(0,y.jsx)(W,{children:(0,y.jsx)("path",{d:"M5 3.5l7 4.5-7 4.5z",fill:"currentColor"})}),stop2:()=>(0,y.jsx)(W,{children:(0,y.jsx)("rect",{x:"4",y:"4",width:"8",height:"8",rx:"1",fill:"currentColor"})}),sun:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("circle",{cx:"8",cy:"8",r:"2.75"}),(0,y.jsx)("path",{d:"M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.5 3.5l1.4 1.4M11.1 11.1l1.4 1.4M3.5 12.5l1.4-1.4M11.1 4.9l1.4-1.4"})]}),moon:()=>(0,y.jsx)(W,{children:(0,y.jsx)("path",{d:"M13 9.5A5.5 5.5 0 0 1 6.5 3 5.5 5.5 0 1 0 13 9.5z"})}),plus:()=>(0,y.jsx)(W,{children:(0,y.jsx)("path",{d:"M8 3v10M3 8h10"})}),trash:()=>(0,y.jsx)(W,{children:(0,y.jsx)("path",{d:"M3 4.5h10M6 4.5V3h4v1.5M4.5 4.5l.5 8h6l.5-8"})}),chev:()=>(0,y.jsx)(W,{children:(0,y.jsx)("path",{d:"M4 6l4 4 4-4"})}),x:()=>(0,y.jsx)(W,{children:(0,y.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"})}),more:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("circle",{cx:"4",cy:"8",r:"1",fill:"currentColor",stroke:"none"}),(0,y.jsx)("circle",{cx:"8",cy:"8",r:"1",fill:"currentColor",stroke:"none"}),(0,y.jsx)("circle",{cx:"12",cy:"8",r:"1",fill:"currentColor",stroke:"none"})]}),check:()=>(0,y.jsx)(W,{children:(0,y.jsx)("path",{d:"M3 8.5l3 3 7-7"})}),warn:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("path",{d:"M8 2l6 11H2z"}),(0,y.jsx)("path",{d:"M8 6.5v3M8 11.2v.3"})]}),err:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,y.jsx)("path",{d:"M8 5v3.5M8 10.5v.3"})]}),zoomin:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("circle",{cx:"7",cy:"7",r:"4"}),(0,y.jsx)("path",{d:"M10 10l3.5 3.5M5 7h4M7 5v4"})]}),zoomout:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("circle",{cx:"7",cy:"7",r:"4"}),(0,y.jsx)("path",{d:"M10 10l3.5 3.5M5 7h4"})]}),fit:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("path",{d:"M3 5V3h2M13 5V3h-2M3 11v2h2M13 11v2h-2"}),(0,y.jsx)("rect",{x:"6",y:"6",width:"4",height:"4",rx:.5})]}),minus:()=>(0,y.jsx)(W,{children:(0,y.jsx)("path",{d:"M3 8h10"})}),kbd:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("rect",{x:"1.5",y:"4",width:"13",height:"8",rx:"1.5"}),(0,y.jsx)("path",{d:"M4 7h.5M6 7h.5M8 7h.5M10 7h.5M4 10h7"})]}),lightning:()=>(0,y.jsx)(W,{children:(0,y.jsx)("path",{d:"M9 2L3 9h4l-1 5 6-7H8z",fill:"currentColor",fillOpacity:.2})}),variable:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("path",{d:"M4 3c-2 3-2 7 0 10M12 3c2 3 2 7 0 10"}),(0,y.jsx)("path",{d:"M6 7.5h.5l1 1 1-1h.5M6 10l1.5-1.5M9 10l-1.5-1.5"})]}),users:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("circle",{cx:"6",cy:"6",r:"2"}),(0,y.jsx)("path",{d:"M2.5 12c.5-2 2-3 3.5-3s3 1 3.5 3"}),(0,y.jsx)("circle",{cx:"11",cy:"5",r:"1.5"}),(0,y.jsx)("path",{d:"M10 10.5c.5-1 1.2-1.5 2-1.5 1 0 2 .8 2.3 2"})]}),grid:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("rect",{x:"2.5",y:"2.5",width:"4",height:"4"}),(0,y.jsx)("rect",{x:"9.5",y:"2.5",width:"4",height:"4"}),(0,y.jsx)("rect",{x:"2.5",y:"9.5",width:"4",height:"4"}),(0,y.jsx)("rect",{x:"9.5",y:"9.5",width:"4",height:"4"})]}),eye:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("path",{d:"M1.5 8C3 5 5.3 3.5 8 3.5S13 5 14.5 8C13 11 10.7 12.5 8 12.5S3 11 1.5 8z"}),(0,y.jsx)("circle",{cx:"8",cy:"8",r:"1.8"})]}),slide:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("rect",{x:"2.5",y:"3.5",width:"11",height:"9",rx:"1"}),(0,y.jsx)("path",{d:"M5 6h6M5 8.5h4M5 11h5"})]}),gear:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("circle",{cx:"8",cy:"8",r:"2"}),(0,y.jsx)("path",{d:"M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.5 3.5l1.4 1.4M11.1 11.1l1.4 1.4M3.5 12.5l1.4-1.4M11.1 4.9l1.4-1.4"})]}),flag:()=>(0,y.jsx)(W,{children:(0,y.jsx)("path",{d:"M3 13V3h7l-1 2.5L10 8H3"})}),dup:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("rect",{x:"5",y:"5",width:"8",height:"8",rx:"1"}),(0,y.jsx)("path",{d:"M3 9V3h6"})]}),layout:()=>(0,y.jsxs)(W,{children:[(0,y.jsx)("path",{d:"M2.5 3.5h11v9h-11z"}),(0,y.jsx)("path",{d:"M2.5 7h11M7 7v5.5"})]})};var C=re(_e(),1),th={trigger:220,state:240,branch:260,action:220,end:160,agent:240,checkpoint:220,transform:220},nh={trigger:46,state:118,branch:110,action:78,end:46,agent:118,checkpoint:92,transform:78};function Zd(e){return e.startsWith("trigger.")?"trigger":e.startsWith("action.")?"action":e}function Zn(e){let t=Zd(e.type);return{w:th[t]??220,h:nh[t]??100}}function er(e){return e.position?.x??0}function tr(e){return e.position?.y??0}function Ni(e,t){let{w:n,h:r}=Zn(e),o=er(e),i=tr(e);return t==="in"?{x:o,y:i+r/2}:t==="out"?{x:o+n,y:i+r/2}:t==="true"?{x:o+n,y:i+r*.3}:t==="false"?{x:o+n,y:i+r*.7}:{x:o+n/2,y:i+r/2}}function qd(e,t){let n=Math.max(40,Math.abs(t.x-e.x)*.45);return`M ${e.x} ${e.y} C ${e.x+n} ${e.y}, ${t.x-n} ${t.y}, ${t.x} ${t.y}`}function rh(e){let{n:t,selected:n,state:r}=e,{w:o}=Zn(t),i=Zd(t.type),a=t.config,u=i==="trigger"?a.source==="cron"?"clock":a.source==="webhook"||a.source==="hook"?"hook":a.source==="manual"?"play":"gitlab":i==="agent"?"box":i==="branch"?"branch":i==="action"?t.type==="action.send"?"msg":t.type==="action.setLabel"?"tag":t.type==="action.react"?"bell":t.type==="action.callHTTP"?"globe":t.type==="action.logTime"?"clock":t.type==="action.createIssue"?"plus":"lightning":i==="checkpoint"?"flag":i==="transform"?"variable":"stop",s=A[u]??A.box,c=["node",`t-${i}`,n&&"is-selected",r==="running"&&"is-running",r==="visited"&&"is-visited",r==="error"&&"is-error"].filter(Boolean).join(" "),d={left:er(t),top:tr(t),width:o},g=a.agentId,m=a.prompt;return(0,C.jsxs)("div",{className:c,style:d,onMouseDown:v=>e.onMouseDown?.(v,t),onClick:v=>e.onClick?.(v,t),onDoubleClick:v=>e.onDoubleClick?.(v,t),children:[(0,C.jsx)("div",{className:"node__stripe"}),(0,C.jsxs)("div",{className:"node__head",children:[(0,C.jsx)("div",{className:"node__icon",children:(0,C.jsx)(s,{})}),(0,C.jsxs)("div",{className:"node__meta",children:[(0,C.jsx)("div",{className:"node__kind",children:t.type}),(0,C.jsx)("div",{className:"node__name",children:t.id})]}),i!=="trigger"&&i!=="end"&&(0,C.jsx)("div",{className:"node__chev",children:(0,C.jsx)(A.more,{})})]}),i==="agent"&&(0,C.jsxs)("div",{className:"node__body",children:[g?(0,C.jsxs)("div",{className:"node__row",children:[(0,C.jsx)(A.users,{}),(0,C.jsx)("span",{className:"mono",children:g})]}):(0,C.jsx)("div",{className:"node__row",style:{color:"var(--muted-2)"},children:"no agent"}),m&&(0,C.jsx)("div",{className:"node__row",style:{alignItems:"flex-start",lineHeight:1.4},children:(0,C.jsx)("span",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:"var(--ink-2)",fontSize:11},children:m})})]}),i==="branch"&&(0,C.jsx)("div",{className:"node__body",children:(0,C.jsx)("div",{className:"node__row",children:(0,C.jsxs)("span",{className:"mono",style:{color:"var(--ink-2)"},children:[Array.isArray(a.cases)?a.cases.length:0," case",Array.isArray(a.cases)&&a.cases.length===1?"":"s"," \xB7 default: ",(0,C.jsx)("span",{className:"node__tag mono",children:String(a.default??"\u2014")})]})})}),i==="action"&&(0,C.jsxs)("div",{className:"node__body",children:[(0,C.jsx)("div",{className:"node__row",children:(0,C.jsx)("span",{className:"mono",style:{color:"var(--t-action)"},children:t.type.replace(/^action\./,"")})}),(0,C.jsx)("div",{className:"node__row",children:(0,C.jsx)("span",{style:{fontSize:11,color:"var(--ink-2)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:String(a.text??a.body??a.title??a.url??"")})})]}),i==="trigger"&&(0,C.jsx)("div",{className:"node__body",children:(0,C.jsx)("div",{className:"node__row",children:(0,C.jsx)("span",{className:"mono",style:{color:"var(--t-trigger)"},children:String(a.source??"")})})}),i!=="trigger"&&(0,C.jsx)("div",{className:"handle h-in",onMouseDown:v=>e.onPortDown?.(v,t,"in"),onMouseEnter:()=>e.onPortEnter?.(t,"in"),onMouseLeave:()=>e.onPortLeave?.()}),i==="branch"?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{className:"handle h-true",onMouseDown:v=>e.onPortDown?.(v,t,"true"),onMouseEnter:()=>e.onPortEnter?.(t,"true"),onMouseLeave:()=>e.onPortLeave?.(),children:(0,C.jsx)("span",{className:"handle__label",children:"true"})}),(0,C.jsx)("div",{className:"handle h-false",onMouseDown:v=>e.onPortDown?.(v,t,"false"),onMouseEnter:()=>e.onPortEnter?.(t,"false"),onMouseLeave:()=>e.onPortLeave?.(),children:(0,C.jsx)("span",{className:"handle__label",children:"false"})})]}):i!=="end"&&(0,C.jsx)("div",{className:"handle h-out",onMouseDown:v=>e.onPortDown?.(v,t,"out"),onMouseEnter:()=>e.onPortEnter?.(t,"out"),onMouseLeave:()=>e.onPortLeave?.()})]})}function oh({nodes:e,viewBox:t,selection:n,hostRef:r}){let[o,i]=(0,Ue.useState)(!1);if(!e.length)return null;let a=60,u=e.map(P=>er(P)),s=e.map(P=>tr(P)),c=e.map(P=>Zn(P).w),d=e.map(P=>Zn(P).h),g=Math.min(...u)-a,m=Math.min(...s)-a,v=Math.max(...u.map((P,H)=>P+c[H]))+a,k=Math.max(...s.map((P,H)=>P+d[H]))+a,S=v-g,$=k-m,f=r.current?.getBoundingClientRect(),p=f?.width??800,h=f?.height??500,x=-t.tx/t.zoom,E=-t.ty/t.zoom,M=p/t.zoom,F=h/t.zoom;return(0,C.jsxs)("div",{className:"cv__mini"+(o?" is-collapsed":""),children:[(0,C.jsxs)("div",{className:"cv__mini-head",children:[(0,C.jsx)("span",{children:"Map"}),(0,C.jsx)("button",{onClick:()=>i(!o),children:(0,C.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 10 10",children:(0,C.jsx)("path",{d:o?"M2 4l3 3 3-3":"M2 6l3-3 3 3",fill:"none",stroke:"currentColor",strokeWidth:1.4,strokeLinecap:"round"})})})]}),!o&&(0,C.jsxs)("svg",{viewBox:`${g} ${m} ${S} ${$}`,preserveAspectRatio:"xMidYMid meet",children:[(0,C.jsx)("rect",{className:"mini-view",x,y:E,width:M,height:F}),e.map(P=>{let H=Zn(P),U=n?.kind==="node"&&n.id===P.id;return(0,C.jsx)("rect",{className:"mini-node"+(U?" sel":""),x:er(P),y:tr(P),width:H.w,height:H.h,rx:3},P.id)})]})]})}function ep(e){let{nodes:t,edges:n,selection:r,setSelection:o,onNodeMove:i,onAddNode:a,onConnect:u,runState:s,viewBox:c,setViewBox:d}=e,g=(0,Ue.useRef)(null),[m,v]=(0,Ue.useState)(null),[k,S]=(0,Ue.useState)(null),[$,f]=(0,Ue.useState)(!1),[p,h]=(0,Ue.useState)(null),[x,E]=(0,Ue.useState)(null),[M,F]=(0,Ue.useState)(null),{zoom:P,tx:H,ty:U}=c,be=(N,j)=>{let z=g.current;if(!z)return{x:0,y:0};let G=z.getBoundingClientRect();return{x:(N-G.left-H)/P,y:(j-G.top-U)/P}},on=N=>{let j=N.target;j!==N.currentTarget&&!j.classList.contains("cv__viewport")||N.button!==0&&N.button!==1||(o(null),E({startX:N.clientX,startY:N.clientY,tx:H,ty:U}))},ft=(N,j)=>{if(N.target.classList.contains("handle"))return;N.stopPropagation(),o({kind:"node",id:j.id});let z=be(N.clientX,N.clientY);v({id:j.id,offX:z.x-er(j),offY:z.y-tr(j)})},gt=(N,j,z)=>{N.stopPropagation(),N.preventDefault();let G=Ni(j,z);S({from:{id:j.id,port:z},x:G.x,y:G.y})},Ti=(N,j)=>{k&&h({id:N.id,port:j})},Mi=()=>h(null);(0,Ue.useEffect)(()=>{let N=z=>{if(m){let G=be(z.clientX,z.clientY);i(m.id,G.x-m.offX,G.y-m.offY)}else if(k){let G=be(z.clientX,z.clientY);S(ne=>ne&&{...ne,x:G.x,y:G.y})}else x&&d(G=>({...G,tx:x.tx+(z.clientX-x.startX),ty:x.ty+(z.clientY-x.startY)}))},j=()=>{k&&p&&p.id!==k.from.id&&u({from:k.from.id,fromPort:k.from.port,to:p.id,toPort:"in"}),v(null),S(null),E(null),h(null)};return window.addEventListener("mousemove",N),window.addEventListener("mouseup",j),()=>{window.removeEventListener("mousemove",N),window.removeEventListener("mouseup",j)}},[m,k,x,p,u,i,d]);let or=N=>{if(!N.ctrlKey&&!N.metaKey&&Math.abs(N.deltaY)<30){d(de=>({...de,tx:de.tx-N.deltaX,ty:de.ty-N.deltaY}));return}N.preventDefault();let j=g.current;if(!j)return;let z=j.getBoundingClientRect(),G=N.clientX-z.left,ne=N.clientY-z.top,fe=-N.deltaY*.0015;d(de=>{let rt=Math.min(2,Math.max(.3,de.zoom*(1+fe))),ot=rt/de.zoom;return{zoom:rt,tx:G-(G-de.tx)*ot,ty:ne-(ne-de.ty)*ot}})},_n=()=>d(N=>({...N,zoom:Math.min(2,N.zoom*1.15)})),ir=()=>d(N=>({...N,zoom:Math.max(.3,N.zoom/1.15)})),Fi=()=>{let N=g.current;if(!N||!t.length)return;let j=N.getBoundingClientRect(),z=60,G=1/0,ne=1/0,fe=-1/0,de=-1/0;t.forEach(_t=>{let eo=Zn(_t),R=er(_t),I=tr(_t);G=Math.min(G,R),ne=Math.min(ne,I),fe=Math.max(fe,R+eo.w),de=Math.max(de,I+eo.h)});let rt=fe-G+z*2,ot=de-ne+z*2,kt=Math.min(1,Math.min(j.width/rt,j.height/ot));d({zoom:kt,tx:(j.width-rt*kt)/2-(G-z)*kt,ty:(j.height-ot*kt)/2-(ne-z)*kt})},Ri=N=>{N.preventDefault(),f(!0)},Ii=()=>f(!1),Li=N=>{N.preventDefault(),f(!1);let j=N.dataTransfer.getData("application/x-wfe-item");if(j)try{let z=JSON.parse(j),G=be(N.clientX,N.clientY);a(z,G.x-100,G.y-40)}catch{}},zi=N=>{let j=N.id??"",z=["wfe-edge"];return r?.kind==="edge"&&r.id===j&&z.push("is-selected"),M===j&&z.push("is-hover"),s?.currentEdgeId===j&&z.push("is-running"),j&&s?.visitedEdges?.has(j)&&z.push("is-visited"),N.fromPort==="true"&&z.push("is-true"),N.fromPort==="false"&&z.push("is-false"),z.join(" ")},Oi=N=>s?.currentNodeId===N.id?"running":s?.visitedNodes?.has(N.id)?"visited":null,Ai=(0,Ue.useMemo)(()=>{if(!k)return null;let N=t.find(G=>G.id===k.from.id);if(!N)return null;let j=Ni(N,k.from.port),z={x:k.x,y:k.y};return(0,C.jsx)("svg",{className:"cv__ghost-edge",width:"4000",height:"2400",children:(0,C.jsx)("path",{d:qd(j,z)})})},[k,t]);return(0,C.jsxs)("div",{className:"cv"+(x?" is-panning":"")+($?" is-drop-target":""),ref:g,onWheel:or,onMouseDown:on,onDragOver:Ri,onDragLeave:Ii,onDrop:Li,children:[(0,C.jsxs)("div",{className:"cv__viewport",style:{transform:`translate(${H}px, ${U}px) scale(${P})`},children:[(0,C.jsxs)("svg",{className:"cv__edges",width:"4000",height:"2400",children:[(0,C.jsxs)("defs",{children:[(0,C.jsx)("marker",{id:"arr",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,C.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"currentColor"})}),(0,C.jsx)("marker",{id:"arr-ok",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,C.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"var(--ok)"})}),(0,C.jsx)("marker",{id:"arr-err",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,C.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"var(--err)"})}),(0,C.jsx)("marker",{id:"arr-acc",viewBox:"0 0 10 10",refX:"9",refY:"5",markerWidth:"8",markerHeight:"8",orient:"auto",children:(0,C.jsx)("path",{d:"M0 0L10 5L0 10z",fill:"var(--accent)"})})]}),n.map((N,j)=>{let z=t.find(_t=>_t.id===N.from),G=t.find(_t=>_t.id===N.to);if(!z||!G)return null;let ne=N.id??`e-${j}`,fe=Ni(z,N.fromPort??"out"),de=Ni(G,N.toPort??"in"),rt=qd(fe,de),ot={x:(fe.x+de.x)/2,y:(fe.y+de.y)/2},kt=s?.currentEdgeId===ne||s?.visitedEdges?.has(ne)?"url(#arr-acc)":N.fromPort==="true"?"url(#arr-ok)":N.fromPort==="false"?"url(#arr-err)":"url(#arr)";return(0,C.jsxs)("g",{children:[(0,C.jsx)("path",{className:"edge-bg",d:rt,onMouseEnter:()=>F(ne),onMouseLeave:()=>F(null),onClick:()=>o({kind:"edge",id:ne})}),(0,C.jsx)("path",{className:zi(N),d:rt,markerEnd:kt}),N.label&&(0,C.jsxs)("g",{transform:`translate(${ot.x},${ot.y})`,children:[(0,C.jsx)("rect",{className:"edge-label-bg",x:-N.label.length*3.6-6,y:-9,rx:3,width:N.label.length*7.2+12,height:18}),(0,C.jsx)("text",{className:"edge-label",y:4,textAnchor:"middle",children:N.label})]})]},ne)})]}),Ai,t.map(N=>(0,C.jsx)(rh,{n:N,selected:r?.kind==="node"&&r.id===N.id,state:Oi(N),onMouseDown:ft,onPortDown:gt,onPortEnter:Ti,onPortLeave:Mi,onClick:(j,z)=>{j.stopPropagation(),o({kind:"node",id:z.id})}},N.id))]}),(0,C.jsxs)("div",{className:"cv__controls",children:[(0,C.jsx)("button",{title:"Zoom out",onClick:ir,children:(0,C.jsx)(A.zoomout,{})}),(0,C.jsxs)("div",{className:"cv__zoom",children:[Math.round(P*100),"%"]}),(0,C.jsx)("button",{title:"Zoom in",onClick:_n,children:(0,C.jsx)(A.zoomin,{})}),(0,C.jsx)("button",{title:"Fit",onClick:Fi,children:(0,C.jsx)(A.fit,{})})]}),(0,C.jsx)(oh,{nodes:t,viewBox:c,selection:r,hostRef:g})]})}var te=re(St(),1);var rs=[{section:"Triggers",items:[{id:"trigger.channel.whatsapp",type:"trigger.channel",label:"WhatsApp",hint:"On incoming WhatsApp message",glyph:"g-trigger",icon:"msg"},{id:"trigger.channel.telegram",type:"trigger.channel",label:"Telegram",hint:"On incoming Telegram message",glyph:"g-trigger",icon:"msg"},{id:"trigger.channel.gitlab",type:"trigger.channel",label:"GitLab",hint:"Issue / pipeline events",glyph:"g-trigger",icon:"gitlab"},{id:"trigger.cron",type:"trigger.cron",label:"Cron",hint:"Fires on a timer",glyph:"g-trigger",icon:"clock"},{id:"trigger.manual",type:"trigger.manual",label:"Manual",hint:"Kick off from UI / CLI",glyph:"g-trigger",icon:"play"},{id:"trigger.form",type:"trigger.form",label:"Form",hint:"Human fills a form to start",glyph:"g-trigger",icon:"plus"}]},{section:"Compute",items:[{id:"node.agent",type:"agent",label:"Agent",hint:"Run an agent with a templated prompt",glyph:"g-state",icon:"box"},{id:"node.transform",type:"transform",label:"Transform",hint:"Derive a bundle from upstream outputs",glyph:"g-state",icon:"variable"}]},{section:"People & composition",items:[{id:"node.userTask",type:"userTask",label:"User task",hint:"Assign a form to an actor / role; pauses the run",glyph:"g-state",icon:"box"},{id:"node.subProcess",type:"subProcess",label:"Sub-process",hint:"Call another workflow; parent resumes on child end",glyph:"g-state",icon:"box"},{id:"node.signal.emit",type:"signal.emit",label:"Emit signal",hint:"Post an event to other workflows",glyph:"g-action",icon:"msg"},{id:"node.signal.wait",type:"signal.wait",label:"Wait for signal",hint:"Pause until a matching signal arrives",glyph:"g-branch",icon:"flag"},{id:"node.timer.boundary",type:"timer.boundary",label:"Timer",hint:"Pause then fire after a duration (PT1H, P1D\u2026)",glyph:"g-branch",icon:"clock"}]},{section:"Flow control",items:[{id:"node.branch",type:"branch",label:"Branch",hint:"Route based on a condition",glyph:"g-branch",icon:"branch"},{id:"node.gateway.parallel",type:"gateway.parallel",label:"Parallel gateway",hint:"Fan out / join branches (mode: fanOut | join)",glyph:"g-branch",icon:"branch"},{id:"node.rule",type:"rule",label:"Decision table",hint:"DMN-style N-input rules; first match wins",glyph:"g-branch",icon:"branch"},{id:"node.checkpoint",type:"checkpoint",label:"Checkpoint",hint:"Persist state, pause for event",glyph:"g-branch",icon:"flag"},{id:"node.end",type:"end",label:"End",hint:"Run completes here",glyph:"g-end",icon:"stop"}]},{section:"Actions",items:[{id:"action.send",type:"action.send",label:"Send message",hint:"Post a message to any channel",glyph:"g-action",icon:"msg"},{id:"action.createIssue",type:"action.createIssue",label:"Create issue",hint:"Open a new GitLab issue",glyph:"g-action",icon:"plus"},{id:"action.setLabel",type:"action.setLabel",label:"Set Label",hint:"Add or remove labels",glyph:"g-action",icon:"tag"},{id:"action.callHTTP",type:"action.callHTTP",label:"HTTP Request",hint:"Call an external service",glyph:"g-action",icon:"globe"},{id:"action.logTime",type:"action.logTime",label:"Log Time",hint:"Record time spent in a state",glyph:"g-action",icon:"clock"}]}],os=[{group:"issue",items:[{path:"issue.title",type:"string"},{path:"issue.labels",type:"string[]"},{path:"issue.assignee",type:"string?"},{path:"issue.author",type:"string"},{path:"issue.body",type:"string"},{path:"issue.iid",type:"number"},{path:"issue.url",type:"string"}]},{group:"run",items:[{path:"run.id",type:"string"},{path:"run.state",type:"string"},{path:"run.workflow",type:"string"},{path:"run.homeNode",type:"string"}]},{group:"pipeline",items:[{path:"pipeline.status",type:"enum"},{path:"pipeline.ref",type:"string"},{path:"pipeline.id",type:"number"}]},{group:"state",items:[{path:"state.previous",type:"string?"},{path:"state.next",type:"string?"}]},{group:"env",items:[{path:"env.GITLAB_TOKEN",type:"secret (allowlist req.)"},{path:"env.GITLAB_HOST",type:"string (allowlist req.)"}]}],is=[{id:"tpl.gitlab",title:"GitLab issue lifecycle",hint:"Triage \u2192 Review \u2192 QA \u2192 Done \xB7 5 states",dots:3},{id:"tpl.mr",title:"MR review loop",hint:"Agent-driven 3-state review",dots:2},{id:"tpl.blank",title:"Blank canvas",hint:"Start from a single trigger",dots:1}],tp=[{id:"triage-agent",name:"Triage Agent",tags:["default"],color:200},{id:"dev-agent",name:"Dev Agent",tags:["default"],color:145},{id:"code-reviewer",name:"Code Reviewer",tags:["default"],color:28}];var ih=[{path:"channel",type:"string",description:"Channel name that received the event.",example:'"whatsapp"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"chatId",type:"string",description:"Stable chat id \u2014 conversation partner JID (WhatsApp) or chat integer (Telegram). Use as `action.send` chatId to reply on the same thread.",example:'"21624309128@s.whatsapp.net"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"accountId",type:"string",description:"Which bot account received the message. Telegram routes this per-account; inherit into `action.send` to reply through the same bot.",example:'"default"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"text",type:"string",description:"Message body (caption for media), lower-cased for routing but the raw text here is verbatim.",example:'"hello"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"fromJid",type:"string",description:"Raw sender JID/id straight from the platform. Use `sender.id` for the normalized form.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"sender.id",type:"string",description:"Normalized sender id.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"sender.name",type:"string",description:"Display name, e.g. WhatsApp pushName or Telegram first_name.",example:'"Anis"',sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"sender.username",type:"string",description:"Platform-specific handle when available (Telegram @username, ...).",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"group.id",type:"string",description:"Group chat id when the message came from a group; undefined for DMs.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"group.name",type:"string",description:"Group display name when available.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"replyTo",type:"string",description:"ID of the message this one quoted, when any.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"replyToText",type:"string",description:"Text of the quoted message when available.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"media.path",type:"string",description:"Filesystem path of the attached media after download.",sourceFilter:["whatsapp-message","telegram-message"]},{path:"media.type",type:"string",description:"MIME type of the media (`image/jpeg`, `audio/ogg`, ...).",sourceFilter:["whatsapp-message","telegram-message"]},{path:"event.id",type:"string",description:"Platform message id. Use as `action.send` replyTo to thread replies.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"event.timestamp",type:"string",description:"ISO-8601 timestamp of the source message.",sourceFilter:["whatsapp-message","telegram-message","discord-message","slack-message"]},{path:"issue.iid",type:"number",description:"GitLab internal issue id (per project).",example:"42",sourceFilter:["gitlab-issue"]},{path:"issue.title",type:"string",description:"Issue title.",sourceFilter:["gitlab-issue"]},{path:"issue.description",type:"string",description:"Issue description body.",sourceFilter:["gitlab-issue"]},{path:"issue.url",type:"string",description:"Web URL of the issue.",sourceFilter:["gitlab-issue"]},{path:"issue.action",type:"string",description:"Action that triggered the event (`open`, `update`, `close`, ...).",sourceFilter:["gitlab-issue"]},{path:"issue.labels",type:"array",description:"Current labels on the issue.",sourceFilter:["gitlab-issue"]},{path:"issue.assignees",type:"array",description:"Assignees on the issue.",sourceFilter:["gitlab-issue"]},{path:"project",type:"string",description:"GitLab project path.",example:'"noqta/web"',sourceFilter:["gitlab-issue","gitlab-pipeline"]},{path:"chatId",type:"string",description:'Stable entity id for GitLab: "<project>:issue:<iid>" (issue) or "<project>:merge_request:<iid>" (pipeline).',sourceFilter:["gitlab-issue","gitlab-pipeline"]},{path:"channel",type:"string",description:'Always `"gitlab"` for GitLab sources.',sourceFilter:["gitlab-issue","gitlab-pipeline"]},{path:"pipeline.id",type:"number",description:"Pipeline id.",sourceFilter:["gitlab-pipeline"]},{path:"pipeline.status",type:"string",description:"Pipeline status (`success`, `failed`, `canceled`, ...).",sourceFilter:["gitlab-pipeline"]},{path:"pipeline.ref",type:"string",description:"Git ref the pipeline ran on.",sourceFilter:["gitlab-pipeline"]}],ah=[{path:"reply",type:"string",description:"Full agent response text. Most common template target (e.g. echoing it back via `action.send`).",example:'"Got it \u2014 routing to..."'},{path:"result",type:"string",description:"Parsed `RESULT: <token>` marker from the agent's reply (lowercased), or `approved`/`rejected`/`done`/`failed` from a `[BRACKET]`. Used by `branch` nodes to route on agent classification.",example:'"approved"'},{path:"json",type:"any",description:"When `resultParser` is `json`, the parsed first fenced ```json ... ``` block. Useful for structured agent outputs."},{path:"taskId",type:"string",description:"Opaque workflow-scoped task id \u2014 mostly for diagnostics.",example:'"wf-<runId>-<suffix>"'},{path:"durationMs",type:"number",description:"Wall-clock duration of the agent call.",example:"14520"}],lh=[{path:"messageId",type:"string",description:"Platform message id of the sent message. `null` when the adapter couldn't capture it (e.g. mesh-forwarded sends may return null)."},{path:"viaMesh",type:"bool",description:"`true` when the send was forwarded over the mesh to a peer that hosts the channel (workflow on one node, channel adapter on another). Absent for local sends."}],sh=[{path:"issue.iid",type:"number",description:"Newly-created issue iid.",example:"123"},{path:"issue.url",type:"string",description:"Web URL of the new issue."},{path:"issue.webUrl",type:"string",description:"Alias of `issue.url`."}],uh=[{path:"labels",type:"array",description:"Label list after the change."},{path:"add",type:"array",description:"Labels that were added in this call."},{path:"remove",type:"array",description:"Labels that were removed in this call."}],ch=[{path:"labels",type:"array",description:"Current label list on the entity. Use with a `branch` node to route on label state."}],dh=[{path:"emoji",type:"string",description:"The emoji reaction that was applied (echoes the input for debugging)."}],ph=[{path:"edited",type:"bool",description:"`true` when the platform accepted the edit. Treat `false` as a soft miss \u2014 text may have been unchanged or the message was too old."}],fh=[{path:"durationMs",type:"number",description:"Duration logged, in milliseconds (echoed for downstream use)."}],gh=[{path:"ok",type:"bool",description:"Response.ok \u2014 `true` for 2xx."},{path:"status",type:"number",description:"HTTP status code.",example:"200"},{path:"body",type:"any",description:"Parsed JSON body when the response was JSON; otherwise the raw text string."}],hh=[{path:"port",type:"string",description:"Which outgoing port matched. Downstream edges with `fromPort` matching this value will fire."}],mh=[{path:"value",type:"any",description:"When config uses `path`, this carries the value picked from context. In `template` mode, keys from the rendered template land at the top level of this node's output (no `.value` prefix)."}],vh=[{path:"event",type:"any",description:"Payload of the event that resumed this checkpoint. Fields mirror whichever trigger source delivered the resume event."}],yh=[{path:"name",type:"string",description:"Name of the signal that resumed the wait."},{path:"payload",type:"any",description:"Payload the emitter attached to the signal."},{path:"receivedAt",type:"string",description:"ISO-8601 time the signal was observed."}],xh=[{path:"emittedAt",type:"string",description:"ISO-8601 time the signal was published."}],wh=[{path:"firedAt",type:"string",description:"ISO-8601 time the timer elapsed (when resumed)."},{path:"scheduledFor",type:"string",description:"ISO-8601 time the timer was originally scheduled for."}],kh=[{path:"submission",type:"object",description:"Form values submitted by the assignee, keyed by field id. Shape depends on this userTask's form schema."},{path:"submittedBy",type:"string",description:"Actor id of the user who completed the task."},{path:"submittedAt",type:"string",description:"ISO-8601 submission timestamp."}],_h=[{path:"childRunId",type:"string",description:"Run id of the spawned child workflow."},{path:"result",type:"any",description:"Output bundle of the child's terminal `end` node (if any)."}],as={"trigger.channel":{summary:"Raw event payload from the source channel. Shape varies by `source` \u2014 the Context panel filters accordingly.",fields:ih},"trigger.manual":{summary:"Arbitrary payload posted by `agentx workflow run <id>` / POST /workflows/:id/run.",fields:[{path:"",type:"any",description:"Whatever JSON the caller supplied."}]},"trigger.cron":{summary:"Scheduled tick \u2014 no data bundle beyond the firing metadata.",fields:[{path:"firedAt",type:"string",description:"ISO-8601 time the tick fired."},{path:"cronSpec",type:"string",description:"The `spec` from the node's config (echoed for debug)."}]},"trigger.hook":{summary:"Fires when a custom hook event bubbles through the registry. Payload is whatever the hook subscriber chose to emit.",fields:[{path:"",type:"any",description:"Hook-specific payload."}]},"trigger.form":{summary:"Starts when a published form receives a submission.",fields:[{path:"formId",type:"string",description:"Form id that received the submission."},{path:"submission",type:"object",description:"Submitted values keyed by field id."},{path:"submittedBy",type:"string",description:"Actor id of the submitter."}]},agent:{summary:"Agent response after executing the prompt template.",fields:ah},transform:{summary:"Value picked from upstream context (path mode) or rendered template bundle (template mode).",fields:mh},branch:{summary:"Which outgoing port fired. Downstream edges match via `fromPort`.",fields:hh},"gateway.parallel":{summary:"All incoming branches joined here. No output.",fields:[]},rule:{summary:"Evaluates a declarative rule against context; may short-circuit the walk.",fields:[]},"action.send":{summary:"Dispatched an outbound message through the chosen channel.",fields:lh},"action.createIssue":{summary:"Created an issue on GitLab/GitHub.",fields:sh},"action.setLabel":{summary:"Added/removed labels on a GitLab issue or MR.",fields:uh},"action.readLabel":{summary:"Fetched the current label list \u2014 useful before a `branch`.",fields:ch},"action.react":{summary:"Emoji reaction on a message (Telegram/WhatsApp).",fields:dh},"action.editMessage":{summary:"Edited an existing message in place.",fields:ph},"action.logTime":{summary:"Logged time spent on a GitLab issue/MR.",fields:fh},"action.callHTTP":{summary:"Made an outbound HTTP request with templated params.",fields:gh},userTask:{summary:"Paused for a human to submit a form. Resumes with the submission in this node's output.",fields:kh},subProcess:{summary:"Spawned a child workflow and waited for its completion.",fields:_h},"signal.emit":{summary:"Published a signal to the bus. Runs elsewhere can resume on it via `signal.wait`.",fields:xh},"signal.wait":{summary:"Paused until a matching signal arrives. Resumes with that signal in this node's output.",fields:yh},"timer.boundary":{summary:"Paused until a timer elapses. Resumes with timing metadata.",fields:wh},checkpoint:{summary:"Paused until a matching resume event arrives on this entity.",fields:vh},end:{summary:"Terminal node \u2014 closes the run with the configured status. No output downstream.",fields:[]}};function np(e,t={}){let n=as[e];if(!n)return[];let r=typeof t.source=="string"?t.source:void 0;return r?n.fields.filter(o=>!o.sourceFilter||o.sourceFilter.includes(r)):n.fields.filter(o=>!o.sourceFilter)}var l=re(_e(),1);function D({title:e,children:t,defaultOpen:n=!0,right:r}){let[o,i]=(0,te.useState)(n);return(0,l.jsxs)("div",{className:"insp__section"+(o?"":" is-collapsed"),children:[(0,l.jsxs)("div",{className:"insp__section-head",onClick:()=>i(!o),children:[(0,l.jsx)("span",{className:"chev",children:(0,l.jsx)(A.chev,{})}),(0,l.jsx)("h4",{children:e}),r]}),(0,l.jsx)("div",{className:"insp__section-body",children:t})]})}function w({label:e,hint:t,err:n,children:r,mono:o}){return(0,l.jsxs)("div",{className:"fld"+(o?" is-mono":"")+(n?" is-err":""),children:[(0,l.jsxs)("div",{className:"fld__label",children:[(0,l.jsx)("span",{children:e}),t&&(0,l.jsx)("span",{className:"fld__hint",children:t})]}),r,n&&(0,l.jsxs)("div",{className:"fld__err",children:[(0,l.jsx)(A.err,{}),n]})]})}function L({value:e,onChange:t,placeholder:n,mono:r,list:o}){return(0,l.jsx)("input",{className:"fld__input"+(r?" mono":""),type:"text",value:e,placeholder:n,list:o,onChange:i=>t(i.target.value)})}function Ci({value:e,onChange:t,placeholder:n}){return(0,l.jsx)("input",{className:"fld__input",type:"number",value:e??"",placeholder:n,onChange:r=>{let o=r.target.value.trim();t(o===""?void 0:Number(o))}})}function Ot({value:e,onChange:t,rows:n=3,placeholder:r,mono:o}){return(0,l.jsx)("textarea",{className:"fld__input"+(o?" mono":""),rows:n,spellCheck:!1,value:e,placeholder:r,onChange:i=>t(i.target.value)})}function se({value:e,onChange:t,options:n}){return(0,l.jsx)("select",{className:"fld__select",value:e,onChange:r=>t(r.target.value),children:n.map(r=>{let o=typeof r=="string"?r:r.value,i=typeof r=="string"?r:r.label;return(0,l.jsx)("option",{value:o,children:i},o)})})}function op({checked:e,onChange:t,label:n}){return(0,l.jsxs)("label",{className:"fld__check",style:{display:"flex",gap:8,alignItems:"center",fontSize:12},children:[(0,l.jsx)("input",{type:"checkbox",checked:e,onChange:r=>t(r.target.checked)}),(0,l.jsx)("span",{children:n})]})}function zt({value:e,onChange:t,placeholder:n,mono:r}){return(0,l.jsx)("input",{className:"fld__input"+(r?" mono":""),type:"text",value:e.join(", "),placeholder:n,onChange:o=>t(o.target.value.split(",").map(i=>i.trim()).filter(Boolean))})}function nr({value:e,onChange:t,placeholder:n,rows:r=3}){let[o,i]=(0,te.useState)(!1),[a,u]=(0,te.useState)(0),s=(0,te.useRef)(null),c=(0,te.useMemo)(()=>{let m=[];return os.forEach(v=>v.items.forEach(k=>m.push({group:v.group,...k}))),m},[]),d=m=>{let v=s.current;if(!v)return;let k=v.selectionStart,S=e.slice(0,k),$=e.slice(k),p=S.endsWith("{{")?S:S+"{{",h=p+m+"}}"+$;t(h),i(!1),requestAnimationFrame(()=>{v.focus();let x=p.length+m.length+2;v.setSelectionRange(x,x)})};return(0,l.jsxs)("div",{className:"expr",style:{position:"relative"},children:[(0,l.jsx)("textarea",{ref:s,className:"fld__input mono",rows:r,spellCheck:!1,value:e,placeholder:n,onChange:m=>t(m.target.value),onKeyDown:m=>{if(!o){m.key==="{"&&m.shiftKey&&i(!0);return}m.key==="ArrowDown"?(m.preventDefault(),u(v=>(v+1)%c.length)):m.key==="ArrowUp"?(m.preventDefault(),u(v=>(v-1+c.length)%c.length)):m.key==="Enter"||m.key==="Tab"?(m.preventDefault(),d(c[a].path)):m.key==="Escape"&&i(!1)}}),(0,l.jsxs)("div",{className:"fld__hint",style:{display:"flex",alignItems:"center",gap:6,marginTop:4},children:[(0,l.jsx)(A.variable,{}),"Type ",(0,l.jsx)("code",{children:"{{"})," to insert a variable \xB7 ",(0,l.jsx)("kbd",{children:"\u2191\u2193"})," ",(0,l.jsx)("kbd",{children:"\u21B5"}),(0,l.jsx)("button",{type:"button",style:{marginLeft:"auto",background:"none",border:"none",color:"inherit",cursor:"pointer"},onClick:()=>i(!o),children:(0,l.jsx)(A.plus,{})})]}),o&&(0,l.jsx)("div",{className:"expr__popover",style:{position:"absolute",left:0,right:0,top:"100%",zIndex:10,background:"var(--bg)",border:"1px solid var(--line)",borderRadius:4,maxHeight:260,overflowY:"auto",boxShadow:"0 6px 20px rgba(0,0,0,0.25)"},children:os.map(m=>(0,l.jsxs)(te.Fragment,{children:[(0,l.jsx)("div",{className:"expr__pop-group",style:{padding:"4px 10px",fontSize:10,color:"var(--muted)",textTransform:"uppercase",letterSpacing:.5},children:m.group}),m.items.map(v=>{let k=c.findIndex($=>$.path===v.path);return(0,l.jsxs)("div",{onMouseEnter:()=>u(k),onClick:()=>d(v.path),style:{padding:"4px 10px",cursor:"pointer",fontSize:11,display:"flex",justifyContent:"space-between",gap:12,fontFamily:"var(--ax-mono, ui-monospace)",background:k===a?"var(--accent-soft)":"transparent"},children:[(0,l.jsx)("span",{children:`{{${v.path}}}`}),(0,l.jsx)("span",{style:{color:"var(--muted)",fontSize:10},children:v.type})]},v.path)})]},m.group))})]})}function bh({value:e,onChange:t,agents:n}){let[r,o]=(0,te.useState)(!1),[i,a]=(0,te.useState)(""),u=(0,te.useRef)(null);(0,te.useEffect)(()=>{let d=g=>{u.current&&!u.current.contains(g.target)&&o(!1)};return window.addEventListener("mousedown",d),()=>window.removeEventListener("mousedown",d)},[]);let s=n.find(d=>d.id===e),c=n.filter(d=>!i||d.name.toLowerCase().includes(i.toLowerCase())||d.id.includes(i));return(0,l.jsxs)("div",{ref:u,style:{position:"relative"},children:[(0,l.jsxs)("button",{type:"button",className:"fld__input",onClick:()=>o(d=>!d),style:{display:"flex",alignItems:"center",gap:8,textAlign:"left",width:"100%",cursor:"pointer"},children:[(0,l.jsx)("span",{style:{display:"inline-flex",width:22,height:22,borderRadius:4,background:`oklch(0.78 0.13 ${s?.color??260})`,color:"#fff",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:600,flexShrink:0},children:(s?.name??"??").slice(0,2).toUpperCase()}),(0,l.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,l.jsx)("div",{style:{fontSize:12,fontWeight:500},children:s?.name??"Select agent\u2026"}),(0,l.jsx)("div",{style:{fontSize:10,color:"var(--muted)",fontFamily:"var(--ax-mono, ui-monospace)"},children:s?.id??"\u2014"})]}),(0,l.jsx)(A.chev,{})]}),r&&(0,l.jsxs)("div",{style:{position:"absolute",left:0,right:0,top:"100%",zIndex:10,background:"var(--bg)",border:"1px solid var(--line)",borderRadius:4,marginTop:4,maxHeight:280,overflowY:"auto",boxShadow:"0 6px 20px rgba(0,0,0,0.25)"},children:[(0,l.jsx)("div",{style:{padding:6,borderBottom:"1px solid var(--line)"},children:(0,l.jsx)("input",{autoFocus:!0,className:"fld__input",value:i,placeholder:"Filter agents\u2026",onChange:d=>a(d.target.value),style:{width:"100%"}})}),(0,l.jsxs)("div",{children:[c.map(d=>(0,l.jsxs)("div",{onClick:()=>{t(d.id),o(!1),a("")},style:{padding:"6px 10px",cursor:"pointer",display:"flex",gap:8,alignItems:"center",background:d.id===e?"var(--accent-soft)":"transparent"},children:[(0,l.jsx)("span",{style:{display:"inline-flex",width:22,height:22,borderRadius:4,background:`oklch(0.78 0.13 ${d.color})`,color:"#fff",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:600,flexShrink:0},children:d.name.slice(0,2).toUpperCase()}),(0,l.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,l.jsx)("div",{style:{fontSize:12,fontWeight:500},children:d.name}),(0,l.jsx)("div",{style:{fontSize:10,color:"var(--muted)",fontFamily:"var(--ax-mono, ui-monospace)"},children:d.id})]}),d.tags.length>0&&(0,l.jsx)("div",{style:{display:"flex",gap:3},children:d.tags.map(g=>(0,l.jsx)("span",{style:{fontSize:9,color:"var(--muted)",background:"var(--surface)",padding:"1px 5px",borderRadius:3},children:g},g))})]},d.id)),c.length===0&&(0,l.jsx)("div",{style:{padding:10,fontSize:11,color:"var(--muted)"},children:"No agents match."})]})]}),(0,l.jsx)(w,{label:"",hint:"Free text \u2014 type an agent id directly if it isn't in the list yet",children:(0,l.jsx)(L,{value:e??"",onChange:t,placeholder:"agent-id",mono:!0})})]})}var Sh=new Set(["whatsapp-message","telegram-message","gitlab-issue","gitlab-pipeline"]);function Nh({node:e,patchData:t}){let n=e.config,r=n.filter??{},o=g=>t({filter:{...r,...g}}),i=String(n.source??"whatsapp-message"),a=Sh.has(i),u=i==="whatsapp-message"||i==="telegram-message"||i==="discord-message"||i==="slack-message",s=i==="gitlab-issue"||i==="gitlab-pipeline",c=i==="github-issue"||i==="github-pr",d=s||c;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(D,{title:"Source",children:[(0,l.jsx)(w,{label:"Channel event",hint:a?"\u2713 wired end-to-end":"schema-only \u2014 no hook subscriber yet",children:(0,l.jsx)(se,{value:i,onChange:g=>t({source:g,filter:{}}),options:[{value:"whatsapp-message",label:"WhatsApp message \u2713"},{value:"telegram-message",label:"Telegram message \u2713"},{value:"gitlab-issue",label:"GitLab issue \u2713"},{value:"gitlab-pipeline",label:"GitLab pipeline \u2713"},{value:"github-issue",label:"GitHub issue (not wired)"},{value:"github-pr",label:"GitHub PR (not wired)"},{value:"discord-message",label:"Discord message"},{value:"slack-message",label:"Slack message"}]})}),s&&(0,l.jsx)(w,{label:"Project",hint:'GitLab path (e.g. "noqta/web") or "*" for any',children:(0,l.jsx)(L,{mono:!0,value:String(r.project??""),onChange:g=>o({project:g}),placeholder:"noqta/web"})}),c&&(0,l.jsx)(w,{label:"Repo",hint:'"owner/repo" or "*" for any',children:(0,l.jsx)(L,{mono:!0,value:String(r.repo??""),onChange:g=>o({repo:g}),placeholder:"owner/repo"})}),u&&(0,l.jsx)(w,{label:"Chat",hint:i==="whatsapp-message"?'Contact number or JID (formats like "+216 24 309 128", "21624309128", "...@s.whatsapp.net" all match). "*" for any.':i==="telegram-message"?'Telegram chat id (e.g. "1816212449" for a DM, "-1003861455814" for a group). "*" for any.':'Exact chat id. "*" matches any.',children:(0,l.jsx)(L,{mono:!0,value:String(r.chat??""),onChange:g=>o({chat:g}),placeholder:"*"})}),d&&(0,l.jsx)(w,{label:"Label filter (any of)",hint:"Fires only when at least one of these labels is present on the issue/MR",children:(0,l.jsx)(zt,{mono:!0,value:Array.isArray(r.labels)?r.labels:[],onChange:g=>o({labels:g}),placeholder:"bug, needs-review"})})]}),u&&(0,l.jsx)(D,{title:"Routing",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Passthrough",hint:"When on, the default agent router ALSO replies alongside this workflow. Use for observability-only workflows (tag, log, forward) that shouldn't own the conversation.",children:(0,l.jsx)(op,{checked:!!n.passthrough,onChange:g=>t({passthrough:g}),label:"Let the default agent also reply"})})})]})}function Ch({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(D,{title:"Schedule",children:[(0,l.jsx)(w,{label:"Cron spec",hint:"Standard 5-field cron (minute hour day month weekday)",children:(0,l.jsx)(L,{mono:!0,value:String(n.spec??"0 * * * *"),onChange:r=>t({spec:r}),placeholder:"0 9 * * *"})}),(0,l.jsx)(w,{label:"Timezone",hint:"IANA timezone string \u2014 defaults to UTC",children:(0,l.jsx)(L,{mono:!0,value:String(n.timezone??"UTC"),onChange:r=>t({timezone:r}),placeholder:"Africa/Tunis"})})]})}function Eh({node:e,patchData:t}){let n=e.config;return(0,l.jsx)(D,{title:"Hook subscription",children:(0,l.jsx)(w,{label:"Event",hint:'Any "on:*" hook event fired elsewhere in agentx',children:(0,l.jsx)(L,{mono:!0,value:String(n.event??"on:"),onChange:r=>t({event:r}),placeholder:"on:gitlab-issue"})})})}function Ph(e){return(0,l.jsx)(D,{title:"Manual run",children:(0,l.jsxs)("div",{style:{fontSize:12,color:"var(--muted)",lineHeight:1.5},children:["No configuration needed. Fire this workflow via:",(0,l.jsx)("pre",{style:{marginTop:8,padding:8,background:"var(--bg)",border:"1px solid var(--line)",borderRadius:4,fontSize:11},children:"agentx workflow run <id>"}),"or ",(0,l.jsx)("span",{className:"mono",children:"POST /workflows/<id>/run"}),"."]})})}function Th({node:e,patchData:t,agents:n}){let r=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(D,{title:"Agent",children:[(0,l.jsx)(w,{label:"Which agent runs",children:(0,l.jsx)(bh,{value:r.agentId,onChange:o=>t({agentId:o}),agents:n})}),(0,l.jsx)(w,{label:"Prompt",hint:"Supports {{nodeId.path}} variables from upstream context",children:(0,l.jsx)(nr,{value:r.prompt??"",onChange:o=>t({prompt:o}),placeholder:"Classify {{trigger.text}} \u2014 reply RESULT: status-check | new-request | other",rows:5})})]}),(0,l.jsxs)(D,{title:"Behavior",defaultOpen:!1,children:[(0,l.jsx)(w,{label:"Result parser",hint:"How to extract a routing token from the agent's reply",children:(0,l.jsx)(se,{value:String(r.resultParser??"noqta-result-token"),onChange:o=>t({resultParser:o}),options:[{value:"noqta-result-token",label:"RESULT: token (recommended)"},{value:"json",label:"JSON block (```json \u2026```)"},{value:"raw",label:"Raw reply (no parsing)"}]})}),(0,l.jsx)(w,{label:"Timeout (minutes)",children:(0,l.jsx)(Ci,{value:r.timeoutMinutes,onChange:o=>t({timeoutMinutes:o}),placeholder:"5"})})]})]})}function Mh({node:e,patchData:t}){let n=e.config,[r,o]=(0,te.useState)(n.template&&typeof n.template=="object"?"template":"path");return(0,l.jsxs)(D,{title:"Transform",children:[(0,l.jsx)(w,{label:"Mode",children:(0,l.jsx)(se,{value:r,onChange:i=>{let a=i;o(a),t(a==="path"?{path:n.path??"",template:void 0}:{template:n.template??{},path:void 0})},options:[{value:"path",label:"Pick value from context (dotted path)"},{value:"template",label:"Build a bundle (template object)"}]})}),r==="path"&&(0,l.jsx)(w,{label:"Path",hint:"e.g. classify.reply or trigger.contact.name",children:(0,l.jsx)(L,{mono:!0,value:String(n.path??""),onChange:i=>t({path:i}),placeholder:"classify.reply"})}),r==="template"&&(0,l.jsx)(w,{label:"Template (JSON object)",hint:"Each string value is rendered with {{nodeId.path}} variables",children:(0,l.jsx)(Ot,{mono:!0,rows:6,value:JSON.stringify(n.template??{},null,2),onChange:i=>{try{t({template:JSON.parse(i)})}catch{}},placeholder:`{
1231
+ "greeting": "hi {{trigger.sender.name}}"
1232
+ }`})})]})}function Fh({node:e,patchData:t}){let n=e.config,r=n.cases??[],o=s=>t({cases:s}),i=(s,c)=>o(r.map((d,g)=>g===s?c:d)),a=(s,c)=>i(s,{...r[s],when:{...r[s].when,...c}}),u=(s,c)=>i(s,{...r[s],when:{...r[s].when,params:{...r[s].when.params,...c}}});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(D,{title:"Cases",right:(0,l.jsx)("span",{className:"card__kind",children:r.length}),children:[r.map((s,c)=>{let d=s.when.params??{};return(0,l.jsxs)("div",{style:{border:"1px solid var(--line)",borderRadius:4,padding:10,marginBottom:8,background:"var(--bg)"},children:[(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[(0,l.jsxs)("strong",{style:{fontSize:11},children:["Case #",c+1]}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",onClick:()=>o(r.filter((g,m)=>m!==c)),children:(0,l.jsx)(A.trash,{})})]}),(0,l.jsx)(w,{label:"If",children:(0,l.jsx)(se,{value:s.when.kind,onChange:g=>a(c,{kind:g,params:{}}),options:[{value:"equals",label:"Path equals value"},{value:"contains",label:"Path contains value"},{value:"matches",label:"Path matches regex"},{value:"exists",label:"Path exists (non-empty)"}]})}),(0,l.jsx)(w,{label:"Path",hint:"e.g. classify.result",children:(0,l.jsx)(L,{mono:!0,value:String(d.path??""),onChange:g=>u(c,{path:g}),placeholder:"classify.result"})}),(s.when.kind==="equals"||s.when.kind==="contains")&&(0,l.jsx)(w,{label:"Value",children:(0,l.jsx)(L,{mono:!0,value:String(d.value??""),onChange:g=>u(c,{value:g})})}),s.when.kind==="matches"&&(0,l.jsx)(w,{label:"Regex",children:(0,l.jsx)(L,{mono:!0,value:String(d.regex??""),onChange:g=>u(c,{regex:g}),placeholder:"^(approved|done)$"})}),(0,l.jsx)(w,{label:"Port",hint:"Outgoing edge's `fromPort` must match this",children:(0,l.jsx)(L,{mono:!0,value:s.to,onChange:g=>i(c,{...s,to:g}),placeholder:"approved"})})]},c)}),(0,l.jsxs)("button",{className:"btn btn--ghost-icon",style:{width:"100%",padding:8,justifyContent:"center"},onClick:()=>o([...r,{when:{kind:"equals",params:{path:"",value:""}},to:`case${r.length+1}`}]),children:[(0,l.jsx)(A.plus,{})," Add case"]})]}),(0,l.jsx)(D,{title:"Fallback",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Default port",hint:"Used when no case matches. Leave blank to drop the event.",children:(0,l.jsx)(L,{mono:!0,value:String(n.default??"fallback"),onChange:s=>t({default:s})})})})]})}function Rh({node:e,patchData:t}){let n=e.config,r=n.waitFor??{},o=a=>t({waitFor:{...r,...a}}),i=n.resumeMatch??{};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(D,{title:"Checkpoint",children:(0,l.jsx)(w,{label:"Name",hint:"Human label shown in logs + run timelines",children:(0,l.jsx)(L,{value:String(n.name??e.id),onChange:a=>t({name:a}),placeholder:"await-label-change"})})}),(0,l.jsxs)(D,{title:"Wait for",children:[(0,l.jsx)(w,{label:"Source",hint:"Which kind of event unpauses this run",children:(0,l.jsx)(se,{value:String(r.source??""),onChange:a=>o({source:a||void 0}),options:[{value:"",label:"Any (same entity)"},{value:"gitlab-issue",label:"GitLab issue update"},{value:"gitlab-pipeline",label:"GitLab pipeline event"},{value:"whatsapp-message",label:"WhatsApp reply"},{value:"telegram-message",label:"Telegram reply"},{value:"manual",label:"Manual poke"}]})}),(0,l.jsx)(w,{label:"Labels (any of)",hint:"e.g. a label change to one of these resumes the run",children:(0,l.jsx)(zt,{mono:!0,value:Array.isArray(r.labels)?r.labels:[],onChange:a=>o({labels:a.length?a:void 0})})})]}),(0,l.jsx)(D,{title:"Advanced match",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Event id contains",hint:"Optional substring match on the incoming event's id",children:(0,l.jsx)(L,{mono:!0,value:String(i.eventIdLike??""),onChange:a=>t({resumeMatch:{...i,eventIdLike:a||void 0}})})})})]})}function Ih({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(D,{title:"Terminal",children:[(0,l.jsx)(w,{label:"Status",children:(0,l.jsx)(se,{value:String(n.status??"completed"),onChange:r=>t({status:r}),options:[{value:"completed",label:"Completed (success)"},{value:"failed",label:"Failed"},{value:"canceled",label:"Canceled"}]})}),(0,l.jsx)(w,{label:"Summary (optional)",hint:"Surfaced in run history + notifications",children:(0,l.jsx)(Ot,{value:String(n.summary??""),onChange:r=>t({summary:r}),rows:2})})]})}var Lh=["gitlab","github","whatsapp","telegram","discord","slack"],ls=new Map,rp=6e4;function zh(e){let[t,n]=(0,te.useState)(()=>{let r=ls.get(e);return r&&Date.now()-r.at<rp?{chats:r.chats,source:r.source,loading:!1}:{chats:[],source:"",loading:!0}});return(0,te.useEffect)(()=>{let r=!1,o=ls.get(e);if(o&&Date.now()-o.at<rp){n({chats:o.chats,source:o.source,loading:!1});return}return n(i=>({...i,loading:!0})),fetch(`/channels/${encodeURIComponent(e)}/chats`).then(i=>i.ok?i.json():{chats:[],source:""}).then(i=>{if(r)return;let a=Array.isArray(i.chats)?i.chats:[],u=typeof i.source=="string"?i.source:"";ls.set(e,{at:Date.now(),chats:a,source:u}),n({chats:a,source:u,loading:!1})}).catch(()=>{r||n({chats:[],source:"",loading:!1})}),()=>{r=!0}},[e]),t}function Oh({node:e,patchData:t,nodes:n}){let r=e.config,o=n.find(c=>c.type.startsWith("trigger."))?.id??"trigger",i=c=>`{{${o}.${c}}}`,a=String(r.channel??"whatsapp"),u=zh(a),s=`chats-${a}`;return(0,l.jsxs)(D,{title:"Send message",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(se,{value:a,onChange:c=>t({channel:c}),options:Lh})}),(0,l.jsxs)(w,{label:"Chat id",hint:u.chats.length>0?`Use ${i("chatId")} to reply to the trigger's chat, or pick one of the ${u.chats.length} known chat(s) ${u.source==="local"?"on this node":`from ${u.source}`} (click the field to see the list).`:u.loading?`Loading known chats for "${a}"\u2026`:`Use ${i("chatId")} to reply to the trigger's chat. For a different destination, paste the channel-specific id (no discovered chats for "${a}" yet).`,children:[(0,l.jsx)(L,{mono:!0,value:String(r.chatId??""),onChange:c=>t({chatId:c}),placeholder:i("chatId"),list:u.chats.length>0?s:void 0}),u.chats.length>0&&(0,l.jsx)("datalist",{id:s,children:u.chats.map(c=>(0,l.jsx)("option",{value:c.id,children:c.name?`${c.name} \u2014 ${c.id}${c.kind==="group"?" (group)":""}`:`${c.id}${c.kind==="group"?" (group)":""}`},c.id))})]}),(0,l.jsx)(w,{label:"Text",hint:"Supports {{nodeId.path}} templates from any upstream node",children:(0,l.jsx)(nr,{value:String(r.text??""),onChange:c=>t({text:c}),rows:4,placeholder:`Thanks ${i("sender.name")} \u2014 working on it.`})}),(0,l.jsx)(w,{label:"Account id",hint:"Telegram only: which bot account sends. Leave empty to inherit from the trigger's account (recommended).",children:(0,l.jsx)(L,{mono:!0,value:String(r.accountId??""),onChange:c=>t({accountId:c}),placeholder:`(inherit from ${i("accountId")})`})}),(0,l.jsx)(w,{label:"Reply to message id",hint:"Optional. When set, the platform threads this reply under the referenced message.",children:(0,l.jsx)(L,{mono:!0,value:String(r.replyTo??""),onChange:c=>t({replyTo:c}),placeholder:i("event.id")})}),(0,l.jsx)(w,{label:"Parse mode",hint:r.channel==="telegram"?'Telegram default is "markdown" (Telegram-flavoured HTML conversion). Use "plain" to send raw text without escaping.':"Platform-specific. WhatsApp ignores; Telegram supports markdown/html.",children:(0,l.jsx)(se,{value:String(r.parseMode??"markdown"),onChange:c=>t({parseMode:c}),options:["markdown","plain","html"]})})]})}function Ah({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(D,{title:"Target",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(se,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(w,{label:"Project",hint:'GitLab "group/project" or GitHub "owner/repo"',children:(0,l.jsx)(L,{mono:!0,value:String(n.project??""),onChange:r=>t({project:r}),placeholder:"noqta/web"})})]}),(0,l.jsxs)(D,{title:"Issue",children:[(0,l.jsx)(w,{label:"Title",children:(0,l.jsx)(nr,{rows:1,value:String(n.title??""),onChange:r=>t({title:r}),placeholder:"From WhatsApp: {{trigger.sender.name}}"})}),(0,l.jsx)(w,{label:"Description",children:(0,l.jsx)(nr,{rows:6,value:String(n.description??""),onChange:r=>t({description:r}),placeholder:"Reported by {{trigger.sender.name}}\\n\\n{{trigger.text}}"})}),(0,l.jsx)(w,{label:"Labels",children:(0,l.jsx)(zt,{mono:!0,value:Array.isArray(n.labels)?n.labels:[],onChange:r=>t({labels:r}),placeholder:"Triage, source::whatsapp"})}),(0,l.jsx)(w,{label:"Assignees",hint:"GitLab usernames (resolved to ids at runtime)",children:(0,l.jsx)(zt,{mono:!0,value:Array.isArray(n.assignees)?n.assignees:[],onChange:r=>t({assignees:r}),placeholder:"alice, bob"})})]})]})}function Dh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(D,{title:"Target",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(se,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(w,{label:"Entity kind",children:(0,l.jsx)(se,{value:String(n.kind??"issue"),onChange:r=>t({kind:r}),options:["issue","merge_request"]})}),(0,l.jsx)(w,{label:"Project",children:(0,l.jsx)(L,{mono:!0,value:String(n.project??""),onChange:r=>t({project:r}),placeholder:"{{trigger.project}}"})}),(0,l.jsx)(w,{label:"iid",children:(0,l.jsx)(L,{mono:!0,value:String(n.iid??""),onChange:r=>t({iid:r}),placeholder:"{{trigger.issue.iid}}"})})]}),(0,l.jsxs)(D,{title:"Labels",children:[(0,l.jsx)(w,{label:"Add",hint:"Comma-separated list",children:(0,l.jsx)(zt,{value:Array.isArray(n.add)?n.add:[],onChange:r=>t({add:r}),placeholder:"In review"})}),(0,l.jsx)(w,{label:"Remove",children:(0,l.jsx)(zt,{value:Array.isArray(n.remove)?n.remove:[],onChange:r=>t({remove:r}),placeholder:"Triage"})})]})]})}function jh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(D,{title:"Read labels",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(se,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab","github"]})}),(0,l.jsx)(w,{label:"Entity kind",children:(0,l.jsx)(se,{value:String(n.kind??"issue"),onChange:r=>t({kind:r}),options:["issue","merge_request"]})}),(0,l.jsx)(w,{label:"Project",children:(0,l.jsx)(L,{mono:!0,value:String(n.project??""),onChange:r=>t({project:r})})}),(0,l.jsx)(w,{label:"iid",children:(0,l.jsx)(L,{mono:!0,value:String(n.iid??""),onChange:r=>t({iid:r})})}),(0,l.jsxs)("div",{style:{fontSize:11,color:"var(--muted)",marginTop:8},children:["Output bundle: ",(0,l.jsx)("span",{className:"mono",children:"{{ <nodeId>.labels }}"})," = string[]"]})]})}function Uh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(D,{title:"React",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(se,{value:String(n.channel??"telegram"),onChange:r=>t({channel:r}),options:["telegram","whatsapp"]})}),(0,l.jsx)(w,{label:"Chat id",children:(0,l.jsx)(L,{mono:!0,value:String(n.chatId??""),onChange:r=>t({chatId:r}),placeholder:"{{trigger.chatId}}"})}),(0,l.jsx)(w,{label:"Message id",children:(0,l.jsx)(L,{mono:!0,value:String(n.messageId??""),onChange:r=>t({messageId:r}),placeholder:"{{trigger.event.id}}"})}),(0,l.jsx)(w,{label:"Emoji",children:(0,l.jsx)(L,{value:String(n.emoji??"\u{1F440}"),onChange:r=>t({emoji:r})})})]})}function Wh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(D,{title:"Edit message",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(se,{value:String(n.channel??"telegram"),onChange:r=>t({channel:r}),options:["telegram","whatsapp","gitlab","github","discord","slack"]})}),(0,l.jsx)(w,{label:"Chat id",children:(0,l.jsx)(L,{mono:!0,value:String(n.chatId??""),onChange:r=>t({chatId:r})})}),(0,l.jsx)(w,{label:"Message id",children:(0,l.jsx)(L,{mono:!0,value:String(n.messageId??""),onChange:r=>t({messageId:r})})}),(0,l.jsx)(w,{label:"New text",children:(0,l.jsx)(nr,{value:String(n.text??""),onChange:r=>t({text:r}),rows:3})}),(0,l.jsx)(w,{label:"Parse mode",children:(0,l.jsx)(se,{value:String(n.parseMode??"plain"),onChange:r=>t({parseMode:r}),options:["plain","markdown","html"]})})]})}function Bh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(D,{title:"Log time",children:[(0,l.jsx)(w,{label:"Channel",children:(0,l.jsx)(se,{value:String(n.channel??"gitlab"),onChange:r=>t({channel:r}),options:["gitlab"]})}),(0,l.jsx)(w,{label:"Chat id",hint:'"project:issue:42" or "project:merge_request:7"',children:(0,l.jsx)(L,{mono:!0,value:String(n.chatId??""),onChange:r=>t({chatId:r}),placeholder:"{{trigger.chatId}}"})}),(0,l.jsx)(w,{label:"Duration (ms)",children:(0,l.jsx)(Ci,{value:n.durationMs,onChange:r=>t({durationMs:r}),placeholder:"900000"})})]})}function Hh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(D,{title:"Request",children:[(0,l.jsx)(w,{label:"URL",children:(0,l.jsx)(L,{mono:!0,value:String(n.url??""),onChange:r=>t({url:r}),placeholder:"https://example.com/webhook"})}),(0,l.jsx)(w,{label:"Method",children:(0,l.jsx)(se,{value:String(n.method??"POST"),onChange:r=>t({method:r}),options:["GET","POST","PUT","PATCH","DELETE"]})})]}),(0,l.jsx)(D,{title:"Body",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Body",hint:"String \u2014 rendered with {{nodeId.path}}. Server parses as JSON when possible.",children:(0,l.jsx)(nr,{rows:5,value:typeof n.body=="string"?n.body:n.body?JSON.stringify(n.body,null,2):"",onChange:r=>t({body:r})})})}),(0,l.jsx)(D,{title:"Headers",defaultOpen:!1,children:(0,l.jsx)(w,{label:"Headers (JSON object)",children:(0,l.jsx)(Ot,{mono:!0,rows:3,value:JSON.stringify(n.headers??{},null,2),onChange:r=>{try{t({headers:JSON.parse(r)})}catch{}},placeholder:'{"Authorization": "Bearer {{env.TOKEN}}"}'})})}),(0,l.jsxs)("div",{style:{fontSize:11,color:"var(--muted)",marginTop:8,padding:"0 10px"},children:["Output: ",(0,l.jsx)("span",{className:"mono",children:"{{ <nodeId>.ok / .status / .body }}"})]})]})}var $h=["text","long-text","number","boolean","date","select","multi-select","file"];function ip({form:e,patch:t}){let n=e.fields??[],r=(s,c)=>{let d=[...n];d[s]={...d[s],...c},t({...e,fields:d})},o=(s,c)=>{let d=[...n];d[s]={...d[s],validate:{...d[s].validate??{},...c}},t({...e,fields:d})},i=s=>t({...e,fields:n.filter((c,d)=>d!==s)}),a=(s,c)=>{let d=s+c;if(d<0||d>=n.length)return;let g=[...n];[g[s],g[d]]=[g[d],g[s]],t({...e,fields:g})},u=()=>t({...e,fields:[...n,{key:`field_${n.length+1}`,label:"New field",type:"text"}]});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(D,{title:"Form",children:[(0,l.jsx)(w,{label:"Title",hint:"Header shown to the assignee above the form",children:(0,l.jsx)(L,{value:e.title??"",onChange:s=>t({...e,title:s}),placeholder:"Review application"})}),(0,l.jsx)(w,{label:"Description",hint:"Optional one-line context shown under the title",children:(0,l.jsx)(L,{value:e.description??"",onChange:s=>t({...e,description:s}),placeholder:""})}),(0,l.jsx)(w,{label:"Primary button",hint:"Label on the submit button; default: Submit",children:(0,l.jsx)(L,{value:e.submitLabel??"Submit",onChange:s=>t({...e,submitLabel:s})})}),(0,l.jsx)(w,{label:"Secondary action",hint:"Optional reject/hold button. Submissions carry action='secondary'.",children:(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6},children:[(0,l.jsx)(L,{value:e.secondaryAction?.key??"",onChange:s=>t({...e,secondaryAction:s?{key:s,label:e.secondaryAction?.label??s}:void 0}),placeholder:"key (e.g. reject)",mono:!0}),(0,l.jsx)(L,{value:e.secondaryAction?.label??"",onChange:s=>t({...e,secondaryAction:{key:e.secondaryAction?.key??"secondary",label:s}}),placeholder:"label (e.g. Reject)"})]})})]}),(0,l.jsxs)(D,{title:`Fields (${n.length})`,children:[n.length===0&&(0,l.jsx)("div",{className:"hint",style:{fontSize:12,color:"var(--ax-muted)"},children:"No fields \u2014 approve/reject form with no input."}),n.map((s,c)=>(0,l.jsxs)("div",{className:"fld__field-row",style:{border:"1px solid var(--ax-border)",borderRadius:6,padding:8,marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr auto",gap:6,alignItems:"end"},children:[(0,l.jsx)(w,{label:"Key",hint:"Stored under values.<key>",children:(0,l.jsx)(L,{mono:!0,value:s.key,onChange:d=>r(c,{key:d})})}),(0,l.jsx)(w,{label:"Label",children:(0,l.jsx)(L,{value:s.label,onChange:d=>r(c,{label:d})})}),(0,l.jsxs)("div",{style:{display:"flex",gap:4},children:[(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:()=>a(c,-1),title:"Move up",children:"\u2191"}),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:()=>a(c,1),title:"Move down",children:"\u2193"}),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:()=>i(c),title:"Remove",children:"\u2715"})]})]}),(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:6,marginTop:6},children:[(0,l.jsx)(w,{label:"Type",children:(0,l.jsx)(se,{value:s.type,onChange:d=>r(c,{type:d}),options:$h.slice()})}),(0,l.jsx)(w,{label:"",children:(0,l.jsx)(op,{checked:!!s.required,onChange:d=>r(c,{required:d}),label:"Required"})})]}),(s.type==="select"||s.type==="multi-select")&&(0,l.jsx)(w,{label:"Options",hint:"Comma-separated list of allowed values",children:(0,l.jsx)(zt,{value:s.options??[],onChange:d=>r(c,{options:d}),placeholder:"low, medium, high"})}),(0,l.jsx)(w,{label:"Hint",hint:"Helper text shown under the input",children:(0,l.jsx)(L,{value:s.hint??"",onChange:d=>r(c,{hint:d})})}),(s.type==="text"||s.type==="long-text"||s.type==="number")&&(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:s.type==="number"?"1fr 1fr":"1fr 1fr 1fr",gap:6},children:[(0,l.jsx)(w,{label:"Min",children:(0,l.jsx)(Ci,{value:s.validate?.min,onChange:d=>o(c,{min:d})})}),(0,l.jsx)(w,{label:"Max",children:(0,l.jsx)(Ci,{value:s.validate?.max,onChange:d=>o(c,{max:d})})}),s.type!=="number"&&(0,l.jsx)(w,{label:"Pattern",hint:"Regex \u2014 optional",children:(0,l.jsx)(L,{mono:!0,value:s.validate?.pattern??"",onChange:d=>o(c,{pattern:d})})})]})]},c)),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:u,style:{marginTop:4},children:"+ Add field"})]})]})}function Gh({node:e,patchData:t}){let n=e.config,r=n.form??{title:"",fields:[],submitLabel:"Submit"};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(D,{title:"Assignment",children:[(0,l.jsx)(w,{label:"Assignee",hint:"actor:<id> or role:<id> \u2014 managed via `agentx actor` / `agentx role`",children:(0,l.jsx)(L,{mono:!0,value:String(n.assignTo??""),onChange:o=>t({assignTo:o}),placeholder:"role:reviewers"})}),(0,l.jsx)(w,{label:"Title",hint:"Shown in the inbox + notification",children:(0,l.jsx)(L,{value:String(n.title??""),onChange:o=>t({title:o})})}),(0,l.jsx)(w,{label:"Description",children:(0,l.jsx)(Ot,{value:String(n.description??""),onChange:o=>t({description:o}),rows:2})}),(0,l.jsx)(w,{label:"Due in",hint:"ISO-8601 duration (PT2H, P1D) or number of minutes",children:(0,l.jsx)(L,{mono:!0,value:String(n.dueIn??""),onChange:o=>t({dueIn:o}),placeholder:"P2D"})})]}),(0,l.jsx)(ip,{form:r,patch:o=>t({form:o})})]})}function Vh({node:e,patchData:t}){let n=e.config,r=n.form??{title:"",fields:[],submitLabel:"Submit"};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(D,{title:"Start conditions",children:(0,l.jsx)(w,{label:"Startable by",hint:"actor:<id> or role:<id> \u2014 who is allowed to initiate a new run",children:(0,l.jsx)(L,{mono:!0,value:String(n.startableBy??""),onChange:o=>t({startableBy:o}),placeholder:"role:public"})})}),(0,l.jsx)(ip,{form:r,patch:o=>t({form:o})})]})}function Kh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(D,{title:"Sub-process",children:[(0,l.jsx)(w,{label:"Workflow id",hint:"id of another workflow definition \u2014 it runs to completion, then parent resumes",children:(0,l.jsx)(L,{mono:!0,value:String(n.workflowId??""),onChange:r=>t({workflowId:r}),placeholder:"child-workflow-id"})}),(0,l.jsx)(w,{label:"Input map (JSON)",hint:'Object mapping child-context keys to templated values; "*" for full inheritance',children:(0,l.jsx)(Ot,{mono:!0,rows:4,value:JSON.stringify(n.inputMap??{},null,2),onChange:r=>{try{t({inputMap:JSON.parse(r)})}catch{}}})})]})}function Qh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(D,{title:"Emit signal",children:[(0,l.jsx)(w,{label:"Name",hint:"Signal identifier; other workflows' signal.wait nodes subscribe by this",children:(0,l.jsx)(L,{mono:!0,value:String(n.name??""),onChange:r=>t({name:r}),placeholder:"approved"})}),(0,l.jsx)(w,{label:"Scope",hint:"workflow = only same-workflow waiters; global = every waiter",children:(0,l.jsx)(se,{value:String(n.scope??"workflow"),onChange:r=>t({scope:r}),options:["workflow","global"]})}),(0,l.jsx)(w,{label:"Payload (JSON)",hint:"Templated object delivered with the signal",children:(0,l.jsx)(Ot,{mono:!0,rows:4,value:JSON.stringify(n.payload??{},null,2),onChange:r=>{try{t({payload:JSON.parse(r)})}catch{}}})})]})}function Jh({node:e,patchData:t}){let n=e.config;return(0,l.jsxs)(D,{title:"Wait for signal",children:[(0,l.jsx)(w,{label:"Name",children:(0,l.jsx)(L,{mono:!0,value:String(n.name??""),onChange:r=>t({name:r}),placeholder:"approved"})}),(0,l.jsx)(w,{label:"Scope",children:(0,l.jsx)(se,{value:String(n.scope??"workflow"),onChange:r=>t({scope:r}),options:["workflow","global"]})}),(0,l.jsx)(w,{label:"Match filter (JSON)",hint:"Only resume when the emitted payload matches every key here",children:(0,l.jsx)(Ot,{mono:!0,rows:3,value:JSON.stringify(n.match??{},null,2),onChange:r=>{try{t({match:JSON.parse(r)})}catch{}}})})]})}function Yh({node:e,patchData:t}){let n=e.config;return(0,l.jsx)(D,{title:"Timer",children:(0,l.jsx)(w,{label:"After",hint:"ISO-8601 duration (PT30M, PT2H, P1D) or minutes as a number",children:(0,l.jsx)(L,{mono:!0,value:String(n.after??""),onChange:r=>t({after:r}),placeholder:"PT1H"})})})}function Xh({node:e,patchData:t}){let n=e.config;return(0,l.jsx)(D,{title:"Parallel gateway",children:(0,l.jsx)(w,{label:"Mode",hint:"fanOut = send to all outgoing edges; join = wait for every incoming edge",children:(0,l.jsx)(se,{value:String(n.mode??"fanOut"),onChange:r=>t({mode:r}),options:["fanOut","join"]})})})}function qh({node:e,patchData:t}){let n=e.config,r=Array.isArray(n.inputs)?n.inputs.map(String):[],o=Array.isArray(n.rules)?n.rules:[],i=c=>t({inputs:c,rules:o.map(d=>({...d,when:(Array.isArray(d.when)?d.when.slice(0,c.length):[]).concat(Array(Math.max(0,c.length-(d.when?.length??0))).fill("*"))}))}),a=(c,d)=>{let g=[...o];g[c]={...g[c],...d},t({rules:g})},u=()=>t({rules:[...o,{when:r.map(()=>"*"),to:"port",output:{}}]}),s=c=>t({rules:o.filter((d,g)=>g!==c)});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(D,{title:"Inputs",children:(0,l.jsx)(w,{label:"Input expressions",hint:"Comma-separated; each is a template evaluated per-run against the run context",children:(0,l.jsx)(zt,{mono:!0,value:r,onChange:i,placeholder:"{{classify.result}}, {{trigger.values.amount}}"})})}),(0,l.jsxs)(D,{title:`Rules (${o.length})`,children:[o.map((c,d)=>(0,l.jsxs)("div",{style:{border:"1px solid var(--ax-border)",borderRadius:6,padding:8,marginBottom:8},children:[(0,l.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr auto",gap:6,alignItems:"end"},children:[(0,l.jsx)(w,{label:"Port (to)",hint:"Outgoing edge port taken when this row matches",children:(0,l.jsx)(L,{mono:!0,value:String(c.to??""),onChange:g=>a(d,{to:g})})}),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:()=>s(d),children:"\u2715"})]}),(0,l.jsx)(w,{label:"When (per-input cells)",hint:'One per input. "*" wildcard, "x" equals, ">10" numeric, "!=x", "/regex/"',children:(0,l.jsx)(zt,{mono:!0,value:(Array.isArray(c.when)?c.when:[]).map(String),onChange:g=>a(d,{when:g}),placeholder:"gold, >100"})}),(0,l.jsx)(w,{label:"Output (JSON)",children:(0,l.jsx)(Ot,{mono:!0,rows:2,value:JSON.stringify(c.output??{},null,2),onChange:g=>{try{a(d,{output:JSON.parse(g)})}catch{}}})})]},d)),(0,l.jsx)("button",{className:"fld__btn",type:"button",onClick:u,children:"+ Add rule"})]}),(0,l.jsx)(D,{title:"Default",children:(0,l.jsx)(w,{label:"Port (to)",children:(0,l.jsx)(L,{mono:!0,value:String(n.default?.to??"fallback"),onChange:c=>t({default:{...n.default??{},to:c}})})})})]})}var Zh={"trigger.channel":e=>(0,l.jsx)(Nh,{...e}),"trigger.cron":e=>(0,l.jsx)(Ch,{...e}),"trigger.hook":e=>(0,l.jsx)(Eh,{...e}),"trigger.manual":e=>(0,l.jsx)(Ph,{...e}),"trigger.form":e=>(0,l.jsx)(Vh,{...e}),agent:e=>(0,l.jsx)(Th,{...e}),transform:e=>(0,l.jsx)(Mh,{...e}),branch:e=>(0,l.jsx)(Fh,{...e}),"gateway.parallel":e=>(0,l.jsx)(Xh,{...e}),rule:e=>(0,l.jsx)(qh,{...e}),checkpoint:e=>(0,l.jsx)(Rh,{...e}),userTask:e=>(0,l.jsx)(Gh,{...e}),subProcess:e=>(0,l.jsx)(Kh,{...e}),"signal.emit":e=>(0,l.jsx)(Qh,{...e}),"signal.wait":e=>(0,l.jsx)(Jh,{...e}),"timer.boundary":e=>(0,l.jsx)(Yh,{...e}),end:e=>(0,l.jsx)(Ih,{...e}),"action.send":e=>(0,l.jsx)(Oh,{...e}),"action.createIssue":e=>(0,l.jsx)(Ah,{...e}),"action.setLabel":e=>(0,l.jsx)(Dh,{...e}),"action.readLabel":e=>(0,l.jsx)(jh,{...e}),"action.react":e=>(0,l.jsx)(Uh,{...e}),"action.editMessage":e=>(0,l.jsx)(Wh,{...e}),"action.logTime":e=>(0,l.jsx)(Bh,{...e}),"action.callHTTP":e=>(0,l.jsx)(Hh,{...e})};function ap(e){let{selection:t,nodes:n,edges:r,patch:o,patchData:i,onDelete:a,onDuplicate:u,validation:s,runState:c,agents:d}=e;if(!t)return(0,l.jsx)("aside",{className:"insp",children:(0,l.jsxs)("div",{className:"insp__empty",children:[(0,l.jsx)(A.slide,{}),(0,l.jsx)("h3",{children:"Nothing selected"}),(0,l.jsx)("p",{children:"Pick a node or edge on the canvas, or drag one in from the palette."}),(0,l.jsxs)("p",{style:{fontSize:11,color:"var(--muted)",marginTop:16},children:["V2 workflows are dataflow DAGs. Each node's output becomes available as"," ",(0,l.jsx)("span",{className:"mono",children:"{{nodeId.path}}"})," to downstream nodes."]})]})});if(t.kind==="edge"){let m=r.find(v=>v.id===t.id);return m?(0,l.jsx)(am,{edge:{...m,id:m.id??""},patch:o,onDelete:()=>a(t)}):null}let g=n.find(m=>m.id===t.id);return g?(0,l.jsx)(em,{node:g,nodes:n,edges:r,patch:o,patchData:i,onDelete:()=>a(t),onDuplicate:()=>u(t),validation:s,runOutput:c?.outputs?.[g.id],agents:d}):null}function em({node:e,nodes:t,edges:n,patch:r,patchData:o,onDelete:i,onDuplicate:a,validation:u,runOutput:s,agents:c}){let[d,g]=(0,te.useState)("config"),m=Zh[e.type];return(0,l.jsxs)("aside",{className:"insp",children:[(0,l.jsxs)("div",{className:"insp__head",children:[(0,l.jsxs)("div",{className:"insp__top",children:[(0,l.jsx)("span",{className:"insp__type-pill",children:e.type}),(0,l.jsx)("input",{className:"insp__name",value:e.id,onChange:v=>r({id:v.target.value})}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",title:"Duplicate",onClick:a,children:(0,l.jsx)(A.dup,{})}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",title:"Delete",onClick:i,children:(0,l.jsx)(A.trash,{})})]}),(0,l.jsxs)("div",{className:"insp__tabs",children:[(0,l.jsxs)("button",{className:"insp__tab"+(d==="config"?" is-active":""),onClick:()=>g("config"),children:[(0,l.jsx)(A.gear,{})," Config"]}),(0,l.jsxs)("button",{className:"insp__tab"+(d==="advanced"?" is-active":""),onClick:()=>g("advanced"),children:[(0,l.jsx)(A.layout,{})," Advanced"]}),(0,l.jsxs)("button",{className:"insp__tab"+(d==="preview"?" is-active":""),onClick:()=>g("preview"),children:[(0,l.jsx)(A.eye,{})," Preview ",s&&(0,l.jsx)("span",{className:"count",children:"\u25CF"})]})]})]}),(0,l.jsxs)("div",{className:"insp__body",children:[d==="config"&&(0,l.jsxs)(l.Fragment,{children:[m?m({node:e,nodes:t,patch:r,patchData:o,agents:c}):(0,l.jsx)(D,{title:"Config",children:(0,l.jsxs)("div",{style:{fontSize:12,color:"var(--muted)",marginBottom:8},children:["No typed form yet for ",(0,l.jsx)("span",{className:"mono",children:e.type}),". Use the Advanced tab to edit raw JSON."]})}),(0,l.jsx)(nm,{node:e,nodes:t,edges:n})]}),d==="advanced"&&(0,l.jsx)(im,{node:e,patchData:o}),d==="preview"&&(0,l.jsx)(D,{title:"Latest run output",children:s?(0,l.jsx)("pre",{style:{fontSize:11,color:"var(--ink-2)",padding:8,background:"var(--bg)",borderRadius:4,border:"1px solid var(--line)"},dangerouslySetInnerHTML:{__html:s}}):(0,l.jsx)("div",{style:{fontSize:12,color:"var(--muted)"},children:"No run data for this node yet."})}),u&&u.length>0&&(0,l.jsx)(D,{title:"Issues",right:(0,l.jsx)("span",{className:"card__kind",style:{color:"var(--err)"},children:u.length}),children:u.map((v,k)=>(0,l.jsxs)("div",{className:"fld__err",style:{padding:"6px 0"},children:[(0,l.jsx)(A.warn,{})," ",v.message]},k))})]})]})}function tm(e,t,n){let r=new Map(t.map(u=>[u.id,u])),o=new Set,i=[],a=u=>{if(!o.has(u)){o.add(u);for(let s of n)s.to===u&&a(s.from);if(u!==e){let s=r.get(u);s&&i.push(s)}}};a(e);for(let u of t)u.type.startsWith("trigger.")&&!o.has(u.id)&&u.id!==e&&i.push(u);return i}function nm({node:e,nodes:t,edges:n}){let r=(0,te.useMemo)(()=>tm(e.id,t,n),[e.id,t,n]);return r.length===0?(0,l.jsx)(D,{title:"Available inputs",defaultOpen:!1,children:(0,l.jsxs)("div",{style:{fontSize:12,color:"var(--muted)"},children:["No upstream nodes yet \u2014 connect a trigger or upstream node to make its outputs available as ",(0,l.jsx)("span",{className:"mono",children:"{{nodeId.path}}"})," templates here."]})}):(0,l.jsx)(D,{title:`Available inputs (${r.length})`,defaultOpen:!1,right:(0,l.jsx)("span",{className:"card__kind",style:{color:"var(--muted)"},children:"click to copy"}),children:(0,l.jsx)("div",{style:{display:"grid",gap:10},children:r.map(o=>(0,l.jsx)(rm,{node:o},o.id))})})}function rm({node:e}){let t=as[e.type],n=t?np(e.type,e.config):[];return(0,l.jsxs)("div",{style:{border:"1px solid var(--line)",borderRadius:6,padding:8,background:"var(--bg)"},children:[(0,l.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(0,l.jsx)("span",{className:"mono",style:{fontSize:11,color:"var(--ink-2)"},children:e.id}),(0,l.jsx)("span",{className:"insp__type-pill",style:{fontSize:10},children:e.type})]}),t?.summary&&(0,l.jsx)("div",{style:{fontSize:11,color:"var(--muted)",marginBottom:6},children:t.summary}),n.length===0?(0,l.jsx)("div",{style:{fontSize:11,color:"var(--muted)"},children:"No declared outputs."}):(0,l.jsx)("div",{style:{display:"grid",gap:2},children:n.map(r=>(0,l.jsx)(om,{nodeId:e.id,field:r},r.path))})]})}function om({nodeId:e,field:t}){let[n,r]=(0,te.useState)(!1),o=t.path?`{{${e}.${t.path}}}`:`{{${e}}}`;return(0,l.jsxs)("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(o),r(!0),window.setTimeout(()=>r(!1),900)}catch{}},title:t.description,style:{textAlign:"left",display:"grid",gridTemplateColumns:"1fr auto",gap:6,padding:"4px 6px",background:n?"var(--ok-soft, rgba(0, 200, 100, 0.12))":"transparent",border:"1px solid transparent",borderRadius:4,cursor:"pointer",color:"var(--ink-1)",fontSize:11,lineHeight:1.35},children:[(0,l.jsx)("span",{className:"mono",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o}),(0,l.jsx)("span",{style:{color:n?"var(--ok, #2ea043)":"var(--muted)",fontSize:10},children:n?"copied":t.type})]})}function im({node:e,patchData:t}){let[n,r]=(0,te.useState)(()=>JSON.stringify(e.config,null,2)),[o,i]=(0,te.useState)(null);return(0,te.useMemo)(()=>{r(JSON.stringify(e.config,null,2)),i(null)},[e.id]),(0,l.jsxs)(D,{title:"Raw config JSON",children:[(0,l.jsx)(Ot,{mono:!0,rows:14,value:n,onChange:r}),(0,l.jsxs)("div",{style:{display:"flex",gap:8,marginTop:8},children:[(0,l.jsxs)("button",{className:"btn btn--ghost-icon",onClick:()=>{try{let u=JSON.parse(n);u&&typeof u=="object"&&!Array.isArray(u)?(t(u),i(null)):i("config must be a JSON object")}catch(u){i(u.message)}},children:[(0,l.jsx)(A.check,{})," Apply"]}),(0,l.jsxs)("button",{className:"btn btn--ghost-icon",onClick:()=>r(JSON.stringify(e.config,null,2)),children:[(0,l.jsx)(A.undo,{})," Reset"]})]}),o&&(0,l.jsxs)("div",{className:"fld__err",style:{color:"var(--err)",fontSize:11,marginTop:4},children:[(0,l.jsx)(A.err,{})," ",o]})]})}function am({edge:e,patch:t,onDelete:n}){return(0,l.jsxs)("aside",{className:"insp",children:[(0,l.jsx)("div",{className:"insp__head",children:(0,l.jsxs)("div",{className:"insp__top",children:[(0,l.jsx)("span",{className:"insp__type-pill",children:"edge"}),(0,l.jsxs)("div",{className:"insp__name",style:{padding:0,fontSize:13,color:"var(--ink-2)"},children:[(0,l.jsx)("span",{className:"mono",children:e.from}),e.fromPort?(0,l.jsxs)("span",{className:"mono",children:[" :",e.fromPort]}):null," \u2192 ",(0,l.jsx)("span",{className:"mono",children:e.to})]}),(0,l.jsx)("button",{className:"btn btn--ghost-icon",onClick:n,children:(0,l.jsx)(A.trash,{})})]})}),(0,l.jsxs)("div",{className:"insp__body",children:[(0,l.jsx)(D,{title:"Label",children:(0,l.jsx)(w,{label:"Label",hint:"Shown on the edge (cosmetic only)",children:(0,l.jsx)(L,{mono:!0,value:e.label??"",onChange:r=>t({label:r})})})}),(0,l.jsx)(D,{title:"Port",defaultOpen:!1,children:(0,l.jsx)(w,{label:"fromPort",hint:"Set when the source is a branch node. Must match a case's `to` field or the default port.",children:(0,l.jsx)(L,{mono:!0,value:e.fromPort??"",onChange:r=>t({fromPort:r||void 0})})})})]})]})}var rr=re(St(),1);var K=re(_e(),1);function lp({onLoadTemplate:e}){let[t,n]=(0,rr.useState)(""),r=(0,rr.useMemo)(()=>{if(!t.trim())return rs;let o=t.toLowerCase();return rs.map(i=>({...i,items:i.items.filter(a=>a.label.toLowerCase().includes(o)||a.hint.toLowerCase().includes(o)||a.type.includes(o))})).filter(i=>i.items.length>0)},[t]);return(0,K.jsxs)("aside",{className:"pal",children:[(0,K.jsxs)("div",{className:"pal__search",children:[(0,K.jsx)(A.search,{}),(0,K.jsx)("input",{value:t,onChange:o=>n(o.target.value),placeholder:"Search nodes\u2026"}),(0,K.jsx)("kbd",{children:"/"})]}),(0,K.jsxs)("div",{className:"pal__scroll",children:[r.map(o=>(0,K.jsxs)(rr.Fragment,{children:[(0,K.jsxs)("div",{className:"pal__section",children:[(0,K.jsx)("span",{children:o.section}),(0,K.jsx)("span",{className:"pal__section-count",children:o.items.length.toString().padStart(2,"0")})]}),o.items.map(i=>(0,K.jsx)(lm,{item:i},i.id))]},o.section)),!t&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)("div",{className:"pal__section",children:[(0,K.jsx)("span",{children:"Templates"}),(0,K.jsx)("span",{className:"pal__section-count",children:is.length.toString().padStart(2,"0")})]}),is.map(o=>(0,K.jsxs)("div",{className:"pal__tpl",onClick:()=>e(o),children:[(0,K.jsx)("div",{className:"pal__tpl-dots",children:[0,1,2].map(i=>(0,K.jsx)("span",{className:i<o.dots?"on":""},i))}),(0,K.jsx)("div",{className:"pal__tpl-title",children:o.title}),(0,K.jsx)("div",{className:"pal__tpl-hint",children:o.hint})]},o.id))]})]}),(0,K.jsxs)("div",{className:"pal__foot",children:[(0,K.jsx)(A.lightning,{}),(0,K.jsx)("span",{children:"Drag items onto the canvas"})]})]})}function lm({item:e}){let t=A[e.icon]??A.box;return(0,K.jsxs)("div",{className:"pal__item",draggable:!0,onDragStart:r=>{r.dataTransfer.setData("application/x-wfe-item",JSON.stringify(e)),r.dataTransfer.effectAllowed="copy";let o=document.createElement("div");o.textContent=e.label,o.style.cssText="position:absolute;top:-1000px;padding:6px 10px;background:var(--accent);color:#fff;border-radius:6px;font:500 12px 'Space Grotesk';",document.body.appendChild(o),r.dataTransfer.setDragImage(o,10,10),setTimeout(()=>document.body.removeChild(o),0)},children:[(0,K.jsx)("div",{className:"pal__glyph "+e.glyph,children:(0,K.jsx)(t,{})}),(0,K.jsxs)("div",{className:"pal__meta",children:[(0,K.jsx)("div",{className:"pal__label",children:e.label}),(0,K.jsx)("div",{className:"pal__hint",children:e.hint})]})]})}var ss=re(St(),1);var b=re(_e(),1);function sp(e){return(0,b.jsxs)("div",{className:"tb",children:[(0,b.jsxs)("div",{className:"tb__brand",children:[(0,b.jsx)("div",{className:"tb__mark",children:"\u2726"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"tb__brand-label",children:"Workflow Editor"}),(0,b.jsx)("div",{className:"tb__brand-sub",children:e.workflowIdLabel})]})]}),(0,b.jsxs)("div",{className:"tb__main",children:[(0,b.jsxs)("div",{className:"tb__crumbs",children:[(0,b.jsx)("a",{href:"/workflows",children:"Workflows"}),(0,b.jsx)("span",{className:"sep",children:"/"}),(0,b.jsx)("input",{value:e.title,onChange:t=>e.setTitle(t.target.value)})]}),(0,b.jsx)("span",{className:"tb__sep"}),(0,b.jsxs)("div",{className:"tb__status "+e.status,children:[(0,b.jsx)("span",{className:"dot"}),e.statusLabel??(e.status==="is-dirty"?"unsaved":e.status==="is-running"?"running":e.status==="is-validating"?"validating\u2026":"saved")]}),(0,b.jsx)("div",{className:"tb__spacer"}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Undo (\u2318Z)",onClick:e.onUndo,disabled:!e.canUndo,children:(0,b.jsx)(A.undo,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Redo (\u2318\u21E7Z)",onClick:e.onRedo,disabled:!e.canRedo,children:(0,b.jsx)(A.redo,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Auto layout",onClick:e.onLayout,children:(0,b.jsx)(A.layout,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Keyboard shortcuts",onClick:e.onHelp,children:(0,b.jsx)(A.kbd,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon"+(e.tweaksOpen?" is-active":""),title:"Tweaks",onClick:()=>e.setTweaksOpen(!e.tweaksOpen),children:(0,b.jsx)(A.gear,{})}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",title:"Toggle theme",onClick:()=>e.setTheme(e.theme==="dark"?"light":"dark"),children:e.theme==="dark"?(0,b.jsx)(A.sun,{}):(0,b.jsx)(A.moon,{})})]}),(0,b.jsxs)("div",{className:"tb__actions",children:[(0,b.jsxs)("button",{className:"btn btn--outline",onClick:e.onSave,children:[(0,b.jsx)(A.save,{})," Save"]}),(0,b.jsx)("button",{className:"btn btn--primary",onClick:e.onRun,children:e.running?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(A.stop2,{})," Stop"]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(A.run,{})," Run preview"]})})]})]})}function up({running:e,script:t,cursor:n,onStop:r}){if(!e)return null;let o=t.filter(i=>i.nodeId);return(0,b.jsxs)("div",{className:"run",children:[(0,b.jsxs)("div",{className:"run__head",children:[(0,b.jsx)(A.lightning,{}),(0,b.jsx)("div",{className:"run__title",children:"Live run"}),(0,b.jsxs)("span",{className:"run__chip",children:[(0,b.jsx)("span",{className:"dot"})," streaming"]}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",onClick:r,style:{height:24,width:24},children:(0,b.jsx)(A.x,{})})]}),(0,b.jsx)("div",{className:"run__body",children:o.map((i,a)=>{let u=t.indexOf(i),s=u<n,c=["run__step"];return s&&c.push("is-done"),u===n&&c.push("is-current"),(0,b.jsxs)("div",{className:c.join(" "),children:[(0,b.jsx)("div",{className:"run__marker",children:s?(0,b.jsx)(A.check,{}):a+1}),(0,b.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,b.jsx)("div",{className:"run__step-title",children:i.title}),i.body&&(0,b.jsx)("div",{className:"run__step-body",dangerouslySetInnerHTML:{__html:i.body}})]})]},a)})}),(0,b.jsxs)("div",{className:"run__foot",children:[(0,b.jsxs)("span",{children:[Math.min(n+1,t.length),"/",t.length]}),(0,b.jsxs)("span",{children:[t.length?Math.round((n+1)/t.length*100):0,"%"]})]})]})}var sm=[{h:255,name:"indigo"},{h:220,name:"blue"},{h:180,name:"teal"},{h:145,name:"green"},{h:70,name:"amber"},{h:28,name:"orange"},{h:330,name:"pink"}];function cp(e){return e.open?(0,b.jsxs)("div",{className:"tweaks",children:[(0,b.jsxs)("div",{className:"tweaks__head",children:[(0,b.jsx)("span",{children:"Tweaks"}),(0,b.jsx)("button",{className:"btn btn--ghost-icon",style:{height:22,width:22},onClick:()=>e.setOpen(!1),children:(0,b.jsx)(A.x,{})})]}),(0,b.jsxs)("div",{className:"tweaks__body",children:[(0,b.jsxs)("div",{className:"tweaks__row",children:[(0,b.jsx)("label",{children:"Theme"}),(0,b.jsx)("div",{className:"tweaks__opts",children:["dark","light"].map(t=>(0,b.jsx)("button",{className:e.theme===t?"on":"",onClick:()=>e.setTheme(t),children:t},t))})]}),(0,b.jsxs)("div",{className:"tweaks__row",children:[(0,b.jsx)("label",{children:"Density"}),(0,b.jsx)("div",{className:"tweaks__opts",children:["compact","cozy","roomy"].map(t=>(0,b.jsx)("button",{className:e.density===t?"on":"",onClick:()=>e.setDensity(t),children:t},t))})]}),(0,b.jsxs)("div",{className:"tweaks__row",style:{alignItems:"flex-start",flexDirection:"column",gap:6},children:[(0,b.jsx)("label",{children:"Accent hue"}),(0,b.jsx)("div",{className:"tweaks__hue",children:sm.map(t=>(0,b.jsx)("button",{title:t.name,className:e.hue===t.h?"on":"",style:{background:`oklch(0.70 0.16 ${t.h})`},onClick:()=>e.setHue(t.h)},t.h))})]})]})]}):null}function dp({open:e,onClose:t}){return e?(0,b.jsx)("div",{className:"kbd-overlay",onClick:t,children:(0,b.jsxs)("div",{className:"kbd-card",onClick:r=>r.stopPropagation(),children:[(0,b.jsx)("h3",{children:"Keyboard shortcuts"}),[["Save workflow","\u2318S"],["Undo / Redo","\u2318Z / \u2318\u21E7Z"],["Delete selection","Delete"],["Duplicate node","\u2318D"],["Run preview","\u2318\u23CE"],["Focus search","/"],["Fit view","F"],["Close panels","Esc"]].map(([r,o])=>(0,b.jsxs)("div",{className:"row",children:[(0,b.jsx)("span",{children:r}),(0,b.jsx)("span",{children:o.split(" ").map((i,a)=>(0,b.jsxs)(ss.Fragment,{children:[i.includes("/")?i.split("/").map((u,s)=>(0,b.jsxs)(ss.Fragment,{children:[s>0&&" / ",(0,b.jsx)("kbd",{children:u.trim()})]},s)):(0,b.jsx)("kbd",{children:i})," "]},a))})]},r))]})}):null}var Te=re(St(),1),Q=re(_e(),1),cs="agentx.editor.chat.v1";function pp({currentWorkflow:e,onApplyWorkflow:t,agentId:n}){let[r,o]=(0,Te.useState)(!1),[i,a]=(0,Te.useState)(()=>pm()),[u,s]=(0,Te.useState)(""),[c,d]=(0,Te.useState)(!1),g=(0,Te.useRef)(null),m=(0,Te.useRef)(null);(0,Te.useEffect)(()=>{let f=i.filter(p=>!p.pending).map(p=>({role:p.role,content:p.content}));try{sessionStorage.setItem(cs,JSON.stringify(f))}catch{}},[i]),(0,Te.useEffect)(()=>{let f=g.current;f&&(f.scrollTop=f.scrollHeight)},[i,r]),(0,Te.useEffect)(()=>{r&&m.current?.focus()},[r]);let v=(0,Te.useCallback)(async()=>{let f=u.trim();if(!f||c)return;let p=i.filter(x=>!x.pending).map(x=>({role:x.role,content:x.content})),h=[...i,{role:"user",content:f},{role:"assistant",content:"\u2026",pending:!0}];a(h),s(""),d(!0);try{let x=await fetch("/api/workflows/editor/chat",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json","X-Requested-With":"agentx-board"},body:JSON.stringify({messages:[...p,{role:"user",content:f}],currentWorkflow:e,agentId:n})}),E=await x.json().catch(()=>({}));x.ok?a(M=>us(M,{role:"assistant",content:E.reply||"",workflow:E.workflow||void 0})):a(M=>us(M,{role:"assistant",content:"",error:E.error||`HTTP ${x.status}`}))}catch(x){a(E=>us(E,{role:"assistant",content:"",error:x?.message||"network error"}))}finally{d(!1)}},[n,c,e,u,i]),k=()=>{a([]);try{sessionStorage.removeItem(cs)}catch{}},S=f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),v())},$=(0,Te.useMemo)(()=>["Describe the process you want \u2014 I'll generate the workflow.","","Examples:",'\u2022 "Expense approval: employee submits form, manager approves over $500 otherwise auto-approve"','\u2022 "Telegram bot that classifies messages as billing/bug/other and routes to the right agent"',`\u2022 "Triage a GitLab issue: label 'bug' \u2192 dev agent; label 'feature' \u2192 product agent; otherwise close"`].join(`
1233
+ `),[]);return(0,Q.jsxs)(Q.Fragment,{children:[!r&&(0,Q.jsxs)("button",{className:"ax-chat__pill","aria-label":"Open workflow assistant",onClick:()=>o(!0),children:[(0,Q.jsx)("span",{className:"ax-chat__pill-glyph",children:"\u2728"}),(0,Q.jsx)("span",{className:"ax-chat__pill-text",children:"Ask AI to build\u2026"})]}),r&&(0,Q.jsxs)("div",{className:"ax-chat__panel",role:"dialog","aria-label":"Workflow assistant",children:[(0,Q.jsxs)("header",{className:"ax-chat__head",children:[(0,Q.jsxs)("div",{className:"ax-chat__title",children:[(0,Q.jsx)("span",{className:"ax-chat__dot"})," Workflow assistant"]}),(0,Q.jsxs)("div",{className:"ax-chat__head-actions",children:[(0,Q.jsx)("button",{className:"ax-chat__iconbtn",onClick:k,title:"Clear conversation",children:"\u232B"}),(0,Q.jsx)("button",{className:"ax-chat__iconbtn",onClick:()=>o(!1),title:"Collapse",children:"\u25BC"})]})]}),(0,Q.jsxs)("div",{className:"ax-chat__body",ref:g,children:[i.length===0&&(0,Q.jsx)("pre",{className:"ax-chat__empty",children:$}),i.map((f,p)=>(0,Q.jsx)(um,{m:f,onApply:t},p))]}),(0,Q.jsxs)("footer",{className:"ax-chat__foot",children:[(0,Q.jsx)("textarea",{ref:m,className:"ax-chat__input",value:u,onChange:f=>s(f.target.value),onKeyDown:S,placeholder:"Describe the workflow you want\u2026 (Enter to send, Shift+Enter for newline)",rows:2,disabled:c}),(0,Q.jsx)("button",{className:"ax-chat__send",onClick:()=>void v(),disabled:c||!u.trim(),children:c?"\u2026":"Send"})]})]}),(0,Q.jsx)("style",{children:fm})]})}function um({m:e,onApply:t}){if(e.error)return(0,Q.jsxs)("div",{className:"ax-chat__msg ax-chat__msg--err",children:["\u26A0 ",e.error]});if(e.pending)return(0,Q.jsx)("div",{className:"ax-chat__msg ax-chat__msg--assistant ax-chat__msg--pending",children:(0,Q.jsxs)("span",{className:"ax-chat__typing",children:[(0,Q.jsx)("span",{}),(0,Q.jsx)("span",{}),(0,Q.jsx)("span",{})]})});let n=e.role==="user"?"ax-chat__msg ax-chat__msg--user":"ax-chat__msg ax-chat__msg--assistant",r=cm(e.content,!!e.workflow),o=e.role==="assistant"?dm(r):Ei(r);return(0,Q.jsxs)("div",{className:n,children:[(0,Q.jsx)("div",{className:"ax-chat__text",dangerouslySetInnerHTML:{__html:o}}),e.workflow&&(0,Q.jsxs)("div",{className:"ax-chat__apply",children:[(0,Q.jsx)("button",{className:"ax-chat__applybtn",onClick:()=>t(e.workflow),children:"Apply to canvas"}),(0,Q.jsx)("span",{className:"ax-chat__apply-hint",children:"replaces the current workflow"})]})]})}function cm(e,t){return t?e.replace(/```(?:json)?\s*\n[\s\S]*?```/g,"").trim():e}function Ei(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function dm(e){let t=[],n=e.replace(/```([a-zA-Z0-9_-]*)\n([\s\S]*?)```/g,(d,g,m)=>{let v=Ei(m.replace(/\n+$/,"")),k=g?` class="lang-${Ei(g)}"`:"";return t.push(`<pre><code${k}>${v}</code></pre>`),`\0CODE${t.length-1}\0`});n=Ei(n),n=n.replace(/`([^`\n]+)`/g,(d,g)=>`<code>${g}</code>`),n=n.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(d,g,m)=>`<a href="${/^https?:\/\/|^\//.test(m)?m:"#"}" target="_blank" rel="noopener noreferrer">${g}</a>`),n=n.replace(/\*\*([^*\n]+)\*\*/g,"<strong>$1</strong>"),n=n.replace(/(?<!\*)\*([^*\n]+)\*(?!\*)/g,"<em>$1</em>");let r=n.split(`
1234
+ `),o=[],i=null,a=()=>{i&&(o.push(`</${i}>`),i=null)},u=[],s=()=>{if(!u.length)return;let d=u.join(" ").trim();d&&o.push(`<p>${d}</p>`),u=[]};for(let d of r){let g=d.trimEnd();if(/^\s*$/.test(g)){s(),a();continue}let m=/^(#{1,3})\s+(.+)/.exec(g);if(m){s(),a();let S=m[1].length+2;o.push(`<h${S}>${m[2]}</h${S}>`);continue}let v=/^\s*[-*]\s+(.+)/.exec(g);if(v){s(),i!=="ul"&&(a(),o.push("<ul>"),i="ul"),o.push(`<li>${v[1]}</li>`);continue}let k=/^\s*\d+\.\s+(.+)/.exec(g);if(k){s(),i!=="ol"&&(a(),o.push("<ol>"),i="ol"),o.push(`<li>${k[1]}</li>`);continue}a(),u.push(g)}s(),a();let c=o.join(`
1235
+ `);return c=c.replace(/CODE(\d+)/g,(d,g)=>t[Number(g)]||""),c}function us(e,t){let n=[...e];for(let r=n.length-1;r>=0;r--)if(n[r].pending||n[r].role==="assistant")return n[r]=t,n;return n.push(t),n}function pm(){try{let e=sessionStorage.getItem(cs);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t.filter(n=>n&&(n.role==="user"||n.role==="assistant")&&typeof n.content=="string"):[]}catch{return[]}}var fm=`
1236
+ .ax-chat__pill {
1237
+ position: fixed; bottom: 18px; right: 18px; z-index: 40;
1238
+ display: flex; align-items: center; gap: 8px;
1239
+ background: linear-gradient(135deg, #6b5bff, #8b5cf6); color: white;
1240
+ border: 0; border-radius: 999px; padding: 10px 18px;
1241
+ font: 600 13px/1 system-ui, -apple-system, sans-serif;
1242
+ box-shadow: 0 10px 28px rgba(107,91,255,0.35);
1243
+ cursor: pointer; transition: transform 120ms ease, box-shadow 120ms ease;
1244
+ }
1245
+ .ax-chat__pill:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(107,91,255,0.45); }
1246
+ .ax-chat__pill-glyph { font-size: 16px; line-height: 1; }
1247
+
1248
+ .ax-chat__panel {
1249
+ position: fixed; bottom: 18px; right: 18px; z-index: 40;
1250
+ width: 380px; height: 540px; max-height: calc(100vh - 40px);
1251
+ display: flex; flex-direction: column;
1252
+ background: var(--ax-bg, #fff); color: var(--ax-fg, #111);
1253
+ border: 1px solid var(--ax-border, rgba(0,0,0,0.15));
1254
+ border-radius: 12px;
1255
+ box-shadow: 0 20px 50px rgba(0,0,0,0.25);
1256
+ overflow: hidden;
1257
+ }
1258
+ .ax-chat__head {
1259
+ display: flex; align-items: center; justify-content: space-between;
1260
+ padding: 10px 14px;
1261
+ border-bottom: 1px solid var(--ax-border, rgba(0,0,0,0.1));
1262
+ background: linear-gradient(135deg, rgba(107,91,255,0.08), rgba(139,92,246,0.04));
1263
+ }
1264
+ .ax-chat__title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
1265
+ .ax-chat__dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; }
1266
+ .ax-chat__head-actions { display: flex; gap: 4px; }
1267
+ .ax-chat__iconbtn {
1268
+ background: transparent; border: 0; cursor: pointer;
1269
+ padding: 4px 8px; font-size: 14px; color: var(--ax-muted, #666);
1270
+ border-radius: 4px;
1271
+ }
1272
+ .ax-chat__iconbtn:hover { background: rgba(127,127,127,0.15); color: var(--ax-fg); }
1273
+
1274
+ .ax-chat__body {
1275
+ flex: 1; overflow-y: auto; padding: 12px;
1276
+ display: flex; flex-direction: column; gap: 10px;
1277
+ font-size: 13px; line-height: 1.45;
1278
+ }
1279
+ .ax-chat__empty {
1280
+ font-size: 12px; color: var(--ax-muted, #777); white-space: pre-wrap;
1281
+ font-family: inherit; margin: 0;
1282
+ }
1283
+
1284
+ .ax-chat__msg { max-width: 88%; padding: 8px 12px; border-radius: 10px; word-break: break-word; }
1285
+ .ax-chat__msg--user {
1286
+ align-self: flex-end;
1287
+ background: linear-gradient(135deg, #6b5bff, #8b5cf6); color: white;
1288
+ border-bottom-right-radius: 2px;
1289
+ }
1290
+ .ax-chat__msg--assistant {
1291
+ align-self: flex-start;
1292
+ background: rgba(127,127,127,0.12);
1293
+ border-bottom-left-radius: 2px;
1294
+ }
1295
+ .ax-chat__msg--err { align-self: center; background: rgba(192,57,43,0.15); color: #c0392b; font-size: 12px; max-width: 100%; text-align: center; }
1296
+ .ax-chat__msg--pending { min-height: 20px; }
1297
+ .ax-chat__typing { display: inline-flex; gap: 4px; }
1298
+ .ax-chat__typing span {
1299
+ width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.5;
1300
+ animation: axchatblink 1s infinite ease-in-out;
1301
+ }
1302
+ .ax-chat__typing span:nth-child(2) { animation-delay: 0.15s; }
1303
+ .ax-chat__typing span:nth-child(3) { animation-delay: 0.3s; }
1304
+ @keyframes axchatblink { 0%, 80%, 100% { opacity: 0.3; } 40% { opacity: 1; } }
1305
+
1306
+ .ax-chat__text { margin: 0; }
1307
+ .ax-chat__msg--user .ax-chat__text { white-space: pre-wrap; }
1308
+
1309
+ /* Assistant markdown surface ------------------------------------------- */
1310
+ .ax-chat__msg--assistant .ax-chat__text > :first-child { margin-top: 0; }
1311
+ .ax-chat__msg--assistant .ax-chat__text > :last-child { margin-bottom: 0; }
1312
+ .ax-chat__msg--assistant .ax-chat__text p { margin: 6px 0; }
1313
+ .ax-chat__msg--assistant .ax-chat__text h3,
1314
+ .ax-chat__msg--assistant .ax-chat__text h4,
1315
+ .ax-chat__msg--assistant .ax-chat__text h5 {
1316
+ margin: 10px 0 4px; font-weight: 700; font-size: 13px;
1317
+ }
1318
+ .ax-chat__msg--assistant .ax-chat__text ul,
1319
+ .ax-chat__msg--assistant .ax-chat__text ol {
1320
+ margin: 4px 0; padding-left: 20px;
1321
+ }
1322
+ .ax-chat__msg--assistant .ax-chat__text li { margin: 2px 0; }
1323
+ .ax-chat__msg--assistant .ax-chat__text a {
1324
+ color: #6b5bff; text-decoration: underline; word-break: break-all;
1325
+ }
1326
+ .ax-chat__msg--assistant .ax-chat__text code {
1327
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
1328
+ font-size: 11.5px;
1329
+ background: rgba(0,0,0,0.08);
1330
+ padding: 1px 5px; border-radius: 4px;
1331
+ }
1332
+ .ax-chat__msg--assistant .ax-chat__text pre {
1333
+ margin: 6px 0; padding: 8px 10px;
1334
+ background: rgba(0,0,0,0.08);
1335
+ border-radius: 6px;
1336
+ overflow-x: auto; max-width: 100%;
1337
+ }
1338
+ .ax-chat__msg--assistant .ax-chat__text pre code {
1339
+ background: transparent; padding: 0; border-radius: 0;
1340
+ font-size: 11px; line-height: 1.45; white-space: pre;
1341
+ }
1342
+ @media (prefers-color-scheme: dark) {
1343
+ .ax-chat__msg--assistant .ax-chat__text code,
1344
+ .ax-chat__msg--assistant .ax-chat__text pre { background: rgba(255,255,255,0.06); }
1345
+ }
1346
+
1347
+ .ax-chat__apply { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
1348
+ .ax-chat__applybtn {
1349
+ background: #22c55e; color: white; border: 0; border-radius: 6px;
1350
+ padding: 6px 10px; font: 600 12px/1 system-ui; cursor: pointer;
1351
+ }
1352
+ .ax-chat__applybtn:hover { background: #16a34a; }
1353
+ .ax-chat__apply-hint { font-size: 10px; color: var(--ax-muted, #888); }
1354
+
1355
+ .ax-chat__foot {
1356
+ display: flex; gap: 8px; padding: 10px;
1357
+ border-top: 1px solid var(--ax-border, rgba(0,0,0,0.1));
1358
+ }
1359
+ .ax-chat__input {
1360
+ flex: 1; resize: none;
1361
+ font: inherit; padding: 8px 10px;
1362
+ border: 1px solid var(--ax-border, rgba(0,0,0,0.15));
1363
+ border-radius: 8px; background: var(--ax-bg); color: var(--ax-fg);
1364
+ }
1365
+ .ax-chat__input:focus { outline: 2px solid #8b5cf6; outline-offset: -1px; }
1366
+ .ax-chat__send {
1367
+ background: #6b5bff; color: white; border: 0; border-radius: 8px;
1368
+ padding: 0 14px; font: 600 12px/1 system-ui; cursor: pointer;
1369
+ }
1370
+ .ax-chat__send:disabled { opacity: 0.4; cursor: not-allowed; }
1371
+ .ax-chat__send:hover:not(:disabled) { background: #5b4bf0; }
1372
+
1373
+ @media (prefers-color-scheme: dark) {
1374
+ .ax-chat__panel { background: #1a1a1a; color: #eee; border-color: rgba(255,255,255,0.1); }
1375
+ .ax-chat__head { background: linear-gradient(135deg, rgba(107,91,255,0.15), rgba(139,92,246,0.08)); }
1376
+ .ax-chat__input { background: #2a2a2a; color: #eee; border-color: rgba(255,255,255,0.15); }
1377
+ }
1378
+ `;function qr(e,t){let n=t?.nodes??{},r=e.nodes.map(i=>({...i,position:i.position??n[i.id]??void 0})),o=e.edges.map((i,a)=>({...i,id:gm(i,a)}));return{meta:{id:e.id,version:2,title:e.title,description:e.description,priority:e.priority,fanOut:e.fanOut,envAllow:e.envAllow,retention:e.retention,mesh:e.mesh},nodes:r,edges:o}}function ds(e){let t={id:e.meta.id,version:2,title:e.meta.title,description:e.meta.description,priority:e.meta.priority,fanOut:e.meta.fanOut,nodes:e.nodes.map(r=>({id:r.id,type:r.type,config:r.config??{},position:r.position})),edges:e.edges.map(r=>{let{id:o,...i}=r;return i}),envAllow:e.meta.envAllow,retention:e.meta.retention,mesh:e.meta.mesh??{allowRemote:!1}},n={version:1,nodes:Object.fromEntries(e.nodes.filter(r=>r.position).map(r=>[r.id,{x:r.position.x,y:r.position.y}]))};return{workflow:t,layout:n}}function Zr(e){return{meta:{id:/^[a-z0-9][a-z0-9_-]*$/.test(e)?e:"new-workflow",version:2,title:"New workflow",priority:0,fanOut:!1,envAllow:[],retention:{maxRuns:500,maxDays:90},mesh:{allowRemote:!1}},nodes:[{id:"trigger",type:"trigger.manual",config:{},position:{x:40,y:80}},{id:"end",type:"end",config:{status:"completed"},position:{x:400,y:80}}],edges:[{id:"e-trigger-end",from:"trigger",to:"end"}]}}function gm(e,t){let n=o=>o.replace(/[^a-zA-Z0-9._-]/g,"_");return`e-${[n(e.from),e.fromPort?n(e.fromPort):"out",n(e.to),String(t)].join("-")}`}var ps="__trigger__";function hm(){try{return localStorage.getItem("ax_token")||""}catch{return""}}function kn(){let e={"Content-Type":"application/json","X-Requested-With":"agentx-board"},t=hm();return t&&(e.Authorization="Bearer "+t),e}async function fp(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e),{headers:kn()});if(!t.ok)throw new Error("fetch workflow "+e+": "+t.status);return(await t.json()).workflow}async function gp(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e)+"/layout",{headers:kn()});return t.ok?(await t.json()).layout:null}async function hp(e){let t=await fetch("/api/workflows/"+encodeURIComponent(e.id)+"/validate",{method:"POST",headers:kn(),body:JSON.stringify(e)});return t.ok?await t.json():{ok:!1,issues:[{path:"",message:"HTTP "+t.status}]}}async function mp(e,t){let n=t.create?"/api/workflows":"/api/workflows/"+encodeURIComponent(e.id),r=t.create?"POST":"PUT",o=await fetch(n,{method:r,headers:kn(),body:JSON.stringify(e)});if(o.ok)return{ok:!0};let i=await o.json().catch(()=>({}));return{ok:!1,issues:i.issues||[{path:"",message:i.error||"HTTP "+o.status}]}}async function vp(e,t){await fetch("/api/workflows/"+encodeURIComponent(e)+"/layout",{method:"PUT",headers:kn(),body:JSON.stringify(t)})}async function yp(e){return(await fetch("/api/workflows/"+encodeURIComponent(e),{method:"DELETE",headers:kn()})).ok}async function xp(){try{let e=await fetch("/api/agents",{headers:kn()});if(!e.ok)return[];let t=await e.json();if(Array.isArray(t))return t.map(n=>typeof n=="string"?{id:n,name:n}:n&&typeof n=="object"&&"id"in n?{id:String(n.id),name:String(n.name??n.id)}:null).filter(n=>n!==null);if(t&&typeof t=="object"&&"agents"in t){let n=t.agents;if(Array.isArray(n))return n.map(r=>({id:String(r.id??r),name:String(r.name??r.id??r)}))}return[]}catch{return[]}}var We=re(_e(),1);function mm(e,t){switch(t.type){case"hydrate":return{meta:t.graph.meta,nodes:t.graph.nodes,edges:t.graph.edges,selection:null,isNew:t.isNew};case"setTitle":return{...e,meta:{...e.meta,title:t.title}};case"patchMeta":return{...e,meta:{...e.meta,...t.patch}};case"select":return{...e,selection:t.selection};case"moveNode":return{...e,nodes:e.nodes.map(n=>n.id===t.id?{...n,position:{x:t.x,y:t.y}}:n)};case"patchNode":return{...e,nodes:e.nodes.map(n=>n.id===t.id?{...n,...t.patch}:n)};case"patchNodeData":return{...e,nodes:e.nodes.map(n=>n.id===t.id?{...n,config:{...n.config,...t.patch}}:n)};case"patchEdge":return{...e,edges:e.edges.map(n=>n.id===t.id?{...n,...t.patch}:n)};case"addNode":{let n="n-"+Math.random().toString(36).slice(2,8),r={id:n,type:t.item.type,position:{x:t.x,y:t.y},config:vm(t.item)};return{...e,nodes:[...e.nodes,r],selection:{kind:"node",id:n}}}case"connect":{if(t.conn.from===t.conn.to)return e;let n="e-"+Math.random().toString(36).slice(2,8),r=e.nodes.find(a=>a.id===t.conn.from),o=t.conn.fromPort==="true"||t.conn.fromPort==="false"?t.conn.fromPort:"",i={id:n,from:t.conn.from,fromPort:t.conn.fromPort,to:t.conn.to,toPort:"in",label:o||(r?.type?.startsWith("trigger.")?"start":"")};return e.edges.some(a=>a.from===i.from&&a.fromPort===i.fromPort&&a.to===i.to)?e:{...e,edges:[...e.edges,i]}}case"delete":{let n=t.selection??e.selection;return n?n.kind==="node"?n.id===ps?e:{...e,nodes:e.nodes.filter(r=>r.id!==n.id),edges:e.edges.filter(r=>r.from!==n.id&&r.to!==n.id),selection:null}:n.kind==="edge"?{...e,edges:e.edges.filter(r=>r.id!==n.id),selection:null}:e:e}case"duplicate":{let n=t.selection??e.selection;if(!n||n.kind!=="node")return e;let r=e.nodes.find(u=>u.id===n.id);if(!r||r.id===ps)return e;let o="n-"+Math.random().toString(36).slice(2,8),i=r.position??{x:0,y:0},a={...r,id:o,position:{x:i.x+40,y:i.y+40}};return{...e,nodes:[...e.nodes,a],selection:{kind:"node",id:o}}}case"layout":{let n=ym(e.nodes,e.edges);return{...e,nodes:e.nodes.map(r=>({...r,...n[r.id]??{}}))}}case"setAll":return t.state}}function vm(e){switch(e.type){case"trigger.channel":return{source:e.id.endsWith("whatsapp")?"whatsapp-message":e.id.endsWith("telegram")?"telegram-message":e.id.endsWith("gitlab")?"gitlab-issue":"whatsapp-message",filter:{chat:"*"}};case"trigger.cron":return{spec:"0 * * * *"};case"trigger.manual":return{};case"trigger.hook":return{event:"on:hook"};case"trigger.form":return{form:{title:"New request",fields:[],submitLabel:"Submit"}};case"agent":return{agentId:"",prompt:"",resultParser:"noqta-result-token"};case"transform":return{expr:""};case"branch":return{cases:[{when:{kind:"equals",params:{path:"",value:""}},to:"case1"}],default:"fallback"};case"gateway.parallel":return{mode:"fanOut"};case"rule":return{inputs:[""],rules:[{when:["*"],to:"match",output:{}}],default:{to:"fallback",output:{}}};case"checkpoint":return{name:"wait",waitFor:{source:"manual"},resumeMatch:{}};case"userTask":return{assignTo:"role:reviewers",title:"",form:{title:"Review",fields:[],submitLabel:"Approve",secondaryAction:{key:"reject",label:"Reject"}}};case"subProcess":return{workflowId:"",inputMap:{},awaitCompletion:!0};case"signal.emit":return{name:"",scope:"workflow",payload:{}};case"signal.wait":return{name:"",scope:"workflow",match:{}};case"timer.boundary":return{after:"PT1H"};case"action.send":return{channel:"gitlab",chatId:"",text:""};case"action.createIssue":return{channel:"gitlab",project:"",title:"",description:"",labels:[]};case"action.setLabel":return{channel:"gitlab",add:[],remove:[]};case"action.readLabel":return{channel:"gitlab"};case"action.react":return{channel:"gitlab",emoji:"\u{1F440}"};case"action.editMessage":return{channel:"gitlab",messageId:"",text:""};case"action.logTime":return{channel:"gitlab"};case"action.callHTTP":return{url:"",method:"POST"};case"end":return{status:"completed"}}return{}}function ym(e,t){let n=Object.fromEntries(e.map(s=>[s.id,s])),r={};e.forEach(s=>{r[s.id]=0}),t.forEach(s=>{n[s.to]&&(r[s.to]=(r[s.to]??0)+1)});let o={},i=(s,c)=>{o[s]=Math.max(o[s]??0,c),t.filter(d=>d.from===s).forEach(d=>i(d.to,c+1))};e.filter(s=>(r[s.id]??0)===0).forEach(s=>i(s.id,0));let a={};Object.entries(o).forEach(([s,c])=>{(a[c]??(a[c]=[])).push(s)});let u={};return Object.entries(a).forEach(([s,c])=>{c.forEach((d,g)=>{u[d]={x:80+Number(s)*280,y:120+g*170}})}),u}function xm(e){let[t,n]=(0,O.useReducer)(mm,e),r=(0,O.useRef)([]),o=(0,O.useRef)([]),i=(0,O.useRef)(t);(0,O.useEffect)(()=>{i.current=t},[t]);let a=(0,O.useCallback)(d=>{d.type==="select"||d.type==="moveNode"||(r.current.push(i.current),r.current.length>50&&r.current.shift(),o.current=[]),n(d)},[]),u=(0,O.useCallback)(()=>{let d=r.current.pop();d&&(o.current.push(i.current),n({type:"setAll",state:d}))},[]),s=(0,O.useCallback)(()=>{let d=o.current.pop();d&&(r.current.push(i.current),n({type:"setAll",state:d}))},[]),c=(0,O.useCallback)(d=>{r.current=[],o.current=[],n({type:"setAll",state:d})},[]);return{state:t,dispatch:a,undo:u,redo:s,forceReset:c,canUndo:r.current.length>0,canRedo:o.current.length>0}}function wm(e){let t={},n=(r,o)=>{(t[r]??(t[r]=[])).push({message:o})};for(let r of e.nodes){let o=r.config;r.type==="agent"&&!o.agentId&&n(r.id,"Agent node has no agentId selected."),r.type==="branch"&&(!Array.isArray(o.cases)||o.cases.length===0)&&n(r.id,"Branch has no cases \u2014 add at least one.");let i=r.type==="end",a=r.type.startsWith("trigger.");!i&&!a&&!e.edges.some(u=>u.from===r.id)&&n(r.id,"No outgoing connection \u2014 the flow dead-ends here.")}return t}function km(e){let t=[],n=Object.fromEntries(e.nodes.map(a=>[a.id,a])),r=new Set,o=a=>{if(r.has(a))return;r.add(a);let u=n[a];if(!u)return;let s=u.config;t.push({nodeId:u.id,edgeId:null,title:`${u.id}${s.agentId?` \u2192 ${String(s.agentId)}`:""}`,body:s.prompt?`<span class="mono">${String(s.prompt).slice(0,200)}</span>`:null});let c=e.edges.filter(d=>d.from===a);for(let d of c){let g=d.id??"";t.push({nodeId:null,edgeId:g,title:null,body:null}),o(d.to)}},i=e.nodes.find(a=>a.type.startsWith("trigger."))?.id;return i&&o(i),t}function wp(){let{state:e,dispatch:t,undo:n,redo:r,forceReset:o,canUndo:i,canRedo:a}=xm({meta:{id:"loading",version:2,title:"Loading\u2026",priority:0,fanOut:!1,envAllow:[],retention:{maxRuns:500,maxDays:90}},nodes:[],edges:[],selection:null,isNew:!0}),{meta:u,nodes:s,edges:c,selection:d,isNew:g}=e,m=(0,O.useRef)(e);(0,O.useEffect)(()=>{m.current=e},[e]);let[v,k]=(0,O.useState)(()=>localStorage.getItem("wfe.theme")??"dark"),[S,$]=(0,O.useState)(()=>localStorage.getItem("wfe.density")??"cozy"),[f,p]=(0,O.useState)(()=>Number(localStorage.getItem("wfe.hue")??255)),[h,x]=(0,O.useState)({zoom:.75,tx:40,ty:60});(0,O.useEffect)(()=>{document.documentElement.dataset.theme=v,localStorage.setItem("wfe.theme",v)},[v]),(0,O.useEffect)(()=>{localStorage.setItem("wfe.density",S)},[S]),(0,O.useEffect)(()=>{document.documentElement.style.setProperty("--accent-hue",String(f)),localStorage.setItem("wfe.hue",String(f))},[f]);let E=R=>k(R),[M,F]=(0,O.useState)(!1),[P,H]=(0,O.useState)(!1),[U,be]=(0,O.useState)(null),[on,ft]=(0,O.useState)("is-saved"),gt=(R,I="ok")=>{be({msg:R,kind:I}),setTimeout(()=>be(null),2e3)},[Ti,Mi]=(0,O.useState)(tp);(0,O.useEffect)(()=>{(async()=>{let R=await xp();if(!R.length)return;let I=R.map((ue,ye)=>({id:ue.id,name:ue.name||ue.id,tags:[],color:ye*37%360}));Mi(I)})()},[]),(0,O.useEffect)(()=>{let R=new URLSearchParams(location.search),I=R.get("new")==="1",ue=R.get("id")||"new-workflow";if(I){o(Pi(Zr(ue),!0));return}(async()=>{try{let[ye,Be]=await Promise.all([fp(ue),gp(ue)]),Me=qr(ye,Be);o(Pi(Me,!1))}catch(ye){gt(`Failed to load "${ue}": ${ye.message}`,"err"),o(Pi(Zr(ue),!0))}})()},[]),(0,O.useEffect)(()=>{u.id!=="loading"&&ft("is-dirty")},[s,c,u]);let or=(0,O.useCallback)(async()=>{let R=m.current,{workflow:I,layout:ue}=ds({meta:R.meta,nodes:R.nodes,edges:R.edges});ft("is-validating");let ye=await hp(I);if(!ye.ok){ft("is-dirty"),gt(`${ye.issues.length} validation issue${ye.issues.length===1?"":"s"}`,"err");return}let Be=await mp(I,{create:R.isNew});if(!Be.ok){ft("is-dirty"),gt(Be.issues?.[0]?.message??"Save failed","err");return}try{await vp(I.id,ue)}catch{}if(ft("is-saved"),gt("Saved","ok"),R.isNew){t({type:"patchMeta",patch:{}});let Me=new URL(location.href);Me.searchParams.delete("new"),Me.searchParams.set("id",I.id),history.replaceState(null,"",Me.toString()),o({...R,isNew:!1})}},[t,o]),_n=(0,O.useCallback)(R=>t({type:"delete",selection:R}),[t]),ir=(0,O.useCallback)(R=>t({type:"duplicate",selection:R}),[t]),Fi=(0,O.useCallback)((R,I,ue)=>t({type:"addNode",item:R,x:I,y:ue}),[t]),Ri=(0,O.useCallback)(R=>t({type:"connect",conn:R}),[t]),Ii=(0,O.useCallback)((R,I,ue)=>t({type:"moveNode",id:R,x:I,y:ue}),[t]),Li=(0,O.useCallback)(R=>t({type:"select",selection:R,commit:!0}),[t]),zi=R=>{d&&(d.kind==="node"&&t({type:"patchNode",id:d.id,patch:R}),d.kind==="edge"&&t({type:"patchEdge",id:d.id,patch:R}))},Oi=R=>{!d||d.kind!=="node"||t({type:"patchNodeData",id:d.id,patch:R})},Ai=async R=>{if(!confirm(`Replace the current workflow with the "${R.title}" template? (Undoable)`))return;let I=await _m(R.id,u.id);o(Pi(I,g)),gt(`Loaded ${R.title}`,"ok")},[N,j]=(0,O.useState)(!1),[z,G]=(0,O.useState)(-1),ne=(0,O.useMemo)(()=>km(e),[e]),fe=(0,O.useRef)(null),de=()=>{fe.current&&window.clearInterval(fe.current),j(!1),ft("is-saved")},rt=()=>{j(!0),G(0),ft("is-running"),fe.current&&window.clearInterval(fe.current),fe.current=window.setInterval(()=>{G(R=>R>=ne.length-1?(fe.current&&window.clearInterval(fe.current),j(!1),ft("is-saved"),R):R+1)},900)};(0,O.useEffect)(()=>()=>{fe.current&&window.clearInterval(fe.current)},[]);let ot=(0,O.useMemo)(()=>{if(!N&&z<0)return null;let R=new Set,I=new Set,ue=null,ye=null;for(let Me=0;Me<=z;Me++){let He=ne[Me];He&&(He.nodeId&&(Me===z?ue=He.nodeId:R.add(He.nodeId)),He.edgeId&&(Me===z?ye=He.edgeId:I.add(He.edgeId)))}let Be={};for(let Me=0;Me<=z;Me++){let He=ne[Me];!He||!He.nodeId||!He.body||(Be[He.nodeId]=He.body)}return{visitedNodes:R,visitedEdges:I,currentNodeId:ue,currentEdgeId:ye,outputs:Be}},[N,z,ne]),kt=(0,O.useMemo)(()=>wm(e),[e]),_t=d?.kind==="node"?kt[d.id]:void 0;(0,O.useEffect)(()=>{let R=I=>{let ue=document.activeElement,ye=!!ue&&/^(INPUT|TEXTAREA|SELECT)$/.test(ue.tagName);I.key==="?"&&!ye&&H(!0),I.key==="Escape"&&(H(!1),F(!1));let Be=I.metaKey||I.ctrlKey;Be&&I.key.toLowerCase()==="z"&&!I.shiftKey?(I.preventDefault(),n()):Be&&(I.key.toLowerCase()==="y"||I.shiftKey&&I.key.toLowerCase()==="z")?(I.preventDefault(),r()):Be&&I.key.toLowerCase()==="s"?(I.preventDefault(),or()):Be&&I.key==="Enter"?(I.preventDefault(),N?de():rt()):Be&&I.key.toLowerCase()==="d"&&!ye&&d?(I.preventDefault(),ir(d)):(I.key==="Delete"||I.key==="Backspace")&&!ye&&d?_n(d):I.key==="/"&&!ye&&(I.preventDefault(),document.querySelector(".pal__search input")?.focus())};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[d,N,n,r,or,_n,ir]),(0,O.useEffect)(()=>{let R=I=>{on==="is-dirty"&&(I.preventDefault(),I.returnValue="")};return window.addEventListener("beforeunload",R),()=>window.removeEventListener("beforeunload",R)},[on]);let eo=async()=>{if(g||!confirm(`Delete workflow "${u.id}"? This cannot be undone.`))return;await yp(u.id)?(gt("Deleted","ok"),setTimeout(()=>{location.href="/workflows"},500)):gt("Delete failed","err")};return(0,We.jsxs)("div",{className:"app","data-density":S,children:[(0,We.jsx)(sp,{title:u.title,setTitle:R=>t({type:"setTitle",title:R}),status:on,theme:v,setTheme:E,canUndo:i,canRedo:a,onUndo:n,onRedo:r,onSave:()=>void or(),onRun:()=>N?de():rt(),running:N,tweaksOpen:M,setTweaksOpen:F,onHelp:()=>H(!0),onLayout:()=>t({type:"layout"}),workflowIdLabel:`/workflows/${u.id}`}),(0,We.jsx)(lp,{onLoadTemplate:Ai}),(0,We.jsx)(ep,{nodes:s,edges:c,selection:d,setSelection:Li,onNodeMove:Ii,onAddNode:Fi,onConnect:Ri,onDelete:_n,runState:ot,viewBox:h,setViewBox:x}),(0,We.jsx)(ap,{selection:d,nodes:s,edges:c,patch:zi,patchData:Oi,onDelete:_n,onDuplicate:ir,validation:_t,runState:ot,agents:Ti}),(0,We.jsx)(up,{running:N||z>=0,script:ne,cursor:z,onStop:()=>{de(),G(-1)}}),(0,We.jsx)(cp,{open:M,setOpen:F,theme:v,setTheme:E,density:S,setDensity:$,hue:f,setHue:p}),(0,We.jsx)(dp,{open:P,onClose:()=>H(!1)}),!g&&(0,We.jsx)("button",{className:"btn btn--ghost-icon",style:{position:"absolute",bottom:14,right:14,zIndex:30,height:28,padding:"0 10px",fontSize:11},onClick:eo,children:"Delete workflow"}),(0,We.jsx)(pp,{currentWorkflow:ds({meta:u,nodes:s,edges:c}).workflow,onApplyWorkflow:R=>{let I=qr(R);t({type:"setAll",state:{meta:I.meta,nodes:I.nodes,edges:I.edges,selection:null,isNew:!1}}),gt("Applied workflow from chat","ok")}}),U&&(0,We.jsxs)("div",{className:"toast"+(U.kind==="err"?" err":""),children:[(0,We.jsx)("span",{className:"dot"}),U.msg]})]})}function Pi(e,t){return{meta:e.meta,nodes:e.nodes,edges:e.edges,selection:null,isNew:t}}async function _m(e,t){return e==="tpl.blank"?Zr(t||"new-workflow"):e==="tpl.whatsapp"?qr(bm(t)):e==="tpl.mr"?qr(Sm(t)):Zr(t||"new-workflow")}function bm(e){return{id:e||"whatsapp-client-support",version:2,title:"WhatsApp client support triage",priority:10,fanOut:!1,envAllow:["GITLAB_TOKEN"],nodes:[{id:"trigger",type:"trigger.channel",config:{source:"whatsapp-message",filter:{chat:"*"}}},{id:"classify",type:"agent",config:{agentId:"intent-classifier",prompt:"Classify this message from {{trigger.sender.name}}:\n{{trigger.text}}\nReply with `RESULT: status-check`, `RESULT: new-request`, or `RESULT: other`."}},{id:"route",type:"branch",config:{cases:[{when:{kind:"equals",params:{path:"classify.result",value:"status-check"}},to:"status"},{when:{kind:"equals",params:{path:"classify.result",value:"new-request"}},to:"new"}],default:"fallback"}},{id:"lookup_ticket",type:"agent",config:{agentId:"gitlab-ticket-lookup",prompt:"Find related issues for {{trigger.sender.name}}. Summarise."}},{id:"reply_status",type:"action.send",config:{channel:"whatsapp",chatId:"{{trigger.chatId}}",text:"{{lookup_ticket.reply}}"}},{id:"create_issue",type:"action.createIssue",config:{channel:"gitlab",project:"noqta/web",title:"WhatsApp: {{trigger.sender.name}}",description:`From: {{trigger.sender.name}} ({{trigger.fromJid}})
1379
+
1380
+ {{trigger.text}}`,labels:["source::whatsapp","Triage"]}},{id:"confirm_new",type:"action.send",config:{channel:"whatsapp",chatId:"{{trigger.chatId}}",text:"Thanks \u2014 ticket {{create_issue.issue.webUrl}} opened."}},{id:"fallback",type:"action.send",config:{channel:"whatsapp",chatId:"{{trigger.chatId}}",text:"Got it \u2014 a human will reply shortly."}},{id:"done",type:"end",config:{status:"completed"}}],edges:[{from:"trigger",to:"classify"},{from:"classify",to:"route"},{from:"route",fromPort:"status",to:"lookup_ticket"},{from:"route",fromPort:"new",to:"create_issue"},{from:"route",fromPort:"fallback",to:"fallback"},{from:"lookup_ticket",to:"reply_status"},{from:"create_issue",to:"confirm_new"},{from:"reply_status",to:"done"},{from:"confirm_new",to:"done"},{from:"fallback",to:"done"}],retention:{maxRuns:500,maxDays:90}}}function Sm(e){return{id:e||"mr-review",version:2,title:"MR review loop",priority:5,fanOut:!1,envAllow:["GITLAB_TOKEN"],nodes:[{id:"trigger",type:"trigger.channel",config:{source:"gitlab-pipeline",filter:{project:"noqta/web"}}},{id:"review",type:"agent",config:{agentId:"code-reviewer",prompt:"Review MR #{{trigger.pipeline.id}}. Reply `RESULT: approved` or `RESULT: changes-requested`."}},{id:"route",type:"branch",config:{cases:[{when:{kind:"equals",params:{path:"review.result",value:"approved"}},to:"approved"},{when:{kind:"equals",params:{path:"review.result",value:"changes-requested"}},to:"rejected"}],default:"done"}},{id:"approved",type:"action.send",config:{channel:"gitlab",chatId:"{{trigger.chatId}}",text:"\u2705 Approved by reviewer"}},{id:"rejected",type:"action.send",config:{channel:"gitlab",chatId:"{{trigger.chatId}}",text:"\u274C Changes requested"}},{id:"done",type:"end",config:{status:"completed"}}],edges:[{from:"trigger",to:"review"},{from:"review",to:"route"},{from:"route",fromPort:"approved",to:"approved"},{from:"route",fromPort:"rejected",to:"rejected"},{from:"route",fromPort:"done",to:"done"},{from:"approved",to:"done"},{from:"rejected",to:"done"}],retention:{maxRuns:500,maxDays:90}}}var bp=re(_e(),1);function Nm(e,t){if(document.getElementById(e))return;let n=document.createElement("style");n.id=e,n.textContent=t,document.head.appendChild(n)}function kp(){Nm("wfe-redesign-css",gs);let e=document.getElementById("wfe-root");if(!e){console.error("[wfe] #wfe-root missing \u2014 editor cannot mount");return}(0,_p.createRoot)(e).render((0,bp.jsx)(wp,{}))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",kp):kp();})();
1381
+ /*! Bundled license information:
1382
+
1383
+ react/cjs/react.production.min.js:
1384
+ (**
1385
+ * @license React
1386
+ * react.production.min.js
1387
+ *
1388
+ * Copyright (c) Facebook, Inc. and its affiliates.
1389
+ *
1390
+ * This source code is licensed under the MIT license found in the
1391
+ * LICENSE file in the root directory of this source tree.
1392
+ *)
1393
+
1394
+ scheduler/cjs/scheduler.production.min.js:
1395
+ (**
1396
+ * @license React
1397
+ * scheduler.production.min.js
1398
+ *
1399
+ * Copyright (c) Facebook, Inc. and its affiliates.
1400
+ *
1401
+ * This source code is licensed under the MIT license found in the
1402
+ * LICENSE file in the root directory of this source tree.
1403
+ *)
1404
+
1405
+ react-dom/cjs/react-dom.production.min.js:
1406
+ (**
1407
+ * @license React
1408
+ * react-dom.production.min.js
1409
+ *
1410
+ * Copyright (c) Facebook, Inc. and its affiliates.
1411
+ *
1412
+ * This source code is licensed under the MIT license found in the
1413
+ * LICENSE file in the root directory of this source tree.
1414
+ *)
1415
+
1416
+ react/cjs/react-jsx-runtime.production.min.js:
1417
+ (**
1418
+ * @license React
1419
+ * react-jsx-runtime.production.min.js
1420
+ *
1421
+ * Copyright (c) Facebook, Inc. and its affiliates.
1422
+ *
1423
+ * This source code is licensed under the MIT license found in the
1424
+ * LICENSE file in the root directory of this source tree.
1425
+ *)
1426
+ */
1427
+ //# sourceMappingURL=workflow-editor.global.js.map