@chipmobilesdk/rn-payment 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/CHANGELOG.md +172 -0
  2. package/README.md +47 -16
  3. package/lib/commonjs/adapter/createStoreProvider.js +110 -0
  4. package/lib/commonjs/adapter/createStoreProvider.js.map +1 -0
  5. package/lib/commonjs/adapter/iap-adapter.js +393 -0
  6. package/lib/commonjs/adapter/iap-adapter.js.map +1 -0
  7. package/lib/commonjs/adapter/iapShapes.js +169 -0
  8. package/lib/commonjs/adapter/iapShapes.js.map +1 -0
  9. package/lib/commonjs/adapter/port.js +6 -0
  10. package/lib/commonjs/adapter/port.js.map +1 -0
  11. package/lib/commonjs/config/types.js +2 -0
  12. package/lib/commonjs/config/types.js.map +1 -0
  13. package/lib/commonjs/config/validate.js +181 -0
  14. package/lib/commonjs/config/validate.js.map +1 -0
  15. package/lib/commonjs/core/mutex.js +31 -0
  16. package/lib/commonjs/core/mutex.js.map +1 -0
  17. package/lib/commonjs/core/retry.js +37 -0
  18. package/lib/commonjs/core/retry.js.map +1 -0
  19. package/lib/commonjs/core/timers.js +207 -0
  20. package/lib/commonjs/core/timers.js.map +1 -0
  21. package/lib/commonjs/diagnostics/errors.js +83 -0
  22. package/lib/commonjs/diagnostics/errors.js.map +1 -0
  23. package/lib/commonjs/diagnostics/events.js +126 -0
  24. package/lib/commonjs/diagnostics/events.js.map +1 -0
  25. package/lib/commonjs/diagnostics/messageKeys.js +70 -0
  26. package/lib/commonjs/diagnostics/messageKeys.js.map +1 -0
  27. package/lib/commonjs/engine/connection.js +189 -0
  28. package/lib/commonjs/engine/connection.js.map +1 -0
  29. package/lib/commonjs/engine/engine.js +279 -0
  30. package/lib/commonjs/engine/engine.js.map +1 -0
  31. package/lib/commonjs/engine/finalize.js +325 -0
  32. package/lib/commonjs/engine/finalize.js.map +1 -0
  33. package/lib/commonjs/engine/foreground.js +26 -0
  34. package/lib/commonjs/engine/foreground.js.map +1 -0
  35. package/lib/commonjs/engine/internals.js +31 -0
  36. package/lib/commonjs/engine/internals.js.map +1 -0
  37. package/lib/commonjs/engine/pending.js +102 -0
  38. package/lib/commonjs/engine/pending.js.map +1 -0
  39. package/lib/commonjs/engine/products.js +198 -0
  40. package/lib/commonjs/engine/products.js.map +1 -0
  41. package/lib/commonjs/engine/purchase.js +395 -0
  42. package/lib/commonjs/engine/purchase.js.map +1 -0
  43. package/lib/commonjs/engine/purchaseFailure.js +77 -0
  44. package/lib/commonjs/engine/purchaseFailure.js.map +1 -0
  45. package/lib/commonjs/engine/receiptValidation.js +90 -0
  46. package/lib/commonjs/engine/receiptValidation.js.map +1 -0
  47. package/lib/commonjs/engine/state.js +201 -0
  48. package/lib/commonjs/engine/state.js.map +1 -0
  49. package/lib/commonjs/engine/subscriptions.js +122 -0
  50. package/lib/commonjs/engine/subscriptions.js.map +1 -0
  51. package/lib/commonjs/engine/sync.js +163 -0
  52. package/lib/commonjs/engine/sync.js.map +1 -0
  53. package/lib/commonjs/entitlements/aggregate.js +212 -0
  54. package/lib/commonjs/entitlements/aggregate.js.map +1 -0
  55. package/lib/commonjs/entitlements/mapping.js +41 -0
  56. package/lib/commonjs/entitlements/mapping.js.map +1 -0
  57. package/lib/commonjs/entitlements/policy.js +110 -0
  58. package/lib/commonjs/entitlements/policy.js.map +1 -0
  59. package/lib/commonjs/index.js +266 -0
  60. package/lib/commonjs/index.js.map +1 -0
  61. package/lib/commonjs/package.json +1 -0
  62. package/lib/commonjs/persistence/mmkv-store.js +149 -0
  63. package/lib/commonjs/persistence/mmkv-store.js.map +1 -0
  64. package/lib/commonjs/persistence/snapshot.js +229 -0
  65. package/lib/commonjs/persistence/snapshot.js.map +1 -0
  66. package/lib/commonjs/react/PaymentProvider.js +96 -0
  67. package/lib/commonjs/react/PaymentProvider.js.map +1 -0
  68. package/lib/commonjs/react/hooks.js +202 -0
  69. package/lib/commonjs/react/hooks.js.map +1 -0
  70. package/lib/commonjs/testing/conformance.js +136 -0
  71. package/lib/commonjs/testing/conformance.js.map +1 -0
  72. package/lib/commonjs/testing/fakeStore.js +281 -0
  73. package/lib/commonjs/testing/fakeStore.js.map +1 -0
  74. package/lib/commonjs/testing/index.js +45 -0
  75. package/lib/commonjs/testing/index.js.map +1 -0
  76. package/lib/module/adapter/createStoreProvider.js +106 -0
  77. package/lib/module/adapter/createStoreProvider.js.map +1 -0
  78. package/lib/module/adapter/iap-adapter.js +383 -0
  79. package/lib/module/adapter/iap-adapter.js.map +1 -0
  80. package/lib/module/adapter/iapShapes.js +160 -0
  81. package/lib/module/adapter/iapShapes.js.map +1 -0
  82. package/lib/module/adapter/port.js +4 -0
  83. package/lib/module/adapter/port.js.map +1 -0
  84. package/lib/module/config/types.js +2 -0
  85. package/lib/module/config/types.js.map +1 -0
  86. package/lib/module/config/validate.js +175 -0
  87. package/lib/module/config/validate.js.map +1 -0
  88. package/lib/module/core/mutex.js +22 -0
  89. package/lib/module/core/mutex.js.map +1 -0
  90. package/lib/module/core/retry.js +33 -0
  91. package/lib/module/core/retry.js.map +1 -0
  92. package/lib/module/core/timers.js +198 -0
  93. package/lib/module/core/timers.js.map +1 -0
  94. package/lib/module/diagnostics/errors.js +76 -0
  95. package/lib/module/diagnostics/errors.js.map +1 -0
  96. package/lib/module/diagnostics/events.js +117 -0
  97. package/lib/module/diagnostics/events.js.map +1 -0
  98. package/lib/module/diagnostics/messageKeys.js +64 -0
  99. package/lib/module/diagnostics/messageKeys.js.map +1 -0
  100. package/lib/module/engine/connection.js +185 -0
  101. package/lib/module/engine/connection.js.map +1 -0
  102. package/lib/module/engine/engine.js +274 -0
  103. package/lib/module/engine/engine.js.map +1 -0
  104. package/lib/module/engine/finalize.js +322 -0
  105. package/lib/module/engine/finalize.js.map +1 -0
  106. package/lib/module/engine/foreground.js +21 -0
  107. package/lib/module/engine/foreground.js.map +1 -0
  108. package/lib/module/engine/internals.js +26 -0
  109. package/lib/module/engine/internals.js.map +1 -0
  110. package/lib/module/engine/pending.js +95 -0
  111. package/lib/module/engine/pending.js.map +1 -0
  112. package/lib/module/engine/products.js +195 -0
  113. package/lib/module/engine/products.js.map +1 -0
  114. package/lib/module/engine/purchase.js +390 -0
  115. package/lib/module/engine/purchase.js.map +1 -0
  116. package/lib/module/engine/purchaseFailure.js +72 -0
  117. package/lib/module/engine/purchaseFailure.js.map +1 -0
  118. package/lib/module/engine/receiptValidation.js +87 -0
  119. package/lib/module/engine/receiptValidation.js.map +1 -0
  120. package/lib/module/engine/state.js +196 -0
  121. package/lib/module/engine/state.js.map +1 -0
  122. package/lib/module/engine/subscriptions.js +119 -0
  123. package/lib/module/engine/subscriptions.js.map +1 -0
  124. package/lib/module/engine/sync.js +158 -0
  125. package/lib/module/engine/sync.js.map +1 -0
  126. package/lib/module/entitlements/aggregate.js +204 -0
  127. package/lib/module/entitlements/aggregate.js.map +1 -0
  128. package/lib/module/entitlements/mapping.js +35 -0
  129. package/lib/module/entitlements/mapping.js.map +1 -0
  130. package/lib/module/entitlements/policy.js +104 -0
  131. package/lib/module/entitlements/policy.js.map +1 -0
  132. package/lib/module/index.js +59 -0
  133. package/lib/module/index.js.map +1 -0
  134. package/lib/module/package.json +1 -0
  135. package/lib/module/persistence/mmkv-store.js +144 -0
  136. package/lib/module/persistence/mmkv-store.js.map +1 -0
  137. package/lib/module/persistence/snapshot.js +221 -0
  138. package/lib/module/persistence/snapshot.js.map +1 -0
  139. package/lib/module/react/PaymentProvider.js +90 -0
  140. package/lib/module/react/PaymentProvider.js.map +1 -0
  141. package/lib/module/react/hooks.js +192 -0
  142. package/lib/module/react/hooks.js.map +1 -0
  143. package/lib/module/testing/conformance.js +130 -0
  144. package/lib/module/testing/conformance.js.map +1 -0
  145. package/lib/module/testing/fakeStore.js +276 -0
  146. package/lib/module/testing/fakeStore.js.map +1 -0
  147. package/lib/module/testing/index.js +13 -0
  148. package/lib/module/testing/index.js.map +1 -0
  149. package/lib/typescript/commonjs/adapter/createStoreProvider.d.ts +45 -0
  150. package/lib/typescript/commonjs/adapter/createStoreProvider.d.ts.map +1 -0
  151. package/lib/typescript/commonjs/adapter/iap-adapter.d.ts +80 -0
  152. package/lib/typescript/commonjs/adapter/iap-adapter.d.ts.map +1 -0
  153. package/lib/typescript/commonjs/adapter/iapShapes.d.ts +94 -0
  154. package/lib/typescript/commonjs/adapter/iapShapes.d.ts.map +1 -0
  155. package/lib/typescript/commonjs/adapter/port.d.ts +184 -0
  156. package/lib/typescript/commonjs/adapter/port.d.ts.map +1 -0
  157. package/lib/typescript/commonjs/config/types.d.ts +326 -0
  158. package/lib/typescript/commonjs/config/types.d.ts.map +1 -0
  159. package/lib/typescript/commonjs/config/validate.d.ts +63 -0
  160. package/lib/typescript/commonjs/config/validate.d.ts.map +1 -0
  161. package/lib/typescript/commonjs/core/mutex.d.ts +17 -0
  162. package/lib/typescript/commonjs/core/mutex.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/core/retry.d.ts +19 -0
  164. package/lib/typescript/commonjs/core/retry.d.ts.map +1 -0
  165. package/lib/typescript/commonjs/core/timers.d.ts +142 -0
  166. package/lib/typescript/commonjs/core/timers.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/diagnostics/errors.d.ts +55 -0
  168. package/lib/typescript/commonjs/diagnostics/errors.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/diagnostics/events.d.ts +158 -0
  170. package/lib/typescript/commonjs/diagnostics/events.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/diagnostics/messageKeys.d.ts +54 -0
  172. package/lib/typescript/commonjs/diagnostics/messageKeys.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/engine/connection.d.ts +30 -0
  174. package/lib/typescript/commonjs/engine/connection.d.ts.map +1 -0
  175. package/lib/typescript/commonjs/engine/engine.d.ts +93 -0
  176. package/lib/typescript/commonjs/engine/engine.d.ts.map +1 -0
  177. package/lib/typescript/commonjs/engine/finalize.d.ts +53 -0
  178. package/lib/typescript/commonjs/engine/finalize.d.ts.map +1 -0
  179. package/lib/typescript/commonjs/engine/foreground.d.ts +15 -0
  180. package/lib/typescript/commonjs/engine/foreground.d.ts.map +1 -0
  181. package/lib/typescript/commonjs/engine/internals.d.ts +28 -0
  182. package/lib/typescript/commonjs/engine/internals.d.ts.map +1 -0
  183. package/lib/typescript/commonjs/engine/pending.d.ts +51 -0
  184. package/lib/typescript/commonjs/engine/pending.d.ts.map +1 -0
  185. package/lib/typescript/commonjs/engine/products.d.ts +82 -0
  186. package/lib/typescript/commonjs/engine/products.d.ts.map +1 -0
  187. package/lib/typescript/commonjs/engine/purchase.d.ts +61 -0
  188. package/lib/typescript/commonjs/engine/purchase.d.ts.map +1 -0
  189. package/lib/typescript/commonjs/engine/purchaseFailure.d.ts +15 -0
  190. package/lib/typescript/commonjs/engine/purchaseFailure.d.ts.map +1 -0
  191. package/lib/typescript/commonjs/engine/receiptValidation.d.ts +42 -0
  192. package/lib/typescript/commonjs/engine/receiptValidation.d.ts.map +1 -0
  193. package/lib/typescript/commonjs/engine/state.d.ts +46 -0
  194. package/lib/typescript/commonjs/engine/state.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/engine/subscriptions.d.ts +61 -0
  196. package/lib/typescript/commonjs/engine/subscriptions.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/engine/sync.d.ts +36 -0
  198. package/lib/typescript/commonjs/engine/sync.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/entitlements/aggregate.d.ts +97 -0
  200. package/lib/typescript/commonjs/entitlements/aggregate.d.ts.map +1 -0
  201. package/lib/typescript/commonjs/entitlements/mapping.d.ts +27 -0
  202. package/lib/typescript/commonjs/entitlements/mapping.d.ts.map +1 -0
  203. package/lib/typescript/commonjs/entitlements/policy.d.ts +75 -0
  204. package/lib/typescript/commonjs/entitlements/policy.d.ts.map +1 -0
  205. package/lib/typescript/commonjs/index.d.ts +44 -0
  206. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  207. package/lib/typescript/commonjs/package.json +1 -0
  208. package/lib/typescript/commonjs/persistence/mmkv-store.d.ts +45 -0
  209. package/lib/typescript/commonjs/persistence/mmkv-store.d.ts.map +1 -0
  210. package/lib/typescript/commonjs/persistence/snapshot.d.ts +106 -0
  211. package/lib/typescript/commonjs/persistence/snapshot.d.ts.map +1 -0
  212. package/lib/typescript/commonjs/react/PaymentProvider.d.ts +57 -0
  213. package/lib/typescript/commonjs/react/PaymentProvider.d.ts.map +1 -0
  214. package/lib/typescript/commonjs/react/hooks.d.ts +80 -0
  215. package/lib/typescript/commonjs/react/hooks.d.ts.map +1 -0
  216. package/lib/typescript/commonjs/testing/conformance.d.ts +41 -0
  217. package/lib/typescript/commonjs/testing/conformance.d.ts.map +1 -0
  218. package/lib/typescript/commonjs/testing/fakeStore.d.ts +69 -0
  219. package/lib/typescript/commonjs/testing/fakeStore.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/testing/index.d.ts +12 -0
  221. package/lib/typescript/commonjs/testing/index.d.ts.map +1 -0
  222. package/lib/typescript/module/adapter/createStoreProvider.d.ts +45 -0
  223. package/lib/typescript/module/adapter/createStoreProvider.d.ts.map +1 -0
  224. package/lib/typescript/module/adapter/iap-adapter.d.ts +80 -0
  225. package/lib/typescript/module/adapter/iap-adapter.d.ts.map +1 -0
  226. package/lib/typescript/module/adapter/iapShapes.d.ts +94 -0
  227. package/lib/typescript/module/adapter/iapShapes.d.ts.map +1 -0
  228. package/lib/typescript/module/adapter/port.d.ts +184 -0
  229. package/lib/typescript/module/adapter/port.d.ts.map +1 -0
  230. package/lib/typescript/module/config/types.d.ts +326 -0
  231. package/lib/typescript/module/config/types.d.ts.map +1 -0
  232. package/lib/typescript/module/config/validate.d.ts +63 -0
  233. package/lib/typescript/module/config/validate.d.ts.map +1 -0
  234. package/lib/typescript/module/core/mutex.d.ts +17 -0
  235. package/lib/typescript/module/core/mutex.d.ts.map +1 -0
  236. package/lib/typescript/module/core/retry.d.ts +19 -0
  237. package/lib/typescript/module/core/retry.d.ts.map +1 -0
  238. package/lib/typescript/module/core/timers.d.ts +142 -0
  239. package/lib/typescript/module/core/timers.d.ts.map +1 -0
  240. package/lib/typescript/module/diagnostics/errors.d.ts +55 -0
  241. package/lib/typescript/module/diagnostics/errors.d.ts.map +1 -0
  242. package/lib/typescript/module/diagnostics/events.d.ts +158 -0
  243. package/lib/typescript/module/diagnostics/events.d.ts.map +1 -0
  244. package/lib/typescript/module/diagnostics/messageKeys.d.ts +54 -0
  245. package/lib/typescript/module/diagnostics/messageKeys.d.ts.map +1 -0
  246. package/lib/typescript/module/engine/connection.d.ts +30 -0
  247. package/lib/typescript/module/engine/connection.d.ts.map +1 -0
  248. package/lib/typescript/module/engine/engine.d.ts +93 -0
  249. package/lib/typescript/module/engine/engine.d.ts.map +1 -0
  250. package/lib/typescript/module/engine/finalize.d.ts +53 -0
  251. package/lib/typescript/module/engine/finalize.d.ts.map +1 -0
  252. package/lib/typescript/module/engine/foreground.d.ts +15 -0
  253. package/lib/typescript/module/engine/foreground.d.ts.map +1 -0
  254. package/lib/typescript/module/engine/internals.d.ts +28 -0
  255. package/lib/typescript/module/engine/internals.d.ts.map +1 -0
  256. package/lib/typescript/module/engine/pending.d.ts +51 -0
  257. package/lib/typescript/module/engine/pending.d.ts.map +1 -0
  258. package/lib/typescript/module/engine/products.d.ts +82 -0
  259. package/lib/typescript/module/engine/products.d.ts.map +1 -0
  260. package/lib/typescript/module/engine/purchase.d.ts +61 -0
  261. package/lib/typescript/module/engine/purchase.d.ts.map +1 -0
  262. package/lib/typescript/module/engine/purchaseFailure.d.ts +15 -0
  263. package/lib/typescript/module/engine/purchaseFailure.d.ts.map +1 -0
  264. package/lib/typescript/module/engine/receiptValidation.d.ts +42 -0
  265. package/lib/typescript/module/engine/receiptValidation.d.ts.map +1 -0
  266. package/lib/typescript/module/engine/state.d.ts +46 -0
  267. package/lib/typescript/module/engine/state.d.ts.map +1 -0
  268. package/lib/typescript/module/engine/subscriptions.d.ts +61 -0
  269. package/lib/typescript/module/engine/subscriptions.d.ts.map +1 -0
  270. package/lib/typescript/module/engine/sync.d.ts +36 -0
  271. package/lib/typescript/module/engine/sync.d.ts.map +1 -0
  272. package/lib/typescript/module/entitlements/aggregate.d.ts +97 -0
  273. package/lib/typescript/module/entitlements/aggregate.d.ts.map +1 -0
  274. package/lib/typescript/module/entitlements/mapping.d.ts +27 -0
  275. package/lib/typescript/module/entitlements/mapping.d.ts.map +1 -0
  276. package/lib/typescript/module/entitlements/policy.d.ts +75 -0
  277. package/lib/typescript/module/entitlements/policy.d.ts.map +1 -0
  278. package/lib/typescript/module/index.d.ts +44 -0
  279. package/lib/typescript/module/index.d.ts.map +1 -0
  280. package/lib/typescript/module/package.json +1 -0
  281. package/lib/typescript/module/persistence/mmkv-store.d.ts +45 -0
  282. package/lib/typescript/module/persistence/mmkv-store.d.ts.map +1 -0
  283. package/lib/typescript/module/persistence/snapshot.d.ts +106 -0
  284. package/lib/typescript/module/persistence/snapshot.d.ts.map +1 -0
  285. package/lib/typescript/module/react/PaymentProvider.d.ts +57 -0
  286. package/lib/typescript/module/react/PaymentProvider.d.ts.map +1 -0
  287. package/lib/typescript/module/react/hooks.d.ts +80 -0
  288. package/lib/typescript/module/react/hooks.d.ts.map +1 -0
  289. package/lib/typescript/module/testing/conformance.d.ts +41 -0
  290. package/lib/typescript/module/testing/conformance.d.ts.map +1 -0
  291. package/lib/typescript/module/testing/fakeStore.d.ts +69 -0
  292. package/lib/typescript/module/testing/fakeStore.d.ts.map +1 -0
  293. package/lib/typescript/module/testing/index.d.ts +12 -0
  294. package/lib/typescript/module/testing/index.d.ts.map +1 -0
  295. package/package.json +49 -13
  296. package/skills/sdk-rn-payment/SKILL.md +4 -4
  297. package/src/adapter/iap-adapter.ts +12 -216
  298. package/src/adapter/iapShapes.ts +232 -0
  299. package/src/config/types.ts +8 -0
  300. package/src/config/validate.ts +19 -4
  301. package/src/core/retry.ts +1 -58
  302. package/src/diagnostics/events.ts +1 -1
  303. package/src/engine/connection.ts +194 -0
  304. package/src/engine/engine.ts +140 -700
  305. package/src/engine/internals.ts +40 -0
  306. package/src/engine/products.ts +39 -17
  307. package/src/engine/purchase.ts +22 -130
  308. package/src/engine/purchaseFailure.ts +48 -0
  309. package/src/engine/receiptValidation.ts +101 -0
  310. package/src/engine/state.ts +253 -0
  311. package/src/engine/sync.ts +161 -0
  312. package/src/entitlements/aggregate.ts +3 -5
  313. package/src/entitlements/mapping.ts +0 -22
  314. package/src/persistence/mmkv-store.ts +10 -3
  315. package/src/persistence/snapshot.ts +102 -27
  316. package/src/react/PaymentProvider.tsx +73 -24
  317. package/src/react/hooks.ts +13 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,177 @@
1
1
  # @chipmobilesdk/rn-payment
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Every package now ships built JavaScript with declaration files, instead of asking the
8
+ app to compile its TypeScript. ([#22](https://github.com/operationd8979/chip-mobile-sdk/pull/22))
9
+
10
+ Each tarball carries `lib/commonjs`, `lib/module` and `lib/typescript` (built with
11
+ `react-native-builder-bob`), and `src/` alongside them. What that changes for a
12
+ consumer:
13
+
14
+ - **Nothing to add to `transformIgnorePatterns`.** `require` resolves to the CommonJS
15
+ build, so an app's Jest loads this package without being told to transform it. That
16
+ was the one thing every consuming app had to know about us (DEP-04).
17
+ - **Typechecking reads our `.d.ts`** rather than compiling our source under our
18
+ `tsconfig`. A consumer's stricter — or looser — settings no longer meet our code.
19
+ - **`import` resolves to ESM**, so a bundler can tree-shake what it does not use.
20
+
21
+ No exported name changed, and no subpath moved: `.`, `./testing`, `./push`,
22
+ `./advanced`, `./app-auth`, `./keychain` and rn-core's twelve subpaths resolve exactly
23
+ as before, each now with its own declarations for both module systems. publint and
24
+ `attw --profile node16` pass on all twelve packages, which they could not before.
25
+
26
+ Inside the monorepo nothing changed either, and that is deliberate: every subpath also
27
+ declares a private `chipmobilesdk-source` condition pointing at its TypeScript, and
28
+ Metro, Jest and `tsc` here ask for that condition first. The demo app bundles 371
29
+ modules straight from `packages/*/src`, so editing a package still changes the app with
30
+ no build step, and coverage is still measured on the source. The condition is named for
31
+ this organization rather than using the conventional `source` because third-party
32
+ packages declare that one too — `@dr.pogodin/react-native-fs` does — and asking for it
33
+ pulled their sources into our stricter compile.
34
+
35
+ `npm run build:packages` builds everything, `prepack` rebuilds before any `npm pack`,
36
+ and `lib/` is git-ignored: the published bytes are produced by the release, never
37
+ committed. `npm run check:manifests` now fails a package whose `main`, `module`,
38
+ `types`, `source` condition, `files`, build script or `prepack` do not match this shape.
39
+
40
+ ### Patch Changes
41
+
42
+ - Every peer range has an upper bound, and no package declares a peer it does not use. ([#21](https://github.com/operationd8979/chip-mobile-sdk/pull/21))
43
+
44
+ A peer range is now a caret, a tilde or an explicit `<`, except for `react` and
45
+ `react-native`: an app brings exactly one of each, so a floor is the only useful thing
46
+ to say about them. Every other peer is a library the app installs beside us, and an
47
+ open `>=` was a promise about versions nobody had run — mmkv 3→4 lost entitlements and
48
+ pending purchases exactly that way.
49
+
50
+ **Four of the new ceilings exclude a version that is already published**, so an app
51
+ that took the open range at its word may now see a peer warning. The new bound is the
52
+ major this release is tested against, which is the thing the old range failed to say:
53
+
54
+ | Peer | Was | Now | Published above the ceiling |
55
+ |---|---|---|---|
56
+ | `react-native-app-auth` (rn-auth) | `>=8` | `^8.0.0` | 9.0.0 |
57
+ | `react-native-keychain` (rn-auth) | `>=10` | `^10.0.0` | 11.0.0 |
58
+ | `@op-engineering/op-sqlite` (rn-local-db) | `>=17.1.0` | `^17.1.0` | 18.x, 19.x |
59
+ | `@react-native-firebase/messaging` (rn-notification) | `>=26.0.0` | `^26.0.0` | 27.x |
60
+
61
+ The others — `react-native-vision-camera` `^5.1.1`, `react-native-svg` `^15.15.0`,
62
+ `react-native-unistyles` `^3.2.0`, `@dr.pogodin/react-native-fs` `^2.39.2`,
63
+ `react-native-quick-crypto` `^1.0.0`, `react-native-notify-kit` `^10.5.0`,
64
+ `react-native-localize` `^3.7.0`, `react-native-mmkv` `^4.0.0` — exclude nothing that
65
+ exists today. rn-payment's mmkv range was already bounded (`>=4.0.0 <5`) and is now
66
+ written as the caret that means the same thing.
67
+
68
+ Peers nothing imports are gone. `rn-theme`, `rn-local-db` and `rn-notification` asked
69
+ for `react` without having a component or a hook between them; `rn-auth`, `rn-ai` and
70
+ `rn-i18n` asked for `react-native` without touching a React Native API (rn-auth reaches
71
+ both native modules through `lazyPeer`, rn-i18n formats on `Intl`); `rn-notification`
72
+ asked for `@react-native-firebase/app`, which messaging declares itself. `rn-ai` no
73
+ longer peers on `@chipmobilesdk/rn-auth` at all — it asks for a `TokenProvider`, a
74
+ two-method interface rn-auth's `auth` satisfies, so an app with its own token source
75
+ installs nothing extra. An app that enables push or signs in through rn-auth installs
76
+ the same packages as before; it is the manifest that stopped overstating.
77
+
78
+ `react-native-localize` is declared optional, which is what the code already did: the
79
+ time-zone reader goes through `lazyPeer` and falls back to `Intl` without it. The
80
+ `peerDependenciesMeta` entries that said `optional: false` are gone — that is npm's
81
+ default, and writing it down only invited the question of which peers were undecided.
82
+
83
+ `npm run check:manifests` now fails on an unbounded peer range, a peer nothing in
84
+ `src/` imports, and a `peerDependenciesMeta` entry for either, so the policy holds
85
+ without anyone remembering it.
86
+
87
+ - Each package's public API and its weight are now recorded in the repository, so a change
88
+ to either is reviewed rather than discovered. ([#23](https://github.com/operationd8979/chip-mobile-sdk/pull/23))
89
+
90
+ `packages/<pkg>/etc/*.api.md` is an api-extractor report per entrypoint — twenty-seven
91
+ of them, generated from the declarations the package publishes and committed. A renamed
92
+ type, a widened union, one more optional field: all of it shows up in a pull request's
93
+ diff. `npm run check:api` fails when a report is out of date and `npm run api:update`
94
+ rewrites them.
95
+
96
+ A report that moves now needs a **minor or major** changeset for that package.
97
+ `check:changesets` enforces it, because the report is generated from what the package
98
+ publishes, and a patch release that moves the public surface is how a consumer's build
99
+ breaks on `npm update`. A report added for the first time is a baseline, not a change.
100
+ `./testing` deliberately has no report: test doubles are not a surface a release is
101
+ gated on.
102
+
103
+ `npm run check:size` holds every entrypoint to a budget in `.size-limit.json`, measured
104
+ on the ESM build with peers and rn-core treated as external — they are what an app
105
+ installs beside us, not our weight. Each budget started at today's measurement plus five
106
+ per cent, so growth becomes a decision someone makes instead of a drift nobody sees. The
107
+ current figures run from 500 B (`rn-core/lazy`) to 19 kB (rn-notification).
108
+
109
+ No behaviour or API changed in this release; the entry is here so the changelog records
110
+ when the reports and the budgets began.
111
+ - Updated dependencies ([#22](https://github.com/operationd8979/chip-mobile-sdk/pull/22), [#23](https://github.com/operationd8979/chip-mobile-sdk/pull/23)):
112
+ - @chipmobilesdk/rn-core@0.2.0
113
+
114
+ ## 0.6.0
115
+
116
+ ### Minor Changes
117
+
118
+ - The engine is split by responsibility, and its internals are off the public type. ([#19](https://github.com/operationd8979/chip-mobile-sdk/pull/19))
119
+
120
+ - `PaymentEngine` no longer has `resolvedConfig`, `nextCorrelationId`, `emitter`,
121
+ `snapshot`, `commitSnapshot`, `mayCreateRealTransaction` or `recordBlockedOperation`.
122
+ They were documented as internal, but any consumer could call `commitSnapshot` and
123
+ grant itself an entitlement the store never sold, and a hand-written engine double had
124
+ to implement all of them.
125
+ - `entitlement_revoked` now carries the real reason: `validation_rejected` when your
126
+ backend said no, `consumed` for a consumed item, `expired` for a lapsed subscription,
127
+ and `revoked_by_store` only when the store stopped reporting the purchase. Before, every
128
+ revocation said `revoked_by_store`.
129
+ - `clearLocalData()` also drops cached product prices.
130
+ - A `not_ready` purchase result reports the engine's actual status instead of always
131
+ `connecting`. `usePurchase().purchase` takes a `ProductKey`, as it always accepted.
132
+ - Local storage moves to schema version 2: the never-written `entitlements` map and
133
+ `finalized` purchase state are gone. A version 1 record is migrated in place on first
134
+ load, so nothing needs to be done.
135
+ - Internally, `engine.ts` is 346 lines (was 921): state, connection and sync are their
136
+ own modules, and sync and the purchase flow build purchase records with one function.
137
+ The unused `runWithRetry`, `backoffSchedule`, `sourcesFor` and `entitlementsCoveredBy`
138
+ helpers are gone.
139
+
140
+ - The provider keeps one engine, stored records are checked one by one, and product
141
+ queries run in parallel. ([#19](https://github.com/operationd8979/chip-mobile-sdk/pull/19))
142
+
143
+ - `PaymentProvider` builds its engine once and keeps it across renders. Inline
144
+ `config` and `deps` objects no longer reconnect to the store on every render of your
145
+ root. A new engine is built only when the new `engineKey` prop changes (default:
146
+ `config.scopeToken`). It now works under React StrictMode, where it used to be left
147
+ holding a cleaned-up engine that never became ready. Pass `engine` to share an engine
148
+ you created and own; the provider then neither initializes nor cleans it up.
149
+ - `initialize()` on a cleaned-up engine reports `PAYMENT_NOT_CONFIGURED` even if the
150
+ engine had been ready, instead of answering `ok`.
151
+ - Every stored purchase record is checked field by field when read. A damaged one is
152
+ dropped and comes back with the next sync, rather than being trusted or taking the
153
+ rest down with it. Only a `purchased` record grants an entitlement; a state this
154
+ version does not know never does.
155
+ - A failed write to local storage is reported as an `internal_error` with
156
+ `PAYMENT_STORAGE_UNAVAILABLE` and operation `persist`, instead of being swallowed.
157
+ A custom `SnapshotStore.save` may return `false` to report one.
158
+ - One-time and subscription products are queried in parallel, identical requests in
159
+ flight share one store call, and `useProducts` never lets an older answer overwrite a
160
+ newer one. `status.blockedOperations` keeps the 20 most recent.
161
+
162
+ - `allowStoreTestPurchases` lets a debug build buy through the real store for Play
163
+ license testers. It is accepted only with `environment: 'test'`; any other environment
164
+ rejects it at startup with `PAYMENT_INVALID_CONFIG`. Without it, non-production
165
+ purchases are still refused as `environment_blocked`, as before. The README no longer
166
+ says the billing library is uninstalled or the adapter unverified, and describes what
167
+ adding iOS actually involves. ([#19](https://github.com/operationd8979/chip-mobile-sdk/pull/19))
168
+
169
+ ### Patch Changes
170
+
171
+ - Internal: no module in these packages is over 500 lines any more. The camera controller's session I/O moved to `sessionRuntime` and its contract to `contract.ts`; the Play adapter's shape translation to `iapShapes`; the purchase flow's failure mapping and its receipt-validation hook to modules of their own; the AI client's quota request to `quotaRequest`; the in-memory adapter's attachments and the fake ads engine's clock likewise. Behaviour is unchanged — the splits are by responsibility, and every package's suite passes as it stood. ([#19](https://github.com/operationd8979/chip-mobile-sdk/pull/19))
172
+
173
+ The repository also measures what it promised: `npm run perf` prints the median of nine runs of the deterministic hot paths against written budgets (recurrence expansion, theme construction, translation lookup, chart geometry, filter compilation), the demo app has a Performance screen reporting startup phases, time to interactive and the same benchmarks on Hermes, and `npm run check:file-size` keeps the limit from drifting. The budgets and the measured figures are recorded in `docs/standards.md` §VI.
174
+
3
175
  ## 0.5.0
4
176
 
5
177
  ### Minor Changes
package/README.md CHANGED
@@ -91,12 +91,9 @@ npm install react-native-iap react-native-mmkv react-native-nitro-modules
91
91
  > do **not** add it yourself. No runtime permission is requested and no sensitive
92
92
  > API is touched, so there is no permission prompt and no denial path to handle.
93
93
  >
94
- > **Verified state in this repository:** the app manifest at
95
- > `android/app/src/main/AndroidManifest.xml` declares `INTERNET`, `CAMERA`, and
96
- > notification permissions, and **no** `BILLING` entry — correct, because the
97
- > billing library is not installed yet. Once it is, confirm the merged manifest
98
- > contains exactly one `com.android.vending.BILLING` entry and no new runtime
99
- > permission:
94
+ > **Check your merged manifest** once `react-native-iap` is installed: it should
95
+ > contain exactly one `com.android.vending.BILLING` entry, added by the billing
96
+ > library, and no new runtime permission:
100
97
  >
101
98
  > ```bash
102
99
  > # After a debug build, inspect the merge report:
@@ -118,7 +115,7 @@ Verified against this repository's toolchain, not assumed:
118
115
  | Android `minSdk` / `compileSdk` / `targetSdk` | 24 / 36 / 36 |
119
116
  | Kotlin | 2.1.20 |
120
117
  | `react-native-iap` | >= 16.7.3 < 17 (verified 16.7.3) |
121
- | `react-native-mmkv` | >= 4.0.0 < 5 (the store uses v4's `createMMKV`) |
118
+ | `react-native-mmkv` | `^4.0.0` (the store uses v4's `createMMKV`) |
122
119
  | `react-native-nitro-modules` | as required by `react-native-iap` (not a peer of this package) |
123
120
 
124
121
  **Why the `react-native-iap` ceiling is the next major.** Both the Nitro peer
@@ -164,9 +161,13 @@ const config = {
164
161
  isProductionBuild: true,
165
162
  };
166
163
 
164
+ // Created once, outside the component: the store adapter holds the billing
165
+ // connection.
166
+ const deps = { provider: createStoreProvider() };
167
+
167
168
  export function App() {
168
169
  return (
169
- <PaymentProvider config={config} deps={{ provider: createStoreProvider() }}>
170
+ <PaymentProvider config={config} deps={deps}>
170
171
  <YourApp />
171
172
  </PaymentProvider>
172
173
  );
@@ -182,6 +183,13 @@ function AdSlot() {
182
183
  }
183
184
  ```
184
185
 
186
+ The provider builds its engine once and keeps it across renders; `config` and `deps`
187
+ are read when it is built. It builds a new one when `engineKey` changes (by default
188
+ `config.scopeToken`, so switching accounts gets a fresh engine), and it survives React
189
+ StrictMode in development. To own the engine yourself — create it at startup, share it
190
+ with code outside React — pass it instead: `<PaymentProvider engine={engine}>`. The
191
+ provider then neither initializes nor cleans it up.
192
+
185
193
  `createStoreProvider()` picks the platform adapter. On a platform with no adapter
186
194
  it returns a stub that reports `unavailable` instead of throwing, so your app
187
195
  still starts and runs — it only loses the ability to sell.
@@ -551,6 +559,20 @@ Two layers:
551
559
  recorded in `getStatus().blockedOperations`, and emitted as
552
560
  `environment_blocked` — observable in state, so a test can assert it rather
553
561
  than scraping logs.
562
+ 3. **License testing, opted in.** `environment: 'test'` with
563
+ `allowStoreTestPurchases: true` lets a debug build buy through the real store,
564
+ so a Play license tester can check a purchase without a release build from a
565
+ track. Any other environment rejects the option at construction. License
566
+ testers are not charged; anyone else signed in on the device would be.
567
+
568
+ ```ts
569
+ const config = {
570
+ // ...
571
+ environment: 'test',
572
+ isProductionBuild: false,
573
+ allowStoreTestPurchases: true, // license testers only
574
+ };
575
+ ```
554
576
 
555
577
  > **Why this blocks where `@chipmobilesdk/rn-ads` substitutes.** The ads package
556
578
  > swaps in Google's official *test ad units* when a non-production build supplies
@@ -751,10 +773,8 @@ Exhaustively, for your Data safety declaration:
751
773
 
752
774
  | Stored | Why |
753
775
  |---|---|
754
- | Entitlement keys and their states | So entitlements are readable offline |
755
- | Granting product keys | So you can show the current plan |
756
- | Subscription expiry and renewal status | So lifecycle is readable offline |
757
- | Unfinished-transaction records (transaction id, product key, token, attempt count) | So a paid purchase is never lost to an app kill |
776
+ | Purchase records (transaction id, product key, product type, token, purchase time, store state, finalize state and attempt count, backend validation state) | So entitlements are readable offline and a paid purchase is never lost to an app kill. Entitlements themselves are derived from these, never stored |
777
+ | Subscription expiry and renewal status, on the purchase record | So lifecycle is readable offline |
758
778
  | Pending-purchase records (the same fields, plus the time the store reports the purchase was made) | So a payment still in flight is visible after an app kill. Unchanged since `0.1.0`; `0.2.0` only reads them |
759
779
  | Last successful sync time | So data age is observable |
760
780
  | Schema version | So the record can be migrated |
@@ -845,9 +865,11 @@ Your obligations as the app owner — this package cannot discharge them for you
845
865
  non-default policy needs server data.
846
866
  2. **iOS is contract-only.** `createStoreProvider()` returns an `unavailable` stub
847
867
  on iOS; the host app still starts and runs.
848
- 3. **The Android adapter is unverified on a device.** Only its purchase-state
849
- mapping has been checked against an installed binding. See
850
- [Compatibility](#compatibility).
868
+ 3. **Debug builds do not reach the store unless you opt in.** Outside production a
869
+ purchase reports `environment_blocked`. For a license tester on a debug build,
870
+ set `environment: 'test'` and `allowStoreTestPurchases: true`; only license
871
+ testers are not charged. See [Compatibility](#compatibility) for the devices and
872
+ binding the Android adapter was verified with.
851
873
  4. **Price-change confirmation is unsupported on Android.** Play notifies the user
852
874
  itself and offers no client-side flow, so `confirmPriceChange` reports
853
875
  `unsupported` rather than faking a confirmation.
@@ -863,7 +885,12 @@ Your obligations as the app owner — this package cannot discharge them for you
863
885
 
864
886
  ## Adding iOS later
865
887
 
866
- Implement `ProviderPort` for StoreKit. Nothing else changes.
888
+ Implement `ProviderPort` for StoreKit and return it from `createStoreProvider()` on
889
+ iOS. Your entitlement checks, hooks and purchase calls do not change. What an iOS
890
+ release adds: `storeProductIds.ios` in each catalog entry, the adapter's own
891
+ `capabilities()` (StoreKit can tell grace period from account hold, and supports
892
+ externally initiated purchases, so some states Android reports as `indeterminate`
893
+ become distinct), and its conformance run (`runProviderPortConformance`).
867
894
 
868
895
  | Play concept | Port concept | StoreKit |
869
896
  |---|---|---|
@@ -890,6 +917,10 @@ Local storage carries a schema version and a forward migration chain. A record
890
917
  that cannot be migrated is discarded and rebuilt from the store — safe, because
891
918
  discarding yields `unknown`, never a false `not_entitled`.
892
919
 
920
+ Schema version 2 (0.6.0) drops two things version 1 stored and never used: an
921
+ empty `entitlements` map and a `finalized` purchase state nothing set. A version 1
922
+ record is migrated in place on first load.
923
+
893
924
  ### Migrating `0.1.0` to `0.2.0`
894
925
 
895
926
  **One union gained a member**, so an exhaustive `switch` over it needs the new
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createStoreProvider = createStoreProvider;
7
+ exports.createUnsupportedProvider = createUnsupportedProvider;
8
+ var _reactNative = require("react-native");
9
+ var _iapAdapter = require("./iap-adapter.js");
10
+ /**
11
+ * Platform selection for the store adapter.
12
+ *
13
+ * This exists so the public surface never names a store. An app writes
14
+ * `createStoreProvider()`, not `createIapAdapter()` — the same call will pick the
15
+ * StoreKit adapter once iOS exists, and no consumer line changes (FR-002, FR-004,
16
+ * FR-007).
17
+ *
18
+ * On a platform with no adapter the result is a stub that reports
19
+ * `platform_unsupported` rather than throwing. That is what lets a host app start
20
+ * and run normally where selling is impossible, losing only the ability to sell
21
+ * (FR-021, FR-023).
22
+ */
23
+
24
+ const UNSUPPORTED_CAPABILITIES = {
25
+ supportsSubscriptions: false,
26
+ supportsPlanChange: false,
27
+ supportsPriceChangeConfirmation: false,
28
+ reportsGraceAndHoldDistinctly: false,
29
+ supportsExternalTransactions: false,
30
+ /** Nothing here can charge anyone, so the environment guard has nothing to block. */
31
+ createsRealTransactions: false,
32
+ purchaseOutcomeIncludesStoreTime: false
33
+ };
34
+
35
+ /**
36
+ * The no-adapter stub.
37
+ *
38
+ * Every operation fails safely and predictably. Notably `queryOwned` returns an
39
+ * empty list rather than throwing: the engine then computes `not_entitled` after a
40
+ * successful-but-empty sync, which is honest — on a platform with no store, the
41
+ * user genuinely holds nothing this package can verify.
42
+ */
43
+ function createUnsupportedProvider() {
44
+ return {
45
+ async connect() {
46
+ return {
47
+ ok: false,
48
+ reason: 'platform_unsupported',
49
+ retryable: false
50
+ };
51
+ },
52
+ async disconnect() {
53
+ // Nothing was ever connected.
54
+ },
55
+ observeConnection() {
56
+ return () => undefined;
57
+ },
58
+ async queryProducts() {
59
+ return [];
60
+ },
61
+ async queryOwned() {
62
+ return [];
63
+ },
64
+ async launchPurchase() {
65
+ return {
66
+ ok: false,
67
+ reason: 'not_ready',
68
+ detail: 'platform_unsupported'
69
+ };
70
+ },
71
+ observePurchases() {
72
+ return () => undefined;
73
+ },
74
+ async acknowledge() {
75
+ // No transaction can exist to acknowledge.
76
+ },
77
+ async consume() {
78
+ // As above.
79
+ },
80
+ async openSubscriptionManagement() {
81
+ // No store screen to open.
82
+ },
83
+ async confirmPriceChange() {
84
+ return {
85
+ ok: false,
86
+ reason: 'not_ready'
87
+ };
88
+ },
89
+ capabilities: () => UNSUPPORTED_CAPABILITIES
90
+ };
91
+ }
92
+ /**
93
+ * The platform's store adapter.
94
+ *
95
+ * iOS deliberately returns the stub today rather than throwing: the contract is
96
+ * prepared for StoreKit, the implementation is not, and an app running on iOS
97
+ * should degrade to "cannot sell here" instead of crashing.
98
+ */
99
+ function createStoreProvider(options = {}) {
100
+ if (options.forceUnsupported) {
101
+ return createUnsupportedProvider();
102
+ }
103
+ if (_reactNative.Platform.OS === 'android') {
104
+ return (0, _iapAdapter.createIapAdapter)();
105
+ }
106
+ return createUnsupportedProvider();
107
+ }
108
+
109
+ /** Exported for a test or a screen that needs the stub explicitly. */
110
+ //# sourceMappingURL=createStoreProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_iapAdapter","UNSUPPORTED_CAPABILITIES","supportsSubscriptions","supportsPlanChange","supportsPriceChangeConfirmation","reportsGraceAndHoldDistinctly","supportsExternalTransactions","createsRealTransactions","purchaseOutcomeIncludesStoreTime","createUnsupportedProvider","connect","ok","reason","retryable","disconnect","observeConnection","undefined","queryProducts","queryOwned","launchPurchase","detail","observePurchases","acknowledge","consume","openSubscriptionManagement","confirmPriceChange","capabilities","createStoreProvider","options","forceUnsupported","Platform","OS","createIapAdapter"],"sourceRoot":"../../../src","sources":["adapter/createStoreProvider.ts"],"mappings":";;;;;;;AAcA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAeA,MAAME,wBAA8C,GAAG;EACtDC,qBAAqB,EAAE,KAAK;EAC5BC,kBAAkB,EAAE,KAAK;EACzBC,+BAA+B,EAAE,KAAK;EACtCC,6BAA6B,EAAE,KAAK;EACpCC,4BAA4B,EAAE,KAAK;EACnC;EACAC,uBAAuB,EAAE,KAAK;EAC9BC,gCAAgC,EAAE;AACnC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,yBAAyBA,CAAA,EAAiB;EAClD,OAAO;IACN,MAAMC,OAAOA,CAAA,EAAoC;MAChD,OAAO;QAAEC,EAAE,EAAE,KAAK;QAAEC,MAAM,EAAE,sBAAsB;QAAEC,SAAS,EAAE;MAAM,CAAC;IACvE,CAAC;IACD,MAAMC,UAAUA,CAAA,EAAkB;MACjC;IAAA,CACA;IACDC,iBAAiBA,CAAA,EAAgB;MAChC,OAAO,MAAMC,SAAS;IACvB,CAAC;IACD,MAAMC,aAAaA,CAAA,EAA+B;MACjD,OAAO,EAAE;IACV,CAAC;IACD,MAAMC,UAAUA,CAAA,EAAgC;MAC/C,OAAO,EAAE;IACV,CAAC;IACD,MAAMC,cAAcA,CAAA,EAAqC;MACxD,OAAO;QAAER,EAAE,EAAE,KAAK;QAAEC,MAAM,EAAE,WAAW;QAAEQ,MAAM,EAAE;MAAuB,CAAC;IAC1E,CAAC;IACDC,gBAAgBA,CAAA,EAAgB;MAC/B,OAAO,MAAML,SAAS;IACvB,CAAC;IACD,MAAMM,WAAWA,CAAA,EAAkB;MAClC;IAAA,CACA;IACD,MAAMC,OAAOA,CAAA,EAAkB;MAC9B;IAAA,CACA;IACD,MAAMC,0BAA0BA,CAAA,EAAkB;MACjD;IAAA,CACA;IACD,MAAMC,kBAAkBA,CAAA,EAAwC;MAC/D,OAAO;QAAEd,EAAE,EAAE,KAAK;QAAEC,MAAM,EAAE;MAAY,CAAC;IAC1C,CAAC;IACDc,YAAY,EAAEA,CAAA,KAAMzB;EACrB,CAAC;AACF;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS0B,mBAAmBA,CAACC,OAA6B,GAAG,CAAC,CAAC,EAAgB;EACrF,IAAIA,OAAO,CAACC,gBAAgB,EAAE;IAC7B,OAAOpB,yBAAyB,CAAC,CAAC;EACnC;EACA,IAAIqB,qBAAQ,CAACC,EAAE,KAAK,SAAS,EAAE;IAC9B,OAAO,IAAAC,4BAAgB,EAAC,CAAC;EAC1B;EACA,OAAOvB,yBAAyB,CAAC,CAAC;AACnC;;AAEA","ignoreList":[]}