dorkos 0.45.0 → 0.45.1

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 (91) hide show
  1. package/dist/bin/cli.js +6 -6
  2. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-SWyE65Is-DbU6EhZc.js → BaseTanStackRouterDevtoolsPanel-SWyE65Is-DBeTmo8s.js} +1 -1
  3. package/dist/client/assets/BaseTanStackRouterDevtoolsPanel-SWyE65Is-DptF2Iv2.js +539 -0
  4. package/dist/client/assets/{BlintzCanvas-YWLFAfxE.js → BlintzCanvas-BC2wvdMT.js} +1 -1
  5. package/dist/client/assets/BlintzCanvas-tAgLU3aR.js +1160 -0
  6. package/dist/client/assets/{CanvasCsvContent-Dcuaf91X.js → CanvasCsvContent-B0IwcV_U.js} +1 -1
  7. package/dist/client/assets/CanvasCsvContent-RYl7B_ua.js +15 -0
  8. package/dist/client/assets/{CanvasFileContent-gn5aMM24.js → CanvasFileContent-BHJI0OTy.js} +2 -2
  9. package/dist/client/assets/CanvasFileContent-BsJsR4E1.js +2 -0
  10. package/dist/client/assets/{CanvasModel3dContent-C3PJHVs8.js → CanvasModel3dContent-BcdM2LJg.js} +2 -2
  11. package/dist/client/assets/CanvasModel3dContent-ohjBCAJd.js +2 -0
  12. package/dist/client/assets/{CodeMirrorEditor-f8fXFh5i.js → CodeMirrorEditor-C-gkWN8h.js} +1 -1
  13. package/dist/client/assets/CodeMirrorEditor-SHXbcVUy.js +1 -0
  14. package/dist/client/assets/{ConfigTab-Cetgg_6C.js → ConfigTab-DJu3oDC2.js} +1 -1
  15. package/dist/client/assets/ConfigTab-TuhuSOnv.js +17 -0
  16. package/dist/client/assets/{FloatingTanStackRouterDevtools-CnpwH7La-BOdQs4zz.js → FloatingTanStackRouterDevtools-CnpwH7La-BmSxRfr_.js} +1 -1
  17. package/dist/client/assets/FloatingTanStackRouterDevtools-CnpwH7La-Dk8iG4Hx.js +1 -0
  18. package/dist/client/assets/{Model3dViewer-qR1sbYAL.js → Model3dViewer-D6VCAF61.js} +1 -1
  19. package/dist/client/assets/Model3dViewer-K9pNJx1c.js +5372 -0
  20. package/dist/client/assets/{SessionsTab-BCsOP3gI.js → SessionsTab-BrqarM-T.js} +1 -1
  21. package/dist/client/assets/SessionsTab-Di1R_A1t.js +1 -0
  22. package/dist/client/assets/{ToolkitTab-BYtBugsk.js → ToolkitTab-BOaJEnPh.js} +1 -1
  23. package/dist/client/assets/ToolkitTab-a2dYMBx9.js +1 -0
  24. package/dist/client/assets/{TopologyGraph-xyvgCKHX.js → TopologyGraph-DUJWDhtI.js} +1 -1
  25. package/dist/client/assets/TopologyGraph-Dehijt2P.js +35 -0
  26. package/dist/client/assets/{highlighted-body-OFNGDK62-B8b-ZuJR.js → highlighted-body-OFNGDK62-B_0h6J6M.js} +1 -1
  27. package/dist/client/assets/highlighted-body-OFNGDK62-D85fxms5.js +1 -0
  28. package/dist/client/assets/{index-BrVLuO9-.js → index-5ALgrOFO.js} +1 -1
  29. package/dist/client/assets/{index-YPp3bUkv.js → index-B4Fq7yld.js} +1 -1
  30. package/dist/client/assets/{index-CZBlFw3s.js → index-B4_k9QZg.js} +1 -1
  31. package/dist/client/assets/{index-B-WBHpyv.js → index-B7ObcNSe.js} +1 -1
  32. package/dist/client/assets/{index-BzFClKht.js → index-B9VCOBmA.js} +2 -2
  33. package/dist/client/assets/{index-BaGiFKrR.js → index-BCp9aZet.js} +1 -1
  34. package/dist/client/assets/index-BDdd8Mqa.js +1 -0
  35. package/dist/client/assets/index-BNSNg7yH.js +1316 -0
  36. package/dist/client/assets/{index-aEzy0_Oi.js → index-BQk-ivFT.js} +1 -1
  37. package/dist/client/assets/{index-CCHYQVhi.js → index-BT9yFVeS.js} +3 -3
  38. package/dist/client/assets/{index-sKKm7yEm.js → index-BZYDK9c8.js} +8 -8
  39. package/dist/client/assets/{index-Djl0lRsF.js → index-Bbn2wn69.js} +1 -1
  40. package/dist/client/assets/{index-C27wAnIu.js → index-BcX7mUEk.js} +1 -1
  41. package/dist/client/assets/{index-BT9Vxyz4.js → index-Bcx7LFbL.js} +1 -1
  42. package/dist/client/assets/{index-CCqqyjKr.js → index-BdUsepd_.js} +1 -1
  43. package/dist/client/assets/index-BeWJN4g0.js +1 -0
  44. package/dist/client/assets/index-Bh6Wh5Du.js +1 -0
  45. package/dist/client/assets/index-BqqIE9sa.js +1 -0
  46. package/dist/client/assets/{index-CzJ4xEDL.js → index-Bvs4ET-I.js} +1 -1
  47. package/dist/client/assets/{index-Ced3HTl7.js → index-Bx073uVW.js} +1 -1
  48. package/dist/client/assets/{index-BJyMVoKM.js → index-C20-Z8l4.js} +1 -1
  49. package/dist/client/assets/{index-lFLNlOBz.js → index-C2NQ-Ck8.js} +1 -1
  50. package/dist/client/assets/index-C44W9aTS.js +2 -0
  51. package/dist/client/assets/index-C6SlFkyv.js +2 -0
  52. package/dist/client/assets/{index-DjSzGDon.js → index-C9IMI6L6.js} +1 -1
  53. package/dist/client/assets/{index-C2pa1dy_.js → index-CK2kZcMG.js} +1 -1
  54. package/dist/client/assets/index-CKCx_Kan.js +6 -0
  55. package/dist/client/assets/index-CQxDY4vU.js +6 -0
  56. package/dist/client/assets/{index-oZPvMe-H.js → index-CSZQyH2J.js} +1 -1
  57. package/dist/client/assets/{index-9i9Kxi6Z.js → index-CT-ZBhf1.js} +1 -1
  58. package/dist/client/assets/{index-BkmzUjFL.js → index-CaH1aFVg.js} +1 -1
  59. package/dist/client/assets/index-CdAooMjU.js +15 -0
  60. package/dist/client/assets/{index-BKp1QoTa.js → index-CvMyZRD2.js} +1 -1
  61. package/dist/client/assets/index-CyUySFAD.js +13 -0
  62. package/dist/client/assets/{index-BQ0KNUVJ.js → index-CyWkKBhZ.js} +1 -1
  63. package/dist/client/assets/{index-DWocbnZZ.js → index-D1ekLRaV.js} +1 -1
  64. package/dist/client/assets/{index-DRqPbLFU.js → index-D9MT2UpW.js} +1 -1
  65. package/dist/client/assets/index-DEA_Cy2Q.js +1 -0
  66. package/dist/client/assets/index-DLQOQsnm.js +1 -0
  67. package/dist/client/assets/index-DQD1r_S5.js +70 -0
  68. package/dist/client/assets/{index-BV2QuCxp.js → index-DUshTWP6.js} +1 -1
  69. package/dist/client/assets/index-DbAfUW6T.js +1 -0
  70. package/dist/client/assets/index-DhLhWBOz.js +1 -0
  71. package/dist/client/assets/index-DiQETlwd.js +71 -0
  72. package/dist/client/assets/index-Do63XgYk.js +1 -0
  73. package/dist/client/assets/index-DvPThthM.js +1 -0
  74. package/dist/client/assets/index-Dyl6ywSG.js +7 -0
  75. package/dist/client/assets/{index-CTqKf40t.js → index-MDyXRyeQ.js} +1 -1
  76. package/dist/client/assets/index-QFOwC8Sb.js +6 -0
  77. package/dist/client/assets/index-YNTMAxpK.js +1 -0
  78. package/dist/client/assets/index-ZZSS75im.js +1 -0
  79. package/dist/client/assets/index-_mq6ScXa.js +1 -0
  80. package/dist/client/assets/index-dj2DvPaa.js +1 -0
  81. package/dist/client/assets/index-oQeM2FOC.js +1 -0
  82. package/dist/client/assets/{index-ByyRHqai.js → index-rZ21sTqk.js} +1 -1
  83. package/dist/client/assets/index-sgPwXj8m.js +1 -0
  84. package/dist/client/assets/index-w2P-tT_0.js +1 -0
  85. package/dist/client/assets/{index-DQrSytvk.js → index-w2dnLgsj.js} +1 -1
  86. package/dist/client/assets/index-xIhoncSx.js +1 -0
  87. package/dist/client/assets/index-yXRJmHf-.js +3 -0
  88. package/dist/client/index.html +1 -1
  89. package/dist/server/index.js +2 -1
  90. package/dist/server/index.js.map +1 -1
  91. package/package.json +3 -3
@@ -1,4 +1,4 @@
1
- import{ac as xe,c as Re,f as Ce,r as we,i as Se,j as D,ad as Oe,l as Te}from"./index-sKKm7yEm.js";import{r as Ie}from"./fetch-src-4Qlrf9qq.js";var he={exports:{}};/* @license
1
+ import{ac as xe,c as Re,f as Ce,r as we,i as Se,j as D,ad as Oe,l as Te}from"./index-BNSNg7yH.js";import{r as Ie}from"./fetch-src-4Qlrf9qq.js";var he={exports:{}};/* @license
2
2
  Papa Parse
3
3
  v5.5.4
4
4
  https://github.com/mholt/PapaParse
@@ -0,0 +1,15 @@
1
+ import{ac as xe,c as Re,f as Ce,r as we,i as Se,j as D,ad as Oe,l as Te}from"./index-BZYDK9c8.js";import{r as Ie}from"./fetch-src-4Qlrf9qq.js";var he={exports:{}};/* @license
2
+ Papa Parse
3
+ v5.5.4
4
+ https://github.com/mholt/PapaParse
5
+ License: MIT
6
+ */var Ae=he.exports,ve;function je(){return ve||(ve=1,(function($,Y){((V,m)=>{$.exports=m()})(Ae,function V(){var m=typeof self<"u"?self:typeof window<"u"?window:m!==void 0?m:{},I,M=!m.document&&!!m.postMessage,Z=m.IS_PAPA_WORKER||!1,N={},le=0,a={};function te(e){return e.charCodeAt(0)===65279?e.slice(1):e}function B(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(t){var r=de(t);r.chunkSize=parseInt(r.chunkSize),t.step||t.chunk||(r.chunkSize=null),this._handle=new ge(r),(this._handle.streamer=this)._config=r}).call(this,e),this.parseChunk=function(t,r){var n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<n){let f=this._config.newline;f||(i=this._config.quoteChar||'"',f=this._handle.guessLineEndings(t,i)),t=[...t.split(f).slice(n)].join(f)}this.isFirstChunk&&k(this._config.beforeFirstChunk)&&(i=this._config.beforeFirstChunk(t))!==void 0&&(t=i),this.isFirstChunk=!1,this._halted=!1;var n=this._partialLine+t,i=(this._partialLine="",this._handle.parse(n,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(t=i.meta.cursor,n=(this._finished||(this._partialLine=n.substring(t-this._baseIndex),this._baseIndex=t),i&&i.data&&(this._rowCount+=i.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),Z)m.postMessage({results:i,workerId:a.WORKER_ID,finished:n});else if(k(this._config.chunk)&&!r){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=i=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!n||!k(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),n||i&&i.meta.paused||this._nextChunk(),i}this._halted=!0},this._sendError=function(t){k(this._config.error)?this._config.error(t):Z&&this._config.error&&m.postMessage({workerId:a.WORKER_ID,error:t,finished:!1})}}function ae(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.RemoteChunkSize),B.call(this,e),this._nextChunk=M?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(r){this._input=r,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),M||(t.onload=J(this._chunkLoaded,this),t.onerror=J(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!M),this._config.downloadRequestHeaders){var r,n=this._config.downloadRequestHeaders;for(r in n)t.setRequestHeader(r,n[r])}var i;this._config.chunkSize&&(i=this._start+this._config.chunkSize-1,t.setRequestHeader("Range","bytes="+this._start+"-"+i));try{t.send(this._config.downloadRequestBody)}catch(f){this._chunkError(f.message)}M&&t.status===0&&this._chunkError()}},this._chunkLoaded=function(){t.readyState===4&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize||t.responseText.length,this._finished=!this._config.chunkSize||this._start>=(r=>(r=r.getResponseHeader("Content-Range"))!==null?parseInt(r.substring(r.lastIndexOf("/")+1)):-1)(t),this.parseChunk(t.responseText)))},this._chunkError=function(r){r=t.statusText||r,this._sendError(new Error(r))}}function oe(e){(e=e||{}).chunkSize||(e.chunkSize=a.LocalChunkSize),B.call(this,e);var t,r,n=typeof FileReader<"u";this.stream=function(i){this._input=i,r=i.slice||i.webkitSlice||i.mozSlice,n?((t=new FileReader).onload=J(this._chunkLoaded,this),t.onerror=J(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var i=this._input,f=(this._config.chunkSize&&(f=Math.min(this._start+this._config.chunkSize,this._input.size),i=r.call(i,this._start,f)),t.readAsText(i,this._config.encoding));n||this._chunkLoaded({target:{result:f}})},this._chunkLoaded=function(i){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(i.target.result)},this._chunkError=function(){this._sendError(t.error)}}function re(e){var t;B.call(this,e=e||{}),this.stream=function(r){return t=r,this._nextChunk()},this._nextChunk=function(){var r,n;if(!this._finished)return r=this._config.chunkSize,t=r?(n=t.substring(0,r),t.substring(r)):(n=t,""),this._finished=!t,this.parseChunk(n)}}function ue(e){B.call(this,e=e||{});var t=[],r=!0,n=!1;this.pause=function(){B.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){B.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(i){this._input=i,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){n&&t.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=J(function(i){try{t.push(typeof i=="string"?i:i.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(f){this._streamError(f)}},this),this._streamError=J(function(i){this._streamCleanUp(),this._sendError(i)},this),this._streamEnd=J(function(){this._streamCleanUp(),n=!0,this._streamData("")},this),this._streamCleanUp=J(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function ge(e){var t,r,n,i,f=Math.pow(2,53),x=-f,F=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,q=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,d=this,R=0,o=0,A=!1,h=!1,c=[],s={data:[],errors:[],meta:{}};function z(_){return e.skipEmptyLines==="greedy"?_.join("").trim()==="":_.length===1&&_[0].length===0}function b(){if(s&&n&&(P("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines&&(s.data=s.data.filter(function(u){return!z(u)})),S()){let u=function(w,O){w=te(w),k(e.transformHeader)&&(w=e.transformHeader(w,O)),c.push(w)};if(s)if(Array.isArray(s.data[0])){for(var _=0;S()&&_<s.data.length;_++)s.data[_].forEach(u);s.data.splice(0,1)}else s.data.forEach(u)}function p(u,w){for(var O=e.header?{}:[],y=0;y<u.length;y++){var v=y,g=u[y],g=((U,l)=>(E=>(e.dynamicTypingFunction&&e.dynamicTyping[E]===void 0&&(e.dynamicTyping[E]=e.dynamicTypingFunction(E)),(e.dynamicTyping[E]||e.dynamicTyping)===!0))(U)?l==="true"||l==="TRUE"||l!=="false"&&l!=="FALSE"&&((E=>{if(F.test(E)&&(E=parseFloat(E),x<E&&E<f))return 1})(l)?parseFloat(l):q.test(l)?new Date(l):l===""?null:l):l)(v=e.header?y>=c.length?"__parsed_extra":c[y]:v,g=e.transform?e.transform(g,v):g);v==="__parsed_extra"?(O[v]=O[v]||[],O[v].push(g)):O[v]=g}return e.header&&(y>c.length?P("FieldMismatch","TooManyFields","Too many fields: expected "+c.length+" fields but parsed "+y,o+w):y<c.length&&P("FieldMismatch","TooFewFields","Too few fields: expected "+c.length+" fields but parsed "+y,o+w)),O}var C;s&&(e.header||e.dynamicTyping||e.transform)&&(C=1,!s.data.length||Array.isArray(s.data[0])?(s.data=s.data.map(p),C=s.data.length):s.data=p(s.data,0),e.header&&s.meta&&(s.meta.fields=c),o+=C)}function S(){return e.header&&c.length===0}function P(_,p,C,u){_={type:_,code:p,message:C},u!==void 0&&(_.row=u),s.errors.push(_)}k(e.step)&&(i=e.step,e.step=function(_){s=_,S()?b():(b(),s.data.length!==0&&(R+=_.data.length,e.preview&&R>e.preview?r.abort():(s.data=s.data[0],i(s,d))))}),this.parse=function(_,p,C){var u=e.quoteChar||'"',u=(e.newline||(e.newline=this.guessLineEndings(_,u)),n=!1,e.delimiter?k(e.delimiter)&&(e.delimiter=e.delimiter(_),s.meta.delimiter=e.delimiter):((u=((w,O,y,v,g)=>{var U,l,E,G;g=g||[","," ","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var X=0;X<g.length;X++){for(var H,ne=g[X],j=0,K=0,T=0,L=(E=void 0,new fe({comments:v,delimiter:ne,newline:O,preview:10}).parse(w)),Q=0;Q<L.data.length;Q++)y&&z(L.data[Q])?T++:(H=L.data[Q].length,K+=H,E===void 0?E=H:0<H&&(j+=Math.abs(H-E),E=H));0<L.data.length&&(K/=L.data.length-T),(l===void 0||j<=l)&&(G===void 0||G<K)&&1.99<K&&(l=j,U=ne,G=K)}return{successful:!!(e.delimiter=U),bestDelimiter:U}})(_,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess)).successful?e.delimiter=u.bestDelimiter:(n=!0,e.delimiter=a.DefaultDelimiter),s.meta.delimiter=e.delimiter),de(e));return e.preview&&e.header&&u.preview++,t=_,r=new fe(u),s=r.parse(t,p,C),b(),A?{meta:{paused:!0}}:s||{meta:{paused:!1}}},this.paused=function(){return A},this.pause=function(){A=!0,r.abort(),t=k(e.chunk)?"":t.substring(r.getCharIndex())},this.resume=function(){d.streamer._halted?(A=!1,d.streamer.parseChunk(t,!0)):setTimeout(d.resume,3)},this.aborted=function(){return h},this.abort=function(){h=!0,r.abort(),s.meta.aborted=!0,k(e.complete)&&e.complete(s),t=""},this.guessLineEndings=function(w,u){w=w.substring(0,1048576);var u=new RegExp(ie(u)+"([^]*?)"+ie(u),"gm"),C=(w=w.replace(u,"")).split("\r"),u=w.split(`
7
+ `),w=1<u.length&&u[0].length<C[0].length;if(C.length===1||w)return`
8
+ `;for(var O=0,y=0;y<C.length;y++)C[y][0]===`
9
+ `&&O++;return O>=C.length/2?`\r
10
+ `:"\r"}}function ie(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function fe(e){var t=(e=e||{}).delimiter,r=e.newline,n=e.comments,i=e.step,f=e.preview,x=e.fastMode,F=null,q=!1,d=e.quoteChar==null?'"':e.quoteChar,R=d;if(e.escapeChar!==void 0&&(R=e.escapeChar),(typeof t!="string"||-1<a.BAD_DELIMITERS.indexOf(t))&&(t=","),n===t)throw new Error("Comment character same as delimiter");n===!0?n="#":(typeof n!="string"||-1<a.BAD_DELIMITERS.indexOf(n))&&(n=!1),r!==`
11
+ `&&r!=="\r"&&r!==`\r
12
+ `&&(r=`
13
+ `);var o=0,A=!1;this.parse=function(h,c,s){if(typeof h!="string")throw new Error("Input must be a string");var z=h.length,b=t.length,S=r.length,P=n.length,_=k(i),p=[],C=[],u=[],w=o=0;if(!h)return j();if(x||x!==!1&&h.indexOf(d)===-1){for(var O=h.split(r),y=0;y<O.length;y++){if(u=O[y],o+=u.length,y!==O.length-1)o+=r.length;else if(s)return j();if(!n||u.substring(0,P)!==n){if(_){if(p=[],G(u.split(t)),K(),A)return j()}else G(u.split(t));if(f&&f<=y)return p=p.slice(0,f),j(!0)}}return j()}for(var v=h.indexOf(t,o),g=h.indexOf(r,o),U=new RegExp(ie(R)+ie(d),"g"),l=h.indexOf(d,o);;)if(h[o]===d)for(l=o,o++;;){if((l=h.indexOf(d,l+1))===-1)return s||C.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:p.length,index:o}),H();if(l===z-1)return H(h.substring(o,l).replace(U,d));if(d===R&&h[l+1]===R)l++;else if(d===R||l===0||h[l-1]!==R){v!==-1&&v<l+1&&(v=h.indexOf(t,l+1));var E=X((g=g!==-1&&g<l+1?h.indexOf(r,l+1):g)===-1?v:Math.min(v,g));if(h.substr(l+1+E,b)===t){u.push(h.substring(o,l).replace(U,d)),h[o=l+1+E+b]!==d&&(l=h.indexOf(d,o)),v=h.indexOf(t,o),g=h.indexOf(r,o);break}if(E=X(g),h.substring(l+1+E,l+1+E+S)===r){if(u.push(h.substring(o,l).replace(U,d)),ne(l+1+E+S),v=h.indexOf(t,o),l=h.indexOf(d,o),_&&(K(),A))return j();if(f&&p.length>=f)return j(!0);break}C.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:p.length,index:o}),l++}}else if(n&&u.length===0&&h.substring(o,o+P)===n){if(g===-1)return j();o=g+S,g=h.indexOf(r,o),v=h.indexOf(t,o)}else if(v!==-1&&(v<g||g===-1))u.push(h.substring(o,v)),o=v+b,v=h.indexOf(t,o);else{if(g===-1)break;if(u.push(h.substring(o,g)),ne(g+S),_&&(K(),A))return j();if(f&&p.length>=f)return j(!0)}return H();function G(T){p.push(T),w=o}function X(T){var L=0;return L=T!==-1&&(T=h.substring(l+1,T))&&T.trim()===""?T.length:L}function H(T){return s||(T===void 0&&(T=h.substring(o)),u.push(T),o=z,G(u),_&&K()),j()}function ne(T){o=T,G(u),u=[],g=h.indexOf(r,o)}function j(T){if(e.header&&!c&&p.length&&!q){var L=p[0],Q=Object.create(null),ce=new Set(L);let ye=!1;for(let ee=0;ee<L.length;ee++){let W=te(L[ee]);if(Q[W=k(e.transformHeader)?e.transformHeader(W,ee):W]){let se,ke=Q[W];for(;se=W+"_"+ke,ke++,ce.has(se););ce.add(se),L[ee]=se,Q[W]++,ye=!0,(F=F===null?{}:F)[se]=W}else Q[W]=1,L[ee]=W;ce.add(W)}ye&&console.warn("Duplicate headers found and renamed."),q=!0}return{data:p,errors:C,meta:{delimiter:t,linebreak:r,aborted:A,truncated:!!T,cursor:w+(c||0),renamedHeaders:F}}}function K(){i(j()),p=[],C=[]}},this.abort=function(){A=!0},this.getCharIndex=function(){return o}}function Ee(e){var t=e.data,r=N[t.workerId],n=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var i={abort:function(){n=!0,_e(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:me,resume:me};if(k(r.userStep)){for(var f=0;f<t.results.data.length&&(r.userStep({data:t.results.data[f],errors:t.results.errors,meta:t.results.meta},i),!n);f++);delete t.results}else k(r.userChunk)&&(r.userChunk(t.results,i,t.file),delete t.results)}t.finished&&!n&&_e(t.workerId,t.results)}function _e(e,t){var r=N[e];k(r.userComplete)&&r.userComplete(t),r.terminate(),delete N[e]}function me(){throw new Error("Not implemented.")}function de(e){if(typeof e!="object"||e===null)return e;var t,r=Array.isArray(e)?[]:{};for(t in e)r[t]=de(e[t]);return r}function J(e,t){return function(){e.apply(t,arguments)}}function k(e){return typeof e=="function"}return a.parse=function(e,t){var r=(t=t||{}).dynamicTyping||!1;if(k(r)&&(t.dynamicTypingFunction=r,r={}),t.dynamicTyping=r,t.transform=!!k(t.transform)&&t.transform,!t.worker||!a.WORKERS_SUPPORTED)return r=null,a.NODE_STREAM_INPUT,typeof e=="string"?(e=te(e),r=new(t.download?ae:re)(t)):e.readable===!0&&k(e.read)&&k(e.on)?r=new ue(t):(m.File&&e instanceof File||e instanceof Object)&&(r=new oe(t)),r.stream(e);(r=(()=>{var n;return!!a.WORKERS_SUPPORTED&&(n=(()=>{var i=m.URL||m.webkitURL||null,f=V.toString();return a.BLOB_URL||(a.BLOB_URL=i.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",f,")();"],{type:"text/javascript"})))})(),(n=new m.Worker(n)).onmessage=Ee,n.id=le++,N[n.id]=n)})()).userStep=t.step,r.userChunk=t.chunk,r.userComplete=t.complete,r.userError=t.error,t.step=k(t.step),t.chunk=k(t.chunk),t.complete=k(t.complete),t.error=k(t.error),delete t.worker,r.postMessage({input:e,config:t,workerId:r.id})},a.unparse=function(e,t){var r=!1,n=!0,i=",",f=`\r
14
+ `,x='"',F=x+x,q=!1,d=null,R=!1,o=((()=>{if(typeof t=="object"){if(typeof t.delimiter!="string"||a.BAD_DELIMITERS.filter(function(c){return t.delimiter.indexOf(c)!==-1}).length||(i=t.delimiter),typeof t.quotes!="boolean"&&typeof t.quotes!="function"&&!Array.isArray(t.quotes)||(r=t.quotes),typeof t.skipEmptyLines!="boolean"&&typeof t.skipEmptyLines!="string"||(q=t.skipEmptyLines),typeof t.newline=="string"&&(f=t.newline),typeof t.quoteChar=="string"&&(x=t.quoteChar,F=x+x),typeof t.header=="boolean"&&(n=t.header),Array.isArray(t.columns)){if(t.columns.length===0)throw new Error("Option columns is empty");d=t.columns}t.escapeChar!==void 0&&(F=t.escapeChar+x),t.escapeFormulae instanceof RegExp?R=t.escapeFormulae:typeof t.escapeFormulae=="boolean"&&t.escapeFormulae&&(R=/^[=+\-@\t\r].*$/)}})(),new RegExp(ie(x),"g"));if(typeof e=="string"&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return A(null,e,q);if(typeof e[0]=="object")return A(d||Object.keys(e[0]),e,q)}else if(typeof e=="object")return typeof e.data=="string"&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||d),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:typeof e.data[0]=="object"?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||typeof e.data[0]=="object"||(e.data=[e.data])),A(e.fields||[],e.data||[],q);throw new Error("Unable to serialize unrecognized input");function A(c,s,z){var b="",S=(typeof c=="string"&&(c=JSON.parse(c)),typeof s=="string"&&(s=JSON.parse(s)),Array.isArray(c)&&0<c.length),P=!Array.isArray(s[0]);if(S&&n){for(var _=0;_<c.length;_++)0<_&&(b+=i),b+=h(c[_],_);0<s.length&&(b+=f)}for(var p=0;p<s.length;p++){var C=(S?c:s[p]).length,u=!1,w=S?Object.keys(s[p]).length===0:s[p].length===0;if(z&&!S&&(u=z==="greedy"?s[p].join("").trim()==="":s[p].length===1&&s[p][0].length===0),z==="greedy"&&S){for(var O=[],y=0;y<C;y++){var v=P?c[y]:y;O.push(s[p][v])}u=O.join("").trim()===""}if(!u){for(var g=0;g<C;g++){0<g&&!w&&(b+=i);var U=S&&P?c[g]:g;b+=h(s[p][U],g)}p<s.length-1&&(!z||0<C&&!w)&&(b+=f)}}return b}function h(c,s){var z,b,S;return c==null?"":c.constructor===Date?JSON.stringify(c).slice(1,25):(S=!1,R&&typeof c=="string"&&R.test(c)&&(c="'"+c,S=!0),b=(z=c.toString()).replace(o,F),(S=S||r===!0||typeof r=="function"&&r(c,s)||Array.isArray(r)&&r[s]||((P,_)=>{for(var p=0;p<_.length;p++)if(-1<P.indexOf(_[p]))return!0;return!1})(b,a.BAD_DELIMITERS)||-1<b.indexOf(i)||-1<z.indexOf(x)||b.charAt(0)===" "||b.charAt(b.length-1)===" ")?x+b+x:b)}},a.RECORD_SEP="",a.UNIT_SEP="",a.BYTE_ORDER_MARK="\uFEFF",a.BAD_DELIMITERS=["\r",`
15
+ `,'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!M&&!!m.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=fe,a.ParserHandle=ge,a.NetworkStreamer=ae,a.FileStreamer=oe,a.StringStreamer=re,a.ReadableStreamStreamer=ue,m.jQuery&&((I=m.jQuery).fn.parse=function(e){var t=e.config||{},r=[];return this.each(function(f){if(!(I(this).prop("tagName").toUpperCase()==="INPUT"&&I(this).attr("type").toLowerCase()==="file"&&m.FileReader)||!this.files||this.files.length===0)return!0;for(var x=0;x<this.files.length;x++)r.push({file:this.files[x],inputElem:this,instanceConfig:I.extend({},t)})}),n(),this;function n(){if(r.length===0)k(e.complete)&&e.complete();else{var f,x,F,q,d=r[0];if(k(e.before)){var R=e.before(d.file,d.inputElem);if(typeof R=="object"){if(R.action==="abort")return f="AbortError",x=d.file,F=d.inputElem,q=R.reason,void(k(e.error)&&e.error({name:f},x,F,q));if(R.action==="skip")return void i();typeof R.config=="object"&&(d.instanceConfig=I.extend(d.instanceConfig,R.config))}else if(R==="skip")return void i()}var o=d.instanceConfig.complete;d.instanceConfig.complete=function(A){k(o)&&o(A,d.file,d.inputElem),i()},a.parse(d.file,d.instanceConfig)}}function i(){r.splice(0,1),n()}}),Z&&(m.onmessage=function(e){e=e.data,a.WORKER_ID===void 0&&e&&(a.WORKER_ID=e.workerId),typeof e.input=="string"?m.postMessage({workerId:a.WORKER_ID,results:a.parse(e.input,e.config),finished:!0}):(m.File&&e.input instanceof File||e.input instanceof Object)&&(e=a.parse(e.input,e.config))&&m.postMessage({workerId:a.WORKER_ID,results:e,finished:!0})}),(ae.prototype=Object.create(B.prototype)).constructor=ae,(oe.prototype=Object.create(B.prototype)).constructor=oe,(re.prototype=Object.create(re.prototype)).constructor=re,(ue.prototype=Object.create(B.prototype)).constructor=ue,a})})(he)),he.exports}var Le=je();const De=xe(Le),be=32;function qe({content:$}){const Y=Re(),V=Ce(a=>a.selectedCwd),m=we.useMemo(()=>Ie($.src,a=>Y.mediaUrl(V??"",a)),[$.src,Y,V]),{data:I,error:M,isLoading:Z}=Se({queryKey:["canvas-csv",m.url],enabled:m.url!==null,queryFn:async()=>{const a=await fetch(m.url);if(!a.ok)throw new Error(`Failed to load CSV (${a.status})`);const te=await a.text();return De.parse(te.trim(),{skipEmptyLines:!0}).data},staleTime:6e4,retry:!1});if(m.url===null)return D.jsx(pe,{children:"This CSV source can’t be displayed here."});if(Z)return D.jsx(pe,{children:"Loading CSV…"});if(M||!I||I.length===0)return D.jsx(pe,{children:"This CSV couldn’t be loaded."});const[N,...le]=I;return D.jsx(Fe,{header:N,rows:le})}function Fe({header:$,rows:Y}){const V=we.useRef(null),m=Oe({count:Y.length,getScrollElement:()=>V.current,estimateSize:()=>be,overscan:12});return D.jsx("div",{ref:V,className:"h-full overflow-auto",children:D.jsxs("table",{className:"w-full border-collapse text-sm",children:[D.jsx("thead",{className:"bg-muted sticky top-0 z-10",children:D.jsx("tr",{children:$.map((I,M)=>D.jsx("th",{className:"text-muted-foreground border-b px-3 py-1.5 text-left font-medium whitespace-nowrap",children:I},M))})}),D.jsx("tbody",{style:{height:m.getTotalSize(),position:"relative"},children:m.getVirtualItems().map(I=>{const M=Y[I.index];return D.jsx("tr",{className:Te("absolute flex w-full",I.index%2===1&&"bg-muted/30"),style:{transform:`translateY(${I.start}px)`,height:be},children:$.map((Z,N)=>D.jsx("td",{className:"flex-1 truncate border-b px-3 py-1.5 whitespace-nowrap",title:M[N]??"",children:M[N]??""},N))},I.key)})})]})})}function pe({children:$}){return D.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:D.jsx("p",{children:$})})}export{qe as CanvasCsvContent};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeMirrorEditor-f8fXFh5i.js","assets/index-sKKm7yEm.js","assets/index-Dd6aLZxO.css","assets/index-CCHYQVhi.js","assets/BlintzCanvas-YWLFAfxE.js","assets/BlintzCanvas-CLCIbR7o.css"])))=>i.map(i=>d[i]);
2
- import{c as A,f as P,h as B,i as D,r,j as t,d as M,k as Q,l as q,B as y,m as H,C as K,P as V,_ as E}from"./index-sKKm7yEm.js";const $=r.lazy(()=>E(()=>import("./CodeMirrorEditor-f8fXFh5i.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.CodeMirrorEditor}))),I=r.lazy(()=>E(()=>import("./BlintzCanvas-YWLFAfxE.js"),__vite__mapDeps([4,1,2,3,5])).then(e=>({default:e.BlintzCanvas}))),U=500;function b(e,a){return["canvas-file",e,a]}function Y(e,a){return a==="markdown"||/\.(md|markdown|mdx)$/i.test(e)}function G(e){switch(e==null?void 0:e.code){case"NOT_FOUND":return"This file doesn't exist.";case"NOT_A_FILE":return"This path is a directory, not a file.";case"TOO_LARGE":return"This file is too large to open here.";case"BINARY_FILE":return"This file isn't text and can't be shown in the editor.";default:return"This file couldn't be loaded."}}function J(e){switch(e){case"saving":return"Saving…";case"saved":return"Saved";case"error":return"Couldn't save";default:return null}}function Z({content:e,documentId:a}){const f=A(),i=P(s=>s.selectedCwd),C=P(s=>s.setDocumentEditing),{theme:n}=B(),{data:l,error:c,isLoading:v}=D({queryKey:b(i,e.sourcePath),enabled:i!==null,queryFn:()=>f.readFileContent(i,e.sourcePath),staleTime:3e4,retry:!1}),[d,p]=r.useState(null),x=s=>{p(s&&l?{pinnedHash:l.hash}:null)};if(i===null)return t.jsx(_,{children:"Open a session to view files."});if(v)return t.jsx(_,{children:"Loading file…"});if(c||!l)return t.jsx(_,{children:G(c)});const m=(d==null?void 0:d.pinnedHash)??l.hash;return t.jsx(W,{content:e,documentId:a,cwd:i,loaded:l.content,theme:n==="dark"?"dark":"light",isEditing:d!==null,onEditingChange:x,setDocumentEditing:C},`${e.sourcePath}:${m}`)}function W({content:e,documentId:a,cwd:f,loaded:i,theme:C,isEditing:n,onEditingChange:l,setDocumentEditing:c}){const v=e.readOnly!==!0,d=Y(e.sourcePath,e.language),p=M(),[x,m]=r.useState(i),s=Q({sourcePath:e.sourcePath,cwd:f,loadedContent:i}),o=r.useRef(null),h=r.useRef(x),j=r.useRef(s.save),T=r.useRef(l);r.useEffect(()=>{h.current=x,j.current=s.save,T.current=l});const k=r.useCallback(u=>{m(u),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,j.current(h.current)},U)},[]),z=()=>{m(i),l(!0),c(a,!0)},O=async()=>{o.current&&(clearTimeout(o.current),o.current=null);const u=await j.current(h.current);if(u==="conflict"||u==="error")return;const g=s.getConfirmedBase();g.hash!==null&&g.content===h.current&&p.setQueryData(b(f,e.sourcePath),N=>N&&{...N,content:g.content,hash:g.hash}),l(!1),c(a,!1)},L=()=>{p.invalidateQueries({queryKey:b(f,e.sourcePath)})};r.useEffect(()=>()=>{o.current&&(clearTimeout(o.current),j.current(h.current)),c(a,!1),T.current(!1)},[a,c]);const S=()=>{const u=s.adoptDisk();u!=null&&m(u)},F=()=>{s.overwrite(h.current)},R=J(s.status),w=n?x:i;return t.jsxs("div",{className:"relative flex h-full flex-col",children:[t.jsxs("div",{className:"sticky top-0 z-10 flex h-0 items-start justify-end gap-2 pr-2",children:[v&&R&&t.jsx("span",{className:q("mt-3 text-xs",s.status==="error"?"text-destructive":"text-muted-foreground"),"aria-live":"polite",children:R}),!n&&t.jsx(y,{type:"button",variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-foreground mt-2",onClick:L,"aria-label":"Refresh from disk",children:t.jsx(H,{className:"size-4"})}),v&&t.jsx(y,{type:"button",variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-foreground mt-2",onClick:n?()=>void O():z,"aria-label":n?"Finish editing":"Edit file",children:n?t.jsx(K,{className:"size-4"}):t.jsx(V,{className:"size-4"})})]}),s.status==="conflict"&&t.jsxs("div",{className:"bg-destructive/10 text-destructive mx-2 mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 rounded-md px-3 py-2 text-sm",children:[t.jsx("span",{className:"flex-1",children:"This file changed on disk since you opened it."}),t.jsx(y,{type:"button",variant:"ghost",size:"sm",className:"h-7",onClick:S,children:"Reload"}),t.jsx(y,{type:"button",variant:"destructive",size:"sm",className:"h-7",onClick:F,children:"Overwrite"})]}),t.jsx("div",{className:"min-h-0 flex-1",children:t.jsx(r.Suspense,{fallback:t.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading editor…"}),children:d?t.jsx("div",{className:"px-2 pb-6",children:t.jsx(I,{value:w,editable:n,onChange:n?k:void 0})}):t.jsx($,{value:w,editable:n,filename:e.sourcePath,languageHint:e.language,theme:C,onChange:n?k:void 0})})})]})}function _({children:e}){return t.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:t.jsx("p",{children:e})})}export{Z as CanvasFileContent};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeMirrorEditor-SHXbcVUy.js","assets/index-BNSNg7yH.js","assets/index-Dd6aLZxO.css","assets/index-CdAooMjU.js","assets/BlintzCanvas-tAgLU3aR.js","assets/BlintzCanvas-CLCIbR7o.css"])))=>i.map(i=>d[i]);
2
+ import{c as A,f as P,h as B,i as D,r,j as t,d as M,k as Q,l as q,B as y,m as H,C as K,P as V,_ as E}from"./index-BNSNg7yH.js";const $=r.lazy(()=>E(()=>import("./CodeMirrorEditor-SHXbcVUy.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.CodeMirrorEditor}))),I=r.lazy(()=>E(()=>import("./BlintzCanvas-tAgLU3aR.js"),__vite__mapDeps([4,1,2,3,5])).then(e=>({default:e.BlintzCanvas}))),U=500;function b(e,a){return["canvas-file",e,a]}function Y(e,a){return a==="markdown"||/\.(md|markdown|mdx)$/i.test(e)}function G(e){switch(e==null?void 0:e.code){case"NOT_FOUND":return"This file doesn't exist.";case"NOT_A_FILE":return"This path is a directory, not a file.";case"TOO_LARGE":return"This file is too large to open here.";case"BINARY_FILE":return"This file isn't text and can't be shown in the editor.";default:return"This file couldn't be loaded."}}function J(e){switch(e){case"saving":return"Saving…";case"saved":return"Saved";case"error":return"Couldn't save";default:return null}}function Z({content:e,documentId:a}){const f=A(),i=P(s=>s.selectedCwd),C=P(s=>s.setDocumentEditing),{theme:n}=B(),{data:l,error:c,isLoading:v}=D({queryKey:b(i,e.sourcePath),enabled:i!==null,queryFn:()=>f.readFileContent(i,e.sourcePath),staleTime:3e4,retry:!1}),[d,p]=r.useState(null),x=s=>{p(s&&l?{pinnedHash:l.hash}:null)};if(i===null)return t.jsx(_,{children:"Open a session to view files."});if(v)return t.jsx(_,{children:"Loading file…"});if(c||!l)return t.jsx(_,{children:G(c)});const m=(d==null?void 0:d.pinnedHash)??l.hash;return t.jsx(W,{content:e,documentId:a,cwd:i,loaded:l.content,theme:n==="dark"?"dark":"light",isEditing:d!==null,onEditingChange:x,setDocumentEditing:C},`${e.sourcePath}:${m}`)}function W({content:e,documentId:a,cwd:f,loaded:i,theme:C,isEditing:n,onEditingChange:l,setDocumentEditing:c}){const v=e.readOnly!==!0,d=Y(e.sourcePath,e.language),p=M(),[x,m]=r.useState(i),s=Q({sourcePath:e.sourcePath,cwd:f,loadedContent:i}),o=r.useRef(null),h=r.useRef(x),j=r.useRef(s.save),T=r.useRef(l);r.useEffect(()=>{h.current=x,j.current=s.save,T.current=l});const k=r.useCallback(u=>{m(u),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,j.current(h.current)},U)},[]),z=()=>{m(i),l(!0),c(a,!0)},O=async()=>{o.current&&(clearTimeout(o.current),o.current=null);const u=await j.current(h.current);if(u==="conflict"||u==="error")return;const g=s.getConfirmedBase();g.hash!==null&&g.content===h.current&&p.setQueryData(b(f,e.sourcePath),N=>N&&{...N,content:g.content,hash:g.hash}),l(!1),c(a,!1)},L=()=>{p.invalidateQueries({queryKey:b(f,e.sourcePath)})};r.useEffect(()=>()=>{o.current&&(clearTimeout(o.current),j.current(h.current)),c(a,!1),T.current(!1)},[a,c]);const S=()=>{const u=s.adoptDisk();u!=null&&m(u)},F=()=>{s.overwrite(h.current)},R=J(s.status),w=n?x:i;return t.jsxs("div",{className:"relative flex h-full flex-col",children:[t.jsxs("div",{className:"sticky top-0 z-10 flex h-0 items-start justify-end gap-2 pr-2",children:[v&&R&&t.jsx("span",{className:q("mt-3 text-xs",s.status==="error"?"text-destructive":"text-muted-foreground"),"aria-live":"polite",children:R}),!n&&t.jsx(y,{type:"button",variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-foreground mt-2",onClick:L,"aria-label":"Refresh from disk",children:t.jsx(H,{className:"size-4"})}),v&&t.jsx(y,{type:"button",variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-foreground mt-2",onClick:n?()=>void O():z,"aria-label":n?"Finish editing":"Edit file",children:n?t.jsx(K,{className:"size-4"}):t.jsx(V,{className:"size-4"})})]}),s.status==="conflict"&&t.jsxs("div",{className:"bg-destructive/10 text-destructive mx-2 mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 rounded-md px-3 py-2 text-sm",children:[t.jsx("span",{className:"flex-1",children:"This file changed on disk since you opened it."}),t.jsx(y,{type:"button",variant:"ghost",size:"sm",className:"h-7",onClick:S,children:"Reload"}),t.jsx(y,{type:"button",variant:"destructive",size:"sm",className:"h-7",onClick:F,children:"Overwrite"})]}),t.jsx("div",{className:"min-h-0 flex-1",children:t.jsx(r.Suspense,{fallback:t.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading editor…"}),children:d?t.jsx("div",{className:"px-2 pb-6",children:t.jsx(I,{value:w,editable:n,onChange:n?k:void 0})}):t.jsx($,{value:w,editable:n,filename:e.sourcePath,languageHint:e.language,theme:C,onChange:n?k:void 0})})})]})}function _({children:e}){return t.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:t.jsx("p",{children:e})})}export{Z as CanvasFileContent};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeMirrorEditor-C-gkWN8h.js","assets/index-BZYDK9c8.js","assets/index-Dd6aLZxO.css","assets/index-BT9yFVeS.js","assets/BlintzCanvas-BC2wvdMT.js","assets/BlintzCanvas-CLCIbR7o.css"])))=>i.map(i=>d[i]);
2
+ import{c as A,f as P,h as B,i as D,r,j as t,d as M,k as Q,l as q,B as y,m as H,C as K,P as V,_ as E}from"./index-BZYDK9c8.js";const $=r.lazy(()=>E(()=>import("./CodeMirrorEditor-C-gkWN8h.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.CodeMirrorEditor}))),I=r.lazy(()=>E(()=>import("./BlintzCanvas-BC2wvdMT.js"),__vite__mapDeps([4,1,2,3,5])).then(e=>({default:e.BlintzCanvas}))),U=500;function b(e,a){return["canvas-file",e,a]}function Y(e,a){return a==="markdown"||/\.(md|markdown|mdx)$/i.test(e)}function G(e){switch(e==null?void 0:e.code){case"NOT_FOUND":return"This file doesn't exist.";case"NOT_A_FILE":return"This path is a directory, not a file.";case"TOO_LARGE":return"This file is too large to open here.";case"BINARY_FILE":return"This file isn't text and can't be shown in the editor.";default:return"This file couldn't be loaded."}}function J(e){switch(e){case"saving":return"Saving…";case"saved":return"Saved";case"error":return"Couldn't save";default:return null}}function Z({content:e,documentId:a}){const f=A(),i=P(s=>s.selectedCwd),C=P(s=>s.setDocumentEditing),{theme:n}=B(),{data:l,error:c,isLoading:v}=D({queryKey:b(i,e.sourcePath),enabled:i!==null,queryFn:()=>f.readFileContent(i,e.sourcePath),staleTime:3e4,retry:!1}),[d,p]=r.useState(null),x=s=>{p(s&&l?{pinnedHash:l.hash}:null)};if(i===null)return t.jsx(_,{children:"Open a session to view files."});if(v)return t.jsx(_,{children:"Loading file…"});if(c||!l)return t.jsx(_,{children:G(c)});const m=(d==null?void 0:d.pinnedHash)??l.hash;return t.jsx(W,{content:e,documentId:a,cwd:i,loaded:l.content,theme:n==="dark"?"dark":"light",isEditing:d!==null,onEditingChange:x,setDocumentEditing:C},`${e.sourcePath}:${m}`)}function W({content:e,documentId:a,cwd:f,loaded:i,theme:C,isEditing:n,onEditingChange:l,setDocumentEditing:c}){const v=e.readOnly!==!0,d=Y(e.sourcePath,e.language),p=M(),[x,m]=r.useState(i),s=Q({sourcePath:e.sourcePath,cwd:f,loadedContent:i}),o=r.useRef(null),h=r.useRef(x),j=r.useRef(s.save),T=r.useRef(l);r.useEffect(()=>{h.current=x,j.current=s.save,T.current=l});const k=r.useCallback(u=>{m(u),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,j.current(h.current)},U)},[]),z=()=>{m(i),l(!0),c(a,!0)},O=async()=>{o.current&&(clearTimeout(o.current),o.current=null);const u=await j.current(h.current);if(u==="conflict"||u==="error")return;const g=s.getConfirmedBase();g.hash!==null&&g.content===h.current&&p.setQueryData(b(f,e.sourcePath),N=>N&&{...N,content:g.content,hash:g.hash}),l(!1),c(a,!1)},L=()=>{p.invalidateQueries({queryKey:b(f,e.sourcePath)})};r.useEffect(()=>()=>{o.current&&(clearTimeout(o.current),j.current(h.current)),c(a,!1),T.current(!1)},[a,c]);const S=()=>{const u=s.adoptDisk();u!=null&&m(u)},F=()=>{s.overwrite(h.current)},R=J(s.status),w=n?x:i;return t.jsxs("div",{className:"relative flex h-full flex-col",children:[t.jsxs("div",{className:"sticky top-0 z-10 flex h-0 items-start justify-end gap-2 pr-2",children:[v&&R&&t.jsx("span",{className:q("mt-3 text-xs",s.status==="error"?"text-destructive":"text-muted-foreground"),"aria-live":"polite",children:R}),!n&&t.jsx(y,{type:"button",variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-foreground mt-2",onClick:L,"aria-label":"Refresh from disk",children:t.jsx(H,{className:"size-4"})}),v&&t.jsx(y,{type:"button",variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-foreground mt-2",onClick:n?()=>void O():z,"aria-label":n?"Finish editing":"Edit file",children:n?t.jsx(K,{className:"size-4"}):t.jsx(V,{className:"size-4"})})]}),s.status==="conflict"&&t.jsxs("div",{className:"bg-destructive/10 text-destructive mx-2 mt-2 flex flex-wrap items-center gap-x-3 gap-y-1 rounded-md px-3 py-2 text-sm",children:[t.jsx("span",{className:"flex-1",children:"This file changed on disk since you opened it."}),t.jsx(y,{type:"button",variant:"ghost",size:"sm",className:"h-7",onClick:S,children:"Reload"}),t.jsx(y,{type:"button",variant:"destructive",size:"sm",className:"h-7",onClick:F,children:"Overwrite"})]}),t.jsx("div",{className:"min-h-0 flex-1",children:t.jsx(r.Suspense,{fallback:t.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading editor…"}),children:d?t.jsx("div",{className:"px-2 pb-6",children:t.jsx(I,{value:w,editable:n,onChange:n?k:void 0})}):t.jsx($,{value:w,editable:n,filename:e.sourcePath,languageHint:e.language,theme:C,onChange:n?k:void 0})})})]})}function _({children:e}){return t.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:t.jsx("p",{children:e})})}export{Z as CanvasFileContent};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Model3dViewer-qR1sbYAL.js","assets/index-sKKm7yEm.js","assets/index-Dd6aLZxO.css"])))=>i.map(i=>d[i]);
2
- import{c as d,f as i,r as l,j as s,_ as u}from"./index-sKKm7yEm.js";import{r as c}from"./fetch-src-4Qlrf9qq.js";const f=l.lazy(()=>u(()=>import("./Model3dViewer-qR1sbYAL.js"),__vite__mapDeps([0,1,2])).then(e=>({default:e.Model3dViewer})));function m(e){var t;const r=(t=e.split(".").pop())==null?void 0:t.toLowerCase();return r==="glb"||r==="gltf"?"gltf":r==="stl"?"stl":r==="obj"?"obj":null}function h({content:e}){const r=d(),t=i(o=>o.selectedCwd),a=l.useMemo(()=>c(e.src,o=>r.mediaUrl(t??"",o)),[e.src,r,t]),n=l.useMemo(()=>m(e.src),[e.src]);return a.url===null||n===null?s.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:s.jsx("p",{children:"This 3D model can’t be displayed here."})}):s.jsx("div",{className:"bg-muted/40 h-full w-full",children:s.jsx(l.Suspense,{fallback:s.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading 3D viewer…"}),children:s.jsx(f,{url:a.url,format:n,label:e.title??"Canvas 3D model"})})})}export{h as CanvasModel3dContent};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Model3dViewer-D6VCAF61.js","assets/index-BNSNg7yH.js","assets/index-Dd6aLZxO.css"])))=>i.map(i=>d[i]);
2
+ import{c as d,f as i,r as l,j as s,_ as u}from"./index-BNSNg7yH.js";import{r as c}from"./fetch-src-4Qlrf9qq.js";const f=l.lazy(()=>u(()=>import("./Model3dViewer-D6VCAF61.js"),__vite__mapDeps([0,1,2])).then(e=>({default:e.Model3dViewer})));function m(e){var t;const r=(t=e.split(".").pop())==null?void 0:t.toLowerCase();return r==="glb"||r==="gltf"?"gltf":r==="stl"?"stl":r==="obj"?"obj":null}function h({content:e}){const r=d(),t=i(o=>o.selectedCwd),a=l.useMemo(()=>c(e.src,o=>r.mediaUrl(t??"",o)),[e.src,r,t]),n=l.useMemo(()=>m(e.src),[e.src]);return a.url===null||n===null?s.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:s.jsx("p",{children:"This 3D model can’t be displayed here."})}):s.jsx("div",{className:"bg-muted/40 h-full w-full",children:s.jsx(l.Suspense,{fallback:s.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading 3D viewer…"}),children:s.jsx(f,{url:a.url,format:n,label:e.title??"Canvas 3D model"})})})}export{h as CanvasModel3dContent};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Model3dViewer-K9pNJx1c.js","assets/index-BZYDK9c8.js","assets/index-Dd6aLZxO.css"])))=>i.map(i=>d[i]);
2
+ import{c as d,f as i,r as l,j as s,_ as u}from"./index-BZYDK9c8.js";import{r as c}from"./fetch-src-4Qlrf9qq.js";const f=l.lazy(()=>u(()=>import("./Model3dViewer-K9pNJx1c.js"),__vite__mapDeps([0,1,2])).then(e=>({default:e.Model3dViewer})));function m(e){var t;const r=(t=e.split(".").pop())==null?void 0:t.toLowerCase();return r==="glb"||r==="gltf"?"gltf":r==="stl"?"stl":r==="obj"?"obj":null}function h({content:e}){const r=d(),t=i(o=>o.selectedCwd),a=l.useMemo(()=>c(e.src,o=>r.mediaUrl(t??"",o)),[e.src,r,t]),n=l.useMemo(()=>m(e.src),[e.src]);return a.url===null||n===null?s.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-8 text-center",children:s.jsx("p",{children:"This 3D model can’t be displayed here."})}):s.jsx("div",{className:"bg-muted/40 h-full w-full",children:s.jsx(l.Suspense,{fallback:s.jsx("div",{className:"text-muted-foreground p-4 text-sm",children:"Loading 3D viewer…"}),children:s.jsx(f,{url:a.url,format:n,label:e.title??"Canvas 3D model"})})})}export{h as CanvasModel3dContent};
@@ -1 +1 @@
1
- import{r as l,j as ue}from"./index-sKKm7yEm.js";import{K as ve,M as Se,O as be,Q as ye,R as xe,S as pe,U as Ee,V as Ce,W as _e,X as ke,Y as Te,Z as Oe,_ as $e,$ as Le,F as J,a0 as We,a1 as Me,a2 as Ke,a3 as Ne,a4 as De,a5 as we,a6 as He,a7 as Ae,a8 as Be,A as Ie,y as fe,a9 as je,E as b,aa as Ue,ab as Fe,ac as ze,ad as Ge,ae as Re,H as ne,af as re}from"./index-CCHYQVhi.js";function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},ee.apply(null,arguments)}function Pe(e,t){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)!==-1)continue;i[s]=e[s]}return i}var le=function(t){t===void 0&&(t={});var i=t,s=i.crosshairCursor,c=s===void 0?!1:s,n=[];t.closeBracketsKeymap!==!1&&(n=n.concat(ve)),t.defaultKeymap!==!1&&(n=n.concat(Se)),t.searchKeymap!==!1&&(n=n.concat(be)),t.historyKeymap!==!1&&(n=n.concat(ye)),t.foldKeymap!==!1&&(n=n.concat(xe)),t.completionKeymap!==!1&&(n=n.concat(pe)),t.lintKeymap!==!1&&(n=n.concat(Ee));var a=[];return t.lineNumbers!==!1&&a.push(Ce()),t.highlightActiveLineGutter!==!1&&a.push(_e()),t.highlightSpecialChars!==!1&&a.push(ke()),t.history!==!1&&a.push(Te()),t.foldGutter!==!1&&a.push(Oe()),t.drawSelection!==!1&&a.push($e()),t.dropCursor!==!1&&a.push(Le()),t.allowMultipleSelections!==!1&&a.push(J.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&a.push(We()),t.syntaxHighlighting!==!1&&a.push(Me(je,{fallback:!0})),t.bracketMatching!==!1&&a.push(Ke()),t.closeBrackets!==!1&&a.push(Ne()),t.autocompletion!==!1&&a.push(De()),t.rectangularSelection!==!1&&a.push(we()),c!==!1&&a.push(He()),t.highlightActiveLine!==!1&&a.push(Ae()),t.highlightSelectionMatches!==!1&&a.push(Be()),t.tabSize&&typeof t.tabSize=="number"&&a.push(Ie.of(" ".repeat(t.tabSize))),a.concat([fe.of(n.flat())]).filter(Boolean)},Ve=b.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Je=function(t){t===void 0&&(t={});var i=t,s=i.indentWithTab,c=s===void 0?!0:s,n=i.editable,a=n===void 0?!0:n,h=i.readOnly,u=h===void 0?!1:h,f=i.theme,v=f===void 0?"light":f,y=i.placeholder,x=y===void 0?"":y,S=i.basicSetup,d=S===void 0?!0:S,o=[];switch(c&&o.unshift(fe.of([Ue])),d&&(typeof d=="boolean"?o.unshift(le()):o.unshift(le(d))),x&&o.unshift(Fe(x)),v){case"light":o.push(Ve);break;case"dark":o.push(ze);break;case"none":break;default:o.push(v);break}return a===!1&&o.push(b.editable.of(!1)),u&&o.push(J.readOnly.of(!0)),[...o]},Ye=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(t=>!t.empty)});class Qe{constructor(t,i){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=i,this.timeoutMS=i,this.callbacks.push(t)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var t=this.callbacks.slice();this.callbacks.length=0,t.forEach(i=>{try{i()}catch(s){console.error("TimeoutLatch callback error:",s)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class ce{constructor(){this.interval=null,this.latches=new Set}add(t){this.latches.add(t),this.start()}remove(t){this.latches.delete(t),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(t=>{t.tick(),t.isDone&&this.remove(t)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var Z=null,Xe=()=>typeof window>"u"?new ce:(Z||(Z=new ce),Z),Ze=b.theme({"& .cm-scroller":{height:"100% !important"}}),oe=null,q=null;function qe(e,t,i,s,c,n){if(!e&&!t&&!i&&!s&&!c&&!n)return null;var a=JSON.stringify({height:e,minHeight:t,maxHeight:i,width:s,minWidth:c,maxWidth:n});return a===oe||(oe=a,q=b.theme({"&":{height:e,minHeight:t,maxHeight:i,width:s,minWidth:c,maxWidth:n}})),q}var he=Re.define(),et=200,tt=[];function at(e){var t=e.value,i=e.selection,s=e.onChange,c=e.onStatistics,n=e.onCreateEditor,a=e.onUpdate,h=e.extensions,u=h===void 0?tt:h,f=e.autoFocus,v=e.theme,y=v===void 0?"light":v,x=e.height,S=x===void 0?null:x,d=e.minHeight,o=d===void 0?null:d,W=e.maxHeight,M=W===void 0?null:W,K=e.width,N=K===void 0?null:K,D=e.minWidth,w=D===void 0?null:D,H=e.maxWidth,A=H===void 0?null:H,B=e.placeholder,I=B===void 0?"":B,j=e.editable,U=j===void 0?!0:j,F=e.readOnly,k=F===void 0?!1:F,p=e.indentWithTab,T=p===void 0?!0:p,O=e.basicSetup,z=O===void 0?!0:O,G=e.root,$=e.initialState,R=l.useState(),E=R[0],te=R[1],ae=l.useState(),r=ae[0],P=ae[1],ie=l.useState(),Y=ie[0],Q=ie[1],m=l.useState(()=>({current:null}))[0],V=l.useState(()=>({current:null}))[0],se=qe(S,o,M,N,w,A),me=b.updateListener.of(g=>{if(g.docChanged&&typeof s=="function"&&!g.transactions.some(X=>X.annotation(he))){m.current?m.current.reset():(m.current=new Qe(()=>{if(V.current){var X=V.current;V.current=null,X()}m.current=null},et),Xe().add(m.current));var C=g.state.doc,_=C.toString();s(_,g)}c&&c(Ye(g))}),ge=Je({theme:y,editable:U,readOnly:k,placeholder:I,indentWithTab:T,basicSetup:z}),L=[me,...se?[se]:[],Ze,...ge];return a&&typeof a=="function"&&L.push(b.updateListener.of(a)),L=L.concat(u),l.useLayoutEffect(()=>{if(E&&!Y){var g={doc:t,selection:i,extensions:L},C=$?J.fromJSON($.json,g,$.fields):J.create(g);if(Q(C),!r){var _=new b({state:C,parent:E,root:G});P(_),n&&n(_,C)}}return()=>{r&&(Q(void 0),P(void 0))}},[E,Y]),l.useEffect(()=>{e.container&&te(e.container)},[e.container]),l.useEffect(()=>()=>{r&&(r.destroy(),P(void 0)),m.current&&(m.current.cancel(),m.current=null)},[r]),l.useEffect(()=>{f&&r&&r.focus()},[f,r]),l.useEffect(()=>{r&&r.dispatch({effects:Ge.reconfigure.of(L)})},[y,u,S,o,M,N,w,A,I,U,k,T,z,s,a]),l.useEffect(()=>{if(t!==void 0){var g=r?r.state.doc.toString():"";if(r&&t!==g){var C=m.current&&!m.current.isDone,_=()=>{r&&t!==r.state.doc.toString()&&r.dispatch({changes:{from:0,to:r.state.doc.toString().length,insert:t||""},annotations:[he.of(!0)]})};C?V.current=_:_()}}},[t,r]),{state:Y,setState:Q,view:r,setView:P,container:E,setContainer:te}}var it=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],de=l.forwardRef((e,t)=>{var i=e.className,s=e.value,c=s===void 0?"":s,n=e.selection,a=e.extensions,h=a===void 0?[]:a,u=e.onChange,f=e.onStatistics,v=e.onCreateEditor,y=e.onUpdate,x=e.autoFocus,S=e.theme,d=S===void 0?"light":S,o=e.height,W=e.minHeight,M=e.maxHeight,K=e.width,N=e.minWidth,D=e.maxWidth,w=e.basicSetup,H=e.placeholder,A=e.indentWithTab,B=e.editable,I=e.readOnly,j=e.root,U=e.initialState,F=Pe(e,it),k=l.useRef(null),p=at({root:j,value:c,autoFocus:x,theme:d,height:o,minHeight:W,maxHeight:M,width:K,minWidth:N,maxWidth:D,basicSetup:w,placeholder:H,indentWithTab:A,editable:B,readOnly:I,selection:n,onChange:u,onStatistics:f,onCreateEditor:v,onUpdate:y,extensions:h,initialState:U}),T=p.state,O=p.view,z=p.container,G=p.setContainer;l.useImperativeHandle(t,()=>({editor:k.current,state:T,view:O}),[k,z,T,O]);var $=l.useCallback(E=>{k.current=E,G(E)},[G]);if(typeof c!="string")throw new Error("value must be typeof string but got "+typeof c);var R=typeof d=="string"?"cm-theme-"+d:"cm-theme";return ue.jsx("div",ee({ref:$,className:""+R+(i?" "+i:"")},F))});de.displayName="CodeMirror";function rt({value:e,editable:t,filename:i,languageHint:s,theme:c,onChange:n}){const[a,h]=l.useState([]);return l.useEffect(()=>{let u=!1;const f=s?ne.matchLanguageName(re,s,!0):ne.matchFilename(re,i);if(!f){h([]);return}return f.load().then(v=>{u||h([v])}).catch(()=>{u||h([])}),()=>{u=!0}},[i,s]),ue.jsx(de,{value:e,editable:t,readOnly:!t,onChange:n,theme:c,height:"100%",className:"h-full text-sm",extensions:[b.lineWrapping,...a],basicSetup:{highlightActiveLine:t,highlightActiveLineGutter:t}})}export{rt as CodeMirrorEditor};
1
+ import{r as l,j as ue}from"./index-BZYDK9c8.js";import{K as ve,M as Se,O as be,Q as ye,R as xe,S as pe,U as Ee,V as Ce,W as _e,X as ke,Y as Te,Z as Oe,_ as $e,$ as Le,F as J,a0 as We,a1 as Me,a2 as Ke,a3 as Ne,a4 as De,a5 as we,a6 as He,a7 as Ae,a8 as Be,A as Ie,y as fe,a9 as je,E as b,aa as Ue,ab as Fe,ac as ze,ad as Ge,ae as Re,H as ne,af as re}from"./index-BT9yFVeS.js";function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},ee.apply(null,arguments)}function Pe(e,t){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)!==-1)continue;i[s]=e[s]}return i}var le=function(t){t===void 0&&(t={});var i=t,s=i.crosshairCursor,c=s===void 0?!1:s,n=[];t.closeBracketsKeymap!==!1&&(n=n.concat(ve)),t.defaultKeymap!==!1&&(n=n.concat(Se)),t.searchKeymap!==!1&&(n=n.concat(be)),t.historyKeymap!==!1&&(n=n.concat(ye)),t.foldKeymap!==!1&&(n=n.concat(xe)),t.completionKeymap!==!1&&(n=n.concat(pe)),t.lintKeymap!==!1&&(n=n.concat(Ee));var a=[];return t.lineNumbers!==!1&&a.push(Ce()),t.highlightActiveLineGutter!==!1&&a.push(_e()),t.highlightSpecialChars!==!1&&a.push(ke()),t.history!==!1&&a.push(Te()),t.foldGutter!==!1&&a.push(Oe()),t.drawSelection!==!1&&a.push($e()),t.dropCursor!==!1&&a.push(Le()),t.allowMultipleSelections!==!1&&a.push(J.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&a.push(We()),t.syntaxHighlighting!==!1&&a.push(Me(je,{fallback:!0})),t.bracketMatching!==!1&&a.push(Ke()),t.closeBrackets!==!1&&a.push(Ne()),t.autocompletion!==!1&&a.push(De()),t.rectangularSelection!==!1&&a.push(we()),c!==!1&&a.push(He()),t.highlightActiveLine!==!1&&a.push(Ae()),t.highlightSelectionMatches!==!1&&a.push(Be()),t.tabSize&&typeof t.tabSize=="number"&&a.push(Ie.of(" ".repeat(t.tabSize))),a.concat([fe.of(n.flat())]).filter(Boolean)},Ve=b.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Je=function(t){t===void 0&&(t={});var i=t,s=i.indentWithTab,c=s===void 0?!0:s,n=i.editable,a=n===void 0?!0:n,h=i.readOnly,u=h===void 0?!1:h,f=i.theme,v=f===void 0?"light":f,y=i.placeholder,x=y===void 0?"":y,S=i.basicSetup,d=S===void 0?!0:S,o=[];switch(c&&o.unshift(fe.of([Ue])),d&&(typeof d=="boolean"?o.unshift(le()):o.unshift(le(d))),x&&o.unshift(Fe(x)),v){case"light":o.push(Ve);break;case"dark":o.push(ze);break;case"none":break;default:o.push(v);break}return a===!1&&o.push(b.editable.of(!1)),u&&o.push(J.readOnly.of(!0)),[...o]},Ye=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(t=>!t.empty)});class Qe{constructor(t,i){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=i,this.timeoutMS=i,this.callbacks.push(t)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var t=this.callbacks.slice();this.callbacks.length=0,t.forEach(i=>{try{i()}catch(s){console.error("TimeoutLatch callback error:",s)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class ce{constructor(){this.interval=null,this.latches=new Set}add(t){this.latches.add(t),this.start()}remove(t){this.latches.delete(t),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(t=>{t.tick(),t.isDone&&this.remove(t)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var Z=null,Xe=()=>typeof window>"u"?new ce:(Z||(Z=new ce),Z),Ze=b.theme({"& .cm-scroller":{height:"100% !important"}}),oe=null,q=null;function qe(e,t,i,s,c,n){if(!e&&!t&&!i&&!s&&!c&&!n)return null;var a=JSON.stringify({height:e,minHeight:t,maxHeight:i,width:s,minWidth:c,maxWidth:n});return a===oe||(oe=a,q=b.theme({"&":{height:e,minHeight:t,maxHeight:i,width:s,minWidth:c,maxWidth:n}})),q}var he=Re.define(),et=200,tt=[];function at(e){var t=e.value,i=e.selection,s=e.onChange,c=e.onStatistics,n=e.onCreateEditor,a=e.onUpdate,h=e.extensions,u=h===void 0?tt:h,f=e.autoFocus,v=e.theme,y=v===void 0?"light":v,x=e.height,S=x===void 0?null:x,d=e.minHeight,o=d===void 0?null:d,W=e.maxHeight,M=W===void 0?null:W,K=e.width,N=K===void 0?null:K,D=e.minWidth,w=D===void 0?null:D,H=e.maxWidth,A=H===void 0?null:H,B=e.placeholder,I=B===void 0?"":B,j=e.editable,U=j===void 0?!0:j,F=e.readOnly,k=F===void 0?!1:F,p=e.indentWithTab,T=p===void 0?!0:p,O=e.basicSetup,z=O===void 0?!0:O,G=e.root,$=e.initialState,R=l.useState(),E=R[0],te=R[1],ae=l.useState(),r=ae[0],P=ae[1],ie=l.useState(),Y=ie[0],Q=ie[1],m=l.useState(()=>({current:null}))[0],V=l.useState(()=>({current:null}))[0],se=qe(S,o,M,N,w,A),me=b.updateListener.of(g=>{if(g.docChanged&&typeof s=="function"&&!g.transactions.some(X=>X.annotation(he))){m.current?m.current.reset():(m.current=new Qe(()=>{if(V.current){var X=V.current;V.current=null,X()}m.current=null},et),Xe().add(m.current));var C=g.state.doc,_=C.toString();s(_,g)}c&&c(Ye(g))}),ge=Je({theme:y,editable:U,readOnly:k,placeholder:I,indentWithTab:T,basicSetup:z}),L=[me,...se?[se]:[],Ze,...ge];return a&&typeof a=="function"&&L.push(b.updateListener.of(a)),L=L.concat(u),l.useLayoutEffect(()=>{if(E&&!Y){var g={doc:t,selection:i,extensions:L},C=$?J.fromJSON($.json,g,$.fields):J.create(g);if(Q(C),!r){var _=new b({state:C,parent:E,root:G});P(_),n&&n(_,C)}}return()=>{r&&(Q(void 0),P(void 0))}},[E,Y]),l.useEffect(()=>{e.container&&te(e.container)},[e.container]),l.useEffect(()=>()=>{r&&(r.destroy(),P(void 0)),m.current&&(m.current.cancel(),m.current=null)},[r]),l.useEffect(()=>{f&&r&&r.focus()},[f,r]),l.useEffect(()=>{r&&r.dispatch({effects:Ge.reconfigure.of(L)})},[y,u,S,o,M,N,w,A,I,U,k,T,z,s,a]),l.useEffect(()=>{if(t!==void 0){var g=r?r.state.doc.toString():"";if(r&&t!==g){var C=m.current&&!m.current.isDone,_=()=>{r&&t!==r.state.doc.toString()&&r.dispatch({changes:{from:0,to:r.state.doc.toString().length,insert:t||""},annotations:[he.of(!0)]})};C?V.current=_:_()}}},[t,r]),{state:Y,setState:Q,view:r,setView:P,container:E,setContainer:te}}var it=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],de=l.forwardRef((e,t)=>{var i=e.className,s=e.value,c=s===void 0?"":s,n=e.selection,a=e.extensions,h=a===void 0?[]:a,u=e.onChange,f=e.onStatistics,v=e.onCreateEditor,y=e.onUpdate,x=e.autoFocus,S=e.theme,d=S===void 0?"light":S,o=e.height,W=e.minHeight,M=e.maxHeight,K=e.width,N=e.minWidth,D=e.maxWidth,w=e.basicSetup,H=e.placeholder,A=e.indentWithTab,B=e.editable,I=e.readOnly,j=e.root,U=e.initialState,F=Pe(e,it),k=l.useRef(null),p=at({root:j,value:c,autoFocus:x,theme:d,height:o,minHeight:W,maxHeight:M,width:K,minWidth:N,maxWidth:D,basicSetup:w,placeholder:H,indentWithTab:A,editable:B,readOnly:I,selection:n,onChange:u,onStatistics:f,onCreateEditor:v,onUpdate:y,extensions:h,initialState:U}),T=p.state,O=p.view,z=p.container,G=p.setContainer;l.useImperativeHandle(t,()=>({editor:k.current,state:T,view:O}),[k,z,T,O]);var $=l.useCallback(E=>{k.current=E,G(E)},[G]);if(typeof c!="string")throw new Error("value must be typeof string but got "+typeof c);var R=typeof d=="string"?"cm-theme-"+d:"cm-theme";return ue.jsx("div",ee({ref:$,className:""+R+(i?" "+i:"")},F))});de.displayName="CodeMirror";function rt({value:e,editable:t,filename:i,languageHint:s,theme:c,onChange:n}){const[a,h]=l.useState([]);return l.useEffect(()=>{let u=!1;const f=s?ne.matchLanguageName(re,s,!0):ne.matchFilename(re,i);if(!f){h([]);return}return f.load().then(v=>{u||h([v])}).catch(()=>{u||h([])}),()=>{u=!0}},[i,s]),ue.jsx(de,{value:e,editable:t,readOnly:!t,onChange:n,theme:c,height:"100%",className:"h-full text-sm",extensions:[b.lineWrapping,...a],basicSetup:{highlightActiveLine:t,highlightActiveLineGutter:t}})}export{rt as CodeMirrorEditor};
@@ -0,0 +1 @@
1
+ import{r as l,j as ue}from"./index-BNSNg7yH.js";import{K as ve,M as Se,O as be,Q as ye,R as xe,S as pe,U as Ee,V as Ce,W as _e,X as ke,Y as Te,Z as Oe,_ as $e,$ as Le,F as J,a0 as We,a1 as Me,a2 as Ke,a3 as Ne,a4 as De,a5 as we,a6 as He,a7 as Ae,a8 as Be,A as Ie,y as fe,a9 as je,E as b,aa as Ue,ab as Fe,ac as ze,ad as Ge,ae as Re,H as ne,af as re}from"./index-CdAooMjU.js";function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},ee.apply(null,arguments)}function Pe(e,t){if(e==null)return{};var i={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)!==-1)continue;i[s]=e[s]}return i}var le=function(t){t===void 0&&(t={});var i=t,s=i.crosshairCursor,c=s===void 0?!1:s,n=[];t.closeBracketsKeymap!==!1&&(n=n.concat(ve)),t.defaultKeymap!==!1&&(n=n.concat(Se)),t.searchKeymap!==!1&&(n=n.concat(be)),t.historyKeymap!==!1&&(n=n.concat(ye)),t.foldKeymap!==!1&&(n=n.concat(xe)),t.completionKeymap!==!1&&(n=n.concat(pe)),t.lintKeymap!==!1&&(n=n.concat(Ee));var a=[];return t.lineNumbers!==!1&&a.push(Ce()),t.highlightActiveLineGutter!==!1&&a.push(_e()),t.highlightSpecialChars!==!1&&a.push(ke()),t.history!==!1&&a.push(Te()),t.foldGutter!==!1&&a.push(Oe()),t.drawSelection!==!1&&a.push($e()),t.dropCursor!==!1&&a.push(Le()),t.allowMultipleSelections!==!1&&a.push(J.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&a.push(We()),t.syntaxHighlighting!==!1&&a.push(Me(je,{fallback:!0})),t.bracketMatching!==!1&&a.push(Ke()),t.closeBrackets!==!1&&a.push(Ne()),t.autocompletion!==!1&&a.push(De()),t.rectangularSelection!==!1&&a.push(we()),c!==!1&&a.push(He()),t.highlightActiveLine!==!1&&a.push(Ae()),t.highlightSelectionMatches!==!1&&a.push(Be()),t.tabSize&&typeof t.tabSize=="number"&&a.push(Ie.of(" ".repeat(t.tabSize))),a.concat([fe.of(n.flat())]).filter(Boolean)},Ve=b.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),Je=function(t){t===void 0&&(t={});var i=t,s=i.indentWithTab,c=s===void 0?!0:s,n=i.editable,a=n===void 0?!0:n,h=i.readOnly,u=h===void 0?!1:h,f=i.theme,v=f===void 0?"light":f,y=i.placeholder,x=y===void 0?"":y,S=i.basicSetup,d=S===void 0?!0:S,o=[];switch(c&&o.unshift(fe.of([Ue])),d&&(typeof d=="boolean"?o.unshift(le()):o.unshift(le(d))),x&&o.unshift(Fe(x)),v){case"light":o.push(Ve);break;case"dark":o.push(ze);break;case"none":break;default:o.push(v);break}return a===!1&&o.push(b.editable.of(!1)),u&&o.push(J.readOnly.of(!0)),[...o]},Ye=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(t=>!t.empty)});class Qe{constructor(t,i){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=i,this.timeoutMS=i,this.callbacks.push(t)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var t=this.callbacks.slice();this.callbacks.length=0,t.forEach(i=>{try{i()}catch(s){console.error("TimeoutLatch callback error:",s)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class ce{constructor(){this.interval=null,this.latches=new Set}add(t){this.latches.add(t),this.start()}remove(t){this.latches.delete(t),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(t=>{t.tick(),t.isDone&&this.remove(t)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var Z=null,Xe=()=>typeof window>"u"?new ce:(Z||(Z=new ce),Z),Ze=b.theme({"& .cm-scroller":{height:"100% !important"}}),oe=null,q=null;function qe(e,t,i,s,c,n){if(!e&&!t&&!i&&!s&&!c&&!n)return null;var a=JSON.stringify({height:e,minHeight:t,maxHeight:i,width:s,minWidth:c,maxWidth:n});return a===oe||(oe=a,q=b.theme({"&":{height:e,minHeight:t,maxHeight:i,width:s,minWidth:c,maxWidth:n}})),q}var he=Re.define(),et=200,tt=[];function at(e){var t=e.value,i=e.selection,s=e.onChange,c=e.onStatistics,n=e.onCreateEditor,a=e.onUpdate,h=e.extensions,u=h===void 0?tt:h,f=e.autoFocus,v=e.theme,y=v===void 0?"light":v,x=e.height,S=x===void 0?null:x,d=e.minHeight,o=d===void 0?null:d,W=e.maxHeight,M=W===void 0?null:W,K=e.width,N=K===void 0?null:K,D=e.minWidth,w=D===void 0?null:D,H=e.maxWidth,A=H===void 0?null:H,B=e.placeholder,I=B===void 0?"":B,j=e.editable,U=j===void 0?!0:j,F=e.readOnly,k=F===void 0?!1:F,p=e.indentWithTab,T=p===void 0?!0:p,O=e.basicSetup,z=O===void 0?!0:O,G=e.root,$=e.initialState,R=l.useState(),E=R[0],te=R[1],ae=l.useState(),r=ae[0],P=ae[1],ie=l.useState(),Y=ie[0],Q=ie[1],m=l.useState(()=>({current:null}))[0],V=l.useState(()=>({current:null}))[0],se=qe(S,o,M,N,w,A),me=b.updateListener.of(g=>{if(g.docChanged&&typeof s=="function"&&!g.transactions.some(X=>X.annotation(he))){m.current?m.current.reset():(m.current=new Qe(()=>{if(V.current){var X=V.current;V.current=null,X()}m.current=null},et),Xe().add(m.current));var C=g.state.doc,_=C.toString();s(_,g)}c&&c(Ye(g))}),ge=Je({theme:y,editable:U,readOnly:k,placeholder:I,indentWithTab:T,basicSetup:z}),L=[me,...se?[se]:[],Ze,...ge];return a&&typeof a=="function"&&L.push(b.updateListener.of(a)),L=L.concat(u),l.useLayoutEffect(()=>{if(E&&!Y){var g={doc:t,selection:i,extensions:L},C=$?J.fromJSON($.json,g,$.fields):J.create(g);if(Q(C),!r){var _=new b({state:C,parent:E,root:G});P(_),n&&n(_,C)}}return()=>{r&&(Q(void 0),P(void 0))}},[E,Y]),l.useEffect(()=>{e.container&&te(e.container)},[e.container]),l.useEffect(()=>()=>{r&&(r.destroy(),P(void 0)),m.current&&(m.current.cancel(),m.current=null)},[r]),l.useEffect(()=>{f&&r&&r.focus()},[f,r]),l.useEffect(()=>{r&&r.dispatch({effects:Ge.reconfigure.of(L)})},[y,u,S,o,M,N,w,A,I,U,k,T,z,s,a]),l.useEffect(()=>{if(t!==void 0){var g=r?r.state.doc.toString():"";if(r&&t!==g){var C=m.current&&!m.current.isDone,_=()=>{r&&t!==r.state.doc.toString()&&r.dispatch({changes:{from:0,to:r.state.doc.toString().length,insert:t||""},annotations:[he.of(!0)]})};C?V.current=_:_()}}},[t,r]),{state:Y,setState:Q,view:r,setView:P,container:E,setContainer:te}}var it=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],de=l.forwardRef((e,t)=>{var i=e.className,s=e.value,c=s===void 0?"":s,n=e.selection,a=e.extensions,h=a===void 0?[]:a,u=e.onChange,f=e.onStatistics,v=e.onCreateEditor,y=e.onUpdate,x=e.autoFocus,S=e.theme,d=S===void 0?"light":S,o=e.height,W=e.minHeight,M=e.maxHeight,K=e.width,N=e.minWidth,D=e.maxWidth,w=e.basicSetup,H=e.placeholder,A=e.indentWithTab,B=e.editable,I=e.readOnly,j=e.root,U=e.initialState,F=Pe(e,it),k=l.useRef(null),p=at({root:j,value:c,autoFocus:x,theme:d,height:o,minHeight:W,maxHeight:M,width:K,minWidth:N,maxWidth:D,basicSetup:w,placeholder:H,indentWithTab:A,editable:B,readOnly:I,selection:n,onChange:u,onStatistics:f,onCreateEditor:v,onUpdate:y,extensions:h,initialState:U}),T=p.state,O=p.view,z=p.container,G=p.setContainer;l.useImperativeHandle(t,()=>({editor:k.current,state:T,view:O}),[k,z,T,O]);var $=l.useCallback(E=>{k.current=E,G(E)},[G]);if(typeof c!="string")throw new Error("value must be typeof string but got "+typeof c);var R=typeof d=="string"?"cm-theme-"+d:"cm-theme";return ue.jsx("div",ee({ref:$,className:""+R+(i?" "+i:"")},F))});de.displayName="CodeMirror";function rt({value:e,editable:t,filename:i,languageHint:s,theme:c,onChange:n}){const[a,h]=l.useState([]);return l.useEffect(()=>{let u=!1;const f=s?ne.matchLanguageName(re,s,!0):ne.matchFilename(re,i);if(!f){h([]);return}return f.load().then(v=>{u||h([v])}).catch(()=>{u||h([])}),()=>{u=!0}},[i,s]),ue.jsx(de,{value:e,editable:t,readOnly:!t,onChange:n,theme:c,height:"100%",className:"h-full text-sm",extensions:[b.lineWrapping,...a],basicSetup:{highlightActiveLine:t,highlightActiveLineGutter:t}})}export{rt as CodeMirrorEditor};
@@ -1,4 +1,4 @@
1
- import{ag as ge,r as t,c as fe,aE as je,j as e,Z as L,$,aF as te,aG as ne,w as ae,l as R,aH as P,aI as I,s as re,ab as ie,aJ as U,aK as be,B as D,aL as ve,aM as ye,a1 as Ne,aN as oe,aO as le,aP as ce,aQ as de,aR as z,aS as ue,aT as Ce,aU as Te,aV as V,aW as K,v as Z,a3 as ke,a4 as Se,a5 as we,aX as Ie,aY as Re,aZ as Ae,a_ as Ee,a$ as M,al as De,b0 as Be,b1 as G,b2 as Pe,as as ze,at as _e,au as Fe,av as Me,aw as Oe,ax as Le,ay as $e,az as Ke,b3 as He,b4 as We,b5 as Ve,b6 as me,b7 as qe,b8 as Xe,U as Ue,b9 as Ze,ba as Ge,bb as Ye,bc as Je,bd as Qe,f as es,t as T,be as ss,bf as ts,bg as ns,bh as as,bi as q,u as rs,bj as is,bk as os,an as ls,bl as cs,bm as ds,a2 as us,bn as ms}from"./index-sKKm7yEm.js";/**
1
+ import{ag as ge,r as t,c as fe,aE as je,j as e,Z as L,$,aF as te,aG as ne,w as ae,l as R,aH as P,aI as I,s as re,ab as ie,aJ as U,aK as be,B as D,aL as ve,aM as ye,a1 as Ne,aN as oe,aO as le,aP as ce,aQ as de,aR as z,aS as ue,aT as Ce,aU as Te,aV as V,aW as K,v as Z,a3 as ke,a4 as Se,a5 as we,aX as Ie,aY as Re,aZ as Ae,a_ as Ee,a$ as M,al as De,b0 as Be,b1 as G,b2 as Pe,as as ze,at as _e,au as Fe,av as Me,aw as Oe,ax as Le,ay as $e,az as Ke,b3 as He,b4 as We,b5 as Ve,b6 as me,b7 as qe,b8 as Xe,U as Ue,b9 as Ze,ba as Ge,bb as Ye,bc as Je,bd as Qe,f as es,t as T,be as ss,bf as ts,bg as ns,bh as as,bi as q,u as rs,bj as is,bk as os,an as ls,bl as cs,bm as ds,a2 as us,bn as ms}from"./index-BZYDK9c8.js";/**
2
2
  * @license lucide-react v1.21.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1,17 @@
1
+ import{ag as ge,r as t,c as fe,aE as je,j as e,Z as L,$,aF as te,aG as ne,w as ae,l as R,aH as P,aI as I,s as re,ab as ie,aJ as U,aK as be,B as D,aL as ve,aM as ye,a1 as Ne,aN as oe,aO as le,aP as ce,aQ as de,aR as z,aS as ue,aT as Ce,aU as Te,aV as V,aW as K,v as Z,a3 as ke,a4 as Se,a5 as we,aX as Ie,aY as Re,aZ as Ae,a_ as Ee,a$ as M,al as De,b0 as Be,b1 as G,b2 as Pe,as as ze,at as _e,au as Fe,av as Me,aw as Oe,ax as Le,ay as $e,az as Ke,b3 as He,b4 as We,b5 as Ve,b6 as me,b7 as qe,b8 as Xe,U as Ue,b9 as Ze,ba as Ge,bb as Ye,bc as Je,bd as Qe,f as es,t as T,be as ss,bf as ts,bg as ns,bh as as,bi as q,u as rs,bj as is,bk as os,an as ls,bl as cs,bm as ds,a2 as us,bn as ms}from"./index-BNSNg7yH.js";/**
2
+ * @license lucide-react v1.21.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const xs=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],hs=ge("pause",xs),ps=500;function Y(s,l,m,c=ps){const[u,h]=t.useState(s),i=t.useRef(null);t.useEffect(()=>{h(s)},[l]),t.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);const p=t.useCallback(a=>{h(a),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>m(a),c)},[m,c]),j=t.useCallback(()=>{i.current&&clearTimeout(i.current),u!==s&&m(u)},[u,s,m]);return{value:u,onChange:p,onBlur:j}}function gs(){const s=fe();return je({mutationFn:l=>s.testBinding(l)})}const fs=4e3,js=2e3,xe="<!-- TRAITS:START -->",X="<!-- TRAITS:END -->";function _(s,l){const m=[xe,`## Personality Traits
7
+ `,s,X];return l.trim()&&m.push("",l.trim()),m.join(`
8
+ `)}function he(s){const l=s.indexOf(X);return l===-1?s:s.slice(l+X.length).trim()}function J({title:s,content:l,enabled:m,maxChars:c,charCount:u,disclaimer:h,onChange:i,onBlur:p,onToggle:j}){const a=t.useCallback(f=>{i(f.target.value)},[i]);return e.jsx(L,{className:R(!m&&"opacity-60"),children:e.jsxs($,{children:[e.jsxs(te,{orientation:"horizontal",className:"items-center justify-between",children:[e.jsx(ne,{className:"text-sm font-medium",children:s}),e.jsx(ae,{checked:m,onCheckedChange:j,"aria-label":`Toggle ${s}`})]}),h&&e.jsx("p",{className:"text-muted-foreground text-xs italic",children:h}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("textarea",{value:l,onChange:a,onBlur:p,rows:8,maxLength:c,className:"border-border bg-background text-foreground placeholder:text-muted-foreground focus-visible:ring-ring w-full resize-none rounded-md border px-3 py-2 font-mono text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",placeholder:m?"Write markdown content...":"Toggle on to enable injection"}),e.jsxs("p",{className:"text-muted-foreground text-right text-xs",children:[u??l.length," / ",c.toLocaleString()]})]})]})})}function bs({agentName:s,agentId:l,agentDescription:m,agentCapabilities:c,traits:u,conventions:h,soulContent:i,nopeContent:p}){const[j,a]=t.useState(!1),f=t.useMemo(()=>{const n=[`<agent_identity>
9
+ ${[`Name: ${s}`,`ID: ${l}`,m&&`Description: ${m}`,(c==null?void 0:c.length)&&`Capabilities: ${c.join(", ")}`].filter(Boolean).join(`
10
+ `)}
11
+ </agent_identity>`];if(h.soul){let g=i;if(i.includes(xe)){const v=he(i),N=P({...I,...u});g=_(N,v)}else i.trim()&&(g=i);g.trim()&&n.push(`<agent_persona>
12
+ ${g}
13
+ </agent_persona>`)}return h.nope&&p.trim()&&n.push(`<agent_safety_boundaries>
14
+ ${p}
15
+ </agent_safety_boundaries>`),n.join(`
16
+
17
+ `)},[s,l,m,c,u,h,i,p]);return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("button",{type:"button",onClick:()=>a(!j),className:"flex items-center gap-1.5 text-sm font-medium","aria-expanded":j,children:[j?e.jsx(re,{className:"size-4"}):e.jsx(ie,{className:"size-4"}),"Preview injected prompt"]}),j&&e.jsx("pre",{className:"bg-muted max-h-64 overflow-auto rounded-md p-3",children:e.jsx("code",{className:"text-xs",children:f})})]})}const vs="These boundaries guide agent behavior but are not enforced at the tool level. They serve as strong instructions, not hard blocks.";function ys({agent:s,soulContent:l,nopeContent:m,onUpdate:c}){var S;const[u,h]=t.useState(s.traits??I),[i,p]=t.useState(s.conventions??{soul:!0,nope:!0,dorkosKnowledge:!0}),j=t.useRef(u);t.useEffect(()=>{j.current=u},[u]);const a=Y(he(l??""),s.id,o=>{const C=P({...I,...j.current});c({soulContent:_(C,o)})}),f=Y(m??"",s.id,o=>{c({nopeContent:o})}),b=t.useMemo(()=>{const o=P({...I,...u});return _(o,a.value)},[u,a.value]),n=t.useCallback(o=>{h(o);const C=P({...I,...o});c({traits:o,soulContent:_(C,a.value)})},[a.value,c]),g=t.useCallback(()=>{const o={...I};h(o);const C=P(o);c({traits:o,soulContent:_(C,a.value)})},[a.value,c]),v=t.useCallback((o,C)=>{const d={...i,[o]:C};p(d),c({conventions:d})},[i,c]),N=U.map(o=>be[o][u[o]??3]).join(" "),y=U.every(o=>u[o]===I[o]);return e.jsxs("div",{className:"space-y-6",children:[e.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:N}),e.jsx(L,{children:e.jsxs($,{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Traits"}),!y&&e.jsx(D,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:g,children:"Reset to defaults"})]}),e.jsx(ve,{traits:u,onChange:n,onSliderChange:()=>ye()})]})}),e.jsx(J,{title:"Custom Instructions (SOUL.md)",content:a.value,enabled:i.soul,maxChars:fs,charCount:b.length,onChange:o=>a.onChange(o),onBlur:a.onBlur,onToggle:o=>v("soul",o)}),e.jsx(J,{title:"Safety Boundaries (NOPE.md)",content:f.value,enabled:i.nope,maxChars:js,disclaimer:vs,onChange:o=>f.onChange(o),onBlur:f.onBlur,onToggle:o=>v("nope",o)}),e.jsx(L,{children:e.jsx($,{children:e.jsxs(te,{orientation:"horizontal",className:"items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(ne,{className:"text-sm font-medium",children:"DorkOS Knowledge Base"}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Inject DorkOS platform documentation into the agent's context"})]}),e.jsx(ae,{checked:i.dorkosKnowledge,onCheckedChange:o=>v("dorkosKnowledge",o),"aria-label":"Toggle DorkOS knowledge base injection"})]})})}),e.jsx(L,{children:e.jsx($,{children:e.jsx(Ne,{label:"Response Mode",description:"Controls when this agent responds to messages automatically",children:e.jsxs(oe,{value:((S=s.behavior)==null?void 0:S.responseMode)??"always",onValueChange:o=>c({behavior:{...s.behavior,responseMode:o}}),children:[e.jsx(le,{className:"w-48",children:e.jsx(ce,{})}),e.jsxs(de,{children:[e.jsx(z,{value:"always",children:"Always respond"}),e.jsx(z,{value:"direct-only",children:"Direct messages only"}),e.jsx(z,{value:"mention-only",children:"Only when mentioned"}),e.jsx(z,{value:"silent",children:"Never respond automatically"})]})]})})})}),e.jsx(bs,{agentName:ue(s),agentId:s.id,agentDescription:s.description,agentCapabilities:s.capabilities,traits:u,conventions:i,soulContent:b,nopeContent:f.value})]})}const Ns={connected:K.connected,disconnected:"bg-amber-500",error:K.error,connecting:K.starting};function Cs(s){const l=[];return s.canInitiate&&l.push("Can start conversations"),s.canReply||l.push("Cannot reply"),s.canReceive||l.push("Cannot receive"),l.join(" · ")}function Ts({binding:s,channelName:l,channelIconId:m,channelAdapterType:c,adapterState:u,errorMessage:h,chatDisplayName:i,lastMessageAt:p,onTogglePause:j,onTest:a,onEdit:f,onRemove:b}){const[n,g]=t.useState(!1),[v,N]=t.useState(!1),y=s.enabled===!1,[S,o]=t.useState(0);t.useEffect(()=>{if(!p||y)return;const A=setInterval(()=>o(r=>r+1),6e4);return()=>clearInterval(A)},[p,y]);const C=i?`${l} — ${i}`:l,d=Ce({sessionStrategy:s.sessionStrategy,chatDisplayName:i,channelType:s.channelType}),k=s.canInitiate||!s.canReply||!s.canReceive,B=k?Cs(s):"",F=t.useMemo(()=>y?"Paused — no messages routing":p?`Last received ${Te(p).toLowerCase()}`:"No recent activity",[y,p,S]),H=async()=>{N(!0);try{await a()}finally{N(!1)}};return e.jsxs("div",{className:R("relative rounded-xl border px-4 py-3 transition-colors",u==="error"&&!y&&"border-red-500/50 bg-red-500/[0.02]",y&&"opacity-60"),children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsxs("div",{className:"relative shrink-0",children:[e.jsx(V,{iconId:m,adapterType:c,size:32}),e.jsx("span",{className:R("ring-background absolute -right-0.5 -bottom-0.5 size-2.5 rounded-full ring-2",y?"bg-muted-foreground/40":Ns[u])})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:C}),y&&e.jsx(Z,{variant:"secondary",className:"text-xs",children:"Paused"})]}),y?e.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:F}):u==="error"&&h?e.jsx("p",{className:"text-xs text-red-600 dark:text-red-400",children:h}):e.jsxs(e.Fragment,{children:[d&&e.jsx("p",{className:"text-muted-foreground truncate text-xs italic",children:d}),e.jsx("p",{className:"text-muted-foreground mt-1 text-xs",children:F})]})]}),k&&e.jsxs(ke,{children:[e.jsx(Se,{asChild:!0,children:e.jsx(Z,{variant:"outline",className:"text-xs",children:"Restricted"})}),e.jsx(we,{children:B})]}),e.jsxs(Ie,{children:[e.jsx(Re,{asChild:!0,children:e.jsxs(D,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0",children:[e.jsx(Ae,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"Actions"})]})}),e.jsxs(Ee,{align:"end",children:[e.jsxs(M,{onClick:H,disabled:v||y,children:[v?e.jsx(De,{className:"mr-2 size-4 animate-spin"}):e.jsx(Be,{className:"mr-2 size-4"}),"Send test"]}),e.jsx(G,{}),e.jsx(M,{onClick:()=>j(!s.enabled),children:y?e.jsxs(e.Fragment,{children:[e.jsx(Pe,{className:"mr-2 size-4"}),"Resume"]}):e.jsxs(e.Fragment,{children:[e.jsx(hs,{className:"mr-2 size-4"}),"Pause"]})}),e.jsx(G,{}),e.jsx(M,{onClick:f,children:"Edit"}),e.jsx(M,{onClick:()=>g(!0),className:"text-destructive focus:text-destructive",children:"Remove"})]})]})]}),e.jsx(ze,{open:n,onOpenChange:g,children:e.jsxs(_e,{children:[e.jsxs(Fe,{children:[e.jsx(Me,{children:"Remove channel binding"}),e.jsxs(Oe,{children:["Remove the binding to ",l,"? The agent will no longer receive messages from this channel."]})]}),e.jsxs(Le,{children:[e.jsx($e,{children:"Cancel"}),e.jsx(Ke,{onClick:()=>{b(),g(!1)},className:"bg-red-600 hover:bg-red-700",children:"Remove"})]})]})})]})}function ks({binding:s,channelName:l,channelIconId:m,channelAdapterType:c,adapterState:u,errorMessage:h,onTogglePause:i,onTest:p,onEdit:j,onRemove:a}){const{data:f=[]}=He(s.adapterId),b=s.chatId?f.find(v=>v.chatId===s.chatId):void 0,n=(b==null?void 0:b.displayName)??(s.chatId?`#${s.chatId.slice(-4)}`:void 0),g=t.useMemo(()=>{if(b)return b.lastMessageAt;if(f.length!==0)return f.reduce((v,N)=>N.lastMessageAt>v?N.lastMessageAt:v,f[0].lastMessageAt)},[b,f]);return e.jsx(Ts,{binding:s,channelName:l,channelIconId:m,channelAdapterType:c,adapterState:u,errorMessage:h,chatDisplayName:n,lastMessageAt:g,onTogglePause:i,onTest:p,onEdit:j,onRemove:a})}function Q({catalog:s,boundAdapterIds:l,onSelectChannel:m,onRequestSetup:c,disabled:u}){const[h,i]=t.useState(!1),p=t.useMemo(()=>s.flatMap(n=>n.instances.map(g=>({id:g.id,displayName:g.status.displayName??n.manifest.displayName,label:g.label,state:g.status.state,isDisabled:g.status.state==="error"||!g.enabled,alreadyBound:l.has(g.id),iconId:n.manifest.iconId,adapterType:n.manifest.type}))),[s,l]),j=t.useMemo(()=>s.filter(n=>!n.manifest.deprecated&&(n.instances.length===0||n.manifest.multiInstance)),[s]);function a(n){m(n),i(!1)}function f(n){i(!1),c(n)}const b=p.length===0&&j.length===0;return e.jsxs(We,{open:h,onOpenChange:i,children:[e.jsx(Ve,{asChild:!0,children:e.jsxs(D,{variant:"outline",size:"sm",disabled:u,children:[e.jsx(me,{className:"mr-1.5 size-3.5"}),"Connect to Channel"]})}),e.jsx(qe,{className:"w-72 p-0",align:"start",children:e.jsx("div",{className:"max-h-64 overflow-y-auto",children:b?e.jsx("div",{className:"px-3 py-4 text-center",children:e.jsx("p",{className:"text-muted-foreground text-sm",children:"No channels available"})}):e.jsxs(e.Fragment,{children:[p.length>0&&e.jsx("div",{className:"py-1",children:p.map(n=>e.jsxs("button",{disabled:n.isDisabled||n.alreadyBound,onClick:()=>a(n.id),className:R("flex w-full items-center gap-3 px-3 py-2 text-left text-sm transition-colors","hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50"),children:[e.jsxs("div",{className:"relative shrink-0",children:[e.jsx(V,{iconId:n.iconId,adapterType:n.adapterType,size:20,className:"text-muted-foreground"}),e.jsx("span",{className:R("ring-background absolute -right-0.5 -bottom-0.5 size-1.5 rounded-full ring-[1.5px]",K[n.state])})]}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate font-medium",children:n.displayName}),n.label&&e.jsx("p",{className:"text-muted-foreground truncate text-xs",children:n.label})]}),e.jsx("span",{className:"text-muted-foreground/60 text-xs",children:n.alreadyBound?"Connected":Xe[n.state]})]},n.id))}),j.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"border-t"}),e.jsxs("div",{className:"py-1",children:[e.jsx("p",{className:"text-muted-foreground px-3 py-1 text-xs font-medium",children:"Available to set up"}),j.map(n=>e.jsxs("button",{onClick:()=>f(n.manifest),className:R("flex w-full items-center gap-3 px-3 py-2 text-left text-sm transition-colors","hover:bg-accent"),children:[e.jsx(V,{iconId:n.manifest.iconId,adapterType:n.manifest.type,size:14,className:"text-muted-foreground shrink-0"}),e.jsx("span",{className:"truncate font-medium",children:n.manifest.displayName})]},n.manifest.type))]})]})]})})})]})}const O={open:!1,binding:null,adapterName:""},ee={open:!1};function Ss({agent:s}){const l=Ue(),{data:m=[]}=Ze(),{data:c=[]}=Ge(l),u=Ye(),h=Je(),i=gs(),p=Qe(),j=es(r=>r.openSettingsToTab),[a,f]=t.useState(O),[b,n]=t.useState(ee),g=m.filter(r=>r.agentId===s.id),v=t.useMemo(()=>{const r=new Map;for(const x of c)for(const w of x.instances){const E=w.status.state,pe=E==="connected"||E==="error"?E:E==="starting"||E==="stopping"||E==="reconnecting"?"connecting":"disconnected";r.set(w.id,{state:pe,name:w.status.displayName??x.manifest.displayName,iconId:x.manifest.iconId,adapterType:x.manifest.type,errorMessage:w.status.lastError??void 0})}return r},[c]),N=t.useCallback(r=>v.get(r)??{state:"disconnected",name:r,adapterType:r},[v]),y=t.useMemo(()=>new Set(g.map(r=>r.adapterId)),[g]),S=t.useCallback(async r=>{try{await u.mutateAsync({adapterId:r,agentId:s.id,sessionStrategy:"per-chat",label:"",canInitiate:!1,canReply:!0,canReceive:!0}),T.success("Channel connected")}catch(x){T.error(x instanceof Error?x.message:"Failed to connect channel")}},[s.id,u]),o=t.useCallback(r=>{n({open:!0,manifest:r})},[]),C=t.useCallback(r=>{f({open:!0,binding:r,adapterName:N(r.adapterId).name})},[N]),d=t.useCallback(async r=>{try{await h.mutateAsync(r),T.success("Channel removed")}catch(x){T.error(x instanceof Error?x.message:"Failed to remove channel")}},[h]),k=t.useCallback(async(r,x)=>{try{await p.mutateAsync({id:r,updates:{enabled:x}}),T.success(x?"Channel resumed":"Channel paused")}catch(w){T.error(w instanceof Error?w.message:"Failed to update channel")}},[p]),B=t.useCallback(async r=>{try{const x=await i.mutateAsync(r);return x.ok?T.success(`Test OK — routed in ${x.latencyMs}ms`):T.error(`Test failed: ${x.reason??"unknown error"}`),x}catch(x){throw T.error(x instanceof Error?x.message:"Test failed"),x}},[i]),F=t.useCallback(async r=>{if(a.binding)try{await p.mutateAsync({id:a.binding.id,updates:ss(r)}),T.success("Channel updated"),f(O)}catch(x){T.error(x instanceof Error?x.message:"Failed to update channel")}},[a.binding,p]),H=t.useCallback(async r=>{try{await h.mutateAsync(r),T.success("Channel removed"),f(O)}catch(x){T.error(x instanceof Error?x.message:"Failed to remove channel")}},[h]),A=e.jsxs(e.Fragment,{children:[a.binding&&e.jsx(ts,{open:a.open,onOpenChange:r=>{r||f(O)},mode:"edit",initialValues:{adapterId:a.binding.adapterId,agentId:a.binding.agentId,sessionStrategy:a.binding.sessionStrategy,label:a.binding.label,permissionMode:a.binding.permissionMode,chatId:a.binding.chatId,channelType:a.binding.channelType,canInitiate:a.binding.canInitiate,canReply:a.binding.canReply,canReceive:a.binding.canReceive},adapterName:a.adapterName,agentName:ue(s),bindingId:a.binding.id,onConfirm:F,onDelete:H,isPending:p.isPending||h.isPending}),b.manifest&&e.jsx(ns,{open:b.open,onOpenChange:r=>{r||n(ee)},manifest:b.manifest,existingAdapterIds:c.flatMap(r=>r.instances.map(x=>x.id))})]});return l?c.length===0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-dashed px-6 py-10",children:[e.jsx(q,{className:"text-muted-foreground/40 size-8"}),e.jsxs("div",{className:"space-y-1 text-center",children:[e.jsx("p",{className:"text-sm font-medium",children:"No channels available"}),e.jsx("p",{className:"text-muted-foreground max-w-xs text-xs leading-relaxed",children:"To connect this agent to Telegram, Slack, or a webhook, first configure a channel in Settings. It will appear here as soon as it's ready."})]}),e.jsx(D,{variant:"outline",size:"sm",onClick:()=>j("channels"),children:"Configure a channel"})]}),A]}):g.length===0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-dashed px-6 py-10",children:[e.jsx(q,{className:"text-muted-foreground/40 size-8"}),e.jsxs("div",{className:"space-y-1 text-center",children:[e.jsx("p",{className:"text-sm font-medium",children:"Let this agent reach the outside world"}),e.jsx("p",{className:"text-muted-foreground max-w-xs text-xs leading-relaxed",children:"Connect Telegram, Slack, or a webhook so this agent can send and receive messages while you are away."})]}),e.jsx(Q,{catalog:c,boundAdapterIds:y,onSelectChannel:S,onRequestSetup:o,disabled:u.isPending})]}),A]}):e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"space-y-2",children:g.map(r=>{const x=N(r.adapterId);return e.jsx(ks,{binding:r,channelName:x.name,channelIconId:x.iconId,channelAdapterType:x.adapterType,adapterState:x.state,errorMessage:x.errorMessage,onTogglePause:w=>k(r.id,w),onTest:()=>B(r.id),onEdit:()=>C(r),onRemove:()=>d(r.id)},r.id)})}),e.jsx(Q,{catalog:c,boundAdapterIds:y,onSelectChannel:S,onRequestSetup:o,disabled:u.isPending}),A]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-dashed px-6 py-10",children:[e.jsx(as,{className:"text-muted-foreground/40 size-8"}),e.jsxs("div",{className:"space-y-1 text-center",children:[e.jsx("p",{className:"text-sm font-medium",children:"The Relay message bus is off"}),e.jsx("p",{className:"text-muted-foreground max-w-xs text-xs leading-relaxed",children:"Channels connect this agent to external messaging platforms. Enable Relay in Settings to get started."})]}),e.jsx(D,{variant:"outline",size:"sm",onClick:()=>j("advanced"),children:"Open Relay settings"})]}),A]})}function se({title:s,icon:l,meta:m,defaultOpen:c=!1,children:u}){const[h,i]=t.useState(c);return e.jsxs("div",{className:"border-b last:border-b-0",children:[e.jsxs("button",{type:"button",onClick:()=>i(!h),className:R("hover:bg-accent/50 flex w-full items-center gap-2 px-4 py-2.5 text-left transition-colors"),"aria-expanded":h,children:[h?e.jsx(re,{className:"text-muted-foreground size-3.5 shrink-0"}):e.jsx(ie,{className:"text-muted-foreground size-3.5 shrink-0"}),e.jsx(l,{className:"text-muted-foreground size-3.5 shrink-0"}),e.jsx("span",{className:"text-[11px] font-semibold",children:s}),m&&e.jsx("span",{className:"text-muted-foreground ml-auto text-[9px]",children:m})]}),h&&e.jsx("div",{className:"px-4 pb-4",children:u})]})}function W(s){return s.tags??[]}function Is(){const{agent:s,projectPath:l,onUpdate:m,onPersonalityUpdate:c}=rs(),u=s,{data:h}=is(),i=h?Object.keys(h.capabilities):[s.runtime],[p,j]=t.useState(null),[a,f]=t.useState(""),[b,n]=t.useState(""),[g,v]=t.useState(!1),N=t.useCallback((d,k)=>{j(d),f(k)},[]),y=t.useCallback(d=>{a.trim()&&m({[d]:a.trim()}),j(null)},[a,m]),S=t.useCallback(()=>{const d=b.trim();if(!d)return;const k=W(s);k.includes(d)||m({tags:[...k,d]}),n(""),v(!1)},[b,s,m]),o=t.useCallback(d=>{const k=W(s);m({tags:k.filter(B=>B!==d)})},[s,m]),C=W(s);return e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"space-y-4 border-b p-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-muted-foreground text-[10px] font-medium tracking-wider uppercase",children:"Description"}),p==="description"?e.jsx("textarea",{autoFocus:!0,value:a,onChange:d=>f(d.target.value),onBlur:()=>y("description"),onKeyDown:d=>{d.key==="Enter"&&!d.shiftKey&&y("description")},className:"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring w-full rounded-md border px-3 py-2 text-sm focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",rows:3}):e.jsx("button",{type:"button",className:"hover:bg-accent text-muted-foreground w-full rounded-md px-2 py-1 text-left text-sm transition-colors",onClick:()=>N("description",s.description??""),"data-testid":"description-field",children:s.description||"Add a description..."})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-muted-foreground text-[10px] font-medium tracking-wider uppercase",children:"Runtime"}),e.jsxs(oe,{value:s.runtime??"claude-code",onValueChange:d=>m({runtime:d}),children:[e.jsx(le,{className:"h-8 text-sm",responsive:!1,children:e.jsx(ce,{})}),e.jsx(de,{children:i.map(d=>e.jsx(z,{value:d,responsive:!1,children:os(d).label},d))})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-muted-foreground text-[10px] font-medium tracking-wider uppercase",children:"Directory"}),e.jsxs("div",{className:"text-muted-foreground flex items-center gap-1.5 rounded-md px-2 py-1.5",children:[e.jsx(ls,{className:"size-3.5 shrink-0"}),e.jsx("span",{className:"truncate font-mono text-xs",children:cs(l)})]})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-muted-foreground text-[10px] font-medium tracking-wider uppercase",children:"Tags"}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[C.map(d=>e.jsxs("span",{className:"bg-accent text-accent-foreground inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs",children:[d,e.jsx("button",{type:"button",onClick:()=>o(d),className:"hover:text-destructive transition-colors","aria-label":`Remove tag ${d}`,children:e.jsx(ds,{className:"size-3"})})]},d)),g?e.jsx(us,{autoFocus:!0,value:b,onChange:d=>n(d.target.value),onBlur:S,onKeyDown:d=>{d.key==="Enter"&&S(),d.key==="Escape"&&v(!1)},className:"h-6 w-24 text-xs",placeholder:"tag name"}):e.jsxs(D,{type:"button",variant:"ghost",size:"sm",onClick:()=>v(!0),className:"text-muted-foreground hover:text-foreground h-auto gap-0.5 px-1 py-0 text-xs",children:[e.jsx(me,{className:"size-3"})," Add"]})]})]})]}),e.jsx(se,{title:"Channels",icon:q,children:e.jsx(Ss,{agent:s})}),e.jsx(se,{title:"Advanced",icon:ms,children:e.jsx(ys,{agent:s,soulContent:u.soulContent??null,nopeContent:u.nopeContent??null,onUpdate:c})})]})}export{Is as ConfigTab};
@@ -1 +1 @@
1
- import{c as X,a as Z,b as j,d as C,D as Je,m as De,s as Ke,i as ze,e as Ve,f as U,g as Qe,t as je,h as We,j as t}from"./index-BzFClKht.js";import{n as Re,t as Xe,r as Ze,BaseTanStackRouterDevtoolsPanel as et}from"./BaseTanStackRouterDevtoolsPanel-SWyE65Is-DbU6EhZc.js";import{n as Ae}from"./index-sKKm7yEm.js";var tt=je('<svg xmlns=http://www.w3.org/2000/svg enable-background="new 0 0 634 633"viewBox="0 0 634 633"><g transform=translate(1)><linearGradient x1=-641.486 x2=-641.486 y1=856.648 y2=855.931 gradientTransform="matrix(633 0 0 -633 406377 542258)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#6bdaff></stop><stop offset=0.319 stop-color=#f9ffb5></stop><stop offset=0.706 stop-color=#ffa770></stop><stop offset=1 stop-color=#ff7373></stop></linearGradient><circle cx=316.5 cy=316.5 r=316.5 fill-rule=evenodd clip-rule=evenodd></circle><defs><filter width=454 height=396.9 x=-137.5 y=412 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=412 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=610.5 fill=#015064 fill-rule=evenodd stroke=#00CFE2 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=412 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=412 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=610.5 fill=#015064 fill-rule=evenodd stroke=#00CFE2 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=-137.5 y=450 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=450 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=648.5 fill=#015064 fill-rule=evenodd stroke=#00A8B8 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=450 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=450 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=648.5 fill=#015064 fill-rule=evenodd stroke=#00A8B8 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=-137.5 y=486 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=486 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=684.5 fill=#015064 fill-rule=evenodd stroke=#007782 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=486 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=486 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=684.5 fill=#015064 fill-rule=evenodd stroke=#007782 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=176.9 height=129.3 x=272.2 y=308 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=176.9 height=129.3 x=272.2 y=308 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><path fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11 d="M436 403.2l-5 28.6m-140-90.3l-10.9 62m52.8-19.4l-4.3 27.1"></path><linearGradient x1=-645.656 x2=-646.499 y1=854.878 y2=854.788 gradientTransform="matrix(-184.159 -32.4722 11.4608 -64.9973 -128419.844 34938.836)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ee2700></stop><stop offset=1 stop-color=#ff008e></stop></linearGradient><path fill-rule=evenodd d="M344.1 363l97.7 17.2c5.8 2.1 8.2 6.2 7.1 12.1-1 5.9-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1.8-12.8 3.7-3.7 8.3-4.4 13.7-2.1l55.2 53.6z"clip-rule=evenodd></path><path fill=#D8D8D8 fill-rule=evenodd stroke=#FFF stroke-linecap=round stroke-linejoin=bevel stroke-width=7 d="M428.3 384.5l.9-6.5m-33.9 1.5l.9-6.5m-34 .5l.9-6.1m-38.9-16.1l4.2-3.9m-25.2-16.1l4.2-3.9"clip-rule=evenodd></path></g><defs><filter width=280.6 height=317.4 x=73.2 y=113.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=280.6 height=317.4 x=73.2 y=113.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><linearGradient x1=-646.8 x2=-646.8 y1=854.844 y2=853.844 gradientTransform="matrix(-100.1751 48.8587 -97.9753 -200.879 19124.773 203538.61)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#a17500></stop><stop offset=1 stop-color=#5d2100></stop></linearGradient><path fill-rule=evenodd d="M192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.2-2.9 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6-3.4-18.7-10.8-51.8-22.2-99.6l-25.3 4.6"clip-rule=evenodd></path><linearGradient x1=-635.467 x2=-635.467 y1=852.115 y2=851.115 gradientTransform="matrix(92.6873 4.8575 2.0257 -38.6535 57323.695 36176.047)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z"clip-rule=evenodd></path><linearGradient x1=-636.573 x2=-636.573 y1=855.444 y2=854.444 gradientTransform="matrix(109.9945 5.7646 6.3597 -121.3507 64719.133 107659.336)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.3 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20 49.6-53.1 49.6-53.1z"clip-rule=evenodd></path><linearGradient x1=-632.145 x2=-632.145 y1=854.174 y2=853.174 gradientTransform="matrix(62.9558 3.2994 3.5021 -66.8246 37035.367 59284.227)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M195 183.9c-.8-21.9 6-38 20.6-48.2 14.6-10.2 29.8-15.3 45.5-15.3-6.1 21.4-14.5 35.8-25.2 43.4-10.7 7.5-24.4 14.2-40.9 20.1z"clip-rule=evenodd></path><linearGradient x1=-638.224 x2=-638.224 y1=853.801 y2=852.801 gradientTransform="matrix(152.4666 7.9904 3.0934 -59.0251 94939.86 55646.855)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c31.9-30 64.1-39.7 96.7-29 32.6 10.7 50.8 30.4 54.6 59.1-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z"clip-rule=evenodd></path><linearGradient x1=-637.723 x2=-637.723 y1=855.103 y2=854.103 gradientTransform="matrix(136.467 7.1519 5.2165 -99.5377 82830.875 89859.578)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c35.8-7.6 65.6-.2 89.2 22 23.6 22.2 37.7 49 42.3 80.3-39.8-9.7-68.3-23.8-85.5-42.4-17.2-18.5-32.5-38.5-46-59.9z"clip-rule=evenodd></path><linearGradient x1=-631.79 x2=-631.79 y1=855.872 y2=854.872 gradientTransform="matrix(60.8683 3.19 8.7771 -167.4773 31110.818 145537.61)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6-6.5 29.9-3.6 63.1 8.7 99.6 27.4-40.3 43.2-69.6 47.4-88 4.2-18.3 5.5-44.1 4-77.2z"clip-rule=evenodd></path><path fill=none stroke=#2F8A00 stroke-linecap=round stroke-width=8 d="M196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4-5.7 18-9.4 33-11.1 45.1"></path><path fill=none stroke=#2F8A00 stroke-linecap=round stroke-width=8 d="M194.8 185.7c-24.4 1.7-43.8 9-58.1 21.8-14.3 12.8-24.7 25.4-31.3 37.8m99.1-68.9c29.7-6.7 52-8.4 67-5 15 3.4 26.9 8.7 35.8 15.9m-110.8-5.9c20.3 9.9 38.2 20.5 53.9 31.9 15.7 11.4 27.4 22.1 35.1 32"></path></g><defs><filter width=532 height=633 x=50.5 y=399 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=532 height=633 x=50.5 y=399 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><linearGradient x1=-641.104 x2=-641.278 y1=856.577 y2=856.183 gradientTransform="matrix(532 0 0 -633 341484.5 542657)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#fff400></stop><stop offset=1 stop-color=#3c8700></stop></linearGradient><ellipse cx=316.5 cy=715.5 fill-rule=evenodd clip-rule=evenodd rx=266 ry=316.5></ellipse><defs><filter width=288 height=283 x=391 y=-24 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=288 height=283 x=391 y=-24 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><g transform="translate(397 -24)"><linearGradient x1=-1036.672 x2=-1036.672 y1=880.018 y2=879.018 gradientTransform="matrix(227 0 0 -227 235493 199764)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffdf00></stop><stop offset=1 stop-color=#ff9d00></stop></linearGradient><circle cx=168.5 cy=113.5 r=113.5 fill-rule=evenodd clip-rule=evenodd></circle><linearGradient x1=-1017.329 x2=-1018.602 y1=658.003 y2=657.998 gradientTransform="matrix(30 0 0 -1 30558 771)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M30 113H0"></path><linearGradient x1=-1014.501 x2=-1015.774 y1=839.985 y2=839.935 gradientTransform="matrix(26.5 0 0 -5.5 26925 4696.5)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M33.5 79.5L7 74"></path><linearGradient x1=-1016.59 x2=-1017.862 y1=852.671 y2=852.595 gradientTransform="matrix(29 0 0 -8 29523 6971)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M34 146l-29 8"></path><linearGradient x1=-1011.984 x2=-1013.257 y1=863.523 y2=863.229 gradientTransform="matrix(24 0 0 -13 24339 11407)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M45 177l-24 13"></path><linearGradient x1=-1006.673 x2=-1007.946 y1=869.279 y2=868.376 gradientTransform="matrix(20 0 0 -19 20205 16720)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M67 204l-20 19"></path><linearGradient x1=-992.85 x2=-993.317 y1=871.258 y2=870.258 gradientTransform="matrix(13.8339 0 0 -22.8467 13825.796 20131.938)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M94.4 227l-13.8 22.8"></path><linearGradient x1=-953.835 x2=-953.965 y1=871.9 y2=870.9 gradientTransform="matrix(7.5 0 0 -24.5 7278 21605)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M127.5 243.5L120 268"></path><linearGradient x1=244.504 x2=244.496 y1=871.898 y2=870.898 gradientTransform="matrix(.5 0 0 -24.5 45.5 21614)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M167.5 252.5l.5 24.5">');function Pe(){const e=We();return(()=>{var w=tt(),O=w.firstChild.firstChild,F=O.nextSibling,M=F.nextSibling,L=M.firstChild,v=M.nextSibling,I=v.firstChild,G=v.nextSibling,c=G.nextSibling,x=c.firstChild,p=c.nextSibling,h=p.firstChild,u=p.nextSibling,T=u.nextSibling,H=T.firstChild,g=T.nextSibling,Y=g.firstChild,B=g.nextSibling,S=B.nextSibling,q=S.firstChild,o=S.nextSibling,N=o.firstChild,E=o.nextSibling,D=E.nextSibling,ee=D.firstChild,y=D.nextSibling,te=y.firstChild,b=y.nextSibling,z=b.nextSibling,J=z.firstChild,$=z.nextSibling,K=$.firstChild,R=$.nextSibling,A=R.nextSibling,l=A.firstChild,r=A.nextSibling,d=r.firstChild,n=r.nextSibling,a=n.firstChild.nextSibling,f=a.nextSibling,i=n.nextSibling,s=i.firstChild,m=i.nextSibling,P=m.firstChild,k=m.nextSibling,_=k.firstChild,ie=_.nextSibling,le=ie.nextSibling,re=le.nextSibling,ne=re.nextSibling,oe=ne.nextSibling,se=oe.nextSibling,ae=se.nextSibling,de=ae.nextSibling,fe=de.nextSibling,ce=fe.nextSibling,pe=ce.nextSibling,ue=pe.nextSibling,Le=ue.nextSibling,ge=k.nextSibling,Ie=ge.firstChild,V=ge.nextSibling,He=V.firstChild,xe=V.nextSibling,Q=xe.nextSibling,he=Q.nextSibling,Ye=he.firstChild,W=he.nextSibling,qe=W.firstChild,$e=W.nextSibling,me=$e.firstChild.firstChild,ke=me.nextSibling,ve=ke.nextSibling,Se=ve.nextSibling,ye=Se.nextSibling,be=ye.nextSibling,_e=be.nextSibling,Ce=_e.nextSibling,Ue=Ce.nextSibling,we=Ue.nextSibling,Oe=we.nextSibling,Fe=Oe.nextSibling,Me=Fe.nextSibling,Ge=Me.nextSibling,Te=Ge.nextSibling,Be=Te.nextSibling,Ee=Be.nextSibling,Ne=Ee.nextSibling;return t(O,"id",`a-${e}`),t(F,"fill",`url(#a-${e})`),t(L,"id",`b-${e}`),t(v,"id",`c-${e}`),t(I,"filter",`url(#b-${e})`),t(G,"mask",`url(#c-${e})`),t(x,"id",`d-${e}`),t(p,"id",`e-${e}`),t(h,"filter",`url(#d-${e})`),t(u,"mask",`url(#e-${e})`),t(H,"id",`f-${e}`),t(g,"id",`g-${e}`),t(Y,"filter",`url(#f-${e})`),t(B,"mask",`url(#g-${e})`),t(q,"id",`h-${e}`),t(o,"id",`i-${e}`),t(N,"filter",`url(#h-${e})`),t(E,"mask",`url(#i-${e})`),t(ee,"id",`j-${e}`),t(y,"id",`k-${e}`),t(te,"filter",`url(#j-${e})`),t(b,"mask",`url(#k-${e})`),t(J,"id",`l-${e}`),t($,"id",`m-${e}`),t(K,"filter",`url(#l-${e})`),t(R,"mask",`url(#m-${e})`),t(l,"id",`n-${e}`),t(r,"id",`o-${e}`),t(d,"filter",`url(#n-${e})`),t(n,"mask",`url(#o-${e})`),t(a,"id",`p-${e}`),t(f,"fill",`url(#p-${e})`),t(s,"id",`q-${e}`),t(m,"id",`r-${e}`),t(P,"filter",`url(#q-${e})`),t(k,"mask",`url(#r-${e})`),t(_,"id",`s-${e}`),t(ie,"fill",`url(#s-${e})`),t(le,"id",`t-${e}`),t(re,"fill",`url(#t-${e})`),t(ne,"id",`u-${e}`),t(oe,"fill",`url(#u-${e})`),t(se,"id",`v-${e}`),t(ae,"fill",`url(#v-${e})`),t(de,"id",`w-${e}`),t(fe,"fill",`url(#w-${e})`),t(ce,"id",`x-${e}`),t(pe,"fill",`url(#x-${e})`),t(ue,"id",`y-${e}`),t(Le,"fill",`url(#y-${e})`),t(Ie,"id",`z-${e}`),t(V,"id",`A-${e}`),t(He,"filter",`url(#z-${e})`),t(xe,"id",`B-${e}`),t(Q,"fill",`url(#B-${e})`),t(Q,"mask",`url(#A-${e})`),t(Ye,"id",`C-${e}`),t(W,"id",`D-${e}`),t(qe,"filter",`url(#C-${e})`),t($e,"mask",`url(#D-${e})`),t(me,"id",`E-${e}`),t(ke,"fill",`url(#E-${e})`),t(ve,"id",`F-${e}`),t(Se,"stroke",`url(#F-${e})`),t(ye,"id",`G-${e}`),t(be,"stroke",`url(#G-${e})`),t(_e,"id",`H-${e}`),t(Ce,"stroke",`url(#H-${e})`),t(Ue,"id",`I-${e}`),t(we,"stroke",`url(#I-${e})`),t(Oe,"id",`J-${e}`),t(Fe,"stroke",`url(#J-${e})`),t(Me,"id",`K-${e}`),t(Ge,"stroke",`url(#K-${e})`),t(Te,"id",`L-${e}`),t(Be,"stroke",`url(#L-${e})`),t(Ee,"id",`M-${e}`),t(Ne,"stroke",`url(#M-${e})`),w})()}var it=je("<button type=button><div><div></div><div></div></div><div>-</div><div>TanStack Router");function ot({initialIsOpen:e,panelProps:w={},closeButtonProps:O={},toggleButtonProps:F={},position:M="bottom-left",containerElement:L="footer",router:v,routerState:I,shadowDOMTarget:G}){const[c,x]=X();let p;const[h,u]=Re("tanstackRouterDevtoolsOpen",e),[T,H]=Re("tanstackRouterDevtoolsHeight",null),[g,Y]=X(!1),[B,S]=X(!1),q=Xe(),o=Ze(),N=(l,r)=>{if(r.button!==0)return;S(!0);const d={originalHeight:(l==null?void 0:l.getBoundingClientRect().height)??0,pageY:r.pageY},n=f=>{const i=d.pageY-f.pageY,s=d.originalHeight+i;H(s),s<70?u(!1):u(!0)},a=()=>{S(!1),document.removeEventListener("mousemove",n),document.removeEventListener("mouseUp",a)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)};h(),Z(()=>{Y(h()??!1)}),Z(()=>{var l,r,d;if(g()){const n=(r=(l=c())==null?void 0:l.parentElement)==null?void 0:r.style.paddingBottom,a=()=>{var i;const f=p.getBoundingClientRect().height;(i=c())!=null&&i.parentElement&&x(s=>(s!=null&&s.parentElement&&(s.parentElement.style.paddingBottom=`${f}px`),s))};if(a(),typeof window<"u")return window.addEventListener("resize",a),()=>{var f;window.removeEventListener("resize",a),(f=c())!=null&&f.parentElement&&typeof n=="string"&&x(i=>(i.parentElement.style.paddingBottom=n,i))}}else(d=c())!=null&&d.parentElement&&x(n=>(n!=null&&n.parentElement&&n.parentElement.removeAttribute("style"),n))}),Z(()=>{if(c()){const l=c(),r=getComputedStyle(l).fontSize;l==null||l.style.setProperty("--tsrd-font-size",r)}});const{style:E={},...D}=w,{style:ee={},onClick:y,...te}=O,{onClick:b,class:z,...J}=F;if(!q())return null;const $=j(()=>T()??500),K=j(()=>Ae(o().devtoolsPanelContainer,o().devtoolsPanelContainerVisibility(!!h()),o().devtoolsPanelContainerResizing(B),o().devtoolsPanelContainerAnimation(g(),$()+16))),R=j(()=>({height:`${$()}px`,...E||{}})),A=j(()=>Ae(o().mainCloseBtn,o().mainCloseBtnPosition(M),o().mainCloseBtnAnimation(!!h()),z));return C(Qe,{component:L,ref:x,class:"TanStackRouterDevtools",get children(){return[C(Je.Provider,{value:{onCloseClick:y??(()=>{})},get children(){return C(et,De({ref(l){var r=p;typeof r=="function"?r(l):p=l}},D,{router:v,routerState:I,className:K,style:R,get isOpen(){return g()},setIsOpen:u,handleDragStart:l=>N(p,l),shadowDOMTarget:G}))}}),(()=>{var l=it(),r=l.firstChild,d=r.firstChild,n=d.nextSibling,a=r.nextSibling,f=a.nextSibling;return Ke(l,De(J,{"aria-label":"Open TanStack Router Devtools",onClick:i=>{u(!0),b&&b(i)},get class(){return A()}}),!1,!0),ze(d,C(Pe,{})),ze(n,C(Pe,{})),Ve(i=>{var s=o().mainCloseBtnIconContainer,m=o().mainCloseBtnIconOuter,P=o().mainCloseBtnIconInner,k=o().mainCloseBtnDivider,_=o().routerLogoCloseButton;return s!==i.e&&U(r,i.e=s),m!==i.t&&U(d,i.t=m),P!==i.a&&U(n,i.a=P),k!==i.o&&U(a,i.o=k),_!==i.i&&U(f,i.i=_),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),l})()]}})}export{ot as FloatingTanStackRouterDevtools,ot as default};
1
+ import{c as X,a as Z,b as j,d as C,D as Je,m as De,s as Ke,i as ze,e as Ve,f as U,g as Qe,t as je,h as We,j as t}from"./index-B9VCOBmA.js";import{n as Re,t as Xe,r as Ze,BaseTanStackRouterDevtoolsPanel as et}from"./BaseTanStackRouterDevtoolsPanel-SWyE65Is-DptF2Iv2.js";import{n as Ae}from"./index-BNSNg7yH.js";var tt=je('<svg xmlns=http://www.w3.org/2000/svg enable-background="new 0 0 634 633"viewBox="0 0 634 633"><g transform=translate(1)><linearGradient x1=-641.486 x2=-641.486 y1=856.648 y2=855.931 gradientTransform="matrix(633 0 0 -633 406377 542258)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#6bdaff></stop><stop offset=0.319 stop-color=#f9ffb5></stop><stop offset=0.706 stop-color=#ffa770></stop><stop offset=1 stop-color=#ff7373></stop></linearGradient><circle cx=316.5 cy=316.5 r=316.5 fill-rule=evenodd clip-rule=evenodd></circle><defs><filter width=454 height=396.9 x=-137.5 y=412 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=412 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=610.5 fill=#015064 fill-rule=evenodd stroke=#00CFE2 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=412 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=412 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=610.5 fill=#015064 fill-rule=evenodd stroke=#00CFE2 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=-137.5 y=450 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=450 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=648.5 fill=#015064 fill-rule=evenodd stroke=#00A8B8 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=450 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=450 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=648.5 fill=#015064 fill-rule=evenodd stroke=#00A8B8 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=-137.5 y=486 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=486 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=684.5 fill=#015064 fill-rule=evenodd stroke=#007782 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=486 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=486 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=684.5 fill=#015064 fill-rule=evenodd stroke=#007782 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=176.9 height=129.3 x=272.2 y=308 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=176.9 height=129.3 x=272.2 y=308 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><path fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11 d="M436 403.2l-5 28.6m-140-90.3l-10.9 62m52.8-19.4l-4.3 27.1"></path><linearGradient x1=-645.656 x2=-646.499 y1=854.878 y2=854.788 gradientTransform="matrix(-184.159 -32.4722 11.4608 -64.9973 -128419.844 34938.836)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ee2700></stop><stop offset=1 stop-color=#ff008e></stop></linearGradient><path fill-rule=evenodd d="M344.1 363l97.7 17.2c5.8 2.1 8.2 6.2 7.1 12.1-1 5.9-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1.8-12.8 3.7-3.7 8.3-4.4 13.7-2.1l55.2 53.6z"clip-rule=evenodd></path><path fill=#D8D8D8 fill-rule=evenodd stroke=#FFF stroke-linecap=round stroke-linejoin=bevel stroke-width=7 d="M428.3 384.5l.9-6.5m-33.9 1.5l.9-6.5m-34 .5l.9-6.1m-38.9-16.1l4.2-3.9m-25.2-16.1l4.2-3.9"clip-rule=evenodd></path></g><defs><filter width=280.6 height=317.4 x=73.2 y=113.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=280.6 height=317.4 x=73.2 y=113.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><linearGradient x1=-646.8 x2=-646.8 y1=854.844 y2=853.844 gradientTransform="matrix(-100.1751 48.8587 -97.9753 -200.879 19124.773 203538.61)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#a17500></stop><stop offset=1 stop-color=#5d2100></stop></linearGradient><path fill-rule=evenodd d="M192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.2-2.9 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6-3.4-18.7-10.8-51.8-22.2-99.6l-25.3 4.6"clip-rule=evenodd></path><linearGradient x1=-635.467 x2=-635.467 y1=852.115 y2=851.115 gradientTransform="matrix(92.6873 4.8575 2.0257 -38.6535 57323.695 36176.047)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z"clip-rule=evenodd></path><linearGradient x1=-636.573 x2=-636.573 y1=855.444 y2=854.444 gradientTransform="matrix(109.9945 5.7646 6.3597 -121.3507 64719.133 107659.336)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.3 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20 49.6-53.1 49.6-53.1z"clip-rule=evenodd></path><linearGradient x1=-632.145 x2=-632.145 y1=854.174 y2=853.174 gradientTransform="matrix(62.9558 3.2994 3.5021 -66.8246 37035.367 59284.227)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M195 183.9c-.8-21.9 6-38 20.6-48.2 14.6-10.2 29.8-15.3 45.5-15.3-6.1 21.4-14.5 35.8-25.2 43.4-10.7 7.5-24.4 14.2-40.9 20.1z"clip-rule=evenodd></path><linearGradient x1=-638.224 x2=-638.224 y1=853.801 y2=852.801 gradientTransform="matrix(152.4666 7.9904 3.0934 -59.0251 94939.86 55646.855)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c31.9-30 64.1-39.7 96.7-29 32.6 10.7 50.8 30.4 54.6 59.1-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z"clip-rule=evenodd></path><linearGradient x1=-637.723 x2=-637.723 y1=855.103 y2=854.103 gradientTransform="matrix(136.467 7.1519 5.2165 -99.5377 82830.875 89859.578)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c35.8-7.6 65.6-.2 89.2 22 23.6 22.2 37.7 49 42.3 80.3-39.8-9.7-68.3-23.8-85.5-42.4-17.2-18.5-32.5-38.5-46-59.9z"clip-rule=evenodd></path><linearGradient x1=-631.79 x2=-631.79 y1=855.872 y2=854.872 gradientTransform="matrix(60.8683 3.19 8.7771 -167.4773 31110.818 145537.61)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6-6.5 29.9-3.6 63.1 8.7 99.6 27.4-40.3 43.2-69.6 47.4-88 4.2-18.3 5.5-44.1 4-77.2z"clip-rule=evenodd></path><path fill=none stroke=#2F8A00 stroke-linecap=round stroke-width=8 d="M196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4-5.7 18-9.4 33-11.1 45.1"></path><path fill=none stroke=#2F8A00 stroke-linecap=round stroke-width=8 d="M194.8 185.7c-24.4 1.7-43.8 9-58.1 21.8-14.3 12.8-24.7 25.4-31.3 37.8m99.1-68.9c29.7-6.7 52-8.4 67-5 15 3.4 26.9 8.7 35.8 15.9m-110.8-5.9c20.3 9.9 38.2 20.5 53.9 31.9 15.7 11.4 27.4 22.1 35.1 32"></path></g><defs><filter width=532 height=633 x=50.5 y=399 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=532 height=633 x=50.5 y=399 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><linearGradient x1=-641.104 x2=-641.278 y1=856.577 y2=856.183 gradientTransform="matrix(532 0 0 -633 341484.5 542657)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#fff400></stop><stop offset=1 stop-color=#3c8700></stop></linearGradient><ellipse cx=316.5 cy=715.5 fill-rule=evenodd clip-rule=evenodd rx=266 ry=316.5></ellipse><defs><filter width=288 height=283 x=391 y=-24 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=288 height=283 x=391 y=-24 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><g transform="translate(397 -24)"><linearGradient x1=-1036.672 x2=-1036.672 y1=880.018 y2=879.018 gradientTransform="matrix(227 0 0 -227 235493 199764)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffdf00></stop><stop offset=1 stop-color=#ff9d00></stop></linearGradient><circle cx=168.5 cy=113.5 r=113.5 fill-rule=evenodd clip-rule=evenodd></circle><linearGradient x1=-1017.329 x2=-1018.602 y1=658.003 y2=657.998 gradientTransform="matrix(30 0 0 -1 30558 771)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M30 113H0"></path><linearGradient x1=-1014.501 x2=-1015.774 y1=839.985 y2=839.935 gradientTransform="matrix(26.5 0 0 -5.5 26925 4696.5)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M33.5 79.5L7 74"></path><linearGradient x1=-1016.59 x2=-1017.862 y1=852.671 y2=852.595 gradientTransform="matrix(29 0 0 -8 29523 6971)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M34 146l-29 8"></path><linearGradient x1=-1011.984 x2=-1013.257 y1=863.523 y2=863.229 gradientTransform="matrix(24 0 0 -13 24339 11407)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M45 177l-24 13"></path><linearGradient x1=-1006.673 x2=-1007.946 y1=869.279 y2=868.376 gradientTransform="matrix(20 0 0 -19 20205 16720)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M67 204l-20 19"></path><linearGradient x1=-992.85 x2=-993.317 y1=871.258 y2=870.258 gradientTransform="matrix(13.8339 0 0 -22.8467 13825.796 20131.938)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M94.4 227l-13.8 22.8"></path><linearGradient x1=-953.835 x2=-953.965 y1=871.9 y2=870.9 gradientTransform="matrix(7.5 0 0 -24.5 7278 21605)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M127.5 243.5L120 268"></path><linearGradient x1=244.504 x2=244.496 y1=871.898 y2=870.898 gradientTransform="matrix(.5 0 0 -24.5 45.5 21614)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M167.5 252.5l.5 24.5">');function Pe(){const e=We();return(()=>{var w=tt(),O=w.firstChild.firstChild,F=O.nextSibling,M=F.nextSibling,L=M.firstChild,v=M.nextSibling,I=v.firstChild,G=v.nextSibling,c=G.nextSibling,x=c.firstChild,p=c.nextSibling,h=p.firstChild,u=p.nextSibling,T=u.nextSibling,H=T.firstChild,g=T.nextSibling,Y=g.firstChild,B=g.nextSibling,S=B.nextSibling,q=S.firstChild,o=S.nextSibling,N=o.firstChild,E=o.nextSibling,D=E.nextSibling,ee=D.firstChild,y=D.nextSibling,te=y.firstChild,b=y.nextSibling,z=b.nextSibling,J=z.firstChild,$=z.nextSibling,K=$.firstChild,R=$.nextSibling,A=R.nextSibling,l=A.firstChild,r=A.nextSibling,d=r.firstChild,n=r.nextSibling,a=n.firstChild.nextSibling,f=a.nextSibling,i=n.nextSibling,s=i.firstChild,m=i.nextSibling,P=m.firstChild,k=m.nextSibling,_=k.firstChild,ie=_.nextSibling,le=ie.nextSibling,re=le.nextSibling,ne=re.nextSibling,oe=ne.nextSibling,se=oe.nextSibling,ae=se.nextSibling,de=ae.nextSibling,fe=de.nextSibling,ce=fe.nextSibling,pe=ce.nextSibling,ue=pe.nextSibling,Le=ue.nextSibling,ge=k.nextSibling,Ie=ge.firstChild,V=ge.nextSibling,He=V.firstChild,xe=V.nextSibling,Q=xe.nextSibling,he=Q.nextSibling,Ye=he.firstChild,W=he.nextSibling,qe=W.firstChild,$e=W.nextSibling,me=$e.firstChild.firstChild,ke=me.nextSibling,ve=ke.nextSibling,Se=ve.nextSibling,ye=Se.nextSibling,be=ye.nextSibling,_e=be.nextSibling,Ce=_e.nextSibling,Ue=Ce.nextSibling,we=Ue.nextSibling,Oe=we.nextSibling,Fe=Oe.nextSibling,Me=Fe.nextSibling,Ge=Me.nextSibling,Te=Ge.nextSibling,Be=Te.nextSibling,Ee=Be.nextSibling,Ne=Ee.nextSibling;return t(O,"id",`a-${e}`),t(F,"fill",`url(#a-${e})`),t(L,"id",`b-${e}`),t(v,"id",`c-${e}`),t(I,"filter",`url(#b-${e})`),t(G,"mask",`url(#c-${e})`),t(x,"id",`d-${e}`),t(p,"id",`e-${e}`),t(h,"filter",`url(#d-${e})`),t(u,"mask",`url(#e-${e})`),t(H,"id",`f-${e}`),t(g,"id",`g-${e}`),t(Y,"filter",`url(#f-${e})`),t(B,"mask",`url(#g-${e})`),t(q,"id",`h-${e}`),t(o,"id",`i-${e}`),t(N,"filter",`url(#h-${e})`),t(E,"mask",`url(#i-${e})`),t(ee,"id",`j-${e}`),t(y,"id",`k-${e}`),t(te,"filter",`url(#j-${e})`),t(b,"mask",`url(#k-${e})`),t(J,"id",`l-${e}`),t($,"id",`m-${e}`),t(K,"filter",`url(#l-${e})`),t(R,"mask",`url(#m-${e})`),t(l,"id",`n-${e}`),t(r,"id",`o-${e}`),t(d,"filter",`url(#n-${e})`),t(n,"mask",`url(#o-${e})`),t(a,"id",`p-${e}`),t(f,"fill",`url(#p-${e})`),t(s,"id",`q-${e}`),t(m,"id",`r-${e}`),t(P,"filter",`url(#q-${e})`),t(k,"mask",`url(#r-${e})`),t(_,"id",`s-${e}`),t(ie,"fill",`url(#s-${e})`),t(le,"id",`t-${e}`),t(re,"fill",`url(#t-${e})`),t(ne,"id",`u-${e}`),t(oe,"fill",`url(#u-${e})`),t(se,"id",`v-${e}`),t(ae,"fill",`url(#v-${e})`),t(de,"id",`w-${e}`),t(fe,"fill",`url(#w-${e})`),t(ce,"id",`x-${e}`),t(pe,"fill",`url(#x-${e})`),t(ue,"id",`y-${e}`),t(Le,"fill",`url(#y-${e})`),t(Ie,"id",`z-${e}`),t(V,"id",`A-${e}`),t(He,"filter",`url(#z-${e})`),t(xe,"id",`B-${e}`),t(Q,"fill",`url(#B-${e})`),t(Q,"mask",`url(#A-${e})`),t(Ye,"id",`C-${e}`),t(W,"id",`D-${e}`),t(qe,"filter",`url(#C-${e})`),t($e,"mask",`url(#D-${e})`),t(me,"id",`E-${e}`),t(ke,"fill",`url(#E-${e})`),t(ve,"id",`F-${e}`),t(Se,"stroke",`url(#F-${e})`),t(ye,"id",`G-${e}`),t(be,"stroke",`url(#G-${e})`),t(_e,"id",`H-${e}`),t(Ce,"stroke",`url(#H-${e})`),t(Ue,"id",`I-${e}`),t(we,"stroke",`url(#I-${e})`),t(Oe,"id",`J-${e}`),t(Fe,"stroke",`url(#J-${e})`),t(Me,"id",`K-${e}`),t(Ge,"stroke",`url(#K-${e})`),t(Te,"id",`L-${e}`),t(Be,"stroke",`url(#L-${e})`),t(Ee,"id",`M-${e}`),t(Ne,"stroke",`url(#M-${e})`),w})()}var it=je("<button type=button><div><div></div><div></div></div><div>-</div><div>TanStack Router");function ot({initialIsOpen:e,panelProps:w={},closeButtonProps:O={},toggleButtonProps:F={},position:M="bottom-left",containerElement:L="footer",router:v,routerState:I,shadowDOMTarget:G}){const[c,x]=X();let p;const[h,u]=Re("tanstackRouterDevtoolsOpen",e),[T,H]=Re("tanstackRouterDevtoolsHeight",null),[g,Y]=X(!1),[B,S]=X(!1),q=Xe(),o=Ze(),N=(l,r)=>{if(r.button!==0)return;S(!0);const d={originalHeight:(l==null?void 0:l.getBoundingClientRect().height)??0,pageY:r.pageY},n=f=>{const i=d.pageY-f.pageY,s=d.originalHeight+i;H(s),s<70?u(!1):u(!0)},a=()=>{S(!1),document.removeEventListener("mousemove",n),document.removeEventListener("mouseUp",a)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)};h(),Z(()=>{Y(h()??!1)}),Z(()=>{var l,r,d;if(g()){const n=(r=(l=c())==null?void 0:l.parentElement)==null?void 0:r.style.paddingBottom,a=()=>{var i;const f=p.getBoundingClientRect().height;(i=c())!=null&&i.parentElement&&x(s=>(s!=null&&s.parentElement&&(s.parentElement.style.paddingBottom=`${f}px`),s))};if(a(),typeof window<"u")return window.addEventListener("resize",a),()=>{var f;window.removeEventListener("resize",a),(f=c())!=null&&f.parentElement&&typeof n=="string"&&x(i=>(i.parentElement.style.paddingBottom=n,i))}}else(d=c())!=null&&d.parentElement&&x(n=>(n!=null&&n.parentElement&&n.parentElement.removeAttribute("style"),n))}),Z(()=>{if(c()){const l=c(),r=getComputedStyle(l).fontSize;l==null||l.style.setProperty("--tsrd-font-size",r)}});const{style:E={},...D}=w,{style:ee={},onClick:y,...te}=O,{onClick:b,class:z,...J}=F;if(!q())return null;const $=j(()=>T()??500),K=j(()=>Ae(o().devtoolsPanelContainer,o().devtoolsPanelContainerVisibility(!!h()),o().devtoolsPanelContainerResizing(B),o().devtoolsPanelContainerAnimation(g(),$()+16))),R=j(()=>({height:`${$()}px`,...E||{}})),A=j(()=>Ae(o().mainCloseBtn,o().mainCloseBtnPosition(M),o().mainCloseBtnAnimation(!!h()),z));return C(Qe,{component:L,ref:x,class:"TanStackRouterDevtools",get children(){return[C(Je.Provider,{value:{onCloseClick:y??(()=>{})},get children(){return C(et,De({ref(l){var r=p;typeof r=="function"?r(l):p=l}},D,{router:v,routerState:I,className:K,style:R,get isOpen(){return g()},setIsOpen:u,handleDragStart:l=>N(p,l),shadowDOMTarget:G}))}}),(()=>{var l=it(),r=l.firstChild,d=r.firstChild,n=d.nextSibling,a=r.nextSibling,f=a.nextSibling;return Ke(l,De(J,{"aria-label":"Open TanStack Router Devtools",onClick:i=>{u(!0),b&&b(i)},get class(){return A()}}),!1,!0),ze(d,C(Pe,{})),ze(n,C(Pe,{})),Ve(i=>{var s=o().mainCloseBtnIconContainer,m=o().mainCloseBtnIconOuter,P=o().mainCloseBtnIconInner,k=o().mainCloseBtnDivider,_=o().routerLogoCloseButton;return s!==i.e&&U(r,i.e=s),m!==i.t&&U(d,i.t=m),P!==i.a&&U(n,i.a=P),k!==i.o&&U(a,i.o=k),_!==i.i&&U(f,i.i=_),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),l})()]}})}export{ot as FloatingTanStackRouterDevtools,ot as default};
@@ -0,0 +1 @@
1
+ import{c as X,a as Z,b as j,d as C,D as Je,m as De,s as Ke,i as ze,e as Ve,f as U,g as Qe,t as je,h as We,j as t}from"./index-C6SlFkyv.js";import{n as Re,t as Xe,r as Ze,BaseTanStackRouterDevtoolsPanel as et}from"./BaseTanStackRouterDevtoolsPanel-SWyE65Is-DBeTmo8s.js";import{n as Ae}from"./index-BZYDK9c8.js";var tt=je('<svg xmlns=http://www.w3.org/2000/svg enable-background="new 0 0 634 633"viewBox="0 0 634 633"><g transform=translate(1)><linearGradient x1=-641.486 x2=-641.486 y1=856.648 y2=855.931 gradientTransform="matrix(633 0 0 -633 406377 542258)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#6bdaff></stop><stop offset=0.319 stop-color=#f9ffb5></stop><stop offset=0.706 stop-color=#ffa770></stop><stop offset=1 stop-color=#ff7373></stop></linearGradient><circle cx=316.5 cy=316.5 r=316.5 fill-rule=evenodd clip-rule=evenodd></circle><defs><filter width=454 height=396.9 x=-137.5 y=412 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=412 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=610.5 fill=#015064 fill-rule=evenodd stroke=#00CFE2 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=412 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=412 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=610.5 fill=#015064 fill-rule=evenodd stroke=#00CFE2 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=-137.5 y=450 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=450 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=648.5 fill=#015064 fill-rule=evenodd stroke=#00A8B8 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=450 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=450 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=648.5 fill=#015064 fill-rule=evenodd stroke=#00A8B8 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=-137.5 y=486 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=-137.5 y=486 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=89.5 cy=684.5 fill=#015064 fill-rule=evenodd stroke=#007782 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=454 height=396.9 x=316.5 y=486 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=454 height=396.9 x=316.5 y=486 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><ellipse cx=543.5 cy=684.5 fill=#015064 fill-rule=evenodd stroke=#007782 stroke-width=25 clip-rule=evenodd rx=214.5 ry=186></ellipse><defs><filter width=176.9 height=129.3 x=272.2 y=308 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=176.9 height=129.3 x=272.2 y=308 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><path fill=none stroke=#000 stroke-linecap=round stroke-linejoin=bevel stroke-width=11 d="M436 403.2l-5 28.6m-140-90.3l-10.9 62m52.8-19.4l-4.3 27.1"></path><linearGradient x1=-645.656 x2=-646.499 y1=854.878 y2=854.788 gradientTransform="matrix(-184.159 -32.4722 11.4608 -64.9973 -128419.844 34938.836)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ee2700></stop><stop offset=1 stop-color=#ff008e></stop></linearGradient><path fill-rule=evenodd d="M344.1 363l97.7 17.2c5.8 2.1 8.2 6.2 7.1 12.1-1 5.9-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1.8-12.8 3.7-3.7 8.3-4.4 13.7-2.1l55.2 53.6z"clip-rule=evenodd></path><path fill=#D8D8D8 fill-rule=evenodd stroke=#FFF stroke-linecap=round stroke-linejoin=bevel stroke-width=7 d="M428.3 384.5l.9-6.5m-33.9 1.5l.9-6.5m-34 .5l.9-6.1m-38.9-16.1l4.2-3.9m-25.2-16.1l4.2-3.9"clip-rule=evenodd></path></g><defs><filter width=280.6 height=317.4 x=73.2 y=113.9 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=280.6 height=317.4 x=73.2 y=113.9 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><linearGradient x1=-646.8 x2=-646.8 y1=854.844 y2=853.844 gradientTransform="matrix(-100.1751 48.8587 -97.9753 -200.879 19124.773 203538.61)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#a17500></stop><stop offset=1 stop-color=#5d2100></stop></linearGradient><path fill-rule=evenodd d="M192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.2-2.9 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6-3.4-18.7-10.8-51.8-22.2-99.6l-25.3 4.6"clip-rule=evenodd></path><linearGradient x1=-635.467 x2=-635.467 y1=852.115 y2=851.115 gradientTransform="matrix(92.6873 4.8575 2.0257 -38.6535 57323.695 36176.047)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z"clip-rule=evenodd></path><linearGradient x1=-636.573 x2=-636.573 y1=855.444 y2=854.444 gradientTransform="matrix(109.9945 5.7646 6.3597 -121.3507 64719.133 107659.336)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.3 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20 49.6-53.1 49.6-53.1z"clip-rule=evenodd></path><linearGradient x1=-632.145 x2=-632.145 y1=854.174 y2=853.174 gradientTransform="matrix(62.9558 3.2994 3.5021 -66.8246 37035.367 59284.227)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M195 183.9c-.8-21.9 6-38 20.6-48.2 14.6-10.2 29.8-15.3 45.5-15.3-6.1 21.4-14.5 35.8-25.2 43.4-10.7 7.5-24.4 14.2-40.9 20.1z"clip-rule=evenodd></path><linearGradient x1=-638.224 x2=-638.224 y1=853.801 y2=852.801 gradientTransform="matrix(152.4666 7.9904 3.0934 -59.0251 94939.86 55646.855)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c31.9-30 64.1-39.7 96.7-29 32.6 10.7 50.8 30.4 54.6 59.1-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z"clip-rule=evenodd></path><linearGradient x1=-637.723 x2=-637.723 y1=855.103 y2=854.103 gradientTransform="matrix(136.467 7.1519 5.2165 -99.5377 82830.875 89859.578)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c35.8-7.6 65.6-.2 89.2 22 23.6 22.2 37.7 49 42.3 80.3-39.8-9.7-68.3-23.8-85.5-42.4-17.2-18.5-32.5-38.5-46-59.9z"clip-rule=evenodd></path><linearGradient x1=-631.79 x2=-631.79 y1=855.872 y2=854.872 gradientTransform="matrix(60.8683 3.19 8.7771 -167.4773 31110.818 145537.61)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#2f8a00></stop><stop offset=1 stop-color=#90ff57></stop></linearGradient><path fill-rule=evenodd stroke=#2F8A00 stroke-width=13 d="M194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6-6.5 29.9-3.6 63.1 8.7 99.6 27.4-40.3 43.2-69.6 47.4-88 4.2-18.3 5.5-44.1 4-77.2z"clip-rule=evenodd></path><path fill=none stroke=#2F8A00 stroke-linecap=round stroke-width=8 d="M196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4-5.7 18-9.4 33-11.1 45.1"></path><path fill=none stroke=#2F8A00 stroke-linecap=round stroke-width=8 d="M194.8 185.7c-24.4 1.7-43.8 9-58.1 21.8-14.3 12.8-24.7 25.4-31.3 37.8m99.1-68.9c29.7-6.7 52-8.4 67-5 15 3.4 26.9 8.7 35.8 15.9m-110.8-5.9c20.3 9.9 38.2 20.5 53.9 31.9 15.7 11.4 27.4 22.1 35.1 32"></path></g><defs><filter width=532 height=633 x=50.5 y=399 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=532 height=633 x=50.5 y=399 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><linearGradient x1=-641.104 x2=-641.278 y1=856.577 y2=856.183 gradientTransform="matrix(532 0 0 -633 341484.5 542657)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#fff400></stop><stop offset=1 stop-color=#3c8700></stop></linearGradient><ellipse cx=316.5 cy=715.5 fill-rule=evenodd clip-rule=evenodd rx=266 ry=316.5></ellipse><defs><filter width=288 height=283 x=391 y=-24 filterUnits=userSpaceOnUse><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask width=288 height=283 x=391 y=-24 maskUnits=userSpaceOnUse><g><circle cx=316.5 cy=316.5 r=316.5 fill=#FFF fill-rule=evenodd clip-rule=evenodd></circle></g></mask><g><g transform="translate(397 -24)"><linearGradient x1=-1036.672 x2=-1036.672 y1=880.018 y2=879.018 gradientTransform="matrix(227 0 0 -227 235493 199764)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffdf00></stop><stop offset=1 stop-color=#ff9d00></stop></linearGradient><circle cx=168.5 cy=113.5 r=113.5 fill-rule=evenodd clip-rule=evenodd></circle><linearGradient x1=-1017.329 x2=-1018.602 y1=658.003 y2=657.998 gradientTransform="matrix(30 0 0 -1 30558 771)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M30 113H0"></path><linearGradient x1=-1014.501 x2=-1015.774 y1=839.985 y2=839.935 gradientTransform="matrix(26.5 0 0 -5.5 26925 4696.5)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M33.5 79.5L7 74"></path><linearGradient x1=-1016.59 x2=-1017.862 y1=852.671 y2=852.595 gradientTransform="matrix(29 0 0 -8 29523 6971)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M34 146l-29 8"></path><linearGradient x1=-1011.984 x2=-1013.257 y1=863.523 y2=863.229 gradientTransform="matrix(24 0 0 -13 24339 11407)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M45 177l-24 13"></path><linearGradient x1=-1006.673 x2=-1007.946 y1=869.279 y2=868.376 gradientTransform="matrix(20 0 0 -19 20205 16720)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M67 204l-20 19"></path><linearGradient x1=-992.85 x2=-993.317 y1=871.258 y2=870.258 gradientTransform="matrix(13.8339 0 0 -22.8467 13825.796 20131.938)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M94.4 227l-13.8 22.8"></path><linearGradient x1=-953.835 x2=-953.965 y1=871.9 y2=870.9 gradientTransform="matrix(7.5 0 0 -24.5 7278 21605)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M127.5 243.5L120 268"></path><linearGradient x1=244.504 x2=244.496 y1=871.898 y2=870.898 gradientTransform="matrix(.5 0 0 -24.5 45.5 21614)"gradientUnits=userSpaceOnUse><stop offset=0 stop-color=#ffa400></stop><stop offset=1 stop-color=#ff5e00></stop></linearGradient><path fill=none stroke-linecap=round stroke-linejoin=bevel stroke-width=12 d="M167.5 252.5l.5 24.5">');function Pe(){const e=We();return(()=>{var w=tt(),O=w.firstChild.firstChild,F=O.nextSibling,M=F.nextSibling,L=M.firstChild,v=M.nextSibling,I=v.firstChild,G=v.nextSibling,c=G.nextSibling,x=c.firstChild,p=c.nextSibling,h=p.firstChild,u=p.nextSibling,T=u.nextSibling,H=T.firstChild,g=T.nextSibling,Y=g.firstChild,B=g.nextSibling,S=B.nextSibling,q=S.firstChild,o=S.nextSibling,N=o.firstChild,E=o.nextSibling,D=E.nextSibling,ee=D.firstChild,y=D.nextSibling,te=y.firstChild,b=y.nextSibling,z=b.nextSibling,J=z.firstChild,$=z.nextSibling,K=$.firstChild,R=$.nextSibling,A=R.nextSibling,l=A.firstChild,r=A.nextSibling,d=r.firstChild,n=r.nextSibling,a=n.firstChild.nextSibling,f=a.nextSibling,i=n.nextSibling,s=i.firstChild,m=i.nextSibling,P=m.firstChild,k=m.nextSibling,_=k.firstChild,ie=_.nextSibling,le=ie.nextSibling,re=le.nextSibling,ne=re.nextSibling,oe=ne.nextSibling,se=oe.nextSibling,ae=se.nextSibling,de=ae.nextSibling,fe=de.nextSibling,ce=fe.nextSibling,pe=ce.nextSibling,ue=pe.nextSibling,Le=ue.nextSibling,ge=k.nextSibling,Ie=ge.firstChild,V=ge.nextSibling,He=V.firstChild,xe=V.nextSibling,Q=xe.nextSibling,he=Q.nextSibling,Ye=he.firstChild,W=he.nextSibling,qe=W.firstChild,$e=W.nextSibling,me=$e.firstChild.firstChild,ke=me.nextSibling,ve=ke.nextSibling,Se=ve.nextSibling,ye=Se.nextSibling,be=ye.nextSibling,_e=be.nextSibling,Ce=_e.nextSibling,Ue=Ce.nextSibling,we=Ue.nextSibling,Oe=we.nextSibling,Fe=Oe.nextSibling,Me=Fe.nextSibling,Ge=Me.nextSibling,Te=Ge.nextSibling,Be=Te.nextSibling,Ee=Be.nextSibling,Ne=Ee.nextSibling;return t(O,"id",`a-${e}`),t(F,"fill",`url(#a-${e})`),t(L,"id",`b-${e}`),t(v,"id",`c-${e}`),t(I,"filter",`url(#b-${e})`),t(G,"mask",`url(#c-${e})`),t(x,"id",`d-${e}`),t(p,"id",`e-${e}`),t(h,"filter",`url(#d-${e})`),t(u,"mask",`url(#e-${e})`),t(H,"id",`f-${e}`),t(g,"id",`g-${e}`),t(Y,"filter",`url(#f-${e})`),t(B,"mask",`url(#g-${e})`),t(q,"id",`h-${e}`),t(o,"id",`i-${e}`),t(N,"filter",`url(#h-${e})`),t(E,"mask",`url(#i-${e})`),t(ee,"id",`j-${e}`),t(y,"id",`k-${e}`),t(te,"filter",`url(#j-${e})`),t(b,"mask",`url(#k-${e})`),t(J,"id",`l-${e}`),t($,"id",`m-${e}`),t(K,"filter",`url(#l-${e})`),t(R,"mask",`url(#m-${e})`),t(l,"id",`n-${e}`),t(r,"id",`o-${e}`),t(d,"filter",`url(#n-${e})`),t(n,"mask",`url(#o-${e})`),t(a,"id",`p-${e}`),t(f,"fill",`url(#p-${e})`),t(s,"id",`q-${e}`),t(m,"id",`r-${e}`),t(P,"filter",`url(#q-${e})`),t(k,"mask",`url(#r-${e})`),t(_,"id",`s-${e}`),t(ie,"fill",`url(#s-${e})`),t(le,"id",`t-${e}`),t(re,"fill",`url(#t-${e})`),t(ne,"id",`u-${e}`),t(oe,"fill",`url(#u-${e})`),t(se,"id",`v-${e}`),t(ae,"fill",`url(#v-${e})`),t(de,"id",`w-${e}`),t(fe,"fill",`url(#w-${e})`),t(ce,"id",`x-${e}`),t(pe,"fill",`url(#x-${e})`),t(ue,"id",`y-${e}`),t(Le,"fill",`url(#y-${e})`),t(Ie,"id",`z-${e}`),t(V,"id",`A-${e}`),t(He,"filter",`url(#z-${e})`),t(xe,"id",`B-${e}`),t(Q,"fill",`url(#B-${e})`),t(Q,"mask",`url(#A-${e})`),t(Ye,"id",`C-${e}`),t(W,"id",`D-${e}`),t(qe,"filter",`url(#C-${e})`),t($e,"mask",`url(#D-${e})`),t(me,"id",`E-${e}`),t(ke,"fill",`url(#E-${e})`),t(ve,"id",`F-${e}`),t(Se,"stroke",`url(#F-${e})`),t(ye,"id",`G-${e}`),t(be,"stroke",`url(#G-${e})`),t(_e,"id",`H-${e}`),t(Ce,"stroke",`url(#H-${e})`),t(Ue,"id",`I-${e}`),t(we,"stroke",`url(#I-${e})`),t(Oe,"id",`J-${e}`),t(Fe,"stroke",`url(#J-${e})`),t(Me,"id",`K-${e}`),t(Ge,"stroke",`url(#K-${e})`),t(Te,"id",`L-${e}`),t(Be,"stroke",`url(#L-${e})`),t(Ee,"id",`M-${e}`),t(Ne,"stroke",`url(#M-${e})`),w})()}var it=je("<button type=button><div><div></div><div></div></div><div>-</div><div>TanStack Router");function ot({initialIsOpen:e,panelProps:w={},closeButtonProps:O={},toggleButtonProps:F={},position:M="bottom-left",containerElement:L="footer",router:v,routerState:I,shadowDOMTarget:G}){const[c,x]=X();let p;const[h,u]=Re("tanstackRouterDevtoolsOpen",e),[T,H]=Re("tanstackRouterDevtoolsHeight",null),[g,Y]=X(!1),[B,S]=X(!1),q=Xe(),o=Ze(),N=(l,r)=>{if(r.button!==0)return;S(!0);const d={originalHeight:(l==null?void 0:l.getBoundingClientRect().height)??0,pageY:r.pageY},n=f=>{const i=d.pageY-f.pageY,s=d.originalHeight+i;H(s),s<70?u(!1):u(!0)},a=()=>{S(!1),document.removeEventListener("mousemove",n),document.removeEventListener("mouseUp",a)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",a)};h(),Z(()=>{Y(h()??!1)}),Z(()=>{var l,r,d;if(g()){const n=(r=(l=c())==null?void 0:l.parentElement)==null?void 0:r.style.paddingBottom,a=()=>{var i;const f=p.getBoundingClientRect().height;(i=c())!=null&&i.parentElement&&x(s=>(s!=null&&s.parentElement&&(s.parentElement.style.paddingBottom=`${f}px`),s))};if(a(),typeof window<"u")return window.addEventListener("resize",a),()=>{var f;window.removeEventListener("resize",a),(f=c())!=null&&f.parentElement&&typeof n=="string"&&x(i=>(i.parentElement.style.paddingBottom=n,i))}}else(d=c())!=null&&d.parentElement&&x(n=>(n!=null&&n.parentElement&&n.parentElement.removeAttribute("style"),n))}),Z(()=>{if(c()){const l=c(),r=getComputedStyle(l).fontSize;l==null||l.style.setProperty("--tsrd-font-size",r)}});const{style:E={},...D}=w,{style:ee={},onClick:y,...te}=O,{onClick:b,class:z,...J}=F;if(!q())return null;const $=j(()=>T()??500),K=j(()=>Ae(o().devtoolsPanelContainer,o().devtoolsPanelContainerVisibility(!!h()),o().devtoolsPanelContainerResizing(B),o().devtoolsPanelContainerAnimation(g(),$()+16))),R=j(()=>({height:`${$()}px`,...E||{}})),A=j(()=>Ae(o().mainCloseBtn,o().mainCloseBtnPosition(M),o().mainCloseBtnAnimation(!!h()),z));return C(Qe,{component:L,ref:x,class:"TanStackRouterDevtools",get children(){return[C(Je.Provider,{value:{onCloseClick:y??(()=>{})},get children(){return C(et,De({ref(l){var r=p;typeof r=="function"?r(l):p=l}},D,{router:v,routerState:I,className:K,style:R,get isOpen(){return g()},setIsOpen:u,handleDragStart:l=>N(p,l),shadowDOMTarget:G}))}}),(()=>{var l=it(),r=l.firstChild,d=r.firstChild,n=d.nextSibling,a=r.nextSibling,f=a.nextSibling;return Ke(l,De(J,{"aria-label":"Open TanStack Router Devtools",onClick:i=>{u(!0),b&&b(i)},get class(){return A()}}),!1,!0),ze(d,C(Pe,{})),ze(n,C(Pe,{})),Ve(i=>{var s=o().mainCloseBtnIconContainer,m=o().mainCloseBtnIconOuter,P=o().mainCloseBtnIconInner,k=o().mainCloseBtnDivider,_=o().routerLogoCloseButton;return s!==i.e&&U(r,i.e=s),m!==i.t&&U(d,i.t=m),P!==i.a&&U(n,i.a=P),k!==i.o&&U(a,i.o=k),_!==i.i&&U(f,i.i=_),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),l})()]}})}export{ot as FloatingTanStackRouterDevtools,ot as default};
@@ -1,4 +1,4 @@
1
- var Z_=Object.defineProperty;var eE=(r,e,t)=>e in r?Z_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Qt=(r,e,t)=>eE(r,typeof e!="symbol"?e+"":e,t);import{r as Nd,j as fb}from"./index-sKKm7yEm.js";/**
1
+ var Z_=Object.defineProperty;var eE=(r,e,t)=>e in r?Z_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Qt=(r,e,t)=>eE(r,typeof e!="symbol"?e+"":e,t);import{r as Nd,j as fb}from"./index-BNSNg7yH.js";/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause