turtlecode 0.3.11 → 0.3.23

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 (125) hide show
  1. package/assets/assets/58eaeb4e52248a5c75936c6f4c33a370-TQ-VM369.svg +137 -0
  2. package/assets/assets/{_basePickBy-CJ0iZZpY.js → _basePickBy-DL9IPz8d.js} +1 -1
  3. package/assets/assets/{_baseUniq-Ff_gEw0V.js → _baseUniq-BoADw_d0.js} +1 -1
  4. package/assets/assets/{arc-BXWqydYn.js → arc-BMNDPXSl.js} +1 -1
  5. package/assets/assets/{architectureDiagram-2XIMDMQ5-CJbS5v-n.js → architectureDiagram-2XIMDMQ5-eXL2viB8.js} +1 -1
  6. package/assets/assets/{auth-callback-BLFOO68M.js → auth-callback-Bo_aWjxO.js} +1 -1
  7. package/assets/assets/{blockDiagram-WCTKOSBZ-D8k7ohbV.js → blockDiagram-WCTKOSBZ-H85W6xMJ.js} +1 -1
  8. package/assets/assets/{c4Diagram-IC4MRINW-0bj9OFcQ.js → c4Diagram-IC4MRINW-DMTrPOCa.js} +1 -1
  9. package/assets/assets/channel-B-VkusD5.js +1 -0
  10. package/assets/assets/{chunk-4BX2VUAB-Bsl_oCUb.js → chunk-4BX2VUAB-BkYTT9R-.js} +1 -1
  11. package/assets/assets/{chunk-55IACEB6-BT0s5uc_.js → chunk-55IACEB6-DT1jWOUb.js} +1 -1
  12. package/assets/assets/{chunk-FMBD7UC4-SQz3mX6W.js → chunk-FMBD7UC4-BTI-XlSn.js} +1 -1
  13. package/assets/assets/{chunk-JSJVCQXG-DhvTUdKL.js → chunk-JSJVCQXG-DtI53WG4.js} +1 -1
  14. package/assets/assets/{chunk-KX2RTZJC-CR3J0asp.js → chunk-KX2RTZJC-Bjpt-m3D.js} +1 -1
  15. package/assets/assets/{chunk-NQ4KR5QH-D_SSWx-G.js → chunk-NQ4KR5QH-CmeD9-yz.js} +1 -1
  16. package/assets/assets/{chunk-QZHKN3VN-BhGlpFzS.js → chunk-QZHKN3VN-BTFiIbVY.js} +1 -1
  17. package/assets/assets/{chunk-WL4C6EOR-Cfh3g_wP.js → chunk-WL4C6EOR-CJ9o7iVM.js} +1 -1
  18. package/assets/assets/classDiagram-VBA2DB6C-C-ropUI3.js +1 -0
  19. package/assets/assets/classDiagram-v2-RAHNMMFH-C-ropUI3.js +1 -0
  20. package/assets/assets/clone-CFFEjbU2.js +1 -0
  21. package/assets/assets/{connection-popover-CA_KV_fa.js → connection-popover-CLXQpTQj.js} +1 -1
  22. package/assets/assets/{context-popover-B6cmyVJz.js → context-popover-DfHXjhOx.js} +1 -1
  23. package/assets/assets/{cose-bilkent-S5V4N54A-DVq0CNvh.js → cose-bilkent-S5V4N54A-BhZXDkvV.js} +1 -1
  24. package/assets/assets/{cssMode-DHUfA-h9.js → cssMode-l2SJhb2i.js} +2 -2
  25. package/assets/assets/{dagre-KLK3FWXG-CYjfkd42.js → dagre-KLK3FWXG-DtiZbLuc.js} +1 -1
  26. package/assets/assets/{diagram-E7M64L7V-x-iI-6YJ.js → diagram-E7M64L7V-CW1lZCyH.js} +1 -1
  27. package/assets/assets/{diagram-IFDJBPK2-Cecwm9R9.js → diagram-IFDJBPK2-Db2g7I70.js} +1 -1
  28. package/assets/assets/{diagram-P4PSJMXO-CyKV1e0e.js → diagram-P4PSJMXO-BUfU8KO-.js} +1 -1
  29. package/assets/assets/{dialog-clone-project-CTom8vZq.js → dialog-clone-project-BWg5CxXN.js} +1 -1
  30. package/assets/assets/dialog-connect-provider-Ch23U0DG.js +2 -0
  31. package/assets/assets/{dialog-create-project-BPLZmIBj.js → dialog-create-project-hV4lJGVR.js} +1 -1
  32. package/assets/assets/{dialog-edit-project-DYofZYDR.js → dialog-edit-project-DpPnlKJL.js} +1 -1
  33. package/assets/assets/dialog-fork-BAqzkh_T.js +1 -0
  34. package/assets/assets/dialog-manage-models-CR0Dw6KE.js +1 -0
  35. package/assets/assets/dialog-select-directory-97JJ7Yb-.js +5 -0
  36. package/assets/assets/dialog-select-file-B_o52Q2X.js +1 -0
  37. package/assets/assets/dialog-select-mcp-u2kkqhGU.js +1 -0
  38. package/assets/assets/dialog-select-model-unpaid-C6RP1dAD.js +2 -0
  39. package/assets/assets/{dialog-select-provider-CvV5EJ9p.js → dialog-select-provider-BQqjRbS8.js} +1 -1
  40. package/assets/assets/dialog-select-server-Bphwacs-.js +1 -0
  41. package/assets/assets/dialog-settings-ChnTBHFF.js +1 -0
  42. package/assets/assets/{erDiagram-INFDFZHY-CrbnVRp_.js → erDiagram-INFDFZHY-CrO7khAp.js} +1 -1
  43. package/assets/assets/{flowDiagram-PKNHOUZH-i7TEJECE.js → flowDiagram-PKNHOUZH-BjYb-wxV.js} +1 -1
  44. package/assets/assets/{freemarker2-D0d_IFPo.js → freemarker2-DpZw2YqU.js} +2 -2
  45. package/assets/assets/{ganttDiagram-A5KZAMGK-13gHjNi6.js → ganttDiagram-A5KZAMGK-DEQkpJjm.js} +3 -3
  46. package/assets/assets/{ghostty-web-BKP_KJbF.js → ghostty-web-BSIEXrpM.js} +4 -4
  47. package/assets/assets/{gitGraphDiagram-K3NZZRJ6-DxAm2mQu.js → gitGraphDiagram-K3NZZRJ6-DwUSR09X.js} +1 -1
  48. package/assets/assets/{graph-C2ZN9EV0.js → graph-CtH8ZjFb.js} +1 -1
  49. package/assets/assets/{handlebars-D91vh_PS.js → handlebars-GOy2OLfD.js} +2 -2
  50. package/assets/assets/home-Dg23VJKh.js +1 -0
  51. package/assets/assets/{html-D40RLrB-.js → html-CviWPcrp.js} +2 -2
  52. package/assets/assets/{htmlMode-C8dl_pDf.js → htmlMode-B65efrcI.js} +3 -3
  53. package/assets/assets/index-BawkOegm.js +3512 -0
  54. package/assets/assets/index-D0DTn_ER.css +6 -0
  55. package/assets/assets/{infoDiagram-LFFYTUFH-Bbet4n_c.js → infoDiagram-LFFYTUFH-DzpNmWGA.js} +1 -1
  56. package/assets/assets/{ishikawaDiagram-PHBUUO56-DODPmu-a.js → ishikawaDiagram-PHBUUO56-CsuWDWwK.js} +1 -1
  57. package/assets/assets/{javascript-DeDye8d4.js → javascript-L4wILu8Q.js} +2 -2
  58. package/assets/assets/{journeyDiagram-4ABVD52K-l_4CYJ2r.js → journeyDiagram-4ABVD52K-DvqSVsYn.js} +1 -1
  59. package/assets/assets/{jsonMode-CEB9U1Lv.js → jsonMode-BoZY-mRu.js} +3 -3
  60. package/assets/assets/{kanban-definition-K7BYSVSG-CnZByQ7N.js → kanban-definition-K7BYSVSG-DXa__5Sm.js} +1 -1
  61. package/assets/assets/{layout-CL7ocwjL.js → layout-C64ddrfO.js} +1 -1
  62. package/assets/assets/{liquid-DcoQtc11.js → liquid-CxH-o0Se.js} +2 -2
  63. package/assets/assets/list-CrMBY0Hl.js +1 -0
  64. package/assets/assets/{mdx-ZZS-OY0p.js → mdx-DiY_1Evw.js} +2 -2
  65. package/assets/assets/{mermaid.core-CvvapKs3.js → mermaid.core-C20mIhI4.js} +5 -5
  66. package/assets/assets/{mindmap-definition-YRQLILUH-BvHtH11v.js → mindmap-definition-YRQLILUH-nuzeSEuJ.js} +1 -1
  67. package/assets/assets/model-viewer-DXWYp1q7.js +3833 -0
  68. package/assets/assets/{pieDiagram-SKSYHLDU-CW-uoSdh.js → pieDiagram-SKSYHLDU-Cn7M1mJs.js} +1 -1
  69. package/assets/assets/{python-C-3-QbwK.js → python-DC4uQwuV.js} +2 -2
  70. package/assets/assets/{quadrantDiagram-337W2JSQ-DYJHGct0.js → quadrantDiagram-337W2JSQ-D4EwpHyD.js} +1 -1
  71. package/assets/assets/{razor-Chr_8CBz.js → razor-tn9cxD2A.js} +2 -2
  72. package/assets/assets/{requirementDiagram-Z7DCOOCP-CPP37j1u.js → requirementDiagram-Z7DCOOCP-e8FrBwg2.js} +1 -1
  73. package/assets/assets/{sankeyDiagram-WA2Y5GQK-CR3XkIpv.js → sankeyDiagram-WA2Y5GQK-DqdqgVRB.js} +1 -1
  74. package/assets/assets/select-C71K38b7.js +1 -0
  75. package/assets/assets/{sequenceDiagram-2WXFIKYE-Bnohd9Fv.js → sequenceDiagram-2WXFIKYE-CPorrKMA.js} +1 -1
  76. package/assets/assets/{server-row-CNa7oSJP.js → server-row-CTeoMzpI.js} +1 -1
  77. package/assets/assets/session-DGEvV6Eo.js +45 -0
  78. package/assets/assets/session-u2OSkes-.css +1 -0
  79. package/assets/assets/{stateDiagram-RAJIS63D-CB0R4FCc.js → stateDiagram-RAJIS63D-DiufrgEY.js} +1 -1
  80. package/assets/assets/stateDiagram-v2-FVOUBMTO-DYrqgyGL.js +1 -0
  81. package/assets/assets/{status-popover-body-uMa8Bn9c.js → status-popover-body-Cr6lUGSA.js} +2 -2
  82. package/assets/assets/{switch-CL32HGHZ.js → switch-ix-huecE.js} +1 -1
  83. package/assets/assets/{tabs-CZnn31zT.js → tabs-7QeVyXuu.js} +1 -1
  84. package/assets/assets/{tag-BesgAeYC.js → tag-DPqk6yRN.js} +1 -1
  85. package/assets/assets/{timeline-definition-YZTLITO2-CD7NX9rm.js → timeline-definition-YZTLITO2-B1XBZqWa.js} +1 -1
  86. package/assets/assets/{treemap-KZPCXAKY-Bh6w10Ud.js → treemap-KZPCXAKY-CFAfubzi.js} +1 -1
  87. package/assets/assets/{trellis-badge-demo-CqiOUgc8.js → trellis-badge-demo-uf3d7mPO.js} +1 -1
  88. package/assets/assets/{tsMode-DYilYoTX.js → tsMode-l3nOGsNB.js} +2 -2
  89. package/assets/assets/{typescript-ph1gaxk6.js → typescript-CD0qqirJ.js} +2 -2
  90. package/assets/assets/{vennDiagram-LZ73GAT5-Duv_AXKw.js → vennDiagram-LZ73GAT5-CAExGE02.js} +1 -1
  91. package/assets/assets/xlsx-editor-CQjlqJzW.js +117 -0
  92. package/assets/assets/xlsx-editor-DU1FXj8L.css +1 -0
  93. package/assets/assets/{xml-BNJmaPif.js → xml-KSsd_GUG.js} +2 -2
  94. package/assets/assets/{xychartDiagram-JWTSCODW-DjL-6DIA.js → xychartDiagram-JWTSCODW-BxpruhGL.js} +1 -1
  95. package/assets/assets/{yaml-C510_XYu.js → yaml-C-_4qrc6.js} +2 -2
  96. package/assets/draco/gltf/draco_decoder.js +33 -0
  97. package/assets/draco/gltf/draco_decoder.wasm +0 -0
  98. package/assets/draco/gltf/draco_wasm_wrapper.js +116 -0
  99. package/assets/index.html +3 -3
  100. package/bin/cli.mjs +67 -4
  101. package/package.json +14 -15
  102. package/assets/assets/channel-1twDmWF2.js +0 -1
  103. package/assets/assets/chunk-VVM5DH6Z-DRRCzDvY.js +0 -1
  104. package/assets/assets/classDiagram-VBA2DB6C-BcB4nqxi.js +0 -1
  105. package/assets/assets/classDiagram-v2-RAHNMMFH-BcB4nqxi.js +0 -1
  106. package/assets/assets/clone-CMiPkeXL.js +0 -1
  107. package/assets/assets/dialog-connect-provider-DS4Df_nV.js +0 -2
  108. package/assets/assets/dialog-fork-C4HuDX5_.js +0 -1
  109. package/assets/assets/dialog-manage-models-DIcmdLM_.js +0 -1
  110. package/assets/assets/dialog-select-directory-CnQXgJvA.js +0 -6
  111. package/assets/assets/dialog-select-file-Dy7mFs0P.js +0 -1
  112. package/assets/assets/dialog-select-mcp-BncaZqkj.js +0 -1
  113. package/assets/assets/dialog-select-model-unpaid-plu6lOV5.js +0 -2
  114. package/assets/assets/dialog-select-server-DKKoy9W8.js +0 -1
  115. package/assets/assets/dialog-settings-BzHHLYeu.js +0 -1
  116. package/assets/assets/home-CD0uMsMv.js +0 -1
  117. package/assets/assets/index-C0mqcMws.css +0 -1
  118. package/assets/assets/index-Dn8Qszh4.js +0 -2593
  119. package/assets/assets/jobs-popover-Dkvv3LHy.js +0 -1
  120. package/assets/assets/list-dkB1NV7F.js +0 -1
  121. package/assets/assets/select-vXOPytkX.js +0 -1
  122. package/assets/assets/session-TangtQ_5.js +0 -26
  123. package/assets/assets/stateDiagram-v2-FVOUBMTO-BkEbSv0L.js +0 -1
  124. package/assets/assets/trellis-C8s_TygI.js +0 -880
  125. package/assets/assets/trellis-CZsWDIog.css +0 -6
@@ -0,0 +1,116 @@
1
+ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(h){var n=0;return function(){return n<h.length?{done:!1,value:h[n++]}:{done:!0}}};$jscomp.arrayIterator=function(h){return{next:$jscomp.arrayIteratorImpl(h)}};$jscomp.makeIterator=function(h){var n="undefined"!=typeof Symbol&&Symbol.iterator&&h[Symbol.iterator];return n?n.call(h):$jscomp.arrayIterator(h)};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;
2
+ $jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.getGlobal=function(h){h=["object"==typeof globalThis&&globalThis,h,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var n=0;n<h.length;++n){var k=h[n];if(k&&k.Math==Math)return k}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
3
+ $jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(h,n,k){if(h==Array.prototype||h==Object.prototype)return h;h[n]=k.value;return h};$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";
4
+ var $jscomp$lookupPolyfilledValue=function(h,n){var k=$jscomp.propertyToPolyfillSymbol[n];if(null==k)return h[n];k=h[k];return void 0!==k?k:h[n]};$jscomp.polyfill=function(h,n,k,p){n&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(h,n,k,p):$jscomp.polyfillUnisolated(h,n,k,p))};
5
+ $jscomp.polyfillUnisolated=function(h,n,k,p){k=$jscomp.global;h=h.split(".");for(p=0;p<h.length-1;p++){var l=h[p];if(!(l in k))return;k=k[l]}h=h[h.length-1];p=k[h];n=n(p);n!=p&&null!=n&&$jscomp.defineProperty(k,h,{configurable:!0,writable:!0,value:n})};
6
+ $jscomp.polyfillIsolated=function(h,n,k,p){var l=h.split(".");h=1===l.length;p=l[0];p=!h&&p in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var y=0;y<l.length-1;y++){var f=l[y];if(!(f in p))return;p=p[f]}l=l[l.length-1];k=$jscomp.IS_SYMBOL_NATIVE&&"es6"===k?p[l]:null;n=n(k);null!=n&&(h?$jscomp.defineProperty($jscomp.polyfills,l,{configurable:!0,writable:!0,value:n}):n!==k&&(void 0===$jscomp.propertyToPolyfillSymbol[l]&&(k=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[l]=$jscomp.IS_SYMBOL_NATIVE?
7
+ $jscomp.global.Symbol(l):$jscomp.POLYFILL_PREFIX+k+"$"+l),$jscomp.defineProperty(p,$jscomp.propertyToPolyfillSymbol[l],{configurable:!0,writable:!0,value:n})))};
8
+ $jscomp.polyfill("Promise",function(h){function n(){this.batch_=null}function k(f){return f instanceof l?f:new l(function(q,u){q(f)})}if(h&&(!($jscomp.FORCE_POLYFILL_PROMISE||$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION&&"undefined"===typeof $jscomp.global.PromiseRejectionEvent)||!$jscomp.global.Promise||-1===$jscomp.global.Promise.toString().indexOf("[native code]")))return h;n.prototype.asyncExecute=function(f){if(null==this.batch_){this.batch_=[];var q=this;this.asyncExecuteFunction(function(){q.executeBatch_()})}this.batch_.push(f)};
9
+ var p=$jscomp.global.setTimeout;n.prototype.asyncExecuteFunction=function(f){p(f,0)};n.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var f=this.batch_;this.batch_=[];for(var q=0;q<f.length;++q){var u=f[q];f[q]=null;try{u()}catch(A){this.asyncThrow_(A)}}}this.batch_=null};n.prototype.asyncThrow_=function(f){this.asyncExecuteFunction(function(){throw f;})};var l=function(f){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];this.isRejectionHandled_=!1;var q=this.createResolveAndReject_();
10
+ try{f(q.resolve,q.reject)}catch(u){q.reject(u)}};l.prototype.createResolveAndReject_=function(){function f(A){return function(F){u||(u=!0,A.call(q,F))}}var q=this,u=!1;return{resolve:f(this.resolveTo_),reject:f(this.reject_)}};l.prototype.resolveTo_=function(f){if(f===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(f instanceof l)this.settleSameAsPromise_(f);else{a:switch(typeof f){case "object":var q=null!=f;break a;case "function":q=!0;break a;default:q=!1}q?this.resolveToNonPromiseObj_(f):
11
+ this.fulfill_(f)}};l.prototype.resolveToNonPromiseObj_=function(f){var q=void 0;try{q=f.then}catch(u){this.reject_(u);return}"function"==typeof q?this.settleSameAsThenable_(q,f):this.fulfill_(f)};l.prototype.reject_=function(f){this.settle_(2,f)};l.prototype.fulfill_=function(f){this.settle_(1,f)};l.prototype.settle_=function(f,q){if(0!=this.state_)throw Error("Cannot settle("+f+", "+q+"): Promise already settled in state"+this.state_);this.state_=f;this.result_=q;2===this.state_&&this.scheduleUnhandledRejectionCheck_();
12
+ this.executeOnSettledCallbacks_()};l.prototype.scheduleUnhandledRejectionCheck_=function(){var f=this;p(function(){if(f.notifyUnhandledRejection_()){var q=$jscomp.global.console;"undefined"!==typeof q&&q.error(f.result_)}},1)};l.prototype.notifyUnhandledRejection_=function(){if(this.isRejectionHandled_)return!1;var f=$jscomp.global.CustomEvent,q=$jscomp.global.Event,u=$jscomp.global.dispatchEvent;if("undefined"===typeof u)return!0;"function"===typeof f?f=new f("unhandledrejection",{cancelable:!0}):
13
+ "function"===typeof q?f=new q("unhandledrejection",{cancelable:!0}):(f=$jscomp.global.document.createEvent("CustomEvent"),f.initCustomEvent("unhandledrejection",!1,!0,f));f.promise=this;f.reason=this.result_;return u(f)};l.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var f=0;f<this.onSettledCallbacks_.length;++f)y.asyncExecute(this.onSettledCallbacks_[f]);this.onSettledCallbacks_=null}};var y=new n;l.prototype.settleSameAsPromise_=function(f){var q=this.createResolveAndReject_();
14
+ f.callWhenSettled_(q.resolve,q.reject)};l.prototype.settleSameAsThenable_=function(f,q){var u=this.createResolveAndReject_();try{f.call(q,u.resolve,u.reject)}catch(A){u.reject(A)}};l.prototype.then=function(f,q){function u(w,B){return"function"==typeof w?function(R){try{A(w(R))}catch(Z){F(Z)}}:B}var A,F,v=new l(function(w,B){A=w;F=B});this.callWhenSettled_(u(f,A),u(q,F));return v};l.prototype.catch=function(f){return this.then(void 0,f)};l.prototype.callWhenSettled_=function(f,q){function u(){switch(A.state_){case 1:f(A.result_);
15
+ break;case 2:q(A.result_);break;default:throw Error("Unexpected state: "+A.state_);}}var A=this;null==this.onSettledCallbacks_?y.asyncExecute(u):this.onSettledCallbacks_.push(u);this.isRejectionHandled_=!0};l.resolve=k;l.reject=function(f){return new l(function(q,u){u(f)})};l.race=function(f){return new l(function(q,u){for(var A=$jscomp.makeIterator(f),F=A.next();!F.done;F=A.next())k(F.value).callWhenSettled_(q,u)})};l.all=function(f){var q=$jscomp.makeIterator(f),u=q.next();return u.done?k([]):new l(function(A,
16
+ F){function v(R){return function(Z){w[R]=Z;B--;0==B&&A(w)}}var w=[],B=0;do w.push(void 0),B++,k(u.value).callWhenSettled_(v(w.length-1),F),u=q.next();while(!u.done)})};return l},"es6","es3");$jscomp.owns=function(h,n){return Object.prototype.hasOwnProperty.call(h,n)};$jscomp.assign=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.assign?Object.assign:function(h,n){for(var k=1;k<arguments.length;k++){var p=arguments[k];if(p)for(var l in p)$jscomp.owns(p,l)&&(h[l]=p[l])}return h};
17
+ $jscomp.polyfill("Object.assign",function(h){return h||$jscomp.assign},"es6","es3");$jscomp.checkStringArgs=function(h,n,k){if(null==h)throw new TypeError("The 'this' value for String.prototype."+k+" must not be null or undefined");if(n instanceof RegExp)throw new TypeError("First argument to String.prototype."+k+" must not be a regular expression");return h+""};
18
+ $jscomp.polyfill("String.prototype.startsWith",function(h){return h?h:function(n,k){var p=$jscomp.checkStringArgs(this,n,"startsWith");n+="";var l=p.length,y=n.length;k=Math.max(0,Math.min(k|0,p.length));for(var f=0;f<y&&k<l;)if(p[k++]!=n[f++])return!1;return f>=y}},"es6","es3");
19
+ $jscomp.polyfill("Array.prototype.copyWithin",function(h){function n(k){k=Number(k);return Infinity===k||-Infinity===k?k:k|0}return h?h:function(k,p,l){var y=this.length;k=n(k);p=n(p);l=void 0===l?y:n(l);k=0>k?Math.max(y+k,0):Math.min(k,y);p=0>p?Math.max(y+p,0):Math.min(p,y);l=0>l?Math.max(y+l,0):Math.min(l,y);if(k<p)for(;p<l;)p in this?this[k++]=this[p++]:(delete this[k++],p++);else for(l=Math.min(l,y+p-k),k+=l-p;l>p;)--l in this?this[--k]=this[l]:delete this[--k];return this}},"es6","es3");
20
+ $jscomp.typedArrayCopyWithin=function(h){return h?h:Array.prototype.copyWithin};$jscomp.polyfill("Int8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint8ClampedArray.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");
21
+ $jscomp.polyfill("Uint16Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Int32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Uint32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float32Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");$jscomp.polyfill("Float64Array.prototype.copyWithin",$jscomp.typedArrayCopyWithin,"es6","es5");
22
+ var DracoDecoderModule=function(){var h="undefined"!==typeof document&&document.currentScript?document.currentScript.src:void 0;"undefined"!==typeof __filename&&(h=h||__filename);return function(n){function k(e){return a.locateFile?a.locateFile(e,U):U+e}function p(e,b){if(e){var c=ia;var d=e+b;for(b=e;c[b]&&!(b>=d);)++b;if(16<b-e&&c.buffer&&ra)c=ra.decode(c.subarray(e,b));else{for(d="";e<b;){var g=c[e++];if(g&128){var t=c[e++]&63;if(192==(g&224))d+=String.fromCharCode((g&31)<<6|t);else{var aa=c[e++]&
23
+ 63;g=224==(g&240)?(g&15)<<12|t<<6|aa:(g&7)<<18|t<<12|aa<<6|c[e++]&63;65536>g?d+=String.fromCharCode(g):(g-=65536,d+=String.fromCharCode(55296|g>>10,56320|g&1023))}}else d+=String.fromCharCode(g)}c=d}}else c="";return c}function l(){var e=ja.buffer;a.HEAP8=W=new Int8Array(e);a.HEAP16=new Int16Array(e);a.HEAP32=ca=new Int32Array(e);a.HEAPU8=ia=new Uint8Array(e);a.HEAPU16=new Uint16Array(e);a.HEAPU32=Y=new Uint32Array(e);a.HEAPF32=new Float32Array(e);a.HEAPF64=new Float64Array(e)}function y(e){if(a.onAbort)a.onAbort(e);
24
+ e="Aborted("+e+")";da(e);sa=!0;e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info.");ka(e);throw e;}function f(e){try{if(e==P&&ea)return new Uint8Array(ea);if(ma)return ma(e);throw"both async and sync fetching of the wasm failed";}catch(b){y(b)}}function q(){if(!ea&&(ta||fa)){if("function"==typeof fetch&&!P.startsWith("file://"))return fetch(P,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+P+"'";return e.arrayBuffer()}).catch(function(){return f(P)});
25
+ if(na)return new Promise(function(e,b){na(P,function(c){e(new Uint8Array(c))},b)})}return Promise.resolve().then(function(){return f(P)})}function u(e){for(;0<e.length;)e.shift()(a)}function A(e){this.excPtr=e;this.ptr=e-24;this.set_type=function(b){Y[this.ptr+4>>2]=b};this.get_type=function(){return Y[this.ptr+4>>2]};this.set_destructor=function(b){Y[this.ptr+8>>2]=b};this.get_destructor=function(){return Y[this.ptr+8>>2]};this.set_refcount=function(b){ca[this.ptr>>2]=b};this.set_caught=function(b){W[this.ptr+
26
+ 12>>0]=b?1:0};this.get_caught=function(){return 0!=W[this.ptr+12>>0]};this.set_rethrown=function(b){W[this.ptr+13>>0]=b?1:0};this.get_rethrown=function(){return 0!=W[this.ptr+13>>0]};this.init=function(b,c){this.set_adjusted_ptr(0);this.set_type(b);this.set_destructor(c);this.set_refcount(0);this.set_caught(!1);this.set_rethrown(!1)};this.add_ref=function(){ca[this.ptr>>2]+=1};this.release_ref=function(){var b=ca[this.ptr>>2];ca[this.ptr>>2]=b-1;return 1===b};this.set_adjusted_ptr=function(b){Y[this.ptr+
27
+ 16>>2]=b};this.get_adjusted_ptr=function(){return Y[this.ptr+16>>2]};this.get_exception_ptr=function(){if(ua(this.get_type()))return Y[this.excPtr>>2];var b=this.get_adjusted_ptr();return 0!==b?b:this.excPtr}}function F(){function e(){if(!la&&(la=!0,a.calledRun=!0,!sa)){va=!0;u(oa);wa(a);if(a.onRuntimeInitialized)a.onRuntimeInitialized();if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)xa.unshift(a.postRun.shift());u(xa)}}if(!(0<ba)){if(a.preRun)for("function"==
28
+ typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)ya.unshift(a.preRun.shift());u(ya);0<ba||(a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1);e()},1)):e())}}function v(){}function w(e){return(e||v).__cache__}function B(e,b){var c=w(b),d=c[e];if(d)return d;d=Object.create((b||v).prototype);d.ptr=e;return c[e]=d}function R(e){if("string"===typeof e){for(var b=0,c=0;c<e.length;++c){var d=e.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=
29
+ d?(b+=4,++c):b+=3}b=Array(b+1);c=0;d=b.length;if(0<d){d=c+d-1;for(var g=0;g<e.length;++g){var t=e.charCodeAt(g);if(55296<=t&&57343>=t){var aa=e.charCodeAt(++g);t=65536+((t&1023)<<10)|aa&1023}if(127>=t){if(c>=d)break;b[c++]=t}else{if(2047>=t){if(c+1>=d)break;b[c++]=192|t>>6}else{if(65535>=t){if(c+2>=d)break;b[c++]=224|t>>12}else{if(c+3>=d)break;b[c++]=240|t>>18;b[c++]=128|t>>12&63}b[c++]=128|t>>6&63}b[c++]=128|t&63}}b[c]=0}e=r.alloc(b,W);r.copy(b,W,e);return e}return e}function Z(e){if("object"===
30
+ typeof e){var b=r.alloc(e,W);r.copy(e,W,b);return b}return e}function X(){throw"cannot construct a VoidPtr, no constructor in IDL";}function S(){this.ptr=za();w(S)[this.ptr]=this}function Q(){this.ptr=Aa();w(Q)[this.ptr]=this}function V(){this.ptr=Ba();w(V)[this.ptr]=this}function x(){this.ptr=Ca();w(x)[this.ptr]=this}function D(){this.ptr=Da();w(D)[this.ptr]=this}function G(){this.ptr=Ea();w(G)[this.ptr]=this}function H(){this.ptr=Fa();w(H)[this.ptr]=this}function E(){this.ptr=Ga();w(E)[this.ptr]=
31
+ this}function T(){this.ptr=Ha();w(T)[this.ptr]=this}function C(){throw"cannot construct a Status, no constructor in IDL";}function I(){this.ptr=Ia();w(I)[this.ptr]=this}function J(){this.ptr=Ja();w(J)[this.ptr]=this}function K(){this.ptr=Ka();w(K)[this.ptr]=this}function L(){this.ptr=La();w(L)[this.ptr]=this}function M(){this.ptr=Ma();w(M)[this.ptr]=this}function N(){this.ptr=Na();w(N)[this.ptr]=this}function O(){this.ptr=Oa();w(O)[this.ptr]=this}function z(){this.ptr=Pa();w(z)[this.ptr]=this}function m(){this.ptr=
32
+ Qa();w(m)[this.ptr]=this}n=void 0===n?{}:n;var a="undefined"!=typeof n?n:{},wa,ka;a.ready=new Promise(function(e,b){wa=e;ka=b});var Ra=!1,Sa=!1;a.onRuntimeInitialized=function(){Ra=!0;if(Sa&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.onModuleParsed=function(){Sa=!0;if(Ra&&"function"===typeof a.onModuleLoaded)a.onModuleLoaded(a)};a.isVersionSupported=function(e){if("string"!==typeof e)return!1;e=e.split(".");return 2>e.length||3<e.length?!1:1==e[0]&&0<=e[1]&&5>=e[1]?!0:0!=e[0]||10<
33
+ e[1]?!1:!0};var Ta=Object.assign({},a),ta="object"==typeof window,fa="function"==typeof importScripts,Ua="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,U="";if(Ua){var Va=require("fs"),pa=require("path");U=fa?pa.dirname(U)+"/":__dirname+"/";var Wa=function(e,b){e=e.startsWith("file://")?new URL(e):pa.normalize(e);return Va.readFileSync(e,b?void 0:"utf8")};var ma=function(e){e=Wa(e,!0);e.buffer||(e=new Uint8Array(e));return e};var na=function(e,
34
+ b,c){e=e.startsWith("file://")?new URL(e):pa.normalize(e);Va.readFile(e,function(d,g){d?c(d):b(g.buffer)})};1<process.argv.length&&process.argv[1].replace(/\\/g,"/");process.argv.slice(2);a.inspect=function(){return"[Emscripten Module object]"}}else if(ta||fa)fa?U=self.location.href:"undefined"!=typeof document&&document.currentScript&&(U=document.currentScript.src),h&&(U=h),U=0!==U.indexOf("blob:")?U.substr(0,U.replace(/[?#].*/,"").lastIndexOf("/")+1):"",Wa=function(e){var b=new XMLHttpRequest;b.open("GET",
35
+ e,!1);b.send(null);return b.responseText},fa&&(ma=function(e){var b=new XMLHttpRequest;b.open("GET",e,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)}),na=function(e,b,c){var d=new XMLHttpRequest;d.open("GET",e,!0);d.responseType="arraybuffer";d.onload=function(){200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(null)};a.print||console.log.bind(console);var da=a.printErr||console.warn.bind(console);Object.assign(a,Ta);Ta=null;var ea;a.wasmBinary&&
36
+ (ea=a.wasmBinary);"object"!=typeof WebAssembly&&y("no native wasm support detected");var ja,sa=!1,ra="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,W,ia,ca,Y,ya=[],oa=[],xa=[],va=!1,ba=0,qa=null,ha=null;var P="draco_decoder_gltf.wasm";P.startsWith("data:application/octet-stream;base64,")||(P=k(P));var pd=0,qd={b:function(e,b,c){(new A(e)).init(b,c);pd++;throw e;},a:function(){y("")},d:function(e,b,c){ia.copyWithin(e,b,b+c)},c:function(e){var b=ia.length;e>>>=0;if(2147483648<e)return!1;
37
+ for(var c=1;4>=c;c*=2){var d=b*(1+.2/c);d=Math.min(d,e+100663296);var g=Math;d=Math.max(e,d);g=g.min.call(g,2147483648,d+(65536-d%65536)%65536);a:{d=ja.buffer;try{ja.grow(g-d.byteLength+65535>>>16);l();var t=1;break a}catch(aa){}t=void 0}if(t)return!0}return!1}};(function(){function e(g,t){a.asm=g.exports;ja=a.asm.e;l();oa.unshift(a.asm.f);ba--;a.monitorRunDependencies&&a.monitorRunDependencies(ba);0==ba&&(null!==qa&&(clearInterval(qa),qa=null),ha&&(g=ha,ha=null,g()))}function b(g){e(g.instance)}
38
+ function c(g){return q().then(function(t){return WebAssembly.instantiate(t,d)}).then(function(t){return t}).then(g,function(t){da("failed to asynchronously prepare wasm: "+t);y(t)})}var d={a:qd};ba++;a.monitorRunDependencies&&a.monitorRunDependencies(ba);if(a.instantiateWasm)try{return a.instantiateWasm(d,e)}catch(g){da("Module.instantiateWasm callback failed with error: "+g),ka(g)}(function(){return ea||"function"!=typeof WebAssembly.instantiateStreaming||P.startsWith("data:application/octet-stream;base64,")||
39
+ P.startsWith("file://")||Ua||"function"!=typeof fetch?c(b):fetch(P,{credentials:"same-origin"}).then(function(g){return WebAssembly.instantiateStreaming(g,d).then(b,function(t){da("wasm streaming compile failed: "+t);da("falling back to ArrayBuffer instantiation");return c(b)})})})().catch(ka);return{}})();var Xa=a._emscripten_bind_VoidPtr___destroy___0=function(){return(Xa=a._emscripten_bind_VoidPtr___destroy___0=a.asm.h).apply(null,arguments)},za=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=
40
+ function(){return(za=a._emscripten_bind_DecoderBuffer_DecoderBuffer_0=a.asm.i).apply(null,arguments)},Ya=a._emscripten_bind_DecoderBuffer_Init_2=function(){return(Ya=a._emscripten_bind_DecoderBuffer_Init_2=a.asm.j).apply(null,arguments)},Za=a._emscripten_bind_DecoderBuffer___destroy___0=function(){return(Za=a._emscripten_bind_DecoderBuffer___destroy___0=a.asm.k).apply(null,arguments)},Aa=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=function(){return(Aa=a._emscripten_bind_AttributeTransformData_AttributeTransformData_0=
41
+ a.asm.l).apply(null,arguments)},$a=a._emscripten_bind_AttributeTransformData_transform_type_0=function(){return($a=a._emscripten_bind_AttributeTransformData_transform_type_0=a.asm.m).apply(null,arguments)},ab=a._emscripten_bind_AttributeTransformData___destroy___0=function(){return(ab=a._emscripten_bind_AttributeTransformData___destroy___0=a.asm.n).apply(null,arguments)},Ba=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=function(){return(Ba=a._emscripten_bind_GeometryAttribute_GeometryAttribute_0=
42
+ a.asm.o).apply(null,arguments)},bb=a._emscripten_bind_GeometryAttribute___destroy___0=function(){return(bb=a._emscripten_bind_GeometryAttribute___destroy___0=a.asm.p).apply(null,arguments)},Ca=a._emscripten_bind_PointAttribute_PointAttribute_0=function(){return(Ca=a._emscripten_bind_PointAttribute_PointAttribute_0=a.asm.q).apply(null,arguments)},cb=a._emscripten_bind_PointAttribute_size_0=function(){return(cb=a._emscripten_bind_PointAttribute_size_0=a.asm.r).apply(null,arguments)},db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=
43
+ function(){return(db=a._emscripten_bind_PointAttribute_GetAttributeTransformData_0=a.asm.s).apply(null,arguments)},eb=a._emscripten_bind_PointAttribute_attribute_type_0=function(){return(eb=a._emscripten_bind_PointAttribute_attribute_type_0=a.asm.t).apply(null,arguments)},fb=a._emscripten_bind_PointAttribute_data_type_0=function(){return(fb=a._emscripten_bind_PointAttribute_data_type_0=a.asm.u).apply(null,arguments)},gb=a._emscripten_bind_PointAttribute_num_components_0=function(){return(gb=a._emscripten_bind_PointAttribute_num_components_0=
44
+ a.asm.v).apply(null,arguments)},hb=a._emscripten_bind_PointAttribute_normalized_0=function(){return(hb=a._emscripten_bind_PointAttribute_normalized_0=a.asm.w).apply(null,arguments)},ib=a._emscripten_bind_PointAttribute_byte_stride_0=function(){return(ib=a._emscripten_bind_PointAttribute_byte_stride_0=a.asm.x).apply(null,arguments)},jb=a._emscripten_bind_PointAttribute_byte_offset_0=function(){return(jb=a._emscripten_bind_PointAttribute_byte_offset_0=a.asm.y).apply(null,arguments)},kb=a._emscripten_bind_PointAttribute_unique_id_0=
45
+ function(){return(kb=a._emscripten_bind_PointAttribute_unique_id_0=a.asm.z).apply(null,arguments)},lb=a._emscripten_bind_PointAttribute___destroy___0=function(){return(lb=a._emscripten_bind_PointAttribute___destroy___0=a.asm.A).apply(null,arguments)},Da=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=function(){return(Da=a._emscripten_bind_AttributeQuantizationTransform_AttributeQuantizationTransform_0=a.asm.B).apply(null,arguments)},mb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=
46
+ function(){return(mb=a._emscripten_bind_AttributeQuantizationTransform_InitFromAttribute_1=a.asm.C).apply(null,arguments)},nb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=function(){return(nb=a._emscripten_bind_AttributeQuantizationTransform_quantization_bits_0=a.asm.D).apply(null,arguments)},ob=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=function(){return(ob=a._emscripten_bind_AttributeQuantizationTransform_min_value_1=a.asm.E).apply(null,arguments)},pb=
47
+ a._emscripten_bind_AttributeQuantizationTransform_range_0=function(){return(pb=a._emscripten_bind_AttributeQuantizationTransform_range_0=a.asm.F).apply(null,arguments)},qb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=function(){return(qb=a._emscripten_bind_AttributeQuantizationTransform___destroy___0=a.asm.G).apply(null,arguments)},Ea=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=function(){return(Ea=a._emscripten_bind_AttributeOctahedronTransform_AttributeOctahedronTransform_0=
48
+ a.asm.H).apply(null,arguments)},rb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=function(){return(rb=a._emscripten_bind_AttributeOctahedronTransform_InitFromAttribute_1=a.asm.I).apply(null,arguments)},sb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=function(){return(sb=a._emscripten_bind_AttributeOctahedronTransform_quantization_bits_0=a.asm.J).apply(null,arguments)},tb=a._emscripten_bind_AttributeOctahedronTransform___destroy___0=function(){return(tb=
49
+ a._emscripten_bind_AttributeOctahedronTransform___destroy___0=a.asm.K).apply(null,arguments)},Fa=a._emscripten_bind_PointCloud_PointCloud_0=function(){return(Fa=a._emscripten_bind_PointCloud_PointCloud_0=a.asm.L).apply(null,arguments)},ub=a._emscripten_bind_PointCloud_num_attributes_0=function(){return(ub=a._emscripten_bind_PointCloud_num_attributes_0=a.asm.M).apply(null,arguments)},vb=a._emscripten_bind_PointCloud_num_points_0=function(){return(vb=a._emscripten_bind_PointCloud_num_points_0=a.asm.N).apply(null,
50
+ arguments)},wb=a._emscripten_bind_PointCloud___destroy___0=function(){return(wb=a._emscripten_bind_PointCloud___destroy___0=a.asm.O).apply(null,arguments)},Ga=a._emscripten_bind_Mesh_Mesh_0=function(){return(Ga=a._emscripten_bind_Mesh_Mesh_0=a.asm.P).apply(null,arguments)},xb=a._emscripten_bind_Mesh_num_faces_0=function(){return(xb=a._emscripten_bind_Mesh_num_faces_0=a.asm.Q).apply(null,arguments)},yb=a._emscripten_bind_Mesh_num_attributes_0=function(){return(yb=a._emscripten_bind_Mesh_num_attributes_0=
51
+ a.asm.R).apply(null,arguments)},zb=a._emscripten_bind_Mesh_num_points_0=function(){return(zb=a._emscripten_bind_Mesh_num_points_0=a.asm.S).apply(null,arguments)},Ab=a._emscripten_bind_Mesh___destroy___0=function(){return(Ab=a._emscripten_bind_Mesh___destroy___0=a.asm.T).apply(null,arguments)},Ha=a._emscripten_bind_Metadata_Metadata_0=function(){return(Ha=a._emscripten_bind_Metadata_Metadata_0=a.asm.U).apply(null,arguments)},Bb=a._emscripten_bind_Metadata___destroy___0=function(){return(Bb=a._emscripten_bind_Metadata___destroy___0=
52
+ a.asm.V).apply(null,arguments)},Cb=a._emscripten_bind_Status_code_0=function(){return(Cb=a._emscripten_bind_Status_code_0=a.asm.W).apply(null,arguments)},Db=a._emscripten_bind_Status_ok_0=function(){return(Db=a._emscripten_bind_Status_ok_0=a.asm.X).apply(null,arguments)},Eb=a._emscripten_bind_Status_error_msg_0=function(){return(Eb=a._emscripten_bind_Status_error_msg_0=a.asm.Y).apply(null,arguments)},Fb=a._emscripten_bind_Status___destroy___0=function(){return(Fb=a._emscripten_bind_Status___destroy___0=
53
+ a.asm.Z).apply(null,arguments)},Ia=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=function(){return(Ia=a._emscripten_bind_DracoFloat32Array_DracoFloat32Array_0=a.asm._).apply(null,arguments)},Gb=a._emscripten_bind_DracoFloat32Array_GetValue_1=function(){return(Gb=a._emscripten_bind_DracoFloat32Array_GetValue_1=a.asm.$).apply(null,arguments)},Hb=a._emscripten_bind_DracoFloat32Array_size_0=function(){return(Hb=a._emscripten_bind_DracoFloat32Array_size_0=a.asm.aa).apply(null,arguments)},Ib=
54
+ a._emscripten_bind_DracoFloat32Array___destroy___0=function(){return(Ib=a._emscripten_bind_DracoFloat32Array___destroy___0=a.asm.ba).apply(null,arguments)},Ja=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=function(){return(Ja=a._emscripten_bind_DracoInt8Array_DracoInt8Array_0=a.asm.ca).apply(null,arguments)},Jb=a._emscripten_bind_DracoInt8Array_GetValue_1=function(){return(Jb=a._emscripten_bind_DracoInt8Array_GetValue_1=a.asm.da).apply(null,arguments)},Kb=a._emscripten_bind_DracoInt8Array_size_0=
55
+ function(){return(Kb=a._emscripten_bind_DracoInt8Array_size_0=a.asm.ea).apply(null,arguments)},Lb=a._emscripten_bind_DracoInt8Array___destroy___0=function(){return(Lb=a._emscripten_bind_DracoInt8Array___destroy___0=a.asm.fa).apply(null,arguments)},Ka=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=function(){return(Ka=a._emscripten_bind_DracoUInt8Array_DracoUInt8Array_0=a.asm.ga).apply(null,arguments)},Mb=a._emscripten_bind_DracoUInt8Array_GetValue_1=function(){return(Mb=a._emscripten_bind_DracoUInt8Array_GetValue_1=
56
+ a.asm.ha).apply(null,arguments)},Nb=a._emscripten_bind_DracoUInt8Array_size_0=function(){return(Nb=a._emscripten_bind_DracoUInt8Array_size_0=a.asm.ia).apply(null,arguments)},Ob=a._emscripten_bind_DracoUInt8Array___destroy___0=function(){return(Ob=a._emscripten_bind_DracoUInt8Array___destroy___0=a.asm.ja).apply(null,arguments)},La=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=function(){return(La=a._emscripten_bind_DracoInt16Array_DracoInt16Array_0=a.asm.ka).apply(null,arguments)},Pb=a._emscripten_bind_DracoInt16Array_GetValue_1=
57
+ function(){return(Pb=a._emscripten_bind_DracoInt16Array_GetValue_1=a.asm.la).apply(null,arguments)},Qb=a._emscripten_bind_DracoInt16Array_size_0=function(){return(Qb=a._emscripten_bind_DracoInt16Array_size_0=a.asm.ma).apply(null,arguments)},Rb=a._emscripten_bind_DracoInt16Array___destroy___0=function(){return(Rb=a._emscripten_bind_DracoInt16Array___destroy___0=a.asm.na).apply(null,arguments)},Ma=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=function(){return(Ma=a._emscripten_bind_DracoUInt16Array_DracoUInt16Array_0=
58
+ a.asm.oa).apply(null,arguments)},Sb=a._emscripten_bind_DracoUInt16Array_GetValue_1=function(){return(Sb=a._emscripten_bind_DracoUInt16Array_GetValue_1=a.asm.pa).apply(null,arguments)},Tb=a._emscripten_bind_DracoUInt16Array_size_0=function(){return(Tb=a._emscripten_bind_DracoUInt16Array_size_0=a.asm.qa).apply(null,arguments)},Ub=a._emscripten_bind_DracoUInt16Array___destroy___0=function(){return(Ub=a._emscripten_bind_DracoUInt16Array___destroy___0=a.asm.ra).apply(null,arguments)},Na=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=
59
+ function(){return(Na=a._emscripten_bind_DracoInt32Array_DracoInt32Array_0=a.asm.sa).apply(null,arguments)},Vb=a._emscripten_bind_DracoInt32Array_GetValue_1=function(){return(Vb=a._emscripten_bind_DracoInt32Array_GetValue_1=a.asm.ta).apply(null,arguments)},Wb=a._emscripten_bind_DracoInt32Array_size_0=function(){return(Wb=a._emscripten_bind_DracoInt32Array_size_0=a.asm.ua).apply(null,arguments)},Xb=a._emscripten_bind_DracoInt32Array___destroy___0=function(){return(Xb=a._emscripten_bind_DracoInt32Array___destroy___0=
60
+ a.asm.va).apply(null,arguments)},Oa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=function(){return(Oa=a._emscripten_bind_DracoUInt32Array_DracoUInt32Array_0=a.asm.wa).apply(null,arguments)},Yb=a._emscripten_bind_DracoUInt32Array_GetValue_1=function(){return(Yb=a._emscripten_bind_DracoUInt32Array_GetValue_1=a.asm.xa).apply(null,arguments)},Zb=a._emscripten_bind_DracoUInt32Array_size_0=function(){return(Zb=a._emscripten_bind_DracoUInt32Array_size_0=a.asm.ya).apply(null,arguments)},$b=a._emscripten_bind_DracoUInt32Array___destroy___0=
61
+ function(){return($b=a._emscripten_bind_DracoUInt32Array___destroy___0=a.asm.za).apply(null,arguments)},Pa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=function(){return(Pa=a._emscripten_bind_MetadataQuerier_MetadataQuerier_0=a.asm.Aa).apply(null,arguments)},ac=a._emscripten_bind_MetadataQuerier_HasEntry_2=function(){return(ac=a._emscripten_bind_MetadataQuerier_HasEntry_2=a.asm.Ba).apply(null,arguments)},bc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=function(){return(bc=a._emscripten_bind_MetadataQuerier_GetIntEntry_2=
62
+ a.asm.Ca).apply(null,arguments)},cc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=function(){return(cc=a._emscripten_bind_MetadataQuerier_GetIntEntryArray_3=a.asm.Da).apply(null,arguments)},dc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=function(){return(dc=a._emscripten_bind_MetadataQuerier_GetDoubleEntry_2=a.asm.Ea).apply(null,arguments)},ec=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=function(){return(ec=a._emscripten_bind_MetadataQuerier_GetStringEntry_2=a.asm.Fa).apply(null,
63
+ arguments)},fc=a._emscripten_bind_MetadataQuerier_NumEntries_1=function(){return(fc=a._emscripten_bind_MetadataQuerier_NumEntries_1=a.asm.Ga).apply(null,arguments)},gc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=function(){return(gc=a._emscripten_bind_MetadataQuerier_GetEntryName_2=a.asm.Ha).apply(null,arguments)},hc=a._emscripten_bind_MetadataQuerier___destroy___0=function(){return(hc=a._emscripten_bind_MetadataQuerier___destroy___0=a.asm.Ia).apply(null,arguments)},Qa=a._emscripten_bind_Decoder_Decoder_0=
64
+ function(){return(Qa=a._emscripten_bind_Decoder_Decoder_0=a.asm.Ja).apply(null,arguments)},ic=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=function(){return(ic=a._emscripten_bind_Decoder_DecodeArrayToPointCloud_3=a.asm.Ka).apply(null,arguments)},jc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=function(){return(jc=a._emscripten_bind_Decoder_DecodeArrayToMesh_3=a.asm.La).apply(null,arguments)},kc=a._emscripten_bind_Decoder_GetAttributeId_2=function(){return(kc=a._emscripten_bind_Decoder_GetAttributeId_2=
65
+ a.asm.Ma).apply(null,arguments)},lc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=function(){return(lc=a._emscripten_bind_Decoder_GetAttributeIdByName_2=a.asm.Na).apply(null,arguments)},mc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=function(){return(mc=a._emscripten_bind_Decoder_GetAttributeIdByMetadataEntry_3=a.asm.Oa).apply(null,arguments)},nc=a._emscripten_bind_Decoder_GetAttribute_2=function(){return(nc=a._emscripten_bind_Decoder_GetAttribute_2=a.asm.Pa).apply(null,arguments)},
66
+ oc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=function(){return(oc=a._emscripten_bind_Decoder_GetAttributeByUniqueId_2=a.asm.Qa).apply(null,arguments)},pc=a._emscripten_bind_Decoder_GetMetadata_1=function(){return(pc=a._emscripten_bind_Decoder_GetMetadata_1=a.asm.Ra).apply(null,arguments)},qc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=function(){return(qc=a._emscripten_bind_Decoder_GetAttributeMetadata_2=a.asm.Sa).apply(null,arguments)},rc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=
67
+ function(){return(rc=a._emscripten_bind_Decoder_GetFaceFromMesh_3=a.asm.Ta).apply(null,arguments)},sc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=function(){return(sc=a._emscripten_bind_Decoder_GetTriangleStripsFromMesh_2=a.asm.Ua).apply(null,arguments)},tc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=function(){return(tc=a._emscripten_bind_Decoder_GetTrianglesUInt16Array_3=a.asm.Va).apply(null,arguments)},uc=a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=function(){return(uc=
68
+ a._emscripten_bind_Decoder_GetTrianglesUInt32Array_3=a.asm.Wa).apply(null,arguments)},vc=a._emscripten_bind_Decoder_GetAttributeFloat_3=function(){return(vc=a._emscripten_bind_Decoder_GetAttributeFloat_3=a.asm.Xa).apply(null,arguments)},wc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=function(){return(wc=a._emscripten_bind_Decoder_GetAttributeFloatForAllPoints_3=a.asm.Ya).apply(null,arguments)},xc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=function(){return(xc=a._emscripten_bind_Decoder_GetAttributeIntForAllPoints_3=
69
+ a.asm.Za).apply(null,arguments)},yc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=function(){return(yc=a._emscripten_bind_Decoder_GetAttributeInt8ForAllPoints_3=a.asm._a).apply(null,arguments)},zc=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=function(){return(zc=a._emscripten_bind_Decoder_GetAttributeUInt8ForAllPoints_3=a.asm.$a).apply(null,arguments)},Ac=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=function(){return(Ac=a._emscripten_bind_Decoder_GetAttributeInt16ForAllPoints_3=
70
+ a.asm.ab).apply(null,arguments)},Bc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=function(){return(Bc=a._emscripten_bind_Decoder_GetAttributeUInt16ForAllPoints_3=a.asm.bb).apply(null,arguments)},Cc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=function(){return(Cc=a._emscripten_bind_Decoder_GetAttributeInt32ForAllPoints_3=a.asm.cb).apply(null,arguments)},Dc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=function(){return(Dc=a._emscripten_bind_Decoder_GetAttributeUInt32ForAllPoints_3=
71
+ a.asm.db).apply(null,arguments)},Ec=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=function(){return(Ec=a._emscripten_bind_Decoder_GetAttributeDataArrayForAllPoints_5=a.asm.eb).apply(null,arguments)},Fc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=function(){return(Fc=a._emscripten_bind_Decoder_SkipAttributeTransform_1=a.asm.fb).apply(null,arguments)},Gc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=function(){return(Gc=a._emscripten_bind_Decoder_GetEncodedGeometryType_Deprecated_1=
72
+ a.asm.gb).apply(null,arguments)},Hc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=function(){return(Hc=a._emscripten_bind_Decoder_DecodeBufferToPointCloud_2=a.asm.hb).apply(null,arguments)},Ic=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=function(){return(Ic=a._emscripten_bind_Decoder_DecodeBufferToMesh_2=a.asm.ib).apply(null,arguments)},Jc=a._emscripten_bind_Decoder___destroy___0=function(){return(Jc=a._emscripten_bind_Decoder___destroy___0=a.asm.jb).apply(null,arguments)},Kc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=
73
+ function(){return(Kc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_INVALID_TRANSFORM=a.asm.kb).apply(null,arguments)},Lc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=function(){return(Lc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_NO_TRANSFORM=a.asm.lb).apply(null,arguments)},Mc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=function(){return(Mc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_QUANTIZATION_TRANSFORM=
74
+ a.asm.mb).apply(null,arguments)},Nc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=function(){return(Nc=a._emscripten_enum_draco_AttributeTransformType_ATTRIBUTE_OCTAHEDRON_TRANSFORM=a.asm.nb).apply(null,arguments)},Oc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=function(){return(Oc=a._emscripten_enum_draco_GeometryAttribute_Type_INVALID=a.asm.ob).apply(null,arguments)},Pc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=function(){return(Pc=a._emscripten_enum_draco_GeometryAttribute_Type_POSITION=
75
+ a.asm.pb).apply(null,arguments)},Qc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=function(){return(Qc=a._emscripten_enum_draco_GeometryAttribute_Type_NORMAL=a.asm.qb).apply(null,arguments)},Rc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=function(){return(Rc=a._emscripten_enum_draco_GeometryAttribute_Type_COLOR=a.asm.rb).apply(null,arguments)},Sc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=function(){return(Sc=a._emscripten_enum_draco_GeometryAttribute_Type_TEX_COORD=
76
+ a.asm.sb).apply(null,arguments)},Tc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=function(){return(Tc=a._emscripten_enum_draco_GeometryAttribute_Type_GENERIC=a.asm.tb).apply(null,arguments)},Uc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=function(){return(Uc=a._emscripten_enum_draco_EncodedGeometryType_INVALID_GEOMETRY_TYPE=a.asm.ub).apply(null,arguments)},Vc=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=function(){return(Vc=a._emscripten_enum_draco_EncodedGeometryType_POINT_CLOUD=
77
+ a.asm.vb).apply(null,arguments)},Wc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=function(){return(Wc=a._emscripten_enum_draco_EncodedGeometryType_TRIANGULAR_MESH=a.asm.wb).apply(null,arguments)},Xc=a._emscripten_enum_draco_DataType_DT_INVALID=function(){return(Xc=a._emscripten_enum_draco_DataType_DT_INVALID=a.asm.xb).apply(null,arguments)},Yc=a._emscripten_enum_draco_DataType_DT_INT8=function(){return(Yc=a._emscripten_enum_draco_DataType_DT_INT8=a.asm.yb).apply(null,arguments)},Zc=
78
+ a._emscripten_enum_draco_DataType_DT_UINT8=function(){return(Zc=a._emscripten_enum_draco_DataType_DT_UINT8=a.asm.zb).apply(null,arguments)},$c=a._emscripten_enum_draco_DataType_DT_INT16=function(){return($c=a._emscripten_enum_draco_DataType_DT_INT16=a.asm.Ab).apply(null,arguments)},ad=a._emscripten_enum_draco_DataType_DT_UINT16=function(){return(ad=a._emscripten_enum_draco_DataType_DT_UINT16=a.asm.Bb).apply(null,arguments)},bd=a._emscripten_enum_draco_DataType_DT_INT32=function(){return(bd=a._emscripten_enum_draco_DataType_DT_INT32=
79
+ a.asm.Cb).apply(null,arguments)},cd=a._emscripten_enum_draco_DataType_DT_UINT32=function(){return(cd=a._emscripten_enum_draco_DataType_DT_UINT32=a.asm.Db).apply(null,arguments)},dd=a._emscripten_enum_draco_DataType_DT_INT64=function(){return(dd=a._emscripten_enum_draco_DataType_DT_INT64=a.asm.Eb).apply(null,arguments)},ed=a._emscripten_enum_draco_DataType_DT_UINT64=function(){return(ed=a._emscripten_enum_draco_DataType_DT_UINT64=a.asm.Fb).apply(null,arguments)},fd=a._emscripten_enum_draco_DataType_DT_FLOAT32=
80
+ function(){return(fd=a._emscripten_enum_draco_DataType_DT_FLOAT32=a.asm.Gb).apply(null,arguments)},gd=a._emscripten_enum_draco_DataType_DT_FLOAT64=function(){return(gd=a._emscripten_enum_draco_DataType_DT_FLOAT64=a.asm.Hb).apply(null,arguments)},hd=a._emscripten_enum_draco_DataType_DT_BOOL=function(){return(hd=a._emscripten_enum_draco_DataType_DT_BOOL=a.asm.Ib).apply(null,arguments)},id=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=function(){return(id=a._emscripten_enum_draco_DataType_DT_TYPES_COUNT=
81
+ a.asm.Jb).apply(null,arguments)},jd=a._emscripten_enum_draco_StatusCode_OK=function(){return(jd=a._emscripten_enum_draco_StatusCode_OK=a.asm.Kb).apply(null,arguments)},kd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=function(){return(kd=a._emscripten_enum_draco_StatusCode_DRACO_ERROR=a.asm.Lb).apply(null,arguments)},ld=a._emscripten_enum_draco_StatusCode_IO_ERROR=function(){return(ld=a._emscripten_enum_draco_StatusCode_IO_ERROR=a.asm.Mb).apply(null,arguments)},md=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=
82
+ function(){return(md=a._emscripten_enum_draco_StatusCode_INVALID_PARAMETER=a.asm.Nb).apply(null,arguments)},nd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=function(){return(nd=a._emscripten_enum_draco_StatusCode_UNSUPPORTED_VERSION=a.asm.Ob).apply(null,arguments)},od=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=function(){return(od=a._emscripten_enum_draco_StatusCode_UNKNOWN_VERSION=a.asm.Pb).apply(null,arguments)};a._malloc=function(){return(a._malloc=a.asm.Qb).apply(null,arguments)};
83
+ a._free=function(){return(a._free=a.asm.Rb).apply(null,arguments)};var ua=function(){return(ua=a.asm.Sb).apply(null,arguments)};a.___start_em_js=11660;a.___stop_em_js=11758;var la;ha=function b(){la||F();la||(ha=b)};if(a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);0<a.preInit.length;)a.preInit.pop()();F();v.prototype=Object.create(v.prototype);v.prototype.constructor=v;v.prototype.__class__=v;v.__cache__={};a.WrapperObject=v;a.getCache=w;a.wrapPointer=B;a.castObject=function(b,
84
+ c){return B(b.ptr,c)};a.NULL=B(0);a.destroy=function(b){if(!b.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";b.__destroy__();delete w(b.__class__)[b.ptr]};a.compare=function(b,c){return b.ptr===c.ptr};a.getPointer=function(b){return b.ptr};a.getClass=function(b){return b.__class__};var r={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(r.needed){for(var b=0;b<r.temps.length;b++)a._free(r.temps[b]);r.temps.length=0;a._free(r.buffer);r.buffer=0;r.size+=
85
+ r.needed;r.needed=0}r.buffer||(r.size+=128,r.buffer=a._malloc(r.size),r.buffer||y(void 0));r.pos=0},alloc:function(b,c){r.buffer||y(void 0);b=b.length*c.BYTES_PER_ELEMENT;b=b+7&-8;r.pos+b>=r.size?(0<b||y(void 0),r.needed+=b,c=a._malloc(b),r.temps.push(c)):(c=r.buffer+r.pos,r.pos+=b);return c},copy:function(b,c,d){d>>>=0;switch(c.BYTES_PER_ELEMENT){case 2:d>>>=1;break;case 4:d>>>=2;break;case 8:d>>>=3}for(var g=0;g<b.length;g++)c[d+g]=b[g]}};X.prototype=Object.create(v.prototype);X.prototype.constructor=
86
+ X;X.prototype.__class__=X;X.__cache__={};a.VoidPtr=X;X.prototype.__destroy__=X.prototype.__destroy__=function(){Xa(this.ptr)};S.prototype=Object.create(v.prototype);S.prototype.constructor=S;S.prototype.__class__=S;S.__cache__={};a.DecoderBuffer=S;S.prototype.Init=S.prototype.Init=function(b,c){var d=this.ptr;r.prepare();"object"==typeof b&&(b=Z(b));c&&"object"===typeof c&&(c=c.ptr);Ya(d,b,c)};S.prototype.__destroy__=S.prototype.__destroy__=function(){Za(this.ptr)};Q.prototype=Object.create(v.prototype);
87
+ Q.prototype.constructor=Q;Q.prototype.__class__=Q;Q.__cache__={};a.AttributeTransformData=Q;Q.prototype.transform_type=Q.prototype.transform_type=function(){return $a(this.ptr)};Q.prototype.__destroy__=Q.prototype.__destroy__=function(){ab(this.ptr)};V.prototype=Object.create(v.prototype);V.prototype.constructor=V;V.prototype.__class__=V;V.__cache__={};a.GeometryAttribute=V;V.prototype.__destroy__=V.prototype.__destroy__=function(){bb(this.ptr)};x.prototype=Object.create(v.prototype);x.prototype.constructor=
88
+ x;x.prototype.__class__=x;x.__cache__={};a.PointAttribute=x;x.prototype.size=x.prototype.size=function(){return cb(this.ptr)};x.prototype.GetAttributeTransformData=x.prototype.GetAttributeTransformData=function(){return B(db(this.ptr),Q)};x.prototype.attribute_type=x.prototype.attribute_type=function(){return eb(this.ptr)};x.prototype.data_type=x.prototype.data_type=function(){return fb(this.ptr)};x.prototype.num_components=x.prototype.num_components=function(){return gb(this.ptr)};x.prototype.normalized=
89
+ x.prototype.normalized=function(){return!!hb(this.ptr)};x.prototype.byte_stride=x.prototype.byte_stride=function(){return ib(this.ptr)};x.prototype.byte_offset=x.prototype.byte_offset=function(){return jb(this.ptr)};x.prototype.unique_id=x.prototype.unique_id=function(){return kb(this.ptr)};x.prototype.__destroy__=x.prototype.__destroy__=function(){lb(this.ptr)};D.prototype=Object.create(v.prototype);D.prototype.constructor=D;D.prototype.__class__=D;D.__cache__={};a.AttributeQuantizationTransform=
90
+ D;D.prototype.InitFromAttribute=D.prototype.InitFromAttribute=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return!!mb(c,b)};D.prototype.quantization_bits=D.prototype.quantization_bits=function(){return nb(this.ptr)};D.prototype.min_value=D.prototype.min_value=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return ob(c,b)};D.prototype.range=D.prototype.range=function(){return pb(this.ptr)};D.prototype.__destroy__=D.prototype.__destroy__=function(){qb(this.ptr)};G.prototype=
91
+ Object.create(v.prototype);G.prototype.constructor=G;G.prototype.__class__=G;G.__cache__={};a.AttributeOctahedronTransform=G;G.prototype.InitFromAttribute=G.prototype.InitFromAttribute=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return!!rb(c,b)};G.prototype.quantization_bits=G.prototype.quantization_bits=function(){return sb(this.ptr)};G.prototype.__destroy__=G.prototype.__destroy__=function(){tb(this.ptr)};H.prototype=Object.create(v.prototype);H.prototype.constructor=H;H.prototype.__class__=
92
+ H;H.__cache__={};a.PointCloud=H;H.prototype.num_attributes=H.prototype.num_attributes=function(){return ub(this.ptr)};H.prototype.num_points=H.prototype.num_points=function(){return vb(this.ptr)};H.prototype.__destroy__=H.prototype.__destroy__=function(){wb(this.ptr)};E.prototype=Object.create(v.prototype);E.prototype.constructor=E;E.prototype.__class__=E;E.__cache__={};a.Mesh=E;E.prototype.num_faces=E.prototype.num_faces=function(){return xb(this.ptr)};E.prototype.num_attributes=E.prototype.num_attributes=
93
+ function(){return yb(this.ptr)};E.prototype.num_points=E.prototype.num_points=function(){return zb(this.ptr)};E.prototype.__destroy__=E.prototype.__destroy__=function(){Ab(this.ptr)};T.prototype=Object.create(v.prototype);T.prototype.constructor=T;T.prototype.__class__=T;T.__cache__={};a.Metadata=T;T.prototype.__destroy__=T.prototype.__destroy__=function(){Bb(this.ptr)};C.prototype=Object.create(v.prototype);C.prototype.constructor=C;C.prototype.__class__=C;C.__cache__={};a.Status=C;C.prototype.code=
94
+ C.prototype.code=function(){return Cb(this.ptr)};C.prototype.ok=C.prototype.ok=function(){return!!Db(this.ptr)};C.prototype.error_msg=C.prototype.error_msg=function(){return p(Eb(this.ptr))};C.prototype.__destroy__=C.prototype.__destroy__=function(){Fb(this.ptr)};I.prototype=Object.create(v.prototype);I.prototype.constructor=I;I.prototype.__class__=I;I.__cache__={};a.DracoFloat32Array=I;I.prototype.GetValue=I.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Gb(c,
95
+ b)};I.prototype.size=I.prototype.size=function(){return Hb(this.ptr)};I.prototype.__destroy__=I.prototype.__destroy__=function(){Ib(this.ptr)};J.prototype=Object.create(v.prototype);J.prototype.constructor=J;J.prototype.__class__=J;J.__cache__={};a.DracoInt8Array=J;J.prototype.GetValue=J.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Jb(c,b)};J.prototype.size=J.prototype.size=function(){return Kb(this.ptr)};J.prototype.__destroy__=J.prototype.__destroy__=function(){Lb(this.ptr)};
96
+ K.prototype=Object.create(v.prototype);K.prototype.constructor=K;K.prototype.__class__=K;K.__cache__={};a.DracoUInt8Array=K;K.prototype.GetValue=K.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Mb(c,b)};K.prototype.size=K.prototype.size=function(){return Nb(this.ptr)};K.prototype.__destroy__=K.prototype.__destroy__=function(){Ob(this.ptr)};L.prototype=Object.create(v.prototype);L.prototype.constructor=L;L.prototype.__class__=L;L.__cache__={};a.DracoInt16Array=
97
+ L;L.prototype.GetValue=L.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Pb(c,b)};L.prototype.size=L.prototype.size=function(){return Qb(this.ptr)};L.prototype.__destroy__=L.prototype.__destroy__=function(){Rb(this.ptr)};M.prototype=Object.create(v.prototype);M.prototype.constructor=M;M.prototype.__class__=M;M.__cache__={};a.DracoUInt16Array=M;M.prototype.GetValue=M.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Sb(c,b)};
98
+ M.prototype.size=M.prototype.size=function(){return Tb(this.ptr)};M.prototype.__destroy__=M.prototype.__destroy__=function(){Ub(this.ptr)};N.prototype=Object.create(v.prototype);N.prototype.constructor=N;N.prototype.__class__=N;N.__cache__={};a.DracoInt32Array=N;N.prototype.GetValue=N.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Vb(c,b)};N.prototype.size=N.prototype.size=function(){return Wb(this.ptr)};N.prototype.__destroy__=N.prototype.__destroy__=function(){Xb(this.ptr)};
99
+ O.prototype=Object.create(v.prototype);O.prototype.constructor=O;O.prototype.__class__=O;O.__cache__={};a.DracoUInt32Array=O;O.prototype.GetValue=O.prototype.GetValue=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Yb(c,b)};O.prototype.size=O.prototype.size=function(){return Zb(this.ptr)};O.prototype.__destroy__=O.prototype.__destroy__=function(){$b(this.ptr)};z.prototype=Object.create(v.prototype);z.prototype.constructor=z;z.prototype.__class__=z;z.__cache__={};a.MetadataQuerier=
100
+ z;z.prototype.HasEntry=z.prototype.HasEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return!!ac(d,b,c)};z.prototype.GetIntEntry=z.prototype.GetIntEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return bc(d,b,c)};z.prototype.GetIntEntryArray=z.prototype.GetIntEntryArray=function(b,c,d){var g=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===
101
+ typeof c?c.ptr:R(c);d&&"object"===typeof d&&(d=d.ptr);cc(g,b,c,d)};z.prototype.GetDoubleEntry=z.prototype.GetDoubleEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return dc(d,b,c)};z.prototype.GetStringEntry=z.prototype.GetStringEntry=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return p(ec(d,b,c))};z.prototype.NumEntries=z.prototype.NumEntries=function(b){var c=this.ptr;
102
+ b&&"object"===typeof b&&(b=b.ptr);return fc(c,b)};z.prototype.GetEntryName=z.prototype.GetEntryName=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return p(gc(d,b,c))};z.prototype.__destroy__=z.prototype.__destroy__=function(){hc(this.ptr)};m.prototype=Object.create(v.prototype);m.prototype.constructor=m;m.prototype.__class__=m;m.__cache__={};a.Decoder=m;m.prototype.DecodeArrayToPointCloud=m.prototype.DecodeArrayToPointCloud=function(b,c,d){var g=
103
+ this.ptr;r.prepare();"object"==typeof b&&(b=Z(b));c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return B(ic(g,b,c,d),C)};m.prototype.DecodeArrayToMesh=m.prototype.DecodeArrayToMesh=function(b,c,d){var g=this.ptr;r.prepare();"object"==typeof b&&(b=Z(b));c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return B(jc(g,b,c,d),C)};m.prototype.GetAttributeId=m.prototype.GetAttributeId=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&
104
+ (c=c.ptr);return kc(d,b,c)};m.prototype.GetAttributeIdByName=m.prototype.GetAttributeIdByName=function(b,c){var d=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);return lc(d,b,c)};m.prototype.GetAttributeIdByMetadataEntry=m.prototype.GetAttributeIdByMetadataEntry=function(b,c,d){var g=this.ptr;r.prepare();b&&"object"===typeof b&&(b=b.ptr);c=c&&"object"===typeof c?c.ptr:R(c);d=d&&"object"===typeof d?d.ptr:R(d);return mc(g,b,c,d)};m.prototype.GetAttribute=
105
+ m.prototype.GetAttribute=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(nc(d,b,c),x)};m.prototype.GetAttributeByUniqueId=m.prototype.GetAttributeByUniqueId=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(oc(d,b,c),x)};m.prototype.GetMetadata=m.prototype.GetMetadata=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return B(pc(c,b),T)};m.prototype.GetAttributeMetadata=m.prototype.GetAttributeMetadata=
106
+ function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(qc(d,b,c),T)};m.prototype.GetFaceFromMesh=m.prototype.GetFaceFromMesh=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!rc(g,b,c,d)};m.prototype.GetTriangleStripsFromMesh=m.prototype.GetTriangleStripsFromMesh=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);
107
+ return sc(d,b,c)};m.prototype.GetTrianglesUInt16Array=m.prototype.GetTrianglesUInt16Array=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!tc(g,b,c,d)};m.prototype.GetTrianglesUInt32Array=m.prototype.GetTrianglesUInt32Array=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!uc(g,b,c,d)};m.prototype.GetAttributeFloat=m.prototype.GetAttributeFloat=
108
+ function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!vc(g,b,c,d)};m.prototype.GetAttributeFloatForAllPoints=m.prototype.GetAttributeFloatForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!wc(g,b,c,d)};m.prototype.GetAttributeIntForAllPoints=m.prototype.GetAttributeIntForAllPoints=function(b,c,d){var g=this.ptr;
109
+ b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!xc(g,b,c,d)};m.prototype.GetAttributeInt8ForAllPoints=m.prototype.GetAttributeInt8ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!yc(g,b,c,d)};m.prototype.GetAttributeUInt8ForAllPoints=m.prototype.GetAttributeUInt8ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=
110
+ b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!zc(g,b,c,d)};m.prototype.GetAttributeInt16ForAllPoints=m.prototype.GetAttributeInt16ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Ac(g,b,c,d)};m.prototype.GetAttributeUInt16ForAllPoints=m.prototype.GetAttributeUInt16ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&
111
+ (c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Bc(g,b,c,d)};m.prototype.GetAttributeInt32ForAllPoints=m.prototype.GetAttributeInt32ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);return!!Cc(g,b,c,d)};m.prototype.GetAttributeUInt32ForAllPoints=m.prototype.GetAttributeUInt32ForAllPoints=function(b,c,d){var g=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===
112
+ typeof d&&(d=d.ptr);return!!Dc(g,b,c,d)};m.prototype.GetAttributeDataArrayForAllPoints=m.prototype.GetAttributeDataArrayForAllPoints=function(b,c,d,g,t){var aa=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);d&&"object"===typeof d&&(d=d.ptr);g&&"object"===typeof g&&(g=g.ptr);t&&"object"===typeof t&&(t=t.ptr);return!!Ec(aa,b,c,d,g,t)};m.prototype.SkipAttributeTransform=m.prototype.SkipAttributeTransform=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);Fc(c,
113
+ b)};m.prototype.GetEncodedGeometryType_Deprecated=m.prototype.GetEncodedGeometryType_Deprecated=function(b){var c=this.ptr;b&&"object"===typeof b&&(b=b.ptr);return Gc(c,b)};m.prototype.DecodeBufferToPointCloud=m.prototype.DecodeBufferToPointCloud=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===typeof c&&(c=c.ptr);return B(Hc(d,b,c),C)};m.prototype.DecodeBufferToMesh=m.prototype.DecodeBufferToMesh=function(b,c){var d=this.ptr;b&&"object"===typeof b&&(b=b.ptr);c&&"object"===
114
+ typeof c&&(c=c.ptr);return B(Ic(d,b,c),C)};m.prototype.__destroy__=m.prototype.__destroy__=function(){Jc(this.ptr)};(function(){function b(){a.ATTRIBUTE_INVALID_TRANSFORM=Kc();a.ATTRIBUTE_NO_TRANSFORM=Lc();a.ATTRIBUTE_QUANTIZATION_TRANSFORM=Mc();a.ATTRIBUTE_OCTAHEDRON_TRANSFORM=Nc();a.INVALID=Oc();a.POSITION=Pc();a.NORMAL=Qc();a.COLOR=Rc();a.TEX_COORD=Sc();a.GENERIC=Tc();a.INVALID_GEOMETRY_TYPE=Uc();a.POINT_CLOUD=Vc();a.TRIANGULAR_MESH=Wc();a.DT_INVALID=Xc();a.DT_INT8=Yc();a.DT_UINT8=Zc();a.DT_INT16=
115
+ $c();a.DT_UINT16=ad();a.DT_INT32=bd();a.DT_UINT32=cd();a.DT_INT64=dd();a.DT_UINT64=ed();a.DT_FLOAT32=fd();a.DT_FLOAT64=gd();a.DT_BOOL=hd();a.DT_TYPES_COUNT=id();a.OK=jd();a.DRACO_ERROR=kd();a.IO_ERROR=ld();a.INVALID_PARAMETER=md();a.UNSUPPORTED_VERSION=nd();a.UNKNOWN_VERSION=od()}va?b():oa.unshift(b)})();if("function"===typeof a.onModuleParsed)a.onModuleParsed();a.Decoder.prototype.GetEncodedGeometryType=function(b){if(b.__class__&&b.__class__===a.DecoderBuffer)return a.Decoder.prototype.GetEncodedGeometryType_Deprecated(b);
116
+ if(8>b.byteLength)return a.INVALID_GEOMETRY_TYPE;switch(b[7]){case 0:return a.POINT_CLOUD;case 1:return a.TRIANGULAR_MESH;default:return a.INVALID_GEOMETRY_TYPE}};return n.ready}}();"object"===typeof exports&&"object"===typeof module?module.exports=DracoDecoderModule:"function"===typeof define&&define.amd?define([],function(){return DracoDecoderModule}):"object"===typeof exports&&(exports.DracoDecoderModule=DracoDecoderModule);
package/assets/index.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="utf-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1, interactive-widget=resizes-content" />
6
- <title>TurtleCode</title>
6
+ <title>Trellis Studio</title>
7
7
  <link rel="icon" type="image/svg+xml" href="/logo.svg" />
8
8
  <link rel="apple-touch-icon" sizes="180x180" href="/logo.svg" />
9
9
  <meta name="theme-color" content="#F8F7F7" />
@@ -44,8 +44,8 @@
44
44
  }
45
45
  })()
46
46
  </script>
47
- <script type="module" crossorigin src="/assets/index-Dn8Qszh4.js"></script>
48
- <link rel="stylesheet" crossorigin href="/assets/index-C0mqcMws.css">
47
+ <script type="module" crossorigin src="/assets/index-BawkOegm.js"></script>
48
+ <link rel="stylesheet" crossorigin href="/assets/index-D0DTn_ER.css">
49
49
  </head>
50
50
  <body class="antialiased overscroll-none text-12-regular overflow-hidden">
51
51
  <noscript>You need to enable JavaScript to run this app.</noscript>
package/bin/cli.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  import { createServer, request as httpRequest } from "node:http"
4
+ import { createServer as netCreateServer } from "node:net"
4
5
  import { readFileSync, existsSync, statSync, mkdirSync } from "node:fs"
5
6
  import { join, extname, dirname, resolve } from "node:path"
6
7
  import { fileURLToPath } from "node:url"
@@ -74,6 +75,7 @@ if (args.includes("--help") || args.includes("-h")) {
74
75
  Options:
75
76
  --port, -p <number> Port to serve on (default: 3333)
76
77
  --backend, -b <url> OpenCode backend URL (default: http://localhost:4096)
78
+ --new Open the new project prompt instead of the current directory
77
79
  --no-open Don't auto-open the browser
78
80
  --quiet-backend Suppress backend stdout/stderr
79
81
  --help, -h Show this help message
@@ -99,7 +101,8 @@ function flag(long, short) {
99
101
 
100
102
  let actualPort = parseInt(flag("--port", "-p") || "3333", 10)
101
103
  const open = !args.includes("--no-open")
102
- const backend = new URL(flag("--backend", "-b") || process.env.OPENCODE_URL || "http://localhost:4096")
104
+ const fresh = args.includes("--new")
105
+ let backend = new URL(flag("--backend", "-b") || process.env.OPENCODE_URL || "http://localhost:4096")
103
106
 
104
107
  // URL-safe base64 encode (matches @opencode-ai/util/encode)
105
108
  function encode(str) {
@@ -142,6 +145,43 @@ function probe(origin) {
142
145
  })
143
146
  }
144
147
 
148
+ function portInUse(port, host = "127.0.0.1") {
149
+ return new Promise((ok) => {
150
+ const srv = netCreateServer()
151
+ srv.once("error", (err) => ok(err.code === "EADDRINUSE"))
152
+ srv.once("listening", () => srv.close(() => ok(false)))
153
+ srv.listen(port, host)
154
+ })
155
+ }
156
+
157
+ async function findFreePort(start, span = 20) {
158
+ for (let p = start; p < start + span; p++) {
159
+ if (!(await portInUse(p))) return p
160
+ }
161
+ return null
162
+ }
163
+
164
+ function identifyPortHolder(port) {
165
+ return new Promise((ok) => {
166
+ const cmd =
167
+ process.platform === "win32"
168
+ ? `netstat -ano | findstr LISTENING | findstr :${port}`
169
+ : `lsof -i :${port} -P -n -sTCP:LISTEN`
170
+ exec(cmd, { timeout: 1500 }, (err, stdout) => {
171
+ if (err || !stdout) return ok(null)
172
+ const line = stdout.split("\n").map((l) => l.trim()).find((l) => l.length > 0)
173
+ if (!line) return ok(null)
174
+ const parts = line.split(/\s+/)
175
+ if (process.platform === "win32") {
176
+ ok({ pid: parts[parts.length - 1], cmd: "(unknown)" })
177
+ } else {
178
+ // COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
179
+ ok({ pid: parts[1], cmd: parts[0] })
180
+ }
181
+ })
182
+ })
183
+ }
184
+
145
185
  function installOpencode() {
146
186
  return new Promise((resolve) => {
147
187
  console.log("\n opencode-ai not found. Installing globally via npm...\n")
@@ -291,6 +331,29 @@ if (!existsSync(join(root, "index.html"))) {
291
331
  process.exit(1)
292
332
  }
293
333
 
334
+ // Port-conflict pre-flight: if the requested backend port is bound by a
335
+ // non-Trellis process (probe failed but the socket is busy), fall back to the
336
+ // next free port instead of failing with EADDRINUSE. Skip for remote backends.
337
+ if (
338
+ (backend.hostname === "localhost" || backend.hostname === "127.0.0.1") &&
339
+ !(await probe(backend.origin))
340
+ ) {
341
+ const requested = parseInt(backend.port || "80", 10)
342
+ if (await portInUse(requested)) {
343
+ const holder = await identifyPortHolder(requested)
344
+ const free = await findFreePort(requested + 1)
345
+ if (!free) {
346
+ console.error(`\n Error: Port ${requested} is in use and no free port found within range.`)
347
+ if (holder) console.error(` Holder: pid ${holder.pid} (${holder.cmd})`)
348
+ console.error(` Free the port or pass --backend http://localhost:<port> with another port.\n`)
349
+ process.exit(1)
350
+ }
351
+ const holderInfo = holder ? ` by pid ${holder.pid} (${holder.cmd})` : ""
352
+ console.log(` Port ${requested} is in use${holderInfo}; using ${free} instead.`)
353
+ backend = new URL(`http://${backend.hostname}:${free}`)
354
+ }
355
+ }
356
+
294
357
  const spawned = await boot(backend.origin)
295
358
 
296
359
  // Ensure ~/.turtlecode exists for new project creation
@@ -428,14 +491,14 @@ async function startServer() {
428
491
  actualPort++
429
492
  }
430
493
 
431
- const dir = encode(resolve(process.cwd()))
432
- const url = `http://localhost:${actualPort}/${dir}`
494
+ const path = fresh ? "/" : `/${encode(resolve(process.cwd()))}`
495
+ const url = `http://localhost:${actualPort}${path}`
433
496
  console.log(`
434
497
  🐢 turtlecode v${pkg.version}
435
498
 
436
499
  Local: ${url}
437
500
  Backend: ${backend.origin}
438
- Project: ${process.cwd()}
501
+ Project: ${fresh ? "New project" : process.cwd()}
439
502
  Press Ctrl+C to stop
440
503
  `)
441
504
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turtlecode",
3
- "version": "0.3.11",
3
+ "version": "0.3.23",
4
4
  "description": "AI-powered creative workspace — launch with npx turtlecode",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,7 +12,6 @@
12
12
  ],
13
13
  "scripts": {
14
14
  "build": "bun script/build.ts",
15
- "prepublishOnly": "bun script/build.ts",
16
15
  "test": "bun test"
17
16
  },
18
17
  "keywords": [
@@ -27,25 +26,25 @@
27
26
  "license": "MIT",
28
27
  "repository": {
29
28
  "type": "git",
30
- "url": "https://github.com/trentbrew/turtlecode",
29
+ "url": "git+https://github.com/trentbrew/turtlecode.git",
31
30
  "directory": "packages/cli"
32
31
  },
33
32
  "engines": {
34
33
  "node": ">=18"
35
34
  },
36
35
  "optionalDependencies": {
37
- "turtlecode-backend-darwin-arm64": "0.3.11",
38
- "turtlecode-backend-darwin-x64": "0.3.11",
39
- "turtlecode-backend-darwin-x64-baseline": "0.3.11",
40
- "turtlecode-backend-linux-arm64": "0.3.11",
41
- "turtlecode-backend-linux-arm64-musl": "0.3.11",
42
- "turtlecode-backend-linux-x64": "0.3.11",
43
- "turtlecode-backend-linux-x64-baseline": "0.3.11",
44
- "turtlecode-backend-linux-x64-baseline-musl": "0.3.11",
45
- "turtlecode-backend-linux-x64-musl": "0.3.11",
46
- "turtlecode-backend-windows-arm64": "0.3.11",
47
- "turtlecode-backend-windows-x64": "0.3.11",
48
- "turtlecode-backend-windows-x64-baseline": "0.3.11"
36
+ "turtlecode-backend-darwin-arm64": "0.3.23",
37
+ "turtlecode-backend-darwin-x64": "0.3.23",
38
+ "turtlecode-backend-darwin-x64-baseline": "0.3.23",
39
+ "turtlecode-backend-linux-arm64": "0.3.23",
40
+ "turtlecode-backend-linux-arm64-musl": "0.3.23",
41
+ "turtlecode-backend-linux-x64": "0.3.23",
42
+ "turtlecode-backend-linux-x64-baseline": "0.3.23",
43
+ "turtlecode-backend-linux-x64-baseline-musl": "0.3.23",
44
+ "turtlecode-backend-linux-x64-musl": "0.3.23",
45
+ "turtlecode-backend-windows-arm64": "0.3.23",
46
+ "turtlecode-backend-windows-x64": "0.3.23",
47
+ "turtlecode-backend-windows-x64-baseline": "0.3.23"
49
48
  },
50
49
  "devDependencies": {
51
50
  "bun-types": "latest"
@@ -1 +0,0 @@
1
- import{U as a,C as n}from"./mermaid.core-CvvapKs3.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
@@ -1 +0,0 @@
1
- import{ac as r}from"./index-Dn8Qszh4.js";function f(...t){return r(a,t,u)}var a=(t,e)=>t.map(e),u=t=>(e,n,o)=>({done:!1,hasNext:!0,next:t(e,n,o)});function i(...t){return r(Object.entries,t)}export{f as m,i as t};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-WL4C6EOR-Cfh3g_wP.js";import{_ as i}from"./mermaid.core-CvvapKs3.js";import"./transform-BwXaE9hv.js";import"./chunk-FMBD7UC4-SQz3mX6W.js";import"./chunk-JSJVCQXG-DhvTUdKL.js";import"./chunk-55IACEB6-BT0s5uc_.js";import"./chunk-KX2RTZJC-CR3J0asp.js";import"./index-Dn8Qszh4.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
@@ -1 +0,0 @@
1
- import{s as a,c as s,a as e,C as t}from"./chunk-WL4C6EOR-Cfh3g_wP.js";import{_ as i}from"./mermaid.core-CvvapKs3.js";import"./transform-BwXaE9hv.js";import"./chunk-FMBD7UC4-SQz3mX6W.js";import"./chunk-JSJVCQXG-DhvTUdKL.js";import"./chunk-55IACEB6-BT0s5uc_.js";import"./chunk-KX2RTZJC-CR3J0asp.js";import"./index-Dn8Qszh4.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram};
@@ -1 +0,0 @@
1
- import{b as r}from"./_baseUniq-Ff_gEw0V.js";var e=4;function a(o){return r(o,e)}export{a as c};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dialog-select-provider-CvV5EJ9p.js","assets/index-Dn8Qszh4.js","assets/index-C0mqcMws.css","assets/list-dkB1NV7F.js","assets/chunk-VVM5DH6Z-DRRCzDvY.js","assets/tag-BesgAeYC.js"])))=>i.map(i=>d[i]);
2
- import{v as re,b as ve,af as he,aD as fe,a1 as me,l as i,t as x,c as ge,u as xe,y as ye,f as be,a9 as _e,P as we,i as _,z as $e,H as M,O as ke,m as r,aE as L,aF as f,n as Y,aG as Z,I as Se,q as Ce,Q as De,G as Ie,p as O,B as G,o as ze,aH as Pe,J as Ee,_ as Ke}from"./index-Dn8Qszh4.js";import{L as ee}from"./list-dkB1NV7F.js";import{P as Le}from"./tag-BesgAeYC.js";var Te=x("<a>");function R(h){const T=ve(),[b,S]=he(h,["href","children","class"]);return(()=>{var n=Te();return n.$$click=j=>{b.href&&(j.preventDefault(),T.openLink(b.href))},fe(n,me({get href(){return b.href},get class(){return`text-text-strong underline ${b.class??""}`}},S),!1,!0),i(n,()=>b.children),n})()}re(["click"]);var Fe=x('<div class="w-full flex flex-col gap-1.5"><div class="text-14-regular text-text-base"></div><div>'),Me=x('<form class="flex flex-col items-start gap-4">'),Oe=x('<div class="w-full flex items-center gap-x-2"><div class="w-4 h-2 rounded-[1px] bg-input-base shadow-xs-border-base flex items-center justify-center"><div class="w-2.5 h-0.5 ml-0 bg-icon-strong-base hidden"data-slot=list-item-extra-icon></div></div><span></span><span class="text-14-regular text-text-weak">'),te=x('<div class="text-14-regular text-text-base">'),je=x("<div>"),Ae=x('<div class="w-full flex items-center gap-x-2"><div class="w-4 h-2 rounded-[1px] bg-input-base shadow-xs-border-base flex items-center justify-center"><div class="w-2.5 h-0.5 ml-0 bg-icon-strong-base hidden"data-slot=list-item-extra-icon></div></div><span>'),qe=x('<div class="flex flex-col gap-4"><div class="text-14-regular text-text-base"></div><div class="text-14-regular text-text-base"></div><div class="text-14-regular text-text-base">'),Ve=x('<div class="flex flex-col gap-6"><form class="flex flex-col items-start gap-4">'),Be=x('<div class="flex flex-col gap-6"><div class="text-14-regular text-text-base"></div><form class="flex flex-col items-start gap-4">'),Ze=x('<div class="flex flex-col gap-6"><div class="text-14-regular text-text-base"></div><div class="text-14-regular text-text-base flex items-center gap-4"><span>'),H=x('<div class="text-14-regular text-text-base"><div class="flex items-center gap-x-2"><span>'),Ge=x('<div class="flex flex-col gap-6 px-2.5 pb-3"><div class="px-2.5 flex gap-4 items-center"><div class="text-16-medium text-text-strong"></div></div><div class="px-2.5 pb-10 flex flex-col gap-6"><div tabindex=0>');function Re(h){const T=ge(),b=xe(),S=ye(),n=be(),j=_e(),J=()=>{Ke(()=>import("./dialog-select-provider-CvV5EJ9p.js").then(e=>e.d),__vite__mapDeps([0,1,2,3,4,5])).then(e=>{T.show(()=>r(e.DialogSelectProvider,{}))})},C={value:!0},w={current:void 0};we(()=>{C.value=!1,w.current!==void 0&&(clearTimeout(w.current),w.current=void 0)});const $=_(()=>j.all().find(e=>e.id===h.provider)??b.data.provider.all.find(e=>e.id===h.provider)),A=_(()=>[{type:"api",label:n.t("provider.connect.method.apiKey")}]),[Q]=$e(()=>h.provider,async()=>{const e=b.data.provider_auth[h.provider];if(e)return e;const t=await S.client.provider.auth();return C.value?(b.set("provider_auth",t.data??{}),t.data?.[h.provider]??A()):A()}),N=_(()=>Q.loading&&!b.data.provider_auth[h.provider]),I=_(()=>Q.latest??b.data.provider_auth[h.provider]??A()),[d,ne]=M({methodIndex:void 0,authorization:void 0,state:"pending",error:void 0});function k(e){ne(Pe(t=>{if(e.type==="method.select"){t.methodIndex=e.index,t.authorization=void 0,t.state=void 0,t.error=void 0;return}if(e.type==="method.reset"){t.methodIndex=void 0,t.authorization=void 0,t.state=void 0,t.error=void 0;return}if(e.type==="auth.prompt"){t.state="prompt",t.error=void 0;return}if(e.type==="auth.pending"){t.state="pending",t.error=void 0;return}if(e.type==="auth.complete"){t.state="complete",t.authorization=e.authorization,t.error=void 0;return}t.state="error",t.error=e.error}))}const z=_(()=>d.methodIndex!==void 0?I().at(d.methodIndex):void 0),oe=e=>e?e.type==="api"?n.t("provider.connect.method.apiKey"):e.label??"":"";function F(e,t){if(e&&typeof e=="object"&&"data"in e){const o=e.data;if(typeof o?.message=="string"&&o.message)return o.message}if(e&&typeof e=="object"&&"error"in e){const o=F(e.error,"");if(o)return o}if(e&&typeof e=="object"&&"message"in e){const o=e.message;if(typeof o=="string"&&o)return o}return e instanceof Error&&e.message?e.message:typeof e=="string"&&e?e:t}async function q(e,t){w.current!==void 0&&(clearTimeout(w.current),w.current=void 0);const o=I()[e];if(k({type:"method.select",index:e}),o.type==="oauth"){if(o.prompts?.length&&!t){k({type:"auth.prompt"});return}k({type:"auth.pending"});const c=Date.now();await S.client.provider.oauth.authorize({providerID:h.provider,method:e,inputs:t},{throwOnError:!0}).then(a=>{if(!C.value)return;const u=1e3-(Date.now()-c);if(u>0){w.current!==void 0&&clearTimeout(w.current),w.current=setTimeout(()=>{w.current=void 0,C.value&&k({type:"auth.complete",authorization:a.data})},u);return}k({type:"auth.complete",authorization:a.data})}).catch(a=>{C.value&&k({type:"auth.error",error:F(a,n.t("common.requestFailed"))})})}}function ie(){const[e,t]=M({value:{},index:0}),o=_(()=>{const l=z();return l?.type!=="oauth"?[]:l.prompts??[]}),c=(l,p)=>{if(!l.when)return!0;const g=p[l.when.key];return g===void 0?!1:l.when.op==="eq"?g===l.when.value:g!==l.when.value},a=_(()=>{const l=o(),p=l.findIndex((g,K)=>K>=e.index&&c(g,e.value));if(p!==-1)return{index:p,prompt:l[p]}}),s=_(()=>{const l=a();return!l||l.prompt.type!=="text"?!1:(e.value[l.prompt.key]??"").trim().length>0});async function u(l,p){if(d.methodIndex===void 0)return;const g=o().findIndex((K,y)=>y>l&&c(K,p));if(g!==-1){t("index",g);return}await q(d.methodIndex,p)}async function v(l){l.preventDefault();const p=a();!p||p.prompt.type!=="text"||s()&&await u(p.index,e.value)}const m=()=>a(),P=_(()=>{const l=m()?.prompt;if(!(!l||l.type!=="text"))return l}),E=_(()=>{const l=m()?.prompt;if(!(!l||l.type!=="select"))return l});return(()=>{var l=Me();return l.addEventListener("submit",v),i(l,r(L,{get children(){return[r(f,{get when(){return m()?.prompt.type==="text"},get children(){return[r(O,{type:"text",get label(){return P()?.message??""},get placeholder(){return P()?.placeholder},get value(){return Y(()=>!!P())()?e.value[P().key]??"":""},onChange:p=>{const g=P();g&&t("value",g.key,p)}}),r(G,{class:"w-auto",type:"submit",size:"large",variant:"primary",get disabled(){return!s()},get children(){return n.t("common.continue")}})]}}),r(f,{get when(){return m()?.prompt.type==="select"},get children(){var p=Fe(),g=p.firstChild,K=g.nextSibling;return i(g,()=>E()?.message),i(K,r(ee,{get items(){return E()?.options??[]},key:y=>y.value,get current(){return E()?.options.find(y=>y.value===e.value[E().key])},onSelect:y=>{if(!y)return;const D=E();if(!D)return;const B={...e.value,[D.key]:y.value};t("value",D.key,y.value),u(m().index,B)},children:y=>(()=>{var D=Oe(),B=D.firstChild,X=B.nextSibling,pe=X.nextSibling;return i(X,()=>y.label),i(pe,()=>y.hint),D})()})),p}})]}})),l})()}let U;function ae(e){e.key==="Enter"&&e.target instanceof HTMLInputElement||e.key!=="Escape"&&U?.onKeyDown(e)}let W=!1;ke(()=>{W||N()||I().length===1&&(W=!0,q(0))});async function V(){await S.client.global.dispose(),T.close(),Ee({variant:"success",icon:"circle-check",title:n.t("provider.connect.toast.connected.title",{provider:$().name}),description:n.t("provider.connect.toast.connected.description",{provider:$().name})})}function le(){if(I().length===1){J();return}if(d.authorization){k({type:"method.reset"});return}if(d.methodIndex!==void 0){k({type:"method.reset"});return}J()}function se(){return[(()=>{var e=te();return i(e,()=>n.t("provider.connect.selectMethod",{provider:$().name})),e})(),(()=>{var e=je();return i(e,r(ee,{ref:t=>{U=t},items:I,key:t=>t?.label,onSelect:async(t,o)=>{t&&q(o)},children:t=>(()=>{var o=Ae(),c=o.firstChild,a=c.nextSibling;return i(a,()=>oe(t)),o})()})),e})()]}function ce(){const[e,t]=M({value:"",error:void 0});async function o(c){c.preventDefault();const a=c.currentTarget,u=new FormData(a).get("apiKey");if(!u?.trim()){t("error",n.t("provider.connect.apiKey.required"));return}t("error",void 0),await S.client.auth.set({providerID:h.provider,auth:{type:"api",key:u}}),await V()}return(()=>{var c=Ve(),a=c.firstChild;return i(c,r(L,{get children(){return[r(f,{get when(){return $().id==="opencode"},get children(){var s=qe(),u=s.firstChild,v=u.nextSibling,m=v.nextSibling;return i(u,()=>n.t("provider.connect.opencodeZen.line1")),i(v,()=>n.t("provider.connect.opencodeZen.line2")),i(m,()=>n.t("provider.connect.opencodeZen.visit.prefix"),null),i(m,r(R,{href:"https://opencode.ai/zen",tabIndex:-1,get children(){return n.t("provider.connect.opencodeZen.visit.link")}}),null),i(m,()=>n.t("provider.connect.opencodeZen.visit.suffix"),null),s}}),r(f,{when:!0,get children(){var s=te();return i(s,()=>n.t("provider.connect.apiKey.description",{provider:$().name})),s}})]}}),a),a.addEventListener("submit",o),i(a,r(O,{autofocus:!0,type:"text",get label(){return n.t("provider.connect.apiKey.label",{provider:$().name})},get placeholder(){return n.t("provider.connect.apiKey.placeholder")},name:"apiKey",get value(){return e.value},onChange:s=>t("value",s),get validationState(){return e.error?"invalid":void 0},get error(){return e.error}}),null),i(a,r(G,{class:"w-auto",type:"submit",size:"large",variant:"primary",get children(){return n.t("common.continue")}}),null),c})()}function ue(){const[e,t]=M({value:"",error:void 0});async function o(c){c.preventDefault();const a=c.currentTarget,u=new FormData(a).get("code");if(!u?.trim()){t("error",n.t("provider.connect.oauth.code.required"));return}t("error",void 0);const v=await S.client.provider.oauth.callback({providerID:h.provider,method:d.methodIndex,code:u}).then(m=>m.error?{ok:!1,error:m.error}:{ok:!0}).catch(m=>({ok:!1,error:m}));if(v.ok){await V();return}t("error",F(v.error,n.t("provider.connect.oauth.code.invalid")))}return(()=>{var c=Be(),a=c.firstChild,s=a.nextSibling;return i(a,()=>n.t("provider.connect.oauth.code.visit.prefix"),null),i(a,r(R,{get href(){return d.authorization.url},get children(){return n.t("provider.connect.oauth.code.visit.link")}}),null),i(a,()=>n.t("provider.connect.oauth.code.visit.suffix",{provider:$().name}),null),s.addEventListener("submit",o),i(s,r(O,{autofocus:!0,type:"text",get label(){return n.t("provider.connect.oauth.code.label",{method:z()?.label??""})},get placeholder(){return n.t("provider.connect.oauth.code.placeholder")},name:"code",get value(){return e.value},onChange:u=>t("value",u),get validationState(){return e.error?"invalid":void 0},get error(){return e.error}}),null),i(s,r(G,{class:"w-auto",type:"submit",size:"large",variant:"primary",get children(){return n.t("common.continue")}}),null),c})()}function de(){const e=_(()=>{const t=d.authorization?.instructions;return t?.includes(":")?t.split(":")[1]?.trim():t});return ze(()=>{(async()=>{const t=await S.client.provider.oauth.callback({providerID:h.provider,method:d.methodIndex}).then(o=>o.error?{ok:!1,error:o.error}:{ok:!0}).catch(o=>({ok:!1,error:o}));if(C.value){if(!t.ok){const o=F(t.error,n.t("common.requestFailed"));k({type:"auth.error",error:o});return}await V()}})()}),(()=>{var t=Ze(),o=t.firstChild,c=o.nextSibling,a=c.firstChild;return i(o,()=>n.t("provider.connect.oauth.auto.visit.prefix"),null),i(o,r(R,{get href(){return d.authorization.url},get children(){return n.t("provider.connect.oauth.auto.visit.link")}}),null),i(o,()=>n.t("provider.connect.oauth.auto.visit.suffix",{provider:$().name}),null),i(t,r(O,{get label(){return n.t("provider.connect.oauth.auto.confirmationCode")},class:"font-mono",get value(){return e()},readOnly:!0,copyable:!0}),c),i(c,r(Z,{}),a),i(a,()=>n.t("provider.connect.status.waiting")),t})()}return r(Ie,{get title(){return r(De,{tabIndex:-1,icon:"arrow-left",variant:"ghost",onClick:le,get"aria-label"(){return n.t("common.goBack")}})},get children(){var e=Ge(),t=e.firstChild,o=t.firstChild,c=t.nextSibling,a=c.firstChild;return i(t,r(Le,{get id(){return h.provider},class:"size-5 shrink-0 icon-strong-base"}),o),i(o,r(L,{get children(){return[r(f,{get when(){return Y(()=>h.provider==="anthropic")()&&z()?.label?.toLowerCase().includes("max")},get children(){return n.t("provider.connect.title.anthropicProMax")}}),r(f,{when:!0,get children(){return n.t("provider.connect.title",{provider:$().name})}})]}})),a.$$keydown=ae,i(a,r(L,{get children(){return[r(f,{get when(){return N()},get children(){var s=H(),u=s.firstChild,v=u.firstChild;return i(u,r(Z,{}),v),i(v,()=>n.t("provider.connect.status.inProgress")),s}}),r(f,{get when(){return d.methodIndex===void 0},get children(){return r(se,{})}}),r(f,{get when(){return d.state==="pending"},get children(){var s=H(),u=s.firstChild,v=u.firstChild;return i(u,r(Z,{}),v),i(v,()=>n.t("provider.connect.status.inProgress")),s}}),r(f,{get when(){return d.state==="prompt"},get children(){return r(ie,{})}}),r(f,{get when(){return d.state==="error"},get children(){var s=H(),u=s.firstChild,v=u.firstChild;return i(u,r(Se,{name:"circle-ban-sign",class:"text-icon-critical-base"}),v),i(v,()=>n.t("provider.connect.status.failed",{error:d.error??""})),s}}),r(f,{get when(){return z()?.type==="api"},get children(){return r(ce,{})}}),r(f,{get when(){return z()?.type==="oauth"},get children(){return r(L,{get children(){return[r(f,{get when(){return d.authorization?.method==="code"},get children(){return r(ue,{})}}),r(f,{get when(){return d.authorization?.method==="auto"},get children(){return r(de,{})}})]}})}})]}})),Ce(()=>a.autofocus=d.methodIndex===void 0?!0:void 0),e}})}re(["keydown"]);const Ne=Object.freeze(Object.defineProperty({__proto__:null,DialogConnectProvider:Re},Symbol.toStringTag,{value:"Module"}));export{Re as D,R as L,Ne as d};
@@ -1 +0,0 @@
1
- import{a6 as v,d as D,a3 as S,a4 as k,a7 as _,c as $,f as w,i as P,m as d,l as p,G as F,r as L,J as u,t as I}from"./index-Dn8Qszh4.js";import{L as T}from"./list-dkB1NV7F.js";import{e as b}from"./session-TangtQ_5.js";import"./chunk-VVM5DH6Z-DRRCzDvY.js";import"./tabs-CZnn31zT.js";import"./select-vXOPytkX.js";import"./trellis-C8s_TygI.js";import"./transform-BwXaE9hv.js";import"./tag-BesgAeYC.js";var q=I('<div class="w-full flex items-center gap-2"><span class="truncate flex-1 min-w-0 text-left font-normal"></span><span class="text-text-weak shrink-0 font-normal">');function C(i){return i.toLocaleTimeString(void 0,{timeStyle:"short"})}const B=()=>{const i=v(),g=D(),c=S(),l=k(),f=_(),h=$(),r=w(),x=P(()=>{const t=i.id;if(!t)return[];const a=c.data.message[t]??[],o=[];for(const s of a){if(s.role!=="user")continue;const e=(c.data.part[s.id]??[]).find(n=>n.type==="text"&&!n.synthetic&&!n.ignored);e&&o.push({id:s.id,text:e.text.replace(/\n/g," ").slice(0,200),time:C(new Date(s.time.created))})}return o.reverse()}),y=t=>{if(!t)return;const a=i.id;if(!a)return;const o=c.data.part[t.id]??[],s=b(o,{directory:l.directory,attachmentName:r.t("common.attachment")}),m=L(l.directory);l.client.session.fork({sessionID:a,messageID:t.id}).then(e=>{if(!e.data){u({title:r.t("common.requestFailed")});return}h.close(),f.set(s,void 0,{dir:m,id:e.data.id}),g(`/${m}/session/${e.data.id}`)}).catch(e=>{const n=e instanceof Error?e.message:String(e);u({title:r.t("common.requestFailed"),description:n})})};return d(F,{get title(){return r.t("command.session.fork")},get children(){return d(T,{class:"flex-1 min-h-0 [&_[data-slot=list-scroll]]:flex-1 [&_[data-slot=list-scroll]]:min-h-0",get search(){return{placeholder:r.t("common.search.placeholder"),autofocus:!0}},get emptyMessage(){return r.t("dialog.fork.empty")},key:t=>t.id,items:x,filterKeys:["text"],onSelect:y,children:t=>(()=>{var a=q(),o=a.firstChild,s=o.nextSibling;return p(o,()=>t.text),p(s,()=>t.time),a})()})}})};export{B as DialogFork};
@@ -1 +0,0 @@
1
- import{a8 as y,f as D,c as b,m as o,l as n,Z as I,B as k,G as $,t as g,aa as C,v as P}from"./index-Dn8Qszh4.js";import{L}from"./list-dkB1NV7F.js";import{S as c}from"./switch-CL32HGHZ.js";import{D as _}from"./dialog-select-provider-CvV5EJ9p.js";import"./chunk-VVM5DH6Z-DRRCzDvY.js";import"./tag-BesgAeYC.js";import"./dialog-connect-provider-DS4Df_nV.js";var B=g("<span>"),S=g('<div class="w-full flex items-center justify-between gap-x-3"><span></span><div>');const j=()=>{const t=y(),d=D(),u=b(),v=()=>{u.show(()=>o(_,{}))},s=e=>C.indexOf(e),m=e=>t.model.list().filter(r=>r.provider.id===e),h=e=>m(e).every(r=>t.model.visible({modelID:r.id,providerID:r.provider.id})),f=(e,r)=>{m(e).forEach(i=>{t.model.setVisibility({modelID:i.id,providerID:i.provider.id},r)})};return o($,{get title(){return d.t("dialog.model.manage")},get description(){return d.t("dialog.model.manage.description")},get action(){return o(k,{class:"h-7 -my-1 text-14-medium",icon:"plus-small",tabIndex:-1,onClick:v,get children(){return d.t("command.provider.connect")}})},get children(){return o(L,{get search(){return{placeholder:d.t("dialog.model.search.placeholder"),autofocus:!0}},get emptyMessage(){return d.t("dialog.model.empty")},key:e=>`${e?.provider?.id}:${e?.id}`,get items(){return t.model.list()},filterKeys:["provider.name","name","id"],sortBy:(e,r)=>e.name.localeCompare(r.name),groupBy:e=>e.provider.id,groupHeader:e=>{const r=e.items[0].provider;return[(()=>{var i=B();return n(i,()=>r.name),i})(),o(I,{placement:"top",get value(){return d.t("dialog.model.manage.provider.toggle",{provider:r.name})},get children(){return o(c,{class:"-mr-1",get checked(){return h(r.id)},onChange:i=>f(r.id,i),hideLabel:!0,get children(){return r.name}})}})]},sortGroupsBy:(e,r)=>{const i=s(e.items[0].provider.id),l=s(r.items[0].provider.id),a=i>=0,p=l>=0;return a&&!p?-1:!a&&p?1:i-l},onSelect:e=>{if(!e)return;const r={modelID:e.id,providerID:e.provider.id};t.model.setVisibility(r,!t.model.visible(r))},children:e=>(()=>{var r=S(),i=r.firstChild,l=i.nextSibling;return n(i,()=>e.name),l.$$click=a=>a.stopPropagation(),n(l,o(c,{get checked(){return!!t.model.visible({modelID:e.id,providerID:e.provider.id})},onChange:a=>{t.model.setVisibility({modelID:e.id,providerID:e.provider.id},a)}})),r})()})}})};P(["click"]);export{j as DialogManageModels};
@@ -1,6 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dialog-create-project-BPLZmIBj.js","assets/index-Dn8Qszh4.js","assets/index-C0mqcMws.css","assets/dialog-clone-project-CTom8vZq.js"])))=>i.map(i=>d[i]);
2
- import{u as J,y as Q,a as U,c as X,f as tt,h as et,i as C,z as rt,A as D,m as _,l as b,I as M,C as Z,E as nt,_ as B,G as st,t as T}from"./index-Dn8Qszh4.js";import{L as ot,f as it}from"./list-dkB1NV7F.js";import"./chunk-VVM5DH6Z-DRRCzDvY.js";var G=T('<div class="w-full flex items-center justify-between rounded-md"><div class="flex items-center gap-x-3 grow min-w-0"><span class="text-14-regular text-text-interactive-base">'),at=T('<div class="w-full flex items-center justify-between rounded-md"><div class="flex items-center gap-x-3 grow min-w-0"><div class="flex items-center text-14-regular min-w-0"><span class="text-text-strong whitespace-nowrap">~</span><span class="text-text-weak whitespace-nowrap">/'),ct=T('<div class="w-full flex items-center justify-between rounded-md"><div class="flex items-center gap-x-3 grow min-w-0"><div class="flex items-center text-14-regular min-w-0"><span class="text-text-weak whitespace-nowrap overflow-hidden overflow-ellipsis truncate min-w-0"></span><span class="text-text-strong whitespace-nowrap"></span><span class="text-text-weak whitespace-nowrap">/');const O="__clone__";function H(n){return((n??"").split(/\r?\n/)[0]??"").replace(/[\u0000-\u001F\u007F]/g,"").trim()}function lt(n){const t=n.replaceAll("\\","/");return t.startsWith("//")&&!t.startsWith("///")?"//"+t.slice(2).replace(/\/+/g,"/"):t.replace(/\/+/g,"/")}function x(n){const t=lt(n);return/^[A-Za-z]:$/.test(t)?t+"/":t}function p(n){const t=x(n);return t==="/"||t==="//"||/^[A-Za-z]:\/$/.test(t)?t:t.replace(/\/+$/,"")}function ut(n,t){const o=p(n??""),a=p(t).replace(/^\/+/,"");return o?a?o.endsWith("/")?o+a:o+"/"+a:o:a}function F(n){const t=x(n);return t.startsWith("//")?"//":t.startsWith("/")?"/":/^[A-Za-z]:\//.test(t)?t.slice(0,3):""}function ft(n){const t=p(n);if(t==="/"||t==="//"||/^[A-Za-z]:\/$/.test(t))return t;const o=t.lastIndexOf("/");return o<=0?"/":o===2&&/^[A-Za-z]:/.test(t)?t.slice(0,3):t.slice(0,o)}function dt(n){const t=x(n.trim());return t?t.startsWith("~")?"tilde":F(t)?"absolute":"relative":"relative"}function N(n,t){const o=p(n);if(!t)return"";const a=p(t),g=o.toLowerCase(),l=a.toLowerCase();return g===l?"~":g.startsWith(l+"/")?"~"+o.slice(a.length):""}function V(n,t,o){const a=p(n);return dt(t)==="absolute"?a:N(a,o)||a}function q(n,t,o){const a=p(n),g=N(a,t),l=c=>c?c.endsWith("/")?c:c+"/":"",w=Array.from(new Set([a,l(a),g,l(g),D(a)].filter(Boolean))).join(`
3
- `);return{absolute:a,search:w,group:o}}function ht(n){const t=new Set;return n.filter(o=>t.has(o.absolute)?!1:(t.add(o.absolute),!0))}function pt(n){const t=new Map;let o=0;const a=w=>{const c=n.start();if(!c)return;const i=x(w);if(!i)return{directory:p(c),path:""};const y=n.home();if(i==="~")return{directory:p(y||c),path:""};if(i.startsWith("~/"))return{directory:p(y||c),path:i.slice(2)};const u=F(i);return u?{directory:p(u),path:i.slice(u.length)}:{directory:p(c),path:i}},g=async w=>{const c=p(w),i=t.get(c);if(i)return i;const y=n.sdk.client.file.list({directory:c,path:""}).then(u=>u.data??[]).catch(()=>[]).then(u=>u.filter(d=>d.type==="directory").map(d=>({name:d.name,absolute:p(x(d.absolute))})));return t.set(c,y),y},l=async(w,c,i)=>{const y=await g(w);return c?it.go(c,y,{key:"name",limit:i}).map(u=>u.obj.absolute):y.slice(0,i).map(u=>u.absolute)};return async w=>{const c=++o,i=()=>c===o,y=H(w),u=a(y);if(!u)return[];const d=x(y),W=d.startsWith("~")||!!F(d)||d.includes("/"),z=x(u.path),L=()=>n.sdk.client.find.files({directory:u.directory,query:z,type:"directory",limit:50}).then(m=>m.data??[]).catch(()=>[]);if(!W){const m=await L();return i()?m.map(I=>ut(u.directory,I)).slice(0,50):[]}const v=z.replace(/^\/+/,"").split("/"),R=v.slice(0,v.length-1).filter(m=>m&&m!=="."),S=v[v.length-1]??"",E=12,P=4;let e=[u.directory];for(const m of R){if(!i())return[];if(m===".."){e=e.map(ft);continue}const I=(await Promise.all(e.map(Y=>l(Y,m,P)))).flat();if(!i())return[];if(e=Array.from(new Set(I)).slice(0,E),e.length===0)return[]}const f=(await Promise.all(e.map(m=>l(m,S,50)))).flat();if(!i())return[];const r=Array.from(new Set(f)),s=d.startsWith("~")?p(u.directory):"";if(!!d.endsWith("/")||!S)return(s?Array.from(new Set([s,...r])):r).slice(0,50);const $=S.toLowerCase(),k=r.filter(m=>D(m).toLowerCase()===$)[0];if(!k)return r.slice(0,50);const j=await l(k,"",30);if(!i())return[];const K=Array.from(new Set([...r,...j]));return(s?Array.from(new Set([s,...K])):K).slice(0,50)}}function wt(n){const t=J(),o=Q(),a=U(),g=X(),l=tt(),[w,c]=et("");let i;const y=C(()=>!(t.data.path.home||t.data.path.directory)),[u]=rt(()=>y()?!0:void 0,async()=>o.client.path.get().then(e=>e.data).catch(()=>{}),{initialValue:void 0}),d=C(()=>t.data.path.home||u()?.home||""),W=C(()=>d()+"/.turtlecode"),z=C(()=>W()),L=pt({sdk:o,home:d,start:z}),v=C(()=>{const e=a.projects.list(),f=new Map;for(const r of e){let s=0;const h=[r.worktree,...r.sandboxes??[]];for(const $ of h){const A=t.child($,{bootstrap:!1})[0].session;for(const k of A){if(k.time.archived)continue;const j=k.time.updated??k.time.created;j>s&&(s=j)}}f.set(r.worktree,s)}return e.map((r,s)=>({project:r,at:f.get(r.worktree)??0,index:s})).sort((r,s)=>s.at-r.at||r.index-s.index).slice(0,5).map(({project:r})=>{const s=q(r.worktree,d(),"recent"),h=r.name||D(r.worktree);return{...s,search:`${s.search}
4
- ${h}`}})}),R={absolute:"__create__",search:l.t("dialog.directory.create")+`
5
- new blank project`,group:"create"},S={absolute:O,search:l.t("dialog.clone.title")+`
6
- clone github import`,group:"create"},E=async e=>{const r=(await L(e)).map(s=>q(s,d(),"folders"));return[R,S,...ht([...v(),...r])]};function P(e){n.onSelect(n.multiple?[e]:e),g.close()}return _(st,{get title(){return n.title??l.t("command.project.open")},get children(){return _(ot,{get search(){return{placeholder:l.t("dialog.directory.search.placeholder"),autofocus:!0}},get emptyMessage(){return l.t("dialog.directory.empty")},get loadingMessage(){return l.t("common.loading")},items:E,key:e=>e.absolute,filterKeys:["search"],groupBy:e=>e.group,sortGroupsBy:(e,f)=>e.category===f.category?0:e.category==="create"?-1:f.category==="create"?1:e.category==="recent"?-1:1,groupHeader:e=>{if(e.category!=="create")return e.category==="recent"?l.t("home.recentProjects"):l.t("command.project.open")},ref:e=>i=e,onFilter:e=>c(H(e)),onKeyEvent:(e,f)=>{if(e.key!=="Tab"||e.shiftKey||!f)return;e.preventDefault(),e.stopPropagation();const r=V(f.absolute,w(),d());i?.setFilter(r.endsWith("/")?r:r+"/")},onSelect:e=>{if(e){if(e.absolute==="__create__"){g.close(),setTimeout(()=>{B(()=>import("./dialog-create-project-BPLZmIBj.js"),__vite__mapDeps([0,1,2])).then(f=>{g.show(()=>_(f.DialogCreateProject,{get multiple(){return n.multiple},get onSelect(){return n.onSelect}}),()=>n.onSelect(null))})});return}if(e.absolute===O){g.close(),setTimeout(()=>{B(()=>import("./dialog-clone-project-CTom8vZq.js"),__vite__mapDeps([3,1,2])).then(f=>{g.show(()=>_(f.DialogCloneProject,{onSelect:r=>r&&P(r)}),()=>n.onSelect(null))})});return}P(e.absolute)}},children:e=>{if(e.absolute==="__create__")return(()=>{var r=G(),s=r.firstChild,h=s.firstChild;return b(s,_(M,{name:"plus",size:"small",class:"shrink-0 size-4 text-icon-interactive-base"}),h),b(h,()=>l.t("dialog.directory.create")),r})();if(e.absolute===O)return(()=>{var r=G(),s=r.firstChild,h=s.firstChild;return b(s,_(M,{name:"branch",size:"small",class:"shrink-0 size-4 text-icon-interactive-base"}),h),b(h,()=>l.t("dialog.clone.title")),r})();const f=V(e.absolute,w(),d());return f==="~"?(()=>{var r=at(),s=r.firstChild,h=s.firstChild;return b(s,_(Z,{get node(){return{path:e.absolute,type:"directory"}},class:"shrink-0 size-4"}),h),r})():(()=>{var r=ct(),s=r.firstChild,h=s.firstChild,$=h.firstChild,A=$.nextSibling;return b(s,_(Z,{get node(){return{path:e.absolute,type:"directory"}},class:"shrink-0 size-4"}),h),b($,()=>nt(f)),b(A,()=>D(f)),r})()}})}})}export{wt as DialogSelectDirectory};
@@ -1 +0,0 @@
1
- import{l as g,q as E,V as Q,t as S,aK as U,f as X,a as Z,aL as ee,c as te,d as ne,y as se,u as re,h as ae,i as b,P as oe,m as y,aM as ie,aE as ce,aF as K,S as C,aN as le,I as de,C as ue,E as fe,A as O,G as ge,r as he}from"./index-Dn8Qszh4.js";import{L as pe}from"./list-dkB1NV7F.js";import{u as me}from"./trellis-C8s_TygI.js";import{c as we}from"./session-TangtQ_5.js";import"./chunk-VVM5DH6Z-DRRCzDvY.js";import"./select-vXOPytkX.js";import"./transform-BwXaE9hv.js";import"./tabs-CZnn31zT.js";import"./tag-BesgAeYC.js";var ye=S("<span data-component=keybind>");function ve(t){return(()=>{var n=ye();return g(n,()=>t.children),E(a=>Q(n,{...t.classList??{},[t.class??""]:!!t.class},a)),n})()}function be(t,n){const a=new Date(t),r=new Date().getTime()-a.getTime(),c=Math.floor(r/1e3),u=Math.floor(c/60),o=Math.floor(u/60),f=Math.floor(o/24);return c<60?n("common.time.justNow"):u<60?n("common.time.minutesAgo.short",{count:u}):o<24?n("common.time.hoursAgo.short",{count:o}):n("common.time.daysAgo.short",{count:f})}var P=S('<span class="text-14-regular text-text-weak truncate">'),xe=S('<div class="w-full flex items-center justify-between gap-4"><div class="flex items-center gap-2 min-w-0"><span class="text-14-regular text-text-strong whitespace-nowrap">'),$e=S('<span class="text-12-regular text-text-weak whitespace-nowrap ml-2">'),ke=S('<div class="w-full flex items-center justify-between rounded-md pl-1"><div class="flex items-center gap-x-3 grow min-w-0"><div class="flex items-center gap-2 min-w-0"><span class="text-14-regular text-text-strong truncate">'),Se=S('<div class="w-full flex items-center justify-between rounded-md pl-1"><div class="flex items-center gap-x-3 grow min-w-0"><div class="flex items-center text-14-regular"><span class="text-text-weak whitespace-nowrap overflow-hidden overflow-ellipsis truncate min-w-0"></span><span class="text-text-strong whitespace-nowrap">');const T=5,_e=["session.new","workspace.new","session.previous","session.next","terminal.toggle","review.toggle"],A=t=>{const n=new Set,a=[];for(const h of t)n.has(h.id)||(n.add(h.id),a.push(h));return a},N=(t,n)=>({id:"command:"+t.id,type:"command",title:t.title,description:t.description,keybind:t.keybind,category:n,option:t}),D=(t,n)=>({id:"file:"+t,type:"file",title:t,category:n,path:t}),Me=(t,n)=>({id:`session:${t.directory}:${t.id}`,type:"session",title:t.title,description:t.description,category:n,directory:t.directory,sessionID:t.id,archived:t.archived,updated:t.updated});function Ce(t){const n=b(()=>t.filesOnly()?[]:t.command.options.filter(r=>!r.disabled&&!r.id.startsWith("suggested.")&&r.id!=="file.open")),a=b(()=>{const r=t.language.t("palette.group.commands");return n().map(c=>N(c,r))}),h=b(()=>{const r=n(),c=new Map(_e.map((i,l)=>[i,l])),u=r.filter(i=>c.has(i.id)),o=u.length?u:r.slice(0,T),f=u.length?[...o].sort((i,l)=>(c.get(i.id)??0)-(c.get(l.id)??0)):o,v=t.language.t("palette.group.commands");return f.map(i=>N(i,v))});return{allowed:n,list:a,picks:h}}function De(t){const n=we({tabs:t.tabs,pathFromTab:t.file.pathFromTab,normalizeTab:r=>r.startsWith("file://")?t.file.tab(r):r}),a=b(()=>{const r=n.openedTabs(),c=n.activeFileTab(),u=c?[c,...r.filter(i=>i!==c)]:r,o=new Set,f=t.language.t("palette.group.files"),v=[];for(const i of u){const l=t.file.pathFromTab(i);l&&(o.has(l)||(o.add(l),v.push(D(l,f))))}return v.slice(0,T)}),h=b(()=>{const r=t.language.t("palette.group.files");return t.file.tree.children("").filter(o=>o.type==="file").map(o=>o.path).sort((o,f)=>o.localeCompare(f)).slice(0,T).map(o=>D(o,r))});return{recent:a,root:h}}function Fe(t){const n={token:0,inflight:void 0,cached:void 0};return{sessions:h=>{if(!h.trim())return n.token+=1,n.inflight=void 0,n.cached=void 0,[];if(n.cached)return n.cached;if(n.inflight)return n.inflight;const c=n.token,u=t.workspaces();return u.length===0?[]:(n.inflight=Promise.all(u.map(o=>{const f=t.label(o);return t.globalSDK.client.session.list({directory:o,roots:!0}).then(v=>(v.data??[]).filter(i=>!!i?.id).map(i=>({id:i.id,title:i.title??t.language.t("command.session.new"),description:f,directory:o,archived:i.time?.archived,updated:i.time?.updated}))).catch(()=>[])})).then(o=>{if(n.token!==c)return[];const f=new Set,v=t.language.t("command.category.session"),i=o.flat().filter(l=>{const $=`${l.directory}:${l.id}`;return f.has($)?!1:(f.add($),!0)}).map(l=>Me(l,v));return n.cached=i,i}).catch(()=>[]).finally(()=>{n.inflight=void 0}),n.inflight)}}}function Ne(t){const n=U(),a=X(),h=Z(),r=ee(),c=te(),u=ne(),o=se(),f=re(),{params:v,tabs:i,view:l}=me(),$=()=>t.mode==="files",k={cleanup:void 0,committed:!1},[q,G]=ae(!1),I=Ce({filesOnly:$,command:n,language:a}),_=De({file:r,tabs:i,language:a}),L=b(()=>ie(v.dir)??""),j=b(()=>{const e=L();if(e)return h.projects.list().find(s=>s.worktree===e||s.sandboxes?.includes(e))}),z=b(()=>{const e=L(),s=j();if(!s)return e?[e]:[];const d=[s.worktree,...s.sandboxes??[]];return e&&!d.includes(e)?[...d,e]:d}),R=b(()=>f.data.path.home),H=e=>{const s=j(),d=s&&e===s.worktree?a.t("workspace.type.local"):a.t("workspace.type.sandbox"),[m]=f.child(e,{bootstrap:!1}),p=R(),w=p?e.replace(p,"~"):e,x=m.vcs?.branch??O(e);return`${d} : ${x||w}`},{sessions:W}=Fe({workspaces:z,label:H,globalSDK:o,language:a}),B=async e=>{const s=e.trim();if(G(s.length>0),!s&&$()){const x=r.tree.state("")?.loaded,F=x?Promise.resolve():r.tree.list(""),M=A([..._.recent(),..._.root()]);return x||M.length>0?M:(await F,A([..._.recent(),..._.root()]))}if(!s)return[...I.picks(),..._.recent()];if($()){const x=await r.searchFiles(s),F=a.t("palette.group.files");return x.map(M=>D(M,F))}const[d,m]=await Promise.all([r.searchFiles(s),Promise.resolve(W(s))]),p=a.t("palette.group.files"),w=d.map(x=>D(x,p));return[...I.list(),...m,...w]},V=e=>{k.cleanup?.(),e&&e.type==="command"&&(k.cleanup=e.option?.onHighlight?.())},Y=e=>{const s=r.tab(e);i().open(s),r.load(e),l().reviewPanel.opened()||l().reviewPanel.open(),h.fileTree.setTab("all"),t.onOpenFile?.(e),i().setActive(s)},J=e=>{if(e){if(k.committed=!0,k.cleanup=void 0,c.close(),e.type==="command"){e.option?.onSelect?.("palette");return}if(e.type==="session"){if(!e.directory||!e.sessionID)return;u(`/${he(e.directory)}/session/${e.sessionID}`);return}e.path&&Y(e.path)}};return oe(()=>{k.committed||k.cleanup?.()}),y(ge,{class:"pt-3 pb-0 !max-h-[480px]",transition:!0,get children(){return y(pe,{get search(){return{placeholder:$()?a.t("session.header.searchFiles"):a.t("palette.search.placeholder"),autofocus:!0,hideIcon:!0}},get emptyMessage(){return a.t("palette.empty")},get loadingMessage(){return a.t("common.loading")},items:B,key:e=>e.id,filterKeys:["title","description","category"],get groupBy(){return q()?e=>e.category:()=>""},onMove:V,onSelect:J,children:e=>y(ce,{get fallback(){return(()=>{var s=Se(),d=s.firstChild,m=d.firstChild,p=m.firstChild,w=p.nextSibling;return g(d,y(ue,{get node(){return{path:e.path??"",type:"file"}},class:"shrink-0 size-4"}),m),g(p,()=>fe(e.path??"")),g(w,()=>O(e.path??"")),s})()},get children(){return[y(K,{get when(){return e.type==="command"},get children(){var s=xe(),d=s.firstChild,m=d.firstChild;return g(m,()=>e.title),g(d,y(C,{get when(){return e.description},get children(){var p=P();return g(p,()=>e.description),p}}),null),g(s,y(C,{get when(){return e.keybind},get children(){return y(ve,{class:"rounded-[4px]",get children(){return le(e.keybind??"",a.t)}})}}),null),s}}),y(K,{get when(){return e.type==="session"},get children(){var s=ke(),d=s.firstChild,m=d.firstChild,p=m.firstChild;return g(d,y(de,{name:"bubble-5",size:"small",class:"shrink-0 text-icon-weak"}),m),g(p,()=>e.title),g(m,y(C,{get when(){return e.description},get children(){var w=P();return g(w,()=>e.description),E(()=>w.classList.toggle("opacity-70",!!e.archived)),w}}),null),g(s,y(C,{get when(){return e.updated},get children(){var w=$e();return g(w,()=>be(new Date(e.updated).toISOString(),a.t)),w}}),null),E(()=>p.classList.toggle("opacity-70",!!e.archived)),s}})]}})})}})}export{Ne as DialogSelectFile};
@@ -1 +0,0 @@
1
- import{a3 as P,a4 as M,f as D,H as E,O as $,a5 as j,J as F,i as h,L as K,m as u,v as O,l as c,S as v,n as b,G as q,t as m}from"./index-Dn8Qszh4.js";import{L as B}from"./list-dkB1NV7F.js";import{S as G}from"./switch-CL32HGHZ.js";import"./chunk-VVM5DH6Z-DRRCzDvY.js";var H=m('<span class="text-11-regular text-text-weaker">'),J=m('<span class="text-11-regular text-text-weak">'),T=m('<span class="text-11-regular text-text-weaker truncate">'),z=m('<div class="w-full flex items-center justify-between gap-x-3"><div class="flex flex-col gap-0.5 min-w-0"><div class="flex items-center gap-2"><span class=truncate></span></div></div><div>');const A={connected:"mcp.status.connected",failed:"mcp.status.failed",needs_auth:"mcp.status.needs_auth",disabled:"mcp.status.disabled"},U=()=>{const s=P(),d=M(),l=D(),[_,o]=E({done:!1,loading:!1});$(j(()=>s.data.mcp_ready,(e,t)=>{!e&&t&&o("done",!1)},{defer:!0})),$(()=>{if(!(_.done||_.loading)){if(s.data.mcp_ready){o("done",!0);return}o("loading",!0),d.client.mcp.status().then(e=>{s.set("mcp",e.data??{}),s.set("mcp_ready",!0),o("done",!0)}).catch(e=>{o("done",!0),F({variant:"error",title:l.t("common.requestFailed"),description:e instanceof Error?e.message:String(e)})}).finally(()=>{o("loading",!1)})}});const p=h(()=>Object.entries(s.data.mcp??{}).map(([e,t])=>({name:e,status:t.status})).sort((e,t)=>e.name.localeCompare(t.name))),n=K(()=>({mutationFn:async e=>{s.data.mcp[e]?.status==="connected"?await d.client.mcp.disconnect({name:e}):await d.client.mcp.connect({name:e});const i=await d.client.mcp.status();i.data&&s.set("mcp",i.data)}})),S=h(()=>p().filter(e=>e.status==="connected").length),k=h(()=>p().length);return u(q,{get title(){return l.t("dialog.mcp.title")},get description(){return l.t("dialog.mcp.description",{enabled:S(),total:k()})},get children(){return u(B,{get search(){return{placeholder:l.t("common.search.placeholder"),autofocus:!0}},get emptyMessage(){return l.t("dialog.mcp.empty")},key:e=>e?.name??"",items:p,filterKeys:["name","status"],sortBy:(e,t)=>e.name.localeCompare(t.name),onSelect:e=>{!e||n.isPending||n.mutate(e.name)},children:e=>{const t=()=>s.data.mcp[e.name],i=()=>t()?.status,w=()=>{const r=i()?A[i()]:void 0;if(r)return l.t(r)},x=()=>{const r=t();return r?.status==="failed"?r.error:void 0},C=()=>i()==="connected";return(()=>{var r=z(),g=r.firstChild,f=g.firstChild,L=f.firstChild,y=g.nextSibling;return c(L,()=>e.name),c(f,u(v,{get when(){return w()},get children(){var a=H();return c(a,w),a}}),null),c(f,u(v,{get when(){return b(()=>!!n.isPending)()&&n.variables===e.name},get children(){var a=J();return c(a,()=>l.t("common.loading.ellipsis")),a}}),null),c(g,u(v,{get when(){return x()},get children(){var a=T();return c(a,x),a}}),null),y.$$click=a=>a.stopPropagation(),c(y,u(G,{get checked(){return C()},get disabled(){return b(()=>!!n.isPending)()&&n.variables===e.name},onChange:()=>{n.isPending||n.mutate(e.name)}})),r})()}})}})};O(["click"]);export{U as DialogSelectMcp};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dialog-connect-provider-DS4Df_nV.js","assets/index-Dn8Qszh4.js","assets/index-C0mqcMws.css","assets/list-dkB1NV7F.js","assets/chunk-VVM5DH6Z-DRRCzDvY.js","assets/tag-BesgAeYC.js","assets/dialog-select-provider-CvV5EJ9p.js"])))=>i.map(i=>d[i]);
2
- import{a8 as k,c as S,a9 as E,f as I,m as t,l as r,S as c,Z as L,n as T,aa as g,B as M,G as O,t as u,_ as w,v as A}from"./index-Dn8Qszh4.js";import{L as $}from"./list-dkB1NV7F.js";import{T as m,P as B}from"./tag-BesgAeYC.js";import{M as R}from"./session-TangtQ_5.js";import"./chunk-VVM5DH6Z-DRRCzDvY.js";import"./tabs-CZnn31zT.js";import"./select-vXOPytkX.js";import"./trellis-C8s_TygI.js";import"./transform-BwXaE9hv.js";var G=u('<div class="flex flex-col gap-3 px-2.5"><div class="text-14-medium text-text-base px-2.5">'),K=u('<div class="px-1.5 pb-1.5"><div class="w-full rounded-sm border border-border-weak-base bg-surface-raised-base"><div class="w-full flex flex-col items-start gap-4 px-1.5 pt-4 pb-4"><div class="px-2 text-14-medium text-text-base"></div><div class=w-full>'),V=u('<div class="w-full flex items-center gap-x-2.5"><span>'),h=u('<div class="text-14-regular text-text-weak">'),j=u('<div class="w-full flex items-center gap-x-3"><span>');const Q=b=>{const v=b.model??k().model,f=S(),y=E(),i=I(),D=l=>{w(()=>import("./dialog-connect-provider-DS4Df_nV.js").then(s=>s.d),__vite__mapDeps([0,1,2,3,4,5])).then(s=>{f.show(()=>t(s.DialogConnectProvider,{provider:l}))})},C=()=>{w(()=>import("./dialog-select-provider-CvV5EJ9p.js").then(l=>l.d),__vite__mapDeps([6,1,2,3,4,5,0])).then(l=>{f.show(()=>t(l.DialogSelectProvider,{}))})};let _;const P=l=>{l.key!=="Escape"&&_?.onKeyDown(l)};return t(O,{get title(){return i.t("dialog.model.select.title")},class:"overflow-y-auto [&_[data-slot=dialog-body]]:overflow-visible [&_[data-slot=dialog-body]]:flex-none",get children(){return[(()=>{var l=G(),s=l.firstChild;return l.$$keydown=P,r(s,()=>i.t("dialog.model.unpaid.freeModels.title")),r(l,t($,{class:"[&_[data-slot=list-scroll]]:overflow-visible",ref:e=>_=e,get items(){return v.list},get current(){return v.current()},key:e=>`${e.provider.id}:${e.id}`,itemWrapper:(e,d)=>t(L,{class:"w-full",placement:"right-start",gutter:12,get value(){return t(R,{model:e,get latest(){return e.latest},get free(){return T(()=>e.provider.id==="opencode")()&&(!e.cost||e.cost.input===0)}})},children:d}),onSelect:e=>{v.set(e?{modelID:e.id,providerID:e.provider.id}:void 0,{recent:!0}),f.close()},children:e=>(()=>{var d=V(),p=d.firstChild;return r(p,()=>e.name),r(d,t(m,{get children(){return i.t("model.tag.free")}}),null),r(d,t(c,{get when(){return e.latest},get children(){return t(m,{get children(){return i.t("model.tag.latest")}})}}),null),d})()}),null),l})(),(()=>{var l=K(),s=l.firstChild,e=s.firstChild,d=e.firstChild,p=d.nextSibling;return r(d,()=>i.t("dialog.model.unpaid.addMore.title")),r(p,t($,{class:"w-full px-0",key:o=>o?.id,get items(){return y.popular},activeIcon:"plus-small",sortBy:(o,n)=>g.includes(o.id)&&g.includes(n.id)?g.indexOf(o.id)-g.indexOf(n.id):o.name.localeCompare(n.name),onSelect:o=>{o&&D(o.id)},children:o=>(()=>{var n=j(),x=n.firstChild;return r(n,t(B,{"data-slot":"list-item-extra-icon",get id(){return o.id}}),x),r(x,()=>o.name),r(n,t(c,{get when(){return o.id==="opencode"},get children(){var a=h();return r(a,()=>i.t("dialog.provider.opencode.tagline")),a}}),null),r(n,t(c,{get when(){return o.id==="opencode"},get children(){return t(m,{get children(){return i.t("dialog.provider.tag.recommended")}})}}),null),r(n,t(c,{get when(){return o.id==="opencode-go"},get children(){return[(()=>{var a=h();return r(a,()=>i.t("dialog.provider.opencodeGo.tagline")),a})(),t(m,{get children(){return i.t("dialog.provider.tag.recommended")}})]}}),null),r(n,t(c,{get when(){return o.id==="anthropic"},get children(){var a=h();return r(a,()=>i.t("dialog.provider.anthropic.note")),a}}),null),n})()}),null),r(p,t(M,{variant:"ghost",class:"w-full justify-start px-[11px] py-3.5 gap-4.5 text-14-medium",icon:"dot-grid",onClick:C,get children(){return i.t("dialog.provider.viewAll")}}),null),l})()]}})};A(["keydown"]);export{Q as DialogSelectModelUnpaid};