agent-canvas 0.1.44 → 0.2.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 (115) hide show
  1. package/README.md +14 -0
  2. package/bin/lib/commands/daemon.ts +3 -6
  3. package/bin/lib/commands/push.ts +1 -1
  4. package/bin/lib/daemon-lifecycle.ts +65 -72
  5. package/bin/lib/helpers.test.ts +1 -0
  6. package/bin/lib/helpers.ts +30 -74
  7. package/daemon/build.ts +37 -16
  8. package/daemon/client/App.tsx +27 -61
  9. package/daemon/client/CompareView.tsx +4 -4
  10. package/daemon/client/FileBrowser.tsx +4 -4
  11. package/daemon/client/FileViewer.tsx +4 -4
  12. package/daemon/client/OverviewView.tsx +2 -2
  13. package/daemon/client/RevisionSelect.tsx +1 -1
  14. package/daemon/client/canvas-runtime.ts +1 -0
  15. package/daemon/client/clientApi.ts +18 -0
  16. package/daemon/client/components/index.ts +3 -16
  17. package/daemon/client/styles.css +4 -457
  18. package/daemon/dist/annotations-runtime.js +1 -0
  19. package/daemon/dist/client.css +1 -1
  20. package/daemon/dist/client.js +76 -76
  21. package/daemon/dist/components.js +59 -59
  22. package/daemon/dist/index.html +1 -0
  23. package/daemon/dist/preact-compat.js +1 -1
  24. package/daemon/dist/runtime.js +1 -1
  25. package/daemon/src/components.ts +13 -0
  26. package/daemon/src/handlers/api.ts +13 -9
  27. package/daemon/src/handlers/files.ts +2 -3
  28. package/daemon/src/handlers/static.ts +1 -1
  29. package/daemon/src/handlers/uploads.ts +2 -3
  30. package/daemon/src/paths.ts +10 -24
  31. package/daemon/src/remote-feedback.test.ts +1 -1
  32. package/daemon/src/remote-feedback.ts +1 -1
  33. package/daemon/src/secrets-api.test.ts +2 -2
  34. package/daemon/src/server.ts +11 -10
  35. package/daemon/src/share-e2e.test.ts +1 -1
  36. package/daemon/src/share.test.ts +1 -1
  37. package/daemon/src/share.ts +1 -1
  38. package/daemon/tsconfig.json +1 -3
  39. package/package.json +11 -4
  40. package/.github/dark.png +0 -0
  41. package/.github/light.png +0 -0
  42. package/.github/workflows/ci.yml +0 -48
  43. package/.github/workflows/deploy-worker-prod.yml +0 -19
  44. package/.github/workflows/deploy-worker-stage.yml +0 -21
  45. package/.github/workflows/deploy-worker.yml +0 -72
  46. package/.github/workflows/release.yml +0 -36
  47. package/CLAUDE.md +0 -86
  48. package/bun.lock +0 -377
  49. package/daemon/client/AnnotationEditor.tsx +0 -315
  50. package/daemon/client/AnnotationProvider.tsx +0 -195
  51. package/daemon/client/AnnotationSidebar.tsx +0 -627
  52. package/daemon/client/FileIcon.tsx +0 -76
  53. package/daemon/client/PlanRenderer.tsx +0 -614
  54. package/daemon/client/Popover.tsx +0 -350
  55. package/daemon/client/RenderErrorContext.ts +0 -11
  56. package/daemon/client/ResponsePreview.tsx +0 -186
  57. package/daemon/client/SessionContext.tsx +0 -3
  58. package/daemon/client/annotationContext.ts +0 -114
  59. package/daemon/client/annotationDom.ts +0 -104
  60. package/daemon/client/annotationDraft.test.ts +0 -188
  61. package/daemon/client/annotationDraft.ts +0 -130
  62. package/daemon/client/compat/preact-all.ts +0 -4
  63. package/daemon/client/components/Callout.tsx +0 -26
  64. package/daemon/client/components/Checklist.tsx +0 -37
  65. package/daemon/client/components/Choice.tsx +0 -176
  66. package/daemon/client/components/CodeBlock.tsx +0 -35
  67. package/daemon/client/components/Diff.tsx +0 -65
  68. package/daemon/client/components/FilePreview.tsx +0 -88
  69. package/daemon/client/components/Image.tsx +0 -45
  70. package/daemon/client/components/Markdown.tsx +0 -44
  71. package/daemon/client/components/Mermaid.tsx +0 -565
  72. package/daemon/client/components/Note.tsx +0 -14
  73. package/daemon/client/components/Priority.tsx +0 -19
  74. package/daemon/client/components/ResponseNote.tsx +0 -19
  75. package/daemon/client/components/Section.tsx +0 -33
  76. package/daemon/client/components/Table.tsx +0 -35
  77. package/daemon/client/components/Task.tsx +0 -76
  78. package/daemon/client/components/UserInput.tsx +0 -174
  79. package/daemon/client/components/renderMarkdownChildren.tsx +0 -97
  80. package/daemon/client/generateMarkdown.ts +0 -273
  81. package/daemon/client/highlightRange.ts +0 -224
  82. package/daemon/client/popoverPosition.ts +0 -31
  83. package/daemon/client/runtime.ts +0 -123
  84. package/daemon/client/theme.css +0 -66
  85. package/daemon/client/useTextAnnotation.tsx +0 -188
  86. package/daemon/client/utils.ts +0 -13
  87. package/daemon/src/compiler.test.ts +0 -57
  88. package/daemon/src/compiler.ts +0 -360
  89. package/daemon/src/handlers/utils.ts +0 -14
  90. package/daemon/src/router.ts +0 -16
  91. package/daemon/src/session-secrets.test.ts +0 -83
  92. package/daemon/src/session.ts +0 -612
  93. package/daemon/src/watcher.ts +0 -71
  94. package/daemon/src/websocket.test.ts +0 -99
  95. package/daemon/src/websocket.ts +0 -211
  96. package/tsconfig.json +0 -14
  97. package/workers/canvas-share/README.md +0 -159
  98. package/workers/canvas-share/oblaka.ts +0 -56
  99. package/workers/canvas-share/package.json +0 -25
  100. package/workers/canvas-share/public/assets/.gitkeep +0 -0
  101. package/workers/canvas-share/public/assets/client.css +0 -2
  102. package/workers/canvas-share/public/assets/client.js +0 -91
  103. package/workers/canvas-share/public/assets/components.js +0 -65
  104. package/workers/canvas-share/public/assets/jsx-runtime.js +0 -3
  105. package/workers/canvas-share/public/assets/preact-compat.js +0 -1
  106. package/workers/canvas-share/public/assets/runtime.js +0 -1
  107. package/workers/canvas-share/public/index.html +0 -385
  108. package/workers/canvas-share/public/screenshot-dark.png +0 -0
  109. package/workers/canvas-share/public/screenshot-light.png +0 -0
  110. package/workers/canvas-share/src/index.test.ts +0 -209
  111. package/workers/canvas-share/src/index.ts +0 -518
  112. package/workers/canvas-share/src/types.ts +0 -119
  113. package/workers/canvas-share/src/util.ts +0 -156
  114. package/workers/canvas-share/src/validation.ts +0 -160
  115. package/workers/canvas-share/tsconfig.json +0 -16
@@ -92,6 +92,7 @@
92
92
  "react/jsx-runtime": "/assets/jsx-runtime.js",
93
93
  "react/jsx-dev-runtime": "/assets/jsx-runtime.js",
94
94
  "#canvas/components": "/assets/components.js",
95
+ "@fabrika/annotations/runtime": "/assets/annotations-runtime.js",
95
96
  "#canvas/runtime": "/assets/runtime.js"
96
97
  }
97
98
  }
@@ -1 +1 @@
1
- var p,F,x0,S1,w,T0,y0,m0,Q0,r,k,k0,V0,X0,K0,s0,e={},l=[],b1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=Array.isArray;function C(Y,Z){for(var G in Z)Y[G]=Z[G];return Y}function E0(Y){Y&&Y.parentNode&&Y.parentNode.removeChild(Y)}function S(Y,Z,G){var O,X,Q,K={};for(Q in Z)Q=="key"?O=Z[Q]:Q=="ref"?X=Z[Q]:K[Q]=Z[Q];if(arguments.length>2&&(K.children=arguments.length>3?p.call(arguments,2):G),typeof Y=="function"&&Y.defaultProps!=null)for(Q in Y.defaultProps)K[Q]===void 0&&(K[Q]=Y.defaultProps[Q]);return s(Y,K,O,X,null)}function s(Y,Z,G,O,X){var Q={type:Y,props:Z,key:G,ref:O,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:X==null?++x0:X,__i:-1,__u:0};return X==null&&F.vnode!=null&&F.vnode(Q),Q}function F0(){return{current:null}}function U(Y){return Y.children}function H(Y,Z){this.props=Y,this.context=Z}function _(Y,Z){if(Z==null)return Y.__?_(Y.__,Y.__i+1):null;for(var G;Z<Y.__k.length;Z++)if((G=Y.__k[Z])!=null&&G.__e!=null)return G.__e;return typeof Y.type=="function"?_(Y):null}function C1(Y){if(Y.__P&&Y.__d){var Z=Y.__v,G=Z.__e,O=[],X=[],Q=C({},Z);Q.__v=Z.__v+1,F.vnode&&F.vnode(Q),N0(Y.__P,Q,Z,Y.__n,Y.__P.namespaceURI,32&Z.__u?[G]:null,O,G==null?_(Z):G,!!(32&Z.__u),X),Q.__v=Z.__v,Q.__.__k[Q.__i]=Q,h0(O,Q,X),Z.__e=Z.__=null,Q.__e!=G&&p0(Q)}}function p0(Y){if((Y=Y.__)!=null&&Y.__c!=null)return Y.__e=Y.__c.base=null,Y.__k.some(function(Z){if(Z!=null&&Z.__e!=null)return Y.__e=Y.__c.base=Z.__e}),p0(Y)}function W0(Y){(!Y.__d&&(Y.__d=!0)&&w.push(Y)&&!t.__r++||T0!=F.debounceRendering)&&((T0=F.debounceRendering)||y0)(t)}function t(){try{for(var Y,Z=1;w.length;)w.length>Z&&w.sort(m0),Y=w.shift(),Z=w.length,C1(Y)}finally{w.length=t.__r=0}}function f0(Y,Z,G,O,X,Q,K,V,E,J,q){var W,D,N,A,I,L,d,j=O&&O.__k||l,M=Z.length;for(E=P1(G,Z,j,E,M),W=0;W<M;W++)(N=G.__k[W])!=null&&(D=N.__i!=-1&&j[N.__i]||e,N.__i=W,L=N0(Y,N,D,X,Q,K,V,E,J,q),A=N.__e,N.ref&&D.ref!=N.ref&&(D.ref&&q0(D.ref,null,N),q.push(N.ref,N.__c||A,N)),I==null&&A!=null&&(I=A),(d=!!(4&N.__u))||D.__k===N.__k?(E=a0(N,E,Y,d),d&&D.__e&&(D.__e=null)):typeof N.type=="function"&&L!==void 0?E=L:A&&(E=A.nextSibling),N.__u&=-7);return G.__e=I,E}function P1(Y,Z,G,O,X){var Q,K,V,E,J,q=G.length,W=q,D=0;for(Y.__k=Array(X),Q=0;Q<X;Q++)(K=Z[Q])!=null&&typeof K!="boolean"&&typeof K!="function"?(typeof K=="string"||typeof K=="number"||typeof K=="bigint"||K.constructor==String?K=Y.__k[Q]=s(null,K,null,null,null):f(K)?K=Y.__k[Q]=s(U,{children:K},null,null,null):K.constructor===void 0&&K.__b>0?K=Y.__k[Q]=s(K.type,K.props,K.key,K.ref?K.ref:null,K.__v):Y.__k[Q]=K,E=Q+D,K.__=Y,K.__b=Y.__b+1,V=null,(J=K.__i=B1(K,G,E,W))!=-1&&(W--,(V=G[J])&&(V.__u|=2)),V==null||V.__v==null?(J==-1&&(X>q?D--:X<q&&D++),typeof K.type!="function"&&(K.__u|=4)):J!=E&&(J==E-1?D--:J==E+1?D++:(J>E?D--:D++,K.__u|=4))):Y.__k[Q]=null;if(W)for(Q=0;Q<q;Q++)(V=G[Q])!=null&&(2&V.__u)==0&&(V.__e==O&&(O=_(V)),o0(V,V));return O}function a0(Y,Z,G,O){var X,Q;if(typeof Y.type=="function"){for(X=Y.__k,Q=0;X&&Q<X.length;Q++)X[Q]&&(X[Q].__=Y,Z=a0(X[Q],Z,G,O));return Z}Y.__e!=Z&&(O&&(Z&&Y.type&&!Z.parentNode&&(Z=_(Y)),G.insertBefore(Y.__e,Z||null)),Z=Y.__e);do Z=Z&&Z.nextSibling;while(Z!=null&&Z.nodeType==8);return Z}function P(Y,Z){return Z=Z||[],Y==null||typeof Y=="boolean"||(f(Y)?Y.some(function(G){P(G,Z)}):Z.push(Y)),Z}function B1(Y,Z,G,O){var X,Q,K,V=Y.key,E=Y.type,J=Z[G],q=J!=null&&(2&J.__u)==0;if(J===null&&V==null||q&&V==J.key&&E==J.type)return G;if(O>(q?1:0)){for(X=G-1,Q=G+1;X>=0||Q<Z.length;)if((J=Z[K=X>=0?X--:Q++])!=null&&(2&J.__u)==0&&V==J.key&&E==J.type)return K}return-1}function _0(Y,Z,G){Z[0]=="-"?Y.setProperty(Z,G==null?"":G):Y[Z]=G==null?"":typeof G!="number"||b1.test(Z)?G:G+"px"}function i(Y,Z,G,O,X){var Q,K;Y:if(Z=="style")if(typeof G=="string")Y.style.cssText=G;else{if(typeof O=="string"&&(Y.style.cssText=O=""),O)for(Z in O)G&&Z in G||_0(Y.style,Z,"");if(G)for(Z in G)O&&G[Z]==O[Z]||_0(Y.style,Z,G[Z])}else if(Z[0]=="o"&&Z[1]=="n")Q=Z!=(Z=Z.replace(k0,"$1")),K=Z.toLowerCase(),Z=K in Y||Z=="onFocusOut"||Z=="onFocusIn"?K.slice(2):Z.slice(2),Y.l||(Y.l={}),Y.l[Z+Q]=G,G?O?G[k]=O[k]:(G[k]=V0,Y.addEventListener(Z,Q?K0:X0,Q)):Y.removeEventListener(Z,Q?K0:X0,Q);else{if(X=="http://www.w3.org/2000/svg")Z=Z.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(Z!="width"&&Z!="height"&&Z!="href"&&Z!="list"&&Z!="form"&&Z!="tabIndex"&&Z!="download"&&Z!="rowSpan"&&Z!="colSpan"&&Z!="role"&&Z!="popover"&&Z in Y)try{Y[Z]=G==null?"":G;break Y}catch(V){}typeof G=="function"||(G==null||G===!1&&Z[4]!="-"?Y.removeAttribute(Z):Y.setAttribute(Z,Z=="popover"&&G==1?"":G))}}function v0(Y){return function(Z){if(this.l){var G=this.l[Z.type+Y];if(Z[r]==null)Z[r]=V0++;else if(Z[r]<G[k])return;return G(F.event?F.event(Z):Z)}}}function N0(Y,Z,G,O,X,Q,K,V,E,J){var q,W,D,N,A,I,L,d,j,M,$,m,g0,o,O0,b=Z.type;if(Z.constructor!==void 0)return null;128&G.__u&&(E=!!(32&G.__u),Q=[V=Z.__e=G.__e]),(q=F.__b)&&q(Z);Y:if(typeof b=="function")try{if(d=Z.props,j=b.prototype&&b.prototype.render,M=(q=b.contextType)&&O[q.__c],$=q?M?M.props.value:q.__:O,G.__c?L=(W=Z.__c=G.__c).__=W.__E:(j?Z.__c=W=new b(d,$):(Z.__c=W=new H(d,$),W.constructor=b,W.render=w1),M&&M.sub(W),W.state||(W.state={}),W.__n=O,D=W.__d=!0,W.__h=[],W._sb=[]),j&&W.__s==null&&(W.__s=W.state),j&&b.getDerivedStateFromProps!=null&&(W.__s==W.state&&(W.__s=C({},W.__s)),C(W.__s,b.getDerivedStateFromProps(d,W.__s))),N=W.props,A=W.state,W.__v=Z,D)j&&b.getDerivedStateFromProps==null&&W.componentWillMount!=null&&W.componentWillMount(),j&&W.componentDidMount!=null&&W.__h.push(W.componentDidMount);else{if(j&&b.getDerivedStateFromProps==null&&d!==N&&W.componentWillReceiveProps!=null&&W.componentWillReceiveProps(d,$),Z.__v==G.__v||!W.__e&&W.shouldComponentUpdate!=null&&W.shouldComponentUpdate(d,W.__s,$)===!1){Z.__v!=G.__v&&(W.props=d,W.state=W.__s,W.__d=!1),Z.__e=G.__e,Z.__k=G.__k,Z.__k.some(function(T){T&&(T.__=Z)}),l.push.apply(W.__h,W._sb),W._sb=[],W.__h.length&&K.push(W);break Y}W.componentWillUpdate!=null&&W.componentWillUpdate(d,W.__s,$),j&&W.componentDidUpdate!=null&&W.__h.push(function(){W.componentDidUpdate(N,A,I)})}if(W.context=$,W.props=d,W.__P=Y,W.__e=!1,m=F.__r,g0=0,j)W.state=W.__s,W.__d=!1,m&&m(Z),q=W.render(W.props,W.state,W.context),l.push.apply(W.__h,W._sb),W._sb=[];else do W.__d=!1,m&&m(Z),q=W.render(W.props,W.state,W.context),W.state=W.__s;while(W.__d&&++g0<25);W.state=W.__s,W.getChildContext!=null&&(O=C(C({},O),W.getChildContext())),j&&!D&&W.getSnapshotBeforeUpdate!=null&&(I=W.getSnapshotBeforeUpdate(N,A)),o=q!=null&&q.type===U&&q.key==null?c0(q.props.children):q,V=f0(Y,f(o)?o:[o],Z,G,O,X,Q,K,V,E,J),W.base=Z.__e,Z.__u&=-161,W.__h.length&&K.push(W),L&&(W.__E=W.__=null)}catch(T){if(Z.__v=null,E||Q!=null)if(T.then){for(Z.__u|=E?160:128;V&&V.nodeType==8&&V.nextSibling;)V=V.nextSibling;Q[Q.indexOf(V)]=null,Z.__e=V}else{for(O0=Q.length;O0--;)E0(Q[O0]);J0(Z)}else Z.__e=G.__e,Z.__k=G.__k,T.then||J0(Z);F.__e(T,Z,G)}else Q==null&&Z.__v==G.__v?(Z.__k=G.__k,Z.__e=G.__e):V=Z.__e=M1(G.__e,Z,G,O,X,Q,K,E,J);return(q=F.diffed)&&q(Z),128&Z.__u?void 0:V}function J0(Y){Y&&(Y.__c&&(Y.__c.__e=!0),Y.__k&&Y.__k.some(J0))}function h0(Y,Z,G){for(var O=0;O<G.length;O++)q0(G[O],G[++O],G[++O]);F.__c&&F.__c(Z,Y),Y.some(function(X){try{Y=X.__h,X.__h=[],Y.some(function(Q){Q.call(X)})}catch(Q){F.__e(Q,X.__v)}})}function c0(Y){return typeof Y!="object"||Y==null||Y.__b>0?Y:f(Y)?Y.map(c0):C({},Y)}function M1(Y,Z,G,O,X,Q,K,V,E){var J,q,W,D,N,A,I,L=G.props||e,d=Z.props,j=Z.type;if(j=="svg"?X="http://www.w3.org/2000/svg":j=="math"?X="http://www.w3.org/1998/Math/MathML":X||(X="http://www.w3.org/1999/xhtml"),Q!=null){for(J=0;J<Q.length;J++)if((N=Q[J])&&"setAttribute"in N==!!j&&(j?N.localName==j:N.nodeType==3)){Y=N,Q[J]=null;break}}if(Y==null){if(j==null)return document.createTextNode(d);Y=document.createElementNS(X,j,d.is&&d),V&&(F.__m&&F.__m(Z,Q),V=!1),Q=null}if(j==null)L===d||V&&Y.data==d||(Y.data=d);else{if(Q=Q&&p.call(Y.childNodes),!V&&Q!=null)for(L={},J=0;J<Y.attributes.length;J++)L[(N=Y.attributes[J]).name]=N.value;for(J in L)N=L[J],J=="dangerouslySetInnerHTML"?W=N:J=="children"||(J in d)||J=="value"&&("defaultValue"in d)||J=="checked"&&("defaultChecked"in d)||i(Y,J,null,N,X);for(J in d)N=d[J],J=="children"?D=N:J=="dangerouslySetInnerHTML"?q=N:J=="value"?A=N:J=="checked"?I=N:V&&typeof N!="function"||L[J]===N||i(Y,J,N,L[J],X);if(q)V||W&&(q.__html==W.__html||q.__html==Y.innerHTML)||(Y.innerHTML=q.__html),Z.__k=[];else if(W&&(Y.innerHTML=""),f0(Z.type=="template"?Y.content:Y,f(D)?D:[D],Z,G,O,j=="foreignObject"?"http://www.w3.org/1999/xhtml":X,Q,K,Q?Q[0]:G.__k&&_(G,0),V,E),Q!=null)for(J=Q.length;J--;)E0(Q[J]);V||(J="value",j=="progress"&&A==null?Y.removeAttribute("value"):A!=null&&(A!==Y[J]||j=="progress"&&!A||j=="option"&&A!=L[J])&&i(Y,J,A,L[J],X),J="checked",I!=null&&I!=Y[J]&&i(Y,J,I,L[J],X))}return Y}function q0(Y,Z,G){try{if(typeof Y=="function"){var O=typeof Y.__u=="function";O&&Y.__u(),O&&Z==null||(Y.__u=Y(Z))}else Y.current=Z}catch(X){F.__e(X,G)}}function o0(Y,Z,G){var O,X;if(F.unmount&&F.unmount(Y),(O=Y.ref)&&(O.current&&O.current!=Y.__e||q0(O,null,Z)),(O=Y.__c)!=null){if(O.componentWillUnmount)try{O.componentWillUnmount()}catch(Q){F.__e(Q,Z)}O.base=O.__P=null}if(O=Y.__k)for(X=0;X<O.length;X++)O[X]&&o0(O[X],Z,G||typeof Y.type!="function");G||E0(Y.__e),Y.__c=Y.__=Y.__e=void 0}function w1(Y,Z,G){return this.constructor(Y,G)}function v(Y,Z,G){var O,X,Q,K;Z==document&&(Z=document.documentElement),F.__&&F.__(Y,Z),X=(O=typeof G=="function")?null:G&&G.__k||Z.__k,Q=[],K=[],N0(Z,Y=(!O&&G||Z).__k=S(U,null,[Y]),X||e,e,Z.namespaceURI,!O&&G?[G]:X?null:Z.firstChild?p.call(Z.childNodes):null,Q,!O&&G?G:X?X.__e:Z.firstChild,O,K),h0(Q,Y,K)}function D0(Y,Z){v(Y,Z,D0)}function i0(Y,Z,G){var O,X,Q,K,V=C({},Y.props);for(Q in Y.type&&Y.type.defaultProps&&(K=Y.type.defaultProps),Z)Q=="key"?O=Z[Q]:Q=="ref"?X=Z[Q]:V[Q]=Z[Q]===void 0&&K!=null?K[Q]:Z[Q];return arguments.length>2&&(V.children=arguments.length>3?p.call(arguments,2):G),s(Y.type,V,O||Y.key,X||Y.ref,null)}function R0(Y){function Z(G){var O,X;return this.getChildContext||(O=new Set,(X={})[Z.__c]=this,this.getChildContext=function(){return X},this.componentWillUnmount=function(){O=null},this.shouldComponentUpdate=function(Q){this.props.value!=Q.value&&O.forEach(function(K){K.__e=!0,W0(K)})},this.sub=function(Q){O.add(Q);var K=Q.componentWillUnmount;Q.componentWillUnmount=function(){O&&O.delete(Q),K&&K.call(Q)}}),G.children}return Z.__c="__cC"+s0++,Z.__=Y,Z.Provider=Z.__l=(Z.Consumer=function(G,O){return G.children(O)}).contextType=Z,Z}p=l.slice,F={__e:function(Y,Z,G,O){for(var X,Q,K;Z=Z.__;)if((X=Z.__c)&&!X.__)try{if((Q=X.constructor)&&Q.getDerivedStateFromError!=null&&(X.setState(Q.getDerivedStateFromError(Y)),K=X.__d),X.componentDidCatch!=null&&(X.componentDidCatch(Y,O||{}),K=X.__d),K)return X.__E=X}catch(V){Y=V}throw Y}},x0=0,S1=function(Y){return Y!=null&&Y.constructor===void 0},H.prototype.setState=function(Y,Z){var G;G=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=C({},this.state),typeof Y=="function"&&(Y=Y(C({},G),this.props)),Y&&C(G,Y),Y!=null&&this.__v&&(Z&&this._sb.push(Z),W0(this))},H.prototype.forceUpdate=function(Y){this.__v&&(this.__e=!0,Y&&this.__h.push(Y),W0(this))},H.prototype.render=U,w=[],y0=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,m0=function(Y,Z){return Y.__v.__b-Z.__v.__b},t.__r=0,Q0=Math.random().toString(8),r="__d"+Q0,k="__a"+Q0,k0=/(PointerCapture)$|Capture$/i,V0=0,X0=v0(!1),K0=v0(!0),s0=0;var B,R,d0,r0,x=0,G1=[],z=F,e0=z.__b,l0=z.__r,t0=z.diffed,u0=z.__c,n0=z.unmount,Y1=z.__;function g(Y,Z){z.__h&&z.__h(R,Y,x||Z),x=0;var G=R.__H||(R.__H={__:[],__h:[]});return Y>=G.__.length&&G.__.push({}),G.__[Y]}function a(Y){return x=1,n(O1,Y)}function n(Y,Z,G){var O=g(B++,2);if(O.t=Y,!O.__c&&(O.__=[G?G(Z):O1(void 0,Z),function(V){var E=O.__N?O.__N[0]:O.__[0],J=O.t(E,V);E!==J&&(O.__N=[J,O.__[1]],O.__c.setState({}))}],O.__c=R,!R.__f)){var X=function(V,E,J){if(!O.__c.__H)return!0;var q=O.__c.__H.__.filter(function(D){return D.__c});if(q.every(function(D){return!D.__N}))return!Q||Q.call(this,V,E,J);var W=O.__c.props!==V;return q.some(function(D){if(D.__N){var N=D.__[0];D.__=D.__N,D.__N=void 0,N!==D.__[0]&&(W=!0)}}),Q&&Q.call(this,V,E,J)||W};R.__f=!0;var{shouldComponentUpdate:Q,componentWillUpdate:K}=R;R.componentWillUpdate=function(V,E,J){if(this.__e){var q=Q;Q=void 0,X(V,E,J),Q=q}K&&K.call(this,V,E,J)},R.shouldComponentUpdate=X}return O.__N||O.__}function Y0(Y,Z){var G=g(B++,3);!z.__s&&S0(G.__H,Z)&&(G.__=Y,G.u=Z,R.__H.__h.push(G))}function y(Y,Z){var G=g(B++,4);!z.__s&&S0(G.__H,Z)&&(G.__=Y,G.u=Z,R.__h.push(G))}function z0(Y){return x=5,h(function(){return{current:Y}},[])}function A0(Y,Z,G){x=6,y(function(){if(typeof Y=="function"){var O=Y(Z());return function(){Y(null),O&&typeof O=="function"&&O()}}if(Y)return Y.current=Z(),function(){return Y.current=null}},G==null?G:G.concat(Y))}function h(Y,Z){var G=g(B++,7);return S0(G.__H,Z)&&(G.__=Y(),G.__H=Z,G.__h=Y),G.__}function L0(Y,Z){return x=8,h(function(){return Y},Z)}function U0(Y){var Z=R.context[Y.__c],G=g(B++,9);return G.c=Y,Z?(G.__==null&&(G.__=!0,Z.sub(R)),Z.props.value):Y.__}function H0(Y,Z){z.useDebugValue&&z.useDebugValue(Z?Z(Y):Y)}function J2(Y){var Z=g(B++,10),G=a();return Z.__=Y,R.componentDidCatch||(R.componentDidCatch=function(O,X){Z.__&&Z.__(O,X),G[1](O)}),[G[0],function(){G[1](void 0)}]}function I0(){var Y=g(B++,11);if(!Y.__){for(var Z=R.__v;Z!==null&&!Z.__m&&Z.__!==null;)Z=Z.__;var G=Z.__m||(Z.__m=[0,0]);Y.__="P"+G[0]+"-"+G[1]++}return Y.__}function $1(){for(var Y;Y=G1.shift();){var Z=Y.__H;if(Y.__P&&Z)try{Z.__h.some(u),Z.__h.some(j0),Z.__h=[]}catch(G){Z.__h=[],z.__e(G,Y.__v)}}}z.__b=function(Y){R=null,e0&&e0(Y)},z.__=function(Y,Z){Y&&Z.__k&&Z.__k.__m&&(Y.__m=Z.__k.__m),Y1&&Y1(Y,Z)},z.__r=function(Y){l0&&l0(Y),B=0;var Z=(R=Y.__c).__H;Z&&(d0===R?(Z.__h=[],R.__h=[],Z.__.some(function(G){G.__N&&(G.__=G.__N),G.u=G.__N=void 0})):(Z.__h.some(u),Z.__h.some(j0),Z.__h=[],B=0)),d0=R},z.diffed=function(Y){t0&&t0(Y);var Z=Y.__c;Z&&Z.__H&&(Z.__H.__h.length&&(G1.push(Z)!==1&&r0===z.requestAnimationFrame||((r0=z.requestAnimationFrame)||g1)($1)),Z.__H.__.some(function(G){G.u&&(G.__H=G.u),G.u=void 0})),d0=R=null},z.__c=function(Y,Z){Z.some(function(G){try{G.__h.some(u),G.__h=G.__h.filter(function(O){return!O.__||j0(O)})}catch(O){Z.some(function(X){X.__h&&(X.__h=[])}),Z=[],z.__e(O,G.__v)}}),u0&&u0(Y,Z)},z.unmount=function(Y){n0&&n0(Y);var Z,G=Y.__c;G&&G.__H&&(G.__H.__.some(function(O){try{u(O)}catch(X){Z=X}}),G.__H=void 0,Z&&z.__e(Z,G.__v))};var Z1=typeof requestAnimationFrame=="function";function g1(Y){var Z,G=function(){clearTimeout(O),Z1&&cancelAnimationFrame(Z),setTimeout(Y)},O=setTimeout(G,35);Z1&&(Z=requestAnimationFrame(G))}function u(Y){var Z=R,G=Y.__c;typeof G=="function"&&(Y.__c=void 0,G()),R=Z}function j0(Y){var Z=R;Y.__c=Y.__(),R=Z}function S0(Y,Z){return!Y||Y.length!==Z.length||Z.some(function(G,O){return G!==Y[O]})}function O1(Y,Z){return typeof Z=="function"?Z(Y):Z}function N1(Y,Z){for(var G in Z)Y[G]=Z[G];return Y}function C0(Y,Z){for(var G in Y)if(G!=="__source"&&!(G in Z))return!0;for(var O in Z)if(O!=="__source"&&Y[O]!==Z[O])return!0;return!1}function q1(Y,Z){var G=Z(),O=a({t:{__:G,u:Z}}),X=O[0].t,Q=O[1];return y(function(){X.__=G,X.u=Z,b0(X)&&Q({t:X})},[Y,G,Z]),Y0(function(){return b0(X)&&Q({t:X}),Y(function(){b0(X)&&Q({t:X})})},[Y]),G}function b0(Y){try{return!((Z=Y.__)===(G=Y.u())&&(Z!==0||1/Z==1/G)||Z!=Z&&G!=G)}catch(O){return!0}var Z,G}function D1(Y){Y()}function R1(Y){return Y}function d1(){return[!1,D1]}var j1=y;function P0(Y,Z){this.props=Y,this.context=Z}function T1(Y,Z){function G(X){var Q=this.props.ref;return Q!=X.ref&&Q&&(typeof Q=="function"?Q(null):Q.current=null),Z?!Z(this.props,X)||Q!=X.ref:C0(this.props,X)}function O(X){return this.shouldComponentUpdate=G,S(Y,X)}return O.displayName="Memo("+(Y.displayName||Y.name)+")",O.__f=O.prototype.isReactComponent=!0,O.type=Y,O}(P0.prototype=new H).isPureReactComponent=!0,P0.prototype.shouldComponentUpdate=function(Y,Z){return C0(this.props,Y)||C0(this.state,Z)};var Q1=F.__b;F.__b=function(Y){Y.type&&Y.type.__f&&Y.ref&&(Y.props.ref=Y.ref,Y.ref=null),Q1&&Q1(Y)};var _1=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function v1(Y){function Z(G){var O=N1({},G);return delete O.ref,Y(O,G.ref||null)}return Z.$$typeof=_1,Z.render=Y,Z.prototype.isReactComponent=Z.__f=!0,Z.displayName="ForwardRef("+(Y.displayName||Y.name)+")",Z}var X1=function(Y,Z){return Y==null?null:P(P(Y).map(Z))},x1={map:X1,forEach:X1,count:function(Y){return Y?P(Y).length:0},only:function(Y){var Z=P(Y);if(Z.length!==1)throw"Children.only";return Z[0]},toArray:P},y1=F.__e;F.__e=function(Y,Z,G,O){if(Y.then){for(var X,Q=Z;Q=Q.__;)if((X=Q.__c)&&X.__c)return Z.__e==null&&(Z.__e=G.__e,Z.__k=G.__k),X.__c(Y,Z)}y1(Y,Z,G,O)};var K1=F.unmount;function z1(Y,Z,G){return Y&&(Y.__c&&Y.__c.__H&&(Y.__c.__H.__.forEach(function(O){typeof O.__c=="function"&&O.__c()}),Y.__c.__H=null),(Y=N1({},Y)).__c!=null&&(Y.__c.__P===G&&(Y.__c.__P=Z),Y.__c.__e=!0,Y.__c=null),Y.__k=Y.__k&&Y.__k.map(function(O){return z1(O,Z,G)})),Y}function A1(Y,Z,G){return Y&&G&&(Y.__v=null,Y.__k=Y.__k&&Y.__k.map(function(O){return A1(O,Z,G)}),Y.__c&&Y.__c.__P===Z&&(Y.__e&&G.appendChild(Y.__e),Y.__c.__e=!0,Y.__c.__P=G)),Y}function Z0(){this.__u=0,this.o=null,this.__b=null}function L1(Y){var Z=Y.__&&Y.__.__c;return Z&&Z.__a&&Z.__a(Y)}function m1(Y){var Z,G,O,X=null;function Q(K){if(Z||(Z=Y()).then(function(V){V&&(X=V.default||V),O=!0},function(V){G=V,O=!0}),G)throw G;if(!O)throw Z;return X?S(X,K):null}return Q.displayName="Lazy",Q.__f=!0,Q}function c(){this.i=null,this.l=null}F.unmount=function(Y){var Z=Y.__c;Z&&(Z.__z=!0),Z&&Z.__R&&Z.__R(),Z&&32&Y.__u&&(Y.type=null),K1&&K1(Y)},(Z0.prototype=new H).__c=function(Y,Z){var G=Z.__c,O=this;O.o==null&&(O.o=[]),O.o.push(G);var X=L1(O.__v),Q=!1,K=function(){Q||O.__z||(Q=!0,G.__R=null,X?X(E):E())};G.__R=K;var V=G.__P;G.__P=null;var E=function(){if(!--O.__u){if(O.state.__a){var J=O.state.__a;O.__v.__k[0]=A1(J,J.__c.__P,J.__c.__O)}var q;for(O.setState({__a:O.__b=null});q=O.o.pop();)q.__P=V,q.forceUpdate()}};O.__u++||32&Z.__u||O.setState({__a:O.__b=O.__v.__k[0]}),Y.then(K,K)},Z0.prototype.componentWillUnmount=function(){this.o=[]},Z0.prototype.render=function(Y,Z){if(this.__b){if(this.__v.__k){var G=document.createElement("div"),O=this.__v.__k[0].__c;this.__v.__k[0]=z1(this.__b,G,O.__O=O.__P)}this.__b=null}var X=Z.__a&&S(U,null,Y.fallback);return X&&(X.__u&=-33),[S(U,null,Z.__a?null:Y.children),X]};var W1=function(Y,Z,G){if(++G[1]===G[0]&&Y.l.delete(Z),Y.props.revealOrder&&(Y.props.revealOrder[0]!=="t"||!Y.l.size))for(G=Y.i;G;){for(;G.length>3;)G.pop()();if(G[1]<G[0])break;Y.i=G=G[2]}};function k1(Y){return this.getChildContext=function(){return Y.context},Y.children}function s1(Y){var Z=this,G=Y.h;if(Z.componentWillUnmount=function(){v(null,Z.v),Z.v=null,Z.h=null},Z.h&&Z.h!==G&&Z.componentWillUnmount(),!Z.v){for(var O=Z.__v;O!==null&&!O.__m&&O.__!==null;)O=O.__;Z.h=G,Z.v={nodeType:1,parentNode:G,childNodes:[],__k:{__m:O.__m},contains:function(){return!0},namespaceURI:G.namespaceURI,insertBefore:function(X,Q){this.childNodes.push(X),Z.h.insertBefore(X,Q)},removeChild:function(X){this.childNodes.splice(this.childNodes.indexOf(X)>>>1,1),Z.h.removeChild(X)}}}v(S(k1,{context:Z.context},Y.__v),Z.v)}function p1(Y,Z){var G=S(s1,{__v:Y,h:Z});return G.containerInfo=Z,G}(c.prototype=new H).__a=function(Y){var Z=this,G=L1(Z.__v),O=Z.l.get(Y);return O[0]++,function(X){var Q=function(){Z.props.revealOrder?(O.push(X),W1(Z,Y,O)):X()};G?G(Q):Q()}},c.prototype.render=function(Y){this.i=null,this.l=new Map;var Z=P(Y.children);Y.revealOrder&&Y.revealOrder[0]==="b"&&Z.reverse();for(var G=Z.length;G--;)this.l.set(Z[G],this.i=[1,0,this.i]);return Y.children},c.prototype.componentDidUpdate=c.prototype.componentDidMount=function(){var Y=this;this.l.forEach(function(Z,G){W1(Y,G,Z)})};var U1=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,f1=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,a1=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,h1=/[A-Z0-9]/g,c1=typeof document<"u",o1=function(Y){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(Y)};function B0(Y,Z,G){return Z.__k==null&&(Z.textContent=""),v(Y,Z),typeof G=="function"&&G(),Y?Y.__c:null}function M0(Y,Z,G){return D0(Y,Z),typeof G=="function"&&G(),Y?Y.__c:null}H.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(Y){Object.defineProperty(H.prototype,Y,{configurable:!0,get:function(){return this["UNSAFE_"+Y]},set:function(Z){Object.defineProperty(this,Y,{configurable:!0,writable:!0,value:Z})}})});var J1=F.event;F.event=function(Y){return J1&&(Y=J1(Y)),Y.persist=function(){},Y.isPropagationStopped=function(){return this.cancelBubble},Y.isDefaultPrevented=function(){return this.defaultPrevented},Y.nativeEvent=Y};var w0,i1={configurable:!0,get:function(){return this.class}},V1=F.vnode;F.vnode=function(Y){typeof Y.type=="string"&&function(Z){var{props:G,type:O}=Z,X={},Q=O.indexOf("-")==-1;for(var K in G){var V=G[K];if(!(K==="value"&&("defaultValue"in G)&&V==null||c1&&K==="children"&&O==="noscript"||K==="class"||K==="className")){var E=K.toLowerCase();K==="defaultValue"&&"value"in G&&G.value==null?K="value":K==="download"&&V===!0?V="":E==="translate"&&V==="no"?V=!1:E[0]==="o"&&E[1]==="n"?E==="ondoubleclick"?K="ondblclick":E!=="onchange"||O!=="input"&&O!=="textarea"||o1(G.type)?E==="onfocus"?K="onfocusin":E==="onblur"?K="onfocusout":a1.test(K)&&(K=E):E=K="oninput":Q&&f1.test(K)?K=K.replace(h1,"-$&").toLowerCase():V===null&&(V=void 0),E==="oninput"&&X[K=E]&&(K="oninputCapture"),X[K]=V}}O=="select"&&(X.multiple&&Array.isArray(X.value)&&(X.value=P(G.children).forEach(function(J){J.props.selected=X.value.indexOf(J.props.value)!=-1})),X.defaultValue!=null&&(X.value=P(G.children).forEach(function(J){J.props.selected=X.multiple?X.defaultValue.indexOf(J.props.value)!=-1:X.defaultValue==J.props.value}))),G.class&&!G.className?(X.class=G.class,Object.defineProperty(X,"className",i1)):G.className&&(X.class=X.className=G.className),Z.props=X}(Y),Y.$$typeof=U1,V1&&V1(Y)};var E1=F.__r;F.__r=function(Y){E1&&E1(Y),w0=Y.__c};var F1=F.diffed;F.diffed=function(Y){F1&&F1(Y);var{props:Z,__e:G}=Y;G!=null&&Y.type==="textarea"&&"value"in Z&&Z.value!==G.value&&(G.value=Z.value==null?"":Z.value),w0=null};var r1={ReactCurrentDispatcher:{current:{readContext:function(Y){return w0.__n[Y.__c].props.value},useCallback:L0,useContext:U0,useDebugValue:H0,useDeferredValue:R1,useEffect:Y0,useId:I0,useImperativeHandle:A0,useInsertionEffect:j1,useLayoutEffect:y,useMemo:h,useReducer:n,useRef:z0,useState:a,useSyncExternalStore:q1,useTransition:d1}}},N2="18.3.1";function e1(Y){return S.bind(null,Y)}function G0(Y){return!!Y&&Y.$$typeof===U1}function l1(Y){return G0(Y)&&Y.type===U}function t1(Y){return!!Y&&typeof Y.displayName=="string"&&Y.displayName.indexOf("Memo(")==0}function u1(Y){return G0(Y)?i0.apply(null,arguments):Y}function $0(Y){return!!Y.__k&&(v(null,Y),!0)}function n1(Y){return Y&&(Y.base||Y.nodeType===1&&Y)||null}var Y2=function(Y,Z){return Y(Z)},Z2=function(Y,Z){var G=F.debounceRendering;F.debounceRendering=function(X){return X()};var O=Y(Z);return F.debounceRendering=G,O},G2=G0,O2={useState:a,useId:I0,useReducer:n,useEffect:Y0,useLayoutEffect:y,useInsertionEffect:j1,useTransition:d1,useDeferredValue:R1,useSyncExternalStore:q1,startTransition:D1,useRef:z0,useImperativeHandle:A0,useMemo:h,useCallback:L0,useContext:U0,useDebugValue:H0,version:"18.3.1",Children:x1,render:B0,hydrate:M0,unmountComponentAtNode:$0,createPortal:p1,createElement:S,createContext:R0,createFactory:e1,cloneElement:u1,createRef:F0,Fragment:U,isValidElement:G0,isElement:G2,isFragment:l1,isMemo:t1,findDOMNode:n1,Component:H,PureComponent:P0,memo:T1,forwardRef:v1,flushSync:Z2,unstable_batchedUpdates:Y2,StrictMode:U,Suspense:Z0,SuspenseList:c,lazy:m1,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:r1};var Q2=0;function H1(Y,Z,G,O,X,Q){Z||(Z={});var K,V,E=Z;if("ref"in E)for(V in E={},Z)V=="ref"?K=Z[V]:E[V]=Z[V];var J={type:Y,props:E,key:G,ref:K,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Q2,__i:-1,__u:0,__source:X,__self:Q};if(typeof Y=="function"&&(K=Y.defaultProps))for(V in K)E[V]===void 0&&(E[V]=K[V]);return F.vnode&&F.vnode(J),J}function I1(Y){return{render:function(Z){B0(Z,Y)},unmount:function(){$0(Y)}}}function X2(Y,Z){return M0(Z,Y),I1(Y)}export{N2 as version,d1 as useTransition,q1 as useSyncExternalStore,a as useState,z0 as useRef,n as useReducer,h as useMemo,y as useLayoutEffect,j1 as useInsertionEffect,A0 as useImperativeHandle,I0 as useId,J2 as useErrorBoundary,Y0 as useEffect,R1 as useDeferredValue,H0 as useDebugValue,U0 as useContext,L0 as useCallback,Y2 as unstable_batchedUpdates,$0 as unmountComponentAtNode,D1 as startTransition,B0 as render,T1 as memo,m1 as lazy,H1 as jsxs,H1 as jsx,G0 as isValidElement,t1 as isMemo,l1 as isFragment,G2 as isElement,X2 as hydrateRoot,M0 as hydrate,v1 as forwardRef,Z2 as flushSync,n1 as findDOMNode,O2 as default,I1 as createRoot,F0 as createRef,p1 as createPortal,e1 as createFactory,S as createElement,R0 as createContext,u1 as cloneElement,r1 as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,c as SuspenseList,Z0 as Suspense,U as StrictMode,P0 as PureComponent,U as Fragment,H as Component,x1 as Children};
1
+ var V,c,Me,St,U,He,Ie,Le,oe,G,L,We,se,ue,ie,Ve,J={},K=[],wt=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,j=Array.isArray;function w(e,t){for(var n in t)e[n]=t[n];return e}function ce(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function E(e,t,n){var _,o,r,u={};for(r in t)r=="key"?_=t[r]:r=="ref"?o=t[r]:u[r]=t[r];if(arguments.length>2&&(u.children=arguments.length>3?V.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(r in e.defaultProps)u[r]===void 0&&(u[r]=e.defaultProps[r]);return W(e,u,_,o,null)}function W(e,t,n,_,o){var r={type:e,props:t,key:n,ref:_,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o==null?++Me:o,__i:-1,__u:0};return o==null&&c.vnode!=null&&c.vnode(r),r}function fe(){return{current:null}}function k(e){return e.children}function x(e,t){this.props=e,this.context=t}function H(e,t){if(t==null)return e.__?H(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?H(e):null}function Nt(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,_=[],o=[],r=w({},t);r.__v=t.__v+1,c.vnode&&c.vnode(r),pe(e.__P,r,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,_,n==null?H(t):n,!!(32&t.__u),o),r.__v=t.__v,r.__.__k[r.__i]=r,ze(_,r,o),t.__e=t.__=null,r.__e!=n&&je(r)}}function je(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),je(e)}function le(e){(!e.__d&&(e.__d=!0)&&U.push(e)&&!Q.__r++||He!=c.debounceRendering)&&((He=c.debounceRendering)||Ie)(Q)}function Q(){try{for(var e,t=1;U.length;)U.length>t&&U.sort(Le),e=U.shift(),t=U.length,Nt(e)}finally{U.length=Q.__r=0}}function $e(e,t,n,_,o,r,u,a,s,l,p){var i,d,f,g,C,b,v,m=_&&_.__k||K,R=t.length;for(s=Pt(n,t,m,s,R),i=0;i<R;i++)(f=n.__k[i])!=null&&(d=f.__i!=-1&&m[f.__i]||J,f.__i=i,b=pe(e,f,d,o,r,u,a,s,l,p),g=f.__e,f.ref&&d.ref!=f.ref&&(d.ref&&de(d.ref,null,f),p.push(f.ref,f.__c||g,f)),C==null&&g!=null&&(C=g),(v=!!(4&f.__u))||d.__k===f.__k?(s=Be(f,s,e,v),v&&d.__e&&(d.__e=null)):typeof f.type=="function"&&b!==void 0?s=b:g&&(s=g.nextSibling),f.__u&=-7);return n.__e=C,s}function Pt(e,t,n,_,o){var r,u,a,s,l,p=n.length,i=p,d=0;for(e.__k=Array(o),r=0;r<o;r++)(u=t[r])!=null&&typeof u!="boolean"&&typeof u!="function"?(typeof u=="string"||typeof u=="number"||typeof u=="bigint"||u.constructor==String?u=e.__k[r]=W(null,u,null,null,null):j(u)?u=e.__k[r]=W(k,{children:u},null,null,null):u.constructor===void 0&&u.__b>0?u=e.__k[r]=W(u.type,u.props,u.key,u.ref?u.ref:null,u.__v):e.__k[r]=u,s=r+d,u.__=e,u.__b=e.__b+1,a=null,(l=u.__i=Rt(u,n,s,i))!=-1&&(i--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(o>p?d--:o<p&&d++),typeof u.type!="function"&&(u.__u|=4)):l!=s&&(l==s-1?d--:l==s+1?d++:(l>s?d--:d++,u.__u|=4))):e.__k[r]=null;if(i)for(r=0;r<p;r++)(a=n[r])!=null&&(2&a.__u)==0&&(a.__e==_&&(_=H(a)),Ze(a,a));return _}function Be(e,t,n,_){var o,r;if(typeof e.type=="function"){for(o=e.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=e,t=Be(o[r],t,n,_));return t}e.__e!=t&&(_&&(t&&e.type&&!t.parentNode&&(t=H(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function N(e,t){return t=t||[],e==null||typeof e=="boolean"||(j(e)?e.some(function(n){N(n,t)}):t.push(e)),t}function Rt(e,t,n,_){var o,r,u,{key:a,type:s}=e,l=t[n],p=l!=null&&(2&l.__u)==0;if(l===null&&a==null||p&&a==l.key&&s==l.type)return n;if(_>(p?1:0)){for(o=n-1,r=n+1;o>=0||r<t.length;)if((l=t[u=o>=0?o--:r++])!=null&&(2&l.__u)==0&&a==l.key&&s==l.type)return u}return-1}function Oe(e,t,n){t[0]=="-"?e.setProperty(t,n==null?"":n):e[t]=n==null?"":typeof n!="number"||wt.test(t)?n:n+"px"}function Y(e,t,n,_,o){var r,u;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof _=="string"&&(e.style.cssText=_=""),_)for(t in _)n&&t in n||Oe(e.style,t,"");if(n)for(t in n)_&&n[t]==_[t]||Oe(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")r=t!=(t=t.replace(We,"$1")),u=t.toLowerCase(),t=u in e||t=="onFocusOut"||t=="onFocusIn"?u.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+r]=n,n?_?n[L]=_[L]:(n[L]=se,e.addEventListener(t,r?ie:ue,r)):e.removeEventListener(t,r?ie:ue,r);else{if(o=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n==null?"":n;break e}catch(a){}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Fe(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[G]==null)t[G]=se++;else if(t[G]<n[L])return;return n(c.event?c.event(t):t)}}}function pe(e,t,n,_,o,r,u,a,s,l){var p,i,d,f,g,C,b,v,m,R,D,I,Ae,Z,re,S=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(s=!!(32&n.__u),r=[a=t.__e=n.__e]),(p=c.__b)&&p(t);e:if(typeof S=="function")try{if(v=t.props,m=S.prototype&&S.prototype.render,R=(p=S.contextType)&&_[p.__c],D=p?R?R.props.value:p.__:_,n.__c?b=(i=t.__c=n.__c).__=i.__E:(m?t.__c=i=new S(v,D):(t.__c=i=new x(v,D),i.constructor=S,i.render=Dt),R&&R.sub(i),i.state||(i.state={}),i.__n=_,d=i.__d=!0,i.__h=[],i._sb=[]),m&&i.__s==null&&(i.__s=i.state),m&&S.getDerivedStateFromProps!=null&&(i.__s==i.state&&(i.__s=w({},i.__s)),w(i.__s,S.getDerivedStateFromProps(v,i.__s))),f=i.props,g=i.state,i.__v=t,d)m&&S.getDerivedStateFromProps==null&&i.componentWillMount!=null&&i.componentWillMount(),m&&i.componentDidMount!=null&&i.__h.push(i.componentDidMount);else{if(m&&S.getDerivedStateFromProps==null&&v!==f&&i.componentWillReceiveProps!=null&&i.componentWillReceiveProps(v,D),t.__v==n.__v||!i.__e&&i.shouldComponentUpdate!=null&&i.shouldComponentUpdate(v,i.__s,D)===!1){t.__v!=n.__v&&(i.props=v,i.state=i.__s,i.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(A){A&&(A.__=t)}),K.push.apply(i.__h,i._sb),i._sb=[],i.__h.length&&u.push(i);break e}i.componentWillUpdate!=null&&i.componentWillUpdate(v,i.__s,D),m&&i.componentDidUpdate!=null&&i.__h.push(function(){i.componentDidUpdate(f,g,C)})}if(i.context=D,i.props=v,i.__P=e,i.__e=!1,I=c.__r,Ae=0,m)i.state=i.__s,i.__d=!1,I&&I(t),p=i.render(i.props,i.state,i.context),K.push.apply(i.__h,i._sb),i._sb=[];else do i.__d=!1,I&&I(t),p=i.render(i.props,i.state,i.context),i.state=i.__s;while(i.__d&&++Ae<25);i.state=i.__s,i.getChildContext!=null&&(_=w(w({},_),i.getChildContext())),m&&!d&&i.getSnapshotBeforeUpdate!=null&&(C=i.getSnapshotBeforeUpdate(f,g)),Z=p!=null&&p.type===k&&p.key==null?qe(p.props.children):p,a=$e(e,j(Z)?Z:[Z],t,n,_,o,r,u,a,s,l),i.base=t.__e,t.__u&=-161,i.__h.length&&u.push(i),b&&(i.__E=i.__=null)}catch(A){if(t.__v=null,s||r!=null)if(A.then){for(t.__u|=s?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;r[r.indexOf(a)]=null,t.__e=a}else{for(re=r.length;re--;)ce(r[re]);ae(t)}else t.__e=n.__e,t.__k=n.__k,A.then||ae(t);c.__e(A,t,n)}else r==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=Ut(n.__e,t,n,_,o,r,u,s,l);return(p=c.diffed)&&p(t),128&t.__u?void 0:a}function ae(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(ae))}function ze(e,t,n){for(var _=0;_<n.length;_++)de(n[_],n[++_],n[++_]);c.__c&&c.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(r){r.call(o)})}catch(r){c.__e(r,o.__v)}})}function qe(e){return typeof e!="object"||e==null||e.__b>0?e:j(e)?e.map(qe):w({},e)}function Ut(e,t,n,_,o,r,u,a,s){var l,p,i,d,f,g,C,b=n.props||J,{props:v,type:m}=t;if(m=="svg"?o="http://www.w3.org/2000/svg":m=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),r!=null){for(l=0;l<r.length;l++)if((f=r[l])&&"setAttribute"in f==!!m&&(m?f.localName==m:f.nodeType==3)){e=f,r[l]=null;break}}if(e==null){if(m==null)return document.createTextNode(v);e=document.createElementNS(o,m,v.is&&v),a&&(c.__m&&c.__m(t,r),a=!1),r=null}if(m==null)b===v||a&&e.data==v||(e.data=v);else{if(r=r&&V.call(e.childNodes),!a&&r!=null)for(b={},l=0;l<e.attributes.length;l++)b[(f=e.attributes[l]).name]=f.value;for(l in b)f=b[l],l=="dangerouslySetInnerHTML"?i=f:l=="children"||(l in v)||l=="value"&&("defaultValue"in v)||l=="checked"&&("defaultChecked"in v)||Y(e,l,null,f,o);for(l in v)f=v[l],l=="children"?d=f:l=="dangerouslySetInnerHTML"?p=f:l=="value"?g=f:l=="checked"?C=f:a&&typeof f!="function"||b[l]===f||Y(e,l,f,b[l],o);if(p)a||i&&(p.__html==i.__html||p.__html==e.innerHTML)||(e.innerHTML=p.__html),t.__k=[];else if(i&&(e.innerHTML=""),$e(t.type=="template"?e.content:e,j(d)?d:[d],t,n,_,m=="foreignObject"?"http://www.w3.org/1999/xhtml":o,r,u,r?r[0]:n.__k&&H(n,0),a,s),r!=null)for(l=r.length;l--;)ce(r[l]);a||(l="value",m=="progress"&&g==null?e.removeAttribute("value"):g!=null&&(g!==e[l]||m=="progress"&&!g||m=="option"&&g!=b[l])&&Y(e,l,g,b[l],o),l="checked",C!=null&&C!=e[l]&&Y(e,l,C,b[l],o))}return e}function de(e,t,n){try{if(typeof e=="function"){var _=typeof e.__u=="function";_&&e.__u(),_&&t==null||(e.__u=e(t))}else e.current=t}catch(o){c.__e(o,n)}}function Ze(e,t,n){var _,o;if(c.unmount&&c.unmount(e),(_=e.ref)&&(_.current&&_.current!=e.__e||de(_,null,t)),(_=e.__c)!=null){if(_.componentWillUnmount)try{_.componentWillUnmount()}catch(r){c.__e(r,t)}_.base=_.__P=null}if(_=e.__k)for(o=0;o<_.length;o++)_[o]&&Ze(_[o],t,n||typeof e.type!="function");n||ce(e.__e),e.__c=e.__=e.__e=void 0}function Dt(e,t,n){return this.constructor(e,n)}function O(e,t,n){var _,o,r,u;t==document&&(t=document.documentElement),c.__&&c.__(e,t),o=(_=typeof n=="function")?null:n&&n.__k||t.__k,r=[],u=[],pe(t,e=(!_&&n||t).__k=E(k,null,[e]),o||J,J,t.namespaceURI,!_&&n?[n]:o?null:t.firstChild?V.call(t.childNodes):null,r,!_&&n?n:o?o.__e:t.firstChild,_,u),ze(r,e,u)}function he(e,t){O(e,t,he)}function Ye(e,t,n){var _,o,r,u,a=w({},e.props);for(r in e.type&&e.type.defaultProps&&(u=e.type.defaultProps),t)r=="key"?_=t[r]:r=="ref"?o=t[r]:a[r]=t[r]===void 0&&u!=null?u[r]:t[r];return arguments.length>2&&(a.children=arguments.length>3?V.call(arguments,2):n),W(e.type,a,_||e.key,o||e.ref,null)}function ve(e){function t(n){var _,o;return this.getChildContext||(_=new Set,(o={})[t.__c]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){_=null},this.shouldComponentUpdate=function(r){this.props.value!=r.value&&_.forEach(function(u){u.__e=!0,le(u)})},this.sub=function(r){_.add(r);var u=r.componentWillUnmount;r.componentWillUnmount=function(){_&&_.delete(r),u&&u.call(r)}}),n.children}return t.__c="__cC"+Ve++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,_){return n.children(_)}).contextType=t,t}V=K.slice,c={__e:function(e,t,n,_){for(var o,r,u;t=t.__;)if((o=t.__c)&&!o.__)try{if((r=o.constructor)&&r.getDerivedStateFromError!=null&&(o.setState(r.getDerivedStateFromError(e)),u=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,_||{}),u=o.__d),u)return o.__E=o}catch(a){e=a}throw e}},Me=0,St=function(e){return e!=null&&e.constructor===void 0},x.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=w({},this.state),typeof e=="function"&&(e=e(w({},n),this.props)),e&&w(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),le(this))},x.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),le(this))},x.prototype.render=k,U=[],Ie=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Le=function(e,t){return e.__v.__b-t.__v.__b},Q.__r=0,oe=Math.random().toString(8),G="__d"+oe,L="__a"+oe,We=/(PointerCapture)$|Capture$/i,se=0,ue=Fe(!1),ie=Fe(!0),Ve=0;var P,h,me,Ge,F=0,_t=[],y=c,{__b:Je,__r:Ke,diffed:Qe,__c:Xe,unmount:et,__:tt}=y;function T(e,t){y.__h&&y.__h(h,e,F||t),F=0;var n=h.__H||(h.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function B(e){return F=1,ee(rt,e)}function ee(e,t,n){var _=T(P++,2);if(_.t=e,!_.__c&&(_.__=[n?n(t):rt(void 0,t),function(a){var s=_.__N?_.__N[0]:_.__[0],l=_.t(s,a);s!==l&&(_.__N=[l,_.__[1]],_.__c.setState({}))}],_.__c=h,!h.__f)){var o=function(a,s,l){if(!_.__c.__H)return!0;var p=_.__c.__H.__.filter(function(d){return d.__c});if(p.every(function(d){return!d.__N}))return!r||r.call(this,a,s,l);var i=_.__c.props!==a;return p.some(function(d){if(d.__N){var f=d.__[0];d.__=d.__N,d.__N=void 0,f!==d.__[0]&&(i=!0)}}),r&&r.call(this,a,s,l)||i};h.__f=!0;var r=h.shouldComponentUpdate,u=h.componentWillUpdate;h.componentWillUpdate=function(a,s,l){if(this.__e){var p=r;r=void 0,o(a,s,l),r=p}u&&u.call(this,a,s,l)},h.shouldComponentUpdate=o}return _.__N||_.__}function te(e,t){var n=T(P++,3);!y.__s&&Se(n.__H,t)&&(n.__=e,n.u=t,h.__H.__h.push(n))}function M(e,t){var n=T(P++,4);!y.__s&&Se(n.__H,t)&&(n.__=e,n.u=t,h.__h.push(n))}function ge(e){return F=5,z(function(){return{current:e}},[])}function be(e,t,n){F=6,M(function(){if(typeof e=="function"){var _=e(t());return function(){e(null),_&&typeof _=="function"&&_()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function z(e,t){var n=T(P++,7);return Se(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function ke(e,t){return F=8,z(function(){return e},t)}function xe(e){var t=h.context[e.__c],n=T(P++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(h)),t.props.value):e.__}function Ce(e,t){y.useDebugValue&&y.useDebugValue(t?t(e):e)}function sn(e){var t=T(P++,10),n=B();return t.__=e,h.componentDidCatch||(h.componentDidCatch=function(_,o){t.__&&t.__(_,o),n[1](_)}),[n[0],function(){n[1](void 0)}]}function Ee(){var e=T(P++,11);if(!e.__){for(var t=h.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Tt(){for(var e;e=_t.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(X),t.__h.some(ye),t.__h=[]}catch(n){t.__h=[],y.__e(n,e.__v)}}}y.__b=function(e){h=null,Je&&Je(e)},y.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),tt&&tt(e,t)},y.__r=function(e){Ke&&Ke(e),P=0;var t=(h=e.__c).__H;t&&(me===h?(t.__h=[],h.__h=[],t.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.some(X),t.__h.some(ye),t.__h=[],P=0)),me=h},y.diffed=function(e){Qe&&Qe(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(_t.push(t)!==1&&Ge===y.requestAnimationFrame||((Ge=y.requestAnimationFrame)||At)(Tt)),t.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),me=h=null},y.__c=function(e,t){t.some(function(n){try{n.__h.some(X),n.__h=n.__h.filter(function(_){return!_.__||ye(_)})}catch(_){t.some(function(o){o.__h&&(o.__h=[])}),t=[],y.__e(_,n.__v)}}),Xe&&Xe(e,t)},y.unmount=function(e){et&&et(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(_){try{X(_)}catch(o){t=o}}),n.__H=void 0,t&&y.__e(t,n.__v))};var nt=typeof requestAnimationFrame=="function";function At(e){var t,n=function(){clearTimeout(_),nt&&cancelAnimationFrame(t),setTimeout(e)},_=setTimeout(n,35);nt&&(t=requestAnimationFrame(n))}function X(e){var t=h,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),h=t}function ye(e){var t=h;e.__c=e.__(),h=t}function Se(e,t){return!e||e.length!==t.length||t.some(function(n,_){return n!==e[_]})}function rt(e,t){return typeof t=="function"?t(e):t}function pt(e,t){for(var n in t)e[n]=t[n];return e}function Ne(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var _ in t)if(_!=="__source"&&e[_]!==t[_])return!0;return!1}function dt(e,t){var n=t(),_=B({t:{__:n,u:t}}),o=_[0].t,r=_[1];return M(function(){o.__=n,o.u=t,we(o)&&r({t:o})},[e,n,t]),te(function(){return we(o)&&r({t:o}),e(function(){we(o)&&r({t:o})})},[e]),n}function we(e){try{return!((t=e.__)===(n=e.u())&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch(_){return!0}var t,n}function ht(e){e()}function vt(e){return e}function mt(){return[!1,ht]}var yt=M;function Pe(e,t){this.props=e,this.context=t}function Ht(e,t){function n(o){var r=this.props.ref;return r!=o.ref&&r&&(typeof r=="function"?r(null):r.current=null),t?!t(this.props,o)||r!=o.ref:Ne(this.props,o)}function _(o){return this.shouldComponentUpdate=n,E(e,o)}return _.displayName="Memo("+(e.displayName||e.name)+")",_.__f=_.prototype.isReactComponent=!0,_.type=e,_}(Pe.prototype=new x).isPureReactComponent=!0,Pe.prototype.shouldComponentUpdate=function(e,t){return Ne(this.props,e)||Ne(this.state,t)};var ot=c.__b;c.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ot&&ot(e)};var Ot=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ft(e){function t(n){var _=pt({},n);return delete _.ref,e(_,n.ref||null)}return t.$$typeof=Ot,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ut=function(e,t){return e==null?null:N(N(e).map(t))},Mt={map:ut,forEach:ut,count:function(e){return e?N(e).length:0},only:function(e){var t=N(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:N},It=c.__e;c.__e=function(e,t,n,_){if(e.then){for(var o,r=t;r=r.__;)if((o=r.__c)&&o.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}It(e,t,n,_)};var it=c.unmount;function gt(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(_){typeof _.__c=="function"&&_.__c()}),e.__c.__H=null),(e=pt({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(_){return gt(_,t,n)})),e}function bt(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(_){return bt(_,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function ne(){this.__u=0,this.o=null,this.__b=null}function kt(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function Lt(e){var t,n,_,o=null;function r(u){if(t||(t=e()).then(function(a){a&&(o=a.default||a),_=!0},function(a){n=a,_=!0}),n)throw n;if(!_)throw t;return o?E(o,u):null}return r.displayName="Lazy",r.__f=!0,r}function q(){this.i=null,this.l=null}c.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),it&&it(e)},(ne.prototype=new x).__c=function(e,t){var n=t.__c,_=this;_.o==null&&(_.o=[]),_.o.push(n);var o=kt(_.__v),r=!1,u=function(){r||_.__z||(r=!0,n.__R=null,o?o(s):s())};n.__R=u;var a=n.__P;n.__P=null;var s=function(){if(!--_.__u){if(_.state.__a){var l=_.state.__a;_.__v.__k[0]=bt(l,l.__c.__P,l.__c.__O)}var p;for(_.setState({__a:_.__b=null});p=_.o.pop();)p.__P=a,p.forceUpdate()}};_.__u++||32&t.__u||_.setState({__a:_.__b=_.__v.__k[0]}),e.then(u,u)},ne.prototype.componentWillUnmount=function(){this.o=[]},ne.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),_=this.__v.__k[0].__c;this.__v.__k[0]=gt(this.__b,n,_.__O=_.__P)}this.__b=null}var o=t.__a&&E(k,null,e.fallback);return o&&(o.__u&=-33),[E(k,null,t.__a?null:e.children),o]};var lt=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function Wt(e){return this.getChildContext=function(){return e.context},e.children}function Vt(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){O(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var _=t.__v;_!==null&&!_.__m&&_.__!==null;)_=_.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:_.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(o,r){this.childNodes.push(o),t.h.insertBefore(o,r)},removeChild:function(o){this.childNodes.splice(this.childNodes.indexOf(o)>>>1,1),t.h.removeChild(o)}}}O(E(Wt,{context:t.context},e.__v),t.v)}function jt(e,t){var n=E(Vt,{__v:e,h:t});return n.containerInfo=t,n}(q.prototype=new x).__a=function(e){var t=this,n=kt(t.__v),_=t.l.get(e);return _[0]++,function(o){var r=function(){t.props.revealOrder?(_.push(o),lt(t,e,_)):o()};n?n(r):r()}},q.prototype.render=function(e){this.i=null,this.l=new Map;var t=N(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},q.prototype.componentDidUpdate=q.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){lt(e,n,t)})};var xt=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,$t=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Bt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,zt=/[A-Z0-9]/g,qt=typeof document<"u",Zt=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Re(e,t,n){return t.__k==null&&(t.textContent=""),O(e,t),typeof n=="function"&&n(),e?e.__c:null}function Ue(e,t,n){return he(e,t),typeof n=="function"&&n(),e?e.__c:null}x.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(x.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var at=c.event;c.event=function(e){return at&&(e=at(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var De,Yt={configurable:!0,get:function(){return this.class}},st=c.vnode;c.vnode=function(e){typeof e.type=="string"&&function(t){var{props:n,type:_}=t,o={},r=_.indexOf("-")==-1;for(var u in n){var a=n[u];if(!(u==="value"&&("defaultValue"in n)&&a==null||qt&&u==="children"&&_==="noscript"||u==="class"||u==="className")){var s=u.toLowerCase();u==="defaultValue"&&"value"in n&&n.value==null?u="value":u==="download"&&a===!0?a="":s==="translate"&&a==="no"?a=!1:s[0]==="o"&&s[1]==="n"?s==="ondoubleclick"?u="ondblclick":s!=="onchange"||_!=="input"&&_!=="textarea"||Zt(n.type)?s==="onfocus"?u="onfocusin":s==="onblur"?u="onfocusout":Bt.test(u)&&(u=s):s=u="oninput":r&&$t.test(u)?u=u.replace(zt,"-$&").toLowerCase():a===null&&(a=void 0),s==="oninput"&&o[u=s]&&(u="oninputCapture"),o[u]=a}}_=="select"&&(o.multiple&&Array.isArray(o.value)&&(o.value=N(n.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),o.defaultValue!=null&&(o.value=N(n.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value}))),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",Yt)):n.className&&(o.class=o.className=n.className),t.props=o}(e),e.$$typeof=xt,st&&st(e)};var ct=c.__r;c.__r=function(e){ct&&ct(e),De=e.__c};var ft=c.diffed;c.diffed=function(e){ft&&ft(e);var{props:t,__e:n}=e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),De=null};var Gt={ReactCurrentDispatcher:{current:{readContext:function(e){return De.__n[e.__c].props.value},useCallback:ke,useContext:xe,useDebugValue:Ce,useDeferredValue:vt,useEffect:te,useId:Ee,useImperativeHandle:be,useInsertionEffect:yt,useLayoutEffect:M,useMemo:z,useReducer:ee,useRef:ge,useState:B,useSyncExternalStore:dt,useTransition:mt}}},dn="18.3.1";function Jt(e){return E.bind(null,e)}function _e(e){return!!e&&e.$$typeof===xt}function Kt(e){return _e(e)&&e.type===k}function Qt(e){return!!e&&typeof e.displayName=="string"&&e.displayName.indexOf("Memo(")==0}function Xt(e){return _e(e)?Ye.apply(null,arguments):e}function Te(e){return!!e.__k&&(O(null,e),!0)}function en(e){return e&&(e.base||e.nodeType===1&&e)||null}var tn=function(e,t){return e(t)},nn=function(e,t){var n=c.debounceRendering;c.debounceRendering=function(o){return o()};var _=e(t);return c.debounceRendering=n,_},_n=_e,rn={useState:B,useId:Ee,useReducer:ee,useEffect:te,useLayoutEffect:M,useInsertionEffect:yt,useTransition:mt,useDeferredValue:vt,useSyncExternalStore:dt,startTransition:ht,useRef:ge,useImperativeHandle:be,useMemo:z,useCallback:ke,useContext:xe,useDebugValue:Ce,version:"18.3.1",Children:Mt,render:Re,hydrate:Ue,unmountComponentAtNode:Te,createPortal:jt,createElement:E,createContext:ve,createFactory:Jt,cloneElement:Xt,createRef:fe,Fragment:k,isValidElement:_e,isElement:_n,isFragment:Kt,isMemo:Qt,findDOMNode:en,Component:x,PureComponent:Pe,memo:Ht,forwardRef:Ft,flushSync:nn,unstable_batchedUpdates:tn,StrictMode:k,Suspense:ne,SuspenseList:q,lazy:Lt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Gt};function Ct(e){return{render:function(t){Re(t,e)},unmount:function(){Te(e)}}}function on(e,t){return Ue(t,e),Ct(e)}var un=0;function Et(e,t,n,_,o,r){t||(t={});var u,a,s=t;if("ref"in s)for(a in s={},t)a=="ref"?u=t[a]:s[a]=t[a];var l={type:e,props:s,key:n,ref:u,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--un,__i:-1,__u:0,__source:o,__self:r};if(typeof e=="function"&&(u=e.defaultProps))for(a in u)s[a]===void 0&&(s[a]=u[a]);return c.vnode&&c.vnode(l),l}export{Mt as Children,x as Component,k as Fragment,Pe as PureComponent,k as StrictMode,ne as Suspense,q as SuspenseList,Gt as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Xt as cloneElement,ve as createContext,E as createElement,Jt as createFactory,jt as createPortal,fe as createRef,Ct as createRoot,rn as default,en as findDOMNode,nn as flushSync,Ft as forwardRef,Ue as hydrate,on as hydrateRoot,_n as isElement,Kt as isFragment,Qt as isMemo,_e as isValidElement,Et as jsx,Et as jsxs,Lt as lazy,Ht as memo,Re as render,ht as startTransition,Te as unmountComponentAtNode,tn as unstable_batchedUpdates,ke as useCallback,xe as useContext,Ce as useDebugValue,vt as useDeferredValue,te as useEffect,sn as useErrorBoundary,Ee as useId,be as useImperativeHandle,yt as useInsertionEffect,M as useLayoutEffect,z as useMemo,ee as useReducer,ge as useRef,B as useState,dt as useSyncExternalStore,mt as useTransition,dn as version};
@@ -1 +1 @@
1
- import{createContext as q,useContext as B,useEffect as J}from"react";import{createContext as H}from"react";var I=H("");var K=q(null);function L(){return B(K)}function R(h,z,j){let{setFeedbackEntry:D,removeFeedbackEntry:G}=L();J(()=>{return D(h,{id:h,markdown:z,label:j?.label,required:j?.required}),()=>G(h)},[h,z,j?.label,j?.required])}var M=q("");function S(){return B(M)}var T=q({setActiveView:()=>{}});export{R as useFeedback,S as useCanvasFile,L as useAnnotations,I as SessionContext,M as CanvasFileCtx,K as AnnotationCtx,T as ActiveViewCtx};
1
+ import{createContext as o,useContext as r,useEffect as i}from"react";import{SessionContext as A}from"@fabrika/annotations/runtime";var p=o(null);function s(){return r(p)}function d(e){let{registerResponse:t}=s();i(()=>{t(e)},[e,t])}function x(e,t,n){let{setFeedbackEntry:a,removeFeedbackEntry:l}=s();i(()=>(a(e,{id:e,markdown:t,label:n?.label,required:n?.required}),()=>l(e)),[e,t,n?.label,n?.required])}var c=o("");function g(){return r(c)}var b=o({setActiveView:()=>{}});export{b as ActiveViewCtx,p as AnnotationCtx,c as CanvasFileCtx,A as SessionContext,s as useAnnotations,g as useCanvasFile,x as useFeedback,d as useResponseRegistration};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Components agent-canvas adds on top of the kernel's set.
3
+ *
4
+ * Keep in sync with `daemon/client/components/index.ts` — the compiler injects
5
+ * these names into authored JSX, and the browser resolves them from that barrel
6
+ * through `#canvas/components`. A name here with no matching export renders as
7
+ * undefined.
8
+ */
9
+ import type { CanvasComponents } from "@fabrika/canvas-kernel/server";
10
+
11
+ export const HOST_COMPONENTS: CanvasComponents = {
12
+ SecretInput: { requiredProps: { id: "string", label: "string", env: "string" } },
13
+ };
@@ -1,10 +1,13 @@
1
1
  import { readFileSync, readdirSync, existsSync } from "fs";
2
- import type { SessionManager } from "../session";
3
- import { compilePlan } from "../compiler";
4
- import { watchSession } from "../watcher";
5
- import { jsonResponse } from "./utils";
2
+ import {
3
+ compileJsx,
4
+ watchSession,
5
+ type SessionManager,
6
+ } from "@fabrika/canvas-kernel/server";
7
+ import { jsonResponse, type Route } from "@fabrika/daemon-kit";
6
8
  import { loadShareConfig, shareRevision, revokeShare } from "../share";
7
- import type { Route } from "../router";
9
+ import { COMPILE_TEMP_DIR } from "../paths";
10
+ import { HOST_COMPONENTS } from "../components";
8
11
 
9
12
  const SECRET_FIELD_RE = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;
10
13
  const MAX_SECRET_BYTES = 64 * 1024;
@@ -83,7 +86,7 @@ export function createApiHandlers(ctx: ApiContext): Route[] {
83
86
  const errors: Record<string, string> = {};
84
87
  await Promise.all(
85
88
  [...canvasFiles.entries()].map(async ([filename, jsx]) => {
86
- const result = await compilePlan(jsx, projectRoot);
89
+ const result = await compileJsx(jsx, { projectRoot, tempDir: COMPILE_TEMP_DIR, components: HOST_COMPONENTS });
87
90
  if (result.ok) {
88
91
  compiled.set(filename, result.js);
89
92
  } else {
@@ -106,7 +109,7 @@ export function createApiHandlers(ctx: ApiContext): Route[] {
106
109
  }
107
110
 
108
111
  broadcastPlanUpdate(sessionId);
109
- watchSession(sessionId, sessionManager, broadcastPlanUpdate);
112
+ watchSession(sessionId, sessionManager, broadcastPlanUpdate, { tempDir: COMPILE_TEMP_DIR, components: HOST_COMPONENTS });
110
113
 
111
114
  const browserUrl = `http://localhost:${port}/s/${sessionId}`;
112
115
  return jsonResponse({
@@ -136,7 +139,7 @@ export function createApiHandlers(ctx: ApiContext): Route[] {
136
139
  if (session) {
137
140
  const jsx = sessionManager.readRevisionJsx(sessionId, rev, jsxFilename);
138
141
  if (jsx) {
139
- const result = await compilePlan(jsx, session.projectRoot);
142
+ const result = await compileJsx(jsx, { projectRoot: session.projectRoot, tempDir: COMPILE_TEMP_DIR, components: HOST_COMPONENTS });
140
143
  if (result.ok) {
141
144
  sessionManager.saveCompiled(sessionId, jsxFilename, result.js, rev);
142
145
  compiled = result.js;
@@ -160,7 +163,8 @@ export function createApiHandlers(ctx: ApiContext): Route[] {
160
163
 
161
164
  function handleHealth(): Response {
162
165
  const sessions = sessionManager.list().map((s) => s.id);
163
- return jsonResponse({ ok: true, sessions, version: ctx.version });
166
+ // The pid is what the CLI signals to stop us — a pid file it cannot corroborate is not.
167
+ return jsonResponse({ ok: true, sessions, version: ctx.version, pid: process.pid });
164
168
  }
165
169
 
166
170
  function handleMeta(_req: Request, _url: URL, match: URLPatternResult): Response {
@@ -1,9 +1,8 @@
1
1
  import { join, resolve } from "path";
2
2
  import { readdir } from "fs/promises";
3
- import type { SessionManager } from "../session";
3
+ import type { SessionManager } from "@fabrika/canvas-kernel/server";
4
+ import { jsonResponse, type Route } from "@fabrika/daemon-kit";
4
5
  import { LANG_MAP } from "../../langMap";
5
- import { jsonResponse } from "./utils";
6
- import type { Route } from "../router";
7
6
 
8
7
  const IMAGE_MIME: Record<string, string> = {
9
8
  png: "image/png", jpg: "image/jpeg", jpeg: "image/jpeg",
@@ -1,6 +1,6 @@
1
1
  import { join, dirname } from "path";
2
2
  import { DATA_DIR } from "../paths";
3
- import type { Route } from "../router";
3
+ import type { Route } from "@fabrika/daemon-kit";
4
4
 
5
5
  const MIME_TYPES: Record<string, string> = {
6
6
  js: "application/javascript",
@@ -1,9 +1,8 @@
1
1
  import { writeFileSync } from "fs";
2
2
  import { join } from "path";
3
+ import type { SessionManager } from "@fabrika/canvas-kernel/server";
4
+ import { jsonResponse, type Route } from "@fabrika/daemon-kit";
3
5
  import { UPLOADS_DIR } from "../paths";
4
- import type { SessionManager } from "../session";
5
- import { jsonResponse } from "./utils";
6
- import type { Route } from "../router";
7
6
 
8
7
  const IMAGE_MIME: Record<string, string> = {
9
8
  png: "image/png", jpg: "image/jpeg", jpeg: "image/jpeg",
@@ -1,29 +1,15 @@
1
1
  import { join } from "path";
2
- import { homedir, tmpdir } from "os";
3
- import { mkdirSync } from "fs";
2
+ import { createCanvasPaths } from "@fabrika/canvas-kernel/server";
4
3
 
5
- /** Persistent data — survives reboots */
6
- export const DATA_DIR = join(homedir(), ".claude", "agent-canvas");
4
+ /** agent-canvas's on-disk layout. Kept in sync with bin/lib/config.ts. */
5
+ export const paths = createCanvasPaths({ appName: "agent-canvas" });
7
6
 
8
- /** Session storage */
9
- export const SESSIONS_DIR = join(DATA_DIR, "sessions");
10
-
11
- /** Ephemeral — can be lost on reboot */
12
- export const TEMP_DIR = join(tmpdir(), "agent-canvas");
13
-
14
- /** PID file for daemon process */
15
- export const PID_FILE = join(TEMP_DIR, "daemon.pid");
7
+ export const DATA_DIR = paths.dataDir;
8
+ export const SESSIONS_DIR = paths.sessionsDir;
9
+ export const TEMP_DIR = paths.tempDir;
10
+ export const PID_FILE = paths.pidFile;
11
+ export const COMPILE_TEMP_DIR = paths.compileTempDir;
12
+ export const UPLOADS_DIR = paths.uploadsDir;
16
13
 
17
14
  /** Capability used only by the CLI to resolve secret values */
18
- export const CLI_AUTH_FILE = join(TEMP_DIR, "daemon-auth-token");
19
-
20
- /** Temp dir for JSX compilation */
21
- export const COMPILE_TEMP_DIR = join(TEMP_DIR, "compile");
22
-
23
- /** Uploaded annotation images */
24
- export const UPLOADS_DIR = join(TEMP_DIR, "uploads");
25
-
26
- // Ensure dirs exist
27
- mkdirSync(SESSIONS_DIR, { recursive: true });
28
- mkdirSync(COMPILE_TEMP_DIR, { recursive: true });
29
- mkdirSync(UPLOADS_DIR, { recursive: true });
15
+ export const CLI_AUTH_FILE = join(paths.tempDir, "daemon-auth-token");
@@ -8,7 +8,7 @@ import { describe, expect, test, afterEach, beforeEach } from "bun:test";
8
8
  import { mkdtempSync, rmSync } from "fs";
9
9
  import { join } from "path";
10
10
  import { tmpdir } from "os";
11
- import { SessionManager } from "./session";
11
+ import { SessionManager } from "@fabrika/canvas-kernel/server";
12
12
  import { startRemoteFeedbackPoller } from "./remote-feedback";
13
13
 
14
14
  let testDir: string;
@@ -1,4 +1,4 @@
1
- import type { SessionManager, RemoteFeedbackEntry, RemoteAnnotation } from "./session";
1
+ import type { SessionManager, RemoteFeedbackEntry, RemoteAnnotation } from "@fabrika/canvas-kernel/server";
2
2
  import { loadShareConfig } from "./share";
3
3
  import { importShareKey, decryptString } from "../client/shareCrypto";
4
4
 
@@ -3,8 +3,8 @@ import { mkdtempSync, rmSync } from "fs";
3
3
  import { tmpdir } from "os";
4
4
  import { join } from "path";
5
5
  import { createApiHandlers } from "./handlers/api";
6
- import { dispatch, type Route } from "./router";
7
- import { SessionManager } from "./session";
6
+ import { SessionManager } from "@fabrika/canvas-kernel/server";
7
+ import { dispatch, type Route } from "@fabrika/daemon-kit";
8
8
 
9
9
  const testDirectories: string[] = [];
10
10
 
@@ -2,30 +2,31 @@ import { writeFileSync, mkdirSync, readFileSync, chmodSync } from "fs";
2
2
  import { join, dirname } from "path";
3
3
  import { tmpdir } from "os";
4
4
  import { randomBytes } from "crypto";
5
- import { SessionManager } from "./session";
6
- import { createWebSocketManager, type WSData } from "./websocket";
7
- import { dispatch } from "./router";
8
- import { jsonResponse, corsHeaders } from "./handlers/utils";
5
+ import {
6
+ createWebSocketManager,
7
+ SessionManager,
8
+ type WSData,
9
+ } from "@fabrika/canvas-kernel/server";
10
+ import { corsHeaders, dispatch, jsonResponse } from "@fabrika/daemon-kit";
9
11
  import { createApiHandlers } from "./handlers/api";
10
12
  import { createFileHandlers } from "./handlers/files";
11
13
  import { createStaticHandlers } from "./handlers/static";
12
14
  import { createUploadHandlers } from "./handlers/uploads";
13
15
  import { startRemoteFeedbackPoller } from "./remote-feedback";
14
- import { CLI_AUTH_FILE } from "./paths";
16
+ import { CLI_AUTH_FILE, PID_FILE, SESSIONS_DIR, TEMP_DIR } from "./paths";
15
17
 
16
18
  const PORT = parseInt(process.env.CANVAS_PORT || "19400", 10);
17
19
  const VERSION = JSON.parse(readFileSync(join(dirname(import.meta.dir), "..", "package.json"), "utf-8")).version as string;
18
20
 
19
21
  // Write PID file so CLI can find and stop us
20
- const pidDir = join(tmpdir(), "agent-canvas");
21
- mkdirSync(pidDir, { recursive: true, mode: 0o700 });
22
- chmodSync(pidDir, 0o700);
23
- writeFileSync(join(pidDir, "daemon.pid"), String(process.pid));
22
+ mkdirSync(TEMP_DIR, { recursive: true, mode: 0o700 });
23
+ chmodSync(TEMP_DIR, 0o700);
24
+ writeFileSync(PID_FILE, String(process.pid));
24
25
  const cliAuthToken = randomBytes(32).toString("base64url");
25
26
  writeFileSync(CLI_AUTH_FILE, cliAuthToken, { mode: 0o600 });
26
27
  chmodSync(CLI_AUTH_FILE, 0o600);
27
28
 
28
- const sessionManager = new SessionManager();
29
+ const sessionManager = new SessionManager(SESSIONS_DIR);
29
30
  const wsManager = createWebSocketManager(sessionManager);
30
31
 
31
32
  const routes = [
@@ -16,7 +16,7 @@ import { tmpdir } from "os";
16
16
 
17
17
  import workerHandler from "../../workers/canvas-share/src/index";
18
18
  import type { Env } from "../../workers/canvas-share/src/types";
19
- import { SessionManager } from "./session";
19
+ import { SessionManager } from "@fabrika/canvas-kernel/server";
20
20
  import { buildSharePayload, encryptSharePayload } from "./share";
21
21
  import {
22
22
  generateShareKey,
@@ -8,7 +8,7 @@ import { describe, expect, test, beforeEach, afterEach } from "bun:test";
8
8
  import { mkdtempSync, rmSync, mkdirSync, writeFileSync } from "fs";
9
9
  import { join } from "path";
10
10
  import { tmpdir } from "os";
11
- import { SessionManager } from "./session";
11
+ import { SessionManager } from "@fabrika/canvas-kernel/server";
12
12
  import { buildSharePayload, pushShareToWorker, shareRevision, loadShareConfig, encryptSharePayload } from "./share";
13
13
  import { generateShareKey, importShareKey, decryptString } from "../client/shareCrypto";
14
14
 
@@ -1,4 +1,4 @@
1
- import type { SessionManager, ShareEntry } from "./session";
1
+ import type { SessionManager, ShareEntry } from "@fabrika/canvas-kernel/server";
2
2
  import {
3
3
  generateShareKey,
4
4
  exportShareKey,
@@ -8,16 +8,14 @@
8
8
  "esModuleInterop": true,
9
9
  "skipLibCheck": true,
10
10
  "noEmit": true,
11
- "rootDir": ".",
12
11
  "types": ["@types/bun"],
13
12
  "paths": {
14
- "#canvas/runtime": ["./client/runtime.ts"],
13
+ "#canvas/runtime": ["./client/canvas-runtime.ts"],
15
14
  "#canvas/components": ["./client/components/index.ts"]
16
15
  }
17
16
  },
18
17
  "include": ["src/**/*", "client/**/*"],
19
18
  "exclude": [
20
- "client/compat/**/*",
21
19
  "src/share-e2e.test.ts"
22
20
  ]
23
21
  }
package/package.json CHANGED
@@ -1,17 +1,26 @@
1
1
  {
2
2
  "name": "agent-canvas",
3
- "version": "0.1.44",
3
+ "version": "0.2.0",
4
4
  "description": "Interactive visual canvas for Claude Code — rich annotatable documents in the browser",
5
5
  "bin": {
6
6
  "agent-canvas": "bin/agent-canvas.js"
7
7
  },
8
+ "files": [
9
+ "bin",
10
+ "daemon",
11
+ "skills"
12
+ ],
8
13
  "scripts": {
9
14
  "build": "bun daemon/build.ts",
15
+ "check:versions": "bun scripts/check-release-versions.ts",
10
16
  "typecheck": "tsc --noEmit && tsc --noEmit -p daemon/tsconfig.json",
11
17
  "test": "bun test",
12
18
  "prepublishOnly": "bun daemon/build.ts"
13
19
  },
14
20
  "dependencies": {
21
+ "@fabrika/annotations": "0.2.0",
22
+ "@fabrika/canvas-kernel": "0.2.0",
23
+ "@fabrika/daemon-kit": "0.2.0",
15
24
  "marked": "^17.0.4",
16
25
  "mermaid-parser-bundle": "^0.1.2",
17
26
  "preact": "^10.25.0",
@@ -29,9 +38,7 @@
29
38
  "type": "git",
30
39
  "url": "https://github.com/contember/agent-canvas"
31
40
  },
32
- "workspaces": [
33
- "workers/*"
34
- ],
41
+ "workspaces": ["workers/*"],
35
42
  "license": "MIT",
36
43
  "keywords": [
37
44
  "claude-code",
package/.github/dark.png DELETED
Binary file
package/.github/light.png DELETED
Binary file
@@ -1,48 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- pull_request:
7
-
8
- jobs:
9
- typecheck:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - uses: actions/checkout@v4
13
-
14
- - uses: oven-sh/setup-bun@v2
15
-
16
- - name: Install dependencies
17
- run: bun install --frozen-lockfile
18
-
19
- - name: Typecheck
20
- run: bun run typecheck
21
-
22
- - name: Test
23
- run: bun test
24
-
25
- - name: Build
26
- run: bun run build
27
-
28
- worker:
29
- runs-on: ubuntu-latest
30
- steps:
31
- - uses: actions/checkout@v4
32
-
33
- - uses: oven-sh/setup-bun@v2
34
-
35
- - name: Install dependencies
36
- run: bun install --frozen-lockfile
37
-
38
- - name: Typecheck
39
- working-directory: workers/canvas-share
40
- run: bun run typecheck
41
-
42
- - name: Test
43
- working-directory: workers/canvas-share
44
- run: bun test
45
-
46
- - name: Generate wrangler config (local env)
47
- working-directory: workers/canvas-share
48
- run: bun run oblaka
@@ -1,19 +0,0 @@
1
- name: Deploy worker to prod
2
-
3
- on:
4
- # Triggered by version tags so the worker deploys alongside the npm
5
- # release. This keeps the runtime bundles served by the worker in
6
- # lockstep with the @agent-canvas package version users install.
7
- push:
8
- tags:
9
- - "v*"
10
- workflow_dispatch:
11
-
12
- jobs:
13
- deploy:
14
- uses: ./.github/workflows/deploy-worker.yml
15
- with:
16
- env: prod
17
- # inherit so the reusable workflow can resolve secrets; the env-scoped
18
- # values (set on the `prod` environment) win over repo-level ones.
19
- secrets: inherit
@@ -1,21 +0,0 @@
1
- name: Deploy worker to stage
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- paths:
7
- - "workers/canvas-share/**"
8
- - "daemon/client/**"
9
- - "daemon/build.ts"
10
- - ".github/workflows/deploy-worker.yml"
11
- - ".github/workflows/deploy-worker-stage.yml"
12
- workflow_dispatch:
13
-
14
- jobs:
15
- deploy:
16
- uses: ./.github/workflows/deploy-worker.yml
17
- with:
18
- env: stage
19
- # inherit so the reusable workflow can resolve secrets; the env-scoped
20
- # values (set on the `stage` environment) win over repo-level ones.
21
- secrets: inherit
@@ -1,72 +0,0 @@
1
- name: Reusable Worker Deploy
2
-
3
- on:
4
- workflow_call:
5
- inputs:
6
- env:
7
- description: "Target environment (stage or prod)"
8
- required: true
9
- type: string
10
- # No `secrets:` inputs on purpose. The deploy job below declares
11
- # `environment: ${{ inputs.env }}`, so referencing `secrets.X` directly
12
- # resolves the matching *environment* secret (falling back to a
13
- # repo-level secret of the same name). Callers pass `secrets: inherit`
14
- # so org/repo secrets remain reachable too. This is what makes the
15
- # CLOUDFLARE_* / SHARE_AUTH_TOKEN values environment-scoped — a prod
16
- # token can never be read by a stage deploy and vice versa.
17
-
18
- jobs:
19
- deploy:
20
- runs-on: ubuntu-latest
21
- environment: ${{ inputs.env }}
22
- steps:
23
- - uses: actions/checkout@v4
24
-
25
- - uses: oven-sh/setup-bun@v2
26
-
27
- - name: Install dependencies
28
- run: bun install --frozen-lockfile
29
-
30
- # Build the daemon bundles first. The root build script auto-mirrors
31
- # them into workers/canvas-share/public/assets/ so the worker's
32
- # `[assets]` binding always ships the exact runtime that was pushed
33
- # to npm for this version — no risk of drift between the client code
34
- # inside a share payload and the runtime bundles served by the worker.
35
- - name: Build runtime bundles
36
- run: bun run build
37
-
38
- # Ask oblaka to create/update the Cloudflare resources (R2 bucket,
39
- # KV namespace) for this environment and emit a fresh wrangler.jsonc
40
- # pointed at them. `--remote` is what triggers the actual CF API
41
- # calls; without it oblaka just regenerates the config file locally.
42
- - name: Provision Cloudflare resources
43
- working-directory: workers/canvas-share
44
- env:
45
- CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
46
- CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
47
- run: bunx oblaka oblaka.ts --env ${{ inputs.env }} --remote --state-namespace agent-state-kv
48
-
49
- # Push the bearer token as a Worker secret if it was provided. Using
50
- # `secret bulk` lets us set multiple secrets in one API call and
51
- # keeps the value out of the generated wrangler.jsonc. Skipped
52
- # silently when no token is configured (dev envs).
53
- - name: Set worker secrets
54
- working-directory: workers/canvas-share
55
- env:
56
- CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
57
- CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
58
- SHARE_AUTH_TOKEN: ${{ secrets.SHARE_AUTH_TOKEN }}
59
- run: |
60
- if [ -z "$SHARE_AUTH_TOKEN" ]; then
61
- echo "SHARE_AUTH_TOKEN not set — worker will run in open-share mode"
62
- exit 0
63
- fi
64
- printf '{"SHARE_AUTH_TOKEN":"%s"}\n' "$SHARE_AUTH_TOKEN" \
65
- | bunx wrangler secret bulk
66
-
67
- - name: Deploy worker
68
- working-directory: workers/canvas-share
69
- env:
70
- CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
71
- CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
72
- run: bunx wrangler deploy