@bkm016/basalt 0.1.0 → 0.1.2

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 (214) hide show
  1. package/README.md +16 -22
  2. package/chunk-06hdzq5n.js +2 -0
  3. package/chunk-09rj27b2.js +2 -0
  4. package/{chunk-qnr1f5pj.js → chunk-0y7ne3d0.js} +2 -2
  5. package/{chunk-8wjgbd9k.js → chunk-10xzzn07.js} +2 -2
  6. package/{chunk-bj14jshr.js → chunk-1qpces5a.js} +2 -2
  7. package/chunk-1zdwrgd4.js +2 -0
  8. package/chunk-27gntzs5.js +5 -0
  9. package/chunk-2esbgxps.js +25 -0
  10. package/{chunk-913tfr9c.js → chunk-362g64pd.js} +1 -1
  11. package/{chunk-rjdhaasf.js → chunk-3cjsd292.js} +2 -2
  12. package/chunk-5c9j8qe4.js +478 -0
  13. package/chunk-5j1krv9v.js +2 -0
  14. package/{chunk-vkkj4awb.js → chunk-6hssbcgj.js} +1 -1
  15. package/chunk-75m78j7x.js +10 -0
  16. package/{chunk-zt1wvkyf.js → chunk-8296hw9m.js} +1 -1
  17. package/{chunk-9y69ywyg.js → chunk-8d46jtbj.js} +2 -2
  18. package/{chunk-sf13azm4.js → chunk-8tjad3r0.js} +4 -4
  19. package/{chunk-agntrqs9.js → chunk-97rzj7f6.js} +1 -1
  20. package/{chunk-k7w7ac9q.js → chunk-981f9dw8.js} +8 -8
  21. package/chunk-9mmz6wt3.js +2 -0
  22. package/chunk-aefadsy6.js +3 -0
  23. package/chunk-bannb9xm.js +3 -0
  24. package/chunk-bpw6q7g0.js +3 -0
  25. package/{chunk-3jz9g8ab.js → chunk-c7x1zq39.js} +3 -3
  26. package/{chunk-rv06x0kn.js → chunk-cjc90f84.js} +1 -1
  27. package/{chunk-6gyhajhx.js → chunk-d2j735sd.js} +2 -2
  28. package/{chunk-qcwnkr5y.js → chunk-d8gtbw9g.js} +1 -1
  29. package/{chunk-rm3kcxq9.js → chunk-fjtvjrkg.js} +13 -13
  30. package/{chunk-qbf8x2ft.js → chunk-fm0k0qtz.js} +1 -1
  31. package/{chunk-1yzt0qm0.js → chunk-fw2bpqmw.js} +1 -1
  32. package/{chunk-kgdrjqsy.js → chunk-g2t6t8fk.js} +2 -2
  33. package/{chunk-wc5j0hfw.js → chunk-gp7y0fja.js} +13 -13
  34. package/{chunk-5fdgy0q2.js → chunk-gzxnene8.js} +10 -10
  35. package/{chunk-y9xe9ct2.js → chunk-hwr56pfj.js} +1 -1
  36. package/{chunk-0hbjv3y6.js → chunk-jwdb0ccj.js} +3 -3
  37. package/{chunk-x9982ek7.js → chunk-k23t7vhs.js} +5 -5
  38. package/{chunk-qffb7een.js → chunk-k506w58v.js} +2 -2
  39. package/{chunk-0tdv0t5q.js → chunk-k6w6y71k.js} +2 -2
  40. package/chunk-m40gxwq4.js +5 -0
  41. package/chunk-m8vkwdgr.js +5 -0
  42. package/{chunk-7yw8aa5j.js → chunk-mvfsxdx6.js} +13 -13
  43. package/{chunk-3p7q2pyp.js → chunk-nbb9trwz.js} +1 -1
  44. package/{chunk-0szjy61m.js → chunk-pbcy6zdt.js} +1 -1
  45. package/chunk-pmqtkqsf.js +2 -0
  46. package/{chunk-hat3s3pr.js → chunk-pxsrqrd0.js} +1 -1
  47. package/{chunk-xsbxykr4.js → chunk-qe0teyn1.js} +1 -1
  48. package/{chunk-2zqny2sy.js → chunk-r7fpkb49.js} +1 -1
  49. package/{chunk-xhk54h2q.js → chunk-rtzqqngy.js} +4 -4
  50. package/chunk-ry0z4ev6.js +2 -0
  51. package/{chunk-0rya8cxe.js → chunk-shadcb9z.js} +2 -2
  52. package/chunk-shhrr741.js +3753 -0
  53. package/{chunk-tnrqkc7b.js → chunk-t6zs4kw0.js} +2 -2
  54. package/chunk-tvm4zmgj.js +3 -0
  55. package/{chunk-hcn9cf6v.js → chunk-v258nxcz.js} +1 -1
  56. package/{chunk-a6r4z44b.js → chunk-vk1gxk1t.js} +1 -1
  57. package/{chunk-d913kpyw.js → chunk-vv7fp27r.js} +2 -2
  58. package/{chunk-g2k3yhgh.js → chunk-x1xss1d7.js} +3 -3
  59. package/{chunk-dakrpbe6.js → chunk-x4874m8e.js} +2 -2
  60. package/{chunk-wx7kdf0b.js → chunk-xfvvh1s5.js} +1 -1
  61. package/{chunk-1egbcp85.js → chunk-y0m980k3.js} +7 -7
  62. package/{chunk-5wp4egky.js → chunk-y58ygzn9.js} +4 -4
  63. package/{chunk-kjr81mrd.js → chunk-y648fzx0.js} +5 -5
  64. package/{chunk-32at88hc.js → chunk-y7nma9rk.js} +1 -1
  65. package/{chunk-wd9zxhza.js → chunk-ykens1hy.js} +1 -1
  66. package/chunk-z55bmysw.js +2 -0
  67. package/chunk-zmsgwr3s.js +2 -0
  68. package/{chunk-501zkf9b.js → chunk-ztsjgssj.js} +1 -1
  69. package/cli.js +89 -0
  70. package/compiled.js +12 -3762
  71. package/package.json +4 -3
  72. package/ui-test-worker.js +67 -67
  73. package/web/chunk-0sewdyz1.js +1 -0
  74. package/web/{chunk-g9qv15hq.js → chunk-1z5p7a1h.js} +1 -1
  75. package/web/chunk-21ke27j6.js +1 -0
  76. package/web/{chunk-svmhj9hd.js → chunk-24k0r5aq.js} +1 -1
  77. package/web/{chunk-vqjs551t.js → chunk-284a17k8.js} +1 -1
  78. package/web/{chunk-3cfabjey.js → chunk-2pjdtesn.js} +14 -14
  79. package/web/{chunk-ngpq43vn.js → chunk-3mvr2gwh.js} +1 -1
  80. package/web/chunk-3t3zwx9j.js +1 -0
  81. package/web/{chunk-ezyvv4ab.js → chunk-3z93efr4.js} +1 -1
  82. package/web/{chunk-rkesqprv.js → chunk-43jqvsrg.js} +1 -1
  83. package/web/{chunk-4y2td14d.js → chunk-4bry4xds.js} +2 -2
  84. package/web/{chunk-ea9swkkt.js → chunk-5e7ygjdn.js} +1 -1
  85. package/web/{chunk-3ahpr030.js → chunk-5jbf7n5q.js} +1 -1
  86. package/web/{chunk-bhe4jzha.js → chunk-5rx8rtsa.js} +1 -1
  87. package/web/chunk-5xc9d5ft.js +1 -0
  88. package/web/{chunk-fdkp6tzq.js → chunk-693m9kt7.js} +3 -3
  89. package/web/{chunk-mq92vqb1.js → chunk-6qejm5s2.js} +1 -1
  90. package/web/{chunk-z1jtv4c0.js → chunk-8ah6ce1b.js} +2 -2
  91. package/web/{chunk-zk2f7x5e.js → chunk-8e43yaq3.js} +3 -3
  92. package/web/{chunk-hejz98gw.js → chunk-8wye0wbb.js} +1 -1
  93. package/web/{chunk-pz934t6t.js → chunk-986z0p48.js} +5 -5
  94. package/web/{chunk-jtwhjp20.js → chunk-9dd1c37b.js} +77 -77
  95. package/web/{chunk-sc63gh9d.js → chunk-9re6yttj.js} +2 -2
  96. package/web/{chunk-1t760bg0.js → chunk-abbvjt4e.js} +1 -1
  97. package/web/{chunk-1v3d60pp.js → chunk-agmkx996.js} +3 -3
  98. package/web/{chunk-kbtbbarw.js → chunk-anbn2ttv.js} +2 -2
  99. package/web/chunk-aqm3spxt.js +1139 -0
  100. package/web/{chunk-jvhmna7z.js → chunk-avwpjsxw.js} +5 -5
  101. package/web/chunk-b470hvpk.js +1 -0
  102. package/web/{chunk-29e1trsq.js → chunk-bt1m87ck.js} +2 -2
  103. package/web/chunk-cqp1d4p0.js +1 -0
  104. package/web/{chunk-b5brnfv9.js → chunk-ctcrk3qn.js} +2 -2
  105. package/web/{chunk-zakv2xdf.js → chunk-ctd8bfg2.js} +1 -1
  106. package/web/{chunk-5hex8g0y.js → chunk-cwvtraca.js} +1 -1
  107. package/web/{chunk-1x8fn8w9.js → chunk-dk90px7g.js} +1 -1
  108. package/web/{chunk-0mrkjnte.js → chunk-ds7srg4p.js} +1 -1
  109. package/web/{chunk-6r912gfj.js → chunk-dt8ss97f.js} +5 -5
  110. package/web/{chunk-ykxpb3wv.js → chunk-ezkqa7we.js} +1 -1
  111. package/web/{chunk-svdzmaxb.js → chunk-f078k1ej.js} +1 -1
  112. package/web/chunk-fekjj24p.css +1 -0
  113. package/web/{chunk-v6v831tc.js → chunk-fqj9kry9.js} +5 -5
  114. package/web/chunk-frjfamx7.js +8 -0
  115. package/web/{chunk-rz6wwdd5.js → chunk-fy8ey195.js} +1 -1
  116. package/web/{chunk-p8y0hjx9.js → chunk-g8ee1csm.js} +1 -1
  117. package/web/{chunk-ktqt87qw.js → chunk-h31p43qa.js} +1 -1
  118. package/web/chunk-h5p5jsrw.js +1 -0
  119. package/web/chunk-h9fmr6ch.js +1 -0
  120. package/web/{chunk-x9q4kh67.js → chunk-jf2ehmvp.js} +2 -2
  121. package/web/{chunk-canbct9d.js → chunk-jmnaq7c1.js} +1 -1
  122. package/web/chunk-jq0pw0k2.js +1 -0
  123. package/web/{chunk-ghxe4gam.js → chunk-jvj66qhs.js} +2 -2
  124. package/web/{chunk-7f0m2yrd.js → chunk-jzmzhj8z.js} +4 -4
  125. package/web/chunk-k4cfnvyq.js +1 -0
  126. package/web/{chunk-942prjb6.js → chunk-kgerjbn4.js} +1 -1
  127. package/web/{chunk-3bqh2dkw.js → chunk-kww4azv5.js} +5 -5
  128. package/web/chunk-m29dhjkh.js +1 -0
  129. package/web/chunk-mj6tee5h.js +1 -0
  130. package/web/{chunk-a3xt6840.js → chunk-mjpjkyd1.js} +1 -1
  131. package/web/{chunk-20q90epj.js → chunk-n8sky2q6.js} +1 -1
  132. package/web/{chunk-3pf33xsm.js → chunk-pk3ap3wh.js} +4 -4
  133. package/web/{chunk-tfyxp2qs.js → chunk-q1pkntc6.js} +4 -4
  134. package/web/{chunk-gxn0bey7.js → chunk-qryrg2pq.js} +2 -2
  135. package/web/{chunk-0xck277j.js → chunk-r92sbgwv.js} +5 -5
  136. package/web/{chunk-ev1g5cqw.js → chunk-raqqscwa.js} +2 -2
  137. package/web/{chunk-c85wxnpw.js → chunk-rc2vq9wz.js} +3 -3
  138. package/web/{chunk-rsn8j7xv.js → chunk-rkj743fg.js} +3 -3
  139. package/web/{chunk-v47rhg7b.js → chunk-rrws61wf.js} +1 -1
  140. package/web/{chunk-ytpwz01r.js → chunk-s3hwejnr.js} +2 -2
  141. package/web/{chunk-bwyw10wx.js → chunk-s3rdx28k.js} +2 -2
  142. package/web/{chunk-hryhthxr.js → chunk-shbw6wg8.js} +1 -1
  143. package/web/chunk-szcy5z56.js +1 -0
  144. package/web/{chunk-ejd43q75.js → chunk-t1xk6hca.js} +4 -4
  145. package/web/chunk-t2hhdg9r.js +1 -0
  146. package/web/chunk-tj4cmkwe.js +1 -0
  147. package/web/{chunk-mdsgekpk.js → chunk-tn1xzmgx.js} +1 -1
  148. package/web/{chunk-0k0hvh59.js → chunk-tnv7z83q.js} +1 -1
  149. package/web/chunk-v2b5q0n5.js +1 -0
  150. package/web/{chunk-haphmhz8.js → chunk-vj6kstpp.js} +5 -5
  151. package/web/{chunk-e5rmr47n.js → chunk-vjqmnkh2.js} +1 -1
  152. package/web/{chunk-vfqe8298.js → chunk-vkc149rb.js} +1 -1
  153. package/web/{chunk-n5fn9khr.js → chunk-vny496ba.js} +1 -1
  154. package/web/{chunk-s8vapqgr.js → chunk-vz5ck6x9.js} +1 -1
  155. package/web/{chunk-6atq9qtt.js → chunk-xa88zgkr.js} +1 -1
  156. package/web/{chunk-d4d3mnak.js → chunk-xdcs8qz3.js} +4 -4
  157. package/web/chunk-y5x74t89.js +1 -0
  158. package/web/{chunk-x3zwjkwg.js → chunk-yen2kkn2.js} +1 -1
  159. package/web/{chunk-vadqkz3x.js → chunk-yjv2c45j.js} +4 -4
  160. package/web/chunk-yx3dh5hg.js +1 -0
  161. package/web/chunk-yz4fmtk2.js +1 -0
  162. package/web/{chunk-4b5mt5pd.js → chunk-z24vs8q9.js} +3 -3
  163. package/web/chunk-z5j6x6j8.js +2 -0
  164. package/web/chunk-z5stjrhc.js +1 -0
  165. package/web/{chunk-3pm4645m.js → chunk-z760wagr.js} +1 -1
  166. package/web/{chunk-nerx2q12.js → chunk-znvnb9dh.js} +1 -1
  167. package/web/{chunk-55kw67nv.js → chunk-zrzq29e6.js} +1 -1
  168. package/web/{icon-yx2p2pye.svg → icon-1wgy7kzy.svg} +13 -13
  169. package/web/icon.svg +13 -13
  170. package/web/index.html +2 -2
  171. package/web/install.sh +0 -0
  172. package/web/sw.js +9 -0
  173. package/worker.js +1 -1
  174. package/chunk-1fv27j4b.js +0 -3
  175. package/chunk-356q8e0y.js +0 -10
  176. package/chunk-58vz2qsq.js +0 -2
  177. package/chunk-665jzf2w.js +0 -25
  178. package/chunk-97kjn55j.js +0 -2
  179. package/chunk-b9bg5fhd.js +0 -2
  180. package/chunk-c25s4w6a.js +0 -5
  181. package/chunk-j2x0g1vg.js +0 -2
  182. package/chunk-k0t23cmx.js +0 -2
  183. package/chunk-m38ber71.js +0 -2
  184. package/chunk-rad3dm0q.js +0 -2
  185. package/chunk-sytpmbfp.js +0 -471
  186. package/chunk-t057xfrt.js +0 -5
  187. package/chunk-tjpvayr1.js +0 -2
  188. package/chunk-ve7qx8wm.js +0 -3
  189. package/chunk-y8ced1jm.js +0 -5
  190. package/chunk-yb1jxgnk.js +0 -2
  191. package/web/chunk-00mq7bhx.js +0 -1
  192. package/web/chunk-0atfn8jf.js +0 -1
  193. package/web/chunk-310yey4q.js +0 -1
  194. package/web/chunk-32ezm0ry.js +0 -1136
  195. package/web/chunk-3hvgs5aw.js +0 -1
  196. package/web/chunk-3kh6zefg.js +0 -1
  197. package/web/chunk-401v5ht6.js +0 -8
  198. package/web/chunk-5r5kv4gh.js +0 -1
  199. package/web/chunk-95q1bwxn.js +0 -1
  200. package/web/chunk-9s7c178f.js +0 -1
  201. package/web/chunk-benmmqt2.js +0 -1
  202. package/web/chunk-bgqdcnke.js +0 -1
  203. package/web/chunk-eqegxtdt.js +0 -1
  204. package/web/chunk-gmfp7fg4.js +0 -1
  205. package/web/chunk-gxay64d5.js +0 -1
  206. package/web/chunk-jg6nzn6q.js +0 -1
  207. package/web/chunk-kx2xk3bb.js +0 -1
  208. package/web/chunk-ry9256r7.js +0 -1
  209. package/web/chunk-vfqdy860.js +0 -1
  210. package/web/chunk-wtawdeej.css +0 -1
  211. package/web/chunk-x59p8sg2.js +0 -1
  212. package/web/chunk-y7z144e3.js +0 -1
  213. package/web/chunk-ydgqrfvw.js +0 -2
  214. package/web/chunk-yj1a2d37.js +0 -1
package/chunk-c25s4w6a.js DELETED
@@ -1,5 +0,0 @@
1
- // @bun
2
- import{i,t}from"./chunk-qnr1f5pj.js";var R=t(function(m){Object.defineProperty(m,"__esModule",{value:!0});m.Allow=m.ALL=m.COLLECTION=m.ATOM=m.SPECIAL=m.INF=m._INFINITY=m.INFINITY=m.NAN=m.BOOL=m.NULL=m.OBJ=m.ARR=m.NUM=m.STR=void 0;m.STR=1;m.NUM=2;m.ARR=4;m.OBJ=8;m.NULL=16;m.BOOL=32;m.NAN=64;m.INFINITY=128;m._INFINITY=256;m.INF=m.INFINITY|m._INFINITY;m.SPECIAL=m.NULL|m.BOOL|m.INF|m.NAN;m.ATOM=m.STR|m.NUM|m.SPECIAL;m.COLLECTION=m.ARR|m.OBJ;m.ALL=m.ATOM|m.COLLECTION;m.Allow={STR:m.STR,NUM:m.NUM,ARR:m.ARR,OBJ:m.OBJ,NULL:m.NULL,BOOL:m.BOOL,NAN:m.NAN,INFINITY:m.INFINITY,_INFINITY:m._INFINITY,INF:m.INF,SPECIAL:m.SPECIAL,ATOM:m.ATOM,COLLECTION:m.COLLECTION,ALL:m.ALL};m.default=m.Allow});var W=t(function(o){var G=o&&o.__createBinding||(Object.create?function(r,s,u,e){if(e===void 0)e=u;var c=Object.getOwnPropertyDescriptor(s,u);if(!c||("get"in c?!s.__esModule:c.writable||c.configurable))c={enumerable:!0,get:function(){return s[u]}};Object.defineProperty(r,e,c)}:function(r,s,u,e){if(e===void 0)e=u;r[e]=s[u]}),H=o&&o.__exportStar||function(r,s){for(var u in r)if(u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u))G(s,r,u)};Object.defineProperty(o,"__esModule",{value:!0});o.Allow=o.MalformedJSON=o.PartialJSON=o.parseJSON=o.parse=void 0;var n=R();Object.defineProperty(o,"Allow",{enumerable:!0,get:function(){return n.Allow}});H(R(),o);class B extends Error{}o.PartialJSON=B;class P extends Error{}o.MalformedJSON=P;function v(r,s=n.Allow.ALL){if(typeof r!=="string")throw TypeError(`expecting str, got ${typeof r}`);if(!r.trim())throw Error(`${r} is empty`);return K(r.trim(),s)}o.parseJSON=v;var K=(r,s)=>{let u=r.length,e=0,c=(a)=>{throw new B(`${a} at position ${e}`)},p=(a)=>{throw new P(`${a} at position ${e}`)},l=()=>{if(O(),e>=u)c("Unexpected end of input");if(r[e]==='"')return U();if(r[e]==="{")return D();if(r[e]==="[")return q();if(r.substring(e,e+4)==="null"||n.Allow.NULL&s&&u-e<4&&"null".startsWith(r.substring(e)))return e+=4,null;if(r.substring(e,e+4)==="true"||n.Allow.BOOL&s&&u-e<4&&"true".startsWith(r.substring(e)))return e+=4,!0;if(r.substring(e,e+5)==="false"||n.Allow.BOOL&s&&u-e<5&&"false".startsWith(r.substring(e)))return e+=5,!1;if(r.substring(e,e+8)==="Infinity"||n.Allow.INFINITY&s&&u-e<8&&"Infinity".startsWith(r.substring(e)))return e+=8,1/0;if(r.substring(e,e+9)==="-Infinity"||n.Allow._INFINITY&s&&1<u-e&&u-e<9&&"-Infinity".startsWith(r.substring(e)))return e+=9,-1/0;if(r.substring(e,e+3)==="NaN"||n.Allow.NAN&s&&u-e<3&&"NaN".startsWith(r.substring(e)))return e+=3,NaN;return V()},U=()=>{let a=e,f=!1;e++;while(e<u&&(r[e]!=='"'||f&&r[e-1]==="\\"))f=r[e]==="\\"?!f:!1,e++;if(r.charAt(e)=='"')try{return JSON.parse(r.substring(a,++e-Number(f)))}catch(N){p(String(N))}else if(n.Allow.STR&s)try{return JSON.parse(r.substring(a,e-Number(f))+'"')}catch(N){return JSON.parse(r.substring(a,r.lastIndexOf("\\"))+'"')}c("Unterminated string literal")},D=()=>{e++,O();let a={};try{while(r[e]!=="}"){if(O(),e>=u&&n.Allow.OBJ&s)return a;let f=U();O(),e++;try{let N=l();a[f]=N}catch(N){if(n.Allow.OBJ&s)return a;else throw N}if(O(),r[e]===",")e++}}catch(f){if(n.Allow.OBJ&s)return a;else c("Expected '}' at end of object")}return e++,a},q=()=>{e++;let a=[];try{while(r[e]!=="]")if(a.push(l()),O(),r[e]===",")e++}catch(f){if(n.Allow.ARR&s)return a;c("Expected ']' at end of array")}return e++,a},V=()=>{if(e===0){if(r==="-")p("Not sure what '-' is");try{return JSON.parse(r)}catch(f){if(n.Allow.NUM&s)try{return JSON.parse(r.substring(0,r.lastIndexOf("e")))}catch(N){}p(String(f))}}let a=e;if(r[e]==="-")e++;while(r[e]&&",]}".indexOf(r[e])===-1)e++;if(e==u&&!(n.Allow.NUM&s))c("Unterminated number literal");try{return JSON.parse(r.substring(a,e))}catch(f){if(r.substring(a,e)==="-")c("Not sure what '-' is");try{return JSON.parse(r.substring(a,r.lastIndexOf("e")))}catch(N){p(String(N))}}},O=()=>{while(e<u&&`
3
- \r `.includes(r[e]))e++};return l()},Q=v;o.parse=Q});var M=i(W(),1),X=new Set(['"',"\\","/","b","f","n","r","t","u"]);function Z(r){let s=r.codePointAt(0);return s!==void 0&&s>=0&&s<=31}function S(r){switch(r){case"\b":return"\\b";case"\f":return"\\f";case`
4
- `:return"\\n";case"\r":return"\\r";case"\t":return"\\t";default:return`\\u${r.codePointAt(0)?.toString(16).padStart(4,"0")??"0000"}`}}function No(r){let s="",u=!1;for(let e=0;e<r.length;e++){let c=r[e];if(!u){if(s+=c,c==='"')u=!0;continue}if(c==='"'){s+=c,u=!1;continue}if(c==="\\"){let p=r[e+1];if(p===void 0){s+="\\\\";continue}if(p==="u"){let l=r.slice(e+2,e+6);if(/^[0-9a-fA-F]{4}$/.test(l)){s+=`\\u${l}`,e+=5;continue}}if(X.has(p)){s+=`\\${p}`,e+=1;continue}s+="\\\\";continue}s+=Z(c)?S(c):c}return s}function zr(r){try{return JSON.parse(r)}catch(s){let u=No(r);if(u!==r)return JSON.parse(u);throw s}}function F(r){if(!r||r.trim()==="")return{};try{return zr(r)}catch{try{return M.parse(r)??{}}catch{try{return M.parse(No(r))??{}}catch{return{}}}}}
5
- export{No,zr,F};
package/chunk-j2x0g1vg.js DELETED
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{kt,zt,jt,Vt,Kt,dr,mr,Rt,hr,fr,gr,yr,br,Sr}from"./chunk-wc5j0hfw.js";import{q,j}from"./chunk-y69ewdn2.js";import{V,ee}from"./chunk-rjdhaasf.js";import{g}from"./chunk-n6e43rvk.js";import{he}from"./chunk-dakrpbe6.js";import{N,ue,ne,Le,Q,H}from"./chunk-sf13azm4.js";import{M}from"./chunk-0rya8cxe.js";var w=0,C=(n,a,t)=>{let o=new M,l=Le(a);return(async()=>{let e={role:"assistant",content:[],api:"google-generative-ai",provider:n.provider,model:n.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()};try{if(t?.fetch&&t.fetch!==globalThis.fetch)throw Error("Custom fetch is not supported by the Google Generative AI adapter");let u=t?.apiKey;if(!u)throw Error(`No API key for provider: ${n.provider}`);let d=T(n,u,t?.headers),p=S(n,l,t),m=await t?.onPayload?.(p,n);if(m!==void 0)p=m;let f=await Sr(()=>d.models.generateContentStream(p),t);o.push({type:"start",partial:e});let i=null,k=e.content,c=()=>k.length-1;for await(let s of f){await t?.onProviderStreamEvent?.(s,n),e.responseId||=s.responseId;let y=s.candidates?.[0];if(y?.content?.parts)for(let r of y.content.parts){if(r.text!==void 0){let h=mr(r);if(!i||h&&i.type!=="thinking"||!h&&i.type!=="text"){if(i)if(i.type==="text")o.push({type:"text_end",contentIndex:k.length-1,content:i.text,partial:e});else o.push({type:"thinking_end",contentIndex:c(),content:i.thinking,partial:e});if(h)i={type:"thinking",thinking:"",thinkingSignature:void 0},e.content.push(i),o.push({type:"thinking_start",contentIndex:c(),partial:e});else i={type:"text",text:""},e.content.push(i),o.push({type:"text_start",contentIndex:c(),partial:e})}if(i.type==="thinking")i.thinking+=r.text,i.thinkingSignature=Rt(i.thinkingSignature,r.thoughtSignature),o.push({type:"thinking_delta",contentIndex:c(),delta:r.text,partial:e});else i.text+=r.text,i.textSignature=Rt(i.textSignature,r.thoughtSignature),o.push({type:"text_delta",contentIndex:c(),delta:r.text,partial:e})}if(r.functionCall){if(i){if(i.type==="text")o.push({type:"text_end",contentIndex:c(),content:i.text,partial:e});else o.push({type:"thinking_end",contentIndex:c(),content:i.thinking,partial:e});i=null}let h=r.functionCall.id,x={type:"toolCall",id:!h||e.content.some((b)=>b.type==="toolCall"&&b.id===h)?`${r.functionCall.name}_${Date.now()}_${++w}`:h,name:r.functionCall.name||"",arguments:r.functionCall.args??{},...r.thoughtSignature&&{thoughtSignature:r.thoughtSignature}};e.content.push(x),o.push({type:"toolcall_start",contentIndex:c(),partial:e}),o.push({type:"toolcall_delta",contentIndex:c(),delta:JSON.stringify(x.arguments),partial:e}),o.push({type:"toolcall_end",contentIndex:c(),toolCall:x,partial:e})}}if(y?.finishReason){if(e.rawStopReason=y.finishReason,e.stopReason=br(y.finishReason),e.content.some((r)=>r.type==="toolCall")&&e.stopReason==="stop")e.stopReason="toolUse"}if(s.usageMetadata)e.usage={input:(s.usageMetadata.promptTokenCount||0)-(s.usageMetadata.cachedContentTokenCount||0),output:(s.usageMetadata.candidatesTokenCount||0)+(s.usageMetadata.thoughtsTokenCount||0),cacheRead:s.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,reasoning:s.usageMetadata.thoughtsTokenCount||0,totalTokens:s.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},Q(n,e.usage)}if(i)if(i.type==="text")o.push({type:"text_end",contentIndex:c(),content:i.text,partial:e});else o.push({type:"thinking_end",contentIndex:c(),content:i.thinking,partial:e});if(t?.signal?.aborted)throw Error("Request was aborted");if(e.stopReason==="pending")throw Error("Google stream ended without a finish reason");if(e.stopReason==="aborted"||e.stopReason==="error"){let s=e.rawStopReason?`Provider stopped with: ${e.rawStopReason}`:"An unknown error occurred";throw Error(s)}o.push({type:"done",reason:e.stopReason,message:e}),o.end()}catch(u){for(let d of e.content)if("index"in d)delete d.index;e.stopReason=t?.signal?.aborted?"aborted":"error",e.errorMessage=j(q(u)),o.push({type:"error",reason:e.stopReason,error:e}),o.end()}})(),o},z=(n,a,t)=>{let o=t?.apiKey;if(!o)throw Error(`No API key for provider: ${n.provider}`);let l={...V(n,a,t,o),toolChoice:t?.toolChoice};if(!t?.reasoning)return C(n,a,{...l,thinking:{enabled:!1}});let e=H(n,t.reasoning);if(e==="off")return C(n,a,{...l,thinking:{enabled:!1}});let u=zt(n,e);if(jt(n))return C(n,a,{...l,thinking:{enabled:!0,level:Vt(u)}});return C(n,a,{...l,thinking:{enabled:!0,budgetTokens:I(n,u,t.thinkingBudgets)}})};function T(n,a,t){let o={};if(n.baseUrl)o.baseUrl=n.baseUrl,o.apiVersion="";let l=he({"User-Agent":ee(),...n.headers,...t});if(l)o.headers=l;return new kt({apiKey:a,httpOptions:Object.keys(o).length>0?o:void 0})}function S(n,a,t={}){let o=hr(n,a),l=ue(a.messages),e=ne(a.messages),u={};if(t.temperature!==void 0)u.temperature=t.temperature;if(t.maxTokens!==void 0)u.maxOutputTokens=t.maxTokens;let d=gr(n.id),p=e.length>0?yr(e,t.toolChoice,d):void 0,m=l?N(l):"",f={...Object.keys(u).length>0&&u,...m&&{systemInstruction:g(m)},...e.length>0&&{tools:fr(e,!1,d)},...p!==void 0&&{toolConfig:{functionCallingConfig:{mode:p}}}};if(t.thinking?.enabled&&n.reasoning){let k={includeThoughts:!0};if(t.thinking.level!==void 0)k.thinkingLevel=Kt(t.thinking.level);else if(t.thinking.budgetTokens!==void 0)k.thinkingBudget=t.thinking.budgetTokens;f.thinkingConfig=k}else if(n.reasoning&&t.thinking&&!t.thinking.enabled)f.thinkingConfig=dr(n);if(t.signal){if(t.signal.aborted)throw Error("Request aborted");f.abortSignal=t.signal}return{model:n.id,contents:o,config:f}}function I(n,a,t){if(t?.[a]!==void 0)return t[a];if(n.id.includes("2.5-pro"))return{minimal:128,low:2048,medium:8192,high:32768}[a];if(n.id.includes("2.5-flash-lite"))return{minimal:512,low:2048,medium:8192,high:24576}[a];if(n.id.includes("2.5-flash"))return{minimal:128,low:2048,medium:8192,high:24576}[a];return-1}export{C as stream,z as streamSimple};
package/chunk-k0t23cmx.js DELETED
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{pr,kt,zt,jt,Vt,Kt,dr,mr,Rt,hr,fr,gr,yr,br,Sr}from"./chunk-wc5j0hfw.js";import{_}from"./chunk-hat3s3pr.js";import{q,j}from"./chunk-y69ewdn2.js";import{V,ee}from"./chunk-rjdhaasf.js";import{g}from"./chunk-n6e43rvk.js";import{he}from"./chunk-dakrpbe6.js";import{N,ue,ne,Le,Q,H}from"./chunk-sf13azm4.js";import{M}from"./chunk-0rya8cxe.js";var b="v1",O="gcp-vertex-credentials",R=0,y=(e,o,t)=>{let i=new M,u=Le(o);return(async()=>{let n={role:"assistant",content:[],api:"google-vertex",provider:e.provider,model:e.id,usage:{input:0,output:0,cacheRead:0,cacheWrite:0,totalTokens:0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},stopReason:"pending",timestamp:Date.now()};try{if(t?.fetch&&t.fetch!==globalThis.fetch)throw Error("Custom fetch is not supported by the Google Vertex adapter");let c=L(t),d=c?S(e,c,t?.headers):I(e,P(t),U(t),t?.headers,t?.env),p=D(e,u,t),k=await t?.onPayload?.(p,e);if(k!==void 0)p=k;let f=await Sr(()=>d.models.generateContentStream(p),t);i.push({type:"start",partial:n});let r=null,m=n.content,l=()=>m.length-1;for await(let s of f){await t?.onProviderStreamEvent?.(s,e),n.responseId||=s.responseId;let C=s.candidates?.[0];if(C?.content?.parts)for(let a of C.content.parts){if(a.text!==void 0){let h=mr(a);if(!r||h&&r.type!=="thinking"||!h&&r.type!=="text"){if(r)if(r.type==="text")i.push({type:"text_end",contentIndex:m.length-1,content:r.text,partial:n});else i.push({type:"thinking_end",contentIndex:l(),content:r.thinking,partial:n});if(h)r={type:"thinking",thinking:"",thinkingSignature:void 0},n.content.push(r),i.push({type:"thinking_start",contentIndex:l(),partial:n});else r={type:"text",text:""},n.content.push(r),i.push({type:"text_start",contentIndex:l(),partial:n})}if(r.type==="thinking")r.thinking+=a.text,r.thinkingSignature=Rt(r.thinkingSignature,a.thoughtSignature),i.push({type:"thinking_delta",contentIndex:l(),delta:a.text,partial:n});else r.text+=a.text,r.textSignature=Rt(r.textSignature,a.thoughtSignature),i.push({type:"text_delta",contentIndex:l(),delta:a.text,partial:n})}if(a.functionCall){if(r){if(r.type==="text")i.push({type:"text_end",contentIndex:l(),content:r.text,partial:n});else i.push({type:"thinking_end",contentIndex:l(),content:r.thinking,partial:n});r=null}let h=a.functionCall.id,x={type:"toolCall",id:!h||n.content.some((T)=>T.type==="toolCall"&&T.id===h)?`${a.functionCall.name}_${Date.now()}_${++R}`:h,name:a.functionCall.name||"",arguments:a.functionCall.args??{},...a.thoughtSignature&&{thoughtSignature:a.thoughtSignature}};n.content.push(x),i.push({type:"toolcall_start",contentIndex:l(),partial:n}),i.push({type:"toolcall_delta",contentIndex:l(),delta:JSON.stringify(x.arguments),partial:n}),i.push({type:"toolcall_end",contentIndex:l(),toolCall:x,partial:n})}}if(C?.finishReason){if(n.rawStopReason=C.finishReason,n.stopReason=br(C.finishReason),n.content.some((a)=>a.type==="toolCall")&&n.stopReason==="stop")n.stopReason="toolUse"}if(s.usageMetadata)n.usage={input:(s.usageMetadata.promptTokenCount||0)-(s.usageMetadata.cachedContentTokenCount||0),output:(s.usageMetadata.candidatesTokenCount||0)+(s.usageMetadata.thoughtsTokenCount||0),cacheRead:s.usageMetadata.cachedContentTokenCount||0,cacheWrite:0,reasoning:s.usageMetadata.thoughtsTokenCount||0,totalTokens:s.usageMetadata.totalTokenCount||0,cost:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0}},Q(e,n.usage)}if(r)if(r.type==="text")i.push({type:"text_end",contentIndex:l(),content:r.text,partial:n});else i.push({type:"thinking_end",contentIndex:l(),content:r.thinking,partial:n});if(t?.signal?.aborted)throw Error("Request was aborted");if(n.stopReason==="pending")throw Error("Google Vertex stream ended without a finish reason");if(n.stopReason==="aborted"||n.stopReason==="error"){let s=n.rawStopReason?`Provider stopped with: ${n.rawStopReason}`:"An unknown error occurred";throw Error(s)}i.push({type:"done",reason:n.stopReason,message:n}),i.end()}catch(c){for(let d of n.content)if("index"in d)delete d.index;n.stopReason=t?.signal?.aborted?"aborted":"error",n.errorMessage=j(q(c)),i.push({type:"error",reason:n.stopReason,error:n}),i.end()}})(),i},le=(e,o,t)=>{let i={...V(e,o,t,void 0),toolChoice:t?.toolChoice};if(!t?.reasoning)return y(e,o,{...i,thinking:{enabled:!1}});let u=H(e,t.reasoning);if(u==="off")return y(e,o,{...i,thinking:{enabled:!1}});let n=zt(e,u);if(jt(e))return y(e,o,{...i,thinking:{enabled:!0,level:Vt(n)}});return y(e,o,{...i,thinking:{enabled:!0,budgetTokens:K(e,n,t.thinkingBudgets)}})};function I(e,o,t,i,u){let n=G(u);return new kt({vertexai:!0,project:o,location:t,apiVersion:b,...n?{googleAuthOptions:n}:{},httpOptions:v(e,i)})}function S(e,o,t){return new kt({vertexai:!0,apiKey:o,apiVersion:b,httpOptions:v(e,t)})}function v(e,o){let t={},i=w(e.baseUrl);if(i){if(t.baseUrl=i,t.baseUrlResourceScope=pr.COLLECTION,E(i))t.apiVersion=""}let u=he({"User-Agent":ee(),...e.headers,...o});if(u)t.headers=u;return Object.keys(t).length>0?t:void 0}function w(e){let o=e.trim();if(!o||o.includes("{location}"))return;return o}function E(e){try{return new URL(e).pathname.split("/").some((t)=>/^v\d+(?:beta\d*)?$/.test(t))}catch{return/(?:^|\/)v\d+(?:beta\d*)?(?:\/|$)/.test(e)}}function G(e){let o=_("GOOGLE_APPLICATION_CREDENTIALS",e);return o?{keyFilename:o}:void 0}function L(e){let o=e?.apiKey?.trim();if(!o||o===O||A(o))return;return o}function A(e){return/^<[^>]+>$/.test(e)}function P(e){let o=e?.project||_("GOOGLE_CLOUD_PROJECT",e?.env)||_("GCLOUD_PROJECT",e?.env);if(!o)throw Error("Vertex AI requires a project ID. Set GOOGLE_CLOUD_PROJECT/GCLOUD_PROJECT or pass project in options.");return o}function U(e){let o=e?.location||_("GOOGLE_CLOUD_LOCATION",e?.env);if(!o)throw Error("Vertex AI requires a location. Set GOOGLE_CLOUD_LOCATION or pass location in options.");return o}function D(e,o,t={}){let i=hr(e,o),u=ue(o.messages),n=ne(o.messages),c={};if(t.temperature!==void 0)c.temperature=t.temperature;if(t.maxTokens!==void 0)c.maxOutputTokens=t.maxTokens;let d=gr(e.id),p=n.length>0?yr(n,t.toolChoice,d):void 0,k=u?N(u):"",f={...Object.keys(c).length>0&&c,...k&&{systemInstruction:g(k)},...n.length>0&&{tools:fr(n,!1,d)},...p!==void 0&&{toolConfig:{functionCallingConfig:{mode:p}}}};if(t.thinking?.enabled&&e.reasoning){let m={includeThoughts:!0};if(t.thinking.level!==void 0)m.thinkingLevel=Kt(t.thinking.level);else if(t.thinking.budgetTokens!==void 0)m.thinkingBudget=t.thinking.budgetTokens;f.thinkingConfig=m}else if(e.reasoning&&t.thinking&&!t.thinking.enabled)f.thinkingConfig=dr(e);if(t.signal){if(t.signal.aborted)throw Error("Request aborted");f.abortSignal=t.signal}return{model:e.id,contents:i,config:f}}function K(e,o,t){if(t?.[o]!==void 0)return t[o];if(e.id.includes("2.5-pro"))return{minimal:128,low:2048,medium:8192,high:32768}[o];if(e.id.includes("2.5-flash"))return{minimal:128,low:2048,medium:8192,high:24576}[o];return-1}export{y as stream,le as streamSimple};
package/chunk-m38ber71.js DELETED
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Zr,Pi}from"./chunk-0tdv0t5q.js";export{Zr as runUIWorker,Pi as uiTest};
package/chunk-rad3dm0q.js DELETED
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Yn,yt,it,x,Xr,Xn}from"./chunk-tjpvayr1.js";export{Yn as child_process,yt as crypto,it as fs,x as path,Xr as stream,Xn as util};