@harrylabsj/kiwi-merchant-cloud 0.12.4 → 0.12.5

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 (1225) hide show
  1. package/app/a2a/node.d.ts +5 -1
  2. package/app/a2a/node.js +68 -30
  3. package/app/a2a/node.js.map +1 -1
  4. package/app/a2a/server/merchant-handler.d.ts +4 -0
  5. package/app/a2a/server/merchant-handler.js +123 -45
  6. package/app/a2a/server/merchant-handler.js.map +1 -1
  7. package/app/a2a/server/merchant-product-facts.d.ts +32 -0
  8. package/app/a2a/server/merchant-product-facts.js +57 -0
  9. package/app/a2a/server/merchant-product-facts.js.map +1 -0
  10. package/app/agent/buyer/buyer-tools.js +285 -3
  11. package/app/agent/buyer/buyer-tools.js.map +1 -1
  12. package/app/agent/merchant/types.d.ts +4 -9
  13. package/app/agent/merchant/types.js +14 -0
  14. package/app/agent/merchant/types.js.map +1 -1
  15. package/app/buyer-core/a2a-knp.d.ts +1 -0
  16. package/app/buyer-core/a2a-knp.js +1 -1
  17. package/app/buyer-core/a2a-knp.js.map +1 -1
  18. package/app/buyer-core/a2a-negotiator.d.ts +2 -0
  19. package/app/buyer-core/a2a-negotiator.js +20 -19
  20. package/app/buyer-core/a2a-negotiator.js.map +1 -1
  21. package/app/buyer-core/a2a-quote-fetcher.d.ts +2 -0
  22. package/app/buyer-core/a2a-quote-fetcher.js +13 -5
  23. package/app/buyer-core/a2a-quote-fetcher.js.map +1 -1
  24. package/app/buyer-core/product-summary.d.ts +4 -0
  25. package/app/buyer-core/product-summary.js +6 -0
  26. package/app/buyer-core/product-summary.js.map +1 -1
  27. package/app/buyer-core/protocol-recovery.d.ts +12 -1
  28. package/app/buyer-core/protocol-recovery.js +59 -19
  29. package/app/buyer-core/protocol-recovery.js.map +1 -1
  30. package/app/buyer-core/receive-gate.d.ts +11 -0
  31. package/app/buyer-core/receive-gate.js +107 -0
  32. package/app/buyer-core/receive-gate.js.map +1 -0
  33. package/app/cloud/bootstrap.d.ts +4 -0
  34. package/app/cloud/bootstrap.js +69 -55
  35. package/app/cloud/bootstrap.js.map +1 -1
  36. package/app/cloud/file-listing-publication.js +6 -0
  37. package/app/cloud/file-listing-publication.js.map +1 -1
  38. package/app/cloud/main.d.ts +3 -0
  39. package/app/cloud/main.js +47 -11
  40. package/app/cloud/main.js.map +1 -1
  41. package/app/cloud/product-import-tabular.d.ts +1 -1
  42. package/app/cloud/product-import-tabular.js +263 -36
  43. package/app/cloud/product-import-tabular.js.map +1 -1
  44. package/app/cloud/product-source.d.ts +6 -1
  45. package/app/cloud/product-source.js +47 -15
  46. package/app/cloud/product-source.js.map +1 -1
  47. package/app/cloud-sample/products.json +3 -3
  48. package/app/commerce/data-source.d.ts +4 -0
  49. package/app/commerce/data-source.js.map +1 -1
  50. package/app/commerce/shopping-cli-source.js +4 -0
  51. package/app/commerce/shopping-cli-source.js.map +1 -1
  52. package/app/discovery/catalog-source/kiwi-source.d.ts +2 -0
  53. package/app/discovery/catalog-source/kiwi-source.js +4 -0
  54. package/app/discovery/catalog-source/kiwi-source.js.map +1 -1
  55. package/app/handoff/index.d.ts +2 -1
  56. package/app/handoff/index.js +1 -0
  57. package/app/handoff/index.js.map +1 -1
  58. package/app/handoff/launch-marketplace-policy.d.ts +149 -0
  59. package/app/handoff/launch-marketplace-policy.js +301 -0
  60. package/app/handoff/launch-marketplace-policy.js.map +1 -0
  61. package/app/handoff/marketplace-product-link.d.ts +18 -0
  62. package/app/handoff/marketplace-product-link.js +71 -0
  63. package/app/handoff/marketplace-product-link.js.map +1 -0
  64. package/app/handoff/transaction.d.ts +30 -0
  65. package/app/handoff/transaction.js +64 -0
  66. package/app/handoff/transaction.js.map +1 -1
  67. package/app/handoff/url-safety.d.ts +3 -0
  68. package/app/handoff/url-safety.js +4 -0
  69. package/app/handoff/url-safety.js.map +1 -1
  70. package/app/http/merchant-management/page.js +176 -45
  71. package/app/http/merchant-management/page.js.map +1 -1
  72. package/app/i18n.d.ts +1 -0
  73. package/app/i18n.js +3 -0
  74. package/app/i18n.js.map +1 -1
  75. package/app/lifecycle/close.d.ts +24 -0
  76. package/app/lifecycle/close.js +131 -0
  77. package/app/lifecycle/close.js.map +1 -0
  78. package/app/mcp/merchant-runtime-assembly.js +6 -4
  79. package/app/mcp/merchant-runtime-assembly.js.map +1 -1
  80. package/app/mcp/tools.js +17 -16
  81. package/app/mcp/tools.js.map +1 -1
  82. package/app/merchant/application/service.d.ts +4 -0
  83. package/app/merchant/application/service.js.map +1 -1
  84. package/app/merchant/stats-store.d.ts +3 -0
  85. package/app/merchant/stats-store.js +15 -1
  86. package/app/merchant/stats-store.js.map +1 -1
  87. package/app/merchant-core/rfq/data-source-adapter.d.ts +2 -10
  88. package/app/merchant-core/rfq/data-source-adapter.js +21 -9
  89. package/app/merchant-core/rfq/data-source-adapter.js.map +1 -1
  90. package/app/merchant-gateway/pinned-fetch.js +5 -2
  91. package/app/merchant-gateway/pinned-fetch.js.map +1 -1
  92. package/build-manifest.json +2901 -1966
  93. package/node_modules/@earendil-works/chord/CHANGELOG.md +20 -0
  94. package/node_modules/@earendil-works/chord/README.md +77 -194
  95. package/node_modules/@earendil-works/chord/dist/cell.d.ts +101 -0
  96. package/node_modules/@earendil-works/chord/dist/cell.d.ts.map +1 -0
  97. package/node_modules/@earendil-works/chord/dist/cell.js +316 -0
  98. package/node_modules/@earendil-works/chord/dist/cell.js.map +1 -0
  99. package/node_modules/@earendil-works/chord/dist/cluster.d.ts +26 -0
  100. package/node_modules/@earendil-works/chord/dist/cluster.d.ts.map +1 -0
  101. package/node_modules/@earendil-works/chord/dist/cluster.js +214 -0
  102. package/node_modules/@earendil-works/chord/dist/cluster.js.map +1 -0
  103. package/node_modules/@earendil-works/chord/dist/connection.d.ts +157 -0
  104. package/node_modules/@earendil-works/chord/dist/connection.d.ts.map +1 -0
  105. package/node_modules/@earendil-works/chord/dist/connection.js +757 -0
  106. package/node_modules/@earendil-works/chord/dist/connection.js.map +1 -0
  107. package/node_modules/@earendil-works/chord/dist/context/index.d.ts +12 -1
  108. package/node_modules/@earendil-works/chord/dist/context/index.d.ts.map +1 -1
  109. package/node_modules/@earendil-works/chord/dist/context/index.js.map +1 -1
  110. package/node_modules/@earendil-works/chord/dist/contract.d.ts +133 -0
  111. package/node_modules/@earendil-works/chord/dist/contract.d.ts.map +1 -0
  112. package/node_modules/@earendil-works/chord/dist/contract.js +157 -0
  113. package/node_modules/@earendil-works/chord/dist/contract.js.map +1 -0
  114. package/node_modules/@earendil-works/chord/dist/declare.d.ts +70 -0
  115. package/node_modules/@earendil-works/chord/dist/declare.d.ts.map +1 -0
  116. package/node_modules/@earendil-works/chord/dist/declare.js +22 -0
  117. package/node_modules/@earendil-works/chord/dist/declare.js.map +1 -0
  118. package/node_modules/@earendil-works/chord/dist/delta/apply-immutable-trusted.js.map +1 -1
  119. package/node_modules/@earendil-works/chord/dist/delta/diff.d.ts +1 -1
  120. package/node_modules/@earendil-works/chord/dist/delta/diff.d.ts.map +1 -1
  121. package/node_modules/@earendil-works/chord/dist/delta/diff.js.map +1 -1
  122. package/node_modules/@earendil-works/chord/dist/delta/index.d.ts +2 -2
  123. package/node_modules/@earendil-works/chord/dist/delta/index.d.ts.map +1 -1
  124. package/node_modules/@earendil-works/chord/dist/delta/index.js +41 -0
  125. package/node_modules/@earendil-works/chord/dist/delta/index.js.map +1 -1
  126. package/node_modules/@earendil-works/chord/dist/delta/revision-validator.d.ts +1 -1
  127. package/node_modules/@earendil-works/chord/dist/delta/revision-validator.d.ts.map +1 -1
  128. package/node_modules/@earendil-works/chord/dist/delta/revision-validator.js.map +1 -1
  129. package/node_modules/@earendil-works/chord/dist/delta/tracker.d.ts +1 -1
  130. package/node_modules/@earendil-works/chord/dist/delta/tracker.d.ts.map +1 -1
  131. package/node_modules/@earendil-works/chord/dist/delta/tracker.js +40 -4
  132. package/node_modules/@earendil-works/chord/dist/delta/tracker.js.map +1 -1
  133. package/node_modules/@earendil-works/chord/dist/errors.d.ts +27 -0
  134. package/node_modules/@earendil-works/chord/dist/errors.d.ts.map +1 -0
  135. package/node_modules/@earendil-works/chord/dist/errors.js +44 -0
  136. package/node_modules/@earendil-works/chord/dist/errors.js.map +1 -0
  137. package/node_modules/@earendil-works/chord/dist/host.d.ts +254 -0
  138. package/node_modules/@earendil-works/chord/dist/host.d.ts.map +1 -0
  139. package/node_modules/@earendil-works/chord/dist/host.js +795 -0
  140. package/node_modules/@earendil-works/chord/dist/host.js.map +1 -0
  141. package/node_modules/@earendil-works/chord/dist/index.d.ts +17 -10
  142. package/node_modules/@earendil-works/chord/dist/index.d.ts.map +1 -1
  143. package/node_modules/@earendil-works/chord/dist/index.js +8 -8
  144. package/node_modules/@earendil-works/chord/dist/index.js.map +1 -1
  145. package/node_modules/@earendil-works/chord/dist/json.d.ts +9 -1
  146. package/node_modules/@earendil-works/chord/dist/json.d.ts.map +1 -1
  147. package/node_modules/@earendil-works/chord/dist/json.js.map +1 -1
  148. package/node_modules/@earendil-works/chord/dist/link.d.ts +72 -0
  149. package/node_modules/@earendil-works/chord/dist/link.d.ts.map +1 -0
  150. package/node_modules/@earendil-works/chord/dist/link.js +169 -0
  151. package/node_modules/@earendil-works/chord/dist/link.js.map +1 -0
  152. package/node_modules/@earendil-works/chord/dist/loader.d.ts +4 -0
  153. package/node_modules/@earendil-works/chord/dist/loader.d.ts.map +1 -0
  154. package/node_modules/@earendil-works/chord/dist/loader.js +68 -0
  155. package/node_modules/@earendil-works/chord/dist/loader.js.map +1 -0
  156. package/node_modules/@earendil-works/chord/dist/manager.d.ts +115 -0
  157. package/node_modules/@earendil-works/chord/dist/manager.d.ts.map +1 -0
  158. package/node_modules/@earendil-works/chord/dist/manager.js +319 -0
  159. package/node_modules/@earendil-works/chord/dist/manager.js.map +1 -0
  160. package/node_modules/@earendil-works/chord/dist/node.d.ts +3 -4
  161. package/node_modules/@earendil-works/chord/dist/node.d.ts.map +1 -1
  162. package/node_modules/@earendil-works/chord/dist/node.js +3 -2
  163. package/node_modules/@earendil-works/chord/dist/node.js.map +1 -1
  164. package/node_modules/@earendil-works/chord/dist/publish.d.ts +5 -0
  165. package/node_modules/@earendil-works/chord/dist/publish.d.ts.map +1 -0
  166. package/node_modules/@earendil-works/chord/dist/publish.js +40 -0
  167. package/node_modules/@earendil-works/chord/dist/publish.js.map +1 -0
  168. package/node_modules/@earendil-works/chord/dist/record.d.ts +320 -0
  169. package/node_modules/@earendil-works/chord/dist/record.d.ts.map +1 -0
  170. package/node_modules/@earendil-works/chord/dist/record.js +1292 -0
  171. package/node_modules/@earendil-works/chord/dist/record.js.map +1 -0
  172. package/node_modules/@earendil-works/chord/dist/registry.d.ts +25 -0
  173. package/node_modules/@earendil-works/chord/dist/registry.d.ts.map +1 -0
  174. package/node_modules/@earendil-works/chord/dist/registry.js +6 -0
  175. package/node_modules/@earendil-works/chord/dist/registry.js.map +1 -0
  176. package/node_modules/@earendil-works/chord/dist/reload.d.ts +118 -0
  177. package/node_modules/@earendil-works/chord/dist/reload.d.ts.map +1 -0
  178. package/node_modules/@earendil-works/chord/dist/reload.js +589 -0
  179. package/node_modules/@earendil-works/chord/dist/reload.js.map +1 -0
  180. package/node_modules/@earendil-works/chord/dist/remote.d.ts +70 -0
  181. package/node_modules/@earendil-works/chord/dist/remote.d.ts.map +1 -0
  182. package/node_modules/@earendil-works/chord/dist/remote.js +308 -0
  183. package/node_modules/@earendil-works/chord/dist/remote.js.map +1 -0
  184. package/node_modules/@earendil-works/chord/dist/schema.d.ts +21 -0
  185. package/node_modules/@earendil-works/chord/dist/schema.d.ts.map +1 -0
  186. package/node_modules/@earendil-works/chord/dist/schema.js +228 -0
  187. package/node_modules/@earendil-works/chord/dist/schema.js.map +1 -0
  188. package/node_modules/@earendil-works/chord/dist/state.d.ts +92 -0
  189. package/node_modules/@earendil-works/chord/dist/state.d.ts.map +1 -0
  190. package/node_modules/@earendil-works/chord/dist/{services/state.js → state.js} +28 -138
  191. package/node_modules/@earendil-works/chord/dist/state.js.map +1 -0
  192. package/node_modules/@earendil-works/chord/dist/types.d.ts +62 -262
  193. package/node_modules/@earendil-works/chord/dist/types.d.ts.map +1 -1
  194. package/node_modules/@earendil-works/chord/dist/types.js.map +1 -1
  195. package/node_modules/@earendil-works/chord/dist/websocket.d.ts +16 -0
  196. package/node_modules/@earendil-works/chord/dist/websocket.d.ts.map +1 -0
  197. package/node_modules/@earendil-works/chord/dist/websocket.js +15 -0
  198. package/node_modules/@earendil-works/chord/dist/websocket.js.map +1 -0
  199. package/node_modules/@earendil-works/chord/dist/wire.d.ts +135 -0
  200. package/node_modules/@earendil-works/chord/dist/wire.d.ts.map +1 -0
  201. package/node_modules/@earendil-works/chord/dist/wire.js +112 -0
  202. package/node_modules/@earendil-works/chord/dist/wire.js.map +1 -0
  203. package/node_modules/@earendil-works/chord/docs/guide.md +750 -0
  204. package/node_modules/@earendil-works/chord/docs/spec.md +261 -0
  205. package/node_modules/@earendil-works/chord/docs/tutorial.md +909 -0
  206. package/node_modules/@earendil-works/chord/package.json +10 -11
  207. package/node_modules/@earendil-works/chord/src/delta/README.md +5 -3
  208. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
  209. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +9 -1
  210. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
  211. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts +2 -5
  212. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +1 -1
  213. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js +2 -14
  214. package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
  215. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +4 -0
  216. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
  217. package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
  218. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  219. package/node_modules/@earendil-works/pi-ai/README.md +14 -3
  220. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  221. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +63 -22
  222. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  223. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-config.d.ts +15 -0
  224. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-config.d.ts.map +1 -0
  225. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-config.js +76 -0
  226. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-config.js.map +1 -0
  227. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts +3 -6
  228. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
  229. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +2 -74
  230. package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
  231. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +33 -2
  232. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
  233. package/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.d.ts +21 -0
  234. package/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.d.ts.map +1 -0
  235. package/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.js +98 -0
  236. package/node_modules/@earendil-works/pi-ai/dist/api/classifier-shared.js.map +1 -0
  237. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.d.ts.map +1 -1
  238. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.js +2 -1
  239. package/node_modules/@earendil-works/pi-ai/dist/api/cloudflare-workers-ai-system-one.js.map +1 -1
  240. package/node_modules/@earendil-works/pi-ai/dist/api/lazy.d.ts.map +1 -1
  241. package/node_modules/@earendil-works/pi-ai/dist/api/lazy.js +4 -3
  242. package/node_modules/@earendil-works/pi-ai/dist/api/lazy.js.map +1 -1
  243. package/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.d.ts.map +1 -1
  244. package/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.js +2 -0
  245. package/node_modules/@earendil-works/pi-ai/dist/api/llama-cpp-classify.js.map +1 -1
  246. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +1 -1
  247. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +31 -14
  248. package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
  249. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  250. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +7 -4
  251. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  252. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.d.ts +4 -0
  253. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.d.ts.map +1 -0
  254. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.js +162 -0
  255. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.js.map +1 -0
  256. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.lazy.d.ts +3 -0
  257. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.lazy.d.ts.map +1 -0
  258. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.lazy.js +4 -0
  259. package/node_modules/@earendil-works/pi-ai/dist/api/openai-decisions.lazy.js.map +1 -0
  260. package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.d.ts +0 -1
  261. package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.d.ts.map +1 -1
  262. package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.js +5 -89
  263. package/node_modules/@earendil-works/pi-ai/dist/api/system-one-shared.js.map +1 -1
  264. package/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.d.ts.map +1 -1
  265. package/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.js +2 -1
  266. package/node_modules/@earendil-works/pi-ai/dist/api/typesafe-system-one.js.map +1 -1
  267. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.d.ts.map +1 -1
  268. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.js +14 -6
  269. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/anthropic.js.map +1 -1
  270. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-chatgpt.js +1 -1
  271. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-chatgpt.js.map +1 -1
  272. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.d.ts.map +1 -1
  273. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js +4 -4
  274. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js.map +1 -1
  275. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts +16 -1
  276. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.d.ts.map +1 -1
  277. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js +51 -27
  278. package/node_modules/@earendil-works/pi-ai/dist/auth/resolve.js.map +1 -1
  279. package/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts +5 -0
  280. package/node_modules/@earendil-works/pi-ai/dist/auth/types.d.ts.map +1 -1
  281. package/node_modules/@earendil-works/pi-ai/dist/auth/types.js.map +1 -1
  282. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +1 -1
  283. package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js.map +1 -1
  284. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +5 -0
  285. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
  286. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +4 -4
  287. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  288. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +4 -4
  289. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
  290. package/node_modules/@earendil-works/pi-ai/dist/models.js +7 -8
  291. package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
  292. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +2 -2
  293. package/node_modules/@earendil-works/pi-ai/dist/providers/all.js.map +1 -1
  294. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.d.ts +3 -0
  295. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.d.ts.map +1 -0
  296. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.js +46 -0
  297. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.js.map +1 -0
  298. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.d.ts +6 -0
  299. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.d.ts.map +1 -0
  300. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.js +8 -0
  301. package/node_modules/@earendil-works/pi-ai/dist/providers/azure.models.js.map +1 -0
  302. package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.d.ts +338 -0
  303. package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.d.ts.map +1 -0
  304. package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.js +375 -0
  305. package/node_modules/@earendil-works/pi-ai/dist/providers/compat-schema.js.map +1 -0
  306. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  307. package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
  308. package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
  309. package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure.json +1 -0
  310. package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
  311. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
  312. package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
  313. package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
  314. package/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
  315. package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
  316. package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
  317. package/node_modules/@earendil-works/pi-ai/dist/providers/data/meta.json +1 -1
  318. package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax-cn.json +1 -1
  319. package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax.json +1 -1
  320. package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
  321. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
  322. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
  323. package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
  324. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  325. package/node_modules/@earendil-works/pi-ai/dist/providers/data/radius.json +1 -1
  326. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  327. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.d.ts.map +1 -1
  328. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js +25 -8
  329. package/node_modules/@earendil-works/pi-ai/dist/providers/faux.js.map +1 -1
  330. package/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.d.ts +91 -0
  331. package/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.d.ts.map +1 -0
  332. package/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.js +55 -0
  333. package/node_modules/@earendil-works/pi-ai/dist/providers/model-schema.js.map +1 -0
  334. package/node_modules/@earendil-works/pi-ai/dist/providers/openai.d.ts.map +1 -1
  335. package/node_modules/@earendil-works/pi-ai/dist/providers/openai.js +12 -3
  336. package/node_modules/@earendil-works/pi-ai/dist/providers/openai.js.map +1 -1
  337. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-api.d.ts +40 -0
  338. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-api.d.ts.map +1 -0
  339. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-api.js +41 -0
  340. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-api.js.map +1 -0
  341. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.d.ts +11 -1
  342. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.d.ts.map +1 -1
  343. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.js +52 -1
  344. package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.js.map +1 -1
  345. package/node_modules/@earendil-works/pi-ai/dist/providers/radius.d.ts.map +1 -1
  346. package/node_modules/@earendil-works/pi-ai/dist/providers/radius.js +4 -12
  347. package/node_modules/@earendil-works/pi-ai/dist/providers/radius.js.map +1 -1
  348. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +22 -305
  349. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  350. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  351. package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js +1 -1
  352. package/node_modules/@earendil-works/pi-ai/dist/utils/estimate.js.map +1 -1
  353. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts +10 -1
  354. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
  355. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +25 -0
  356. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
  357. package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.d.ts +3 -1
  358. package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.d.ts.map +1 -1
  359. package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.js +6 -0
  360. package/node_modules/@earendil-works/pi-ai/dist/utils/model-operations.js.map +1 -1
  361. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts +2 -0
  362. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.d.ts.map +1 -1
  363. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +2 -0
  364. package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js.map +1 -1
  365. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.d.ts.map +1 -1
  366. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +8 -2
  367. package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js.map +1 -1
  368. package/node_modules/@earendil-works/pi-ai/package.json +2 -2
  369. package/node_modules/@earendil-works/pi-codemode/README.md +177 -11
  370. package/node_modules/@earendil-works/pi-codemode/dist/cloudflare.d.ts +53 -0
  371. package/node_modules/@earendil-works/pi-codemode/dist/cloudflare.d.ts.map +1 -0
  372. package/node_modules/@earendil-works/pi-codemode/dist/cloudflare.js +64 -0
  373. package/node_modules/@earendil-works/pi-codemode/dist/cloudflare.js.map +1 -0
  374. package/node_modules/@earendil-works/pi-codemode/dist/declarations.d.ts +6 -21
  375. package/node_modules/@earendil-works/pi-codemode/dist/declarations.d.ts.map +1 -1
  376. package/node_modules/@earendil-works/pi-codemode/dist/declarations.js +113 -127
  377. package/node_modules/@earendil-works/pi-codemode/dist/declarations.js.map +1 -1
  378. package/node_modules/@earendil-works/pi-codemode/dist/index.d.ts +5 -2
  379. package/node_modules/@earendil-works/pi-codemode/dist/index.d.ts.map +1 -1
  380. package/node_modules/@earendil-works/pi-codemode/dist/index.js +4 -1
  381. package/node_modules/@earendil-works/pi-codemode/dist/index.js.map +1 -1
  382. package/node_modules/@earendil-works/pi-codemode/dist/portable.d.ts +15 -0
  383. package/node_modules/@earendil-works/pi-codemode/dist/portable.d.ts.map +1 -0
  384. package/node_modules/@earendil-works/pi-codemode/dist/portable.js +12 -0
  385. package/node_modules/@earendil-works/pi-codemode/dist/portable.js.map +1 -0
  386. package/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.d.ts +66 -0
  387. package/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.d.ts.map +1 -0
  388. package/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.js +494 -0
  389. package/node_modules/@earendil-works/pi-codemode/dist/runtime/execution.js.map +1 -0
  390. package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.d.ts +8 -30
  391. package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.d.ts.map +1 -1
  392. package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.js +41 -283
  393. package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.js.map +1 -1
  394. package/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.d.ts +63 -0
  395. package/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.d.ts.map +1 -0
  396. package/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.js +80 -0
  397. package/node_modules/@earendil-works/pi-codemode/dist/runtime/inline.js.map +1 -0
  398. package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.d.ts +9 -3
  399. package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.d.ts.map +1 -1
  400. package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js +122 -12
  401. package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js.map +1 -1
  402. package/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.d.ts +47 -6
  403. package/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.d.ts.map +1 -1
  404. package/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.js +6 -1
  405. package/node_modules/@earendil-works/pi-codemode/dist/runtime/protocol.js.map +1 -1
  406. package/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.d.ts +102 -0
  407. package/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.d.ts.map +1 -0
  408. package/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.js +175 -0
  409. package/node_modules/@earendil-works/pi-codemode/dist/runtime/remote.js.map +1 -0
  410. package/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.d.ts +24 -0
  411. package/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.d.ts.map +1 -0
  412. package/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.js +293 -0
  413. package/node_modules/@earendil-works/pi-codemode/dist/runtime/vm.js.map +1 -0
  414. package/node_modules/@earendil-works/pi-codemode/dist/runtime/worker.js +11 -110
  415. package/node_modules/@earendil-works/pi-codemode/dist/runtime/worker.js.map +1 -1
  416. package/node_modules/@earendil-works/pi-codemode/dist/source.d.ts +2 -1
  417. package/node_modules/@earendil-works/pi-codemode/dist/source.d.ts.map +1 -1
  418. package/node_modules/@earendil-works/pi-codemode/dist/source.js +8 -2
  419. package/node_modules/@earendil-works/pi-codemode/dist/source.js.map +1 -1
  420. package/node_modules/@earendil-works/pi-codemode/dist/types.d.ts +101 -6
  421. package/node_modules/@earendil-works/pi-codemode/dist/types.d.ts.map +1 -1
  422. package/node_modules/@earendil-works/pi-codemode/dist/types.js.map +1 -1
  423. package/node_modules/@earendil-works/pi-codemode/package.json +15 -3
  424. package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +165 -0
  425. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic-messages-Q7SXESRX.js +6 -0
  426. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic.js +1 -1
  427. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/azure-openai-responses-LM52U7CK.js +2 -0
  428. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/bedrock-converse-stream.js +2 -2
  429. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-22CYIUS4.js +2 -0
  430. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-3ZATHNCK.js +9 -0
  431. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-5GTPJSRI.js +7 -0
  432. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-6MWTY2OB.js +130 -0
  433. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-6QGV3IWD.js +6 -0
  434. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-2KAZSACP.js → chunk-AKJ3ZOR3.js} +1 -1
  435. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-G7EDXK4D.js → chunk-CQ3XTLTY.js} +1 -1
  436. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-SYF2TF6W.js → chunk-D7PHKNBM.js} +29 -92
  437. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-DOST5PQW.js +82 -0
  438. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-DVQEBGVL.js +2 -0
  439. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-ZSI3BL5Q.js → chunk-GDR5JFDJ.js} +1 -1
  440. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-HACVPRBJ.js +11 -0
  441. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-ITZNWD4K.js +2 -0
  442. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-LPXNMA2W.js +2 -0
  443. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-LD2P6SFZ.js → chunk-PMRZO46Y.js} +1 -1
  444. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-RDZVAGPR.js +2 -0
  445. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-ZSBPJAJ2.js → chunk-TJXZSVTD.js} +116 -99
  446. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-BYB6ZAAQ.js → chunk-TN4NLWHF.js} +1 -1
  447. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-WBQBCFWG.js +2 -0
  448. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-WJUNYZC5.js +2 -0
  449. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-XIX7LUWI.js +2 -0
  450. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-ZBURYEWF.js +2 -0
  451. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{cli-KILDDGW3.js → cli-SWM4FQ6V.js} +4 -4
  452. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/cloudflare-workers-ai-system-one-UTBL2KOF.js +2 -0
  453. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/codemode-worker.js +117 -14
  454. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/easter-egg-3d-OX6RUCIS.js +2 -0
  455. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/execute-3CFUPDLS.js +499 -0
  456. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/github-copilot.js +1 -1
  457. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{google-generative-ai-ZOK6CV7D.js → google-generative-ai-DXKP72HC.js} +1 -1
  458. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{google-vertex-VKWZQ3AY.js → google-vertex-W6SIDOVV.js} +1 -1
  459. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/image-resize-worker.js +1 -1
  460. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{llama-cpp-classify-XT44PI3C.js → llama-cpp-classify-FYN623RH.js} +2 -2
  461. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/mistral-conversations-GBMHTSYF.js +5 -0
  462. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-chatgpt.js +1 -1
  463. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex-responses-RN6B5UPP.js +10 -0
  464. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex.js +1 -1
  465. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openai-completions-GWHGMQ3T.js → openai-completions-QW2B4SML.js} +1 -1
  466. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-decisions-WVPMQ4JD.js +5 -0
  467. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openai-responses-EZ7FJ2KL.js → openai-responses-KDJUSIU7.js} +1 -1
  468. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{openrouter-images-ZVXWCSIM.js → openrouter-images-DUPG5DZO.js} +1 -1
  469. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{pi-messages-TM5SOOIW.js → pi-messages-YHKPQIHC.js} +1 -1
  470. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/runtime-366HE7CW.js +2 -0
  471. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/typesafe-system-one-ZSK3RN4B.js +2 -0
  472. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/virtual-modules-GI6FRNLG.js +2 -0
  473. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli-runtime.js +1 -1
  474. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
  475. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
  476. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts +2 -1
  477. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.d.ts.map +1 -1
  478. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +24 -5
  479. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js.map +1 -1
  480. package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts +18 -1
  481. package/node_modules/@earendil-works/pi-coding-agent/dist/config.d.ts.map +1 -1
  482. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +44 -6
  483. package/node_modules/@earendil-works/pi-coding-agent/dist/config.js.map +1 -1
  484. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts +47 -5
  485. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.d.ts.map +1 -1
  486. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +148 -78
  487. package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js.map +1 -1
  488. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.d.ts.map +1 -1
  489. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js +20 -13
  490. package/node_modules/@earendil-works/pi-coding-agent/dist/core/auth-storage.js.map +1 -1
  491. package/node_modules/@earendil-works/pi-coding-agent/dist/core/bash-executor.d.ts.map +1 -1
  492. package/node_modules/@earendil-works/pi-coding-agent/dist/core/bash-executor.js +42 -52
  493. package/node_modules/@earendil-works/pi-coding-agent/dist/core/bash-executor.js.map +1 -1
  494. package/node_modules/@earendil-works/pi-coding-agent/dist/core/bug-report.d.ts +9 -1
  495. package/node_modules/@earendil-works/pi-coding-agent/dist/core/bug-report.d.ts.map +1 -1
  496. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts +6 -0
  497. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.d.ts.map +1 -1
  498. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js +7 -8
  499. package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/utils.js.map +1 -1
  500. package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  501. package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/tool-renderer.js +2 -0
  502. package/node_modules/@earendil-works/pi-coding-agent/dist/core/export-html/tool-renderer.js.map +1 -1
  503. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts +1 -1
  504. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.d.ts.map +1 -1
  505. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/index.js.map +1 -1
  506. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts +4 -2
  507. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.d.ts.map +1 -1
  508. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +2 -3
  509. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js.map +1 -1
  510. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts +44 -7
  511. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.d.ts.map +1 -1
  512. package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/types.js.map +1 -1
  513. package/node_modules/@earendil-works/pi-coding-agent/dist/core/key-id-schema.d.ts +6 -0
  514. package/node_modules/@earendil-works/pi-coding-agent/dist/core/key-id-schema.d.ts.map +1 -0
  515. package/node_modules/@earendil-works/pi-coding-agent/dist/core/key-id-schema.js +16 -0
  516. package/node_modules/@earendil-works/pi-coding-agent/dist/core/key-id-schema.js.map +1 -0
  517. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings-schema.d.ts +4 -0
  518. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings-schema.d.ts.map +1 -0
  519. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings-schema.js +16 -0
  520. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings-schema.js.map +1 -0
  521. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.d.ts +198 -66
  522. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.d.ts.map +1 -1
  523. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.js +26 -23
  524. package/node_modules/@earendil-works/pi-coding-agent/dist/core/keybindings.js.map +1 -1
  525. package/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.d.ts +8 -0
  526. package/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.d.ts.map +1 -1
  527. package/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.js +30 -7
  528. package/node_modules/@earendil-works/pi-coding-agent/dist/core/mcp-servers.js.map +1 -1
  529. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.d.ts +695 -74
  530. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.d.ts.map +1 -1
  531. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.js +16 -166
  532. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.js.map +1 -1
  533. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +1 -1
  534. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js.map +1 -1
  535. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.d.ts.map +1 -1
  536. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.js +13 -7
  537. package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.js.map +1 -1
  538. package/node_modules/@earendil-works/pi-coding-agent/dist/core/nested-tool-calls.d.ts +1 -0
  539. package/node_modules/@earendil-works/pi-coding-agent/dist/core/nested-tool-calls.d.ts.map +1 -1
  540. package/node_modules/@earendil-works/pi-coding-agent/dist/core/nested-tool-calls.js +1 -0
  541. package/node_modules/@earendil-works/pi-coding-agent/dist/core/nested-tool-calls.js.map +1 -1
  542. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
  543. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +3 -3
  544. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js.map +1 -1
  545. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.d.ts.map +1 -1
  546. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js +2 -1
  547. package/node_modules/@earendil-works/pi-coding-agent/dist/core/project-trust.js.map +1 -1
  548. package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.d.ts +12 -1
  549. package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.d.ts.map +1 -1
  550. package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.js +82 -24
  551. package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.js.map +1 -1
  552. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts +3 -0
  553. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.d.ts.map +1 -1
  554. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js +9 -4
  555. package/node_modules/@earendil-works/pi-coding-agent/dist/core/resource-loader.js.map +1 -1
  556. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts +13 -4
  557. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.d.ts.map +1 -1
  558. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +19 -6
  559. package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js.map +1 -1
  560. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.d.ts +65 -0
  561. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.d.ts.map +1 -0
  562. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.js +66 -0
  563. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-defaults.js.map +1 -0
  564. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts +15 -145
  565. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.d.ts.map +1 -1
  566. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +85 -57
  567. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
  568. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-schema.d.ts +228 -0
  569. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-schema.d.ts.map +1 -0
  570. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-schema.js +287 -0
  571. package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-schema.js.map +1 -0
  572. package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.d.ts +4 -1
  573. package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.d.ts.map +1 -1
  574. package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.js +6 -1
  575. package/node_modules/@earendil-works/pi-coding-agent/dist/core/skills.js.map +1 -1
  576. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.d.ts +6 -0
  577. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.d.ts.map +1 -1
  578. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +9 -4
  579. package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js.map +1 -1
  580. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/output-accumulator.d.ts.map +1 -1
  581. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/output-accumulator.js +4 -10
  582. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/output-accumulator.js.map +1 -1
  583. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts +13 -0
  584. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
  585. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +18 -1
  586. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js.map +1 -1
  587. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.d.ts +18 -0
  588. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.d.ts.map +1 -1
  589. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.js +46 -0
  590. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.js.map +1 -1
  591. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/bash.d.ts.map +1 -1
  592. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/bash.js +7 -35
  593. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/bash.js.map +1 -1
  594. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/edit.d.ts.map +1 -1
  595. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/edit.js +5 -4
  596. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/renderers/edit.js.map +1 -1
  597. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.d.ts.map +1 -1
  598. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.js +165 -48
  599. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/execute.js.map +1 -1
  600. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/index.d.ts.map +1 -1
  601. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/index.js +3 -1
  602. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/index.js.map +1 -1
  603. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.d.ts +2 -2
  604. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.d.ts.map +1 -1
  605. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.js +9 -3
  606. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/renderer.js.map +1 -1
  607. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/tool.d.ts +15 -14
  608. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/tool.d.ts.map +1 -1
  609. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/tool.js +58 -38
  610. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/codemode/tool.js.map +1 -1
  611. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.d.ts.map +1 -1
  612. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.js +34 -11
  613. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.js.map +1 -1
  614. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/cli.js +22 -31
  615. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/cli.js.map +1 -1
  616. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/index.d.ts.map +1 -1
  617. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/index.js +188 -84
  618. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/index.js.map +1 -1
  619. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.d.ts +5 -3
  620. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.d.ts.map +1 -1
  621. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.js +36 -10
  622. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/oauth.js.map +1 -1
  623. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.d.ts +3 -10
  624. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.d.ts.map +1 -1
  625. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.js +4 -5
  626. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/resources.js.map +1 -1
  627. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.d.ts +7 -7
  628. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.d.ts.map +1 -1
  629. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.js +26 -44
  630. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/runtime.js.map +1 -1
  631. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.d.ts +4 -4
  632. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.d.ts.map +1 -1
  633. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.js +68 -16
  634. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/tools.js.map +1 -1
  635. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/ui.d.ts +3 -3
  636. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/ui.d.ts.map +1 -1
  637. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/ui.js +10 -2
  638. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/mcp/ui.js.map +1 -1
  639. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/tool-search/tool.d.ts +0 -2
  640. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/tool-search/tool.d.ts.map +1 -1
  641. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/tool-search/tool.js +2 -4
  642. package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/tool-search/tool.js.map +1 -1
  643. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts +1 -1
  644. package/node_modules/@earendil-works/pi-coding-agent/dist/index.d.ts.map +1 -1
  645. package/node_modules/@earendil-works/pi-coding-agent/dist/index.js.map +1 -1
  646. package/node_modules/@earendil-works/pi-coding-agent/dist/main.d.ts.map +1 -1
  647. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +4 -3
  648. package/node_modules/@earendil-works/pi-coding-agent/dist/main.js.map +1 -1
  649. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts +5 -1
  650. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  651. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js +17 -14
  652. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/bash-execution.js.map +1 -1
  653. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts +2 -1
  654. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  655. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.js +5 -2
  656. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  657. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts +2 -1
  658. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  659. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.js +5 -2
  660. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  661. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.d.ts +3 -1
  662. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
  663. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.js +8 -2
  664. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-entry.js.map +1 -1
  665. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  666. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-message.js +1 -0
  667. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/custom-message.js.map +1 -1
  668. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  669. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js +4 -3
  670. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/settings-selector.js.map +1 -1
  671. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts +2 -1
  672. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  673. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.js +5 -2
  674. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  675. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.d.ts +1 -1
  676. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
  677. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.js +2 -2
  678. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/status-indicator.js.map +1 -1
  679. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts +5 -0
  680. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  681. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +10 -0
  682. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
  683. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +9 -0
  684. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  685. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +103 -40
  686. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
  687. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/program-status-reporter.d.ts +34 -0
  688. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/program-status-reporter.d.ts.map +1 -0
  689. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/program-status-reporter.js +110 -0
  690. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/program-status-reporter.js.map +1 -0
  691. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/dark.json +1 -1
  692. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/light.json +1 -1
  693. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts +28 -0
  694. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
  695. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js +105 -0
  696. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.js.map +1 -0
  697. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-tokens.d.ts +257 -0
  698. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-tokens.d.ts.map +1 -0
  699. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-tokens.js +94 -0
  700. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-tokens.js.map +1 -0
  701. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts +13 -16
  702. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  703. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +22 -29
  704. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js.map +1 -1
  705. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.d.ts.map +1 -1
  706. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js +4 -0
  707. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js.map +1 -1
  708. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.d.ts.map +1 -1
  709. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js +24 -0
  710. package/node_modules/@earendil-works/pi-coding-agent/dist/package-manager-cli.js.map +1 -1
  711. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/ansi.d.ts +8 -0
  712. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/ansi.d.ts.map +1 -1
  713. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/ansi.js +30 -11
  714. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/ansi.js.map +1 -1
  715. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard.d.ts.map +1 -1
  716. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard.js +18 -12
  717. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard.js.map +1 -1
  718. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.d.ts +12 -0
  719. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.d.ts.map +1 -1
  720. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.js +5 -0
  721. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.js.map +1 -1
  722. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.js +3 -2
  723. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.js.map +1 -1
  724. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.d.ts.map +1 -1
  725. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.js +9 -10
  726. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.js.map +1 -1
  727. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/output-files.d.ts +15 -0
  728. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/output-files.d.ts.map +1 -0
  729. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/output-files.js +30 -0
  730. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/output-files.js.map +1 -0
  731. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.d.ts.map +1 -1
  732. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.js +6 -1
  733. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/syntax-highlight.js.map +1 -1
  734. package/node_modules/@earendil-works/pi-coding-agent/docs/cli-integration.md +1 -1
  735. package/node_modules/@earendil-works/pi-coding-agent/docs/cli.md +19 -7
  736. package/node_modules/@earendil-works/pi-coding-agent/docs/codemode.md +30 -9
  737. package/node_modules/@earendil-works/pi-coding-agent/docs/compaction.md +2 -2
  738. package/node_modules/@earendil-works/pi-coding-agent/docs/environment-variables.md +3 -1
  739. package/node_modules/@earendil-works/pi-coding-agent/docs/extensions.md +7 -4
  740. package/node_modules/@earendil-works/pi-coding-agent/docs/json.md +3 -3
  741. package/node_modules/@earendil-works/pi-coding-agent/docs/keybindings.md +5 -4
  742. package/node_modules/@earendil-works/pi-coding-agent/docs/llama-cpp.md +8 -1
  743. package/node_modules/@earendil-works/pi-coding-agent/docs/mcp.md +4 -2
  744. package/node_modules/@earendil-works/pi-coding-agent/docs/message-types.md +22 -4
  745. package/node_modules/@earendil-works/pi-coding-agent/docs/models.md +5 -1
  746. package/node_modules/@earendil-works/pi-coding-agent/docs/providers.md +47 -0
  747. package/node_modules/@earendil-works/pi-coding-agent/docs/settings.md +6 -4
  748. package/node_modules/@earendil-works/pi-coding-agent/docs/terminal-setup.md +14 -0
  749. package/node_modules/@earendil-works/pi-coding-agent/docs/themes.md +4 -2
  750. package/node_modules/@earendil-works/pi-coding-agent/docs/tui.md +1 -1
  751. package/node_modules/@earendil-works/pi-coding-agent/examples/README.md +0 -3
  752. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  753. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
  754. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  755. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/dynamic-resources/dynamic.json +1 -1
  756. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package-lock.json +2 -2
  757. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/gondolin/package.json +1 -1
  758. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/overlay-test.ts +2 -2
  759. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/plan-mode/index.ts +6 -2
  760. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package-lock.json +2 -2
  761. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
  762. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package-lock.json +2 -2
  763. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
  764. package/node_modules/@earendil-works/pi-coding-agent/package.json +10 -21
  765. package/node_modules/@earendil-works/pi-coding-agent/schemas/keybindings.schema.json +393 -0
  766. package/node_modules/@earendil-works/pi-coding-agent/schemas/models.schema.json +1157 -0
  767. package/node_modules/@earendil-works/pi-coding-agent/schemas/settings.schema.json +765 -0
  768. package/node_modules/@earendil-works/pi-coding-agent/schemas/theme.schema.json +365 -0
  769. package/node_modules/@earendil-works/pi-durable/CHANGELOG.md +114 -0
  770. package/node_modules/@earendil-works/pi-durable/README.md +164 -12
  771. package/node_modules/@earendil-works/pi-durable/dist/codemode/codemode.d.ts +173 -0
  772. package/node_modules/@earendil-works/pi-durable/dist/codemode/codemode.d.ts.map +1 -0
  773. package/node_modules/@earendil-works/pi-durable/dist/codemode/codemode.js +886 -0
  774. package/node_modules/@earendil-works/pi-durable/dist/codemode/codemode.js.map +1 -0
  775. package/node_modules/@earendil-works/pi-durable/dist/codemode/describe.d.ts +38 -0
  776. package/node_modules/@earendil-works/pi-durable/dist/codemode/describe.d.ts.map +1 -0
  777. package/node_modules/@earendil-works/pi-durable/dist/codemode/describe.js +119 -0
  778. package/node_modules/@earendil-works/pi-durable/dist/codemode/describe.js.map +1 -0
  779. package/node_modules/@earendil-works/pi-durable/dist/codemode/index.d.ts +3 -0
  780. package/node_modules/@earendil-works/pi-durable/dist/codemode/index.d.ts.map +1 -0
  781. package/node_modules/@earendil-works/pi-durable/dist/codemode/index.js +3 -0
  782. package/node_modules/@earendil-works/pi-durable/dist/codemode/index.js.map +1 -0
  783. package/node_modules/@earendil-works/pi-durable/dist/codemode/models.d.ts +28 -0
  784. package/node_modules/@earendil-works/pi-durable/dist/codemode/models.d.ts.map +1 -0
  785. package/node_modules/@earendil-works/pi-durable/dist/codemode/models.js +231 -0
  786. package/node_modules/@earendil-works/pi-durable/dist/codemode/models.js.map +1 -0
  787. package/node_modules/@earendil-works/pi-durable/dist/codemode/output.d.ts +41 -0
  788. package/node_modules/@earendil-works/pi-durable/dist/codemode/output.d.ts.map +1 -0
  789. package/node_modules/@earendil-works/pi-durable/dist/codemode/output.js +167 -0
  790. package/node_modules/@earendil-works/pi-durable/dist/codemode/output.js.map +1 -0
  791. package/node_modules/@earendil-works/pi-durable/dist/env/decode.d.ts +16 -0
  792. package/node_modules/@earendil-works/pi-durable/dist/env/decode.d.ts.map +1 -0
  793. package/node_modules/@earendil-works/pi-durable/dist/env/decode.js +28 -0
  794. package/node_modules/@earendil-works/pi-durable/dist/env/decode.js.map +1 -0
  795. package/node_modules/@earendil-works/pi-durable/dist/env/index.d.ts +197 -3
  796. package/node_modules/@earendil-works/pi-durable/dist/env/index.d.ts.map +1 -1
  797. package/node_modules/@earendil-works/pi-durable/dist/env/index.js +2 -0
  798. package/node_modules/@earendil-works/pi-durable/dist/env/index.js.map +1 -1
  799. package/node_modules/@earendil-works/pi-durable/dist/env/line-scan.d.ts +13 -0
  800. package/node_modules/@earendil-works/pi-durable/dist/env/line-scan.d.ts.map +1 -0
  801. package/node_modules/@earendil-works/pi-durable/dist/env/line-scan.js +147 -0
  802. package/node_modules/@earendil-works/pi-durable/dist/env/line-scan.js.map +1 -0
  803. package/node_modules/@earendil-works/pi-durable/dist/env/node-watch.d.ts +29 -0
  804. package/node_modules/@earendil-works/pi-durable/dist/env/node-watch.d.ts.map +1 -0
  805. package/node_modules/@earendil-works/pi-durable/dist/env/node-watch.js +485 -0
  806. package/node_modules/@earendil-works/pi-durable/dist/env/node-watch.js.map +1 -0
  807. package/node_modules/@earendil-works/pi-durable/dist/env/node.d.ts +11 -2
  808. package/node_modules/@earendil-works/pi-durable/dist/env/node.d.ts.map +1 -1
  809. package/node_modules/@earendil-works/pi-durable/dist/env/node.js +284 -21
  810. package/node_modules/@earendil-works/pi-durable/dist/env/node.js.map +1 -1
  811. package/node_modules/@earendil-works/pi-durable/dist/errors.d.ts +20 -3
  812. package/node_modules/@earendil-works/pi-durable/dist/errors.d.ts.map +1 -1
  813. package/node_modules/@earendil-works/pi-durable/dist/errors.js +34 -5
  814. package/node_modules/@earendil-works/pi-durable/dist/errors.js.map +1 -1
  815. package/node_modules/@earendil-works/pi-durable/dist/harness/agent.d.ts +7 -3
  816. package/node_modules/@earendil-works/pi-durable/dist/harness/agent.d.ts.map +1 -1
  817. package/node_modules/@earendil-works/pi-durable/dist/harness/agent.js +81 -25
  818. package/node_modules/@earendil-works/pi-durable/dist/harness/agent.js.map +1 -1
  819. package/node_modules/@earendil-works/pi-durable/dist/harness/compaction.d.ts +6 -1
  820. package/node_modules/@earendil-works/pi-durable/dist/harness/compaction.d.ts.map +1 -1
  821. package/node_modules/@earendil-works/pi-durable/dist/harness/compaction.js +11 -8
  822. package/node_modules/@earendil-works/pi-durable/dist/harness/compaction.js.map +1 -1
  823. package/node_modules/@earendil-works/pi-durable/dist/harness/context.d.ts +29 -1
  824. package/node_modules/@earendil-works/pi-durable/dist/harness/context.d.ts.map +1 -1
  825. package/node_modules/@earendil-works/pi-durable/dist/harness/context.js +125 -24
  826. package/node_modules/@earendil-works/pi-durable/dist/harness/context.js.map +1 -1
  827. package/node_modules/@earendil-works/pi-durable/dist/harness/events.d.ts +35 -15
  828. package/node_modules/@earendil-works/pi-durable/dist/harness/events.d.ts.map +1 -1
  829. package/node_modules/@earendil-works/pi-durable/dist/harness/events.js +77 -23
  830. package/node_modules/@earendil-works/pi-durable/dist/harness/events.js.map +1 -1
  831. package/node_modules/@earendil-works/pi-durable/dist/harness/generation.d.ts +2 -0
  832. package/node_modules/@earendil-works/pi-durable/dist/harness/generation.d.ts.map +1 -1
  833. package/node_modules/@earendil-works/pi-durable/dist/harness/generation.js +40 -16
  834. package/node_modules/@earendil-works/pi-durable/dist/harness/generation.js.map +1 -1
  835. package/node_modules/@earendil-works/pi-durable/dist/harness/harness.d.ts +7 -0
  836. package/node_modules/@earendil-works/pi-durable/dist/harness/harness.d.ts.map +1 -1
  837. package/node_modules/@earendil-works/pi-durable/dist/harness/harness.js +56 -28
  838. package/node_modules/@earendil-works/pi-durable/dist/harness/harness.js.map +1 -1
  839. package/node_modules/@earendil-works/pi-durable/dist/harness/inbox.d.ts +16 -4
  840. package/node_modules/@earendil-works/pi-durable/dist/harness/inbox.d.ts.map +1 -1
  841. package/node_modules/@earendil-works/pi-durable/dist/harness/inbox.js +26 -3
  842. package/node_modules/@earendil-works/pi-durable/dist/harness/inbox.js.map +1 -1
  843. package/node_modules/@earendil-works/pi-durable/dist/harness/live.d.ts +74 -17
  844. package/node_modules/@earendil-works/pi-durable/dist/harness/live.d.ts.map +1 -1
  845. package/node_modules/@earendil-works/pi-durable/dist/harness/live.js +66 -14
  846. package/node_modules/@earendil-works/pi-durable/dist/harness/live.js.map +1 -1
  847. package/node_modules/@earendil-works/pi-durable/dist/harness/output.d.ts +13 -6
  848. package/node_modules/@earendil-works/pi-durable/dist/harness/output.d.ts.map +1 -1
  849. package/node_modules/@earendil-works/pi-durable/dist/harness/output.js +75 -18
  850. package/node_modules/@earendil-works/pi-durable/dist/harness/output.js.map +1 -1
  851. package/node_modules/@earendil-works/pi-durable/dist/harness/scheduler.d.ts +18 -5
  852. package/node_modules/@earendil-works/pi-durable/dist/harness/scheduler.d.ts.map +1 -1
  853. package/node_modules/@earendil-works/pi-durable/dist/harness/scheduler.js +794 -168
  854. package/node_modules/@earendil-works/pi-durable/dist/harness/scheduler.js.map +1 -1
  855. package/node_modules/@earendil-works/pi-durable/dist/harness/submissions.d.ts +7 -4
  856. package/node_modules/@earendil-works/pi-durable/dist/harness/submissions.d.ts.map +1 -1
  857. package/node_modules/@earendil-works/pi-durable/dist/harness/submissions.js +32 -13
  858. package/node_modules/@earendil-works/pi-durable/dist/harness/submissions.js.map +1 -1
  859. package/node_modules/@earendil-works/pi-durable/dist/harness/task-graph.d.ts +1 -1
  860. package/node_modules/@earendil-works/pi-durable/dist/harness/task-graph.d.ts.map +1 -1
  861. package/node_modules/@earendil-works/pi-durable/dist/harness/task-graph.js +15 -10
  862. package/node_modules/@earendil-works/pi-durable/dist/harness/task-graph.js.map +1 -1
  863. package/node_modules/@earendil-works/pi-durable/dist/harness/tool.d.ts +45 -5
  864. package/node_modules/@earendil-works/pi-durable/dist/harness/tool.d.ts.map +1 -1
  865. package/node_modules/@earendil-works/pi-durable/dist/harness/tool.js +400 -67
  866. package/node_modules/@earendil-works/pi-durable/dist/harness/tool.js.map +1 -1
  867. package/node_modules/@earendil-works/pi-durable/dist/harness/types.d.ts +194 -17
  868. package/node_modules/@earendil-works/pi-durable/dist/harness/types.d.ts.map +1 -1
  869. package/node_modules/@earendil-works/pi-durable/dist/harness/types.js.map +1 -1
  870. package/node_modules/@earendil-works/pi-durable/dist/harness/util.d.ts +6 -1
  871. package/node_modules/@earendil-works/pi-durable/dist/harness/util.d.ts.map +1 -1
  872. package/node_modules/@earendil-works/pi-durable/dist/harness/util.js +5 -2
  873. package/node_modules/@earendil-works/pi-durable/dist/harness/util.js.map +1 -1
  874. package/node_modules/@earendil-works/pi-durable/dist/harness/view.d.ts +6 -2
  875. package/node_modules/@earendil-works/pi-durable/dist/harness/view.d.ts.map +1 -1
  876. package/node_modules/@earendil-works/pi-durable/dist/harness/view.js +22 -12
  877. package/node_modules/@earendil-works/pi-durable/dist/harness/view.js.map +1 -1
  878. package/node_modules/@earendil-works/pi-durable/dist/images/cloudflare.d.ts +4 -0
  879. package/node_modules/@earendil-works/pi-durable/dist/images/cloudflare.d.ts.map +1 -0
  880. package/node_modules/@earendil-works/pi-durable/dist/images/cloudflare.js +9 -0
  881. package/node_modules/@earendil-works/pi-durable/dist/images/cloudflare.js.map +1 -0
  882. package/node_modules/@earendil-works/pi-durable/dist/images/exif.d.ts +3 -0
  883. package/node_modules/@earendil-works/pi-durable/dist/images/exif.d.ts.map +1 -0
  884. package/node_modules/@earendil-works/pi-durable/dist/images/exif.js +71 -0
  885. package/node_modules/@earendil-works/pi-durable/dist/images/exif.js.map +1 -0
  886. package/node_modules/@earendil-works/pi-durable/dist/images/index.d.ts +18 -0
  887. package/node_modules/@earendil-works/pi-durable/dist/images/index.d.ts.map +1 -0
  888. package/node_modules/@earendil-works/pi-durable/dist/images/index.js +125 -0
  889. package/node_modules/@earendil-works/pi-durable/dist/images/index.js.map +1 -0
  890. package/node_modules/@earendil-works/pi-durable/dist/images/node-worker.d.ts +17 -0
  891. package/node_modules/@earendil-works/pi-durable/dist/images/node-worker.d.ts.map +1 -0
  892. package/node_modules/@earendil-works/pi-durable/dist/images/node-worker.js +16 -0
  893. package/node_modules/@earendil-works/pi-durable/dist/images/node-worker.js.map +1 -0
  894. package/node_modules/@earendil-works/pi-durable/dist/images/node.d.ts +21 -0
  895. package/node_modules/@earendil-works/pi-durable/dist/images/node.d.ts.map +1 -0
  896. package/node_modules/@earendil-works/pi-durable/dist/images/node.js +121 -0
  897. package/node_modules/@earendil-works/pi-durable/dist/images/node.js.map +1 -0
  898. package/node_modules/@earendil-works/pi-durable/dist/index.d.ts +7 -7
  899. package/node_modules/@earendil-works/pi-durable/dist/index.d.ts.map +1 -1
  900. package/node_modules/@earendil-works/pi-durable/dist/index.js +4 -4
  901. package/node_modules/@earendil-works/pi-durable/dist/index.js.map +1 -1
  902. package/node_modules/@earendil-works/pi-durable/dist/search.d.ts +13 -0
  903. package/node_modules/@earendil-works/pi-durable/dist/search.d.ts.map +1 -0
  904. package/node_modules/@earendil-works/pi-durable/dist/search.js +85 -0
  905. package/node_modules/@earendil-works/pi-durable/dist/search.js.map +1 -0
  906. package/node_modules/@earendil-works/pi-durable/dist/session/observation.d.ts +10 -3
  907. package/node_modules/@earendil-works/pi-durable/dist/session/observation.d.ts.map +1 -1
  908. package/node_modules/@earendil-works/pi-durable/dist/session/observation.js +24 -34
  909. package/node_modules/@earendil-works/pi-durable/dist/session/observation.js.map +1 -1
  910. package/node_modules/@earendil-works/pi-durable/dist/session/session.d.ts +71 -6
  911. package/node_modules/@earendil-works/pi-durable/dist/session/session.d.ts.map +1 -1
  912. package/node_modules/@earendil-works/pi-durable/dist/session/session.js +463 -50
  913. package/node_modules/@earendil-works/pi-durable/dist/session/session.js.map +1 -1
  914. package/node_modules/@earendil-works/pi-durable/dist/session/transaction.d.ts +2 -0
  915. package/node_modules/@earendil-works/pi-durable/dist/session/transaction.d.ts.map +1 -1
  916. package/node_modules/@earendil-works/pi-durable/dist/session/transaction.js +19 -1
  917. package/node_modules/@earendil-works/pi-durable/dist/session/transaction.js.map +1 -1
  918. package/node_modules/@earendil-works/pi-durable/dist/storage/jsonl/storage.d.ts +8 -0
  919. package/node_modules/@earendil-works/pi-durable/dist/storage/jsonl/storage.d.ts.map +1 -1
  920. package/node_modules/@earendil-works/pi-durable/dist/storage/jsonl/storage.js +2 -1
  921. package/node_modules/@earendil-works/pi-durable/dist/storage/jsonl/storage.js.map +1 -1
  922. package/node_modules/@earendil-works/pi-durable/dist/storage/memory.d.ts +2 -0
  923. package/node_modules/@earendil-works/pi-durable/dist/storage/memory.d.ts.map +1 -1
  924. package/node_modules/@earendil-works/pi-durable/dist/storage/memory.js +79 -27
  925. package/node_modules/@earendil-works/pi-durable/dist/storage/memory.js.map +1 -1
  926. package/node_modules/@earendil-works/pi-durable/dist/storage/scan.d.ts +18 -0
  927. package/node_modules/@earendil-works/pi-durable/dist/storage/scan.d.ts.map +1 -0
  928. package/node_modules/@earendil-works/pi-durable/dist/storage/scan.js +29 -0
  929. package/node_modules/@earendil-works/pi-durable/dist/storage/scan.js.map +1 -0
  930. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/cloudflare.d.ts +46 -0
  931. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/cloudflare.d.ts.map +1 -0
  932. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/cloudflare.js +106 -0
  933. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/cloudflare.js.map +1 -0
  934. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/storage.d.ts +2 -0
  935. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/storage.d.ts.map +1 -1
  936. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/storage.js +77 -27
  937. package/node_modules/@earendil-works/pi-durable/dist/storage/sqlite/storage.js.map +1 -1
  938. package/node_modules/@earendil-works/pi-durable/dist/testing/env-conformance.d.ts +7 -0
  939. package/node_modules/@earendil-works/pi-durable/dist/testing/env-conformance.d.ts.map +1 -0
  940. package/node_modules/@earendil-works/pi-durable/dist/testing/env-conformance.js +531 -0
  941. package/node_modules/@earendil-works/pi-durable/dist/testing/env-conformance.js.map +1 -0
  942. package/node_modules/@earendil-works/pi-durable/dist/testing/index.d.ts +3 -2
  943. package/node_modules/@earendil-works/pi-durable/dist/testing/index.d.ts.map +1 -1
  944. package/node_modules/@earendil-works/pi-durable/dist/testing/index.js +2 -1
  945. package/node_modules/@earendil-works/pi-durable/dist/testing/index.js.map +1 -1
  946. package/node_modules/@earendil-works/pi-durable/dist/testing/runner.d.ts +4 -2
  947. package/node_modules/@earendil-works/pi-durable/dist/testing/runner.d.ts.map +1 -1
  948. package/node_modules/@earendil-works/pi-durable/dist/testing/runner.js +9 -0
  949. package/node_modules/@earendil-works/pi-durable/dist/testing/runner.js.map +1 -1
  950. package/node_modules/@earendil-works/pi-durable/dist/testing/storage-conformance.d.ts.map +1 -1
  951. package/node_modules/@earendil-works/pi-durable/dist/testing/storage-conformance.js +61 -2
  952. package/node_modules/@earendil-works/pi-durable/dist/testing/storage-conformance.js.map +1 -1
  953. package/node_modules/@earendil-works/pi-durable/dist/testing/types.d.ts +20 -0
  954. package/node_modules/@earendil-works/pi-durable/dist/testing/types.d.ts.map +1 -1
  955. package/node_modules/@earendil-works/pi-durable/dist/testing/types.js.map +1 -1
  956. package/node_modules/@earendil-works/pi-durable/dist/tool-search/index.d.ts +2 -0
  957. package/node_modules/@earendil-works/pi-durable/dist/tool-search/index.d.ts.map +1 -0
  958. package/node_modules/@earendil-works/pi-durable/dist/tool-search/index.js +2 -0
  959. package/node_modules/@earendil-works/pi-durable/dist/tool-search/index.js.map +1 -0
  960. package/node_modules/@earendil-works/pi-durable/dist/tool-search/tool-search.d.ts +23 -0
  961. package/node_modules/@earendil-works/pi-durable/dist/tool-search/tool-search.d.ts.map +1 -0
  962. package/node_modules/@earendil-works/pi-durable/dist/tool-search/tool-search.js +84 -0
  963. package/node_modules/@earendil-works/pi-durable/dist/tool-search/tool-search.js.map +1 -0
  964. package/node_modules/@earendil-works/pi-durable/dist/tools/bash.d.ts +30 -3
  965. package/node_modules/@earendil-works/pi-durable/dist/tools/bash.d.ts.map +1 -1
  966. package/node_modules/@earendil-works/pi-durable/dist/tools/bash.js +105 -37
  967. package/node_modules/@earendil-works/pi-durable/dist/tools/bash.js.map +1 -1
  968. package/node_modules/@earendil-works/pi-durable/dist/tools/edit.js +1 -1
  969. package/node_modules/@earendil-works/pi-durable/dist/tools/edit.js.map +1 -1
  970. package/node_modules/@earendil-works/pi-durable/dist/tools/image-processor.d.ts +47 -0
  971. package/node_modules/@earendil-works/pi-durable/dist/tools/image-processor.d.ts.map +1 -0
  972. package/node_modules/@earendil-works/pi-durable/dist/tools/image-processor.js +30 -0
  973. package/node_modules/@earendil-works/pi-durable/dist/tools/image-processor.js.map +1 -0
  974. package/node_modules/@earendil-works/pi-durable/dist/tools/image.d.ts +18 -0
  975. package/node_modules/@earendil-works/pi-durable/dist/tools/image.d.ts.map +1 -1
  976. package/node_modules/@earendil-works/pi-durable/dist/tools/image.js +86 -0
  977. package/node_modules/@earendil-works/pi-durable/dist/tools/image.js.map +1 -1
  978. package/node_modules/@earendil-works/pi-durable/dist/tools/index.d.ts +26 -3
  979. package/node_modules/@earendil-works/pi-durable/dist/tools/index.d.ts.map +1 -1
  980. package/node_modules/@earendil-works/pi-durable/dist/tools/index.js +14 -6
  981. package/node_modules/@earendil-works/pi-durable/dist/tools/index.js.map +1 -1
  982. package/node_modules/@earendil-works/pi-durable/dist/tools/read.d.ts +10 -2
  983. package/node_modules/@earendil-works/pi-durable/dist/tools/read.d.ts.map +1 -1
  984. package/node_modules/@earendil-works/pi-durable/dist/tools/read.js +212 -78
  985. package/node_modules/@earendil-works/pi-durable/dist/tools/read.js.map +1 -1
  986. package/node_modules/@earendil-works/pi-durable/dist/tools/write.js +1 -1
  987. package/node_modules/@earendil-works/pi-durable/dist/tools/write.js.map +1 -1
  988. package/node_modules/@earendil-works/pi-durable/dist/truncate.d.ts +9 -0
  989. package/node_modules/@earendil-works/pi-durable/dist/truncate.d.ts.map +1 -1
  990. package/node_modules/@earendil-works/pi-durable/dist/truncate.js +12 -4
  991. package/node_modules/@earendil-works/pi-durable/dist/truncate.js.map +1 -1
  992. package/node_modules/@earendil-works/pi-durable/dist/types.d.ts +89 -12
  993. package/node_modules/@earendil-works/pi-durable/dist/types.d.ts.map +1 -1
  994. package/node_modules/@earendil-works/pi-durable/dist/types.js.map +1 -1
  995. package/node_modules/@earendil-works/pi-durable/package.json +50 -5
  996. package/node_modules/@earendil-works/pi-mcp/CHANGELOG.md +29 -0
  997. package/node_modules/@earendil-works/pi-mcp/dist/auth-provider.d.ts +4 -0
  998. package/node_modules/@earendil-works/pi-mcp/dist/auth-provider.d.ts.map +1 -1
  999. package/node_modules/@earendil-works/pi-mcp/dist/auth-provider.js.map +1 -1
  1000. package/node_modules/@earendil-works/pi-mcp/dist/client.d.ts.map +1 -1
  1001. package/node_modules/@earendil-works/pi-mcp/dist/client.js +9 -5
  1002. package/node_modules/@earendil-works/pi-mcp/dist/client.js.map +1 -1
  1003. package/node_modules/@earendil-works/pi-mcp/dist/index.d.ts +1 -1
  1004. package/node_modules/@earendil-works/pi-mcp/dist/index.d.ts.map +1 -1
  1005. package/node_modules/@earendil-works/pi-mcp/dist/index.js.map +1 -1
  1006. package/node_modules/@earendil-works/pi-mcp/dist/oauth/discovery.d.ts +3 -0
  1007. package/node_modules/@earendil-works/pi-mcp/dist/oauth/discovery.d.ts.map +1 -1
  1008. package/node_modules/@earendil-works/pi-mcp/dist/oauth/discovery.js +8 -5
  1009. package/node_modules/@earendil-works/pi-mcp/dist/oauth/discovery.js.map +1 -1
  1010. package/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.d.ts +3 -2
  1011. package/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.d.ts.map +1 -1
  1012. package/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.js +3 -1
  1013. package/node_modules/@earendil-works/pi-mcp/dist/oauth/errors.js.map +1 -1
  1014. package/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.d.ts +4 -0
  1015. package/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.d.ts.map +1 -1
  1016. package/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.js +35 -7
  1017. package/node_modules/@earendil-works/pi-mcp/dist/oauth/flow.js.map +1 -1
  1018. package/node_modules/@earendil-works/pi-mcp/dist/oauth/types.d.ts +5 -0
  1019. package/node_modules/@earendil-works/pi-mcp/dist/oauth/types.d.ts.map +1 -1
  1020. package/node_modules/@earendil-works/pi-mcp/dist/oauth/types.js.map +1 -1
  1021. package/node_modules/@earendil-works/pi-mcp/dist/protocol/content.d.ts +2 -1
  1022. package/node_modules/@earendil-works/pi-mcp/dist/protocol/content.d.ts.map +1 -1
  1023. package/node_modules/@earendil-works/pi-mcp/dist/protocol/content.js.map +1 -1
  1024. package/node_modules/@earendil-works/pi-mcp/dist/transports/streamable-http.d.ts +9 -2
  1025. package/node_modules/@earendil-works/pi-mcp/dist/transports/streamable-http.d.ts.map +1 -1
  1026. package/node_modules/@earendil-works/pi-mcp/dist/transports/streamable-http.js +28 -19
  1027. package/node_modules/@earendil-works/pi-mcp/dist/transports/streamable-http.js.map +1 -1
  1028. package/node_modules/@earendil-works/pi-mcp/dist/transports/transport.d.ts +9 -1
  1029. package/node_modules/@earendil-works/pi-mcp/dist/transports/transport.d.ts.map +1 -1
  1030. package/node_modules/@earendil-works/pi-mcp/dist/transports/transport.js.map +1 -1
  1031. package/node_modules/@earendil-works/pi-mcp/package.json +2 -2
  1032. package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
  1033. package/node_modules/@earendil-works/pi-tui/README.md +5 -3
  1034. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +1 -0
  1035. package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +1 -1
  1036. package/node_modules/@earendil-works/pi-tui/dist/components/box.js +4 -0
  1037. package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +1 -1
  1038. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  1039. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +3 -3
  1040. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  1041. package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +1 -1
  1042. package/node_modules/@earendil-works/pi-tui/dist/components/input.js +4 -4
  1043. package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +1 -1
  1044. package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts +1 -0
  1045. package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +1 -1
  1046. package/node_modules/@earendil-works/pi-tui/dist/components/text.js +4 -0
  1047. package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +1 -1
  1048. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +2 -1
  1049. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  1050. package/node_modules/@earendil-works/pi-tui/dist/index.js +3 -1
  1051. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  1052. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +4 -4
  1053. package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +1 -1
  1054. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +4 -4
  1055. package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +1 -1
  1056. package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +1 -1
  1057. package/node_modules/@earendil-works/pi-tui/dist/keys.js +52 -20
  1058. package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +1 -1
  1059. package/node_modules/@earendil-works/pi-tui/dist/program-status.d.ts +23 -0
  1060. package/node_modules/@earendil-works/pi-tui/dist/program-status.d.ts.map +1 -0
  1061. package/node_modules/@earendil-works/pi-tui/dist/program-status.js +43 -0
  1062. package/node_modules/@earendil-works/pi-tui/dist/program-status.js.map +1 -0
  1063. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +4 -2
  1064. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
  1065. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +36 -1
  1066. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -1
  1067. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
  1068. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +5 -0
  1069. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
  1070. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +17 -0
  1071. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  1072. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +46 -2
  1073. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  1074. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts +2 -0
  1075. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
  1076. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +8 -4
  1077. package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
  1078. package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.d.ts.map +1 -1
  1079. package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js +2 -1
  1080. package/node_modules/@earendil-works/pi-tui/dist/tui-main-screen.js.map +1 -1
  1081. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +11 -0
  1082. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  1083. package/node_modules/@earendil-works/pi-tui/dist/tui.js +23 -1
  1084. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  1085. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  1086. package/node_modules/@earendil-works/pi-tui/dist/utils.js +5 -2
  1087. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  1088. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  1089. package/node_modules/@silvia-odwyer/photon/LICENSE.md +201 -0
  1090. package/node_modules/@silvia-odwyer/photon/README.md +158 -0
  1091. package/node_modules/@silvia-odwyer/photon/package.json +23 -0
  1092. package/node_modules/@silvia-odwyer/photon/photon_rs.d.ts +3443 -0
  1093. package/node_modules/@silvia-odwyer/photon/photon_rs.js +4572 -0
  1094. package/node_modules/@silvia-odwyer/photon/photon_rs_bg.wasm +0 -0
  1095. package/node_modules/@types/node/README.md +1 -1
  1096. package/node_modules/@types/node/crypto.d.ts +2 -2
  1097. package/node_modules/@types/node/dgram.d.ts +1 -1
  1098. package/node_modules/@types/node/package.json +2 -2
  1099. package/node_modules/@types/node/util.d.ts +6 -3
  1100. package/node_modules/@types/node/zlib.d.ts +6 -0
  1101. package/package.json +7 -8
  1102. package/runtime-package.json +7 -9
  1103. package/scripts/check-install-toolchain.mjs +64 -40
  1104. package/shipping-sbom.cdx.json +126 -160
  1105. package/shipping-source.json +15 -15
  1106. package/node_modules/@earendil-works/chord/dist/api.d.ts +0 -20
  1107. package/node_modules/@earendil-works/chord/dist/api.d.ts.map +0 -1
  1108. package/node_modules/@earendil-works/chord/dist/api.js +0 -77
  1109. package/node_modules/@earendil-works/chord/dist/api.js.map +0 -1
  1110. package/node_modules/@earendil-works/chord/dist/bundler.d.ts +0 -6
  1111. package/node_modules/@earendil-works/chord/dist/bundler.d.ts.map +0 -1
  1112. package/node_modules/@earendil-works/chord/dist/bundler.js +0 -3
  1113. package/node_modules/@earendil-works/chord/dist/bundler.js.map +0 -1
  1114. package/node_modules/@earendil-works/chord/dist/facets/host.d.ts +0 -12
  1115. package/node_modules/@earendil-works/chord/dist/facets/host.d.ts.map +0 -1
  1116. package/node_modules/@earendil-works/chord/dist/facets/host.js +0 -763
  1117. package/node_modules/@earendil-works/chord/dist/facets/host.js.map +0 -1
  1118. package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts +0 -3
  1119. package/node_modules/@earendil-works/chord/dist/facets/loader.d.ts.map +0 -1
  1120. package/node_modules/@earendil-works/chord/dist/facets/loader.js +0 -5
  1121. package/node_modules/@earendil-works/chord/dist/facets/loader.js.map +0 -1
  1122. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts +0 -30
  1123. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.d.ts.map +0 -1
  1124. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js +0 -377
  1125. package/node_modules/@earendil-works/chord/dist/node/bundle-loader.js.map +0 -1
  1126. package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts +0 -26
  1127. package/node_modules/@earendil-works/chord/dist/node/bundle.d.ts.map +0 -1
  1128. package/node_modules/@earendil-works/chord/dist/node/bundle.js +0 -183
  1129. package/node_modules/@earendil-works/chord/dist/node/bundle.js.map +0 -1
  1130. package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts +0 -36
  1131. package/node_modules/@earendil-works/chord/dist/node/manifest.d.ts.map +0 -1
  1132. package/node_modules/@earendil-works/chord/dist/node/manifest.js +0 -6
  1133. package/node_modules/@earendil-works/chord/dist/node/manifest.js.map +0 -1
  1134. package/node_modules/@earendil-works/chord/dist/node/package.d.ts +0 -15
  1135. package/node_modules/@earendil-works/chord/dist/node/package.d.ts.map +0 -1
  1136. package/node_modules/@earendil-works/chord/dist/node/package.js +0 -199
  1137. package/node_modules/@earendil-works/chord/dist/node/package.js.map +0 -1
  1138. package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts +0 -11
  1139. package/node_modules/@earendil-works/chord/dist/services/consumer.d.ts.map +0 -1
  1140. package/node_modules/@earendil-works/chord/dist/services/consumer.js +0 -585
  1141. package/node_modules/@earendil-works/chord/dist/services/consumer.js.map +0 -1
  1142. package/node_modules/@earendil-works/chord/dist/services/errors.d.ts +0 -8
  1143. package/node_modules/@earendil-works/chord/dist/services/errors.d.ts.map +0 -1
  1144. package/node_modules/@earendil-works/chord/dist/services/errors.js +0 -22
  1145. package/node_modules/@earendil-works/chord/dist/services/errors.js.map +0 -1
  1146. package/node_modules/@earendil-works/chord/dist/services/handle.d.ts +0 -15
  1147. package/node_modules/@earendil-works/chord/dist/services/handle.d.ts.map +0 -1
  1148. package/node_modules/@earendil-works/chord/dist/services/handle.js +0 -101
  1149. package/node_modules/@earendil-works/chord/dist/services/handle.js.map +0 -1
  1150. package/node_modules/@earendil-works/chord/dist/services/instances.d.ts +0 -26
  1151. package/node_modules/@earendil-works/chord/dist/services/instances.d.ts.map +0 -1
  1152. package/node_modules/@earendil-works/chord/dist/services/instances.js +0 -140
  1153. package/node_modules/@earendil-works/chord/dist/services/instances.js.map +0 -1
  1154. package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts +0 -5
  1155. package/node_modules/@earendil-works/chord/dist/services/loopback.d.ts.map +0 -1
  1156. package/node_modules/@earendil-works/chord/dist/services/loopback.js +0 -15
  1157. package/node_modules/@earendil-works/chord/dist/services/loopback.js.map +0 -1
  1158. package/node_modules/@earendil-works/chord/dist/services/provider.d.ts +0 -37
  1159. package/node_modules/@earendil-works/chord/dist/services/provider.d.ts.map +0 -1
  1160. package/node_modules/@earendil-works/chord/dist/services/provider.js +0 -521
  1161. package/node_modules/@earendil-works/chord/dist/services/provider.js.map +0 -1
  1162. package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts +0 -15
  1163. package/node_modules/@earendil-works/chord/dist/services/state-codec.d.ts.map +0 -1
  1164. package/node_modules/@earendil-works/chord/dist/services/state-codec.js +0 -133
  1165. package/node_modules/@earendil-works/chord/dist/services/state-codec.js.map +0 -1
  1166. package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts +0 -13
  1167. package/node_modules/@earendil-works/chord/dist/services/state-internals.d.ts.map +0 -1
  1168. package/node_modules/@earendil-works/chord/dist/services/state-internals.js +0 -10
  1169. package/node_modules/@earendil-works/chord/dist/services/state-internals.js.map +0 -1
  1170. package/node_modules/@earendil-works/chord/dist/services/state.d.ts +0 -28
  1171. package/node_modules/@earendil-works/chord/dist/services/state.d.ts.map +0 -1
  1172. package/node_modules/@earendil-works/chord/dist/services/state.js.map +0 -1
  1173. package/node_modules/@earendil-works/chord/dist/services/wire.d.ts +0 -63
  1174. package/node_modules/@earendil-works/chord/dist/services/wire.d.ts.map +0 -1
  1175. package/node_modules/@earendil-works/chord/dist/services/wire.js +0 -186
  1176. package/node_modules/@earendil-works/chord/dist/services/wire.js.map +0 -1
  1177. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts +0 -3
  1178. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.d.ts.map +0 -1
  1179. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +0 -14
  1180. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +0 -1
  1181. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.d.ts +0 -6
  1182. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.d.ts.map +0 -1
  1183. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +0 -8
  1184. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js.map +0 -1
  1185. package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +0 -1
  1186. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/anthropic-messages-MVG2FL56.js +0 -6
  1187. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/azure-openai-responses-7AMFUIWJ.js +0 -2
  1188. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-6FX7UEPL.js +0 -132
  1189. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-7JGR3GZN.js +0 -11
  1190. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-A3JYRWB6.js +0 -2
  1191. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-IKZJX7ZT.js +0 -2
  1192. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-OSKPX3Z5.js +0 -2
  1193. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-OYBSLV7Y.js +0 -16
  1194. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-PDFMCAOZ.js +0 -19
  1195. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-U7B62NSC.js +0 -2
  1196. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-VIV3CWXG.js +0 -2
  1197. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/chunk-WCQZGZ6I.js +0 -82
  1198. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/cloudflare-workers-ai-system-one-X5PVWWYJ.js +0 -2
  1199. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/easter-egg-3d-T5FFWIBR.js +0 -2
  1200. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/execute-RYVK27GT.js +0 -388
  1201. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/mistral-conversations-7DAUEE4N.js +0 -5
  1202. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/openai-codex-responses-TC3OK7B4.js +0 -10
  1203. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/runtime-D5I2NTIF.js +0 -2
  1204. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/typesafe-system-one-A4CZTQWZ.js +0 -2
  1205. package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/virtual-modules-KVWJD3T3.js +0 -2
  1206. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-json.d.ts +0 -85
  1207. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-json.d.ts.map +0 -1
  1208. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-json.js +0 -132
  1209. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-json.js.map +0 -1
  1210. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme-schema.json +0 -361
  1211. package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/README.md +0 -38
  1212. package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/package.json +0 -10
  1213. package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/src/contract.ts +0 -13
  1214. package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/src/session.ts +0 -24
  1215. package/node_modules/@earendil-works/pi-coding-agent/examples/plugins/pi-example-plugin/src/tui.ts +0 -31
  1216. package/node_modules/@esbuild/linux-x64/README.md +0 -3
  1217. package/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
  1218. package/node_modules/@esbuild/linux-x64/package.json +0 -20
  1219. package/node_modules/esbuild/LICENSE.md +0 -21
  1220. package/node_modules/esbuild/README.md +0 -3
  1221. package/node_modules/esbuild/bin/esbuild +0 -223
  1222. package/node_modules/esbuild/install.js +0 -300
  1223. package/node_modules/esbuild/lib/main.d.ts +0 -720
  1224. package/node_modules/esbuild/lib/main.js +0 -2536
  1225. package/node_modules/esbuild/package.json +0 -74
@@ -0,0 +1,4572 @@
1
+ let wasm;
2
+
3
+ function debugString(val) {
4
+ // primitive types
5
+ const type = typeof val;
6
+ if (type == 'number' || type == 'boolean' || val == null) {
7
+ return `${val}`;
8
+ }
9
+ if (type == 'string') {
10
+ return `"${val}"`;
11
+ }
12
+ if (type == 'symbol') {
13
+ const description = val.description;
14
+ if (description == null) {
15
+ return 'Symbol';
16
+ } else {
17
+ return `Symbol(${description})`;
18
+ }
19
+ }
20
+ if (type == 'function') {
21
+ const name = val.name;
22
+ if (typeof name == 'string' && name.length > 0) {
23
+ return `Function(${name})`;
24
+ } else {
25
+ return 'Function';
26
+ }
27
+ }
28
+ // objects
29
+ if (Array.isArray(val)) {
30
+ const length = val.length;
31
+ let debug = '[';
32
+ if (length > 0) {
33
+ debug += debugString(val[0]);
34
+ }
35
+ for(let i = 1; i < length; i++) {
36
+ debug += ', ' + debugString(val[i]);
37
+ }
38
+ debug += ']';
39
+ return debug;
40
+ }
41
+ // Test for built-in
42
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
43
+ let className;
44
+ if (builtInMatches.length > 1) {
45
+ className = builtInMatches[1];
46
+ } else {
47
+ // Failed to match the standard '[object ClassName]'
48
+ return toString.call(val);
49
+ }
50
+ if (className == 'Object') {
51
+ // we're a user defined class or Object
52
+ // JSON.stringify avoids problems with cycles, and is generally much
53
+ // easier than looping through ownProperties of `val`.
54
+ try {
55
+ return 'Object(' + JSON.stringify(val) + ')';
56
+ } catch (_) {
57
+ return 'Object';
58
+ }
59
+ }
60
+ // errors
61
+ if (val instanceof Error) {
62
+ return `${val.name}: ${val.message}\n${val.stack}`;
63
+ }
64
+ // TODO we could test for more things here, like `Set`s and `Map`s.
65
+ return className;
66
+ }
67
+
68
+ let WASM_VECTOR_LEN = 0;
69
+
70
+ let cachedUint8ArrayMemory0 = null;
71
+
72
+ function getUint8ArrayMemory0() {
73
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
74
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
75
+ }
76
+ return cachedUint8ArrayMemory0;
77
+ }
78
+
79
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
80
+
81
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
82
+ ? function (arg, view) {
83
+ return cachedTextEncoder.encodeInto(arg, view);
84
+ }
85
+ : function (arg, view) {
86
+ const buf = cachedTextEncoder.encode(arg);
87
+ view.set(buf);
88
+ return {
89
+ read: arg.length,
90
+ written: buf.length
91
+ };
92
+ });
93
+
94
+ function passStringToWasm0(arg, malloc, realloc) {
95
+
96
+ if (realloc === undefined) {
97
+ const buf = cachedTextEncoder.encode(arg);
98
+ const ptr = malloc(buf.length, 1) >>> 0;
99
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
100
+ WASM_VECTOR_LEN = buf.length;
101
+ return ptr;
102
+ }
103
+
104
+ let len = arg.length;
105
+ let ptr = malloc(len, 1) >>> 0;
106
+
107
+ const mem = getUint8ArrayMemory0();
108
+
109
+ let offset = 0;
110
+
111
+ for (; offset < len; offset++) {
112
+ const code = arg.charCodeAt(offset);
113
+ if (code > 0x7F) break;
114
+ mem[ptr + offset] = code;
115
+ }
116
+
117
+ if (offset !== len) {
118
+ if (offset !== 0) {
119
+ arg = arg.slice(offset);
120
+ }
121
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
122
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
123
+ const ret = encodeString(arg, view);
124
+
125
+ offset += ret.written;
126
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
127
+ }
128
+
129
+ WASM_VECTOR_LEN = offset;
130
+ return ptr;
131
+ }
132
+
133
+ let cachedDataViewMemory0 = null;
134
+
135
+ function getDataViewMemory0() {
136
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
137
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
138
+ }
139
+ return cachedDataViewMemory0;
140
+ }
141
+
142
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
143
+
144
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
145
+
146
+ function getStringFromWasm0(ptr, len) {
147
+ ptr = ptr >>> 0;
148
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
149
+ }
150
+
151
+ function _assertClass(instance, klass) {
152
+ if (!(instance instanceof klass)) {
153
+ throw new Error(`expected instance of ${klass.name}`);
154
+ }
155
+ return instance.ptr;
156
+ }
157
+ /**
158
+ * Alter a select channel by incrementing or decrementing its value by a constant.
159
+ *
160
+ * # Arguments
161
+ * * `img` - A PhotonImage.
162
+ * * `channel` - The channel you wish to alter, it should be either 0, 1 or 2,
163
+ * representing R, G, or B respectively. (O=Red, 1=Green, 2=Blue)
164
+ * * `amount` - The amount to increment/decrement the channel's value by for that pixel.
165
+ * A positive value will increment/decrement the channel's value, a negative value will decrement the channel's value.
166
+ *
167
+ * ## Example
168
+ *
169
+ * ```no_run
170
+ * // For example, to increase the Red channel for all pixels by 10:
171
+ * use photon_rs::channels::alter_channel;
172
+ * use photon_rs::native::{open_image};
173
+ *
174
+ * let mut img = open_image("img.jpg").expect("File should open");
175
+ * alter_channel(&mut img, 0_usize, 10_i16);
176
+ * ```
177
+ *
178
+ * Adds a constant to a select R, G, or B channel's value.
179
+ *
180
+ * ### Decrease a channel's value
181
+ * // For example, to decrease the Green channel for all pixels by 20:
182
+ * ```no_run
183
+ * use photon_rs::channels::alter_channel;
184
+ * use photon_rs::native::open_image;
185
+ *
186
+ * let mut img = open_image("img.jpg").expect("File should open");
187
+ * alter_channel(&mut img, 1_usize, -20_i16);
188
+ * ```
189
+ * **Note**: Note the use of a minus symbol when decreasing the channel.
190
+ * @param {PhotonImage} img
191
+ * @param {number} channel
192
+ * @param {number} amt
193
+ */
194
+ export function alter_channel(img, channel, amt) {
195
+ _assertClass(img, PhotonImage);
196
+ wasm.alter_channel(img.__wbg_ptr, channel, amt);
197
+ }
198
+
199
+ /**
200
+ * Increment or decrement every pixel's Red channel by a constant.
201
+ *
202
+ * # Arguments
203
+ * * `img` - A PhotonImage. See the PhotonImage struct for details.
204
+ * * `amt` - The amount to increment or decrement the channel's value by for that pixel.
205
+ *
206
+ * # Example
207
+ *
208
+ * ```no_run
209
+ * // For example, to increase the Red channel for all pixels by 10:
210
+ * use photon_rs::channels::alter_red_channel;
211
+ * use photon_rs::native::open_image;
212
+ *
213
+ * let mut img = open_image("img.jpg").expect("File should open");
214
+ * alter_red_channel(&mut img, 10_i16);
215
+ * ```
216
+ * @param {PhotonImage} photon_image
217
+ * @param {number} amt
218
+ */
219
+ export function alter_red_channel(photon_image, amt) {
220
+ _assertClass(photon_image, PhotonImage);
221
+ wasm.alter_red_channel(photon_image.__wbg_ptr, amt);
222
+ }
223
+
224
+ /**
225
+ * Increment or decrement every pixel's Green channel by a constant.
226
+ *
227
+ * # Arguments
228
+ * * `img` - A PhotonImage.
229
+ * * `amt` - The amount to increment/decrement the channel's value by for that pixel.
230
+ *
231
+ * # Example
232
+ *
233
+ * ```no_run
234
+ * // For example, to increase the Green channel for all pixels by 20:
235
+ * use photon_rs::channels::alter_green_channel;
236
+ * use photon_rs::native::open_image;
237
+ *
238
+ * let mut img = open_image("img.jpg").expect("File should open");
239
+ * alter_green_channel(&mut img, 20_i16);
240
+ * ```
241
+ * @param {PhotonImage} img
242
+ * @param {number} amt
243
+ */
244
+ export function alter_green_channel(img, amt) {
245
+ _assertClass(img, PhotonImage);
246
+ wasm.alter_green_channel(img.__wbg_ptr, amt);
247
+ }
248
+
249
+ /**
250
+ * Increment or decrement every pixel's Blue channel by a constant.
251
+ *
252
+ * # Arguments
253
+ * * `img` - A PhotonImage.
254
+ * * `amt` - The amount to increment or decrement the channel's value by for that pixel.
255
+ *
256
+ * # Example
257
+ *
258
+ * ```no_run
259
+ * // For example, to increase the Blue channel for all pixels by 10:
260
+ * use photon_rs::channels::alter_blue_channel;
261
+ * use photon_rs::native::open_image;
262
+ *
263
+ * let mut img = open_image("img.jpg").expect("File should open");
264
+ * alter_blue_channel(&mut img, 10_i16);
265
+ * ```
266
+ * @param {PhotonImage} img
267
+ * @param {number} amt
268
+ */
269
+ export function alter_blue_channel(img, amt) {
270
+ _assertClass(img, PhotonImage);
271
+ wasm.alter_blue_channel(img.__wbg_ptr, amt);
272
+ }
273
+
274
+ /**
275
+ * Increment/decrement two channels' values simultaneously by adding an amt to each channel per pixel.
276
+ *
277
+ * # Arguments
278
+ * * `img` - A PhotonImage.
279
+ * * `channel1` - A usize from 0 to 2 that represents either the R, G or B channels.
280
+ * * `amt1` - The amount to increment/decrement the channel's value by for that pixel.
281
+ * * `channel2` -A usize from 0 to 2 that represents either the R, G or B channels.
282
+ * * `amt2` - The amount to increment/decrement the channel's value by for that pixel.
283
+ *
284
+ * # Example
285
+ *
286
+ * ```no_run
287
+ * // For example, to increase the values of the Red and Blue channels per pixel:
288
+ * use photon_rs::channels::alter_two_channels;
289
+ * use photon_rs::native::open_image;
290
+ *
291
+ * let mut img = open_image("img.jpg").expect("File should open");
292
+ * alter_two_channels(&mut img, 0_usize, 10_i16, 2_usize, 20_i16);
293
+ * ```
294
+ * @param {PhotonImage} img
295
+ * @param {number} channel1
296
+ * @param {number} amt1
297
+ * @param {number} channel2
298
+ * @param {number} amt2
299
+ */
300
+ export function alter_two_channels(img, channel1, amt1, channel2, amt2) {
301
+ _assertClass(img, PhotonImage);
302
+ wasm.alter_two_channels(img.__wbg_ptr, channel1, amt1, channel2, amt2);
303
+ }
304
+
305
+ /**
306
+ * Increment all 3 channels' values by adding an amt to each channel per pixel.
307
+ *
308
+ * # Arguments
309
+ * * `img` - A PhotonImage.
310
+ * * `r_amt` - The amount to increment/decrement the Red channel by.
311
+ * * `g_amt` - The amount to increment/decrement the Green channel by.
312
+ * * `b_amt` - The amount to increment/decrement the Blue channel by.
313
+ *
314
+ * # Example
315
+ *
316
+ * ```no_run
317
+ * // For example, to increase the values of the Red channel by 10, the Green channel by 20,
318
+ * // and the Blue channel by 50:
319
+ * use photon_rs::channels::alter_channels;
320
+ * use photon_rs::native::open_image;
321
+ *
322
+ * let mut img = open_image("img.jpg").expect("File should open");
323
+ * alter_channels(&mut img, 10_i16, 20_i16, 50_i16);
324
+ * ```
325
+ * @param {PhotonImage} img
326
+ * @param {number} r_amt
327
+ * @param {number} g_amt
328
+ * @param {number} b_amt
329
+ */
330
+ export function alter_channels(img, r_amt, g_amt, b_amt) {
331
+ _assertClass(img, PhotonImage);
332
+ wasm.alter_channels(img.__wbg_ptr, r_amt, g_amt, b_amt);
333
+ }
334
+
335
+ /**
336
+ * Set a certain channel to zero, thus removing the channel's influence in the pixels' final rendered colour.
337
+ *
338
+ * # Arguments
339
+ * * `img` - A PhotonImage.
340
+ * * `channel` - The channel to be removed; must be a usize from 0 to 2, with 0 representing Red, 1 representing Green, and 2 representing Blue.
341
+ * * `min_filter` - Minimum filter. Value between 0 and 255. Only remove the channel if the current pixel's channel value is less than this minimum filter. To completely
342
+ * remove the channel, set this value to 255, to leave the channel as is, set to 0, and to set a channel to zero for a pixel whose red value is greater than 50,
343
+ * then channel would be 0 and min_filter would be 50.
344
+ *
345
+ * # Example
346
+ *
347
+ * ```no_run
348
+ * // For example, to remove the Red channel with a min_filter of 100:
349
+ * use photon_rs::channels::remove_channel;
350
+ * use photon_rs::native::open_image;
351
+ *
352
+ * let mut img = open_image("img.jpg").expect("File should open");
353
+ * remove_channel(&mut img, 0_usize, 100_u8);
354
+ * ```
355
+ * @param {PhotonImage} img
356
+ * @param {number} channel
357
+ * @param {number} min_filter
358
+ */
359
+ export function remove_channel(img, channel, min_filter) {
360
+ _assertClass(img, PhotonImage);
361
+ wasm.remove_channel(img.__wbg_ptr, channel, min_filter);
362
+ }
363
+
364
+ /**
365
+ * Remove the Red channel's influence in an image.
366
+ *
367
+ * # Arguments
368
+ * * `img` - A PhotonImage.
369
+ * * `min_filter` - Only remove the channel if the current pixel's channel value is less than this minimum filter.
370
+ *
371
+ * # Example
372
+ *
373
+ * ```no_run
374
+ * // For example, to remove the red channel for red channel pixel values less than 50:
375
+ * use photon_rs::channels::remove_red_channel;
376
+ * use photon_rs::native::open_image;
377
+ *
378
+ * let mut img = open_image("img.jpg").expect("File should open");
379
+ * remove_red_channel(&mut img, 50_u8);
380
+ * ```
381
+ * @param {PhotonImage} img
382
+ * @param {number} min_filter
383
+ */
384
+ export function remove_red_channel(img, min_filter) {
385
+ _assertClass(img, PhotonImage);
386
+ wasm.remove_red_channel(img.__wbg_ptr, min_filter);
387
+ }
388
+
389
+ /**
390
+ * Remove the Green channel's influence in an image.
391
+ *
392
+ * # Arguments
393
+ * * `img` - A PhotonImage.
394
+ * * `min_filter` - Only remove the channel if the current pixel's channel value is less than this minimum filter.
395
+ *
396
+ * # Example
397
+ *
398
+ * ```no_run
399
+ * // For example, to remove the green channel for green channel pixel values less than 50:
400
+ * use photon_rs::channels::remove_green_channel;
401
+ * use photon_rs::native::open_image;
402
+ *
403
+ * let mut img = open_image("img.jpg").expect("File should open");
404
+ * remove_green_channel(&mut img, 50_u8);
405
+ * ```
406
+ * @param {PhotonImage} img
407
+ * @param {number} min_filter
408
+ */
409
+ export function remove_green_channel(img, min_filter) {
410
+ _assertClass(img, PhotonImage);
411
+ wasm.remove_green_channel(img.__wbg_ptr, min_filter);
412
+ }
413
+
414
+ /**
415
+ * Remove the Blue channel's influence in an image.
416
+ *
417
+ * # Arguments
418
+ * * `img` - A PhotonImage.
419
+ * * `min_filter` - Only remove the channel if the current pixel's channel value is less than this minimum filter.
420
+ *
421
+ * # Example
422
+ *
423
+ * ```no_run
424
+ * // For example, to remove the blue channel for blue channel pixel values less than 50:
425
+ * use photon_rs::channels::remove_blue_channel;
426
+ * use photon_rs::native::open_image;
427
+ *
428
+ * let mut img = open_image("img.jpg").expect("File should open");
429
+ * remove_blue_channel(&mut img, 50_u8);
430
+ * ```
431
+ * @param {PhotonImage} img
432
+ * @param {number} min_filter
433
+ */
434
+ export function remove_blue_channel(img, min_filter) {
435
+ _assertClass(img, PhotonImage);
436
+ wasm.remove_blue_channel(img.__wbg_ptr, min_filter);
437
+ }
438
+
439
+ /**
440
+ * Swap two channels.
441
+ *
442
+ * # Arguments
443
+ * * `img` - A PhotonImage.
444
+ * * `channel1` - An index from 0 to 2, representing the Red, Green or Blue channels respectively. Red would be represented by 0, Green by 1, and Blue by 2.
445
+ * * `channel2` - An index from 0 to 2, representing the Red, Green or Blue channels respectively. Same as above.
446
+ *
447
+ * # Example
448
+ *
449
+ * ```no_run
450
+ * // For example, to swap the values of the Red channel with the values of the Blue channel:
451
+ * use photon_rs::channels::swap_channels;
452
+ * use photon_rs::native::open_image;
453
+ *
454
+ * let mut img = open_image("img.jpg").expect("File should open");
455
+ * swap_channels(&mut img, 0_usize, 2_usize);
456
+ * ```
457
+ * @param {PhotonImage} img
458
+ * @param {number} channel1
459
+ * @param {number} channel2
460
+ */
461
+ export function swap_channels(img, channel1, channel2) {
462
+ _assertClass(img, PhotonImage);
463
+ wasm.swap_channels(img.__wbg_ptr, channel1, channel2);
464
+ }
465
+
466
+ /**
467
+ * Invert RGB value of an image.
468
+ *
469
+ * # Arguments
470
+ * * `photon_image` - A DynamicImage that contains a view into the image.
471
+ * # Example
472
+ *
473
+ * ```no_run
474
+ * use photon_rs::channels::invert;
475
+ * use photon_rs::native::open_image;
476
+ *
477
+ * let mut img = open_image("img.jpg").expect("File should open");
478
+ * invert(&mut img);
479
+ * ```
480
+ * @param {PhotonImage} photon_image
481
+ */
482
+ export function invert(photon_image) {
483
+ _assertClass(photon_image, PhotonImage);
484
+ wasm.invert(photon_image.__wbg_ptr);
485
+ }
486
+
487
+ /**
488
+ * Selective hue rotation.
489
+ *
490
+ * Only rotate the hue of a pixel if its RGB values are within a specified range.
491
+ * This function only rotates a pixel's hue to another if it is visually similar to the colour specified.
492
+ * For example, if a user wishes all pixels that are blue to be changed to red, they can selectively specify only the blue pixels to be changed.
493
+ * # Arguments
494
+ * * `img` - A PhotonImage.
495
+ * * `ref_color` - The `RGB` value of the reference color (to be compared to)
496
+ * * `degrees` - The amount of degrees to hue rotate by.
497
+ *
498
+ * # Example
499
+ *
500
+ * ```no_run
501
+ * // For example, to only rotate the pixels that are of RGB value RGB{20, 40, 60}:
502
+ * use photon_rs::Rgb;
503
+ * use photon_rs::channels::selective_hue_rotate;
504
+ * use photon_rs::native::open_image;
505
+ *
506
+ * let ref_color = Rgb::new(20_u8, 40_u8, 60_u8);
507
+ * let mut img = open_image("img.jpg").expect("File should open");
508
+ * selective_hue_rotate(&mut img, ref_color, 180_f32);
509
+ * ```
510
+ * @param {PhotonImage} photon_image
511
+ * @param {Rgb} ref_color
512
+ * @param {number} degrees
513
+ */
514
+ export function selective_hue_rotate(photon_image, ref_color, degrees) {
515
+ _assertClass(photon_image, PhotonImage);
516
+ _assertClass(ref_color, Rgb);
517
+ var ptr0 = ref_color.__destroy_into_raw();
518
+ wasm.selective_hue_rotate(photon_image.__wbg_ptr, ptr0, degrees);
519
+ }
520
+
521
+ /**
522
+ * Selectively change pixel colours which are similar to the reference colour provided.
523
+ *
524
+ * Similarity between two colours is calculated via the CIE76 formula.
525
+ * Only changes the color of a pixel if its similarity to the reference colour is within the range in the algorithm.
526
+ * For example, with this function, a user can change the color of all blue pixels by mixing them with red by 10%.
527
+ * # Arguments
528
+ * * `photon_image` - A PhotonImage.
529
+ * * `ref_color` - The `RGB` value of the reference color (to be compared to)
530
+ * * `new_color` - The `RGB` value of the new color (to be mixed with the matched pixels)
531
+ * * `fraction` - The amount of mixing the new colour with the matched pixels
532
+ *
533
+ * # Example
534
+ *
535
+ * ```no_run
536
+ * // For example, to only change the color of pixels that are similar to the RGB value RGB{200, 120, 30} by mixing RGB{30, 120, 200} with 25%:
537
+ * use photon_rs::Rgb;
538
+ * use photon_rs::channels::selective_color_convert;
539
+ * use photon_rs::native::open_image;
540
+ *
541
+ * let ref_color = Rgb::new(200, 120, 30);
542
+ * let new_color = Rgb::new(30, 120, 200);
543
+ * let mut img = open_image("img.jpg").expect("File should open");
544
+ * selective_color_convert(&mut img, ref_color, new_color, 0.25);
545
+ * ```
546
+ * @param {PhotonImage} photon_image
547
+ * @param {Rgb} ref_color
548
+ * @param {Rgb} new_color
549
+ * @param {number} fraction
550
+ */
551
+ export function selective_color_convert(photon_image, ref_color, new_color, fraction) {
552
+ _assertClass(photon_image, PhotonImage);
553
+ _assertClass(ref_color, Rgb);
554
+ var ptr0 = ref_color.__destroy_into_raw();
555
+ _assertClass(new_color, Rgb);
556
+ var ptr1 = new_color.__destroy_into_raw();
557
+ wasm.selective_color_convert(photon_image.__wbg_ptr, ptr0, ptr1, fraction);
558
+ }
559
+
560
+ /**
561
+ * Selectively lighten an image.
562
+ *
563
+ * Only lighten the hue of a pixel if its colour matches or is similar to the RGB colour specified.
564
+ * For example, if a user wishes all pixels that are blue to be lightened, they can selectively specify only the blue pixels to be changed.
565
+ * # Arguments
566
+ * * `img` - A PhotonImage.
567
+ * * `ref_color` - The `RGB` value of the reference color (to be compared to)
568
+ * * `amt` - The level from 0 to 1 to lighten the hue by. Increasing by 10% would have an `amt` of 0.1
569
+ *
570
+ * # Example
571
+ *
572
+ * ```no_run
573
+ * // For example, to only lighten the pixels that are of or similar to RGB value RGB{20, 40, 60}:
574
+ * use photon_rs::Rgb;
575
+ * use photon_rs::channels::selective_lighten;
576
+ * use photon_rs::native::open_image;
577
+ *
578
+ * let ref_color = Rgb::new(20_u8, 40_u8, 60_u8);
579
+ * let mut img = open_image("img.jpg").expect("File should open");
580
+ * selective_lighten(&mut img, ref_color, 0.2_f32);
581
+ * ```
582
+ * @param {PhotonImage} img
583
+ * @param {Rgb} ref_color
584
+ * @param {number} amt
585
+ */
586
+ export function selective_lighten(img, ref_color, amt) {
587
+ _assertClass(img, PhotonImage);
588
+ _assertClass(ref_color, Rgb);
589
+ var ptr0 = ref_color.__destroy_into_raw();
590
+ wasm.selective_lighten(img.__wbg_ptr, ptr0, amt);
591
+ }
592
+
593
+ /**
594
+ * Selectively desaturate pixel colours which are similar to the reference colour provided.
595
+ *
596
+ * Similarity between two colours is calculated via the CIE76 formula.
597
+ * Only desaturates the hue of a pixel if its similarity to the reference colour is within the range in the algorithm.
598
+ * For example, if a user wishes all pixels that are blue to be desaturated by 0.1, they can selectively specify only the blue pixels to be changed.
599
+ * # Arguments
600
+ * * `img` - A PhotonImage.
601
+ * * `ref_color` - The `RGB` value of the reference color (to be compared to)
602
+ * * `amt` - The amount of desaturate the colour by.
603
+ *
604
+ * # Example
605
+ *
606
+ * ```no_run
607
+ * // For example, to only desaturate the pixels that are similar to the RGB value RGB{20, 40, 60}:
608
+ * use photon_rs::Rgb;
609
+ * use photon_rs::channels::selective_desaturate;
610
+ * use photon_rs::native::open_image;
611
+ *
612
+ * let ref_color = Rgb::new(20_u8, 40_u8, 60_u8);
613
+ * let mut img = open_image("img.jpg").expect("File should open");
614
+ * selective_desaturate(&mut img, ref_color, 0.1_f32);
615
+ * ```
616
+ * @param {PhotonImage} img
617
+ * @param {Rgb} ref_color
618
+ * @param {number} amt
619
+ */
620
+ export function selective_desaturate(img, ref_color, amt) {
621
+ _assertClass(img, PhotonImage);
622
+ _assertClass(ref_color, Rgb);
623
+ var ptr0 = ref_color.__destroy_into_raw();
624
+ wasm.selective_desaturate(img.__wbg_ptr, ptr0, amt);
625
+ }
626
+
627
+ /**
628
+ * Selectively saturate pixel colours which are similar to the reference colour provided.
629
+ *
630
+ * Similarity between two colours is calculated via the CIE76 formula.
631
+ * Only saturates the hue of a pixel if its similarity to the reference colour is within the range in the algorithm.
632
+ * For example, if a user wishes all pixels that are blue to have an increase in saturation by 10%, they can selectively specify only the blue pixels to be changed.
633
+ * # Arguments
634
+ * * `img` - A PhotonImage.
635
+ * * `ref_color` - The `RGB` value of the reference color (to be compared to)
636
+ * * `amt` - The amount of saturate the colour by.
637
+ *
638
+ * # Example
639
+ *
640
+ * ```no_run
641
+ * // For example, to only increase the saturation of pixels that are similar to the RGB value RGB{20, 40, 60}:
642
+ * use photon_rs::Rgb;
643
+ * use photon_rs::channels::selective_saturate;
644
+ * use photon_rs::native::open_image;
645
+ *
646
+ * let ref_color = Rgb::new(20_u8, 40_u8, 60_u8);
647
+ * let mut img = open_image("img.jpg").expect("File should open");
648
+ * selective_saturate(&mut img, ref_color, 0.1_f32);
649
+ * ```
650
+ * @param {PhotonImage} img
651
+ * @param {Rgb} ref_color
652
+ * @param {number} amt
653
+ */
654
+ export function selective_saturate(img, ref_color, amt) {
655
+ _assertClass(img, PhotonImage);
656
+ _assertClass(ref_color, Rgb);
657
+ var ptr0 = ref_color.__destroy_into_raw();
658
+ wasm.selective_saturate(img.__wbg_ptr, ptr0, amt);
659
+ }
660
+
661
+ /**
662
+ * Selectively changes a pixel to greyscale if it is *not* visually similar or close to the colour specified.
663
+ * Only changes the colour of a pixel if its RGB values are within a specified range.
664
+ *
665
+ * (Similarity between two colours is calculated via the CIE76 formula.)
666
+ * For example, if a user wishes all pixels that are *NOT* blue to be displayed in greyscale, they can selectively specify only the blue pixels to be
667
+ * kept in the photo.
668
+ * # Arguments
669
+ * * `img` - A PhotonImage.
670
+ * * `ref_color` - The `RGB` value of the reference color (to be compared to)
671
+ *
672
+ * # Example
673
+ *
674
+ * ```no_run
675
+ * // For example, to greyscale all pixels that are *not* visually similar to the RGB colour RGB{20, 40, 60}:
676
+ * use photon_rs::Rgb;
677
+ * use photon_rs::channels::selective_greyscale;
678
+ * use photon_rs::native::open_image;
679
+ *
680
+ * let ref_color = Rgb::new(20_u8, 40_u8, 60_u8);
681
+ * let mut img = open_image("img.jpg").expect("File should open");
682
+ * selective_greyscale(img, ref_color);
683
+ * ```
684
+ * @param {PhotonImage} photon_image
685
+ * @param {Rgb} ref_color
686
+ */
687
+ export function selective_greyscale(photon_image, ref_color) {
688
+ _assertClass(photon_image, PhotonImage);
689
+ var ptr0 = photon_image.__destroy_into_raw();
690
+ _assertClass(ref_color, Rgb);
691
+ var ptr1 = ref_color.__destroy_into_raw();
692
+ wasm.selective_greyscale(ptr0, ptr1);
693
+ }
694
+
695
+ /**
696
+ * Apply a monochrome effect of a certain colour.
697
+ *
698
+ * It does so by averaging the R, G, and B values of a pixel, and then adding a
699
+ * separate value to that averaged value for each channel to produce a tint.
700
+ * # Arguments
701
+ * * `photon_image` - A PhotonImage.
702
+ * * `r_offset` - The value to add to the Red channel per pixel.
703
+ * * `g_offset` - The value to add to the Green channel per pixel.
704
+ * * `b_offset` - The value to add to the Blue channel per pixel.
705
+ *
706
+ * # Example
707
+ *
708
+ * ```no_run
709
+ * // For example, to apply a monochrome effect to an image:
710
+ * use photon_rs::monochrome::monochrome;
711
+ * use photon_rs::native::open_image;
712
+ *
713
+ * let mut img = open_image("img.jpg").expect("File should open");
714
+ * monochrome(&mut img, 40_u32, 50_u32, 100_u32);
715
+ * ```
716
+ * @param {PhotonImage} img
717
+ * @param {number} r_offset
718
+ * @param {number} g_offset
719
+ * @param {number} b_offset
720
+ */
721
+ export function monochrome(img, r_offset, g_offset, b_offset) {
722
+ _assertClass(img, PhotonImage);
723
+ wasm.monochrome(img.__wbg_ptr, r_offset, g_offset, b_offset);
724
+ }
725
+
726
+ /**
727
+ * Convert an image to sepia.
728
+ *
729
+ * # Arguments
730
+ * * `photon_image` - A PhotonImage.
731
+ * # Example
732
+ *
733
+ * ```no_run
734
+ * // For example, to sepia an image of type `PhotonImage`:
735
+ * use photon_rs::monochrome::sepia;
736
+ * use photon_rs::native::open_image;
737
+ *
738
+ * let mut img = open_image("img.jpg").expect("File should open");
739
+ * sepia(&mut img);
740
+ * ```
741
+ * @param {PhotonImage} img
742
+ */
743
+ export function sepia(img) {
744
+ _assertClass(img, PhotonImage);
745
+ wasm.sepia(img.__wbg_ptr);
746
+ }
747
+
748
+ /**
749
+ * Convert an image to grayscale using the conventional averaging algorithm.
750
+ *
751
+ * # Arguments
752
+ * * `photon_image` - A PhotonImage.
753
+ * # Example
754
+ *
755
+ * ```no_run
756
+ * // For example, to convert an image of type `PhotonImage` to grayscale:
757
+ * use photon_rs::monochrome::grayscale;
758
+ * use photon_rs::native::open_image;
759
+ *
760
+ * let mut img = open_image("img.jpg").expect("File should open");
761
+ * grayscale(&mut img);
762
+ * ```
763
+ * @param {PhotonImage} img
764
+ */
765
+ export function grayscale(img) {
766
+ _assertClass(img, PhotonImage);
767
+ wasm.grayscale(img.__wbg_ptr);
768
+ }
769
+
770
+ /**
771
+ * Convert an image to grayscale with a human corrected factor, to account for human vision.
772
+ *
773
+ * # Arguments
774
+ * * `photon_image` - A PhotonImage.
775
+ * # Example
776
+ *
777
+ * ```no_run
778
+ * // For example, to convert an image of type `PhotonImage` to grayscale with a human corrected factor:
779
+ * use photon_rs::monochrome::grayscale_human_corrected;
780
+ * use photon_rs::native::open_image;
781
+ *
782
+ * let mut img = open_image("img.jpg").expect("File should open");
783
+ * grayscale_human_corrected(&mut img);
784
+ * ```
785
+ * @param {PhotonImage} img
786
+ */
787
+ export function grayscale_human_corrected(img) {
788
+ _assertClass(img, PhotonImage);
789
+ wasm.grayscale_human_corrected(img.__wbg_ptr);
790
+ }
791
+
792
+ /**
793
+ * Desaturate an image by getting the min/max of each pixel's RGB values.
794
+ *
795
+ * # Arguments
796
+ * * `photon_image` - A PhotonImage.
797
+ * # Example
798
+ *
799
+ * ```no_run
800
+ * // For example, to desaturate an image:
801
+ * use photon_rs::monochrome::desaturate;
802
+ * use photon_rs::native::open_image;
803
+ *
804
+ * let mut img = open_image("img.jpg").expect("File should open");
805
+ * desaturate(&mut img);
806
+ * ```
807
+ * @param {PhotonImage} img
808
+ */
809
+ export function desaturate(img) {
810
+ _assertClass(img, PhotonImage);
811
+ wasm.desaturate(img.__wbg_ptr);
812
+ }
813
+
814
+ /**
815
+ * Uses a min. decomposition algorithm to convert an image to greyscale.
816
+ *
817
+ * # Arguments
818
+ * * `photon_image` - A PhotonImage.
819
+ *
820
+ * # Example
821
+ *
822
+ * ```no_run
823
+ * // For example, to decompose an image with min decomposition:
824
+ * use photon_rs::monochrome::decompose_min;
825
+ * use photon_rs::native::open_image;
826
+ *
827
+ * let mut img = open_image("img.jpg").expect("File should open");
828
+ * decompose_min(&mut img);
829
+ * ```
830
+ * @param {PhotonImage} img
831
+ */
832
+ export function decompose_min(img) {
833
+ _assertClass(img, PhotonImage);
834
+ wasm.decompose_min(img.__wbg_ptr);
835
+ }
836
+
837
+ /**
838
+ * Uses a max. decomposition algorithm to convert an image to greyscale.
839
+ *
840
+ * # Arguments
841
+ * * `photon_image` - A PhotonImage.
842
+ *
843
+ * # Example
844
+ *
845
+ * ```no_run
846
+ * // For example, to decompose an image with max decomposition:
847
+ * use photon_rs::monochrome::decompose_max;
848
+ * use photon_rs::native::open_image;
849
+ *
850
+ * let mut img = open_image("img.jpg").expect("File should open");
851
+ * decompose_max(&mut img);
852
+ * ```
853
+ * @param {PhotonImage} img
854
+ */
855
+ export function decompose_max(img) {
856
+ _assertClass(img, PhotonImage);
857
+ wasm.decompose_max(img.__wbg_ptr);
858
+ }
859
+
860
+ /**
861
+ * Employ only a limited number of gray shades in an image.
862
+ *
863
+ * # Arguments
864
+ * * `photon_image` - A PhotonImage.
865
+ * * `num_shades` - The number of grayscale shades to be displayed in the image.
866
+ *
867
+ * # Example
868
+ *
869
+ * ```no_run
870
+ * // For example, to limit an image to four shades of gray only:
871
+ * use photon_rs::monochrome::grayscale_shades;
872
+ * use photon_rs::native::open_image;
873
+ *
874
+ * let mut img = open_image("img.jpg").expect("File should open");
875
+ * grayscale_shades(&mut img, 4_u8);
876
+ * ```
877
+ * @param {PhotonImage} photon_image
878
+ * @param {number} num_shades
879
+ */
880
+ export function grayscale_shades(photon_image, num_shades) {
881
+ _assertClass(photon_image, PhotonImage);
882
+ wasm.grayscale_shades(photon_image.__wbg_ptr, num_shades);
883
+ }
884
+
885
+ /**
886
+ * Convert an image to grayscale by setting a pixel's 3 RGB values to the Red channel's value.
887
+ *
888
+ * # Arguments
889
+ * * `photon_image` - A PhotonImage.
890
+ *
891
+ * # Example
892
+ *
893
+ * ```no_run
894
+ * use photon_rs::monochrome::r_grayscale;
895
+ * use photon_rs::native::open_image;
896
+ *
897
+ * let mut img = open_image("img.jpg").expect("File should open");
898
+ * r_grayscale(&mut img);
899
+ * ```
900
+ * @param {PhotonImage} photon_image
901
+ */
902
+ export function r_grayscale(photon_image) {
903
+ _assertClass(photon_image, PhotonImage);
904
+ wasm.r_grayscale(photon_image.__wbg_ptr);
905
+ }
906
+
907
+ /**
908
+ * Convert an image to grayscale by setting a pixel's 3 RGB values to the Green channel's value.
909
+ *
910
+ * # Arguments
911
+ * * `photon_image` - A PhotonImage.
912
+ *
913
+ * # Example
914
+ *
915
+ * ```no_run
916
+ * use photon_rs::monochrome::g_grayscale;
917
+ * use photon_rs::native::open_image;
918
+ *
919
+ * let mut img = open_image("img.jpg").expect("File should open");
920
+ * g_grayscale(&mut img);
921
+ * ```
922
+ * @param {PhotonImage} photon_image
923
+ */
924
+ export function g_grayscale(photon_image) {
925
+ _assertClass(photon_image, PhotonImage);
926
+ wasm.g_grayscale(photon_image.__wbg_ptr);
927
+ }
928
+
929
+ /**
930
+ * Convert an image to grayscale by setting a pixel's 3 RGB values to the Blue channel's value.
931
+ *
932
+ * # Arguments
933
+ * * `photon_image` - A PhotonImage.
934
+ *
935
+ * # Example
936
+ *
937
+ * ```no_run
938
+ * use photon_rs::monochrome::b_grayscale;
939
+ * use photon_rs::native::open_image;
940
+ *
941
+ * let mut img = open_image("img.jpg").expect("File should open");
942
+ * b_grayscale(&mut img);
943
+ * ```
944
+ * @param {PhotonImage} photon_image
945
+ */
946
+ export function b_grayscale(photon_image) {
947
+ _assertClass(photon_image, PhotonImage);
948
+ wasm.b_grayscale(photon_image.__wbg_ptr);
949
+ }
950
+
951
+ /**
952
+ * Convert an image to grayscale by setting a pixel's 3 RGB values to a chosen channel's value.
953
+ *
954
+ * # Arguments
955
+ * * `photon_image` - A PhotonImage.
956
+ * * `channel` - A usize representing the channel from 0 to 2. O represents the Red channel, 1 the Green channel, and 2 the Blue channel.
957
+ *
958
+ * # Example
959
+ * To grayscale using only values from the Red channel:
960
+ * ```no_run
961
+ * use photon_rs::monochrome::single_channel_grayscale;
962
+ * use photon_rs::native::open_image;
963
+ *
964
+ * let mut img = open_image("img.jpg").expect("File should open");
965
+ * single_channel_grayscale(&mut img, 0_usize);
966
+ * ```
967
+ * @param {PhotonImage} photon_image
968
+ * @param {number} channel
969
+ */
970
+ export function single_channel_grayscale(photon_image, channel) {
971
+ _assertClass(photon_image, PhotonImage);
972
+ wasm.single_channel_grayscale(photon_image.__wbg_ptr, channel);
973
+ }
974
+
975
+ /**
976
+ * Threshold an image using a standard thresholding algorithm.
977
+ *
978
+ * # Arguments
979
+ * * `photon_image` - A PhotonImage.
980
+ * * `threshold` - The amount the image should be thresholded by from 0 to 255.
981
+ * # Example
982
+ *
983
+ * ```no_run
984
+ * // For example, to threshold an image of type `PhotonImage`:
985
+ * use photon_rs::monochrome::threshold;
986
+ * use photon_rs::native::open_image;
987
+ *
988
+ * let mut img = open_image("img.jpg").expect("File should open");
989
+ * threshold(&mut img, 30_u32);
990
+ * ```
991
+ * @param {PhotonImage} img
992
+ * @param {number} threshold
993
+ */
994
+ export function threshold(img, threshold) {
995
+ _assertClass(img, PhotonImage);
996
+ wasm.threshold(img.__wbg_ptr, threshold);
997
+ }
998
+
999
+ /**
1000
+ * Applies gamma correction to an image.
1001
+ * # Arguments
1002
+ * * `photon_image` - A PhotonImage that contains a view into the image.
1003
+ * * `red` - Gamma value for red channel.
1004
+ * * `green` - Gamma value for green channel.
1005
+ * * `blue` - Gamma value for blue channel.
1006
+ * # Example
1007
+ *
1008
+ * ```no_run
1009
+ * // For example, to turn an image of type `PhotonImage` into a gamma corrected image:
1010
+ * use photon_rs::colour_spaces::gamma_correction;
1011
+ * use photon_rs::native::open_image;
1012
+ *
1013
+ * let mut img = open_image("img.jpg").expect("File should open");
1014
+ * gamma_correction(&mut img, 2.2, 2.2, 2.2);
1015
+ * ```
1016
+ * @param {PhotonImage} photon_image
1017
+ * @param {number} red
1018
+ * @param {number} green
1019
+ * @param {number} blue
1020
+ */
1021
+ export function gamma_correction(photon_image, red, green, blue) {
1022
+ _assertClass(photon_image, PhotonImage);
1023
+ wasm.gamma_correction(photon_image.__wbg_ptr, red, green, blue);
1024
+ }
1025
+
1026
+ /**
1027
+ * Image manipulation effects in the HSLuv colour space
1028
+ *
1029
+ * Effects include:
1030
+ * * **saturate** - Saturation increase.
1031
+ * * **desaturate** - Desaturate the image.
1032
+ * * **shift_hue** - Hue rotation by a specified number of degrees.
1033
+ * * **darken** - Decrease the brightness.
1034
+ * * **lighten** - Increase the brightness.
1035
+ *
1036
+ * # Arguments
1037
+ * * `photon_image` - A PhotonImage.
1038
+ * * `mode` - The effect desired to be applied. Choose from: `saturate`, `desaturate`, `shift_hue`, `darken`, `lighten`
1039
+ * * `amt` - A float value from 0 to 1 which represents the amount the effect should be increased by.
1040
+ * # Example
1041
+ * ```no_run
1042
+ * // For example to increase the saturation by 10%:
1043
+ * use photon_rs::colour_spaces::hsluv;
1044
+ * use photon_rs::native::open_image;
1045
+ *
1046
+ * // Open the image. A PhotonImage is returned.
1047
+ * let mut img = open_image("img.jpg").expect("File should open");
1048
+ * hsluv(&mut img, "saturate", 0.1_f32);
1049
+ * ```
1050
+ * @param {PhotonImage} photon_image
1051
+ * @param {string} mode
1052
+ * @param {number} amt
1053
+ */
1054
+ export function hsluv(photon_image, mode, amt) {
1055
+ _assertClass(photon_image, PhotonImage);
1056
+ const ptr0 = passStringToWasm0(mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1057
+ const len0 = WASM_VECTOR_LEN;
1058
+ wasm.hsluv(photon_image.__wbg_ptr, ptr0, len0, amt);
1059
+ }
1060
+
1061
+ /**
1062
+ * Image manipulation effects in the LCh colour space
1063
+ *
1064
+ * Effects include:
1065
+ * * **saturate** - Saturation increase.
1066
+ * * **desaturate** - Desaturate the image.
1067
+ * * **shift_hue** - Hue rotation by a specified number of degrees.
1068
+ * * **darken** - Decrease the brightness.
1069
+ * * **lighten** - Increase the brightness.
1070
+ *
1071
+ * # Arguments
1072
+ * * `photon_image` - A PhotonImage.
1073
+ * * `mode` - The effect desired to be applied. Choose from: `saturate`, `desaturate`, `shift_hue`, `darken`, `lighten`
1074
+ * * `amt` - A float value from 0 to 1 which represents the amount the effect should be increased by.
1075
+ * # Example
1076
+ * ```no_run
1077
+ * // For example to increase the saturation by 10%:
1078
+ * use photon_rs::colour_spaces::lch;
1079
+ * use photon_rs::native::open_image;
1080
+ *
1081
+ * // Open the image. A PhotonImage is returned.
1082
+ * let mut img = open_image("img.jpg").expect("File should open");
1083
+ * lch(&mut img, "saturate", 0.1_f32);
1084
+ * ```
1085
+ * @param {PhotonImage} photon_image
1086
+ * @param {string} mode
1087
+ * @param {number} amt
1088
+ */
1089
+ export function lch(photon_image, mode, amt) {
1090
+ _assertClass(photon_image, PhotonImage);
1091
+ const ptr0 = passStringToWasm0(mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1092
+ const len0 = WASM_VECTOR_LEN;
1093
+ wasm.lch(photon_image.__wbg_ptr, ptr0, len0, amt);
1094
+ }
1095
+
1096
+ /**
1097
+ * Image manipulation effects in the HSL colour space.
1098
+ *
1099
+ * Effects include:
1100
+ * * **saturate** - Saturation increase.
1101
+ * * **desaturate** - Desaturate the image.
1102
+ * * **shift_hue** - Hue rotation by a specified number of degrees.
1103
+ * * **darken** - Decrease the brightness.
1104
+ * * **lighten** - Increase the brightness.
1105
+ *
1106
+ * # Arguments
1107
+ * * `photon_image` - A PhotonImage.
1108
+ * * `mode` - The effect desired to be applied. Choose from: `saturate`, `desaturate`, `shift_hue`, `darken`, `lighten`
1109
+ * * `amt` - A float value from 0 to 1 which represents the amount the effect should be increased by.
1110
+ * # Example
1111
+ * ```no_run
1112
+ * // For example to increase the saturation by 10%:
1113
+ * use photon_rs::colour_spaces::hsl;
1114
+ * use photon_rs::native::open_image;
1115
+ *
1116
+ * // Open the image. A PhotonImage is returned.
1117
+ * let mut img = open_image("img.jpg").expect("File should open");
1118
+ * hsl(&mut img, "saturate", 0.1_f32);
1119
+ * ```
1120
+ * @param {PhotonImage} photon_image
1121
+ * @param {string} mode
1122
+ * @param {number} amt
1123
+ */
1124
+ export function hsl(photon_image, mode, amt) {
1125
+ _assertClass(photon_image, PhotonImage);
1126
+ const ptr0 = passStringToWasm0(mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1127
+ const len0 = WASM_VECTOR_LEN;
1128
+ wasm.hsl(photon_image.__wbg_ptr, ptr0, len0, amt);
1129
+ }
1130
+
1131
+ /**
1132
+ * Image manipulation in the HSV colour space.
1133
+ *
1134
+ * Effects include:
1135
+ * * **saturate** - Saturation increase.
1136
+ * * **desaturate** - Desaturate the image.
1137
+ * * **shift_hue** - Hue rotation by a specified number of degrees.
1138
+ * * **darken** - Decrease the brightness.
1139
+ * * **lighten** - Increase the brightness.
1140
+ *
1141
+ * # Arguments
1142
+ * * `photon_image` - A PhotonImage.
1143
+ * * `mode` - The effect desired to be applied. Choose from: `saturate`, `desaturate`, `shift_hue`, `darken`, `lighten`
1144
+ * * `amt` - A float value from 0 to 1 which represents the amount the effect should be increased by.
1145
+ *
1146
+ * # Example
1147
+ * ```no_run
1148
+ * // For example to increase the saturation by 10%:
1149
+ * use photon_rs::colour_spaces::hsv;
1150
+ * use photon_rs::native::open_image;
1151
+ *
1152
+ * // Open the image. A PhotonImage is returned.
1153
+ * let mut img = open_image("img.jpg").expect("File should open");
1154
+ * hsv(&mut img, "saturate", 0.1_f32);
1155
+ * ```
1156
+ * @param {PhotonImage} photon_image
1157
+ * @param {string} mode
1158
+ * @param {number} amt
1159
+ */
1160
+ export function hsv(photon_image, mode, amt) {
1161
+ _assertClass(photon_image, PhotonImage);
1162
+ const ptr0 = passStringToWasm0(mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1163
+ const len0 = WASM_VECTOR_LEN;
1164
+ wasm.hsv(photon_image.__wbg_ptr, ptr0, len0, amt);
1165
+ }
1166
+
1167
+ /**
1168
+ * Shift hue by a specified number of degrees in the HSL colour space.
1169
+ * # Arguments
1170
+ * * `img` - A PhotonImage.
1171
+ * * `mode` - A float value from 0 to 1 which is the amount to shift the hue by, or hue rotate by.
1172
+ *
1173
+ * # Example
1174
+ * ```no_run
1175
+ * // For example to hue rotate/shift the hue by 120 degrees in the HSL colour space:
1176
+ * use photon_rs::colour_spaces::hue_rotate_hsl;
1177
+ * use photon_rs::native::open_image;
1178
+ *
1179
+ * // Open the image. A PhotonImage is returned.
1180
+ * let mut img = open_image("img.jpg").expect("File should open");
1181
+ * hue_rotate_hsl(&mut img, 120_f32);
1182
+ * ```
1183
+ * @param {PhotonImage} img
1184
+ * @param {number} degrees
1185
+ */
1186
+ export function hue_rotate_hsl(img, degrees) {
1187
+ _assertClass(img, PhotonImage);
1188
+ wasm.hue_rotate_hsl(img.__wbg_ptr, degrees);
1189
+ }
1190
+
1191
+ /**
1192
+ * Shift hue by a specified number of degrees in the HSV colour space.
1193
+ * # Arguments
1194
+ * * `img` - A PhotonImage.
1195
+ * * `mode` - A float value from 0 to 1 which is the amount to shift the hue by, or hue rotate by.
1196
+ *
1197
+ * # Example
1198
+ * ```no_run
1199
+ * // For example to hue rotate/shift the hue by 120 degrees in the HSV colour space:
1200
+ * use photon_rs::colour_spaces::hue_rotate_hsv;
1201
+ * use photon_rs::native::open_image;
1202
+ *
1203
+ * // Open the image. A PhotonImage is returned.
1204
+ * let mut img = open_image("img.jpg").expect("File should open");
1205
+ * hue_rotate_hsv(&mut img, 120_f32);
1206
+ * ```
1207
+ * @param {PhotonImage} img
1208
+ * @param {number} degrees
1209
+ */
1210
+ export function hue_rotate_hsv(img, degrees) {
1211
+ _assertClass(img, PhotonImage);
1212
+ wasm.hue_rotate_hsv(img.__wbg_ptr, degrees);
1213
+ }
1214
+
1215
+ /**
1216
+ * Shift hue by a specified number of degrees in the LCh colour space.
1217
+ * # Arguments
1218
+ * * `img` - A PhotonImage.
1219
+ * * `mode` - A float value from 0 to 1 which is the amount to shift the hue by, or hue rotate by.
1220
+ *
1221
+ * # Example
1222
+ * ```no_run
1223
+ * // For example to hue rotate/shift the hue by 120 degrees in the HSL colour space:
1224
+ * use photon_rs::colour_spaces::hue_rotate_lch;
1225
+ * use photon_rs::native::open_image;
1226
+ *
1227
+ * // Open the image. A PhotonImage is returned.
1228
+ * let mut img = open_image("img.jpg").expect("File should open");
1229
+ * hue_rotate_lch(&mut img, 120_f32);
1230
+ * ```
1231
+ * @param {PhotonImage} img
1232
+ * @param {number} degrees
1233
+ */
1234
+ export function hue_rotate_lch(img, degrees) {
1235
+ _assertClass(img, PhotonImage);
1236
+ wasm.hue_rotate_lch(img.__wbg_ptr, degrees);
1237
+ }
1238
+
1239
+ /**
1240
+ * Shift hue by a specified number of degrees in the HSLuv colour space.
1241
+ * # Arguments
1242
+ * * `img` - A PhotonImage.
1243
+ * * `mode` - A float value from 0 to 1 which is the amount to shift the hue by, or hue rotate by.
1244
+ *
1245
+ * # Example
1246
+ * ```no_run
1247
+ * // For example to hue rotate/shift the hue by 120 degrees in the HSL colour space:
1248
+ * use photon_rs::colour_spaces::hue_rotate_hsluv;
1249
+ * use photon_rs::native::open_image;
1250
+ *
1251
+ * // Open the image. A PhotonImage is returned.
1252
+ * let mut img = open_image("img.jpg").expect("File should open");
1253
+ * hue_rotate_hsluv(&mut img, 120_f32);
1254
+ * ```
1255
+ * @param {PhotonImage} img
1256
+ * @param {number} degrees
1257
+ */
1258
+ export function hue_rotate_hsluv(img, degrees) {
1259
+ _assertClass(img, PhotonImage);
1260
+ wasm.hue_rotate_hsluv(img.__wbg_ptr, degrees);
1261
+ }
1262
+
1263
+ /**
1264
+ * Increase the image's saturation by converting each pixel's colour to the HSL colour space
1265
+ * and increasing the colour's saturation.
1266
+ * # Arguments
1267
+ * * `img` - A PhotonImage.
1268
+ * * `level` - Float value from 0 to 1 representing the level to which to increase the saturation by.
1269
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1270
+ * Increasing saturation by 80% would be represented by a `level` of 0.8
1271
+ *
1272
+ * # Example
1273
+ * ```no_run
1274
+ * // For example to increase saturation by 10% in the HSL colour space:
1275
+ * use photon_rs::colour_spaces::saturate_hsl;
1276
+ * use photon_rs::native::open_image;
1277
+ *
1278
+ * // Open the image. A PhotonImage is returned.
1279
+ * let mut img = open_image("img.jpg").expect("File should open");
1280
+ * saturate_hsl(&mut img, 0.1_f32);
1281
+ * ```
1282
+ * @param {PhotonImage} img
1283
+ * @param {number} level
1284
+ */
1285
+ export function saturate_hsl(img, level) {
1286
+ _assertClass(img, PhotonImage);
1287
+ wasm.saturate_hsl(img.__wbg_ptr, level);
1288
+ }
1289
+
1290
+ /**
1291
+ * Increase the image's saturation in the LCh colour space.
1292
+ * # Arguments
1293
+ * * `img` - A PhotonImage.
1294
+ * * `level` - Float value from 0 to 1 representing the level to which to increase the saturation by.
1295
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1296
+ * Increasing saturation by 80% would be represented by a `level` of 0.8
1297
+ *
1298
+ * # Example
1299
+ * ```no_run
1300
+ * // For example to increase saturation by 40% in the Lch colour space:
1301
+ * use photon_rs::colour_spaces::saturate_lch;
1302
+ * use photon_rs::native::open_image;
1303
+ *
1304
+ * // Open the image. A PhotonImage is returned.
1305
+ * let mut img = open_image("img.jpg").expect("File should open");
1306
+ * saturate_lch(&mut img, 0.4_f32);
1307
+ * ```
1308
+ * @param {PhotonImage} img
1309
+ * @param {number} level
1310
+ */
1311
+ export function saturate_lch(img, level) {
1312
+ _assertClass(img, PhotonImage);
1313
+ wasm.saturate_lch(img.__wbg_ptr, level);
1314
+ }
1315
+
1316
+ /**
1317
+ * Increase the image's saturation in the HSLuv colour space.
1318
+ * # Arguments
1319
+ * * `img` - A PhotonImage.
1320
+ * * `level` - Float value from 0 to 1 representing the level to which to increase the saturation by.
1321
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1322
+ * Increasing saturation by 80% would be represented by a `level` of 0.8
1323
+ *
1324
+ * # Example
1325
+ * ```no_run
1326
+ * // For example to increase saturation by 40% in the HSLuv colour space:
1327
+ * use photon_rs::colour_spaces::saturate_hsluv;
1328
+ * use photon_rs::native::open_image;
1329
+ *
1330
+ * // Open the image. A PhotonImage is returned.
1331
+ * let mut img = open_image("img.jpg").expect("File should open");
1332
+ * saturate_hsluv(&mut img, 0.4_f32);
1333
+ * ```
1334
+ * @param {PhotonImage} img
1335
+ * @param {number} level
1336
+ */
1337
+ export function saturate_hsluv(img, level) {
1338
+ _assertClass(img, PhotonImage);
1339
+ wasm.saturate_hsluv(img.__wbg_ptr, level);
1340
+ }
1341
+
1342
+ /**
1343
+ * Increase the image's saturation in the HSV colour space.
1344
+ * # Arguments
1345
+ * * `img` - A PhotonImage.
1346
+ * * `level` - Float value from 0 to 1 representing the level by which to increase the saturation by.
1347
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1348
+ * Increasing saturation by 80% would be represented by a `level` of 0.8
1349
+ *
1350
+ * # Example
1351
+ * ```no_run
1352
+ * // For example to increase saturation by 30% in the HSV colour space:
1353
+ * use photon_rs::colour_spaces::saturate_hsv;
1354
+ * use photon_rs::native::open_image;
1355
+ *
1356
+ * // Open the image. A PhotonImage is returned.
1357
+ * let mut img = open_image("img.jpg").expect("File should open");
1358
+ * saturate_hsv(&mut img, 0.3_f32);
1359
+ * ```
1360
+ * @param {PhotonImage} img
1361
+ * @param {number} level
1362
+ */
1363
+ export function saturate_hsv(img, level) {
1364
+ _assertClass(img, PhotonImage);
1365
+ wasm.saturate_hsv(img.__wbg_ptr, level);
1366
+ }
1367
+
1368
+ /**
1369
+ * Lighten an image by a specified amount in the LCh colour space.
1370
+ *
1371
+ * # Arguments
1372
+ * * `img` - A PhotonImage.
1373
+ * * `level` - Float value from 0 to 1 representing the level to which to lighten the image by.
1374
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1375
+ * Lightening by 80% would be represented by a `level` of 0.8
1376
+ *
1377
+ * # Example
1378
+ * ```no_run
1379
+ * // For example to lighten an image by 10% in the LCh colour space:
1380
+ * use photon_rs::colour_spaces::lighten_lch;
1381
+ * use photon_rs::native::open_image;
1382
+ *
1383
+ * // Open the image. A PhotonImage is returned.
1384
+ * let mut img = open_image("img.jpg").expect("File should open");
1385
+ * lighten_lch(&mut img, 0.1_f32);
1386
+ * ```
1387
+ * @param {PhotonImage} img
1388
+ * @param {number} level
1389
+ */
1390
+ export function lighten_lch(img, level) {
1391
+ _assertClass(img, PhotonImage);
1392
+ wasm.lighten_lch(img.__wbg_ptr, level);
1393
+ }
1394
+
1395
+ /**
1396
+ * Lighten an image by a specified amount in the HSLuv colour space.
1397
+ *
1398
+ * # Arguments
1399
+ * * `img` - A PhotonImage.
1400
+ * * `level` - Float value from 0 to 1 representing the level to which to lighten the image by.
1401
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1402
+ * Lightening by 80% would be represented by a `level` of 0.8
1403
+ *
1404
+ * # Example
1405
+ * ```no_run
1406
+ * // For example to lighten an image by 10% in the HSLuv colour space:
1407
+ * use photon_rs::colour_spaces::lighten_hsluv;
1408
+ * use photon_rs::native::open_image;
1409
+ *
1410
+ * // Open the image. A PhotonImage is returned.
1411
+ * let mut img = open_image("img.jpg").expect("File should open");
1412
+ * lighten_hsluv(&mut img, 0.1_f32);
1413
+ * ```
1414
+ * @param {PhotonImage} img
1415
+ * @param {number} level
1416
+ */
1417
+ export function lighten_hsluv(img, level) {
1418
+ _assertClass(img, PhotonImage);
1419
+ wasm.lighten_hsluv(img.__wbg_ptr, level);
1420
+ }
1421
+
1422
+ /**
1423
+ * Lighten an image by a specified amount in the HSL colour space.
1424
+ * # Arguments
1425
+ * * `img` - A PhotonImage.
1426
+ * * `level` - Float value from 0 to 1 representing the level to which to lighten the image by.
1427
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1428
+ * Lightening by 80% would be represented by a `level` of 0.8
1429
+ *
1430
+ * # Example
1431
+ * ```no_run
1432
+ * // For example to lighten an image by 10% in the HSL colour space:
1433
+ * use photon_rs::colour_spaces::lighten_hsl;
1434
+ * use photon_rs::native::open_image;
1435
+ *
1436
+ * // Open the image. A PhotonImage is returned.
1437
+ * let mut img = open_image("img.jpg").expect("File should open");
1438
+ * lighten_hsl(&mut img, 0.1_f32);
1439
+ * ```
1440
+ * @param {PhotonImage} img
1441
+ * @param {number} level
1442
+ */
1443
+ export function lighten_hsl(img, level) {
1444
+ _assertClass(img, PhotonImage);
1445
+ wasm.lighten_hsl(img.__wbg_ptr, level);
1446
+ }
1447
+
1448
+ /**
1449
+ * Lighten an image by a specified amount in the HSV colour space.
1450
+ *
1451
+ * # Arguments
1452
+ * * `img` - A PhotonImage.
1453
+ * * `level` - Float value from 0 to 1 representing the level to which to lighten the image by.
1454
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1455
+ * Lightening by 80% would be represented by a `level` of 0.8
1456
+ *
1457
+ * # Example
1458
+ * ```no_run
1459
+ * // For example to lighten an image by 10% in the HSV colour space:
1460
+ * use photon_rs::colour_spaces::lighten_hsv;
1461
+ * use photon_rs::native::open_image;
1462
+ *
1463
+ * // Open the image. A PhotonImage is returned.
1464
+ * let mut img = open_image("img.jpg").expect("File should open");
1465
+ * lighten_hsv(&mut img, 0.1_f32);
1466
+ * ```
1467
+ * @param {PhotonImage} img
1468
+ * @param {number} level
1469
+ */
1470
+ export function lighten_hsv(img, level) {
1471
+ _assertClass(img, PhotonImage);
1472
+ wasm.lighten_hsv(img.__wbg_ptr, level);
1473
+ }
1474
+
1475
+ /**
1476
+ * Darken the image by a specified amount in the LCh colour space.
1477
+ *
1478
+ * # Arguments
1479
+ * * `img` - A PhotonImage.
1480
+ * * `level` - Float value from 0 to 1 representing the level to which to darken the image by.
1481
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1482
+ * Darkening by 80% would be represented by a `level` of 0.8
1483
+ *
1484
+ * # Example
1485
+ * ```no_run
1486
+ * // For example to darken an image by 10% in the LCh colour space:
1487
+ * use photon_rs::colour_spaces::darken_lch;
1488
+ * use photon_rs::native::open_image;
1489
+ *
1490
+ * // Open the image. A PhotonImage is returned.
1491
+ * let mut img = open_image("img.jpg").expect("File should open");
1492
+ * darken_lch(&mut img, 0.1_f32);
1493
+ * ```
1494
+ * @param {PhotonImage} img
1495
+ * @param {number} level
1496
+ */
1497
+ export function darken_lch(img, level) {
1498
+ _assertClass(img, PhotonImage);
1499
+ wasm.darken_lch(img.__wbg_ptr, level);
1500
+ }
1501
+
1502
+ /**
1503
+ * Darken the image by a specified amount in the HSLuv colour space.
1504
+ *
1505
+ * # Arguments
1506
+ * * `img` - A PhotonImage.
1507
+ * * `level` - Float value from 0 to 1 representing the level to which to darken the image by.
1508
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1509
+ * Darkening by 80% would be represented by a `level` of 0.8
1510
+ *
1511
+ * # Example
1512
+ * ```no_run
1513
+ * // For example to darken an image by 10% in the HSLuv colour space:
1514
+ * use photon_rs::colour_spaces::darken_hsluv;
1515
+ * use photon_rs::native::open_image;
1516
+ *
1517
+ * // Open the image. A PhotonImage is returned.
1518
+ * let mut img = open_image("img.jpg").expect("File should open");
1519
+ * darken_hsluv(&mut img, 0.1_f32);
1520
+ * ```
1521
+ * @param {PhotonImage} img
1522
+ * @param {number} level
1523
+ */
1524
+ export function darken_hsluv(img, level) {
1525
+ _assertClass(img, PhotonImage);
1526
+ wasm.darken_hsluv(img.__wbg_ptr, level);
1527
+ }
1528
+
1529
+ /**
1530
+ * Darken the image by a specified amount in the HSL colour space.
1531
+ *
1532
+ * # Arguments
1533
+ * * `img` - A PhotonImage.
1534
+ * * `level` - Float value from 0 to 1 representing the level to which to darken the image by.
1535
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1536
+ * Darkening by 80% would be represented by a `level` of 0.8
1537
+ *
1538
+ * # Example
1539
+ * ```no_run
1540
+ * // For example to darken an image by 10% in the HSL colour space:
1541
+ * use photon_rs::colour_spaces::darken_hsl;
1542
+ * use photon_rs::native::open_image;
1543
+ *
1544
+ * // Open the image. A PhotonImage is returned.
1545
+ * let mut img = open_image("img.jpg").expect("File should open");
1546
+ * darken_hsl(&mut img, 0.1_f32);
1547
+ * ```
1548
+ * @param {PhotonImage} img
1549
+ * @param {number} level
1550
+ */
1551
+ export function darken_hsl(img, level) {
1552
+ _assertClass(img, PhotonImage);
1553
+ wasm.darken_hsl(img.__wbg_ptr, level);
1554
+ }
1555
+
1556
+ /**
1557
+ * Darken the image's colours by a specified amount in the HSV colour space.
1558
+ *
1559
+ * # Arguments
1560
+ * * `img` - A PhotonImage.
1561
+ * * `level` - Float value from 0 to 1 representing the level to which to darken the image by.
1562
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1563
+ * Darkening by 80% would be represented by a `level` of 0.8
1564
+ *
1565
+ * # Example
1566
+ * ```no_run
1567
+ * // For example to darken an image by 10% in the HSV colour space:
1568
+ * use photon_rs::colour_spaces::darken_hsv;
1569
+ * use photon_rs::native::open_image;
1570
+ *
1571
+ * // Open the image. A PhotonImage is returned.
1572
+ * let mut img = open_image("img.jpg").expect("File should open");
1573
+ * darken_hsv(&mut img, 0.1_f32);
1574
+ * ```
1575
+ * @param {PhotonImage} img
1576
+ * @param {number} level
1577
+ */
1578
+ export function darken_hsv(img, level) {
1579
+ _assertClass(img, PhotonImage);
1580
+ wasm.darken_hsv(img.__wbg_ptr, level);
1581
+ }
1582
+
1583
+ /**
1584
+ * Desaturate the image by a specified amount in the HSV colour space.
1585
+ *
1586
+ * # Arguments
1587
+ * * `img` - A PhotonImage.
1588
+ * * `level` - Float value from 0 to 1 representing the level to which to desaturate the image by.
1589
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1590
+ * Desaturating by 80% would be represented by a `level` of 0.8
1591
+ *
1592
+ * # Example
1593
+ * ```no_run
1594
+ * // For example to desaturate an image by 10% in the HSV colour space:
1595
+ * use photon_rs::colour_spaces::desaturate_hsv;
1596
+ * use photon_rs::native::open_image;
1597
+ *
1598
+ * // Open the image. A PhotonImage is returned.
1599
+ * let mut img = open_image("img.jpg").expect("File should open");
1600
+ * desaturate_hsv(&mut img, 0.1_f32);
1601
+ * ```
1602
+ * @param {PhotonImage} img
1603
+ * @param {number} level
1604
+ */
1605
+ export function desaturate_hsv(img, level) {
1606
+ _assertClass(img, PhotonImage);
1607
+ wasm.desaturate_hsv(img.__wbg_ptr, level);
1608
+ }
1609
+
1610
+ /**
1611
+ * Desaturate the image by a specified amount in the HSL colour space.
1612
+ *
1613
+ * # Arguments
1614
+ * * `img` - A PhotonImage.
1615
+ * * `level` - Float value from 0 to 1 representing the level to which to desaturate the image by.
1616
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1617
+ * Desaturating by 80% would be represented by a `level` of 0.8
1618
+ *
1619
+ * # Example
1620
+ * ```no_run
1621
+ * // For example to desaturate an image by 10% in the LCh colour space:
1622
+ * use photon_rs::colour_spaces::desaturate_hsl;
1623
+ * use photon_rs::native::open_image;
1624
+ *
1625
+ * // Open the image. A PhotonImage is returned.
1626
+ * let mut img = open_image("img.jpg").expect("File should open");
1627
+ * desaturate_hsl(&mut img, 0.1_f32);
1628
+ * ```
1629
+ * @param {PhotonImage} img
1630
+ * @param {number} level
1631
+ */
1632
+ export function desaturate_hsl(img, level) {
1633
+ _assertClass(img, PhotonImage);
1634
+ wasm.desaturate_hsl(img.__wbg_ptr, level);
1635
+ }
1636
+
1637
+ /**
1638
+ * Desaturate the image by a specified amount in the LCh colour space.
1639
+ *
1640
+ * # Arguments
1641
+ * * `img` - A PhotonImage.
1642
+ * * `level` - Float value from 0 to 1 representing the level to which to desaturate the image by.
1643
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1644
+ * Desaturating by 80% would be represented by a `level` of 0.8
1645
+ *
1646
+ * # Example
1647
+ * ```no_run
1648
+ * // For example to desaturate an image by 10% in the LCh colour space:
1649
+ * use photon_rs::colour_spaces::desaturate_lch;
1650
+ * use photon_rs::native::open_image;
1651
+ *
1652
+ * // Open the image. A PhotonImage is returned.
1653
+ * let mut img = open_image("img.jpg").expect("File should open");
1654
+ * desaturate_lch(&mut img, 0.1_f32);
1655
+ * ```
1656
+ * @param {PhotonImage} img
1657
+ * @param {number} level
1658
+ */
1659
+ export function desaturate_lch(img, level) {
1660
+ _assertClass(img, PhotonImage);
1661
+ wasm.desaturate_lch(img.__wbg_ptr, level);
1662
+ }
1663
+
1664
+ /**
1665
+ * Desaturate the image by a specified amount in the HSLuv colour space.
1666
+ *
1667
+ * # Arguments
1668
+ * * `img` - A PhotonImage.
1669
+ * * `level` - Float value from 0 to 1 representing the level to which to desaturate the image by.
1670
+ * The `level` must be from 0 to 1 in floating-point, `f32` format.
1671
+ * Desaturating by 80% would be represented by a `level` of 0.8
1672
+ *
1673
+ * # Example
1674
+ * ```no_run
1675
+ * // For example to desaturate an image by 10% in the HSLuv colour space:
1676
+ * use photon_rs::colour_spaces::desaturate_hsluv;
1677
+ * use photon_rs::native::open_image;
1678
+ *
1679
+ * // Open the image. A PhotonImage is returned.
1680
+ * let mut img = open_image("img.jpg").expect("File should open");
1681
+ * desaturate_hsluv(&mut img, 0.1_f32);
1682
+ * ```
1683
+ * @param {PhotonImage} img
1684
+ * @param {number} level
1685
+ */
1686
+ export function desaturate_hsluv(img, level) {
1687
+ _assertClass(img, PhotonImage);
1688
+ wasm.desaturate_hsluv(img.__wbg_ptr, level);
1689
+ }
1690
+
1691
+ /**
1692
+ * Mix image with a single color, supporting passing `opacity`.
1693
+ * The algorithm comes from Jimp. See `function mix` and `function colorFn` at following link:
1694
+ * https://github.com/oliver-moran/jimp/blob/29679faa597228ff2f20d34c5758e4d2257065a3/packages/plugin-color/src/index.js
1695
+ * Specifically, result_value = (mix_color_value - origin_value) * opacity + origin_value =
1696
+ * mix_color_value * opacity + (1 - opacity) * origin_value for each
1697
+ * of RGB channel.
1698
+ *
1699
+ * # Arguments
1700
+ * * `photon_image` - A PhotonImage that contains a view into the image.
1701
+ * * `mix_color` - the color to be mixed in, as an RGB value.
1702
+ * * `opacity` - the opacity of color when mixed to image. Float value from 0 to 1.
1703
+ * # Example
1704
+ *
1705
+ * ```no_run
1706
+ * // For example, to mix an image with rgb (50, 255, 254) and opacity 0.4:
1707
+ * use photon_rs::Rgb;
1708
+ * use photon_rs::colour_spaces::mix_with_colour;
1709
+ * use photon_rs::native::open_image;
1710
+ *
1711
+ * let mix_colour = Rgb::new(50_u8, 255_u8, 254_u8);
1712
+ * let mut img = open_image("img.jpg").expect("File should open");
1713
+ * mix_with_colour(&mut img, mix_colour, 0.4_f32);
1714
+ * ```
1715
+ * @param {PhotonImage} photon_image
1716
+ * @param {Rgb} mix_colour
1717
+ * @param {number} opacity
1718
+ */
1719
+ export function mix_with_colour(photon_image, mix_colour, opacity) {
1720
+ _assertClass(photon_image, PhotonImage);
1721
+ _assertClass(mix_colour, Rgb);
1722
+ var ptr0 = mix_colour.__destroy_into_raw();
1723
+ wasm.mix_with_colour(photon_image.__wbg_ptr, ptr0, opacity);
1724
+ }
1725
+
1726
+ /**
1727
+ * Noise reduction.
1728
+ *
1729
+ * # Arguments
1730
+ * * `img` - A PhotonImage.
1731
+ *
1732
+ * # Example
1733
+ *
1734
+ * ```no_run
1735
+ * // For example, to noise reduct an image:
1736
+ * use photon_rs::conv::noise_reduction;
1737
+ * use photon_rs::native::open_image;
1738
+ *
1739
+ * let mut img = open_image("img.jpg").expect("File should open");
1740
+ * noise_reduction(&mut img);
1741
+ * ```
1742
+ * Adds a constant to a select R, G, or B channel's value.
1743
+ * @param {PhotonImage} photon_image
1744
+ */
1745
+ export function noise_reduction(photon_image) {
1746
+ _assertClass(photon_image, PhotonImage);
1747
+ wasm.noise_reduction(photon_image.__wbg_ptr);
1748
+ }
1749
+
1750
+ /**
1751
+ * Sharpen an image.
1752
+ *
1753
+ * # Arguments
1754
+ * * `img` - A PhotonImage.
1755
+ *
1756
+ * # Example
1757
+ *
1758
+ * ```no_run
1759
+ * // For example, to sharpen an image:
1760
+ * use photon_rs::conv::sharpen;
1761
+ * use photon_rs::native::open_image;
1762
+ *
1763
+ * let mut img = open_image("img.jpg").expect("File should open");
1764
+ * sharpen(&mut img);
1765
+ * ```
1766
+ * Adds a constant to a select R, G, or B channel's value.
1767
+ * @param {PhotonImage} photon_image
1768
+ */
1769
+ export function sharpen(photon_image) {
1770
+ _assertClass(photon_image, PhotonImage);
1771
+ wasm.sharpen(photon_image.__wbg_ptr);
1772
+ }
1773
+
1774
+ /**
1775
+ * Apply edge detection to an image, to create a dark version with its edges highlighted.
1776
+ *
1777
+ * # Arguments
1778
+ * * `img` - A PhotonImage.
1779
+ *
1780
+ * # Example
1781
+ *
1782
+ * ```no_run
1783
+ * // For example, to increase the Red channel for all pixels by 10:
1784
+ * use photon_rs::conv::edge_detection;
1785
+ * use photon_rs::native::open_image;
1786
+ *
1787
+ * let mut img = open_image("img.jpg").expect("File should open");
1788
+ * edge_detection(&mut img);
1789
+ * ```
1790
+ * @param {PhotonImage} photon_image
1791
+ */
1792
+ export function edge_detection(photon_image) {
1793
+ _assertClass(photon_image, PhotonImage);
1794
+ wasm.edge_detection(photon_image.__wbg_ptr);
1795
+ }
1796
+
1797
+ /**
1798
+ * Apply an identity kernel convolution to an image.
1799
+ *
1800
+ * # Arguments
1801
+ * * `img` -A PhotonImage.
1802
+ *
1803
+ * # Example
1804
+ *
1805
+ * ```no_run
1806
+ * // For example, to apply an identity kernel convolution:
1807
+ * use photon_rs::conv::identity;
1808
+ * use photon_rs::native::open_image;
1809
+ *
1810
+ * let mut img = open_image("img.jpg").expect("File should open");
1811
+ * identity(&mut img);
1812
+ * ```
1813
+ * @param {PhotonImage} photon_image
1814
+ */
1815
+ export function identity(photon_image) {
1816
+ _assertClass(photon_image, PhotonImage);
1817
+ wasm.identity(photon_image.__wbg_ptr);
1818
+ }
1819
+
1820
+ /**
1821
+ * Apply a box blur effect.
1822
+ *
1823
+ * # Arguments
1824
+ * * `img` - A PhotonImage.
1825
+ *
1826
+ * # Example
1827
+ *
1828
+ * ```no_run
1829
+ * // For example, to apply a box blur effect:
1830
+ * use photon_rs::conv::box_blur;
1831
+ * use photon_rs::native::open_image;
1832
+ *
1833
+ * let mut img = open_image("img.jpg").expect("File should open");
1834
+ * box_blur(&mut img);
1835
+ * ```
1836
+ * @param {PhotonImage} photon_image
1837
+ */
1838
+ export function box_blur(photon_image) {
1839
+ _assertClass(photon_image, PhotonImage);
1840
+ wasm.box_blur(photon_image.__wbg_ptr);
1841
+ }
1842
+
1843
+ /**
1844
+ * Gaussian blur in linear time.
1845
+ *
1846
+ * Reference: http://blog.ivank.net/fastest-gaussian-blur.html
1847
+ *
1848
+ * # Arguments
1849
+ * * `photon_image` - A PhotonImage
1850
+ * * `radius` - blur radius
1851
+ * # Example
1852
+ *
1853
+ * ```no_run
1854
+ * use photon_rs::conv::gaussian_blur;
1855
+ * use photon_rs::native::open_image;
1856
+ *
1857
+ * let mut img = open_image("img.jpg").expect("File should open");
1858
+ * gaussian_blur(&mut img, 3_i32);
1859
+ * ```
1860
+ * @param {PhotonImage} photon_image
1861
+ * @param {number} radius
1862
+ */
1863
+ export function gaussian_blur(photon_image, radius) {
1864
+ _assertClass(photon_image, PhotonImage);
1865
+ wasm.gaussian_blur(photon_image.__wbg_ptr, radius);
1866
+ }
1867
+
1868
+ /**
1869
+ * Detect horizontal lines in an image, and highlight these only.
1870
+ *
1871
+ * # Arguments
1872
+ * * `img` - A PhotonImage.
1873
+ *
1874
+ * # Example
1875
+ *
1876
+ * ```no_run
1877
+ * // For example, to display the horizontal lines in an image:
1878
+ * use photon_rs::conv::detect_horizontal_lines;
1879
+ * use photon_rs::native::open_image;
1880
+ *
1881
+ * let mut img = open_image("img.jpg").expect("File should open");
1882
+ * detect_horizontal_lines(&mut img);
1883
+ * ```
1884
+ * @param {PhotonImage} photon_image
1885
+ */
1886
+ export function detect_horizontal_lines(photon_image) {
1887
+ _assertClass(photon_image, PhotonImage);
1888
+ wasm.detect_horizontal_lines(photon_image.__wbg_ptr);
1889
+ }
1890
+
1891
+ /**
1892
+ * Detect vertical lines in an image, and highlight these only.
1893
+ *
1894
+ * # Arguments
1895
+ * * `img` - A PhotonImage.
1896
+ *
1897
+ * # Example
1898
+ *
1899
+ * ```no_run
1900
+ * // For example, to display the vertical lines in an image:
1901
+ * use photon_rs::conv::detect_vertical_lines;
1902
+ * use photon_rs::native::open_image;
1903
+ *
1904
+ * let mut img = open_image("img.jpg").expect("File should open");
1905
+ * detect_vertical_lines(&mut img);
1906
+ * ```
1907
+ * @param {PhotonImage} photon_image
1908
+ */
1909
+ export function detect_vertical_lines(photon_image) {
1910
+ _assertClass(photon_image, PhotonImage);
1911
+ wasm.detect_vertical_lines(photon_image.__wbg_ptr);
1912
+ }
1913
+
1914
+ /**
1915
+ * Detect lines at a forty five degree angle in an image, and highlight these only.
1916
+ *
1917
+ * # Arguments
1918
+ * * `img` - A PhotonImage.
1919
+ *
1920
+ * # Example
1921
+ *
1922
+ * ```no_run
1923
+ * // For example, to display the lines at a forty five degree angle in an image:
1924
+ * use photon_rs::conv::detect_45_deg_lines;
1925
+ * use photon_rs::native::open_image;
1926
+ *
1927
+ * let mut img = open_image("img.jpg").expect("File should open");
1928
+ * detect_45_deg_lines(&mut img);
1929
+ * ```
1930
+ * @param {PhotonImage} photon_image
1931
+ */
1932
+ export function detect_45_deg_lines(photon_image) {
1933
+ _assertClass(photon_image, PhotonImage);
1934
+ wasm.detect_45_deg_lines(photon_image.__wbg_ptr);
1935
+ }
1936
+
1937
+ /**
1938
+ * Detect lines at a 135 degree angle in an image, and highlight these only.
1939
+ *
1940
+ * # Arguments
1941
+ * * `img` - A PhotonImage.
1942
+ *
1943
+ * # Example
1944
+ *
1945
+ * ```no_run
1946
+ * // For example, to display the lines at a 135 degree angle in an image:
1947
+ * use photon_rs::conv::detect_135_deg_lines;
1948
+ * use photon_rs::native::open_image;
1949
+ *
1950
+ * let mut img = open_image("img.jpg").expect("File should open");
1951
+ * detect_135_deg_lines(&mut img);
1952
+ * ```
1953
+ * @param {PhotonImage} photon_image
1954
+ */
1955
+ export function detect_135_deg_lines(photon_image) {
1956
+ _assertClass(photon_image, PhotonImage);
1957
+ wasm.detect_135_deg_lines(photon_image.__wbg_ptr);
1958
+ }
1959
+
1960
+ /**
1961
+ * Apply a standard laplace convolution.
1962
+ *
1963
+ * # Arguments
1964
+ * * `img` - A PhotonImage.
1965
+ *
1966
+ * # Example
1967
+ *
1968
+ * ```no_run
1969
+ * // For example, to apply a laplace effect:
1970
+ * use photon_rs::conv::laplace;
1971
+ * use photon_rs::native::open_image;
1972
+ *
1973
+ * let mut img = open_image("img.jpg").expect("File should open");
1974
+ * laplace(&mut img);
1975
+ * ```
1976
+ * @param {PhotonImage} photon_image
1977
+ */
1978
+ export function laplace(photon_image) {
1979
+ _assertClass(photon_image, PhotonImage);
1980
+ wasm.laplace(photon_image.__wbg_ptr);
1981
+ }
1982
+
1983
+ /**
1984
+ * Preset edge effect.
1985
+ *
1986
+ * # Arguments
1987
+ * * `img` - A PhotonImage.
1988
+ *
1989
+ * # Example
1990
+ *
1991
+ * ```no_run
1992
+ * // For example, to apply this effect:
1993
+ * use photon_rs::conv::edge_one;
1994
+ * use photon_rs::native::open_image;
1995
+ *
1996
+ * let mut img = open_image("img.jpg").expect("File should open");
1997
+ * edge_one(&mut img);
1998
+ * ```
1999
+ * @param {PhotonImage} photon_image
2000
+ */
2001
+ export function edge_one(photon_image) {
2002
+ _assertClass(photon_image, PhotonImage);
2003
+ wasm.edge_one(photon_image.__wbg_ptr);
2004
+ }
2005
+
2006
+ /**
2007
+ * Apply an emboss effect to an image.
2008
+ *
2009
+ * # Arguments
2010
+ * * `img` - A PhotonImage.
2011
+ *
2012
+ * # Example
2013
+ *
2014
+ * ```no_run
2015
+ * // For example, to apply an emboss effect:
2016
+ * use photon_rs::conv::emboss;
2017
+ * use photon_rs::native::open_image;
2018
+ *
2019
+ * let mut img = open_image("img.jpg").expect("File should open");
2020
+ * emboss(&mut img);
2021
+ * ```
2022
+ * @param {PhotonImage} photon_image
2023
+ */
2024
+ export function emboss(photon_image) {
2025
+ _assertClass(photon_image, PhotonImage);
2026
+ wasm.emboss(photon_image.__wbg_ptr);
2027
+ }
2028
+
2029
+ /**
2030
+ * Apply a horizontal Sobel filter to an image.
2031
+ *
2032
+ * # Arguments
2033
+ * * `img` - A PhotonImage.
2034
+ *
2035
+ * # Example
2036
+ *
2037
+ * ```no_run
2038
+ * // For example, to apply a horizontal Sobel filter:
2039
+ * use photon_rs::conv::sobel_horizontal;
2040
+ * use photon_rs::native::open_image;
2041
+ *
2042
+ * let mut img = open_image("img.jpg").expect("File should open");
2043
+ * sobel_horizontal(&mut img);
2044
+ * ```
2045
+ * @param {PhotonImage} photon_image
2046
+ */
2047
+ export function sobel_horizontal(photon_image) {
2048
+ _assertClass(photon_image, PhotonImage);
2049
+ wasm.sobel_horizontal(photon_image.__wbg_ptr);
2050
+ }
2051
+
2052
+ /**
2053
+ * Apply a horizontal Prewitt convolution to an image.
2054
+ *
2055
+ * # Arguments
2056
+ * * `img` - A PhotonImage.
2057
+ *
2058
+ * # Example
2059
+ *
2060
+ * ```no_run
2061
+ * // For example, to apply a horizontal Prewitt convolution effect:
2062
+ * use photon_rs::conv::prewitt_horizontal;
2063
+ * use photon_rs::native::open_image;
2064
+ *
2065
+ * let mut img = open_image("img.jpg").expect("File should open");
2066
+ * prewitt_horizontal(&mut img);
2067
+ * ```
2068
+ * @param {PhotonImage} photon_image
2069
+ */
2070
+ export function prewitt_horizontal(photon_image) {
2071
+ _assertClass(photon_image, PhotonImage);
2072
+ wasm.prewitt_horizontal(photon_image.__wbg_ptr);
2073
+ }
2074
+
2075
+ /**
2076
+ * Apply a vertical Sobel filter to an image.
2077
+ *
2078
+ * # Arguments
2079
+ * * `img` - A PhotonImage.
2080
+ *
2081
+ * # Example
2082
+ *
2083
+ * ```no_run
2084
+ * // For example, to apply a vertical Sobel filter:
2085
+ * use photon_rs::conv::sobel_vertical;
2086
+ * use photon_rs::native::open_image;
2087
+ *
2088
+ * let mut img = open_image("img.jpg").expect("File should open");
2089
+ * sobel_vertical(&mut img);
2090
+ * ```
2091
+ * @param {PhotonImage} photon_image
2092
+ */
2093
+ export function sobel_vertical(photon_image) {
2094
+ _assertClass(photon_image, PhotonImage);
2095
+ wasm.sobel_vertical(photon_image.__wbg_ptr);
2096
+ }
2097
+
2098
+ /**
2099
+ * Apply a global Sobel filter to an image
2100
+ *
2101
+ * Each pixel is calculated as the magnitude of the horizontal and vertical components of the Sobel filter,
2102
+ * ie if X is the horizontal sobel and Y is the vertical, for each pixel, we calculate sqrt(X^2 + Y^2)
2103
+ *
2104
+ * # Arguments
2105
+ * * `img` - A PhotonImage.
2106
+ *
2107
+ * # Example
2108
+ *
2109
+ * ```no_run
2110
+ * // For example, to apply a global Sobel filter:
2111
+ * use photon_rs::conv::sobel_global;
2112
+ * use photon_rs::native::open_image;
2113
+ *
2114
+ * let mut img = open_image("img.jpg").expect("File should open");
2115
+ * sobel_global(&mut img);
2116
+ * ```
2117
+ * @param {PhotonImage} photon_image
2118
+ */
2119
+ export function sobel_global(photon_image) {
2120
+ _assertClass(photon_image, PhotonImage);
2121
+ wasm.sobel_global(photon_image.__wbg_ptr);
2122
+ }
2123
+
2124
+ /**
2125
+ * Add randomized noise to an image.
2126
+ * This function adds a Gaussian Noise Sample to each pixel through incrementing each channel by a randomized offset.
2127
+ * This randomized offset is generated by creating a randomized thread pool.
2128
+ * **[WASM SUPPORT IS AVAILABLE]**: Randomized thread pools cannot be created with WASM, but
2129
+ * a workaround using js_sys::Math::random works now.
2130
+ * # Arguments
2131
+ * * `img` - A PhotonImage.
2132
+ *
2133
+ * # Example
2134
+ *
2135
+ * ```no_run
2136
+ * // For example:
2137
+ * use photon_rs::native::open_image;
2138
+ * use photon_rs::noise::add_noise_rand;
2139
+ * use photon_rs::PhotonImage;
2140
+ *
2141
+ * let mut img = open_image("img.jpg").expect("File should open");
2142
+ * add_noise_rand(&mut img);
2143
+ * ```
2144
+ * @param {PhotonImage} photon_image
2145
+ */
2146
+ export function add_noise_rand(photon_image) {
2147
+ _assertClass(photon_image, PhotonImage);
2148
+ wasm.add_noise_rand(photon_image.__wbg_ptr);
2149
+ }
2150
+
2151
+ /**
2152
+ * Add pink-tinted noise to an image.
2153
+ *
2154
+ * **[WASM SUPPORT IS AVAILABLE]**: Randomized thread pools cannot be created with WASM, but
2155
+ * a workaround using js_sys::Math::random works now.
2156
+ * # Arguments
2157
+ * * `name` - A PhotonImage that contains a view into the image.
2158
+ *
2159
+ * # Example
2160
+ *
2161
+ * ```no_run
2162
+ * // For example, to add pink-tinted noise to an image:
2163
+ * use photon_rs::native::open_image;
2164
+ * use photon_rs::noise::pink_noise;
2165
+ *
2166
+ * let mut img = open_image("img.jpg").expect("File should open");
2167
+ * pink_noise(&mut img);
2168
+ * ```
2169
+ * @param {PhotonImage} photon_image
2170
+ */
2171
+ export function pink_noise(photon_image) {
2172
+ _assertClass(photon_image, PhotonImage);
2173
+ wasm.pink_noise(photon_image.__wbg_ptr);
2174
+ }
2175
+
2176
+ /**
2177
+ * Add a watermark to an image.
2178
+ *
2179
+ * # Arguments
2180
+ * * `img` - A DynamicImage that contains a view into the image.
2181
+ * * `watermark` - The watermark to be placed onto the `img` image.
2182
+ * * `x` - The x coordinate where the watermark's top corner should be positioned.
2183
+ * * `y` - The y coordinate where the watermark's top corner should be positioned.
2184
+ * # Example
2185
+ *
2186
+ * ```no_run
2187
+ * // For example, to add a watermark to an image at x: 30, y: 40:
2188
+ * use photon_rs::multiple::watermark;
2189
+ * use photon_rs::native::open_image;
2190
+ *
2191
+ * let mut img = open_image("img.jpg").expect("File should open");
2192
+ * let water_mark = open_image("watermark.jpg").expect("File should open");
2193
+ * watermark(&mut img, &water_mark, 30_i64, 40_i64);
2194
+ * ```
2195
+ * @param {PhotonImage} img
2196
+ * @param {PhotonImage} watermark
2197
+ * @param {bigint} x
2198
+ * @param {bigint} y
2199
+ */
2200
+ export function watermark(img, watermark, x, y) {
2201
+ _assertClass(img, PhotonImage);
2202
+ _assertClass(watermark, PhotonImage);
2203
+ wasm.watermark(img.__wbg_ptr, watermark.__wbg_ptr, x, y);
2204
+ }
2205
+
2206
+ /**
2207
+ * Blend two images together.
2208
+ *
2209
+ * The `blend_mode` (3rd param) determines which blending mode to use; change this for varying effects.
2210
+ * The blend modes available include: `overlay`, `over`, `atop`, `xor`, `plus`, `multiply`, `burn`,
2211
+ * `difference`, `soft_light`, `screen`, `hard_light`, `dodge`, `exclusion`, `lighten`, `darken` (more to come)
2212
+ * NOTE: The first image must be smaller than the second image passed as params.
2213
+ * If the first image were larger than the second, then there would be overflowing pixels which would have no corresponding pixels
2214
+ * in the second image.
2215
+ * # Arguments
2216
+ * * `img` - A DynamicImage that contains a view into the image.
2217
+ * * `img2` - The 2nd DynamicImage to be blended with the first.
2218
+ * * `blend_mode` - The blending mode to use. See above for complete list of blend modes available.
2219
+ * # Example
2220
+ *
2221
+ * ```no_run
2222
+ * // For example, to blend two images with the `multiply` blend mode:
2223
+ * use photon_rs::multiple::blend;
2224
+ * use photon_rs::native::open_image;
2225
+ *
2226
+ * let mut img = open_image("img.jpg").expect("File should open");
2227
+ * let img2 = open_image("img2.jpg").expect("File should open");
2228
+ * blend(&mut img, &img2, "multiply");
2229
+ * ```
2230
+ * @param {PhotonImage} photon_image
2231
+ * @param {PhotonImage} photon_image2
2232
+ * @param {string} blend_mode
2233
+ */
2234
+ export function blend(photon_image, photon_image2, blend_mode) {
2235
+ _assertClass(photon_image, PhotonImage);
2236
+ _assertClass(photon_image2, PhotonImage);
2237
+ const ptr0 = passStringToWasm0(blend_mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2238
+ const len0 = WASM_VECTOR_LEN;
2239
+ wasm.blend(photon_image.__wbg_ptr, photon_image2.__wbg_ptr, ptr0, len0);
2240
+ }
2241
+
2242
+ /**
2243
+ * @param {number} width
2244
+ * @param {number} height
2245
+ * @returns {PhotonImage}
2246
+ */
2247
+ export function create_gradient(width, height) {
2248
+ const ret = wasm.create_gradient(width, height);
2249
+ return PhotonImage.__wrap(ret);
2250
+ }
2251
+
2252
+ /**
2253
+ * Apply a gradient to an image.
2254
+ * @param {PhotonImage} image
2255
+ */
2256
+ export function apply_gradient(image) {
2257
+ _assertClass(image, PhotonImage);
2258
+ wasm.apply_gradient(image.__wbg_ptr);
2259
+ }
2260
+
2261
+ /**
2262
+ * Solarization on the Blue channel.
2263
+ *
2264
+ * # Arguments
2265
+ * * `img` - A PhotonImage.
2266
+ * # Example
2267
+ *
2268
+ * ```no_run
2269
+ * use photon_rs::filters::neue;
2270
+ * use photon_rs::native::open_image;
2271
+ *
2272
+ * let mut img = open_image("img.jpg").expect("File should open");
2273
+ * neue(&mut img);
2274
+ * ```
2275
+ * @param {PhotonImage} photon_image
2276
+ */
2277
+ export function neue(photon_image) {
2278
+ _assertClass(photon_image, PhotonImage);
2279
+ wasm.neue(photon_image.__wbg_ptr);
2280
+ }
2281
+
2282
+ /**
2283
+ * Solarization on the Red and Green channels.
2284
+ *
2285
+ * # Arguments
2286
+ * * `img` - A PhotonImage.
2287
+ * # Example
2288
+ *
2289
+ * ```no_run
2290
+ * use photon_rs::filters::lix;
2291
+ * use photon_rs::native::open_image;
2292
+ *
2293
+ * let mut img = open_image("img.jpg").expect("File should open");
2294
+ * lix(&mut img);
2295
+ * ```
2296
+ * @param {PhotonImage} photon_image
2297
+ */
2298
+ export function lix(photon_image) {
2299
+ _assertClass(photon_image, PhotonImage);
2300
+ wasm.lix(photon_image.__wbg_ptr);
2301
+ }
2302
+
2303
+ /**
2304
+ * Solarization on the Red and Blue channels.
2305
+ *
2306
+ * # Arguments
2307
+ * * `img` - A PhotonImage.
2308
+ * # Example
2309
+ *
2310
+ * ```no_run
2311
+ * use photon_rs::filters::ryo;
2312
+ * use photon_rs::native::open_image;
2313
+ *
2314
+ * let mut img = open_image("img.jpg").expect("File should open");
2315
+ * ryo(&mut img);
2316
+ * ```
2317
+ * @param {PhotonImage} photon_image
2318
+ */
2319
+ export function ryo(photon_image) {
2320
+ _assertClass(photon_image, PhotonImage);
2321
+ wasm.ryo(photon_image.__wbg_ptr);
2322
+ }
2323
+
2324
+ /**
2325
+ * Apply a filter to an image. Over 20 filters are available.
2326
+ * The filters are as follows:
2327
+ * * **oceanic**: Add an aquamarine-tinted hue to an image.
2328
+ * * **islands**: Aquamarine tint.
2329
+ * * **marine**: Add a green/blue mixed hue to an image.
2330
+ * * **seagreen**: Dark green hue, with tones of blue.
2331
+ * * **flagblue**: Royal blue tint
2332
+ * * **liquid**: Blue-inspired tint.
2333
+ * * **diamante**: Custom filter with a blue/turquoise tint.
2334
+ * * **radio**: Fallout-style radio effect.
2335
+ * * **twenties**: Slight-blue tinted historical effect.
2336
+ * * **rosetint**: Rose-tinted filter.
2337
+ * * **mauve**: Purple-infused filter.
2338
+ * * **bluechrome**: Blue monochrome effect.
2339
+ * * **vintage**: Vintage filter with a red tint.
2340
+ * * **perfume**: Increase the blue channel, with moderate increases in the Red and Green channels.
2341
+ * * **serenity**: Custom filter with an increase in the Blue channel's values.
2342
+ * # Arguments
2343
+ * * `img` - A PhotonImage.
2344
+ * * `filter_name` - The filter's name. Choose from the selection above, eg: "oceanic"
2345
+ * # Example
2346
+ *
2347
+ * ```no_run
2348
+ * // For example, to add a filter called "vintage" to an image:
2349
+ * use photon_rs::filters::filter;
2350
+ * use photon_rs::native::open_image;
2351
+ *
2352
+ * let mut img = open_image("img.jpg").expect("File should open");
2353
+ * filter(&mut img, "vintage");
2354
+ * ```
2355
+ * @param {PhotonImage} img
2356
+ * @param {string} filter_name
2357
+ */
2358
+ export function filter(img, filter_name) {
2359
+ _assertClass(img, PhotonImage);
2360
+ const ptr0 = passStringToWasm0(filter_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2361
+ const len0 = WASM_VECTOR_LEN;
2362
+ wasm.filter(img.__wbg_ptr, ptr0, len0);
2363
+ }
2364
+
2365
+ /**
2366
+ * Apply a lofi effect to an image.
2367
+ *
2368
+ * # Arguments
2369
+ * * `img` - A PhotonImage.
2370
+ * # Example
2371
+ *
2372
+ * ```no_run
2373
+ * use photon_rs::filters::lofi;
2374
+ * use photon_rs::native::open_image;
2375
+ *
2376
+ * let mut img = open_image("img.jpg").expect("File should open");
2377
+ * lofi(&mut img);
2378
+ * ```
2379
+ * @param {PhotonImage} img
2380
+ */
2381
+ export function lofi(img) {
2382
+ _assertClass(img, PhotonImage);
2383
+ wasm.lofi(img.__wbg_ptr);
2384
+ }
2385
+
2386
+ /**
2387
+ * Apply a rose tint to an image.
2388
+ *
2389
+ * # Arguments
2390
+ * * `img` - A PhotonImage.
2391
+ * # Example
2392
+ *
2393
+ * ```no_run
2394
+ * use photon_rs::filters::pastel_pink;
2395
+ * use photon_rs::native::open_image;
2396
+ *
2397
+ * let mut img = open_image("img.jpg").expect("File should open");
2398
+ * pastel_pink(&mut img);
2399
+ * ```
2400
+ * @param {PhotonImage} img
2401
+ */
2402
+ export function pastel_pink(img) {
2403
+ _assertClass(img, PhotonImage);
2404
+ wasm.pastel_pink(img.__wbg_ptr);
2405
+ }
2406
+
2407
+ /**
2408
+ * Apply a vintage, golden hue to an image.
2409
+ *
2410
+ * # Arguments
2411
+ * * `img` - A PhotonImage.
2412
+ * # Example
2413
+ *
2414
+ * ```no_run
2415
+ * use photon_rs::filters::golden;
2416
+ * use photon_rs::native::open_image;
2417
+ *
2418
+ * let mut img = open_image("img.jpg").expect("File should open");
2419
+ * golden(&mut img);
2420
+ * ```
2421
+ * @param {PhotonImage} img
2422
+ */
2423
+ export function golden(img) {
2424
+ _assertClass(img, PhotonImage);
2425
+ wasm.golden(img.__wbg_ptr);
2426
+ }
2427
+
2428
+ /**
2429
+ * Increased contrast filter effect.
2430
+ *
2431
+ * # Arguments
2432
+ * * `img` - A PhotonImage.
2433
+ * # Example
2434
+ *
2435
+ * ```no_run
2436
+ * use photon_rs::filters::cali;
2437
+ * use photon_rs::native::open_image;
2438
+ *
2439
+ * let mut img = open_image("img.jpg").expect("File should open");
2440
+ * cali(&mut img);
2441
+ * ```
2442
+ * @param {PhotonImage} img
2443
+ */
2444
+ export function cali(img) {
2445
+ _assertClass(img, PhotonImage);
2446
+ wasm.cali(img.__wbg_ptr);
2447
+ }
2448
+
2449
+ /**
2450
+ * Greyscale effect with increased contrast.
2451
+ *
2452
+ * # Arguments
2453
+ * * `img` - A PhotonImage.
2454
+ * # Example
2455
+ *
2456
+ * ```no_run
2457
+ * use photon_rs::filters::dramatic;
2458
+ * use photon_rs::native::open_image;
2459
+ *
2460
+ * let mut img = open_image("img.jpg").expect("File should open");
2461
+ * dramatic(&mut img);
2462
+ * ```
2463
+ * @param {PhotonImage} img
2464
+ */
2465
+ export function dramatic(img) {
2466
+ _assertClass(img, PhotonImage);
2467
+ wasm.dramatic(img.__wbg_ptr);
2468
+ }
2469
+
2470
+ /**
2471
+ * Monochrome tint effect with increased contrast
2472
+ *
2473
+ * # Arguments
2474
+ * * `img` - A PhotonImage.
2475
+ * * `rgb_color` - RGB color
2476
+ * # Example
2477
+ *
2478
+ * ```no_run
2479
+ * use photon_rs::filters::monochrome_tint;
2480
+ * use photon_rs::native::open_image;
2481
+ * use photon_rs::Rgb;
2482
+ *
2483
+ * let mut img = open_image("img.jpg").expect("File should open");
2484
+ * let rgb_color = Rgb::new(12, 12, 10);
2485
+ * monochrome_tint(&mut img, rgb_color);
2486
+ * ```
2487
+ * @param {PhotonImage} img
2488
+ * @param {Rgb} rgb_color
2489
+ */
2490
+ export function monochrome_tint(img, rgb_color) {
2491
+ _assertClass(img, PhotonImage);
2492
+ _assertClass(rgb_color, Rgb);
2493
+ var ptr0 = rgb_color.__destroy_into_raw();
2494
+ wasm.monochrome_tint(img.__wbg_ptr, ptr0);
2495
+ }
2496
+
2497
+ /**
2498
+ * Duotone effect with blue and purple tones.
2499
+ *
2500
+ * # Arguments
2501
+ * * `img` - A PhotonImage.
2502
+ * # Example
2503
+ *
2504
+ * ```no_run
2505
+ * use photon_rs::filters::duotone_violette;
2506
+ * use photon_rs::native::open_image;
2507
+ *
2508
+ * let mut img = open_image("img.jpg").expect("File should open");
2509
+ * duotone_violette(&mut img);
2510
+ * ```
2511
+ * @param {PhotonImage} img
2512
+ */
2513
+ export function duotone_violette(img) {
2514
+ _assertClass(img, PhotonImage);
2515
+ wasm.duotone_violette(img.__wbg_ptr);
2516
+ }
2517
+
2518
+ /**
2519
+ * Duotone effect with purple tones.
2520
+ *
2521
+ * # Arguments
2522
+ * * `img` - A PhotonImage.
2523
+ * # Example
2524
+ *
2525
+ * ```no_run
2526
+ * use photon_rs::filters::duotone_horizon;
2527
+ * use photon_rs::native::open_image;
2528
+ *
2529
+ * let mut img = open_image("img.jpg").expect("File should open");
2530
+ * duotone_horizon(&mut img);
2531
+ * ```
2532
+ * @param {PhotonImage} img
2533
+ */
2534
+ export function duotone_horizon(img) {
2535
+ _assertClass(img, PhotonImage);
2536
+ wasm.duotone_horizon(img.__wbg_ptr);
2537
+ }
2538
+
2539
+ /**
2540
+ * A duotone filter with a user-specified color and a gray color
2541
+ *
2542
+ * # Arguments
2543
+ * * `img` - A PhotonImage.
2544
+ * * `rgb_color` - RGB color
2545
+ * # Example
2546
+ *
2547
+ * ```no_run
2548
+ * use photon_rs::filters::duotone_tint;
2549
+ * use photon_rs::native::open_image;
2550
+ * use photon_rs::Rgb;
2551
+ *
2552
+ * let mut img = open_image("img.jpg").expect("File should open");
2553
+ * let rgb_color = Rgb::new(12, 12, 10);
2554
+ * duotone_tint(&mut img, rgb_color);
2555
+ * ```
2556
+ * @param {PhotonImage} img
2557
+ * @param {Rgb} rgb_color
2558
+ */
2559
+ export function duotone_tint(img, rgb_color) {
2560
+ _assertClass(img, PhotonImage);
2561
+ _assertClass(rgb_color, Rgb);
2562
+ var ptr0 = rgb_color.__destroy_into_raw();
2563
+ wasm.duotone_tint(img.__wbg_ptr, ptr0);
2564
+ }
2565
+
2566
+ /**
2567
+ * Duotone effect with a lilac hue
2568
+ *
2569
+ * # Arguments
2570
+ * * `img` - A PhotonImage.
2571
+ * # Example
2572
+ *
2573
+ * ```no_run
2574
+ * use photon_rs::filters::duotone_lilac;
2575
+ * use photon_rs::native::open_image;
2576
+ *
2577
+ * let mut img = open_image("img.jpg").expect("File should open");
2578
+ * duotone_lilac(&mut img);
2579
+ * ```
2580
+ * @param {PhotonImage} img
2581
+ */
2582
+ export function duotone_lilac(img) {
2583
+ _assertClass(img, PhotonImage);
2584
+ wasm.duotone_lilac(img.__wbg_ptr);
2585
+ }
2586
+
2587
+ /**
2588
+ * A duotone ochre tint effect
2589
+ *
2590
+ * # Arguments
2591
+ * * `img` - A PhotonImage.
2592
+ * # Example
2593
+ *
2594
+ * ```no_run
2595
+ * use photon_rs::filters::duotone_ochre;
2596
+ * use photon_rs::native::open_image;
2597
+ *
2598
+ * let mut img = open_image("img.jpg").expect("File should open");
2599
+ * duotone_ochre(&mut img);
2600
+ * ```
2601
+ * @param {PhotonImage} img
2602
+ */
2603
+ export function duotone_ochre(img) {
2604
+ _assertClass(img, PhotonImage);
2605
+ wasm.duotone_ochre(img.__wbg_ptr);
2606
+ }
2607
+
2608
+ /**
2609
+ * Apply a red hue, with increased contrast and brightness.
2610
+ *
2611
+ * # Arguments
2612
+ * * `img` - A PhotonImage.
2613
+ * # Example
2614
+ *
2615
+ * ```no_run
2616
+ * use photon_rs::filters::firenze;
2617
+ * use photon_rs::native::open_image;
2618
+ *
2619
+ * let mut img = open_image("img.jpg").expect("File should open");
2620
+ * firenze(&mut img);
2621
+ * ```
2622
+ * @param {PhotonImage} img
2623
+ */
2624
+ export function firenze(img) {
2625
+ _assertClass(img, PhotonImage);
2626
+ wasm.firenze(img.__wbg_ptr);
2627
+ }
2628
+
2629
+ /**
2630
+ * Apply a greyscale effect with increased contrast.
2631
+ *
2632
+ * # Arguments
2633
+ * * `img` - A PhotonImage.
2634
+ * # Example
2635
+ *
2636
+ * ```no_run
2637
+ * use photon_rs::filters::obsidian;
2638
+ * use photon_rs::native::open_image;
2639
+ *
2640
+ * let mut img = open_image("img.jpg").expect("File should open");
2641
+ * obsidian(&mut img);
2642
+ * ```
2643
+ * @param {PhotonImage} img
2644
+ */
2645
+ export function obsidian(img) {
2646
+ _assertClass(img, PhotonImage);
2647
+ wasm.obsidian(img.__wbg_ptr);
2648
+ }
2649
+
2650
+ /**
2651
+ * Crop an image.
2652
+ *
2653
+ * # Arguments
2654
+ * * `img` - A PhotonImage.
2655
+ *
2656
+ * # Example
2657
+ *
2658
+ * ```no_run
2659
+ * // For example, to crop an image at (0, 0) to (500, 800)
2660
+ * use photon_rs::native::{open_image};
2661
+ * use photon_rs::transform::crop;
2662
+ * use photon_rs::PhotonImage;
2663
+ *
2664
+ * let mut img = open_image("img.jpg").expect("File should open");
2665
+ * let cropped_img: PhotonImage = crop(&img, 0_u32, 0_u32, 500_u32, 800_u32);
2666
+ * // Write the contents of this image in JPG format.
2667
+ * ```
2668
+ * @param {PhotonImage} photon_image
2669
+ * @param {number} x1
2670
+ * @param {number} y1
2671
+ * @param {number} x2
2672
+ * @param {number} y2
2673
+ * @returns {PhotonImage}
2674
+ */
2675
+ export function crop(photon_image, x1, y1, x2, y2) {
2676
+ _assertClass(photon_image, PhotonImage);
2677
+ const ret = wasm.crop(photon_image.__wbg_ptr, x1, y1, x2, y2);
2678
+ return PhotonImage.__wrap(ret);
2679
+ }
2680
+
2681
+ /**
2682
+ * @param {HTMLCanvasElement} source_canvas
2683
+ * @param {number} width
2684
+ * @param {number} height
2685
+ * @param {number} left
2686
+ * @param {number} top
2687
+ * @returns {HTMLCanvasElement}
2688
+ */
2689
+ export function crop_img_browser(source_canvas, width, height, left, top) {
2690
+ const ret = wasm.crop_img_browser(source_canvas, width, height, left, top);
2691
+ return ret;
2692
+ }
2693
+
2694
+ /**
2695
+ * Flip an image horizontally.
2696
+ *
2697
+ * # Arguments
2698
+ * * `img` - A PhotonImage.
2699
+ *
2700
+ * # Example
2701
+ *
2702
+ * ```no_run
2703
+ * // For example, to flip an image horizontally:
2704
+ * use photon_rs::native::open_image;
2705
+ * use photon_rs::transform::fliph;
2706
+ *
2707
+ * let mut img = open_image("img.jpg").expect("File should open");
2708
+ * fliph(&mut img);
2709
+ * ```
2710
+ * @param {PhotonImage} photon_image
2711
+ */
2712
+ export function fliph(photon_image) {
2713
+ _assertClass(photon_image, PhotonImage);
2714
+ wasm.fliph(photon_image.__wbg_ptr);
2715
+ }
2716
+
2717
+ /**
2718
+ * Flip an image vertically.
2719
+ *
2720
+ * # Arguments
2721
+ * * `img` - A PhotonImage.
2722
+ *
2723
+ * # Example
2724
+ *
2725
+ * ```no_run
2726
+ * // For example, to flip an image vertically:
2727
+ * use photon_rs::native::open_image;
2728
+ * use photon_rs::transform::flipv;
2729
+ *
2730
+ * let mut img = open_image("img.jpg").expect("File should open");
2731
+ * flipv(&mut img);
2732
+ * ```
2733
+ * @param {PhotonImage} photon_image
2734
+ */
2735
+ export function flipv(photon_image) {
2736
+ _assertClass(photon_image, PhotonImage);
2737
+ wasm.flipv(photon_image.__wbg_ptr);
2738
+ }
2739
+
2740
+ /**
2741
+ * Resize an image on the web.
2742
+ *
2743
+ * # Arguments
2744
+ * * `img` - A PhotonImage.
2745
+ * * `width` - New width.
2746
+ * * `height` - New height.
2747
+ * * `sampling_filter` - Nearest = 1, Triangle = 2, CatmullRom = 3, Gaussian = 4, Lanczos3 = 5
2748
+ * @param {PhotonImage} photon_img
2749
+ * @param {number} width
2750
+ * @param {number} height
2751
+ * @param {SamplingFilter} sampling_filter
2752
+ * @returns {HTMLCanvasElement}
2753
+ */
2754
+ export function resize_img_browser(photon_img, width, height, sampling_filter) {
2755
+ _assertClass(photon_img, PhotonImage);
2756
+ const ret = wasm.resize_img_browser(photon_img.__wbg_ptr, width, height, sampling_filter);
2757
+ return ret;
2758
+ }
2759
+
2760
+ /**
2761
+ * Resize an image.
2762
+ *
2763
+ * # Arguments
2764
+ * * `img` - A PhotonImage.
2765
+ * * `width` - New width.
2766
+ * * `height` - New height.
2767
+ * * `sampling_filter` - Nearest = 1, Triangle = 2, CatmullRom = 3, Gaussian = 4, Lanczos3 = 5
2768
+ * @param {PhotonImage} photon_img
2769
+ * @param {number} width
2770
+ * @param {number} height
2771
+ * @param {SamplingFilter} sampling_filter
2772
+ * @returns {PhotonImage}
2773
+ */
2774
+ export function resize(photon_img, width, height, sampling_filter) {
2775
+ _assertClass(photon_img, PhotonImage);
2776
+ const ret = wasm.resize(photon_img.__wbg_ptr, width, height, sampling_filter);
2777
+ return PhotonImage.__wrap(ret);
2778
+ }
2779
+
2780
+ /**
2781
+ * Resize image using seam carver.
2782
+ * Resize only if new dimensions are smaller, than original image.
2783
+ * # NOTE: This is still experimental feature, and pretty slow.
2784
+ *
2785
+ * # Arguments
2786
+ * * `img` - A PhotonImage.
2787
+ * * `width` - New width.
2788
+ * * `height` - New height.
2789
+ *
2790
+ * # Example
2791
+ *
2792
+ * ```no_run
2793
+ * // For example, resize image using seam carver:
2794
+ * use photon_rs::native::open_image;
2795
+ * use photon_rs::transform::seam_carve;
2796
+ * use photon_rs::PhotonImage;
2797
+ *
2798
+ * let img = open_image("img.jpg").expect("File should open");
2799
+ * let result: PhotonImage = seam_carve(&img, 100_u32, 100_u32);
2800
+ * ```
2801
+ * @param {PhotonImage} img
2802
+ * @param {number} width
2803
+ * @param {number} height
2804
+ * @returns {PhotonImage}
2805
+ */
2806
+ export function seam_carve(img, width, height) {
2807
+ _assertClass(img, PhotonImage);
2808
+ const ret = wasm.seam_carve(img.__wbg_ptr, width, height);
2809
+ return PhotonImage.__wrap(ret);
2810
+ }
2811
+
2812
+ /**
2813
+ * Shear the image along the X axis.
2814
+ * A sheared PhotonImage is returned.
2815
+ *
2816
+ * # Arguments
2817
+ * * `img` - A PhotonImage. See the PhotonImage struct for details.
2818
+ * * `shear` - Amount to shear.
2819
+ *
2820
+ * # Example
2821
+ *
2822
+ * ```no_run
2823
+ * // For example, to shear an image by 0.5:
2824
+ * use photon_rs::native::open_image;
2825
+ * use photon_rs::transform::shearx;
2826
+ *
2827
+ * let img = open_image("img.jpg").expect("File should open");
2828
+ * let sheared_img = shearx(&img, 0.5);
2829
+ * ```
2830
+ * @param {PhotonImage} photon_img
2831
+ * @param {number} shear
2832
+ * @returns {PhotonImage}
2833
+ */
2834
+ export function shearx(photon_img, shear) {
2835
+ _assertClass(photon_img, PhotonImage);
2836
+ const ret = wasm.shearx(photon_img.__wbg_ptr, shear);
2837
+ return PhotonImage.__wrap(ret);
2838
+ }
2839
+
2840
+ /**
2841
+ * Shear the image along the Y axis.
2842
+ * A sheared PhotonImage is returned.
2843
+ *
2844
+ * # Arguments
2845
+ * * `img` - A PhotonImage. See the PhotonImage struct for details.
2846
+ * * `shear` - Amount to shear.
2847
+ *
2848
+ * # Example
2849
+ *
2850
+ * ```no_run
2851
+ * // For example, to shear an image by 0.5:
2852
+ * use photon_rs::native::open_image;
2853
+ * use photon_rs::transform::sheary;
2854
+ *
2855
+ * let img = open_image("img.jpg").expect("File should open");
2856
+ * let sheared_img = sheary(&img, 0.5);
2857
+ * ```
2858
+ * @param {PhotonImage} photon_img
2859
+ * @param {number} shear
2860
+ * @returns {PhotonImage}
2861
+ */
2862
+ export function sheary(photon_img, shear) {
2863
+ _assertClass(photon_img, PhotonImage);
2864
+ const ret = wasm.sheary(photon_img.__wbg_ptr, shear);
2865
+ return PhotonImage.__wrap(ret);
2866
+ }
2867
+
2868
+ /**
2869
+ * Apply uniform padding around the PhotonImage
2870
+ * A padded PhotonImage is returned.
2871
+ * # Arguments
2872
+ * * `img` - A PhotonImage. See the PhotonImage struct for details.
2873
+ * * `padding` - The amount of padding to be applied to the PhotonImage.
2874
+ * * `padding_rgba` - Tuple containing the RGBA code for padding color.
2875
+ *
2876
+ * # Example
2877
+ *
2878
+ * ```no_run
2879
+ * // For example, to apply a padding of 10 pixels around a PhotonImage:
2880
+ * use photon_rs::transform::padding_uniform;
2881
+ * use photon_rs::native::open_image;
2882
+ * use photon_rs::Rgba;
2883
+ *
2884
+ * let mut img = open_image("img.jpg").expect("File should open");
2885
+ * let rgba = Rgba::new(200_u8, 100_u8, 150_u8, 255_u8);
2886
+ * padding_uniform(&img, 10_u32, rgba);
2887
+ * ```
2888
+ * @param {PhotonImage} img
2889
+ * @param {number} padding
2890
+ * @param {Rgba} padding_rgba
2891
+ * @returns {PhotonImage}
2892
+ */
2893
+ export function padding_uniform(img, padding, padding_rgba) {
2894
+ _assertClass(img, PhotonImage);
2895
+ _assertClass(padding_rgba, Rgba);
2896
+ var ptr0 = padding_rgba.__destroy_into_raw();
2897
+ const ret = wasm.padding_uniform(img.__wbg_ptr, padding, ptr0);
2898
+ return PhotonImage.__wrap(ret);
2899
+ }
2900
+
2901
+ /**
2902
+ * Apply padding on the left side of the PhotonImage
2903
+ * A padded PhotonImage is returned.
2904
+ * # Arguments
2905
+ * * `img` - A PhotonImage. See the PhotonImage struct for details.
2906
+ * * `padding` - The amount of padding to be applied to the PhotonImage.
2907
+ * * `padding_rgba` - Tuple containing the RGBA code for padding color.
2908
+ *
2909
+ * # Example
2910
+ *
2911
+ * ```no_run
2912
+ * // For example, to apply a padding of 10 pixels on the left side of a PhotonImage:
2913
+ * use photon_rs::transform::padding_left;
2914
+ * use photon_rs::native::open_image;
2915
+ * use photon_rs::Rgba;
2916
+ *
2917
+ * let mut img = open_image("img.jpg").expect("File should open");
2918
+ * let rgba = Rgba::new(200_u8, 100_u8, 150_u8, 255_u8);
2919
+ * padding_left(&img, 10_u32, rgba);
2920
+ * ```
2921
+ * @param {PhotonImage} img
2922
+ * @param {number} padding
2923
+ * @param {Rgba} padding_rgba
2924
+ * @returns {PhotonImage}
2925
+ */
2926
+ export function padding_left(img, padding, padding_rgba) {
2927
+ _assertClass(img, PhotonImage);
2928
+ _assertClass(padding_rgba, Rgba);
2929
+ var ptr0 = padding_rgba.__destroy_into_raw();
2930
+ const ret = wasm.padding_left(img.__wbg_ptr, padding, ptr0);
2931
+ return PhotonImage.__wrap(ret);
2932
+ }
2933
+
2934
+ /**
2935
+ * Apply padding on the left side of the PhotonImage
2936
+ * A padded PhotonImage is returned.
2937
+ * # Arguments
2938
+ * * `img` - A PhotonImage. See the PhotonImage struct for details.
2939
+ * * `padding` - The amount of padding to be applied to the PhotonImage.
2940
+ * * `padding_rgba` - Tuple containing the RGBA code for padding color.
2941
+ *
2942
+ * # Example
2943
+ *
2944
+ * ```no_run
2945
+ * // For example, to apply a padding of 10 pixels on the right side of a PhotonImage:
2946
+ * use photon_rs::transform::padding_right;
2947
+ * use photon_rs::native::open_image;
2948
+ * use photon_rs::Rgba;
2949
+ *
2950
+ * let mut img = open_image("img.jpg").expect("File should open");
2951
+ * let rgba = Rgba::new(200_u8, 100_u8, 150_u8, 255_u8);
2952
+ * padding_right(&img, 10_u32, rgba);
2953
+ * ```
2954
+ * @param {PhotonImage} img
2955
+ * @param {number} padding
2956
+ * @param {Rgba} padding_rgba
2957
+ * @returns {PhotonImage}
2958
+ */
2959
+ export function padding_right(img, padding, padding_rgba) {
2960
+ _assertClass(img, PhotonImage);
2961
+ _assertClass(padding_rgba, Rgba);
2962
+ var ptr0 = padding_rgba.__destroy_into_raw();
2963
+ const ret = wasm.padding_right(img.__wbg_ptr, padding, ptr0);
2964
+ return PhotonImage.__wrap(ret);
2965
+ }
2966
+
2967
+ /**
2968
+ * Apply padding on the left side of the PhotonImage
2969
+ * A padded PhotonImage is returned.
2970
+ * # Arguments
2971
+ * * `img` - A PhotonImage. See the PhotonImage struct for details.
2972
+ * * `padding` - The amount of padding to be applied to the PhotonImage.
2973
+ * * `padding_rgba` - Tuple containing the RGBA code for padding color.
2974
+ *
2975
+ * # Example
2976
+ *
2977
+ * ```no_run
2978
+ * // For example, to apply a padding of 10 pixels on the top of a PhotonImage:
2979
+ * use photon_rs::transform::padding_top;
2980
+ * use photon_rs::native::open_image;
2981
+ * use photon_rs::Rgba;
2982
+ *
2983
+ * let mut img = open_image("img.jpg").expect("File should open");
2984
+ * let rgba = Rgba::new(200_u8, 100_u8, 150_u8, 255_u8);
2985
+ * padding_top(&img, 10_u32, rgba);
2986
+ * ```
2987
+ * @param {PhotonImage} img
2988
+ * @param {number} padding
2989
+ * @param {Rgba} padding_rgba
2990
+ * @returns {PhotonImage}
2991
+ */
2992
+ export function padding_top(img, padding, padding_rgba) {
2993
+ _assertClass(img, PhotonImage);
2994
+ _assertClass(padding_rgba, Rgba);
2995
+ var ptr0 = padding_rgba.__destroy_into_raw();
2996
+ const ret = wasm.padding_top(img.__wbg_ptr, padding, ptr0);
2997
+ return PhotonImage.__wrap(ret);
2998
+ }
2999
+
3000
+ /**
3001
+ * Apply padding on the left side of the PhotonImage
3002
+ * A padded PhotonImage is returned.
3003
+ * # Arguments
3004
+ * * `img` - A PhotonImage. See the PhotonImage struct for details.
3005
+ * * `padding` - The amount of padding to be applied to the PhotonImage.
3006
+ * * `padding_rgba` - Tuple containing the RGBA code for padding color.
3007
+ *
3008
+ * # Example
3009
+ *
3010
+ * ```no_run
3011
+ * // For example, to apply a padding of 10 pixels on the bottom of a PhotonImage:
3012
+ * use photon_rs::transform::padding_bottom;
3013
+ * use photon_rs::native::open_image;
3014
+ * use photon_rs::Rgba;
3015
+ *
3016
+ * let mut img = open_image("img.jpg").expect("File should open");
3017
+ * let rgba = Rgba::new(200_u8, 100_u8, 150_u8, 255_u8);
3018
+ * padding_bottom(&img, 10_u32, rgba);
3019
+ * ```
3020
+ * @param {PhotonImage} img
3021
+ * @param {number} padding
3022
+ * @param {Rgba} padding_rgba
3023
+ * @returns {PhotonImage}
3024
+ */
3025
+ export function padding_bottom(img, padding, padding_rgba) {
3026
+ _assertClass(img, PhotonImage);
3027
+ _assertClass(padding_rgba, Rgba);
3028
+ var ptr0 = padding_rgba.__destroy_into_raw();
3029
+ const ret = wasm.padding_bottom(img.__wbg_ptr, padding, ptr0);
3030
+ return PhotonImage.__wrap(ret);
3031
+ }
3032
+
3033
+ /**
3034
+ * Rotate the PhotonImage on an arbitrary angle
3035
+ * A rotated PhotonImage is returned.
3036
+ *
3037
+ * # Arguments
3038
+ * * `img` - A PhotonImage. See the PhotonImage struct for details.
3039
+ * * `angle` - Rotation angle in degrees.
3040
+ *
3041
+ * # Example
3042
+ *
3043
+ * ```no_run
3044
+ * // For example, to rotate a PhotonImage by 30 degrees:
3045
+ * use photon_rs::native::open_image;
3046
+ * use photon_rs::transform::rotate;
3047
+ *
3048
+ * let img = open_image("img.jpg").expect("File should open");
3049
+ * let rotated_img = rotate(&img, 30.0);
3050
+ * ```
3051
+ * @param {PhotonImage} photon_img
3052
+ * @param {number} angle
3053
+ * @returns {PhotonImage}
3054
+ */
3055
+ export function rotate(photon_img, angle) {
3056
+ _assertClass(photon_img, PhotonImage);
3057
+ const ret = wasm.rotate(photon_img.__wbg_ptr, angle);
3058
+ return PhotonImage.__wrap(ret);
3059
+ }
3060
+
3061
+ /**
3062
+ * Resample the PhotonImage.
3063
+ *
3064
+ * # Arguments
3065
+ * * `img` - A PhotonImage. See the PhotonImage struct for details.
3066
+ * * `dst_width` - Target width.
3067
+ * * `dst_height` - Target height.
3068
+ *
3069
+ * # Example
3070
+ *
3071
+ * ```no_run
3072
+ * // For example, to resample a PhotonImage to 1920x1080 size:
3073
+ * use photon_rs::native::open_image;
3074
+ * use photon_rs::transform::resample;
3075
+ *
3076
+ * let img = open_image("img.jpg").expect("File should open");
3077
+ * let rotated_img = resample(&img, 1920, 1080);
3078
+ * ```
3079
+ * @param {PhotonImage} img
3080
+ * @param {number} dst_width
3081
+ * @param {number} dst_height
3082
+ * @returns {PhotonImage}
3083
+ */
3084
+ export function resample(img, dst_width, dst_height) {
3085
+ _assertClass(img, PhotonImage);
3086
+ const ret = wasm.resample(img.__wbg_ptr, dst_width, dst_height);
3087
+ return PhotonImage.__wrap(ret);
3088
+ }
3089
+
3090
+ /**
3091
+ * Adds an offset to the image by a certain number of pixels.
3092
+ *
3093
+ * This creates an RGB shift effect.
3094
+ *
3095
+ * # Arguments
3096
+ * * `img` - A PhotonImage that contains a view into the image.
3097
+ * * `channel_index`: The index of the channel to increment. 0 for red, 1 for green and 2 for blue.
3098
+ * * `offset` - The offset is added to the pixels in the image.
3099
+ * # Example
3100
+ *
3101
+ * ```no_run
3102
+ * // For example, to offset pixels by 30 pixels on the red channel:
3103
+ * use photon_rs::effects::offset;
3104
+ * use photon_rs::native::open_image;
3105
+ *
3106
+ * let mut img = open_image("img.jpg").expect("File should open");
3107
+ * offset(&mut img, 0_usize, 30_u32);
3108
+ * ```
3109
+ * @param {PhotonImage} photon_image
3110
+ * @param {number} channel_index
3111
+ * @param {number} offset
3112
+ */
3113
+ export function offset(photon_image, channel_index, offset) {
3114
+ _assertClass(photon_image, PhotonImage);
3115
+ wasm.offset(photon_image.__wbg_ptr, channel_index, offset);
3116
+ }
3117
+
3118
+ /**
3119
+ * Adds an offset to the red channel by a certain number of pixels.
3120
+ *
3121
+ * # Arguments
3122
+ * * `img` - A PhotonImage that contains a view into the image.
3123
+ * * `offset` - The offset you want to move the red channel by.
3124
+ * # Example
3125
+ *
3126
+ * ```no_run
3127
+ * // For example, to add an offset to the red channel by 30 pixels.
3128
+ * use photon_rs::effects::offset_red;
3129
+ * use photon_rs::native::open_image;
3130
+ *
3131
+ * let mut img = open_image("img.jpg").expect("File should open");
3132
+ * offset_red(&mut img, 30_u32);
3133
+ * ```
3134
+ * @param {PhotonImage} img
3135
+ * @param {number} offset_amt
3136
+ */
3137
+ export function offset_red(img, offset_amt) {
3138
+ _assertClass(img, PhotonImage);
3139
+ wasm.offset_red(img.__wbg_ptr, offset_amt);
3140
+ }
3141
+
3142
+ /**
3143
+ * Adds an offset to the green channel by a certain number of pixels.
3144
+ *
3145
+ * # Arguments
3146
+ * * `img` - A PhotonImage that contains a view into the image.
3147
+ * * `offset` - The offset you want to move the green channel by.
3148
+ * # Example
3149
+ *
3150
+ * ```no_run
3151
+ * // For example, to add an offset to the green channel by 30 pixels.
3152
+ * use photon_rs::effects::offset_green;
3153
+ * use photon_rs::native::open_image;
3154
+ *
3155
+ * let mut img = open_image("img.jpg").expect("File should open");
3156
+ * offset_green(&mut img, 30_u32);
3157
+ * ```
3158
+ * @param {PhotonImage} img
3159
+ * @param {number} offset_amt
3160
+ */
3161
+ export function offset_green(img, offset_amt) {
3162
+ _assertClass(img, PhotonImage);
3163
+ wasm.offset_green(img.__wbg_ptr, offset_amt);
3164
+ }
3165
+
3166
+ /**
3167
+ * Adds an offset to the blue channel by a certain number of pixels.
3168
+ *
3169
+ * # Arguments
3170
+ * * `img` - A PhotonImage that contains a view into the image.
3171
+ * * `offset_amt` - The offset you want to move the blue channel by.
3172
+ * # Example
3173
+ * // For example, to add an offset to the green channel by 40 pixels.
3174
+ *
3175
+ * ```no_run
3176
+ * use photon_rs::effects::offset_blue;
3177
+ * use photon_rs::native::open_image;
3178
+ *
3179
+ * let mut img = open_image("img.jpg").expect("File should open");
3180
+ * offset_blue(&mut img, 40_u32);
3181
+ * ```
3182
+ * @param {PhotonImage} img
3183
+ * @param {number} offset_amt
3184
+ */
3185
+ export function offset_blue(img, offset_amt) {
3186
+ _assertClass(img, PhotonImage);
3187
+ wasm.offset_blue(img.__wbg_ptr, offset_amt);
3188
+ }
3189
+
3190
+ /**
3191
+ * Adds multiple offsets to the image by a certain number of pixels (on two channels).
3192
+ *
3193
+ * # Arguments
3194
+ * * `img` - A PhotonImage that contains a view into the image.
3195
+ * * `offset` - The offset is added to the pixels in the image.
3196
+ * # Example
3197
+ *
3198
+ * ```no_run
3199
+ * // For example, to add a 30-pixel offset to both the red and blue channels:
3200
+ * use photon_rs::effects::multiple_offsets;
3201
+ * use photon_rs::native::open_image;
3202
+ *
3203
+ * let mut img = open_image("img.jpg").expect("File should open");
3204
+ * multiple_offsets(&mut img, 30_u32, 0_usize, 2_usize);
3205
+ * ```
3206
+ * @param {PhotonImage} photon_image
3207
+ * @param {number} offset
3208
+ * @param {number} channel_index
3209
+ * @param {number} channel_index2
3210
+ */
3211
+ export function multiple_offsets(photon_image, offset, channel_index, channel_index2) {
3212
+ _assertClass(photon_image, PhotonImage);
3213
+ wasm.multiple_offsets(photon_image.__wbg_ptr, offset, channel_index, channel_index2);
3214
+ }
3215
+
3216
+ /**
3217
+ * Halftoning effect.
3218
+ *
3219
+ * # Arguments
3220
+ * * `img` - A PhotonImage that contains a view into the image.
3221
+ * # Example
3222
+ *
3223
+ * ```no_run
3224
+ * // For example:
3225
+ * use photon_rs::effects::halftone;
3226
+ * use photon_rs::native::open_image;
3227
+ *
3228
+ * let mut img = open_image("img.jpg").expect("File should open");
3229
+ * halftone(&mut img);
3230
+ * ```
3231
+ * @param {PhotonImage} photon_image
3232
+ */
3233
+ export function halftone(photon_image) {
3234
+ _assertClass(photon_image, PhotonImage);
3235
+ wasm.halftone(photon_image.__wbg_ptr);
3236
+ }
3237
+
3238
+ /**
3239
+ * Reduces an image to the primary colours.
3240
+ *
3241
+ * # Arguments
3242
+ * * `img` - A PhotonImage that contains a view into the image.
3243
+ * # Example
3244
+ *
3245
+ * ```no_run
3246
+ * // For example, to add a primary colour effect to an image of type `DynamicImage`:
3247
+ * use photon_rs::effects::primary;
3248
+ * use photon_rs::native::open_image;
3249
+ *
3250
+ * let mut img = open_image("img.jpg").expect("File should open");
3251
+ * primary(&mut img);
3252
+ * ```
3253
+ * @param {PhotonImage} img
3254
+ */
3255
+ export function primary(img) {
3256
+ _assertClass(img, PhotonImage);
3257
+ wasm.primary(img.__wbg_ptr);
3258
+ }
3259
+
3260
+ /**
3261
+ * Colorizes the green channels of the image.
3262
+ *
3263
+ * # Arguments
3264
+ * * `img` - A PhotonImage that contains a view into the image.
3265
+ * # Example
3266
+ *
3267
+ * ```no_run
3268
+ * // For example, to colorize an image of type `PhotonImage`:
3269
+ * use photon_rs::effects::colorize;
3270
+ * use photon_rs::native::open_image;
3271
+ *
3272
+ * let mut img = open_image("img.jpg").expect("File should open");
3273
+ * colorize(&mut img);
3274
+ * ```
3275
+ * @param {PhotonImage} photon_image
3276
+ */
3277
+ export function colorize(photon_image) {
3278
+ _assertClass(photon_image, PhotonImage);
3279
+ wasm.colorize(photon_image.__wbg_ptr);
3280
+ }
3281
+
3282
+ /**
3283
+ * Applies a solarizing effect to an image.
3284
+ *
3285
+ * # Arguments
3286
+ * * `img` - A PhotonImage that contains a view into the image.
3287
+ * # Example
3288
+ *
3289
+ * ```no_run
3290
+ * // For example, to colorize an image of type `PhotonImage`:
3291
+ * use photon_rs::effects::solarize;
3292
+ * use photon_rs::native::open_image;
3293
+ *
3294
+ * let mut img = open_image("img.jpg").expect("File should open");
3295
+ * solarize(&mut img);
3296
+ * ```
3297
+ * @param {PhotonImage} photon_image
3298
+ */
3299
+ export function solarize(photon_image) {
3300
+ _assertClass(photon_image, PhotonImage);
3301
+ wasm.solarize(photon_image.__wbg_ptr);
3302
+ }
3303
+
3304
+ /**
3305
+ * Applies a solarizing effect to an image and returns the resulting PhotonImage.
3306
+ *
3307
+ * # Arguments
3308
+ * * `img` - A PhotonImage that contains a view into the image.
3309
+ * # Example
3310
+ *
3311
+ * ```no_run
3312
+ * // For example, to solarize "retimg" an image of type `PhotonImage`:
3313
+ * use photon_rs::effects::solarize_retimg;
3314
+ * use photon_rs::native::open_image;
3315
+ * use photon_rs::PhotonImage;
3316
+ *
3317
+ * let img = open_image("img.jpg").expect("File should open");
3318
+ * let result: PhotonImage = solarize_retimg(&img);
3319
+ * ```
3320
+ * @param {PhotonImage} photon_image
3321
+ * @returns {PhotonImage}
3322
+ */
3323
+ export function solarize_retimg(photon_image) {
3324
+ _assertClass(photon_image, PhotonImage);
3325
+ const ret = wasm.solarize_retimg(photon_image.__wbg_ptr);
3326
+ return PhotonImage.__wrap(ret);
3327
+ }
3328
+
3329
+ /**
3330
+ * Adjust the brightness of an image by a factor.
3331
+ *
3332
+ * # Arguments
3333
+ * * `img` - A PhotonImage that contains a view into the image.
3334
+ * * `brightness` - A u8 to add or subtract to the brightness. To increase
3335
+ * the brightness, pass a positive number (up to 255). To decrease the brightness,
3336
+ * pass a negative number instead.
3337
+ * # Example
3338
+ *
3339
+ * ```no_run
3340
+ * use photon_rs::effects::adjust_brightness;
3341
+ * use photon_rs::native::open_image;
3342
+ *
3343
+ * let mut img = open_image("img.jpg").expect("File should open");
3344
+ * adjust_brightness(&mut img, 10_i16);
3345
+ * ```
3346
+ * @param {PhotonImage} photon_image
3347
+ * @param {number} brightness
3348
+ */
3349
+ export function adjust_brightness(photon_image, brightness) {
3350
+ _assertClass(photon_image, PhotonImage);
3351
+ wasm.adjust_brightness(photon_image.__wbg_ptr, brightness);
3352
+ }
3353
+
3354
+ /**
3355
+ * Increase the brightness of an image by a constant.
3356
+ *
3357
+ * # Arguments
3358
+ * * `img` - A PhotonImage that contains a view into the image.
3359
+ * * `brightness` - A u8 to add to the brightness.
3360
+ * # Example
3361
+ *
3362
+ * ```no_run
3363
+ * use photon_rs::effects::inc_brightness;
3364
+ * use photon_rs::native::open_image;
3365
+ *
3366
+ * let mut img = open_image("img.jpg").expect("File should open");
3367
+ * inc_brightness(&mut img, 10_u8);
3368
+ * ```
3369
+ * @param {PhotonImage} photon_image
3370
+ * @param {number} brightness
3371
+ */
3372
+ export function inc_brightness(photon_image, brightness) {
3373
+ _assertClass(photon_image, PhotonImage);
3374
+ wasm.inc_brightness(photon_image.__wbg_ptr, brightness);
3375
+ }
3376
+
3377
+ /**
3378
+ * Decrease the brightness of an image by a constant.
3379
+ *
3380
+ * # Arguments
3381
+ * * `img` - A PhotonImage that contains a view into the image.
3382
+ * * `brightness` - A u8 to subtract from the brightness. It should be a positive number,
3383
+ * and this value will then be subtracted from the brightness.
3384
+ * # Example
3385
+ *
3386
+ * ```no_run
3387
+ * use photon_rs::effects::dec_brightness;
3388
+ * use photon_rs::native::open_image;
3389
+ *
3390
+ * let mut img = open_image("img.jpg").expect("File should open");
3391
+ * dec_brightness(&mut img, 10_u8);
3392
+ * ```
3393
+ * @param {PhotonImage} photon_image
3394
+ * @param {number} brightness
3395
+ */
3396
+ export function dec_brightness(photon_image, brightness) {
3397
+ _assertClass(photon_image, PhotonImage);
3398
+ wasm.dec_brightness(photon_image.__wbg_ptr, brightness);
3399
+ }
3400
+
3401
+ /**
3402
+ * Adjust the contrast of an image by a factor.
3403
+ *
3404
+ * # Arguments
3405
+ * * `photon_image` - A PhotonImage that contains a view into the image.
3406
+ * * `contrast` - An f32 factor used to adjust contrast. Between [-255.0, 255.0]. The algorithm will
3407
+ * clamp results if passed factor is out of range.
3408
+ * # Example
3409
+ *
3410
+ * ```no_run
3411
+ * use photon_rs::effects::adjust_contrast;
3412
+ * use photon_rs::native::open_image;
3413
+ *
3414
+ * let mut img = open_image("img.jpg").expect("File should open");
3415
+ * adjust_contrast(&mut img, 30_f32);
3416
+ * ```
3417
+ * @param {PhotonImage} photon_image
3418
+ * @param {number} contrast
3419
+ */
3420
+ export function adjust_contrast(photon_image, contrast) {
3421
+ _assertClass(photon_image, PhotonImage);
3422
+ wasm.adjust_contrast(photon_image.__wbg_ptr, contrast);
3423
+ }
3424
+
3425
+ /**
3426
+ * Tint an image by adding an offset to averaged RGB channel values.
3427
+ *
3428
+ * # Arguments
3429
+ * * `img` - A PhotonImage that contains a view into the image.
3430
+ * * `r_offset` - The amount the R channel should be incremented by.
3431
+ * * `g_offset` - The amount the G channel should be incremented by.
3432
+ * * `b_offset` - The amount the B channel should be incremented by.
3433
+ * # Example
3434
+ *
3435
+ * ```no_run
3436
+ * // For example, to tint an image of type `PhotonImage`:
3437
+ * use photon_rs::effects::tint;
3438
+ * use photon_rs::native::open_image;
3439
+ *
3440
+ * let mut img = open_image("img.jpg").expect("File should open");
3441
+ * tint(&mut img, 10_u32, 20_u32, 15_u32);
3442
+ * ```
3443
+ * @param {PhotonImage} photon_image
3444
+ * @param {number} r_offset
3445
+ * @param {number} g_offset
3446
+ * @param {number} b_offset
3447
+ */
3448
+ export function tint(photon_image, r_offset, g_offset, b_offset) {
3449
+ _assertClass(photon_image, PhotonImage);
3450
+ wasm.tint(photon_image.__wbg_ptr, r_offset, g_offset, b_offset);
3451
+ }
3452
+
3453
+ /**
3454
+ * Horizontal strips. Divide an image into a series of equal-height strips, for an artistic effect.
3455
+ *
3456
+ * # Arguments
3457
+ * * `img` - A PhotonImage that contains a view into the image.
3458
+ * * `num_strips` - The number of strips
3459
+ * # Example
3460
+ *
3461
+ * ```no_run
3462
+ * // For example, to draw horizontal strips on a `PhotonImage`:
3463
+ * use photon_rs::effects::horizontal_strips;
3464
+ * use photon_rs::native::open_image;
3465
+ *
3466
+ * let mut img = open_image("img.jpg").expect("File should open");
3467
+ * horizontal_strips(&mut img, 8u8);
3468
+ * ```
3469
+ * @param {PhotonImage} photon_image
3470
+ * @param {number} num_strips
3471
+ */
3472
+ export function horizontal_strips(photon_image, num_strips) {
3473
+ _assertClass(photon_image, PhotonImage);
3474
+ wasm.horizontal_strips(photon_image.__wbg_ptr, num_strips);
3475
+ }
3476
+
3477
+ /**
3478
+ * Horizontal strips. Divide an image into a series of equal-width strips, for an artistic effect. Sepcify a color as well.
3479
+ *
3480
+ * # Arguments
3481
+ * * `img` - A PhotonImage that contains a view into the image.
3482
+ * * `num_strips` - The numbder of strips
3483
+ * * `color` - Color of strips.
3484
+ * # Example
3485
+ *
3486
+ * ```no_run
3487
+ * // For example, to draw blue horizontal strips on a `PhotonImage`:
3488
+ * use photon_rs::effects::color_horizontal_strips;
3489
+ * use photon_rs::native::open_image;
3490
+ * use photon_rs::Rgb;
3491
+ *
3492
+ * let color = Rgb::new(255u8, 0u8, 0u8);
3493
+ * let mut img = open_image("img.jpg").expect("File should open");
3494
+ * color_horizontal_strips(&mut img, 8u8, color);
3495
+ * ```
3496
+ * @param {PhotonImage} photon_image
3497
+ * @param {number} num_strips
3498
+ * @param {Rgb} color
3499
+ */
3500
+ export function color_horizontal_strips(photon_image, num_strips, color) {
3501
+ _assertClass(photon_image, PhotonImage);
3502
+ _assertClass(color, Rgb);
3503
+ var ptr0 = color.__destroy_into_raw();
3504
+ wasm.color_horizontal_strips(photon_image.__wbg_ptr, num_strips, ptr0);
3505
+ }
3506
+
3507
+ /**
3508
+ * Vertical strips. Divide an image into a series of equal-width strips, for an artistic effect.
3509
+ *
3510
+ * # Arguments
3511
+ * * `img` - A PhotonImage that contains a view into the image.
3512
+ * * `num_strips` - The numbder of strips
3513
+ * # Example
3514
+ *
3515
+ * ```no_run
3516
+ * // For example, to draw vertical strips on a `PhotonImage`:
3517
+ * use photon_rs::effects::vertical_strips;
3518
+ * use photon_rs::native::open_image;
3519
+ *
3520
+ * let mut img = open_image("img.jpg").expect("File should open");
3521
+ * vertical_strips(&mut img, 8u8);
3522
+ * ```
3523
+ * @param {PhotonImage} photon_image
3524
+ * @param {number} num_strips
3525
+ */
3526
+ export function vertical_strips(photon_image, num_strips) {
3527
+ _assertClass(photon_image, PhotonImage);
3528
+ wasm.vertical_strips(photon_image.__wbg_ptr, num_strips);
3529
+ }
3530
+
3531
+ /**
3532
+ * Vertical strips. Divide an image into a series of equal-width strips, for an artistic effect. Sepcify a color as well.
3533
+ *
3534
+ * # Arguments
3535
+ * * `img` - A PhotonImage that contains a view into the image.
3536
+ * * `num_strips` - The numbder of strips
3537
+ * * `color` - Color of strips.
3538
+ * # Example
3539
+ *
3540
+ * ```no_run
3541
+ * // For example, to draw red vertical strips on a `PhotonImage`:
3542
+ * use photon_rs::effects::color_vertical_strips;
3543
+ * use photon_rs::native::open_image;
3544
+ * use photon_rs::Rgb;
3545
+ *
3546
+ * let color = Rgb::new(255u8, 0u8, 0u8);
3547
+ * let mut img = open_image("img.jpg").expect("File should open");
3548
+ * color_vertical_strips(&mut img, 8u8, color);
3549
+ * ```
3550
+ * @param {PhotonImage} photon_image
3551
+ * @param {number} num_strips
3552
+ * @param {Rgb} color
3553
+ */
3554
+ export function color_vertical_strips(photon_image, num_strips, color) {
3555
+ _assertClass(photon_image, PhotonImage);
3556
+ _assertClass(color, Rgb);
3557
+ var ptr0 = color.__destroy_into_raw();
3558
+ wasm.color_vertical_strips(photon_image.__wbg_ptr, num_strips, ptr0);
3559
+ }
3560
+
3561
+ /**
3562
+ * Turn an image into an oil painting
3563
+ *
3564
+ * # Arguments
3565
+ * * `img` - A PhotonImage that contains a view into the image.
3566
+ * * `radius` - Radius of each paint particle
3567
+ * * `intesnity` - How artsy an Image should be
3568
+ * # Example
3569
+ *
3570
+ * ```no_run
3571
+ * // For example, to oil an image of type `PhotonImage`:
3572
+ * use photon_rs::effects::oil;
3573
+ * use photon_rs::native::open_image;
3574
+ *
3575
+ * let mut img = open_image("img.jpg").expect("File should open");
3576
+ * oil(&mut img, 4i32, 55.0);
3577
+ * ```
3578
+ * @param {PhotonImage} photon_image
3579
+ * @param {number} radius
3580
+ * @param {number} intensity
3581
+ */
3582
+ export function oil(photon_image, radius, intensity) {
3583
+ _assertClass(photon_image, PhotonImage);
3584
+ wasm.oil(photon_image.__wbg_ptr, radius, intensity);
3585
+ }
3586
+
3587
+ /**
3588
+ * Turn an image into an frosted glass see through
3589
+ *
3590
+ * # Arguments
3591
+ * * `img` - A PhotonImage that contains a view into the image.
3592
+ * # Example
3593
+ *
3594
+ * ```no_run
3595
+ * // For example, to turn an image of type `PhotonImage` into frosted glass see through:
3596
+ * use photon_rs::effects::frosted_glass;
3597
+ * use photon_rs::native::open_image;
3598
+ *
3599
+ * let mut img = open_image("img.jpg").expect("File should open");
3600
+ * frosted_glass(&mut img);
3601
+ * ```
3602
+ * @param {PhotonImage} photon_image
3603
+ */
3604
+ export function frosted_glass(photon_image) {
3605
+ _assertClass(photon_image, PhotonImage);
3606
+ wasm.frosted_glass(photon_image.__wbg_ptr);
3607
+ }
3608
+
3609
+ /**
3610
+ * Pixelize an image.
3611
+ *
3612
+ * # Arguments
3613
+ * * `photon_image` - A PhotonImage that contains a view into the image.
3614
+ * * `pixel_size` - Targeted pixel size of generated image.
3615
+ * # Example
3616
+ *
3617
+ * ```no_run
3618
+ * // For example, to turn an image of type `PhotonImage` into a pixelized image with 50 pixels blocks:
3619
+ * use photon_rs::effects::pixelize;
3620
+ * use photon_rs::native::open_image;
3621
+ *
3622
+ * let mut img = open_image("img.jpg").expect("File should open");
3623
+ * pixelize(&mut img, 50);
3624
+ * ```
3625
+ * @param {PhotonImage} photon_image
3626
+ * @param {number} pixel_size
3627
+ */
3628
+ export function pixelize(photon_image, pixel_size) {
3629
+ _assertClass(photon_image, PhotonImage);
3630
+ wasm.pixelize(photon_image.__wbg_ptr, pixel_size);
3631
+ }
3632
+
3633
+ /**
3634
+ * Normalizes an image by remapping its range of pixels values. Only RGB
3635
+ * channels are processed and each channel is stretched to \[0, 255\] range
3636
+ * independently. This process is also known as contrast stretching.
3637
+ * # Arguments
3638
+ * * `photon_image` - A PhotonImage that contains a view into the image.
3639
+ * # Example
3640
+ *
3641
+ * ```no_run
3642
+ * // For example, to turn an image of type `PhotonImage` into a normalized image:
3643
+ * use photon_rs::effects::normalize;
3644
+ * use photon_rs::native::open_image;
3645
+ *
3646
+ * let mut img = open_image("img.jpg").expect("File should open");
3647
+ * normalize(&mut img);
3648
+ * ```
3649
+ * @param {PhotonImage} photon_image
3650
+ */
3651
+ export function normalize(photon_image) {
3652
+ _assertClass(photon_image, PhotonImage);
3653
+ wasm.normalize(photon_image.__wbg_ptr);
3654
+ }
3655
+
3656
+ /**
3657
+ * Applies Floyd-Steinberg dithering to an image.
3658
+ * Only RGB channels are processed, alpha remains unchanged.
3659
+ * # Arguments
3660
+ * * `photon_image` - A PhotonImage that contains a view into the image.
3661
+ * * `depth` - bits per channel. Clamped between 1 and 8.
3662
+ * # Example
3663
+ *
3664
+ * ```no_run
3665
+ * // For example, to turn an image of type `PhotonImage` into a dithered image:
3666
+ * use photon_rs::effects::dither;
3667
+ * use photon_rs::native::open_image;
3668
+ *
3669
+ * let mut img = open_image("img.jpg").expect("File should open");
3670
+ * let depth = 1;
3671
+ * dither(&mut img, depth);
3672
+ * ```
3673
+ * @param {PhotonImage} photon_image
3674
+ * @param {number} depth
3675
+ */
3676
+ export function dither(photon_image, depth) {
3677
+ _assertClass(photon_image, PhotonImage);
3678
+ wasm.dither(photon_image.__wbg_ptr, depth);
3679
+ }
3680
+
3681
+ /**
3682
+ * @param {PhotonImage} photon_image
3683
+ * @param {Rgb} color_a
3684
+ * @param {Rgb} color_b
3685
+ */
3686
+ export function duotone(photon_image, color_a, color_b) {
3687
+ _assertClass(photon_image, PhotonImage);
3688
+ _assertClass(color_a, Rgb);
3689
+ var ptr0 = color_a.__destroy_into_raw();
3690
+ _assertClass(color_b, Rgb);
3691
+ var ptr1 = color_b.__destroy_into_raw();
3692
+ wasm.duotone(photon_image.__wbg_ptr, ptr0, ptr1);
3693
+ }
3694
+
3695
+ /**
3696
+ * Add bordered-text to an image.
3697
+ * The only font available as of now is Roboto.
3698
+ * Note: A graphic design/text-drawing library is currently being developed, so stay tuned.
3699
+ *
3700
+ * # Arguments
3701
+ * * `photon_image` - A PhotonImage.
3702
+ * * `text` - Text string to be drawn to the image.
3703
+ * * `x` - x-coordinate of where first letter's 1st pixel should be drawn.
3704
+ * * `y` - y-coordinate of where first letter's 1st pixel should be drawn.
3705
+ * * `font_size` - Font size in pixels of the text to be drawn.
3706
+ *
3707
+ * # Example
3708
+ *
3709
+ * ```no_run
3710
+ * // For example to draw the string "Welcome to Photon!" at 10, 10:
3711
+ * use photon_rs::native::open_image;
3712
+ * use photon_rs::text::draw_text_with_border;
3713
+ *
3714
+ * // Open the image. A PhotonImage is returned.
3715
+ * let mut img = open_image("img.jpg").expect("File should open");
3716
+ * draw_text_with_border(&mut img, "Welcome to Photon!", 10_i32, 10_i32, 90_f32);
3717
+ * ```
3718
+ * @param {PhotonImage} photon_img
3719
+ * @param {string} text
3720
+ * @param {number} x
3721
+ * @param {number} y
3722
+ * @param {number} font_size
3723
+ */
3724
+ export function draw_text_with_border(photon_img, text, x, y, font_size) {
3725
+ _assertClass(photon_img, PhotonImage);
3726
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3727
+ const len0 = WASM_VECTOR_LEN;
3728
+ wasm.draw_text_with_border(photon_img.__wbg_ptr, ptr0, len0, x, y, font_size);
3729
+ }
3730
+
3731
+ /**
3732
+ * Add text to an image.
3733
+ * The only font available as of now is Roboto.
3734
+ * Note: A graphic design/text-drawing library is currently being developed, so stay tuned.
3735
+ *
3736
+ * # Arguments
3737
+ * * `photon_image` - A PhotonImage.
3738
+ * * `text` - Text string to be drawn to the image.
3739
+ * * `x` - x-coordinate of where first letter's 1st pixel should be drawn.
3740
+ * * `y` - y-coordinate of where first letter's 1st pixel should be drawn.
3741
+ * * `font_size` - Font size in pixels of the text to be drawn.
3742
+ *
3743
+ * # Example
3744
+ *
3745
+ * ```no_run
3746
+ * // For example to draw the string "Welcome to Photon!" at 10, 10:
3747
+ * use photon_rs::native::open_image;
3748
+ * use photon_rs::text::draw_text;
3749
+ *
3750
+ * // Open the image. A PhotonImage is returned.
3751
+ * let mut img = open_image("img.jpg").expect("File should open");
3752
+ * draw_text(&mut img, "Welcome to Photon!", 10_i32, 10_i32, 90_f32);
3753
+ * ```
3754
+ * @param {PhotonImage} photon_img
3755
+ * @param {string} text
3756
+ * @param {number} x
3757
+ * @param {number} y
3758
+ * @param {number} font_size
3759
+ */
3760
+ export function draw_text(photon_img, text, x, y, font_size) {
3761
+ _assertClass(photon_img, PhotonImage);
3762
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3763
+ const len0 = WASM_VECTOR_LEN;
3764
+ wasm.draw_text(photon_img.__wbg_ptr, ptr0, len0, x, y, font_size);
3765
+ }
3766
+
3767
+ function passArray8ToWasm0(arg, malloc) {
3768
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
3769
+ getUint8ArrayMemory0().set(arg, ptr / 1);
3770
+ WASM_VECTOR_LEN = arg.length;
3771
+ return ptr;
3772
+ }
3773
+
3774
+ function getArrayU8FromWasm0(ptr, len) {
3775
+ ptr = ptr >>> 0;
3776
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
3777
+ }
3778
+
3779
+ function takeFromExternrefTable0(idx) {
3780
+ const value = wasm.__wbindgen_export_2.get(idx);
3781
+ wasm.__externref_table_dealloc(idx);
3782
+ return value;
3783
+ }
3784
+ /**
3785
+ *! [temp] Check if WASM is supported.
3786
+ */
3787
+ export function run() {
3788
+ const ret = wasm.run();
3789
+ if (ret[1]) {
3790
+ throw takeFromExternrefTable0(ret[0]);
3791
+ }
3792
+ }
3793
+
3794
+ /**
3795
+ * Get the ImageData from a 2D canvas context
3796
+ * @param {HTMLCanvasElement} canvas
3797
+ * @param {CanvasRenderingContext2D} ctx
3798
+ * @returns {ImageData}
3799
+ */
3800
+ export function get_image_data(canvas, ctx) {
3801
+ const ret = wasm.get_image_data(canvas, ctx);
3802
+ return ret;
3803
+ }
3804
+
3805
+ /**
3806
+ * Place a PhotonImage onto a 2D canvas.
3807
+ * @param {HTMLCanvasElement} canvas
3808
+ * @param {CanvasRenderingContext2D} ctx
3809
+ * @param {PhotonImage} new_image
3810
+ */
3811
+ export function putImageData(canvas, ctx, new_image) {
3812
+ _assertClass(new_image, PhotonImage);
3813
+ var ptr0 = new_image.__destroy_into_raw();
3814
+ wasm.putImageData(canvas, ctx, ptr0);
3815
+ }
3816
+
3817
+ /**
3818
+ * Convert a HTML5 Canvas Element to a PhotonImage.
3819
+ *
3820
+ * This converts the ImageData found in the canvas context to a PhotonImage,
3821
+ * which can then have effects or filters applied to it.
3822
+ * @param {HTMLCanvasElement} canvas
3823
+ * @param {CanvasRenderingContext2D} ctx
3824
+ * @returns {PhotonImage}
3825
+ */
3826
+ export function open_image(canvas, ctx) {
3827
+ const ret = wasm.open_image(canvas, ctx);
3828
+ return PhotonImage.__wrap(ret);
3829
+ }
3830
+
3831
+ /**
3832
+ * Convert ImageData to a raw pixel vec of u8s.
3833
+ * @param {ImageData} imgdata
3834
+ * @returns {Uint8Array}
3835
+ */
3836
+ export function to_raw_pixels(imgdata) {
3837
+ const ret = wasm.to_raw_pixels(imgdata);
3838
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
3839
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
3840
+ return v1;
3841
+ }
3842
+
3843
+ /**
3844
+ * Convert a base64 string to a PhotonImage.
3845
+ * @param {string} base64
3846
+ * @returns {PhotonImage}
3847
+ */
3848
+ export function base64_to_image(base64) {
3849
+ const ptr0 = passStringToWasm0(base64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3850
+ const len0 = WASM_VECTOR_LEN;
3851
+ const ret = wasm.base64_to_image(ptr0, len0);
3852
+ return PhotonImage.__wrap(ret);
3853
+ }
3854
+
3855
+ /**
3856
+ * Convert a base64 string to a Vec of u8s.
3857
+ * @param {string} base64
3858
+ * @returns {Uint8Array}
3859
+ */
3860
+ export function base64_to_vec(base64) {
3861
+ const ptr0 = passStringToWasm0(base64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3862
+ const len0 = WASM_VECTOR_LEN;
3863
+ const ret = wasm.base64_to_vec(ptr0, len0);
3864
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
3865
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
3866
+ return v2;
3867
+ }
3868
+
3869
+ /**
3870
+ * Convert a PhotonImage to JS-compatible ImageData.
3871
+ * @param {PhotonImage} photon_image
3872
+ * @returns {ImageData}
3873
+ */
3874
+ export function to_image_data(photon_image) {
3875
+ _assertClass(photon_image, PhotonImage);
3876
+ var ptr0 = photon_image.__destroy_into_raw();
3877
+ const ret = wasm.to_image_data(ptr0);
3878
+ return ret;
3879
+ }
3880
+
3881
+ function isLikeNone(x) {
3882
+ return x === undefined || x === null;
3883
+ }
3884
+
3885
+ function addToExternrefTable0(obj) {
3886
+ const idx = wasm.__externref_table_alloc();
3887
+ wasm.__wbindgen_export_2.set(idx, obj);
3888
+ return idx;
3889
+ }
3890
+
3891
+ function handleError(f, args) {
3892
+ try {
3893
+ return f.apply(this, args);
3894
+ } catch (e) {
3895
+ const idx = addToExternrefTable0(e);
3896
+ wasm.__wbindgen_exn_store(idx);
3897
+ }
3898
+ }
3899
+
3900
+ let cachedUint8ClampedArrayMemory0 = null;
3901
+
3902
+ function getUint8ClampedArrayMemory0() {
3903
+ if (cachedUint8ClampedArrayMemory0 === null || cachedUint8ClampedArrayMemory0.byteLength === 0) {
3904
+ cachedUint8ClampedArrayMemory0 = new Uint8ClampedArray(wasm.memory.buffer);
3905
+ }
3906
+ return cachedUint8ClampedArrayMemory0;
3907
+ }
3908
+
3909
+ function getClampedArrayU8FromWasm0(ptr, len) {
3910
+ ptr = ptr >>> 0;
3911
+ return getUint8ClampedArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
3912
+ }
3913
+
3914
+ export const SamplingFilter = Object.freeze({ Nearest:1,"1":"Nearest",Triangle:2,"2":"Triangle",CatmullRom:3,"3":"CatmullRom",Gaussian:4,"4":"Gaussian",Lanczos3:5,"5":"Lanczos3", });
3915
+
3916
+ const PhotonImageFinalization = (typeof FinalizationRegistry === 'undefined')
3917
+ ? { register: () => {}, unregister: () => {} }
3918
+ : new FinalizationRegistry(ptr => wasm.__wbg_photonimage_free(ptr >>> 0, 1));
3919
+ /**
3920
+ * Provides the image's height, width, and contains the image's raw pixels.
3921
+ * For use when communicating between JS and WASM, and also natively.
3922
+ */
3923
+ export class PhotonImage {
3924
+
3925
+ static __wrap(ptr) {
3926
+ ptr = ptr >>> 0;
3927
+ const obj = Object.create(PhotonImage.prototype);
3928
+ obj.__wbg_ptr = ptr;
3929
+ PhotonImageFinalization.register(obj, obj.__wbg_ptr, obj);
3930
+ return obj;
3931
+ }
3932
+
3933
+ __destroy_into_raw() {
3934
+ const ptr = this.__wbg_ptr;
3935
+ this.__wbg_ptr = 0;
3936
+ PhotonImageFinalization.unregister(this);
3937
+ return ptr;
3938
+ }
3939
+
3940
+ free() {
3941
+ const ptr = this.__destroy_into_raw();
3942
+ wasm.__wbg_photonimage_free(ptr, 0);
3943
+ }
3944
+ /**
3945
+ * Create a new PhotonImage from a Vec of u8s, which represent raw pixels.
3946
+ * @param {Uint8Array} raw_pixels
3947
+ * @param {number} width
3948
+ * @param {number} height
3949
+ */
3950
+ constructor(raw_pixels, width, height) {
3951
+ const ptr0 = passArray8ToWasm0(raw_pixels, wasm.__wbindgen_malloc);
3952
+ const len0 = WASM_VECTOR_LEN;
3953
+ const ret = wasm.photonimage_new(ptr0, len0, width, height);
3954
+ this.__wbg_ptr = ret >>> 0;
3955
+ PhotonImageFinalization.register(this, this.__wbg_ptr, this);
3956
+ return this;
3957
+ }
3958
+ /**
3959
+ * Create a new PhotonImage from a base64 string.
3960
+ * @param {string} base64
3961
+ * @returns {PhotonImage}
3962
+ */
3963
+ static new_from_base64(base64) {
3964
+ const ptr0 = passStringToWasm0(base64, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3965
+ const len0 = WASM_VECTOR_LEN;
3966
+ const ret = wasm.base64_to_image(ptr0, len0);
3967
+ return PhotonImage.__wrap(ret);
3968
+ }
3969
+ /**
3970
+ * Create a new PhotonImage from a byteslice.
3971
+ * @param {Uint8Array} vec
3972
+ * @returns {PhotonImage}
3973
+ */
3974
+ static new_from_byteslice(vec) {
3975
+ const ptr0 = passArray8ToWasm0(vec, wasm.__wbindgen_malloc);
3976
+ const len0 = WASM_VECTOR_LEN;
3977
+ const ret = wasm.photonimage_new_from_byteslice(ptr0, len0);
3978
+ return PhotonImage.__wrap(ret);
3979
+ }
3980
+ /**
3981
+ * Create a new PhotonImage from a Blob/File.
3982
+ * @param {Blob} blob
3983
+ * @returns {PhotonImage}
3984
+ */
3985
+ static new_from_blob(blob) {
3986
+ const ret = wasm.photonimage_new_from_blob(blob);
3987
+ return PhotonImage.__wrap(ret);
3988
+ }
3989
+ /**
3990
+ * Create a new PhotonImage from a HTMLImageElement
3991
+ * @param {HTMLImageElement} image
3992
+ * @returns {PhotonImage}
3993
+ */
3994
+ static new_from_image(image) {
3995
+ const ret = wasm.photonimage_new_from_image(image);
3996
+ return PhotonImage.__wrap(ret);
3997
+ }
3998
+ /**
3999
+ * Get the width of the PhotonImage.
4000
+ * @returns {number}
4001
+ */
4002
+ get_width() {
4003
+ const ret = wasm.photonimage_get_width(this.__wbg_ptr);
4004
+ return ret >>> 0;
4005
+ }
4006
+ /**
4007
+ * Get the PhotonImage's pixels as a Vec of u8s.
4008
+ * @returns {Uint8Array}
4009
+ */
4010
+ get_raw_pixels() {
4011
+ const ret = wasm.photonimage_get_raw_pixels(this.__wbg_ptr);
4012
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
4013
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
4014
+ return v1;
4015
+ }
4016
+ /**
4017
+ * Get the height of the PhotonImage.
4018
+ * @returns {number}
4019
+ */
4020
+ get_height() {
4021
+ const ret = wasm.photonimage_get_height(this.__wbg_ptr);
4022
+ return ret >>> 0;
4023
+ }
4024
+ /**
4025
+ * Convert the PhotonImage to base64.
4026
+ * @returns {string}
4027
+ */
4028
+ get_base64() {
4029
+ let deferred1_0;
4030
+ let deferred1_1;
4031
+ try {
4032
+ const ret = wasm.photonimage_get_base64(this.__wbg_ptr);
4033
+ deferred1_0 = ret[0];
4034
+ deferred1_1 = ret[1];
4035
+ return getStringFromWasm0(ret[0], ret[1]);
4036
+ } finally {
4037
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
4038
+ }
4039
+ }
4040
+ /**
4041
+ * Convert the PhotonImage to raw bytes. Returns PNG.
4042
+ * @returns {Uint8Array}
4043
+ */
4044
+ get_bytes() {
4045
+ const ret = wasm.photonimage_get_bytes(this.__wbg_ptr);
4046
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
4047
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
4048
+ return v1;
4049
+ }
4050
+ /**
4051
+ * Convert the PhotonImage to raw bytes. Returns a JPEG.
4052
+ * @param {number} quality
4053
+ * @returns {Uint8Array}
4054
+ */
4055
+ get_bytes_jpeg(quality) {
4056
+ const ret = wasm.photonimage_get_bytes_jpeg(this.__wbg_ptr, quality);
4057
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
4058
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
4059
+ return v1;
4060
+ }
4061
+ /**
4062
+ * Convert the PhotonImage to raw bytes. Returns a WEBP.
4063
+ * @returns {Uint8Array}
4064
+ */
4065
+ get_bytes_webp() {
4066
+ const ret = wasm.photonimage_get_bytes_webp(this.__wbg_ptr);
4067
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
4068
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
4069
+ return v1;
4070
+ }
4071
+ /**
4072
+ * Convert the PhotonImage's raw pixels to JS-compatible ImageData.
4073
+ * @returns {ImageData}
4074
+ */
4075
+ get_image_data() {
4076
+ const ret = wasm.photonimage_get_image_data(this.__wbg_ptr);
4077
+ return ret;
4078
+ }
4079
+ /**
4080
+ * Convert ImageData to raw pixels, and update the PhotonImage's raw pixels to this.
4081
+ * @param {ImageData} img_data
4082
+ */
4083
+ set_imgdata(img_data) {
4084
+ wasm.photonimage_set_imgdata(this.__wbg_ptr, img_data);
4085
+ }
4086
+ /**
4087
+ * Calculates estimated filesize and returns number of bytes
4088
+ * @returns {bigint}
4089
+ */
4090
+ get_estimated_filesize() {
4091
+ const ret = wasm.photonimage_get_estimated_filesize(this.__wbg_ptr);
4092
+ return BigInt.asUintN(64, ret);
4093
+ }
4094
+ }
4095
+
4096
+ const RgbFinalization = (typeof FinalizationRegistry === 'undefined')
4097
+ ? { register: () => {}, unregister: () => {} }
4098
+ : new FinalizationRegistry(ptr => wasm.__wbg_rgb_free(ptr >>> 0, 1));
4099
+ /**
4100
+ * RGB color type.
4101
+ */
4102
+ export class Rgb {
4103
+
4104
+ __destroy_into_raw() {
4105
+ const ptr = this.__wbg_ptr;
4106
+ this.__wbg_ptr = 0;
4107
+ RgbFinalization.unregister(this);
4108
+ return ptr;
4109
+ }
4110
+
4111
+ free() {
4112
+ const ptr = this.__destroy_into_raw();
4113
+ wasm.__wbg_rgb_free(ptr, 0);
4114
+ }
4115
+ /**
4116
+ * Create a new RGB struct.
4117
+ * @param {number} r
4118
+ * @param {number} g
4119
+ * @param {number} b
4120
+ */
4121
+ constructor(r, g, b) {
4122
+ const ret = wasm.rgb_new(r, g, b);
4123
+ this.__wbg_ptr = ret >>> 0;
4124
+ RgbFinalization.register(this, this.__wbg_ptr, this);
4125
+ return this;
4126
+ }
4127
+ /**
4128
+ * Set the Red value.
4129
+ * @param {number} r
4130
+ */
4131
+ set_red(r) {
4132
+ wasm.rgb_set_red(this.__wbg_ptr, r);
4133
+ }
4134
+ /**
4135
+ * Get the Green value.
4136
+ * @param {number} g
4137
+ */
4138
+ set_green(g) {
4139
+ wasm.rgb_set_green(this.__wbg_ptr, g);
4140
+ }
4141
+ /**
4142
+ * Set the Blue value.
4143
+ * @param {number} b
4144
+ */
4145
+ set_blue(b) {
4146
+ wasm.rgb_set_blue(this.__wbg_ptr, b);
4147
+ }
4148
+ /**
4149
+ * Get the Red value.
4150
+ * @returns {number}
4151
+ */
4152
+ get_red() {
4153
+ const ret = wasm.rgb_get_red(this.__wbg_ptr);
4154
+ return ret;
4155
+ }
4156
+ /**
4157
+ * Get the Green value.
4158
+ * @returns {number}
4159
+ */
4160
+ get_green() {
4161
+ const ret = wasm.rgb_get_green(this.__wbg_ptr);
4162
+ return ret;
4163
+ }
4164
+ /**
4165
+ * Get the Blue value.
4166
+ * @returns {number}
4167
+ */
4168
+ get_blue() {
4169
+ const ret = wasm.rgb_get_blue(this.__wbg_ptr);
4170
+ return ret;
4171
+ }
4172
+ }
4173
+
4174
+ const RgbaFinalization = (typeof FinalizationRegistry === 'undefined')
4175
+ ? { register: () => {}, unregister: () => {} }
4176
+ : new FinalizationRegistry(ptr => wasm.__wbg_rgba_free(ptr >>> 0, 1));
4177
+ /**
4178
+ * RGBA color type.
4179
+ */
4180
+ export class Rgba {
4181
+
4182
+ __destroy_into_raw() {
4183
+ const ptr = this.__wbg_ptr;
4184
+ this.__wbg_ptr = 0;
4185
+ RgbaFinalization.unregister(this);
4186
+ return ptr;
4187
+ }
4188
+
4189
+ free() {
4190
+ const ptr = this.__destroy_into_raw();
4191
+ wasm.__wbg_rgba_free(ptr, 0);
4192
+ }
4193
+ /**
4194
+ * Create a new RGBA struct.
4195
+ * @param {number} r
4196
+ * @param {number} g
4197
+ * @param {number} b
4198
+ * @param {number} a
4199
+ */
4200
+ constructor(r, g, b, a) {
4201
+ const ret = wasm.rgba_new(r, g, b, a);
4202
+ this.__wbg_ptr = ret >>> 0;
4203
+ RgbaFinalization.register(this, this.__wbg_ptr, this);
4204
+ return this;
4205
+ }
4206
+ /**
4207
+ * Set the Red value.
4208
+ * @param {number} r
4209
+ */
4210
+ set_red(r) {
4211
+ wasm.rgb_set_red(this.__wbg_ptr, r);
4212
+ }
4213
+ /**
4214
+ * Get the Green value.
4215
+ * @param {number} g
4216
+ */
4217
+ set_green(g) {
4218
+ wasm.rgb_set_green(this.__wbg_ptr, g);
4219
+ }
4220
+ /**
4221
+ * Set the Blue value.
4222
+ * @param {number} b
4223
+ */
4224
+ set_blue(b) {
4225
+ wasm.rgb_set_blue(this.__wbg_ptr, b);
4226
+ }
4227
+ /**
4228
+ * Set the alpha value.
4229
+ * @param {number} a
4230
+ */
4231
+ set_alpha(a) {
4232
+ wasm.rgba_set_alpha(this.__wbg_ptr, a);
4233
+ }
4234
+ /**
4235
+ * Get the Red value.
4236
+ * @returns {number}
4237
+ */
4238
+ get_red() {
4239
+ const ret = wasm.rgb_get_red(this.__wbg_ptr);
4240
+ return ret;
4241
+ }
4242
+ /**
4243
+ * Get the Green value.
4244
+ * @returns {number}
4245
+ */
4246
+ get_green() {
4247
+ const ret = wasm.rgb_get_green(this.__wbg_ptr);
4248
+ return ret;
4249
+ }
4250
+ /**
4251
+ * Get the Blue value.
4252
+ * @returns {number}
4253
+ */
4254
+ get_blue() {
4255
+ const ret = wasm.rgb_get_blue(this.__wbg_ptr);
4256
+ return ret;
4257
+ }
4258
+ /**
4259
+ * Get the alpha value for this color.
4260
+ * @returns {number}
4261
+ */
4262
+ get_alpha() {
4263
+ const ret = wasm.rgba_get_alpha(this.__wbg_ptr);
4264
+ return ret;
4265
+ }
4266
+ }
4267
+
4268
+ async function __wbg_load(module, imports) {
4269
+ if (typeof Response === 'function' && module instanceof Response) {
4270
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
4271
+ try {
4272
+ return await WebAssembly.instantiateStreaming(module, imports);
4273
+
4274
+ } catch (e) {
4275
+ if (module.headers.get('Content-Type') != 'application/wasm') {
4276
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
4277
+
4278
+ } else {
4279
+ throw e;
4280
+ }
4281
+ }
4282
+ }
4283
+
4284
+ const bytes = await module.arrayBuffer();
4285
+ return await WebAssembly.instantiate(bytes, imports);
4286
+
4287
+ } else {
4288
+ const instance = await WebAssembly.instantiate(module, imports);
4289
+
4290
+ if (instance instanceof WebAssembly.Instance) {
4291
+ return { instance, module };
4292
+
4293
+ } else {
4294
+ return instance;
4295
+ }
4296
+ }
4297
+ }
4298
+
4299
+ function __wbg_get_imports() {
4300
+ const imports = {};
4301
+ imports.wbg = {};
4302
+ imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
4303
+ const ret = new Error();
4304
+ return ret;
4305
+ };
4306
+ imports.wbg.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
4307
+ const ret = arg1.stack;
4308
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4309
+ const len1 = WASM_VECTOR_LEN;
4310
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
4311
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
4312
+ };
4313
+ imports.wbg.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
4314
+ let deferred0_0;
4315
+ let deferred0_1;
4316
+ try {
4317
+ deferred0_0 = arg0;
4318
+ deferred0_1 = arg1;
4319
+ console.error(getStringFromWasm0(arg0, arg1));
4320
+ } finally {
4321
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
4322
+ }
4323
+ };
4324
+ imports.wbg.__wbg_instanceof_Window_c4b70662a0d2c5ec = function(arg0) {
4325
+ let result;
4326
+ try {
4327
+ result = arg0 instanceof Window;
4328
+ } catch (_) {
4329
+ result = false;
4330
+ }
4331
+ const ret = result;
4332
+ return ret;
4333
+ };
4334
+ imports.wbg.__wbg_document_e5c1786dea6542e4 = function(arg0) {
4335
+ const ret = arg0.document;
4336
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4337
+ };
4338
+ imports.wbg.__wbg_body_e70ae6abd01ae584 = function(arg0) {
4339
+ const ret = arg0.body;
4340
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4341
+ };
4342
+ imports.wbg.__wbg_createElement_5d4c76f218b78145 = function() { return handleError(function (arg0, arg1, arg2) {
4343
+ const ret = arg0.createElement(getStringFromWasm0(arg1, arg2));
4344
+ return ret;
4345
+ }, arguments) };
4346
+ imports.wbg.__wbg_width_4c6f0048d64cf86b = function(arg0) {
4347
+ const ret = arg0.width;
4348
+ return ret;
4349
+ };
4350
+ imports.wbg.__wbg_height_21f0d3fd8f753394 = function(arg0) {
4351
+ const ret = arg0.height;
4352
+ return ret;
4353
+ };
4354
+ imports.wbg.__wbg_width_79e0847ed5883b03 = function(arg0) {
4355
+ const ret = arg0.width;
4356
+ return ret;
4357
+ };
4358
+ imports.wbg.__wbg_height_e4e4e4779f8feac0 = function(arg0) {
4359
+ const ret = arg0.height;
4360
+ return ret;
4361
+ };
4362
+ imports.wbg.__wbg_data_fda507064d127f5b = function(arg0, arg1) {
4363
+ const ret = arg1.data;
4364
+ const ptr1 = passArray8ToWasm0(ret, wasm.__wbindgen_malloc);
4365
+ const len1 = WASM_VECTOR_LEN;
4366
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
4367
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
4368
+ };
4369
+ imports.wbg.__wbg_newwithu8clampedarrayandsh_1fddccb3a94a5e05 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
4370
+ const ret = new ImageData(getClampedArrayU8FromWasm0(arg0, arg1), arg2 >>> 0, arg3 >>> 0);
4371
+ return ret;
4372
+ }, arguments) };
4373
+ imports.wbg.__wbg_instanceof_CanvasRenderingContext2d_3abbe7ec7af32cae = function(arg0) {
4374
+ let result;
4375
+ try {
4376
+ result = arg0 instanceof CanvasRenderingContext2D;
4377
+ } catch (_) {
4378
+ result = false;
4379
+ }
4380
+ const ret = result;
4381
+ return ret;
4382
+ };
4383
+ imports.wbg.__wbg_drawImage_fede06db74e39a60 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
4384
+ arg0.drawImage(arg1, arg2, arg3);
4385
+ }, arguments) };
4386
+ imports.wbg.__wbg_drawImage_f395c8e43c79a909 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
4387
+ arg0.drawImage(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
4388
+ }, arguments) };
4389
+ imports.wbg.__wbg_getImageData_5e1c242046e6b59e = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
4390
+ const ret = arg0.getImageData(arg1, arg2, arg3, arg4);
4391
+ return ret;
4392
+ }, arguments) };
4393
+ imports.wbg.__wbg_putImageData_a8b3e177ee06d521 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
4394
+ arg0.putImageData(arg1, arg2, arg3);
4395
+ }, arguments) };
4396
+ imports.wbg.__wbg_instanceof_HtmlCanvasElement_25d964a0dde6717e = function(arg0) {
4397
+ let result;
4398
+ try {
4399
+ result = arg0 instanceof HTMLCanvasElement;
4400
+ } catch (_) {
4401
+ result = false;
4402
+ }
4403
+ const ret = result;
4404
+ return ret;
4405
+ };
4406
+ imports.wbg.__wbg_width_dc225e55343b745e = function(arg0) {
4407
+ const ret = arg0.width;
4408
+ return ret;
4409
+ };
4410
+ imports.wbg.__wbg_setwidth_488780db69b08846 = function(arg0, arg1) {
4411
+ arg0.width = arg1 >>> 0;
4412
+ };
4413
+ imports.wbg.__wbg_height_3a8bec2f3fe71b26 = function(arg0) {
4414
+ const ret = arg0.height;
4415
+ return ret;
4416
+ };
4417
+ imports.wbg.__wbg_setheight_1761808c18403921 = function(arg0, arg1) {
4418
+ arg0.height = arg1 >>> 0;
4419
+ };
4420
+ imports.wbg.__wbg_getContext_fc99dbd3a9a7e318 = function() { return handleError(function (arg0, arg1, arg2) {
4421
+ const ret = arg0.getContext(getStringFromWasm0(arg1, arg2));
4422
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
4423
+ }, arguments) };
4424
+ imports.wbg.__wbg_settextContent_f82a86a8df347e1c = function(arg0, arg1, arg2) {
4425
+ arg0.textContent = arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2);
4426
+ };
4427
+ imports.wbg.__wbg_appendChild_fa3b00dade9fc4cf = function() { return handleError(function (arg0, arg1) {
4428
+ const ret = arg0.appendChild(arg1);
4429
+ return ret;
4430
+ }, arguments) };
4431
+ imports.wbg.__wbg_newnoargs_e643855c6572a4a8 = function(arg0, arg1) {
4432
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
4433
+ return ret;
4434
+ };
4435
+ imports.wbg.__wbg_call_f96b398515635514 = function() { return handleError(function (arg0, arg1) {
4436
+ const ret = arg0.call(arg1);
4437
+ return ret;
4438
+ }, arguments) };
4439
+ imports.wbg.__wbg_self_b9aad7f1c618bfaf = function() { return handleError(function () {
4440
+ const ret = self.self;
4441
+ return ret;
4442
+ }, arguments) };
4443
+ imports.wbg.__wbg_window_55e469842c98b086 = function() { return handleError(function () {
4444
+ const ret = window.window;
4445
+ return ret;
4446
+ }, arguments) };
4447
+ imports.wbg.__wbg_globalThis_d0957e302752547e = function() { return handleError(function () {
4448
+ const ret = globalThis.globalThis;
4449
+ return ret;
4450
+ }, arguments) };
4451
+ imports.wbg.__wbg_global_ae2f87312b8987fb = function() { return handleError(function () {
4452
+ const ret = global.global;
4453
+ return ret;
4454
+ }, arguments) };
4455
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
4456
+ const ret = arg0 === undefined;
4457
+ return ret;
4458
+ };
4459
+ imports.wbg.__wbg_buffer_fcbfb6d88b2732e9 = function(arg0) {
4460
+ const ret = arg0.buffer;
4461
+ return ret;
4462
+ };
4463
+ imports.wbg.__wbg_new_bc5d9aad3f9ac80e = function(arg0) {
4464
+ const ret = new Uint8Array(arg0);
4465
+ return ret;
4466
+ };
4467
+ imports.wbg.__wbg_set_4b3aa8445ac1e91c = function(arg0, arg1, arg2) {
4468
+ arg0.set(arg1, arg2 >>> 0);
4469
+ };
4470
+ imports.wbg.__wbg_length_d9c4ded7e708c6a1 = function(arg0) {
4471
+ const ret = arg0.length;
4472
+ return ret;
4473
+ };
4474
+ imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
4475
+ const ret = debugString(arg1);
4476
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
4477
+ const len1 = WASM_VECTOR_LEN;
4478
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
4479
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
4480
+ };
4481
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
4482
+ throw new Error(getStringFromWasm0(arg0, arg1));
4483
+ };
4484
+ imports.wbg.__wbindgen_memory = function() {
4485
+ const ret = wasm.memory;
4486
+ return ret;
4487
+ };
4488
+ imports.wbg.__wbindgen_init_externref_table = function() {
4489
+ const table = wasm.__wbindgen_export_2;
4490
+ const offset = table.grow(4);
4491
+ table.set(0, undefined);
4492
+ table.set(offset + 0, undefined);
4493
+ table.set(offset + 1, null);
4494
+ table.set(offset + 2, true);
4495
+ table.set(offset + 3, false);
4496
+ ;
4497
+ };
4498
+
4499
+ return imports;
4500
+ }
4501
+
4502
+ function __wbg_init_memory(imports, memory) {
4503
+
4504
+ }
4505
+
4506
+ function __wbg_finalize_init(instance, module) {
4507
+ wasm = instance.exports;
4508
+ __wbg_init.__wbindgen_wasm_module = module;
4509
+ cachedDataViewMemory0 = null;
4510
+ cachedUint8ArrayMemory0 = null;
4511
+ cachedUint8ClampedArrayMemory0 = null;
4512
+
4513
+
4514
+ wasm.__wbindgen_start();
4515
+ return wasm;
4516
+ }
4517
+
4518
+ function initSync(module) {
4519
+ if (wasm !== undefined) return wasm;
4520
+
4521
+
4522
+ if (typeof module !== 'undefined') {
4523
+ if (Object.getPrototypeOf(module) === Object.prototype) {
4524
+ ({module} = module)
4525
+ } else {
4526
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
4527
+ }
4528
+ }
4529
+
4530
+ const imports = __wbg_get_imports();
4531
+
4532
+ __wbg_init_memory(imports);
4533
+
4534
+ if (!(module instanceof WebAssembly.Module)) {
4535
+ module = new WebAssembly.Module(module);
4536
+ }
4537
+
4538
+ const instance = new WebAssembly.Instance(module, imports);
4539
+
4540
+ return __wbg_finalize_init(instance, module);
4541
+ }
4542
+
4543
+ async function __wbg_init(module_or_path) {
4544
+ if (wasm !== undefined) return wasm;
4545
+
4546
+
4547
+ if (typeof module_or_path !== 'undefined') {
4548
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
4549
+ ({module_or_path} = module_or_path)
4550
+ } else {
4551
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
4552
+ }
4553
+ }
4554
+
4555
+ if (typeof module_or_path === 'undefined') {
4556
+ module_or_path = new URL('photon_rs_bg.wasm', import.meta.url);
4557
+ }
4558
+ const imports = __wbg_get_imports();
4559
+
4560
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
4561
+ module_or_path = fetch(module_or_path);
4562
+ }
4563
+
4564
+ __wbg_init_memory(imports);
4565
+
4566
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
4567
+
4568
+ return __wbg_finalize_init(instance, module);
4569
+ }
4570
+
4571
+ export { initSync };
4572
+ export default __wbg_init;